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

47 lines
1.3 KiB
Nix
Raw Normal View History

2015-03-27 18:03:38 +01:00
{ stdenv, fetchurl, makeWrapper, makeDesktopItem, ant, jdk, jre }:
stdenv.mkDerivation rec {
2017-01-19 06:54:05 +01:00
version = "3.8.1";
2015-03-27 18:03:38 +01:00
name = "jabref-${version}";
2016-06-13 13:40:16 +02:00
2015-03-27 18:03:38 +01:00
src = fetchurl {
2016-06-13 13:40:16 +02:00
url = "https://github.com/JabRef/jabref/releases/download/v${version}/JabRef-${version}.jar";
2017-01-19 06:54:05 +01:00
sha256 = "11asfym74zdq46i217z5n6vc79gylcx8xn7nvwacfqmym0bz79cg";
2015-03-27 18:03:38 +01:00
};
desktopItem = makeDesktopItem {
comment = meta.description;
name = "jabref";
desktopName = "JabRef";
genericName = "Bibliography manager";
categories = "Application;Office;";
icon = "jabref";
exec = "jabref";
};
2016-06-13 13:40:16 +02:00
buildInputs = [ makeWrapper jdk ];
2015-03-27 18:03:38 +01:00
2016-06-13 13:40:16 +02:00
phases = [ "installPhase" ];
2015-03-27 18:03:38 +01:00
installPhase = ''
mkdir -p $out/bin $out/share/java $out/share/icons
2016-06-13 13:40:16 +02:00
2015-03-27 18:03:38 +01:00
cp -r ${desktopItem}/share/applications $out/share/
2016-06-13 13:40:16 +02: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 18:03:38 +01:00
makeWrapper ${jre}/bin/java $out/bin/jabref \
2016-06-13 13:40:16 +02:00
--add-flags "-jar $out/share/java/jabref-${version}.jar"
2015-03-27 18:03:38 +01: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 ];
};
}