diff --git a/pkgs/applications/audio/fluidsynth/default.nix b/pkgs/applications/audio/fluidsynth/default.nix index 33ac72187780..8727c49398e4 100644 --- a/pkgs/applications/audio/fluidsynth/default.nix +++ b/pkgs/applications/audio/fluidsynth/default.nix @@ -1,17 +1,32 @@ { stdenv, lib, fetchFromGitHub, pkgconfig, cmake , alsaLib, glib, libjack2, libsndfile, libpulseaudio , AudioUnit, CoreAudio, CoreMIDI, CoreServices +, version ? "2" }: +let + versionMap = { + "1" = { + fluidsynthVersion = "1.1.11"; + sha256 = "0n75jq3xgq46hfmjkaaxz3gic77shs4fzajq40c8gk043i84xbdh"; + }; + "2" = { + fluidsynthVersion = "2.0.1"; + sha256 = "1mqyym5qkh8xd1rqj3yhfxbw5dxjcrljb6nkfqzvcarlv4h6rjn7"; + }; + }; +in + +with versionMap.${version}; + stdenv.mkDerivation rec { - name = "fluidsynth-${version}"; - version = "2.0.1"; + name = "fluidsynth-${fluidsynthVersion}"; src = fetchFromGitHub { owner = "FluidSynth"; repo = "fluidsynth"; - rev = "v${version}"; - sha256 = "1mqyym5qkh8xd1rqj3yhfxbw5dxjcrljb6nkfqzvcarlv4h6rjn7"; + rev = "v${fluidsynthVersion}"; + inherit sha256; }; nativeBuildInputs = [ pkgconfig cmake ]; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 64ef63f55ab8..82db9a17f38e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -16836,6 +16836,7 @@ in fluidsynth = callPackage ../applications/audio/fluidsynth { inherit (darwin.apple_sdk.frameworks) AudioUnit CoreAudio CoreMIDI CoreServices; }; + fluidsynth_1 = fluidsynth.override { version = "1"; }; fmit = libsForQt5.callPackage ../applications/audio/fmit { };