depot/third_party/nixpkgs/pkgs/by-name/wi/wike/package.nix
Default email 472aeafc57 Project import generated by Copybara.
GitOrigin-RevId: c31898adf5a8ed202ce5bea9f347b1c6871f32d1
2024-10-04 18:56:33 +02:00

82 lines
1.5 KiB
Nix

{ lib
, fetchFromGitHub
, python3
, meson
, ninja
, pkg-config
, pkgsCross
, appstream-glib
, desktop-file-utils
, gobject-introspection
, wrapGAppsHook4
, glib
, gtk4
, librsvg
, libadwaita
, glib-networking
, webkitgtk_6_0
}:
python3.pkgs.buildPythonApplication rec {
pname = "wike";
version = "3.0.0";
format = "other";
src = fetchFromGitHub {
owner = "hugolabe";
repo = "Wike";
rev = version;
hash = "sha256-x6HYlpCj7poKWJWB2CnvN1aoTa7LmqYwbPa62WvSYsQ=";
};
nativeBuildInputs = [
meson
pkg-config
ninja
appstream-glib
desktop-file-utils
gobject-introspection
wrapGAppsHook4
];
buildInputs = [
glib
gtk4
librsvg
libadwaita
glib-networking
webkitgtk_6_0
];
propagatedBuildInputs = with python3.pkgs; [
requests
pygobject3
];
postPatch = ''
patchShebangs build-aux/meson/postinstall.py
substituteInPlace build-aux/meson/postinstall.py \
--replace gtk-update-icon-cache gtk4-update-icon-cache
'';
# prevent double wrapping
dontWrapGApps = true;
preFixup = ''
makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
patchShebangs --update $out/share/wike/wike-sp
'';
passthru = {
tests.cross = pkgsCross.aarch64-multiplatform.wike;
};
meta = with lib; {
description = "Wikipedia Reader for the GNOME Desktop";
homepage = "https://github.com/hugolabe/Wike";
license = licenses.gpl3Plus;
platforms = platforms.linux;
maintainers = with maintainers; [ samalws ];
mainProgram = "wike";
};
}