- Previous meeting notes
- Attendees: @henrik-ch @zmitchell @proofconstruction @infinisil @thezaedus @roberth
- Notes taken by: @infinisil @proofconstruction
Agenda
Notes
-
@zmitchell: New 4 week iteration, but still need to finish some stuff from the previous one
-
Got feedback on previous outlines by @roberth, decide what to do with that
-
@proofconstruction: Made progress on “Packaging existing software with Nix” tutorial, not committed yet
- C/C++ tutorial is needed
- Start with packaging gnu hello
- Iteratively fixing errors
-
mkDerivation
does a lot of things implicit with a Makefile, so hello is packaged fairly quickly - Too simple, what else to do?
- @infinisil: Start with an empty C project, run into Makefile not existing errors, explain those
- @zmitchell: Don’t show errors people don’t run into if they do the correct thing from the start
-
@zmitchell: If you need libcurl, not only show how to get the dependency, but also how to get its headers
- @infinisil: mkDerivation should automatically select the right outputs
- @zmitchell: Only works for derivations with the right output structure
- @roberth: Doesn’t work for string interpolation
-
@proofconstruction: Rabbit holes, e.g. ldd for libraries → doesn’t exist on Darwin → platform-specific packages
- @zmitchell: Sidestep platform-specific stuff
-
@zmitchell: Direct dependencies are often easier than transitive dependencies
- @infinisil: Arguably the direct dependency has a bug then, packages should always have everything included, maybe we need to teach users how to deal with those
- @proofconstruction: Rabbit holes, but this should be taught to some level
- @infinisil: Could maybe use overrides, but gets hard
-
@roberth: Goes back to Diataxis, tutorials should be easy to follow along
- Multiple nontrivial problems belong in guides, linked to in an example
- @proofconstruction: Because of this, let’s not include a broken direct dependency
-
@zthezaedus: Should definitely include some dependency, but also show what can go wrong
- @zmitchell: It’s okay to run into problems, let’s not run users into problems artificially. E.g. let’s not leave out a dependency we know that should be there. Can run into broken packages, don’t know that beforehand
-
@zmitchell: Short list of things that should be shown? @proofconstruction:
- Platform-specific packages in addition to a generic happy path
- Dependencies between derivations, hard to not be artificial
- @zmitchell: Hello world is too simple, need something more complex
-
@infinisil: Could look in Nixpkgs, has all levels of complexity, relatively easy to see from the Nix expression
-
@roberth:
find pkgs/ -name default.nix -exec wc -l {} \; | sort -n
-
@roberth:
- @henrik-ch: Let’s not throw out the hello tutorial
- @proofconstruction: Static makefile, dynamic makefile, when needed?
- @zmitchell: Not starting with a makefile non-starter for me
- @infinisil: make included in the stdenv, makefile is a standard component in builds
- @zmitchell: Different tutorial, not an existing package
- @infinisil: Can’t have a generic tutorial for packaging existing software
-
@thezaedus: What level of complexity?
- @proofconstruction: A bunch of direct dependencies
- @infinisil: Could probably easily find some complexity when looking around in Nixpkgs
-
Looking at previous tutorial idea: First steps tutorial - "nix-shell -p" · Issue #498 · NixOS/nix.dev · GitHub
-
@roberth: Not sure what to do, should be solved in Nix.
nix-shell
is not great overall, has a number of problems - @infinisil: Still need to document it, since it’s used
-
@zmitchell: Let’s do the tutorial, how to mention incompatibility of
-p
with Flakes? - @infinisil: Show the problems in an expanding section
- @zmitchell: Or at the end
-
@proofconstruction: Should be clear about what we recommend, similar to nix-env
- @zmitchell: nix-env has better solutions, but nix-shell doesn’t really, still needed
-
@roberth: Different situation than
nix-env
-
@roberth: Not sure what to do, should be solved in Nix.
-
First steps tutorial - shell.nix · Issue #516 · NixOS/nix.dev · GitHub looking good
-
Nix language tutorial
- @infinisil: Don’t we have one already?
- @zmitchell: See issue description
- @infinisil: Idea: Blog-like series where pieces of Nix code get torn apart and explained
-
First steps tutorial - pinning nixpkgs · Issue #580 · NixOS/nix.dev · GitHub
- It’s complicated, but it does give reproducibility
- Changing a source file shouldn’t rebuild many things, upd
-
@infinisil: Could move niv to NixOS organization, or ignore it being not official
- @zmitchell: Not in scope
- @infinisil: Could still just ask, could be quick
- @roberth: I think it’s fine to have a section on a non-official tool
- @infinisil: Part of the pinning tutorial
- @roberth: Let’s not recommend it though
- @proofconstruction: Broadly we need to discuss endorsing vs including “nonstandard/unnofficial” projects in these tutorials