forked from lix-project/nixos-module
Compare commits
2 commits
f1277e616d
...
6def4cc69a
Author | SHA1 | Date | |
---|---|---|---|
Fabián Heredia Montiel | 6def4cc69a | ||
jade | 58893c0c52 |
20
flake.lock
20
flake.lock
|
@ -5,11 +5,11 @@
|
||||||
"systems": "systems"
|
"systems": "systems"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1710146030,
|
"lastModified": 1726560853,
|
||||||
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
|
"narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "flake-utils",
|
"repo": "flake-utils",
|
||||||
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
|
"rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -36,11 +36,11 @@
|
||||||
"lix": {
|
"lix": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1723511168,
|
"lastModified": 1726590994,
|
||||||
"narHash": "sha256-XDcqLVPcsMhORerIPuQ1XNALtDvG6QRA2dKyNrccXyg=",
|
"narHash": "sha256-CrvIEzBzvvfE7jGIXBv6hSYDxv4eYeHWAwVho5WrF48=",
|
||||||
"rev": "f9a3bf6ccccf8ac6b1604c1a2980e3a565ae4f44",
|
"rev": "8ab5743904a06c78153281bf61b3aa8aa451a489",
|
||||||
"type": "tarball",
|
"type": "tarball",
|
||||||
"url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/f9a3bf6ccccf8ac6b1604c1a2980e3a565ae4f44.tar.gz?rev=f9a3bf6ccccf8ac6b1604c1a2980e3a565ae4f44"
|
"url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/8ab5743904a06c78153281bf61b3aa8aa451a489.tar.gz?rev=8ab5743904a06c78153281bf61b3aa8aa451a489"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"type": "tarball",
|
"type": "tarball",
|
||||||
|
@ -49,11 +49,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1723175592,
|
"lastModified": 1726463316,
|
||||||
"narHash": "sha256-M0xJ3FbDUc4fRZ84dPGx5VvgFsOzds77KiBMW/mMTnI=",
|
"narHash": "sha256-gI9kkaH0ZjakJOKrdjaI/VbaMEo9qBbSUl93DnU7f4c=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "5e0ca22929f3342b19569b21b2f3462f053e497b",
|
"rev": "99dc8785f6a0adac95f5e2ab05cc2e1bf666d172",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
35
overlay.nix
35
overlay.nix
|
@ -11,7 +11,7 @@ let
|
||||||
});
|
});
|
||||||
|
|
||||||
# These packages depend on Nix features that Lix does not support
|
# These packages depend on Nix features that Lix does not support
|
||||||
overridelist_2_18 = [
|
overridelist_upstream = [
|
||||||
"attic-client"
|
"attic-client"
|
||||||
"devenv"
|
"devenv"
|
||||||
"nix-du"
|
"nix-du"
|
||||||
|
@ -60,11 +60,25 @@ let
|
||||||
# errors. This is a simple safeguard to put in at least something that might be seen.
|
# errors. This is a simple safeguard to put in at least something that might be seen.
|
||||||
maybeWarnWrongMajor = x: if !(lib.hasPrefix supportedLixMajor lixPackageToUse.version) then builtins.trace wrongMajorWarning x else x;
|
maybeWarnWrongMajor = x: if !(lib.hasPrefix supportedLixMajor lixPackageToUse.version) then builtins.trace wrongMajorWarning x else x;
|
||||||
|
|
||||||
overlay =
|
overlay =
|
||||||
lib.genAttrs overridelist_2_18 (
|
lib.genAttrs overridelist_upstream (
|
||||||
name: if (lib.functionArgs prev.${name}.override ? "nix") then prev.${name}.override {
|
name:
|
||||||
nix = final.nixVersions.nix_2_18_upstream;
|
if (lib.functionArgs prev.${name}.override ? "nix") then
|
||||||
} else prev.${name}
|
let
|
||||||
|
# Get the two common inputs of a derivation/package.
|
||||||
|
inputs = prev.${name}.buildInputs ++ prev.${name}.nativeBuildInputs;
|
||||||
|
nixDependency = lib.findFirst
|
||||||
|
(drv: drv.pname == "nix")
|
||||||
|
prev.nixVersions.stable_upstream # default to stable nix if nix is not an input
|
||||||
|
inputs;
|
||||||
|
nixMajor = lib.versions.major nixDependency.version;
|
||||||
|
nixMinor = lib.versions.minor nixDependency.version;
|
||||||
|
nixAttr = "nix_${nixMajor}_${nixMinor}";
|
||||||
|
finalNix = final.nixVersions.${nixAttr};
|
||||||
|
in
|
||||||
|
prev.${name}.override {
|
||||||
|
nix = finalNix;
|
||||||
|
} else prev.${name}
|
||||||
) // {
|
) // {
|
||||||
lix-overlay-present = 1;
|
lix-overlay-present = 1;
|
||||||
# used for things that one wouldn't necessarily want to update, but we
|
# used for things that one wouldn't necessarily want to update, but we
|
||||||
|
@ -74,15 +88,14 @@ let
|
||||||
|
|
||||||
lix = maybeWarnWrongMajor (maybeWarnDuplicate lixPackageToUse);
|
lix = maybeWarnWrongMajor (maybeWarnDuplicate lixPackageToUse);
|
||||||
|
|
||||||
nixVersions = prev.nixVersions // rec {
|
nixVersions = prev.nixVersions // {
|
||||||
nix_2_18 = final.lix;
|
stable = final.lix;
|
||||||
stable = nix_2_18;
|
stable_upstream = prev.nixVersions.stable;
|
||||||
nix_2_18_upstream = prev.nixVersions.nix_2_18;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
nix-eval-jobs = (prev.nix-eval-jobs.override {
|
nix-eval-jobs = (prev.nix-eval-jobs.override {
|
||||||
# lix
|
# lix
|
||||||
nix = final.nixVersions.nix_2_18;
|
nix = final.lix;
|
||||||
}).overrideAttrs (old:
|
}).overrideAttrs (old:
|
||||||
let src = final.lix-sources.nix-eval-jobs;
|
let src = final.lix-sources.nix-eval-jobs;
|
||||||
in {
|
in {
|
||||||
|
|
Loading…
Reference in a new issue