2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, buildPythonPackage, fetchFromGitHub, ninja, boost, meson, pkg-config, nix, isPy3k, python }:
|
2017-12-29 16:38:05 +00:00
|
|
|
|
2018-06-23 14:27:58 +01:00
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pythonix";
|
2021-01-02 20:22:42 +00:00
|
|
|
version = "0.1.7";
|
2018-06-23 14:27:58 +01:00
|
|
|
format = "other";
|
2017-12-29 16:38:05 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Mic92";
|
|
|
|
repo = "pythonix";
|
|
|
|
rev = "v${version}";
|
2021-01-02 20:22:42 +00:00
|
|
|
sha256 = "1wxqv3i4bva2qq9mx670bcx0g0irjn68fvk28dwvhay9ndwcspqf";
|
2017-12-29 16:38:05 +00:00
|
|
|
};
|
|
|
|
|
2018-06-15 11:52:08 +01:00
|
|
|
disabled = !isPy3k;
|
2017-12-29 16:38:05 +00:00
|
|
|
|
2021-01-02 20:22:42 +00:00
|
|
|
nativeBuildInputs = [ meson ninja pkg-config ];
|
2018-06-15 11:52:08 +01:00
|
|
|
|
|
|
|
buildInputs = [ nix boost ];
|
|
|
|
|
2021-01-02 20:22:42 +00:00
|
|
|
postInstall = ''
|
|
|
|
# This is typically set by pipInstallHook/eggInstallHook,
|
|
|
|
# so we have to do so manually when using meson
|
|
|
|
export PYTHONPATH=$out/${python.sitePackages}:$PYTHONPATH
|
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "nix" ];
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2017-12-29 16:38:05 +00:00
|
|
|
description = ''
|
|
|
|
Eval nix code from python.
|
|
|
|
'';
|
|
|
|
maintainers = [ maintainers.mic92 ];
|
|
|
|
license = licenses.mit;
|
|
|
|
};
|
|
|
|
}
|