[Nix-dev] nix-build failing to run

Tony White tonywhite100 at googlemail.com
Sat Jul 25 10:00:06 CEST 2009


2009/7/25 Tony White <tonywhite100 at googlemail.com>:
> 2009/7/25 Bill Trost <trost at cloud.rain.com>:
>> Lluís Batlle wrote:
>>    I think you wanted to write something like one of those sparse .nix
>>    files in nixpkgs, and tried to build from it as if it could work
>>    isolated from the rest of nixpkgs.
>>
>> Yes, exactly. I've included my current .nix files, as Marc suggested.
>>
>>    Following the imports from default.nix, you will end up in
>>    pkgs/top-level/all-packages.nix. Read a bit this file, and see how
>>    many functions from .nix files are imported and called with the proper
>>    parameters (stdenv, fetchurl, ...).
>>
>>    You will notice that also your $HOME/.nixpkgs/config.nix is imported
>>    somewhere, and try to guess what does a packagesOverride attribute....
>>
>> These hints were very helpful. I was able to put together config.nix that
>> imports my .nix file (also attached). Now, I'm getting a new error:
>>
>>    nix-build -f pkgs/top-level/all-packages.nix   --no-out-link   -A quilt
>>    error: infinite recursion encountered
>>
>> I'm again mystified -- I don't see any recursion at all in what I wrote, and no
>> clue as to how to get nix-build to tell me why it thinks it's recursing.
>>
>> Thank again,
>> Bill
>>
>>
>> trost at funnel:~/.nixpkgs$ cat ../quilt/default.nix
>> {stdenv, fetchurl}:
>>
>> stdenv.mkDerivation {
>>  name = "quilt-0.48";
>>  src = fetchurl {
>>    url = "http://savannah.inetbridge.net/quilt/quilt-0.48.tar.gz";
>>    sha256 = "...";
>>  };
>>
>>  meta = {
>>    homepage = http://savannah.nongnu.org/projects/quilt;
>>    description = "Quilt allows you to easily manage large numbers of patches by keeping track of the changes each patch makes.";
>>  };
>> }
>>
>> _______________________________________________
>> nix-dev mailing list
>> nix-dev at cs.uu.nl
>> https://mail.cs.uu.nl/mailman/listinfo/nix-dev
>>
>
> Hi Bill,
> Maybe this will help? I've just built quilt with the following here :
>
> /etc/nixos/nixpkgs/pkgs/development/tools/misc/quilt/default.nix
> looks like this :
>
> args: with args;
> let version = "0.48"; in
>
> stdenv.mkDerivation rec {
>  name = "quilt";
>  src = fetchurl {
>    url = "http://mirrors.zerg.biz/nongnu/${name}/${name}-${version}.tar.gz";
>    sha256 = "73fd760d3b5cbf06417576591dc37d67380d189392db9000c21b7cbebee49ffc";
>  };
>
>  buildInputs = [
>    perl
>  ];
>
>  meta = {
>    homepage = "http://savannah.nongnu.org/projects/quilt";
>    description = "Quilt allows you to easily manage large numbers of
> patches by keeping
>                   track of the changes each patch makes. Patches can be applied,
>                   un-applied, refreshed, and more.";
>  };
> }
>
>
>
> And the line added to /etc/nixos/nixpkgs/pkgs/top-level/all-packages.nix
> looks like :
>
>  quilt = import ../development/tools/misc/quilt {
>    inherit stdenv fetchurl perl;
>  };
>
>
> I added quilt to all-packages.nix below pkgconfig and above radare. I
> find it easy to search for where a package entry is in
> all-packages.nix by doing a search for :
> pkgconfig =
> for example to find pkgconfig's entry.
>
> Using that; I got quilt to build and install into the nix store.
>
> Things to watch out for in the build using the expression above :
> It's very basic and optional dependencies are missing so you may want
> to fill them in.
>
> Here's some of the output of things that are missing but optional :
>
> checking for column... no
> configure: WARNING: Using internal column mechanism.  Use option
> '--with-column' to override
>
> column's not in nixpkgs, you would have to add that one yourself by
> creating the expression and adding it as a build dep.
>
> checking for getopt... no
> configure: WARNING: Using internal getopt mechanism.  Use option
> '--with-getopt' to override
>
> getopt is the nixpkgs and you can add that as a build dep if you want
> that functionality, see below.
>
> checking for diffstat... no
> configure: WARNING: diffstat not found, some optional functionalities
> will be missing
>
> diffstat is in nixpkgs, you can add that too if you wanted.
>
> checking for sendmail... no
> configure: WARNING: Using internal sendmail mechanism.  Use option
> '--with-sendmail' to override
>
> Surprisingly sendmail isn't in nixpkgs, you would need to create the
> expression for that first also to add that functionality.
>
> checking for rpm... no
> configure: WARNING: rpmbuild not found, some optional functionalities
> will be missing
>
> I can't see rpmbuild in nixpgs but I would guess that it might pick it
> up if you add rpm as a build dep should you want that functionality
> too.
>
> That's it.
> If you wanted getopt, do like this in ../quilt/default.nix :
>
>  buildInputs = [
>    perl
>    getopt
>  ];
>
> and like this in ../top-level/all-packages.nix :
>
>  quilt = import ../development/tools/misc/quilt {
>    inherit stdenv fetchurl perl getopt;
>  };
>
> You can do the same with the other missing build deps if you need them
> but as noted, some don't exist and you would need to create the
> expressions for them first.
>
> Hope this is helpful/useful?
>
> Thanks,
> Tony
>

Sorry,

getopt is the nixpkgs and you can add that as a build dep if you want
that functionality, see below.

Should be :

getopt is in the nixpkgs and you can add that as a build dep if you want
that functionality, see below.

Hope there's no confusion. :)

Thanks,
Tony



More information about the nix-dev mailing list