2024-01-02 11:29:13 +00:00
|
|
|
{ lib,
|
|
|
|
stdenv,
|
|
|
|
rustPlatform,
|
|
|
|
fetchFromGitHub,
|
|
|
|
pkg-config,
|
|
|
|
openssl,
|
|
|
|
CoreServices,
|
|
|
|
SystemConfiguration
|
|
|
|
}:
|
2021-03-23 19:22:30 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "trunk";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "0.20.3";
|
2021-03-23 19:22:30 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2024-04-21 15:54:59 +00:00
|
|
|
owner = "trunk-rs";
|
2021-03-23 19:22:30 +00:00
|
|
|
repo = "trunk";
|
|
|
|
rev = "v${version}";
|
2024-09-19 14:19:46 +00:00
|
|
|
hash = "sha256-3p3HllZu69e2ERLoEJwSWL0OXl23lxvIPHV9HK30CqM=";
|
2021-03-23 19:22:30 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2024-09-26 11:04:55 +00:00
|
|
|
buildInputs = if stdenv.hostPlatform.isDarwin
|
2024-01-02 11:29:13 +00:00
|
|
|
then [ CoreServices SystemConfiguration ]
|
2021-05-20 23:08:51 +00:00
|
|
|
else [ openssl ];
|
2021-09-18 10:52:07 +00:00
|
|
|
# requires network
|
|
|
|
checkFlags = [ "--skip=tools::tests::download_and_install_binaries" ];
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
cargoHash = "sha256-4b+ASz8uV17Y7gO50YKiu8Zhhq4sL+HJj1WAD7VkEE4=";
|
2021-03-23 19:22:30 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2024-04-21 15:54:59 +00:00
|
|
|
homepage = "https://github.com/trunk-rs/trunk";
|
2021-03-23 19:22:30 +00:00
|
|
|
description = "Build, bundle & ship your Rust WASM application to the web";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "trunk";
|
|
|
|
maintainers = with maintainers; [ freezeboy ctron ];
|
2021-03-23 19:22:30 +00:00
|
|
|
license = with licenses; [ asl20 ];
|
|
|
|
};
|
|
|
|
}
|