Add Mendeley desktop application

This commit is contained in:
Badi' Abdul-Wahid 2015-01-24 16:40:01 -05:00
parent c457bbb2bb
commit 4291a14133
2 changed files with 67 additions and 0 deletions

View File

@ -0,0 +1,65 @@
{ fetchurl, stdenv, dpkg, makeWrapper, which
,gcc, xlibs, qt4, zlib
, ...}:
assert stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux";
let
arch32 = "i686-linux";
arch64 = "x86_64-linux";
arch = if stdenv.system == arch32
then "i386"
else "amd64";
shortVersion = "1.13.1-stable";
version = "${shortVersion}_${arch}";
url = "http://desktop-download.mendeley.com/download/apt/pool/main/m/mendeleydesktop/mendeleydesktop_${version}.deb";
sha256 = if stdenv.system == arch32
then "21491da1608daf58da23e7e5eb7619b494b10192acc0f81575daff2a38720f50"
else "8db101b26dd2978e991421260a2e55d849014f64005930b2528080bbbaa78600";
deps = [
gcc.gcc
qt4
xlibs.libX11
zlib
];
in
stdenv.mkDerivation {
name = "mendeley-${version}";
src = fetchurl {
url = url;
sha256 = sha256;
};
buildInputs = [ dpkg makeWrapper which ];
unpackPhase = "true";
installPhase = ''
dpkg-deb -x $src $out
mv $out/opt/mendeleydesktop/{bin,lib,plugins,share} $out
interpreter=$(patchelf --print-interpreter $(readlink -f $(which patchelf)))
patchelf --set-interpreter $interpreter $out/bin/mendeleydesktop
librarypath="${stdenv.lib.makeLibraryPath deps}:$out/lib:$out/lib/qt"
wrapProgram $out/bin/mendeleydesktop --prefix LD_LIBRARY_PATH : "$librarypath"
'';
dontStrip = true;
dontPatchElf = true;
meta = {
homepage = http://www.mendeley.com;
description = "Mendeley is a free reference manager and academic social network.";
license = stdenv.lib.licenses.unfree;
};
}

View File

@ -10477,6 +10477,8 @@ let
mcomix = callPackage ../applications/graphics/mcomix { };
mendeley = callPackage ../application/office/mendeley { };
mercurial = callPackage ../applications/version-management/mercurial {
inherit (pythonPackages) curses docutils;
guiSupport = false; # use mercurialFull to get hgk GUI