swayosd flake, better multihead
This commit is contained in:
parent
a45ac1792c
commit
7882fe6841
9 changed files with 266 additions and 68 deletions
71
flakes/swayosd/flake.nix
Normal file
71
flakes/swayosd/flake.nix
Normal file
|
@ -0,0 +1,71 @@
|
|||
{
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
|
||||
swayosd-src = {
|
||||
url = "github:ErikReider/SwayOSD";
|
||||
flake = false;
|
||||
};
|
||||
|
||||
rust-overlay.url = "github:oxalica/rust-overlay";
|
||||
};
|
||||
|
||||
outputs = inputs @ {
|
||||
self,
|
||||
nixpkgs,
|
||||
rust-overlay,
|
||||
flake-utils,
|
||||
...
|
||||
}:
|
||||
flake-utils.lib.eachDefaultSystem (
|
||||
system: let
|
||||
overlays = [(import rust-overlay)];
|
||||
pkgs = import nixpkgs {
|
||||
inherit system overlays;
|
||||
};
|
||||
in
|
||||
with pkgs; {
|
||||
packages.default = stdenv.mkDerivation {
|
||||
pname = "swayosd";
|
||||
version = "unstable-${inputs.swayosd-src.lastModifiedDate}";
|
||||
src = inputs.swayosd-src;
|
||||
|
||||
cargoDeps = rustPlatform.importCargoLock {
|
||||
lockFile = "${inputs.swayosd-src}/Cargo.lock";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
wrapGAppsHook
|
||||
pkg-config
|
||||
meson
|
||||
ninja
|
||||
glib
|
||||
sassc
|
||||
rustPlatform.cargoSetupHook
|
||||
(rust-bin.selectLatestNightlyWith (toolchain: toolchain.default))
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
gtk-layer-shell
|
||||
libevdev
|
||||
libinput
|
||||
libpulseaudio
|
||||
udev
|
||||
systemd
|
||||
];
|
||||
|
||||
patches = [
|
||||
./systemd.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace data/udev/99-swayosd.rules \
|
||||
--replace /bin/chgrp ${coreutils}/bin/chgrp \
|
||||
--replace /bin/chmod ${coreutils}/bin/chmod
|
||||
'';
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue