2015-01-25 00:40:01 +03:00
|
|
|
{ fetchurl, stdenv, dpkg, makeWrapper, which
|
2015-09-15 12:26:18 +03:00
|
|
|
,gcc, xorg, qt4, zlib
|
2015-01-25 00:40:01 +03:00
|
|
|
, ...}:
|
|
|
|
|
|
|
|
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";
|
|
|
|
|
2015-12-02 14:09:50 +03:00
|
|
|
shortVersion = "1.15.2-stable";
|
2015-01-25 00:40:01 +03:00
|
|
|
|
|
|
|
version = "${shortVersion}_${arch}";
|
|
|
|
|
|
|
|
url = "http://desktop-download.mendeley.com/download/apt/pool/main/m/mendeleydesktop/mendeleydesktop_${version}.deb";
|
|
|
|
sha256 = if stdenv.system == arch32
|
2015-12-02 14:09:50 +03:00
|
|
|
then "64e72b5749ea54f75cb0400732af68d1044037c6233a6bc0ba7a560acd3503cb"
|
|
|
|
else "cd13e39ad665b243fa5ca04c30cdc4c7da3ddaa259ea1af8fd1ff60f85f4eb25";
|
2015-01-25 00:40:01 +03:00
|
|
|
|
|
|
|
deps = [
|
2015-02-04 09:12:35 +03:00
|
|
|
gcc.cc
|
2015-01-25 00:40:01 +03:00
|
|
|
qt4
|
2015-09-15 12:26:18 +03:00
|
|
|
xorg.libX11
|
2015-01-25 00:40:01 +03:00
|
|
|
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;
|
2015-01-25 20:08:01 +03:00
|
|
|
description = "A reference manager and academic social network";
|
2015-01-25 00:40:01 +03:00
|
|
|
license = stdenv.lib.licenses.unfree;
|
2015-01-25 20:27:53 +03:00
|
|
|
platforms = stdenv.lib.platforms.linux;
|
2015-01-25 00:40:01 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|