about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJens Reimann <ctron@dentrassi.de>2023-10-02 19:00:00 +0200
committerJens Reimann <ctron@dentrassi.de>2023-10-12 18:07:06 +0200
commit32814b01a40c914c8637e60cbada11ef47659501 (patch)
tree6f8e5c9c6365aa097fe5ad8b2c79f6e05d87bf50
parent3a1d1dac62b44331686a964d4ebfe30f249cebac (diff)
trunk-ng: init at 0.17.8
-rw-r--r--nixos/doc/manual/release-notes/rl-2311.section.md2
-rw-r--r--pkgs/by-name/tr/trunk-ng/package.nix31
-rw-r--r--pkgs/top-level/all-packages.nix4
3 files changed, 37 insertions, 0 deletions
diff --git a/nixos/doc/manual/release-notes/rl-2311.section.md b/nixos/doc/manual/release-notes/rl-2311.section.md
index f2c9ee41c230e..5d15c61f0c59f 100644
--- a/nixos/doc/manual/release-notes/rl-2311.section.md
+++ b/nixos/doc/manual/release-notes/rl-2311.section.md
@@ -96,6 +96,8 @@
 
 - [netclient](https://github.com/gravitl/netclient), an automated WireGuard® Management Client. Available as [services.netclient](#opt-services.netclient.enable).
 
+- [trunk-ng](https://github.com/ctron/trunk), A fork of `trunk`: Build, bundle & ship your Rust WASM application to the web
+
 ## Backward Incompatibilities {#sec-release-23.11-incompatibilities}
 
 - `network-online.target` has been fixed to no longer time out for systems with `networking.useDHCP = true` and `networking.useNetworkd = true`.
diff --git a/pkgs/by-name/tr/trunk-ng/package.nix b/pkgs/by-name/tr/trunk-ng/package.nix
new file mode 100644
index 0000000000000..0ba415d1bb968
--- /dev/null
+++ b/pkgs/by-name/tr/trunk-ng/package.nix
@@ -0,0 +1,31 @@
+{ lib, stdenv, rustPlatform, fetchFromGitHub, pkg-config
+, openssl, libiconv, CoreServices, Security }:
+
+rustPlatform.buildRustPackage rec {
+  pname = "trunk-ng";
+  version = "0.17.8";
+
+  src = fetchFromGitHub {
+    owner = "ctron";
+    repo = "trunk";
+    rev = "v${version}";
+    hash = "sha256-ycZIqDBZccPapOK0ZI9Cvq94tRxChrsWX1rhyWh0S2c=";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = if stdenv.isDarwin
+    then [ libiconv CoreServices Security ]
+    else [ openssl ];
+
+  # requires network
+  checkFlags = [ "--skip=tools::tests::download_and_install_binaries" ];
+
+  cargoHash = "sha256-URHArTog34JcuxXHzTQBjQOFMffarNb51d9sUOfjm6c=";
+
+  meta = with lib; {
+    homepage = "https://github.com/ctron/trunk";
+    description = "Build, bundle & ship your Rust WASM application to the web";
+    maintainers = with maintainers; [ ctron ];
+    license = with licenses; [ asl20 ];
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 14bbc19384bfb..4c08215c33f1b 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -14063,6 +14063,10 @@ with pkgs;
 
   trunk-io = callPackage ../development/tools/trunk-io { };
 
+  trunk-ng = callPackage ../by-name/tr/trunk-ng/package.nix {
+    inherit (darwin.apple_sdk.frameworks) CoreServices Security;
+  };
+
   tthsum = callPackage ../applications/misc/tthsum { };
 
   ttdl = callPackage ../applications/misc/ttdl { };