1 { lib, stdenv, fetchurl, python3Packages, gtk3, gobject-introspection, wrapGAppsHook, gnome }:
3 # TODO: Declare configuration options for the following optional dependencies:
4 # - File stores: hg, git, bzr
5 # - Included plugins depenencies: dot, ditaa, dia, any other?
6 # - pyxdg: Need to make it work first (see setupPyInstallFlags).
8 python3Packages.buildPythonApplication rec {
13 url = "https://zim-wiki.org/downloads/zim-${version}.tar.gz";
14 hash = "sha256-QIkNsFsWeNHEcXhGHHZyJDMMW2lNvdwMJLGxeCZaLdI=";
17 buildInputs = [ gtk3 gnome.adwaita-icon-theme ];
18 propagatedBuildInputs = with python3Packages; [ pyxdg pygobject3 ];
19 nativeBuildInputs = [ gobject-introspection wrapGAppsHook ];
24 makeWrapperArgs+=(--prefix XDG_DATA_DIRS : $out/share)
25 makeWrapperArgs+=(--prefix XDG_DATA_DIRS : ${gnome.adwaita-icon-theme}/share)
26 makeWrapperArgs+=(--argv0 $out/bin/.zim-wrapped)
27 makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
33 for img in *.{png,svg}; do
37 dimensions="''${size}x''${size}"
38 mkdir -p $out/share/icons/hicolor/$dimensions/apps
39 cp $img $out/share/icons/hicolor/$dimensions/apps/${pname}.png
44 # RuntimeError: could not create GtkClipboard object
48 ${python3Packages.python.interpreter} test.py
52 description = "A desktop wiki";
53 homepage = "https://zim-wiki.org/";
54 changelog = "https://github.com/zim-desktop-wiki/zim-desktop-wiki/blob/${version}/CHANGELOG.md";
55 license = licenses.gpl2Plus;
56 maintainers = with maintainers; [ pSub ];
58 broken = stdenv.isDarwin; # https://github.com/NixOS/nixpkgs/pull/52658#issuecomment-449565790