2014-12-14 20:47:11 +01:00
|
|
|
{ stdenv, fetchurl, useGoldLinker, bash, callPackage, gnome, xlibs }:
|
2014-03-27 00:24:20 +01:00
|
|
|
|
|
|
|
assert (stdenv.system == "x86_64-linux" || stdenv.system == "i686-linux");
|
|
|
|
|
2014-12-04 16:35:48 +01:00
|
|
|
|
2014-03-27 00:24:20 +01:00
|
|
|
let
|
2014-12-04 16:35:48 +01:00
|
|
|
/* Zotero always has a hard upper bound on its firefox/xulrunner dependency.
|
2014-12-14 20:47:11 +01:00
|
|
|
* Use private version of firefox to prevent breakage when the system
|
|
|
|
* packages are updated. Please update this dependency whenever zotero is
|
|
|
|
* updated; it should be as simple as copying the system firefox expression
|
|
|
|
* into place.
|
2014-12-04 16:35:48 +01:00
|
|
|
*/
|
|
|
|
|
2014-12-14 20:47:11 +01:00
|
|
|
firefox = callPackage ./firefox-bin {
|
|
|
|
gconf = gnome.GConf;
|
|
|
|
inherit (gnome) libgnome libgnomeui;
|
|
|
|
inherit (xlibs) libX11 libXScrnSaver libXcomposite libXdamage libXext
|
|
|
|
libXfixes libXinerama libXrender libXt;
|
|
|
|
};
|
|
|
|
|
|
|
|
# Please update the firefox dependency when zotero is updated!
|
2014-10-22 20:51:01 +02:00
|
|
|
version = "4.0.23";
|
2014-03-27 00:24:20 +01: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-10-22 20:51:01 +02:00
|
|
|
then "1fz5xn69vapfw8d20207zr9p5r1h9x5kahh334pl2dn1h8il0sm8"
|
|
|
|
else "1kmsvvg2lh881rzy3rxbigzivixjamyrwf5x7vmn1kzhvsvifrng";
|
2014-03-27 00:24:20 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
# Strip the bundled xulrunner
|
|
|
|
prePatch = ''rm -fr run-zotero.sh zotero xulrunner/'';
|
|
|
|
|
2014-12-14 20:47:11 +01:00
|
|
|
inherit bash firefox;
|
2014-03-27 00:24:20 +01:00
|
|
|
installPhase = ''
|
2014-06-30 14:56:10 +02:00
|
|
|
mkdir -p "$out/libexec/zotero"
|
2014-03-27 00:24:20 +01:00
|
|
|
cp -vR * "$out/libexec/zotero/"
|
|
|
|
|
2014-06-30 14:56:10 +02:00
|
|
|
mkdir -p "$out/bin"
|
2014-03-27 00:24:20 +01:00
|
|
|
substituteAll "${./zotero.sh}" "$out/bin/zotero"
|
|
|
|
chmod +x "$out/bin/zotero"
|
|
|
|
'';
|
|
|
|
|
2014-08-15 02:03:52 +02:00
|
|
|
doInstallCheck = true;
|
|
|
|
installCheckPhase = "$out/bin/zotero --version";
|
|
|
|
|
2014-03-27 00:24:20 +01: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 ];
|
|
|
|
};
|
|
|
|
}
|