Merge pull request #214 from henrik-ch/pill8

Pill 8 update
This commit is contained in:
proofconstruction 2023-07-10 13:15:31 -05:00 committed by GitHub
commit d13c02cb85
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 46 additions and 40 deletions

View file

@ -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>

View file

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

View file

@ -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

View file

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

View file

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

View file

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

View file

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