fix ${udev} references (and a few others)
This commit is contained in:
parent
647f0ab366
commit
b7c3c25218
|
@ -55,13 +55,13 @@ let
|
|||
--replace \"/bin/mount \"${pkgs.utillinux}/bin/mount
|
||||
done
|
||||
|
||||
echo -n "Checking that all programs called by relative paths in udev rules exist in ${udev}/lib/udev... "
|
||||
echo -n "Checking that all programs called by relative paths in udev rules exist in ${pkgs.udev.out}/lib/udev... "
|
||||
import_progs=$(grep 'IMPORT{program}="[^/$]' $out/* |
|
||||
sed -e 's/.*IMPORT{program}="\([^ "]*\)[ "].*/\1/' | uniq)
|
||||
run_progs=$(grep -v '^[[:space:]]*#' $out/* | grep 'RUN+="[^/$]' |
|
||||
sed -e 's/.*RUN+="\([^ "]*\)[ "].*/\1/' | uniq)
|
||||
for i in $import_progs $run_progs; do
|
||||
if [[ ! -x ${pkgs.udev}/lib/udev/$i && ! $i =~ socket:.* ]]; then
|
||||
if [[ ! -x ${pkgs.udev.out}/lib/udev/$i && ! $i =~ socket:.* ]]; then
|
||||
echo "FAIL"
|
||||
echo "$i is called in udev rules but not installed by udev"
|
||||
exit 1
|
||||
|
|
|
@ -60,9 +60,9 @@ let
|
|||
copy_bin_and_libs ${pkgs.mdadm}/sbin/mdadm
|
||||
|
||||
# Copy udev.
|
||||
copy_bin_and_libs ${udev}/lib/systemd/systemd-udevd
|
||||
copy_bin_and_libs ${udev}/bin/udevadm
|
||||
for BIN in ${udev}/lib/udev/*_id; do
|
||||
copy_bin_and_libs ${udev.out}/lib/systemd/systemd-udevd
|
||||
copy_bin_and_libs ${udev.out}/bin/udevadm
|
||||
for BIN in ${udev.libudev}/lib/udev/*_id; do
|
||||
copy_bin_and_libs $BIN
|
||||
done
|
||||
|
||||
|
@ -73,7 +73,7 @@ let
|
|||
${config.boot.initrd.extraUtilsCommands}
|
||||
|
||||
# Copy ld manually since it isn't detected correctly
|
||||
cp -pv ${pkgs.glibc}/lib/ld*.so.? $out/lib
|
||||
cp -pv ${pkgs.glibc.out}/lib/ld*.so.? $out/lib
|
||||
|
||||
# Copy all of the needed libraries for the binaries
|
||||
for BIN in $(find $out/{bin,sbin} -type f); do
|
||||
|
@ -140,9 +140,9 @@ let
|
|||
|
||||
echo 'ENV{LD_LIBRARY_PATH}="${extraUtils}/lib"' > $out/00-env.rules
|
||||
|
||||
cp -v ${udev}/lib/udev/rules.d/60-cdrom_id.rules $out/
|
||||
cp -v ${udev}/lib/udev/rules.d/60-persistent-storage.rules $out/
|
||||
cp -v ${udev}/lib/udev/rules.d/80-drivers.rules $out/
|
||||
cp -v ${udev.out}/lib/udev/rules.d/60-cdrom_id.rules $out/
|
||||
cp -v ${udev.out}/lib/udev/rules.d/60-persistent-storage.rules $out/
|
||||
cp -v ${udev.out}/lib/udev/rules.d/80-drivers.rules $out/
|
||||
cp -v ${pkgs.lvm2}/lib/udev/rules.d/*.rules $out/
|
||||
${config.boot.initrd.extraUdevRulesCommands}
|
||||
|
||||
|
|
|
@ -79,8 +79,8 @@ stdenv.mkDerivation {
|
|||
ln -s ${nss}/lib/libsmime3.so $libdir/libsmime3.so.1d
|
||||
|
||||
${if stdenv.system == "x86_64-linux" then ''
|
||||
ln -s ${openssl}/lib/libssl.so $libdir/libssl.so.1.0.0
|
||||
ln -s ${openssl}/lib/libcrypto.so $libdir/libcrypto.so.1.0.0
|
||||
ln -s ${openssl.out}/lib/libssl.so $libdir/libssl.so.1.0.0
|
||||
ln -s ${openssl.out}/lib/libcrypto.so $libdir/libcrypto.so.1.0.0
|
||||
ln -s ${nspr}/lib/libnspr4.so $libdir/libnspr4.so
|
||||
ln -s ${nspr}/lib/libplc4.so $libdir/libplc4.so
|
||||
'' else ''
|
||||
|
@ -91,7 +91,7 @@ stdenv.mkDerivation {
|
|||
''}
|
||||
|
||||
# Work around Spotify trying to open libudev.so.1 (which we don't have)
|
||||
ln -s ${udev}/lib/libudev.so.1 $libdir/libudev.so.1
|
||||
ln -s ${udev.libudev}/lib/libudev.so.1 $libdir/libudev.so.1
|
||||
|
||||
mkdir -p $out/bin
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ stdenv.mkDerivation rec {
|
|||
--set-rpath ${libPath}:${stdenv.cc.cc}/lib${stdenv.lib.optionalString stdenv.is64bit "64"} \
|
||||
$out/LightTable/ltbin
|
||||
|
||||
ln -sf ${udev}/lib/libudev.so.1 $out/LightTable/libudev.so.0
|
||||
ln -sf ${udev.libudev}/lib/libudev.so.1 $out/LightTable/libudev.so.0
|
||||
|
||||
makeWrapper $out/LightTable/ltbin $out/bin/lighttable \
|
||||
--prefix "LD_LIBRARY_PATH" : $out/LightTable
|
||||
|
|
|
@ -144,7 +144,7 @@ let
|
|||
s|= [^;]*|= base::FilePath().AppendASCII("${libexif}/lib/libexif.so")|
|
||||
}' chrome/utility/media_galleries/image_metadata_extractor.cc
|
||||
|
||||
sed -i -e '/lib_loader.*Load/s!"\(libudev\.so\)!"${udev}/lib/\1!' \
|
||||
sed -i -e '/lib_loader.*Load/s!"\(libudev\.so\)!"${udev.libudev}/lib/\1!' \
|
||||
device/udev_linux/udev?_loader.cc
|
||||
|
||||
sed -i -e '/libpci_loader.*Load/s!"\(libpci\.so\)!"${pciutils}/lib/\1!' \
|
||||
|
|
|
@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
|
|||
];
|
||||
|
||||
preConfigure = ''
|
||||
PATH=${iproute}/sbin:${iptables}/sbin:${ebtables}/sbin:${lvm2}/sbin:${udev}/sbin:${dnsmasq}/bin:$PATH
|
||||
PATH=${iproute}/sbin:${iptables}/sbin:${ebtables}/sbin:${lvm2}/sbin:${udev.out}/sbin:${dnsmasq}/bin:$PATH
|
||||
patchShebangs . # fixes /usr/bin/python references
|
||||
'';
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ in stdenv.mkDerivation rec {
|
|||
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out/share/node-webkit/nw
|
||||
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out/share/node-webkit/nwsnapshot
|
||||
|
||||
ln -s ${udev}/lib/libudev.so $out/share/node-webkit/libudev.so.0
|
||||
ln -s ${udev.libudev}/lib/libudev.so $out/share/node-webkit/libudev.so.0
|
||||
|
||||
patchelf --set-rpath "${nwEnv}/lib:${nwEnv}/lib64:$out/share/node-webkit" $out/share/node-webkit/nw
|
||||
patchelf --set-rpath "${nwEnv}/lib:${nwEnv}/lib64:$out/share/node-webkit" $out/share/node-webkit/nwsnapshot
|
||||
|
|
|
@ -33,7 +33,7 @@ in stdenv.mkDerivation rec {
|
|||
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out/share/node-webkit/nw
|
||||
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out/share/node-webkit/nwsnapshot
|
||||
|
||||
ln -s ${udev}/lib/libudev.so $out/share/node-webkit/libudev.so.0
|
||||
ln -s ${udev.libudev}/lib/libudev.so $out/share/node-webkit/libudev.so.0
|
||||
|
||||
patchelf --set-rpath "${nwEnv}/lib:${nwEnv}/lib64:$out/share/node-webkit" $out/share/node-webkit/nw
|
||||
patchelf --set-rpath "${nwEnv}/lib:${nwEnv}/lib64:$out/share/node-webkit" $out/share/node-webkit/nwsnapshot
|
||||
|
|
|
@ -36,7 +36,7 @@ rec {
|
|||
''PIXMAPS=$out/share/pixmaps''
|
||||
''UDEVBIN=$out/bin''
|
||||
''UDEVDIR=$out/etc/udev/rules.d''
|
||||
''UDEVD=${udev}/sbin/udevd''
|
||||
''UDEVD=${udev.out}/sbin/udevd''
|
||||
''LIBUDEVDIR=$out/lib/udev/rules.d''
|
||||
''USBDIR=$out/etc/hotplug/usb''
|
||||
''FOODB=$out/share/foomatic/db/source''
|
||||
|
|
|
@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
|
|||
|
||||
preConfigure =
|
||||
''
|
||||
export PATH=${udev}/sbin:$PATH
|
||||
export PATH=${udev.out}/sbin:$PATH
|
||||
substituteInPlace user/Makefile.in --replace /sbin/ $out/sbin/
|
||||
substituteInPlace user/legacy/Makefile.in \
|
||||
--replace /sbin/ $out/sbin/ \
|
||||
|
|
|
@ -25,7 +25,7 @@ stdenv.mkDerivation {
|
|||
--replace /usr/bin/tr ${coreutils}/bin/tr
|
||||
substituteInPlace scripts/lvm2_activation_generator_systemd_red_hat.c \
|
||||
--replace /usr/sbin/lvm $out/sbin/lvm \
|
||||
--replace /usr/bin/udevadm ${udev}/bin/udevadm
|
||||
--replace /usr/bin/udevadm ${udev.out}/bin/udevadm
|
||||
|
||||
sed -i /DEFAULT_SYS_DIR/d Makefile.in
|
||||
sed -i /DEFAULT_PROFILE_DIR/d conf/Makefile.in
|
||||
|
|
|
@ -22,8 +22,8 @@ stdenv.mkDerivation rec {
|
|||
substituteInPlace kpartx/kpartx.rules --replace /sbin/kpartx $out/sbin/kpartx
|
||||
substituteInPlace kpartx/kpartx_id --replace /sbin/dmsetup ${lvm2}/sbin/dmsetup
|
||||
|
||||
substituteInPlace libmultipath/defaults.h --replace /lib/udev/scsi_id ${udev}/lib/udev/scsi_id
|
||||
substituteInPlace libmultipath/hwtable.c --replace /lib/udev/scsi_id ${udev}/lib/udev/scsi_id
|
||||
substituteInPlace libmultipath/defaults.h --replace /lib/udev/scsi_id ${udev.libudev}/lib/udev/scsi_id
|
||||
substituteInPlace libmultipath/hwtable.c --replace /lib/udev/scsi_id ${udev.libudev}/lib/udev/scsi_id
|
||||
'';
|
||||
|
||||
meta = {
|
||||
|
|
|
@ -21,15 +21,15 @@ buildPythonPackage rec {
|
|||
sed -i -e 's|"multipath"|"${multipath_tools}/sbin/multipath"|' \
|
||||
blivet/devicelibs/mpath.py blivet/devices.py
|
||||
sed -i -e '/"wipefs"/ {
|
||||
s|wipefs|${utillinux}/sbin/wipefs|
|
||||
s|wipefs|${utillinux.bin}/sbin/wipefs|
|
||||
s/-f/--force/
|
||||
}' blivet/formats/__init__.py
|
||||
sed -i -e 's|"lsof"|"${lsof}/bin/lsof"|' blivet/formats/fs.py
|
||||
sed -i -r -e 's|"(u?mount)"|"${utillinux}/bin/\1"|' blivet/util.py
|
||||
sed -i -r -e 's|"(u?mount)"|"${utillinux.bin}/bin/\1"|' blivet/util.py
|
||||
sed -i '/pvscan/s/, *"--cache"//' blivet/devicelibs/lvm.py
|
||||
'' + (if useNixUdev then ''
|
||||
sed -i -e '/find_library/,/find_library/ {
|
||||
c libudev = "${udev}/lib/libudev.so.1"
|
||||
c libudev = "${udev.libudev}/lib/libudev.so.1"
|
||||
}' blivet/pyudev.py
|
||||
'' else ''
|
||||
sed -i \
|
||||
|
|
|
@ -23,7 +23,7 @@ stdenv.mkDerivation {
|
|||
--replace /usr/bin/tr ${coreutils}/bin/tr
|
||||
substituteInPlace scripts/lvm2_activation_generator_systemd_red_hat.c \
|
||||
--replace /usr/sbin/lvm $out/sbin/lvm \
|
||||
--replace /usr/bin/udevadm ${udev}/bin/udevadm
|
||||
--replace /usr/bin/udevadm ${udev.out}/bin/udevadm
|
||||
|
||||
sed -i /DEFAULT_SYS_DIR/d Makefile.in
|
||||
sed -i /DEFAULT_PROFILE_DIR/d conf/Makefile.in
|
||||
|
@ -42,7 +42,7 @@ stdenv.mkDerivation {
|
|||
postInstall =
|
||||
''
|
||||
substituteInPlace $out/lib/udev/rules.d/13-dm-disk.rules \
|
||||
--replace $out/sbin/blkid ${utillinux}/sbin/blkid
|
||||
--replace $out/sbin/blkid ${utillinux.bin}/sbin/blkid
|
||||
|
||||
# Systemd stuff
|
||||
mkdir -p $out/etc/systemd/system $out/lib/systemd/system-generators
|
||||
|
|
|
@ -22,8 +22,8 @@ stdenv.mkDerivation rec {
|
|||
substituteInPlace kpartx/kpartx.rules --replace /sbin/kpartx $out/sbin/kpartx
|
||||
substituteInPlace kpartx/kpartx_id --replace /sbin/dmsetup ${lvm2}/sbin/dmsetup
|
||||
|
||||
substituteInPlace libmultipath/defaults.h --replace /lib/udev/scsi_id ${udev}/lib/udev/scsi_id
|
||||
substituteInPlace libmultipath/hwtable.c --replace /lib/udev/scsi_id ${udev}/lib/udev/scsi_id
|
||||
substituteInPlace libmultipath/defaults.h --replace /lib/udev/scsi_id ${udev.libudev}/lib/udev/scsi_id
|
||||
substituteInPlace libmultipath/hwtable.c --replace /lib/udev/scsi_id ${udev.libudev}/lib/udev/scsi_id
|
||||
'';
|
||||
|
||||
meta = {
|
||||
|
|
|
@ -9746,7 +9746,7 @@ let
|
|||
|
||||
postPatch = ''
|
||||
sed -i -e '/udev_library_name/,/^ *libudev/ {
|
||||
s|CDLL([^,]*|CDLL("${pkgs.udev}/lib/libudev.so.1"|p; d
|
||||
s|CDLL([^,]*|CDLL("${pkgs.udev.libudev}/lib/libudev.so.1"|p; d
|
||||
}' pyudev/_libudev.py
|
||||
'';
|
||||
|
||||
|
|
Loading…
Reference in a new issue