mirror of
https://github.com/NixOS/nix-pills
synced 2024-09-19 04:00:13 -04:00
Merge pull request #79 from acowley/darwin-sidebar
Add a note on adapting content for darwin
This commit is contained in:
commit
5520e97546
|
@ -48,6 +48,12 @@
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<screen><xi:include href="./08/hello-nix.txt" parse="text" /></screen>
|
<screen><xi:include href="./08/hello-nix.txt" parse="text" /></screen>
|
||||||
|
<sidebar><title>Nix on darwin</title>
|
||||||
|
<para>The darwin (i.e. macOS) <literal>stdenv</literal> diverges from the Linux <literal>stdenv</literal> in several ways. A main difference is that the darwin <literal>stdenv</literal> relies upon <literal>clang</literal> rather than <literal>gcc</literal> as its C compiler. We can adapt this early example of how a <literal>stdenv</literal> works for darwin by using this modified version of <filename>hello.nix</filename>:
|
||||||
|
</para>
|
||||||
|
<screen><xi:include href="./08/hello-nix-darwin.txt" parse="text" /></screen>
|
||||||
|
Please be aware that similar changes may be needed in what follows.
|
||||||
|
</sidebar>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Now build it with <command>nix-build hello.nix</command> and you can
|
Now build it with <command>nix-build hello.nix</command> and you can
|
||||||
|
|
11
pills/08/hello-nix-darwin.txt
Normal file
11
pills/08/hello-nix-darwin.txt
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
with (import <nixpkgs> {});
|
||||||
|
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;
|
||||||
|
}
|
11
style.css
11
style.css
|
@ -266,3 +266,14 @@ table.simplelist
|
||||||
div.navheader table, div.navfooter table {
|
div.navheader table, div.navfooter table {
|
||||||
box-shadow: none;
|
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;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue