1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/pkgs/os-specific/linux/multipath-tools/default.nix
Daniel Schaefer 27aa4bf49b multipath-tools: Fix prefix
udev rules and manpages in section 8 were installed into $out/usr

Results in the following derivation output diff:

 lib/systemd/system
 lib/systemd/system/multipathd.service
 lib/systemd/system/multipathd.socket
+lib/udev
+lib/udev/kpartx_id
+lib/udev/rules.d
+lib/udev/rules.d/11-dm-mpath.rules
+lib/udev/rules.d/11-dm-parts.rules
+lib/udev/rules.d/56-multipath.rules
+lib/udev/rules.d/66-kpartx.rules
+lib/udev/rules.d/68-del-part-nodes.rules
 sbin
 share
 share/man
@@ -79,25 +87,14 @@
 share/man/man3/mpath_persistent_reserve_out.3.gz
 share/man/man5
 share/man/man5/multipath.conf.5.gz
+share/man/man8
+share/man/man8/kpartx.8.gz
+share/man/man8/mpathpersist.8.gz
+share/man/man8/multipath.8.gz
+share/man/man8/multipathd.8.gz
 usr
 usr/include
 usr/include/libdmmp
 usr/include/libdmmp/libdmmp.h
 usr/include/mpath_cmd.h
 usr/include/mpath_persist.h
-usr/lib
-usr/lib/udev
-usr/lib/udev/kpartx_id
-usr/lib/udev/rules.d
-usr/lib/udev/rules.d/11-dm-mpath.rules
-usr/lib/udev/rules.d/11-dm-parts.rules
-usr/lib/udev/rules.d/56-multipath.rules
-usr/lib/udev/rules.d/66-kpartx.rules
-usr/lib/udev/rules.d/68-del-part-nodes.rules
-usr/share
-usr/share/man
-usr/share/man/man8
-usr/share/man/man8/kpartx.8.gz
-usr/share/man/man8/mpathpersist.8.gz
-usr/share/man/man8/multipath.8.gz
-usr/share/man/man8/multipathd.8.gz
2019-11-06 19:12:52 +01:00

43 lines
1.3 KiB
Nix

{ stdenv, fetchurl, pkgconfig, perl, lvm2, libaio, gzip, readline, systemd, liburcu, json_c }:
stdenv.mkDerivation rec {
pname = "multipath-tools";
version = "0.8.3";
src = fetchurl {
name = "${pname}-${version}.tar.gz";
url = "https://git.opensvc.com/gitweb.cgi?p=multipath-tools/.git;a=snapshot;h=refs/tags/${version};sf=tgz";
sha256 = "1mgjylklh1cx8px8ffgl12kyc0ln3445vbabd2sy8chq31rpiiq8";
};
postPatch = ''
substituteInPlace libmultipath/Makefile --replace /usr/include/libdevmapper.h ${lvm2}/include/libdevmapper.h
sed -i -re '
s,^( *#define +DEFAULT_MULTIPATHDIR\>).*,\1 "'"$out/lib/multipath"'",
' libmultipath/defaults.h
sed -i -e 's,\$(DESTDIR)/\(usr/\)\?,$(prefix)/,g' \
kpartx/Makefile libmpathpersist/Makefile
sed -i -e "s,GZIP = .*, GZIP = gzip -9n -c," \
Makefile.inc
'';
nativeBuildInputs = [ gzip pkgconfig perl ];
buildInputs = [ systemd lvm2 libaio readline liburcu json_c ];
makeFlags = [
"LIB=lib"
"prefix=$(out)"
"man8dir=$(out)/share/man/man8"
"man5dir=$(out)/share/man/man5"
"man3dir=$(out)/share/man/man3"
"SYSTEMDPATH=lib"
];
meta = with stdenv.lib; {
description = "Tools for the Linux multipathing driver";
homepage = http://christophe.varoqui.free.fr/;
license = licenses.gpl2;
platforms = platforms.linux;
};
}