blob: 83a59347f93338d753d91ee21da42d7d6936e6f5 (
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
|
{
stdenvNoCC,
lib,
fetchFromGitHub,
makeBinaryWrapper,
makeDesktopItem,
jdk17,
gradle_7,
which,
}:
let
pname = "freeplane";
version = "1.11.14";
jdk = jdk17;
gradle = gradle_7;
src = fetchFromGitHub {
owner = "freeplane";
repo = "freeplane";
rev = "release-${version}";
hash = "sha256-zEQjB57iiKVQnH8VtynpEGKNAa2e+WpqnGt6fnv5Rjs=";
};
in
stdenvNoCC.mkDerivation (finalAttrs: {
inherit pname version src;
nativeBuildInputs = [
makeBinaryWrapper
jdk
gradle
];
mitmCache = gradle.fetchDeps {
inherit pname;
data = ./deps.json;
};
gradleFlags = [ "-Dorg.gradle.java.home=${jdk}" "-x" "test" ];
preBuild = "mkdir -p freeplane/build";
gradleBuildTask = "build";
desktopItems = [
(makeDesktopItem {
name = "freeplane";
desktopName = "freeplane";
genericName = "Mind-mapper";
exec = "freeplane";
icon = "freeplane";
comment = finalAttrs.meta.description;
mimeTypes = [
"application/x-freemind"
"application/x-freeplane"
"text/x-troff-mm"
];
categories = [
"2DGraphics"
"Chart"
"Graphics"
"Office"
];
})
];
installPhase = ''
runHook preInstall
mkdir -p $out/bin $out/share
cp -a ./BIN/. $out/share/freeplane
makeWrapper $out/share/freeplane/freeplane.sh $out/bin/freeplane \
--set FREEPLANE_BASE_DIR $out/share/freeplane \
--set JAVA_HOME ${jdk} \
--prefix PATH : ${
lib.makeBinPath [
jdk
which
]
} \
--prefix _JAVA_AWT_WM_NONREPARENTING : 1 \
--prefix _JAVA_OPTIONS : "-Dawt.useSystemAAFontSettings=on"
runHook postInstall
'';
meta = {
description = "Mind-mapping software";
homepage = "https://freeplane.org/";
license = lib.licenses.gpl2Plus;
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [ chaduffy ];
mainProgram = "freeplane";
};
})
|