2021-01-15 22:18:51 +00:00
|
|
|
{lib, stdenv, fetchurl, runtimeShell, makeWrapper
|
2020-04-24 23:36:52 +00:00
|
|
|
, oraclejre
|
|
|
|
, antialiasFont ? true
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
pname = "docear";
|
|
|
|
version = "1.2";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://docear.org/downloads/docear_linux.tar.gz";
|
|
|
|
sha256 = "1g5n7r2x4gas6dl2fbyh7v9yxdcb6bzml8n3ldmpzv1rncgjcdp4";
|
|
|
|
};
|
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
buildInputs = [ oraclejre ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPhase = "";
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
mkdir -p $out/share
|
|
|
|
cp -R * $out/share
|
|
|
|
chmod 0755 $out/share/ -R
|
|
|
|
|
|
|
|
# The wrapper ensures oraclejre is used
|
|
|
|
makeWrapper ${runtimeShell} $out/bin/docear \
|
2021-02-05 17:12:51 +00:00
|
|
|
--set _JAVA_OPTIONS "${lib.optionalString antialiasFont "-Dswing.aatext=TRUE -Dawt.useSystemAAFontSettings=on"}" \
|
2020-04-24 23:36:52 +00:00
|
|
|
--set JAVA_HOME ${oraclejre.home} \
|
|
|
|
--add-flags "$out/share/docear.sh"
|
|
|
|
|
|
|
|
chmod 0755 $out/bin/docear
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Unique solution to academic literature management";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "http://www.docear.org/";
|
|
|
|
# Licenses at: http://www.docear.org/software/download/
|
|
|
|
license = with licenses; [
|
|
|
|
gpl2 # for the main software and some dependencies
|
|
|
|
bsd3 # for one of its dependencies
|
|
|
|
];
|
|
|
|
maintainers = with maintainers; [ unode ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|