summary refs log tree commit diff
path: root/pkgs/tools/X11
diff options
context:
space:
mode:
authorColin <colin@uninsane.org>2023-07-30 00:25:25 +0000
committerColin <colin@uninsane.org>2023-08-06 09:36:18 +0000
commita227fd1fe78ec19e7d823ef808830e86a705fc12 (patch)
tree75049c64cbee2db0b025ad10c5f3ecafdb3dc916 /pkgs/tools/X11
parent1b64bc6920d009c3f2a6f73aef413a41bd64f41e (diff)
downloadnixpkgs-a227fd1fe78ec19e7d823ef808830e86a705fc12.tar
nixpkgs-a227fd1fe78ec19e7d823ef808830e86a705fc12.tar.gz
nixpkgs-a227fd1fe78ec19e7d823ef808830e86a705fc12.tar.bz2
nixpkgs-a227fd1fe78ec19e7d823ef808830e86a705fc12.tar.lz
nixpkgs-a227fd1fe78ec19e7d823ef808830e86a705fc12.tar.xz
nixpkgs-a227fd1fe78ec19e7d823ef808830e86a705fc12.tar.zst
nixpkgs-a227fd1fe78ec19e7d823ef808830e86a705fc12.zip
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*.
Diffstat (limited to 'pkgs/tools/X11')
-rw-r--r--pkgs/tools/X11/xdg-utils/default.nix5
1 files changed, 4 insertions, 1 deletions
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);
   };
 }