about summary refs log tree commit diff
path: root/pkgs/os-specific
diff options
context:
space:
mode:
authorAudrey Dutcher <audrey@rhelmot.io>2024-06-06 22:18:27 -0700
committerAudrey Dutcher <audrey@rhelmot.io>2024-07-02 20:18:51 -0700
commitb85f78bfa807731ba2533fa555742e7556bb66c2 (patch)
treecaf782d03cd56d4544c033844ae4e90fbab0cb19 /pkgs/os-specific
parentd58f00efe2f09a98281044ae9091a3190dd636c1 (diff)
freebsd.login: init
Diffstat (limited to 'pkgs/os-specific')
-rw-r--r--pkgs/os-specific/bsd/freebsd/pkgs/login.nix28
1 files changed, 28 insertions, 0 deletions
diff --git a/pkgs/os-specific/bsd/freebsd/pkgs/login.nix b/pkgs/os-specific/bsd/freebsd/pkgs/login.nix
new file mode 100644
index 0000000000000..8952068b8e9c1
--- /dev/null
+++ b/pkgs/os-specific/bsd/freebsd/pkgs/login.nix
@@ -0,0 +1,28 @@
+{
+  mkDerivation,
+  libutil,
+  libpam,
+  libbsm,
+  cap_mkdb,
+}:
+mkDerivation {
+  path = "usr.bin/login";
+  buildInputs = [
+    libutil
+    libpam
+    libbsm
+  ];
+  extraNativeBuildInputs = [ cap_mkdb ];
+
+  postPatch = ''
+    sed -E -i -e "s|..DESTDIR./etc|\''${CONFDIR}|g" $BSDSRCDIR/usr.bin/login/Makefile
+  '';
+
+  MK_TESTS = "no";
+  MK_SETUID_LOGIN = "no";
+
+  postInstall = ''
+    mkdir -p $out/etc
+    make $makeFlags installconfig
+  '';
+}