samsung-unified-linux-drive: Fix sane driver by patching rpaths
fixes #25779
This commit is contained in:
parent
9694567ac9
commit
3a084a80e7
@ -1,4 +1,4 @@
|
|||||||
{ stdenv, fetchurl, glibc, cups, libusb, ghostscript }:
|
{ stdenv, fetchurl, glibc, cups, libusb, libxml2, ghostscript }:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
|
||||||
@ -18,10 +18,9 @@ in stdenv.mkDerivation rec {
|
|||||||
buildInputs = [
|
buildInputs = [
|
||||||
cups
|
cups
|
||||||
libusb
|
libusb
|
||||||
|
libxml2
|
||||||
];
|
];
|
||||||
|
|
||||||
phases = [ "unpackPhase" "installPhase" "fixupPhase" ];
|
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
|
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
@ -69,16 +68,15 @@ in stdenv.mkDerivation rec {
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
preFixup = ''
|
preFixup = ''
|
||||||
|
for bin in "$out/bin/"*; do
|
||||||
for bin in $out/bin/*; do
|
|
||||||
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$bin"
|
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$bin"
|
||||||
patchelf --set-rpath "$out/lib:${stdenv.lib.getLib cups}/lib" "$bin"
|
patchelf --set-rpath "$out/lib:${stdenv.lib.getLib cups}/lib" "$bin"
|
||||||
done
|
done
|
||||||
|
|
||||||
patchelf --set-rpath "$out/lib:${stdenv.lib.getLib cups}/lib" "$out/lib/libscmssc.so"
|
patchelf --set-rpath "$out/lib:${stdenv.lib.getLib cups}/lib" "$out/lib/libscmssc.so"
|
||||||
|
patchelf --set-rpath "$out/lib:${libxml2.out}/lib:${libusb.out}/lib" "$out/lib/sane/libsane-smfp.so.1.0.1"
|
||||||
|
|
||||||
ln -s ${stdenv.cc.cc.lib}/lib/libstdc++.so.6 $out/lib/
|
ln -s ${stdenv.cc.cc.lib}/lib/libstdc++.so.6 $out/lib/
|
||||||
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# all binaries are already stripped
|
# all binaries are already stripped
|
||||||
|
Loading…
x
Reference in New Issue
Block a user