Skip to content

Commit

Permalink
installer: fix path to coreutils commands. (#40)
Browse files Browse the repository at this point in the history
Fixes mkdir, cat and ln not being accessible
by the installer script.
  • Loading branch information
gmodena authored Feb 10, 2024
1 parent 739d714 commit e1e0d27
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions modules/installer.nix
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ let
else "\${XDG_DATA_HOME:-$HOME/.local/share}/flatpak/overrides";
flatpakOverridesCmd = installation: {}: ''
# Update overrides that are managed by this module (both old and new)
mkdir -p ${overridesDir}
${pkgs.coreutils}/bin/mkdir -p ${overridesDir}
${pkgs.jq}/bin/jq -r -n \
--argjson old "$OLD_STATE" \
--argjson new "$NEW_STATE" \
Expand All @@ -57,7 +57,7 @@ let
# Transform the INI-like Flatpak overrides file into a workable JSON
if [[ -f $OVERRIDES_PATH ]]; then
ACTIVE=$(cat $OVERRIDES_PATH \
ACTIVE=$(${pkgs.coreutils}/bin/cat $OVERRIDES_PATH \
| ${pkgs.jc}/bin/jc --ini \
| ${pkgs.jq}/bin/jq 'map_values(map_values(split(";") | select(. != []) // ""))')
else
Expand Down Expand Up @@ -123,5 +123,5 @@ pkgs.writeShellScript "flatpak-managed-install" ''
${flatpakOverridesCmd installation {}}
# Save state
ln -sf ${stateFile} ${statePath}
${pkgs.coreutils}/bin/ln -sf ${stateFile} ${statePath}
''

0 comments on commit e1e0d27

Please sign in to comment.