init: freecad-py 21.2.0, bpy overlayed version

This commit is contained in:
Igor Brylyov 2024-04-22 15:51:35 +03:00
parent 47eeaa6067
commit 7aa811cb0b
5 changed files with 61 additions and 17 deletions

View file

@ -32,7 +32,7 @@
pythonPackagesExtensions = prev.pythonPackagesExtensions ++ [
(
python-final: python-prev: {
iopath = python-prev.iopath.overridePythonAttrs (oldAttrs: {
iopath = python-prev.iopath.overridePythonAttrs (oldAttrs: {
version = "unstable";
src = pkgs.fetchFromGitHub {
owner = "facebookresearch";
@ -110,14 +110,11 @@
"-DWITH_INSTALL_PORTABLE=ON"
];
postInstall = ''
mkdir -p $out/lib/python${pkgs.python3.pythonVersion}/site-packages
mkdir -p $out/nix-support
mv $out/bpy $out/lib/python${pkgs.python3.pythonVersion}/site-packages/
mkdir -p $out/lib/python${pkgs.python3.pythonVersion}/site-packages
ln -s $out/bpy $out/lib/python${pkgs.python3.pythonVersion}/site-packages/bpy
echo ${pkgs.python3} >> $out/nix-support/propagated-build-inputs
'';
postFixup = ''
buildPythonPath $out/lib/python${pkgs.python3.pythonVersion}/site-packages
'';
});
bpy-wheel = pkgs.python3Packages.callPackage ./pkgs/development/python-modules/bpy-wheel { };
pysdf = pkgs.python3Packages.callPackage ./pkgs/development/python-modules/pysdf { };
@ -132,8 +129,10 @@
ansitable = pkgs.python3Packages.callPackage ./pkgs/development/python-modules/ansitable { };
megapose6d = pkgs.python3Packages.callPackage ./pkgs/development/python-modules/megapose6d { inherit webdataset; };
spatialmath = pkgs.python3Packages.callPackage ./pkgs/development/python-modules/spatialmath { inherit ansitable; };
rcg-pipeline = pkgs.python3Packages.callPackage ./pkgs/development/python-modules/rcg-pipeline { inherit bpy-wheel; };
rbs-workbench = pkgs.python3Packages.callPackage ./pkgs/development/python-modules/freecad.robossembler { };
rcg-pipeline = pkgs.python3Packages.callPackage ./pkgs/development/python-modules/rcg-pipeline { bpy = bpy-lib; };
rbs-workbench = pkgs.python3Packages.callPackage ./pkgs/development/python-modules/freecad.robossembler { inherit freecad-py; };
freecad-py = pkgs.python3Packages.toPythonModule (pkgs.callPackage ./pkgs/misc/freecad-lib { });
bpy-lib = pkgs.python3Packages.toPythonModule bpy;
in
{
inherit pkgs;
@ -146,7 +145,7 @@
};
packages = {
inherit mayo pysdf fstl unified-planning test-script blender bpy bpy-wheel rcg-pipeline;
inherit mayo pysdf fstl unified-planning test-script blender bpy bpy-wheel rcg-pipeline freecad-py bpy-lib;
};
devShells.ci = pkgs.mkShell { buildInputs = [ pkgs.jq ]; };
@ -217,10 +216,15 @@
spatialmath
rcg-pipeline
rbs-workbench
ledger
];
in
pkgs.mkShell {
packages = [ (pkgs.python3.withPackages my-python-packages) pkgs.freecad mayo pkgs.bashInteractive ];
packages = with pkgs; [
freecad
mayo
bashInteractive
] ++ [ (pkgs.python3.withPackages my-python-packages) ];
buildInputs = [ ];
# Run when the shell is started up