summary refs log tree commit diff
path: root/pkgs/tools/security/doas
diff options
context:
space:
mode:
authorCharles Strahan <charles@cstrahan.com>2017-11-07 15:43:06 -0500
committerCharles Strahan <charles@cstrahan.com>2017-11-07 16:34:50 -0500
commit4ca7f468634b3defd8ab6078673cb9421beee408 (patch)
treed64b401701fab7186f986b90abb87285ba82f662 /pkgs/tools/security/doas
parentcfafd6f5a819472911eaf2650b50a62f0c143e3e (diff)
downloadnixpkgs-4ca7f468634b3defd8ab6078673cb9421beee408.tar
nixpkgs-4ca7f468634b3defd8ab6078673cb9421beee408.tar.gz
nixpkgs-4ca7f468634b3defd8ab6078673cb9421beee408.tar.bz2
nixpkgs-4ca7f468634b3defd8ab6078673cb9421beee408.tar.lz
nixpkgs-4ca7f468634b3defd8ab6078673cb9421beee408.tar.xz
nixpkgs-4ca7f468634b3defd8ab6078673cb9421beee408.tar.zst
nixpkgs-4ca7f468634b3defd8ab6078673cb9421beee408.zip
doas: init at 6.0
Portable version of the OpenBSD `doas` command.
Diffstat (limited to 'pkgs/tools/security/doas')
-rw-r--r--pkgs/tools/security/doas/default.nix31
1 files changed, 31 insertions, 0 deletions
diff --git a/pkgs/tools/security/doas/default.nix b/pkgs/tools/security/doas/default.nix
new file mode 100644
index 00000000000..55335927b36
--- /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 ];
+  };
+}