From ee2a3853eb126f32c2f92dc3ea10b5e41dc8af69 Mon Sep 17 00:00:00 2001 From: Gabriel Arazas Date: Sun, 21 Jan 2024 10:06:53 +0800 Subject: [PATCH] uwsm: init at 0.14.0 --- pkgs/default.nix | 1 + ...hore-add-build-backend-for-pyproject.patch | 30 +++++++++++ pkgs/uwsm/default.nix | 52 +++++++++++++++++++ 3 files changed, 83 insertions(+) create mode 100644 pkgs/uwsm/0001-chore-add-build-backend-for-pyproject.patch create mode 100644 pkgs/uwsm/default.nix diff --git a/pkgs/default.nix b/pkgs/default.nix index 942445b1..7240dcd4 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -34,6 +34,7 @@ let tic-80 = callPackage ./tic-80 { }; smile = callPackage ./smile { }; sessiond = callPackage ./sessiond { }; + uwsm = callPackage ./uwsm { }; vgc = qt6Packages.callPackage ./vgc { }; watc = callPackage ./watc { }; wzmach = callPackage ./wzmach { }; diff --git a/pkgs/uwsm/0001-chore-add-build-backend-for-pyproject.patch b/pkgs/uwsm/0001-chore-add-build-backend-for-pyproject.patch new file mode 100644 index 00000000..3a9259e7 --- /dev/null +++ b/pkgs/uwsm/0001-chore-add-build-backend-for-pyproject.patch @@ -0,0 +1,30 @@ +From 0f8ac87439450da38d5d590c4b9f094ba2572df7 Mon Sep 17 00:00:00 2001 +From: Gabriel Arazas +Date: Sun, 21 Jan 2024 08:54:17 +0800 +Subject: [PATCH] chore: add build backend for pyproject + +--- + pyproject.toml | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/pyproject.toml b/pyproject.toml +index 7de26ba..8263556 100644 +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -1,3 +1,13 @@ ++[build-system] ++requires = ["setuptools >= 61.0"] ++build-backend = "setuptools.build_meta" ++ ++[project] ++dependencies = [ ++ "pyxdg >= 0.28" ++ "dbus-python" ++] ++ + [tool.pyright] + pythonVersion = "3.10" + pythonPlatform = "Linux" +-- +2.42.0 + diff --git a/pkgs/uwsm/default.nix b/pkgs/uwsm/default.nix new file mode 100644 index 00000000..297011bf --- /dev/null +++ b/pkgs/uwsm/default.nix @@ -0,0 +1,52 @@ +{ lib +, python311Packages +, fetchFromGitHub +, meson +, ninja +, pkg-config + +# This is for substituting shebangs in its plugins. +, coreutils +}: + +python311Packages.buildPythonPackage rec { + pname = "uwsm"; + version = "0.14.0"; + format = "other"; + + src = fetchFromGitHub { + owner = "Vladimir-csp"; + repo = "uwsm"; + rev = "v${version}"; + hash = "sha256-n80FZ6rEguTN9ouEqI+bc5FOSeFQ8ynV+XDL2K/ZIxI="; + }; + + patches = [ + ./0001-chore-add-build-backend-for-pyproject.patch + ]; + + nativeBuildInputs = [ + meson + ninja + pkg-config + ]; + + propagatedBuildInputs = with python311Packages; [ + pyxdg + dbus-python + ]; + + postFixup = '' + substituteInPlace $out/share/uwsm/plugins/*.sh \ + --replace '/bin/false' '${lib.getExe' coreutils "false"}' + ''; + + meta = with lib; { + homepage = "https://github.com/Vladimir-csp/uwsm"; + description = "Session manager for standalone Wayland window managers."; + license = licenses.mit; + maintainers = with maintainers; [ foo-dogsquared ]; + mainProgram = "uwsm"; + platforms = platforms.linux; + }; +}