2018-02-25 02:23:58 +00:00
|
|
|
{ stdenv, fetchurl, makeWrapper, makeDesktopItem, jdk, jre, wrapGAppsHook, gtk3, gsettings-desktop-schemas }:
|
2015-03-27 17:03:38 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2017-01-19 05:54:05 +00:00
|
|
|
version = "3.8.1";
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "jabref";
|
2016-06-13 12:40:16 +01:00
|
|
|
|
2015-03-27 17:03:38 +00:00
|
|
|
src = fetchurl {
|
2016-06-13 12:40:16 +01:00
|
|
|
url = "https://github.com/JabRef/jabref/releases/download/v${version}/JabRef-${version}.jar";
|
2017-01-19 05:54:05 +00:00
|
|
|
sha256 = "11asfym74zdq46i217z5n6vc79gylcx8xn7nvwacfqmym0bz79cg";
|
2015-03-27 17:03:38 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
desktopItem = makeDesktopItem {
|
|
|
|
comment = meta.description;
|
|
|
|
name = "jabref";
|
|
|
|
desktopName = "JabRef";
|
|
|
|
genericName = "Bibliography manager";
|
2020-06-25 03:18:37 +01:00
|
|
|
categories = "Office;";
|
2015-03-27 17:03:38 +00:00
|
|
|
icon = "jabref";
|
|
|
|
exec = "jabref";
|
|
|
|
};
|
|
|
|
|
2018-02-25 02:23:58 +00:00
|
|
|
buildInputs = [ makeWrapper jdk wrapGAppsHook gtk3 gsettings-desktop-schemas ];
|
2015-03-27 17:03:38 +00:00
|
|
|
|
2019-06-19 16:45:34 +01:00
|
|
|
dontUnpack = true;
|
2015-03-27 17:03:38 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin $out/share/java $out/share/icons
|
2016-06-13 12:40:16 +01:00
|
|
|
|
2015-03-27 17:03:38 +00:00
|
|
|
cp -r ${desktopItem}/share/applications $out/share/
|
2016-06-13 12:40:16 +01:00
|
|
|
|
|
|
|
jar xf $src images/icons/JabRef-icon-mac.svg
|
|
|
|
cp images/icons/JabRef-icon-mac.svg $out/share/icons/jabref.svg
|
|
|
|
|
|
|
|
ln -s $src $out/share/java/jabref-${version}.jar
|
2015-03-27 17:03:38 +00:00
|
|
|
makeWrapper ${jre}/bin/java $out/bin/jabref \
|
2016-06-13 12:40:16 +01:00
|
|
|
--add-flags "-jar $out/share/java/jabref-${version}.jar"
|
2015-03-27 17:03:38 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Open source bibliography reference manager";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://www.jabref.org";
|
2015-03-27 17:03:38 +00:00
|
|
|
license = licenses.gpl2;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = [ maintainers.gebner ];
|
|
|
|
};
|
|
|
|
}
|