about summary refs log tree commit diff
path: root/pkgs/tools
diff options
context:
space:
mode:
authorArmijn Hemel <armijn@gpl-violations.org>2005-08-28 14:23:30 +0000
committerArmijn Hemel <armijn@gpl-violations.org>2005-08-28 14:23:30 +0000
commit3a0ff0b50d572f366fe72fe9f3cc339447a38062 (patch)
treee6547b36949d02756ca87eca66fd2eff246d5ab1 /pkgs/tools
parent3ccc0014b62676204c53b7b843650c30ff13f5fb (diff)
downloadnixlib-3a0ff0b50d572f366fe72fe9f3cc339447a38062.tar
nixlib-3a0ff0b50d572f366fe72fe9f3cc339447a38062.tar.gz
nixlib-3a0ff0b50d572f366fe72fe9f3cc339447a38062.tar.bz2
nixlib-3a0ff0b50d572f366fe72fe9f3cc339447a38062.tar.lz
nixlib-3a0ff0b50d572f366fe72fe9f3cc339447a38062.tar.xz
nixlib-3a0ff0b50d572f366fe72fe9f3cc339447a38062.tar.zst
nixlib-3a0ff0b50d572f366fe72fe9f3cc339447a38062.zip
add dietlibc'ed coreutils for the NixOS installer...
svn path=/nixpkgs/trunk/; revision=3736
Diffstat (limited to 'pkgs/tools')
-rw-r--r--pkgs/tools/misc/coreutils-diet/coreutils-dummy.patch24
-rw-r--r--pkgs/tools/misc/coreutils-diet/default.nix14
2 files changed, 38 insertions, 0 deletions
diff --git a/pkgs/tools/misc/coreutils-diet/coreutils-dummy.patch b/pkgs/tools/misc/coreutils-diet/coreutils-dummy.patch
new file mode 100644
index 000000000000..bb444bedf0e2
--- /dev/null
+++ b/pkgs/tools/misc/coreutils-diet/coreutils-dummy.patch
@@ -0,0 +1,24 @@
+diff -ruN coreutils-5.2.1/src/paste.c coreutils-5.2.1.new/src/paste.c
+--- coreutils-5.2.1/src/paste.c	2004-01-23 09:57:02.000000000 +0100
++++ coreutils-5.2.1.new/src/paste.c	2005-08-28 16:03:10.000000000 +0200
+@@ -52,13 +52,16 @@
+ /* Indicates that no delimiter should be added in the current position. */
+ #define EMPTY_DELIM '\0'
+ 
+-static FILE dummy_closed;
++/* static FILE dummy_closed; */
+ /* Element marking a file that has reached EOF and been closed. */
+-#define CLOSED (&dummy_closed)
++/* #define CLOSED (&dummy_closed) */
+ 
+-static FILE dummy_endlist;
++/* static FILE dummy_endlist; */
+ /* Element marking end of list of open files. */
+-#define ENDLIST (&dummy_endlist)
++/* #define ENDLIST (&dummy_endlist) */
++
++#define CLOSED ((FILE *)-1)
++#define ENDLIST ((FILE *)-2)
+ 
+ /* Name this program was run with. */
+ char *program_name;
diff --git a/pkgs/tools/misc/coreutils-diet/default.nix b/pkgs/tools/misc/coreutils-diet/default.nix
new file mode 100644
index 000000000000..3f7d962a0e8c
--- /dev/null
+++ b/pkgs/tools/misc/coreutils-diet/default.nix
@@ -0,0 +1,14 @@
+{stdenv, fetchurl, dietgcc, perl}:
+
+stdenv.mkDerivation {
+  name = "coreutils-5.2.1";
+  src = fetchurl {
+    url = http://nix.cs.uu.nl/dist/tarballs/coreutils-5.2.1.tar.bz2;
+    md5 = "172ee3c315af93d3385ddfbeb843c53f";
+  };
+  patches = [./coreutils-dummy.patch];
+  buildInputs = [perl];
+  NIX_GCC = dietgcc;
+  NIX_GLIBC_FLAGS_SET=1;
+  NIX_CFLAGS_COMPILE="-D_BSD_SOURCE=1";
+}