Nix-expr style review

Unneded args.something replaced with
args: with args;
line. After this line args is the only place where we can recieve variables from.

Also removed several
buildInputs = [];
lines.

svn path=/nixpkgs/trunk/; revision=10415
This commit is contained in:
Yury G. Kudryashov
2008-01-30 17:20:48 +00:00
parent f831e0420a
commit 5bca69ac34
53 changed files with 220 additions and 248 deletions

View File

@@ -1,9 +1,8 @@
args:
args.stdenv.mkDerivation {
args: with args;
stdenv.mkDerivation {
name = "fpc-2.0.4-binary";
src = args.
fetchurl {
src = fetchurl {
url = ftp://ftp.chg.ru/pub/lang/pascal/fpc/dist/i386-linux-2.0.4/fpc-2.0.4.i386-linux.tar;
sha256 = "0b2szv2anbf58h4i5mlph93afv9qdx6i0jqggba04d3anjbl9gfy";
};

View File

@@ -1,16 +1,16 @@
args:
if ((args ? startFPC) && (args.startFPC != null))
then
args.stdenv.mkDerivation {
with args;
stdenv.mkDerivation {
name = "fpc-2.2.0";
src = args.
fetchurl {
src = fetchurl {
url = ftp://freepascal.stack.nl/pub/fpc/dist/source-2.2.0/fpcbuild-2.2.0.tar.gz;
sha256 = "0pvsdmimknkgy8jgdz9kd7w5bs9fy5ynrgswpk0ib6x0y26zxijm";
};
buildInputs = [args.startFPC args.gawk];
buildInputs = [startFPC gawk];
installFlags = "INSTALL_PREFIX=\${out}";
postInstall = "ln -fs $out/lib/fpc/*/ppc386 $out/bin;

View File

@@ -1,14 +1,13 @@
args:
args.stdenv.mkDerivation {
args: with args;
stdenv.mkDerivation {
name = "SDL_image-1.2.6";
src = args.
fetchurl {
src = fetchurl {
url = http://www.libsdl.org/projects/SDL_image/release/SDL_image-1.2.6.tar.gz;
sha256 = "1i3f72dw3i3l6d77dk81gw57sp0629rng9k76qb37brlz7dv3z48";
};
buildInputs =(with args; [SDL libpng libjpeg libtiff libungif libXpm]);
buildInputs = [SDL libpng libjpeg libtiff libungif libXpm];
postInstall = "ln -s \${out}/include/SDL/SDL_image.h \${out}/include/";

View File

@@ -1,14 +1,13 @@
args:
args.stdenv.mkDerivation {
args: with args;
stdenv.mkDerivation {
name = "SDL_image-1.2.6";
src = args.
fetchurl {
src = fetchurl {
url = http://www.libsdl.org/projects/SDL_ttf/release/SDL_ttf-2.0.9.tar.gz;
sha256 = "0ls6anmlmwrmy21p3y9nfyl6fkwz4jpgh74kw7xd0hwbg5v8h95l";
};
buildInputs =(with args; [SDL freetype]);
buildInputs = [SDL freetype];
postInstall = "ln -s \${out}/include/SDL/SDL_ttf.h \${out}/include/";

View File

@@ -1,16 +1,16 @@
args:
args.stdenv.mkDerivation {
args: with args;
stdenv.mkDerivation {
name = "ctl-1.4.1";
src = args.fetchurl {
src = fetchurl {
url = http://surfnet.dl.sourceforge.net/sourceforge/ampasctl/ctl-1.4.1.tar.gz;
sha256 = "16lzgbpxdyhykdwndj1i9vx3h4bfkxqqcrvasvgg70gb5raxj0mj";
};
propagatedBuildInputs = (with args; [ilmbase]);
configureFlags="--with-ilmbase-prefix=${args.ilmbase}";
propagatedBuildInputs = [ilmbase];
configureFlags="--with-ilmbase-prefix=${ilmbase}";
#configurePhase = "
#export CXXFLAGS=\"-I${args.ilmbase}/include -L${args.ilmbase}/lib\"
#export CXXFLAGS=\"-I${ilmbase}/include -L${ilmbase}/lib\"
#echo $CXXFLAGS
#unset configurePhase; configurePhase
#";

View File

@@ -1,13 +1,13 @@
args:
args.stdenv.mkDerivation {
args: with args;
stdenv.mkDerivation {
name = "glew-1.5.0";
src = args.fetchurl {
src = fetchurl {
url = http://dfn.dl.sourceforge.net/sourceforge/glew/glew-1.5.0-src.tgz;
sha256 = "1kjr1fchnl785wsg11vzc03q3pm12lh20n1i593zr1xqfjgx2b4h";
};
buildInputs =(with args; [mesa x11 libXmu libXi]);
buildInputs = [mesa x11 libXmu libXi];
meta = {
description = "cross-platform open-source C/C++ extension loading library";

View File

@@ -1,14 +1,12 @@
args:
args.stdenv.mkDerivation {
args: with args;
stdenv.mkDerivation {
name = "gsl-1.9";
src = args.fetchurl {
src = fetchurl {
url = ftp://ftp.gnu.org/gnu/gsl/gsl-1.9.tar.gz;
sha256 = "0l12js65c1qf3s7gmgay6gj5nbs6635py41dj8nk3hlp95wcdlgw";
};
buildInputs =(with args; []);
meta = {
description = "numerical library (>1000 functions)";
homepage = http://www.gnu.org/software/gsl;

View File

@@ -1,13 +1,13 @@
args:
args.stdenv.mkDerivation {
args: with args;
stdenv.mkDerivation {
name = "libavc1394-0.5.3";
src = args.fetchurl {
src = fetchurl {
url = mirror://sourceforge/libavc1394/libavc1394-0.5.3.tar.gz;
sha256 = "19i40i3722ilhziknfds3a6w5xzv66fvc68gvbir1p2fvwi6ij93";
};
buildInputs =(with args; [pkgconfig libraw1394]);
buildInputs = [pkgconfig libraw1394];
meta = {
description = "programming interface for the 1394 Trade Association AV/C (Audio/Video Control) Digital Interface Command Set";

View File

@@ -1,13 +1,13 @@
args:
args.stdenv.mkDerivation {
args: with args;
stdenv.mkDerivation {
name = "libiec61883-1.1.0";
src = args.fetchurl {
src = fetchurl {
url = http://www.linux1394.org/dl/libiec61883-1.1.0.tar.gz;
sha256 = "09f0ca7bp6lqlz6601gnyl04mfabv0azg49n1cmjyqpzh35cgxkq";
};
buildInputs =(with args; [pkgconfig libraw1394]);
buildInputs = [pkgconfig libraw1394];
meta = {
description = "TODO";

View File

@@ -1,14 +1,12 @@
args:
args.stdenv.mkDerivation {
args: with args;
stdenv.mkDerivation {
name = "libraw1394-1.2.0";
src = args.fetchurl {
src = fetchurl {
url = "mirror://sourceforge/libraw1394/libraw1394-1.2.0.tar.gz";
sha256 = "1b9zqqzyz0ihyfvhn135y3wc6vmym5yz21jxj9dp0f09b96gmp0z";
};
buildInputs =(with args; []);
meta = {
description = "library providing direct access to the IEEE 1394 bus through the Linux 1394 subsystem's raw1394 user space interface";
homepage = "http://wiki.linux1394.org/";

View File

@@ -1,15 +1,14 @@
args:
args.stdenv.mkDerivation {
args: with args;
stdenv.mkDerivation {
name = "libwmf-0.2.8.4";
src = args.
fetchurl {
src = fetchurl {
url = mirror://sourceforge/wvware/libwmf-0.2.8.4.tar.gz;
sha256 = "1y3wba4q8pl7kr51212jwrsz1x6nslsx1gsjml1x0i8549lmqd2v";
};
buildInputs =(with args; [zlib imagemagick libpng
pkgconfig glib freetype libjpeg libxml2]);
buildInputs = [zlib imagemagick libpng
pkgconfig glib freetype libjpeg libxml2];
meta = {
description = "

View File

@@ -1,17 +1,17 @@
args:
args.stdenv.mkDerivation {
args: with args;
stdenv.mkDerivation {
name = "openexr_ctl-1.0.1";
src = args.fetchurl {
src = fetchurl {
url = http://kent.dl.sourceforge.net/sourceforge/ampasctl/openexr_ctl-1.0.1.tar.gz;
sha256 = "1jg9smpaplal8l14djp184wzk11nwd3dvm4lhkp69kjgw8jdd21d";
};
propagatedBuildInputs = (with args; [ilmbase]);
buildInputs = ( with args; [openexr ctl]);
configureFlags="--with-ilmbase-prefix=${args.ilmbase}";
propagatedBuildInputs = [ilmbase];
buildInputs = [openexr ctl];
configureFlags="--with-ilmbase-prefix=${ilmbase}";
#configurePhase = "
#export CXXFLAGS=\"-I${args.ilmbase}/include -L${args.ilmbase}/lib\"
#export CXXFLAGS=\"-I${ilmbase}/include -L${ilmbase}/lib\"
#echo $CXXFLAGS
#unset configurePhase; configurePhase
#";

View File

@@ -1,14 +1,12 @@
args:
args.stdenv.mkDerivation {
args: with args;
stdenv.mkDerivation {
name = "proj-4.5.0";
src = args.fetchurl {
src = fetchurl {
url = ftp://ftp.remotesensing.org/proj/proj-4.5.0.tar.gz;
sha256 = "1d2qz0vgp13hkfgaz7hkblhb9w2fh2blbjqz73xdinwc08cmflqv";
};
buildInputs =(with args; []);
meta = {
description = "Cartographic Projections Library";
homepage = http://proj.maptools.org;

View File

@@ -1,20 +1,20 @@
args:
args.stdenv.mkDerivation {
args: with args;
stdenv.mkDerivation {
name = "python-imaging-1.1.6";
src = args.fetchurl {
src = fetchurl {
url = http://effbot.org/downloads/Imaging-1.1.6.tar.gz;
sha256 = "141zidl3s9v4vfi3nsbg42iq1lc2a932gprqr1kij5hrnn53bmvx";
};
buildInputs =(with args; [python zlib libtiff libjpeg freetype]);
buildInputs = [python zlib libtiff libjpeg freetype];
configurePhase = (with args;"
configurePhase = "
sed -e 's@FREETYPE_ROOT = None@FREETYPE_ROOT = libinclude(\"${freetype}\")@' -i setup.py
sed -e 's@JPEG_ROOT = None@JPEG_ROOT = libinclude(\"${libjpeg}\")@' -i setup.py
sed -e 's@TIFF_ROOT = None@TIFF_ROOT = libinclude(\"${libtiff}\")@' -i setup.py
sed -e 's@ZLIB_ROOT = None@ZLIB_ROOT = libinclude(\"${zlib}\")@' -i setup.py
");
";
buildPhase = "true";

View File

@@ -1,22 +1,22 @@
args:
args.stdenv.mkDerivation {
args: with args;
stdenv.mkDerivation {
name = "pygame-1.7";
src = args.fetchurl {
src = fetchurl {
url = http://www.pygame.org/ftp/pygame-1.7.1release.tar.gz ;
sha256 = "0hl0rmgjcqj217fibwyilz7w9jpg0kh7hsa7vyzd4cgqyliskpqi";
};
buildInputs =(with args; [python pkgconfig SDL SDL_image SDL_ttf]);
buildInputs = [python pkgconfig SDL SDL_image SDL_ttf];
configurePhase = (with args;
configurePhase =
"
export LOCALBASE=///
sed -e \"/origincdirs =/a'${SDL_image}/include/SDL','${SDL_image}/include',\" -i config_unix.py
sed -e \"/origlibdirs =/aoriglibdirs += '${SDL_image}/lib',\" -i config_unix.py
sed -e \"/origincdirs =/a'${SDL_ttf}/include/SDL','${SDL_ttf}/include',\" -i config_unix.py
sed -e \"/origlibdirs =/aoriglibdirs += '${SDL_ttf}/lib',\" -i config_unix.py
yes Y | python config.py ");
yes Y | python config.py ";
buildPhase = "yes Y | python setup.py build";

View File

@@ -12,7 +12,7 @@ let
#defaultFlags = ["doc"];
};
in args.stdenv.mkDerivation {
in stdenv.mkDerivation {
# passing the flags in case a library using this want's to check them (*) ..
inherit (co) /* flags */ buildInputs configureFlags;

View File

@@ -1,16 +1,14 @@
args:
args.stdenv.mkDerivation {
args: with args;
stdenv.mkDerivation {
name = "uisp-20050207";
configureFlags="--disable-dependency-tracking";
src = args.fetchurl {
src = fetchurl {
url = http://mirror.switch.ch/mirror/gentoo/distfiles/uisp-20050207.tar.gz;
sha256 = "1bncxp5yxh9r1yrp04vvhfiva8livi1pwic7v8xj99q09zrwahvw";
};
#buildInputs =(with args; []);
meta = {
description = "tool for AVR microcontrollers which can interface to many hardware in-system programmers";
license = "GPL-2";

View File

@@ -1,8 +1,8 @@
args:
args.stdenv.mkDerivation {
args: with args;
stdenv.mkDerivation {
name = "selenium-rc-0.8.3-binary";
src = args.fetchurl {
src = fetchurl {
url = http://release.openqa.org/cgi-bin/selenium-remote-control-redirect.zip;
sha256 = "694b46a8440011bcedc4fdc6d01fd91c8b4b4b62b7c6629ace4e745ef47f583e";
};
@@ -13,7 +13,7 @@ args.stdenv.mkDerivation {
cp selenium-server-*/*.jar \$out/lib
";
buildInputs =(with args; [unzip]);
buildInputs = [unzip];
meta = {
description = "test tool for web applications";