flake.nix: Let's just patch the nix-eval-jobs in nixpkgs

Anything that links against Nix feels so fragile *shrugs*
This commit is contained in:
Zhaofeng Li 2022-02-04 23:28:14 -08:00
parent f3aba244f5
commit e7d4792634
3 changed files with 16 additions and 46 deletions

View file

@ -16,43 +16,6 @@
"type": "github" "type": "github"
} }
}, },
"flake-utils": {
"locked": {
"lastModified": 1642700792,
"narHash": "sha256-XqHrk7hFb+zBvRg6Ghl+AZDq03ov6OshJLiSWOoX5es=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "846b2ae0fc4cc943637d3d1def4454213e203cba",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nix-eval-jobs": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1644041308,
"narHash": "sha256-LlQ0z+0T4VayBOkePLgVsrl5RVNFVuK42Il5lAuniN0=",
"owner": "zhaofengli",
"repo": "nix-eval-jobs",
"rev": "21c724a8cea60e1e5fe83980c843060b1fbf899e",
"type": "github"
},
"original": {
"owner": "zhaofengli",
"ref": "colmena",
"repo": "nix-eval-jobs",
"type": "github"
}
},
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1643805626, "lastModified": 1643805626,
@ -72,7 +35,6 @@
"root": { "root": {
"inputs": { "inputs": {
"flake-compat": "flake-compat", "flake-compat": "flake-compat",
"nix-eval-jobs": "nix-eval-jobs",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"stable": "stable", "stable": "stable",
"utils": "utils" "utils": "utils"

View file

@ -7,17 +7,13 @@
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";
nix-eval-jobs.inputs.nixpkgs.follows = "nixpkgs";
flake-compat = { flake-compat = {
url = "github:edolstra/flake-compat"; url = "github:edolstra/flake-compat";
flake = false; flake = false;
}; };
}; };
outputs = { self, nixpkgs, utils, nix-eval-jobs, ... }: let outputs = { self, nixpkgs, utils, ... }: 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" ];
evalNix = import ./src/nix/hive/eval.nix { evalNix = import ./src/nix/hive/eval.nix {
hermetic = true; hermetic = true;
@ -70,8 +66,14 @@
# For use in integration tests # For use in integration tests
_evalJobsOverlay = _evalJobsOverlay =
(final: prev: { (final: prev: {
nix-eval-jobs = (final.callPackage nix-eval-jobs.outPath {}).overrideAttrs (old: { nix-eval-jobs = prev.nix-eval-jobs.overrideAttrs (old: {
version = "0.0.3-colmena"; version = old.version + "-colmena";
patches = (old.patches or []) ++ [
(final.fetchpatch {
url = "https://github.com/nix-community/nix-eval-jobs/commit/1e0f309fefc9b2d597f8475a74c82ce29c189152.patch";
sha256 = "sha256-246t3SGRA/9JsV2XPcI4Exp+TxmyYBoldQ43Wr5CcsM=";
})
];
}); });
}); });

View file

@ -2,7 +2,13 @@ let
flake = (import ../flake-compat.nix).defaultNix; flake = (import ../flake-compat.nix).defaultNix;
in import flake.inputs.stable.outPath { in import flake.inputs.stable.outPath {
overlays = [ overlays = [
flake._evalJobsOverlay
flake.overlay flake.overlay
# Our nix-eval-jobs patch cannot be applied to 0.0.1
(final: prev: {
colmena = prev.colmena.override {
nix-eval-jobs = null;
};
})
]; ];
} }