mirror of
https://github.com/NixOS/nix-pills
synced 2024-09-19 04:00:13 -04:00
commit
d13c02cb85
|
@ -34,7 +34,7 @@
|
||||||
<link xlink:href="https://www.gnu.org/software/hello/">GNU hello world</link>,
|
<link xlink:href="https://www.gnu.org/software/hello/">GNU hello world</link>,
|
||||||
despite its name, is a simple yet complete project which uses autotools.
|
despite its name, is a simple yet complete project which uses autotools.
|
||||||
Fetch the latest tarball here:
|
Fetch the latest tarball here:
|
||||||
<link xlink:href="https://ftp.gnu.org/gnu/hello/hello-2.10.tar.gz">https://ftp.gnu.org/gnu/hello/hello-2.10.tar.gz</link>.
|
<link xlink:href="https://ftp.gnu.org/gnu/hello/hello-2.12.1.tar.gz">https://ftp.gnu.org/gnu/hello/hello-2.12.1.tar.gz</link>.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
|
@ -297,7 +297,7 @@
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Out of this pill we managed to create a generic builder for autotools
|
Out of this pill we managed to create a generic builder for autotools
|
||||||
projects, and a function <code>mkDerivation</code> that composes by default
|
projects, and a function <code>mymkDerivation</code> that composes by default
|
||||||
the common components used in autotools projects instead of repeating them
|
the common components used in autotools projects instead of repeating them
|
||||||
in all the packages we would write.
|
in all the packages we would write.
|
||||||
</para>
|
</para>
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
pkgs: attrs:
|
pkgs: attrs:
|
||||||
with pkgs;
|
|
||||||
let defaultAttrs = {
|
let defaultAttrs = {
|
||||||
builder = "${bash}/bin/bash";
|
builder = "${pkgs.bash}/bin/bash";
|
||||||
args = [ ./builder.sh ];
|
args = [ ./builder.sh ];
|
||||||
baseInputs = [ gnutar gzip gnumake gcc coreutils gawk gnused gnugrep binutils.bintools ];
|
baseInputs = with pkgs; [ gnutar gzip gnumake gcc coreutils gawk gnused gnugrep binutils.bintools ];
|
||||||
buildInputs = [];
|
buildInputs = [];
|
||||||
system = builtins.currentSystem;
|
system = builtins.currentSystem;
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
export PATH="$gnutar/bin:$gcc/bin:$gnumake/bin:$coreutils/bin:$gawk/bin:$gzip/bin:$gnugrep/bin:$gnused/bin:$bintools/bin"
|
export PATH="$gnutar/bin:$gcc/bin:$gnumake/bin:$coreutils/bin:$gawk/bin:$gzip/bin:$gnugrep/bin:$gnused/bin:$bintools/bin"
|
||||||
tar -xzf $src
|
tar -xzf $src
|
||||||
cd hello-2.10
|
cd hello-2.12.1
|
||||||
./configure --prefix=$out
|
./configure --prefix=$out
|
||||||
make
|
make
|
||||||
make install
|
make install
|
||||||
|
|
|
@ -1,11 +1,13 @@
|
||||||
with (import <nixpkgs> {});
|
let
|
||||||
derivation {
|
pkgs = import <nixpkgs> {};
|
||||||
name = "hello";
|
in
|
||||||
builder = "${bash}/bin/bash";
|
derivation {
|
||||||
args = [ ./hello_builder.sh ];
|
name = "hello";
|
||||||
inherit gnutar gzip gnumake coreutils gawk gnused gnugrep;
|
builder = "${pkgs.bash}/bin/bash";
|
||||||
gcc = clang;
|
args = [ ./hello_builder.sh ];
|
||||||
bintools = clang.bintools.bintools_bin;
|
inherit (pkgs) gnutar gzip gnumake coreutils gawk gnused gnugrep;
|
||||||
src = ./hello-2.10.tar.gz;
|
gcc = pkgs.clang;
|
||||||
system = builtins.currentSystem;
|
bintools = pkgs.clang.bintools.bintools_bin;
|
||||||
}
|
src = ./hello-2.12.1.tar.gz;
|
||||||
|
system = builtins.currentSystem;
|
||||||
|
}
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
with (import <nixpkgs> {});
|
let
|
||||||
derivation {
|
pkgs = import <nixpkgs> {};
|
||||||
name = "hello";
|
in
|
||||||
builder = "${bash}/bin/bash";
|
derivation {
|
||||||
args = [ ./builder.sh ];
|
name = "hello";
|
||||||
buildInputs = [ gnutar gzip gnumake gcc coreutils gawk gnused gnugrep binutils.bintools ];
|
builder = "${pkgs.bash}/bin/bash";
|
||||||
src = ./hello-2.10.tar.gz;
|
args = [ ./builder.sh ];
|
||||||
system = builtins.currentSystem;
|
buildInputs = with pkgs; [ gnutar gzip gnumake gcc coreutils gawk gnused gnugrep binutils.bintools ];
|
||||||
}
|
src = ./hello-2.12.1.tar.gz;
|
||||||
|
system = builtins.currentSystem;
|
||||||
|
}
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
let
|
let
|
||||||
pkgs = import <nixpkgs> {};
|
pkgs = import <nixpkgs> {};
|
||||||
mkDerivation = import ./autotools.nix pkgs;
|
mkDerivation = import ./autotools.nix pkgs;
|
||||||
in mkDerivation {
|
in
|
||||||
name = "hello";
|
mkDerivation {
|
||||||
src = ./hello-2.10.tar.gz;
|
name = "hello";
|
||||||
}
|
src = ./hello-2.12.1.tar.gz;
|
||||||
|
}
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
with (import <nixpkgs> {});
|
let
|
||||||
derivation {
|
pkgs = import <nixpkgs> {};
|
||||||
name = "hello";
|
in
|
||||||
builder = "${bash}/bin/bash";
|
derivation {
|
||||||
args = [ ./hello_builder.sh ];
|
name = "hello";
|
||||||
inherit gnutar gzip gnumake gcc coreutils gawk gnused gnugrep;
|
builder = "${pkgs.bash}/bin/bash";
|
||||||
bintools = binutils.bintools;
|
args = [ ./hello_builder.sh ];
|
||||||
src = ./hello-2.10.tar.gz;
|
inherit (pkgs) gnutar gzip gnumake gcc coreutils gawk gnused gnugrep;
|
||||||
system = builtins.currentSystem;
|
bintools = pkgs.binutils.bintools;
|
||||||
}
|
src = ./hello-2.12.1.tar.gz;
|
||||||
|
system = builtins.currentSystem;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue