nixFlakes: enable flakes,nix-command via patch

This commit is contained in:
DavHau
2021-05-04 17:43:46 +07:00
parent 118ef67e07
commit f94876e77b
2 changed files with 17 additions and 8 deletions
@@ -227,13 +227,8 @@ in rec {
inherit storeDir stateDir confDir boehmgc;
});
nixFlakes = callPackage ({ makeWrapper, runCommand, ... }:
runCommand "nix-flakes" { buildInputs = [ makeWrapper ]; } ''
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;
'') {};
nixFlakes = nixUnstable.overrideAttrs (prev: {
patches = (prev.patches or []) ++ [ ./enable-flakes.patch ];
});
}