summary refs log tree commit diff
path: root/pkgs/os-specific/linux/pam_tmpdir
diff options
context:
space:
mode:
authorPeter Hoeg <peter@hoeg.com>2022-07-01 14:19:30 +0800
committerPeter Hoeg <peter@hoeg.com>2022-07-03 22:00:30 +0800
commitc70172f9d0f2f74da000ce08ce4484a079b05860 (patch)
tree84f6164b9a2ba6d399e047797e62afa7f615e820 /pkgs/os-specific/linux/pam_tmpdir
parent990f197be103c602f32948e1a118a0afc41e16d2 (diff)
downloadnixpkgs-c70172f9d0f2f74da000ce08ce4484a079b05860.tar
nixpkgs-c70172f9d0f2f74da000ce08ce4484a079b05860.tar.gz
nixpkgs-c70172f9d0f2f74da000ce08ce4484a079b05860.tar.bz2
nixpkgs-c70172f9d0f2f74da000ce08ce4484a079b05860.tar.lz
nixpkgs-c70172f9d0f2f74da000ce08ce4484a079b05860.tar.xz
nixpkgs-c70172f9d0f2f74da000ce08ce4484a079b05860.tar.zst
nixpkgs-c70172f9d0f2f74da000ce08ce4484a079b05860.zip
pam_tmpdir: init at 0.09
Diffstat (limited to 'pkgs/os-specific/linux/pam_tmpdir')
-rw-r--r--pkgs/os-specific/linux/pam_tmpdir/default.nix36
1 files changed, 36 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/pam_tmpdir/default.nix b/pkgs/os-specific/linux/pam_tmpdir/default.nix
new file mode 100644
index 00000000000..859ebedc334
--- /dev/null
+++ b/pkgs/os-specific/linux/pam_tmpdir/default.nix
@@ -0,0 +1,36 @@
+{ lib, stdenv, fetchurl, autoreconfHook, pam }:
+
+stdenv.mkDerivation rec {
+  pname = "pam_tmpdir";
+  version = "0.09";
+
+  src = fetchurl {
+    url = "http://deb.debian.org/debian/pool/main/p/pam-tmpdir/pam-tmpdir_${version}.tar.gz";
+    hash = "sha256-MXa1CY6alD83E/Q+MJmsv8NaImWd0pPJKZd/7nbe4J8=";
+  };
+
+  postPatch = ''
+    substituteInPlace pam_tmpdir.c \
+      --replace /sbin/pam-tmpdir-helper $out/sbin/pam-tmpdir-helper
+
+    # chmod/chown fails on files in /nix/store
+    sed -i -E -e '/^\s*(chmod|chown)/d' Makefile.{am,in}
+
+    # the symlinks in m4 assume FHS
+    rm -rf m4
+  '';
+
+  nativeBuildInputs = [ autoreconfHook ];
+
+  buildInputs = [ pam ];
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    homepage = "https://tracker.debian.org/pkg/pam-tmpdir";
+    description = "PAM module for creating safe per-user temporary directories";
+    license = licenses.gpl2Only;
+    maintainers = with maintainers; [ peterhoeg ];
+    platforms = platforms.linux;
+  };
+}