[Nix-dev] nix-build -A <pkgs> builds everything

Dieter Vekeman dieter.vekeman at gmail.com
Tue Nov 17 00:03:40 CET 2015


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!



More information about the nix-dev mailing list