2 , buildPythonApplication
13 , gobject-introspection
25 buildPythonApplication rec {
30 src = fetchFromGitHub {
33 rev = "refs/tags/v${version}";
34 hash = "sha256-/8JtDoXFQGlM7tlwKd+WRIKpnKCD6OnMmbvElg7LbzU=";
38 # Fixes "Multiple top-level packages discovered in a flat-layout"
39 sed -i '$ a\[tool.setuptools]' pyproject.toml
40 sed -i '$ a\packages = ["cobang"]' pyproject.toml
44 # Needed to recognize gobject namespaces
53 # For gobject namespaces
58 propagatedBuildInputs = [
65 # Unlisted dependencies
68 # Needed as a gobject namespace and to fix 'Caps' object is not subscriptable
76 # Wrapping this manually for SVG recognition
80 # Needed by the application
81 cp -R data $out/${python.sitePackages}/
83 # Icons and applications
84 install -Dm 644 $out/${python.sitePackages}/data/vn.hoabinh.quan.CoBang.svg -t $out/share/pixmaps/
85 install -Dm 644 $out/${python.sitePackages}/data/vn.hoabinh.quan.CoBang.desktop.in -t $out/share/applications/
86 mv $out/${python.sitePackages}/data/vn.hoabinh.quan.CoBang.desktop{.in,}
90 wrapProgram $out/bin/cobang \
91 ''${gappsWrapperArgs[@]} \
92 --prefix XDG_DATA_DIRS : "${gtk3}/share/gsettings-schemas/${gtk3.name}/" \
93 --set GDK_PIXBUF_MODULE_FILE "${librsvg.out}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache"
97 description = "QR code scanner desktop app for Linux";
98 homepage = "https://github.com/hongquan/CoBang";
99 license = licenses.gpl3Only;
100 maintainers = with maintainers; [ aleksana dvaerum ];
101 mainProgram = "cobang";
102 platforms = lib.platforms.linux;