2023-11-10 05:37:56 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, python3Packages, wrapQtAppsHook }:
|
2016-02-26 11:32:11 +00:00
|
|
|
|
|
|
|
python3Packages.buildPythonPackage rec {
|
2020-02-09 06:40:09 +00:00
|
|
|
pname = "qnotero";
|
2016-02-26 11:32:11 +00:00
|
|
|
|
2022-08-13 20:40:03 +00:00
|
|
|
version = "2.3.1";
|
2016-02-26 11:32:11 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2020-02-09 06:40:09 +00:00
|
|
|
owner = "ealbiter";
|
|
|
|
repo = pname;
|
2022-08-13 20:40:03 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
sha256 = "sha256-Rym7neluRbYCpuezRQyLc6gSl3xbVR9fvhOxxW5+Nzo=";
|
2016-02-26 11:32:11 +00:00
|
|
|
};
|
|
|
|
|
2020-02-09 06:40:09 +00:00
|
|
|
propagatedBuildInputs = [ python3Packages.pyqt5 wrapQtAppsHook ];
|
2016-02-26 11:32:11 +00:00
|
|
|
|
|
|
|
patchPhase = ''
|
|
|
|
substituteInPlace ./setup.py \
|
2017-03-03 12:39:52 +00:00
|
|
|
--replace "/usr/share" "usr/share"
|
2016-02-26 11:32:11 +00:00
|
|
|
|
2020-02-09 06:40:09 +00:00
|
|
|
substituteInPlace ./libqnotero/_themes/light.py \
|
2017-03-03 12:39:52 +00:00
|
|
|
--replace "/usr/share" "$out/usr/share"
|
2016-02-26 11:32:11 +00:00
|
|
|
'';
|
|
|
|
|
2020-02-09 06:40:09 +00:00
|
|
|
preFixup = ''
|
|
|
|
wrapQtApp "$out"/bin/qnotero
|
|
|
|
'';
|
|
|
|
|
2023-04-11 15:49:46 +00:00
|
|
|
postInstall = ''
|
|
|
|
mkdir $out/share
|
|
|
|
mv $out/usr/share/applications $out/share/applications
|
|
|
|
|
|
|
|
substituteInPlace $out/share/applications/qnotero.desktop \
|
|
|
|
--replace "Icon=/usr/share/qnotero/resources/light/qnotero.png" "Icon=qnotero"
|
|
|
|
|
|
|
|
mkdir -p $out/share/icons/hicolor/64x64/apps
|
|
|
|
ln -s $out/usr/share/qnotero/resources/light/qnotero.png \
|
|
|
|
$out/share/icons/hicolor/64x64/apps/qnotero.png
|
|
|
|
'';
|
|
|
|
|
2021-01-24 23:56:01 +00:00
|
|
|
# no tests executed
|
|
|
|
doCheck = false;
|
|
|
|
|
2016-02-26 11:32:11 +00:00
|
|
|
meta = {
|
|
|
|
description = "Quick access to Zotero references";
|
2024-03-19 02:14:51 +00:00
|
|
|
mainProgram = "qnotero";
|
2023-01-21 21:41:12 +00:00
|
|
|
homepage = "https://www.cogsci.nl/software/qnotero";
|
2021-01-15 05:42:41 +00:00
|
|
|
license = lib.licenses.gpl2;
|
|
|
|
platforms = lib.platforms.unix;
|
2023-11-10 05:37:56 +00:00
|
|
|
broken = stdenv.hostPlatform.isDarwin; # Build fails even after adding cx-freeze to `buildInputs`
|
2021-01-15 05:42:41 +00:00
|
|
|
maintainers = [ lib.maintainers.nico202 ];
|
2016-02-26 11:32:11 +00:00
|
|
|
};
|
|
|
|
}
|