From dde6370c2a7d341b27b0b80806413f94ccaa96dc Mon Sep 17 00:00:00 2001 From: Armijn Hemel Date: Sun, 1 Jan 2006 13:34:35 +0000 Subject: [PATCH] add a statically linked bzip2. This is the last of the tools we need for a fullystatic initial stdenv... svn path=/nixpkgs/trunk/; revision=4477 --- pkgs/tools/compression/bzip2-static/builder.sh | 12 ++++++++++++ .../bzip2-static/bzip2-1.0.3-static.patch | 12 ++++++++++++ pkgs/tools/compression/bzip2-static/default.nix | 11 +++++++++++ 3 files changed, 35 insertions(+) create mode 100644 pkgs/tools/compression/bzip2-static/builder.sh create mode 100644 pkgs/tools/compression/bzip2-static/bzip2-1.0.3-static.patch create mode 100644 pkgs/tools/compression/bzip2-static/default.nix diff --git a/pkgs/tools/compression/bzip2-static/builder.sh b/pkgs/tools/compression/bzip2-static/builder.sh new file mode 100644 index 00000000000..1250d58170a --- /dev/null +++ b/pkgs/tools/compression/bzip2-static/builder.sh @@ -0,0 +1,12 @@ +source $stdenv/setup +installFlags="PREFIX=$out" + +postInstall=postInstall +postInstall() { + rm $out/bin/bunzip2 $out/bin/bzcat + ln -s bzip2 $out/bin/bunzip2 + ln -s bzip2 $out/bin/bzcat +} + +genericBuild + diff --git a/pkgs/tools/compression/bzip2-static/bzip2-1.0.3-static.patch b/pkgs/tools/compression/bzip2-static/bzip2-1.0.3-static.patch new file mode 100644 index 00000000000..603ed15877b --- /dev/null +++ b/pkgs/tools/compression/bzip2-static/bzip2-1.0.3-static.patch @@ -0,0 +1,12 @@ +diff -ruN bzip2-1.0.3/Makefile bzip2-1.0.3.new/Makefile +--- bzip2-1.0.3/Makefile 2005-02-17 12:28:24.000000000 +0100 ++++ bzip2-1.0.3.new/Makefile 2006-01-01 14:30:08.000000000 +0100 +@@ -2,7 +2,7 @@ + SHELL=/bin/sh + + # To assist in cross-compiling +-CC=gcc ++CC=gcc -static + AR=ar + RANLIB=ranlib + LDFLAGS= diff --git a/pkgs/tools/compression/bzip2-static/default.nix b/pkgs/tools/compression/bzip2-static/default.nix new file mode 100644 index 00000000000..56b646f59f8 --- /dev/null +++ b/pkgs/tools/compression/bzip2-static/default.nix @@ -0,0 +1,11 @@ +{stdenv, fetchurl}: + +stdenv.mkDerivation { + name = "bzip2-1.0.3"; + builder = ./builder.sh; + src = fetchurl { + url = http://www.bzip.org/1.0.3/bzip2-1.0.3.tar.gz; + md5 = "8a716bebecb6e647d2e8a29ea5d8447f"; + }; + patches = [./bzip2-1.0.3-static.patch]; +}