nixpkgs/pkgs/tools/security/isolate/default.nix
stuebinm ff1a94e523 treewide: add meta.mainProgram to packages with a single binary
The nixpkgs-unstable channel's programs.sqlite was used to identify
packages producing exactly one binary, and these automatically added
to their package definitions wherever possible.
2024-03-19 03:14:51 +01:00

51 lines
875 B
Nix

{ lib
, stdenv
, fetchFromGitHub
, asciidoc
, libcap
, installShellFiles
}:
stdenv.mkDerivation rec {
pname = "isolate";
version = "2.0";
src = fetchFromGitHub {
owner = "ioi";
repo = "isolate";
rev = "v${version}";
hash = "sha256-kKXkXPVB9ojyIERvEdkHkXC//Agin8FPcpTBmTxh/ZE=";
};
nativeBuildInputs = [
asciidoc
installShellFiles
];
buildInputs = [
libcap.dev
];
buildFlags = [
"isolate"
"isolate.1"
];
installPhase = ''
runHook preInstall
install -Dm755 ./isolate $out/bin/isolate
installManPage isolate.1
runHook postInstall
'';
meta = {
description = "Sandbox for securely executing untrusted programs";
mainProgram = "isolate";
homepage = "https://github.com/ioi/isolate";
license = lib.licenses.gpl2Plus;
maintainers = with lib.maintainers; [ virchau13 ];
};
}