Skip to content
Snippets Groups Projects
Commit 6fd12df8 authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files

nix: move package to nixpkgs

parent f0abf03d
No related branches found
No related tags found
No related merge requests found
Pipeline #44839 passed
name: "Nix CI"
name: "CI - Nix"
on: [pull_request, push]
on:
push:
jobs:
tests:
......@@ -11,10 +12,9 @@ jobs:
os: [ubuntu]
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- run: nix --accept-flake-config build -L
- run: nix --accept-flake-config run .#cachix push gepetto $(readlink result)
if: github.repository_owner == 'humanoid-path-planner'
env:
CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }}
- uses: cachix/install-nix-action@v27
- uses: cachix/cachix-action@v15
with:
name: gepetto
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- run: nix build -L
{
lib,
cddlib,
clp,
cmake,
glpk,
hpp-centroidal-dynamics,
ndcurves,
python3Packages,
qpoases,
}:
python3Packages.buildPythonPackage {
pname = "hpp-bezier-com-traj";
version = "5.0.0";
pyproject = false;
src = lib.fileset.toSource {
root = ./.;
fileset = lib.fileset.unions [
./CMakeLists.txt
./include
./package.xml
./python
./src
./tests
];
};
strictDeps = true;
nativeBuildInputs = [ cmake ];
propagatedBuildInputs = [
cddlib
clp
glpk
hpp-centroidal-dynamics
ndcurves
qpoases
];
cmakeFlags = [ "-DUSE_GLPK=ON" ];
doCheck = true;
pythonImportsCheck = [ "hpp_bezier_com_traj" ];
meta = {
description = "Multi contact trajectory generation for the COM using Bezier curves";
homepage = "https://github.com/humanoid-path-planner/hpp-bezier-com-traj";
license = lib.licenses.bsd2;
maintainers = [ lib.maintainers.nim65s ];
};
}
......@@ -20,65 +20,17 @@
"type": "github"
}
},
"hpp-centroidal-dynamics": {
"inputs": {
"flake-parts": [
"flake-parts"
],
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1719769266,
"narHash": "sha256-z5JfncCDNHYhpGZ+CDiq/o/1g7bGbfiBrcEx0aIoD6w=",
"owner": "humanoid-path-planner",
"repo": "hpp-centroidal-dynamics",
"rev": "f4622a437cf7a596897f38d61e5477a7b6387877",
"type": "github"
},
"original": {
"owner": "humanoid-path-planner",
"repo": "hpp-centroidal-dynamics",
"type": "github"
}
},
"ndcurves": {
"inputs": {
"flake-parts": [
"flake-parts"
],
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1719583351,
"narHash": "sha256-N0XZQGm4uNArzPHbSl9bBM0kTwi7cCDOzPCM3lJ98Gk=",
"owner": "loco-3d",
"repo": "ndcurves",
"rev": "e84762286a356e185f38c9846ee8a9c4c49be43b",
"type": "github"
},
"original": {
"owner": "loco-3d",
"ref": "release/1.5.0",
"repo": "ndcurves",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1719674427,
"narHash": "sha256-z2hCpVyfnmYTA5iabf1SW4peFV9itE1JJcXNBKIFkDg=",
"owner": "nim65s",
"lastModified": 1727174734,
"narHash": "sha256-xa3TynMF5vaWonmTOg/Ejc1Fmo0GkQnCaVRVkBc3z2I=",
"owner": "gepetto",
"repo": "nixpkgs",
"rev": "b81610d293fac26c2ec6a81718a979bc25f8c155",
"rev": "0ad139a0e4372abc12320c8c92ee90e0e5e296e1",
"type": "github"
},
"original": {
"owner": "nim65s",
"ref": "gepetto",
"owner": "gepetto",
"repo": "nixpkgs",
"type": "github"
}
......@@ -86,8 +38,6 @@
"root": {
"inputs": {
"flake-parts": "flake-parts",
"hpp-centroidal-dynamics": "hpp-centroidal-dynamics",
"ndcurves": "ndcurves",
"nixpkgs": "nixpkgs"
}
}
......
......@@ -2,27 +2,16 @@
description = "Multi contact trajectory generation for the COM using Bezier curves";
inputs = {
nixpkgs.url = "github:nim65s/nixpkgs/gepetto";
nixpkgs.url = "github:gepetto/nixpkgs";
flake-parts = {
url = "github:hercules-ci/flake-parts";
inputs.nixpkgs-lib.follows = "nixpkgs";
};
hpp-centroidal-dynamics = {
url = "github:humanoid-path-planner/hpp-centroidal-dynamics";
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-parts.follows = "flake-parts";
};
ndcurves = {
url = "github:loco-3d/ndcurves/release/1.5.0";
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-parts.follows = "flake-parts";
};
};
outputs =
inputs@{ flake-parts, ... }:
flake-parts.lib.mkFlake { inherit inputs; } {
imports = [ ];
inputs:
inputs.flake-parts.lib.mkFlake { inherit inputs; } {
systems = [
"x86_64-linux"
"aarch64-linux"
......@@ -30,21 +19,25 @@
"x86_64-darwin"
];
perSystem =
{ pkgs, self', ... }:
{
self',
pkgs,
system,
...
}:
{
devShells.default = pkgs.mkShell { inputsFrom = [ self'.packages.default ]; };
packages = {
inherit (pkgs) cachix;
default = pkgs.callPackage ./. {
hpp-centroidal-dynamics = inputs.hpp-centroidal-dynamics.packages.${system}.default;
ndcurves = inputs.ndcurves.packages.${system}.default;
};
default = self'.packages.hpp-bezier-com-traj;
hpp-bezier-com-traj = pkgs.hpp-bezier-com-traj.overrideAttrs (_: {
src = pkgs.lib.fileset.toSource {
root = ./.;
fileset = pkgs.lib.fileset.unions [
./CMakeLists.txt
./include
./package.xml
./python
./src
./tests
];
};
});
};
devShells.default = pkgs.mkShell { inputsFrom = [ self'.packages.default ]; };
};
};
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment