15 stdenv.mkDerivation rec {
16 pname = "doas-sudo-shim";
19 src = fetchFromGitHub {
21 repo = "doas-sudo-shim";
23 sha256 = "QYVqGxeWC7Tiz8aNY/LukwG4EW0km/RunGEfkzY/A38=";
26 nativeBuildInputs = [ asciidoctor makeBinaryWrapper ];
27 buildInputs = [ bash coreutils gawk glibc util-linux ];
32 installFlags = [ "DESTDIR=$(out)" "PREFIX=\"\"" ];
35 wrapProgram $out/bin/sudo \
36 --prefix PATH : ${lib.makeBinPath [ bash coreutils gawk glibc util-linux ]}
40 helpTest = runCommand "${pname}-helpTest" {} ''
41 ${doas-sudo-shim}/bin/sudo -h > $out
42 grep -q "Execute a command as another user using doas(1)" $out
47 description = "Shim for the sudo command that utilizes doas";
48 homepage = "https://github.com/jirutka/doas-sudo-shim";
49 license = licenses.isc;
51 maintainers = with maintainers; [ dsuetin ];
52 platforms = platforms.linux;