about summary refs log tree commit diff
path: root/pkgs/development/tools
diff options
context:
space:
mode:
authorMario Rodas <marsam@users.noreply.github.com>2023-12-17 20:39:59 -0500
committerGitHub <noreply@github.com>2023-12-17 20:39:59 -0500
commita3670679058c06e817358782f82aa0edff8df39d (patch)
tree2ce65c551ea1bc521e82ff4bf1dc51adf69fbb04 /pkgs/development/tools
parenta8086c0c391205720d606478a0ea82b3b6531c11 (diff)
parenta3bc72da04736116a5e0f9cfbc80863b7e3627c5 (diff)
Merge pull request #274304 from kashw2/trunk
trunk: 0.17.2 -> 0.18.0
Diffstat (limited to 'pkgs/development/tools')
-rw-r--r--pkgs/development/tools/trunk/default.nix42
1 files changed, 36 insertions, 6 deletions
diff --git a/pkgs/development/tools/trunk/default.nix b/pkgs/development/tools/trunk/default.nix
index 2c003913b3bd8..c19936b2bf64c 100644
--- a/pkgs/development/tools/trunk/default.nix
+++ b/pkgs/development/tools/trunk/default.nix
@@ -1,26 +1,56 @@
-{ lib, stdenv, rustPlatform, fetchFromGitHub, pkg-config
-, openssl, libiconv, CoreServices, Security }:
+{ lib,
+stdenv,
+rustPlatform,
+fetchFromGitHub,
+pkg-config,
+openssl,
+libiconv,
+jq,
+moreutils,
+CoreServices,
+Security
+}:
 
 rustPlatform.buildRustPackage rec {
   pname = "trunk";
-  version = "0.17.2";
+  version = "0.18.0";
 
   src = fetchFromGitHub {
     owner = "thedodd";
     repo = "trunk";
     rev = "v${version}";
-    sha256 = "sha256-A6h8TmYK5WOcmANk/uM9QO1h767BWASWTwLthtKqrEk=";
+    hash = "sha256-riebGbDCqkJTkDmvXCuD0ywjSfGfLgxywkHUPlGzCgI=";
   };
 
   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-+jz0J1qFK2fZ4OX089pgNtT2vfiOTf39qQjeXmLoFNs=";
+  cargoHash = "sha256-O2AKIOvAwDpZDzEyc/x5lF0E0UR+Mj/J///1bYRgoX4=";
+
+  # the dependency css-minify contains both README.md and Readme.md,
+  # which causes a hash mismatch on systems with a case-insensitive filesystem
+  # this removes the readme files and updates cargo's checksum file accordingly
+  depsExtraArgs = {
+    nativeBuildInputs = [
+      jq
+      moreutils
+    ];
+
+    postBuild = ''
+      pushd $name/css-minify
+
+      rm -f README.md Readme.md
+      jq 'del(.files."README.md") | del(.files."Readme.md")' \
+        .cargo-checksum.json -c \
+        | sponge .cargo-checksum.json
+
+      popd
+    '';
+  };
 
   meta = with lib; {
     homepage = "https://github.com/thedodd/trunk";