nixpkgs/pkgs/os-specific/linux/multipath-tools/default.nix
aszlig 05fed13de3
multipath_tools: Cleanup and update to v0.5.0
Previously, version 0.4.9 was a tarbomb and in version 0.5.0 this
fortunately isn't the case anymore so we don't need to set sourceRoot by
ourselves.

I've also moved the definition of makeFlagsArray to the attribute
makeFlags, because we can use $(var) to substitute shell variables
within make.

The references to /lib/udev/scsi_id no longer exist in version 0.5.0 and
it seems that libudev is used directly.

Nevertheless, there are still references to FHS paths such as /var/run,
/etc/multipath.conf and /etc/multipath but these are only relevant at
runtime and can be configured to point to a different path elsewhere.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2016-01-21 16:18:13 +01:00

37 lines
1,000 B
Nix

{ stdenv, fetchurl, lvm2, libaio, gzip, readline, udev }:
stdenv.mkDerivation rec {
name = "multipath-tools-0.5.0";
src = fetchurl {
url = "http://christophe.varoqui.free.fr/multipath-tools/${name}.tar.bz2";
sha256 = "1yd6l1l1c62xjr1xnij2x49kr416anbgfs4y06r86kp9hkmz2g7i";
};
postPatch = ''
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
'';
nativeBuildInputs = [ gzip ];
buildInputs = [ udev lvm2 libaio readline ];
makeFlags = [
"LIB=lib"
"prefix=$(out)"
"mandir=$(out)/share/man/man8"
"man5dir=$(out)/share/man/man5"
"man3dir=$(out)/share/man/man3"
"unitdir=$(out)/lib/systemd/system"
];
meta = {
description = "Tools for the Linux multipathing driver";
homepage = http://christophe.varoqui.free.fr/;
platforms = stdenv.lib.platforms.linux;
};
}