about summary refs log tree commit diff
path: root/pkgs/applications/audio
diff options
context:
space:
mode:
authorOPNA2608 <christoph.neidahl@gmail.com>2021-05-29 03:41:34 +0200
committerOPNA2608 <christoph.neidahl@gmail.com>2021-06-17 21:04:07 +0200
commitf9d0468f948adba94cb966ab48dff9afa50f9678 (patch)
tree9df4248c502c6beac53d5690387811e4c9bb4e49 /pkgs/applications/audio
parent696dd4533e89ca1a83104cf8a5595abccbfa9f4b (diff)
downloadnixlib-f9d0468f948adba94cb966ab48dff9afa50f9678.tar
nixlib-f9d0468f948adba94cb966ab48dff9afa50f9678.tar.gz
nixlib-f9d0468f948adba94cb966ab48dff9afa50f9678.tar.bz2
nixlib-f9d0468f948adba94cb966ab48dff9afa50f9678.tar.lz
nixlib-f9d0468f948adba94cb966ab48dff9afa50f9678.tar.xz
nixlib-f9d0468f948adba94cb966ab48dff9afa50f9678.tar.zst
nixlib-f9d0468f948adba94cb966ab48dff9afa50f9678.zip
uade123: Add maintainer, 2.13 -> unstable-2021-05-21
Properly wraps mod2ogg2.sh script, patches incorrect switches &
paths.
Diffstat (limited to 'pkgs/applications/audio')
-rw-r--r--pkgs/applications/audio/uade123/default.nix75
1 files changed, 62 insertions, 13 deletions
diff --git a/pkgs/applications/audio/uade123/default.nix b/pkgs/applications/audio/uade123/default.nix
index 271f9f912ea8..8191fd381a4b 100644
--- a/pkgs/applications/audio/uade123/default.nix
+++ b/pkgs/applications/audio/uade123/default.nix
@@ -1,25 +1,74 @@
-{ lib, stdenv, fetchurl, which, libao, pkg-config }:
+{ lib
+, stdenv
+, fetchFromGitLab
+, pkg-config
+, which
+, makeWrapper
+, libao
+, libbencodetools
+, sox
+, lame
+, flac
+, vorbis-tools
+}:
 
-let
-  version = "2.13";
-in stdenv.mkDerivation {
+stdenv.mkDerivation {
   pname = "uade123";
-  inherit version;
-  src = fetchurl {
-    url = "http://zakalwe.fi/uade/uade2/uade-${version}.tar.bz2";
-    sha256 = "04nn5li7xy4g5ysyjjngmv5d3ibxppkbb86m10vrvadzxdd4w69v";
+  version = "unstable-2021-05-21";
+
+  src = fetchFromGitLab {
+    owner = "uade-music-player";
+    repo = "uade";
+    rev = "7169a46e777d19957cd7ff8ac31843203e725ddc";
+    sha256 = "1dm7c924fy79y3wkb0qi71m1k6yw1x6j3whw7d0w4ka9hv6za03b";
   };
-  nativeBuildInputs = [ pkg-config which ];
-  buildInputs = [ libao ];
+
+  postPatch = ''
+    patchShebangs .
+    substituteInPlace src/frontends/mod2ogg/mod2ogg2.sh.in \
+      --replace '-e stat' '-n stat' \
+      --replace '/usr/local' "$out"
+  '';
+
+  nativeBuildInputs = [
+    pkg-config
+    which
+    makeWrapper
+  ];
+
+  buildInputs = [
+    libao
+    libbencodetools
+    sox
+    lame
+    flac
+    vorbis-tools
+  ];
+
+  configureFlags = [
+    "--bencode-tools-prefix=${libbencodetools}"
+  ];
 
   enableParallelBuilding = true;
+
   hardeningDisable = [ "format" ];
 
+  postInstall = ''
+    wrapProgram $out/bin/mod2ogg2.sh \
+      --prefix PATH : $out/bin:${lib.makeBinPath [ sox lame flac vorbis-tools ]}
+    # This is an old script, don't break expectations by renaming it
+    ln -s $out/bin/mod2ogg2{.sh,}
+  '';
+
   meta = with lib; {
     description = "Plays old Amiga tunes through UAE emulation and cloned m68k-assembler Eagleplayer API";
-    homepage = "http://zakalwe.fi/uade/";
-    license = licenses.gpl2;
-    maintainers = [ ];
+    homepage = "https://zakalwe.fi/uade/";
+    # It's a mix of licenses. "GPL", Public Domain, "LGPL", GPL2+, BSD, LGPL21+ and source code with unknown licenses. E.g.
+    # - hippel-coso player is "[not] under any Open Source certified license"
+    # - infogrames player is disassembled from Andi Silvas player, unknown license
+    # Let's make it easy and flag the whole package as unfree.
+    license = licenses.unfree;
+    maintainers = with maintainers; [ OPNA2608 ];
     platforms = platforms.unix;
   };
 }