tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
0
fork
atom
lol
0
fork
atom
overview
issues
pulls
pipelines
libvpx: Don't use stdenv.cross
John Ericson
8 years ago
5c99b2f3
38dbd4b1
+28
-32
2 changed files
expand all
collapse all
unified
split
pkgs
development
libraries
libvpx
default.nix
git.nix
+14
-16
pkgs/development/libraries/libvpx/default.nix
reviewed
···
1
1
-
{stdenv, fetchFromGitHub, perl, yasm
1
1
+
{ stdenv, fetchFromGitHub, perl, yasm
2
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
147
-
crossAttrs = let
148
148
-
isCygwin = stdenv.cross.libc == "msvcrt";
149
149
-
isDarwin = stdenv.cross.libc == "libSystem";
150
150
-
in {
148
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
162
-
"--force-target=${stdenv.cross.config}${(
163
163
-
if isDarwin then (
164
164
-
if stdenv.cross.osxMinVersion == "10.10" then "14"
165
165
-
else if stdenv.cross.osxMinVersion == "10.9" then "13"
166
166
-
else if stdenv.cross.osxMinVersion == "10.8" then "12"
167
167
-
else if stdenv.cross.osxMinVersion == "10.7" then "11"
168
168
-
else if stdenv.cross.osxMinVersion == "10.6" then "10"
169
169
-
else if stdenv.cross.osxMinVersion == "10.5" then "9"
170
170
-
else "8")
171
171
-
else "")}-gcc"
172
172
-
(if isCygwin then "--enable-static-msvcrt" else "")
160
160
+
"--force-target=${hostPlatform.config}${
161
161
+
if hostPlatform.isDarwin then
162
162
+
if hostPlatform.osxMinVersion == "10.10" then "14"
163
163
+
else if hostPlatform.osxMinVersion == "10.9" then "13"
164
164
+
else if hostPlatform.osxMinVersion == "10.8" then "12"
165
165
+
else if hostPlatform.osxMinVersion == "10.7" then "11"
166
166
+
else if hostPlatform.osxMinVersion == "10.6" then "10"
167
167
+
else if hostPlatform.osxMinVersion == "10.5" then "9"
168
168
+
else "8"
169
169
+
else ""}-gcc"
170
170
+
(if hostPlatform.isCygwin then "--enable-static-msvcrt" else "")
173
171
];
174
172
};
175
173
+14
-16
pkgs/development/libraries/libvpx/git.nix
reviewed
···
1
1
-
{stdenv, fetchgit, perl, yasm
1
1
+
{ stdenv, fetchgit, perl, yasm
2
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
155
-
crossAttrs = let
156
156
-
isCygwin = stdenv.cross.libc == "msvcrt";
157
157
-
isDarwin = stdenv.cross.libc == "libSystem";
158
158
-
in {
156
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
169
-
"--force-target=${stdenv.cross.config}${(
170
170
-
if isDarwin then (
171
171
-
if stdenv.cross.osxMinVersion == "10.10" then "14"
172
172
-
else if stdenv.cross.osxMinVersion == "10.9" then "13"
173
173
-
else if stdenv.cross.osxMinVersion == "10.8" then "12"
174
174
-
else if stdenv.cross.osxMinVersion == "10.7" then "11"
175
175
-
else if stdenv.cross.osxMinVersion == "10.6" then "10"
176
176
-
else if stdenv.cross.osxMinVersion == "10.5" then "9"
177
177
-
else "8")
178
178
-
else "")}-gcc"
179
179
-
(if isCygwin then "--enable-static-msvcrt" else "")
167
167
+
"--force-target=${hostPlatform.config}${
168
168
+
if hostPlatform.isDarwin then
169
169
+
if hostPlatform.osxMinVersion == "10.10" then "14"
170
170
+
else if hostPlatform.osxMinVersion == "10.9" then "13"
171
171
+
else if hostPlatform.osxMinVersion == "10.8" then "12"
172
172
+
else if hostPlatform.osxMinVersion == "10.7" then "11"
173
173
+
else if hostPlatform.osxMinVersion == "10.6" then "10"
174
174
+
else if hostPlatform.osxMinVersion == "10.5" then "9"
175
175
+
else "8"
176
176
+
else ""}-gcc"
177
177
+
(if hostPlatform.isCygwin then "--enable-static-msvcrt" else "")
180
178
];
181
179
};
182
180