From 4b36b6132ff2de7a758b51eeae2c529a2edff0f9 Mon Sep 17 00:00:00 2001 From: "Yury G. Kudryashov" Date: Sat, 28 Jan 2012 12:44:42 +0000 Subject: [PATCH] Introduce libiconvOrNull and libiconvOrGlibc One can use these attrs instead of custom 'if ... then libiconv else null'. This way we can maintain the correct 'if ... then' check in one place. NB: I don't know what is the correct condition, so I use stdenv.isLinux. Feel free to fix this. svn path=/nixpkgs/trunk/; revision=31906 --- pkgs/top-level/all-packages.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index fe0ac245c3d6..8c1733925c24 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4054,6 +4054,10 @@ let libiconv = callPackage ../development/libraries/libiconv { }; + libiconvOrNull = if gcc ? libc then null else libiconv; + + libiconvOrLibc = if gcc ? libc then gcc.libc else libiconv; + libid3tag = callPackage ../development/libraries/libid3tag { }; libidn = callPackage ../development/libraries/libidn { };