with-inputs icon indicating copy to clipboard operation
with-inputs copied to clipboard

cant update packages via nix-update

Open unazikx opened this issue 1 month ago • 0 comments

❯ nix-update --quiet --flake "ani-cli-ru-api"
$ nix-instantiate --eval --json --strict /nix/store/d6l8hvahisy27rfviiy315a34kkj7z6l-nix-update-1.16.0/lib/python3.14/site-packages/nix_update/eval.nix --argstr importPath /etc/nixos --argstr attribute '["ani-cli-ru-api"]' --arg isFlake true --arg sanitizePositions true --argstr flakeImportPath /nix/store/a73fkajk7vm2i4n2pawv5dcnqkg2xrmr-source
error:
       … while evaluating attribute 'cargo_deps'
         at /nix/store/d6l8hvahisy27rfviiy315a34kkj7z6l-nix-update-1.16.0/lib/python3.14/site-packages/nix_update/eval.nix:128:3:
          127|   go_modules_old = pkg.go-modules.outputHash or null;
          128|   cargo_deps = pkg.cargoDeps.outputHash or null;
             |   ^
          129|   cargo_vendor_deps = pkg.cargoDeps.vendorStaging.outputHash or null;

       … while evaluating a branch condition
         at /nix/store/d6l8hvahisy27rfviiy315a34kkj7z6l-nix-update-1.16.0/lib/python3.14/site-packages/nix_update/eval.nix:57:7:
           56|       in
           57|       if packagesResult.success then packagesResult.value else (tryGetAttrPath attributePath flake).value
             |       ^
           58|     else

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

       error: path 'xq91kvbsb56kfivw72g4awk23p4bvz9b-a73fkajk7vm2i4n2pawv5dcnqkg2xrmr-source' is not valid
Traceback (most recent call last):
  File "/nix/store/d6l8hvahisy27rfviiy315a34kkj7z6l-nix-update-1.16.0/bin/.nix-update-wrapped", line 9, in <module>
    sys.exit(main())
             ~~~~^^
  File "/nix/store/d6l8hvahisy27rfviiy315a34kkj7z6l-nix-update-1.16.0/lib/python3.14/site-packages/nix_update/__init__.py", line 482, in main
    package = update(options)
  File "/nix/store/d6l8hvahisy27rfviiy315a34kkj7z6l-nix-update-1.16.0/lib/python3.14/site-packages/nix_update/update.py", line 198, in update
    package = eval_attr(opts)
  File "/nix/store/d6l8hvahisy27rfviiy315a34kkj7z6l-nix-update-1.16.0/lib/python3.14/site-packages/nix_update/eval.py", line 153, in eval_attr
    res = run(cmd)
  File "/nix/store/d6l8hvahisy27rfviiy315a34kkj7z6l-nix-update-1.16.0/lib/python3.14/site-packages/nix_update/utils.py", line 55, in run
    return subprocess.run(
           ~~~~~~~~~~~~~~^
        command,
        ^^^^^^^^
    ...<5 lines>...
        env=env,
        ^^^^^^^^
    )
    ^
  File "/nix/store/lb41b0anx1f98y9y5s9mdv97gjgsq740-python3-3.14.7/lib/python3.14/subprocess.py", line 578, in run
    raise CalledProcessError(retcode, process.args,
                             output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['nix-instantiate', '--eval', '--json', '--strict', '/nix/store/d6l8hvahisy27rfviiy315a34kkj7z6l-nix-update-1.16.0/lib/python3.14/site-packages/nix_update/eval.nix', '--argstr', 'importPath', '/etc/nixos', '--argstr', 'attribute', '["ani-cli-ru-api"]', '--arg', 'isFlake', 'true', '--arg', 'sanitizePositions', 'true', '--argstr', 'flakeImportPath', '/nix/store/a73fkajk7vm2i4n2pawv5dcnqkg2xrmr-source']' returned non-zero exit status 1.

this is with .lon i presume this happens cause xq91kvbsb56kfivw72g4awk23p4bvz9b-a73fkajk7vm2i4n2pawv5dcnqkg2xrmr-source source have this hash, and nix-update see as not valid

❯ nix-update --quiet --flake "ani-cli-ru-api"
$ nix-instantiate --eval --json --strict /nix/store/d6l8hvahisy27rfviiy315a34kkj7z6l-nix-update-1.16.0/lib/python3.14/site-packages/nix_update/eval.nix --argstr importPath /home/nixzoid/test_1 --argstr attribute '["ani-cli-ru-api"]' --arg isFlake true --arg sanitizePositions true --argstr flakeImportPath /nix/store/kbd9d4x4qxz769fnmmxqsmcnm81wqaj8-source
fetch https://pypi.org/pypi/anicli_api/json
$ git diff --color=never --word-diff=porcelain -- /home/nixzoid/test_1/packages/ani-cli-ru/api.nix
Not updating version, already 0.12.0
$ git -C /home/nixzoid/test_1 diff -- /home/nixzoid/test_1/packages/ani-cli-ru
No changes detected, skipping remaining steps|

this with flake.lock

unazikx avatar Oct 26 '26 03:10 unazikx