generated from Luis/nextjs-python-web-template
clan-config: move jsonschema lib to clanLib
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
# !/usr/bin/env python3
|
||||
import argparse
|
||||
import json
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
from pathlib import Path
|
||||
@@ -8,6 +9,8 @@ from typing import Any, Optional, Type, Union
|
||||
|
||||
from clan_cli.errors import ClanError
|
||||
|
||||
CLAN_FLAKE = os.getenv("CLAN_FLAKE")
|
||||
|
||||
|
||||
class Kwargs:
|
||||
def __init__(self) -> None:
|
||||
@@ -27,7 +30,7 @@ def schema_from_module_file(
|
||||
nix_expr = f"""
|
||||
let
|
||||
lib = import <nixpkgs/lib>;
|
||||
slib = import {__file__}/../schema-lib.nix {{inherit lib;}};
|
||||
slib = import {CLAN_FLAKE}/lib/jsonschema.nix {{inherit lib;}};
|
||||
in
|
||||
slib.parseModule {absolute_path}
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user