[Nix-dev] newbie question nix private package
Sébastien Petitdemange
sebastien.petitdemange at esrf.fr
Thu Feb 23 14:49:20 CET 2017
Hello,
I tried to create a set of private nix packages following this example
(https://gist.github.com/benley/4d7f01805e60b39c2556).
Unfortunately, when I try to build the only package I have, nix build
give me an error:
nix-build --show-trace ~/local/bcupkgs -A pytango
error: attempt to call something which is not a function but a set, at
~/local/bcupkgs/default.nix:21:12
I pretty sure that I wrote something stupid but I can find where.
Is there someone who can help me with this?
Kinds regards,
SEB
My private packages look like this:
├── default.nix
├── development
│ └── python-modules
│ └── pytango
│ ├── default.nix
│ └── setup.patch
└── python_packages.nix
with default.nix:
{ system ? builtins.currentSystem}:
let
pkgs = import <nixpkgs> { inherit system; };
callPackage = pkgs.lib.callPackageWith (pkgs // self);
python27Packages = pkgs.recurseIntoAttrs (
callPackage ./python_packages.nix {
python = pkgs.python27;
self = combinedPython27Packages;
});
pythonPackages = python27Packages;
combinedPython27Packages = pkgs.python27Packages // python27Packages;
self = {
tango = callPackage ./development/libraries/tango {};
pytango = pythonPackages.pytango {};
};
in self
with pytango/default.nix
{ stdenv, fetchurl, pkgconfig, python, buildPythonPackage, boost, numpy,
omniorb, zeromq }:
let version = "9.2.0b"; in
buildPythonPackage rec {
name = "pytango-${version}";
src = fetchurl {
url = "https://github.com/tango-cs/pytango/archive/v${version}.tar.gz";
sha256 = "01wnb9bxszw2pr7jcxcbjdds4y4w7q8cx8ibj73lj6dbjl3ai116";
};
BOOST_ROOT = "";
patches = [
./setup.patch
];
buildInputs = [ pkgconfig boost python omniorb zeromq ];
propagatedBuildInputs = [ numpy ];
buildFlags = "BOOST_LIB=boost_python";
#postInstall = ''
# patchelf --set-rpath "${zeromq}/lib:${omniorb}/lib:$(patchelf
--print-rpath $out/lib/python2.7/site-packages/PyTango/_PyTango.so)"
$out/lib/python2.7/site-packages/PyTango/_PyTango.so
#'';
meta = with stdenv.lib; {
description = "Python bindings for Tango Control System";
homepage =
http://www.esrf.eu/computing/cs/tango/tango_doc/kernel_doc/pytango/latest/index.html;
license = licenses.lgpl3;
maintainers = [ ];
platforms = platforms.linux;
};
}
and with the python_packages.nix:
{ pkgs, stdenv, python, python27Packages, self }:
with pkgs.lib;
with {
inherit (python27Packages) isPyPy isPy33;
};
let
buildPythonPackage = python27Packages.buildPythonPackage;
callPackage = pkgs.lib.callPackageWith (pkgs // self);
in rec {
modules = python.modules;
setupPyBaseBuildFlags = ["--build-base=$out"];
pytango = callPackage ./development/python-modules/pytango { };
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sebastien_petitdemange.vcf
Type: text/x-vcard
Size: 210 bytes
Desc: not available
URL: <http://lists.science.uu.nl/pipermail/nix-dev/attachments/20170223/2335f7ff/attachment.vcf>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://lists.science.uu.nl/pipermail/nix-dev/attachments/20170223/2335f7ff/attachment.sig>
More information about the nix-dev
mailing list