Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{
2 lib,
3 rustPlatform,
4 fetchFromGitHub,
5 pkg-config,
6 stdenv,
7 libxkbcommon,
8 wayland,
9}:
10
11rustPlatform.buildRustPackage {
12 pname = "cargo-bundle";
13 # the latest stable release fails to build on darwin
14 version = "unstable-2023-08-18";
15
16 src = fetchFromGitHub {
17 owner = "burtonageo";
18 repo = "cargo-bundle";
19 rev = "c9f7a182d233f0dc4ad84e10b1ffa0d44522ea43";
20 hash = "sha256-n+c83pmCvFdNRAlcadmcZvYj+IRqUYeE8CJVWWYbWDQ=";
21 };
22
23 cargoHash = "sha256-g898Oelrk/ok52raTEDhgtQ9psc0PFHd/uNnk1QeXCs=";
24
25 nativeBuildInputs = [
26 pkg-config
27 ];
28
29 buildInputs = lib.optionals stdenv.hostPlatform.isLinux [
30 libxkbcommon
31 wayland
32 ];
33
34 meta = with lib; {
35 description = "Wrap rust executables in OS-specific app bundles";
36 mainProgram = "cargo-bundle";
37 homepage = "https://github.com/burtonageo/cargo-bundle";
38 license = with licenses; [
39 asl20
40 mit
41 ];
42 maintainers = with maintainers; [ figsoda ];
43 };
44}