diff options
33 files changed, 487 insertions, 119 deletions
diff --git a/pkgs/build-support/gcc-cross-wrapper/builder.sh b/pkgs/build-support/gcc-cross-wrapper/builder.sh index 5a5bd45a8f81..18d26b3e9451 100644 --- a/pkgs/build-support/gcc-cross-wrapper/builder.sh +++ b/pkgs/build-support/gcc-cross-wrapper/builder.sh @@ -26,6 +26,10 @@ if test -z "$nativeLibc"; then fi fi + if [ -n "$osxMinVersion" ]; then + cflagsCompile="$cflagsCompile -mmacosx-version-min=$osxMinVersion" + fi + echo "$cflagsCompile -B$libc/lib/ -idirafter $libc/include -idirafter $gcc/lib/gcc/*/*/include-fixed" > $out/nix-support/libc-cflags echo "-L$libc/lib -rpath $libc/lib -rpath-link $libc/lib" > $out/nix-support/libc-ldflags diff --git a/pkgs/build-support/gcc-cross-wrapper/default.nix b/pkgs/build-support/gcc-cross-wrapper/default.nix index b2e30be10ef7..d3494b83a87b 100644 --- a/pkgs/build-support/gcc-cross-wrapper/default.nix +++ b/pkgs/build-support/gcc-cross-wrapper/default.nix @@ -46,6 +46,7 @@ stdenv.mkDerivation { addFlags = ./add-flags; inherit nativeTools nativeLibc nativePrefix gcc libc binutils; crossConfig = if cross != null then cross.config else null; + osxMinVersion = cross.osxMinVersion or null; gccLibs = if gcc != null then gccLibs else null; name = chosenName; langC = if nativeTools then true else gcc.langC; diff --git a/pkgs/build-support/gcc-cross-wrapper/setup-hook.sh b/pkgs/build-support/gcc-cross-wrapper/setup-hook.sh index a7be09283ee0..497047a73b10 100644 --- a/pkgs/build-support/gcc-cross-wrapper/setup-hook.sh +++ b/pkgs/build-support/gcc-cross-wrapper/setup-hook.sh @@ -70,11 +70,16 @@ fi if test "$dontSetConfigureCross" != "1"; then configureFlags="$configureFlags --build=$system --host=$crossConfig" + # This is because -print-prog-name tries to search FHS paths. + configureFlags="$configureFlags LD=$crossConfig-ld" fi # Disabling the tests when cross compiling, as usually the tests are meant for # native compilations. doCheck="" +# Don't strip foreign binaries with native "strip" tool. +dontStrip=1 + # Add the output as an rpath. if test "$NIX_NO_SELF_RPATH" != "1"; then export NIX_CROSS_LDFLAGS="-rpath $out/lib -rpath-link $out/lib $NIX_CROSS_LDFLAGS" diff --git a/pkgs/data/misc/tzdata/default.nix b/pkgs/data/misc/tzdata/default.nix index da043da09678..57b1dddbda55 100644 --- a/pkgs/data/misc/tzdata/default.nix +++ b/pkgs/data/misc/tzdata/default.nix @@ -17,13 +17,17 @@ stdenv.mkDerivation rec { ]; sourceRoot = "."; + outputs = [ "out" "lib" ]; - makeFlags = "TOPDIR=$(out) TZDIR=$(out)/share/zoneinfo ETCDIR=$(TMPDIR)/etc LIBDIR=$(TMPDIR)/lib MANDIR=$(TMPDIR)/man AWK=awk"; + makeFlags = "TOPDIR=$(out) TZDIR=$(out)/share/zoneinfo ETCDIR=$(TMPDIR)/etc LIBDIR=$(lib)/lib MANDIR=$(TMPDIR)/man AWK=awk"; postInstall = '' mv $out/share/zoneinfo-posix $out/share/zoneinfo/posix mv $out/share/zoneinfo-leaps $out/share/zoneinfo/right + + ensureDir "$lib/include" + cp tzfile.h "$lib/include/tzfile.h" ''; meta = { diff --git a/pkgs/development/compilers/gcc/4.6/default.nix b/pkgs/development/compilers/gcc/4.6/default.nix index 3ed0f7ad0e6d..af1113226980 100644 --- a/pkgs/development/compilers/gcc/4.6/default.nix +++ b/pkgs/development/compilers/gcc/4.6/default.nix @@ -159,10 +159,8 @@ let version = "4.6.3"; # In any case, mingw32 g++ linking is broken by default with shared libs, # unless adding "-lsupc++" to any linking command. I don't know why. " --disable-shared" + - (if cross.config == "x86_64-w64-mingw32" then - # To keep ABI compatibility with upstream mingw-w64 - " --enable-fully-dynamic-string" - else "") + # To keep ABI compatibility with upstream mingw-w64 + " --enable-fully-dynamic-string" else (if cross.libc == "uclibc" then # In uclibc cases, libgomp needs an additional '-ldl' # and as I don't know how to pass it, I disable libgomp. diff --git a/pkgs/development/compilers/gcc/4.8/default.nix b/pkgs/development/compilers/gcc/4.8/default.nix index aea525933234..96207b6ca42b 100644 --- a/pkgs/development/compilers/gcc/4.8/default.nix +++ b/pkgs/development/compilers/gcc/4.8/default.nix @@ -117,7 +117,8 @@ let version = "4.8.2"; withMode; /* Cross-gcc settings */ - crossMingw = (cross != null && cross.libc == "msvcrt"); + crossMingw = cross != null && cross.libc == "msvcrt"; + crossDarwin = cross != null && cross.libc == "libSystem"; crossConfigureFlags = let gccArch = stdenv.cross.gcc.arch or null; gccCpu = stdenv.cross.gcc.cpu or null; @@ -161,7 +162,12 @@ let version = "4.8.2"; " --disable-shared" + " --disable-decimal-float" # libdecnumber requires libc else - " --with-headers=${libcCross}/include" + + (if crossDarwin then + " --with-sysroot=${libcCross}/share/sysroot" + + " --with-as=${binutilsCross}/bin/${cross.config}-as" + + " --with-ld=${binutilsCross}/bin/${cross.config}-ld" + else + " --with-headers=${libcCross}/include") + " --enable-__cxa_atexit" + " --enable-long-long" + (if crossMingw then @@ -175,10 +181,8 @@ let version = "4.8.2"; # In any case, mingw32 g++ linking is broken by default with shared libs, # unless adding "-lsupc++" to any linking command. I don't know why. " --disable-shared" + - (if cross.config == "x86_64-w64-mingw32" then - # To keep ABI compatibility with upstream mingw-w64 - " --enable-fully-dynamic-string" - else "") + # To keep ABI compatibility with upstream mingw-w64 + " --enable-fully-dynamic-string" else (if cross.libc == "uclibc" then # In uclibc cases, libgomp needs an additional '-ldl' # and as I don't know how to pass it, I disable libgomp. @@ -346,6 +350,7 @@ stdenv.mkDerivation ({ ++ optional langAda "ada" ++ optional langVhdl "vhdl" ++ optional langGo "go" + ++ optionals crossDarwin [ "objc" "obj-c++" ] ) ) } diff --git a/pkgs/development/interpreters/lua-5/5.2.nix b/pkgs/development/interpreters/lua-5/5.2.nix index 70ab0c3bdf8b..2c749bd51f1c 100644 --- a/pkgs/development/interpreters/lua-5/5.2.nix +++ b/pkgs/development/interpreters/lua-5/5.2.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { sha256 = "004zyh9p3lpvbwhyhlmrw6wwcia5abx84q4h2brkn4zdypipvmiz"; }; - buildInputs = [ readline ]; + nativeBuildInputs = [ readline ]; patches = [ dsoPatch ]; @@ -49,6 +49,37 @@ stdenv.mkDerivation rec { EOF ''; + crossAttrs = let + isMingw = stdenv.cross.libc == "msvcrt"; + isDarwin = stdenv.cross.libc == "libSystem"; + in { + configurePhase = '' + makeFlagsArray=( + INSTALL_TOP=$out + INSTALL_MAN=$out/share/man/man1 + CC=${stdenv.cross.config}-gcc + STRIP=: + RANLIB=${stdenv.cross.config}-ranlib + V=${majorVersion} + R=${version} + ${if isMingw then "mingw" else stdenv.lib.optionalString isDarwin '' + AR="${stdenv.cross.config}-ar rcu" + macosx + ''} + ) + '' + stdenv.lib.optionalString isMingw '' + installFlagsArray=( + TO_BIN="lua.exe luac.exe" + TO_LIB="liblua.a lua52.dll" + INSTALL_DATA="cp -d" + ) + ''; + } // stdenv.lib.optionalAttrs isDarwin { + postPatch = '' + sed -i -e 's/-Wl,-soname[^ ]* *//' src/Makefile + ''; + }; + meta = { homepage = "http://www.lua.org"; description = "Powerful, fast, lightweight, embeddable scripting language"; diff --git a/pkgs/development/libraries/SDL/default.nix b/pkgs/development/libraries/SDL/default.nix index e58397fa9a5b..ee3640fe64b4 100644 --- a/pkgs/development/libraries/SDL/default.nix +++ b/pkgs/development/libraries/SDL/default.nix @@ -7,21 +7,13 @@ # OSS is no longer supported, for it's much crappier than ALSA and # PulseAudio. -assert alsaSupport || pulseaudioSupport; +assert !(stdenv ? cross) -> alsaSupport || pulseaudioSupport; assert openglSupport -> (mesa != null && x11Support); assert x11Support -> (x11 != null && libXrandr != null); assert alsaSupport -> alsaLib != null; assert pulseaudioSupport -> pulseaudio != null; -let - configureFlagsFun = attrs: '' - --disable-oss --disable-video-x11-xme - --disable-x11-shared --disable-alsa-shared --enable-rpath --disable-pulseaudio-shared - --disable-osmesa-shared - ${if alsaSupport then "--with-alsa-prefix=${attrs.alsaLib}/lib" else ""} - ''; -in stdenv.mkDerivation rec { version = "1.2.15"; name = "SDL-${version}"; @@ -32,20 +24,46 @@ stdenv.mkDerivation rec { }; # Since `libpulse*.la' contain `-lgdbm', PulseAudio must be propagated. - propagatedBuildInputs = stdenv.lib.optionals x11Support [ x11 libXrandr ] ++ + propagatedNativeBuildInputs = + stdenv.lib.optionals x11Support [ x11 libXrandr ] ++ stdenv.lib.optional pulseaudioSupport pulseaudio; - buildInputs = [ pkgconfig audiofile ] ++ + buildInputs = let + notMingw = !(stdenv ? cross) || stdenv.cross.libc != "msvcrt"; + in stdenv.lib.optional notMingw audiofile; + + nativeBuildInputs = [ pkgconfig ] ++ stdenv.lib.optional openglSupport [ mesa ] ++ stdenv.lib.optional alsaSupport alsaLib; # XXX: By default, SDL wants to dlopen() PulseAudio, in which case # we must arrange to add it to its RPATH; however, `patchelf' seems # to fail at doing this, hence `--disable-pulseaudio-shared'. - configureFlags = configureFlagsFun { inherit alsaLib; }; + configureFlags = [ + "--disable-oss" + "--disable-video-x11-xme" + "--disable-x11-shared" + "--disable-alsa-shared" + "--enable-rpath" + "--disable-pulseaudio-shared" + "--disable-osmesa-shared" + ] ++ stdenv.lib.optionals (stdenv ? cross) ([ + "--without-x" + ] ++ stdenv.lib.optional alsaSupport "--with-alsa-prefix=${alsaLib}/lib"); - crossAttrs = { - configureFlags = configureFlagsFun { alsaLib = alsaLib.crossDrv; }; + crossAttrs =stdenv.lib.optionalAttrs (stdenv.cross.libc == "libSystem") { + patches = let + f = rev: sha256: fetchurl { + url = "http://hg.libsdl.org/SDL/raw-rev/${rev}"; + inherit sha256; + }; + in [ + (f "e9466ead70e5" "0ygir3k83d0vxp7s3k48jn3j8n2bnv9wm6613wpx3ybnjrxabrip") + (f "bbfb41c13a87" "17v29ybjifvka19m8qf14rjc43nfdwk9v9inaizznarhb17amlnv") + ]; + postPatch = '' + sed -i -e 's/ *-fpascal-strings//' configure + ''; }; passthru = {inherit openglSupport;}; diff --git a/pkgs/development/libraries/audiofile/default.nix b/pkgs/development/libraries/audiofile/default.nix index a5fd80dc0db9..c8fb8c53dc0c 100644 --- a/pkgs/development/libraries/audiofile/default.nix +++ b/pkgs/development/libraries/audiofile/default.nix @@ -3,7 +3,7 @@ stdenv.mkDerivation rec { name = "audiofile-0.3.6"; - buildInputs = stdenv.lib.optional (!stdenv.isDarwin) alsaLib; + nativeBuildInputs = stdenv.lib.optional stdenv.isLinux alsaLib; src = fetchurl { url = "http://audiofile.68k.org/${name}.tar.gz"; diff --git a/pkgs/development/libraries/glew/default.nix b/pkgs/development/libraries/glew/default.nix index ef81f210d39f..9ec88799d0dd 100644 --- a/pkgs/development/libraries/glew/default.nix +++ b/pkgs/development/libraries/glew/default.nix @@ -1,5 +1,7 @@ { stdenv, fetchurl, mesa_glu, x11, libXmu, libXi }: +with stdenv.lib; + stdenv.mkDerivation rec { name = "glew-1.10.0"; @@ -8,23 +10,38 @@ stdenv.mkDerivation rec { sha256 = "01zki46dr5khzlyywr3cg615bcal32dazfazkf360s1znqh17i4r"; }; - - buildInputs = [ x11 libXmu libXi ]; - propagatedBuildInputs = [ mesa_glu ]; # GL/glew.h includes GL/glu.h + nativeBuildInputs = [ x11 libXmu libXi ]; + propagatedNativeBuildInputs = [ mesa_glu ]; # GL/glew.h includes GL/glu.h patchPhase = '' sed -i 's|lib64|lib|' config/Makefile.linux + ${optionalString (stdenv ? cross) '' + sed -i -e 's/\(INSTALL.*\)-s/\1/' Makefile + ''} + ''; + + buildFlags = [ "all" ]; + installFlags = [ "install.all" ]; + + preInstall = '' + export GLEW_DEST="$out" ''; -buildPhase = "make all"; - installPhase = '' - GLEW_DEST=$out make install.all + postInstall = '' mkdir -pv $out/share/doc/glew mkdir -p $out/lib/pkgconfig cp glew*.pc $out/lib/pkgconfig cp -r README.txt LICENSE.txt doc $out/share/doc/glew ''; + crossAttrs.makeFlags = [ + "CC=${stdenv.cross.config}-gcc" + "LD=${stdenv.cross.config}-gcc" + "AR=${stdenv.cross.config}-ar" + "STRIP=" + ] ++ optional (stdenv.cross.libc == "msvcrt") "SYSTEM=mingw" + ++ optional (stdenv.cross.libc == "libSystem") "SYSTEM=darwin"; + meta = { description = "An OpenGL extension loading library for C(++)"; homepage = http://glew.sourceforge.net/; diff --git a/pkgs/development/libraries/libgcrypt/1.6.nix b/pkgs/development/libraries/libgcrypt/1.6.nix index ea981f7ed127..9dc8b8a23179 100644 --- a/pkgs/development/libraries/libgcrypt/1.6.nix +++ b/pkgs/development/libraries/libgcrypt/1.6.nix @@ -24,6 +24,12 @@ stdenv.mkDerivation rec { make check ''; + crossAttrs = let + isCross64 = stdenv.cross.config == "x86_64-w64-mingw32"; + in stdenv.lib.optionalAttrs isCross64 { + configureFlags = [ "--disable-asm" "--disable-padlock-support" ]; + }; + meta = { description = "GNU Libgcrypt, a general-pupose cryptographic library"; diff --git a/pkgs/development/libraries/libgpg-error/default.nix b/pkgs/development/libraries/libgpg-error/default.nix index da142a957ad7..8ce9a10701ec 100644 --- a/pkgs/development/libraries/libgpg-error/default.nix +++ b/pkgs/development/libraries/libgpg-error/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, bash }: +{ stdenv, fetchurl, bash, gettext }: stdenv.mkDerivation (rec { name = "libgpg-error-1.12"; @@ -8,6 +8,10 @@ stdenv.mkDerivation (rec { sha256 = "0pz58vr12qihq2f0bypjxsb6cf6ajq5258fmfm8s6lvwm3b9xz6a"; }; + # If architecture-dependant MO files aren't available, they're generated + # during build, so we need gettext for cross-builds. + crossAttrs.buildInputs = [ gettext ]; + doCheck = true; meta = { diff --git a/pkgs/development/libraries/libpng/12.nix b/pkgs/development/libraries/libpng/12.nix index 031e2aa1a914..b7fad76acaa3 100644 --- a/pkgs/development/libraries/libpng/12.nix +++ b/pkgs/development/libraries/libpng/12.nix @@ -1,6 +1,6 @@ { stdenv, fetchurl, zlib, xz }: -assert zlib != null; +assert !(stdenv ? cross) -> zlib != null; stdenv.mkDerivation rec { name = "libpng-1.2.50"; @@ -16,6 +16,11 @@ stdenv.mkDerivation rec { passthru = { inherit zlib; }; + crossAttrs = stdenv.lib.optionalAttrs (stdenv.cross.libc == "libSystem") { + propagatedBuildInputs = []; + passthru = {}; + }; + meta = { description = "The official reference implementation for the PNG file format"; homepage = http://www.libpng.org/pub/png/libpng.html; diff --git a/pkgs/development/libraries/openssl/cert-file.patch b/pkgs/development/libraries/openssl/cert-file.patch index 6b7a60e90267..26b51c0295e0 100644 --- a/pkgs/development/libraries/openssl/cert-file.patch +++ b/pkgs/development/libraries/openssl/cert-file.patch @@ -12,7 +12,7 @@ diff -ru -x '*~' openssl-1.0.0e-orig/crypto/x509/x509_def.c openssl-1.0.0e/crypt #include "cryptlib.h" #include <openssl/crypto.h> #include <openssl/x509.h> -@@ -71,7 +75,19 @@ +@@ -71,7 +75,25 @@ { return(X509_CERT_DIR); } const char *X509_get_default_cert_file(void) @@ -23,9 +23,15 @@ diff -ru -x '*~' openssl-1.0.0e-orig/crypto/x509/x509_def.c openssl-1.0.0e/crypt + if (!init) { + init = 1; + char * s = getenv("OPENSSL_X509_CERT_FILE"); -+ if (s && getuid() == geteuid()) { -+ strncpy(buf, s, sizeof(buf)); -+ buf[sizeof(buf) - 1] = 0; ++ if (s) { ++#ifndef OPENSSL_SYS_WINDOWS ++ if (getuid() == geteuid()) { ++#endif ++ strncpy(buf, s, sizeof(buf)); ++ buf[sizeof(buf) - 1] = 0; ++#ifndef OPENSSL_SYS_WINDOWS ++ } ++#endif + } + } + return buf; diff --git a/pkgs/development/libraries/openssl/default.nix b/pkgs/development/libraries/openssl/default.nix index 7d7ccacd14ad..39e6cb3692d3 100644 --- a/pkgs/development/libraries/openssl/default.nix +++ b/pkgs/development/libraries/openssl/default.nix @@ -8,7 +8,9 @@ let (throw "openssl needs its platform name cross building" null) stdenv.cross; - patchesCross = isCross: + patchesCross = isCross: let + isDarwin = stdenv.isDarwin || (isCross && stdenv.cross.libc == "libSystem"); + in [ # Allow the location of the X509 certificate file (the CA # bundle) to be set through the environment variable # ‘OPENSSL_X509_CERT_FILE’. This is necessary because the @@ -29,7 +31,7 @@ let ./kfreebsd-gnu.patch ] - ++ stdenv.lib.optional stdenv.isDarwin ./darwin-arch.patch; + ++ stdenv.lib.optional isDarwin ./darwin-arch.patch; in @@ -91,6 +93,8 @@ stdenv.mkDerivation { rm $out/bin/c_rehash $out/ssl/misc/CA.pl $out/ssl/misc/tsget ''; configureScript = "./Configure"; + } // stdenv.lib.optionalAttrs (opensslCrossSystem == "darwin64-x86_64-cc") { + CC = "gcc"; }; meta = { diff --git a/pkgs/development/libraries/pcre/default.nix b/pkgs/development/libraries/pcre/default.nix index 51279701d4a5..7138c44da643 100644 --- a/pkgs/development/libraries/pcre/default.nix +++ b/pkgs/development/libraries/pcre/default.nix @@ -1,4 +1,8 @@ -{ stdenv, fetchurl, unicodeSupport ? true, cplusplusSupport ? true }: +{ stdenv, fetchurl, unicodeSupport ? true, cplusplusSupport ? true +, windows ? null +}: + +with stdenv.lib; stdenv.mkDerivation rec { name = "pcre-8.34"; @@ -16,12 +20,16 @@ stdenv.mkDerivation rec { --enable-jit ${if unicodeSupport then "--enable-unicode-properties" else ""} ${if !cplusplusSupport then "--disable-cpp" else ""} - '' + stdenv.lib.optionalString stdenv.isDarwin "CXXFLAGS=-O0"; + '' + optionalString stdenv.isDarwin "CXXFLAGS=-O0"; doCheck = with stdenv; !(isCygwin || isFreeBSD); # XXX: test failure on Cygwin # we are running out of stack on both freeBSDs on Hydra + crossAttrs = optionalAttrs (stdenv.cross.libc == "msvcrt") { + buildInputs = [ windows.mingw_w64_pthreads.crossDrv ]; + }; + meta = { homepage = "http://www.pcre.org/"; description = "A library for Perl Compatible Regular Expressions"; @@ -35,7 +43,7 @@ stdenv.mkDerivation rec { PCRE library is free, even for building proprietary software. ''; - platforms = stdenv.lib.platforms.all; - maintainers = [ stdenv.lib.maintainers.simons ]; + platforms = platforms.all; + maintainers = [ maintainers.simons ]; }; } diff --git a/pkgs/development/libraries/qt-4.x/4.8/default.nix b/pkgs/development/libraries/qt-4.x/4.8/default.nix index 16bd1ee65d2e..1bd027f52986 100644 --- a/pkgs/development/libraries/qt-4.x/4.8/default.nix +++ b/pkgs/development/libraries/qt-4.x/4.8/default.nix @@ -148,8 +148,7 @@ stdenv.mkDerivation rec { ''; crossAttrs = let - isMingw = stdenv.cross.config == "i686-pc-mingw32" || - stdenv.cross.config == "x86_64-w64-mingw32"; + isMingw = stdenv.cross.libc == "msvcrt"; in { # I've not tried any case other than i686-pc-mingw32. # -nomake tools: it fails linking some asian language symbols diff --git a/pkgs/development/libraries/zlib/default.nix b/pkgs/development/libraries/zlib/default.nix index 0d4abaf25e0a..37675e4a5bca 100644 --- a/pkgs/development/libraries/zlib/default.nix +++ b/pkgs/development/libraries/zlib/default.nix @@ -36,6 +36,8 @@ stdenv.mkDerivation rec { "-f" "win32/Makefile.gcc" "PREFIX=${stdenv.cross.config}-" ] ++ (if static then [] else [ "SHARED_MODE=1" ]); + } // stdenv.lib.optionalAttrs (stdenv.cross.libc == "libSystem") { + makeFlags = [ "RANLIB=${stdenv.cross.config}-ranlib" ]; }; # zlib doesn't like the automatic --disable-shared from the Cygwin stdenv. diff --git a/pkgs/development/mobile/xpwn/default.nix b/pkgs/development/mobile/xpwn/default.nix new file mode 100644 index 000000000000..b248107141f5 --- /dev/null +++ b/pkgs/development/mobile/xpwn/default.nix @@ -0,0 +1,28 @@ +{ stdenv, fetchgit, cmake, zlib, libpng, bzip2, libusb, openssl }: + +stdenv.mkDerivation { + name = "xpwn-0.5.8git"; + + src = fetchgit { + url = "git://github.com/dborca/xpwn.git"; + rev = "4534da88d4e8a32cdc9da9b5326e2cc482c95ef0"; + sha256 = + "1h1ak40fg5bym0hifpii9q2hqdp2m387cwfzb4bl6qq36xpkd6wv"; + }; + + preConfigure = '' + sed -r -i \ + -e 's/(install.*TARGET.*DESTINATION )\.\)/\1bin)/' \ + -e 's!(install.*(FILE|DIR).*DESTINATION )([^)]*)!\1share/xpwn/\3!' \ + */CMakeLists.txt + sed -i -e '/install/d' CMakeLists.txt + ''; + + buildInputs = [ cmake zlib libpng bzip2 libusb openssl ]; + + meta = { + homepage = "http://planetbeing.lighthouseapp.com/projects/15246-xpwn"; + description = "Custom NOR firmware loader/IPSW generator for the iPhone"; + license = stdenv.lib.licenses.gpl3Plus; + }; +} diff --git a/pkgs/development/tools/build-managers/cmake/default.nix b/pkgs/development/tools/build-managers/cmake/default.nix index 9ce69374cd88..42277b22036b 100644 --- a/pkgs/development/tools/build-managers/cmake/default.nix +++ b/pkgs/development/tools/build-managers/cmake/default.nix @@ -26,7 +26,13 @@ stdenv.mkDerivation rec { patches = # Don't search in non-Nix locations such as /usr, but do search in # Nixpkgs' Glibc. - optional (stdenv ? glibc) ./search-path.patch; + optional (stdenv ? glibc) ./search-path.patch ++ + optional (stdenv ? cross) (fetchurl { + name = "fix-darwin-cross-compile.patch"; + url = "http://public.kitware.com/Bug/file_download.php?" + + "file_id=4981&type=bug"; + sha256 = "16acmdr27adma7gs9rs0dxdiqppm15vl3vv3agy7y8s94wyh4ybv"; + }); buildInputs = [ curl expat zlib bzip2 libarchive ] ++ optional useNcurses ncurses diff --git a/pkgs/development/tools/misc/binutils-cross/builder.sh b/pkgs/development/tools/misc/binutils-cross/builder.sh deleted file mode 100644 index 29d3b3779b6a..000000000000 --- a/pkgs/development/tools/misc/binutils-cross/builder.sh +++ /dev/null @@ -1,26 +0,0 @@ -source $stdenv/setup - -if test $cross = "arm-linux" ; then - configureFlags="--target=arm-linux" -elif test $cross = "mips-linux" ; then - configureFlags="--target=mips-linux" -elif test $cross = "mipsel-linux" ; then - configureFlags="--target=mipsel-linux" -elif test $cross = "sparc-linux" ; then - configureFlags="--target=sparc-linux" -elif test $cross = "powerpc-linux" ; then - configureFlags="--target=powerpc-linux" -elif test $cross = "ppc-linux" ; then - configureFlags="--target=powerpc-linux" -fi - -patchConfigure() { - # Clear the default library search path. - if test "$noSysDirs" = "1"; then - echo 'NATIVE_LIB_DIRS=' >> ld/configure.tgt - fi -} - -preConfigure=patchConfigure - -genericBuild diff --git a/pkgs/development/tools/misc/binutils-cross/default.nix b/pkgs/development/tools/misc/binutils-cross/default.nix deleted file mode 100644 index 7d77baced373..000000000000 --- a/pkgs/development/tools/misc/binutils-cross/default.nix +++ /dev/null @@ -1,13 +0,0 @@ -{stdenv, fetchurl, noSysDirs, cross}: - -stdenv.mkDerivation { - name = "binutils-2.16.1"; - builder = ./builder.sh; - src = fetchurl { - url = http://ftp.nluug.nl/gnu/binutils/binutils-2.16.1.tar.bz2; - md5 = "6a9d529efb285071dad10e1f3d2b2967"; - }; - inherit noSysDirs; - #configureFlags = if cross=="arm-linux" then "--target=arm-linux" else if cross=="mips-linux" then "--target=mips-linux" else if cross=="sparc-linux" then "--target=sparc-linux"; - inherit cross; -} diff --git a/pkgs/os-specific/da |