about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorRenaud <c0bw3b@users.noreply.github.com>2017-11-10 20:46:25 +0100
committerGitHub <noreply@github.com>2017-11-10 20:46:25 +0100
commitf17eec9de01c2bfd5f4fd4c0b1db0819706e96b9 (patch)
tree6ec250f3cb73fdf50d5c7c72e8eb8b6881ec8f2b /pkgs
parent662181e6137ed23d52022f21821d17b83d5647aa (diff)
parent4ca7f468634b3defd8ab6078673cb9421beee408 (diff)
Merge pull request #31374 from cstrahan/doas
doas: init at 6.0
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/tools/security/doas/default.nix31
-rw-r--r--pkgs/top-level/all-packages.nix2
2 files changed, 33 insertions, 0 deletions
diff --git a/pkgs/tools/security/doas/default.nix b/pkgs/tools/security/doas/default.nix
new file mode 100644
index 0000000000000..55335927b36ad
--- /dev/null
+++ b/pkgs/tools/security/doas/default.nix
@@ -0,0 +1,31 @@
+{ stdenv, lib, fetchFromGitHub, bison, pam }:
+
+stdenv.mkDerivation rec {
+  name = "doas-${version}";
+
+  version = "6.0";
+
+  src = fetchFromGitHub {
+    owner = "Duncaen";
+    repo = "OpenDoas";
+    rev = "v${version}";
+    sha256 = "1j50l3jvbgvg8vmp1nx6vrjxkbj5bvfh3m01bymzfn25lkwwhz1x";
+  };
+
+  # otherwise confuses ./configure
+  dontDisableStatic = true;
+
+  postPatch = ''
+    sed -i '/\(chown\|chmod\)/d' bsd.prog.mk
+  '';
+
+  buildInputs = [ bison pam ];
+
+  meta = with lib; {
+    description = "Executes the given command as another user";
+    homepage = "https://github.com/Duncaen/OpenDoas";
+    license = licenses.isc;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ cstrahan ];
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 4b71653f25521..83ef2978e8ce4 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -1765,6 +1765,8 @@ with pkgs;
     inherit (perlPackages) PerlMagick;
   };
 
+  doas = callPackage ../tools/security/doas { };
+
   docbook2x = callPackage ../tools/typesetting/docbook2x {
     inherit (perlPackages) XMLSAX XMLParser XMLNamespaceSupport;
   };