diff options
Diffstat (limited to 'profiles')
-rw-r--r-- | profiles/impermanence-fix.patch | 12 | ||||
-rw-r--r-- | profiles/stdenv.nix | 55 |
2 files changed, 40 insertions, 27 deletions
diff --git a/profiles/impermanence-fix.patch b/profiles/impermanence-fix.patch new file mode 100644 index 0000000..c71a85e --- /dev/null +++ b/profiles/impermanence-fix.patch @@ -0,0 +1,12 @@ +diff --git a/create-directories.bash b/create-directories.bash +index 0c7c7f0..b959586 100755 +--- a/create-directories.bash ++++ b/create-directories.bash +@@ -52,7 +52,7 @@ target="${target%/}" + realSource="$(realpath -m "$sourceBase$target")" + if [[ ! -d "$realSource" ]]; then + printf "Warning: Source directory '%s' does not exist; it will be created for you with the following permissions: owner: '%s:%s', mode: '%s'.\n" "$realSource" "$user" "$group" "$mode" +- mkdir --mode="$mode" "$realSource" ++ mkdir -p --mode="$mode" "$realSource" + chown "$user:$group" "$realSource" + fi \ No newline at end of file diff --git a/profiles/stdenv.nix b/profiles/stdenv.nix index 337a306..93d5918 100644 --- a/profiles/stdenv.nix +++ b/profiles/stdenv.nix @@ -5,33 +5,34 @@ inputs, ... }: { - imports = []; - config = { - nix.binaryCaches = [ - "https://cache.nixos.org/" - "https://cache.allvm.org/" - ]; + nix.binaryCaches = [ + "https://cache.nixos.org/" + "https://cache.allvm.org/" + ]; - nix.binaryCachePublicKeys = [ - "gravity.cs.illinois.edu-1:yymmNS/WMf0iTj2NnD0nrVV8cBOXM9ivAkEdO1Lro3U=" - ]; + nix.binaryCachePublicKeys = [ + "gravity.cs.illinois.edu-1:yymmNS/WMf0iTj2NnD0nrVV8cBOXM9ivAkEdO1Lro3U=" + ]; - nativeStdenv = - prev.stdenvAdapters.withCFlags ["-O3" "-pipe" "-march=native"] - (prev.overrideCC prev.llvmPackages_latest.stdenv - (prev.wrapCCWith rec { - cc = prev.llvmPackages_latest.clang-unwrapped; - bintools = final.wrapBintoolsWith { - coreutils = final.uutils-coreutils; - libc = final.musl; - bintools = - final.binutils-unwrapped.overrideAttrs - (old: { - postInstall = '' - ln -sf ${final.mold}/bin/mold $out/bin/ld - ''; - }); - }; - })); - }; + overlays = [ + (final: prev: { + nativeStdenv = + prev.stdenvAdapters.withCFlags ["-O3" "-pipe" "-march=native"] + (prev.overrideCC prev.llvmPackages_latest.stdenv + (prev.wrapCCWith rec { + cc = prev.llvmPackages_latest.clang-unwrapped; + bintools = final.wrapBintoolsWith { + coreutils = final.uutils-coreutils; + libc = final.musl; + bintools = + final.binutils-unwrapped.overrideAttrs + (old: { + postInstall = '' + ln -sf ${final.mold}/bin/mold $out/bin/ld + ''; + }); + }; + })); + }) + ]; } |