On 07/06/2017 05:54 PM, tj5527 via nix-dev wrote:
> Following the example
> at http://nixos.org/nix/manual/#chap-writing-nix-expressions to build
> hello package. But `nix-build -A hello` throws error "error: cannot
> auto-call a function that has an argument without a default value
> (‘stdenv’)"
> 
> How can I fix this problem?

Well, apparently you try to evaluate a standalone file that specifies a
function but you don't specify how to fill its parameters.  It should be
explained in the following section
http://nixos.org/nix/manual/#sec-arguments

That's how it's commonly done in nixpkgs.  If you want a *separate*
expression that depends on nixpkgs, you may e.g. start by adding this
line to the beginning of the file:
    with import <nixpkgs> {};
instead of
    { stdenv, something1, something2, ... }:

--Vladimir
_______________________________________________
nix-dev mailing list
nix-dev@lists.science.uu.nl
https://mailman.science.uu.nl/mailman/listinfo/nix-dev

Reply via email to