diff --git a/pkgs/os-specific/gnu/mig/default.nix b/pkgs/os-specific/gnu/mig/default.nix index 77bb53f7a06..f7b798a7624 100644 --- a/pkgs/os-specific/gnu/mig/default.nix +++ b/pkgs/os-specific/gnu/mig/default.nix @@ -1,4 +1,4 @@ -{ fetchgit, stdenv, autoconf, automake, flex, bison, machHeaders }: +{ fetchgit, stdenv, autoconf, automake, flex, bison, machHeaders, bash }: let date = "20100512"; @@ -21,6 +21,14 @@ stdenv.mkDerivation { doCheck = true; + crossAttrs = { + postInstall = + # Fix the shebang to point to the cross-built shell. + '' sed -i "$out/bin/mig" \ + -e 's|^#!/.*|#!${bash.hostDrv}/bin/sh|g' + ''; + }; + meta = { description = "GNU MIG, the Mach interface generator";