nixpkgs/pkgs/development/python-modules/pythonix/default.nix
Ryan Burns f3074391a1 python3Packages.pythonix: 0.1.6 -> 0.1.7, fix python module
Pythonix uses the same python as meson, so we need to override
meson to use the right python version or the module won't import.

Also added a pythonImportsCheck to prevent regressions.

Co-authored-by: Jörg Thalheim <joerg@thalheim.io>
2021-01-03 00:53:00 -08:00

37 lines
873 B
Nix

{ stdenv, buildPythonPackage, fetchFromGitHub, ninja, boost, meson, pkg-config, nix, isPy3k, python }:
buildPythonPackage rec {
pname = "pythonix";
version = "0.1.7";
format = "other";
src = fetchFromGitHub {
owner = "Mic92";
repo = "pythonix";
rev = "v${version}";
sha256 = "1wxqv3i4bva2qq9mx670bcx0g0irjn68fvk28dwvhay9ndwcspqf";
};
disabled = !isPy3k;
nativeBuildInputs = [ meson ninja pkg-config ];
buildInputs = [ nix boost ];
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" ];
meta = with stdenv.lib; {
description = ''
Eval nix code from python.
'';
maintainers = [ maintainers.mic92 ];
license = licenses.mit;
};
}