From ad1966a2b618473175bdc654b3c54dc19cb2fc44 Mon Sep 17 00:00:00 2001 From: jacekpoz Date: Sun, 16 Jul 2023 20:45:07 +0200 Subject: [PATCH] add flake --- flake.nix | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 flake.nix diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..dbda974 --- /dev/null +++ b/flake.nix @@ -0,0 +1,48 @@ +{ + inputs = { + hyprland.url = "github:hyprwm/Hyprland"; + }; + + outputs = { self, hyprland, ... }: let + inherit (hyprland.inputs) nixpkgs; + hyprlandSystems = fn: nixpkgs.lib.genAttrs (builtins.attrNames hyprland.packages) (system: fn system nixpkgs.legacyPackages.${system}); + in { + packages = hyprlandSystems (system: pkgs: rec { + split-monitor-workspaces = pkgs.stdenv.mkDerivation { + pname = "split-monitor-workspaces"; + version = "0.1"; + src = ./src; + + nativeBuildInputs = with pkgs; [ meson pkg-config ]; + + buildInputs = with pkgs; [ + hyprland.packages.${system}.hyprland.dev + pango + cairo + ] ++ hyprland.packages.${system}.hyprland.buildInputs; + + meta = with pkgs.lib; { + homepage = "https://github.com/Duckonaut/split-monitor-workspaces"; + description = "A small Hyprland plugin to provide awesome-like workspace behavior"; + license = licenses.bsd3; + platforms = platforms.linux; + }; + }; + + default = split-monitor-workspaces; + }); + + devShells = hyprlandSystems (system: pkgs: { + default = pkgs.mkShell { + name = "split-monitor-workspaces"; + + nativeBuildInputs = with pkgs; [ + clang-tools_16 + bear + ]; + + inputsFrom = [ self.packages.${system}.split-monitor-workspaces ]; + }; + }); + }; +}