From 8154948c995bea075315d1702b604f56f22ab812 Mon Sep 17 00:00:00 2001 From: John Titor <50095635+JohnRTitor@users.noreply.github.com> Date: Tue, 30 Jul 2024 00:11:11 +0530 Subject: [PATCH] uwsm: use the package from nixpkgs --- flake.lock | 33 ++++++----- modules-overlays/default.nix | 2 +- modules-overlays/uwsm/module.nix | 2 +- modules-overlays/uwsm/package.nix | 99 ------------------------------- 4 files changed, 19 insertions(+), 117 deletions(-) delete mode 100644 modules-overlays/uwsm/package.nix diff --git a/flake.lock b/flake.lock index c138e433..245f749a 100644 --- a/flake.lock +++ b/flake.lock @@ -144,11 +144,11 @@ "yafas": "yafas" }, "locked": { - "lastModified": 1722198001, - "narHash": "sha256-CC+hi1esCjv26J+Zryr+j5Vz2azEgS2lGIETEEnkI2o=", + "lastModified": 1722269440, + "narHash": "sha256-eUzqnxgHIfxGcXk0SwXwP011uQ41WOEHX+gg1uPSkcE=", "owner": "chaotic-cx", "repo": "nyx", - "rev": "50e805f8d8255795063d8b0833590e5e05723fc9", + "rev": "a383380ec33f66ef92c4e815260271f6ad7cf286", "type": "github" }, "original": { @@ -223,11 +223,11 @@ "pre-commit-hooks": "pre-commit-hooks" }, "locked": { - "lastModified": 1722198644, - "narHash": "sha256-n3nsLWmDBnIbn24ltoy+UY+QF4gU8mlmM0PYyHFHNYM=", + "lastModified": 1722262342, + "narHash": "sha256-bKNPr3GVhV7DgkEWyNxG0vM1ZJq/SAlrRA8TNs+rrbk=", "owner": "cachix", "repo": "devenv", - "rev": "50da41db0ec7d3fb2ca415bd467f4f63613970dd", + "rev": "11a1ca0ad80bc172d2efda34ae542494442dcf48", "type": "github" }, "original": { @@ -759,11 +759,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1722203795, - "narHash": "sha256-Ml3cL8ayTGozjo8QW08J7jEPIRMWtQmdW1Y44pb2SYQ=", + "lastModified": 1722274148, + "narHash": "sha256-Hw4QoNWBI1aMbohZOt7azFgDnk7QCRj6YS25M+fLJpM=", "ref": "refs/heads/main", - "rev": "a9d87bd6669568741704de08b6f0328a92e29396", - "revCount": 5009, + "rev": "e67322034037fef22079c8e480be38c1d04b5a4a", + "revCount": 5019, "submodules": true, "type": "git", "url": "https://github.com/hyprwm/Hyprland" @@ -1334,11 +1334,11 @@ }, "nixpkgs-edge": { "locked": { - "lastModified": 1722222016, - "narHash": "sha256-nVcJtGafOWCHdkZDXYPtaEGG8VMoAVkgfR4yEGJhVbU=", + "lastModified": 1722276795, + "narHash": "sha256-i/BLJ1P7C21o1qqqMdwr+ndec8hQxY8dsoBSI/yxFNY=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "9f10e6770d6f7a79e5170e235f582eb3319a574e", + "rev": "884687b1a7309e57fa43c6fc2147d52d8de5ad3d", "type": "github" }, "original": { @@ -1476,11 +1476,11 @@ }, "nur": { "locked": { - "lastModified": 1722221352, - "narHash": "sha256-wE77bI4c4GfHTNcyluxWrA4A9BDYhFC4wW7hdFQ7Ycg=", + "lastModified": 1722271248, + "narHash": "sha256-XC0/FK/g99kwaEoKFl5oKzZLD2QUPqGFw324Uuglu6I=", "owner": "nix-community", "repo": "NUR", - "rev": "021b38de49f8678496e9286e87fa46dd23ab3d84", + "rev": "4c26db6e1e9dd449c408364307cc017ae82214f1", "type": "github" }, "original": { @@ -1991,6 +1991,7 @@ "locked": { "lastModified": 1721941848, "narHash": "sha256-lGlmkog3Kmu9FIS1nq1YErkBsVlgunTA17wQx4aF/PQ=", + "ref": "refs/heads/dev", "rev": "59bfc2af698f85f3ae2e497a015efc90c9f174df", "revCount": 1008, "type": "git", diff --git a/modules-overlays/default.nix b/modules-overlays/default.nix index f4ca9d0c..f8ce0e16 100644 --- a/modules-overlays/default.nix +++ b/modules-overlays/default.nix @@ -17,5 +17,5 @@ ]; programs.uwsm.enable = true; - programs.uwsm.package = pkgs.callPackage ./uwsm/package.nix { }; + programs.uwsm.package = pkgs-edge.uwsm; } diff --git a/modules-overlays/uwsm/module.nix b/modules-overlays/uwsm/module.nix index 322a43d5..13abefe4 100644 --- a/modules-overlays/uwsm/module.nix +++ b/modules-overlays/uwsm/module.nix @@ -47,7 +47,7 @@ in (pkgs.callPackage ./uwsm-wm-wrapper.nix { uwsm = cfg.finalPackage; wmName = "Hyprland"; - wmCmd = "hyprland"; + wmCmd = "/run/current-system/sw/bin/Hyprland"; }) ] ++ lib.optionals cfg.swaySupport [ (pkgs.callPackage ./uwsm-wm-wrapper.nix { diff --git a/modules-overlays/uwsm/package.nix b/modules-overlays/uwsm/package.nix deleted file mode 100644 index afb8b5af..00000000 --- a/modules-overlays/uwsm/package.nix +++ /dev/null @@ -1,99 +0,0 @@ -{ - stdenv, - lib, - fetchFromGitHub, - makeBinaryWrapper, - meson, - ninja, - scdoc, - pkg-config, - nix-update-script, - bash, - dmenu, - libnotify, - newt, - python3Packages, - util-linux, - fumonSupport ? true, - uuctlSupport ? true, - uwsmAppSupport ? true, - hyprlandSupport ? false, - swaySupport ? false, - hyprland, - sway, -}: -let - python = python3Packages.python.withPackages (ps: [ - ps.pydbus - ps.dbus-python - ps.pyxdg - ]); -in -stdenv.mkDerivation (finalAttrs: { - pname = "uwsm"; - version = "0.17.0"; - - src = fetchFromGitHub { - owner = "Vladimir-csp"; - repo = "uwsm"; - rev = "refs/tags/v${finalAttrs.version}"; - hash = "sha256-M2j7l5XTSS2IzaJofAHct1tuAO2A9Ps9mCgAWKEvzoE="; - }; - - patches = [ ./uwsm-path.patch ]; - - nativeBuildInputs = [ - makeBinaryWrapper - meson - ninja - pkg-config - scdoc - ]; - - propagatedBuildInputs = [ - util-linux # waitpid - newt # whiptail - dmenu # for uuctl - libnotify # notify - bash # sh - python - ]; - - mesonFlags = [ - "--prefix=${placeholder "out"}" - (lib.mapAttrsToList lib.mesonEnable { - "uwsm-app" = uwsmAppSupport; - "fumon" = fumonSupport; - "uuctl" = uuctlSupport; - "man-pages" = true; - }) - ]; - - passthru = { - updateScript = nix-update-script { }; - }; - - postInstall = '' - wrapProgram $out/bin/uwsm \ - --prefix PATH : ${ - lib.makeBinPath ( - finalAttrs.propagatedBuildInputs - ++ (lib.optional hyprlandSupport hyprland) - ++ (lib.optional swaySupport sway) - ) - } - ${lib.optionalString uuctlSupport '' - wrapProgram $out/bin/uuctl \ - --prefix PATH : ${lib.makeBinPath finalAttrs.propagatedBuildInputs} - ''} - ''; - - meta = { - description = "Universal wayland session manager"; - homepage = "https://github.com/Vladimir-csp/uwsm"; - mainProgram = "uwsm"; - license = lib.licenses.mit; - maintainers = with lib.maintainers; [ johnrtitor ]; - platforms = lib.platforms.linux; - }; -})