Merge pull request #26884 from obsidiansystems/purge-stdenv-cross

Purge stdenv cross

authored by John Ericson and committed by GitHub e1faeb57 425e9ce4

+305 -344
-5
doc/cross-compilation.xml
··· 79 </listitem> 80 </varlistentry> 81 </variablelist> 82 - <note><para> 83 - If you dig around nixpkgs, you may notice there is also <varname>stdenv.cross</varname>. 84 - This field defined as <varname>hostPlatform</varname> when the host and build platforms differ, but otherwise not defined at all. 85 - This field is obsolete and will soon disappear—please do not use it. 86 - </para></note> 87 <para> 88 The exact schema these fields follow is a bit ill-defined due to a long and convoluted evolution, but this is slowly being cleaned up. 89 You can see examples of ones used in practice in <literal>lib.systems.examples</literal>; note how they are not all very consistent.
··· 79 </listitem> 80 </varlistentry> 81 </variablelist> 82 <para> 83 The exact schema these fields follow is a bit ill-defined due to a long and convoluted evolution, but this is slowly being cleaned up. 84 You can see examples of ones used in practice in <literal>lib.systems.examples</literal>; note how they are not all very consistent.
-3
pkgs/applications/editors/vim/default.nix
··· 36 "ac_cv_sizeof_int=4" 37 "vim_cv_memmove_handles_overlap=yes" 38 "vim_cv_memmove_handles_overlap=yes" 39 - 40 - # TODO(@Ericson2314): wont' be needed soon. 41 - "STRIP=${hostPlatform.config}-strip" 42 ]; 43 44 postInstall = ''
··· 36 "ac_cv_sizeof_int=4" 37 "vim_cv_memmove_handles_overlap=yes" 38 "vim_cv_memmove_handles_overlap=yes" 39 ]; 40 41 postInstall = ''
+4 -3
pkgs/applications/graphics/ImageMagick/7.0.nix
··· 2 , bzip2, zlib, libX11, libXext, libXt, fontconfig, freetype, ghostscript, libjpeg 3 , lcms2, openexr, libpng, librsvg, libtiff, libxml2, openjpeg, libwebp 4 , ApplicationServices 5 }: 6 7 let ··· 47 [ "--with-gs-font-dir=${ghostscript}/share/ghostscript/fonts" 48 "--with-gslib" 49 ] 50 - ++ lib.optionals (stdenv.cross.libc or null == "msvcrt") 51 [ "--enable-static" "--disable-shared" ] # due to libxml2 being without DLLs ATM 52 ; 53 ··· 57 [ zlib fontconfig freetype ghostscript 58 libpng libtiff libxml2 59 ] 60 - ++ lib.optionals (stdenv.cross.libc or null != "msvcrt") 61 [ openexr librsvg openjpeg ] 62 ++ lib.optional stdenv.isDarwin ApplicationServices; 63 64 propagatedBuildInputs = 65 [ bzip2 freetype libjpeg lcms2 ] 66 - ++ lib.optionals (stdenv.cross.libc or null != "msvcrt") 67 [ libX11 libXext libXt libwebp ] 68 ; 69
··· 2 , bzip2, zlib, libX11, libXext, libXt, fontconfig, freetype, ghostscript, libjpeg 3 , lcms2, openexr, libpng, librsvg, libtiff, libxml2, openjpeg, libwebp 4 , ApplicationServices 5 + , buildPlatform, hostPlatform 6 }: 7 8 let ··· 48 [ "--with-gs-font-dir=${ghostscript}/share/ghostscript/fonts" 49 "--with-gslib" 50 ] 51 + ++ lib.optionals hostPlatform.isMinGW 52 [ "--enable-static" "--disable-shared" ] # due to libxml2 being without DLLs ATM 53 ; 54 ··· 58 [ zlib fontconfig freetype ghostscript 59 libpng libtiff libxml2 60 ] 61 + ++ lib.optionals (!hostPlatform.isMinGW) 62 [ openexr librsvg openjpeg ] 63 ++ lib.optional stdenv.isDarwin ApplicationServices; 64 65 propagatedBuildInputs = 66 [ bzip2 freetype libjpeg lcms2 ] 67 + ++ lib.optionals (!hostPlatform.isMinGW) 68 [ libX11 libXext libXt libwebp ] 69 ; 70
+5 -4
pkgs/applications/graphics/ImageMagick/default.nix
··· 2 , bzip2, zlib, libX11, libXext, libXt, fontconfig, freetype, ghostscript, libjpeg 3 , lcms2, openexr, libpng, librsvg, libtiff, libxml2, openjpeg, libwebp 4 , ApplicationServices 5 }: 6 7 let ··· 18 } 19 # Freeze version on mingw so we don't need to port the patch too often. 20 # FIXME: This version has multiple security vulnerabilities 21 - // lib.optionalAttrs (stdenv.cross.libc or null == "msvcrt") { 22 version = "6.9.2-0"; 23 sha256 = "17ir8bw1j7g7srqmsz3rx780sgnc21zfn0kwyj78iazrywldx8h7"; 24 patches = [(fetchpatch { ··· 59 [ "--with-gs-font-dir=${ghostscript}/share/ghostscript/fonts" 60 "--with-gslib" 61 ] 62 - ++ lib.optionals (stdenv.cross.libc or null == "msvcrt") 63 [ "--enable-static" "--disable-shared" ] # due to libxml2 being without DLLs ATM 64 ; 65 ··· 69 [ zlib fontconfig freetype ghostscript 70 libpng libtiff libxml2 71 ] 72 - ++ lib.optionals (stdenv.cross.libc or null != "msvcrt") 73 [ openexr librsvg openjpeg ] 74 ++ lib.optional stdenv.isDarwin ApplicationServices; 75 76 propagatedBuildInputs = 77 [ bzip2 freetype libjpeg lcms2 ] 78 - ++ lib.optionals (stdenv.cross.libc or null != "msvcrt") 79 [ libX11 libXext libXt libwebp ] 80 ; 81
··· 2 , bzip2, zlib, libX11, libXext, libXt, fontconfig, freetype, ghostscript, libjpeg 3 , lcms2, openexr, libpng, librsvg, libtiff, libxml2, openjpeg, libwebp 4 , ApplicationServices 5 + , buildPlatform, hostPlatform 6 }: 7 8 let ··· 19 } 20 # Freeze version on mingw so we don't need to port the patch too often. 21 # FIXME: This version has multiple security vulnerabilities 22 + // lib.optionalAttrs (hostPlatform.isMinGW) { 23 version = "6.9.2-0"; 24 sha256 = "17ir8bw1j7g7srqmsz3rx780sgnc21zfn0kwyj78iazrywldx8h7"; 25 patches = [(fetchpatch { ··· 60 [ "--with-gs-font-dir=${ghostscript}/share/ghostscript/fonts" 61 "--with-gslib" 62 ] 63 + ++ lib.optionals (hostPlatform.isMinGW) 64 [ "--enable-static" "--disable-shared" ] # due to libxml2 being without DLLs ATM 65 ; 66 ··· 70 [ zlib fontconfig freetype ghostscript 71 libpng libtiff libxml2 72 ] 73 + ++ lib.optionals (!hostPlatform.isMinGW) 74 [ openexr librsvg openjpeg ] 75 ++ lib.optional stdenv.isDarwin ApplicationServices; 76 77 propagatedBuildInputs = 78 [ bzip2 freetype libjpeg lcms2 ] 79 + ++ lib.optionals (!hostPlatform.isMinGW) 80 [ libX11 libXext libXt libwebp ] 81 ; 82
-4
pkgs/applications/graphics/fbida/default.nix
··· 21 sed -e 's@ cpp\>@ gcc -E -@' -i GNUmakefile 22 ''; 23 24 - crossAttrs = { 25 - makeFlags = makeFlags ++ [ "CC=${stdenv.cross.config}-gcc" "STRIP=" ]; 26 - }; 27 - 28 meta = with stdenv.lib; { 29 description = "Image viewing and manipulation programs"; 30 homepage = https://www.kraxel.org/blog/linux/fbida/;
··· 21 sed -e 's@ cpp\>@ gcc -E -@' -i GNUmakefile 22 ''; 23 24 meta = with stdenv.lib; { 25 description = "Image viewing and manipulation programs"; 26 homepage = https://www.kraxel.org/blog/linux/fbida/;
-1
pkgs/applications/networking/offrss/default.nix
··· 13 preConfigure = '' 14 sed 's/^PDF/#PDF/' -i Makefile 15 ''; 16 - makeFlags = "CC=${stdenv.cross.config}-gcc"; 17 }; 18 19 buildInputs = [ curl libmrss podofo ]
··· 13 preConfigure = '' 14 sed 's/^PDF/#PDF/' -i Makefile 15 ''; 16 }; 17 18 buildInputs = [ curl libmrss podofo ]
+1 -1
pkgs/applications/version-management/fossil/default.nix
··· 37 38 crossAttrs = { 39 doCheck = false; 40 - makeFlagsArray = [ "TCC=${stdenv.cross.config}-gcc" ]; 41 }; 42 43 meta = {
··· 37 38 crossAttrs = { 39 doCheck = false; 40 + makeFlags = [ "TCC=$CC" ]; 41 }; 42 43 meta = {
+6 -3
pkgs/applications/video/omxplayer/default.nix
··· 1 - { stdenv, fetchurl, raspberrypifw, pcre, boost, freetype, zlib }: 2 3 let 4 ffmpeg = stdenv.mkDerivation rec { ··· 46 crossAttrs = { 47 configurePlatforms = []; 48 configureFlags = configureFlags ++ [ 49 - "--cross-prefix=${stdenv.cross.config}-" 50 "--enable-cross-compile" 51 "--target_os=linux" 52 - "--arch=${stdenv.cross.arch}" 53 ]; 54 }; 55
··· 1 + { stdenv, fetchurl 2 + , raspberrypifw, pcre, boost, freetype, zlib 3 + , hostPlatform 4 + }: 5 6 let 7 ffmpeg = stdenv.mkDerivation rec { ··· 49 crossAttrs = { 50 configurePlatforms = []; 51 configureFlags = configureFlags ++ [ 52 + "--cross-prefix=${stdenv.cc.prefix}" 53 "--enable-cross-compile" 54 "--target_os=linux" 55 + "--arch=${hostPlatform.arch}" 56 ]; 57 }; 58
+1 -1
pkgs/build-support/cc-wrapper/default.nix
··· 71 72 '' + stdenv.lib.optionalString (textFile == ./setup-hook.sh) '' 73 cat << 'EOF' >> $out 74 - for CMD in ar as nm objcopy ranlib strip strings size ld 75 do 76 # which is not part of stdenv, but compgen will do for now 77 if
··· 71 72 '' + stdenv.lib.optionalString (textFile == ./setup-hook.sh) '' 73 cat << 'EOF' >> $out 74 + for CMD in ar as nm objcopy ranlib strip strings size ld windres 75 do 76 # which is not part of stdenv, but compgen will do for now 77 if
+16 -10
pkgs/build-support/gcc-wrapper-old/default.nix
··· 8 { name ? "", stdenv, lib, nativeTools, nativeLibc, nativePrefix ? "" 9 , gcc ? null, libc ? null, binutils ? null, coreutils ? null, shell ? "" 10 , zlib ? null 11 }: 12 13 assert nativeTools -> nativePrefix != ""; ··· 69 # the style in the gcc-cross-wrapper, but to keep a stable stdenv now I 70 # do this sufficient if/else. 71 dynamicLinker = 72 - (if stdenv.cross.arch == "arm" then "ld-linux.so.3" else 73 - if stdenv.cross.arch == "mips" then "ld.so.1" else 74 - if stdenv.lib.hasSuffix "pc-gnu" stdenv.cross.config then "ld.so.1" else 75 abort "don't know the name of the dynamic linker for this platform"); 76 }; 77 ··· 85 + " (wrapper script)"; 86 }; 87 88 - # The dynamic linker has different names on different Linux platforms. 89 dynamicLinker = 90 if !nativeLibc then 91 - (if stdenv.system == "i686-linux" then "ld-linux.so.2" else 92 - if stdenv.system == "x86_64-linux" then "ld-linux-x86-64.so.2" else 93 # ARM with a wildcard, which can be "" or "-armhf". 94 - if stdenv.isArm then "ld-linux*.so.3" else 95 - if stdenv.system == "powerpc-linux" then "ld.so.1" else 96 - if stdenv.system == "mips64el-linux" then "ld.so.1" else 97 - abort "don't know the name of the dynamic linker for this platform") 98 else ""; 99 }
··· 8 { name ? "", stdenv, lib, nativeTools, nativeLibc, nativePrefix ? "" 9 , gcc ? null, libc ? null, binutils ? null, coreutils ? null, shell ? "" 10 , zlib ? null 11 + , hostPlatform, targetPlatform 12 }: 13 14 assert nativeTools -> nativePrefix != ""; ··· 70 # the style in the gcc-cross-wrapper, but to keep a stable stdenv now I 71 # do this sufficient if/else. 72 dynamicLinker = 73 + (if hostPlatform.arch == "arm" then "ld-linux.so.3" else 74 + if hostPlatform.arch == "mips" then "ld.so.1" else 75 + if stdenv.lib.hasSuffix "pc-gnu" hostPlatform.config then "ld.so.1" else 76 abort "don't know the name of the dynamic linker for this platform"); 77 }; 78 ··· 86 + " (wrapper script)"; 87 }; 88 89 + # The dynamic linker has different names on different platforms. 90 dynamicLinker = 91 if !nativeLibc then 92 + (if targetPlatform.system == "i686-linux" then "ld-linux.so.2" else 93 + if targetPlatform.system == "x86_64-linux" then "ld-linux-x86-64.so.2" else 94 # ARM with a wildcard, which can be "" or "-armhf". 95 + if targetPlatform.isArm32 then "ld-linux*.so.3" else 96 + if targetPlatform.system == "aarch64-linux" then "ld-linux-aarch64.so.1" else 97 + if targetPlatform.system == "powerpc-linux" then "ld.so.1" else 98 + if targetPlatform.system == "mips64el-linux" then "ld.so.1" else 99 + if targetPlatform.system == "x86_64-darwin" then "/usr/lib/dyld" else 100 + if stdenv.lib.hasSuffix "pc-gnu" targetPlatform.config then "ld.so.1" else 101 + builtins.trace 102 + "Don't know the name of the dynamic linker for platform ${targetPlatform.config}, so guessing instead." 103 + null) 104 else ""; 105 }
+5 -7
pkgs/build-support/kernel/make-initrd.nix
··· 12 # `contents = {object = ...; symlink = /init;}' is a typical 13 # argument. 14 15 - { stdenv, perl, cpio, contents, ubootChooser, compressor, prepend }: 16 17 let 18 inputsFun = ubootName : [ perl cpio ] ··· 22 stdenv.mkDerivation { 23 name = "initrd"; 24 builder = ./make-initrd.sh; 25 - nativeBuildInputs = inputsFun stdenv.platform.uboot; 26 27 - makeUInitrd = makeUInitrdFun stdenv.platform.uboot; 28 29 # !!! should use XML. 30 objects = map (x: x.object) contents; ··· 36 map (x: [("closure-" + baseNameOf x.symlink) x.object]) contents; 37 pathsFromGraph = ./paths-from-graph.pl; 38 39 - crossAttrs = { 40 - nativeBuildInputs = inputsFun stdenv.cross.platform.uboot; 41 - makeUInitrd = makeUInitrdFun stdenv.cross.platform.uboot; 42 - }; 43 inherit compressor prepend; 44 }
··· 12 # `contents = {object = ...; symlink = /init;}' is a typical 13 # argument. 14 15 + { stdenv, perl, cpio, contents, ubootChooser, compressor, prepend 16 + , hostPlatform 17 + }: 18 19 let 20 inputsFun = ubootName : [ perl cpio ] ··· 24 stdenv.mkDerivation { 25 name = "initrd"; 26 builder = ./make-initrd.sh; 27 + nativeBuildInputs = inputsFun hostPlatform.platform.uboot; 28 29 + makeUInitrd = makeUInitrdFun hostPlatform.platform.uboot; 30 31 # !!! should use XML. 32 objects = map (x: x.object) contents; ··· 38 map (x: [("closure-" + baseNameOf x.symlink) x.object]) contents; 39 pathsFromGraph = ./paths-from-graph.pl; 40 41 inherit compressor prepend; 42 }
+4 -2
pkgs/development/interpreters/guile/2.0.nix
··· 1 { fetchurl, stdenv, libtool, readline, gmp, pkgconfig, boehmgc, libunistring 2 - , libffi, gawk, makeWrapper, fetchpatch, coverageAnalysis ? null, gnu ? null }: 3 4 # Do either a coverage analysis build or a standard build. 5 (if coverageAnalysis != null ··· 84 setupHook = ./setup-hook-2.0.sh; 85 86 crossAttrs.preConfigure = 87 - stdenv.lib.optionalString (stdenv.cross.config == "i586-pc-gnu") 88 # On GNU, libgc depends on libpthread, but the cross linker doesn't 89 # know where to find libpthread, which leads to erroneous test failures 90 # in `configure', where `-pthread' and `-lpthread' aren't explicitly
··· 1 { fetchurl, stdenv, libtool, readline, gmp, pkgconfig, boehmgc, libunistring 2 + , libffi, gawk, makeWrapper, fetchpatch, coverageAnalysis ? null, gnu ? null 3 + , hostPlatform 4 + }: 5 6 # Do either a coverage analysis build or a standard build. 7 (if coverageAnalysis != null ··· 86 setupHook = ./setup-hook-2.0.sh; 87 88 crossAttrs.preConfigure = 89 + stdenv.lib.optionalString (hostPlatform.isHurd) 90 # On GNU, libgc depends on libpthread, but the cross linker doesn't 91 # know where to find libpthread, which leads to erroneous test failures 92 # in `configure', where `-pthread' and `-lpthread' aren't explicitly
+4 -2
pkgs/development/interpreters/guile/default.nix
··· 1 { fetchurl, stdenv, libtool, readline, gmp, pkgconfig, boehmgc, libunistring 2 - , libffi, gawk, makeWrapper, fetchpatch, coverageAnalysis ? null, gnu ? null }: 3 4 # Do either a coverage analysis build or a standard build. 5 (if coverageAnalysis != null ··· 80 setupHook = ./setup-hook-2.2.sh; 81 82 crossAttrs.preConfigure = 83 - stdenv.lib.optionalString (stdenv.cross.config == "i586-pc-gnu") 84 # On GNU, libgc depends on libpthread, but the cross linker doesn't 85 # know where to find libpthread, which leads to erroneous test failures 86 # in `configure', where `-pthread' and `-lpthread' aren't explicitly
··· 1 { fetchurl, stdenv, libtool, readline, gmp, pkgconfig, boehmgc, libunistring 2 + , libffi, gawk, makeWrapper, fetchpatch, coverageAnalysis ? null, gnu ? null 3 + , hostPlatform 4 + }: 5 6 # Do either a coverage analysis build or a standard build. 7 (if coverageAnalysis != null ··· 82 setupHook = ./setup-hook-2.2.sh; 83 84 crossAttrs.preConfigure = 85 + stdenv.lib.optionalString (hostPlatform.isHurd) 86 # On GNU, libgc depends on libpthread, but the cross linker doesn't 87 # know where to find libpthread, which leads to erroneous test failures 88 # in `configure', where `-pthread' and `-lpthread' aren't explicitly
+4 -8
pkgs/development/interpreters/lua-5/5.2.nix
··· 1 - { stdenv, fetchurl, readline, compat ? false }: 2 3 let 4 dsoPatch = fetchurl { ··· 55 ''; 56 57 crossAttrs = let 58 - isMingw = stdenv.cross.libc == "msvcrt"; 59 - isDarwin = stdenv.cross.libc == "libSystem"; 60 in { 61 configurePhase = '' 62 makeFlagsArray=( 63 INSTALL_TOP=$out 64 INSTALL_MAN=$out/share/man/man1 65 - CC=${stdenv.cross.config}-gcc 66 - STRIP=: 67 - RANLIB=${stdenv.cross.config}-ranlib 68 V=${luaversion} 69 R=${version} 70 ${if isMingw then "mingw" else stdenv.lib.optionalString isDarwin '' 71 - AR="${stdenv.cross.config}-ar rcu" 72 - macosx 73 ''} 74 ) 75 '' + stdenv.lib.optionalString isMingw ''
··· 1 + { stdenv, fetchurl, readline, compat ? false 2 + , hostPlatform 3 + }: 4 5 let 6 dsoPatch = fetchurl { ··· 57 ''; 58 59 crossAttrs = let 60 + inherit (hostPlatform) isDarwin isMingw; 61 in { 62 configurePhase = '' 63 makeFlagsArray=( 64 INSTALL_TOP=$out 65 INSTALL_MAN=$out/share/man/man1 66 V=${luaversion} 67 R=${version} 68 ${if isMingw then "mingw" else stdenv.lib.optionalString isDarwin '' 69 ''} 70 ) 71 '' + stdenv.lib.optionalString isMingw ''
+4 -8
pkgs/development/interpreters/lua-5/5.3.nix
··· 1 - { stdenv, fetchurl, readline, compat ? false }: 2 3 stdenv.mkDerivation rec { 4 name = "lua-${version}"; ··· 54 ''; 55 56 crossAttrs = let 57 - isMingw = stdenv.cross.libc == "msvcrt"; 58 - isDarwin = stdenv.cross.libc == "libSystem"; 59 in { 60 configurePhase = '' 61 makeFlagsArray=( 62 INSTALL_TOP=$out 63 INSTALL_MAN=$out/share/man/man1 64 - CC=${stdenv.cross.config}-gcc 65 - STRIP=: 66 - RANLIB=${stdenv.cross.config}-ranlib 67 V=${luaversion} 68 R=${version} 69 ${if isMingw then "mingw" else stdenv.lib.optionalString isDarwin '' 70 - AR="${stdenv.cross.config}-ar rcu" 71 - macosx 72 ''} 73 ) 74 '' + stdenv.lib.optionalString isMingw ''
··· 1 + { stdenv, fetchurl, readline, compat ? false 2 + , hostPlatform 3 + }: 4 5 stdenv.mkDerivation rec { 6 name = "lua-${version}"; ··· 56 ''; 57 58 crossAttrs = let 59 + inherit (hostPlatform) isDarwin isMingw; 60 in { 61 configurePhase = '' 62 makeFlagsArray=( 63 INSTALL_TOP=$out 64 INSTALL_MAN=$out/share/man/man1 65 V=${luaversion} 66 R=${version} 67 ${if isMingw then "mingw" else stdenv.lib.optionalString isDarwin '' 68 ''} 69 ) 70 '' + stdenv.lib.optionalString isMingw ''
+6 -6
pkgs/development/libraries/SDL/default.nix
··· 1 { stdenv, fetchurl, fetchpatch, pkgconfig, audiofile, libcap 2 , openglSupport ? false, mesa_noglu, mesa_glu 3 , alsaSupport ? true, alsaLib 4 - , x11Support ? true, libXext, libICE, libXrandr 5 , pulseaudioSupport ? true, libpulseaudio 6 , OpenGL, CoreAudio, CoreServices, AudioUnit, Kernel, Cocoa 7 }: 8 9 # OSS is no longer supported, for it's much crappier than ALSA and 10 # PulseAudio. 11 - assert (stdenv.isLinux && !(stdenv ? cross)) -> alsaSupport || pulseaudioSupport; 12 13 let 14 inherit (stdenv.lib) optional optionals; ··· 37 optional stdenv.isDarwin Cocoa; 38 39 buildInputs = let 40 - notMingw = !(stdenv ? cross) || stdenv.cross.libc != "msvcrt"; 41 in optional notMingw audiofile 42 ++ optionals stdenv.isDarwin [ OpenGL CoreAudio CoreServices AudioUnit Kernel ]; 43 ··· 52 "--enable-rpath" 53 "--disable-pulseaudio-shared" 54 "--disable-osmesa-shared" 55 - ] ++ optionals (stdenv ? cross) ([ 56 - "--without-x" 57 - ] ++ optional alsaSupport "--with-alsa-prefix=${alsaLib.out}/lib"); 58 59 patches = [ 60 # Fix window resizing issues, e.g. for xmonad
··· 1 { stdenv, fetchurl, fetchpatch, pkgconfig, audiofile, libcap 2 , openglSupport ? false, mesa_noglu, mesa_glu 3 , alsaSupport ? true, alsaLib 4 + , x11Support ? hostPlatform == buildPlatform, libXext, libICE, libXrandr 5 , pulseaudioSupport ? true, libpulseaudio 6 , OpenGL, CoreAudio, CoreServices, AudioUnit, Kernel, Cocoa 7 + , hostPlatform, buildPlatform 8 }: 9 10 # OSS is no longer supported, for it's much crappier than ALSA and 11 # PulseAudio. 12 + assert hostPlatform.isLinux -> alsaSupport || pulseaudioSupport; 13 14 let 15 inherit (stdenv.lib) optional optionals; ··· 38 optional stdenv.isDarwin Cocoa; 39 40 buildInputs = let 41 + notMingw = !hostPlatform.isMinGW; 42 in optional notMingw audiofile 43 ++ optionals stdenv.isDarwin [ OpenGL CoreAudio CoreServices AudioUnit Kernel ]; 44 ··· 53 "--enable-rpath" 54 "--disable-pulseaudio-shared" 55 "--disable-osmesa-shared" 56 + ] ++ optional (!x11Support) "--without-x" 57 + ++ optional (alsaSupport && hostPlatform != buildPlatform) "--with-alsa-prefix=${alsaLib.out}/lib"; 58 59 patches = [ 60 # Fix window resizing issues, e.g. for xmonad
+4 -2
pkgs/development/libraries/boehm-gc/default.nix
··· 1 - { lib, stdenv, fetchurl, pkgconfig, libatomic_ops, enableLargeConfig ? false }: 2 3 stdenv.mkDerivation rec { 4 name = "boehm-gc-7.6.0"; ··· 20 doCheck = true; 21 22 # Don't run the native `strip' when cross-compiling. 23 - dontStrip = stdenv ? cross; 24 25 postInstall = 26 ''
··· 1 + { lib, stdenv, fetchurl, pkgconfig, libatomic_ops, enableLargeConfig ? false 2 + , buildPlatform, hostPlatform 3 + }: 4 5 stdenv.mkDerivation rec { 6 name = "boehm-gc-7.6.0"; ··· 22 doCheck = true; 23 24 # Don't run the native `strip' when cross-compiling. 25 + dontStrip = hostPlatform != buildPlatform; 26 27 postInstall = 28 ''
+9 -8
pkgs/development/libraries/boost/generic.nix
··· 1 { stdenv, fetchurl, icu, expat, zlib, bzip2, python, fixDarwinDylibNames, libiconv 2 , toolset ? if stdenv.cc.isClang then "clang" else null 3 , enableRelease ? true 4 , enableDebug ? false 5 , enableSingleThreaded ? false 6 , enableMultiThreaded ? true 7 - , enableShared ? !(stdenv.cross.libc or null == "msvcrt") # problems for now 8 , enableStatic ? !enableShared 9 , enablePIC ? false 10 , enableExceptions ? false ··· 76 "--user-config=user-config.jam" 77 "toolset=gcc-cross" 78 "--without-python" 79 - ] ++ optionals (stdenv.cross.libc == "msvcrt") [ 80 "target-os=windows" 81 "threadapi=win32" 82 "binary-format=pe" 83 - "address-model=${if hasPrefix "x86_64-" stdenv.cross.config then "64" else "32"}" 84 "architecture=x86" 85 ]; 86 crossB2Args = concatStringsSep " " (genericB2Flags ++ crossB2Flags); ··· 110 find include \( -name '*.hpp' -or -name '*.h' -or -name '*.ipp' \) \ 111 -exec sed '1i#line 1 "{}"' -i '{}' \; 112 ) 113 - '' + optionalString (stdenv.cross.libc or null == "msvcrt") '' 114 - ${stdenv.cross.config}-ranlib "$out/lib/"*.a 115 ''; 116 117 in ··· 147 enableParallelBuilding = true; 148 149 buildInputs = [ expat zlib bzip2 libiconv ] 150 - ++ stdenv.lib.optionals (! stdenv ? cross) [ python icu ] 151 ++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames; 152 153 configureScript = "./bootstrap.sh"; 154 configureFlags = commonConfigureFlags 155 ++ [ "--with-python=${python.interpreter}" ] 156 - ++ optional (! stdenv ? cross) "--with-icu=${icu.dev}" 157 ++ optional (toolset != null) "--with-toolset=${toolset}"; 158 159 buildPhase = builder nativeB2Args; ··· 177 buildPhase = builder crossB2Args; 178 installPhase = installer crossB2Args; 179 postFixup = fixup; 180 - } // optionalAttrs (stdenv.cross.libc == "msvcrt") { 181 patches = fetchurl { 182 url = "https://svn.boost.org/trac/boost/raw-attachment/ticket/7262/" 183 + "boost-mingw.patch";
··· 1 { stdenv, fetchurl, icu, expat, zlib, bzip2, python, fixDarwinDylibNames, libiconv 2 + , buildPlatform, hostPlatform 3 , toolset ? if stdenv.cc.isClang then "clang" else null 4 , enableRelease ? true 5 , enableDebug ? false 6 , enableSingleThreaded ? false 7 , enableMultiThreaded ? true 8 + , enableShared ? !(hostPlatform.libc == "msvcrt") # problems for now 9 , enableStatic ? !enableShared 10 , enablePIC ? false 11 , enableExceptions ? false ··· 77 "--user-config=user-config.jam" 78 "toolset=gcc-cross" 79 "--without-python" 80 + ] ++ optionals (hostPlatform.libc == "msvcrt") [ 81 "target-os=windows" 82 "threadapi=win32" 83 "binary-format=pe" 84 + "address-model=${toString hostPlatform.parsed.cpu.bits}" 85 "architecture=x86" 86 ]; 87 crossB2Args = concatStringsSep " " (genericB2Flags ++ crossB2Flags); ··· 111 find include \( -name '*.hpp' -or -name '*.h' -or -name '*.ipp' \) \ 112 -exec sed '1i#line 1 "{}"' -i '{}' \; 113 ) 114 + '' + optionalString (hostPlatform.libc == "msvcrt") '' 115 + ${stdenv.cc.prefix}ranlib "$out/lib/"*.a 116 ''; 117 118 in ··· 148 enableParallelBuilding = true; 149 150 buildInputs = [ expat zlib bzip2 libiconv ] 151 + ++ stdenv.lib.optionals (hostPlatform == buildPlatform) [ python icu ] 152 ++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames; 153 154 configureScript = "./bootstrap.sh"; 155 configureFlags = commonConfigureFlags 156 ++ [ "--with-python=${python.interpreter}" ] 157 + ++ optional (hostPlatform == buildPlatform) "--with-icu=${icu.dev}" 158 ++ optional (toolset != null) "--with-toolset=${toolset}"; 159 160 buildPhase = builder nativeB2Args; ··· 178 buildPhase = builder crossB2Args; 179 installPhase = installer crossB2Args; 180 postFixup = fixup; 181 + } // optionalAttrs (hostPlatform.libc == "msvcrt") { 182 patches = fetchurl { 183 url = "https://svn.boost.org/trac/boost/raw-attachment/ticket/7262/" 184 + "boost-mingw.patch";
+5 -21
pkgs/development/libraries/ffmpeg-full/default.nix
··· 1 { stdenv, fetchurl, pkgconfig, perl, texinfo, yasm 2 /* 3 * Licensing options (yes some are listed twice, filters and such are not listed) 4 */ ··· 428 429 /* Cross-compilation is untested, consider this an outline, more work 430 needs to be done to portions of the build to get it to work correctly */ 431 - crossAttrs = let 432 - os = '' 433 - if [ "${stdenv.cross.config}" = "*cygwin*" ] ; then 434 - # Probably should look for mingw too 435 - echo "cygwin" 436 - elif [ "${stdenv.cross.config}" = "*darwin*" ] ; then 437 - echo "darwin" 438 - elif [ "${stdenv.cross.config}" = "*freebsd*" ] ; then 439 - echo "freebsd" 440 - elif [ "${stdenv.cross.config}" = "*linux*" ] ; then 441 - echo "linux" 442 - elif [ "${stdenv.cross.config}" = "*netbsd*" ] ; then 443 - echo "netbsd" 444 - elif [ "${stdenv.cross.config}" = "*openbsd*" ] ; then 445 - echo "openbsd" 446 - fi 447 - ''; 448 - in { 449 configurePlatforms = []; 450 configureFlags = configureFlags ++ [ 451 - "--cross-prefix=${stdenv.cross.config}-" 452 "--enable-cross-compile" 453 - "--target_os=${os}" 454 - "--arch=${stdenv.cross.arch}" 455 ]; 456 }; 457
··· 1 { stdenv, fetchurl, pkgconfig, perl, texinfo, yasm 2 + , hostPlatform 3 /* 4 * Licensing options (yes some are listed twice, filters and such are not listed) 5 */ ··· 429 430 /* Cross-compilation is untested, consider this an outline, more work 431 needs to be done to portions of the build to get it to work correctly */ 432 + crossAttrs = { 433 configurePlatforms = []; 434 configureFlags = configureFlags ++ [ 435 + "--cross-prefix=${stdenv.cc.prefix}" 436 "--enable-cross-compile" 437 + "--target_os=${hostPlatform.parsed.kernel.name}" 438 + "--arch=${hostPlatform.arch}" 439 ]; 440 }; 441
+5 -21
pkgs/development/libraries/ffmpeg/generic.nix
··· 2 , alsaLib, bzip2, fontconfig, freetype, gnutls, libiconv, lame, libass, libogg 3 , libtheora, libva, libvorbis, libvpx, lzma, libpulseaudio, soxr 4 , x264, x265, xvidcore, zlib, libopus 5 , openglSupport ? false, mesa ? null 6 # Build options 7 , runtimeCpuDetectBuild ? true # Detect CPU capabilities at runtime ··· 169 170 /* Cross-compilation is untested, consider this an outline, more work 171 needs to be done to portions of the build to get it to work correctly */ 172 - crossAttrs = let 173 - os = '' 174 - if [ "${stdenv.cross.config}" = "*cygwin*" ] ; then 175 - # Probably should look for mingw too 176 - echo "cygwin" 177 - elif [ "${stdenv.cross.config}" = "*darwin*" ] ; then 178 - echo "darwin" 179 - elif [ "${stdenv.cross.config}" = "*freebsd*" ] ; then 180 - echo "freebsd" 181 - elif [ "${stdenv.cross.config}" = "*linux*" ] ; then 182 - echo "linux" 183 - elif [ "${stdenv.cross.config}" = "*netbsd*" ] ; then 184 - echo "netbsd" 185 - elif [ "${stdenv.cross.config}" = "*openbsd*" ] ; then 186 - echo "openbsd" 187 - fi 188 - ''; 189 - in { 190 configurePlatforms = []; 191 configureFlags = configureFlags ++ [ 192 - "--cross-prefix=${stdenv.cross.config}-" 193 "--enable-cross-compile" 194 - "--target_os=${os}" 195 - "--arch=${stdenv.cross.arch}" 196 ]; 197 }; 198
··· 2 , alsaLib, bzip2, fontconfig, freetype, gnutls, libiconv, lame, libass, libogg 3 , libtheora, libva, libvorbis, libvpx, lzma, libpulseaudio, soxr 4 , x264, x265, xvidcore, zlib, libopus 5 + , hostPlatform 6 , openglSupport ? false, mesa ? null 7 # Build options 8 , runtimeCpuDetectBuild ? true # Detect CPU capabilities at runtime ··· 170 171 /* Cross-compilation is untested, consider this an outline, more work 172 needs to be done to portions of the build to get it to work correctly */ 173 + crossAttrs = { 174 configurePlatforms = []; 175 configureFlags = configureFlags ++ [ 176 + "--cross-prefix=${stdenv.cc.prefix}" 177 "--enable-cross-compile" 178 + "--target_os=${hostPlatform.parsed.kernel}" 179 + "--arch=${hostPlatform.arch}" 180 ]; 181 }; 182
+4 -2
pkgs/development/libraries/fontconfig/2.10.nix
··· 1 - { stdenv, fetchurl, pkgconfig, freetype, expat }: 2 3 stdenv.mkDerivation rec { 4 name = "fontconfig-2.10.2"; ··· 21 ]; 22 23 # We should find a better way to access the arch reliably. 24 - crossArch = stdenv.cross.arch or null; 25 26 preConfigure = '' 27 if test -n "$crossConfig"; then
··· 1 + { stdenv, fetchurl, pkgconfig, freetype, expat 2 + , hostPlatform 3 + }: 4 5 stdenv.mkDerivation rec { 6 name = "fontconfig-2.10.2"; ··· 23 ]; 24 25 # We should find a better way to access the arch reliably. 26 + crossArch = hostPlatform.arch or null; 27 28 preConfigure = '' 29 if test -n "$crossConfig"; then
+5 -3
pkgs/development/libraries/fontconfig/default.nix
··· 1 - { stdenv, fetchurl, fetchpatch, pkgconfig, freetype, expat, libxslt, dejavu_fonts 2 - , substituteAll }: 3 4 /** Font configuration scheme 5 - ./config-compat.patch makes fontconfig try the following root configs, in order: ··· 53 ]; 54 55 # We should find a better way to access the arch reliably. 56 - crossArch = stdenv.cross.arch or null; 57 58 preConfigure = '' 59 if test -n "$crossConfig"; then
··· 1 + { stdenv, substituteAll, fetchurl, fetchpatch 2 + , pkgconfig, freetype, expat, libxslt, dejavu_fonts 3 + , hostPlatform 4 + }: 5 6 /** Font configuration scheme 7 - ./config-compat.patch makes fontconfig try the following root configs, in order: ··· 55 ]; 56 57 # We should find a better way to access the arch reliably. 58 + crossArch = hostPlatform.arch or null; 59 60 preConfigure = '' 61 if test -n "$crossConfig"; then
+7 -7
pkgs/development/libraries/freetype/default.nix
··· 1 - { 2 - stdenv, lib, fetchurl, copyPathsToStore, 3 - pkgconfig, which, 4 - zlib, bzip2, libpng, gnumake, glib, 5 6 - # FreeType supports LCD filtering (colloquially referred to as sub-pixel rendering). 7 # LCD filtering is also known as ClearType and covered by several Microsoft patents. 8 # This option allows it to be disabled. See http://www.freetype.org/patents.html. 9 - useEncumberedCode ? true, 10 }: 11 12 let ··· 67 68 postInstall = glib.flattenInclude; 69 70 - crossAttrs = stdenv.lib.optionalAttrs (stdenv.cross.libc or null != "msvcrt") { 71 # Somehow it calls the unwrapped gcc, "i686-pc-linux-gnu-gcc", instead 72 # of gcc. I think it's due to the unwrapped gcc being in the PATH. I don't 73 # know why it's on the PATH.
··· 1 + { stdenv, lib, fetchurl, copyPathsToStore 2 + , hostPlatform 3 + , pkgconfig, which 4 + , zlib, bzip2, libpng, gnumake, glib 5 6 + , # FreeType supports LCD filtering (colloquially referred to as sub-pixel rendering). 7 # LCD filtering is also known as ClearType and covered by several Microsoft patents. 8 # This option allows it to be disabled. See http://www.freetype.org/patents.html. 9 + useEncumberedCode ? true 10 }: 11 12 let ··· 67 68 postInstall = glib.flattenInclude; 69 70 + crossAttrs = stdenv.lib.optionalAttrs (hostPlatform.libc or null != "msvcrt") { 71 # Somehow it calls the unwrapped gcc, "i686-pc-linux-gnu-gcc", instead 72 # of gcc. I think it's due to the unwrapped gcc being in the PATH. I don't 73 # know why it's on the PATH.
+7 -9
pkgs/development/libraries/glew/1.10.nix
··· 1 { stdenv, fetchurl, mesa_glu, x11, libXmu, libXi 2 - , AGL ? null }: 3 4 with stdenv.lib; 5 ··· 17 18 patchPhase = '' 19 sed -i 's|lib64|lib|' config/Makefile.linux 20 - ${optionalString (stdenv ? cross) '' 21 sed -i -e 's/\(INSTALL.*\)-s/\1/' Makefile 22 ''} 23 ''; ··· 36 cp -r README.txt LICENSE.txt doc $out/share/doc/glew 37 ''; 38 39 - crossAttrs.makeFlags = [ 40 - "CC=${stdenv.cross.config}-gcc" 41 - "LD=${stdenv.cross.config}-gcc" 42 - "AR=${stdenv.cross.config}-ar" 43 - "STRIP=" 44 - ] ++ optional (stdenv.cross.libc == "msvcrt") "SYSTEM=mingw" 45 - ++ optional (stdenv.cross.libc == "libSystem") "SYSTEM=darwin"; 46 47 meta = with stdenv.lib; { 48 description = "An OpenGL extension loading library for C(++)";
··· 1 { stdenv, fetchurl, mesa_glu, x11, libXmu, libXi 2 + , buildPlatform, hostPlatform 3 + , AGL ? null 4 + }: 5 6 with stdenv.lib; 7 ··· 19 20 patchPhase = '' 21 sed -i 's|lib64|lib|' config/Makefile.linux 22 + ${optionalString (hostPlatform != buildPlatform) '' 23 sed -i -e 's/\(INSTALL.*\)-s/\1/' Makefile 24 ''} 25 ''; ··· 38 cp -r README.txt LICENSE.txt doc $out/share/doc/glew 39 ''; 40 41 + makeFlags = if hostPlatform == buildPlatform then null else [ 42 + "SYSTEM=${if hostPlatform.isMinGW then "mingw" else hostPlatform.parsed.kernel}" 43 + ]; 44 45 meta = with stdenv.lib; { 46 description = "An OpenGL extension loading library for C(++)";
+7 -9
pkgs/development/libraries/glew/default.nix
··· 1 - { stdenv, fetchurl, mesa_glu, xlibsWrapper, libXmu, libXi }: 2 3 with stdenv.lib; 4 ··· 17 18 patchPhase = '' 19 sed -i 's|lib64|lib|' config/Makefile.linux 20 - ${optionalString (stdenv ? cross) '' 21 sed -i -e 's/\(INSTALL.*\)-s/\1/' Makefile 22 ''} 23 ''; ··· 37 rm $out/lib/*.a 38 ''; 39 40 - crossAttrs.makeFlags = [ 41 - "CC=${stdenv.cross.config}-gcc" 42 - "LD=${stdenv.cross.config}-gcc" 43 - "AR=${stdenv.cross.config}-ar" 44 - "STRIP=" 45 - ] ++ optional (stdenv.cross.libc == "msvcrt") "SYSTEM=mingw" 46 - ++ optional (stdenv.cross.libc == "libSystem") "SYSTEM=darwin"; 47 48 meta = with stdenv.lib; { 49 description = "An OpenGL extension loading library for C(++)";
··· 1 + { stdenv, fetchurl, mesa_glu, xlibsWrapper, libXmu, libXi 2 + , buildPlatform, hostPlatform 3 + }: 4 5 with stdenv.lib; 6 ··· 19 20 patchPhase = '' 21 sed -i 's|lib64|lib|' config/Makefile.linux 22 + ${optionalString (hostPlatform != buildPlatform) '' 23 sed -i -e 's/\(INSTALL.*\)-s/\1/' Makefile 24 ''} 25 ''; ··· 39 rm $out/lib/*.a 40 ''; 41 42 + makeFlags = if hostPlatform == buildPlatform then null else [ 43 + "SYSTEM=${if hostPlatform.isMinGW then "mingw" else hostPlatform.parsed.kernel}" 44 + ]; 45 46 meta = with stdenv.lib; { 47 description = "An OpenGL extension loading library for C(++)";
+3 -2
pkgs/development/libraries/libav/default.nix
··· 13 , SDL # only for avplay in $bin, adds nontrivial closure to it 14 , enableGPL ? true # ToDo: some additional default stuff may need GPL 15 , enableUnfree ? faacSupport 16 }: 17 18 assert faacSupport -> enableUnfree; ··· 107 crossAttrs = { 108 configurePlatforms = []; 109 configureFlags = configureFlags ++ [ 110 - "--cross-prefix=${stdenv.cross.config}-" 111 "--enable-cross-compile" 112 "--target_os=linux" 113 - "--arch=${stdenv.cross.arch}" 114 ]; 115 }; 116
··· 13 , SDL # only for avplay in $bin, adds nontrivial closure to it 14 , enableGPL ? true # ToDo: some additional default stuff may need GPL 15 , enableUnfree ? faacSupport 16 + , hostPlatform 17 }: 18 19 assert faacSupport -> enableUnfree; ··· 108 crossAttrs = { 109 configurePlatforms = []; 110 configureFlags = configureFlags ++ [ 111 + "--cross-prefix=${stdenv.cc.prefix}" 112 "--enable-cross-compile" 113 "--target_os=linux" 114 + "--arch=${hostPlatform.arch}" 115 ]; 116 }; 117
+4 -2
pkgs/development/libraries/libffi/default.nix
··· 1 - { fetchurl, stdenv, dejagnu, doCheck ? false }: 2 3 stdenv.mkDerivation rec { 4 name = "libffi-3.2.1"; ··· 21 22 inherit doCheck; 23 24 - dontStrip = stdenv ? cross; # Don't run the native `strip' when cross-compiling. 25 26 # Install headers and libs in the right places. 27 postFixup = ''
··· 1 + { fetchurl, stdenv, dejagnu, doCheck ? false 2 + , buildPlatform, hostPlatform 3 + }: 4 5 stdenv.mkDerivation rec { 6 name = "libffi-3.2.1"; ··· 23 24 inherit doCheck; 25 26 + dontStrip = hostPlatform != buildPlatform; # Don't run the native `strip' when cross-compiling. 27 28 # Install headers and libs in the right places. 29 postFixup = ''
+5 -3
pkgs/development/libraries/libiconv/default.nix
··· 1 - { fetchurl, stdenv, lib }: 2 3 - assert !stdenv.isLinux || stdenv ? cross; # TODO: improve on cross 4 5 stdenv.mkDerivation rec { 6 name = "libiconv-${version}"; ··· 17 ]; 18 19 postPatch = 20 - lib.optionalString ((stdenv ? cross && stdenv.cross.libc == "msvcrt") || stdenv.cc.nativeLibc) 21 '' 22 sed '/^_GL_WARN_ON_USE (gets/d' -i srclib/stdio.in.h 23 '';
··· 1 + { fetchurl, stdenv, lib 2 + , buildPlatform, hostPlatform 3 + }: 4 5 + assert !stdenv.isLinux || hostPlatform != buildPlatform; # TODO: improve on cross 6 7 stdenv.mkDerivation rec { 8 name = "libiconv-${version}"; ··· 19 ]; 20 21 postPatch = 22 + lib.optionalString ((hostPlatform != buildPlatform && hostPlatform.libc == "msvcrt") || stdenv.cc.nativeLibc) 23 '' 24 sed '/^_GL_WARN_ON_USE (gets/d' -i srclib/stdio.in.h 25 '';
+4 -2
pkgs/development/libraries/libjpeg-turbo/default.nix
··· 1 - { stdenv, fetchurl, nasm }: 2 3 stdenv.mkDerivation rec { 4 name = "libjpeg-turbo-${version}"; ··· 10 }; # github releases still need autotools, surprisingly 11 12 patches = 13 - stdenv.lib.optional (stdenv.cross.libc or null == "msvcrt") 14 ./mingw-boolean.patch; 15 16 outputs = [ "bin" "dev" "out" "doc" ];
··· 1 + { stdenv, fetchurl, nasm 2 + , hostPlatform 3 + }: 4 5 stdenv.mkDerivation rec { 6 name = "libjpeg-turbo-${version}"; ··· 12 }; # github releases still need autotools, surprisingly 13 14 patches = 15 + stdenv.lib.optional (hostPlatform.libc or null == "msvcrt") 16 ./mingw-boolean.patch; 17 18 outputs = [ "bin" "dev" "out" "doc" ];
+2 -1
pkgs/development/libraries/libmsgpack/generic.nix
··· 1 { stdenv, cmake 2 , version, src, patches ? [ ] 3 , ... 4 }: 5 ··· 11 nativeBuildInputs = [ cmake ]; 12 13 crossAttrs = { 14 - } // stdenv.lib.optionalAttrs (stdenv.cross.libc == "msvcrt") { 15 cmakeFlags = "-DMSGPACK_BUILD_EXAMPLES=OFF -DCMAKE_SYSTEM_NAME=Windows"; 16 }; 17
··· 1 { stdenv, cmake 2 , version, src, patches ? [ ] 3 + , hostPlatform 4 , ... 5 }: 6 ··· 12 nativeBuildInputs = [ cmake ]; 13 14 crossAttrs = { 15 + } // stdenv.lib.optionalAttrs (hostPlatform.libc == "msvcrt") { 16 cmakeFlags = "-DMSGPACK_BUILD_EXAMPLES=OFF -DCMAKE_SYSTEM_NAME=Windows"; 17 }; 18
+5 -3
pkgs/development/libraries/libpng/12.nix
··· 1 - { stdenv, fetchurl, zlib }: 2 3 - assert !(stdenv ? cross) -> zlib != null; 4 5 stdenv.mkDerivation rec { 6 name = "libpng-1.2.57"; ··· 16 17 passthru = { inherit zlib; }; 18 19 - crossAttrs = stdenv.lib.optionalAttrs (stdenv.cross.libc == "libSystem") { 20 propagatedBuildInputs = []; 21 passthru = {}; 22 };
··· 1 + { stdenv, fetchurl, zlib 2 + , buildPlatform, hostPlatform 3 + }: 4 5 + assert hostPlatform == buildPlatform -> zlib != null; 6 7 stdenv.mkDerivation rec { 8 name = "libpng-1.2.57"; ··· 18 19 passthru = { inherit zlib; }; 20 21 + crossAttrs = stdenv.lib.optionalAttrs (hostPlatform.libc == "libSystem") { 22 propagatedBuildInputs = []; 23 passthru = {}; 24 };
+4 -2
pkgs/development/libraries/libpng/default.nix
··· 1 - { stdenv, fetchurl, zlib, apngSupport ? true }: 2 3 assert zlib != null; 4 ··· 29 30 # it's hard to cross-run tests and some check programs didn't compile anyway 31 makeFlags = stdenv.lib.optional (!doCheck) "check_PROGRAMS="; 32 - doCheck = ! stdenv ? cross; 33 34 passthru = { inherit zlib; }; 35
··· 1 + { stdenv, fetchurl, zlib, apngSupport ? true 2 + , buildPlatform, hostPlatform 3 + }: 4 5 assert zlib != null; 6 ··· 31 32 # it's hard to cross-run tests and some check programs didn't compile anyway 33 makeFlags = stdenv.lib.optional (!doCheck) "check_PROGRAMS="; 34 + doCheck = hostPlatform == buildPlatform; 35 36 passthru = { inherit zlib; }; 37
+4 -2
pkgs/development/libraries/libssh2/default.nix
··· 1 - {stdenv, fetchurlBoot, openssl, zlib, windows}: 2 3 stdenv.mkDerivation rec { 4 name = "libssh2-1.8.0"; ··· 20 "--with-libz" 21 "--with-libz-prefix=${zlib.crossDrv}" 22 ]; 23 - } // stdenv.lib.optionalAttrs (stdenv.cross.libc == "msvcrt") { 24 # mingw needs import library of ws2_32 to build the shared library 25 preConfigure = '' 26 export LDFLAGS="-L${windows.mingw_w64}/lib $LDFLAGS"
··· 1 + { stdenv, fetchurlBoot, openssl, zlib, windows 2 + , hostPlatform 3 + }: 4 5 stdenv.mkDerivation rec { 6 name = "libssh2-1.8.0"; ··· 22 "--with-libz" 23 "--with-libz-prefix=${zlib.crossDrv}" 24 ]; 25 + } // stdenv.lib.optionalAttrs (hostPlatform.libc == "msvcrt") { 26 # mingw needs import library of ws2_32 to build the shared library 27 preConfigure = '' 28 export LDFLAGS="-L${windows.mingw_w64}/lib $LDFLAGS"
+14 -16
pkgs/development/libraries/libvpx/default.nix
··· 1 - {stdenv, fetchFromGitHub, perl, yasm 2 , vp8DecoderSupport ? true # VP8 decoder 3 , vp8EncoderSupport ? true # VP8 encoder 4 , vp9DecoderSupport ? true # VP9 decoder ··· 144 145 postInstall = ''moveToOutput bin "$bin" ''; 146 147 - crossAttrs = let 148 - isCygwin = stdenv.cross.libc == "msvcrt"; 149 - isDarwin = stdenv.cross.libc == "libSystem"; 150 - in { 151 configurePlatforms = []; 152 configureFlags = configureFlags ++ [ 153 #"--extra-cflags=" ··· 159 # libvpx darwin targets include darwin version (ie. ARCH-darwinXX-gcc, XX being the darwin version) 160 # See all_platforms: https://github.com/webmproject/libvpx/blob/master/configure 161 # Darwin versions: 10.4=8, 10.5=9, 10.6=10, 10.7=11, 10.8=12, 10.9=13, 10.10=14 162 - "--force-target=${stdenv.cross.config}${( 163 - if isDarwin then ( 164 - if stdenv.cross.osxMinVersion == "10.10" then "14" 165 - else if stdenv.cross.osxMinVersion == "10.9" then "13" 166 - else if stdenv.cross.osxMinVersion == "10.8" then "12" 167 - else if stdenv.cross.osxMinVersion == "10.7" then "11" 168 - else if stdenv.cross.osxMinVersion == "10.6" then "10" 169 - else if stdenv.cross.osxMinVersion == "10.5" then "9" 170 - else "8") 171 - else "")}-gcc" 172 - (if isCygwin then "--enable-static-msvcrt" else "") 173 ]; 174 }; 175
··· 1 + { stdenv, fetchFromGitHub, perl, yasm 2 + , hostPlatform 3 , vp8DecoderSupport ? true # VP8 decoder 4 , vp8EncoderSupport ? true # VP8 encoder 5 , vp9DecoderSupport ? true # VP9 decoder ··· 145 146 postInstall = ''moveToOutput bin "$bin" ''; 147 148 + crossAttrs = { 149 configurePlatforms = []; 150 configureFlags = configureFlags ++ [ 151 #"--extra-cflags=" ··· 157 # libvpx darwin targets include darwin version (ie. ARCH-darwinXX-gcc, XX being the darwin version) 158 # See all_platforms: https://github.com/webmproject/libvpx/blob/master/configure 159 # Darwin versions: 10.4=8, 10.5=9, 10.6=10, 10.7=11, 10.8=12, 10.9=13, 10.10=14 160 + "--force-target=${hostPlatform.config}${ 161 + if hostPlatform.isDarwin then 162 + if hostPlatform.osxMinVersion == "10.10" then "14" 163 + else if hostPlatform.osxMinVersion == "10.9" then "13" 164 + else if hostPlatform.osxMinVersion == "10.8" then "12" 165 + else if hostPlatform.osxMinVersion == "10.7" then "11" 166 + else if hostPlatform.osxMinVersion == "10.6" then "10" 167 + else if hostPlatform.osxMinVersion == "10.5" then "9" 168 + else "8" 169 + else ""}-gcc" 170 + (if hostPlatform.isCygwin then "--enable-static-msvcrt" else "") 171 ]; 172 }; 173
+14 -16
pkgs/development/libraries/libvpx/git.nix
··· 1 - {stdenv, fetchgit, perl, yasm 2 , vp8DecoderSupport ? true # VP8 decoder 3 , vp8EncoderSupport ? true # VP8 encoder 4 , vp9DecoderSupport ? true # VP9 decoder ··· 152 153 postInstall = ''moveToOutput bin "$bin" ''; 154 155 - crossAttrs = let 156 - isCygwin = stdenv.cross.libc == "msvcrt"; 157 - isDarwin = stdenv.cross.libc == "libSystem"; 158 - in { 159 configurePlatforms = []; 160 configureFlags = configureFlags ++ [ 161 #"--extra-cflags=" ··· 166 # libvpx darwin targets include darwin version (ie. ARCH-darwinXX-gcc, XX being the darwin version) 167 # See all_platforms: https://github.com/webmproject/libvpx/blob/master/configure 168 # Darwin versions: 10.4=8, 10.5=9, 10.6=10, 10.7=11, 10.8=12, 10.9=13, 10.10=14 169 - "--force-target=${stdenv.cross.config}${( 170 - if isDarwin then ( 171 - if stdenv.cross.osxMinVersion == "10.10" then "14" 172 - else if stdenv.cross.osxMinVersion == "10.9" then "13" 173 - else if stdenv.cross.osxMinVersion == "10.8" then "12" 174 - else if stdenv.cross.osxMinVersion == "10.7" then "11" 175 - else if stdenv.cross.osxMinVersion == "10.6" then "10" 176 - else if stdenv.cross.osxMinVersion == "10.5" then "9" 177 - else "8") 178 - else "")}-gcc" 179 - (if isCygwin then "--enable-static-msvcrt" else "") 180 ]; 181 }; 182
··· 1 + { stdenv, fetchgit, perl, yasm 2 + , hostPlatform 3 , vp8DecoderSupport ? true # VP8 decoder 4 , vp8EncoderSupport ? true # VP8 encoder 5 , vp9DecoderSupport ? true # VP9 decoder ··· 153 154 postInstall = ''moveToOutput bin "$bin" ''; 155 156 + crossAttrs = { 157 configurePlatforms = []; 158 configureFlags = configureFlags ++ [ 159 #"--extra-cflags=" ··· 164 # libvpx darwin targets include darwin version (ie. ARCH-darwinXX-gcc, XX being the darwin version) 165 # See all_platforms: https://github.com/webmproject/libvpx/blob/master/configure 166 # Darwin versions: 10.4=8, 10.5=9, 10.6=10, 10.7=11, 10.8=12, 10.9=13, 10.10=14 167 + "--force-target=${hostPlatform.config}${ 168 + if hostPlatform.isDarwin then 169 + if hostPlatform.osxMinVersion == "10.10" then "14" 170 + else if hostPlatform.osxMinVersion == "10.9" then "13" 171 + else if hostPlatform.osxMinVersion == "10.8" then "12" 172 + else if hostPlatform.osxMinVersion == "10.7" then "11" 173 + else if hostPlatform.osxMinVersion == "10.6" then "10" 174 + else if hostPlatform.osxMinVersion == "10.5" then "9" 175 + else "8" 176 + else ""}-gcc" 177 + (if hostPlatform.isCygwin then "--enable-static-msvcrt" else "") 178 ]; 179 }; 180
+5 -3
pkgs/development/libraries/libxml2/default.nix
··· 1 { stdenv, lib, fetchurl, fetchpatch 2 , zlib, xz, python2, findXMLCatalogs, libiconv 3 - , pythonSupport ? (! stdenv ? cross) 4 - , icuSupport ? false, icu ? null }: 5 6 let 7 python = python2; ··· 45 46 doCheck = !stdenv.isDarwin; 47 48 - crossAttrs = lib.optionalAttrs (stdenv.cross.libc == "msvcrt") { 49 # creating the DLL is broken ATM 50 dontDisableStatic = true; 51 configureFlags = configureFlags ++ [ "--disable-shared" ];
··· 1 { stdenv, lib, fetchurl, fetchpatch 2 , zlib, xz, python2, findXMLCatalogs, libiconv 3 + , buildPlatform, hostPlatform 4 + , pythonSupport ? buildPlatform == hostPlatform 5 + , icuSupport ? false, icu ? null 6 + }: 7 8 let 9 python = python2; ··· 47 48 doCheck = !stdenv.isDarwin; 49 50 + crossAttrs = lib.optionalAttrs (hostPlatform.libc == "msvcrt") { 51 # creating the DLL is broken ATM 52 dontDisableStatic = true; 53 configureFlags = configureFlags ++ [ "--disable-shared" ];
+2 -1
pkgs/development/libraries/libxslt/default.nix
··· 1 { stdenv, fetchurl, fetchpatch, libxml2, findXMLCatalogs, python2 2 , cryptoSupport ? false 3 - , pythonSupport ? (! stdenv ? cross) 4 }: 5 6 assert pythonSupport -> python2 != null;
··· 1 { stdenv, fetchurl, fetchpatch, libxml2, findXMLCatalogs, python2 2 + , buildPlatform, hostPlatform 3 , cryptoSupport ? false 4 + , pythonSupport ? buildPlatform == hostPlatform 5 }: 6 7 assert pythonSupport -> python2 != null;
+1 -1
pkgs/development/libraries/newt/default.nix
··· 17 NIX_LDFLAGS = "-lncurses"; 18 19 crossAttrs = { 20 - makeFlags = "CROSS_COMPILE=${stdenv.cross.config}-"; 21 }; 22 23 meta = with stdenv.lib; {
··· 17 NIX_LDFLAGS = "-lncurses"; 18 19 crossAttrs = { 20 + makeFlags = "CROSS_COMPILE=${stdenv.cc.prefix}"; 21 }; 22 23 meta = with stdenv.lib; {
+4 -2
pkgs/development/libraries/nlohmann_json/default.nix
··· 1 - { stdenv, fetchFromGitHub, cmake }: 2 3 stdenv.mkDerivation rec { 4 name = "nlohmann_json-${version}"; ··· 21 crossAttrs = { 22 cmakeFlags = "-DBuildTests=OFF"; 23 doCheck = false; 24 - } // stdenv.lib.optionalAttrs (stdenv.cross.libc == "msvcrt") { 25 cmakeFlags = "-DBuildTests=OFF -DCMAKE_SYSTEM_NAME=Windows"; 26 }; 27
··· 1 + { stdenv, fetchFromGitHub, cmake 2 + , hostPlatform 3 + }: 4 5 stdenv.mkDerivation rec { 6 name = "nlohmann_json-${version}"; ··· 23 crossAttrs = { 24 cmakeFlags = "-DBuildTests=OFF"; 25 doCheck = false; 26 + } // stdenv.lib.optionalAttrs (hostPlatform.libc == "msvcrt") { 27 cmakeFlags = "-DBuildTests=OFF -DCMAKE_SYSTEM_NAME=Windows"; 28 }; 29
+5 -8
pkgs/development/libraries/openssl/default.nix
··· 1 { stdenv, fetchurl, buildPackages, perl 2 , withCryptodev ? false, cryptodevHeaders 3 - , enableSSL2 ? false }: 4 5 with stdenv.lib; 6 7 let 8 9 - opensslCrossSystem = stdenv.cross.openssl.system or 10 (throw "openssl needs its platform name cross building"); 11 12 common = args@{ version, sha256, patches ? [] }: stdenv.mkDerivation rec { ··· 23 ++ optional (versionOlder version "1.1.0") 24 (if stdenv.isDarwin then ./use-etc-ssl-certs-darwin.patch else ./use-etc-ssl-certs.patch) 25 ++ optional stdenv.isCygwin ./1.0.1-cygwin64.patch 26 - ++ optional 27 - (versionOlder version "1.0.2" && (stdenv.isDarwin || (stdenv ? cross && stdenv.cross.libc == "libSystem"))) 28 ./darwin-arch.patch; 29 30 outputs = [ "bin" "dev" "out" "man" ]; ··· 89 preConfigure='' 90 # It's configure does not like --build or --host 91 export configureFlags="${concatStringsSep " " (configureFlags ++ [ opensslCrossSystem ])}" 92 - # WINDRES and RANLIB need to be prefixed when cross compiling; 93 - # the openssl configure script doesn't do that for us 94 - export WINDRES=${stdenv.cross.config}-windres 95 - export RANLIB=${stdenv.cross.config}-ranlib 96 ''; 97 configureScript = "./Configure"; 98 };
··· 1 { stdenv, fetchurl, buildPackages, perl 2 + , hostPlatform 3 , withCryptodev ? false, cryptodevHeaders 4 + , enableSSL2 ? false 5 + }: 6 7 with stdenv.lib; 8 9 let 10 11 + opensslCrossSystem = hostPlatform.openssl.system or 12 (throw "openssl needs its platform name cross building"); 13 14 common = args@{ version, sha256, patches ? [] }: stdenv.mkDerivation rec { ··· 25 ++ optional (versionOlder version "1.1.0") 26 (if stdenv.isDarwin then ./use-etc-ssl-certs-darwin.patch else ./use-etc-ssl-certs.patch) 27 ++ optional stdenv.isCygwin ./1.0.1-cygwin64.patch 28 + ++ optional (versionOlder version "1.0.2" && hostPlatform.isDarwin) 29 ./darwin-arch.patch; 30 31 outputs = [ "bin" "dev" "out" "man" ]; ··· 90 preConfigure='' 91 # It's configure does not like --build or --host 92 export configureFlags="${concatStringsSep " " (configureFlags ++ [ opensslCrossSystem ])}" 93 ''; 94 configureScript = "./Configure"; 95 };
+2 -1
pkgs/development/libraries/poppler/default.nix
··· 6 , introspectionSupport ? false, gobjectIntrospection ? null 7 , utils ? false 8 , minimal ? false, suffix ? "glib" 9 }: 10 11 let # beware: updates often break cups-filters build ··· 56 57 crossAttrs.postPatch = 58 # there are tests using `strXXX_s` functions that are missing apparently 59 - stdenv.lib.optionalString (stdenv.cross.libc or null == "msvcrt") 60 "sed '/^SUBDIRS =/s/ test / /' -i Makefile.in"; 61 62 meta = with lib; {
··· 6 , introspectionSupport ? false, gobjectIntrospection ? null 7 , utils ? false 8 , minimal ? false, suffix ? "glib" 9 + , hostPlatform 10 }: 11 12 let # beware: updates often break cups-filters build ··· 57 58 crossAttrs.postPatch = 59 # there are tests using `strXXX_s` functions that are missing apparently 60 + stdenv.lib.optionalString (hostPlatform.libc or null == "msvcrt") 61 "sed '/^SUBDIRS =/s/ test / /' -i Makefile.in"; 62 63 meta = with lib; {
+9 -10
pkgs/development/libraries/qt-4.x/4.8/default.nix
··· 1 { stdenv, fetchurl, fetchpatch, substituteAll 2 , libXrender, libXinerama, libXcursor, libXmu, libXv, libXext 3 , libXfixes, libXrandr, libSM, freetype, fontconfig, zlib, libjpeg, libpng 4 , libmng, which, mesaSupported, mesa, mesa_glu, openssl, dbus, cups, pkgconfig ··· 182 rm -rf $out/tests 183 ''; 184 185 - crossAttrs = let 186 - isMingw = stdenv.cross.libc == "msvcrt"; 187 - in { 188 # I've not tried any case other than i686-pc-mingw32. 189 # -nomake tools: it fails linking some asian language symbols 190 # -no-svg: it fails to build on mingw64 ··· 194 -no-svg 195 -make qmake -make libs -nomake tools 196 -nomake demos -nomake examples -nomake docs 197 - '' + optionalString isMingw " -xplatform win32-g++-4.6"; 198 patches = []; 199 preConfigure = '' 200 - sed -i -e 's/ g++/ ${stdenv.cross.config}-g++/' \ 201 - -e 's/ gcc/ ${stdenv.cross.config}-gcc/' \ 202 - -e 's/ ar/ ${stdenv.cross.config}-ar/' \ 203 - -e 's/ strip/ ${stdenv.cross.config}-strip/' \ 204 - -e 's/ windres/ ${stdenv.cross.config}-windres/' \ 205 mkspecs/win32-g++/qmake.conf 206 ''; 207 ··· 211 ''; 212 configurePlatforms = []; 213 dontStrip = true; 214 - } // optionalAttrs isMingw { 215 propagatedBuildInputs = [ ]; 216 }; 217
··· 1 { stdenv, fetchurl, fetchpatch, substituteAll 2 + , hostPlatform 3 , libXrender, libXinerama, libXcursor, libXmu, libXv, libXext 4 , libXfixes, libXrandr, libSM, freetype, fontconfig, zlib, libjpeg, libpng 5 , libmng, which, mesaSupported, mesa, mesa_glu, openssl, dbus, cups, pkgconfig ··· 183 rm -rf $out/tests 184 ''; 185 186 + crossAttrs = { 187 # I've not tried any case other than i686-pc-mingw32. 188 # -nomake tools: it fails linking some asian language symbols 189 # -no-svg: it fails to build on mingw64 ··· 193 -no-svg 194 -make qmake -make libs -nomake tools 195 -nomake demos -nomake examples -nomake docs 196 + '' + optionalString hostPlatform.isMinGW " -xplatform win32-g++-4.6"; 197 patches = []; 198 preConfigure = '' 199 + sed -i -e 's/ g++/ ${stdenv.cc.prefix}g++/' \ 200 + -e 's/ gcc/ ${stdenv.cc.prefix}gcc/' \ 201 + -e 's/ ar/ ${stdenv.cc.prefix}ar/' \ 202 + -e 's/ strip/ ${stdenv.cc.prefix}strip/' \ 203 + -e 's/ windres/ ${stdenv.cc.prefix}windres/' \ 204 mkspecs/win32-g++/qmake.conf 205 ''; 206 ··· 210 ''; 211 configurePlatforms = []; 212 dontStrip = true; 213 + } // optionalAttrs hostPlatform.isMinGW { 214 propagatedBuildInputs = [ ]; 215 }; 216
+4 -2
pkgs/development/libraries/readline/6.2.nix
··· 1 - { fetchurl, stdenv, ncurses }: 2 3 stdenv.mkDerivation (rec { 4 name = "readline-6.2"; ··· 57 // 58 59 # Don't run the native `strip' when cross-compiling. 60 - (if (stdenv ? cross) 61 then { dontStrip = true; } 62 else { }))
··· 1 + { fetchurl, stdenv, ncurses 2 + , buildPlatform, hostPlatform 3 + }: 4 5 stdenv.mkDerivation (rec { 6 name = "readline-6.2"; ··· 59 // 60 61 # Don't run the native `strip' when cross-compiling. 62 + (if hostPlatform != buildPlatform 63 then { dontStrip = true; } 64 else { }))
+4 -2
pkgs/development/libraries/readline/6.3.nix
··· 1 - { fetchurl, stdenv, ncurses }: 2 3 stdenv.mkDerivation rec { 4 name = "readline-6.3p08"; ··· 29 import ./readline-6.3-patches.nix patch); 30 31 # Don't run the native `strip' when cross-compiling. 32 - dontStrip = stdenv ? cross; 33 bash_cv_func_sigsetjmp = if stdenv.isCygwin then "missing" else null; 34 35 meta = with stdenv.lib; {
··· 1 + { fetchurl, stdenv, ncurses 2 + , buildPlatform, hostPlatform 3 + }: 4 5 stdenv.mkDerivation rec { 6 name = "readline-6.3p08"; ··· 31 import ./readline-6.3-patches.nix patch); 32 33 # Don't run the native `strip' when cross-compiling. 34 + dontStrip = hostPlatform != buildPlatform; 35 bash_cv_func_sigsetjmp = if stdenv.isCygwin then "missing" else null; 36 37 meta = with stdenv.lib; {
+4 -2
pkgs/development/libraries/readline/7.0.nix
··· 1 - { fetchurl, stdenv, ncurses }: 2 3 stdenv.mkDerivation rec { 4 name = "readline-${version}"; ··· 33 */ 34 35 # Don't run the native `strip' when cross-compiling. 36 - dontStrip = stdenv ? cross; 37 bash_cv_func_sigsetjmp = if stdenv.isCygwin then "missing" else null; 38 39 meta = with stdenv.lib; {
··· 1 + { fetchurl, stdenv, ncurses 2 + , buildPlatform, hostPlatform 3 + }: 4 5 stdenv.mkDerivation rec { 6 name = "readline-${version}"; ··· 35 */ 36 37 # Don't run the native `strip' when cross-compiling. 38 + dontStrip = hostPlatform != buildPlatform; 39 bash_cv_func_sigsetjmp = if stdenv.isCygwin then "missing" else null; 40 41 meta = with stdenv.lib; {
+2 -4
pkgs/development/libraries/zlib/default.nix
··· 60 crossAttrs = { 61 dontStrip = static; 62 configurePlatforms = []; 63 - } // stdenv.lib.optionalAttrs (stdenv.cross.libc == "msvcrt") { 64 installFlags = [ 65 "BINARY_PATH=$(out)/bin" 66 "INCLUDE_PATH=$(dev)/include" ··· 68 ]; 69 makeFlags = [ 70 "-f" "win32/Makefile.gcc" 71 - "PREFIX=${stdenv.cross.config}-" 72 ] ++ stdenv.lib.optional (!static) "SHARED_MODE=1"; 73 74 # Non-typical naming confuses libtool which then refuses to use zlib's DLL 75 # in some cases, e.g. when compiling libpng. 76 postInstall = postInstall + "ln -s zlib1.dll $out/bin/libz.dll"; 77 - } // stdenv.lib.optionalAttrs (stdenv.cross.libc == "libSystem") { 78 - makeFlags = [ "RANLIB=${stdenv.cross.config}-ranlib" ]; 79 }; 80 81 passthru.version = version;
··· 60 crossAttrs = { 61 dontStrip = static; 62 configurePlatforms = []; 63 + } // stdenv.lib.optionalAttrs (hostPlatform.libc == "msvcrt") { 64 installFlags = [ 65 "BINARY_PATH=$(out)/bin" 66 "INCLUDE_PATH=$(dev)/include" ··· 68 ]; 69 makeFlags = [ 70 "-f" "win32/Makefile.gcc" 71 + "PREFIX=${stdenv.cc.prefix}" 72 ] ++ stdenv.lib.optional (!static) "SHARED_MODE=1"; 73 74 # Non-typical naming confuses libtool which then refuses to use zlib's DLL 75 # in some cases, e.g. when compiling libpng. 76 postInstall = postInstall + "ln -s zlib1.dll $out/bin/libz.dll"; 77 }; 78 79 passthru.version = version;
+2 -1
pkgs/development/tools/build-managers/cmake/2.8.nix
··· 1 { stdenv, fetchurl, fetchpatch, replace, curl, expat, zlib, bzip2 2 , useNcurses ? false, ncurses, useQt4 ? false, qt4, wantPS ? false, ps ? null 3 }: 4 5 with stdenv.lib; ··· 35 })] ++ 36 # Don't search in non-Nix locations such as /usr, but do search in our libc. 37 [ ./search-path.patch ] ++ 38 - optional (stdenv ? cross) (fetchurl { 39 name = "fix-darwin-cross-compile.patch"; 40 url = "http://public.kitware.com/Bug/file_download.php?" 41 + "file_id=4981&type=bug";
··· 1 { stdenv, fetchurl, fetchpatch, replace, curl, expat, zlib, bzip2 2 , useNcurses ? false, ncurses, useQt4 ? false, qt4, wantPS ? false, ps ? null 3 + , buildPlatform, hostPlatform 4 }: 5 6 with stdenv.lib; ··· 36 })] ++ 37 # Don't search in non-Nix locations such as /usr, but do search in our libc. 38 [ ./search-path.patch ] ++ 39 + optional (hostPlatform != buildPlatform) (fetchurl { 40 name = "fix-darwin-cross-compile.patch"; 41 url = "http://public.kitware.com/Bug/file_download.php?" 42 + "file_id=4981&type=bug";
+4 -2
pkgs/development/tools/misc/libtool/libtool2.nix
··· 1 - { stdenv, fetchurl, m4, perl, help2man }: 2 3 stdenv.mkDerivation rec { 4 name = "libtool-2.4.6"; ··· 23 24 # Don't run the native `strip' when cross-compiling. This breaks at least 25 # with `.a' files for MinGW. 26 - dontStrip = stdenv ? cross; 27 28 meta = { 29 description = "GNU Libtool, a generic library support script";
··· 1 + { stdenv, fetchurl, m4, perl, help2man 2 + , buildPlatform, hostPlatform 3 + }: 4 5 stdenv.mkDerivation rec { 6 name = "libtool-2.4.6"; ··· 25 26 # Don't run the native `strip' when cross-compiling. This breaks at least 27 # with `.a' files for MinGW. 28 + dontStrip = hostPlatform != buildPlatform; 29 30 meta = { 31 description = "GNU Libtool, a generic library support script";
+5 -2
pkgs/games/scummvm/default.nix
··· 1 - { stdenv, fetchurl, SDL, zlib, libmpeg2, libmad, libogg, libvorbis, flac, alsaLib, mesa }: 2 3 stdenv.mkDerivation rec { 4 name = "scummvm-1.9.0"; ··· 16 preConfigure = '' 17 # Remove the --build flag set by the gcc cross wrapper setup 18 # hook 19 - export configureFlags="--host=${stdenv.cross.config}" 20 ''; 21 postConfigure = '' 22 # They use 'install -s', that calls the native strip instead of the cross
··· 1 + { stdenv 2 + , fetchurl, SDL, zlib, libmpeg2, libmad, libogg, libvorbis, flac, alsaLib, mesa 3 + , hostPlatform 4 + }: 5 6 stdenv.mkDerivation rec { 7 name = "scummvm-1.9.0"; ··· 19 preConfigure = '' 20 # Remove the --build flag set by the gcc cross wrapper setup 21 # hook 22 + export configureFlags="--host=${hostPlatform.config}" 23 ''; 24 postConfigure = '' 25 # They use 'install -s', that calls the native strip instead of the cross
+5 -3
pkgs/misc/uboot/default.nix
··· 1 - { stdenv, fetchurl, bc, dtc, python2 }: 2 3 let 4 buildUBoot = { targetPlatforms ··· 43 44 crossAttrs = { 45 makeFlags = [ 46 - "ARCH=${stdenv.cross.platform.kernelArch}" 47 - "CROSS_COMPILE=${stdenv.cross.config}-" 48 ]; 49 }; 50
··· 1 + { stdenv, fetchurl, bc, dtc, python2 2 + , hostPlatform 3 + }: 4 5 let 6 buildUBoot = { targetPlatforms ··· 45 46 crossAttrs = { 47 makeFlags = [ 48 + "ARCH=${hostPlatform.platform.kernelArch}" 49 + "CROSS_COMPILE=${stdenv.cc.prefix}" 50 ]; 51 }; 52
+4 -2
pkgs/os-specific/linux/kernel-headers/default.nix
··· 1 - { stdenv, kernel, perl }: 2 3 let 4 baseBuildFlags = [ "INSTALL_HDR_PATH=$(out)" "headers_install" ]; ··· 13 14 crossAttrs = { 15 inherit (kernel.crossDrv) src patches; 16 - buildFlags = [ "ARCH=${stdenv.cross.platform.kernelArch}" ] ++ baseBuildFlags; 17 }; 18 19 installPhase = ''
··· 1 + { stdenv, kernel, perl 2 + , hostPlatform 3 + }: 4 5 let 6 baseBuildFlags = [ "INSTALL_HDR_PATH=$(out)" "headers_install" ]; ··· 15 16 crossAttrs = { 17 inherit (kernel.crossDrv) src patches; 18 + buildFlags = [ "ARCH=${hostPlatform.platform.kernelArch}" ] ++ baseBuildFlags; 19 }; 20 21 installPhase = ''
+3 -2
pkgs/os-specific/linux/kernel/generic.nix
··· 25 kernelPatches ? [] 26 , ignoreConfigErrors ? stdenv.platform.name != "pc" 27 , extraMeta ? {} 28 , ... 29 }: 30 ··· 59 arch = stdenv.platform.kernelArch; 60 61 crossAttrs = let 62 - cp = stdenv.cross.platform; 63 in { 64 arch = cp.kernelArch; 65 platformName = cp.name; ··· 128 }; 129 130 config = configWithPlatform stdenv.platform; 131 - configCross = configWithPlatform stdenv.cross.platform; 132 133 nativeDrv = lib.addPassthru kernel.nativeDrv passthru; 134
··· 25 kernelPatches ? [] 26 , ignoreConfigErrors ? stdenv.platform.name != "pc" 27 , extraMeta ? {} 28 + , hostPlatform 29 , ... 30 }: 31 ··· 60 arch = stdenv.platform.kernelArch; 61 62 crossAttrs = let 63 + cp = hostPlatform.platform; 64 in { 65 arch = cp.kernelArch; 66 platformName = cp.name; ··· 129 }; 130 131 config = configWithPlatform stdenv.platform; 132 + configCross = configWithPlatform hostPlatform.platform; 133 134 nativeDrv = lib.addPassthru kernel.nativeDrv passthru; 135
+1 -1
pkgs/os-specific/linux/kernel/linux-3.10.nix
··· 1 - { stdenv, fetchurl, perl, buildLinux, ... } @ args: 2 3 import ./generic.nix (args // rec { 4 version = "3.10.105";
··· 1 + { stdenv, hostPlatform, fetchurl, perl, buildLinux, ... } @ args: 2 3 import ./generic.nix (args // rec { 4 version = "3.10.105";
+1 -1
pkgs/os-specific/linux/kernel/linux-4.11.nix
··· 1 - { stdenv, fetchurl, perl, buildLinux, ... } @ args: 2 3 import ./generic.nix (args // rec { 4 version = "4.11.7";
··· 1 + { stdenv, hostPlatform, fetchurl, perl, buildLinux, ... } @ args: 2 3 import ./generic.nix (args // rec { 4 version = "4.11.7";
+1 -1
pkgs/os-specific/linux/kernel/linux-4.4.nix
··· 1 - { stdenv, fetchurl, perl, buildLinux, ... } @ args: 2 3 import ./generic.nix (args // rec { 4 version = "4.4.74";
··· 1 + { stdenv, hostPlatform, fetchurl, perl, buildLinux, ... } @ args: 2 3 import ./generic.nix (args // rec { 4 version = "4.4.74";
+1 -1
pkgs/os-specific/linux/kernel/linux-4.9.nix
··· 1 - { stdenv, fetchurl, perl, buildLinux, ... } @ args: 2 3 import ./generic.nix (args // rec { 4 version = "4.9.34";
··· 1 + { stdenv, hostPlatform, fetchurl, perl, buildLinux, ... } @ args: 2 3 import ./generic.nix (args // rec { 4 version = "4.9.34";
+1 -1
pkgs/os-specific/linux/kernel/linux-chromiumos-3.18.nix
··· 1 - { stdenv, fetchgit, perl, buildLinux, ncurses, ... } @ args: 2 3 # ChromiumOS requires a 64bit build host 4 assert stdenv.is64bit;
··· 1 + { stdenv, hostPlatform, fetchgit, perl, buildLinux, ncurses, ... } @ args: 2 3 # ChromiumOS requires a 64bit build host 4 assert stdenv.is64bit;
+1 -1
pkgs/os-specific/linux/kernel/linux-hardened-copperhead.nix
··· 1 - { stdenv, fetchFromGitHub, perl, buildLinux, ... } @ args: 2 3 let 4 version = "4.11.7";
··· 1 + { stdenv, hostPlatform, fetchFromGitHub, perl, buildLinux, ... } @ args: 2 3 let 4 version = "4.11.7";
+1 -1
pkgs/os-specific/linux/kernel/linux-mptcp.nix
··· 1 - { stdenv, fetchurl, perl, buildLinux, ... } @ args: 2 3 import ./generic.nix (args // rec { 4 mptcpVersion = "0.91.3";
··· 1 + { stdenv, hostPlatform, fetchurl, perl, buildLinux, ... } @ args: 2 3 import ./generic.nix (args // rec { 4 mptcpVersion = "0.91.3";
+1 -1
pkgs/os-specific/linux/kernel/linux-rpi.nix
··· 1 - { stdenv, fetchFromGitHub, perl, buildLinux, ... } @ args: 2 3 let 4 modDirVersion = "4.9.24";
··· 1 + { stdenv, hostPlatform, fetchFromGitHub, perl, buildLinux, ... } @ args: 2 3 let 4 modDirVersion = "4.9.24";
+1 -1
pkgs/os-specific/linux/kernel/linux-testing.nix
··· 1 - { stdenv, fetchurl, perl, buildLinux, ... } @ args: 2 3 import ./generic.nix (args // rec { 4 version = "4.12-rc7";
··· 1 + { stdenv, hostPlatform, fetchurl, perl, buildLinux, ... } @ args: 2 3 import ./generic.nix (args // rec { 4 version = "4.12-rc7";
+2 -1
pkgs/os-specific/linux/kernel/manual-config.nix
··· 1 { stdenv, runCommand, nettools, bc, perl, gmp, libmpc, mpfr, kmod, openssl 2 , writeTextFile, ubootChooser 3 }: 4 5 let ··· 232 233 karch = stdenv.platform.kernelArch; 234 235 - crossAttrs = let cp = stdenv.cross.platform; in 236 (drvAttrs crossConfig cp (kernelPatches ++ crossKernelPatches) crossConfigfile) // { 237 makeFlags = commonMakeFlags ++ [ 238 "ARCH=${cp.kernelArch}"
··· 1 { stdenv, runCommand, nettools, bc, perl, gmp, libmpc, mpfr, kmod, openssl 2 , writeTextFile, ubootChooser 3 + , hostPlatform 4 }: 5 6 let ··· 233 234 karch = stdenv.platform.kernelArch; 235 236 + crossAttrs = let cp = hostPlatform.platform; in 237 (drvAttrs crossConfig cp (kernelPatches ++ crossKernelPatches) crossConfigfile) // { 238 makeFlags = commonMakeFlags ++ [ 239 "ARCH=${cp.kernelArch}"
+1 -1
pkgs/os-specific/linux/kernel/perf.nix
··· 49 /* I don't want cross-python or cross-perl - 50 I don't know if cross-python even works */ 51 propagatedBuildInputs = [ elfutils.crossDrv newt.crossDrv ]; 52 - makeFlags = "CROSS_COMPILE=${stdenv.cross.config}-"; 53 elfutils = elfutils.crossDrv; 54 inherit (kernel.crossDrv) src patches; 55 };
··· 49 /* I don't want cross-python or cross-perl - 50 I don't know if cross-python even works */ 51 propagatedBuildInputs = [ elfutils.crossDrv newt.crossDrv ]; 52 + makeFlags = "CROSS_COMPILE=${stdenv.cc.prefix}"; 53 elfutils = elfutils.crossDrv; 54 inherit (kernel.crossDrv) src patches; 55 };
+8 -11
pkgs/os-specific/linux/klibc/default.nix
··· 1 - { stdenv, fetchurl, linuxHeaders, perl }: 2 3 let 4 commonMakeFlags = [ ··· 23 hardeningDisable = [ "format" "stackprotector" ]; 24 25 makeFlags = commonMakeFlags ++ [ 26 - "KLIBCARCH=${stdenv.platform.kernelArch}" 27 "KLIBCKERNELSRC=${linuxHeaders}" 28 - ] ++ stdenv.lib.optional (stdenv.platform.kernelArch == "arm") "CONFIG_AEABI=y"; 29 - 30 - crossAttrs = { 31 - makeFlags = commonMakeFlags ++ [ 32 - "KLIBCARCH=${stdenv.cross.platform.kernelArch}" 33 - "KLIBCKERNELSRC=${linuxHeaders.crossDrv}" 34 - "CROSS_COMPILE=${stdenv.cross.config}-" 35 - ] ++ stdenv.lib.optional (stdenv.cross.platform.kernelArch == "arm") "CONFIG_AEABI=y"; 36 - }; 37 38 # Install static binaries as well. 39 postInstall = ''
··· 1 + { stdenv, fetchurl, linuxHeaders, perl 2 + , buildPlatform, hostPlatform 3 + }: 4 5 let 6 commonMakeFlags = [ ··· 25 hardeningDisable = [ "format" "stackprotector" ]; 26 27 makeFlags = commonMakeFlags ++ [ 28 + "KLIBCARCH=${hostPlatform.platform.kernelArch}" 29 "KLIBCKERNELSRC=${linuxHeaders}" 30 + ] # TODO(@Ericson2314): We now can get the ABI from 31 + # `hostPlatform.parsed.abi`, is this still a good idea? 32 + ++ stdenv.lib.optional (hostPlatform.platform.kernelArch == "arm") "CONFIG_AEABI=y" 33 + ++ stdenv.lib.optional (hostPlatform != buildPlatform) "CROSS_COMPILE=${stdenv.cc.prefix}"; 34 35 # Install static binaries as well. 36 postInstall = ''
+6 -3
pkgs/os-specific/linux/mdadm/4.nix
··· 1 - { stdenv, fetchurl, groff }: 2 3 assert stdenv.isLinux; 4 ··· 19 makeFlags = [ 20 "NIXOS=1" "INSTALL=install" "INSTALL_BINDIR=$(out)/sbin" 21 "MANDIR=$(out)/share/man" "RUN_DIR=/dev/.mdadm" 22 - ] ++ stdenv.lib.optionals (stdenv ? cross) [ 23 - "CROSS_COMPILE=${stdenv.cross.config}-" 24 ]; 25 26 nativeBuildInputs = [ groff ];
··· 1 + { stdenv 2 + , fetchurl, groff 3 + , buildPlatform, hostPlatform 4 + }: 5 6 assert stdenv.isLinux; 7 ··· 22 makeFlags = [ 23 "NIXOS=1" "INSTALL=install" "INSTALL_BINDIR=$(out)/sbin" 24 "MANDIR=$(out)/share/man" "RUN_DIR=/dev/.mdadm" 25 + ] ++ stdenv.lib.optionals (hostPlatform != buildPlatform) [ 26 + "CROSS_COMPILE=${stdenv.cc.prefix}" 27 ]; 28 29 nativeBuildInputs = [ groff ];
+6 -3
pkgs/os-specific/linux/mdadm/default.nix
··· 1 - { stdenv, fetchurl, groff }: 2 3 assert stdenv.isLinux; 4 ··· 19 makeFlags = [ 20 "NIXOS=1" "INSTALL=install" "INSTALL_BINDIR=$(out)/sbin" 21 "MANDIR=$(out)/share/man" "RUN_DIR=/dev/.mdadm" 22 - ] ++ stdenv.lib.optionals (stdenv ? cross) [ 23 - "CROSS_COMPILE=${stdenv.cross.config}-" 24 ]; 25 26 nativeBuildInputs = [ groff ];
··· 1 + { stdenv 2 + , fetchurl, groff 3 + , buildPlatform, hostPlatform 4 + }: 5 6 assert stdenv.isLinux; 7 ··· 22 makeFlags = [ 23 "NIXOS=1" "INSTALL=install" "INSTALL_BINDIR=$(out)/sbin" 24 "MANDIR=$(out)/share/man" "RUN_DIR=/dev/.mdadm" 25 + ] ++ stdenv.lib.optionals (hostPlatform != buildPlatform) [ 26 + "CROSS_COMPILE=${stdenv.cc.prefix}" 27 ]; 28 29 nativeBuildInputs = [ groff ];
-4
pkgs/os-specific/linux/mingetty/default.nix
··· 8 sha256 = "05yxrp44ky2kg6qknk1ih0kvwkgbn9fbz77r3vci7agslh5wjm8g"; 9 }; 10 11 - crossAttrs = { 12 - makeFlags = "CC=${stdenv.cross.config}-gcc"; 13 - }; 14 - 15 preInstall = '' 16 mkdir -p $out/sbin $out/share/man/man8 17 makeFlagsArray=(SBINDIR=$out/sbin MANDIR=$out/share/man/man8)
··· 8 sha256 = "05yxrp44ky2kg6qknk1ih0kvwkgbn9fbz77r3vci7agslh5wjm8g"; 9 }; 10 11 preInstall = '' 12 mkdir -p $out/sbin $out/share/man/man8 13 makeFlagsArray=(SBINDIR=$out/sbin MANDIR=$out/share/man/man8)
-4
pkgs/os-specific/linux/procps-ng/default.nix
··· 15 16 enableParallelBuilding = true; 17 18 - crossAttrs = { 19 - CC = stdenv.cross.config + "-gcc"; 20 - }; 21 - 22 # Too red 23 configureFlags = [ "--disable-modern-top" ]; 24
··· 15 16 enableParallelBuilding = true; 17 18 # Too red 19 configureFlags = [ "--disable-modern-top" ]; 20
-4
pkgs/os-specific/linux/procps/watch.nix
··· 15 16 enableParallelBuilding = true; 17 18 - crossAttrs = { 19 - CC = stdenv.cross.config + "-gcc"; 20 - }; 21 - 22 installPhase = "mkdir $out; mkdir -p $out/bin; cp -p watch $out/bin"; 23 24 meta = {
··· 15 16 enableParallelBuilding = true; 17 18 installPhase = "mkdir $out; mkdir -p $out/bin; cp -p watch $out/bin"; 19 20 meta = {
+4 -2
pkgs/os-specific/linux/shadow/default.nix
··· 1 { stdenv, fetchpatch, fetchFromGitHub, autoreconfHook, libxslt, libxml2 2 , docbook_xml_dtd_412, docbook_xsl, gnome_doc_utils, flex, bison 3 - , pam ? null, glibcCross ? null }: 4 5 let 6 7 glibc = 8 - if stdenv ? cross 9 then glibcCross 10 else assert stdenv ? glibc; stdenv.glibc; 11
··· 1 { stdenv, fetchpatch, fetchFromGitHub, autoreconfHook, libxslt, libxml2 2 , docbook_xml_dtd_412, docbook_xsl, gnome_doc_utils, flex, bison 3 + , pam ? null, glibcCross ? null 4 + , buildPlatform, hostPlatform 5 + }: 6 7 let 8 9 glibc = 10 + if hostPlatform != buildPlatform 11 then glibcCross 12 else assert stdenv ? glibc; stdenv.glibc; 13
+1 -5
pkgs/os-specific/linux/sysvinit/default.nix
··· 15 sed -i -e "s,/sbin/,$out/sbin/," src/halt.c src/init.c src/paths.h 16 ''; 17 18 - makeFlags = "SULOGINLIBS=-lcrypt ROOT=$(out) MANDIR=/share/man"; 19 - 20 - crossAttrs = { 21 - makeFlags = "SULOGINLIBS=-lcrypt ROOT=$(out) MANDIR=/share/man CC=${stdenv.cross.config}-gcc"; 22 - }; 23 24 preInstall = 25 ''
··· 15 sed -i -e "s,/sbin/,$out/sbin/," src/halt.c src/init.c src/paths.h 16 ''; 17 18 + makeFlags = [ "SULOGINLIBS=-lcrypt" "ROOT=$(out)" "MANDIR=/share/man" ]; 19 20 preInstall = 21 ''
+1 -1
pkgs/os-specific/windows/jom/default.nix
··· 18 QTDIR = qt48; 19 20 crossAttrs = { 21 - # cmakeFlags = "-DWIN32=1 -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_RC_COMPILER=${stdenv.cross.config}-windres"; 22 QTDIR = qt48.crossDrv; 23 preBuild = '' 24 export NIX_CROSS_CFLAGS_COMPILE=-fpermissive
··· 18 QTDIR = qt48; 19 20 crossAttrs = { 21 + # cmakeFlags = "-DWIN32=1 -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_RC_COMPILER=${stdenv.cc.prefix}windres"; 22 QTDIR = qt48.crossDrv; 23 preBuild = '' 24 export NIX_CROSS_CFLAGS_COMPILE=-fpermissive
+1 -1
pkgs/os-specific/windows/pthread-w32/default.nix
··· 1 { fetchurl, stdenv, mingw_headers }: 2 3 # This file is tweaked for cross-compilation only. 4 - assert stdenv ? cross; 5 6 stdenv.mkDerivation { 7 name = "pthread-w32-1.10.0";
··· 1 { fetchurl, stdenv, mingw_headers }: 2 3 # This file is tweaked for cross-compilation only. 4 + assert hostPlatform != buildPlatform; 5 6 stdenv.mkDerivation { 7 name = "pthread-w32-1.10.0";
+2 -7
pkgs/os-specific/windows/wxMSW-2.8/default.nix
··· 1 { stdenv, fetchurl, compat24 ? false, compat26 ? true, unicode ? true, 2 }: 3 4 - assert stdenv ? cross -> stdenv.cross.libc == "msvcrt"; 5 6 stdenv.mkDerivation { 7 name = "wxMSW-2.8.11"; ··· 18 (if unicode then "--enable-unicode" else "") 19 "--with-opengl" 20 ]; 21 - 22 - # Cross build only tested for mingw32 23 - checkCross = throw "This package can only be cross-built" false; 24 - crossAttrs = { 25 - checkCross = true; 26 - }; 27 28 preConfigure = " 29 substituteInPlace configure --replace /usr /no-such-path
··· 1 { stdenv, fetchurl, compat24 ? false, compat26 ? true, unicode ? true, 2 + , hostPlatform 3 }: 4 5 + assert hostPlatform.isWindows; 6 7 stdenv.mkDerivation { 8 name = "wxMSW-2.8.11"; ··· 19 (if unicode then "--enable-unicode" else "") 20 "--with-opengl" 21 ]; 22 23 preConfigure = " 24 substituteInPlace configure --replace /usr /no-such-path
-4
pkgs/tools/filesystems/mtdutils/default.nix
··· 15 16 buildInputs = [ libuuid lzo zlib acl ]; 17 18 - crossAttrs = { 19 - makeFlags = "CC=${stdenv.cross.config}-gcc"; 20 - }; 21 - 22 meta = { 23 description = "Tools for MTD filesystems"; 24 license = stdenv.lib.licenses.gpl2Plus;
··· 15 16 buildInputs = [ libuuid lzo zlib acl ]; 17 18 meta = { 19 description = "Tools for MTD filesystems"; 20 license = stdenv.lib.licenses.gpl2Plus;
+12 -14
pkgs/tools/graphics/optipng/default.nix
··· 1 - { stdenv, fetchurl, libpng, static ? false }: 2 3 # This package comes with its own copy of zlib, libpng and pngxtern 4 ··· 15 buildInputs = [ libpng ]; 16 17 LDFLAGS = optional static "-static"; 18 - configureFlags = "--with-system-zlib --with-system-libpng"; 19 20 - crossAttrs = { 21 - CC="${stdenv.cross.config}-gcc"; 22 - LD="${stdenv.cross.config}-gcc"; 23 - AR="${stdenv.cross.config}-ar"; 24 - RANLIB="${stdenv.cross.config}-ranlib"; 25 - configurePhase = '' 26 - ./configure -prefix="$out" --with-system-zlib --with-system-libpng 27 - ''; 28 - postInstall = optional (stdenv.cross.libc == "msvcrt") '' 29 - mv "$out"/bin/optipng "$out"/bin/optipng.exe 30 - ''; 31 - }; 32 33 meta = with stdenv.lib; { 34 homepage = http://optipng.sourceforge.net/;
··· 1 + { stdenv, fetchurl, libpng, static ? false 2 + , buildPlatform, hostPlatform 3 + }: 4 5 # This package comes with its own copy of zlib, libpng and pngxtern 6 ··· 17 buildInputs = [ libpng ]; 18 19 LDFLAGS = optional static "-static"; 20 + configureFlags = [ 21 + "--with-system-zlib" 22 + "--with-system-libpng" 23 + ] ++ stdenv.lib.optionals (hostPlatform != buildPlatform) [ 24 + #"-prefix=$out" 25 + ]; 26 27 + postInstall = if hostPlatform != buildPlatform && hostPlatform.isWindows then '' 28 + mv "$out"/bin/optipng{,.exe} 29 + '' else null; 30 31 meta = with stdenv.lib; { 32 homepage = http://optipng.sourceforge.net/;
+4 -2
pkgs/tools/networking/tcpdump/default.nix
··· 1 - { stdenv, fetchurl, libpcap, enableStatic ? false }: 2 3 stdenv.mkDerivation rec { 4 name = "tcpdump-${version}"; ··· 15 crossAttrs = { 16 LDFLAGS = if enableStatic then "-static" else ""; 17 configureFlags = [ "ac_cv_linux_vers=2" ] ++ (stdenv.lib.optional 18 - (stdenv.cross.platform.kernelMajor == "2.4") "--disable-ipv6"); 19 }; 20 21 meta = {
··· 1 + { stdenv, fetchurl, libpcap, enableStatic ? false 2 + , hostPlatform 3 + }: 4 5 stdenv.mkDerivation rec { 6 name = "tcpdump-${version}"; ··· 17 crossAttrs = { 18 LDFLAGS = if enableStatic then "-static" else ""; 19 configureFlags = [ "ac_cv_linux_vers=2" ] ++ (stdenv.lib.optional 20 + (hostPlatform.platform.kernelMajor == "2.4") "--disable-ipv6"); 21 }; 22 23 meta = {
+3 -2
pkgs/tools/package-management/nix/default.nix
··· 2 , pkgconfig, boehmgc, perlPackages, libsodium, aws-sdk-cpp, brotli, readline 3 , autoreconfHook, autoconf-archive, bison, flex, libxml2, libxslt, docbook5, docbook5_xsl 4 , libseccomp, busybox 5 , storeDir ? "/nix/store" 6 , stateDir ? "/nix/var" 7 , confDir ? "/etc" ··· 95 --disable-init-state 96 --enable-gc 97 '' + stdenv.lib.optionalString ( 98 - stdenv.cross ? nix && stdenv.cross.nix ? system 99 - ) ''--with-system=${stdenv.cross.nix.system}''; 100 101 doInstallCheck = false; 102 };
··· 2 , pkgconfig, boehmgc, perlPackages, libsodium, aws-sdk-cpp, brotli, readline 3 , autoreconfHook, autoconf-archive, bison, flex, libxml2, libxslt, docbook5, docbook5_xsl 4 , libseccomp, busybox 5 + , hostPlatform 6 , storeDir ? "/nix/store" 7 , stateDir ? "/nix/var" 8 , confDir ? "/etc" ··· 96 --disable-init-state 97 --enable-gc 98 '' + stdenv.lib.optionalString ( 99 + hostPlatform ? nix && hostPlatform.nix ? system 100 + ) ''--with-system=${hostPlatform.nix.system}''; 101 102 doInstallCheck = false; 103 };
-4
pkgs/tools/system/tm/default.nix
··· 10 sed -i 's@/usr/bin/install@install@g ; s/gcc/cc/g' Makefile 11 ''; 12 13 - crossAttrs = { 14 - makeFlags = "CC=${stdenv.cross.config}-gcc"; 15 - }; 16 - 17 src = fetchurl { 18 url = http://vicerveza.homeunix.net/~viric/soft/tm/tm-0.4.1.tar.gz; 19 sha256 = "3b389bc03b6964ad5ffa57a344b891fdbcf7c9b2604adda723a863f83657c4a0";
··· 10 sed -i 's@/usr/bin/install@install@g ; s/gcc/cc/g' Makefile 11 ''; 12 13 src = fetchurl { 14 url = http://vicerveza.homeunix.net/~viric/soft/tm/tm-0.4.1.tar.gz; 15 sha256 = "3b389bc03b6964ad5ffa57a344b891fdbcf7c9b2604adda723a863f83657c4a0";
+3 -6
pkgs/tools/system/ts/default.nix
··· 1 - {stdenv, fetchurl, 2 - sendmailPath ? "/run/wrappers/bin/sendmail" }: 3 4 stdenv.mkDerivation rec { 5 6 name = "ts-0.7.6"; 7 8 installPhase=''make install "PREFIX=$out"''; 9 - 10 - crossAttrs = { 11 - makeFlags = "CC=${stdenv.cross.config}-gcc"; 12 - }; 13 14 patchPhase = '' 15 sed -i s,/usr/sbin/sendmail,${sendmailPath}, mail.c ts.1
··· 1 + { stdenv, fetchurl 2 + , sendmailPath ? "/run/wrappers/bin/sendmail" 3 + }: 4 5 stdenv.mkDerivation rec { 6 7 name = "ts-0.7.6"; 8 9 installPhase=''make install "PREFIX=$out"''; 10 11 patchPhase = '' 12 sed -i s,/usr/sbin/sendmail,${sendmailPath}, mail.c ts.1
+4 -2
pkgs/tools/text/html-tidy/default.nix
··· 1 - { stdenv, fetchFromGitHub, cmake, libxslt }: 2 3 stdenv.mkDerivation rec { 4 name = "html-tidy-${version}"; ··· 14 nativeBuildInputs = [ cmake libxslt/*manpage*/ ]; 15 16 cmakeFlags = stdenv.lib.optional 17 - (stdenv.cross.libc or null == "msvcrt") "-DCMAKE_SYSTEM_NAME=Windows"; 18 19 # ATM bin/tidy is statically linked, as upstream provides no other option yet. 20 # https://github.com/htacg/tidy-html5/issues/326#issuecomment-160322107
··· 1 + { stdenv, fetchFromGitHub, cmake, libxslt 2 + , hostPlatform 3 + }: 4 5 stdenv.mkDerivation rec { 6 name = "html-tidy-${version}"; ··· 16 nativeBuildInputs = [ cmake libxslt/*manpage*/ ]; 17 18 cmakeFlags = stdenv.lib.optional 19 + (hostPlatform.libc or null == "msvcrt") "-DCMAKE_SYSTEM_NAME=Windows"; 20 21 # ATM bin/tidy is statically linked, as upstream provides no other option yet. 22 # https://github.com/htacg/tidy-html5/issues/326#issuecomment-160322107
+1 -5
pkgs/tools/text/replace/default.nix
··· 1 - {stdenv, fetchurl}: 2 3 stdenv.mkDerivation { 4 name = "replace-2.24"; ··· 9 }; 10 11 makeFlags = "TREE=\$(out) MANTREE=\$(TREE)/share/man"; 12 - 13 - crossAttrs = { 14 - makeFlags = "TREE=\$(out) MANTREE=\$(TREE)/share/man CC=${stdenv.cross.config}-gcc"; 15 - }; 16 17 preBuild = '' 18 sed -e "s@/bin/mv@$(type -P mv)@" -i replace.h
··· 1 + { stdenv, fetchurl }: 2 3 stdenv.mkDerivation { 4 name = "replace-2.24"; ··· 9 }; 10 11 makeFlags = "TREE=\$(out) MANTREE=\$(TREE)/share/man"; 12 13 preBuild = '' 14 sed -e "s@/bin/mv@$(type -P mv)@" -i replace.h
-2
pkgs/top-level/stage.nix
··· 110 in { 111 stdenv = super.stdenv // { 112 inherit (buildPlatform) platform; 113 - } // lib.optionalAttrs (hostPlatform != buildPlatform) { 114 - cross = hostPlatform; 115 }; 116 inherit (buildPlatform) system platform; 117 };
··· 110 in { 111 stdenv = super.stdenv // { 112 inherit (buildPlatform) platform; 113 }; 114 inherit (buildPlatform) system platform; 115 };