[Nix-dev] CMake broken
Lluís Batlle i Rossell
viriketo at gmail.com
Tue Sep 28 11:36:48 CEST 2010
On Tue, Sep 28, 2010 at 12:04:25PM +0300, Evgeny Egorochkin wrote:
> В сообщении от Понедельник 27 сентября 2010 15:49:47 автор Peter Simons
> написал:
> > Hi,
> >
> > the recent changes to the CMake expression break the build for me on
> > Linux/x86_64 when useNcurses is 'false'. This setting means that CMake
> > won't have ncurses in buildInputs, but the build seems to expect it
> > anyway and fails trying to compile ncurses-specific modules.
> >
> > Generally speaking, I find these changes somewhat dubious. For instance, we
> > now have three different versions of CMake defined in all-packages.nix:
> >
> > cmake = callPackage ../development/tools/build-managers/cmake { };
> >
> > cmakeCurses = cmake.override { useNcurses = true; };
> >
> > cmakeWithGui = cmakeCurses.override { useQt4 = true; };
> >
> > However, all of these expressions have the same name! That's an ambiguous
> > and undesirable situation. Also, where is the version that has support for
> > both qt and ncurses?
> >
> > Last but not least, I'm not particularly fond of expressions that require
> > 'useDepXY' flags. IMHO, it's both easier and more intuitive to pass 'xy =
> > null' to disable support for that particular dependency.
>
> If all you want is disable the feature, you are right. however if you want to
> enable/reenable feature, it's not as easy.
>
> In theory, useFeature flags are more correct in that you can have by default
> {useFeature=false, feature} and packages that need it can override the flag,
> it's easier for users to enable experimental/unstable features this way.
For me, the useXXX kind of parameters indicate clearly that both cases (use and
not use) are supported by the expression maintainer.
And in some cases, a feature may involve more than one dependency.
More information about the nix-dev
mailing list