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
|
{
stdenv,
lib,
fetchFromGitHub,
gobject-introspection,
pkg-config,
cairo,
glib,
readline,
libsysprof-capture,
spidermonkey_140,
meson,
mesonEmulatorHook,
dbus,
ninja,
which,
libxml2,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "cjs";
version = "140.1";
src = fetchFromGitHub {
owner = "linuxmint";
repo = "cjs";
tag = finalAttrs.version;
hash = "sha256-KGcu7QkocH1FeO5Dt2GBC1Y+xYk7OqgvAF7DAJHzn/I=";
};
outputs = [
"out"
"dev"
];
strictDeps = true;
nativeBuildInputs = [
meson
ninja
pkg-config
which # for locale detection
libxml2 # for xml-stripblanks
dbus # for dbus-run-session
gobject-introspection
]
++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
mesonEmulatorHook
];
buildInputs = [
cairo
readline
libsysprof-capture
spidermonkey_140
];
propagatedBuildInputs = [
glib
];
mesonFlags = [
# This is just a copy of gjs so we don't run tests here.
"-Dskip_gtk_tests=true"
]
++ lib.optionals stdenv.hostPlatform.isMusl [
"-Dprofiler=disabled"
];
postPatch = ''
patchShebangs --build build/choose-tests-locale.sh
'';
meta = {
homepage = "https://github.com/linuxmint/cjs";
description = "JavaScript bindings for Cinnamon";
longDescription = ''
This module contains JavaScript bindings based on gobject-introspection.
'';
license = with lib.licenses; [
gpl2Plus
lgpl2Plus
mit
mpl11
];
platforms = lib.platforms.linux;
teams = [ lib.teams.cinnamon ];
};
})
|