feat: add package to exclude gitignored hooks

tools like renovate can run soonix:update after updating stuff, but the
gitignored hooks cannot be committed anyways, so why bother building
them
This commit is contained in:
technofab 2026-01-01 15:56:25 +01:00
parent 56f281eea4
commit 87399d28fe
Signed by: technofab
SSH key fingerprint: SHA256:bV4h88OqS/AxjbPn66uUdvK9JsgIW4tv3vwJQ8tpMqQ
2 changed files with 116 additions and 78 deletions

View file

@ -69,6 +69,28 @@ in {
assert_file_contains ${shellHook} "gomplate"
'';
}
{
name = "packages";
type = "script";
script = let
conf = (soonix.make {inherit hooks;}).config;
baseBin = conf.packages."soonix:update" + "/bin/soonix:update";
exclBin = conf.packages."soonix:update:excludegitignore" + "/bin/soonix:update";
in
# sh
''
${ntlib.helpers.path [pkgs.gnugrep]}
${ntlib.helpers.scriptHelpers}
assert -f "${baseBin}" "should exist"
assert -f "${exclBin}" "should exist"
assert_file_contains "${baseBin}" "gotmpl"
assert_file_contains "${baseBin}" "test.json"
assert_file_not_contains "${exclBin}" "gotmpl"
assert_file_contains "${exclBin}" "test.json"
'';
}
];
};
}