samsung-unified-linux-drive: Fix sane driver by patching rpaths

fixes #25779

authored by David Waern and committed by Jörg Thalheim 3a084a80 9694567a

+9 -11
+9 -11
pkgs/misc/cups/drivers/samsung/default.nix
··· 1 - { stdenv, fetchurl, glibc, cups, libusb, ghostscript }: 2 3 let 4 ··· 18 buildInputs = [ 19 cups 20 libusb 21 ]; 22 - 23 - phases = [ "unpackPhase" "installPhase" "fixupPhase" ]; 24 25 installPhase = '' 26 ··· 69 ''; 70 71 preFixup = '' 72 73 - for bin in $out/bin/*; do 74 - patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$bin" 75 - patchelf --set-rpath "$out/lib:${stdenv.lib.getLib cups}/lib" "$bin" 76 - done 77 78 - patchelf --set-rpath "$out/lib:${stdenv.lib.getLib cups}/lib" "$out/lib/libscmssc.so" 79 - 80 - ln -s ${stdenv.cc.cc.lib}/lib/libstdc++.so.6 $out/lib/ 81 - 82 ''; 83 84 # all binaries are already stripped
··· 1 + { stdenv, fetchurl, glibc, cups, libusb, libxml2, ghostscript }: 2 3 let 4 ··· 18 buildInputs = [ 19 cups 20 libusb 21 + libxml2 22 ]; 23 24 installPhase = '' 25 ··· 68 ''; 69 70 preFixup = '' 71 + for bin in "$out/bin/"*; do 72 + patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$bin" 73 + patchelf --set-rpath "$out/lib:${stdenv.lib.getLib cups}/lib" "$bin" 74 + done 75 76 + patchelf --set-rpath "$out/lib:${stdenv.lib.getLib cups}/lib" "$out/lib/libscmssc.so" 77 + patchelf --set-rpath "$out/lib:${libxml2.out}/lib:${libusb.out}/lib" "$out/lib/sane/libsane-smfp.so.1.0.1" 78 79 + ln -s ${stdenv.cc.cc.lib}/lib/libstdc++.so.6 $out/lib/ 80 ''; 81 82 # all binaries are already stripped