nixpkgs/pkgs/by-name/pa/pam_tmpdir/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

38 lines
1018 B
Nix

{ 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";
mainProgram = "pam-tmpdir-helper";
license = licenses.gpl2Only;
maintainers = with maintainers; [ peterhoeg ];
platforms = platforms.linux;
};
}