2022-09-22 12:36:57 +00:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, fetchCrate
|
|
|
|
, pkg-config
|
2023-05-24 13:37:59 +00:00
|
|
|
, libgit2_1_5
|
2022-09-22 12:36:57 +00:00
|
|
|
, openssl
|
|
|
|
, stdenv
|
2022-10-21 18:38:19 +00:00
|
|
|
, expat
|
2022-09-22 12:36:57 +00:00
|
|
|
, fontconfig
|
|
|
|
, libGL
|
2022-10-21 18:38:19 +00:00
|
|
|
, xorg
|
|
|
|
, darwin
|
2022-09-22 12:36:57 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "cargo-ui";
|
2023-05-24 13:37:59 +00:00
|
|
|
version = "0.3.3";
|
2022-09-22 12:36:57 +00:00
|
|
|
|
|
|
|
src = fetchCrate {
|
|
|
|
inherit pname version;
|
2023-05-24 13:37:59 +00:00
|
|
|
hash = "sha256-M/ljgtTHMSc7rY/a8CpKGNuOSdVDwRt6+tzPPHdpKOw=";
|
2022-09-22 12:36:57 +00:00
|
|
|
};
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
cargoHash = "sha256-u3YqXQZCfveSBjxdWb+GC0IA9bpruAYQdxX1zanT3fw=";
|
2022-10-21 18:38:19 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
2022-09-22 12:36:57 +00:00
|
|
|
];
|
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
buildInputs = [
|
2023-05-24 13:37:59 +00:00
|
|
|
libgit2_1_5
|
2022-10-21 18:38:19 +00:00
|
|
|
openssl
|
|
|
|
] ++ lib.optionals stdenv.isLinux [
|
|
|
|
expat
|
2022-09-22 12:36:57 +00:00
|
|
|
fontconfig
|
|
|
|
libGL
|
2022-10-21 18:38:19 +00:00
|
|
|
xorg.libX11
|
|
|
|
xorg.libXcursor
|
|
|
|
xorg.libXi
|
|
|
|
xorg.libXrandr
|
|
|
|
xorg.libxcb
|
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
2023-05-24 13:37:59 +00:00
|
|
|
darwin.apple_sdk.frameworks.AppKit
|
2022-09-22 12:36:57 +00:00
|
|
|
];
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
postFixup = lib.optionalString stdenv.isLinux ''
|
|
|
|
patchelf $out/bin/cargo-ui \
|
|
|
|
--add-rpath ${lib.makeLibraryPath [ fontconfig libGL ]}
|
2022-09-22 12:36:57 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A GUI for Cargo";
|
|
|
|
homepage = "https://github.com/slint-ui/cargo-ui";
|
|
|
|
changelog = "https://github.com/slint-ui/cargo-ui/blob/v${version}/CHANGELOG.md";
|
|
|
|
license = with licenses; [ mit asl20 gpl3Only ];
|
|
|
|
maintainers = with maintainers; [ figsoda ];
|
|
|
|
};
|
|
|
|
}
|