about summary refs log tree commit diff
path: root/pkgs/tools/security/isolate
diff options
context:
space:
mode:
authorVir Chaudhury <virchau13@hexular.net>2023-03-04 19:30:01 +0800
committerVir Chaudhury <virchau13@hexular.net>2023-03-29 05:54:01 +0800
commit84c3cb10083ba9f9d800ab7b2d665254e107ccd0 (patch)
tree744ebc2fc1deed43da573ea206f2a107eb4c43ff /pkgs/tools/security/isolate
parent863e647ecd91bc77853a966bda82b7d49e1e9e7c (diff)
isolate: init at 1.10
Diffstat (limited to 'pkgs/tools/security/isolate')
-rw-r--r--pkgs/tools/security/isolate/default.nix49
1 files changed, 49 insertions, 0 deletions
diff --git a/pkgs/tools/security/isolate/default.nix b/pkgs/tools/security/isolate/default.nix
new file mode 100644
index 0000000000000..ae975dc78ae94
--- /dev/null
+++ b/pkgs/tools/security/isolate/default.nix
@@ -0,0 +1,49 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, asciidoc
+, libcap
+, installShellFiles
+}:
+
+stdenv.mkDerivation rec {
+  pname = "isolate";
+  version = "1.10";
+
+  src = fetchFromGitHub {
+    owner = "ioi";
+    repo = "isolate";
+    rev = "v${version}";
+    hash = "sha256-fuv9HOw0XkRBRjwAp4b6LpoB5p7a+yo66AcT3B0yQUw=";
+  };
+
+  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";
+    homepage = "https://github.com/ioi/isolate";
+    license = lib.licenses.gpl2Plus;
+    maintainers = with lib.maintainers; [ virchau13 ];
+  };
+}