From 5626a121ec63e5099564188f72afb4f5b5e7f64d Mon Sep 17 00:00:00 2001 From: Anthony Cowley Date: Mon, 20 Aug 2018 20:54:00 -0400 Subject: [PATCH] Add a note on adapting content for darwin --- pills/08-generic-builders.xml | 6 ++++++ pills/08/hello-nix-darwin.txt | 11 +++++++++++ style.css | 11 +++++++++++ 3 files changed, 28 insertions(+) create mode 100644 pills/08/hello-nix-darwin.txt diff --git a/pills/08-generic-builders.xml b/pills/08-generic-builders.xml index 182d9a0..7a9be06 100644 --- a/pills/08-generic-builders.xml +++ b/pills/08-generic-builders.xml @@ -48,6 +48,12 @@ + Nix on darwin + The darwin (i.e. macOS) stdenv diverges from the Linux stdenv in several ways. A main difference is that the darwin stdenv relies upon clang rather than gcc as its C compiler. We can adapt this early example of how a stdenv works for darwin by using this modified version of hello.nix: + + + Please be aware that similar changes may be needed in what follows. + Now build it with nix-build hello.nix and you can diff --git a/pills/08/hello-nix-darwin.txt b/pills/08/hello-nix-darwin.txt new file mode 100644 index 0000000..b9f0d71 --- /dev/null +++ b/pills/08/hello-nix-darwin.txt @@ -0,0 +1,11 @@ +with (import {}); +derivation { + name = "hello"; + builder = "${bash}/bin/bash"; + args = [ ./hello_builder.sh ]; + inherit gnutar gzip gnumake coreutils gawk gnused gnugrep; + gcc = clang; + binutils_unwrapped = clang.bintools.bintools_bin; + src = ./hello-2.10.tar.gz; + system = builtins.currentSystem; +} diff --git a/style.css b/style.css index e329eb4..5330ba1 100644 --- a/style.css +++ b/style.css @@ -266,3 +266,14 @@ table.simplelist div.navheader table, div.navfooter table { box-shadow: none; } + +div.sidebar +{ + float: right; + margin: 1em 5%; + padding: 10px; + border: 2px dashed #b0b0b0; + border-radius: 0.4em; + background: #f8f8fc; + box-shadow: 0.4em 0.4em 0.5em #e0e0e0; +}