Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ stdenv
2, lib
3, fetchurl
4, meson
5, ninja
6
7, pipewire
8, gitUpdater
9}:
10
11stdenv.mkDerivation rec {
12 pname = "lv2";
13 version = "1.18.10";
14
15 outputs = [ "out" "dev" ];
16
17 src = fetchurl {
18 url = "https://lv2plug.in/spec/${pname}-${version}.tar.xz";
19 hash = "sha256-eMUbzyG1Tli7Yymsy7Ta4Dsu15tSD5oB5zS9neUwlT8=";
20 };
21
22 strictDeps = true;
23
24 nativeBuildInputs = [
25 meson
26 ninja
27 ];
28
29 buildInputs = [ ];
30
31 mesonFlags = [
32 # install validators to $dev
33 "--bindir=${placeholder "dev"}/bin"
34
35 # These are just example plugins. They pull in outdated gtk-2
36 # dependency and many other things. Upstream would like to
37 # eventually move them of the project:
38 # https://gitlab.com/lv2/lv2/-/issues/57#note_1096060029
39 "-Dplugins=disabled"
40 # Pulls in spell checkers among other things.
41 "-Dtests=disabled"
42 # Avoid heavyweight python dependencies.
43 "-Ddocs=disabled"
44 ] ++ lib.optionals stdenv.isDarwin [
45 "-Dlv2dir=${placeholder "out"}/lib/lv2"
46 ];
47
48 passthru = {
49 tests = {
50 inherit pipewire;
51 };
52 updateScript = gitUpdater {
53 # No nicer place to find latest release.
54 url = "https://gitlab.com/lv2/lv2.git";
55 rev-prefix = "v";
56 };
57 };
58
59 meta = with lib; {
60 homepage = "https://lv2plug.in";
61 description = "A plugin standard for audio systems";
62 license = licenses.mit;
63 maintainers = with maintainers; [ goibhniu ];
64 platforms = platforms.unix;
65 };
66}