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: jobs:
tests: tests:
...@@ -11,10 +12,9 @@ jobs: ...@@ -11,10 +12,9 @@ jobs:
os: [ubuntu] os: [ubuntu]
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main - uses: cachix/install-nix-action@v27
- uses: DeterminateSystems/magic-nix-cache-action@main - uses: cachix/cachix-action@v15
- run: nix --accept-flake-config build -L with:
- run: nix --accept-flake-config run .#cachix push gepetto $(readlink result) name: gepetto
if: github.repository_owner == 'humanoid-path-planner' authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
env: - run: nix build -L
CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }}
{
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 @@ ...@@ -20,65 +20,17 @@
"type": "github" "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": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1719674427, "lastModified": 1727174734,
"narHash": "sha256-z2hCpVyfnmYTA5iabf1SW4peFV9itE1JJcXNBKIFkDg=", "narHash": "sha256-xa3TynMF5vaWonmTOg/Ejc1Fmo0GkQnCaVRVkBc3z2I=",
"owner": "nim65s", "owner": "gepetto",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "b81610d293fac26c2ec6a81718a979bc25f8c155", "rev": "0ad139a0e4372abc12320c8c92ee90e0e5e296e1",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nim65s", "owner": "gepetto",
"ref": "gepetto",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
...@@ -86,8 +38,6 @@ ...@@ -86,8 +38,6 @@
"root": { "root": {
"inputs": { "inputs": {
"flake-parts": "flake-parts", "flake-parts": "flake-parts",
"hpp-centroidal-dynamics": "hpp-centroidal-dynamics",
"ndcurves": "ndcurves",
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
} }
} }
......
...@@ -2,27 +2,16 @@ ...@@ -2,27 +2,16 @@
description = "Multi contact trajectory generation for the COM using Bezier curves"; description = "Multi contact trajectory generation for the COM using Bezier curves";
inputs = { inputs = {
nixpkgs.url = "github:nim65s/nixpkgs/gepetto"; nixpkgs.url = "github:gepetto/nixpkgs";
flake-parts = { flake-parts = {
url = "github:hercules-ci/flake-parts"; url = "github:hercules-ci/flake-parts";
inputs.nixpkgs-lib.follows = "nixpkgs"; 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 = outputs =
inputs@{ flake-parts, ... }: inputs:
flake-parts.lib.mkFlake { inherit inputs; } { inputs.flake-parts.lib.mkFlake { inherit inputs; } {
imports = [ ];
systems = [ systems = [
"x86_64-linux" "x86_64-linux"
"aarch64-linux" "aarch64-linux"
...@@ -30,21 +19,25 @@ ...@@ -30,21 +19,25 @@
"x86_64-darwin" "x86_64-darwin"
]; ];
perSystem = perSystem =
{ pkgs, self', ... }:
{ {
self', devShells.default = pkgs.mkShell { inputsFrom = [ self'.packages.default ]; };
pkgs,
system,
...
}:
{
packages = { packages = {
inherit (pkgs) cachix; default = self'.packages.hpp-bezier-com-traj;
default = pkgs.callPackage ./. { hpp-bezier-com-traj = pkgs.hpp-bezier-com-traj.overrideAttrs (_: {
hpp-centroidal-dynamics = inputs.hpp-centroidal-dynamics.packages.${system}.default; src = pkgs.lib.fileset.toSource {
ndcurves = inputs.ndcurves.packages.${system}.default; 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.
Finish editing this message first!
Please register or to comment