mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-28 22:32:58 +03:00
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
|
||||
|
||||
@ -18,10 +18,9 @@ in stdenv.mkDerivation rec {
|
||||
buildInputs = [
|
||||
cups
|
||||
libusb
|
||||
libxml2
|
||||
];
|
||||
|
||||
phases = [ "unpackPhase" "installPhase" "fixupPhase" ];
|
||||
|
||||
installPhase = ''
|
||||
|
||||
mkdir -p $out/bin
|
||||
@ -69,16 +68,15 @@ in stdenv.mkDerivation rec {
|
||||
'';
|
||||
|
||||
preFixup = ''
|
||||
for bin in "$out/bin/"*; do
|
||||
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$bin"
|
||||
patchelf --set-rpath "$out/lib:${stdenv.lib.getLib cups}/lib" "$bin"
|
||||
done
|
||||
|
||||
for bin in $out/bin/*; do
|
||||
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$bin"
|
||||
patchelf --set-rpath "$out/lib:${stdenv.lib.getLib cups}/lib" "$bin"
|
||||
done
|
||||
|
||||
patchelf --set-rpath "$out/lib:${stdenv.lib.getLib cups}/lib" "$out/lib/libscmssc.so"
|
||||
|
||||
ln -s ${stdenv.cc.cc.lib}/lib/libstdc++.so.6 $out/lib/
|
||||
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/
|
||||
'';
|
||||
|
||||
# all binaries are already stripped
|
||||
|
Loading…
Reference in New Issue
Block a user