From b1169e550985976bd22d7d9ac999fb43a8d847e9 Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Fri, 12 Oct 2012 15:22:48 +0200 Subject: [PATCH] ghc-*-binary: remove redundant assertion Any attempt to instantiate these expressions on an unsupported platform is going to 'throw' an error. The call to 'assert' doesn't add any value to that (and generates less readable error messages, too). Further details are available at . --- pkgs/development/compilers/ghc/6.10.1-binary.nix | 8 +------- pkgs/development/compilers/ghc/6.10.2-binary.nix | 8 +------- pkgs/development/compilers/ghc/6.12.1-binary.nix | 8 +------- pkgs/development/compilers/ghc/6.4.2-binary.nix | 8 +------- pkgs/development/compilers/ghc/7.0.4-binary.nix | 8 +------- pkgs/development/compilers/ghc/7.4.2-binary.nix | 8 +------- 6 files changed, 6 insertions(+), 42 deletions(-) diff --git a/pkgs/development/compilers/ghc/6.10.1-binary.nix b/pkgs/development/compilers/ghc/6.10.1-binary.nix index 5a15cc0dff7..353a4176ea4 100644 --- a/pkgs/development/compilers/ghc/6.10.1-binary.nix +++ b/pkgs/development/compilers/ghc/6.10.1-binary.nix @@ -1,11 +1,5 @@ {stdenv, fetchurl, perl, libedit, ncurses, gmp}: -let - supportedPlatforms = ["i686-darwin" "x86_64-linux" "i686-linux"]; -in - -assert stdenv.lib.elem stdenv.system supportedPlatforms; - stdenv.mkDerivation rec { version = "6.10.1"; @@ -104,5 +98,5 @@ stdenv.mkDerivation rec { [ $(./main) == "yes" ] ''; - meta.platforms = supportedPlatforms; + meta.platforms = ["i686-darwin" "x86_64-linux" "i686-linux"]; } diff --git a/pkgs/development/compilers/ghc/6.10.2-binary.nix b/pkgs/development/compilers/ghc/6.10.2-binary.nix index 616c9de7ede..02f1db354a1 100644 --- a/pkgs/development/compilers/ghc/6.10.2-binary.nix +++ b/pkgs/development/compilers/ghc/6.10.2-binary.nix @@ -1,11 +1,5 @@ {stdenv, fetchurl, perl, libedit, ncurses, gmp}: -let - supportedPlatforms = ["x86_64-linux" "i686-linux"]; -in - -assert stdenv.lib.elem stdenv.system supportedPlatforms; - stdenv.mkDerivation rec { version = "6.10.2"; @@ -103,5 +97,5 @@ stdenv.mkDerivation rec { [ $(./main) == "yes" ] ''; - meta.platforms = supportedPlatforms; + meta.platforms = ["x86_64-linux" "i686-linux"]; } diff --git a/pkgs/development/compilers/ghc/6.12.1-binary.nix b/pkgs/development/compilers/ghc/6.12.1-binary.nix index a84b75d705b..23486b5f4fa 100644 --- a/pkgs/development/compilers/ghc/6.12.1-binary.nix +++ b/pkgs/development/compilers/ghc/6.12.1-binary.nix @@ -1,11 +1,5 @@ {stdenv, fetchurl, perl, ncurses, gmp}: -let - supportedPlatforms = ["x86_64-linux" "i686-linux"]; -in - -assert stdenv.lib.elem stdenv.system supportedPlatforms; - stdenv.mkDerivation rec { version = "6.12.1"; @@ -105,5 +99,5 @@ stdenv.mkDerivation rec { [ $(./main) == "yes" ] ''; - meta.platforms = supportedPlatforms; + meta.platforms = ["x86_64-linux" "i686-linux"]; } diff --git a/pkgs/development/compilers/ghc/6.4.2-binary.nix b/pkgs/development/compilers/ghc/6.4.2-binary.nix index 2ed6f2be4fe..1a5bf059e9f 100644 --- a/pkgs/development/compilers/ghc/6.4.2-binary.nix +++ b/pkgs/development/compilers/ghc/6.4.2-binary.nix @@ -1,11 +1,5 @@ {stdenv, fetchurl, perl, readline, ncurses, gmp}: -let - supportedPlatforms = ["i686-darwin" "x86_64-linux" "i686-linux"]; -in - -assert stdenv.lib.elem stdenv.system supportedPlatforms; - stdenv.mkDerivation { name = if stdenv.system == "i686-darwin" then "ghc-6.6.1-binary" else "ghc-6.4.2-binary"; @@ -68,5 +62,5 @@ stdenv.mkDerivation { '' else ""; - meta.platforms = supportedPlatforms; + meta.platforms = ["i686-darwin" "x86_64-linux" "i686-linux"]; } diff --git a/pkgs/development/compilers/ghc/7.0.4-binary.nix b/pkgs/development/compilers/ghc/7.0.4-binary.nix index 0baf9718f85..0bfc81a17a4 100644 --- a/pkgs/development/compilers/ghc/7.0.4-binary.nix +++ b/pkgs/development/compilers/ghc/7.0.4-binary.nix @@ -1,11 +1,5 @@ {stdenv, fetchurl, perl, ncurses, gmp}: -let - supportedPlatforms = ["x86_64-linux" "i686-linux" "i686-darwin" "x86_64-darwin"]; -in - -assert stdenv.lib.elem stdenv.system supportedPlatforms; - stdenv.mkDerivation rec { version = "7.0.4"; @@ -93,5 +87,5 @@ stdenv.mkDerivation rec { [ $(./main) == "yes" ] ''; - meta.platforms = supportedPlatforms; + meta.platforms = ["x86_64-linux" "i686-linux" "i686-darwin" "x86_64-darwin"]; } diff --git a/pkgs/development/compilers/ghc/7.4.2-binary.nix b/pkgs/development/compilers/ghc/7.4.2-binary.nix index 85e10d7090c..e0a8fee4b66 100644 --- a/pkgs/development/compilers/ghc/7.4.2-binary.nix +++ b/pkgs/development/compilers/ghc/7.4.2-binary.nix @@ -1,11 +1,5 @@ {stdenv, fetchurl, perl, ncurses, gmp}: -let - supportedPlatforms = ["x86_64-linux" "i686-linux" "i686-darwin" "x86_64-darwin"]; -in - -assert stdenv.lib.elem stdenv.system supportedPlatforms; - stdenv.mkDerivation rec { version = "7.4.2"; @@ -93,5 +87,5 @@ stdenv.mkDerivation rec { [ $(./main) == "yes" ] ''; - meta.platforms = supportedPlatforms; + meta.platforms = ["x86_64-linux" "i686-linux" "i686-darwin" "x86_64-darwin"]; }