Diff
1diff --git a/flake.lock b/flake.lock
2index d4b4b80666b02503ecf661cd19cf18ab3e2c68a7..c8699520113bfe5c1d2e89b9afd501fe2fc4c070 100644
3--- a/flake.lock
4+++ b/flake.lock
5@@ -1,23 +1,5 @@
6 {
7 "nodes": {
8- "flake-utils": {
9- "inputs": {
10- "systems": "systems"
11- },
12- "locked": {
13- "lastModified": 1681202837,
14- "narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=",
15- "owner": "numtide",
16- "repo": "flake-utils",
17- "rev": "cfacdce06f30d2b68473a46042957675eebb3401",
18- "type": "github"
19- },
20- "original": {
21- "owner": "numtide",
22- "repo": "flake-utils",
23- "type": "github"
24- }
25- },
26 "hyprland": {
27 "inputs": {
28 "hyprland-protocols": "hyprland-protocols",
29@@ -78,27 +60,7 @@
30 },
31 "root": {
32 "inputs": {
33- "flake-utils": "flake-utils",
34- "hyprland": "hyprland",
35- "nixpkgs": [
36- "hyprland",
37- "nixpkgs"
38- ]
39- }
40- },
41- "systems": {
42- "locked": {
43- "lastModified": 1681028828,
44- "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
45- "owner": "nix-systems",
46- "repo": "default",
47- "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
48- "type": "github"
49- },
50- "original": {
51- "owner": "nix-systems",
52- "repo": "default",
53- "type": "github"
54+ "hyprland": "hyprland"
55 }
56 },
57 "wlroots": {
58diff --git a/flake.nix b/flake.nix
59index 2bff14396cc683816d5810b15f4eb905c3ac362f..211d01934206390410acff3250a61efb06403185 100644
60--- a/flake.nix
61+++ b/flake.nix
62@@ -1,37 +1,46 @@
63 {
64 inputs = {
65 hyprland.url = "github:hyprwm/Hyprland";
66- nixpkgs.follows = "hyprland/nixpkgs";
67- flake-utils.url = "github:numtide/flake-utils";
68 };
69
70- outputs = { nixpkgs, hyprland, flake-utils, ... }:
71- flake-utils.lib.eachDefaultSystem (system: let
72- pkgs = import nixpkgs { inherit system; };
73- hyprland_pkg = hyprland.packages.${system}.hyprland;
74- in rec {
75- packages.default = pkgs.gcc12Stdenv.mkDerivation {
76+ outputs = { hyprland, ... }: let
77+ inherit (hyprland.inputs) nixpkgs;
78+ hyprlandSystems = fn: nixpkgs.lib.genAttrs (builtins.attrNames hyprland.packages) (system: fn system nixpkgs.legacyPackages.${system});
79+ in rec {
80+ packages = hyprlandSystems (system: pkgs: rec {
81+ hy3 = pkgs.gcc12Stdenv.mkDerivation {
82 pname = "hy3";
83 version = "0.1";
84-
85 src = ./.;
86
87- nativeBuildInputs = with pkgs; [
88- hyprland_pkg.dev
89- cmake
90- pkg-config
91- ] ++ hyprland_pkg.buildInputs;
92+ nativeBuildInputs = with pkgs; [ cmake pkg-config ];
93+
94+ buildInputs = [
95+ hyprland.packages.${system}.hyprland.dev
96+ ] ++ hyprland.packages.${system}.hyprland.buildInputs;
97+
98+ meta = with pkgs.lib; {
99+ homepage = "https://github.com/outfoxxed/hy3";
100+ description = "Hyprland plugin for an i3 / sway like manual tiling layout";
101+ license = licenses.gpl3;
102+ platforms = platforms.linux;
103+ };
104 };
105
106- devShells.default = pkgs.mkShell.override { stdenv = pkgs.gcc12Stdenv; } {
107- name = "hy3-shell";
108+ default = hy3;
109+ });
110+
111+ devShells = hyprlandSystems (system: pkgs: {
112+ default = pkgs.mkShell.override { stdenv = pkgs.gcc12Stdenv; } {
113+ name = "hy3";
114
115 nativeBuildInputs = with pkgs; [
116 clang-tools_15
117 bear
118 ];
119
120- inputsFrom = [ packages.default ];
121+ inputsFrom = [ packages.${system}.hy3 ];
122 };
123 });
124+ };
125 }