2024-02-07 01:22:34 +00:00
|
|
|
{ lib, stdenv, fetchurl, alsa-lib, libjack2, pkg-config, libpulseaudio, xorg, copyDesktopItems, makeDesktopItem }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-02-07 01:22:34 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "bristol";
|
|
|
|
version = "0.60.11";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://sourceforge/bristol/${pname}-${version}.tar.gz";
|
|
|
|
sha256 = "1fi2m4gmvxdi260821y09lxsimq82yv4k5bbgk3kyc3x1nyhn7vx";
|
|
|
|
};
|
|
|
|
|
2024-02-07 01:22:34 +00:00
|
|
|
nativeBuildInputs = [ pkg-config copyDesktopItems ];
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [
|
2024-02-07 01:22:34 +00:00
|
|
|
alsa-lib
|
|
|
|
libjack2
|
|
|
|
libpulseaudio
|
|
|
|
xorg.libX11
|
|
|
|
xorg.libXext
|
2020-04-24 23:36:52 +00:00
|
|
|
xorg.xorgproto
|
|
|
|
];
|
|
|
|
|
|
|
|
patchPhase = "sed -i '41,43d' libbristolaudio/audioEngineJack.c"; # disable alsa/iatomic
|
|
|
|
|
|
|
|
configurePhase = "./configure --prefix=$out --enable-jack-default-audio --enable-jack-default-midi";
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
# Workaround build failure on -fno-common toolchains like upstream
|
|
|
|
# gcc-10. Otherwise build fails as:
|
|
|
|
# ld: brightonCLI.o:/build/bristol-0.60.11/brighton/brightonCLI.c:139: multiple definition of
|
|
|
|
# `event'; brightonMixerMenu.o:/build/bristol-0.60.11/brighton/brightonMixerMenu.c:1182: first defined here
|
2023-03-04 12:14:45 +00:00
|
|
|
env.NIX_CFLAGS_COMPILE = "-fcommon";
|
2022-06-16 17:23:12 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
preInstall = ''
|
|
|
|
sed -e "s@\`which bristol\`@$out/bin/bristol@g" -i bin/startBristol
|
|
|
|
sed -e "s@\`which brighton\`@$out/bin/brighton@g" -i bin/startBristol
|
|
|
|
'';
|
|
|
|
|
2024-02-07 01:22:34 +00:00
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $out/share/icons/hicolor/scalable/apps/
|
|
|
|
ln -s $out/share/bristol/bitmaps/bicon.svg $out/share/icons/hicolor/scalable/apps/
|
|
|
|
'';
|
|
|
|
|
|
|
|
desktopItems = [
|
|
|
|
(makeDesktopItem {
|
|
|
|
name = "Bristol";
|
|
|
|
exec = "bristol";
|
|
|
|
icon = "bicon";
|
|
|
|
desktopName = "Bristol";
|
|
|
|
comment = "Graphical user interface for the Bristol synthesizer emulator";
|
|
|
|
categories = [ "AudioVideo" ];
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Range of synthesiser, electric piano and organ emulations";
|
2023-02-22 10:55:15 +00:00
|
|
|
homepage = "https://bristol.sourceforge.net";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.gpl3;
|
2024-02-07 01:22:34 +00:00
|
|
|
platforms = [ "x86_64-linux" "i686-linux" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = [ maintainers.goibhniu ];
|
|
|
|
};
|
|
|
|
}
|