Could be applied to ghcboot and acroread (if buildInputs would be used
instead of libPath ..  adding more libraries to rpath than necessary
doesn't harm, does it? As long as they belong to the nix system ..)

  patchelfExecutables = drv : drv // {
    postBuild =     
        " 
          # copied and modified from acroread and ghcboot

          fullPath=
          for i in \$buildInputs; do
              fullPath=\$fullPath\${fullPath:+:}\$i/lib
          done

          find . -type f -perm +100 \\
          -exec patchelf --interpreter \"\$(cat 
\$NIX_GCC/nix-support/dynamic-linker)\" \\
          --set-rpath \$fullPath {};

          # in case the installation took place in the build script
          find \$out -type f -perm +100 \\
          -exec patchelf --interpreter \"$(cat 
\$NIX_GCC/nix-support/dynamic-linker)\" \\
          --set-rpath \$fullPath {};
        ";
  };

Marc Weber
_______________________________________________
nix-dev mailing list
[email protected]
https://mail.cs.uu.nl/mailman/listinfo/nix-dev

Reply via email to