summary refs log tree commit diff
path: root/pkgs/development/libraries/aterm
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2004-03-28 21:07:43 +0000
committerEelco Dolstra <eelco.dolstra@logicblox.com>2004-03-28 21:07:43 +0000
commit892b119c9d2c4e1bcf28a1adf24f7bd00b4a6626 (patch)
tree30ba45624bb3a70c833c521eeb66545714a5af66 /pkgs/development/libraries/aterm
parentf8f9f4d12cad80f511f26942bd701cda81467776 (diff)
downloadnixlib-892b119c9d2c4e1bcf28a1adf24f7bd00b4a6626.tar
nixlib-892b119c9d2c4e1bcf28a1adf24f7bd00b4a6626.tar.gz
nixlib-892b119c9d2c4e1bcf28a1adf24f7bd00b4a6626.tar.bz2
nixlib-892b119c9d2c4e1bcf28a1adf24f7bd00b4a6626.tar.lz
nixlib-892b119c9d2c4e1bcf28a1adf24f7bd00b4a6626.tar.xz
nixlib-892b119c9d2c4e1bcf28a1adf24f7bd00b4a6626.tar.zst
nixlib-892b119c9d2c4e1bcf28a1adf24f7bd00b4a6626.zip
* It is now possible to execute a builder using a shell inside the Nix
  store, rather than outside (such as /bin/sh).

  For instance, the Nix expression for the ATerm library now looks
  like this:

    {stdenv, fetchurl}:

    stdenv.mkDerivation {
      name = "aterm-2.0.5";
      builder = ./builder.sh;
      ...
    }

  where `mkDerivation' is a helper function in `stdenv' that massages
  the given attribute set into using the bash shell that is part of
  the standard environment:

    mkDerivation = attrs: derivation (att s // {
      builder = pkgs.bash ~ /bin/sh;
      args = ["-e" attrs.builder];
      stdenv = (...);
      system = (...).system;
    });

  Note that this makes it unnecessary to set the `stdenv' and `system'
  attributes, since `mkDerivation' already does that.


svn path=/nixpkgs/trunk/; revision=866
Diffstat (limited to 'pkgs/development/libraries/aterm')
-rwxr-xr-xpkgs/development/libraries/aterm/builder.sh3
-rw-r--r--pkgs/development/libraries/aterm/default.nix4
2 files changed, 1 insertions, 6 deletions
diff --git a/pkgs/development/libraries/aterm/builder.sh b/pkgs/development/libraries/aterm/builder.sh
index 5946961adc58..77432d7ff5b6 100755
--- a/pkgs/development/libraries/aterm/builder.sh
+++ b/pkgs/development/libraries/aterm/builder.sh
@@ -1,6 +1,3 @@
-#! /bin/sh
-
 . $stdenv/setup
-
 configureFlags="--with-gcc"
 genericBuild
diff --git a/pkgs/development/libraries/aterm/default.nix b/pkgs/development/libraries/aterm/default.nix
index 2d2a946f60a9..bac496ecebca 100644
--- a/pkgs/development/libraries/aterm/default.nix
+++ b/pkgs/development/libraries/aterm/default.nix
@@ -1,12 +1,10 @@
 {stdenv, fetchurl}:
 
-derivation {
+stdenv.mkDerivation {
   name = "aterm-2.0.5";
-  system = stdenv.system;
   builder = ./builder.sh;
   src = fetchurl {
     url = http://www.cwi.nl/projects/MetaEnv/aterm/aterm-2.0.5.tar.gz;
     md5 = "68aefb0c10b2ab876b8d3c0b2d0cdb1b";
   };
-  inherit stdenv;
 }