Merge pull request #167724 from superherointj/package-cod-fix-tests

cod: fix tests
This commit is contained in:
Thiago Kenji Okada 2022-04-08 10:08:52 +01:00 committed by GitHub
commit 42948b3006
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,4 +1,4 @@
{ lib, fetchFromGitHub, buildGoModule }:
{ lib, fetchFromGitHub, buildGoModule, python3 }:
buildGoModule rec {
pname = "cod";
@ -15,7 +15,16 @@ buildGoModule rec {
ldflags = [ "-s" "-w" "-X main.GitSha=${src.rev}" ];
doCheck = false;
checkInputs = [ python3 ];
preCheck = ''
pushd test/binaries/
for f in *.py; do
patchShebangs ''$f
done
popd
export COD_TEST_BINARY="''${NIX_BUILD_TOP}/go/bin/cod"
'';
meta = with lib; {
description = "Tool for generating Bash/Fish/Zsh autocompletions based on `--help` output";