Merge pull request 'Add missing runtime dependencies' (#4) from add-missing-runtime-dependencies into main

Reviewed-on: https://codeberg.org/svenvanheugten/git-check-assertions/pulls/4
This commit is contained in:
Sven van Heugten 2026-02-22 16:28:43 +01:00
commit 601a51109d

View file

@ -1,15 +1,19 @@
{
stdenv,
lib,
shellcheck-minimal,
git,
gnused,
bash,
bats,
shellcheck-minimal,
gitMinimal,
resholve,
}:
let
fs = lib.fileset;
in
stdenv.mkDerivation {
resholve.mkDerivation {
pname = "git-check-assertions";
version = "0.0.1";
@ -32,6 +36,7 @@ stdenv.mkDerivation {
];
checkPhase = ''
runHook preCheck
shellcheck git-check-assertions test.bats
git init
git config user.email test
@ -39,15 +44,32 @@ stdenv.mkDerivation {
git checkout -b main
git commit --allow-empty -m "initial"
./test.bats
runHook postCheck
'';
doCheck = true;
installPhase = ''
runHook preInstall
mkdir -p $out/bin
cp $src/git-check-assertions $out/bin/git-check-assertions
chmod +x $out/bin/git-check-assertions
runHook postInstall
'';
solutions.default = {
scripts = [ "bin/git-check-assertions" ];
interpreter = lib.getExe bash;
inputs = [
gitMinimal
gnused
bash
];
execer = [
# Not true at all, but ¯\_(ツ)_/¯
"cannot:${lib.getExe bash}"
"cannot:${lib.getExe gitMinimal}"
];
};
meta.mainProgram = "git-check-assertions";
}