From a227fd1fe78ec19e7d823ef808830e86a705fc12 Mon Sep 17 00:00:00 2001 From: Colin Date: Sun, 30 Jul 2023 00:25:25 +0000 Subject: xdg-utils: enable cross compilation native build produces binaries with `#!${bash}/bin/sh` as shebang. seems to be a consequence of nixpkgs using bash in the builder, and `patchShebangs` sees that. OTOH cross builds would get `#!/bin/sh` because the builder's bash isn't eligible as a runtime shebang. i can't say which is most "correct" in the context of this tool, but shipping bash in `buildInputs` where `patchShebangs` can see it at least gets us *consistency*. --- pkgs/tools/X11/xdg-utils/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'pkgs/tools/X11') diff --git a/pkgs/tools/X11/xdg-utils/default.nix b/pkgs/tools/X11/xdg-utils/default.nix index 35557ce447f..ed8b1363d5f 100644 --- a/pkgs/tools/X11/xdg-utils/default.nix +++ b/pkgs/tools/X11/xdg-utils/default.nix @@ -2,6 +2,7 @@ , file, libxslt, docbook_xml_dtd_412, docbook_xsl, xmlto , w3m, gnugrep, gnused, coreutils, xset, perlPackages , mimiSupport ? false, gawk +, bash , glib , withXdgOpenUsePortalPatch ? true }: @@ -48,6 +49,9 @@ stdenv.mkDerivation rec { # just needed when built from git nativeBuildInputs = [ libxslt docbook_xml_dtd_412 docbook_xsl xmlto w3m ]; + # explicitly provide a runtime shell so patchShebangs is consistent across build platforms + buildInputs = [ bash ]; + postInstall = lib.optionalString mimiSupport '' cp ${mimisrc}/xdg-open $out/bin/xdg-open '' + '' @@ -83,6 +87,5 @@ stdenv.mkDerivation rec { license = if mimiSupport then licenses.gpl2 else licenses.free; maintainers = [ maintainers.eelco ]; platforms = platforms.all; - broken = !(stdenv.buildPlatform.canExecute stdenv.hostPlatform); }; } -- cgit 1.4.1