From f6f5c185ca533e52b6f0e4042971e039775dd970 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= Date: Fri, 20 May 2016 17:17:10 +0200 Subject: [PATCH] Allow not rebasing in cygwin stdenv. This changes cygwin stdenv, but I don't think it will hurt much people. This allows mkDerivation to get "dontRebase=true" to skip the usual cygwin rebase. This is required, if we are using this stdenv to build DLLs for win32 inside x86_64-cygwin, because /bin/rebase crashes at finding an arch mismatch. Additionally, we don't need any rebase for libraries built by visual studio and meant for visual studio (my use case). I'm using nix in x86_64-cygwin to build libraries with visual studio, both for x86_64 and x86. --- pkgs/stdenv/cygwin/rebase-i686.sh | 3 +++ pkgs/stdenv/cygwin/rebase-x86_64.sh | 3 +++ 2 files changed, 6 insertions(+) diff --git a/pkgs/stdenv/cygwin/rebase-i686.sh b/pkgs/stdenv/cygwin/rebase-i686.sh index e5695c75a96..e97dc66c0ad 100644 --- a/pkgs/stdenv/cygwin/rebase-i686.sh +++ b/pkgs/stdenv/cygwin/rebase-i686.sh @@ -1,6 +1,9 @@ postFixupHooks+=(_cygwinFixAutoImageBase) _cygwinFixAutoImageBase() { + if [ "$dontRebase" == 1 ]; then + return + fi find $out -name "*.dll" | while read DLL; do if [ -f /etc/rebasenix.nextbase ]; then NEXTBASE="$(