1 { lib, stdenv, fetchFromGitHub, python3Packages, wrapQtAppsHook }:
3 python3Packages.buildPythonPackage rec {
8 src = fetchFromGitHub {
11 rev = "refs/tags/v${version}";
12 sha256 = "sha256-Rym7neluRbYCpuezRQyLc6gSl3xbVR9fvhOxxW5+Nzo=";
15 propagatedBuildInputs = [ python3Packages.pyqt5 wrapQtAppsHook ];
18 substituteInPlace ./setup.py \
19 --replace "/usr/share" "usr/share"
21 substituteInPlace ./libqnotero/_themes/light.py \
22 --replace "/usr/share" "$out/usr/share"
26 wrapQtApp "$out"/bin/qnotero
31 mv $out/usr/share/applications $out/share/applications
33 substituteInPlace $out/share/applications/qnotero.desktop \
34 --replace "Icon=/usr/share/qnotero/resources/light/qnotero.png" "Icon=qnotero"
36 mkdir -p $out/share/icons/hicolor/64x64/apps
37 ln -s $out/usr/share/qnotero/resources/light/qnotero.png \
38 $out/share/icons/hicolor/64x64/apps/qnotero.png
45 description = "Quick access to Zotero references";
46 homepage = "https://www.cogsci.nl/software/qnotero";
47 license = lib.licenses.gpl2;
48 platforms = lib.platforms.unix;
49 broken = stdenv.isDarwin; # Build fails even after adding cx-freeze to `buildInputs`
50 maintainers = [ lib.maintainers.nico202 ];