Fix Nix Flake (#50)
* Override correct sway package * Update README.md * Remove unnecessary overlay * Improved shell
This commit is contained in:
parent
fa6164f8fb
commit
0cd40fed13
|
@ -25,10 +25,11 @@ Sway is an incredible window manager, and certainly one of the most well establi
|
||||||
|
|
||||||
### Nix
|
### 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:
|
You can also bring up a development shell and follow the build instructions below, without installing all of the dependencies manually:
|
||||||
|
|
46
flake.nix
46
flake.nix
|
@ -12,6 +12,8 @@
|
||||||
|
|
||||||
outputs = { self, nixpkgs, flake-compat, ... }:
|
outputs = { self, nixpkgs, flake-compat, ... }:
|
||||||
let
|
let
|
||||||
|
inherit (nixpkgs) lib;
|
||||||
|
|
||||||
pkgsFor = system:
|
pkgsFor = system:
|
||||||
import nixpkgs {
|
import nixpkgs {
|
||||||
inherit system;
|
inherit system;
|
||||||
|
@ -21,25 +23,21 @@
|
||||||
targetSystems = [ "aarch64-linux" "x86_64-linux" ];
|
targetSystems = [ "aarch64-linux" "x86_64-linux" ];
|
||||||
in {
|
in {
|
||||||
overlays.default = final: prev: {
|
overlays.default = final: prev: {
|
||||||
swayfx = prev.sway.overrideAttrs (old: {
|
swayfx-unwrapped = prev.sway-unwrapped.overrideAttrs
|
||||||
version = "999-master";
|
(old: { src = builtins.path { path = prev.lib.cleanSource ./.; }; });
|
||||||
src = builtins.path {
|
|
||||||
name = "swayfx";
|
|
||||||
path = prev.lib.cleanSource ./.;
|
|
||||||
};
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
packages = nixpkgs.lib.genAttrs targetSystems (system:
|
packages = nixpkgs.lib.genAttrs targetSystems (system:
|
||||||
let pkgs = pkgsFor system;
|
let pkgs = pkgsFor system;
|
||||||
in (self.overlays.default pkgs pkgs) // {
|
in (self.overlays.default pkgs pkgs) // {
|
||||||
default = self.packages.${system}.swayfx;
|
default = self.packages.${system}.swayfx-unwrapped;
|
||||||
});
|
});
|
||||||
|
|
||||||
devShells = nixpkgs.lib.genAttrs targetSystems (system:
|
devShells = nixpkgs.lib.genAttrs targetSystems (system:
|
||||||
let pkgs = pkgsFor system;
|
let pkgs = pkgsFor system;
|
||||||
in {
|
in {
|
||||||
default = pkgs.mkShell {
|
default = pkgs.mkShell {
|
||||||
|
name = "swayfx-shell";
|
||||||
depsBuildBuild = with pkgs; [ pkg-config ];
|
depsBuildBuild = with pkgs; [ pkg-config ];
|
||||||
|
|
||||||
nativeBuildInputs = with pkgs; [
|
nativeBuildInputs = with pkgs; [
|
||||||
|
@ -51,37 +49,7 @@
|
||||||
scdoc
|
scdoc
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = with pkgs; [
|
inputsFrom = [ self.packages.${system}.swayfx-unwrapped ];
|
||||||
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
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue