Skip to content

Commit

Permalink
nix
Browse files Browse the repository at this point in the history
  • Loading branch information
nim65s committed Oct 4, 2024
1 parent 87e94eb commit e227fa6
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 e227fa6

Please sign in to comment.