Skip to content

Commit

Permalink
add arion script to run arion commands and tidy up overlays default.nix
Browse files Browse the repository at this point in the history
  • Loading branch information
hughjfchen committed Apr 18, 2022
1 parent c18582b commit b7b510d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions fix-up/do.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ done <<< "$(find "$1/$2" -name "*project.pascal.name*" ! -wholename "$1/$2/.proj
[[ -f "$1/$2/develop" ]] && chmod +x "$1/$2/develop"
[[ -f "$1/$2/build" ]] && chmod +x "$1/$2/build"
[[ -f "$1/$2/deploy" ]] && chmod +x "$1/$2/deploy"
[[ -f "$1/$2/arion" ]] && chmod +x "$1/$2/arion"
find "$1/$2" -name "*.sh" -exec chmod +x {} \;
find "$1/$2" -name "*.bash" -exec chmod +x {} \;
find "$1/$2" -type d -name bin -exec chmod -R +x {} \;
Expand Down
2 changes: 2 additions & 0 deletions nixify.sh
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ case $3 in
cp "${quick_cook_nixify_tmp_dir}/$2/build" "$1/$2"
[ -f "$1/$2/deploy" ] && mv "$1/$2/deploy" "$1/$2/deploy.bak.by.nixify.$(date +%Y%m%d%H%M%S)"
cp "${quick_cook_nixify_tmp_dir}/$2/deploy" "$1/$2"
[ -f "$1/$2/arion" ] && mv "$1/$2/arion" "$1/$2/arion.bak.by.nixify.$(date +%Y%m%d%H%M%S)"
cp "${quick_cook_nixify_tmp_dir}/$2/arion" "$1/$2"
# for executables, we need to copy to override them after applying tempalte(Why?)
cp "${SCRIPT_ABS_PATH}"/deployment-framework/arion "$1/$2/cd/" && chmod +x "$1/$2/cd/arion"
mkdir -p "$1/$2/.github/workflows"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{name|toSnake}}_datadir=$(dirname "$0")/cd $(dirname "$0")/cd/arion "$@"
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
self: prev:
with prev.lib; mapAttrs' (attr: _: { name = removeSuffix ".nix" attr; value = ./. + "/${attr}"; }) (filterAttrs (attr: _: attr != "default.nix" ) (builtins.readDir ./.))
self: prev: {
# sample pakage override
# xxxx = prev.xxxx.overrideAttrs (oldAttr: rec { buildInputs = prev.xxxx.buildInputs ++ [ self.openssl ]; });
}

0 comments on commit b7b510d

Please sign in to comment.