forked from clan/clan-core
Unset `CLAN_DIR` in the impure checks, so that it won't reference the users configuration. Fixes #1419
25 lines
657 B
Nix
25 lines
657 B
Nix
{
|
|
perSystem =
|
|
{ pkgs, lib, ... }:
|
|
{
|
|
# a script that executes all other checks
|
|
packages.impure-checks = pkgs.writeShellScriptBin "impure-checks" ''
|
|
#!${pkgs.bash}/bin/bash
|
|
set -euo pipefail
|
|
|
|
unset CLAN_DIR
|
|
|
|
export PATH="${
|
|
lib.makeBinPath [
|
|
pkgs.gitMinimal
|
|
pkgs.nix
|
|
pkgs.rsync # needed to have rsync installed on the dummy ssh server
|
|
]
|
|
}"
|
|
ROOT=$(git rev-parse --show-toplevel)
|
|
cd "$ROOT/pkgs/clan-cli"
|
|
nix develop "$ROOT#clan-cli" -c bash -c "TMPDIR=/tmp python -m pytest -s -m impure ./tests $@"
|
|
'';
|
|
};
|
|
}
|