Merge pull request #222461 from figsoda/cargo-bundle

This commit is contained in:
figsoda 2023-03-22 22:20:48 -04:00 committed by GitHub
commit 509fedc048
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 43 additions and 0 deletions

View File

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

View File

@ -16020,6 +16020,7 @@ with pkgs;
cargo-binutils = callPackage ../development/tools/rust/cargo-binutils { };
cargo-bloat = callPackage ../development/tools/rust/cargo-bloat { };
cargo-bolero = callPackage ../development/tools/rust/cargo-bolero { };
cargo-bundle = callPackage ../development/tools/rust/cargo-bundle { };
cargo-cache = callPackage ../development/tools/rust/cargo-cache {
inherit (darwin.apple_sdk.frameworks) Security;
};