Compare commits
29 commits
10-ros-pac
...
master
Author | SHA1 | Date | |
---|---|---|---|
fe3998501d | |||
63811823bd | |||
fa6d03b687 | |||
9c9356f385 | |||
335a5ede21 | |||
![]() |
327d559f71 | ||
cc723b1bb2 | |||
db7a44f479 | |||
7aa811cb0b | |||
47eeaa6067 | |||
f5c111bae7 | |||
f7384cc075 | |||
d203eabcdb | |||
dd6fe64af1 | |||
9e3b9e97d7 | |||
4687ec3b24 | |||
927f6f8eab | |||
![]() |
b697e5df03 | ||
1c1d90e53b | |||
cf98f8aae7 | |||
8f97bb0558 | |||
a082f90c91 | |||
053bfcc1e0 | |||
5bb350b79c | |||
3fd5b354c6 | |||
51958f2bd6 | |||
3ae3ee190c | |||
5b8cd6e4ad | |||
![]() |
c7a6ae86b8 |
32 changed files with 569 additions and 602 deletions
1
.envrc
Normal file
1
.envrc
Normal file
|
@ -0,0 +1 @@
|
||||||
|
use flake . --impure
|
|
@ -10,6 +10,7 @@ default:
|
||||||
before_script:
|
before_script:
|
||||||
- mkdir -p /etc/nix
|
- mkdir -p /etc/nix
|
||||||
- echo "experimental-features = nix-command flakes" >> /etc/nix/nix.conf
|
- echo "experimental-features = nix-command flakes" >> /etc/nix/nix.conf
|
||||||
|
- export NIXPKGS_ALLOW_UNFREE=1
|
||||||
- cachix use "$CACHIX_CACHE_NAME"
|
- cachix use "$CACHIX_CACHE_NAME"
|
||||||
|
|
||||||
general-packages:
|
general-packages:
|
||||||
|
@ -17,18 +18,23 @@ general-packages:
|
||||||
inherit:
|
inherit:
|
||||||
default: [before_script, image]
|
default: [before_script, image]
|
||||||
script:
|
script:
|
||||||
- cachix watch-exec robossembler -- nix develop .#all -c echo "General Packages is BUILT"
|
- cachix watch-exec robossembler -- nix develop .#all --impure -c echo "General Packages is BUILT"
|
||||||
|
|
||||||
ros-packages:
|
ros-packages:
|
||||||
stage: build
|
stage: build
|
||||||
inherit:
|
inherit:
|
||||||
default: [before_script, image]
|
default: [before_script, image]
|
||||||
script:
|
script:
|
||||||
- cachix watch-exec robossembler -- nix develop .#ros -c echo "ROS environment is BUILT"
|
# Gazebo security freeimage-unstable-2021-11-01’ is marked as insecure
|
||||||
|
# /nix/store/28gcncrir6wd8n6n762y92lbm632cxcy-gazebo-sim
|
||||||
|
# └───/nix/store/bw3nx4nrvwbnj9b6hdg4p0iyxnakqca8-gz-common5-5.4.2
|
||||||
|
# └───/nix/store/hwr0f25hiqv1pjnqyg0sp1gv9grb198b-freeimage-unstable-2021-11-01
|
||||||
|
- export NIXPKGS_ALLOW_INSECURE=1
|
||||||
|
- cachix watch-exec robossembler -- nix develop .#ros --impure -c echo "ROS environment is BUILT"
|
||||||
|
|
||||||
perception-packages:
|
perception-packages:
|
||||||
stage: build
|
stage: build
|
||||||
inherit:
|
inherit:
|
||||||
default: [before_script, image]
|
default: [before_script, image]
|
||||||
script:
|
script:
|
||||||
- cachix watch-exec robossembler -- nix develop .#perception -c echo "PERCEPTION packages is BUILT"
|
- cachix watch-exec robossembler -- nix develop .#perception --impure -c echo "PERCEPTION packages is BUILT"
|
||||||
|
|
|
@ -2,11 +2,11 @@
|
||||||
|
|
||||||
[Cachix Cache](https://robossembler.cachix.org)
|
[Cachix Cache](https://robossembler.cachix.org)
|
||||||
|
|
||||||
Для установки в свою систему blender 3.4.1
|
Для установки в свою систему Blender с настройками Robossembler
|
||||||
* `nix profile install gitlab:robossembler/nix-robossembler-overlay#blender`
|
* `nix profile install gitlab:robossembler/nix-robossembler-overlay#blender`
|
||||||
|
|
||||||
Запуск локальных окружений для разработки
|
Запуск локальных окружений для разработки
|
||||||
* Python-модуль bpy: `nix develop gitlab:robossembler/nix-robossembler-overlay#bpy`
|
* Python-окружение для Perception навыков робота: `nix develop gitlab:robossembler/nix-robossembler-overlay#perception`
|
||||||
* ROS2 Rolling `nix develop gitlab:robossembler/nix-robossembler-overlay#ros`
|
* ROS2 Rolling `nix develop gitlab:robossembler/nix-robossembler-overlay#ros`
|
||||||
|
|
||||||
Для внесения изменений в репозиторий:
|
Для внесения изменений в репозиторий:
|
||||||
|
|
63
default.nix
63
default.nix
|
@ -1,4 +1,4 @@
|
||||||
{ mkDerivation, mayo, wrapQtAppsHook, lib }:
|
{ mkDerivation, pkgs, mayo, wrapQtAppsHook, lib, rbs-workbench, cad-gen, cg-gen }:
|
||||||
let
|
let
|
||||||
step2stl =
|
step2stl =
|
||||||
name: file:
|
name: file:
|
||||||
|
@ -20,6 +20,63 @@ let
|
||||||
rm ${pname}
|
rm ${pname}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
rlib = { inherit step2stl; };
|
|
||||||
|
freecad2parts =
|
||||||
|
file:
|
||||||
|
let
|
||||||
|
pname = "${file}-parts";
|
||||||
|
extension = lib.last (lib.strings.splitString "." file);
|
||||||
|
cad_export_script = pkgs.writers.writePython3 "cad_export_script.py"
|
||||||
|
{ libraries = [ rbs-workbench ]; }
|
||||||
|
''
|
||||||
|
import FreeCAD as App
|
||||||
|
import freecad.robossembler.utils.freecad_exporters as rbs
|
||||||
|
import sys
|
||||||
|
|
||||||
|
path = sys.argv[4]
|
||||||
|
print(path)
|
||||||
|
doc = App.openDocument(path)
|
||||||
|
rbs.publish_project_database(doc)
|
||||||
|
App.closeDocument(doc.Name)
|
||||||
|
'';
|
||||||
|
in
|
||||||
|
lib.throwIfNot
|
||||||
|
(lib.elem extension ["FCStd"])
|
||||||
|
''Input file have a "${extension}" extension, but valid FreeCAD file should have "FCStd" extention''
|
||||||
|
mkDerivation rec {
|
||||||
|
inherit pname;
|
||||||
|
version = "unstable";
|
||||||
|
src = ./.;
|
||||||
|
nativeBuildInputs = [ cad-gen pkgs.freecad ] ++ pkgs.freecad.buildInputs;
|
||||||
|
buildInputs = [ ];
|
||||||
|
dontWrapQtApps = true;
|
||||||
|
buildPhase = ''
|
||||||
|
export PYTHONPATH="${rbs-workbench}/${pkgs.python3.sitePackages}"
|
||||||
|
${pkgs.freecad}/bin/freecadcmd ${cad_export_script} -- --pass $1
|
||||||
|
#${pkgs.freecad}/bin/freecadcmd -h
|
||||||
|
#${cad-gen}/bin/cad-gen ${file}
|
||||||
|
mv parts* trees* $out
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
parts-packages =
|
||||||
|
parts-package:
|
||||||
|
let
|
||||||
|
parts = lib.trivial.importJSON "${parts-package.src}/parts.json";
|
||||||
|
pkgSet = builtins.listToAttrs (map ({ material_path, name, part_path }: { inherit name; value = part_path; }) parts );
|
||||||
|
mkPkg =
|
||||||
|
{ name, value }:
|
||||||
|
mkDerivation {
|
||||||
|
src = "${parts-package}";
|
||||||
|
pname = name;
|
||||||
|
installPhase = ''
|
||||||
|
outputs = [ "stl" ];
|
||||||
|
ln ${parts-package}/${value} $stl
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
in
|
||||||
|
lib.lists.forEach mkPkg pkgSet;
|
||||||
|
|
||||||
|
rlib = { inherit step2stl freecad2parts parts-packages; };
|
||||||
in
|
in
|
||||||
rlib
|
rlib
|
||||||
|
|
124
flake.lock
generated
124
flake.lock
generated
|
@ -1,15 +1,12 @@
|
||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"flake-utils": {
|
"flake-utils": {
|
||||||
"inputs": {
|
|
||||||
"systems": "systems"
|
|
||||||
},
|
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1689068808,
|
"lastModified": 1659877975,
|
||||||
"narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=",
|
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "flake-utils",
|
"repo": "flake-utils",
|
||||||
"rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4",
|
"rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -18,13 +15,91 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"flake-utils_2": {
|
||||||
|
"inputs": {
|
||||||
|
"systems": "systems"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1705309234,
|
||||||
|
"narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"gazebo-overlay": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-utils": [
|
||||||
|
"ros-overlay",
|
||||||
|
"flake-utils"
|
||||||
|
],
|
||||||
|
"nixgl": "nixgl",
|
||||||
|
"nixpkgs": [
|
||||||
|
"ros-overlay",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1711612492,
|
||||||
|
"narHash": "sha256-QEz9HZCth8kxz8nrqZ9/hhomAfSW6E0ngmoIb00NXQ8=",
|
||||||
|
"owner": "movefasta",
|
||||||
|
"repo": "gazebo-sim-overlay",
|
||||||
|
"rev": "4f1c3c115b55795ec7d7af43d0b16f7ef18dcc44",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "movefasta",
|
||||||
|
"repo": "gazebo-sim-overlay",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixgl": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-utils": "flake-utils",
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1685908677,
|
||||||
|
"narHash": "sha256-E4zUPEUFyVWjVm45zICaHRpfGepfkE9Z2OECV9HXfA4=",
|
||||||
|
"owner": "guibou",
|
||||||
|
"repo": "nixGL",
|
||||||
|
"rev": "489d6b095ab9d289fe11af0219a9ff00fe87c7c5",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "guibou",
|
||||||
|
"repo": "nixGL",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1695298503,
|
"lastModified": 1660551188,
|
||||||
"narHash": "sha256-eDuN/+479v5gfVqwmJRYVX/Skh+TYSifAXdJ9xMqiP4=",
|
"narHash": "sha256-a1LARMMYQ8DPx1BgoI/UN4bXe12hhZkCNqdxNi6uS0g=",
|
||||||
|
"owner": "nixos",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "441dc5d512153039f19ef198e662e4f3dbb9fd65",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nixos",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs_2": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1712307699,
|
||||||
|
"narHash": "sha256-/PzHcPvBvJeZTY9JCEtbNljYLecwggveHQ2oHPlTycA=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "b1370f72c01cee73c8648baf158453d60f3127e2",
|
"rev": "3541c7628de9414f999ced044c95a284584f4ec1",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -34,13 +109,13 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_3": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1691006197,
|
"lastModified": 1707268954,
|
||||||
"narHash": "sha256-DbtxVWPt+ZP5W0Usg7jAyTomIM//c3Jtfa59Ht7AV8s=",
|
"narHash": "sha256-2en1kvde3cJVc3ZnTy8QeD2oKcseLFjYPLKhIGDanQ0=",
|
||||||
"owner": "lopsided98",
|
"owner": "lopsided98",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "66aedfd010204949cb225cf749be08cb13ce1813",
|
"rev": "f8e2ebd66d097614d51a56a755450d4ae1632df1",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -53,24 +128,29 @@
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": [
|
"flake-utils": [
|
||||||
"ros-flake",
|
"ros-overlay",
|
||||||
"flake-utils"
|
"flake-utils"
|
||||||
],
|
],
|
||||||
"nixpkgs": "nixpkgs",
|
"gazebo-overlay": "gazebo-overlay",
|
||||||
"ros-flake": "ros-flake"
|
"nixpkgs": "nixpkgs_2",
|
||||||
|
"ros-nixpkgs": [
|
||||||
|
"ros-overlay",
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"ros-overlay": "ros-overlay"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ros-flake": {
|
"ros-overlay": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": "flake-utils",
|
"flake-utils": "flake-utils_2",
|
||||||
"nixpkgs": "nixpkgs_2"
|
"nixpkgs": "nixpkgs_3"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1694916346,
|
"lastModified": 1715462692,
|
||||||
"narHash": "sha256-3Fb5sRqFhpIVCK8hH0dtRNyJHV7zvVavZEbTGZWNy4g=",
|
"narHash": "sha256-ClDP5aXC46y4wyHhEETWHitqIoNLDrt6uRX2HpZtmd0=",
|
||||||
"owner": "lopsided98",
|
"owner": "lopsided98",
|
||||||
"repo": "nix-ros-overlay",
|
"repo": "nix-ros-overlay",
|
||||||
"rev": "148dc07305802c41369839fb2d4d5291571ddb69",
|
"rev": "f1c32375c27e59a2e8107d52357a5ee44b3c4413",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
230
flake.nix
230
flake.nix
|
@ -2,197 +2,103 @@
|
||||||
description = "Robossembler Development Environments on Nix";
|
description = "Robossembler Development Environments on Nix";
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs?ref=master";
|
nixpkgs.url = "github:NixOS/nixpkgs?ref=master";
|
||||||
flake-utils.follows = "ros-flake/flake-utils";
|
flake-utils.follows = "ros-overlay/flake-utils";
|
||||||
ros-flake.url = "github:lopsided98/nix-ros-overlay?ref=develop";
|
ros-overlay.url = "github:lopsided98/nix-ros-overlay?ref=develop";
|
||||||
|
ros-nixpkgs.follows = "ros-overlay/nixpkgs";
|
||||||
|
gazebo-overlay = {
|
||||||
|
url = "github:movefasta/gazebo-sim-overlay";
|
||||||
|
inputs.flake-utils.follows = "ros-overlay/flake-utils";
|
||||||
|
inputs.nixpkgs.follows = "ros-overlay/nixpkgs";
|
||||||
|
|
||||||
|
# Transitive inputs "not in registry" https://github.com/NixOS/nix/issues/5790
|
||||||
|
# inputs.nixgl.inputs.nixpkgs.follows = "ros-overlay/nixpkgs";
|
||||||
|
# inputs.nixgl.inputs.flake-utils.follows = "ros-overlay/flake-utils";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, ros-flake, flake-utils }:
|
outputs = { self, nixpkgs, ros-overlay, ros-nixpkgs, gazebo-overlay, flake-utils }:
|
||||||
flake-utils.lib.eachDefaultSystem
|
flake-utils.lib.eachDefaultSystem
|
||||||
(system:
|
(system:
|
||||||
let
|
let
|
||||||
pkgs = nixpkgs.legacyPackages.${system}.extend overlay;
|
pkgs = import nixpkgs { inherit system;
|
||||||
ros = ros-flake.legacyPackages.${system};
|
overlays = [
|
||||||
|
(import ./overlay.nix)
|
||||||
overlay = final: prev: {
|
gazebo-overlay.overlays.default
|
||||||
# -- PLACEHOLDER for overlay
|
];
|
||||||
# freecad = prev.freecad.overrideAttrs
|
config.allowUnfree = true; # for cuda
|
||||||
# (old: { cmakeFlags = old.cmakeFlags ++ [ "-DBUILD_GUI=OFF" ]; });
|
};
|
||||||
# cmakeFlag -BUILD_GUI=OFF for build without gui
|
ros = import ros-nixpkgs { inherit system;
|
||||||
pythonPackagesExtensions = prev.pythonPackagesExtensions ++ [
|
overlays = [
|
||||||
(
|
ros-overlay.overlays.default
|
||||||
python-final: python-prev: {
|
(import ./ros)
|
||||||
iopath = python-prev.iopath.overridePythonAttrs (oldAttrs: {
|
|
||||||
version = "unstable";
|
|
||||||
src = pkgs.fetchFromGitHub {
|
|
||||||
owner = "facebookresearch";
|
|
||||||
repo = "iopath";
|
|
||||||
rev = "9dcb63a46447556460fdb65c21aa6d094a7a788c";
|
|
||||||
hash = "sha256-X1LTOfbIAMy6gToNYS0JpeJpHi0jHPsEjrnCq2c9U0E=";
|
|
||||||
};
|
|
||||||
});
|
|
||||||
}
|
|
||||||
)
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
# overrided packages and attributes for nix-ros-overlay
|
|
||||||
humble-overrided = ros.humble.overrideScope (final: prev: {
|
|
||||||
# remove after update github:lopsided98/nixpkgs/nix-ros for https://github.com/NixOS/nixpkgs/pull/224099
|
|
||||||
behaviortree-cpp-v3 = prev.behaviortree-cpp-v3.overrideAttrs (old: {
|
|
||||||
propagatedBuildInputs = old.propagatedBuildInputs ++ [ pkgs.zeromq ];
|
|
||||||
});
|
|
||||||
moveit-core = prev.moveit-core.overrideAttrs (old: {
|
|
||||||
propagatedBuildInputs = old.propagatedBuildInputs ++ [ prev.tf2-kdl ];
|
|
||||||
});
|
|
||||||
moveit-kinematics = prev.moveit-kinematics.overrideAttrs (old: {
|
|
||||||
propagatedBuildInputs = old.propagatedBuildInputs ++ [ final.moveit-ros-planning ];
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
# robossembler custom packages; defined here for share between devShells and packages
|
|
||||||
cg_preferences = pkgs.fetchgit {
|
|
||||||
url = "https://gitflic.ru/project/brothermechanic/cg_preferences.git";
|
|
||||||
sha256 = "sha256-ahEakvluX7vd+OY6zaDeZIFS8WbsTevRzuEXlBu2/fg=";
|
|
||||||
};
|
|
||||||
rs_logo = pkgs.fetchgit {
|
|
||||||
url = "https://gitlab.com/robossembler/logo.git";
|
|
||||||
rev = "0a0235cd154a59b711e87456206ccd7ba69a7e4e";
|
|
||||||
sha256 = "sha256-/QsgKdtDHNymsTEmhIzSrOKNUqqkXl8coy+5LwIEkas=";
|
|
||||||
fetchLFS = true;
|
|
||||||
};
|
|
||||||
blender' = pkgs.blender.override {
|
|
||||||
python310Packages = pkgs.python311Packages;
|
|
||||||
cudaSupport = false;
|
|
||||||
spaceNavSupport = false;
|
|
||||||
waylandSupport = false;
|
|
||||||
};
|
|
||||||
blender = blender'.overrideAttrs (old: {
|
|
||||||
optix = pkgs.fetchzip {
|
|
||||||
# url taken from the archlinux blender PKGBUILD
|
|
||||||
url = "https://developer.download.nvidia.com/redist/optix/v7.4/OptiX-7.4.0-Include.zip";
|
|
||||||
sha256 = "sha256-ca08XetwaUYC9foeP5bff9kcDfuFgEzopvjspn2s8RY=";
|
|
||||||
};
|
|
||||||
patches = old.patches ++ [ "${cg_preferences}/patches/cg-defaults.patch" ];
|
|
||||||
buildInputs = old.buildInputs ++ [ pkgs.imath pkgs.git ];
|
|
||||||
postPatch = old.postPatch + ''
|
|
||||||
cp ${cg_preferences}/share/cg_preferences_service.py scripts/startup/
|
|
||||||
cp ${cg_preferences}/share/startup.blend release/datafiles/
|
|
||||||
cp ${rs_logo}/raster/robossembler_1024x512_roboty-rossii.png release/datafiles/splash.png
|
|
||||||
'';
|
|
||||||
env.NIX_CFLAGS_COMPILE = old.env.NIX_CFLAGS_COMPILE + " -I${pkgs.imath}/include/Imath";
|
|
||||||
postInstall = old.postInstall + ''
|
|
||||||
cp -r ${cg_preferences}/cg_preferences $out/share/blender/${
|
|
||||||
pkgs.lib.versions.majorMinor pkgs.blender.version
|
|
||||||
}/scripts/addons/
|
|
||||||
'';
|
|
||||||
});
|
|
||||||
bpy = pkgs.python3Packages.callPackage ./pkgs/development/python-modules/bpy { };
|
|
||||||
pysdf = pkgs.python3Packages.callPackage ./pkgs/development/python-modules/pysdf { };
|
|
||||||
pytorch3d = pkgs.python3Packages.callPackage ./pkgs/development/python-modules/pytorch3d { };
|
|
||||||
mayo = pkgs.libsForQt5.callPackage ./pkgs/misc/mayo { };
|
|
||||||
fstl = pkgs.libsForQt5.callPackage ./pkgs/misc/fstl { };
|
|
||||||
open3d = pkgs.python3Packages.callPackage ./pkgs/development/python-modules/open3d { };
|
|
||||||
unified-planning = pkgs.python3Packages.callPackage ./pkgs/development/python-modules/unified-planning { };
|
|
||||||
blenderproc = pkgs.python3Packages.callPackage ./blenderproc.nix { };
|
|
||||||
test-script = pkgs.python3Packages.callPackage ./pkgs/development/python-modules/test-script { };
|
|
||||||
webdataset = pkgs.python3Packages.callPackage ./pkgs/development/python-modules/webdataset { };
|
|
||||||
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; };
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
inherit pkgs;
|
|
||||||
|
|
||||||
rlib = import ./. {
|
rlib = import ./. {
|
||||||
|
inherit pkgs;
|
||||||
|
inherit (pkgs) lib mayo rbs-workbench cad-gen cg-gen;
|
||||||
inherit (pkgs.stdenv) mkDerivation;
|
inherit (pkgs.stdenv) mkDerivation;
|
||||||
inherit (pkgs) lib;
|
|
||||||
inherit mayo;
|
|
||||||
inherit (pkgs.libsForQt5) wrapQtAppsHook;
|
inherit (pkgs.libsForQt5) wrapQtAppsHook;
|
||||||
};
|
};
|
||||||
|
|
||||||
packages = {
|
packages = {
|
||||||
inherit mayo pysdf fstl unified-planning test-script blender;
|
inherit (pkgs) cad-gen cg-gen blender dataset-gen pddl-spec-gen;
|
||||||
zoz = pkgs.btop;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
devShells.ci = pkgs.mkShell { buildInputs = [ pkgs.jq ]; };
|
inherit ros pkgs;
|
||||||
|
|
||||||
devShells.ros =
|
devShells = {
|
||||||
pkgs.mkShell {
|
default =
|
||||||
buildInputs = (with humble-overrided; [
|
|
||||||
ros2run
|
|
||||||
rmw-fastrtps-dynamic-cpp
|
|
||||||
urdf
|
|
||||||
ament-pep257
|
|
||||||
ament-lint-auto
|
|
||||||
xacro
|
|
||||||
ament-cmake
|
|
||||||
rclcpp-action
|
|
||||||
tf2
|
|
||||||
action-msgs
|
|
||||||
ament-copyright
|
|
||||||
pythonPackages.pytest
|
|
||||||
rosidl-default-generators
|
|
||||||
behaviortree-cpp-v3
|
|
||||||
geometry-msgs
|
|
||||||
rosidl-default-runtime
|
|
||||||
rclpy
|
|
||||||
std-msgs
|
|
||||||
ament-lint-common
|
|
||||||
ament-flake8
|
|
||||||
tf2-ros
|
|
||||||
rclcpp
|
|
||||||
moveit-core
|
|
||||||
moveit-msgs
|
|
||||||
moveit-ros-planning
|
|
||||||
moveit-ros-planning-interface
|
|
||||||
gazebo-ros2-control
|
|
||||||
plansys2-bringup
|
|
||||||
image-transport
|
|
||||||
cv-bridge
|
|
||||||
example-interfaces
|
|
||||||
]) ++ (with pkgs; [ nlohmann_json glog lua5_3_compat ]);
|
|
||||||
RMW_IMPLEMENTATION = "rmw_fastrtps_dynamic_cpp";
|
|
||||||
};
|
|
||||||
|
|
||||||
devShells.all = pkgs.mkShell {
|
|
||||||
packages = [ mayo blender bpy pysdf fstl ];
|
|
||||||
};
|
|
||||||
|
|
||||||
devShells.perception =
|
|
||||||
let
|
|
||||||
rbs-packages = p: with p; [
|
|
||||||
pytorch3d
|
|
||||||
torch
|
|
||||||
torchvision
|
|
||||||
torchaudio
|
|
||||||
detectron2
|
|
||||||
];
|
|
||||||
in
|
|
||||||
pkgs.mkShell {
|
|
||||||
packages = [ (pkgs.python3.withPackages rbs-packages) ];
|
|
||||||
};
|
|
||||||
|
|
||||||
devShells.default =
|
|
||||||
let
|
let
|
||||||
my-python-packages = p: with p; [
|
my-python-packages = p: with p; [
|
||||||
pysdf
|
|
||||||
unified-planning
|
unified-planning
|
||||||
pybullet
|
pybullet
|
||||||
scipy
|
scipy
|
||||||
spatialmath
|
spatialmath
|
||||||
bpy
|
rcg-pipeline
|
||||||
|
rbs-workbench
|
||||||
];
|
];
|
||||||
in
|
in
|
||||||
pkgs.mkShell {
|
pkgs.mkShell {
|
||||||
packages = [ (pkgs.python3.withPackages my-python-packages) pkgs.freecad mayo pkgs.bashInteractive ];
|
packages = (with pkgs; [ freecad mayo ]) ++ [ (pkgs.python3.withPackages my-python-packages) ];
|
||||||
buildInputs = [ ];
|
|
||||||
|
|
||||||
# Run when the shell is started up
|
|
||||||
shellHook = ''
|
|
||||||
${pkgs.python3}/bin/python --version
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
ros = pkgs.mkShell {
|
||||||
|
name = "ROS environment";
|
||||||
|
packages = [
|
||||||
|
ros.colcon
|
||||||
|
(with ros.rosPackages.humble; buildEnv {
|
||||||
|
paths = [
|
||||||
|
ros-core
|
||||||
|
rmw-fastrtps-dynamic-cpp
|
||||||
|
];
|
||||||
|
})
|
||||||
|
];
|
||||||
|
# ROS 2 middleware variants, for Cyclone DDS replace with "rmw_cyclonedds_cpp" and add rmw-cyclonedds-cpp to paths
|
||||||
|
RMW_IMPLEMENTATION = "rmw_fastrtps_dynamic_cpp";
|
||||||
|
};
|
||||||
|
|
||||||
|
all = pkgs.mkShell { packages = with pkgs; [ fstl mayo cad-gen cg-gen ]; };
|
||||||
|
|
||||||
|
ci = pkgs.mkShell { buildInputs = [ pkgs.jq ]; };
|
||||||
|
|
||||||
|
gazebo = gazebo-overlay.devShells.${system}.default;
|
||||||
|
|
||||||
|
perception =
|
||||||
|
let
|
||||||
|
perception-packages = p: with p; [
|
||||||
|
torch
|
||||||
|
torchvision
|
||||||
|
torchaudio
|
||||||
|
detectron2
|
||||||
|
];
|
||||||
|
in
|
||||||
|
pkgs.mkShell {
|
||||||
|
packages = [ (pkgs.python3.withPackages perception-packages) ];
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
5
overlay.nix
Normal file
5
overlay.nix
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
final: prev: with prev.lib;
|
||||||
|
foldr composeExtensions (_: _: {}) [
|
||||||
|
(import ./pkgs)
|
||||||
|
(import ./ros)
|
||||||
|
] final prev
|
34
pkgs/blender/default.nix
Normal file
34
pkgs/blender/default.nix
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
{ fetchgit, fetchzip, blender, imath, git, lib, ... }:
|
||||||
|
let
|
||||||
|
cg_preferences = fetchgit {
|
||||||
|
url = "https://gitflic.ru/project/brothermechanic/cg_preferences.git";
|
||||||
|
sha256 = "sha256-FkF1c5MhqtG2COIpSBdoJ1aE0r8/ABtmqFLqNkF0zT0=";
|
||||||
|
};
|
||||||
|
|
||||||
|
rs_logo = fetchgit {
|
||||||
|
url = "https://gitlab.com/robossembler/logo.git";
|
||||||
|
rev = "0a0235cd154a59b711e87456206ccd7ba69a7e4e";
|
||||||
|
sha256 = "sha256-/QsgKdtDHNymsTEmhIzSrOKNUqqkXl8coy+5LwIEkas=";
|
||||||
|
fetchLFS = true;
|
||||||
|
};
|
||||||
|
in
|
||||||
|
blender.overrideAttrs (old: {
|
||||||
|
optix = fetchzip {
|
||||||
|
# url taken from the archlinux blender PKGBUILD
|
||||||
|
url = "https://developer.download.nvidia.com/redist/optix/v7.4/OptiX-7.4.0-Include.zip";
|
||||||
|
sha256 = "sha256-ca08XetwaUYC9foeP5bff9kcDfuFgEzopvjspn2s8RY=";
|
||||||
|
};
|
||||||
|
patches = old.patches ++ [ "${cg_preferences}/patches/cg-defaults.patch" ];
|
||||||
|
buildInputs = old.buildInputs ++ [ imath git ];
|
||||||
|
postPatch = old.postPatch + ''
|
||||||
|
cp ${cg_preferences}/share/00_cg_preferences_service.py scripts/startup/
|
||||||
|
cp ${cg_preferences}/share/startup.blend release/datafiles/
|
||||||
|
cp ${rs_logo}/raster/robossembler_1024x512_roboty-rossii.png release/datafiles/splash.png
|
||||||
|
'';
|
||||||
|
env.NIX_CFLAGS_COMPILE = old.env.NIX_CFLAGS_COMPILE + " -I${imath}/include/Imath";
|
||||||
|
postInstall = old.postInstall + ''
|
||||||
|
cp -r ${cg_preferences}/cg_preferences $out/share/blender/${
|
||||||
|
lib.versions.majorMinor blender.version
|
||||||
|
}/scripts/addons/
|
||||||
|
'';
|
||||||
|
})
|
14
pkgs/bpy-lib/default.nix
Normal file
14
pkgs/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
|
||||||
|
'';
|
||||||
|
}
|
31
pkgs/bpy-wheel/default.nix
Normal file
31
pkgs/bpy-wheel/default.nix
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
{ buildPythonPackage, fetchPypi, python3Packages, lib, autoPatchelfHook, blender, pythonImportsCheckHook, config, cudaSupport ? config.cudaSupport }:
|
||||||
|
buildPythonPackage rec {
|
||||||
|
format = "wheel";
|
||||||
|
pname = "bpy";
|
||||||
|
version = "4.1.0";
|
||||||
|
|
||||||
|
src = fetchPypi rec {
|
||||||
|
inherit pname version format;
|
||||||
|
sha256 = "sha256-bGOlo3NvYMdbXw0UaKGkP7gRVdilKHdwfPtoAF27dLQ=";
|
||||||
|
dist = python;
|
||||||
|
python = "cp311";
|
||||||
|
abi = "cp311";
|
||||||
|
platform = "manylinux_2_28_x86_64";
|
||||||
|
};
|
||||||
|
propagatedBuildInputs = with python3Packages; [ requests numpy cython zstandard ];
|
||||||
|
buildInputs = blender.buildInputs;
|
||||||
|
nativeBuildInputs = [ autoPatchelfHook pythonImportsCheckHook ];
|
||||||
|
autoPatchelfIgnoreMissingDeps = true;
|
||||||
|
pythonImportsCheck = [ "bpy" ];
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "3D Creation/Animation/Publishing System";
|
||||||
|
homepage = "https://www.blender.org";
|
||||||
|
# They comment two licenses: GPLv2 and Blender License, but they
|
||||||
|
# say: "We've decided to cancel the BL offering for an indefinite period."
|
||||||
|
# OptiX, enabled with cudaSupport, is non-free.
|
||||||
|
license = with licenses; [ gpl2Plus ] ++ optional cudaSupport unfree;
|
||||||
|
platforms = [ "x86_64-linux" ];
|
||||||
|
maintainers = with maintainers; [ brothermechanic ];
|
||||||
|
};
|
||||||
|
}
|
121
pkgs/default.nix
Normal file
121
pkgs/default.nix
Normal file
|
@ -0,0 +1,121 @@
|
||||||
|
self: super: with self.lib; let
|
||||||
|
|
||||||
|
# single source for Robossembler Framework packages
|
||||||
|
|
||||||
|
rbsFrameworkSrc = self.fetchgit {
|
||||||
|
url = "https://gitlab.com/robossembler/framework";
|
||||||
|
hash = "sha256-q1032Lu2xnMWZkr+T0rLhbpdmceDHygHC6BN3AKbFVk=";
|
||||||
|
rev = "69b8512d6b5dafe0571b5d73a910a26bbc6a84a5";
|
||||||
|
};
|
||||||
|
|
||||||
|
pddlSpecGeneratorSrc = self.fetchgit {
|
||||||
|
url = "https://gitlab.com/robossembler/pddl-spec-generator";
|
||||||
|
hash = "sha256-g/yaaIHRJriPwvVr2pVytQZmJG/BYvsg4q64yEps0T8=";
|
||||||
|
rev = "61dcd1553365436f13107f395d1ee7e7b012c3e6";
|
||||||
|
};
|
||||||
|
|
||||||
|
bpy = self.blender.overrideAttrs (old: {
|
||||||
|
pname = "bpy";
|
||||||
|
src = self.fetchurl {
|
||||||
|
url = "https://download.blender.org/source/${old.pname}-${old.version}.tar.xz";
|
||||||
|
hash = "sha256-3AAtguPDQMk4VcZoRzDQGAG2aaKbHMa3XuuZC6aecj8=";
|
||||||
|
};
|
||||||
|
cmakeFlags = old.cmakeFlags ++ [
|
||||||
|
"-DWITH_PYTHON_INSTALL=OFF"
|
||||||
|
"-DWITH_AUDASPACE=OFF"
|
||||||
|
"-DWITH_PYTHON_MODULE=ON"
|
||||||
|
"-DWITH_MEM_JEMALLOC=OFF"
|
||||||
|
"-DWITH_INSTALL_PORTABLE=ON"
|
||||||
|
];
|
||||||
|
postInstall = ''
|
||||||
|
mkdir -p $out/nix-support
|
||||||
|
mkdir -p $out/lib/python${self.python3.pythonVersion}/site-packages
|
||||||
|
ln -s $out/bpy $out/lib/python${self.python3.pythonVersion}/site-packages/bpy
|
||||||
|
echo ${self.python3} >> $out/nix-support/propagated-build-inputs
|
||||||
|
'';
|
||||||
|
});
|
||||||
|
|
||||||
|
in {
|
||||||
|
|
||||||
|
# Robossembler custom packages; defined here for share between devShells and packages
|
||||||
|
|
||||||
|
# General packages
|
||||||
|
|
||||||
|
mayo = self.libsForQt5.callPackage ./mayo { };
|
||||||
|
fstl = self.libsForQt5.callPackage ./fstl { };
|
||||||
|
blender = self.callPackage ./blender { blender = super.blender.override {
|
||||||
|
cudaSupport = true;
|
||||||
|
spaceNavSupport = false;
|
||||||
|
waylandSupport = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Python packages
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
pythonPackagesExtensions = super.pythonPackagesExtensions ++ [
|
||||||
|
(
|
||||||
|
python-final: python-prev: {
|
||||||
|
iopath = python-prev.iopath.overridePythonAttrs (oldAttrs: {
|
||||||
|
version = "unstable";
|
||||||
|
src = self.fetchFromGitHub {
|
||||||
|
owner = "facebookresearch";
|
||||||
|
repo = "iopath";
|
||||||
|
rev = "9dcb63a46447556460fdb65c21aa6d094a7a788c";
|
||||||
|
hash = "sha256-X1LTOfbIAMy6gToNYS0JpeJpHi0jHPsEjrnCq2c9U0E=";
|
||||||
|
};
|
||||||
|
});
|
||||||
|
unified-planning = self.python3Packages.callPackage ./unified-planning { };
|
||||||
|
bpy-wheel = self.python3Packages.callPackage ./bpy-wheel { };
|
||||||
|
pysdf = self.python3Packages.callPackage ./pysdf { };
|
||||||
|
pytorch3d = self.python3Packages.callPackage ./pytorch3d { };
|
||||||
|
blenderproc = self.python3Packages.callPackage ./blenderproc.nix { };
|
||||||
|
test-script = self.python3Packages.callPackage ./test-script { };
|
||||||
|
webdataset = self.python3Packages.callPackage ./webdataset { };
|
||||||
|
ansitable = self.python3Packages.callPackage ./ansitable { };
|
||||||
|
megapose6d = self.python3Packages.callPackage ./megapose6d { inherit (python-final) webdataset; };
|
||||||
|
spatialmath = self.python3Packages.callPackage ./spatialmath { inherit (python-final) ansitable; };
|
||||||
|
rcg-pipeline = self.python3Packages.callPackage ./rcg-pipeline { inherit (python-final) bpy-lib; inherit rbsFrameworkSrc; };
|
||||||
|
rbs-workbench = self.python3Packages.callPackage ./freecad.robossembler { inherit (python-final) freecad-lib; inherit rbsFrameworkSrc; };
|
||||||
|
freecad-lib = self.python3Packages.toPythonModule (self.callPackage ./freecad-lib { });
|
||||||
|
bpy-lib = self.python3Packages.toPythonModule bpy;
|
||||||
|
}
|
||||||
|
)
|
||||||
|
];
|
||||||
|
|
||||||
|
# Assets Generators
|
||||||
|
cad-gen =
|
||||||
|
let
|
||||||
|
cad_export_script = self.writers.writePython3 "cad_export_script.py"
|
||||||
|
{ libraries = [ self.python3Packages.rbs-workbench ]; }
|
||||||
|
''
|
||||||
|
import FreeCAD as App
|
||||||
|
import freecad.robossembler.utils.freecad_exporters as rbs
|
||||||
|
import sys
|
||||||
|
|
||||||
|
path = sys.argv[4]
|
||||||
|
print(path)
|
||||||
|
doc = App.openDocument(path)
|
||||||
|
rbs.publish_project_database(doc)
|
||||||
|
App.closeDocument(doc.Name)
|
||||||
|
'';
|
||||||
|
in
|
||||||
|
self.writeShellScriptBin "cad-gen"
|
||||||
|
''
|
||||||
|
export PYTHONPATH="${self.python3Packages.rbs-workbench}/${self.python3.sitePackages}"
|
||||||
|
${self.freecad}/bin/freecadcmd ${cad_export_script} -- --pass $1
|
||||||
|
'';
|
||||||
|
|
||||||
|
cg-gen = self.writers.writePython3Bin "cg-gen"
|
||||||
|
{ libraries = [ self.python3Packages.rcg-pipeline ]; }
|
||||||
|
''
|
||||||
|
from rcg_pipeline import rcg_full_pipeline
|
||||||
|
import sys
|
||||||
|
rcg_full_pipeline(sys.argv[1])
|
||||||
|
'';
|
||||||
|
|
||||||
|
pddl-spec-gen = pddlSpecGeneratorSrc;
|
||||||
|
dataset-gen = rbsFrameworkSrc;
|
||||||
|
|
||||||
|
}
|
|
@ -1,10 +0,0 @@
|
||||||
--- a/intern/locale/boost_locale_wrapper.cpp
|
|
||||||
+++ b/intern/locale/boost_locale_wrapper.cpp
|
|
||||||
@@ -7,6 +7,7 @@
|
|
||||||
|
|
||||||
#include <boost/locale.hpp>
|
|
||||||
#include <stdio.h>
|
|
||||||
+#include <iostream>
|
|
||||||
|
|
||||||
#include "boost_locale_wrapper.h"
|
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
--- a/release/freedesktop/blender.desktop
|
|
||||||
+++ b/release/freedesktop/blender.desktop
|
|
||||||
@@ -84,6 +84,6 @@ Icon=blender
|
|
||||||
Terminal=false
|
|
||||||
Type=Application
|
|
||||||
PrefersNonDefaultGPU=true
|
|
||||||
-X-KDE-RunOnDiscreteGpu=true
|
|
||||||
+X-PreferRunOnDiscreteGPU=true
|
|
||||||
Categories=Graphics;3DGraphics;
|
|
||||||
MimeType=application/x-blender;
|
|
|
@ -1,84 +0,0 @@
|
||||||
diff -Naur a/source/blender/makesdna/DNA_modifier_defaults.h b/source/blender/makesdna/DNA_modifier_defaults.h
|
|
||||||
--- a/source/blender/makesdna/DNA_modifier_defaults.h 2020-12-24 20:07:32.000000000 +0300
|
|
||||||
+++ b/source/blender/makesdna/DNA_modifier_defaults.h 2020-12-28 00:11:53.397550988 +0300
|
|
||||||
@@ -43,7 +43,7 @@
|
|
||||||
.length = 0.0f, \
|
|
||||||
.merge_dist = 0.01f, \
|
|
||||||
.fit_type = MOD_ARR_FIXEDCOUNT, \
|
|
||||||
- .offset_type = MOD_ARR_OFF_RELATIVE, \
|
|
||||||
+ .offset_type = MOD_ARR_OFF_CONST, \
|
|
||||||
.flags = 0, \
|
|
||||||
.count = 2, \
|
|
||||||
.uv_offset = {0.0f, 0.0f}, \
|
|
||||||
@@ -51,8 +51,8 @@
|
|
||||||
|
|
||||||
#define _DNA_DEFAULT_BevelModifierData \
|
|
||||||
{ \
|
|
||||||
- .value = 0.1f, \
|
|
||||||
- .res = 1, \
|
|
||||||
+ .value = 0.01f, \
|
|
||||||
+ .res = 2, \
|
|
||||||
.flags = 0, \
|
|
||||||
.val_flags = MOD_BEVEL_AMT_OFFSET, \
|
|
||||||
.profile_type = MOD_BEVEL_PROFILE_SUPERELLIPSE, \
|
|
||||||
@@ -93,7 +93,7 @@
|
|
||||||
#define _DNA_DEFAULT_CastModifierData \
|
|
||||||
{ \
|
|
||||||
.object = NULL, \
|
|
||||||
- .fac = 0.5f, \
|
|
||||||
+ .fac = 1.0f, \
|
|
||||||
.radius = 0.0f, \
|
|
||||||
.size = 0.0f, \
|
|
||||||
.defgrp_name = "", \
|
|
||||||
@@ -259,7 +259,7 @@
|
|
||||||
|
|
||||||
#define _DNA_DEFAULT_DecimateModifierData \
|
|
||||||
{ \
|
|
||||||
- .percent = 1.0f, \
|
|
||||||
+ .percent = 0.1f, \
|
|
||||||
.iter = 0, \
|
|
||||||
.delimit = 0, \
|
|
||||||
.symmetry_axis = 0, \
|
|
||||||
@@ -567,7 +567,7 @@
|
|
||||||
.vgroup_name = "", \
|
|
||||||
.factor = DEG2RADF(45.0f), \
|
|
||||||
.limit = {0.0f, 1.0f}, \
|
|
||||||
- .mode = MOD_SIMPLEDEFORM_MODE_TWIST, \
|
|
||||||
+ .mode = MOD_SIMPLEDEFORM_MODE_BEND, \
|
|
||||||
.axis = 0, \
|
|
||||||
.deform_axis = 0, \
|
|
||||||
.flag = 0, \
|
|
||||||
@@ -608,7 +608,7 @@
|
|
||||||
.crease_inner = 0.0f, \
|
|
||||||
.crease_outer = 0.0f, \
|
|
||||||
.crease_rim = 0.0f, \
|
|
||||||
- .flag = MOD_SOLIDIFY_RIM, \
|
|
||||||
+ .flag = MOD_SOLIDIFY_RIM | MOD_SOLIDIFY_EVEN, \
|
|
||||||
.mat_ofs = 0, \
|
|
||||||
.mat_ofs_rim = 0, \
|
|
||||||
.merge_tolerance = 0.0001f, \
|
|
||||||
@@ -619,7 +619,7 @@
|
|
||||||
.subdivType = 0, \
|
|
||||||
.levels = 1, \
|
|
||||||
.renderLevels = 2, \
|
|
||||||
- .flags = eSubsurfModifierFlag_UseCrease | eSubsurfModifierFlag_ControlEdges, \
|
|
||||||
+ .flags = eSubsurfModifierFlag_UseCrease | eSubsurfModifierFlag_ControlEdges | eSubsurfModifierFlag_UseRecursiveSubdivision, \
|
|
||||||
.uv_smooth = SUBSURF_UV_SMOOTH_PRESERVE_BOUNDARIES, \
|
|
||||||
.quality = 3, \
|
|
||||||
.boundary_smooth = SUBSURF_BOUNDARY_SMOOTH_ALL, \
|
|
||||||
diff -Naur a/source/blender/makesdna/DNA_view3d_defaults.h b/source/blender/makesdna/DNA_view3d_defaults.h
|
|
||||||
--- a/source/blender/makesdna/DNA_view3d_defaults.h 2020-12-24 20:07:32.000000000 +0300
|
|
||||||
+++ b/source/blender/makesdna/DNA_view3d_defaults.h 2020-12-27 22:52:32.467466785 +0300
|
|
||||||
@@ -94,9 +94,9 @@
|
|
||||||
.flag = V3D_SELECT_OUTLINE, \
|
|
||||||
.flag2 = V3D_SHOW_RECONSTRUCTION | V3D_SHOW_ANNOTATION, \
|
|
||||||
\
|
|
||||||
- .lens = 50.0f, \
|
|
||||||
- .clip_start = 0.01f, \
|
|
||||||
- .clip_end = 1000.0f, \
|
|
||||||
+ .lens = 85.0f, \
|
|
||||||
+ .clip_start = 0.001f, \
|
|
||||||
+ .clip_end = 100.0f, \
|
|
||||||
\
|
|
||||||
.bundle_size = 0.2f, \
|
|
||||||
.bundle_drawtype = OB_PLAINAXES, \
|
|
|
@ -1,45 +0,0 @@
|
||||||
--- /dev/null 2023-08-11 22:07:27.012000310 +0300
|
|
||||||
+++ b/scripts/startup/cg_environment.py 2023-08-11 00:44:51.704718595 +0300
|
|
||||||
@@ -0,0 +1,42 @@
|
|
||||||
+#!/usr/bin/python3
|
|
||||||
+# -*- coding: utf-8 -*-
|
|
||||||
+# Copyright (C) 2023 Ilia Kurochkin <brothermechanic@gmail.com>
|
|
||||||
+#
|
|
||||||
+# This program is free software; you can redistribute it and/or modify
|
|
||||||
+# it under the terms of the GNU General Public License as published by
|
|
||||||
+# the Free Software Foundation; either version 3 of the License, or
|
|
||||||
+# (at your option) any later version.
|
|
||||||
+#
|
|
||||||
+# This program is distributed in the hope that it will be useful,
|
|
||||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
+# GNU General Public License for more details.
|
|
||||||
+
|
|
||||||
+__doc__ = 'Environment for use CG Overlay'
|
|
||||||
+__version__ = '0.1'
|
|
||||||
+
|
|
||||||
+import bpy
|
|
||||||
+from bpy.app.handlers import persistent
|
|
||||||
+import addon_utils
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+@persistent
|
|
||||||
+def cg_env(dummy):
|
|
||||||
+ '''Scripts environment'''
|
|
||||||
+ addon_utils.enable('cg_preferences', default_set=True)
|
|
||||||
+
|
|
||||||
+ print('CG Environment activated!')
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+def register():
|
|
||||||
+ '''register blender module'''
|
|
||||||
+ bpy.app.handlers.load_post.append(cg_env)
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+def unregister():
|
|
||||||
+ '''unregister blender module'''
|
|
||||||
+ bpy.app.handlers.load_post.remove(cg_env)
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+if __name__ == '__main__':
|
|
||||||
+ register()
|
|
|
@ -1,213 +0,0 @@
|
||||||
# TODO WITH_CYCLES_OSL
|
|
||||||
# TODO WITH_NANOVDB
|
|
||||||
# TODO WITH_CLANG
|
|
||||||
{ config, stdenv, lib, fetchurl, fetchzip, fetchgit, makeWrapper, cmake, git-lfs
|
|
||||||
, boost, ocl-icd, gettext, zlib, zstd, pugixml, llvmPackages, clang
|
|
||||||
, libepoxy, libXi, libX11, libXext, libXrender, libXxf86vm
|
|
||||||
, libGLU, libGL, glew, addOpenGLRunpath, freeglut
|
|
||||||
, openimageio, opencolorio, openexr, ilmbase, libjpeg, libpng, libtiff, libwebp, potrace
|
|
||||||
, embree, gmp, openvdb, tbb, openimagedenoise, opensubdiv, freetype, libharu, brotli
|
|
||||||
, ffmpeg, fftw, libsndfile
|
|
||||||
, python310Packages, buildPythonPackage, fetchPypi, pkgs, lzma, freecad
|
|
||||||
, cudaSupport ? config.cudaSupport or false, cudaPackages ? { }
|
|
||||||
, hipSupport ? false, hip # comes with a significantly larger closure size
|
|
||||||
, colladaSupport ? true, opencollada
|
|
||||||
, waylandSupport ? stdenv.isLinux, pkg-config, wayland, wayland-protocols, libffi, libdecor, libxkbcommon, dbus
|
|
||||||
}:
|
|
||||||
|
|
||||||
let
|
|
||||||
python = python310Packages.python;
|
|
||||||
optix = fetchzip {
|
|
||||||
# url taken from the archlinux blender PKGBUILD
|
|
||||||
url = "https://developer.download.nvidia.com/redist/optix/v7.4/OptiX-7.4.0-Include.zip";
|
|
||||||
sha256 = "sha256-ca08XetwaUYC9foeP5bff9kcDfuFgEzopvjspn2s8RY=";
|
|
||||||
};
|
|
||||||
cg_preferences = fetchgit {
|
|
||||||
url = "https://gitlab.com/brothermechanic/cg_preferences.git";
|
|
||||||
rev = "db192525ff41dfae4c063dc914a2c3fe5850d480";
|
|
||||||
sha256 = "sha256-+eLWdokH/5odzOTykgrmG36U8h+Wf8YGOxe1oIy4dJo=";
|
|
||||||
fetchLFS = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
in
|
|
||||||
stdenv.mkDerivation rec {
|
|
||||||
pname = "bpy";
|
|
||||||
version = "3.6.1";
|
|
||||||
|
|
||||||
src = fetchurl {
|
|
||||||
url = "https://download.blender.org/source/blender-${version}.tar.xz";
|
|
||||||
hash = "sha256-JJF+cbyya0kAJXBU2do4tiMWx0J9cyNTO0HKmztFrE0=";
|
|
||||||
};
|
|
||||||
|
|
||||||
patches = [
|
|
||||||
./cg-defaults.patch
|
|
||||||
./x112.patch
|
|
||||||
./blender-fix-desktop.patch
|
|
||||||
./blender-fix-boost-1.81-iostream.patch
|
|
||||||
];
|
|
||||||
|
|
||||||
nativeBuildInputs =
|
|
||||||
[ cmake makeWrapper python310Packages.wrapPython llvmPackages.llvm.dev
|
|
||||||
]
|
|
||||||
++ lib.optionals cudaSupport [ addOpenGLRunpath ]
|
|
||||||
++ lib.optionals waylandSupport [ pkg-config ];
|
|
||||||
buildInputs =
|
|
||||||
[ boost ffmpeg gettext glew ilmbase
|
|
||||||
freetype libjpeg libpng libsndfile libtiff libwebp
|
|
||||||
opencolorio openexr openimageio python zlib pkgs.zstd.dev fftw
|
|
||||||
(opensubdiv.override { inherit cudaSupport; })
|
|
||||||
tbb
|
|
||||||
gmp
|
|
||||||
pugixml
|
|
||||||
potrace
|
|
||||||
libharu
|
|
||||||
brotli
|
|
||||||
libepoxy
|
|
||||||
lzma
|
|
||||||
optix
|
|
||||||
]
|
|
||||||
++ lib.optionals waylandSupport [
|
|
||||||
wayland wayland-protocols libffi libdecor libxkbcommon dbus
|
|
||||||
]
|
|
||||||
++ lib.optionals (!stdenv.isAarch64) [
|
|
||||||
openimagedenoise
|
|
||||||
embree
|
|
||||||
]
|
|
||||||
++ (if (!stdenv.isDarwin) then [
|
|
||||||
libXi libX11 libXext libXrender
|
|
||||||
libGLU libGL
|
|
||||||
libXxf86vm
|
|
||||||
# OpenVDB currently doesn't build on darwin
|
|
||||||
openvdb
|
|
||||||
]
|
|
||||||
else [
|
|
||||||
llvmPackages.openmp clang
|
|
||||||
])
|
|
||||||
++ lib.optional cudaSupport cudaPackages.cudatoolkit
|
|
||||||
++ lib.optional colladaSupport opencollada
|
|
||||||
;
|
|
||||||
pythonPath = with python310Packages; [ numpy requests ];
|
|
||||||
|
|
||||||
postPatch = ''
|
|
||||||
cp ${cg_preferences}/startup.blend release/datafiles/
|
|
||||||
'' +
|
|
||||||
(if stdenv.isDarwin then ''
|
|
||||||
: > build_files/cmake/platform/platform_apple_xcode.cmake
|
|
||||||
substituteInPlace source/creator/CMakeLists.txt \
|
|
||||||
--replace '${"$"}{LIBDIR}/python' \
|
|
||||||
'${python}'
|
|
||||||
substituteInPlace build_files/cmake/platform/platform_apple.cmake \
|
|
||||||
--replace '${"$"}{LIBDIR}/python' \
|
|
||||||
'${python}' \
|
|
||||||
--replace '${"$"}{LIBDIR}/opencollada' \
|
|
||||||
'${opencollada}' \
|
|
||||||
--replace '${"$"}{PYTHON_LIBPATH}/site-packages/numpy' \
|
|
||||||
'${python310Packages.numpy}/${python.sitePackages}/numpy'
|
|
||||||
'' else ''
|
|
||||||
substituteInPlace extern/clew/src/clew.c --replace '"libOpenCL.so"' '"${ocl-icd}/lib/libOpenCL.so"'
|
|
||||||
'') +
|
|
||||||
(lib.optionalString hipSupport ''
|
|
||||||
substituteInPlace extern/hipew/src/hipew.c --replace '"/opt/rocm/hip/lib/libamdhip64.so"' '"${hip}/lib/libamdhip64.so"'
|
|
||||||
substituteInPlace extern/hipew/src/hipew.c --replace '"opt/rocm/hip/bin"' '"${hip}/bin"'
|
|
||||||
'');
|
|
||||||
|
|
||||||
cmakeFlags =
|
|
||||||
[
|
|
||||||
"-DWITH_PYTHON_INSTALL=OFF"
|
|
||||||
"-DWITH_AUDASPACE=OFF"
|
|
||||||
"-DWITH_PYTHON_MODULE=ON"
|
|
||||||
"-DWITH_MEM_JEMALLOC=OFF"
|
|
||||||
"-DWITH_INSTALL_PORTABLE=ON"
|
|
||||||
#___________
|
|
||||||
"-DPYTHON_LIBPATH=${python}/lib"
|
|
||||||
"-DPYTHON_VERSION=${python.pythonVersion}"
|
|
||||||
"-DPYTHON_INCLUDE_DIR=${python}/include/${python.libPrefix}"
|
|
||||||
"-DPYTHON_LIBRARY=${python.libPrefix}"
|
|
||||||
"-DWITH_PYTHON_INSTALL_NUMPY=OFF"
|
|
||||||
"-DPYTHON_NUMPY_PATH=${python310Packages.numpy}/${python.sitePackages}"
|
|
||||||
"-DPYTHON_NUMPY_INCLUDE_DIRS=${python310Packages.numpy}/${python.sitePackages}/numpy/core/include"
|
|
||||||
"-DWITH_PYTHON_INSTALL_REQUESTS=OFF"
|
|
||||||
"-DWITH_ALEMBIC=OFF"
|
|
||||||
"-DWITH_OPENVDB=ON"
|
|
||||||
"-DWITH_NANOVDB=ON"
|
|
||||||
"-DWITH_IMAGE_OPENJPEG=OFF"
|
|
||||||
"-DWITH_OPENCOLLADA=${if colladaSupport then "ON" else "OFF"}"
|
|
||||||
"-DWITH_OPENAL=OFF"
|
|
||||||
"-DWITH_SDL=OFF"
|
|
||||||
"-DWITH_PULSEAUDIO=OFF"
|
|
||||||
"-DWITH_JACK=OFF"
|
|
||||||
"-DWITH_OPENMP=ON"
|
|
||||||
"-DWITH_OPENCOLORIO=ON"
|
|
||||||
"-DWITH_OPENSUBDIV=ON"
|
|
||||||
"-DWITH_TBB=ON"
|
|
||||||
"-DWITH_USD=OFF"
|
|
||||||
"-DWITH_XR_OPENXR=OFF"
|
|
||||||
"-DWITH_NINJA_POOL_JOBS=OFF"
|
|
||||||
"-DBUILD_SHARED_LIBS=OFF"
|
|
||||||
"-DWITH_BUILDINFO=OFF"
|
|
||||||
"-DWITH_HYDRA=OFF"
|
|
||||||
"-DWITH_MATERIALX=OFF"
|
|
||||||
"-DWITH_LINKER_LLD=ON"
|
|
||||||
"-DWITH_LIBS_PRECOMPILED=OFF"
|
|
||||||
"-DWITH_INTERNATIONAL=ON"
|
|
||||||
]
|
|
||||||
++ lib.optionals stdenv.hostPlatform.isAarch64 [
|
|
||||||
"-DWITH_CYCLES_EMBREE=OFF"
|
|
||||||
]
|
|
||||||
++ lib.optionals stdenv.isDarwin [
|
|
||||||
"-DWITH_CYCLES_OSL=OFF" # requires LLVM
|
|
||||||
"-DWITH_OPENVDB=OFF" # OpenVDB currently doesn't build on darwin
|
|
||||||
"-DLIBDIR=/does-not-exist"
|
|
||||||
]
|
|
||||||
++ lib.optionals cudaSupport [
|
|
||||||
"-DWITH_CYCLES_CUDA_BINARIES=ON"
|
|
||||||
"-DCUDA_NVCC_FLAGS=-std=c++14"
|
|
||||||
"-DWITH_CYCLES_DEVICE_OPTIX=ON"
|
|
||||||
"-DOPTIX_INCLUDE_DIR=${optix}"
|
|
||||||
]
|
|
||||||
# Clang doesn't support "-export-dynamic"
|
|
||||||
++ lib.optional stdenv.cc.isClang "-DPYTHON_LINKFLAGS="
|
|
||||||
++ lib.optionals waylandSupport [
|
|
||||||
"-DWITH_GHOST_WAYLAND=ON"
|
|
||||||
"-DWITH_GHOST_WAYLAND_DBUS=ON"
|
|
||||||
"-DWITH_GHOST_WAYLAND_DYNLOAD=OFF"
|
|
||||||
"-DWITH_GHOST_WAYLAND_LIBDECOR=ON"
|
|
||||||
];
|
|
||||||
|
|
||||||
env.NIX_CFLAGS_COMPILE = "-I${ilmbase.dev}/include/OpenEXR -I${python}/include/${python.libPrefix}";
|
|
||||||
|
|
||||||
# Since some dependencies are built with gcc 6, we need gcc 6's
|
|
||||||
# libstdc++ in our RPATH. Sigh.
|
|
||||||
NIX_LDFLAGS = lib.optionalString cudaSupport "-rpath ${stdenv.cc.cc.lib}/lib";
|
|
||||||
|
|
||||||
postInstall = ''
|
|
||||||
mkdir -p $out/lib/python3.10/site-packages
|
|
||||||
mkdir -p $out/nix-support
|
|
||||||
mv $out/bpy $out/lib/python3.10/site-packages/
|
|
||||||
echo ${python} >> $out/nix-support/propagated-build-inputs
|
|
||||||
'' + ''
|
|
||||||
mkdir $out/lib/python3.10/site-packages/bpy/3.6/scripts/addons/cg_preferences
|
|
||||||
cp -r ${cg_preferences}/* $out/lib/python3.10/site-packages/bpy/3.6/scripts/addons/cg_preferences/
|
|
||||||
'';
|
|
||||||
# Set RUNPATH so that libcuda and libnvrtc in /run/opengl-driver(-32)/lib can be
|
|
||||||
# found. See the explanation in libglvnd.
|
|
||||||
postFixup = ''
|
|
||||||
buildPythonPath $out/lib/python3.10/site-packages
|
|
||||||
'';
|
|
||||||
|
|
||||||
passthru = { inherit python; };
|
|
||||||
|
|
||||||
meta = with lib; {
|
|
||||||
description = "3D Creation/Animation/Publishing System module";
|
|
||||||
homepage = "https://www.blender.org";
|
|
||||||
# They comment two licenses: GPLv2 and Blender License, but they
|
|
||||||
# say: "We've decided to cancel the BL offering for an indefinite period."
|
|
||||||
# OptiX, enabled with cudaSupport, is non-free.
|
|
||||||
license = with licenses; [ gpl2Plus ] ++ optional cudaSupport unfree;
|
|
||||||
platforms = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" ];
|
|
||||||
broken = stdenv.isDarwin;
|
|
||||||
maintainers = with maintainers; [ goibhniu veprbl brothermechanic ];
|
|
||||||
mainProgram = "bpy";
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,46 +0,0 @@
|
||||||
--- a/intern/ghost/CMakeLists.txt
|
|
||||||
+++ b/intern/ghost/CMakeLists.txt
|
|
||||||
@@ -183,6 +183,13 @@
|
|
||||||
${X11_X11_INCLUDE_PATH}
|
|
||||||
)
|
|
||||||
|
|
||||||
+ list(APPEND LIB
|
|
||||||
+ ${X11_X11_LIB}
|
|
||||||
+ -lXext
|
|
||||||
+ -lXxf86vm
|
|
||||||
+ ${X11_Xrender_LIB}
|
|
||||||
+ )
|
|
||||||
+
|
|
||||||
list(APPEND SRC
|
|
||||||
intern/GHOST_DisplayManagerX11.cpp
|
|
||||||
intern/GHOST_SystemX11.cpp
|
|
||||||
@@ -234,6 +241,9 @@
|
|
||||||
list(APPEND INC_SYS
|
|
||||||
${X11_xf86vmode_INCLUDE_PATH}
|
|
||||||
)
|
|
||||||
+ list(APPEND LIB
|
|
||||||
+ ${X11_Xf86vmode_LIB}
|
|
||||||
+ )
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(WITH_X11_XFIXES)
|
|
||||||
@@ -241,6 +251,9 @@
|
|
||||||
list(APPEND INC_SYS
|
|
||||||
${X11_Xfixes_INCLUDE_PATH}
|
|
||||||
)
|
|
||||||
+ list(APPEND LIB
|
|
||||||
+ ${X11_Xfixes_LIB}
|
|
||||||
+ )
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(WITH_X11_ALPHA)
|
|
||||||
@@ -252,6 +265,9 @@
|
|
||||||
list(APPEND INC_SYS
|
|
||||||
${X11_Xinput_INCLUDE_PATH}
|
|
||||||
)
|
|
||||||
+ list(APPEND LIB
|
|
||||||
+ ${X11_Xinput_LIB}
|
|
||||||
+ )
|
|
||||||
endif()
|
|
||||||
|
|
||||||
add_definitions(-DWITH_GHOST_X11)
|
|
14
pkgs/freecad-lib/default.nix
Normal file
14
pkgs/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
|
||||||
|
'';
|
||||||
|
}
|
45
pkgs/freecad.robossembler/default.nix
Normal file
45
pkgs/freecad.robossembler/default.nix
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
{ buildPythonPackage
|
||||||
|
, fetchgit
|
||||||
|
, python3Packages
|
||||||
|
, lib
|
||||||
|
, autoPatchelfHook
|
||||||
|
, pythonImportsCheckHook
|
||||||
|
, config
|
||||||
|
, setuptools
|
||||||
|
, freecad-lib
|
||||||
|
, pytestCheckHook
|
||||||
|
, toPythonModule
|
||||||
|
, python
|
||||||
|
, rbsFrameworkSrc
|
||||||
|
, ... }:
|
||||||
|
|
||||||
|
buildPythonPackage rec {
|
||||||
|
name = "freecad.robossembler";
|
||||||
|
version = "1.0.0";
|
||||||
|
format = "setuptools";
|
||||||
|
|
||||||
|
src = rbsFrameworkSrc;
|
||||||
|
|
||||||
|
sourceRoot = "${src.name}/freecad_workbench";
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
setuptools
|
||||||
|
];
|
||||||
|
|
||||||
|
buildInputs = [ freecad-lib ];
|
||||||
|
|
||||||
|
propagatedBuildInputs = [
|
||||||
|
freecad-lib
|
||||||
|
];
|
||||||
|
|
||||||
|
pythonImportsCheck = [ "freecad.robossembler" ];
|
||||||
|
|
||||||
|
doCheck = false;
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "Robossembler CG Pipeline Python Module";
|
||||||
|
homepage = "https://gitlab.com/robossembler/framework/rcg_pipeline";
|
||||||
|
license = licenses.mit;
|
||||||
|
maintainers = with maintainers; [ ];
|
||||||
|
};
|
||||||
|
}
|
|
@ -9,13 +9,13 @@
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "mayo";
|
pname = "mayo";
|
||||||
version = "0.6.0";
|
version = "0.8.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "fougue";
|
owner = "fougue";
|
||||||
repo = "mayo";
|
repo = "mayo";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
hash = "sha256-seRk02jYiABjoO35AG47ioCByBIdLibJ4QHLeXW8cXQ=";
|
hash = "sha256-/MavLqC3BBRmlqMZIhKEYJPTV6pvLKlCNMXGJ6vnmUg=";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ qtbase opencascade-occt ];
|
buildInputs = [ qtbase opencascade-occt ];
|
44
pkgs/rcg-pipeline/default.nix
Normal file
44
pkgs/rcg-pipeline/default.nix
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
{ buildPythonPackage
|
||||||
|
, fetchgit
|
||||||
|
, python3Packages
|
||||||
|
, lib
|
||||||
|
, autoPatchelfHook
|
||||||
|
, pythonImportsCheckHook
|
||||||
|
, config
|
||||||
|
, cudaSupport ? config.cudaSupport
|
||||||
|
, numpy
|
||||||
|
, setuptools
|
||||||
|
, bpy-lib
|
||||||
|
, rbsFrameworkSrc
|
||||||
|
, ... }:
|
||||||
|
|
||||||
|
buildPythonPackage rec {
|
||||||
|
name = "rcg_pipeline";
|
||||||
|
version = "1.0.0";
|
||||||
|
format = "pyproject";
|
||||||
|
|
||||||
|
src = rbsFrameworkSrc;
|
||||||
|
|
||||||
|
sourceRoot = "${src.name}/rcg_pipeline";
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
setuptools
|
||||||
|
];
|
||||||
|
|
||||||
|
propagatedBuildInputs = [
|
||||||
|
numpy
|
||||||
|
bpy-lib
|
||||||
|
];
|
||||||
|
|
||||||
|
# TODO - see later, pyproject.toml duntime deps check doesnt work
|
||||||
|
dontCheckRuntimeDeps = true;
|
||||||
|
|
||||||
|
pythonImportsCheck = [ "rcg_pipeline" ];
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "Robossembler CG Pipeline Python Module";
|
||||||
|
homepage = "https://gitlab.com/robossembler/framework/rcg_pipeline";
|
||||||
|
license = licenses.mit;
|
||||||
|
maintainers = with maintainers; [ ];
|
||||||
|
};
|
||||||
|
}
|
17
ros/default.nix
Normal file
17
ros/default.nix
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
self: super:
|
||||||
|
{
|
||||||
|
humble = super.rosPackages.humble.overrideScope (
|
||||||
|
final: prev: {
|
||||||
|
# remove after update github:lopsided98/nixpkgs/nix-ros for https://github.com/NixOS/nixpkgs/pull/224099
|
||||||
|
behaviortree-cpp-v3 = prev.behaviortree-cpp-v3.overrideAttrs (old: {
|
||||||
|
propagatedBuildInputs = old.propagatedBuildInputs ++ [ self.zeromq self.pkg-config ];
|
||||||
|
});
|
||||||
|
moveit-core = prev.moveit-core.overrideAttrs (old: {
|
||||||
|
propagatedBuildInputs = old.propagatedBuildInputs ++ [ prev.tf2-kdl ];
|
||||||
|
});
|
||||||
|
moveit-kinematics = prev.moveit-kinematics.overrideAttrs (old: {
|
||||||
|
propagatedBuildInputs = old.propagatedBuildInputs ++ [ final.moveit-ros-planning ];
|
||||||
|
});
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue