summary refs log tree commit diff
path: root/pkgs/applications
diff options
context:
space:
mode:
authorLuke Granger-Brown <git@lukegb.com>2021-07-25 10:05:31 +0100
committerGitHub <noreply@github.com>2021-07-25 10:05:31 +0100
commit480e2811cf7cfea18fb9a349bab66fb3db4f7ce0 (patch)
tree0e62dfbec5b8930348942e8da40351df32d0b17f /pkgs/applications
parent94992c26033bb46736c9b4e4f8862b583440f33f (diff)
parentade48138df8b77c1d76f4b5f016be5ebee06565e (diff)
downloadnixpkgs-480e2811cf7cfea18fb9a349bab66fb3db4f7ce0.tar
nixpkgs-480e2811cf7cfea18fb9a349bab66fb3db4f7ce0.tar.gz
nixpkgs-480e2811cf7cfea18fb9a349bab66fb3db4f7ce0.tar.bz2
nixpkgs-480e2811cf7cfea18fb9a349bab66fb3db4f7ce0.tar.lz
nixpkgs-480e2811cf7cfea18fb9a349bab66fb3db4f7ce0.tar.xz
nixpkgs-480e2811cf7cfea18fb9a349bab66fb3db4f7ce0.tar.zst
nixpkgs-480e2811cf7cfea18fb9a349bab66fb3db4f7ce0.zip
Merge pull request #127251 from fgaz/soundtracker/1.0.2.1
soundtracker: 1.0.1 -> 1.0.2.1
Diffstat (limited to 'pkgs/applications')
-rw-r--r--pkgs/applications/audio/soundtracker/default.nix36
1 files changed, 27 insertions, 9 deletions
diff --git a/pkgs/applications/audio/soundtracker/default.nix b/pkgs/applications/audio/soundtracker/default.nix
index 3dc9089b241..251725ea6b2 100644
--- a/pkgs/applications/audio/soundtracker/default.nix
+++ b/pkgs/applications/audio/soundtracker/default.nix
@@ -1,7 +1,7 @@
 { lib, stdenv
 , fetchurl
 , pkg-config
-, autoconf
+, autoreconfHook
 , gtk2
 , alsa-lib
 , SDL
@@ -12,21 +12,43 @@
 
 stdenv.mkDerivation rec {
   pname = "soundtracker";
-  version = "1.0.1";
+  version = "1.0.2.1";
 
   src = fetchurl {
     # Past releases get moved to the "old releases" directory.
     # Only the latest release is at the top level.
     # Nonetheless, only the name of the file seems to affect which file is
     # downloaded, so this path should be fine both for old and current releases.
-    url = "mirror://sourceforge/soundtracker/soundtracker-${version}.tar.bz2";
-    sha256 = "0m5iiqccch6w53khpvdldz59zymw13vmwqc5ggx3sn41riwbd6ks";
+    url = "mirror://sourceforge/soundtracker/soundtracker-${version}.tar.xz";
+    sha256 = "0nh0dwz8nldc040q6n06vlazhss8ms42r2dffhjcrqj3hbrvfx82";
   };
 
+  postPatch = lib.optionalString stdenv.hostPlatform.isDarwin ''
+    # Darwin binutils don't support D option for ar
+    # ALSA macros are missing on Darwin, causing error
+    substituteInPlace configure.ac \
+      --replace ARFLAGS=crD ARFLAGS=cru \
+      --replace AM_PATH_ALSA '#AM_PATH_ALSA'
+    # Avoid X11-specific workaround code on more than just Windows
+    substituteInPlace app/keys.c \
+      --replace '!defined(_WIN32)' '!defined(_WIN32) && !defined(__APPLE__)'
+    # "The application with bundle ID (null) is running setugid(), which is not allowed."
+    sed -i -e '/seteuid/d' -e '/setegid/d' app/main.c
+  '';
+
+  configureFlags = [
+    "--with-graphics-backend=gdk"
+  ] ++ lib.optionals stdenv.hostPlatform.isDarwin [
+    "--disable-alsa"
+  ];
+
+  enableParallelBuilding = true;
+
   nativeBuildInputs = [
     pkg-config
-    autoconf
+    autoreconfHook
   ];
+
   buildInputs = [
     gtk2
     SDL
@@ -35,8 +57,6 @@ stdenv.mkDerivation rec {
     goocanvas
   ] ++ lib.optional stdenv.isLinux alsa-lib;
 
-  hardeningDisable = [ "format" ];
-
   meta = with lib; {
     description = "A music tracking tool similar in design to the DOS program FastTracker and the Amiga legend ProTracker";
     longDescription = ''
@@ -51,7 +71,5 @@ stdenv.mkDerivation rec {
     license = licenses.gpl2Plus;
     maintainers = with maintainers; [ fgaz ];
     platforms = platforms.all;
-    # gdk/gdkx.h not found
-    broken = stdenv.isDarwin;
   };
 }