Skip to content

Commit

Permalink
ci: Add release flake output
Browse files Browse the repository at this point in the history
  • Loading branch information
max-ishere committed Dec 2, 2024
1 parent 396f9ce commit ddb50e7
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 18 deletions.
12 changes: 12 additions & 0 deletions ci/release.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
linkFarmFromDrvs,
lib,
grubshin-bootpact,
}: let
collect = lib.flip lib.mapAttrsToList;

resolutionsList = _: builtins.attrValues;
layoutsList = _: layout: lib.flatten (collect layout resolutionsList);
colorschemesList = colorschemes: lib.flatten (collect colorschemes layoutsList);
in
linkFarmFromDrvs "release" (colorschemesList grubshin-bootpact)
19 changes: 9 additions & 10 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@
grubTheme = grubTheme.lib;
};

# Internal CI build stuff
_ci = {
release = pkgs.callPackage ./ci/release.nix {grubshin-bootpact = lib.filterAttrs (name: _: !(name == "override" || name == "overrideDerivation")) self.packages.${system};};
};

devShells.${system} = {
default = pkgs.mkShell {
buildInputs = with pkgs; [
Expand Down
3 changes: 2 additions & 1 deletion nix/layout/classic/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
component,
grubTheme,
colors,
colorscheme,
}: let
inherit (grubTheme) mkComponent;
resoltions = import ./resolutions {inherit hywenhei-extended-font;};
Expand All @@ -17,7 +18,7 @@ in
}: let
layout = import ./layout.nix {inherit grubTheme lib logo line elements fonts;};
in
component.bundleThemeTxtAssets "classic-${resolution}"
component.bundleThemeTxtAssets "classic-${colorscheme}-${resolution}"
({
image,
font,
Expand Down
9 changes: 5 additions & 4 deletions nix/layout/default.nix
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
hywenhei-extended-font,
lib,
component,
grubTheme,
component,
colors,
hywenhei-extended-font,
colorscheme,
}: let
in {
classic = import ./classic {inherit lib hywenhei-extended-font component grubTheme colors;};
teleport = import ./teleport {inherit lib hywenhei-extended-font component grubTheme colors;};
classic = import ./classic {inherit lib hywenhei-extended-font component grubTheme colors colorscheme;};
teleport = import ./teleport {inherit lib hywenhei-extended-font component grubTheme colors colorscheme;};
}
3 changes: 2 additions & 1 deletion nix/layout/teleport/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
grubTheme,
component,
colors,
colorscheme,
}: let
inherit (grubTheme) mkComponent irel;
resoltions = import ./resolutions {inherit hywenhei-extended-font;};
Expand All @@ -16,7 +17,7 @@ in
}: let
layout = import ./layout.nix {inherit grubTheme lib line menu elements fonts;};
in
component.bundleThemeTxtAssets "teleport-${resolution}"
component.bundleThemeTxtAssets "teleport-${colorscheme}-${resolution}"
({
image,
font,
Expand Down
4 changes: 2 additions & 2 deletions nix/theme.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@
grubTheme,
hywenhei-extended-font,
}:
builtins.mapAttrs (_: colors: let
builtins.mapAttrs (colorscheme: colors: let
svg = import ./svg {inherit stdenv runCommand lib resvg colors writeText;};
component = import ./component {
inherit stdenv runCommand lib grub2 colors svg grubTheme;
};
in {
inherit svg component;
layout = import ./layout {
inherit lib component grubTheme colors hywenhei-extended-font;
inherit lib component grubTheme colors hywenhei-extended-font colorscheme;
};
})
(import ./colorschemes.nix)

0 comments on commit ddb50e7

Please sign in to comment.