shell.nix: Add extensive comments.
This commit is contained in:
parent
2312ec22ad
commit
00376ab90a
1 changed files with 18 additions and 0 deletions
18
shell.nix
18
shell.nix
|
@ -1,5 +1,23 @@
|
|||
# shell.nix
|
||||
#
|
||||
# Prepare a Nix shell with GINsim available.
|
||||
#
|
||||
# Use nix-shell or nix-shell shell.nix to start.
|
||||
|
||||
# The with statement imports the nixpkgs namespace, so the tools like
|
||||
# stdenv and callPackage become available.
|
||||
with import <nixpkgs> {};
|
||||
stdenv.mkDerivation {
|
||||
name = "GINsim-shell";
|
||||
|
||||
# Bring the package defined in ginsim.nix in scope. buildInputs is
|
||||
# therefore a one-element list. Its only element is the call of the
|
||||
# anonymous function defined in ginsim.nix. I could have used let
|
||||
# to define a local binding ginsim = callPackage ./ginsim.nix {}; to
|
||||
# explicitly bind a name to this function call.
|
||||
#
|
||||
# callPackage can also be replaced by import. In this case, the
|
||||
# arguments of the anonymous function defined in ginsim.nix get
|
||||
# their respective default values.
|
||||
buildInputs = [ (callPackage ./ginsim.nix {}) ];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue