3
0
Fork 0
forked from mirrors/nixpkgs
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 {
2016-07-22 20:04:30 +01:00
version = "3.5";
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";
2016-07-22 20:04:30 +01:00
sha256 = "19q86xc8qr6j8zd9rsc6aa3jd4kbblkr6ik1h6h7npq012019adm";
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 ];
};
}