Skip to content

Commit

Permalink
[Backport release-24.05] uwsm: 0.17.0 -> 0.18.2 (#337999)
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnRTitor authored Aug 29, 2024
2 parents ce07736 + d9cb518 commit 27e85bd
Showing 1 changed file with 36 additions and 8 deletions.
44 changes: 36 additions & 8 deletions pkgs/by-name/uw/uwsm/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@
stdenv,
lib,
fetchFromGitHub,
makeBinaryWrapper,
meson,
ninja,
scdoc,
pkg-config,
nix-update-script,
bash,
dmenu,
libnotify,
newt,
python3Packages,
util-linux,
fumonSupport ? true,
Expand All @@ -24,29 +27,31 @@ let
in
stdenv.mkDerivation (finalAttrs: {
pname = "uwsm";
version = "0.17.0";
version = "0.18.2";

src = fetchFromGitHub {
owner = "Vladimir-csp";
repo = "uwsm";
rev = "refs/tags/v${finalAttrs.version}";
hash = "sha256-M2j7l5XTSS2IzaJofAHct1tuAO2A9Ps9mCgAWKEvzoE=";
hash = "sha256-/LmSc1AKNZ/VZ2rkUsOvwqpJmPgb6dThTtOu44BriQs=";
};

nativeBuildInputs = [
makeBinaryWrapper
meson
ninja
pkg-config
scdoc
];

buildInputs = [
libnotify
util-linux
propagatedBuildInputs = [
util-linux # waitpid
newt # whiptail
libnotify # notify
bash # sh
python
] ++ (lib.optionals uuctlSupport [ dmenu ]);

propagatedBuildInputs = [ python ];

mesonFlags = [
"--prefix=${placeholder "out"}"
(lib.mapAttrsToList lib.mesonEnable {
Expand All @@ -61,11 +66,34 @@ stdenv.mkDerivation (finalAttrs: {
updateScript = nix-update-script { };
};

postInstall =
let
wrapperArgs = ''
--prefix PATH : "${lib.makeBinPath finalAttrs.propagatedBuildInputs}"
'';
in
''
wrapProgram $out/bin/uwsm ${wrapperArgs}
${lib.optionalString uuctlSupport ''
wrapProgram $out/bin/uuctl ${wrapperArgs}
''}
${lib.optionalString uwsmAppSupport ''
wrapProgram $out/bin/uwsm-app ${wrapperArgs}
''}
${lib.optionalString fumonSupport ''
wrapProgram $out/bin/fumon ${wrapperArgs}
''}
'';

meta = {
description = "Universal wayland session manager";
homepage = "https://github.com/Vladimir-csp/uwsm";
mainProgram = "uwsm";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ johnrtitor ];
maintainers = with lib.maintainers; [
johnrtitor
kai-tub
];
platforms = lib.platforms.linux;
};
})

0 comments on commit 27e85bd

Please sign in to comment.