Skip to content

Commit

Permalink
nix: move package to nixpkgs
Browse files Browse the repository at this point in the history
  • Loading branch information
nim65s committed Oct 7, 2024
1 parent f0abf03 commit 6fd12df
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 145 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/nix.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: "Nix CI"
name: "CI - Nix"

on: [pull_request, push]
on:
push:

jobs:
tests:
Expand All @@ -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
55 changes: 0 additions & 55 deletions default.nix

This file was deleted.

60 changes: 5 additions & 55 deletions flake.lock

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

45 changes: 19 additions & 26 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,49 +2,42 @@
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"
"aarch64-darwin"
"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 comments on commit 6fd12df

Please sign in to comment.