mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-09-20 12:08:17 +03:00
CHOWTapeModel: 2.10.0 -> 2.11.4
* Use GCC11 since GCC12 is incompatible with JUCE version * Release new CLAP version of the plugin * Do not copy static code library, it is not required for operation and reduces the closure size by 10MB * JUCE uses dlopen to load X11 libraries, add link flags so that these libraries are part of the rpath * Replace gcc-unwrapped dependency with stdenv.cc.cc
This commit is contained in:
parent
b2ebe6221e
commit
c0495a8f3f
@ -1,18 +1,53 @@
|
|||||||
{ alsa-lib, at-spi2-core, cmake, curl, dbus, libepoxy, fetchFromGitHub, freeglut
|
{ alsa-lib
|
||||||
, freetype, gcc-unwrapped, gtk3, lib, libGL, libXcursor, libXdmcp, libXext
|
, at-spi2-core
|
||||||
, libXinerama, libXrandr, libXtst, libdatrie, libjack2, libpsl, libselinux
|
, cmake
|
||||||
, libsepol, libsysprof-capture, libthai, libxkbcommon, lv2, pcre, pkg-config
|
, curl
|
||||||
, python3, sqlite, stdenv }:
|
, dbus
|
||||||
|
, libepoxy
|
||||||
|
, fetchFromGitHub
|
||||||
|
, freeglut
|
||||||
|
, freetype
|
||||||
|
, gtk3
|
||||||
|
, lib
|
||||||
|
, libGL
|
||||||
|
, libXcursor
|
||||||
|
, libXdmcp
|
||||||
|
, libXext
|
||||||
|
, libXinerama
|
||||||
|
, libXrandr
|
||||||
|
, libXtst
|
||||||
|
, libdatrie
|
||||||
|
, libjack2
|
||||||
|
, libpsl
|
||||||
|
, libselinux
|
||||||
|
, libsepol
|
||||||
|
, libsysprof-capture
|
||||||
|
, libthai
|
||||||
|
, libuuid
|
||||||
|
, libxkbcommon
|
||||||
|
, lv2
|
||||||
|
, pcre
|
||||||
|
, pcre2
|
||||||
|
, pkg-config
|
||||||
|
, python3
|
||||||
|
, sqlite
|
||||||
|
, gcc11Stdenv
|
||||||
|
, webkitgtk
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
# JUCE version in submodules is incompatible with GCC12
|
||||||
|
# See here: https://forum.juce.com/t/build-fails-on-fedora-wrong-c-version/50902/2
|
||||||
|
stdenv = gcc11Stdenv;
|
||||||
|
in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "CHOWTapeModel";
|
pname = "CHOWTapeModel";
|
||||||
version = "2.10.0";
|
version = "2.11.4";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "jatinchowdhury18";
|
owner = "jatinchowdhury18";
|
||||||
repo = "AnalogTapeModel";
|
repo = "AnalogTapeModel";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "sha256-iuT7OBRBtMkjcTHayCcne1mNqkcxzKnEYl62n65V7Z4=";
|
sha256 = "sha256-WriHi68Y6hAsrwE+74JtVlAKUR9lfTczj6UK9h2FOGM=";
|
||||||
fetchSubmodules = true;
|
fetchSubmodules = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -41,36 +76,51 @@ stdenv.mkDerivation rec {
|
|||||||
libsepol
|
libsepol
|
||||||
libsysprof-capture
|
libsysprof-capture
|
||||||
libthai
|
libthai
|
||||||
|
libuuid
|
||||||
libxkbcommon
|
libxkbcommon
|
||||||
lv2
|
lv2
|
||||||
pcre
|
pcre
|
||||||
|
pcre2
|
||||||
python3
|
python3
|
||||||
sqlite
|
sqlite
|
||||||
gcc-unwrapped
|
webkitgtk
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# Link-time-optimization fails without these
|
||||||
cmakeFlags = [
|
cmakeFlags = [
|
||||||
"-DCMAKE_AR=${gcc-unwrapped}/bin/gcc-ar"
|
"-DCMAKE_AR=${stdenv.cc.cc}/bin/gcc-ar"
|
||||||
"-DCMAKE_RANLIB=${gcc-unwrapped}/bin/gcc-ranlib"
|
"-DCMAKE_RANLIB=${stdenv.cc.cc}/bin/gcc-ranlib"
|
||||||
"-DCMAKE_NM=${gcc-unwrapped}/bin/gcc-nm"
|
"-DCMAKE_NM=${stdenv.cc.cc}/bin/gcc-nm"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
cmakeBuildType = "Release";
|
||||||
|
|
||||||
postPatch = "cd Plugin";
|
postPatch = "cd Plugin";
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/lib/lv2 $out/lib/vst3 $out/bin $out/share/doc/CHOWTapeModel/
|
mkdir -p $out/lib/lv2 $out/lib/vst3 $out/lib/clap $out/bin $out/share/doc/CHOWTapeModel/
|
||||||
cd CHOWTapeModel_artefacts/Release
|
cd CHOWTapeModel_artefacts/${cmakeBuildType}
|
||||||
cp libCHOWTapeModel_SharedCode.a $out/lib
|
|
||||||
cp -r LV2/CHOWTapeModel.lv2 $out/lib/lv2
|
cp -r LV2/CHOWTapeModel.lv2 $out/lib/lv2
|
||||||
cp -r VST3/CHOWTapeModel.vst3 $out/lib/vst3
|
cp -r VST3/CHOWTapeModel.vst3 $out/lib/vst3
|
||||||
|
cp -r CLAP/CHOWTapeModel.clap $out/lib/clap
|
||||||
cp Standalone/CHOWTapeModel $out/bin
|
cp Standalone/CHOWTapeModel $out/bin
|
||||||
cp ../../../../Manual/ChowTapeManual.pdf $out/share/doc/CHOWTapeModel/
|
cp ../../../../Manual/ChowTapeManual.pdf $out/share/doc/CHOWTapeModel/
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
# JUCE dlopens these, make sure they are in rpath
|
||||||
|
# Otherwise, segfault will happen
|
||||||
|
NIX_LDFLAGS = (toString [
|
||||||
|
"-lX11"
|
||||||
|
"-lXext"
|
||||||
|
"-lXcursor"
|
||||||
|
"-lXinerama"
|
||||||
|
"-lXrandr"
|
||||||
|
]);
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
homepage = "https://github.com/jatinchowdhury18/AnalogTapeModel";
|
homepage = "https://github.com/jatinchowdhury18/AnalogTapeModel";
|
||||||
description =
|
description =
|
||||||
"Physical modelling signal processing for analog tape recording. LV2, VST3 and standalone";
|
"Physical modelling signal processing for analog tape recording. LV2, VST3, CLAP, and standalone";
|
||||||
license = with licenses; [ gpl3Only ];
|
license = with licenses; [ gpl3Only ];
|
||||||
maintainers = with maintainers; [ magnetophon ];
|
maintainers = with maintainers; [ magnetophon ];
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
|
Loading…
Reference in New Issue
Block a user