summary refs log tree commit diff
path: root/pkgs/development/libraries/ffmpeg/generic.nix
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2017-06-28 11:34:23 -0400
committerJohn Ericson <John.Ericson@Obsidian.Systems>2017-06-28 18:21:06 -0400
commit38dbd4b1610362c67e6a17d0e103f459ff471002 (patch)
tree75eb009847ddfab0873dbc6a0842544a6abe00be /pkgs/development/libraries/ffmpeg/generic.nix
parentfcef0add76de4728b11cf9acba840a7e7d06abbb (diff)
downloadnixpkgs-38dbd4b1610362c67e6a17d0e103f459ff471002.tar
nixpkgs-38dbd4b1610362c67e6a17d0e103f459ff471002.tar.gz
nixpkgs-38dbd4b1610362c67e6a17d0e103f459ff471002.tar.bz2
nixpkgs-38dbd4b1610362c67e6a17d0e103f459ff471002.tar.lz
nixpkgs-38dbd4b1610362c67e6a17d0e103f459ff471002.tar.xz
nixpkgs-38dbd4b1610362c67e6a17d0e103f459ff471002.tar.zst
nixpkgs-38dbd4b1610362c67e6a17d0e103f459ff471002.zip
ffmpeg: Don't use stdenv.cross
Diffstat (limited to 'pkgs/development/libraries/ffmpeg/generic.nix')
-rw-r--r--pkgs/development/libraries/ffmpeg/generic.nix26
1 files changed, 5 insertions, 21 deletions
diff --git a/pkgs/development/libraries/ffmpeg/generic.nix b/pkgs/development/libraries/ffmpeg/generic.nix
index 762a4c9503f..a34b378552a 100644
--- a/pkgs/development/libraries/ffmpeg/generic.nix
+++ b/pkgs/development/libraries/ffmpeg/generic.nix
@@ -2,6 +2,7 @@
 , alsaLib, bzip2, fontconfig, freetype, gnutls, libiconv, lame, libass, libogg
 , libtheora, libva, libvorbis, libvpx, lzma, libpulseaudio, soxr
 , x264, x265, xvidcore, zlib, libopus
+, hostPlatform
 , openglSupport ? false, mesa ? null
 # Build options
 , runtimeCpuDetectBuild ? true # Detect CPU capabilities at runtime
@@ -169,30 +170,13 @@ stdenv.mkDerivation rec {
 
   /* Cross-compilation is untested, consider this an outline, more work
      needs to be done to portions of the build to get it to work correctly */
-  crossAttrs = let
-    os = ''
-      if [ "${stdenv.cross.config}" = "*cygwin*" ] ; then
-        # Probably should look for mingw too
-        echo "cygwin"
-      elif [ "${stdenv.cross.config}" = "*darwin*" ] ; then
-        echo "darwin"
-      elif [ "${stdenv.cross.config}" = "*freebsd*" ] ; then
-        echo "freebsd"
-      elif [ "${stdenv.cross.config}" = "*linux*" ] ; then
-        echo "linux"
-      elif [ "${stdenv.cross.config}" = "*netbsd*" ] ; then
-        echo "netbsd"
-      elif [ "${stdenv.cross.config}" = "*openbsd*" ] ; then
-        echo "openbsd"
-      fi
-    '';
-  in {
+  crossAttrs = {
     configurePlatforms = [];
     configureFlags = configureFlags ++ [
-      "--cross-prefix=${stdenv.cross.config}-"
+      "--cross-prefix=${stdenv.cc.prefix}"
       "--enable-cross-compile"
-      "--target_os=${os}"
-      "--arch=${stdenv.cross.arch}"
+      "--target_os=${hostPlatform.parsed.kernel}"
+      "--arch=${hostPlatform.arch}"
     ];
   };