diff options
author | Lluís Batlle i Rossell <viric@viric.name> | 2016-05-20 17:17:10 +0200 |
---|---|---|
committer | Lluís Batlle i Rossell <viric@viric.name> | 2016-05-20 17:17:10 +0200 |
commit | f6f5c185ca533e52b6f0e4042971e039775dd970 (patch) | |
tree | 48d97a2bb6998ff0c3235e6289b83296118d5a4c /pkgs/stdenv/cygwin | |
parent | a6b6f6e049a48160258ffd4e949754153dd071e0 (diff) |
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.
Diffstat (limited to 'pkgs/stdenv/cygwin')
-rw-r--r-- | pkgs/stdenv/cygwin/rebase-i686.sh | 3 | ||||
-rw-r--r-- | pkgs/stdenv/cygwin/rebase-x86_64.sh | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/pkgs/stdenv/cygwin/rebase-i686.sh b/pkgs/stdenv/cygwin/rebase-i686.sh index e5695c75a9674..e97dc66c0ad69 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="$(</etc/rebasenix.nextbase)" diff --git a/pkgs/stdenv/cygwin/rebase-x86_64.sh b/pkgs/stdenv/cygwin/rebase-x86_64.sh index f782f18dfd157..a79c625746068 100644 --- a/pkgs/stdenv/cygwin/rebase-x86_64.sh +++ b/pkgs/stdenv/cygwin/rebase-x86_64.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="$(</etc/rebasenix.nextbase)" |