Giter VIP home page Giter VIP logo

nix-book's People

Contributors

das-g avatar jonringer avatar nrdxp avatar ronnelreposo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

nix-book's Issues

Introduce the concept of IFD?

Somewhere in section 3. The Nix Language, IFD should probably be explained. What it is, why it's useful, why it's problematic, and the fact that it's not allowed in nixpkgs.

List of not-covered topics

Just need to write these down before I forget:

  • Dev shells through nix
  • wrapping
  • overrides
  • How to debug builds (nix develop .#)
  • hardware acceleration (addOpenGLRunpath)
  • Shell Hooks
  • Common trivial builders
  • patching
  • pname + version vs name?
  • meta?
  • How contribute to nixpkgs
  • flakes
  • overlays
  • Example build section?
    • go
    • cmake
    • gnumake (this is kind of already covered in the stdenv section)
    • autotools
    • rust
    • python

Introduction should clarify that hashes are used in paths to software

This section:

This information is aggregated through hashing, and allows nix to
describe and reference the exact software which is intended to use.
This enables nix to be used on any system because it's assumptions
do not collide with the assumptions of a host system. This also means that
nix does not adhere to the traditional [File Hierarchical System(FHS)](https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard)
but it also means that it's not limited to FHS's restriction of only having
a single variant of a piece of software.

is difficult to follow because no mention has yet been made that hashes are used to determine the paths at which software is installed. Many of the claims in this paragraph don't make sense without that context.

Warn about collision between function syntax and url syntax

In https://book.divnix.com/ch05-02-functions.html#functions, it should probably mention that the space after the : in function syntax is not optional, especially since it doesn't mention url literal syntax. It's one of the aspects of syntax I found most confusing when learning nix, but as long as url literal syntax is still accepted, we can't do anything about it other than warn about it preemptively.

(x: x) is the identity function, (x:x) is the string "x:x".

Warn about abusing FODs?

Somewhere in https://book.divnix.com/ch04-00-derivations.html#fixed-output-derivations-fods it should probably mention the dangers of doing complex things inside FODs, given that this is a common newbie trap.

Maybe something like:
You may be tempted to put your build process itself into a FOD, particularly if your build system expects network access, but this is generally a bad idea in practice, as it results in fragile hashes, which make the resultant derivation impossible to reproduce before long. FODs should really only be used for processes that can be reasonably expected to produce bit-for-bit identical results, even across updates of the involved software and expected changes in the responses to network requests. Downloading a url, for example.

Upstream Nomenclature

There may be an upstream nomenclature emerging. When it does, shall we adopt?

Let me find the link, again...

Drop explanations on "classical" nix?

A couple of code examples make use of classical nix, such as import <nixpkgs>.

Since it's already hard to teach nix, it's probably even harder to teach a mixed syntax.

Don't have a strong opinion, this just jumped to my eyes, while flying over the text.

Various typos

Here are some typos that you can easily find with search:

Should be "its":

because it's assumptions

Typo:

Sytems

Should have capital "D"

Fixed-Output derivations

Misspelling:

yeild the store path that they create

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.