Skip to content

Commit

Permalink
flake.nix: update during the update script
Browse files Browse the repository at this point in the history
  • Loading branch information
philiptaron committed May 31, 2024
1 parent d1ab648 commit 5ce891b
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
19 changes: 18 additions & 1 deletion default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,23 @@ let
autoPrUpdate =
let
updateScripts = {
flake = pkgs.writeShellApplication {
name = "update-flake";
runtimeInputs = with pkgs; [
git
nix
];
text = ''
echo "<details><summary>flake.nix changes</summary>"
# Needed because GitHub's rendering of the first body line breaks down otherwise
echo ""
echo '```'
cd "$1"
nix flake update 2>&1
echo '```'
echo "</details>"
'';
};
npins = pkgs.writeShellApplication {
name = "update-npins";
runtimeInputs = with pkgs; [ npins ];
Expand All @@ -96,7 +113,7 @@ let
# Needed because GitHub's rendering of the first body line breaks down otherwise
echo ""
echo '```'
npins update --directory "$1/npins" 2>&1
npins --directory "$1/npins" import-flake 2>&1
echo '```'
echo "</details>"
'';
Expand Down
6 changes: 3 additions & 3 deletions flake.lock

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

0 comments on commit 5ce891b

Please sign in to comment.