From 2e0ae13f680ab56f303eb15397d08f0889bd93ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Thu, 15 Mar 2012 20:28:03 +0000 Subject: [PATCH] GNU MIG: When cross-compiling, patch shebang correctly. svn path=/nixpkgs/trunk/; revision=33123 --- pkgs/os-specific/gnu/mig/default.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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";