From 7a72ff529725748457b7f814fcdb057bad2933f8 Mon Sep 17 00:00:00 2001 From: Johannes Kirschbauer Date: Thu, 10 Apr 2025 22:58:30 +0200 Subject: [PATCH] chore(clan/cli): remove explizit dependency on jsonschema converter. Regenerating the classes from json schema as part of the clan/cli is a bit redundant since we need to vendor the classes by hand anyways The user can also not practically override the inventory options I would disable this for now; until we really need it. We now solely rely on CI checks failing if the classes are out of sync --- pkgs/clan-cli/default.nix | 4 ---- pkgs/clan-cli/flake-module.nix | 7 ------- 2 files changed, 11 deletions(-) diff --git a/pkgs/clan-cli/default.nix b/pkgs/clan-cli/default.nix index 4f771e35b..90aeb9870 100644 --- a/pkgs/clan-cli/default.nix +++ b/pkgs/clan-cli/default.nix @@ -12,8 +12,6 @@ clan-core-path, nixpkgs, includedRuntimeDeps, - inventory-schema-abstract, - classgen, pythonRuntime, templateDerivation, }: @@ -59,8 +57,6 @@ let chmod -R +w $out ln -sf ${nixpkgs'} $out/clan_cli/nixpkgs cp -r ${../../templates} $out/clan_cli/templates - - ${classgen}/bin/classgen ${inventory-schema-abstract}/schema.json $out/clan_cli/inventory/classes.py ''; # Create a custom nixpkgs for use within the project diff --git a/pkgs/clan-cli/flake-module.nix b/pkgs/clan-cli/flake-module.nix index c3da9b750..cdd96d95b 100644 --- a/pkgs/clan-cli/flake-module.nix +++ b/pkgs/clan-cli/flake-module.nix @@ -133,8 +133,6 @@ packages = { clan-cli = pkgs.callPackage ./default.nix { inherit (inputs) nixpkgs; - inherit (self'.packages) classgen; - inherit (self'.legacyPackages.schemas) inventory-schema-abstract; templateDerivation = templateDerivation; pythonRuntime = pkgs.python3; clan-core-path = clanCoreWithVendoredDeps; @@ -145,8 +143,6 @@ }; clan-cli-full = pkgs.callPackage ./default.nix { inherit (inputs) nixpkgs; - inherit (self'.packages) classgen; - inherit (self'.legacyPackages.schemas) inventory-schema-abstract; clan-core-path = clanCoreWithVendoredDeps; templateDerivation = templateDerivation; pythonRuntime = pkgs.python3; @@ -163,8 +159,6 @@ ]; installPhase = '' - ${self'.packages.classgen}/bin/classgen ${self'.legacyPackages.schemas.inventory-schema-abstract}/schema.json ./clan_cli/inventory/classes.py - python docs.py reference mkdir -p $out cp -r out/* $out @@ -182,7 +176,6 @@ ]; installPhase = '' - ${self'.packages.classgen}/bin/classgen ${self'.legacyPackages.schemas.inventory-schema-abstract}/schema.json ./clan_cli/inventory/classes.py mkdir -p $out # Retrieve python API Typescript types python api.py > $out/API.json