Fix Nix Flake (#50)

* Override correct sway package

* Update README.md

* Remove unnecessary overlay

* Improved shell
This commit is contained in:
Gokul Swaminathan 2022-11-16 08:24:00 -08:00 committed by GitHub
parent fa6164f8fb
commit 0cd40fed13
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 41 deletions

View file

@ -25,10 +25,11 @@ Sway is an incredible window manager, and certainly one of the most well establi
### Nix
If you have Nix installed, you can run SwayFX with a single command:
If you have Nix installed, you can build and run SwayFX easily:
```
nix run github:WillPower3309/swayfx
nix build
./result/bin/sway
```
You can also bring up a development shell and follow the build instructions below, without installing all of the dependencies manually:

View file

@ -12,6 +12,8 @@
outputs = { self, nixpkgs, flake-compat, ... }:
let
inherit (nixpkgs) lib;
pkgsFor = system:
import nixpkgs {
inherit system;
@ -21,25 +23,21 @@
targetSystems = [ "aarch64-linux" "x86_64-linux" ];
in {
overlays.default = final: prev: {
swayfx = prev.sway.overrideAttrs (old: {
version = "999-master";
src = builtins.path {
name = "swayfx";
path = prev.lib.cleanSource ./.;
};
});
swayfx-unwrapped = prev.sway-unwrapped.overrideAttrs
(old: { src = builtins.path { path = prev.lib.cleanSource ./.; }; });
};
packages = nixpkgs.lib.genAttrs targetSystems (system:
let pkgs = pkgsFor system;
in (self.overlays.default pkgs pkgs) // {
default = self.packages.${system}.swayfx;
default = self.packages.${system}.swayfx-unwrapped;
});
devShells = nixpkgs.lib.genAttrs targetSystems (system:
let pkgs = pkgsFor system;
in {
default = pkgs.mkShell {
name = "swayfx-shell";
depsBuildBuild = with pkgs; [ pkg-config ];
nativeBuildInputs = with pkgs; [
@ -51,37 +49,7 @@
scdoc
];
buildInputs = with pkgs; [
wayland
libxkbcommon
pcre
json_c
libevdev
pango
cairo
libinput
libcap
pam
gdk-pixbuf
librsvg
wayland-protocols
libdrm
wlroots
dbus
xwayland
libGL
pixman
xorg.xcbutilwm
xorg.libX11
libcap
xorg.xcbutilimage
xorg.xcbutilerrors
mesa
libpng
ffmpeg
xorg.xcbutilrenderutil
seatd
];
inputsFrom = [ self.packages.${system}.swayfx-unwrapped ];
};
});
};