mirror of
https://github.com/Trensa-Organization/hy3.git
synced 2025-03-15 18:53:40 +01:00
Restructure flake
This commit is contained in:
parent
eb28e190f5
commit
a21bba1ce1
2 changed files with 27 additions and 56 deletions
40
flake.lock
generated
40
flake.lock
generated
|
@ -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": {
|
||||
|
|
43
flake.nix
43
flake.nix
|
@ -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 ];
|
||||
};
|
||||
});
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue