about summary refs log tree commit diff
path: root/pkgs/development/tools/rust
diff options
context:
space:
mode:
authorfigsoda <figsoda@pm.me>2023-03-21 22:48:56 -0400
committerfigsoda <figsoda@pm.me>2023-03-21 22:51:46 -0400
commit880d20ffed3c841b1e1896c40b63559c125c17b8 (patch)
treeba8cdca09b82a3abb7b447bfb9521fa8b78aea04 /pkgs/development/tools/rust
parent3c2e5906d693fc4a18cfdb9408698f83594dbf25 (diff)
cargo-bundle: init at unstable-2023-03-17
Diffstat (limited to 'pkgs/development/tools/rust')
-rw-r--r--pkgs/development/tools/rust/cargo-bundle/default.nix42
1 files changed, 42 insertions, 0 deletions
diff --git a/pkgs/development/tools/rust/cargo-bundle/default.nix b/pkgs/development/tools/rust/cargo-bundle/default.nix
new file mode 100644
index 0000000000000..f29d9aba8294c
--- /dev/null
+++ b/pkgs/development/tools/rust/cargo-bundle/default.nix
@@ -0,0 +1,42 @@
+{ lib
+, rustPlatform
+, fetchFromGitHub
+, pkg-config
+, stdenv
+, darwin
+, libxkbcommon
+, wayland
+}:
+
+rustPlatform.buildRustPackage {
+  pname = "cargo-bundle";
+  # the latest stable release fails to build on darwin
+  version = "unstable-2023-03-17";
+
+  src = fetchFromGitHub {
+    owner = "burtonageo";
+    repo = "cargo-bundle";
+    rev = "eb9fe1b0880c7c0e929a93edaddcb0a61cd3f0d4";
+    hash = "sha256-alO+Q9IK5Hz09+TqHWsbjuokxISKQfQTM6QnLlUNydw=";
+  };
+
+  cargoHash = "sha256-h+QPbwYTJk6dieta/Q+VAhYe8/YH/Nik6gslzUn0YxI=";
+
+  nativeBuildInputs = [
+    pkg-config
+  ];
+
+  buildInputs = lib.optionals stdenv.isDarwin [
+    darwin.apple_sdk.frameworks.AppKit
+  ] ++ lib.optionals stdenv.isLinux [
+    libxkbcommon
+    wayland
+  ];
+
+  meta = with lib; {
+    description = "Wrap rust executables in OS-specific app bundles";
+    homepage = "https://github.com/burtonageo/cargo-bundle";
+    license = with licenses; [ asl20 mit ];
+    maintainers = with maintainers; [ figsoda ];
+  };
+}