flake.nix: Use own nix-eval-jobs fork

Currently we depend on changes that are not yet in a released
version of nix-eval-jobs. This pin needs to go before the 0.3
release.
This commit is contained in:
Zhaofeng Li 2022-01-22 17:50:53 -08:00
parent cf9a72a1d4
commit faf84d5718
3 changed files with 69 additions and 3 deletions

View file

@ -16,7 +16,57 @@
"type": "github" "type": "github"
} }
}, },
"flake-utils": {
"locked": {
"lastModified": 1637014545,
"narHash": "sha256-26IZAc5yzlD9FlDT54io1oqG/bBoyka+FJk5guaX4x4=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "bba5dcc8e0b20ab664967ad83d24d64cb64ec4f4",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nix-eval-jobs": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1641681369,
"narHash": "sha256-FpWFVYm3N8qcjWd2+d3SjL5BKt4ScCr4fyc1indYwTY=",
"owner": "zhaofengli",
"repo": "nix-eval-jobs",
"rev": "5248c68833076062c7cd20eef1a70294776cf265",
"type": "github"
},
"original": {
"owner": "zhaofengli",
"ref": "colmena",
"repo": "nix-eval-jobs",
"type": "github"
}
},
"nixpkgs": { "nixpkgs": {
"locked": {
"lastModified": 1639573498,
"narHash": "sha256-YAoywqjyjOJYuEZpA8sln84jk99GG9hYbPEYXwGEGGM=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "aef12c8678fd5e927edba764bd04f3ba2930ae15",
"type": "github"
},
"original": {
"owner": "NixOS",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1642492175, "lastModified": 1642492175,
"narHash": "sha256-lo5hxiY8U4eREChAR7JD94zns92hQqmp3wg3qTFolPA=", "narHash": "sha256-lo5hxiY8U4eREChAR7JD94zns92hQqmp3wg3qTFolPA=",
@ -35,7 +85,8 @@
"root": { "root": {
"inputs": { "inputs": {
"flake-compat": "flake-compat", "flake-compat": "flake-compat",
"nixpkgs": "nixpkgs", "nix-eval-jobs": "nix-eval-jobs",
"nixpkgs": "nixpkgs_2",
"utils": "utils" "utils": "utils"
} }
}, },

View file

@ -5,16 +5,22 @@
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
utils.url = "github:numtide/flake-utils"; utils.url = "github:numtide/flake-utils";
# not yet upstreamed
nix-eval-jobs.url = "github:zhaofengli/nix-eval-jobs/colmena";
flake-compat = { flake-compat = {
url = "github:edolstra/flake-compat"; url = "github:edolstra/flake-compat";
flake = false; flake = false;
}; };
}; };
outputs = { self, nixpkgs, utils, ... }: let outputs = { self, nixpkgs, utils, nix-eval-jobs, ... }: let
supportedSystems = [ "x86_64-linux" "i686-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ]; supportedSystems = [ "x86_64-linux" "i686-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
in utils.lib.eachSystem supportedSystems (system: let in utils.lib.eachSystem supportedSystems (system: let
pkgs = import nixpkgs { inherit system; }; pkgs = import nixpkgs {
inherit system;
overlays = [ self._evalJobsOverlay ];
};
in rec { in rec {
# We still maintain the expression in a Nixpkgs-acceptable form # We still maintain the expression in a Nixpkgs-acceptable form
defaultPackage = self.packages.${system}.colmena; defaultPackage = self.packages.${system}.colmena;
@ -58,6 +64,14 @@
''; '';
}; };
}) // { }) // {
# For use in integration tests
_evalJobsOverlay =
(final: prev: {
nix-eval-jobs = (final.callPackage nix-eval-jobs.outPath {}).overrideAttrs (old: {
version = "0.0.3-colmena";
});
});
overlay = final: prev: { overlay = final: prev: {
colmena = final.callPackage ./package.nix { }; colmena = final.callPackage ./package.nix { };
}; };

View file

@ -2,6 +2,7 @@ let
flake = (import ../flake-compat.nix).defaultNix; flake = (import ../flake-compat.nix).defaultNix;
in import flake.inputs.nixpkgs.outPath { in import flake.inputs.nixpkgs.outPath {
overlays = [ overlays = [
flake._evalJobsOverlay
flake.overlay flake.overlay
]; ];
} }