3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/audio/surge/default.nix

55 lines
1.9 KiB
Nix
Raw Normal View History

2021-05-21 23:11:59 +01:00
{ stdenv, lib, fetchurl, fetchFromGitHub, cmake, git, pkg-config, python3
2020-09-02 05:05:52 +01:00
, cairo, libsndfile, libxcb, libxkbcommon, xcbutil, xcbutilcursor, xcbutilkeysyms, zenity
2021-05-21 23:11:59 +01:00
, curl, rsync
2020-09-02 05:05:52 +01:00
}:
2020-03-11 09:05:29 +00:00
stdenv.mkDerivation rec {
pname = "surge";
2021-05-21 23:11:59 +01:00
version = "1.9.0";
2020-03-11 09:05:29 +00:00
2021-05-21 23:11:59 +01:00
src = fetchurl {
url = "https://github.com/surge-synthesizer/releases/releases/download/${version}/SurgeSrc_${version}.tgz";
sha256 = "00af4lfcipl0rn0dn4gfipx7nbk8ym1mrmji8v0ar98frsrpxg4k";
2020-03-11 09:05:29 +00:00
};
2021-05-21 23:11:59 +01:00
extraContent = fetchFromGitHub {
owner = "surge-synthesizer";
repo = "surge-extra-content";
# rev from: https://github.com/surge-synthesizer/surge/blob/release_1.8.1/cmake/stage-extra-content.cmake#L6
# or: https://github.com/surge-synthesizer/surge/blob/main/cmake/stage-extra-content.cmake
# SURGE_EXTRA_CONTENT_HASH
rev = "afc591cc06d9adc3dc8dc515a55c66873fa10296";
sha256 = "1wqv86l70nwlrb10n47rib80f47a96j9qqg8w5dv46ys1sq2nz7z";
};
2020-09-02 05:05:52 +01:00
nativeBuildInputs = [ cmake git pkg-config python3 ];
2021-05-21 23:11:59 +01:00
buildInputs = [ cairo libsndfile libxcb libxkbcommon xcbutil xcbutilcursor xcbutilkeysyms zenity curl rsync ];
2020-03-11 09:05:29 +00:00
2020-09-02 05:05:52 +01:00
postPatch = ''
2020-03-11 09:05:29 +00:00
substituteInPlace src/common/SurgeStorage.cpp --replace "/usr/share/Surge" "$out/share/surge"
2020-09-02 05:05:52 +01:00
substituteInPlace src/linux/UserInteractionsLinux.cpp --replace '"zenity' '"${zenity}/bin/zenity'
2021-05-21 23:11:59 +01:00
patchShebangs scripts/linux/
cp -r $extraContent/Skins/ resources/data/skins
2020-08-28 12:47:04 +01:00
'';
2020-03-11 09:05:29 +00:00
2021-05-21 23:11:59 +01:00
2020-03-11 09:05:29 +00:00
installPhase = ''
2021-05-21 23:11:59 +01:00
cd ..
cmake --build build --config Release --target install-everything-global
2020-03-11 09:05:29 +00:00
'';
doInstallCheck = true;
installCheckPhase = ''
2021-05-21 23:11:59 +01:00
export HOME=$(mktemp -d)
export SURGE_DISABLE_NETWORK_TESTS=TRUE
2020-09-02 05:05:52 +01:00
build/surge-headless
2020-03-11 09:05:29 +00:00
'';
meta = with lib; {
2020-09-02 05:05:52 +01:00
description = "LV2 & VST3 synthesizer plug-in (previously released as Vember Audio Surge)";
2020-03-11 09:05:29 +00:00
homepage = "https://surge-synthesizer.github.io";
license = licenses.gpl3;
platforms = [ "x86_64-linux" ];
2020-09-02 05:05:52 +01:00
maintainers = with maintainers; [ magnetophon orivej ];
2020-03-11 09:05:29 +00:00
};
}