diff options
author | superherointj <5861043+superherointj@users.noreply.github.com> | 2022-04-07 11:56:46 -0300 |
---|---|---|
committer | superherointj <5861043+superherointj@users.noreply.github.com> | 2022-04-07 12:44:45 -0300 |
commit | 64f3350532071a9866d586ae369f76d988e8a111 (patch) | |
tree | f01852647faf81189dc4cced047753a4acfac996 /pkgs/tools/misc/cod | |
parent | 4da89993ed353d40fa7515f0cfffadc34ebb683c (diff) |
cod: fix tests
Co-authored-by: @jnetod @thiagokokada
Diffstat (limited to 'pkgs/tools/misc/cod')
-rw-r--r-- | pkgs/tools/misc/cod/default.nix | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/pkgs/tools/misc/cod/default.nix b/pkgs/tools/misc/cod/default.nix index 741487c668772..3c76e68b8947e 100644 --- a/pkgs/tools/misc/cod/default.nix +++ b/pkgs/tools/misc/cod/default.nix @@ -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"; |