1
0
Fork 0
mirror of https://github.com/NixOS/nix-pills synced 2024-09-19 04:00:13 -04:00

Merge branch 'master' into binutils

This commit is contained in:
Andreas Rammhold 2018-08-23 00:28:37 +02:00 committed by GitHub
commit 44ce4cb6d3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 0 deletions

View file

@ -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>
<note><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.
</note>
<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

View 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;
}