2024-02-29 20:09:43 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, gobject-introspection
|
|
|
|
, gtk-layer-shell
|
|
|
|
, gtk3
|
|
|
|
, python3Packages
|
|
|
|
, wrapGAppsHook
|
|
|
|
}:
|
|
|
|
|
|
|
|
python3Packages.buildPythonApplication rec {
|
|
|
|
pname = "nwg-hello";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "0.1.10";
|
2024-02-29 20:09:43 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "nwg-piotr";
|
|
|
|
repo = "nwg-hello";
|
2024-04-21 15:54:59 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-naYouinDYgdGwySVxdEOZpNTK0vwnIyUKTkPgYaneew=";
|
2024-02-29 20:09:43 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
gobject-introspection
|
|
|
|
wrapGAppsHook
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
gtk3
|
|
|
|
gtk-layer-shell
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
python3Packages.pygobject3
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
# hard coded paths
|
|
|
|
substituteInPlace nwg_hello/main.py \
|
|
|
|
--replace '/etc/nwg-hello' "$out/etc/nwg-hello" \
|
|
|
|
--replace "/usr/share/xsessions" "/run/current-system/sw/share/xsessions" \
|
|
|
|
--replace "/usr/share/wayland-sessions" "/run/current-system/sw/share/wayland-sessions"
|
|
|
|
|
|
|
|
substituteInPlace nwg-hello-default.json \
|
|
|
|
--replace "/usr/share/xsessions" "/run/current-system/sw/share/xsessions" \
|
|
|
|
--replace "/usr/share/wayland-sessions" "/run/current-system/sw/share/wayland-sessions"
|
|
|
|
|
|
|
|
substituteInPlace nwg_hello/ui.py --replace '/usr/share/nwg-hello' "$out/share/nwg-hello"
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
install -D -m 644 -t "$out/etc/nwg-hello/" nwg-hello-default.json nwg-hello-default.css hyprland.conf sway-config README
|
|
|
|
install -D -m 644 -t "$out/share/nwg-hello/" nwg.jpg
|
|
|
|
install -D -m 644 -t "$out/share/nwg-hello/" img/*
|
|
|
|
'';
|
|
|
|
|
|
|
|
# Upstream has no tests
|
|
|
|
doCheck = false;
|
|
|
|
pythonImportsCheck = [ "nwg_hello" ];
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = "https://github.com/nwg-piotr/nwg-hello";
|
|
|
|
description = "GTK3-based greeter for the greetd daemon, written in python";
|
|
|
|
license = lib.licenses.mit;
|
|
|
|
platforms = lib.platforms.linux;
|
|
|
|
maintainers = [ ];
|
|
|
|
mainProgram = "nwg-hello";
|
|
|
|
};
|
|
|
|
}
|