diff --git a/fix-up/do.sh b/fix-up/do.sh index e330ebb..6ac8946 100755 --- a/fix-up/do.sh +++ b/fix-up/do.sh @@ -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 {} \; diff --git a/nixify.sh b/nixify.sh index 562817c..718a07f 100755 --- a/nixify.sh +++ b/nixify.sh @@ -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" diff --git a/project-scaffold-template/nixos2111-ghc8107-haskell.nix/arion b/project-scaffold-template/nixos2111-ghc8107-haskell.nix/arion new file mode 100755 index 0000000..4921443 --- /dev/null +++ b/project-scaffold-template/nixos2111-ghc8107-haskell.nix/arion @@ -0,0 +1 @@ +{{name|toSnake}}_datadir=$(dirname "$0")/cd $(dirname "$0")/cd/arion "$@" diff --git a/project-scaffold-template/nixos2111-ghc8107-haskell.nix/nix/overlay/default.nix b/project-scaffold-template/nixos2111-ghc8107-haskell.nix/nix/overlay/default.nix index ab57fa6..48db4de 100644 --- a/project-scaffold-template/nixos2111-ghc8107-haskell.nix/nix/overlay/default.nix +++ b/project-scaffold-template/nixos2111-ghc8107-haskell.nix/nix/overlay/default.nix @@ -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 ]; }); +}