2012-01-08 17:01:12 +01:00
|
|
|
{ stdenv, fetchurl, cryptsetup, dbus, dbus_glib, intltool, ntfs3g, utillinux
|
2010-01-03 12:10:22 +01:00
|
|
|
, mediaDir ? "/media/"
|
|
|
|
, lockDir ? "/var/lock/pmount"
|
|
|
|
, whiteList ? "/etc/pmount.allow"
|
|
|
|
}:
|
|
|
|
|
|
|
|
# constraint mention in the configure.ac
|
|
|
|
assert stdenv.lib.hasSuffix "/" mediaDir;
|
|
|
|
|
2011-01-31 19:58:49 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2013-12-24 09:04:13 +01:00
|
|
|
name = "pmount-${version}";
|
|
|
|
version = "0.9.23";
|
2010-01-03 12:10:22 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2013-12-24 09:04:13 +01:00
|
|
|
url = "mirror://debian/pool/main/p/pmount/pmount_${version}.orig.tar.bz2";
|
2011-01-31 19:58:49 +01:00
|
|
|
sha256 = "db38fc290b710e8e9e9d442da2fb627d41e13b3ee80326c15cc2595ba00ea036";
|
2010-01-03 12:10:22 +01:00
|
|
|
};
|
|
|
|
|
2012-01-08 17:01:12 +01:00
|
|
|
buildInputs = [ intltool utillinux ];
|
2010-01-03 12:10:22 +01:00
|
|
|
|
|
|
|
configureFlags = ""
|
|
|
|
+ " --with-media-dir=${mediaDir}"
|
|
|
|
+ " --with-lock-dir=${lockDir}"
|
|
|
|
+ " --with-whitelist=${whiteList}"
|
2011-12-13 13:57:32 +01:00
|
|
|
+ " --with-mount-prog=${utillinux}/bin/mount"
|
|
|
|
+ " --with-umount-prog=${utillinux}/bin/umount"
|
2012-01-07 20:16:45 +01:00
|
|
|
+ " --with-mount-ntfs3g=${ntfs3g}/sbin/mount.ntfs-3g";
|
2010-01-03 12:10:22 +01:00
|
|
|
|
|
|
|
postConfigure = ''
|
|
|
|
# etc/Mafile.am is hardcoded and it does not respect the --prefix option.
|
|
|
|
substituteInPlace ./etc/Makefile --replace DESTDIR prefix
|
|
|
|
# Do not change ownership & Do not add the set user ID bit
|
|
|
|
substituteInPlace ./src/Makefile --replace '-o root -g root -m 4755 ' '-m 755 '
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = http://pmount.alioth.debian.org/;
|
|
|
|
description = "Mount removable devices as normal user";
|
|
|
|
license = "GPLv2";
|
2013-12-24 09:04:13 +01:00
|
|
|
platforms = stdenv.lib.platforms.linux;
|
2010-01-03 12:10:22 +01:00
|
|
|
};
|
|
|
|
}
|