summary refs log tree commit diff
path: root/pkgs/development/libraries/libvpx
diff options
context:
space:
mode:
authorJohn Ericson <Ericson2314@yahoo.com>2018-05-10 14:38:58 -0400
committerGitHub <noreply@github.com>2018-05-10 14:38:58 -0400
commit1d90ea9194633503e30494fa5e050924c8a3e56f (patch)
tree8c554f983cebccb5fb878f3d032294c47714bb39 /pkgs/development/libraries/libvpx
parentf40aa17933bc07d7913fd705b5f8ce50aab86782 (diff)
parentc42118bb822ae35431343109aeb903f2c2d121af (diff)
downloadnixpkgs-1d90ea9194633503e30494fa5e050924c8a3e56f.tar
nixpkgs-1d90ea9194633503e30494fa5e050924c8a3e56f.tar.gz
nixpkgs-1d90ea9194633503e30494fa5e050924c8a3e56f.tar.bz2
nixpkgs-1d90ea9194633503e30494fa5e050924c8a3e56f.tar.lz
nixpkgs-1d90ea9194633503e30494fa5e050924c8a3e56f.tar.xz
nixpkgs-1d90ea9194633503e30494fa5e050924c8a3e56f.tar.zst
nixpkgs-1d90ea9194633503e30494fa5e050924c8a3e56f.zip
Merge pull request #40294 from obsidiansystems/no-crossAttrs
misc packages: Fewer crossAttrs
Diffstat (limited to 'pkgs/development/libraries/libvpx')
-rw-r--r--pkgs/development/libraries/libvpx/default.nix52
-rw-r--r--pkgs/development/libraries/libvpx/git.nix34
2 files changed, 39 insertions, 47 deletions
diff --git a/pkgs/development/libraries/libvpx/default.nix b/pkgs/development/libraries/libvpx/default.nix
index 466ffa0cf18..731892d33b4 100644
--- a/pkgs/development/libraries/libvpx/default.nix
+++ b/pkgs/development/libraries/libvpx/default.nix
@@ -72,6 +72,7 @@ stdenv.mkDerivation rec {
   outputs = [ "bin" "dev" "out" ];
   setOutputFlags = false;
 
+  configurePlatforms = [];
   configureFlags = [
     (enableFeature (vp8EncoderSupport || vp8DecoderSupport) "vp8")
     (enableFeature vp8EncoderSupport "vp8-encoder")
@@ -131,8 +132,29 @@ stdenv.mkDerivation rec {
     (enableFeature (experimentalSpatialSvcSupport ||
                     experimentalFpMbStatsSupport ||
                     experimentalEmulateHardwareSupport) "experimental")
-    # Experimental features
-  ] ++ optional experimentalSpatialSvcSupport "--enable-spatial-svc"
+  ] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
+    #"--extra-cflags="
+    #"--extra-cxxflags="
+    #"--prefix="
+    #"--libc="
+    #"--libdir="
+    "--enable-external-build"
+    # libvpx darwin targets include darwin version (ie. ARCH-darwinXX-gcc, XX being the darwin version)
+    # See all_platforms: https://github.com/webmproject/libvpx/blob/master/configure
+    # Darwin versions: 10.4=8, 10.5=9, 10.6=10, 10.7=11, 10.8=12, 10.9=13, 10.10=14
+    "--force-target=${hostPlatform.config}${
+            if hostPlatform.isDarwin then
+              if      hostPlatform.osxMinVersion == "10.10" then "14"
+              else if hostPlatform.osxMinVersion == "10.9"  then "13"
+              else if hostPlatform.osxMinVersion == "10.8"  then "12"
+              else if hostPlatform.osxMinVersion == "10.7"  then "11"
+              else if hostPlatform.osxMinVersion == "10.6"  then "10"
+              else if hostPlatform.osxMinVersion == "10.5"  then "9"
+              else "8"
+            else ""}-gcc"
+    (if hostPlatform.isCygwin then "--enable-static-msvcrt" else "")
+  ] # Experimental features
+    ++ optional experimentalSpatialSvcSupport "--enable-spatial-svc"
     ++ optional experimentalFpMbStatsSupport "--enable-fp-mb-stats"
     ++ optional experimentalEmulateHardwareSupport "--enable-emulate-hardware";
 
