[Nix-dev] doc on removing unused dependencies appears to be incorrect in Nix user's guide

Rohan Hart rohan.hart17 at gmail.com
Thu Feb 18 20:09:53 CET 2010


The guide (version 0.15pre19948) says that

    openssl = if sslSupport then openssl else null;

will remove the dependency on openssl.  This appears not to work
although something like this will

    maybeOpenssl = if sslSupport then openssl else null;
    buildInputs = [ maybeOpenssl ]

Better yet, document use of the standard library function

    buildInputs = [ ... ]  # mandatory dependencies
                          ++ stdenv.lib.optional sslSupport openssl

cheers
Rohan



More information about the nix-dev mailing list