diff options
author | Alyssa Ross <hi@alyssa.is> | 2021-08-04 10:43:07 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2021-08-04 10:43:07 +0000 |
commit | 62614cbef7da005c1eda8c9400160f6bcd6546b8 (patch) | |
tree | c2630f69080637987b68acb1ee8676d2681fe304 /pkgs/applications/audio/surge/default.nix | |
parent | d9c82ed3044c72cecf01c6ea042489d30914577c (diff) | |
parent | e24069138dfec3ef94f211f1da005bb5395adc11 (diff) | |
download | nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.gz nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.bz2 nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.lz nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.xz nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.zst nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.zip |
Merge branch 'nixpkgs-update' into master
Diffstat (limited to 'pkgs/applications/audio/surge/default.nix')
-rw-r--r-- | pkgs/applications/audio/surge/default.nix | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/pkgs/applications/audio/surge/default.nix b/pkgs/applications/audio/surge/default.nix new file mode 100644 index 00000000000..849b07d67e1 --- /dev/null +++ b/pkgs/applications/audio/surge/default.nix @@ -0,0 +1,54 @@ +{ stdenv, lib, fetchurl, fetchFromGitHub, cmake, git, pkg-config, python3 +, cairo, libsndfile, libxcb, libxkbcommon, xcbutil, xcbutilcursor, xcbutilkeysyms, zenity +, curl, rsync +}: + +stdenv.mkDerivation rec { + pname = "surge"; + version = "1.9.0"; + + src = fetchurl { + url = "https://github.com/surge-synthesizer/releases/releases/download/${version}/SurgeSrc_${version}.tgz"; + sha256 = "00af4lfcipl0rn0dn4gfipx7nbk8ym1mrmji8v0ar98frsrpxg4k"; + }; + + 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"; + }; + nativeBuildInputs = [ cmake git pkg-config python3 ]; + buildInputs = [ cairo libsndfile libxcb libxkbcommon xcbutil xcbutilcursor xcbutilkeysyms zenity curl rsync ]; + + postPatch = '' + substituteInPlace src/common/SurgeStorage.cpp --replace "/usr/share/Surge" "$out/share/surge" + substituteInPlace src/linux/UserInteractionsLinux.cpp --replace '"zenity' '"${zenity}/bin/zenity' + patchShebangs scripts/linux/ + cp -r $extraContent/Skins/ resources/data/skins + ''; + + + installPhase = '' + cd .. + cmake --build build --config Release --target install-everything-global + ''; + + doInstallCheck = true; + installCheckPhase = '' + export HOME=$(mktemp -d) + export SURGE_DISABLE_NETWORK_TESTS=TRUE + build/surge-headless + ''; + + meta = with lib; { + description = "LV2 & VST3 synthesizer plug-in (previously released as Vember Audio Surge)"; + homepage = "https://surge-synthesizer.github.io"; + license = licenses.gpl3; + platforms = [ "x86_64-linux" ]; + maintainers = with maintainers; [ magnetophon orivej ]; + }; +} |