about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/security/isolate/default.nix
blob: 4aa59202960038f56e42304f960b4000e1cddccc (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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
{ lib
, stdenv
, fetchFromGitHub
, asciidoc
, libcap
, installShellFiles
}:

stdenv.mkDerivation rec {
  pname = "isolate";
  version = "1.10.1";

  src = fetchFromGitHub {
    owner = "ioi";
    repo = "isolate";
    rev = "v${version}";
    hash = "sha256-xY2omzqIJYElLtzj4byy/QG4pW4erCxc+cD2X9nA2jM=";
  };

  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 ];
  };
}