From 6f56a9ceee45a202eb6b9ef4438feafa4b1a123b Mon Sep 17 00:00:00 2001 From: seth Date: Tue, 14 Jan 2025 17:40:27 -0500 Subject: [PATCH] lsp-plugins: modernize And remove some unused inputs --- .../audio/lsp-plugins/default.nix | 68 ++++++++++--------- 1 file changed, 36 insertions(+), 32 deletions(-) diff --git a/pkgs/applications/audio/lsp-plugins/default.nix b/pkgs/applications/audio/lsp-plugins/default.nix index 9765d9c8fdbba..ab7cc30c16b33 100644 --- a/pkgs/applications/audio/lsp-plugins/default.nix +++ b/pkgs/applications/audio/lsp-plugins/default.nix @@ -1,28 +1,33 @@ { lib, stdenv, + cairo, fetchurl, - pkg-config, - makeWrapper, - libsndfile, + gst_all_1, jack2, - libGLU, + ladspaH, libGL, + libGLU, + libXrandr, + libsndfile, lv2, - cairo, - ladspaH, - gst_all_1, php, - libXrandr, + pkg-config, }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "lsp-plugins"; version = "1.2.20"; + outputs = [ + "out" + "dev" + "doc" + ]; + src = fetchurl { - url = "https://github.com/lsp-plugins/lsp-plugins/releases/download/${version}/lsp-plugins-src-${version}.tar.gz"; - sha256 = "sha256-yohg3Ka/see8q6NCwVPl/F06AlyR22akQz43gp+1kck="; + url = "https://github.com/lsp-plugins/lsp-plugins/releases/download/${finalAttrs.version}/lsp-plugins-src-${finalAttrs.version}.tar.gz"; + hash = "sha256-yohg3Ka/see8q6NCwVPl/F06AlyR22akQz43gp+1kck="; }; # By default, GStreamer plugins are installed right alongside GStreamer itself @@ -32,47 +37,45 @@ stdenv.mkDerivation rec { --replace-fail '$(shell pkg-config --variable=pluginsdir gstreamer-1.0)' '$(LIBDIR)/gstreamer-1.0' ''; - outputs = [ - "out" - "dev" - "doc" - ]; - nativeBuildInputs = [ + php pkg-config - (php.withExtensions (_: [ ])) - makeWrapper ]; + buildInputs = [ - gst_all_1.gstreamer + cairo gst_all_1.gst-plugins-base + gst_all_1.gstreamer jack2 - libsndfile - libGLU - libGL - lv2 - cairo ladspaH + libGL + libGLU libXrandr + libsndfile + lv2 ]; makeFlags = [ - "PREFIX=${placeholder "out"}" "ETCDIR=${placeholder "out"}/etc" + "PREFIX=${placeholder "out"}" "SHAREDDIR=${placeholder "out"}/share" ]; env.NIX_CFLAGS_COMPILE = "-DLSP_NO_EXPERIMENTAL"; configurePhase = '' - make config PREFIX=${placeholder "out"} + runHook preConfigure + + make $makeFlags config + + runHook postConfigure ''; doCheck = true; enableParallelBuilding = true; - meta = with lib; { + meta = { description = "Collection of open-source audio plugins"; longDescription = '' Compatible with the following formats: @@ -133,11 +136,12 @@ stdenv.mkDerivation rec { - Trigger ''; homepage = "https://lsp-plug.in"; - maintainers = with maintainers; [ + changelog = "https://github.com/lsp-plugins/lsp-plugins/releases/tag/${finalAttrs.version}"; + maintainers = with lib.maintainers; [ magnetophon PowerUser64 ]; - license = licenses.gpl2; - platforms = platforms.linux; + license = lib.licenses.gpl2; + platforms = lib.platforms.linux; }; -} +})