Skip to content

Commit

Permalink
Merge pull request #5 from Gepetto/nix
Browse files Browse the repository at this point in the history
nix
  • Loading branch information
LudovicDeMatteis authored Oct 4, 2024
2 parents 4138e6c + e227fa6 commit eb83bfe
Show file tree
Hide file tree
Showing 3 changed files with 128 additions and 0 deletions.
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;
};
}

0 comments on commit eb83bfe

Please sign in to comment.