Commit 526f5a1c authored by Alexis Hildebrandt's avatar Alexis Hildebrandt
Browse files

vcv-rack: 2.6.0 -> 2.6.6

parent 0596d39e
Loading
Loading
Loading
Loading
+181 −159
Original line number Diff line number Diff line
@@ -6,6 +6,7 @@
  curl,
  fetchFromBitbucket,
  fetchFromGitHub,
  fetchpatch,
  ghc_filesystem,
  glew,
  glfw,
@@ -37,11 +38,12 @@ let
  # Unfortunately, they are not pinned, so we have no guarantee that they
  # will be stable, and therefore, we can't use them directly. Instead
  # we'll have to fetch them separately ourselves.
  pffft-source = fetchFromBitbucket {
    owner = "jpommier";
    repo = "pffft";
    rev = "fbc4058602803f40dc554b8a5d2bcc694c005f2f";
    hash = "sha256-Li+PmvgSPc6kg/ZqKtXyjiLD+4XlJBkyE0OUEEaUcZk=";
  # The revs used here have been determined using git submodule status.
  filesystem-source = fetchFromGitHub {
    owner = "gulrak";
    repo = "filesystem";
    rev = "7e37433f318488ae4bc80f80e12df12a01579874";
    hash = "sha256-dHwNsuuFkhd9Y24KRzGV9Z9UZolNtOtxyA1AEVG7uMU=";
  };
  fuzzysearchdatabase-source = fetchFromBitbucket {
    owner = "j_norberg";
@@ -49,23 +51,23 @@ let
    rev = "23122d1ff60d936fd766361a30210c954e0c5449";
    hash = "sha256-f+ed6zZGfEuYILXQcUoQ+1Qf4ASvWLQqU1nYHDpdCOk=";
  };
  nanosvg-source = fetchFromGitHub {
    owner = "memononen";
    repo = "nanosvg";
    rev = "25241c5a8f8451d41ab1b02ab2d865b01600d949";
    hash = "sha256-b/aBmvuvKScF8zSkyF1tuqL9hov4XVLzKLTpr6p7mIQ=";
  };
  nanovg-source = fetchFromGitHub {
    owner = "VCVRack";
    repo = "nanovg";
    rev = "0bebdb314aff9cfa28fde4744bcb037a2b3fd756";
    hash = "sha256-HmQhCE/zIKc3f+Zld229s5i5MWzRrBMF9gYrn8JVQzg=";
  };
  nanosvg-source = fetchFromGitHub {
    owner = "memononen";
    repo = "nanosvg";
    rev = "9da543e8329fdd81b64eb48742d8ccb09377aed1";
    hash = "sha256-VOiN6583DtzGYPRkl19VG2QvSzl4T9HaynBuNcvZf94=";
  };
  osdialog-source = fetchFromGitHub {
    owner = "AndrewBelt";
    repo = "osdialog";
    rev = "d0f64f0798c2e47f61d90a5505910ff2d63ca049";
    hash = "sha256-auh2Npc+pG0CoDpZ8gF3zugzqRPpRMXBOvw/bjoqYLQ=";
    rev = "64482bde25a8e19cc38342ed21aa0e38c2751f6c";
    hash = "sha256-FiejDeZkLoyS7BBwPYBfdOCLxBV8hAFzJAFeTz80tH0=";
  };
  oui-blendish-source = fetchFromGitHub {
    owner = "VCVRack";
@@ -73,33 +75,39 @@ let
    rev = "2fc6405883f8451944ed080547d073c8f9f31898";
    hash = "sha256-/QZFZuI5kSsEvSfMJlcqB1HiZ9Vcf3vqLqWIMEgxQK8=";
  };
  pffft-source = fetchFromBitbucket {
    owner = "jpommier";
    repo = "pffft";
    rev = "74d7261be17cf659d5930d4830609406bd7553e3";
    hash = "sha256-gYaumUeXYf3axAexGqWI/tYBs1dyebjAESo4o/DTjCA=";
  };
  simde-source = fetchFromGitHub {
    owner = "simd-everywhere";
    repo = "simde";
    rev = "416091ebdb9e901b29d026633e73167d6353a0b0";
    hash = "sha256-rhs1LYLh7u955/oIuVcmmliSJ+S8+UxAl/6Mwwx7nhg=";
    rev = "dd0b662fd8cf4b1617dbbb4d08aa053e512b08e4";
    hash = "sha256-21YBpP7jwFqNiOu5Ilu8t9nt+AZmLc3PVEwHAWn7vM8=";
  };
  tinyexpr-source = fetchFromGitHub {
    owner = "codeplea";
    repo = "tinyexpr";
    rev = "9907207e5def0fabdb60c443517b0d9e9d521393";
    hash = "sha256-FCG91JUG47iAHrtH+WvKuIJyzZw6VBzqvWLm/RNod3U=";
    rev = "4e8cc0067a1e2378faae23eb2dfdd21e9e9907c2";
    hash = "sha256-jYC0kSmYdzJsEaH9gres/NOcfsh+2ymqZAGxNbjus/s=";
  };
  fundamental-source = fetchFromGitHub {
    owner = "VCVRack";
    repo = "Fundamental";
    rev = "b453f192d22b1c951d71e8a73f28a37cd96a7b6c"; # tip of branch v2
    hash = "sha256-Wr5G2wgCMIduMqFdIJUtkWQEbvihte/WZb/qUWXGE04=";
    rev = "v2.6.4";
    hash = "sha256-rpOIMFO17ixgJZDRRg6RdLKorN/XKCUXkapsxN1pmQ4=";
  };
  vcv-rtaudio = stdenv.mkDerivation {
    pname = "vcv-rtaudio";
    version = "5.1.0-unstable-2020-01-30";
    version = "5.1.0-unstable-2022-11-22";

    src = fetchFromGitHub {
      owner = "VCVRack";
      repo = "rtaudio";
      rev = "ece277bd839603648c80c8a5f145678e13bc23f3"; # tip of master branch
      hash = "sha256-W3QvuOyOqI9P82IwGGHIjFbIgMwLREdwpvGUMxWg94U=";
      rev = "22d64cdcb151e388791caceee8aa0011a6aa46e0"; # tip of master branch
      hash = "sha256-BW5XwbsuwbbFDHXnQrUMM+1p7Zy7zjwdHHQFGo2XMv0=";
    };

    nativeBuildInputs = [
@@ -107,8 +115,7 @@ let
      pkg-config
    ];

    buildInputs =
      [
    buildInputs = [
      openssl
    ]
    ++ lib.optionals stdenv.hostPlatform.isLinux [
@@ -116,7 +123,7 @@ let
      libjack2
      libpulseaudio
    ]
      ++ lib.optionals stdenv.hostPlatform.isDarwin [ apple-sdk_13 ];
    ++ lib.optional stdenv.hostPlatform.isDarwin [ apple-sdk_13 ];

    cmakeFlags = [
      (lib.cmakeBool "RTAUDIO_API_ALSA" stdenv.hostPlatform.isLinux)
@@ -128,7 +135,7 @@ let
in
stdenv.mkDerivation (finalAttrs: {
  pname = "vcv-rack";
  version = "2.6.0";
  version = "2.6.6";

  desktopItems = [
    (makeDesktopItem {
@@ -152,25 +159,35 @@ stdenv.mkDerivation (finalAttrs: {
    owner = "VCVRack";
    repo = "Rack";
    tag = "v${finalAttrs.version}";
    hash = "sha256-leI0wwhYiA8qktJFe6DuZjs6q5tMFQ4WFLD4Ivom5+E=";
    hash = "sha256-v5/zk1eT5PRB4bwpCdlKb0nr7qERDM9jP5Q78F30O78=";
  };

  patches = [
    # N.B.: Loading modules may fail due to symbols used by the moodules
    # not being found, to address this issue the libraries providing the
    # symbols are re-exported when building on Darwin using -Wl,-reexport-l.
    ./rack-minimize-vendoring.patch
  ]
  ++ lib.optionals stdenv.hostPlatform.isLinux [
    (fetchpatch {
      name = "fix-segfault-on-linux.patch";
      url = "https://github.com/VCVRack/Rack/pull/1944.patch";
      hash = "sha256-dlndyCfCznGDzlWNWrQTgh+FtmsrrL2DVuRE0xCxUck=";
    })
  ];

  prePatch =
    ''
  prePatch = ''
    # As we can't use `make dep` to set up the dependencies (as explained
    # above), we do it here manually
    mkdir -p dep/include

      cp -r ${pffft-source}/* dep/pffft
    cp -r ${filesystem-source}/* dep/filesystem
    cp -r ${fuzzysearchdatabase-source}/* dep/fuzzysearchdatabase
      cp -r ${nanovg-source}/* dep/nanovg
    cp -r ${nanosvg-source}/* dep/nanosvg
    cp -r ${nanovg-source}/* dep/nanovg
    cp -r ${osdialog-source}/* dep/osdialog
    cp -r ${oui-blendish-source}/* dep/oui-blendish
    cp -r ${pffft-source}/* dep/pffft
    cp -r ${simde-source}/* dep/simde
    cp -r ${tinyexpr-source}/* dep/tinyexpr

@@ -196,17 +213,24 @@ stdenv.mkDerivation (finalAttrs: {
    # Fix reference to zenity
    substituteInPlace dep/osdialog/osdialog_zenity.c \
      --replace-fail 'zenityBin[] = "zenity"' 'zenityBin[] = "${lib.getExe zenity}"'
    # For some unknown reason __yield isn't available on aarch64-linux
    substituteInPlace src/engine/Engine.cpp \
      --replace-fail '__yield();' 'asm volatile("yield");'
  ''
  + lib.optionalString stdenv.hostPlatform.isDarwin ''
    # * Set VERSION from finalAttrs to avoid build using git to determine version
    # * Darwin needs to build the dist target, which builds the .app container,
    #   yet we want to exclude the documentation from dist target.
    # * Skip stripping the binary to avoid "unsupported load command" error, which
    #   appears since several libraries are re-exported (see rack-minimize-vendoring.patch)
    # * Replace path to Fundamental module with path to produced build artifact
    #   to avoid downloading a pre-compiled version
    substituteInPlace Makefile \
      --replace-fail 'VERSION ?= $' 'VERSION ?= ${finalAttrs.version}#$' \
      --replace-fail 'DIST_HTML :=' '#DIST_HTML :=' \
      --replace-fail '$(STRIP)' '#$(STRIP)' \
      --replace-fail 'FUNDAMENTAL_FILENAME := Fundamental' 'FUNDAMENTAL_FILENAME := plugins/Fundamental/dist/Fundamental'

    # Skip codesigning
    substituteInPlace plugin.mk \
      --replace-fail '$(CODESIGN)' '#$(CODESIGN)'
@@ -219,22 +243,21 @@ stdenv.mkDerivation (finalAttrs: {
      --replace-fail 'glfwGetOpenedFilenames()' 'NULL'
  '';

  nativeBuildInputs =
    [
  nativeBuildInputs = [
    jq
    makeWrapper
    pkg-config
    zstd
  ]
  ++ lib.optionals stdenv.isLinux [
    copyDesktopItems
      libicns
    imagemagick
    libicns
    wrapGAppsHook3
  ]
  ++ lib.optionals stdenv.isDarwin [ rsync ];

  buildInputs =
    [
  buildInputs = [
    curl
    ghc_filesystem
    glew
@@ -267,15 +290,14 @@ stdenv.mkDerivation (finalAttrs: {
      "plugins"
    ];

  postBuild = lib.optionalString stdenv.hostPlatform.isDarwin ''
  # To be able to use enableParallelBuilding = true
  # the dist target needs run after the buildPhase as
  # it depends on the all and plugin targets.
  postBuild = lib.optionalString stdenv.hostPlatform.isDarwin ''
    make "SED=sed -i" dist
  '';

  installPhase =
    ''
  installPhase = ''
    runHook preInstall
  ''
  + lib.optionalString stdenv.hostPlatform.isLinux ''
+4 −3
Original line number Diff line number Diff line
diff --git i/Makefile w/Makefile
index 1d6accc6..f772883c 100644
index 1d6accc6..fc09198e 100644
--- i/Makefile
+++ w/Makefile
@@ -38 +38 @@ ifdef ARCH_LIN
-	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
@@ -53 +53 @@ ifdef ARCH_MAC
@@ -52,2 +52 @@ ifdef ARCH_MAC
-	LDFLAGS += -Wl,-all_load
-	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 -Wl,-load_hidden,dep/lib/libarchive.a -Wl,-load_hidden,dep/lib/libzstd.a dep/lib/libspeexdsp.a dep/lib/libsamplerate.a -Wl,-load_hidden,dep/lib/librtmidi.a -Wl,-load_hidden,dep/lib/librtaudio.a
+	LDFLAGS += -lGLEW -lglfw -ljansson -lcurl -lssl -lcrypto -larchive -lz -lspeexdsp -lsamplerate -lrtmidi -lrtaudio
+	LDFLAGS += -Wl,-reexport-lGLEW -Wl,-reexport-lglfw -Wl,-reexport-ljansson -lcurl -lssl -lcrypto -larchive -lz -Wl,-reexport-lspeexdsp -lsamplerate -lrtmidi -lrtaudio