about summary refs log tree commit diff
path: root/pkgs/by-name/os/ossia-score/package.nix
blob: 9dca52e18195849b5d5bbf04fe3c733b193e89b6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
{ stdenv
, lib
, fetchFromGitHub
, cmake
, ninja
, clangStdenv
, pkg-config
, alsa-lib
, avahi
, avahi-compat
, bluez
, boost185
, fmt
, ffmpeg
, fftw
, flac
, git
, gnutls
, lame
, libcoap
, libjack2
, libopus
, libsamplerate
, libsndfile
, libvorbis
, lilv
, lv2
, mpg123
, pipewire
, portaudio
, qt6
, rapidfuzz-cpp
, re2
, rubberband
, snappy
, SDL2
, spdlog
, suil
, udev
}:

# TODO: figure out LLVM jit
# assert lib.versionAtLeast llvm.version "15";

stdenv.mkDerivation (finalAttrs: {
  pname = "ossia-score";
  version = "3.2.3-3";

  src = fetchFromGitHub {
    owner = "ossia";
    repo = "score";
    rev = "v3.2.3-3";
    hash = "sha256-xRqsMKwuejbl+5ljYMFhQv/j1MfnFH5MGIn9rCQG/ro=";
    fetchSubmodules = true;
  };

  nativeBuildInputs = [ cmake ninja git pkg-config qt6.qttools qt6.wrapQtAppsHook ];

  buildInputs = [
    alsa-lib
    boost185
    avahi
    avahi-compat
    bluez
    ffmpeg
    fftw
    flac
    fmt
    gnutls
    lame
    libcoap
    libjack2
    libopus
    libsamplerate
    libsndfile
    libvorbis
    lilv
    lv2
    mpg123
    pipewire
    portaudio
    qt6.qtbase
    qt6.qtdeclarative
    qt6.qtserialport
    qt6.qtscxml
    qt6.qtshadertools
    qt6.qtsvg
    qt6.qtwayland
    qt6.qtwebsockets
    rapidfuzz-cpp
    re2
    rubberband
    snappy
    SDL2
    spdlog
    suil
    udev
  ];

  cmakeFlags = [
    "-Wno-dev"

    "-DSCORE_DEPLOYMENT_BUILD=1"
    "-DSCORE_STATIC_PLUGINS=1"
    "-DSCORE_FHS_BUILD=1"
    "-DCMAKE_UNITY_BUILD=1"
    "-DCMAKE_SKIP_RPATH=ON"
    "-DOSSIA_USE_SYSTEM_LIBRARIES=1"
    "-DSCORE_USE_SYSTEM_LIBRARIES=1"

    "-DLilv_INCLUDE_DIR=${lilv.dev}/include/lilv-0"
    "-DSuil_INCLUDE_DIR=${suil}/include/suil-0"
  ];

  # Needed for libraries that get dlopen'd
  env.NIX_LDFLAGS = toString [
    "-lasound"
    "-llilv-0"
    "-lsuil-0"
    "-lsndfile"
    "-lpipewire-0.3"
    "-lfftw3"
    "-lfftw3_threads"
    "-ludev"
  ];

  runtimeDependencies = [
    alsa-lib
    avahi
    avahi-compat
    bluez
    fftw
    lilv
    suil
    pipewire
    udev
  ];

  installPhase = ''
    runHook preInstall

    cmake -DCMAKE_INSTALL_DO_STRIP=1 -DCOMPONENT=OssiaScore -P cmake_install.cmake

    runHook postInstall
  '';

  meta = with lib; {
    homepage = "https://ossia.io/score/about.html";
    description = "Sequencer for audio-visual artists";
    longDescription = ''
      ossia score is a sequencer for audio-visual artists, designed to enable
      the creation of interactive shows, museum installations, intermedia
      digital artworks, interactive music and more in an intuitive user interface.
    '';
    platforms = [ "x86_64-linux" ];
    license = licenses.gpl3Only;
    maintainers = with maintainers; [ jcelerier minijackson ];
  };
})