lol

libvpx: Don't use stdenv.cross

+28 -32
+14 -16
pkgs/development/libraries/libvpx/default.nix
··· 1 - {stdenv, fetchFromGitHub, perl, yasm 1 + { stdenv, fetchFromGitHub, perl, yasm 2 + , hostPlatform 2 3 , vp8DecoderSupport ? true # VP8 decoder 3 4 , vp8EncoderSupport ? true # VP8 encoder 4 5 , vp9DecoderSupport ? true # VP9 decoder ··· 144 145 145 146 postInstall = ''moveToOutput bin "$bin" ''; 146 147 147 - crossAttrs = let 148 - isCygwin = stdenv.cross.libc == "msvcrt"; 149 - isDarwin = stdenv.cross.libc == "libSystem"; 150 - in { 148 + crossAttrs = { 151 149 configurePlatforms = []; 152 150 configureFlags = configureFlags ++ [ 153 151 #"--extra-cflags=" ··· 159 157 # libvpx darwin targets include darwin version (ie. ARCH-darwinXX-gcc, XX being the darwin version) 160 158 # See all_platforms: https://github.com/webmproject/libvpx/blob/master/configure 161 159 # 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 "") 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 "") 173 171 ]; 174 172 }; 175 173
+14 -16
pkgs/development/libraries/libvpx/git.nix
··· 1 - {stdenv, fetchgit, perl, yasm 1 + { stdenv, fetchgit, perl, yasm 2 + , hostPlatform 2 3 , vp8DecoderSupport ? true # VP8 decoder 3 4 , vp8EncoderSupport ? true # VP8 encoder 4 5 , vp9DecoderSupport ? true # VP9 decoder ··· 152 153 153 154 postInstall = ''moveToOutput bin "$bin" ''; 154 155 155 - crossAttrs = let 156 - isCygwin = stdenv.cross.libc == "msvcrt"; 157 - isDarwin = stdenv.cross.libc == "libSystem"; 158 - in { 156 + crossAttrs = { 159 157 configurePlatforms = []; 160 158 configureFlags = configureFlags ++ [ 161 159 #"--extra-cflags=" ··· 166 164 # libvpx darwin targets include darwin version (ie. ARCH-darwinXX-gcc, XX being the darwin version) 167 165 # See all_platforms: https://github.com/webmproject/libvpx/blob/master/configure 168 166 # 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 "") 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 "") 180 178 ]; 181 179 }; 182 180