summary refs log tree commit diff
path: root/pkgs/tools/filesystems/sandboxfs/default.nix
blob: 32d186344dd7218e92041ec65394fff118b5b533 (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
{ lib
, fetchFromGitHub
, rustPlatform
, fuse
, pkg-config
, installShellFiles
}:

rustPlatform.buildRustPackage rec {
  pname = "sandboxfs";
  version = "0.2.0";

  src = fetchFromGitHub {
    owner = "bazelbuild";
    repo = pname;
    rev = "sandboxfs-${version}";
    sha256 = "Ia6rq6FN4abnvLXjlQh4Q+8ra5JThKnC86UXC7s9//U=";
  };

  cargoSha256 = "sha256-k303TjWG+n+/ZMmko84KJtYb7swuQ1ZJOc4Vq6aOhX0=";

  # Issue to add Cargo.lock upstream: https://github.com/bazelbuild/sandboxfs/pull/115
  cargoPatches = [ ./Cargo.lock.patch ];

  nativeBuildInputs = [ pkg-config installShellFiles ];

  buildInputs = [ fuse ];

  postInstall = "installManPage man/sandboxfs.1";

  meta = with lib; {
    description = "A virtual file system for sandboxing";
    homepage = "https://github.com/bazelbuild/sandboxfs";
    license = with licenses; [ asl20 ];
    maintainers = with maintainers; [ jeremyschlatter ];
  };
}