mirror of
https://github.com/NixOS/nix-pills
synced 2024-11-10 05:44:14 +00:00
commit
d13c02cb85
7 changed files with 46 additions and 40 deletions
|
@ -34,7 +34,7 @@
|
|||
<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.
|
||||
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>
|
||||
|
@ -297,7 +297,7 @@
|
|||
|
||||
<para>
|
||||
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
|
||||
in all the packages we would write.
|
||||
</para>
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
pkgs: attrs:
|
||||
with pkgs;
|
||||
let defaultAttrs = {
|
||||
builder = "${bash}/bin/bash";
|
||||
builder = "${pkgs.bash}/bin/bash";
|
||||
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 = [];
|
||||
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"
|
||||
tar -xzf $src
|
||||
cd hello-2.10
|
||||
cd hello-2.12.1
|
||||
./configure --prefix=$out
|
||||
make
|
||||
make install
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
with (import <nixpkgs> {});
|
||||
derivation {
|
||||
name = "hello";
|
||||
builder = "${bash}/bin/bash";
|
||||
args = [ ./hello_builder.sh ];
|
||||
inherit gnutar gzip gnumake coreutils gawk gnused gnugrep;
|
||||
gcc = clang;
|
||||
bintools = clang.bintools.bintools_bin;
|
||||
src = ./hello-2.10.tar.gz;
|
||||
system = builtins.currentSystem;
|
||||
}
|
||||
let
|
||||
pkgs = import <nixpkgs> {};
|
||||
in
|
||||
derivation {
|
||||
name = "hello";
|
||||
builder = "${pkgs.bash}/bin/bash";
|
||||
args = [ ./hello_builder.sh ];
|
||||
inherit (pkgs) gnutar gzip gnumake coreutils gawk gnused gnugrep;
|
||||
gcc = pkgs.clang;
|
||||
bintools = pkgs.clang.bintools.bintools_bin;
|
||||
src = ./hello-2.12.1.tar.gz;
|
||||
system = builtins.currentSystem;
|
||||
}
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
with (import <nixpkgs> {});
|
||||
derivation {
|
||||
name = "hello";
|
||||
builder = "${bash}/bin/bash";
|
||||
args = [ ./builder.sh ];
|
||||
buildInputs = [ gnutar gzip gnumake gcc coreutils gawk gnused gnugrep binutils.bintools ];
|
||||
src = ./hello-2.10.tar.gz;
|
||||
system = builtins.currentSystem;
|
||||
}
|
||||
let
|
||||
pkgs = import <nixpkgs> {};
|
||||
in
|
||||
derivation {
|
||||
name = "hello";
|
||||
builder = "${pkgs.bash}/bin/bash";
|
||||
args = [ ./builder.sh ];
|
||||
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
|
||||
pkgs = import <nixpkgs> {};
|
||||
mkDerivation = import ./autotools.nix pkgs;
|
||||
in mkDerivation {
|
||||
name = "hello";
|
||||
src = ./hello-2.10.tar.gz;
|
||||
}
|
||||
in
|
||||
mkDerivation {
|
||||
name = "hello";
|
||||
src = ./hello-2.12.1.tar.gz;
|
||||
}
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
with (import <nixpkgs> {});
|
||||
derivation {
|
||||
name = "hello";
|
||||
builder = "${bash}/bin/bash";
|
||||
args = [ ./hello_builder.sh ];
|
||||
inherit gnutar gzip gnumake gcc coreutils gawk gnused gnugrep;
|
||||
bintools = binutils.bintools;
|
||||
src = ./hello-2.10.tar.gz;
|
||||
system = builtins.currentSystem;
|
||||
}
|
||||
let
|
||||
pkgs = import <nixpkgs> {};
|
||||
in
|
||||
derivation {
|
||||
name = "hello";
|
||||
builder = "${pkgs.bash}/bin/bash";
|
||||
args = [ ./hello_builder.sh ];
|
||||
inherit (pkgs) gnutar gzip gnumake gcc coreutils gawk gnused gnugrep;
|
||||
bintools = pkgs.binutils.bintools;
|
||||
src = ./hello-2.12.1.tar.gz;
|
||||
system = builtins.currentSystem;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue