base16-schemes: unstable-2024-06-21 -> unstable-2024-11-12
[NixPkgs.git] / pkgs / by-name / se / setbfree / package.nix
blob2284df444ec5d38786b7ea1ec17b90717362f1ce
1 { lib, stdenv, fetchFromGitHub, fetchpatch, alsa-lib, freetype, ftgl, libjack2, libX11, lv2
2 , libGLU, libGL, pkg-config, ttf_bitstream_vera
3 }:
5 stdenv.mkDerivation  rec {
6   pname = "setbfree";
7   version = "0.8.12";
9   src = fetchFromGitHub {
10     owner = "pantherb";
11     repo = "setBfree";
12     rev = "v${version}";
13     hash = "sha256-e/cvD/CtT8dY1lYcsZ21DC8pNqKXqKfC/eRXX8k01eI=";
14   };
16   patches = [
17     # link with -lGL can remove on next update
18     (fetchpatch {
19       name = "ui-add-lGL.patch";
20       url = "https://github.com/pantherb/setBfree/commit/756437db43fbf5481f101d8fc695f8b11192047f.patch";
21       hash = "sha256-49PYTayD4TchAApfFvj3DLc4EBTxH8LYx48TtdSRwwA=";
22     })
23   ];
25   postPatch = ''
26     substituteInPlace common.mak \
27       --replace /usr/local "$out" \
28       --replace /usr/share/fonts/truetype/ttf-bitstream-vera "${ttf_bitstream_vera}/share/fonts/truetype"
29   '';
31   nativeBuildInputs = [ pkg-config ];
32   buildInputs = [
33     alsa-lib freetype ftgl libjack2 libX11 lv2 libGLU libGL
34     ttf_bitstream_vera
35   ];
37   doInstallCheck = true;
39   installCheckPhase = ''
40     (
41       set -x;
42       test -e $out/bin/setBfreeUI
43     )
44   '';
46   enableParallelBuilding = true;
48   meta = with lib; {
49     description = "DSP tonewheel organ emulator";
50     homepage = "https://setbfree.org";
51     license = licenses.gpl2;
52     platforms = [ "x86_64-linux" "i686-linux" ]; # fails on ARM and Darwin
53     maintainers = [ ];
54   };