Bump vcv to v2
This commit is contained in:
parent
95d8c76dde
commit
b92347c93b
2 changed files with 30 additions and 58 deletions
|
@ -1,50 +1,25 @@
|
|||
{ stdenv, lib, makeWrapper, fetchzip, fetchFromGitHub, pkgconfig
|
||||
, alsaLib, curl, glew, glfw, gtk2-x11, jansson, libjack2, libXext, libXi
|
||||
, libzip, rtaudio, rtmidi, speex, libsamplerate }:
|
||||
, alsaLib, curl, ghc_filesystem, glew, glfw, gtk3-x11, jansson, jq, libarchive
|
||||
, libjack2, libpulseaudio, libXext, libXi, rtaudio, rtmidi, speex
|
||||
, libsamplerate, zstd }:
|
||||
|
||||
let
|
||||
# The package repo vendors some of the package dependencies as submodules.
|
||||
# Others are downloaded with `make deps`. Due to previous issues with the
|
||||
# `glfw` submodule (see above) and because we can not access the network when
|
||||
# building in a sandbox, we fetch the dependency source manually.
|
||||
pfft-source = fetchzip {
|
||||
url = "https://bitbucket.org/jpommier/pffft/get/74d7261be17cf659d5930d4830609406bd7553e3.tar.gz";
|
||||
sha256 = "084csgqa6f1a270bhybjayrh3mpyi2jimc87qkdgsqcp8ycsx1l1";
|
||||
};
|
||||
nanovg-source = fetchFromGitHub {
|
||||
owner = "memononen";
|
||||
repo = "nanovg";
|
||||
rev = "1f9c8864fc556a1be4d4bf1d6bfe20cde25734b4";
|
||||
sha256 = "08r15zrr6p1kxigxzxrg5rgya7wwbdx7d078r362qbkmws83wk27";
|
||||
};
|
||||
nanosvg-source = fetchFromGitHub {
|
||||
owner = "memononen";
|
||||
repo = "nanosvg";
|
||||
rev = "25241c5a8f8451d41ab1b02ab2d865b01600d949";
|
||||
sha256 = "114qgfmazsdl53rm4pgqif3gv8msdmfwi91lyc2jfadgzfd83xkg";
|
||||
};
|
||||
osdialog-source = fetchFromGitHub {
|
||||
owner = "AndrewBelt";
|
||||
repo = "osdialog";
|
||||
rev = "e5db5de6444f4b2c4e1390c67b3efd718080c3da";
|
||||
sha256 = "0iqxn1md053nl19hbjk8rqsdcmjwa5l5z0ci4fara77q43rc323i";
|
||||
};
|
||||
oui-blendish-source = fetchFromGitHub {
|
||||
owner = "AndrewBelt";
|
||||
repo = "oui-blendish";
|
||||
rev = "79ec59e6bc7201017fc13a20c6e33380adca1660";
|
||||
sha256 = "17kd0lh2x3x12bxkyhq6z8sg6vxln8m9qirf0basvcsmylr6rb64";
|
||||
fundamental-source = fetchFromGitHub {
|
||||
owner = "VCVRack";
|
||||
repo = "Fundamental";
|
||||
rev = "533397cdcad5c6401ebd3937d6c1663de2473627"; # tip of branch v2
|
||||
sha256 = "QnwOgrYxiCa/7t/u6F63Ks8C9E8k6T+hia4JZFhp1LI=";
|
||||
};
|
||||
in
|
||||
with lib; stdenv.mkDerivation rec {
|
||||
pname = "VCV-Rack";
|
||||
version = "1.1.6";
|
||||
version = "2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "VCVRack";
|
||||
repo = "Rack";
|
||||
rev = "v${version}";
|
||||
sha256 = "0ji64prr74qzxf5bx1sw022kbslx9nzll16lmk5in78hbl137b3i";
|
||||
sha256 = "HRy0IFi384/TpXYVhrKieITb2kOeSYLd/ujC93/kGv4=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
|
@ -56,34 +31,32 @@ with lib; stdenv.mkDerivation rec {
|
|||
# above), we do it here manually
|
||||
mkdir -p dep/include
|
||||
|
||||
cp -r ${pfft-source} dep/jpommier-pffft-source
|
||||
cp -r ${nanovg-source}/* dep/nanovg
|
||||
cp -r ${nanosvg-source}/* dep/nanosvg
|
||||
cp -r ${osdialog-source}/* dep/osdialog
|
||||
cp -r ${oui-blendish-source}/* dep/oui-blendish
|
||||
|
||||
cp dep/jpommier-pffft-source/*.h dep/include
|
||||
cp dep/pffft/*.h dep/include
|
||||
cp dep/fuzzysearchdatabase/src/*.hpp dep/include
|
||||
cp dep/nanosvg/**/*.h dep/include
|
||||
cp dep/nanovg/src/*.h dep/include
|
||||
cp dep/osdialog/*.h dep/include
|
||||
cp dep/oui-blendish/*.h dep/include
|
||||
|
||||
substituteInPlace include/audio.hpp --replace "<RtAudio.h>" "<rtaudio/RtAudio.h>"
|
||||
substituteInPlace compile.mk --replace "-march=nocona" ""
|
||||
cp -r ${fundamental-source} plugins/Fundamental/
|
||||
chmod -R +rw plugins/Fundamental # will be used as build dir
|
||||
substituteInPlace plugin.mk --replace ":= all" ":= dist"
|
||||
'';
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
nativeBuildInputs = [ makeWrapper pkgconfig ];
|
||||
buildInputs = [ alsaLib curl glew glfw gtk2-x11 jansson libjack2 libsamplerate libzip rtaudio rtmidi speex ];
|
||||
buildInputs = [ alsaLib curl ghc_filesystem glew glfw gtk3-x11 jansson jq libarchive libjack2 libpulseaudio libsamplerate rtaudio rtmidi speex zstd ];
|
||||
|
||||
buildFlags = [ "Rack" ];
|
||||
makeFlags = [ "all" "plugins" ];
|
||||
|
||||
installPhase = ''
|
||||
install -D -m755 -t $out/bin Rack
|
||||
install -D -m755 -t $out/lib libRack.so
|
||||
|
||||
mkdir -p $out/share/vcv-rack
|
||||
cp -r res Core.json template.vcv LICENSE* cacert.pem $out/share/vcv-rack
|
||||
cp -r res cacert.pem Core.json template.vcv LICENSE-GPLv3.txt $out/share/vcv-rack
|
||||
cp -r plugins/Fundamental/dist/Fundamental-*.vcvplugin $out/share/vcv-rack/Fundamental.vcvplugin
|
||||
|
||||
# Override the default global resource file directory
|
||||
wrapProgram $out/bin/Rack --add-flags "-s $out/share/vcv-rack"
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
diff -ru a/Makefile b/Makefile
|
||||
--- a/Makefile 1970-01-01 01:00:01.000000000 +0100
|
||||
+++ b/Makefile 1970-01-01 01:00:01.000000000 +0100
|
||||
@@ -21,8 +21,8 @@
|
||||
build/dep/osdialog/osdialog_gtk2.c.o: FLAGS += $(shell pkg-config --cflags gtk+-2.0)
|
||||
--- a/Makefile 1970-01-01 01:00:01.000000000 +0100
|
||||
+++ b/Makefile 1970-01-01 01:00:01.000000000 +0100
|
||||
@@ -36,7 +36,7 @@ build/dep/osdialog/osdialog_gtk3.c.o: FLAGS += $(shell pkg-config --cflags gtk+-
|
||||
|
||||
LDFLAGS += -rdynamic \
|
||||
- dep/lib/libGLEW.a dep/lib/libglfw3.a dep/lib/libjansson.a dep/lib/libcurl.a dep/lib/libssl.a dep/lib/libcrypto.a dep/lib/libzip.a dep/lib/libz.a dep/lib/libspeexdsp.a dep/lib/libsamplerate.a dep/lib/librtmidi.a dep/lib/librtaudio.a \
|
||||
+ -lGLEW -lglfw -ljansson -lcurl -lssl -lcrypto -lzip -lz -lspeexdsp -lsamplerate -lrtmidi -lrtaudio \
|
||||
-lpthread -lGL -ldl -lX11 -lasound -ljack \
|
||||
$(shell pkg-config --libs gtk+-2.0)
|
||||
TARGET := Rack
|
||||
endif
|
||||
LDFLAGS += -Wl,--whole-archive
|
||||
LDFLAGS += -static-libstdc++ -static-libgcc
|
||||
- LDFLAGS += dep/lib/libGLEW.a dep/lib/libglfw3.a dep/lib/libjansson.a dep/lib/libcurl.a dep/lib/libssl.a dep/lib/libcrypto.a dep/lib/libarchive.a dep/lib/libzstd.a dep/lib/libspeexdsp.a dep/lib/libsamplerate.a dep/lib/librtmidi.a dep/lib/librtaudio.a
|
||||
+ LDFLAGS += -lGLEW -lglfw -ljansson -lcurl -lssl -lcrypto -larchive -lz -lspeexdsp -lsamplerate -lrtmidi -lrtaudio
|
||||
LDFLAGS += -Wl,--no-whole-archive
|
||||
LDFLAGS += -lpthread -lGL -ldl -lX11 -lasound -ljack -lpulse -lpulse-simple
|
||||
LDFLAGS += $(shell pkg-config --libs gtk+-3.0)
|
||||
|
|
Loading…
Reference in a new issue