nixpkgs/pkgs/tools/security/isolate/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

61 lines
1.1 KiB
Nix
Raw Normal View History

2023-03-04 11:30:01 +00:00
{ lib
, stdenv
, fetchFromGitHub
, asciidoc
, libcap
, pkg-config
, systemdLibs
2023-03-04 11:30:01 +00:00
, installShellFiles
2024-04-21 21:58:48 +00:00
, nixosTests
2023-03-04 11:30:01 +00:00
}:
stdenv.mkDerivation rec {
pname = "isolate";
2024-03-09 00:42:08 +00:00
version = "2.0";
2023-03-04 11:30:01 +00:00
src = fetchFromGitHub {
owner = "ioi";
repo = "isolate";
rev = "v${version}";
2024-03-09 00:42:08 +00:00
hash = "sha256-kKXkXPVB9ojyIERvEdkHkXC//Agin8FPcpTBmTxh/ZE=";
2023-03-04 11:30:01 +00:00
};
nativeBuildInputs = [
asciidoc
installShellFiles
pkg-config
2023-03-04 11:30:01 +00:00
];
buildInputs = [
libcap.dev
systemdLibs.dev
2023-03-04 11:30:01 +00:00
];
patches = [
./take-config-file-from-env.patch
];
2023-03-04 11:30:01 +00:00
installPhase = ''
runHook preInstall
install -Dm755 ./isolate $out/bin/isolate
install -Dm755 ./isolate-cg-keeper $out/bin/isolate-cg-keeper
install -Dm755 ./isolate-check-environment $out/bin/isolate-check-environment
2023-03-04 11:30:01 +00:00
installManPage isolate.1
runHook postInstall
'';
2024-04-21 21:58:48 +00:00
passthru.tests = {
isolate = nixosTests.isolate;
};
2023-03-04 11:30:01 +00:00
meta = {
description = "Sandbox for securely executing untrusted programs";
mainProgram = "isolate";
2023-03-04 11:30:01 +00:00
homepage = "https://github.com/ioi/isolate";
license = lib.licenses.gpl2Plus;
maintainers = with lib.maintainers; [ virchau13 ];
};
}