From 9cd2c7a6278285b72d9b544b8987d317bf3bdad3 Mon Sep 17 00:00:00 2001 From: Francesco Gazzetta Date: Thu, 17 Jun 2021 20:28:08 +0200 Subject: [PATCH 1/2] soundtracker: 1.0.1 -> 1.0.2.1 (cherry picked from commit 7cc5590b9236a62ba53b92e36a06f1c61b4ef682) --- pkgs/applications/audio/soundtracker/default.nix | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/pkgs/applications/audio/soundtracker/default.nix b/pkgs/applications/audio/soundtracker/default.nix index 71fc763a5c5..a6257b1d674 100644 --- a/pkgs/applications/audio/soundtracker/default.nix +++ b/pkgs/applications/audio/soundtracker/default.nix @@ -12,15 +12,15 @@ 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"; }; nativeBuildInputs = [ @@ -35,8 +35,6 @@ stdenv.mkDerivation rec { goocanvas ] ++ lib.optional stdenv.isLinux alsaLib; - hardeningDisable = [ "format" ]; - meta = with lib; { description = "A music tracking tool similar in design to the DOS program FastTracker and the Amiga legend ProTracker"; longDescription = '' From f6f4c4ac26dd4b4f22972c97e2d8d08339806ab3 Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Sun, 20 Jun 2021 14:02:42 +0200 Subject: [PATCH 2/2] soundtracker: Fix on Darwin (cherry picked from commit ade48138df8b77c1d76f4b5f016be5ebee06565e) --- .../audio/soundtracker/default.nix | 28 ++++++++++++++++--- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/audio/soundtracker/default.nix b/pkgs/applications/audio/soundtracker/default.nix index a6257b1d674..607e71e48f2 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 , alsaLib , SDL @@ -23,10 +23,32 @@ stdenv.mkDerivation rec { 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 @@ -49,7 +71,5 @@ stdenv.mkDerivation rec { license = licenses.gpl2Plus; maintainers = with maintainers; [ fgaz ]; platforms = platforms.all; - # gdk/gdkx.h not found - broken = stdenv.isDarwin; }; }