Initial commit

This commit is contained in:
2024-03-17 17:33:12 +01:00
commit c56d09816f
24 changed files with 564 additions and 0 deletions

View File

@ -0,0 +1,16 @@
let
nixpkgs = fetchTarball "https://github.com/NixOS/nixpkgs/tarball/nixos-23.05";
pkgs = import nixpkgs { config = {}; overlays = []; };
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 = pkgs.fetchzip {
url = "https://ftp.gnu.org/gnu/hello/hello-2.12.1.tar.gz";
sha256 = "sha256-1kJjhtlsAkpNB7f6tZEs+dbKd8z7KoNHyDHEJ0tmhnc=";
};
system = builtins.currentSystem;
}

View File

@ -0,0 +1,12 @@
#!/bin/bash
export PATH="$gnutar/bin:$gcc/bin:$gnumake/bin:$coreutils/bin:$gawk/bin:$gzip/bin:$gnugrep/bin:$gnused/bin:$bintools/bin"
echo $src
# I guess changing nixos version will change behavior of how fetchzip or something.
# This script differs from the version used against <nixpkgs>.
cd $src
ls -l
./configure --prefix=$out
make
make install