nixos/luksroot: use 'nuke-refs -e' option to simplify things
commit1bd3d9de2acf17e4b727cbf4d1487d5ad5e42159
authorNikolay Amiantov <ab@fmap.me>
dateSun 18 Oct 2015, 17:55 (11 years ago)
parent3c7871a
nixos/modules/system/boot/luksroot.nix+2−5
@@ -432,6 +432,8 @@ in
432432
433433 cat > $out/bin/openssl-wrap <<EOF
434434 #!$out/bin/sh
435+ export OPENSSL_CONF=$out/etc/ssl/openssl.cnf
436+ $out/bin/openssl "\$@"
435437 EOF
436438 chmod +x $out/bin/openssl-wrap
437439 ''}
@@ -442,11 +444,6 @@ in
442444 ${optionalString luks.yubikeySupport ''
443445 $out/bin/ykchalresp -V
444446 $out/bin/ykinfo -V
445− cat > $out/bin/openssl-wrap <<EOF
446− #!$out/bin/sh
447− export OPENSSL_CONF=$out/etc/ssl/openssl.cnf
448− $out/bin/openssl "\$@"
449− EOF
450447 $out/bin/openssl-wrap version
451448 ''}
452449 '';
nixos/modules/system/boot/stage-1.nix+1−1
@@ -104,7 +104,7 @@ let
104104 stripDirs "lib bin" "-s"
105105
106106 # Run patchelf to make the programs refer to the copied libraries.
107− for i in $out/bin/* $out/lib/*; do if ! test -L $i; then nuke-refs $i; fi; done
107+ for i in $out/bin/* $out/lib/*; do if ! test -L $i; then nuke-refs -e $out $i; fi; done
108108
109109 for i in $out/bin/*; do
110110 if ! test -L $i; then