From 86e6c52bba2c90bfd5db11eb20e5381a667339f9 Mon Sep 17 00:00:00 2001 From: zlepper Date: Wed, 17 Apr 2024 14:40:37 +0200 Subject: [PATCH] icu: refactor to avoid runtime dependency on bash Bash was considered a runtime dependency as the two files `install-sh` and `mkinstalldirs` was included in the library output. These files has a shebang for `#!/bin/sh` which is replaced by nix to point to bash in the fixup phase. --- nixos/doc/manual/release-notes/rl-2405.section.md | 2 ++ pkgs/development/libraries/icu/make-icu.nix | 2 ++ 2 files changed, 4 insertions(+) diff --git a/nixos/doc/manual/release-notes/rl-2405.section.md b/nixos/doc/manual/release-notes/rl-2405.section.md index c97045b2dfca..488fd169ad06 100644 --- a/nixos/doc/manual/release-notes/rl-2405.section.md +++ b/nixos/doc/manual/release-notes/rl-2405.section.md @@ -439,6 +439,8 @@ The pre-existing [services.ankisyncd](#opt-services.ankisyncd.enable) has been m - The `erlang-ls` package no longer ships the `els_dap` binary as of v0.51.0. +- `icu` no longer includes `install-sh` and `mkinstalldirs` in the shared folder. + ## Other Notable Changes {#sec-release-24.05-notable-changes} diff --git a/pkgs/development/libraries/icu/make-icu.nix b/pkgs/development/libraries/icu/make-icu.nix index 836a7e3c73a6..b130c346dbaa 100644 --- a/pkgs/development/libraries/icu/make-icu.nix +++ b/pkgs/development/libraries/icu/make-icu.nix @@ -75,6 +75,8 @@ let { from = "\${pkglibdir}/pkgdata.inc"; to = "${placeholder "dev"}/lib/icu/pkgdata.inc"; } # --incpkgdatafile ]; in '' + rm $out/share/icu/${version}/install-sh $out/share/icu/${version}/mkinstalldirs # Avoid having a runtime dependency on bash + substituteInPlace "$dev/bin/icu-config" \ ${lib.concatMapStringsSep " " (r: "--replace '${r.from}' '${r.to}'") replacements} '');