diff options
author | Gokul Swaminathan <[email protected]> | 2022-11-22 11:24:38 -0800 |
---|---|---|
committer | GitHub <[email protected]> | 2022-11-22 14:24:38 -0500 |
commit | d27c346b9e28d9748985ac54e960b650017f720a (patch) | |
tree | e3fc48645580960c1c9abf2a429bd34a8ca5a58f /flake.nix | |
parent | 46378d4b69b131da97fa98f562fb06b4d70b5d7e (diff) |
Added flake support for wlroots subproject (#60)
Diffstat (limited to 'flake.nix')
-rw-r--r-- | flake.nix | 18 |
1 files changed, 12 insertions, 6 deletions
@@ -12,8 +12,6 @@ outputs = { self, nixpkgs, flake-compat, ... }: let - inherit (nixpkgs) lib; - pkgsFor = system: import nixpkgs { inherit system; @@ -21,7 +19,8 @@ }; targetSystems = [ "aarch64-linux" "x86_64-linux" ]; - in { + in + { overlays.default = final: prev: { swayfx-unwrapped = prev.sway-unwrapped.overrideAttrs (old: { src = builtins.path { path = prev.lib.cleanSource ./.; }; }); @@ -34,11 +33,14 @@ }); devShells = nixpkgs.lib.genAttrs targetSystems (system: - let pkgs = pkgsFor system; - in { + let + pkgs = pkgsFor system; + in + { default = pkgs.mkShell { name = "swayfx-shell"; depsBuildBuild = with pkgs; [ pkg-config ]; + inputsFrom = [ self.packages.${system}.swayfx-unwrapped pkgs.wlroots ]; nativeBuildInputs = with pkgs; [ cmake @@ -49,7 +51,11 @@ scdoc ]; - inputsFrom = [ self.packages.${system}.swayfx-unwrapped ]; + shellHook = with pkgs; ''( + mkdir -p "$PWD/subprojects" + cd "$PWD/subprojects" + cp -R --no-preserve=mode,ownership ${wlroots.src} wlroots + )''; }; }); }; |