News for hackers. Stuff that matters.
Re:How to Learn Nix by ParetoOptimal on Tuesday March 15, 2022 @12:03PM (#30687008)
What resources led you to try:

default.nix (i'm guessing):

    derivation {
      name = "simple";
      builder = "${bash}/bin/bash";
      args = [ ./simple_builder.sh ];
      inherit gcc coreutils;
      src = ./simple.c;
      system = builtins.currentSystem;
    }
Command:

    nix-build -E 'with import <nixpkgs> {}; callPackage ./default.nix {}' 
Rather than something like this[0]:

default.nix:

    with (import <nixpkgs> {});
    derivation {
      name = "simple";
      builder = "${bash}/bin/bash";
      args = [ ./simple_builder.sh ];
      inherit gcc coreutils;
      src = ./simple.c;
      system = builtins.currentSystem;
    }
Which can be built with:

    nix build
We should fix the docs that led your version rather than the second.

0: https://nixos.org/guides/nix-pills/working-derivation.html#i...

Re:How to Learn Nix by scintill76 on Tuesday March 15, 2022 @08:02PM (#30693571)
I’m an intermediate Nix user - aren’t pkgs usually passed in as an argument so that the caller can choose them? I sort of accepted that verbose command line as a necessary evil of good design.