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