[Nix-dev] nix-build -A <pkgs> builds everything
Guillaume Maudoux (Layus)
layus.on at gmail.com
Thu Nov 19 11:46:53 CET 2015
Hi,
The problem is that you build odoo within the nixpkgs defined by the
master branch.
As the master branch defines derivations more recent than the ones
installed, it needs to instantiate them.
But these derivations are so new that even hydra did not build them yet,
so you have no binary support for these.
To get binary support, you should develop on a branch based on the same
commit as you current channel.
See
https://nixos.org/wiki/Create_and_debug_nix_packages#Tracking_upstream_changes_and_avoiding_extra_rebuilding
for extra details and step-by-step commands.
Does it answer your question or did I miss the point ?
Le 17/11/15 00:03, Dieter Vekeman a écrit :
> Hi
>
> I’m trying to create a nix package (for the odoo suite https://github.com/odoo/odoo/tree/8.0).
>
> I checked out nixpkgs
> created a folder in pkgs/applications/networking/odoo
>
> This is what I have so far
> # cat ./pkgs/applications/networking/odoo/default.nix
> { stdenv, fetchurl, buildPythonPackage, pythonPackages }:
>
> buildPythonPackage {
> name = "odoo-8.0.0";
> namePrefix = "";
>
> src = fetchurl {
> url = "https://github.com/odoo/odoo/archive/8.0.0.zip";
> sha256 = "dee5ca67cd314c389fe3fb924c1fc6ba84a913b60956bd0308344e9c0e0cb751";
> };
>
> propagatedBuildInputs = [ ];
>
> # Testing fails.
> doCheck = false;
>
> meta = {
> description = "Odoo ERP / CRM business suite";
> homepage = https://www.odoo.com;
> license = stdenv.lib.licenses.agpl3;
> };
> }
>
> When I run
> nix-build -A odoo
>
> It seems to start building everything from source, is that normal?
>
> I don’t know what kind of info is required but here are a few things
> # nix-channel --list
> nixpkgs https://nixos.org/channels/nixpkgs-unstable
> nixos https://nixos.org/channels/nixos-14.12
>
> # echo $NIX_PATH
> /nix/var/nix/profiles/per-user/root/channels/nixos:nixpkgs=/etc/nixos/nixpkgs:nixos-config=/etc/nixos/configuration.nix
>
> /etc/nixos/nixpkgs points to /src/nixpkgs where I have my clone of nixpkgs
>
> # nix-build -A odoo
> these derivations will be built:
> /nix/store/4f93r775pgxccqiw2y999bhz84irqdi5-xz-5.2.2.drv
> …
> /nix/store/rpa6hx6wi0l40w6q21ia6g8nd655h2hr-gcc-4.9.3.drv
> /nix/store/a1618x2806slj88gyxc944v0xhc84j6f-gcc-wrapper-4.9.3.drv
> /nix/store/i811yml1yxa6grhhx1glld79fs7j5vc2-stdenv-linux-boot.drv
> … etc.
>
> Thanks!
>
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
More information about the nix-dev
mailing list