From 66097104090e06c43a784193809bc8843a2ec052 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 28 Jul 2010 11:55:54 +0000 Subject: * Get rid of many instances of "args: with args;", and other coding guidelines violations. * Updated libsamplerate to 0.1.7. svn path=/nixpkgs/trunk/; revision=22782 --- .../compilers/adobe-flex-sdk/default.nix | 11 +++---- pkgs/development/compilers/fpc/binary.nix | 25 ++++++++-------- pkgs/development/compilers/fpc/default.nix | 12 +++----- pkgs/development/compilers/hugs/default.nix | 35 +++++++++++----------- pkgs/development/compilers/ocaml/3.08.0.nix | 2 +- pkgs/development/compilers/ocaml/3.09.1.nix | 16 ---------- pkgs/development/compilers/ocaml/3.10.0.nix | 2 +- pkgs/development/compilers/ocaml/3.11.1.nix | 11 +++---- pkgs/development/compilers/scala/default.nix | 2 +- 9 files changed, 49 insertions(+), 67 deletions(-) delete mode 100644 pkgs/development/compilers/ocaml/3.09.1.nix (limited to 'pkgs/development/compilers') diff --git a/pkgs/development/compilers/adobe-flex-sdk/default.nix b/pkgs/development/compilers/adobe-flex-sdk/default.nix index 9cc012d917f1..779aa48c2d06 100644 --- a/pkgs/development/compilers/adobe-flex-sdk/default.nix +++ b/pkgs/development/compilers/adobe-flex-sdk/default.nix @@ -1,4 +1,5 @@ -args: with args; +{ stdenv, fetchurl, unzip }: + stdenv.mkDerivation rec { name = "adobe-flex-sdk-4.0.0.14159-mpl"; @@ -8,7 +9,7 @@ stdenv.mkDerivation rec { sha256 = "1x12sji6g42bm1h7jndkda5vpah6vnkpc13qwq0c4xvbsh8757v5"; }; - phases="installPhase"; + phases = "installPhase"; buildInputs = [ unzip ]; @@ -32,8 +33,8 @@ stdenv.mkDerivation rec { ''; meta = { - description = "flex sdk flash / action script developement kit"; - homepage = "http://www.adobe.com/support/documentation/en/flex/3/releasenotes_flex3_sdk.html#installation"; - license = "MPLv1.1"; # Mozilla Public License Version 1.1 + description = "flex sdk flash / action script developement kit"; + homepage = "http://www.adobe.com/support/documentation/en/flex/3/releasenotes_flex3_sdk.html#installation"; + license = "MPLv1.1"; # Mozilla Public License Version 1.1 }; } diff --git a/pkgs/development/compilers/fpc/binary.nix b/pkgs/development/compilers/fpc/binary.nix index fadc73c051ef..88f0ab910672 100644 --- a/pkgs/development/compilers/fpc/binary.nix +++ b/pkgs/development/compilers/fpc/binary.nix @@ -1,19 +1,20 @@ -args: with args; +{ stdenv, fetchurl }: stdenv.mkDerivation { name = "fpc-2.4.0-binary"; - src = if stdenv.system == "i686-linux" then - fetchurl { - url = "ftp://ftp.chg.ru/pub/lang/pascal/fpc/dist/2.4.0/i386-linux/fpc-2.4.0.i386-linux.tar"; - sha256 = "1zas9kp0b36zxqvb9i4idh2l0nb6qpmgah038l77w6las7ghh0dv"; - } - else if stdenv.system == "x86_64-linux" then - fetchurl { - url = "ftp://ftp.chg.ru/pub/lang/pascal/fpc/dist/2.4.0/x86_64-linux/fpc-2.4.0.x86_64-linux.tar"; - sha256 = "111d11g5ra55hjywx64ldwwflpimsy8zryvap68v0309nyd23f0z"; - } - else null; + src = + if stdenv.system == "i686-linux" then + fetchurl { + url = "ftp://ftp.chg.ru/pub/lang/pascal/fpc/dist/2.4.0/i386-linux/fpc-2.4.0.i386-linux.tar"; + sha256 = "1zas9kp0b36zxqvb9i4idh2l0nb6qpmgah038l77w6las7ghh0dv"; + } + else if stdenv.system == "x86_64-linux" then + fetchurl { + url = "ftp://ftp.chg.ru/pub/lang/pascal/fpc/dist/2.4.0/x86_64-linux/fpc-2.4.0.x86_64-linux.tar"; + sha256 = "111d11g5ra55hjywx64ldwwflpimsy8zryvap68v0309nyd23f0z"; + } + else throw "Not supported on ${stdenv.system}."; builder = ./binary-builder.sh; diff --git a/pkgs/development/compilers/fpc/default.nix b/pkgs/development/compilers/fpc/default.nix index ce1f101b4f56..ee2aa27a621b 100644 --- a/pkgs/development/compilers/fpc/default.nix +++ b/pkgs/development/compilers/fpc/default.nix @@ -1,8 +1,6 @@ -args: +{ stdenv, fetchurl, gawk }: -if args ? startFPC && args.startFPC != null then - -with args; +let startFPC = import ./binary.nix { inherit stdenv fetchurl; }; in stdenv.mkDerivation rec { version = "2.4.0"; @@ -13,10 +11,10 @@ stdenv.mkDerivation rec { sha256 = "1m2g2bafjixbwl5b9lna5h7r56y1rcayfnbp8kyjfd1c1ymbxaxk"; }; - buildInputs = [startFPC gawk]; + buildInputs = [ startFPC gawk ]; preConfigure = - if system == "i686-linux" || system == "x86_64-linux" then '' + if stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux" then '' sed -e "s@'/lib/ld-linux[^']*'@'''@" -i fpcsrc/compiler/systems/t_linux.pas '' else ""; @@ -38,5 +36,3 @@ stdenv.mkDerivation rec { platforms = stdenv.lib.platforms.linux; }; } - -else (import ./default.nix (args // {startFPC = (import ./binary.nix args);})) diff --git a/pkgs/development/compilers/hugs/default.nix b/pkgs/development/compilers/hugs/default.nix index 4f3bbc6294be..db712b18d3fe 100644 --- a/pkgs/development/compilers/hugs/default.nix +++ b/pkgs/development/compilers/hugs/default.nix @@ -1,24 +1,26 @@ -args: with args; +{ composableDerivation, fetchurl }: + let edf = composableDerivation.edf; wwf = composableDerivation.wwf; in + composableDerivation.composableDerivation {} { - - name="hugs98"; + name = "hugs98"; src = fetchurl { - url = http://cvs.haskell.org/Hugs/downloads/2006-09/hugs98-Sep2006.tar.gz; - sha256 = "3cf4d27673564cffe691bd14032369f646233f14daf2bc37c6c6df9f062b46b6"; + url = http://cvs.haskell.org/Hugs/downloads/2006-09/hugs98-Sep2006.tar.gz; + sha256 = "3cf4d27673564cffe691bd14032369f646233f14daf2bc37c6c6df9f062b46b6"; }; - #encode all character I/O using the byte encoding - #determined by the locale in effect at that time. To - #require that the UTF-8 encoding is always used, give - #the --enable-char-encoding=utf8 option. - #[default=autodetect] + #encode all character I/O using the byte encoding + #determined by the locale in effect at that time. To + #require that the UTF-8 encoding is always used, give + #the --enable-char-encoding=utf8 option. + #[default=autodetect] postUnpack = '' find -type f | xargs sed -i 's@/bin/cp@cp@'; ''; - configurePhase="./configure --prefix=\$out --enable-char-encoding=utf8 $configureFlags"; + + configurePhase = "./configure --prefix=\$out --enable-char-encoding=utf8 $configureFlags"; flags = edf { name = "pathCanonicalization"; feat="path-canonicalization"; } @@ -39,16 +41,13 @@ composableDerivation.composableDerivation {} { cfg = { largeBannerSupport = true; # seems to be default - - - char = { cfgOption = "--enable-char-encoding"; blocks = "utf8"; }; - utf8 = { cfgOption = "--enable-char-encoding=utf8"; blocks="char"; }; - - }; + char = { cfgOption = "--enable-char-encoding"; blocks = "utf8"; }; + utf8 = { cfgOption = "--enable-char-encoding=utf8"; blocks="char"; }; + }; meta = { license = "as-is"; # gentoo is calling it this way.. - description = "The HUGS98 Haskell