diff options
author | Parnell Springmeyer <parnell@digitalmentat.com> | 2017-01-29 05:54:01 -0600 |
---|---|---|
committer | Parnell Springmeyer <parnell@digitalmentat.com> | 2017-01-29 05:54:01 -0600 |
commit | 6777e6f812913f0213b71392bf2499a3e49b8dee (patch) | |
tree | 1870777ba0d1ba0be8a66fd94d6c070b62729cdf /pkgs/build-support | |
parent | c5f1f9a3b5bcf5d2990aba0ab086767d1d384922 (diff) | |
parent | 82bcfef109ecf58ac1503e4cab15ae53dd524f4b (diff) | |
download | nixlib-6777e6f812913f0213b71392bf2499a3e49b8dee.tar nixlib-6777e6f812913f0213b71392bf2499a3e49b8dee.tar.gz nixlib-6777e6f812913f0213b71392bf2499a3e49b8dee.tar.bz2 nixlib-6777e6f812913f0213b71392bf2499a3e49b8dee.tar.lz nixlib-6777e6f812913f0213b71392bf2499a3e49b8dee.tar.xz nixlib-6777e6f812913f0213b71392bf2499a3e49b8dee.tar.zst nixlib-6777e6f812913f0213b71392bf2499a3e49b8dee.zip |
Merging with upstream
Diffstat (limited to 'pkgs/build-support')
-rw-r--r-- | pkgs/build-support/cc-wrapper/default.nix | 1 | ||||
-rw-r--r-- | pkgs/build-support/dhall-to-nix.nix | 38 | ||||
-rw-r--r-- | pkgs/build-support/setup-hooks/update-autotools-gnu-config-scripts.sh | 12 |
3 files changed, 51 insertions, 0 deletions
diff --git a/pkgs/build-support/cc-wrapper/default.nix b/pkgs/build-support/cc-wrapper/default.nix index 95e0b360937a..95c6bee3cc77 100644 --- a/pkgs/build-support/cc-wrapper/default.nix +++ b/pkgs/build-support/cc-wrapper/default.nix @@ -272,6 +272,7 @@ stdenv.mkDerivation { if stdenv.system == "x86_64-linux" then "ld-linux-x86-64.so.2" else # ARM with a wildcard, which can be "" or "-armhf". if stdenv.isArm then "ld-linux*.so.3" else + if stdenv.system == "aarch64-linux" then "ld-linux-aarch64.so.1" else if stdenv.system == "powerpc-linux" then "ld.so.1" else if stdenv.system == "mips64el-linux" then "ld.so.1" else if stdenv.system == "x86_64-darwin" then "/usr/lib/dyld" else diff --git a/pkgs/build-support/dhall-to-nix.nix b/pkgs/build-support/dhall-to-nix.nix new file mode 100644 index 000000000000..c563b34ff3bc --- /dev/null +++ b/pkgs/build-support/dhall-to-nix.nix @@ -0,0 +1,38 @@ +/* `dhallToNix` is a utility function to convert expressions in the Dhall + configuration language to their corresponding Nix expressions. + + Example: + dhallToNix "{ foo = 1, bar = True }" + => { foo = 1; bar = true; } + dhallToNix "λ(x : Bool) → x == False" + => x : x == false + dhallToNix "λ(x : Bool) → x == False" false + => true + + See https://hackage.haskell.org/package/dhall-nix/docs/Dhall-Nix.html for + a longer tutorial + + Note that this uses "import from derivation", meaning that Nix will perform + a build during the evaluation phase if you use this `dhallToNix` utility +*/ +{ stdenv, dhall-nix }: + +let + dhallToNix = code : + let + file = builtins.toFile "dhall-expression" code; + + drv = stdenv.mkDerivation { + name = "dhall-compiled.nix"; + + buildCommand = '' + dhall-to-nix <<< "${file}" > $out + ''; + + buildInputs = [ dhall-nix ]; + }; + + in + import "${drv}"; +in + dhallToNix diff --git a/pkgs/build-support/setup-hooks/update-autotools-gnu-config-scripts.sh b/pkgs/build-support/setup-hooks/update-autotools-gnu-config-scripts.sh new file mode 100644 index 000000000000..5e33ace42b37 --- /dev/null +++ b/pkgs/build-support/setup-hooks/update-autotools-gnu-config-scripts.sh @@ -0,0 +1,12 @@ +preConfigurePhases+=" updateAutotoolsGnuConfigScriptsPhase" + +updateAutotoolsGnuConfigScriptsPhase() { + if [ -n "$dontUpdateAutotoolsGnuConfigScripts" ]; then return; fi + + for script in config.sub config.guess; do + for f in $(find . -name "$script"); do + echo "Updating Autotools / GNU config script to a newer upstream version: $f" + cp -f "@gnu_config@/$script" "$f" + done + done +} |