summary refs log tree commit diff
path: root/pkgs/tools
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2006-10-27 19:53:23 +0000
committerEelco Dolstra <eelco.dolstra@logicblox.com>2006-10-27 19:53:23 +0000
commit0f7883d12fd46c2173fe80e28ab1a3bb484de0ae (patch)
treeb8db1f1c889a445298281c75613df5eb38132270 /pkgs/tools
parentd29fe5bfc1d4a90884a0a4c88bf089f7efcb0c9a (diff)
downloadnixlib-0f7883d12fd46c2173fe80e28ab1a3bb484de0ae.tar
nixlib-0f7883d12fd46c2173fe80e28ab1a3bb484de0ae.tar.gz
nixlib-0f7883d12fd46c2173fe80e28ab1a3bb484de0ae.tar.bz2
nixlib-0f7883d12fd46c2173fe80e28ab1a3bb484de0ae.tar.lz
nixlib-0f7883d12fd46c2173fe80e28ab1a3bb484de0ae.tar.xz
nixlib-0f7883d12fd46c2173fe80e28ab1a3bb484de0ae.tar.zst
nixlib-0f7883d12fd46c2173fe80e28ab1a3bb484de0ae.zip
* Revive the old coreutils, since coreutils 6 is broken beyond repair
  with dietlibc (it does some incredibly nasty hackery with the system
  header files...).

svn path=/nixpkgs/trunk/; revision=6878
Diffstat (limited to 'pkgs/tools')
-rw-r--r--pkgs/tools/misc/coreutils-5/default.nix10
-rw-r--r--pkgs/tools/misc/coreutils-5/uclibc.patch35
2 files changed, 45 insertions, 0 deletions
diff --git a/pkgs/tools/misc/coreutils-5/default.nix b/pkgs/tools/misc/coreutils-5/default.nix
new file mode 100644
index 000000000000..e09a44842d5e
--- /dev/null
+++ b/pkgs/tools/misc/coreutils-5/default.nix
@@ -0,0 +1,10 @@
+{stdenv, fetchurl}:
+
+stdenv.mkDerivation {
+  name = "coreutils-5.97";
+  src = fetchurl {
+    url = http://nix.cs.uu.nl/dist/tarballs/coreutils-5.97.tar.gz;
+    md5 = "bdec4b75c76ac9bf51b6dd1747d3b06e";
+  };
+  patches = [./dietlibc.patch];
+}
diff --git a/pkgs/tools/misc/coreutils-5/uclibc.patch b/pkgs/tools/misc/coreutils-5/uclibc.patch
new file mode 100644
index 000000000000..232737c2f354
--- /dev/null
+++ b/pkgs/tools/misc/coreutils-5/uclibc.patch
@@ -0,0 +1,35 @@
+diff -rc coreutils-5.97-orig/lib/strftime.c coreutils-5.97/lib/strftime.c
+*** coreutils-5.97-orig/lib/strftime.c	2006-10-18 17:10:16.000000000 +0200
+--- coreutils-5.97/lib/strftime.c	2006-10-18 17:19:10.000000000 +0200
+***************
+*** 180,185 ****
+--- 180,191 ----
+  # define memset_zero(P, Len) (memset (P, '0', Len), (P) += (Len))
+  #endif
+  
++ #if FPRINTFTIME
++ #define advance(p, _n) ;
++ #else
++ #define advance(p, _n) p += _n;
++ #endif 
++ 
+  #define add(n, f)							      \
+    do									      \
+      {									      \
+***************
+*** 198,204 ****
+  		memset_space (p, _delta);				      \
+  	    }								      \
+  	  f;								      \
+! 	  p += FPRINTFTIME ? 0 : _n;					      \
+  	}								      \
+        i += _incr;							      \
+      } while (0)
+--- 204,210 ----
+  		memset_space (p, _delta);				      \
+  	    }								      \
+  	  f;								      \
+! 	  advance(p, _n);						      \
+  	}								      \
+        i += _incr;							      \
+      } while (0)