WIP: Integration branch with darwin and deck support
- Added darwin and jovian inputs - Added platform-specific package configurations - Added darwinConfigurations and deck nixosConfiguration - Copied darwin and deck specific files - Fixed darwin version compatibility Some configurations still need debugging
This commit is contained in:
Regular → Executable
+17
-6
@@ -1,8 +1,19 @@
|
||||
#!/usr/bin/env bash
|
||||
dir="$(realpath $(dirname ${BASH_SOURCE[0]})/../..)"
|
||||
_nix_direnv_force_reload=1 direnv exec "$dir" true
|
||||
direnv reload
|
||||
# direnv reload updates the mtime of .envrc. Also update the timestamp of the
|
||||
# profile_rc file to keep track that we actually are up to date.
|
||||
touch $dir/.direnv/{nix,flake}-profile-*.rc
|
||||
set -e
|
||||
if [[ ! -d "/home/anish/usr/helm" ]]; then
|
||||
echo "Cannot find source directory; Did you move it?"
|
||||
echo "(Looking for "/home/anish/usr/helm")"
|
||||
echo 'Cannot force reload with this script - use "direnv reload" manually and then try again'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# rebuild the cache forcefully
|
||||
_nix_direnv_force_reload=1 direnv exec "/home/anish/usr/helm" true
|
||||
|
||||
# Update the mtime for .envrc.
|
||||
# This will cause direnv to reload again - but without re-building.
|
||||
touch "/home/anish/usr/helm/.envrc"
|
||||
|
||||
# Also update the timestamp of whatever profile_rc we have.
|
||||
# This makes sure that we know we are up to date.
|
||||
touch -r "/home/anish/usr/helm/.envrc" "/home/anish/usr/helm/.direnv"/*.rc
|
||||
|
||||
@@ -7,15 +7,15 @@ AR='ar'
|
||||
export AR
|
||||
AS='as'
|
||||
export AS
|
||||
BASH='/nix/store/7dpxg7ki7g8ynkdwcqf493p2x8divb4i-bash-5.2-p15/bin/bash'
|
||||
BASH='/nix/store/cfqbabpc7xwg8akbcchqbq3cai6qq2vs-bash-5.2p37/bin/bash'
|
||||
CC='gcc'
|
||||
export CC
|
||||
CONFIG_SHELL='/nix/store/7dpxg7ki7g8ynkdwcqf493p2x8divb4i-bash-5.2-p15/bin/bash'
|
||||
CONFIG_SHELL='/nix/store/cfqbabpc7xwg8akbcchqbq3cai6qq2vs-bash-5.2p37/bin/bash'
|
||||
export CONFIG_SHELL
|
||||
CXX='g++'
|
||||
export CXX
|
||||
HOSTTYPE='x86_64'
|
||||
HOST_PATH='/nix/store/m38gwq0w8w7qyjn9s00balyp7cv3m5p9-coreutils-9.3/bin:/nix/store/01znf87kiw5xx1dj0f7djrnrbg84ij28-findutils-4.9.0/bin:/nix/store/vq4vmndw555m7ld2bi6pq8kr348qvb6a-diffutils-3.10/bin:/nix/store/rwa7qyds01qzxvq7zq3kgnkrzzpw4s66-gnused-4.9/bin:/nix/store/n062zcsmfl9gfp6vfkcg0asb8jjwmy5i-gnugrep-3.11/bin:/nix/store/4v7m4yx07b3anmbznfhihjc8xiizyna9-gawk-5.2.2/bin:/nix/store/mi3pm67ps7c7k11aqki9182ygzg8j503-gnutar-1.35/bin:/nix/store/5c0ancqnpi0cf1h49mv13w68a950s9z0-gzip-1.13/bin:/nix/store/q5cv7r1sh3s4niyq7vm6h1j74394naxs-bzip2-1.0.8-bin/bin:/nix/store/bh7sbl99ygfvw9w96936nrhw46jmcmqq-gnumake-4.4.1/bin:/nix/store/7dpxg7ki7g8ynkdwcqf493p2x8divb4i-bash-5.2-p15/bin:/nix/store/mbh9gx43gsc5av019vsdkazbyiic3f0f-patch-2.7.6/bin:/nix/store/3q6fnwcm677l1q60vkhcf9m1gxhv83jm-xz-5.4.4-bin/bin:/nix/store/a5s2dmba16pw8l52f496gw0b7nli7mbn-file-5.45/bin'
|
||||
HOST_PATH='/nix/store/rry6qingvsrqmc7ll7jgaqpybcbdgf5v-coreutils-9.7/bin:/nix/store/392hs9nhm6wfw4imjllbvb1wil1n39qx-findutils-4.10.0/bin:/nix/store/xw0mf3shymq3k7zlncf09rm8917sdi4h-diffutils-3.12/bin:/nix/store/4rpiqv9yr2pw5094v4wc33ijkqjpm9sa-gnused-4.9/bin:/nix/store/l2wvwyg680h0v2la18hz3yiznxy2naqw-gnugrep-3.11/bin:/nix/store/c1z5j28ndxljf1ihqzag57bwpfpzms0g-gawk-5.3.2/bin:/nix/store/w60s4xh1pjg6dwbw7j0b4xzlpp88q5qg-gnutar-1.35/bin:/nix/store/xd9m9jkvrs8pbxvmkzkwviql33rd090j-gzip-1.14/bin:/nix/store/w1pxx760yidi7n9vbi5bhpii9xxl5vdj-bzip2-1.0.8-bin/bin:/nix/store/xk0d14zpm0njxzdm182dd722aqhav2cc-gnumake-4.4.1/bin:/nix/store/cfqbabpc7xwg8akbcchqbq3cai6qq2vs-bash-5.2p37/bin:/nix/store/gj54zvf7vxll1mzzmqhqi1p4jiws3mfb-patch-2.7.6/bin:/nix/store/22rpb6790f346c55iqi6s9drr5qgmyjf-xz-5.8.1-bin/bin:/nix/store/xlmpcglsq8l09qh03rf0virz0331pjdc-file-5.45/bin'
|
||||
export HOST_PATH
|
||||
IFS='
|
||||
'
|
||||
@@ -25,25 +25,25 @@ LD='ld'
|
||||
export LD
|
||||
LINENO='76'
|
||||
MACHTYPE='x86_64-pc-linux-gnu'
|
||||
NIX_BINTOOLS='/nix/store/qcg3rpl1l103zb1xfsw40wm9j5hzrp7y-binutils-wrapper-2.40'
|
||||
NIX_BINTOOLS='/nix/store/87zpmcmwvn48z4lbrfba74b312h22s6c-binutils-wrapper-2.44'
|
||||
export NIX_BINTOOLS
|
||||
NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu='1'
|
||||
export NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu
|
||||
NIX_BUILD_CORES='4'
|
||||
export NIX_BUILD_CORES
|
||||
NIX_CC='/nix/store/vylmp73qymnv4siaqn1kl2hghj07hrj8-gcc-wrapper-12.3.0'
|
||||
NIX_CC='/nix/store/kaj8d1zcn149m40s9h0xi0khakibiphz-gcc-wrapper-14.3.0'
|
||||
export NIX_CC
|
||||
NIX_CC_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu='1'
|
||||
export NIX_CC_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu
|
||||
NIX_CFLAGS_COMPILE=' -frandom-seed=q6hnwi6rdy -isystem /nix/store/hsv5438lvzq106llix5xi0f7cdvqk95q-nix-2.18.1-dev/include -isystem /nix/store/gdz3j02p6mfzmxs9zsssszwpppigb70g-boehm-gc-8.2.2-dev/include -isystem /nix/store/d7jspi1ws93ya34zriyrdxz5v5z6lijj-nlohmann_json-3.11.2/include -isystem /nix/store/hsv5438lvzq106llix5xi0f7cdvqk95q-nix-2.18.1-dev/include -isystem /nix/store/gdz3j02p6mfzmxs9zsssszwpppigb70g-boehm-gc-8.2.2-dev/include -isystem /nix/store/d7jspi1ws93ya34zriyrdxz5v5z6lijj-nlohmann_json-3.11.2/include'
|
||||
NIX_CFLAGS_COMPILE=' -frandom-seed=5s10b8rs3j -isystem /nix/store/8znh07lsz9q2fdp6fgcdwwv035xxfrl1-nix-2.28.4-dev/include -isystem /nix/store/qwnz3z0hf5pdhwsn92dc9lhlq4a3lsqk-boehm-gc-8.2.8-dev/include -isystem /nix/store/235hvgzcbl06fxy53515q8sr6lljvf68-nlohmann_json-3.11.3/include -isystem /nix/store/a5b9czim7vrihag71f8dy1c467qh3mph-libarchive-3.8.0-dev/include -isystem /nix/store/0vy272ral6dwzx96wkvd90l37v0gdrk7-attr-2.5.2-dev/include -isystem /nix/store/ra69jxg2pnnjymvkn83mfr7cnhllmwnj-acl-2.3.2-dev/include -isystem /nix/store/8znh07lsz9q2fdp6fgcdwwv035xxfrl1-nix-2.28.4-dev/include -isystem /nix/store/qwnz3z0hf5pdhwsn92dc9lhlq4a3lsqk-boehm-gc-8.2.8-dev/include -isystem /nix/store/235hvgzcbl06fxy53515q8sr6lljvf68-nlohmann_json-3.11.3/include -isystem /nix/store/a5b9czim7vrihag71f8dy1c467qh3mph-libarchive-3.8.0-dev/include -isystem /nix/store/0vy272ral6dwzx96wkvd90l37v0gdrk7-attr-2.5.2-dev/include -isystem /nix/store/ra69jxg2pnnjymvkn83mfr7cnhllmwnj-acl-2.3.2-dev/include'
|
||||
export NIX_CFLAGS_COMPILE
|
||||
NIX_CONFIG='experimental-features = nix-command flakes'
|
||||
export NIX_CONFIG
|
||||
NIX_ENFORCE_NO_NATIVE='1'
|
||||
export NIX_ENFORCE_NO_NATIVE
|
||||
NIX_HARDENING_ENABLE='fortify fortify3 stackprotector pic strictoverflow format relro bindnow'
|
||||
NIX_HARDENING_ENABLE='bindnow format fortify fortify3 pic relro stackclashprotection stackprotector strictoverflow zerocallusedregs'
|
||||
export NIX_HARDENING_ENABLE
|
||||
NIX_LDFLAGS='-rpath /home/anish/usr/helm/outputs/out/lib -L/nix/store/gfmmah5rc4vl8mhli495lh5savq842p0-boehm-gc-8.2.2/lib -L/nix/store/j7nl2pj606d8ld5818hw3z3fbz00sdc5-nix-2.18.1/lib -L/nix/store/gfmmah5rc4vl8mhli495lh5savq842p0-boehm-gc-8.2.2/lib -L/nix/store/j7nl2pj606d8ld5818hw3z3fbz00sdc5-nix-2.18.1/lib'
|
||||
NIX_LDFLAGS='-rpath /home/anish/usr/helm/outputs/out/lib -L/nix/store/mrbslgynzhg5jfc05x2rlnsykzcxp2v0-boehm-gc-8.2.8/lib -L/nix/store/ik62z14lxr205b5gzfh4cjcla6gh9l6z-attr-2.5.2/lib -L/nix/store/8smmj5gbhnnqaf28qxak4xv57ccgm96p-acl-2.3.2/lib -L/nix/store/y130gnbp2qkfq6svqdv0s61b3m4043yp-libarchive-3.8.0-lib/lib -L/nix/store/7q9ll9pjrdfdb3qyfza2bzrk829izk9s-nix-2.28.4/lib -L/nix/store/mrbslgynzhg5jfc05x2rlnsykzcxp2v0-boehm-gc-8.2.8/lib -L/nix/store/ik62z14lxr205b5gzfh4cjcla6gh9l6z-attr-2.5.2/lib -L/nix/store/8smmj5gbhnnqaf28qxak4xv57ccgm96p-acl-2.3.2/lib -L/nix/store/y130gnbp2qkfq6svqdv0s61b3m4043yp-libarchive-3.8.0-lib/lib -L/nix/store/7q9ll9pjrdfdb3qyfza2bzrk829izk9s-nix-2.28.4/lib'
|
||||
export NIX_LDFLAGS
|
||||
NIX_NO_SELF_RPATH='1'
|
||||
NIX_STORE='/nix/store'
|
||||
@@ -58,13 +58,15 @@ OLDPWD=''
|
||||
export OLDPWD
|
||||
OPTERR='1'
|
||||
OSTYPE='linux-gnu'
|
||||
PATH='/nix/store/j7nl2pj606d8ld5818hw3z3fbz00sdc5-nix-2.18.1/bin:/nix/store/p3s38kgwd16d2dimspckp5f1rri43mnq-home-manager-unstable-2023-12-31/bin:/nix/store/pz4jng8kb4iv9x67r730las2mdkv8s8q-git-2.42.0/bin:/nix/store/p8p72q6anyf0whaf9i75jynzk2z4ml36-agenix-0.13.0/bin:/nix/store/lfx4in7iqbbx5b6b85cndw268ria5512-deploy-rs-unstable-2023-12-20/bin:/nix/store/8nwmr2kmkrl1mnggka7fjibcglk68rc0-dnscontrol-4.6.0/bin:/nix/store/h3ayxf5dk1gdf3s5716fh1ys815qxxag-patchelf-0.15.0/bin:/nix/store/vylmp73qymnv4siaqn1kl2hghj07hrj8-gcc-wrapper-12.3.0/bin:/nix/store/f94yr35af3xdiscbj6cp6kafvmn55gv9-gcc-12.3.0/bin:/nix/store/vksrk76p5cfbjxb0n95vdkxy7fl2cbcm-glibc-2.38-27-bin/bin:/nix/store/m38gwq0w8w7qyjn9s00balyp7cv3m5p9-coreutils-9.3/bin:/nix/store/qcg3rpl1l103zb1xfsw40wm9j5hzrp7y-binutils-wrapper-2.40/bin:/nix/store/idiaraknw071d20nlqp49s18gbvw4wa0-binutils-2.40/bin:/nix/store/m38gwq0w8w7qyjn9s00balyp7cv3m5p9-coreutils-9.3/bin:/nix/store/01znf87kiw5xx1dj0f7djrnrbg84ij28-findutils-4.9.0/bin:/nix/store/vq4vmndw555m7ld2bi6pq8kr348qvb6a-diffutils-3.10/bin:/nix/store/rwa7qyds01qzxvq7zq3kgnkrzzpw4s66-gnused-4.9/bin:/nix/store/n062zcsmfl9gfp6vfkcg0asb8jjwmy5i-gnugrep-3.11/bin:/nix/store/4v7m4yx07b3anmbznfhihjc8xiizyna9-gawk-5.2.2/bin:/nix/store/mi3pm67ps7c7k11aqki9182ygzg8j503-gnutar-1.35/bin:/nix/store/5c0ancqnpi0cf1h49mv13w68a950s9z0-gzip-1.13/bin:/nix/store/q5cv7r1sh3s4niyq7vm6h1j74394naxs-bzip2-1.0.8-bin/bin:/nix/store/bh7sbl99ygfvw9w96936nrhw46jmcmqq-gnumake-4.4.1/bin:/nix/store/7dpxg7ki7g8ynkdwcqf493p2x8divb4i-bash-5.2-p15/bin:/nix/store/mbh9gx43gsc5av019vsdkazbyiic3f0f-patch-2.7.6/bin:/nix/store/3q6fnwcm677l1q60vkhcf9m1gxhv83jm-xz-5.4.4-bin/bin:/nix/store/a5s2dmba16pw8l52f496gw0b7nli7mbn-file-5.45/bin'
|
||||
PATH='/nix/store/53cx9nd6i328f9zqsgx6sh1krsngy5jl-attr-2.5.2-bin/bin:/nix/store/61066bhvr54xkl2ssippfa5qylwgafqf-acl-2.3.2-bin/bin:/nix/store/8fq8mhb1dlwzgq7xfaxwgn0x623yjb43-libarchive-3.8.0/bin:/nix/store/7q9ll9pjrdfdb3qyfza2bzrk829izk9s-nix-2.28.4/bin:/nix/store/hr950wkqix97b759inrbxvljkqxj5113-home-manager-0-unstable-2025-05-13/bin:/nix/store/3kwbkj8xnzw5787gbannr741bczjkrq6-git-2.50.1/bin:/nix/store/s801pmgfwy4nifm72s638v0m4f32pnc5-agenix-0.15.0/bin:/nix/store/vlc65hzrqq9a29m7j0sb4hpqlwn0ny56-deploy-rs-0-unstable-2025-06-05/bin:/nix/store/dgqa38y4hxyw30g6bvrgd18750h364vr-dnscontrol-4.20.0/bin:/nix/store/g7i75czfbw9sy5f8v7rjbama6lr3ya3s-patchelf-0.15.0/bin:/nix/store/kaj8d1zcn149m40s9h0xi0khakibiphz-gcc-wrapper-14.3.0/bin:/nix/store/8adzgnxs3s0pbj22qhk9zjxi1fqmz3xv-gcc-14.3.0/bin:/nix/store/p2ixvjsas4qw58dcwk01d22skwq4fyka-glibc-2.40-66-bin/bin:/nix/store/rry6qingvsrqmc7ll7jgaqpybcbdgf5v-coreutils-9.7/bin:/nix/store/87zpmcmwvn48z4lbrfba74b312h22s6c-binutils-wrapper-2.44/bin:/nix/store/ap35np2bkwaba3rxs3qlxpma57n2awyb-binutils-2.44/bin:/nix/store/rry6qingvsrqmc7ll7jgaqpybcbdgf5v-coreutils-9.7/bin:/nix/store/392hs9nhm6wfw4imjllbvb1wil1n39qx-findutils-4.10.0/bin:/nix/store/xw0mf3shymq3k7zlncf09rm8917sdi4h-diffutils-3.12/bin:/nix/store/4rpiqv9yr2pw5094v4wc33ijkqjpm9sa-gnused-4.9/bin:/nix/store/l2wvwyg680h0v2la18hz3yiznxy2naqw-gnugrep-3.11/bin:/nix/store/c1z5j28ndxljf1ihqzag57bwpfpzms0g-gawk-5.3.2/bin:/nix/store/w60s4xh1pjg6dwbw7j0b4xzlpp88q5qg-gnutar-1.35/bin:/nix/store/xd9m9jkvrs8pbxvmkzkwviql33rd090j-gzip-1.14/bin:/nix/store/w1pxx760yidi7n9vbi5bhpii9xxl5vdj-bzip2-1.0.8-bin/bin:/nix/store/xk0d14zpm0njxzdm182dd722aqhav2cc-gnumake-4.4.1/bin:/nix/store/cfqbabpc7xwg8akbcchqbq3cai6qq2vs-bash-5.2p37/bin:/nix/store/gj54zvf7vxll1mzzmqhqi1p4jiws3mfb-patch-2.7.6/bin:/nix/store/22rpb6790f346c55iqi6s9drr5qgmyjf-xz-5.8.1-bin/bin:/nix/store/xlmpcglsq8l09qh03rf0virz0331pjdc-file-5.45/bin'
|
||||
export PATH
|
||||
PS4='+ '
|
||||
RANLIB='ranlib'
|
||||
export RANLIB
|
||||
READELF='readelf'
|
||||
export READELF
|
||||
SHELL='/nix/store/cfqbabpc7xwg8akbcchqbq3cai6qq2vs-bash-5.2p37/bin/bash'
|
||||
export SHELL
|
||||
SIZE='size'
|
||||
export SIZE
|
||||
SOURCE_DATE_EPOCH='315532800'
|
||||
@@ -73,10 +75,11 @@ STRINGS='strings'
|
||||
export STRINGS
|
||||
STRIP='strip'
|
||||
export STRIP
|
||||
XDG_DATA_DIRS='/nix/store/gfmmah5rc4vl8mhli495lh5savq842p0-boehm-gc-8.2.2/share:/nix/store/d7jspi1ws93ya34zriyrdxz5v5z6lijj-nlohmann_json-3.11.2/share:/nix/store/j7nl2pj606d8ld5818hw3z3fbz00sdc5-nix-2.18.1/share:/nix/store/p3s38kgwd16d2dimspckp5f1rri43mnq-home-manager-unstable-2023-12-31/share:/nix/store/pz4jng8kb4iv9x67r730las2mdkv8s8q-git-2.42.0/share:/nix/store/h3ayxf5dk1gdf3s5716fh1ys815qxxag-patchelf-0.15.0/share'
|
||||
XDG_DATA_DIRS='/nix/store/mrbslgynzhg5jfc05x2rlnsykzcxp2v0-boehm-gc-8.2.8/share:/nix/store/235hvgzcbl06fxy53515q8sr6lljvf68-nlohmann_json-3.11.3/share:/nix/store/ik62z14lxr205b5gzfh4cjcla6gh9l6z-attr-2.5.2/share:/nix/store/8smmj5gbhnnqaf28qxak4xv57ccgm96p-acl-2.3.2/share:/nix/store/8fq8mhb1dlwzgq7xfaxwgn0x623yjb43-libarchive-3.8.0/share:/nix/store/7q9ll9pjrdfdb3qyfza2bzrk829izk9s-nix-2.28.4/share:/nix/store/hr950wkqix97b759inrbxvljkqxj5113-home-manager-0-unstable-2025-05-13/share:/nix/store/3kwbkj8xnzw5787gbannr741bczjkrq6-git-2.50.1/share:/nix/store/dgqa38y4hxyw30g6bvrgd18750h364vr-dnscontrol-4.20.0/share:/nix/store/g7i75czfbw9sy5f8v7rjbama6lr3ya3s-patchelf-0.15.0/share'
|
||||
export XDG_DATA_DIRS
|
||||
__structuredAttrs=''
|
||||
export __structuredAttrs
|
||||
_substituteStream_has_warned_replace_deprecation='false'
|
||||
buildInputs=''
|
||||
export buildInputs
|
||||
buildPhase='{ echo "------------------------------------------------------------";
|
||||
@@ -89,14 +92,14 @@ buildPhase='{ echo "------------------------------------------------------------
|
||||
} >> "$out"
|
||||
'
|
||||
export buildPhase
|
||||
builder='/nix/store/7dpxg7ki7g8ynkdwcqf493p2x8divb4i-bash-5.2-p15/bin/bash'
|
||||
builder='/nix/store/cfqbabpc7xwg8akbcchqbq3cai6qq2vs-bash-5.2p37/bin/bash'
|
||||
export builder
|
||||
cmakeFlags=''
|
||||
export cmakeFlags
|
||||
configureFlags=''
|
||||
export configureFlags
|
||||
defaultBuildInputs=''
|
||||
defaultNativeBuildInputs='/nix/store/h3ayxf5dk1gdf3s5716fh1ys815qxxag-patchelf-0.15.0 /nix/store/v5qyd49a256y44pz75qnsp9741mg336k-update-autotools-gnu-config-scripts-hook /nix/store/h9lc1dpi14z7is86ffhl3ld569138595-audit-tmpdir.sh /nix/store/m54bmrhj6fqz8nds5zcj97w9s9bckc9v-compress-man-pages.sh /nix/store/wgrbkkaldkrlrni33ccvm3b6vbxzb656-make-symlinks-relative.sh /nix/store/5yzw0vhkyszf2d179m0qfkgxmp5wjjx4-move-docs.sh /nix/store/fyaryjvghbkpfnsyw97hb3lyb37s1pd6-move-lib64.sh /nix/store/kd4xwxjpjxi71jkm6ka0np72if9rm3y0-move-sbin.sh /nix/store/pag6l61paj1dc9sv15l7bm5c17xn5kyk-move-systemd-user-units.sh /nix/store/jivxp510zxakaaic7qkrb7v1dd2rdbw9-multiple-outputs.sh /nix/store/wzdsbnv2ba3nj91aql8jjdddfmkkdh7h-patch-shebangs.sh /nix/store/cickvswrvann041nqxb0rxilc46svw1n-prune-libtool-files.sh /nix/store/xyff06pkhki3qy1ls77w10s0v79c9il0-reproducible-builds.sh /nix/store/ngg1cv31c8c7bcm2n8ww4g06nq7s4zhm-set-source-date-epoch-to-latest.sh /nix/store/wmknncrif06fqxa16hpdldhixk95nds0-strip.sh /nix/store/vylmp73qymnv4siaqn1kl2hghj07hrj8-gcc-wrapper-12.3.0'
|
||||
defaultNativeBuildInputs='/nix/store/g7i75czfbw9sy5f8v7rjbama6lr3ya3s-patchelf-0.15.0 /nix/store/gi6g289i9ydm3z896x67q210y0qq29zg-update-autotools-gnu-config-scripts-hook /nix/store/jjhw2phnaip4kg0qjas3x3fsaifi8y0w-no-broken-symlinks.sh /nix/store/h9lc1dpi14z7is86ffhl3ld569138595-audit-tmpdir.sh /nix/store/m54bmrhj6fqz8nds5zcj97w9s9bckc9v-compress-man-pages.sh /nix/store/wgrbkkaldkrlrni33ccvm3b6vbxzb656-make-symlinks-relative.sh /nix/store/5yzw0vhkyszf2d179m0qfkgxmp5wjjx4-move-docs.sh /nix/store/fyaryjvghbkpfnsyw97hb3lyb37s1pd6-move-lib64.sh /nix/store/kd4xwxjpjxi71jkm6ka0np72if9rm3y0-move-sbin.sh /nix/store/pag6l61paj1dc9sv15l7bm5c17xn5kyk-move-systemd-user-units.sh /nix/store/cmzya9irvxzlkh7lfy6i82gbp0saxqj3-multiple-outputs.sh /nix/store/hxv896faph0rqxjq2ycxpcrbnngc95sz-patch-shebangs.sh /nix/store/cickvswrvann041nqxb0rxilc46svw1n-prune-libtool-files.sh /nix/store/xyff06pkhki3qy1ls77w10s0v79c9il0-reproducible-builds.sh /nix/store/z7k98578dfzi6l3hsvbivzm7hfqlk0zc-set-source-date-epoch-to-latest.sh /nix/store/pilsssjjdxvdphlg2h19p0bfx5q0jzkn-strip.sh /nix/store/kaj8d1zcn149m40s9h0xi0khakibiphz-gcc-wrapper-14.3.0'
|
||||
depsBuildBuild=''
|
||||
export depsBuildBuild
|
||||
depsBuildBuildPropagated=''
|
||||
@@ -127,12 +130,12 @@ declare -a envHostTargetHooks=('ccWrapper_addCVars' 'bintoolsWrapper_addLDVars'
|
||||
declare -a envTargetTargetHooks=()
|
||||
declare -a fixupOutputHooks=('if [ -z "${dontPatchELF-}" ]; then patchELF "$prefix"; fi' 'if [[ -z "${noAuditTmpdir-}" && -e "$prefix" ]]; then auditTmpdir "$prefix"; fi' 'if [ -z "${dontGzipMan-}" ]; then compressManPages "$prefix"; fi' '_moveLib64' '_moveSbin' '_moveSystemdUserUnits' 'patchShebangsAuto' '_pruneLibtoolFiles' '_doStrip' )
|
||||
guess='4'
|
||||
initialPath='/nix/store/m38gwq0w8w7qyjn9s00balyp7cv3m5p9-coreutils-9.3 /nix/store/01znf87kiw5xx1dj0f7djrnrbg84ij28-findutils-4.9.0 /nix/store/vq4vmndw555m7ld2bi6pq8kr348qvb6a-diffutils-3.10 /nix/store/rwa7qyds01qzxvq7zq3kgnkrzzpw4s66-gnused-4.9 /nix/store/n062zcsmfl9gfp6vfkcg0asb8jjwmy5i-gnugrep-3.11 /nix/store/4v7m4yx07b3anmbznfhihjc8xiizyna9-gawk-5.2.2 /nix/store/mi3pm67ps7c7k11aqki9182ygzg8j503-gnutar-1.35 /nix/store/5c0ancqnpi0cf1h49mv13w68a950s9z0-gzip-1.13 /nix/store/q5cv7r1sh3s4niyq7vm6h1j74394naxs-bzip2-1.0.8-bin /nix/store/bh7sbl99ygfvw9w96936nrhw46jmcmqq-gnumake-4.4.1 /nix/store/7dpxg7ki7g8ynkdwcqf493p2x8divb4i-bash-5.2-p15 /nix/store/mbh9gx43gsc5av019vsdkazbyiic3f0f-patch-2.7.6 /nix/store/3q6fnwcm677l1q60vkhcf9m1gxhv83jm-xz-5.4.4-bin /nix/store/a5s2dmba16pw8l52f496gw0b7nli7mbn-file-5.45'
|
||||
initialPath='/nix/store/rry6qingvsrqmc7ll7jgaqpybcbdgf5v-coreutils-9.7 /nix/store/392hs9nhm6wfw4imjllbvb1wil1n39qx-findutils-4.10.0 /nix/store/xw0mf3shymq3k7zlncf09rm8917sdi4h-diffutils-3.12 /nix/store/4rpiqv9yr2pw5094v4wc33ijkqjpm9sa-gnused-4.9 /nix/store/l2wvwyg680h0v2la18hz3yiznxy2naqw-gnugrep-3.11 /nix/store/c1z5j28ndxljf1ihqzag57bwpfpzms0g-gawk-5.3.2 /nix/store/w60s4xh1pjg6dwbw7j0b4xzlpp88q5qg-gnutar-1.35 /nix/store/xd9m9jkvrs8pbxvmkzkwviql33rd090j-gzip-1.14 /nix/store/w1pxx760yidi7n9vbi5bhpii9xxl5vdj-bzip2-1.0.8-bin /nix/store/xk0d14zpm0njxzdm182dd722aqhav2cc-gnumake-4.4.1 /nix/store/cfqbabpc7xwg8akbcchqbq3cai6qq2vs-bash-5.2p37 /nix/store/gj54zvf7vxll1mzzmqhqi1p4jiws3mfb-patch-2.7.6 /nix/store/22rpb6790f346c55iqi6s9drr5qgmyjf-xz-5.8.1-bin /nix/store/xlmpcglsq8l09qh03rf0virz0331pjdc-file-5.45'
|
||||
mesonFlags=''
|
||||
export mesonFlags
|
||||
name='nix-shell-env'
|
||||
export name
|
||||
nativeBuildInputs='/nix/store/hsv5438lvzq106llix5xi0f7cdvqk95q-nix-2.18.1-dev /nix/store/p3s38kgwd16d2dimspckp5f1rri43mnq-home-manager-unstable-2023-12-31 /nix/store/pz4jng8kb4iv9x67r730las2mdkv8s8q-git-2.42.0 /nix/store/p8p72q6anyf0whaf9i75jynzk2z4ml36-agenix-0.13.0 /nix/store/lfx4in7iqbbx5b6b85cndw268ria5512-deploy-rs-unstable-2023-12-20 /nix/store/8nwmr2kmkrl1mnggka7fjibcglk68rc0-dnscontrol-4.6.0'
|
||||
nativeBuildInputs='/nix/store/8znh07lsz9q2fdp6fgcdwwv035xxfrl1-nix-2.28.4-dev /nix/store/hr950wkqix97b759inrbxvljkqxj5113-home-manager-0-unstable-2025-05-13 /nix/store/3kwbkj8xnzw5787gbannr741bczjkrq6-git-2.50.1 /nix/store/s801pmgfwy4nifm72s638v0m4f32pnc5-agenix-0.15.0 /nix/store/vlc65hzrqq9a29m7j0sb4hpqlwn0ny56-deploy-rs-0-unstable-2025-06-05 /nix/store/dgqa38y4hxyw30g6bvrgd18750h364vr-dnscontrol-4.20.0'
|
||||
export nativeBuildInputs
|
||||
out='/home/anish/usr/helm/outputs/out'
|
||||
export out
|
||||
@@ -151,14 +154,14 @@ patches=''
|
||||
export patches
|
||||
phases='buildPhase'
|
||||
export phases
|
||||
pkg='/nix/store/vylmp73qymnv4siaqn1kl2hghj07hrj8-gcc-wrapper-12.3.0'
|
||||
pkg='/nix/store/kaj8d1zcn149m40s9h0xi0khakibiphz-gcc-wrapper-14.3.0'
|
||||
declare -a pkgsBuildBuild=()
|
||||
declare -a pkgsBuildHost=('/nix/store/hsv5438lvzq106llix5xi0f7cdvqk95q-nix-2.18.1-dev' '/nix/store/gdz3j02p6mfzmxs9zsssszwpppigb70g-boehm-gc-8.2.2-dev' '/nix/store/gfmmah5rc4vl8mhli495lh5savq842p0-boehm-gc-8.2.2' '/nix/store/d7jspi1ws93ya34zriyrdxz5v5z6lijj-nlohmann_json-3.11.2' '/nix/store/j7nl2pj606d8ld5818hw3z3fbz00sdc5-nix-2.18.1' '/nix/store/p3s38kgwd16d2dimspckp5f1rri43mnq-home-manager-unstable-2023-12-31' '/nix/store/pz4jng8kb4iv9x67r730las2mdkv8s8q-git-2.42.0' '/nix/store/p8p72q6anyf0whaf9i75jynzk2z4ml36-agenix-0.13.0' '/nix/store/lfx4in7iqbbx5b6b85cndw268ria5512-deploy-rs-unstable-2023-12-20' '/nix/store/8nwmr2kmkrl1mnggka7fjibcglk68rc0-dnscontrol-4.6.0' '/nix/store/h3ayxf5dk1gdf3s5716fh1ys815qxxag-patchelf-0.15.0' '/nix/store/v5qyd49a256y44pz75qnsp9741mg336k-update-autotools-gnu-config-scripts-hook' '/nix/store/h9lc1dpi14z7is86ffhl3ld569138595-audit-tmpdir.sh' '/nix/store/m54bmrhj6fqz8nds5zcj97w9s9bckc9v-compress-man-pages.sh' '/nix/store/wgrbkkaldkrlrni33ccvm3b6vbxzb656-make-symlinks-relative.sh' '/nix/store/5yzw0vhkyszf2d179m0qfkgxmp5wjjx4-move-docs.sh' '/nix/store/fyaryjvghbkpfnsyw97hb3lyb37s1pd6-move-lib64.sh' '/nix/store/kd4xwxjpjxi71jkm6ka0np72if9rm3y0-move-sbin.sh' '/nix/store/pag6l61paj1dc9sv15l7bm5c17xn5kyk-move-systemd-user-units.sh' '/nix/store/jivxp510zxakaaic7qkrb7v1dd2rdbw9-multiple-outputs.sh' '/nix/store/wzdsbnv2ba3nj91aql8jjdddfmkkdh7h-patch-shebangs.sh' '/nix/store/cickvswrvann041nqxb0rxilc46svw1n-prune-libtool-files.sh' '/nix/store/xyff06pkhki3qy1ls77w10s0v79c9il0-reproducible-builds.sh' '/nix/store/ngg1cv31c8c7bcm2n8ww4g06nq7s4zhm-set-source-date-epoch-to-latest.sh' '/nix/store/wmknncrif06fqxa16hpdldhixk95nds0-strip.sh' '/nix/store/vylmp73qymnv4siaqn1kl2hghj07hrj8-gcc-wrapper-12.3.0' '/nix/store/qcg3rpl1l103zb1xfsw40wm9j5hzrp7y-binutils-wrapper-2.40' )
|
||||
declare -a pkgsBuildHost=('/nix/store/8znh07lsz9q2fdp6fgcdwwv035xxfrl1-nix-2.28.4-dev' '/nix/store/qwnz3z0hf5pdhwsn92dc9lhlq4a3lsqk-boehm-gc-8.2.8-dev' '/nix/store/mrbslgynzhg5jfc05x2rlnsykzcxp2v0-boehm-gc-8.2.8' '/nix/store/235hvgzcbl06fxy53515q8sr6lljvf68-nlohmann_json-3.11.3' '/nix/store/a5b9czim7vrihag71f8dy1c467qh3mph-libarchive-3.8.0-dev' '/nix/store/0vy272ral6dwzx96wkvd90l37v0gdrk7-attr-2.5.2-dev' '/nix/store/53cx9nd6i328f9zqsgx6sh1krsngy5jl-attr-2.5.2-bin' '/nix/store/ik62z14lxr205b5gzfh4cjcla6gh9l6z-attr-2.5.2' '/nix/store/ra69jxg2pnnjymvkn83mfr7cnhllmwnj-acl-2.3.2-dev' '/nix/store/61066bhvr54xkl2ssippfa5qylwgafqf-acl-2.3.2-bin' '/nix/store/8smmj5gbhnnqaf28qxak4xv57ccgm96p-acl-2.3.2' '/nix/store/y130gnbp2qkfq6svqdv0s61b3m4043yp-libarchive-3.8.0-lib' '/nix/store/8fq8mhb1dlwzgq7xfaxwgn0x623yjb43-libarchive-3.8.0' '/nix/store/7q9ll9pjrdfdb3qyfza2bzrk829izk9s-nix-2.28.4' '/nix/store/hr950wkqix97b759inrbxvljkqxj5113-home-manager-0-unstable-2025-05-13' '/nix/store/3kwbkj8xnzw5787gbannr741bczjkrq6-git-2.50.1' '/nix/store/s801pmgfwy4nifm72s638v0m4f32pnc5-agenix-0.15.0' '/nix/store/vlc65hzrqq9a29m7j0sb4hpqlwn0ny56-deploy-rs-0-unstable-2025-06-05' '/nix/store/dgqa38y4hxyw30g6bvrgd18750h364vr-dnscontrol-4.20.0' '/nix/store/g7i75czfbw9sy5f8v7rjbama6lr3ya3s-patchelf-0.15.0' '/nix/store/gi6g289i9ydm3z896x67q210y0qq29zg-update-autotools-gnu-config-scripts-hook' '/nix/store/jjhw2phnaip4kg0qjas3x3fsaifi8y0w-no-broken-symlinks.sh' '/nix/store/h9lc1dpi14z7is86ffhl3ld569138595-audit-tmpdir.sh' '/nix/store/m54bmrhj6fqz8nds5zcj97w9s9bckc9v-compress-man-pages.sh' '/nix/store/wgrbkkaldkrlrni33ccvm3b6vbxzb656-make-symlinks-relative.sh' '/nix/store/5yzw0vhkyszf2d179m0qfkgxmp5wjjx4-move-docs.sh' '/nix/store/fyaryjvghbkpfnsyw97hb3lyb37s1pd6-move-lib64.sh' '/nix/store/kd4xwxjpjxi71jkm6ka0np72if9rm3y0-move-sbin.sh' '/nix/store/pag6l61paj1dc9sv15l7bm5c17xn5kyk-move-systemd-user-units.sh' '/nix/store/cmzya9irvxzlkh7lfy6i82gbp0saxqj3-multiple-outputs.sh' '/nix/store/hxv896faph0rqxjq2ycxpcrbnngc95sz-patch-shebangs.sh' '/nix/store/cickvswrvann041nqxb0rxilc46svw1n-prune-libtool-files.sh' '/nix/store/xyff06pkhki3qy1ls77w10s0v79c9il0-reproducible-builds.sh' '/nix/store/z7k98578dfzi6l3hsvbivzm7hfqlk0zc-set-source-date-epoch-to-latest.sh' '/nix/store/pilsssjjdxvdphlg2h19p0bfx5q0jzkn-strip.sh' '/nix/store/kaj8d1zcn149m40s9h0xi0khakibiphz-gcc-wrapper-14.3.0' '/nix/store/87zpmcmwvn48z4lbrfba74b312h22s6c-binutils-wrapper-2.44' )
|
||||
declare -a pkgsBuildTarget=()
|
||||
declare -a pkgsHostHost=()
|
||||
declare -a pkgsHostTarget=()
|
||||
declare -a pkgsTargetTarget=()
|
||||
declare -a postFixupHooks=('_makeSymlinksRelativeInAllOutputs' '_multioutPropagateDev' )
|
||||
declare -a postFixupHooks=('noBrokenSymlinksInAllOutputs' '_makeSymlinksRelativeInAllOutputs' '_multioutPropagateDev' )
|
||||
declare -a postUnpackHooks=('_updateSourceDateEpochFromSourceRoot' )
|
||||
declare -a preConfigureHooks=('_multioutConfig' )
|
||||
preConfigurePhases=' updateAutotoolsGnuConfigScriptsPhase'
|
||||
@@ -173,42 +176,17 @@ declare -a propagatedHostDepFiles=('propagated-host-host-deps' 'propagated-build
|
||||
propagatedNativeBuildInputs=''
|
||||
export propagatedNativeBuildInputs
|
||||
declare -a propagatedTargetDepFiles=('propagated-target-target-deps' )
|
||||
shell='/nix/store/7dpxg7ki7g8ynkdwcqf493p2x8divb4i-bash-5.2-p15/bin/bash'
|
||||
shell='/nix/store/cfqbabpc7xwg8akbcchqbq3cai6qq2vs-bash-5.2p37/bin/bash'
|
||||
export shell
|
||||
shellHook=''
|
||||
export shellHook
|
||||
stdenv='/nix/store/kv5wkk7xgc8paw9azshzlmxraffqcg0i-stdenv-linux'
|
||||
stdenv='/nix/store/p2mnji2cdxgf6h27hlqzqf7g8f9bqfsi-stdenv-linux'
|
||||
export stdenv
|
||||
strictDeps=''
|
||||
export strictDeps
|
||||
system='x86_64-linux'
|
||||
export system
|
||||
declare -a unpackCmdHooks=('_defaultUnpack' )
|
||||
_accumFlagsArray ()
|
||||
{
|
||||
|
||||
local name;
|
||||
if [ -n "$__structuredAttrs" ]; then
|
||||
for name in "$@";
|
||||
do
|
||||
local -n nameref="$name";
|
||||
flagsArray+=(${nameref+"${nameref[@]}"});
|
||||
done;
|
||||
else
|
||||
for name in "$@";
|
||||
do
|
||||
local -n nameref="$name";
|
||||
case "$name" in
|
||||
*Array)
|
||||
flagsArray+=(${nameref+"${nameref[@]}"})
|
||||
;;
|
||||
*)
|
||||
flagsArray+=(${nameref-})
|
||||
;;
|
||||
esac;
|
||||
done;
|
||||
fi
|
||||
}
|
||||
_activatePkgs ()
|
||||
{
|
||||
|
||||
@@ -274,13 +252,10 @@ _allFlags ()
|
||||
{
|
||||
|
||||
export system pname name version;
|
||||
for varName in $(awk 'BEGIN { for (v in ENVIRON) if (v ~ /^[a-z][a-zA-Z0-9_]*$/) print v }');
|
||||
do
|
||||
if (( "${NIX_DEBUG:-0}" >= 1 )); then
|
||||
printf "@%s@ -> %q\n" "${varName}" "${!varName}" 1>&2;
|
||||
fi;
|
||||
while IFS='' read -r varName; do
|
||||
nixTalkativeLog "@${varName}@ -> ${!varName}";
|
||||
args+=("--subst-var" "$varName");
|
||||
done
|
||||
done < <(awk 'BEGIN { for (v in ENVIRON) if (v ~ /^[a-z][a-zA-Z0-9_]*$/) print v }')
|
||||
}
|
||||
_assignFirst ()
|
||||
{
|
||||
@@ -316,12 +291,15 @@ _callImplicitHook ()
|
||||
local def="$1";
|
||||
local hookName="$2";
|
||||
if declare -F "$hookName" > /dev/null; then
|
||||
nixTalkativeLog "calling implicit '$hookName' function hook";
|
||||
"$hookName";
|
||||
else
|
||||
if type -p "$hookName" > /dev/null; then
|
||||
nixTalkativeLog "sourcing implicit '$hookName' script hook";
|
||||
source "$hookName";
|
||||
else
|
||||
if [ -n "${!hookName:-}" ]; then
|
||||
nixTalkativeLog "evaling implicit '$hookName' string hook";
|
||||
eval "${!hookName}";
|
||||
else
|
||||
return "$def";
|
||||
@@ -341,14 +319,15 @@ _defaultUnpack ()
|
||||
echo "Did you specify two \"srcs\" with the same \"name\"?";
|
||||
return 1;
|
||||
fi;
|
||||
cp -pr --reflink=auto -- "$fn" "$destination";
|
||||
cp -r --preserve=mode,timestamps --reflink=auto -- "$fn" "$destination";
|
||||
else
|
||||
case "$fn" in
|
||||
*.tar.xz | *.tar.lzma | *.txz)
|
||||
xz -d < "$fn" | tar xf - --warning=no-timestamp
|
||||
( XZ_OPT="--threads=$NIX_BUILD_CORES" xz -d < "$fn";
|
||||
true ) | tar xf - --mode=+w --warning=no-timestamp
|
||||
;;
|
||||
*.tar | *.tar.* | *.tgz | *.tbz2 | *.tbz)
|
||||
tar xf "$fn" --warning=no-timestamp
|
||||
tar xf "$fn" --mode=+w --warning=no-timestamp
|
||||
;;
|
||||
*)
|
||||
return 1
|
||||
@@ -364,7 +343,7 @@ _doStrip ()
|
||||
local -ra allDirs=(stripAllList stripAllListTarget);
|
||||
local -ra stripCmds=(STRIP STRIP_FOR_TARGET);
|
||||
local -ra ranlibCmds=(RANLIB RANLIB_FOR_TARGET);
|
||||
stripDebugList=${stripDebugList[*]:-lib lib32 lib64 libexec bin sbin};
|
||||
stripDebugList=${stripDebugList[*]:-lib lib32 lib64 libexec bin sbin Applications Library/Frameworks};
|
||||
stripDebugListTarget=${stripDebugListTarget[*]:-};
|
||||
stripAllList=${stripAllList[*]:-};
|
||||
stripAllListTarget=${stripAllListTarget[*]:-};
|
||||
@@ -392,6 +371,40 @@ _eval ()
|
||||
eval "$1";
|
||||
fi
|
||||
}
|
||||
_logHook ()
|
||||
{
|
||||
|
||||
if [[ -z ${NIX_LOG_FD-} ]]; then
|
||||
return;
|
||||
fi;
|
||||
local hookKind="$1";
|
||||
local hookExpr="$2";
|
||||
shift 2;
|
||||
if declare -F "$hookExpr" > /dev/null 2>&1; then
|
||||
nixTalkativeLog "calling '$hookKind' function hook '$hookExpr'" "$@";
|
||||
else
|
||||
if type -p "$hookExpr" > /dev/null; then
|
||||
nixTalkativeLog "sourcing '$hookKind' script hook '$hookExpr'";
|
||||
else
|
||||
if [[ "$hookExpr" != "_callImplicitHook"* ]]; then
|
||||
local exprToOutput;
|
||||
if [[ ${NIX_DEBUG:-0} -ge 5 ]]; then
|
||||
exprToOutput="$hookExpr";
|
||||
else
|
||||
local hookExprLine;
|
||||
while IFS= read -r hookExprLine; do
|
||||
hookExprLine="${hookExprLine#"${hookExprLine%%[![:space:]]*}"}";
|
||||
if [[ -n "$hookExprLine" ]]; then
|
||||
exprToOutput+="$hookExprLine\\n ";
|
||||
fi;
|
||||
done <<< "$hookExpr";
|
||||
exprToOutput="${exprToOutput%%\\n }";
|
||||
fi;
|
||||
nixTalkativeLog "evaling '$hookKind' string hook '$exprToOutput'";
|
||||
fi;
|
||||
fi;
|
||||
fi
|
||||
}
|
||||
_makeSymlinksRelative ()
|
||||
{
|
||||
|
||||
@@ -525,7 +538,7 @@ _multioutConfig ()
|
||||
shareDocName="$(echo "$name" | sed 's/-[^a-zA-Z].*//')";
|
||||
fi;
|
||||
fi;
|
||||
prependToVar configureFlags --bindir="${!outputBin}"/bin --sbindir="${!outputBin}"/sbin --includedir="${!outputInclude}"/include --oldincludedir="${!outputInclude}"/include --mandir="${!outputMan}"/share/man --infodir="${!outputInfo}"/share/info --docdir="${!outputDoc}"/share/doc/"${shareDocName}" --libdir="${!outputLib}"/lib --libexecdir="${!outputLib}"/libexec --localedir="${!outputLib}"/share/locale;
|
||||
prependToVar configureFlags --bindir="${!outputBin}"/bin --sbindir="${!outputBin}"/sbin --includedir="${!outputInclude}"/include --mandir="${!outputMan}"/share/man --infodir="${!outputInfo}"/share/info --docdir="${!outputDoc}"/share/doc/"${shareDocName}" --libdir="${!outputLib}"/lib --libexecdir="${!outputLib}"/libexec --localedir="${!outputLib}"/share/locale;
|
||||
prependToVar installFlags pkgconfigdir="${!outputDev}"/lib/pkgconfig m4datadir="${!outputDev}"/share/aclocal aclocaldir="${!outputDev}"/share/aclocal
|
||||
}
|
||||
_multioutDevs ()
|
||||
@@ -586,6 +599,47 @@ _multioutPropagateDev ()
|
||||
echo -n " ${!output}" >> "${!propagaterOutput}"/nix-support/propagated-build-inputs;
|
||||
done
|
||||
}
|
||||
_nixLogWithLevel ()
|
||||
{
|
||||
|
||||
[[ -z ${NIX_LOG_FD-} || ${NIX_DEBUG:-0} -lt ${1:?} ]] && return 0;
|
||||
local logLevel;
|
||||
case "${1:?}" in
|
||||
0)
|
||||
logLevel=ERROR
|
||||
;;
|
||||
1)
|
||||
logLevel=WARN
|
||||
;;
|
||||
2)
|
||||
logLevel=NOTICE
|
||||
;;
|
||||
3)
|
||||
logLevel=INFO
|
||||
;;
|
||||
4)
|
||||
logLevel=TALKATIVE
|
||||
;;
|
||||
5)
|
||||
logLevel=CHATTY
|
||||
;;
|
||||
6)
|
||||
logLevel=DEBUG
|
||||
;;
|
||||
7)
|
||||
logLevel=VOMIT
|
||||
;;
|
||||
*)
|
||||
echo "_nixLogWithLevel: called with invalid log level: ${1:?}" >&"$NIX_LOG_FD";
|
||||
return 1
|
||||
;;
|
||||
esac;
|
||||
local callerName="${FUNCNAME[2]}";
|
||||
if [[ $callerName == "_callImplicitHook" ]]; then
|
||||
callerName="${hookName:?}";
|
||||
fi;
|
||||
printf "%s: %s: %s\n" "$logLevel" "$callerName" "${2:?}" >&"$NIX_LOG_FD"
|
||||
}
|
||||
_overrideFirst ()
|
||||
{
|
||||
|
||||
@@ -616,6 +670,7 @@ activatePackage ()
|
||||
local -r targetOffset="$3";
|
||||
(( hostOffset <= targetOffset )) || exit 1;
|
||||
if [ -f "$pkg" ]; then
|
||||
nixTalkativeLog "sourcing setup hook '$pkg'";
|
||||
source "$pkg";
|
||||
fi;
|
||||
if [[ -z "${strictDeps-}" || "$hostOffset" -le -1 ]]; then
|
||||
@@ -628,6 +683,7 @@ activatePackage ()
|
||||
addToSearchPath _HOST_PATH "$pkg/bin";
|
||||
fi;
|
||||
if [[ -f "$pkg/nix-support/setup-hook" ]]; then
|
||||
nixTalkativeLog "sourcing setup hook '$pkg/nix-support/setup-hook'";
|
||||
source "$pkg/nix-support/setup-hook";
|
||||
fi
|
||||
}
|
||||
@@ -668,18 +724,19 @@ appendToVar ()
|
||||
else
|
||||
useArray=false;
|
||||
fi;
|
||||
if declare -p "$1" 2> /dev/null | grep -q '^'; then
|
||||
type="$(declare -p "$1")";
|
||||
if [[ "$type" =~ "declare -A" ]]; then
|
||||
echo "appendToVar(): ERROR: trying to use appendToVar on an associative array, use variable+=([\"X\"]=\"Y\") instead." 1>&2;
|
||||
return 1;
|
||||
else
|
||||
if [[ "$type" =~ "declare -a" ]]; then
|
||||
useArray=true;
|
||||
else
|
||||
useArray=false;
|
||||
fi;
|
||||
fi;
|
||||
if type=$(declare -p "$1" 2> /dev/null); then
|
||||
case "${type#* }" in
|
||||
-A*)
|
||||
echo "appendToVar(): ERROR: trying to use appendToVar on an associative array, use variable+=([\"X\"]=\"Y\") instead." 1>&2;
|
||||
return 1
|
||||
;;
|
||||
-a*)
|
||||
useArray=true
|
||||
;;
|
||||
*)
|
||||
useArray=false
|
||||
;;
|
||||
esac;
|
||||
fi;
|
||||
shift;
|
||||
if $useArray; then
|
||||
@@ -741,8 +798,8 @@ buildPhase ()
|
||||
echo "no Makefile or custom buildPhase, doing nothing";
|
||||
else
|
||||
foundMakefile=1;
|
||||
local flagsArray=(${enableParallelBuilding:+-j${NIX_BUILD_CORES}} SHELL=$SHELL);
|
||||
_accumFlagsArray makeFlags makeFlagsArray buildFlags buildFlagsArray;
|
||||
local flagsArray=(${enableParallelBuilding:+-j${NIX_BUILD_CORES}} SHELL="$SHELL");
|
||||
concatTo flagsArray makeFlags makeFlagsArray buildFlags buildFlagsArray;
|
||||
echoCmd 'build flags' "${flagsArray[@]}";
|
||||
make ${makefile:+-f $makefile} "${flagsArray[@]}";
|
||||
unset flagsArray;
|
||||
@@ -772,25 +829,18 @@ checkPhase ()
|
||||
fi;
|
||||
if [[ -z "${checkTarget:-}" ]]; then
|
||||
if make -n ${makefile:+-f $makefile} check > /dev/null 2>&1; then
|
||||
checkTarget=check;
|
||||
checkTarget="check";
|
||||
else
|
||||
if make -n ${makefile:+-f $makefile} test > /dev/null 2>&1; then
|
||||
checkTarget=test;
|
||||
checkTarget="test";
|
||||
fi;
|
||||
fi;
|
||||
fi;
|
||||
if [[ -z "${checkTarget:-}" ]]; then
|
||||
echo "no check/test target in ${makefile:-Makefile}, doing nothing";
|
||||
else
|
||||
local flagsArray=(${enableParallelChecking:+-j${NIX_BUILD_CORES}} SHELL=$SHELL);
|
||||
_accumFlagsArray makeFlags makeFlagsArray;
|
||||
if [ -n "$__structuredAttrs" ]; then
|
||||
flagsArray+=("${checkFlags[@]:-VERBOSE=y}");
|
||||
else
|
||||
flagsArray+=(${checkFlags:-VERBOSE=y});
|
||||
fi;
|
||||
_accumFlagsArray checkFlagsArray;
|
||||
flagsArray+=(${checkTarget});
|
||||
local flagsArray=(${enableParallelChecking:+-j${NIX_BUILD_CORES}} SHELL="$SHELL");
|
||||
concatTo flagsArray makeFlags makeFlagsArray checkFlags=VERBOSE=y checkFlagsArray checkTarget;
|
||||
echoCmd 'check flags' "${flagsArray[@]}";
|
||||
make ${makefile:+-f $makefile} "${flagsArray[@]}";
|
||||
unset flagsArray;
|
||||
@@ -820,6 +870,67 @@ compressManPages ()
|
||||
fi;
|
||||
done
|
||||
}
|
||||
concatStringsSep ()
|
||||
{
|
||||
|
||||
local sep="$1";
|
||||
local name="$2";
|
||||
local type oldifs;
|
||||
if type=$(declare -p "$name" 2> /dev/null); then
|
||||
local -n nameref="$name";
|
||||
case "${type#* }" in
|
||||
-A*)
|
||||
echo "concatStringsSep(): ERROR: trying to use concatStringsSep on an associative array." 1>&2;
|
||||
return 1
|
||||
;;
|
||||
-a*)
|
||||
local IFS="$(printf '\036')"
|
||||
;;
|
||||
*)
|
||||
local IFS=" "
|
||||
;;
|
||||
esac;
|
||||
local ifs_separated="${nameref[*]}";
|
||||
echo -n "${ifs_separated//"$IFS"/"$sep"}";
|
||||
fi
|
||||
}
|
||||
concatTo ()
|
||||
{
|
||||
|
||||
local -;
|
||||
set -o noglob;
|
||||
local -n targetref="$1";
|
||||
shift;
|
||||
local arg default name type;
|
||||
for arg in "$@";
|
||||
do
|
||||
IFS="=" read -r name default <<< "$arg";
|
||||
local -n nameref="$name";
|
||||
if [[ -z "${nameref[*]}" && -n "$default" ]]; then
|
||||
targetref+=("$default");
|
||||
else
|
||||
if type=$(declare -p "$name" 2> /dev/null); then
|
||||
case "${type#* }" in
|
||||
-A*)
|
||||
echo "concatTo(): ERROR: trying to use concatTo on an associative array." 1>&2;
|
||||
return 1
|
||||
;;
|
||||
-a*)
|
||||
targetref+=("${nameref[@]}")
|
||||
;;
|
||||
*)
|
||||
if [[ "$name" = *"Array" ]]; then
|
||||
nixErrorLog "concatTo(): $name is not declared as array, treating as a singleton. This will become an error in future";
|
||||
targetref+=(${nameref+"${nameref[@]}"});
|
||||
else
|
||||
targetref+=(${nameref-});
|
||||
fi
|
||||
;;
|
||||
esac;
|
||||
fi;
|
||||
fi;
|
||||
done
|
||||
}
|
||||
configurePhase ()
|
||||
{
|
||||
|
||||
@@ -853,10 +964,13 @@ configurePhase ()
|
||||
prependToVar configureFlags --disable-static;
|
||||
fi;
|
||||
fi;
|
||||
if [ -z "${dontPatchShebangsInConfigure:-}" ]; then
|
||||
patchShebangs --build "$configureScript";
|
||||
fi;
|
||||
fi;
|
||||
if [ -n "$configureScript" ]; then
|
||||
local -a flagsArray;
|
||||
_accumFlagsArray configureFlags configureFlagsArray;
|
||||
concatTo flagsArray configureFlags configureFlagsArray;
|
||||
echoCmd 'configure flags' "${flagsArray[@]}";
|
||||
$configureScript "${flagsArray[@]}";
|
||||
unset flagsArray;
|
||||
@@ -878,8 +992,7 @@ distPhase ()
|
||||
|
||||
runHook preDist;
|
||||
local flagsArray=();
|
||||
_accumFlagsArray distFlags distFlagsArray;
|
||||
flagsArray+=(${distTarget:-dist});
|
||||
concatTo flagsArray distFlags distFlagsArray distTarget=dist;
|
||||
echo 'dist flags: %q' "${flagsArray[@]}";
|
||||
make ${makefile:+-f $makefile} "${flagsArray[@]}";
|
||||
if [ "${dontCopyDist:-0}" != 1 ]; then
|
||||
@@ -892,7 +1005,9 @@ dumpVars ()
|
||||
{
|
||||
|
||||
if [ "${noDumpEnvVars:-0}" != 1 ]; then
|
||||
export 2> /dev/null >| "$NIX_BUILD_TOP/env-vars" || true;
|
||||
{
|
||||
install -m 0600 /dev/null "$NIX_BUILD_TOP/env-vars" && export 2> /dev/null >| "$NIX_BUILD_TOP/env-vars"
|
||||
} || true;
|
||||
fi
|
||||
}
|
||||
echoCmd ()
|
||||
@@ -941,7 +1056,7 @@ findInputs ()
|
||||
local var="${!varRef}";
|
||||
unset -v varVar varRef;
|
||||
local varSlice="$var[*]";
|
||||
case "${!varSlice-}" in
|
||||
case " ${!varSlice-} " in
|
||||
*" $pkg "*)
|
||||
return 0
|
||||
;;
|
||||
@@ -1010,7 +1125,7 @@ fixupPhase ()
|
||||
for output in $(getAllOutputNames);
|
||||
do
|
||||
if [ -e "${!output}" ]; then
|
||||
chmod -R u+w "${!output}";
|
||||
chmod -R u+w,u-s,g-s "${!output}";
|
||||
fi;
|
||||
done;
|
||||
runHook preFixup;
|
||||
@@ -1036,9 +1151,9 @@ fixupPhase ()
|
||||
done;
|
||||
unset -v hook;
|
||||
fi;
|
||||
if [ -n "${propagatedUserEnvPkgs:-}" ]; then
|
||||
if [ -n "${propagatedUserEnvPkgs[*]:-}" ]; then
|
||||
mkdir -p "${!outputBin}/nix-support";
|
||||
printWords $propagatedUserEnvPkgs > "${!outputBin}/nix-support/propagated-user-env-packages";
|
||||
printWords "${propagatedUserEnvPkgs[@]}" > "${!outputBin}/nix-support/propagated-user-env-packages";
|
||||
fi;
|
||||
runHook postFixup
|
||||
}
|
||||
@@ -1095,7 +1210,7 @@ getRole ()
|
||||
role_post='_FOR_TARGET'
|
||||
;;
|
||||
*)
|
||||
echo "binutils-wrapper-2.40: used as improper sort of dependency" 1>&2;
|
||||
echo "binutils-wrapper-2.44: used as improper sort of dependency" 1>&2;
|
||||
return 1
|
||||
;;
|
||||
esac
|
||||
@@ -1124,7 +1239,7 @@ getTargetRoleWrapper ()
|
||||
export NIX_BINTOOLS_WRAPPER_TARGET_TARGET_x86_64_unknown_linux_gnu=1
|
||||
;;
|
||||
*)
|
||||
echo "binutils-wrapper-2.40: used as improper sort of dependency" 1>&2;
|
||||
echo "binutils-wrapper-2.44: used as improper sort of dependency" 1>&2;
|
||||
return 1
|
||||
;;
|
||||
esac
|
||||
@@ -1139,9 +1254,8 @@ installCheckPhase ()
|
||||
if [[ -z "${installCheckTarget:-}" ]] && ! make -n ${makefile:+-f $makefile} "${installCheckTarget:-installcheck}" > /dev/null 2>&1; then
|
||||
echo "no installcheck target in ${makefile:-Makefile}, doing nothing";
|
||||
else
|
||||
local flagsArray=(${enableParallelChecking:+-j${NIX_BUILD_CORES}} SHELL=$SHELL);
|
||||
_accumFlagsArray makeFlags makeFlagsArray installCheckFlags installCheckFlagsArray;
|
||||
flagsArray+=(${installCheckTarget:-installcheck});
|
||||
local flagsArray=(${enableParallelChecking:+-j${NIX_BUILD_CORES}} SHELL="$SHELL");
|
||||
concatTo flagsArray makeFlags makeFlagsArray installCheckFlags installCheckFlagsArray installCheckTarget=installcheck;
|
||||
echoCmd 'installcheck flags' "${flagsArray[@]}";
|
||||
make ${makefile:+-f $makefile} "${flagsArray[@]}";
|
||||
unset flagsArray;
|
||||
@@ -1163,13 +1277,8 @@ installPhase ()
|
||||
if [ -n "$prefix" ]; then
|
||||
mkdir -p "$prefix";
|
||||
fi;
|
||||
local flagsArray=(${enableParallelInstalling:+-j${NIX_BUILD_CORES}} SHELL=$SHELL);
|
||||
_accumFlagsArray makeFlags makeFlagsArray installFlags installFlagsArray;
|
||||
if [ -n "$__structuredAttrs" ]; then
|
||||
flagsArray+=("${installTargets[@]:-install}");
|
||||
else
|
||||
flagsArray+=(${installTargets:-install});
|
||||
fi;
|
||||
local flagsArray=(${enableParallelInstalling:+-j${NIX_BUILD_CORES}} SHELL="$SHELL");
|
||||
concatTo flagsArray makeFlags makeFlagsArray installFlags installFlagsArray installTargets=install;
|
||||
echoCmd 'install flags' "${flagsArray[@]}";
|
||||
make ${makefile:+-f $makefile} "${flagsArray[@]}";
|
||||
unset flagsArray;
|
||||
@@ -1281,6 +1390,116 @@ moveToOutput ()
|
||||
done;
|
||||
done
|
||||
}
|
||||
nixChattyLog ()
|
||||
{
|
||||
|
||||
_nixLogWithLevel 5 "$*"
|
||||
}
|
||||
nixDebugLog ()
|
||||
{
|
||||
|
||||
_nixLogWithLevel 6 "$*"
|
||||
}
|
||||
nixErrorLog ()
|
||||
{
|
||||
|
||||
_nixLogWithLevel 0 "$*"
|
||||
}
|
||||
nixInfoLog ()
|
||||
{
|
||||
|
||||
_nixLogWithLevel 3 "$*"
|
||||
}
|
||||
nixLog ()
|
||||
{
|
||||
|
||||
[[ -z ${NIX_LOG_FD-} ]] && return 0;
|
||||
local callerName="${FUNCNAME[1]}";
|
||||
if [[ $callerName == "_callImplicitHook" ]]; then
|
||||
callerName="${hookName:?}";
|
||||
fi;
|
||||
printf "%s: %s\n" "$callerName" "$*" >&"$NIX_LOG_FD"
|
||||
}
|
||||
nixNoticeLog ()
|
||||
{
|
||||
|
||||
_nixLogWithLevel 2 "$*"
|
||||
}
|
||||
nixTalkativeLog ()
|
||||
{
|
||||
|
||||
_nixLogWithLevel 4 "$*"
|
||||
}
|
||||
nixVomitLog ()
|
||||
{
|
||||
|
||||
_nixLogWithLevel 7 "$*"
|
||||
}
|
||||
nixWarnLog ()
|
||||
{
|
||||
|
||||
_nixLogWithLevel 1 "$*"
|
||||
}
|
||||
noBrokenSymlinks ()
|
||||
{
|
||||
|
||||
local -r output="${1:?}";
|
||||
local path;
|
||||
local pathParent;
|
||||
local symlinkTarget;
|
||||
local -i numDanglingSymlinks=0;
|
||||
local -i numReflexiveSymlinks=0;
|
||||
local -i numUnreadableSymlinks=0;
|
||||
if [[ ! -e $output ]]; then
|
||||
nixWarnLog "skipping non-existent output $output";
|
||||
return 0;
|
||||
fi;
|
||||
nixInfoLog "running on $output";
|
||||
while IFS= read -r -d '' path; do
|
||||
pathParent="$(dirname "$path")";
|
||||
if ! symlinkTarget="$(readlink "$path")"; then
|
||||
nixErrorLog "the symlink $path is unreadable";
|
||||
numUnreadableSymlinks+=1;
|
||||
continue;
|
||||
fi;
|
||||
if [[ $symlinkTarget == /* ]]; then
|
||||
nixInfoLog "symlink $path points to absolute target $symlinkTarget";
|
||||
else
|
||||
nixInfoLog "symlink $path points to relative target $symlinkTarget";
|
||||
symlinkTarget="$(realpath --no-symlinks --canonicalize-missing "$pathParent/$symlinkTarget")";
|
||||
fi;
|
||||
if [[ $symlinkTarget != "$NIX_STORE"/* ]]; then
|
||||
nixInfoLog "symlink $path points outside the Nix store; ignoring";
|
||||
continue;
|
||||
fi;
|
||||
if [[ $path == "$symlinkTarget" ]]; then
|
||||
nixErrorLog "the symlink $path is reflexive";
|
||||
numReflexiveSymlinks+=1;
|
||||
else
|
||||
if [[ ! -e $symlinkTarget ]]; then
|
||||
nixErrorLog "the symlink $path points to a missing target: $symlinkTarget";
|
||||
numDanglingSymlinks+=1;
|
||||
else
|
||||
nixDebugLog "the symlink $path is irreflexive and points to a target which exists";
|
||||
fi;
|
||||
fi;
|
||||
done < <(find "$output" -type l -print0);
|
||||
if ((numDanglingSymlinks > 0 || numReflexiveSymlinks > 0 || numUnreadableSymlinks > 0)); then
|
||||
nixErrorLog "found $numDanglingSymlinks dangling symlinks, $numReflexiveSymlinks reflexive symlinks and $numUnreadableSymlinks unreadable symlinks";
|
||||
exit 1;
|
||||
fi;
|
||||
return 0
|
||||
}
|
||||
noBrokenSymlinksInAllOutputs ()
|
||||
{
|
||||
|
||||
if [[ -z ${dontCheckForBrokenSymlinks-} ]]; then
|
||||
for output in $(getAllOutputNames);
|
||||
do
|
||||
noBrokenSymlinks "${!output}";
|
||||
done;
|
||||
fi
|
||||
}
|
||||
patchELF ()
|
||||
{
|
||||
|
||||
@@ -1304,11 +1523,9 @@ patchPhase ()
|
||||
|
||||
runHook prePatch;
|
||||
local -a patchesArray;
|
||||
if [ -n "$__structuredAttrs" ]; then
|
||||
patchesArray=(${patches:+"${patches[@]}"});
|
||||
else
|
||||
patchesArray=(${patches:-});
|
||||
fi;
|
||||
concatTo patchesArray patches;
|
||||
local -a flagsArray;
|
||||
concatTo flagsArray patchFlags=-p1;
|
||||
for i in "${patchesArray[@]}";
|
||||
do
|
||||
echo "applying patch $i";
|
||||
@@ -1327,12 +1544,6 @@ patchPhase ()
|
||||
uncompress="lzma -d"
|
||||
;;
|
||||
esac;
|
||||
local -a flagsArray;
|
||||
if [ -n "$__structuredAttrs" ]; then
|
||||
flagsArray=("${patchFlags[@]:--p1}");
|
||||
else
|
||||
flagsArray=(${patchFlags:--p1});
|
||||
fi;
|
||||
$uncompress < "$i" 2>&1 | patch "${flagsArray[@]}";
|
||||
done;
|
||||
runHook postPatch
|
||||
@@ -1341,7 +1552,7 @@ patchShebangs ()
|
||||
{
|
||||
|
||||
local pathName;
|
||||
local update;
|
||||
local update=false;
|
||||
while [[ $# -gt 0 ]]; do
|
||||
case "$1" in
|
||||
--host)
|
||||
@@ -1384,7 +1595,7 @@ patchShebangs ()
|
||||
local f;
|
||||
while IFS= read -r -d '' f; do
|
||||
isScript "$f" || continue;
|
||||
read -r oldInterpreterLine < "$f";
|
||||
read -r oldInterpreterLine < "$f" || [ "$oldInterpreterLine" ];
|
||||
read -r oldPath arg0 args <<< "${oldInterpreterLine:2}";
|
||||
if [[ -z "${pathName:-}" ]]; then
|
||||
if [[ -n $strictDeps && $f == "$NIX_STORE"* ]]; then
|
||||
@@ -1396,22 +1607,22 @@ patchShebangs ()
|
||||
if [[ "$oldPath" == *"/bin/env" ]]; then
|
||||
if [[ $arg0 == "-S" ]]; then
|
||||
arg0=${args%% *};
|
||||
args=${args#* };
|
||||
newPath="$(PATH="${!pathName}" command -v "env" || true)";
|
||||
args="-S $(PATH="${!pathName}" command -v "$arg0" || true) $args";
|
||||
[[ "$args" == *" "* ]] && args=${args#* } || args=;
|
||||
newPath="$(PATH="${!pathName}" type -P "env" || true)";
|
||||
args="-S $(PATH="${!pathName}" type -P "$arg0" || true) $args";
|
||||
else
|
||||
if [[ $arg0 == "-"* || $arg0 == *"="* ]]; then
|
||||
echo "$f: unsupported interpreter directive \"$oldInterpreterLine\" (set dontPatchShebangs=1 and handle shebang patching yourself)" 1>&2;
|
||||
exit 1;
|
||||
else
|
||||
newPath="$(PATH="${!pathName}" command -v "$arg0" || true)";
|
||||
newPath="$(PATH="${!pathName}" type -P "$arg0" || true)";
|
||||
fi;
|
||||
fi;
|
||||
else
|
||||
if [[ -z $oldPath ]]; then
|
||||
oldPath="/bin/sh";
|
||||
fi;
|
||||
newPath="$(PATH="${!pathName}" command -v "$(basename "$oldPath")" || true)";
|
||||
newPath="$(PATH="${!pathName}" type -P "$(basename "$oldPath")" || true)";
|
||||
args="$arg0 $args";
|
||||
fi;
|
||||
newInterpreterLine="$newPath $args";
|
||||
@@ -1448,18 +1659,19 @@ prependToVar ()
|
||||
else
|
||||
useArray=false;
|
||||
fi;
|
||||
if declare -p "$1" 2> /dev/null | grep -q '^'; then
|
||||
type="$(declare -p "$1")";
|
||||
if [[ "$type" =~ "declare -A" ]]; then
|
||||
echo "prependToVar(): ERROR: trying to use prependToVar on an associative array." 1>&2;
|
||||
return 1;
|
||||
else
|
||||
if [[ "$type" =~ "declare -a" ]]; then
|
||||
useArray=true;
|
||||
else
|
||||
useArray=false;
|
||||
fi;
|
||||
fi;
|
||||
if type=$(declare -p "$1" 2> /dev/null); then
|
||||
case "${type#* }" in
|
||||
-A*)
|
||||
echo "prependToVar(): ERROR: trying to use prependToVar on an associative array." 1>&2;
|
||||
return 1
|
||||
;;
|
||||
-a*)
|
||||
useArray=true
|
||||
;;
|
||||
*)
|
||||
useArray=false
|
||||
;;
|
||||
esac;
|
||||
fi;
|
||||
shift;
|
||||
if $useArray; then
|
||||
@@ -1504,6 +1716,7 @@ runHook ()
|
||||
local hook;
|
||||
for hook in "_callImplicitHook 0 $hookName" ${!hooksSlice+"${!hooksSlice}"};
|
||||
do
|
||||
_logHook "$hookName" "$hook" "$@";
|
||||
_eval "$hook" "$@";
|
||||
done;
|
||||
return 0
|
||||
@@ -1517,6 +1730,7 @@ runOneHook ()
|
||||
local hook ret=1;
|
||||
for hook in "_callImplicitHook 1 $hookName" ${!hooksSlice+"${!hooksSlice}"};
|
||||
do
|
||||
_logHook "$hookName" "$hook" "$@";
|
||||
if _eval "$hook" "$@"; then
|
||||
ret=0;
|
||||
break;
|
||||
@@ -1555,18 +1769,16 @@ runPhase ()
|
||||
if [[ "$curPhase" = distPhase && -z "${doDist:-}" ]]; then
|
||||
return;
|
||||
fi;
|
||||
if [[ -n $NIX_LOG_FD ]]; then
|
||||
echo "@nix { \"action\": \"setPhase\", \"phase\": \"$curPhase\" }" >&"$NIX_LOG_FD";
|
||||
fi;
|
||||
showPhaseHeader "$curPhase";
|
||||
dumpVars;
|
||||
local startTime=$(date +"%s");
|
||||
local startTime endTime;
|
||||
startTime=$(date +"%s");
|
||||
eval "${!curPhase:-$curPhase}";
|
||||
local endTime=$(date +"%s");
|
||||
endTime=$(date +"%s");
|
||||
showPhaseFooter "$curPhase" "$startTime" "$endTime";
|
||||
if [ "$curPhase" = unpackPhase ]; then
|
||||
[ -n "${sourceRoot:-}" ] && chmod +x "${sourceRoot}";
|
||||
cd "${sourceRoot:-.}";
|
||||
[ -n "${sourceRoot:-}" ] && chmod +x -- "${sourceRoot}";
|
||||
cd -- "${sourceRoot:-.}";
|
||||
fi
|
||||
}
|
||||
showPhaseFooter ()
|
||||
@@ -1589,7 +1801,11 @@ showPhaseHeader ()
|
||||
{
|
||||
|
||||
local phase="$1";
|
||||
echo "Running phase: $phase"
|
||||
echo "Running phase: $phase";
|
||||
if [[ -z ${NIX_LOG_FD-} ]]; then
|
||||
return;
|
||||
fi;
|
||||
printf "@nix { \"action\": \"setPhase\", \"phase\": \"%s\" }\n" "$phase" >&"$NIX_LOG_FD"
|
||||
}
|
||||
stripDirs ()
|
||||
{
|
||||
@@ -1621,7 +1837,7 @@ stripDirs ()
|
||||
echo "stripping (with command $cmd and flags $stripFlags) in $paths";
|
||||
local striperr;
|
||||
striperr="$(mktemp --tmpdir="$TMPDIR" 'striperr.XXXXXX')";
|
||||
find $paths -type f "${excludeFlags[@]}" -a '!' -path "$prefix/lib/debug/*" -print0 | xargs -r -0 -n1 -- realpath -z | sort -u -z | xargs -r -0 -n1 -P "$NIX_BUILD_CORES" -- $cmd $stripFlags 2> "$striperr" || exit_code=$?;
|
||||
find $paths -type f "${excludeFlags[@]}" -a '!' -path "$prefix/lib/debug/*" -printf '%D-%i,%p\0' | sort -t, -k1,1 -u -z | cut -d, -f2- -z | xargs -r -0 -n1 -P "$NIX_BUILD_CORES" -- $cmd $stripFlags 2> "$striperr" || exit_code=$?;
|
||||
[[ "$exit_code" = 123 || -z "$exit_code" ]] || ( cat "$striperr" 1>&2 && exit 1 );
|
||||
rm "$striperr";
|
||||
find $paths -name '*.a' -type f -exec $ranlibCmd '{}' \; 2> /dev/null;
|
||||
@@ -1695,6 +1911,10 @@ substituteInPlace ()
|
||||
fileNames+=("$arg");
|
||||
shift;
|
||||
done;
|
||||
if ! [[ "${#fileNames[@]}" -gt 0 ]]; then
|
||||
echo "substituteInPlace called without any files to operate on (files must come before options!)" 1>&2;
|
||||
return 1;
|
||||
fi;
|
||||
for file in "${fileNames[@]}";
|
||||
do
|
||||
substitute "$file" "$file" "$@";
|
||||
@@ -1707,29 +1927,40 @@ substituteStream ()
|
||||
local description=$2;
|
||||
shift 2;
|
||||
while (( "$#" )); do
|
||||
local replace_mode="$1";
|
||||
case "$1" in
|
||||
--replace)
|
||||
if ! "$_substituteStream_has_warned_replace_deprecation"; then
|
||||
echo "substituteStream() in derivation $name: WARNING: '--replace' is deprecated, use --replace-{fail,warn,quiet}. ($description)" 1>&2;
|
||||
_substituteStream_has_warned_replace_deprecation=true;
|
||||
fi;
|
||||
replace_mode='--replace-warn'
|
||||
;&
|
||||
--replace-quiet | --replace-warn | --replace-fail)
|
||||
pattern="$2";
|
||||
replacement="$3";
|
||||
shift 3;
|
||||
local savedvar;
|
||||
savedvar="${!var}";
|
||||
eval "$var"'=${'"$var"'//"$pattern"/"$replacement"}';
|
||||
if [ "$pattern" != "$replacement" ]; then
|
||||
if [ "${!var}" == "$savedvar" ]; then
|
||||
echo "substituteStream(): WARNING: pattern '$pattern' doesn't match anything in $description" 1>&2;
|
||||
if ! [[ "${!var}" == *"$pattern"* ]]; then
|
||||
if [ "$replace_mode" == --replace-warn ]; then
|
||||
printf "substituteStream() in derivation $name: WARNING: pattern %q doesn't match anything in %s\n" "$pattern" "$description" 1>&2;
|
||||
else
|
||||
if [ "$replace_mode" == --replace-fail ]; then
|
||||
printf "substituteStream() in derivation $name: ERROR: pattern %q doesn't match anything in %s\n" "$pattern" "$description" 1>&2;
|
||||
return 1;
|
||||
fi;
|
||||
fi;
|
||||
fi
|
||||
fi;
|
||||
eval "$var"'=${'"$var"'//"$pattern"/"$replacement"}'
|
||||
;;
|
||||
--subst-var)
|
||||
local varName="$2";
|
||||
shift 2;
|
||||
if ! [[ "$varName" =~ ^[a-zA-Z_][a-zA-Z0-9_]*$ ]]; then
|
||||
echo "substituteStream(): ERROR: substitution variables must be valid Bash names, \"$varName\" isn't." 1>&2;
|
||||
echo "substituteStream() in derivation $name: ERROR: substitution variables must be valid Bash names, \"$varName\" isn't." 1>&2;
|
||||
return 1;
|
||||
fi;
|
||||
if [ -z ${!varName+x} ]; then
|
||||
echo "substituteStream(): ERROR: variable \$$varName is unset" 1>&2;
|
||||
echo "substituteStream() in derivation $name: ERROR: variable \$$varName is unset" 1>&2;
|
||||
return 1;
|
||||
fi;
|
||||
pattern="@$varName@";
|
||||
@@ -1743,7 +1974,7 @@ substituteStream ()
|
||||
shift 3
|
||||
;;
|
||||
*)
|
||||
echo "substituteStream(): ERROR: Invalid command line argument: $1" 1>&2;
|
||||
echo "substituteStream() in derivation $name: ERROR: Invalid command line argument: $1" 1>&2;
|
||||
return 1
|
||||
;;
|
||||
esac;
|
||||
@@ -1772,11 +2003,7 @@ unpackPhase ()
|
||||
srcs="$src";
|
||||
fi;
|
||||
local -a srcsArray;
|
||||
if [ -n "$__structuredAttrs" ]; then
|
||||
srcsArray=("${srcs[@]}");
|
||||
else
|
||||
srcsArray=($srcs);
|
||||
fi;
|
||||
concatTo srcsArray srcs;
|
||||
local dirsBefore="";
|
||||
for i in *;
|
||||
do
|
||||
@@ -1833,7 +2060,7 @@ updateAutotoolsGnuConfigScriptsPhase ()
|
||||
for f in $(find . -type f -name "$script");
|
||||
do
|
||||
echo "Updating Autotools / GNU config script to a newer upstream version: $f";
|
||||
cp -f "/nix/store/7lk76vdawbx478qq9lvi3mgf73rvcyhd-gnu-config-2023-09-19/$script" "$f";
|
||||
cp -f "/nix/store/khmqxw6b9q7rgkv6hf3gcqf2igk03z1g-gnu-config-2024-01-01/$script" "$f";
|
||||
done;
|
||||
done
|
||||
}
|
||||
@@ -1841,7 +2068,8 @@ updateSourceDateEpoch ()
|
||||
{
|
||||
|
||||
local path="$1";
|
||||
local -a res=($(find "$path" -type f -not -newer "$NIX_BUILD_TOP/.." -printf '%T@ %p\0' | sort -n --zero-terminated | tail -n1 --zero-terminated | head -c -1));
|
||||
[[ $path == -* ]] && path="./$path";
|
||||
local -a res=($(find "$path" -type f -not -newer "$NIX_BUILD_TOP/.." -printf '%T@ "%p"\0' | sort -n --zero-terminated | tail -n1 --zero-terminated | head -c -1));
|
||||
local time="${res[0]//\.[0-9]*/}";
|
||||
local newestFile="${res[1]}";
|
||||
if [ "${time:-0}" -gt "$SOURCE_DATE_EPOCH" ]; then
|
||||
@@ -1860,4 +2088,4 @@ export TMP="$NIX_BUILD_TOP"
|
||||
export TMPDIR="$NIX_BUILD_TOP"
|
||||
export TEMP="$NIX_BUILD_TOP"
|
||||
export TEMPDIR="$NIX_BUILD_TOP"
|
||||
eval "$shellHook"
|
||||
eval "${shellHook:-}"
|
||||
|
||||
Reference in New Issue
Block a user