mirror of
https://gitlab.com/TECHNOFAB/soonix.git
synced 2026-02-02 15:25:05 +01:00
Compare commits
1 commit
bfe628020c
...
880ebb6e42
| Author | SHA1 | Date | |
|---|---|---|---|
| 880ebb6e42 |
1 changed files with 62 additions and 60 deletions
|
|
@ -4,7 +4,7 @@
|
|||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) types mkOption concatMapStringsSep mapAttrsToList;
|
||||
inherit (lib) types mkOption concatMapStringsSep;
|
||||
soonix_lib = import ./. {inherit pkgs;};
|
||||
inherit (soonix_lib) engines buildAllFiles;
|
||||
in {
|
||||
|
|
@ -253,7 +253,6 @@ in {
|
|||
builtins.addErrorContext "[soonix] while generating shell hook"
|
||||
# sh
|
||||
''
|
||||
function _soonix() {
|
||||
CHECK_MODE=''${CHECK_MODE:-false}
|
||||
SKIP_GITIGNORE=''${SKIP_GITIGNORE:-false}
|
||||
|
||||
|
|
@ -314,13 +313,10 @@ in {
|
|||
if [[ $status -ne 0 ]]; then
|
||||
exit $status
|
||||
fi
|
||||
}
|
||||
_soonix
|
||||
unset _soonix
|
||||
'';
|
||||
|
||||
allFiles =
|
||||
mapAttrsToList (name: hook: {
|
||||
lib.mapAttrsToList (name: hook: {
|
||||
src = hook.generatedDerivation;
|
||||
path = hook.output;
|
||||
})
|
||||
|
|
@ -419,12 +415,18 @@ in {
|
|||
'') (builtins.attrNames hooks)}
|
||||
;;
|
||||
update)
|
||||
function _soonix() {
|
||||
${generateShellHook}
|
||||
}
|
||||
_soonix
|
||||
;;
|
||||
check)
|
||||
CHECK_MODE=true
|
||||
echo "Checking files..."
|
||||
function _soonix() {
|
||||
${generateShellHook}
|
||||
}
|
||||
_soonix
|
||||
;;
|
||||
esac
|
||||
'';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue