tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
lenmus: 5.4.2 -> 6.0.1
Weijia Wang
3 years ago
68fcd4d1
1ca08d4c
+45
-21
1 changed file
expand all
collapse all
unified
split
pkgs
applications
misc
lenmus
default.nix
+45
-21
pkgs/applications/misc/lenmus/default.nix
···
1
1
{ lib
2
2
, stdenv
3
3
-
, pkg-config
4
3
, fetchFromGitHub
5
4
, fetchpatch
6
5
, cmake
6
6
+
, pkg-config
7
7
+
, makeWrapper
7
8
, boost
8
9
, portmidi
9
10
, sqlite
···
11
12
, libpng
12
13
, pngpp
13
14
, zlib
14
14
-
, wxGTK30
15
15
+
, wxGTK32
15
16
, wxsqlite3
17
17
+
, fluidsynth
18
18
+
, fontconfig
19
19
+
, darwin
20
20
+
, soundfont-fluid
21
21
+
, openlilylib-fonts
16
22
}:
17
23
24
24
+
let
25
25
+
inherit (darwin.apple_sdk.frameworks) Cocoa;
26
26
+
in
18
27
stdenv.mkDerivation rec {
19
28
pname = "lenmus";
20
20
-
version = "5.4.2";
29
29
+
version = "6.0.1";
21
30
22
31
src = fetchFromGitHub {
23
32
owner = "lenmus";
24
33
repo = "lenmus";
25
34
rev = "Release_${version}";
26
26
-
sha256 = "1n639xr1qxx6rhqs0c6sjxp3bv8cwkmw1vfk1cji7514gj2a9v3p";
35
35
+
sha256 = "sha256-qegOAc6vs2+6VViDHVjv0q+qjLZyTT7yPF3hFpTt5zE=";
27
36
};
28
37
29
29
-
patches = [
30
30
-
(fetchpatch {
31
31
-
url = "https://github.com/lenmus/lenmus/commit/421760d84694a0e6e72d0e9b1d4fd30a7e129c6f.patch";
32
32
-
sha256 = "1z1wwh0pcr8w1zlr8swx99si9y2kxx5bmavgwvy6bvdhxgm58yqs";
33
33
-
})
34
34
-
(fetchpatch {
35
35
-
url = "https://github.com/lenmus/lenmus/commit/6613d20d4051effc782203c9c6d92962a3f66b5f.patch";
36
36
-
sha256 = "01vvzzpamv90jpqbbq1f2m2b4gb9xab9z70am8i41d90nqvg6agn";
37
37
-
})
38
38
-
(fetchpatch {
39
39
-
url = "https://github.com/lenmus/lenmus/commit/37ee8ac9c8faff65a14e8f7ed2bc22e6dc48d91f.patch";
40
40
-
includes = [ "src/app/lenmus_midi_wizard.cpp" ];
41
41
-
sha256 = "sha256-nlT6ZbSCIXUk2Ufv/SDn2A0Rt+s/7m+7l9HOoQmaIhc=";
42
42
-
})
43
43
-
];
38
38
+
postPatch = ''
39
39
+
substituteInPlace CMakeLists.txt \
40
40
+
--replace "/usr" "${placeholder "out"}"
41
41
+
sed -i 's/fixup_bundle.*")/")/g' CMakeLists.txt
42
42
+
'';
44
43
45
44
nativeBuildInputs = [
46
45
cmake
47
46
pkg-config
47
47
+
] ++ lib.optionals stdenv.isDarwin [
48
48
+
makeWrapper
48
49
];
49
50
50
51
buildInputs = [
···
55
56
libpng
56
57
pngpp
57
58
zlib
58
58
-
wxGTK30
59
59
+
wxGTK32
59
60
wxsqlite3
61
61
+
fluidsynth
62
62
+
fontconfig
63
63
+
] ++ lib.optionals stdenv.isDarwin [
64
64
+
Cocoa
60
65
];
61
66
67
67
+
preConfigure = ''
68
68
+
mkdir res/fonts
69
69
+
ln -s ${openlilylib-fonts.bravura}/share/lilypond/*/fonts/otf/Bravura.otf res/fonts/Bravura.otf
70
70
+
ln -s ${soundfont-fluid}/share/soundfonts/FluidR3_GM2-2.sf2 res/sounds/FluidR3_GM.sf2
71
71
+
'';
72
72
+
73
73
+
cmakeFlags = [
74
74
+
"-DCMAKE_INSTALL_PREFIX=${placeholder "out"}"
75
75
+
"-DLENMUS_INSTALL_SOUNDFONT=ON"
76
76
+
"-DMAN_INSTALL_DIR=${placeholder "out"}/share/man"
77
77
+
];
78
78
+
79
79
+
postInstall = lib.optionalString stdenv.isDarwin ''
80
80
+
mkdir -p $out/{Applications,bin}
81
81
+
mv $out/lenmus.app $out/Applications
82
82
+
mv $out/Resources $out/Applications/lenmus.app/Contents
83
83
+
makeWrapper $out/{Applications/lenmus.app/Contents/MacOS,bin}/lenmus
84
84
+
'';
85
85
+
62
86
meta = with lib; {
63
87
description = "LenMus Phonascus is a program for learning music";
64
88
longDescription = ''
···
69
93
homepage = "http://www.lenmus.org/";
70
94
license = licenses.gpl3Plus;
71
95
maintainers = with maintainers; [ ramkromberg ];
72
72
-
platforms = with platforms; linux;
96
96
+
platforms = with platforms; unix;
73
97
};
74
98
}