summary refs log tree commit diff
path: root/pkgs/os-specific/linux/pmount
diff options
context:
space:
mode:
authorNicolas Pierron <nicolas.b.pierron@gmail.com>2010-01-03 11:10:22 +0000
committerNicolas Pierron <nicolas.b.pierron@gmail.com>2010-01-03 11:10:22 +0000
commit0232e1222f7045a5ac534fad8559617d754a9da0 (patch)
treea71e48052160188a9ad669bc5289320b43f28494 /pkgs/os-specific/linux/pmount
parent9d62d5a35c8c1c2178e8f7c64b7575cd177c447d (diff)
downloadnixpkgs-0232e1222f7045a5ac534fad8559617d754a9da0.tar
nixpkgs-0232e1222f7045a5ac534fad8559617d754a9da0.tar.gz
nixpkgs-0232e1222f7045a5ac534fad8559617d754a9da0.tar.bz2
nixpkgs-0232e1222f7045a5ac534fad8559617d754a9da0.tar.lz
nixpkgs-0232e1222f7045a5ac534fad8559617d754a9da0.tar.xz
nixpkgs-0232e1222f7045a5ac534fad8559617d754a9da0.tar.zst
nixpkgs-0232e1222f7045a5ac534fad8559617d754a9da0.zip
* Add pmount package.
  Mount removable devices as normal user

svn path=/nixpkgs/trunk/; revision=19182
Diffstat (limited to 'pkgs/os-specific/linux/pmount')
-rw-r--r--pkgs/os-specific/linux/pmount/default.nix42
1 files changed, 42 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/pmount/default.nix b/pkgs/os-specific/linux/pmount/default.nix
new file mode 100644
index 00000000000..feea32b33bb
--- /dev/null
+++ b/pkgs/os-specific/linux/pmount/default.nix
@@ -0,0 +1,42 @@
+{stdenv, fetchurl, cryptsetup, dbus, dbus_glib, hal, intltool, ntfs3g, utillinuxng
+, mediaDir ? "/media/"
+, lockDir ? "/var/lock/pmount"
+, whiteList ? "/etc/pmount.allow"
+}:
+
+# constraint mention in the configure.ac
+assert stdenv.lib.hasSuffix "/" mediaDir;
+
+stdenv.mkDerivation {
+  name = "pmount-0.9.20";
+
+  src = fetchurl {
+    url = https://alioth.debian.org/frs/download.php/3127/pmount-0.9.20.tar.gz;
+    sha256 = "0574d2e805610c179904f5c676b2b93e088906b91bcb76980daa4a8da1d23e8c";
+  };
+
+  buildInputs = [ hal intltool utillinuxng ];
+
+  configureFlags = ""
+  + " --with-media-dir=${mediaDir}"
+  + " --with-lock-dir=${lockDir}"
+  + " --with-whitelist=${whiteList}"
+  + " --with-mount-prog=${utillinuxng}/bin/mount"
+  + " --with-umount-prog=${utillinuxng}/bin/umount"
+  + " --with-cryptsetup=${cryptsetup}/sbin/cryptsetup"
+  + " --with-mount-ntfs3g=${ntfs3g}/sbin/mount.ntfs-3g"
+  + " --enable-hal";
+
+  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";
+  };
+}