pyamlboot.tests: fix the eval

Without the change the eval fails as:

    $ nix build --no-link -f. pyamlboot.tests
    error:
       … while evaluating the attribute 'version'
         at pkgs/by-name/py/pyamlboot/package.nix:29:3:
           28|
           29|   passthru.tests.version = testers.testVersion {
             |   ^
           30|     package = "pyamlboot";

       … while evaluating the 'name' attribute of a derivation

       … while evaluating a branch condition
         at lib/strings.nix:2627:3:
         2626|   # First detect the common case of already valid strings, to speed those up
         2627|   if stringLength string <= 207 && okRegex string != null
             |   ^
         2628|   then unsafeDiscardStringContext string

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: expected a set but found a string: "pyamlboot"

After fixing the eval tests started failing as `--version` hardcodes 1.0.

Co-authored-by: Nick Cao <nickcao@nichi.co>
This commit is contained in:
Sergei Trofimovich
2024-11-01 15:12:24 +00:00
co-authored by Nick Cao
parent 2315372573
commit 1301e4f0b0
+3 -2
View File
@@ -3,6 +3,7 @@
fetchFromGitHub,
python3Packages,
testers,
pyamlboot,
}:
python3Packages.buildPythonApplication rec {
@@ -27,9 +28,9 @@ python3Packages.buildPythonApplication rec {
];
passthru.tests.version = testers.testVersion {
package = "pyamlboot";
package = pyamlboot;
command = "boot.py -v";
version = "boot.py ${version}";
version = "boot.py ${lib.versions.majorMinor version}";
};
meta = {