Merge pull request #280599 from khaneliman/nwg-hello

nwg-hello: init at 0.1.6

authored by Artturi and committed by GitHub c15f091e 215a8872

+67
+67
pkgs/by-name/nw/nwg-hello/package.nix
··· 1 + { lib 2 + , fetchFromGitHub 3 + , gobject-introspection 4 + , gtk-layer-shell 5 + , gtk3 6 + , python3Packages 7 + , wrapGAppsHook 8 + }: 9 + 10 + python3Packages.buildPythonApplication rec { 11 + pname = "nwg-hello"; 12 + version = "0.1.6"; 13 + 14 + src = fetchFromGitHub { 15 + owner = "nwg-piotr"; 16 + repo = "nwg-hello"; 17 + rev = "v${version}"; 18 + hash = "sha256-+D89QTFUV7/dhfcOWnQshG8USh35Vdm/QPHbsxiV0j0="; 19 + }; 20 + 21 + nativeBuildInputs = [ 22 + gobject-introspection 23 + wrapGAppsHook 24 + ]; 25 + 26 + buildInputs = [ 27 + gtk3 28 + gtk-layer-shell 29 + ]; 30 + 31 + propagatedBuildInputs = [ 32 + python3Packages.pygobject3 33 + ]; 34 + 35 + postPatch = '' 36 + # hard coded paths 37 + substituteInPlace nwg_hello/main.py \ 38 + --replace '/etc/nwg-hello' "$out/etc/nwg-hello" \ 39 + --replace "/usr/share/xsessions" "/run/current-system/sw/share/xsessions" \ 40 + --replace "/usr/share/wayland-sessions" "/run/current-system/sw/share/wayland-sessions" 41 + 42 + substituteInPlace nwg-hello-default.json \ 43 + --replace "/usr/share/xsessions" "/run/current-system/sw/share/xsessions" \ 44 + --replace "/usr/share/wayland-sessions" "/run/current-system/sw/share/wayland-sessions" 45 + 46 + substituteInPlace nwg_hello/ui.py --replace '/usr/share/nwg-hello' "$out/share/nwg-hello" 47 + ''; 48 + 49 + postInstall = '' 50 + install -D -m 644 -t "$out/etc/nwg-hello/" nwg-hello-default.json nwg-hello-default.css hyprland.conf sway-config README 51 + install -D -m 644 -t "$out/share/nwg-hello/" nwg.jpg 52 + install -D -m 644 -t "$out/share/nwg-hello/" img/* 53 + ''; 54 + 55 + # Upstream has no tests 56 + doCheck = false; 57 + pythonImportsCheck = [ "nwg_hello" ]; 58 + 59 + meta = { 60 + homepage = "https://github.com/nwg-piotr/nwg-hello"; 61 + description = "GTK3-based greeter for the greetd daemon, written in python"; 62 + license = lib.licenses.mit; 63 + platforms = lib.platforms.linux; 64 + maintainers = [ ]; 65 + mainProgram = "nwg-hello"; 66 + }; 67 + }