@@ -1,4 +1,4 @@
1−{ stdenv, fetchurl, autoconf, automake, pkgconfig, libtool, pam, libHX, utillinux, libxml2, pcre, perl, openssl, cryptsetup }:
1+{ stdenv, fetchurl, autoconf, automake, pkgconfig, libtool, pam, libHX, libxml2, pcre, perl, openssl, cryptsetup, utillinux }:
22
33stdenv.mkDerivation rec {
44 name = "pam_mount-2.15";
@@ -10,12 +10,18 @@ stdenv.mkDerivation rec {
1010
1111 buildInputs = [ autoconf automake pkgconfig libtool pam libHX utillinux libxml2 pcre perl openssl cryptsetup ];
1212
13− preConfigure = "sh autogen.sh --prefix=$out";
13+ patches = [ ./insert_utillinux_path_hooks.patch ];
14+
15+ preConfigure = ''
16+ substituteInPlace src/mtcrypt.c --replace @@NIX_UTILLINUX@@ ${utillinux}/bin
17+ sh autogen.sh --prefix=$out
18+ '';
1419
1520 makeFlags = "DESTDIR=$(out)";
1621
1722 # Probably a hack, but using DESTDIR and PREFIX makes everything work!
1823 postInstall = ''
24+ mkdir -p $out
1925 cp -r $out/$out/* $out
2026 rm -r $out/nix
2127 '';