forked from mirrors/nixpkgs
78178d5854
This moves libsystemd.so and libudev.so into systemd.lib, and gets rid of libudev (which just contained a copy of libudev.so and the udev headers). It thus reduces the closure size of all packages that (indirectly) depend on libsystemd, of which there are quite a few (for instance, PulseAudio and dbus). For example, it reduces the closure of Blender from 430.8 to 400.8 MiB.
37 lines
1.2 KiB
Nix
37 lines
1.2 KiB
Nix
# FIXME: unify with pkgs/os-specific/linux/multipath-tools/default.nix.
|
|
|
|
{ stdenv, fetchurl, lvm2, libaio, gzip, readline, systemd }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
name = "multipath-tools-0.4.9";
|
|
|
|
src = fetchurl {
|
|
url = "http://christophe.varoqui.free.fr/multipath-tools/${name}.tar.bz2";
|
|
sha256 = "04n7kazp1zrlqfza32phmqla0xkcq4zwn176qff5ida4a60whi4d";
|
|
};
|
|
|
|
sourceRoot = ".";
|
|
|
|
buildInputs = [ lvm2 libaio readline gzip ];
|
|
|
|
preBuild =
|
|
''
|
|
makeFlagsArray=(GZIP="-9" prefix=$out mandir=$out/share/man/man8 man5dir=$out/share/man/man5 LIB=lib)
|
|
|
|
substituteInPlace multipath/Makefile --replace /etc $out/etc
|
|
substituteInPlace kpartx/Makefile --replace /etc $out/etc
|
|
|
|
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 ${systemd.lib}/lib/udev/scsi_id
|
|
substituteInPlace libmultipath/hwtable.c --replace /lib/udev/scsi_id ${systemd.lib}/lib/udev/scsi_id
|
|
'';
|
|
|
|
meta = {
|
|
description = "Tools for the Linux multipathing driver";
|
|
homepage = http://christophe.varoqui.free.fr/;
|
|
platforms = stdenv.lib.platforms.linux;
|
|
};
|
|
}
|