surge: 1.8.1 -> 1.9.0

authored by

Bart Brouns and committed by
Jonathan Ringer
a72c8a1d 2681f3a3

+23 -18
+23 -18
pkgs/applications/audio/surge/default.nix
··· 1 - { lib, stdenv, fetchFromGitHub, cmake, git, pkg-config, python3 1 + { stdenv, lib, fetchurl, fetchFromGitHub, cmake, git, pkg-config, python3 2 2 , cairo, libsndfile, libxcb, libxkbcommon, xcbutil, xcbutilcursor, xcbutilkeysyms, zenity 3 + , curl, rsync 3 4 }: 4 5 5 6 stdenv.mkDerivation rec { 6 7 pname = "surge"; 7 - version = "1.8.1"; 8 + version = "1.9.0"; 9 + 10 + src = fetchurl { 11 + url = "https://github.com/surge-synthesizer/releases/releases/download/${version}/SurgeSrc_${version}.tgz"; 12 + sha256 = "00af4lfcipl0rn0dn4gfipx7nbk8ym1mrmji8v0ar98frsrpxg4k"; 13 + }; 8 14 9 - src = fetchFromGitHub { 15 + extraContent = fetchFromGitHub { 10 16 owner = "surge-synthesizer"; 11 - repo = pname; 12 - rev = "release_${version}"; 13 - sha256 = "0lla860g7zgn9n1zgy14g4j72d5n5y7isyxz2w5xy2fzdpdg24ql"; 14 - leaveDotGit = true; # for SURGE_VERSION 15 - fetchSubmodules = true; 17 + repo = "surge-extra-content"; 18 + # rev from: https://github.com/surge-synthesizer/surge/blob/release_1.8.1/cmake/stage-extra-content.cmake#L6 19 + # or: https://github.com/surge-synthesizer/surge/blob/main/cmake/stage-extra-content.cmake 20 + # SURGE_EXTRA_CONTENT_HASH 21 + rev = "afc591cc06d9adc3dc8dc515a55c66873fa10296"; 22 + sha256 = "1wqv86l70nwlrb10n47rib80f47a96j9qqg8w5dv46ys1sq2nz7z"; 16 23 }; 17 - 18 24 nativeBuildInputs = [ cmake git pkg-config python3 ]; 19 - buildInputs = [ cairo libsndfile libxcb libxkbcommon xcbutil xcbutilcursor xcbutilkeysyms zenity ]; 25 + buildInputs = [ cairo libsndfile libxcb libxkbcommon xcbutil xcbutilcursor xcbutilkeysyms zenity curl rsync ]; 20 26 21 27 postPatch = '' 22 28 substituteInPlace src/common/SurgeStorage.cpp --replace "/usr/share/Surge" "$out/share/surge" 23 29 substituteInPlace src/linux/UserInteractionsLinux.cpp --replace '"zenity' '"${zenity}/bin/zenity' 24 - substituteInPlace vstgui.surge/vstgui/lib/platform/linux/x11fileselector.cpp --replace /usr/bin/zenity ${zenity}/bin/zenity 25 - patchShebangs scripts/linux/emit-vector-piggy 26 - patchShebangs scripts/linux/generate-lv2-ttl 30 + patchShebangs scripts/linux/ 31 + cp -r $extraContent/Skins/ resources/data/skins 27 32 ''; 28 33 34 + 29 35 installPhase = '' 30 - mkdir -p $out/lib/lv2 $out/lib/vst3 $out/share/surge 31 - cp -r surge_products/Surge.lv2 $out/lib/lv2/ 32 - cp -r surge_products/Surge.vst3 $out/lib/vst3/ 33 - cp -r ../resources/data/* $out/share/surge/ 36 + cd .. 37 + cmake --build build --config Release --target install-everything-global 34 38 ''; 35 39 36 40 doInstallCheck = true; 37 41 installCheckPhase = '' 38 - cd .. 42 + export HOME=$(mktemp -d) 43 + export SURGE_DISABLE_NETWORK_TESTS=TRUE 39 44 build/surge-headless 40 45 ''; 41 46