2023-03-24 00:07:29 +00:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pkg-config
|
|
|
|
, stdenv
|
|
|
|
, darwin
|
|
|
|
, libxkbcommon
|
|
|
|
, wayland
|
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage {
|
|
|
|
pname = "cargo-bundle";
|
|
|
|
# the latest stable release fails to build on darwin
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "unstable-2023-08-18";
|
2023-03-24 00:07:29 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "burtonageo";
|
|
|
|
repo = "cargo-bundle";
|
2023-10-09 19:29:22 +00:00
|
|
|
rev = "c9f7a182d233f0dc4ad84e10b1ffa0d44522ea43";
|
|
|
|
hash = "sha256-n+c83pmCvFdNRAlcadmcZvYj+IRqUYeE8CJVWWYbWDQ=";
|
2023-03-24 00:07:29 +00:00
|
|
|
};
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
cargoHash = "sha256-Ea658jHomktmzXtU5wmd0bRX+i5n46hCvexYxYbjjUc=";
|
2023-03-24 00:07:29 +00:00
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|