From dda29ca7685d360d5428dd827d11a9e4139a0872 Mon Sep 17 00:00:00 2001 From: Justin Bedo Date: Thu, 6 Oct 2022 10:21:34 +1100 Subject: init --- day2/ex1-hello-world/default.nix | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 day2/ex1-hello-world/default.nix (limited to 'day2/ex1-hello-world/default.nix') diff --git a/day2/ex1-hello-world/default.nix b/day2/ex1-hello-world/default.nix new file mode 100644 index 0000000..8eaffa7 --- /dev/null +++ b/day2/ex1-hello-world/default.nix @@ -0,0 +1,22 @@ +/* + 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"; + + buildCommand = '' + echo hello world > $out + ''; + } -- cgit v1.2.3