diff options
author | Gokul Swaminathan <[email protected]> | 2022-11-16 08:24:00 -0800 |
---|---|---|
committer | GitHub <[email protected]> | 2022-11-16 11:24:00 -0500 |
commit | 0cd40fed1370633cd38d2149e59bb7ba201e0d38 (patch) | |
tree | 8a22da18a97d4a7f0c74bbcc28730714c05b6f49 | |
parent | fa6164f8fb067498de8d97cbd41646b8d0e37635 (diff) |
Fix Nix Flake (#50)
* Override correct sway package
* Update README.md
* Remove unnecessary overlay
* Improved shell
-rw-r--r-- | README.md | 5 | ||||
-rw-r--r-- | flake.nix | 46 |
2 files changed, 10 insertions, 41 deletions
@@ -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: @@ -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 ]; }; }); }; |