71 lines
1.7 KiB
Nix
71 lines
1.7 KiB
Nix
{
|
|
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
|
|
'';
|
|
};
|
|
}
|
|
);
|
|
}
|