From e1aed21464ca610b938f01c45207c9be9dff26d6 Mon Sep 17 00:00:00 2001 From: 0x4A6F <0x4A6F@users.noreply.github.com> Date: Tue, 5 Oct 2021 00:11:33 +0200 Subject: [PATCH] giada: 0.16.4 -> unstable-2021-09-24 --- pkgs/applications/audio/giada/default.nix | 64 ++++++++++++++--------- 1 file changed, 39 insertions(+), 25 deletions(-) diff --git a/pkgs/applications/audio/giada/default.nix b/pkgs/applications/audio/giada/default.nix index b49335298e01..4b7b760db355 100644 --- a/pkgs/applications/audio/giada/default.nix +++ b/pkgs/applications/audio/giada/default.nix @@ -1,8 +1,9 @@ -{ lib, stdenv +{ lib +, stdenv , fetchFromGitHub -, autoreconfHook +, cmake +, pkg-config , fltk -, jansson , rtmidi , libsamplerate , libsndfile @@ -10,51 +11,65 @@ , alsa-lib , libpulseaudio , libXpm -, libXinerama -, libXcursor -, catch2 -, nlohmann_json +, flac +, libogg +, libvorbis +, libopus }: stdenv.mkDerivation rec { pname = "giada"; - version = "0.16.4"; + version = "unstable-2021-09-24"; src = fetchFromGitHub { owner = "monocasual"; repo = pname; - rev = "v${version}"; - sha256 = "0qyx0bvivlvly0vj5nnnbiks22xh13sqlw4mfgplq2lbbpgisigp"; + # Using master with https://github.com/monocasual/giada/pull/509 till a new release is done. + rev = "f117a8b8eef08d904ef1ab22c45f0e1fad6b8a56"; + sha256 = "01hb981lrsyk870zs8xph5fm0z7bbffpkxgw04hq487r804mkx9j"; + fetchSubmodules = true; }; - configureFlags = [ - "--target=linux" - "--enable-system-catch" + NIX_CFLAGS_COMPILE = [ + "-w" + "-Wno-error" + ]; + + cmakeFlags = [ + "-DCMAKE_INSTALL_BINDIR=bin" + "-DCMAKE_BUILD_TYPE=Release" ]; nativeBuildInputs = [ - autoreconfHook + cmake + pkg-config ]; buildInputs = [ + rtmidi fltk libsndfile libsamplerate - jansson - rtmidi - libXpm - jack2 alsa-lib + libXpm libpulseaudio - libXinerama - libXcursor - catch2 - nlohmann_json + jack2 + flac + libogg + libvorbis + libopus ]; postPatch = '' - sed -i 's:"deps/json/single_include/nlohmann/json\.hpp"::' \ - src/core/{conf,init,midiMapConf,patch}.cpp + 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.src}/RtMidi.h>" + done ''; meta = with lib; { @@ -63,6 +78,5 @@ stdenv.mkDerivation rec { license = licenses.gpl3; maintainers = with maintainers; [ petabyteboy ]; platforms = platforms.all; - broken = stdenv.hostPlatform.isAarch64; # produces build failure on aarch64-linux }; }