mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-03 04:13:01 +00:00
755b915a15
nix run nixpkgs#silver-searcher -- -G '\.nix$' -0l 'description.*"[Aa]n?' pkgs \ | xargs -0 nix run nixpkgs#gnused -- -i '' -Ee 's/(description.*")[Aa]n? (.)/\1\U\2/'
49 lines
1.3 KiB
Nix
49 lines
1.3 KiB
Nix
{ lib
|
|
, python3
|
|
, fetchFromGitHub
|
|
}:
|
|
|
|
python3.pkgs.buildPythonApplication rec {
|
|
pname = "wlr-layout-ui";
|
|
version = "1.6.11";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "fdev31";
|
|
repo = "wlr-layout-ui";
|
|
rev = "refs/tags/${version}";
|
|
hash = "sha256-aM8KV3jzim14lBVvn/AqUsfoRWrnKtRJeFSX1Thrq3M=";
|
|
};
|
|
|
|
postPatch = ''
|
|
# The hyprland default.nix patches the version.h of hyprland so that the
|
|
# version info moves to the commit key.
|
|
substituteInPlace src/wlr_layout_ui/screens.py \
|
|
--replace 'json.loads(subprocess.getoutput("hyprctl -j version"))["tag"]'\
|
|
'json.loads(subprocess.getoutput("hyprctl -j version"))["commit"]'
|
|
'';
|
|
|
|
nativeBuildInputs = [
|
|
python3.pkgs.poetry-core
|
|
];
|
|
|
|
propagatedBuildInputs = with python3.pkgs; [
|
|
pyglet
|
|
tomli
|
|
tomli-w
|
|
];
|
|
|
|
postInstall = ''
|
|
install -Dm644 files/wlr-layout-ui.desktop $out/share/applications/wlr-layout-ui.desktop
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Simple GUI to setup the screens layout on wlroots based systems";
|
|
homepage = "https://github.com/fdev31/wlr-layout-ui/";
|
|
maintainers = with maintainers; [ bnlrnz ];
|
|
license = licenses.mit;
|
|
mainProgram = "wlrlui";
|
|
platforms = subtractLists platforms.darwin platforms.unix;
|
|
};
|
|
}
|