From 93e65a4d5308d3d6e4ea95e7cad6997b037dfd7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Tue, 13 May 2014 20:07:13 +0200 Subject: [PATCH] codeblocks: fix eval on non-linux, minor refactoring --- pkgs/applications/editors/codeblocks/default.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/editors/codeblocks/default.nix b/pkgs/applications/editors/codeblocks/default.nix index 73e9189e63aa..1bf4bb1f8e6f 100644 --- a/pkgs/applications/editors/codeblocks/default.nix +++ b/pkgs/applications/editors/codeblocks/default.nix @@ -1,7 +1,9 @@ { stdenv, fetchurl, autoconf, automake, libtool, pkgconfig, file, zip, wxGTK, gtk -, contribPlugins ? false, hunspell, gamin , boost +, contribPlugins ? false, hunspell, gamin, boost }: +with { inherit (stdenv.lib) optionalString optional optionals; }; + stdenv.mkDerivation rec { name = "${pname}-${stdenv.lib.optionalString contribPlugins "full-"}${version}"; version = "13.12"; @@ -13,13 +15,13 @@ stdenv.mkDerivation rec { }; buildInputs = [ automake autoconf libtool pkgconfig file zip wxGTK gtk ] - ++ stdenv.lib.optionals contribPlugins [ hunspell gamin boost ]; + ++ optionals contribPlugins [ hunspell gamin boost ]; enableParallelBuilding = true; patches = [ ./writable-projects.patch ]; preConfigure = "substituteInPlace ./configure --replace /usr/bin/file ${file}/bin/file"; - postConfigure = "substituteInPlace libtool --replace ldconfig ${stdenv.gcc.libc}/sbin/ldconfig"; + postConfigure = optionalString stdenv.isLinux "substituteInPlace libtool --replace ldconfig ${stdenv.gcc.libc}/sbin/ldconfig"; configureFlags = [ "--enable-pch=no" ] - ++ stdenv.lib.optional contribPlugins "--with-contrib-plugins"; + ++ optional contribPlugins "--with-contrib-plugins"; meta = with stdenv.lib; { maintainers = [ maintainers.linquize ];