summary refs log tree commit diff
path: root/pkgs/tools/filesystems/sandboxfs/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/tools/filesystems/sandboxfs/default.nix')
-rw-r--r--pkgs/tools/filesystems/sandboxfs/default.nix37
1 files changed, 37 insertions, 0 deletions
diff --git a/pkgs/tools/filesystems/sandboxfs/default.nix b/pkgs/tools/filesystems/sandboxfs/default.nix
new file mode 100644
index 00000000000..7d6d6119878
--- /dev/null
+++ b/pkgs/tools/filesystems/sandboxfs/default.nix
@@ -0,0 +1,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-fAPMAVvcI3pm3zTLATO7SUdZpG469fjlBZshFhgv6gY=";
+
+  # 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 ];
+  };
+}