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.
This commit is contained in:
Lluís Batlle i Rossell 2016-05-20 17:17:10 +02:00
parent a6b6f6e049
commit f6f5c185ca
2 changed files with 6 additions and 0 deletions

View File

@ -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="$(</etc/rebasenix.nextbase)"

View File

@ -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="$(</etc/rebasenix.nextbase)"