Restructure flake

This commit is contained in:
outfoxxed 2023-04-28 00:01:26 -07:00
parent eb28e190f5
commit a21bba1ce1
No known key found for this signature in database
GPG key ID: 4C88A185FB89301E
2 changed files with 27 additions and 56 deletions

40
flake.lock generated
View file

@ -1,23 +1,5 @@
{ {
"nodes": { "nodes": {
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1681202837,
"narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "cfacdce06f30d2b68473a46042957675eebb3401",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"hyprland": { "hyprland": {
"inputs": { "inputs": {
"hyprland-protocols": "hyprland-protocols", "hyprland-protocols": "hyprland-protocols",
@ -78,27 +60,7 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"flake-utils": "flake-utils", "hyprland": "hyprland"
"hyprland": "hyprland",
"nixpkgs": [
"hyprland",
"nixpkgs"
]
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
} }
}, },
"wlroots": { "wlroots": {

View file

@ -1,37 +1,46 @@
{ {
inputs = { inputs = {
hyprland.url = "github:hyprwm/Hyprland"; hyprland.url = "github:hyprwm/Hyprland";
nixpkgs.follows = "hyprland/nixpkgs";
flake-utils.url = "github:numtide/flake-utils";
}; };
outputs = { nixpkgs, hyprland, flake-utils, ... }: outputs = { hyprland, ... }: let
flake-utils.lib.eachDefaultSystem (system: let inherit (hyprland.inputs) nixpkgs;
pkgs = import nixpkgs { inherit system; }; hyprlandSystems = fn: nixpkgs.lib.genAttrs (builtins.attrNames hyprland.packages) (system: fn system nixpkgs.legacyPackages.${system});
hyprland_pkg = hyprland.packages.${system}.hyprland; in rec {
in rec { packages = hyprlandSystems (system: pkgs: rec {
packages.default = pkgs.gcc12Stdenv.mkDerivation { hy3 = pkgs.gcc12Stdenv.mkDerivation {
pname = "hy3"; pname = "hy3";
version = "0.1"; version = "0.1";
src = ./.; src = ./.;
nativeBuildInputs = with pkgs; [ nativeBuildInputs = with pkgs; [ cmake pkg-config ];
hyprland_pkg.dev
cmake buildInputs = [
pkg-config hyprland.packages.${system}.hyprland.dev
] ++ hyprland_pkg.buildInputs; ] ++ hyprland.packages.${system}.hyprland.buildInputs;
meta = with pkgs.lib; {
homepage = "https://github.com/outfoxxed/hy3";
description = "Hyprland plugin for an i3 / sway like manual tiling layout";
license = licenses.gpl3;
platforms = platforms.linux;
};
}; };
devShells.default = pkgs.mkShell.override { stdenv = pkgs.gcc12Stdenv; } { default = hy3;
name = "hy3-shell"; });
devShells = hyprlandSystems (system: pkgs: {
default = pkgs.mkShell.override { stdenv = pkgs.gcc12Stdenv; } {
name = "hy3";
nativeBuildInputs = with pkgs; [ nativeBuildInputs = with pkgs; [
clang-tools_15 clang-tools_15
bear bear
]; ];
inputsFrom = [ packages.default ]; inputsFrom = [ packages.${system}.hy3 ];
}; };
}); });
};
} }