From 1c5fc741b7165058c333bd6dd9bb4f383913f438 Mon Sep 17 00:00:00 2001 From: Thomas Churchman Date: Mon, 12 Apr 2021 15:51:39 +0200 Subject: [PATCH] distrho-ports: fix rpath, simplify dependencies --- pkgs/applications/audio/distrho/default.nix | 35 ++++++++++----------- 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/pkgs/applications/audio/distrho/default.nix b/pkgs/applications/audio/distrho/default.nix index dbe6bdeee424..35825833330d 100644 --- a/pkgs/applications/audio/distrho/default.nix +++ b/pkgs/applications/audio/distrho/default.nix @@ -1,26 +1,23 @@ -{ stdenv +{ lib +, stdenv , alsaLib -, curl , fetchFromGitHub , fftwFloat , freetype -, glib -, lib , libGL , libX11 , libXcursor , libXext -, libXinerama -, libXrandr , libXrender -, libgcc -, libglvnd -, libsecret , meson , ninja , pkg-config }: +let rpathLibs = [ + fftwFloat +]; +in stdenv.mkDerivation rec { pname = "distrho-ports"; version = "2021-03-15"; @@ -34,24 +31,26 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkg-config meson ninja ]; - buildInputs = [ + buildInputs = rpathLibs ++ [ alsaLib - curl - fftwFloat freetype - glib libGL libX11 libXcursor libXext - libXinerama - libXrandr libXrender - libgcc - libglvnd - libsecret ]; + postFixup = '' + for file in \ + $out/lib/lv2/vitalium.lv2/vitalium.so \ + $out/lib/vst/vitalium.so \ + $out/lib/vst3/vitalium.vst3/Contents/x86_64-linux/vitalium.so + do + patchelf --set-rpath "${lib.makeLibraryPath rpathLibs}:$(patchelf --print-rpath $file)" $file + done + ''; + meta = with lib; { homepage = "http://distrho.sourceforge.net/ports"; description = "Linux audio plugins and LV2 ports";