about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/security/doas/default.nix
blob: 55335927b36ad767d819155e36b180c74e4aab52 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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 ];
  };
}