nixpkgs/pkgs/development/tools/rust/cargo-ui/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

63 lines
1.2 KiB
Nix
Raw Normal View History

2022-09-19 02:09:18 +00:00
{ lib
, rustPlatform
, fetchCrate
, pkg-config
2024-02-11 22:28:31 +00:00
, libgit2
2022-09-19 02:09:18 +00:00
, openssl
, stdenv
2022-10-19 00:06:02 +00:00
, expat
2022-09-19 02:09:18 +00:00
, fontconfig
, libGL
, xorg
2022-10-19 00:06:02 +00:00
, darwin
2022-09-19 02:09:18 +00:00
}:
rustPlatform.buildRustPackage rec {
pname = "cargo-ui";
version = "0.3.3";
2022-09-19 02:09:18 +00:00
src = fetchCrate {
inherit pname version;
hash = "sha256-M/ljgtTHMSc7rY/a8CpKGNuOSdVDwRt6+tzPPHdpKOw=";
2022-09-19 02:09:18 +00:00
};
cargoHash = "sha256-u3YqXQZCfveSBjxdWb+GC0IA9bpruAYQdxX1zanT3fw=";
2022-10-19 00:06:02 +00:00
nativeBuildInputs = [
pkg-config
2022-09-19 02:09:18 +00:00
];
2022-10-19 00:06:02 +00:00
buildInputs = [
2024-02-11 22:28:31 +00:00
libgit2
2022-10-19 00:06:02 +00:00
openssl
] ++ lib.optionals stdenv.isLinux [
expat
2022-09-19 02:09:18 +00:00
fontconfig
libGL
xorg.libX11
xorg.libXcursor
xorg.libXi
xorg.libXrandr
xorg.libxcb
2022-10-19 00:06:02 +00:00
] ++ lib.optionals stdenv.isDarwin [
darwin.apple_sdk.frameworks.AppKit
2022-09-19 02:09:18 +00:00
];
postFixup = lib.optionalString stdenv.isLinux ''
patchelf $out/bin/cargo-ui \
--add-rpath ${lib.makeLibraryPath [ fontconfig libGL ]}
2022-09-19 02:09:18 +00:00
'';
2024-02-11 22:28:31 +00:00
env = {
LIBGIT2_NO_VENDOR = 1;
};
2022-09-19 02:09:18 +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 matthiasbeyer ];
2022-09-19 02:09:18 +00:00
};
}