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

47 lines
1.3 KiB
Nix
Raw Normal View History

2015-03-27 17:03:38 +00:00
{ stdenv, fetchurl, makeWrapper, makeDesktopItem, ant, jdk, jre }:
stdenv.mkDerivation rec {
2017-01-19 05:54:05 +00:00
version = "3.8.1";
2015-03-27 17:03:38 +00:00
name = "jabref-${version}";
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";
};
2016-06-13 12:40:16 +01:00
buildInputs = [ makeWrapper jdk ];
2015-03-27 17:03:38 +00:00
2016-06-13 12:40:16 +01:00
phases = [ "installPhase" ];
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 ];
};
}