nixpkgs/pkgs/applications/office/jabref/default.nix

47 lines
1.4 KiB
Nix
Raw Normal View History

{ 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";
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";
categories = "Application;Office;";
icon = "jabref";
exec = "jabref";
};
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";
homepage = http://jabref.sourceforge.net;
license = licenses.gpl2;
platforms = platforms.unix;
maintainers = [ maintainers.gebner ];
};
}