about summary refs log tree commit diff
path: root/pkgs/applications/video
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2018-05-10 01:38:51 -0400
committerJohn Ericson <John.Ericson@Obsidian.Systems>2018-05-10 01:57:49 -0400
commit7864a17bfb1fce9195e024e1e2ff1dfa14a942f3 (patch)
tree2d7cdca82117aa19e295ae43f2f93fa91e2586d8 /pkgs/applications/video
parent7d0906eea89f94b24d9df9af90579a88422dc126 (diff)
downloadnixlib-7864a17bfb1fce9195e024e1e2ff1dfa14a942f3.tar
nixlib-7864a17bfb1fce9195e024e1e2ff1dfa14a942f3.tar.gz
nixlib-7864a17bfb1fce9195e024e1e2ff1dfa14a942f3.tar.bz2
nixlib-7864a17bfb1fce9195e024e1e2ff1dfa14a942f3.tar.lz
nixlib-7864a17bfb1fce9195e024e1e2ff1dfa14a942f3.tar.xz
nixlib-7864a17bfb1fce9195e024e1e2ff1dfa14a942f3.tar.zst
nixlib-7864a17bfb1fce9195e024e1e2ff1dfa14a942f3.zip
misc video players: Clean up cross
Diffstat (limited to 'pkgs/applications/video')
-rw-r--r--pkgs/applications/video/omxplayer/default.nix22
1 files changed, 11 insertions, 11 deletions
diff --git a/pkgs/applications/video/omxplayer/default.nix b/pkgs/applications/video/omxplayer/default.nix
index 520451df400f..00a419d0a85d 100644
--- a/pkgs/applications/video/omxplayer/default.nix
+++ b/pkgs/applications/video/omxplayer/default.nix
@@ -12,9 +12,13 @@ let
       sha256 = "03s1zsprz5p6gjgwwqcf7b6cvzwwid6l8k7bamx9i0f1iwkgdm0j";
     };
     
+    configurePlatforms = [];
     configureFlags = [
-      "--arch=arm"
+      "--arch=${hostPlatform.parsed.cpu.name}"
+    ] ++ stdenv.lib.optionals stdenv.hostPlatform.isAarch32 [
+      # TODO be better with condition
       "--cpu=arm1176jzf-s"
+    ] ++ [
       "--disable-muxers"
       "--enable-muxer=spdif"
       "--enable-muxer=adts"
@@ -42,19 +46,14 @@ let
       "--enable-hardcoded-tables"
       "--disable-runtime-cpudetect"
       "--disable-debug"
+      "--arch=${hostPlatform.parsed.cpu.name}"
+      "--target_os=${hostPlatform.parsed.kernel.name}"
+    ] ++ stdenv.lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
+      "--cross-prefix=${stdenv.cc.targetPrefix}"
+      "--enable-cross-compile"
     ];
 
     enableParallelBuilding = true;
-      
-    crossAttrs = {
-      configurePlatforms = [];
-      configureFlags = configureFlags ++ [
-        "--cross-prefix=${stdenv.cc.targetPrefix}"
-        "--enable-cross-compile"
-        "--target_os=linux"
-        "--arch=${hostPlatform.parsed.cpu.name}"
-        ];
-    };
 
     meta = {
       homepage = http://www.ffmpeg.org/;
@@ -83,5 +82,6 @@ stdenv.mkDerivation rec {
     homepage = https://github.com/huceke/omxplayer;
     description = "Commandline OMX player for the Raspberry Pi";
     license = stdenv.lib.licenses.gpl2Plus;
+    platforms = stdenv.lib.platforms.arm;
   };
 }