VCV Rack 1.1.1
This commit is contained in:
parent
d5634c4a4f
commit
b616c3df8e
3 changed files with 52 additions and 19 deletions
|
@ -1,17 +1,22 @@
|
|||
{ stdenv, makeWrapper, fetchFromBitbucket, fetchFromGitHub, pkgconfig
|
||||
, alsaLib, curl, glew, glfw, gtk2-x11, jansson, libjack2, libXext, libXi
|
||||
, libzip, rtaudio, rtmidi, speex, writeText }:
|
||||
, libzip, rtaudio, rtmidi, speex }:
|
||||
|
||||
let
|
||||
glfw-git = glfw.overrideAttrs (oldAttrs: rec {
|
||||
name = "glfw-git-${version}";
|
||||
version = "unstable-2018-05-29";
|
||||
version = "2019-06-30";
|
||||
src = fetchFromGitHub {
|
||||
owner = "glfw";
|
||||
owner = "AndrewBelt";
|
||||
repo = "glfw";
|
||||
rev = "0be4f3f75aebd9d24583ee86590a38e741db0904";
|
||||
sha256 = "0zbcjgc7ks25yi949k0wjknfl00a4dqmz45mhp00k62vlq2sj0i5";
|
||||
rev = "d9ab59efc781c392128a449361a381fcc93cf6f3";
|
||||
sha256 = "1ykkq6qq8y6j5hlfj2zp1p87kr33vwhywziprz20v5avx1q7rjm8";
|
||||
};
|
||||
# We patch the source to export a function that was added to the glfw fork
|
||||
# for Rack so it is present when we build glfw as a shared library.
|
||||
# See https://github.com/AndrewBelt/glfw/pull/1 for discussion of this issue
|
||||
# with upstream.
|
||||
patches = [ ./glfw.patch ];
|
||||
buildInputs = oldAttrs.buildInputs ++ [ libXext libXi ];
|
||||
});
|
||||
pfft-source = fetchFromBitbucket {
|
||||
|
@ -43,32 +48,31 @@ let
|
|||
in
|
||||
with stdenv.lib; stdenv.mkDerivation rec {
|
||||
name = "VCV-Rack-${version}";
|
||||
version = "0.6.2b";
|
||||
version = "1.1.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "VCVRack";
|
||||
repo = "Rack";
|
||||
rev = "v${version}";
|
||||
sha256 = "17ynhxcci6dyn1yi871fd8yli4924fh12pmk510djwkcj5crhas6";
|
||||
sha256 = "143mih99q2k6ql6jqhz7pl673mmyvggvm7npsfnbi6hw8v87v35v";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
patches = [ ./rack-minimize-vendoring.patch ];
|
||||
|
||||
prePatch = ''
|
||||
ln -s ${pfft-source} dep/jpommier-pffft-source
|
||||
cp -r ${pfft-source} dep/jpommier-pffft-source
|
||||
|
||||
mkdir -p dep/include
|
||||
|
||||
cp dep/jpommier-pffft-source/*.h dep/include
|
||||
cp dep/nanosvg/src/*.h 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" ""
|
||||
substituteInPlace Makefile \
|
||||
--replace "-Wl,-Bstatic" "" \
|
||||
--replace "-lglfw3" "-lglfw"
|
||||
'';
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
@ -76,26 +80,26 @@ with stdenv.lib; stdenv.mkDerivation rec {
|
|||
nativeBuildInputs = [ makeWrapper pkgconfig ];
|
||||
buildInputs = [ glfw-git alsaLib curl glew gtk2-x11 jansson libjack2 libzip rtaudio rtmidi speex ];
|
||||
|
||||
patches = [ xmonad-patch ];
|
||||
buildFlags = "Rack";
|
||||
|
||||
installPhase = ''
|
||||
install -D -m755 -t $out/bin Rack
|
||||
cp -r res $out/
|
||||
|
||||
mkdir -p $out/share/rack
|
||||
cp LICENSE.txt LICENSE-dist.txt $out/share/rack
|
||||
mkdir -p $out/share/vcv-rack
|
||||
cp -r res Core.json template.vcv LICENSE* $out/share/vcv-rack
|
||||
|
||||
# Override the default global resource file directory
|
||||
wrapProgram $out/bin/Rack --add-flags "-g $out"
|
||||
wrapProgram $out/bin/Rack --add-flags "-s $out/share/vcv-rack"
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Open-source virtual modular synthesizer";
|
||||
homepage = http://vcvrack.com/;
|
||||
# The source is BSD-3 licensed, some of the art is CC-BY-NC 4.0 or unfree
|
||||
license = [ licenses.bsd3 licenses.cc-by-nc-40 licenses.unfree ];
|
||||
# The source is BSD-3 licensed, some of the art is CC-BY-NC 4.0 or under a
|
||||
# no-derivatives clause
|
||||
license = with licenses; [ bsd3 cc-by-nc-40 unfreeRedistributable ];
|
||||
maintainers = with maintainers; [ moredread ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
14
pkgs/vcv-rack/glfw.patch
Normal file
14
pkgs/vcv-rack/glfw.patch
Normal file
|
@ -0,0 +1,14 @@
|
|||
diff --git a/src/init.c b/src/init.c
|
||||
index af4a579e..317e25b8 100644
|
||||
--- a/src/init.c
|
||||
+++ b/src/init.c
|
||||
@@ -339,7 +339,7 @@ GLFWAPI GLFWerrorfun glfwSetErrorCallback(GLFWerrorfun cbfun)
|
||||
|
||||
char glfwOpenedFilename[1024];
|
||||
|
||||
-const char *glfwGetOpenedFilename()
|
||||
+GLFWAPI const char *glfwGetOpenedFilename()
|
||||
{
|
||||
if (glfwOpenedFilename[0])
|
||||
{
|
||||
|
15
pkgs/vcv-rack/rack-minimize-vendoring.patch
Normal file
15
pkgs/vcv-rack/rack-minimize-vendoring.patch
Normal file
|
@ -0,0 +1,15 @@
|
|||
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)
|
||||
|
||||
LDFLAGS += -rdynamic \
|
||||
- dep/lib/libglfw3.a dep/lib/libGLEW.a dep/lib/libjansson.a dep/lib/libspeexdsp.a dep/lib/libzip.a dep/lib/libz.a dep/lib/librtmidi.a dep/lib/librtaudio.a dep/lib/libcurl.a dep/lib/libssl.a dep/lib/libcrypto.a \
|
||||
- -lpthread -lGL -ldl -lX11 -lasound -ljack \
|
||||
+ -lGLEW -ljansson -lspeexdsp -lzip -lz -lrtmidi -lrtaudio -lcurl -lssl -lcrypto \
|
||||
+ -lpthread -lGL -ldl -lX11 -lasound -ljack -lglfw \
|
||||
$(shell pkg-config --libs gtk+-2.0)
|
||||
TARGET := Rack
|
||||
endif
|
||||
|
Loading…
Reference in a new issue