2014-03-26 23:24:20 +00:00
|
|
|
{ stdenv, fetchurl, bash, xulrunner }:
|
|
|
|
|
|
|
|
assert (stdenv.system == "x86_64-linux" || stdenv.system == "i686-linux");
|
|
|
|
|
|
|
|
let
|
2014-09-04 17:35:48 +01:00
|
|
|
version = "4.0.22";
|
2014-03-26 23:24:20 +00:00
|
|
|
arch = if stdenv.system == "x86_64-linux"
|
|
|
|
then "linux-x86_64"
|
|
|
|
else "linux-i686";
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "zotero-${version}";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://download.zotero.org/standalone/${version}/Zotero-${version}_${arch}.tar.bz2";
|
|
|
|
sha256 = if stdenv.system == "x86_64-linux"
|
2014-09-04 17:35:48 +01:00
|
|
|
then "0dq4x1cc0lnhs7g6w85qjdlb7sajr13mr2zcf4yvrciwhwy3r1i1"
|
|
|
|
else "0s4j2karaq85fwnd1niz8hzx5k71cqs493g38pg337i3iwxad9hg";
|
2014-03-26 23:24:20 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
# Strip the bundled xulrunner
|
|
|
|
prePatch = ''rm -fr run-zotero.sh zotero xulrunner/'';
|
|
|
|
|
|
|
|
inherit bash xulrunner;
|
|
|
|
installPhase = ''
|
2014-06-30 13:56:10 +01:00
|
|
|
mkdir -p "$out/libexec/zotero"
|
2014-03-26 23:24:20 +00:00
|
|
|
cp -vR * "$out/libexec/zotero/"
|
|
|
|
|
2014-06-30 13:56:10 +01:00
|
|
|
mkdir -p "$out/bin"
|
2014-03-26 23:24:20 +00:00
|
|
|
substituteAll "${./zotero.sh}" "$out/bin/zotero"
|
|
|
|
chmod +x "$out/bin/zotero"
|
|
|
|
'';
|
|
|
|
|
2014-08-15 01:03:52 +01:00
|
|
|
doInstallCheck = true;
|
|
|
|
installCheckPhase = "$out/bin/zotero --version";
|
|
|
|
|
2014-03-26 23:24:20 +00:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = "https://www.zotero.org";
|
|
|
|
description = "Collect, organize, cite, and share your research sources";
|
|
|
|
license = licenses.agpl3;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ ttuegel ];
|
|
|
|
};
|
|
|
|
}
|