1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 fetchpatch,
6 boost,
7 cairo,
8 libGL,
9 lv2,
10 pkg-config,
11}:
12
13stdenv.mkDerivation {
14 pname = "string-machine";
15 version = "unstable-2020-01-20";
16
17 src = fetchFromGitHub {
18 owner = "jpcima";
19 repo = "string-machine";
20 rev = "188082dd0beb9a3c341035604841c53675fe66c4";
21 sha256 = "0l9xrzp3f0hk6h320qh250a0n1nbd6qhjmab21sjmrlb4ngy672v";
22 fetchSubmodules = true;
23 };
24
25 patches = [
26 # gcc-13 compatibility fix:
27 # https://github.com/jpcima/string-machine/pull/36
28 (fetchpatch {
29 name = "gcc-13.patch";
30 url = "https://github.com/jpcima/string-machine/commit/e1f9c70da46e43beb2654b509bc824be5601a0a5.patch";
31 hash = "sha256-eS28wBuFjbx2tEb9gtVRZXfK0w2o1RCFTouNf8Adq+k=";
32 })
33 ];
34
35 postPatch = ''
36 patchShebangs ./dpf/utils/generate-ttl.sh
37 '';
38
39 nativeBuildInputs = [ pkg-config ];
40
41 buildInputs = [
42 boost
43 cairo
44 libGL
45 lv2
46 ];
47
48 makeFlags = [
49 "PREFIX=$(out)"
50 ];
51
52 meta = with lib; {
53 homepage = "https://github.com/jpcima/string-machine";
54 description = "Digital model of electronic string ensemble instrument";
55 maintainers = [ maintainers.magnetophon ];
56 platforms = intersectLists platforms.linux platforms.x86;
57 license = licenses.boost;
58 };
59}