nixFlakes: enable flakes,nix-command via patch
This commit is contained in:
parent
118ef67e07
commit
f94876e77b
@ -227,13 +227,8 @@ in rec {
|
|||||||
inherit storeDir stateDir confDir boehmgc;
|
inherit storeDir stateDir confDir boehmgc;
|
||||||
});
|
});
|
||||||
|
|
||||||
nixFlakes = callPackage ({ makeWrapper, runCommand, ... }:
|
nixFlakes = nixUnstable.overrideAttrs (prev: {
|
||||||
runCommand "nix-flakes" { buildInputs = [ makeWrapper ]; } ''
|
patches = (prev.patches or []) ++ [ ./enable-flakes.patch ];
|
||||||
mkdir -p $out/bin
|
});
|
||||||
for bin in ${nixUnstable}/bin/*; do
|
|
||||||
makeWrapper $bin $out/bin/$(basename $bin) \
|
|
||||||
--suffix NIX_CONFIG "\n" "experimental-features = nix-command flakes"
|
|
||||||
done;
|
|
||||||
'') {};
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
14
pkgs/tools/package-management/nix/enable-flakes.patch
Normal file
14
pkgs/tools/package-management/nix/enable-flakes.patch
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
diff --git a/src/libstore/globals.hh b/src/libstore/globals.hh
|
||||||
|
index 3e4ead76c..81d407236 100644
|
||||||
|
--- a/src/libstore/globals.hh
|
||||||
|
+++ b/src/libstore/globals.hh
|
||||||
|
@@ -923,7 +923,8 @@ public:
|
||||||
|
value.
|
||||||
|
)"};
|
||||||
|
|
||||||
|
- Setting<Strings> experimentalFeatures{this, {}, "experimental-features",
|
||||||
|
+ Setting<Strings> experimentalFeatures{
|
||||||
|
+ this, {"flakes", "nix-command"}, "experimental-features",
|
||||||
|
"Experimental Nix features to enable."};
|
||||||
|
|
||||||
|
bool isExperimentalFeatureEnabled(const std::string & name);
|
Loading…
x
Reference in New Issue
Block a user