From 9ddfa473f5fc3e2dc24dfdb141bb333a30c932c6 Mon Sep 17 00:00:00 2001 From: Orivej Desh Date: Tue, 4 Apr 2023 04:52:36 +0000 Subject: [PATCH] proteus: init at 1.2 (#224221) --- pkgs/applications/audio/proteus/default.nix | 52 +++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 54 insertions(+) create mode 100644 pkgs/applications/audio/proteus/default.nix diff --git a/pkgs/applications/audio/proteus/default.nix b/pkgs/applications/audio/proteus/default.nix new file mode 100644 index 000000000000..1b2da324bdab --- /dev/null +++ b/pkgs/applications/audio/proteus/default.nix @@ -0,0 +1,52 @@ +{ lib, stdenv, fetchFromGitHub, autoPatchelfHook, cmake, pkg-config +, alsa-lib, freetype, libjack2 +, libX11, libXext, libXcursor, libXinerama, libXrandr, libXrender +}: + +stdenv.mkDerivation rec { + pname = "proteus"; + version = "1.2"; + + src = fetchFromGitHub { + owner = "GuitarML"; + repo = "Proteus"; + rev = "v${version}"; + fetchSubmodules = true; + hash = "sha256-WhJh+Sx64JYxQQ1LXpDUwXeodFU1EZ0TmMhn+6w0hQg="; + }; + + nativeBuildInputs = [ autoPatchelfHook cmake pkg-config ]; + buildInputs = [ + alsa-lib freetype libjack2 + libX11 libXext libXcursor libXinerama libXrandr libXrender + ]; + # JUCE loads most dependencies at runtime: + runtimeDependencies = map lib.getLib buildInputs; + + env.NIX_CFLAGS_COMPILE = toString [ + # Support JACK output in the standalone application: + "-DJUCE_JACK" + # Accomodate -flto: + "-ffat-lto-objects" + ]; + + # The default "make install" only installs JUCE, which should not be installed, and does not install proteus. + installPhase = '' + runHook preInstall + + mkdir -p $out/lib + cp -rT Proteus_artefacts/*/Standalone $out/bin + cp -rT Proteus_artefacts/*/LV2 $out/lib/lv2 + cp -rT Proteus_artefacts/*/VST3 $out/lib/vst3 + + runHook postInstall + ''; + + meta = with lib; { + description = "Guitar amp and pedal capture plugin using neural networks"; + homepage = "https://github.com/GuitarML/Proteus"; + license = licenses.gpl3; + platforms = platforms.linux; + maintainers = with maintainers; [ orivej ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 6f86365b45c6..52ac6cff2b42 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -33048,6 +33048,8 @@ with pkgs; properties-cpp = callPackage ../development/libraries/properties-cpp { }; + proteus = callPackage ../applications/audio/proteus { }; + protonmail-bridge = callPackage ../applications/networking/protonmail-bridge { buildGoModule = buildGo119Module; # go 1.20 build failure };