Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

outputs = { self, nixpkgs }:
let
inherit (nixpkgs.lib) genAttrs optional;
inherit (nixpkgs.lib) genAttrs optionals optionalString;
eachSystem = f: genAttrs
[
"aarch64-darwin"
Expand All @@ -23,12 +23,10 @@
name = "minegrub-theme";
src = "${self}";

buildInputs = with pkgs; optional customSplash
Comment thread
Squamto marked this conversation as resolved.
[
fastfetch
(python3.withPackages
(p: [ p.pillow ]))
];
buildInputs = with pkgs; optionals customSplash [
fastfetch
(python3.withPackages (p: [ p.pillow ]))
];

patchPhase = ''
sed -i '$d' minegrub/update_theme.py
Expand All @@ -37,7 +35,7 @@
sed -i '/^+ image {/,/^}$/s/top = 40%+[0-9]\+/top = 40%+'"$top_value"'/' minegrub/theme.txt
'';

buildPhase = optional customSplash ''
Comment thread
Squamto marked this conversation as resolved.
buildPhase = optionalString customSplash ''
python minegrub/update_theme.py "${background}" "${splash}"
'';

Expand Down