2023-10-19 13:55:26 +00:00
|
|
|
{ lib, stdenv, rustPlatform, fetchFromGitHub, pkg-config
|
2024-06-05 15:53:02 +00:00
|
|
|
, openssl, libiconv, CoreServices, Security, SystemConfiguration }:
|
2023-10-19 13:55:26 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "trunk-ng";
|
2024-06-05 15:53:02 +00:00
|
|
|
version = "0.17.16";
|
2023-10-19 13:55:26 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ctron";
|
|
|
|
repo = "trunk";
|
|
|
|
rev = "v${version}";
|
2024-06-05 15:53:02 +00:00
|
|
|
hash = "sha256-SnE0z9Wa4gtX/ts0vG9pYnnxumILHTSV9/tVYkCHFck=";
|
2023-10-19 13:55:26 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
buildInputs = if stdenv.isDarwin
|
2024-06-05 15:53:02 +00:00
|
|
|
then [ libiconv CoreServices Security SystemConfiguration ]
|
2023-10-19 13:55:26 +00:00
|
|
|
else [ openssl ];
|
|
|
|
|
|
|
|
# requires network
|
|
|
|
checkFlags = [ "--skip=tools::tests::download_and_install_binaries" ];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
cargoHash = {
|
|
|
|
darwin = "sha256-TwpGw3LH3TmZSbC4DkoOYpQdOpksXXoAoiacyZAefTU=";
|
|
|
|
linux = "sha256-AivISmT/r8xa/vSXUN8sU7z67t1hcyMQM+t6oXmIOhU=";
|
|
|
|
}.${stdenv.hostPlatform.parsed.kernel.name} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
|
2023-10-19 13:55:26 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/ctron/trunk";
|
|
|
|
description = "Build, bundle & ship your Rust WASM application to the web";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "trunk-ng";
|
2023-10-19 13:55:26 +00:00
|
|
|
maintainers = with maintainers; [ ctron ];
|
|
|
|
license = with licenses; [ asl20 ];
|
|
|
|
};
|
|
|
|
}
|