[Nix-dev] build question

Marc Weber marco-oweber at gmx.de
Wed Feb 16 14:22:53 CET 2011


Excerpts from Roelof Wobben's message of Wed Feb 16 13:53:09 +0100 2011:
> If a make a new package for Nixos Can I use configure make and then make install or must I use cmake ?

Some packages can be build using multiple builders. One example is
blender. So its not always easy to decide which way to go. This is the
exception though.

How to find out which build system should be used?
Is one of the following files present then you know:


configure[.in], maybe Makefile.am 
===========================

  autotools should be used
  Example: ./configure && make && make install

  This is the default so you don't have to run configure and make
  yourself. See pkgs/stdenv/generic/setup.sh

  phases: configurePhase, buildPhase, installPhase
  which are always run unless you override phases (line 804 in setup.sh)

  Sometimes configure or the makefile is missing and they have to be
  created by automake and autoconf. Often an autogen.sh script is
  present running those tools which correct options.

CMakeLists.txt
===============
  cmake should be used
  Usually "out of source" builds are preferred.
  Thus: mkdir build && cd build && cmake .. && make

  adding cmake to buildInputs installs a "hook" which modifies the
  default system so that cmake is run in the configure phase.
  (-> pkgs/development/tools/build-managers/cmake/setup-hook.sh)

SConstruct
=============
  scons should be used.
  Usage: scons .. (or the like. Have a look at the existing expressions)

  I don't think you'll hit scons builds.

HTH
Marc Weber



More information about the nix-dev mailing list