diff --git a/bin/go-coverage.sh b/bin/go-coverage.sh deleted file mode 100755 index 405ffb6947f23991b925222f6477616c67c68423..0000000000000000000000000000000000000000 --- a/bin/go-coverage.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/bash -# -# Code coverage generation - -COVERAGE_DIR="${1}" -REPORT_DIR="${2}" -TYPE="${3}" - -cd "$COVERAGE_DIR" || exit 1 -PKG_LIST=$(go list ./... | grep -v /vendor/) - -# Create the coverage files directory -mkdir -p "$REPORT_DIR"; - -# Create a coverage file for each package -for package in ${PKG_LIST}; do - go test -covermode=count -coverprofile "${REPORT_DIR}/${package##*/}.cov" "$package" ; -done ; - -# Merge the coverage profile files -echo 'mode: count' > "${REPORT_DIR}"/coverage.cov ; -tail -q -n +2 "${REPORT_DIR}"/*.cov >> "${REPORT_DIR}"/coverage.cov ; - -# Display the global code coverage -go tool cover -func="${REPORT_DIR}"/coverage.cov ; - -# If needed, generate HTML report -if [ "$TYPE" == "html" ]; then - go tool cover -html="${REPORT_DIR}"/coverage.cov -o "${REPORT_DIR}/"coverage.html ; -fi - -rm -rf ${REPORT_DIR}"/"*.cov - -# Remove the coverage files directory -cd - || exit 1 diff --git a/devenv.nix b/devenv.nix index b355e8cd654b405e7d678fface5c080ab4351718..822d72be296959c9390a660e499d23bf467ad3e1 100644 --- a/devenv.nix +++ b/devenv.nix @@ -3,8 +3,6 @@ { - - env.LD_LIBRARY_PATH = lib.makeLibraryPath [ ]; env.APP_NAME = "bob"; # https://devenv.sh/packages/ @@ -81,6 +79,10 @@ else buildDate=''$(version date) fi +if [[ -z "''${HOME}" ]]; then + HOME=$(pwd) +fi + ${config.devenv.root}/bin/go-compile.sh \ "${config.devenv.root}/source/" \ "${config.devenv.root}/dist"/ \ diff --git a/flake.nix b/flake.nix index 7648996c6ef6762d4899ffb7d73d64fb4c85d9f7..c5296dc78c69d668f00b9c900d2d951a56b76e14 100644 --- a/flake.nix +++ b/flake.nix @@ -31,7 +31,7 @@ in { bob = pkgs.buildGoModule { - pname = "bob"; + name = "bob"; # In 'nix develop', we don't need a copy of the source tree # in the Nix store. src = ././source;