init: freecad-py 21.2.0, bpy overlayed version
This commit is contained in:
parent
47eeaa6067
commit
7aa811cb0b
5 changed files with 61 additions and 17 deletions
24
flake.nix
24
flake.nix
|
@ -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
|
||||
|
|
|
@ -6,17 +6,21 @@
|
|||
, pythonImportsCheckHook
|
||||
, config
|
||||
, setuptools
|
||||
, freecad-py
|
||||
, pytestCheckHook
|
||||
, toPythonModule
|
||||
, python
|
||||
, ... }:
|
||||
|
||||
buildPythonPackage rec {
|
||||
name = "rbs-workbench";
|
||||
name = "freecad.robossembler";
|
||||
version = "1.0.0";
|
||||
format = "setuptools";
|
||||
|
||||
src = fetchgit {
|
||||
url = "https://gitlab.com/robossembler/framework";
|
||||
hash = "sha256-N9xFVU4+GbuRR5saMkK7GjKPqKjk2LjcTFWqVhhJ0bs=";
|
||||
rev = "946e83fd159f9ed234b70923df657bc5120cc62f";
|
||||
hash = "sha256-K6vnCQn129TWiMEKe81eBx/1H6PaIriCnkHGRwL8fg0=";
|
||||
rev = "e8bb59124d56c5aee0180b4c7d5c7bfeec9cb1ea";
|
||||
};
|
||||
sourceRoot = "${src.name}/freecad_workbench";
|
||||
|
||||
|
@ -24,11 +28,16 @@ buildPythonPackage rec {
|
|||
setuptools
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
];
|
||||
buildInputs = [ freecad-py ];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
freecad-py
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "freecad.robossembler" ];
|
||||
|
||||
doCheck = false;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Robossembler CG Pipeline Python Module";
|
||||
homepage = "https://gitlab.com/robossembler/framework/rcg_pipeline";
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
, cudaSupport ? config.cudaSupport
|
||||
, numpy
|
||||
, setuptools
|
||||
, bpy-wheel
|
||||
, bpy
|
||||
, ... }:
|
||||
|
||||
buildPythonPackage rec {
|
||||
|
@ -29,9 +29,12 @@ buildPythonPackage rec {
|
|||
|
||||
propagatedBuildInputs = [
|
||||
numpy
|
||||
bpy-wheel
|
||||
bpy
|
||||
];
|
||||
|
||||
# TODO - see later, pyproject.toml duntime deps check doesnt work
|
||||
dontCheckRuntimeDeps = true;
|
||||
|
||||
pythonImportsCheck = [ "rcg_pipeline" ];
|
||||
|
||||
meta = with lib; {
|
||||
|
|
14
pkgs/misc/bpy-lib/default.nix
Normal file
14
pkgs/misc/bpy-lib/default.nix
Normal file
|
@ -0,0 +1,14 @@
|
|||
{ stdenv
|
||||
, bpy
|
||||
, python3
|
||||
}:
|
||||
stdenv.mkDerivation {
|
||||
inherit (bpy) version;
|
||||
pname = "bpy-lib";
|
||||
src = bpy;
|
||||
buildInputs = [ python3 ];
|
||||
installPhase = ''
|
||||
mkdir -p $out/lib/python${python3.pythonVersion}
|
||||
ln -s ${bpy}/bpy $out/lib/python${python3.pythonVersion}/site-packages
|
||||
'';
|
||||
}
|
14
pkgs/misc/freecad-lib/default.nix
Normal file
14
pkgs/misc/freecad-lib/default.nix
Normal file
|
@ -0,0 +1,14 @@
|
|||
{ stdenv
|
||||
, freecad
|
||||
, python3
|
||||
}:
|
||||
stdenv.mkDerivation {
|
||||
inherit (freecad) version;
|
||||
pname = "freecad-lib";
|
||||
src = freecad;
|
||||
buildInputs = [ python3 ];
|
||||
installPhase = ''
|
||||
mkdir -p $out/lib/python${python3.pythonVersion}
|
||||
ln -s ${freecad}/lib $out/lib/python${python3.pythonVersion}/site-packages
|
||||
'';
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue