News for hackers. Stuff that matters.
Re:Why did Nix introduce Flakes? by pushtheenvelope on Friday June 16, 2023 @06:27PM (#36364807)
yikes! thanks for pointing that out. The blog's renderer is confused too and renders the `#cowsay -- flakes are neat` as a comment.

To explain what's happening:

- The example above is running `nix run <flake reference> -- <arguments to pass to the flake output's binary>`.

- The `<flake reference>` here is `.#cowsay`, which is to be read as: `<flake type>#<output from flake>`. The # is a separator here.

- The `<flake type>` being `.` implies its a local flake at the current directory. The `<output from flake` in this case is the `cowsay` program.

further fun to be found at: https://nixos.org/manual/nix/stable/command-ref/new-cli/nix3...

As a meta-comment, yeah, this is kinda non-trivial for most of us. This is why we build devbox which provides a more familiar UX like `devbox add cowsay && devbox run -- cowsay "flakes are neat"`

There are no comments on this comment yet.