Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: cannot evaluate a function that has an argument without a value ('lib') #423

Open
anatawa12 opened this issue May 17, 2024 · 1 comment

Comments

@anatawa12
Copy link

I tried to install this package in nixos/nix container, error occurs.

I'm trying to use nixpkgs-update as suggested on NixOS/nixpkgs#302297 (comment).

bash-5.2# nix-env \
  --option extra-substituters 'https://nix-community.cachix.org/' \
  --option extra-trusted-public-keys 'nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=' \
  -if https://github.com/ryantm/nixpkgs-update/archive/main.tar.gz
warning: name collision in input Nix expressions, skipping '/nix/store/aiv5k9i17b5zxzf78r8prz2mdgy1953m-source/rust/flake.nix'
error: cannot evaluate a function that has an argument without a value ('lib')
       Nix attempted to evaluate a function as a top level expression; in
       this case it must have its arguments supplied either by default
       values, or passed explicitly with '--arg' or '--argstr'. See
       https://nixos.org/manual/nix/stable/language/constructs.html#functions.
       at /nix/store/aiv5k9i17b5zxzf78r8prz2mdgy1953m-source/nixpkgs-update.nix:4:29:
            3| , hspec, hspec-discover, http-client, http-client-tls, http-conduit
            4| , http-types, iso8601-time, lib, lifted-base, mtl
             |                             ^
            5| , neat-interpolation, optparse-applicative, parsec, parsers
@willbush
Copy link

I'm not too sure what's going on with nix-env in the container and I also can't get nix shell to work, but nix run works when enabling flakes and nix-command features:

❯ docker run -it nixos/nix
bash-5.2# nix run \
  --extra-experimental-features nix-command \
  --extra-experimental-features flakes \
  --option extra-substituters 'https://nix-community.cachix.org/' \
  --option extra-trusted-public-keys 'nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=' \
  github:ryantm/nixpkgs-update -- --help
do you want to allow configuration setting 'extra-substituters' to be set to 'https://nix-community.cachix.org' (y/N)? y
do you want to permanently mark this value as trusted (y/N)? y
do you want to allow configuration setting 'extra-trusted-public-keys' to be set to 'nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=' (y/N)? y
do you want to permanently mark this value as trusted (y/N)? y
nixpkgs-update

Usage: nixpkgs-update COMMAND

  Update packages in the Nixpkgs repository

Available options:
  -h,--help                Show this help text

Available commands:
  update                   Update one package
  update-batch             Update one package in batch mode.
  delete-done              Deletes branches from PRs that were merged or closed
  version                  Displays version information for nixpkgs-update and
                           dependencies
  update-vulnerability-db  Updates the vulnerability database
  check-vulnerable         checks if something is vulnerable
  check-all-vulnerable     checks all packages to update for vulnerabilities
  source-github            looks for updates on GitHub
  fetch-repology           fetches update from Repology and prints them to
                           stdout

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants