drbd: fix output file location (#23541)

drbd was installing files into $out/nix/store/... due to the usage of DESTDIR
(setting both DESTDIR + prefix to $out will cause files to be installed into $out/$out/...)
This commit is contained in:
Benno Fünfstück 2017-03-20 22:25:10 +01:00 committed by Vladimír Čunát
parent 7a130be3e4
commit 8c0074dd9f

View File

@ -19,17 +19,17 @@ stdenv.mkDerivation rec {
preConfigure =
''
export PATH=${systemd.udev.bin}/sbin:$PATH
substituteInPlace user/Makefile.in --replace /sbin/ $out/sbin/
substituteInPlace user/Makefile.in \
--replace /sbin '$(sbindir)'
substituteInPlace user/legacy/Makefile.in \
--replace /sbin/ $out/sbin/ \
--replace '$(DESTDIR)/lib/drbd' $out/lib/drbd
--replace '$(DESTDIR)/lib/drbd' '$(DESTDIR)$(LIBDIR)'
substituteInPlace user/drbdadm_usage_cnt.c --replace /lib/drbd $out/lib/drbd
substituteInPlace scripts/drbd.rules --replace /sbin/drbdadm $out/sbin/drbdadm
'';
makeFlags = "SHELL=${stdenv.shell}";
installFlags = "localstatedir=$(TMPDIR)/var sysconfdir=$(out)/etc INITDIR=$(out)/etc/init.d DESTDIR=$(out)";
installFlags = "localstatedir=$(TMPDIR)/var sysconfdir=$(out)/etc INITDIR=$(out)/etc/init.d";
meta = {
homepage = http://www.drbd.org/;