tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
jabref: 5.12 -> 5.13
linsui
2 years ago
20edaf9a
a49ac031
+10
-22
2 changed files
expand all
collapse all
unified
split
pkgs
applications
office
jabref
default.nix
top-level
all-packages.nix
+6
-20
pkgs/applications/office/jabref/default.nix
···
1
{ lib
2
, stdenv
3
-
, fetchurl
4
, fetchFromGitHub
5
, wrapGAppsHook3
6
, makeDesktopItem
···
21
pin = "2.2.1-20230117.075740-16";
22
};
23
};
24
-
jackson-datatype-jsr310 = fetchurl {
25
-
url = "https://repo1.maven.org/maven2/com/fasterxml/jackson/datatype/jackson-datatype-jsr310/2.15.3/jackson-datatype-jsr310-2.15.3.jar";
26
-
hash = "sha256-vqHXgAnrxOXVSRij967F2p+9CfZiwZGiF//PN+hSfF4=";
27
-
};
28
in
29
stdenv.mkDerivation rec {
30
-
version = "5.12";
31
pname = "jabref";
32
33
src = fetchFromGitHub {
34
owner = "JabRef";
35
repo = "jabref";
36
rev = "v${version}";
37
-
hash = "sha256-+ltd9hItmMkEpKzX6TFfFy5fiOkLBK/tQNsh8OVDeoc=";
38
fetchSubmodules = true;
39
};
40
···
47
categories = [ "Office" ];
48
icon = "jabref";
49
exec = "JabRef %U";
50
-
startupWMClass = "org.jabref.gui.JabRefMain";
51
mimeTypes = [ "text/x-bibtex" ];
52
})
53
];
···
69
| sh
70
mv $out/com/tobiasdiez/easybind/${versionReplace.easybind.pin} \
71
$out/com/tobiasdiez/easybind/${versionReplace.easybind.snapshot}
72
-
# This is used but not cached by Gradle.
73
-
cp ${jackson-datatype-jsr310} $out/com/fasterxml/jackson/datatype/jackson-datatype-jsr310/2.15.3/jackson-datatype-jsr310-2.15.3.jar
74
'';
75
# Don't move info to share/
76
forceShare = [ "dummy" ];
77
outputHashMode = "recursive";
78
-
outputHash = "sha256-baP/zNgcc6oYwwbWvT7ontULcKKCw0rTQRkdZMgcWfY=";
79
};
80
81
postPatch = ''
···
92
# Find OpenOffice/LibreOffice binary
93
substituteInPlace src/main/java/org/jabref/logic/openoffice/OpenOfficePreferences.java \
94
--replace '/usr' '/run/current-system/sw'
95
-
96
-
# Don't fetch predatory sources. These source are fetched from online webpages.
97
-
sed -i -e '/new PJSource/,/);/c);' src/main/java/org/jabref/logic/journals/predatory/PredatoryJournalListCrawler.java
98
99
# Add back downloadDependencies task for deps download which is removed upstream in https://github.com/JabRef/jabref/pull/10326
100
cat <<EOF >> build.gradle
···
117
118
preBuild = ''
119
# Use the local packages from -deps
120
-
sed -i -e '/repositories {/a maven { url uri("${deps}") }' \
121
-
build.gradle \
122
-
settings.gradle
123
'';
124
125
nativeBuildInputs = [
···
169
cp -r build/resources $out/share/java/jabref
170
171
tar xf build/distributions/JabRef-${version}.tar -C $out --strip-components=1
172
-
173
-
# workaround for https://github.com/NixOS/nixpkgs/issues/162064
174
-
unzip $out/lib/javafx-web-*-*.jar libjfxwebkit.so -d $out/lib/
175
176
DEFAULT_JVM_OPTS=$(sed -n -E "s/^DEFAULT_JVM_OPTS='(.*)'$/\1/p" $out/bin/JabRef | sed -e "s|\$APP_HOME|$out|g" -e 's/"//g')
177
···
1
{ lib
2
, stdenv
0
3
, fetchFromGitHub
4
, wrapGAppsHook3
5
, makeDesktopItem
···
20
pin = "2.2.1-20230117.075740-16";
21
};
22
};
0
0
0
0
23
in
24
stdenv.mkDerivation rec {
25
+
version = "5.13";
26
pname = "jabref";
27
28
src = fetchFromGitHub {
29
owner = "JabRef";
30
repo = "jabref";
31
rev = "v${version}";
32
+
hash = "sha256-inE2FXAaEEiq7343KwtjEiTEHLtn01AzP0foTpsLoAw=";
33
fetchSubmodules = true;
34
};
35
···
42
categories = [ "Office" ];
43
icon = "jabref";
44
exec = "JabRef %U";
45
+
startupWMClass = "org.jabref.gui.JabRefGUI";
46
mimeTypes = [ "text/x-bibtex" ];
47
})
48
];
···
64
| sh
65
mv $out/com/tobiasdiez/easybind/${versionReplace.easybind.pin} \
66
$out/com/tobiasdiez/easybind/${versionReplace.easybind.snapshot}
0
0
67
'';
68
# Don't move info to share/
69
forceShare = [ "dummy" ];
70
outputHashMode = "recursive";
71
+
outputHash = "sha256-lpFIhvPgkzIsHR6IVnn+oPhdSjo0yOIw7USo2+SJCVQ=";
72
};
73
74
postPatch = ''
···
85
# Find OpenOffice/LibreOffice binary
86
substituteInPlace src/main/java/org/jabref/logic/openoffice/OpenOfficePreferences.java \
87
--replace '/usr' '/run/current-system/sw'
0
0
0
88
89
# Add back downloadDependencies task for deps download which is removed upstream in https://github.com/JabRef/jabref/pull/10326
90
cat <<EOF >> build.gradle
···
107
108
preBuild = ''
109
# Use the local packages from -deps
110
+
sed -i -e '/repositories {/a maven { url uri("${deps}") }' build.gradle
111
+
sed -i -e '1i pluginManagement { repositories { maven { url uri("${deps}") } } }' settings.gradle
0
112
'';
113
114
nativeBuildInputs = [
···
158
cp -r build/resources $out/share/java/jabref
159
160
tar xf build/distributions/JabRef-${version}.tar -C $out --strip-components=1
0
0
0
161
162
DEFAULT_JVM_OPTS=$(sed -n -E "s/^DEFAULT_JVM_OPTS='(.*)'$/\1/p" $out/bin/JabRef | sed -e "s|\$APP_HOME|$out|g" -e 's/"//g')
163
+4
-2
pkgs/top-level/all-packages.nix
···
32010
};
32011
32012
jabref = callPackage ../applications/office/jabref {
32013
-
jdk = jdk21.override { enableJavaFX = true; };
32014
-
gradle = gradle_8;
0
0
32015
};
32016
32017
jack_capture = callPackage ../applications/audio/jack-capture { };
···
32010
};
32011
32012
jabref = callPackage ../applications/office/jabref {
32013
+
jdk = jdk.override {
32014
+
enableJavaFX = true;
32015
+
openjfx = openjfx22.override { withWebKit = true; };
32016
+
};
32017
};
32018
32019
jack_capture = callPackage ../applications/audio/jack-capture { };