From def2874dfda177f7b76505fb7e80f020cbc03391 Mon Sep 17 00:00:00 2001 From: pancaek <20342389+pancaek@users.noreply.github.com> Date: Sun, 9 Mar 2025 13:53:40 -0700 Subject: [PATCH] reaper-sws-extension: init at 2.14.0.3 --- .../re/reaper-sws-extension/darwin.nix | 52 +++++++++++++++++++ .../by-name/re/reaper-sws-extension/linux.nix | 39 ++++++++++++++ .../re/reaper-sws-extension/package.nix | 29 +++++++++++ 3 files changed, 120 insertions(+) create mode 100644 pkgs/by-name/re/reaper-sws-extension/darwin.nix create mode 100644 pkgs/by-name/re/reaper-sws-extension/linux.nix create mode 100644 pkgs/by-name/re/reaper-sws-extension/package.nix diff --git a/pkgs/by-name/re/reaper-sws-extension/darwin.nix b/pkgs/by-name/re/reaper-sws-extension/darwin.nix new file mode 100644 index 000000000000..1ad6b3688032 --- /dev/null +++ b/pkgs/by-name/re/reaper-sws-extension/darwin.nix @@ -0,0 +1,52 @@ +{ + stdenvNoCC, + fetchurl, + pname, + version, + meta, +}: + +stdenvNoCC.mkDerivation (finalAttrs: { + inherit + pname + version + meta + ; + srcs = + + let + plugin = fetchurl { + url = + let + arch = if stdenvNoCC.hostPlatform.system == "x86_64-darwin" then "x86_64" else "arm64"; + in + "https://github.com/reaper-oss/sws/releases/download/v${finalAttrs.version}/reaper_sws-${arch}.dylib"; + hash = + { + x86_64-darwin = "sha256-B185QWS9FaC/0XDhxUBbgr9zu2Ot8OIsfaPQ3sUHh4s="; + aarch64-darwin = "sha256-8gbyPlnIXdWtSD+Aj70xzacJhO34edTTG2IOryB67os="; + } + .${stdenvNoCC.hostPlatform.system}; + }; + in + [ + plugin + (fetchurl { + url = "https://github.com/reaper-oss/sws/releases/download/v${finalAttrs.version}/sws_python64.py"; + hash = "sha256-Yujj60+jOEfdSZ74cRU1Wxoh7RL2fo/IhJIpa+BDYV0="; + }) + (fetchurl { + url = "https://github.com/reaper-oss/sws/releases/download/v${finalAttrs.version}/sws_python32.py"; + hash = "sha256-QktzdIDpTvNs9IrH7TOI6LTIBkfuQ3cqw06iqLxSSTI="; + }) + ]; + + dontUnpack = true; + + installPhase = '' + runHook preInstall + install -D *.py -t $out/Scripts + install -D *.dylib -t $out/UserPlugins + runHook postInstall + ''; +}) diff --git a/pkgs/by-name/re/reaper-sws-extension/linux.nix b/pkgs/by-name/re/reaper-sws-extension/linux.nix new file mode 100644 index 000000000000..c45de74689b8 --- /dev/null +++ b/pkgs/by-name/re/reaper-sws-extension/linux.nix @@ -0,0 +1,39 @@ +{ + lib, + stdenv, + fetchFromGitHub, + cmake, + php, + perl, + git, + pkg-config, + gtk3, + + pname, + version, + meta, +}: +stdenv.mkDerivation (finalAttrs: { + inherit pname version meta; + + src = fetchFromGitHub { + owner = "reaper-oss"; + repo = "sws"; + tag = "v${finalAttrs.version}"; + hash = "sha256-37pBbNACQuuEk1HJTiUHdb0mDiR2+ZsEQUOhz7mrPPg="; + fetchSubmodules = true; + }; + + strictDeps = true; + + nativeBuildInputs = [ + cmake + git + perl + php + pkg-config + ]; + + buildInputs = [ gtk3 ]; + +}) diff --git a/pkgs/by-name/re/reaper-sws-extension/package.nix b/pkgs/by-name/re/reaper-sws-extension/package.nix new file mode 100644 index 000000000000..4f8a4892cc17 --- /dev/null +++ b/pkgs/by-name/re/reaper-sws-extension/package.nix @@ -0,0 +1,29 @@ +{ + lib, + stdenvNoCC, + callPackage, +}: +let + p = if stdenvNoCC.hostPlatform.isDarwin then ./darwin.nix else ./linux.nix; +in +callPackage p { + + pname = "reaper-sws-extension"; + version = "2.14.0.3"; + meta = { + description = "Reaper Plugin Extension"; + longDescription = '' + The SWS / S&M extension is a collection of features that seamlessly integrate into REAPER, the Digital Audio Workstation (DAW) software by Cockos, Inc. + It is a collaborative and open source project. + ''; + homepage = "https://www.sws-extension.org/"; + maintainers = with lib.maintainers; [ pancaek ]; + license = lib.licenses.mit; + platforms = [ + "x86_64-linux" + "aarch64-linux" + "x86_64-darwin" + "aarch64-darwin" + ]; + }; +}