From 166a2f795f81274e6b5b28c6169df54f9fce1d7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Wed, 27 Sep 2023 15:02:21 +0200 Subject: [PATCH 1/2] only pass experimental-features onces to nix-build --- pkgs/clan-cli/clan_cli/nix.py | 4 +--- pkgs/clan-cli/default.nix | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/pkgs/clan-cli/clan_cli/nix.py b/pkgs/clan-cli/clan_cli/nix.py index 84fd73d..2471833 100644 --- a/pkgs/clan-cli/clan_cli/nix.py +++ b/pkgs/clan-cli/clan_cli/nix.py @@ -8,7 +8,7 @@ from .dirs import nixpkgs_flake, nixpkgs_source def nix_command(flags: list[str]) -> list[str]: - return ["nix", "--experimental-features", "nix-command flakes"] + flags + return ["nix", "--extra-experimental-features", "nix-command flakes"] + flags def nix_build( @@ -20,8 +20,6 @@ def nix_build( "build", "--no-link", "--print-out-paths", - "--extra-experimental-features", - "nix-command flakes", ] ) + flags diff --git a/pkgs/clan-cli/default.nix b/pkgs/clan-cli/default.nix index 8adff94..2a89526 100644 --- a/pkgs/clan-cli/default.nix +++ b/pkgs/clan-cli/default.nix @@ -89,7 +89,7 @@ let ln -s ${nixpkgs} $out/path nix flake lock $out \ --store ./. \ - --experimental-features 'nix-command flakes' \ + --extra-experimental-features 'nix-command flakes' \ --override-input nixpkgs ${nixpkgs} ''; in From c0799ce42593a597dba1423a662ba3eba392e1a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Wed, 27 Sep 2023 15:02:01 +0200 Subject: [PATCH 2/2] jsonschema: fix eval --- lib/jsonschema/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/jsonschema/default.nix b/lib/jsonschema/default.nix index 90a8fb2..6462000 100644 --- a/lib/jsonschema/default.nix +++ b/lib/jsonschema/default.nix @@ -15,7 +15,7 @@ let # throw error if option type is not supported notSupported = option: throw - "option type '${option.type.description}' not supported by jsonschema converter"; + "option type '${option.type.name}' ('${option.type.description}') not supported by jsonschema converter"; in rec { @@ -91,7 +91,7 @@ rec { } # parse int - else if option.type.name == "int" + else if (option.type.name == "int" || option.type.name == "positiveInt") # return jsonschema property definition for int then default // description // { type = "integer";