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": {
"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": {
"inputs": {
"hyprland-protocols": "hyprland-protocols",
@ -78,27 +60,7 @@
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"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"
"hyprland": "hyprland"
}
},
"wlroots": {

View file

@ -1,37 +1,46 @@
{
inputs = {
hyprland.url = "github:hyprwm/Hyprland";
nixpkgs.follows = "hyprland/nixpkgs";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { nixpkgs, hyprland, flake-utils, ... }:
flake-utils.lib.eachDefaultSystem (system: let
pkgs = import nixpkgs { inherit system; };
hyprland_pkg = hyprland.packages.${system}.hyprland;
in rec {
packages.default = pkgs.gcc12Stdenv.mkDerivation {
outputs = { hyprland, ... }: let
inherit (hyprland.inputs) nixpkgs;
hyprlandSystems = fn: nixpkgs.lib.genAttrs (builtins.attrNames hyprland.packages) (system: fn system nixpkgs.legacyPackages.${system});
in rec {
packages = hyprlandSystems (system: pkgs: rec {
hy3 = pkgs.gcc12Stdenv.mkDerivation {
pname = "hy3";
version = "0.1";
src = ./.;
nativeBuildInputs = with pkgs; [
hyprland_pkg.dev
cmake
pkg-config
] ++ hyprland_pkg.buildInputs;
nativeBuildInputs = with pkgs; [ cmake pkg-config ];
buildInputs = [
hyprland.packages.${system}.hyprland.dev
] ++ 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; } {
name = "hy3-shell";
default = hy3;
});
devShells = hyprlandSystems (system: pkgs: {
default = pkgs.mkShell.override { stdenv = pkgs.gcc12Stdenv; } {
name = "hy3";
nativeBuildInputs = with pkgs; [
clang-tools_15
bear
];
inputsFrom = [ packages.default ];
inputsFrom = [ packages.${system}.hy3 ];
};
});
};
}