[Nix-dev] problems building fpc

Marc Weber marco-oweber at gmx.de
Thu Feb 26 16:25:55 CET 2009


Hi Felix.

you're really keen on getting a live dvd, right? *joy*

> > source root is fpcbuild-2.2.2
> > patching sources
> > configuring
> > no configure script, doing nothing
> > building
> > make flags:    Makefile:2260: *** No libgdb.a found, supply NOGDB=1 to 
^^^ so setting NOGDB=1 is one solution.
There are several ways to do this.
You should know about nixpkgs/stdevn/**/setup-new.sh which defines the
default build phases.

When a derivation is instantiated all record attributes (called name,
value pairs in nix) are passed as stdenv excpet passthru and meta.

So the simplest way ist

stdenv.mkDerivation {
  name = ...;
  NOGDB="1";
  ...
}

Of course you can also use a the preConfigure phase
stdenv.mkDerivation {
  name = ...;
  preConfigure = ''
  export NOGDB=1;
  '';
}
that string is evaled just before confiugre is run.

Another way to fix it is passing gdb. Todo this you'll have to open
pkgs/top-level/all-pacakges.nix and jump to "^  fpc" (regex).
add gdb to the list of inputs. Open the imported file (keep in mind that
path/ means path/default.nix if present)
Add the gdb name to the {...} list (first line) if present and to the 
buildInputs list within the derivation.

In almost all cases that's it. I haven't tried yet.

By the way there is some editor support for vim / emacs to assist you
writing and editing nix expressions.

Keep posting if it still doesn't work for you.

Sincerly
Marc Weber



More information about the nix-dev mailing list