clan config: re-enable clan config

This commit is contained in:
DavHau
2023-09-19 11:29:59 +02:00
parent 76ee9893f2
commit 9b6fafcb2d
7 changed files with 9 additions and 64 deletions

View File

@@ -22,9 +22,6 @@
, ui-assets
}:
let
# This provides dummy options for testing clan config and prevents it from
# evaluating the flake .#
CLAN_OPTIONS_FILE = ./clan_cli/config/jsonschema/options.json;
dependencies = [
argcomplete # optional dependency: if not enabled, shell completion will not work
@@ -54,9 +51,9 @@ let
'';
nixpkgs = runCommand "nixpkgs" { nativeBuildInputs = [ pkgs.nix ]; } ''
mkdir $out
mkdir -p $out/unfree
cat > $out/unfree/default.nix <<EOF
import "${pkgs.path}" { config = { allowUnfree = true; overlays = []; }; }
mkdir -p $out/unfree
cat > $out/unfree/default.nix <<EOF
import "${pkgs.path}" { config = { allowUnfree = true; overlays = []; }; }
EOF
cat > $out/flake.nix << EOF
{
@@ -81,8 +78,6 @@ python3.pkgs.buildPythonPackage {
src = source;
format = "pyproject";
inherit CLAN_OPTIONS_FILE;
nativeBuildInputs = [
setuptools
installShellFiles
@@ -93,12 +88,11 @@ python3.pkgs.buildPythonPackage {
{
nativeBuildInputs = [ age zerotierone bubblewrap sops nix openssh rsync stdenv.cc ];
} ''
export CLAN_OPTIONS_FILE="${CLAN_OPTIONS_FILE}"
cp -r ${source} ./src
chmod +w -R ./src
cd ./src
export NIX_STATE_DIR=$TMPDIR/nix IN_NIX_SANDBOX=1
export NIX_STATE_DIR=$TMPDIR/nix IN_NIX_SANDBOX=1
${checkPython}/bin/python -m pytest -m "not impure" -s ./tests
touch $out
'';