Skip to content

Commit 45e6370

Browse files
committed
time12: init at 1.2.2
1 parent 6a6c1f4 commit 45e6370

File tree

1 file changed

+152
-0
lines changed

1 file changed

+152
-0
lines changed

pkgs/by-name/ti/time12/package.nix

Lines changed: 152 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,152 @@
1+
{
2+
stdenv,
3+
lib,
4+
fetchFromGitHub,
5+
nix-update-script,
6+
cmake,
7+
pkg-config,
8+
writableTmpDirAsHomeHook,
9+
libx11,
10+
libxrandr,
11+
libxinerama,
12+
libxext,
13+
libxcursor,
14+
libxtst,
15+
freetype,
16+
fontconfig,
17+
webkitgtk_4_1,
18+
curl,
19+
alsa-lib,
20+
libsysprof-capture,
21+
pcre2,
22+
util-linux,
23+
libselinux,
24+
libsepol,
25+
libthai,
26+
libdatrie,
27+
libxdmcp,
28+
libdeflate,
29+
lerc,
30+
xz,
31+
libwebp,
32+
libxkbcommon,
33+
libepoxy,
34+
sqlite,
35+
36+
buildStandalone ? true,
37+
buildVST3 ? true,
38+
buildLV2 ? true,
39+
}:
40+
stdenv.mkDerivation (finalAttrs: {
41+
name = "time12";
42+
version = "1.2.2";
43+
44+
src = fetchFromGitHub {
45+
owner = "tiagolr";
46+
repo = "time12";
47+
tag = "v${finalAttrs.version}";
48+
fetchSubmodules = true;
49+
hash = "sha256-kyh1IMiOykkSglpuJo2DnNOluUdO38Z25ONXh0mi400=";
50+
};
51+
52+
nativeBuildInputs = [
53+
cmake
54+
pkg-config
55+
writableTmpDirAsHomeHook
56+
];
57+
58+
buildInputs = [
59+
libx11
60+
libxrandr
61+
libxinerama
62+
libxext
63+
libxcursor
64+
libxtst
65+
freetype
66+
fontconfig
67+
webkitgtk_4_1
68+
curl
69+
alsa-lib
70+
libsysprof-capture
71+
pcre2
72+
util-linux
73+
libselinux
74+
libsepol
75+
libthai
76+
libdatrie
77+
libxdmcp
78+
libdeflate
79+
lerc
80+
xz
81+
libwebp
82+
libxkbcommon
83+
libepoxy
84+
sqlite
85+
];
86+
87+
# JUCE dlopens these at runtime, standalone executable crashes without them
88+
NIX_LDFLAGS = [
89+
"-lX11"
90+
"-lXext"
91+
"-lXcomposite"
92+
"-lXcursor"
93+
"-lXinerama"
94+
"-lXrandr"
95+
"-lXrender"
96+
"-lXtst"
97+
"-lXdmcp"
98+
];
99+
100+
# Fontconfig error: Cannot load default config file: No such file: (null)
101+
env.FONTCONFIG_FILE = "${fontconfig.out}/etc/fonts/fonts.conf";
102+
103+
postPatch = ''
104+
substituteInPlace CMakeLists.txt \
105+
--replace-fail "juce::juce_recommended_lto_flags" "# Not forcing LTO"
106+
107+
substituteInPlace CMakeLists.txt \
108+
--replace-fail "COPY_PLUGIN_AFTER_BUILD TRUE" "COPY_PLUGIN_AFTER_BUILD FALSE"
109+
'';
110+
111+
cmakeFlags = [
112+
(lib.cmakeFeature "CMAKE_AR" (lib.getExe' stdenv.cc.cc "gcc-ar"))
113+
(lib.cmakeFeature "CMAKE_RANLIB" (lib.getExe' stdenv.cc.cc "gcc-ranlib"))
114+
115+
(lib.cmakeBool "BUILD_STANDALONE" buildStandalone)
116+
(lib.cmakeBool "BUILD_VST3" buildVST3)
117+
(lib.cmakeBool "BUILD_LV2" buildLV2)
118+
];
119+
120+
installPhase = ''
121+
runHook preInstall
122+
123+
pushd TIME12_artefacts/Release
124+
${lib.optionalString buildStandalone ''
125+
install -Dm755 Standalone/TIME-12 -t $out/bin
126+
''}
127+
128+
${lib.optionalString buildVST3 ''
129+
mkdir -p $out/lib/vst3
130+
cp -r VST3/TIME-12.vst3 $out/lib/vst3
131+
''}
132+
133+
${lib.optionalString buildLV2 ''
134+
mkdir -p $out/lib/lv2
135+
cp -r LV2/TIME-12.lv2 $out/lib/lv2
136+
''}
137+
popd
138+
139+
runHook postInstall
140+
'';
141+
142+
passthru.updateScript = nix-update-script { };
143+
144+
meta = {
145+
description = "Envelope based delay modulator";
146+
homepage = "https://github.com/tiagolr/time12";
147+
platforms = [ "x86_64-linux" ];
148+
license = lib.licenses.gpl3Plus;
149+
maintainers = [ lib.maintainers.mrtnvgr ];
150+
mainProgram = lib.optionalString buildStandalone "TIME-12";
151+
};
152+
})

0 commit comments

Comments
 (0)