[Nix-dev] installing a locally modified package / undefined variable in maintainers

Roland Koebler rk-list at simple-is-better.org
Wed Aug 3 15:52:02 CEST 2016


Hi again,

I'm using Nix on Debian 8 (and I really like Nix, thanks!).
For testing, I'm trying to install several different Python3-versions.

In addition to Python 3.4 and 3.5 (as described in my other mail), I'm trying
to build and install Python 3.2.3 (which is not in nixpkgs) for testing.
Building works, but installing fails with

    error: undefined variable ‘simons’ at /home/user/.../pkgs/python3.2.3/default.nix:103:50

The line in default.nix is:

    maintainers = with stdenv.lib.maintainers; [ simons chaoflow cstrahan ];

Details:

- Since Python 3.2.3 is not in nixpkgs, I've copied the package-files from
  Python 3.2.6 [1] and modified version and sha256 in default.nix:

    version = "${majorVersion}.6";
    ->
    version = "${majorVersion}.3";

    sha256 = "1p3vvvh3qw8avq959hdl6bq5d6r7mbhrnigqzgx6mllzh40va4hx";
    ->
    sha256 = "23c16f621f21e54987079765c060196cbe50235c7867147c6126d433054b1754";

- Then, I've added a custom-packages.nix (according to [2]):

    { system ? builtins.currentSystem }:

    let
        pkgs = import <nixpkgs> { inherit system; };
        callPackage = pkgs.lib.callPackageWith (pkgs // pkgs.xlibs);
    in
    rec {
        python323 = callPackage ./pkgs/python3.2.3 {};
    }

- Now, I could build it with:

    $ nix-build custom-packages.nix -A python323

- But installing fails

    $ nix-env -f custom-packages.nix -iA python323
    installing ‘mypython3-3.2.3’
    error: undefined variable ‘simons’ at /home/user/.../pkgs/python3.2.3/default.nix:103:50


Could you tell me what I've done wrong?


[1] /nix/store/...-nixpkgs/nixpkgs/pkgs/development/interpreters/python/3.2/
[2] https://sandervanderburg.blogspot.de/2014/07/managing-private-nix-packages-outside.html


thanks,
Roland



More information about the nix-dev mailing list