@@ -145,32 +167,6 @@ stdenv.mkDerivation rec {
 
   postInstall = ''moveToOutput bin "$bin" '';
 
-  crossAttrs = {
-    configurePlatforms = [];
-    configureFlags = configureFlags ++ [
-      #"--extra-cflags="
-      #"--extra-cxxflags="
-      #"--prefix="
-      #"--libc="
-      #"--libdir="
-      "--enable-external-build"
-      # libvpx darwin targets include darwin version (ie. ARCH-darwinXX-gcc, XX being the darwin version)
-      # See all_platforms: https://github.com/webmproject/libvpx/blob/master/configure
-      # Darwin versions: 10.4=8, 10.5=9, 10.6=10, 10.7=11, 10.8=12, 10.9=13, 10.10=14
-      "--force-target=${hostPlatform.config}${
-              if hostPlatform.isDarwin then
-                if      hostPlatform.osxMinVersion == "10.10" then "14"
-                else if hostPlatform.osxMinVersion == "10.9"  then "13"
-                else if hostPlatform.osxMinVersion == "10.8"  then "12"
-                else if hostPlatform.osxMinVersion == "10.7"  then "11"
-                else if hostPlatform.osxMinVersion == "10.6"  then "10"
-                else if hostPlatform.osxMinVersion == "10.5"  then "9"
-                else "8"
-              else ""}-gcc"
-      (if hostPlatform.isCygwin then "--enable-static-msvcrt" else "")
-    ];
-  };
-
   meta = with stdenv.lib; {
     description = "WebM VP8/VP9 codec SDK";
     homepage    = https://www.webmproject.org/;
diff --git a/pkgs/development/libraries/libvpx/git.nix b/pkgs/development/libraries/libvpx/git.nix
index e2b94dda28e..7d4b75d6cdf 100644
--- a/pkgs/development/libraries/libvpx/git.nix
+++ b/pkgs/development/libraries/libvpx/git.nix
@@ -77,6 +77,7 @@ stdenv.mkDerivation rec {
   outputs = [ "bin" "dev" "out" ];
   setOutputFlags = false;
 
+  configurePlatforms = [];
   configureFlags = [
     (enableFeature (vp8EncoderSupport || vp8DecoderSupport) "vp8")
     (enableFeature vp8EncoderSupport "vp8-encoder")
@@ -139,23 +140,7 @@ stdenv.mkDerivation rec {
     (enableFeature (experimentalSpatialSvcSupport ||
                     experimentalFpMbStatsSupport ||
                     experimentalEmulateHardwareSupport) "experimental")
-    # Experimental features
-  ] ++ optional experimentalSpatialSvcSupport "--enable-spatial-svc"
-    ++ optional experimentalFpMbStatsSupport "--enable-fp-mb-stats"
-    ++ optional experimentalEmulateHardwareSupport "--enable-emulate-hardware";
-
-  nativeBuildInputs = [ perl yasm ];
-
-  buildInputs = [ ]
-    ++ optionals unitTestsSupport [ coreutils curl ];
-
-  enableParallelBuilding = true;
-
-  postInstall = ''moveToOutput bin "$bin" '';
-
-  crossAttrs = {
-    configurePlatforms = [];
-    configureFlags = configureFlags ++ [
+  ] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
       #"--extra-cflags="
       #"--prefix="
       #"--libc="
@@ -175,8 +160,19 @@ stdenv.mkDerivation rec {
                 else "8"
               else ""}-gcc"
       (if hostPlatform.isCygwin then "--enable-static-msvcrt" else "")
-    ];
-  };
+  ] # Experimental features
+    ++ optional experimentalSpatialSvcSupport "--enable-spatial-svc"
+    ++ optional experimentalFpMbStatsSupport "--enable-fp-mb-stats"
+    ++ optional experimentalEmulateHardwareSupport "--enable-emulate-hardware";
+
+  nativeBuildInputs = [ perl yasm ];
+
+  buildInputs = [ ]
+    ++ optionals unitTestsSupport [ coreutils curl ];
+
+  enableParallelBuilding = true;
+
+  postInstall = ''moveToOutput bin "$bin" '';
 
   meta = with stdenv.lib; {
     description = "WebM VP8/VP9 codec SDK";