Commit 1301e4f0 authored by Sergei Trofimovich's avatar Sergei Trofimovich
Browse files

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: default avatarNick Cao <nickcao@nichi.co>
parent 23153725
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -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 = {