aboutsummaryrefslogtreecommitdiff
path: root/day2/ex1-hello-world/solution.nix
blob: d0531a2c4fa1cde8f988c9c93f4adc9654123d23 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/*
   This first exercise demonstrates how to define a processing stage,
which is just instructions on how to compute an output (the
`buildCommand`) from some inputs (in this case, there are no inputs).
Each stage must minimally define a `name`, shell code to build the
output in `buildCommand`, and any software that's required in
`buildInputs`.  Note that `buildInputs = []` if not defined, meaning no
extra requirements over the standard environment.

Try replacing the echo below with output from the GNU hello program.
Hint:  the GNU hello program is available at `pkgs.hello` and the
executable is called `hello`.
*/
{bionix}:
with bionix;
  stage {
    name = "hello-world";

    buildInputs = [pkgs.hello];

    buildCommand = ''
      hello > $out
    '';
  }