From 1c9e22e73c402a311a456fc559eb3ea1286aaabe Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 9 Aug 2019 13:10:50 +0200 Subject: [PATCH] Use nixFlakes in devShell --- flake.lock | 6 +++--- flake.nix | 49 ++++++++++++++++++++++++++++--------------------- 2 files changed, 31 insertions(+), 24 deletions(-) diff --git a/flake.lock b/flake.lock index acad413e..dfbe5b29 100644 --- a/flake.lock +++ b/flake.lock @@ -1,6 +1,6 @@ { "inputs": { - "nix": { + "nix/ab16b3d076e9cd3ecfdcde128f43dd486b072557": { "id": "nix", "inputs": { "nixpkgs": { @@ -11,9 +11,9 @@ "uri": "github:edolstra/nixpkgs/62ac6f7f504c8d3998558d9b269d22d26f13f1f0" } }, - "narHash": "sha256-MjLaMAh/KtAksnMwOH2GJn+YRJ4szwx24ybFXHTmShU=", + "narHash": "sha256-I9YtUO9Ia5CwiTFo4QzSYdZHO2G+BQ7sM4MSq29NDqc=", "nonFlakeInputs": {}, - "uri": "github:NixOS/nix/5d8ec94d7fe4eded9f836bc49449d6eaff8fbc8f" + "uri": "github:NixOS/nix/ab16b3d076e9cd3ecfdcde128f43dd486b072557" }, "nixpkgs": { "id": "nixpkgs", diff --git a/flake.nix b/flake.nix index 06b3657f..780b43cb 100644 --- a/flake.nix +++ b/flake.nix @@ -5,30 +5,37 @@ epoch = 201906; - inputs = [ "nixpkgs" "nix" ]; + inputs = + [ "nixpkgs" + "nix/ab16b3d076e9cd3ecfdcde128f43dd486b072557" + ]; - outputs = inputs: rec { - - hydraJobs = import ./release.nix { - hydraSrc = inputs.self; - nixpkgs = inputs.nixpkgs; + outputs = inputs: + let nix = inputs.nix.outputs.hydraJobs.build.x86_64-linux // { perl-bindings = inputs.nix.outputs.hydraJobs.perlBindings.x86_64-linux; }; + in rec { + + hydraJobs = import ./release.nix { + hydraSrc = inputs.self; + nixpkgs = inputs.nixpkgs; + inherit nix; + }; + + checks.build = hydraJobs.build.x86_64-linux; + checks.install = hydraJobs.tests.install.x86_64-linux; + + packages.hydra = hydraJobs.build.x86_64-linux; + + defaultPackage = packages.hydra; + + devShell = (import ./release.nix { + hydraSrc = inputs.self; + nixpkgs = inputs.nixpkgs; + shell = true; + inherit nix; + }).build.x86_64-linux; + }; - - checks.build = hydraJobs.build.x86_64-linux; - checks.install = hydraJobs.tests.install.x86_64-linux; - - packages.hydra = hydraJobs.build.x86_64-linux; - - defaultPackage = packages.hydra; - - devShell = (import ./release.nix { - hydraSrc = inputs.self; - nixpkgs = inputs.nixpkgs; - shell = true; - }).build.x86_64-linux; - - }; }