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:
commit
601a51109d
1 changed files with 25 additions and 3 deletions
28
default.nix
28
default.nix
|
|
@ -1,15 +1,19 @@
|
||||||
{
|
{
|
||||||
stdenv,
|
stdenv,
|
||||||
lib,
|
lib,
|
||||||
shellcheck-minimal,
|
git,
|
||||||
|
gnused,
|
||||||
|
bash,
|
||||||
bats,
|
bats,
|
||||||
|
shellcheck-minimal,
|
||||||
gitMinimal,
|
gitMinimal,
|
||||||
|
resholve,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
fs = lib.fileset;
|
fs = lib.fileset;
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation {
|
resholve.mkDerivation {
|
||||||
pname = "git-check-assertions";
|
pname = "git-check-assertions";
|
||||||
version = "0.0.1";
|
version = "0.0.1";
|
||||||
|
|
||||||
|
|
@ -32,6 +36,7 @@ stdenv.mkDerivation {
|
||||||
];
|
];
|
||||||
|
|
||||||
checkPhase = ''
|
checkPhase = ''
|
||||||
|
runHook preCheck
|
||||||
shellcheck git-check-assertions test.bats
|
shellcheck git-check-assertions test.bats
|
||||||
git init
|
git init
|
||||||
git config user.email test
|
git config user.email test
|
||||||
|
|
@ -39,15 +44,32 @@ stdenv.mkDerivation {
|
||||||
git checkout -b main
|
git checkout -b main
|
||||||
git commit --allow-empty -m "initial"
|
git commit --allow-empty -m "initial"
|
||||||
./test.bats
|
./test.bats
|
||||||
|
runHook postCheck
|
||||||
'';
|
'';
|
||||||
|
|
||||||
doCheck = true;
|
doCheck = true;
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
cp $src/git-check-assertions $out/bin/git-check-assertions
|
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";
|
meta.mainProgram = "git-check-assertions";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue