summary refs log tree commit diff
diff options
context:
space:
mode:
authorWilliam Kral <william.kral@gmail.com>2023-05-11 18:27:45 -0700
committerWilliam Kral <william.kral@gmail.com>2023-05-13 13:43:16 -0700
commitb86fd13f26a510124545fc5f207c98e4f24aa143 (patch)
tree7099d6a9c67cac6e8d4f8c3a8c61690907007ebd
parent53875c54daf7271383d9a2a4c7ee0c102bf8693c (diff)
downloadnixpkgs-b86fd13f26a510124545fc5f207c98e4f24aa143.tar
nixpkgs-b86fd13f26a510124545fc5f207c98e4f24aa143.tar.gz
nixpkgs-b86fd13f26a510124545fc5f207c98e4f24aa143.tar.bz2
nixpkgs-b86fd13f26a510124545fc5f207c98e4f24aa143.tar.lz
nixpkgs-b86fd13f26a510124545fc5f207c98e4f24aa143.tar.xz
nixpkgs-b86fd13f26a510124545fc5f207c98e4f24aa143.tar.zst
nixpkgs-b86fd13f26a510124545fc5f207c98e4f24aa143.zip
giada: unstable-2021-09-24 -> 0.24.0
-rw-r--r--pkgs/applications/audio/giada/default.nix38
1 files changed, 22 insertions, 16 deletions
diff --git a/pkgs/applications/audio/giada/default.nix b/pkgs/applications/audio/giada/default.nix
index c5dcec05a9d..86cb565fa82 100644
--- a/pkgs/applications/audio/giada/default.nix
+++ b/pkgs/applications/audio/giada/default.nix
@@ -1,35 +1,49 @@
 { lib
 , stdenv
 , fetchFromGitHub
+, fetchpatch
 , cmake
 , pkg-config
 , fltk
+, fmt
 , rtmidi
 , libsamplerate
+, libmpg123
 , libsndfile
 , jack2
 , alsa-lib
 , libpulseaudio
 , libXpm
+, libXrandr
 , flac
 , libogg
 , libvorbis
 , libopus
+, nlohmann_json
 }:
 
 stdenv.mkDerivation rec {
   pname = "giada";
-  version = "unstable-2021-09-24";
+  version = "0.24.0";
 
   src = fetchFromGitHub {
     owner = "monocasual";
     repo = pname;
-    # Using master with https://github.com/monocasual/giada/pull/509 till a new release is done.
-    rev = "f117a8b8eef08d904ef1ab22c45f0e1fad6b8a56";
-    sha256 = "01hb981lrsyk870zs8xph5fm0z7bbffpkxgw04hq487r804mkx9j";
+    rev = "v${version}";
+    sha256 = "sha256-pKzc+RRW3o5vYaiGqW9/VjYZZJvr6cg1kdjP9qRkHwM=";
     fetchSubmodules = true;
   };
 
+  patches = [
+    # Remove when updating to the next release, this PR is already merged
+    # Fix fmt type error: https://github.com/monocasual/giada/pull/635
+    (fetchpatch {
+      name = "fix-fmt-type-error.patch";
+      url = "https://github.com/monocasual/giada/commit/032af4334f6d2bb7e77a49e7aef5b4c4d696df9a.patch";
+      hash = "sha256-QuxETvBWzA1v2ifyNzlNMGfQ6XhYQF03sGZA9rBx1xU=";
+    })
+  ];
+
   env.NIX_CFLAGS_COMPILE = toString [
     "-w"
     "-Wno-error"
@@ -48,8 +62,11 @@ stdenv.mkDerivation rec {
   buildInputs = [
     rtmidi
     fltk
+    fmt
+    libmpg123
     libsndfile
     libsamplerate
+    nlohmann_json
     alsa-lib
     libXpm
     libpulseaudio
@@ -58,20 +75,9 @@ stdenv.mkDerivation rec {
     libogg
     libvorbis
     libopus
+    libXrandr
   ];
 
-  postPatch = ''
-    local fixup_list=(
-      src/core/kernelMidi.cpp
-      src/gui/elems/config/tabMidi.cpp
-      src/utils/ver.cpp
-    )
-    for f in "''${fixup_list[@]}"; do
-      substituteInPlace "$f" \
-        --replace "<RtMidi.h>" "<${rtmidi.src}/RtMidi.h>"
-    done
-  '';
-
   meta = with lib; {
     description = "A free, minimal, hardcore audio tool for DJs, live performers and electronic musicians";
     homepage = "https://giadamusic.com/";