summary refs log tree commit diff
path: root/pkgs/applications
diff options
context:
space:
mode:
authorJörg Thalheim <Mic92@users.noreply.github.com>2021-04-22 07:05:10 +0100
committerGitHub <noreply@github.com>2021-04-22 07:05:10 +0100
commit093b406afc29f9108949d264c11db413cd48faea (patch)
treec72f9fb1af9ed230aa4e8e0fc23131594ebfe7db /pkgs/applications
parent75fd67d156657d1e4b6d1827fe352889b67b0a97 (diff)
parent897c8e6982de78ba629a77ca4aedae73e0923f10 (diff)
downloadnixpkgs-093b406afc29f9108949d264c11db413cd48faea.tar
nixpkgs-093b406afc29f9108949d264c11db413cd48faea.tar.gz
nixpkgs-093b406afc29f9108949d264c11db413cd48faea.tar.bz2
nixpkgs-093b406afc29f9108949d264c11db413cd48faea.tar.lz
nixpkgs-093b406afc29f9108949d264c11db413cd48faea.tar.xz
nixpkgs-093b406afc29f9108949d264c11db413cd48faea.tar.zst
nixpkgs-093b406afc29f9108949d264c11db413cd48faea.zip
Merge pull request #120076 from Radvendii/mpg123-windows
mpg123: fix cross-compile to windows
Diffstat (limited to 'pkgs/applications')
-rw-r--r--pkgs/applications/audio/mpg123/default.nix25
1 files changed, 13 insertions, 12 deletions
diff --git a/pkgs/applications/audio/mpg123/default.nix b/pkgs/applications/audio/mpg123/default.nix
index a3e5b3e50eb..153e8b9940b 100644
--- a/pkgs/applications/audio/mpg123/default.nix
+++ b/pkgs/applications/audio/mpg123/default.nix
@@ -1,9 +1,9 @@
 { lib, stdenv
 , fetchurl
 , makeWrapper
-
 , alsaLib
 , perl
+, withConplay ? !stdenv.targetPlatform.isWindows
 }:
 
 stdenv.mkDerivation rec {
@@ -14,35 +14,36 @@ stdenv.mkDerivation rec {
     sha256 = "sha256-UCqX4Nk1vn432YczgCHY8wG641wohPKoPVnEtSRm7wY=";
   };
 
-  outputs = [ "out" "conplay" ];
+  outputs = [ "out" ] ++ lib.optionals withConplay [ "conplay" ];
 
-  nativeBuildInputs = [ makeWrapper ];
+  nativeBuildInputs = lib.optionals withConplay [ makeWrapper ];
 
-  buildInputs = [ perl ] ++ lib.optional (!stdenv.isDarwin) alsaLib;
+  buildInputs = lib.optionals withConplay [ perl ]
+    ++ lib.optionals (!stdenv.isDarwin && !stdenv.targetPlatform.isWindows) [ alsaLib ];
 
   configureFlags = lib.optional
     (stdenv.hostPlatform ? mpg123)
     "--with-cpu=${stdenv.hostPlatform.mpg123.cpu}";
 
-  postInstall = ''
+  postInstall = lib.optionalString withConplay ''
     mkdir -p $conplay/bin
     mv scripts/conplay $conplay/bin/
   '';
 
-  preFixup = ''
+  preFixup = lib.optionalString withConplay ''
     patchShebangs $conplay/bin/conplay
   '';
 
-  postFixup = ''
+  postFixup = lib.optionalString withConplay ''
     wrapProgram $conplay/bin/conplay \
       --prefix PATH : $out/bin
   '';
 
-  meta = {
+  meta = with lib; {
     description = "Fast console MPEG Audio Player and decoder library";
-    homepage = "http://mpg123.org";
-    license = lib.licenses.lgpl21;
-    maintainers = [ lib.maintainers.ftrvxmtrx ];
-    platforms = lib.platforms.unix;
+    homepage = "https://mpg123.org";
+    license = licenses.lgpl21;
+    maintainers = [ maintainers.ftrvxmtrx ];
+    platforms = platforms.all;
   };
 }