summary refs log tree commit diff
path: root/pkgs/aterm
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2003-07-24 15:15:48 +0000
committerEelco Dolstra <eelco.dolstra@logicblox.com>2003-07-24 15:15:48 +0000
commit1dda526c6679827f272ff4895c41781e999cceb2 (patch)
treeaef026249be26ddfaa283c41ccb3a16265a37548 /pkgs/aterm
parent1a5e75c1922eadabdba68b3f7de7cf8ff1235ef8 (diff)
* Added the GNU C Library (glibc), a big step towards full Nixification of
  the build and execution environment.

  This is very useful.  For example, it allows packages built on a SuSE 
  8.2 system to run on a SuSE 8.1 system (this is because 8.2 has a newer 
  glibc; packages built against it cannot be dynamically linked against 
  older glibcs).

  Of course, Fix packages should not directly import glibc since that is 
  very system-specific.  Rather, they should import stdenv/stdenv.fix and 
  in their build scripts source in $stdenv/setup, which will setup the 
  right environment variables.  The idea is that stdenv.fix provides the 
  basic C/Unix build environment (C compiler, POSIX utilities, etc.).

  Note that only the ATerm package currently uses this.

svn path=/nixpkgs/trunk/; revision=203
Diffstat (limited to 'pkgs/aterm')
-rwxr-xr-xpkgs/aterm/aterm-build.sh5
-rw-r--r--pkgs/aterm/aterm.fix3
2 files changed, 6 insertions, 2 deletions
diff --git a/pkgs/aterm/aterm-build.sh b/pkgs/aterm/aterm-build.sh
index f92097b1d554c..9ca15e18b1c53 100755
--- a/pkgs/aterm/aterm-build.sh
+++ b/pkgs/aterm/aterm-build.sh
@@ -1,9 +1,10 @@
 #! /bin/sh
 
-export PATH=/bin:/usr/bin
+. $stdenv/setup  || exit 1
 
 tar xvfz $src || exit 1
 cd aterm-* || exit 1
-LDFLAGS=-s ./configure --prefix=$out --with-gcc || exit 1
+./configure --prefix=$out || exit 1
 make || exit 1
 make install || exit 1
+(cd $out/lib && ln -s libATerm.a libATerm-gcc.a) || exit 1
diff --git a/pkgs/aterm/aterm.fix b/pkgs/aterm/aterm.fix
index 7bb76b33ca65c..a10e7579f4287 100644
--- a/pkgs/aterm/aterm.fix
+++ b/pkgs/aterm/aterm.fix
@@ -1,9 +1,12 @@
 Package(
   [ ("name", "aterm-2.0")
   , ("build", Relative("aterm/aterm-build.sh"))
+
   , ("src", App(IncludeFix("fetchurl/fetchurl.fix"),
       [ ("url", "http://www.cwi.nl/projects/MetaEnv/aterm/aterm-2.0.tar.gz")
       , ("md5", "853474e4bcf4a85f7d38a0676b36bded")
       ]))
+
+  , ("stdenv", IncludeFix("stdenv/stdenv.fix"))
   ]
 )