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 = preConfigure =
'' ''
export PATH=${systemd.udev.bin}/sbin:$PATH 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 \ substituteInPlace user/legacy/Makefile.in \
--replace /sbin/ $out/sbin/ \ --replace '$(DESTDIR)/lib/drbd' '$(DESTDIR)$(LIBDIR)'
--replace '$(DESTDIR)/lib/drbd' $out/lib/drbd
substituteInPlace user/drbdadm_usage_cnt.c --replace /lib/drbd $out/lib/drbd substituteInPlace user/drbdadm_usage_cnt.c --replace /lib/drbd $out/lib/drbd
substituteInPlace scripts/drbd.rules --replace /sbin/drbdadm $out/sbin/drbdadm substituteInPlace scripts/drbd.rules --replace /sbin/drbdadm $out/sbin/drbdadm
''; '';
makeFlags = "SHELL=${stdenv.shell}"; 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 = { meta = {
homepage = http://www.drbd.org/; homepage = http://www.drbd.org/;