From 597d70791885306a6e2f0b2262546c0885f6c268 Mon Sep 17 00:00:00 2001 From: "EEva (JPotier)" Date: Sun, 20 Oct 2019 18:20:44 +0300 Subject: [PATCH] VCV Rack can be now found upstream --- pkgs/default.nix | 7 -- pkgs/vcv-rack/default.nix | 104 -------------------- pkgs/vcv-rack/glfw.patch | 13 --- pkgs/vcv-rack/rack-minimize-vendoring.patch | 14 --- 4 files changed, 138 deletions(-) delete mode 100644 pkgs/vcv-rack/default.nix delete mode 100644 pkgs/vcv-rack/glfw.patch delete mode 100644 pkgs/vcv-rack/rack-minimize-vendoring.patch diff --git a/pkgs/default.nix b/pkgs/default.nix index afa303b..9313001 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -30,13 +30,6 @@ self: super: reaper-samae = super.callPackage ./reaper {}; - # Bug fixes: - # VCVRack has a bug when used with Xmonad that makes the UI - # crash almost immediately There's a workaround documented here - # (https://github.com/VCVRack/Rack/issues/478#issuecomment-456174702) and it - # requires applying a patch on the source before building. - vcv-rack-xmonad = super.callPackage ./vcv-rack {}; - scientifica-font = super.callPackage ./scientifica-font {}; curie-font = super.callPackage ./curie-font {}; victor-mono = super.callPackage ./victor-mono {}; diff --git a/pkgs/vcv-rack/default.nix b/pkgs/vcv-rack/default.nix deleted file mode 100644 index ccb0092..0000000 --- a/pkgs/vcv-rack/default.nix +++ /dev/null @@ -1,104 +0,0 @@ -{ stdenv, makeWrapper, fetchFromBitbucket, fetchFromGitHub, pkgconfig -, alsaLib, curl, glew, glfw, gtk2-x11, jansson, libjack2, libXext, libXi -, libzip, rtaudio, rtmidi, speex }: - -let - glfw-git = glfw.overrideAttrs (oldAttrs: rec { - name = "glfw-git-${version}"; - version = "2019-06-30"; - src = fetchFromGitHub { - owner = "AndrewBelt"; - repo = "glfw"; - 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 { - owner = "jpommier"; - repo = "pffft"; - rev = "29e4f76ac53bef048938754f32231d7836401f79"; - sha256 = "084csgqa6f1a270bhybjayrh3mpyi2jimc87qkdgsqcp8ycsx1l1"; - }; - # xmonad-patch = writeText "xmonad-workaround.patch" '' - # --- a/src/settings.cpp - # +++ b/src/settings.cpp - # @@ -20,6 +20,7 @@ static json_t *settingsToJson() { - # json_t *tokenJ = json_string(gToken.c_str()); - # json_object_set_new(rootJ, "token", tokenJ); - - # + /* - # if (!windowIsMaximized()) { - # // windowSize - # Vec windowSize = windowGetWindowSize(); - # @@ -31,6 +32,7 @@ static json_t *settingsToJson() { - # json_t *windowPosJ = json_pack("[f, f]", windowPos.x, windowPos.y); - # json_object_set_new(rootJ, "windowPos", windowPosJ); - # } - # + */ - - # // opacity - # float opacity = gToolbar->wireOpacitySlider->value; - # ''; -in -with stdenv.lib; stdenv.mkDerivation rec { - name = "VCV-Rack-${version}"; - version = "1.1.4"; - - src = fetchFromGitHub { - owner = "VCVRack"; - repo = "Rack"; - rev = "v${version}"; - sha256 = "04kg0nm7w19s2zfrsxjfl3bs4sy3bzf28kzl4hayzwv480667ybx"; - fetchSubmodules = true; - }; - - patches = [ ./rack-minimize-vendoring.patch ]; - - prePatch = '' - cp -r ${pfft-source} dep/jpommier-pffft-source - - mkdir -p dep/include - - cp dep/jpommier-pffft-source/*.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 "" "" - substituteInPlace compile.mk --replace "-march=nocona" "" - ''; - - enableParallelBuilding = true; - - nativeBuildInputs = [ makeWrapper pkgconfig ]; - buildInputs = [ glfw-git alsaLib curl glew gtk2-x11 jansson libjack2 libzip rtaudio rtmidi speex ]; - - buildFlags = "Rack"; - - installPhase = '' - install -D -m755 -t $out/bin Rack - - mkdir -p $out/share/vcv-rack - cp -r res Core.json template.vcv LICENSE* cacert.pem $out/share/vcv-rack - - # Override the default global resource file directory - 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 under a - # no-derivatives clause - license = with licenses; [ bsd3 cc-by-nc-40 unfreeRedistributable ]; - maintainers = with maintainers; [ moredread ]; - platforms = platforms.linux; - }; -} diff --git a/pkgs/vcv-rack/glfw.patch b/pkgs/vcv-rack/glfw.patch deleted file mode 100644 index 7787541..0000000 --- a/pkgs/vcv-rack/glfw.patch +++ /dev/null @@ -1,13 +0,0 @@ -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]) - { diff --git a/pkgs/vcv-rack/rack-minimize-vendoring.patch b/pkgs/vcv-rack/rack-minimize-vendoring.patch deleted file mode 100644 index eca9c2f..0000000 --- a/pkgs/vcv-rack/rack-minimize-vendoring.patch +++ /dev/null @@ -1,14 +0,0 @@ -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