fix(nix): #291
This commit is contained in:
orangc
2024-10-01 10:17:30 +03:00
committed by GitHub
2 changed files with 38 additions and 44 deletions

12
flake.lock generated
View File

@@ -6,11 +6,11 @@
"systems": "systems" "systems": "systems"
}, },
"locked": { "locked": {
"lastModified": 1725841979, "lastModified": 1727303518,
"narHash": "sha256-SXYqzpHPuXFR6w/cUKo3VN8XRn6XA2mGbdRXs9oLk6k=", "narHash": "sha256-lO5JMynTxNZxg/+E4/Y9reeLGIz/M8cEue+Re4cP6qo=",
"owner": "Aylur", "owner": "Aylur",
"repo": "ags", "repo": "ags",
"rev": "aaef50bb2c80ef4b4a359329d72669a95e7c4796", "rev": "cd543afec4d9ed708990e5ba52184716809bf248",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -37,11 +37,11 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1726463316, "lastModified": 1727634051,
"narHash": "sha256-gI9kkaH0ZjakJOKrdjaI/VbaMEo9qBbSUl93DnU7f4c=", "narHash": "sha256-S5kVU7U82LfpEukbn/ihcyNt2+EvG7Z5unsKW9H/yFA=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "99dc8785f6a0adac95f5e2ab05cc2e1bf666d172", "rev": "06cf0e1da4208d3766d898b7fdab6513366d45b9",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@@ -2,31 +2,29 @@
description = "A Bar/Panel for Hyprland with extensive customizability."; description = "A Bar/Panel for Hyprland with extensive customizability.";
inputs = { inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
ags.url = "github:Aylur/ags"; ags.url = "github:Aylur/ags";
}; };
outputs = inputs: outputs = inputs: let
let systems = [
systems = [ "x86_64-linux"
"x86_64-linux" "x86_64-darwin"
"x86_64-darwin" "aarch64-darwin"
"aarch64-darwin" "aarch64-linux"
"aarch64-linux" ];
]; forEachSystem = inputs.nixpkgs.lib.genAttrs systems;
forEachSystem = inputs.nixpkgs.lib.genAttrs systems; pkgsFor = forEachSystem (
pkgsFor = forEachSystem ( system:
system:
import inputs.nixpkgs { import inputs.nixpkgs {
inherit system; inherit system;
config.allowUnfree = true; config.allowUnfree = true;
} }
); );
devShellFor = devShellFor = system:
system: inputs.nixpkgs.lib.genAttrs ["default"] (
inputs.nixpkgs.lib.genAttrs [ "default" ] ( _:
_:
inputs.nixpkgs.legacyPackages.${system}.mkShell { inputs.nixpkgs.legacyPackages.${system}.mkShell {
buildInputs = [ buildInputs = [
pkgsFor.${system}.esbuild pkgsFor.${system}.esbuild
@@ -59,26 +57,22 @@
export GI_TYPELIB_PATH=${pkgsFor.${system}.libgtop}/lib/girepository-1.0:${pkgsFor.${system}.glib}/lib/girepository-1.0:$GI_TYPELIB_PATH export GI_TYPELIB_PATH=${pkgsFor.${system}.libgtop}/lib/girepository-1.0:${pkgsFor.${system}.glib}/lib/girepository-1.0:$GI_TYPELIB_PATH
''; '';
} }
);
in
{
devShells = forEachSystem devShellFor;
overlay = final: prev: {
hyprpanel =
if final ? callPackage
then (final.callPackage ./nix { inherit inputs; }).desktop.script
else inputs.self.packages.${prev.stdenv.system}.default;
};
packages = forEachSystem (
system:
let
pkgs = pkgsFor.${system};
in
{
default = (pkgs.callPackage ./nix { inherit inputs; }).desktop.script;
}
); );
}; in {
} devShells = forEachSystem devShellFor;
overlay = final: prev: {
hyprpanel =
if final ? callPackage
then (final.callPackage ./nix {inherit inputs;}).desktop.script
else inputs.self.packages.${prev.stdenv.system}.default;
};
packages = forEachSystem (
system: let
pkgs = pkgsFor.${system};
in {
default = (pkgs.callPackage ./nix {inherit inputs;}).desktop.script;
}
);
};
}