mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-17 19:21:04 +00:00
Merge pull request #330245 from JohnRTitor/uwsm
uwsm: 0.17.0 -> 0.17.2, fix paths and deps by wrapping the binaries
This commit is contained in:
commit
f4f322d142
|
@ -2,18 +2,25 @@
|
||||||
stdenv,
|
stdenv,
|
||||||
lib,
|
lib,
|
||||||
fetchFromGitHub,
|
fetchFromGitHub,
|
||||||
|
makeBinaryWrapper,
|
||||||
meson,
|
meson,
|
||||||
ninja,
|
ninja,
|
||||||
scdoc,
|
scdoc,
|
||||||
pkg-config,
|
pkg-config,
|
||||||
nix-update-script,
|
nix-update-script,
|
||||||
|
bash,
|
||||||
dmenu,
|
dmenu,
|
||||||
libnotify,
|
libnotify,
|
||||||
|
newt,
|
||||||
python3Packages,
|
python3Packages,
|
||||||
util-linux,
|
util-linux,
|
||||||
|
hyprland,
|
||||||
|
sway,
|
||||||
fumonSupport ? true,
|
fumonSupport ? true,
|
||||||
uuctlSupport ? true,
|
uuctlSupport ? true,
|
||||||
uwsmAppSupport ? true,
|
uwsmAppSupport ? true,
|
||||||
|
hyprlandSupport ? false,
|
||||||
|
swaySupport ? false,
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
python = python3Packages.python.withPackages (ps: [
|
python = python3Packages.python.withPackages (ps: [
|
||||||
|
@ -24,29 +31,31 @@ let
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation (finalAttrs: {
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
pname = "uwsm";
|
pname = "uwsm";
|
||||||
version = "0.17.0";
|
version = "0.17.2";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "Vladimir-csp";
|
owner = "Vladimir-csp";
|
||||||
repo = "uwsm";
|
repo = "uwsm";
|
||||||
rev = "refs/tags/v${finalAttrs.version}";
|
rev = "refs/tags/v${finalAttrs.version}";
|
||||||
hash = "sha256-M2j7l5XTSS2IzaJofAHct1tuAO2A9Ps9mCgAWKEvzoE=";
|
hash = "sha256-7RPz0VOUJ4fFhxNq+/s+/YEvy03XXgssggPn/JtOZI4=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
|
makeBinaryWrapper
|
||||||
meson
|
meson
|
||||||
ninja
|
ninja
|
||||||
pkg-config
|
pkg-config
|
||||||
scdoc
|
scdoc
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = [
|
propagatedBuildInputs = [
|
||||||
libnotify
|
util-linux # waitpid
|
||||||
util-linux
|
newt # whiptail
|
||||||
|
libnotify # notify
|
||||||
|
bash # sh
|
||||||
|
python
|
||||||
] ++ (lib.optionals uuctlSupport [ dmenu ]);
|
] ++ (lib.optionals uuctlSupport [ dmenu ]);
|
||||||
|
|
||||||
propagatedBuildInputs = [ python ];
|
|
||||||
|
|
||||||
mesonFlags = [
|
mesonFlags = [
|
||||||
"--prefix=${placeholder "out"}"
|
"--prefix=${placeholder "out"}"
|
||||||
(lib.mapAttrsToList lib.mesonEnable {
|
(lib.mapAttrsToList lib.mesonEnable {
|
||||||
|
@ -61,11 +70,41 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
updateScript = nix-update-script { };
|
updateScript = nix-update-script { };
|
||||||
};
|
};
|
||||||
|
|
||||||
|
postInstall =
|
||||||
|
let
|
||||||
|
wrapperArgs = ''
|
||||||
|
--prefix PATH : "${lib.makeBinPath finalAttrs.propagatedBuildInputs}" \
|
||||||
|
--suffix PATH : "${
|
||||||
|
lib.makeBinPath (
|
||||||
|
# uwsm as of 0.17.2 can load WMs like sway and hyprland by path
|
||||||
|
# but this is still needed as a fallback
|
||||||
|
lib.optionals hyprlandSupport [ hyprland ] ++ lib.optionals swaySupport [ sway ]
|
||||||
|
)
|
||||||
|
}"
|
||||||
|
'';
|
||||||
|
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 = {
|
meta = {
|
||||||
description = "Universal wayland session manager";
|
description = "Universal wayland session manager";
|
||||||
homepage = "https://github.com/Vladimir-csp/uwsm";
|
homepage = "https://github.com/Vladimir-csp/uwsm";
|
||||||
|
mainProgram = "uwsm";
|
||||||
license = lib.licenses.mit;
|
license = lib.licenses.mit;
|
||||||
maintainers = with lib.maintainers; [ johnrtitor ];
|
maintainers = with lib.maintainers; [
|
||||||
|
johnrtitor
|
||||||
|
kai-tub
|
||||||
|
];
|
||||||
platforms = lib.platforms.linux;
|
platforms = lib.platforms.linux;
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue