Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nix #5

Merged
merged 1 commit into from
Oct 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 27 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
description = "Set of tools to work with robots with bilateral constraints";

inputs = {
flake-parts.url = "github:hercules-ci/flake-parts";
nixpkgs.url = "github:gepetto/nixpkgs/master";
};

outputs =
inputs:
inputs.flake-parts.lib.mkFlake { inherit inputs; } {
systems = inputs.nixpkgs.lib.systems.flakeExposed;
perSystem =
{ pkgs, self', ... }:
{
apps.default = {
type = "app";
program = pkgs.python3.withPackages (_: [ self'.packages.default ]);
};
devShells.default = pkgs.mkShell { inputsFrom = [ self'.packages.default ]; };
packages = {
default = self'.packages.toolbox-parallel-robots;
toolbox-parallel-robots = pkgs.python3Packages.toPythonModule (pkgs.callPackage ./package.nix { });
};
};
};
}
43 changes: 43 additions & 0 deletions package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
cmake,
lib,
pkg-config,
python3Packages,
stdenv,
}:

stdenv.mkDerivation rec {
pname = "toolbox-parallel-robots";
version = "0-unstable-2024-30-09";

src = lib.fileset.toSource {
root = ./.;
fileset = lib.fileset.unions [
./CMakeLists.txt
./package.xml
./toolbox_parallel_robots
];
};

cmakeFlags = [
(lib.cmakeBool "BUILD_BENCHMARK" false)
(lib.cmakeBool "BUILD_DOCUMENTATION" false)
(lib.cmakeBool "BUILD_EXAMPLES" false)
(lib.cmakeBool "BUILD_TESTING" false)
(lib.cmakeBool "GENERATE_PYTHON_STUBS" false)
];

nativeBuildInputs = [
cmake
pkg-config
];
propagatedBuildInputs = [ python3Packages.pinocchio ];

meta = {
description = "Set of tools to work with robots with bilateral constraints";
homepage = "https://github.com/gepetto/toolbox-parallel-robots";
license = lib.licenses.bsd2;
maintainers = with lib.maintainers; [ nim65s ];
platforms = lib.platforms.unix;
};
}
Loading