Skip to content

Commit 2d9f676

Browse files
committed
Nix: initial setup
1 parent 1500c88 commit 2d9f676

File tree

6 files changed

+162
-0
lines changed

6 files changed

+162
-0
lines changed

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"

.github/workflows/nix.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: "CI - Nix"
2+
3+
on:
4+
push:
5+
branches:
6+
- devel
7+
- master
8+
pull_request:
9+
branches:
10+
- devel
11+
- master
12+
13+
jobs:
14+
tests:
15+
name: "Nix build on ${{ matrix.os }}"
16+
runs-on: "${{ matrix.os }}-latest"
17+
strategy:
18+
matrix:
19+
os: [ubuntu, macos]
20+
steps:
21+
- uses: actions/checkout@v4
22+
- uses: cachix/install-nix-action@v27
23+
- uses: cachix/cachix-action@v15
24+
with:
25+
name: gepetto
26+
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
27+
- run: nix build -L
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: update-flake-lock
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: '0 18 23 * *'
7+
8+
jobs:
9+
lockfile:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout repository
13+
uses: actions/checkout@v4
14+
- name: Install Nix
15+
uses: DeterminateSystems/nix-installer-action@main
16+
- name: Update flake.lock
17+
uses: DeterminateSystems/update-flake-lock@main
18+
with:
19+
token: ${{ secrets.GH_TOKEN_FOR_UPDATES }}

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
1111
- Update Go2 collision for convex hull of mesh and remove "Head_upper", "Head_lower", "XX_calflower", "XX_calflower1" links and joints ([#260](https://github.com/Gepetto/example-robot-data/pull/260))
1212
- Fix ROS2 installation ([#261](https://github.com/Gepetto/example-robot-data/pull/261))
1313
- Add tiago pro ([#265](https://github.com/Gepetto/example-robot-data/pull/265))
14+
- Add nix flake
1415

1516
## [4.2.0] - 2024-12-08
1617

flake.lock

Lines changed: 61 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
description = "Set of robot URDFs for benchmarking and developed examples";
3+
4+
inputs = {
5+
flake-parts.url = "github:hercules-ci/flake-parts";
6+
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
7+
};
8+
9+
outputs =
10+
inputs:
11+
inputs.flake-parts.lib.mkFlake { inherit inputs; } {
12+
systems = inputs.nixpkgs.lib.systems.flakeExposed;
13+
perSystem =
14+
{
15+
pkgs,
16+
self',
17+
...
18+
}:
19+
{
20+
apps.default = {
21+
type = "app";
22+
program = pkgs.python3.withPackages (_: [ self'.packages.default ]);
23+
};
24+
devShells.default = pkgs.mkShell {
25+
inputsFrom = [ self'.packages.default ];
26+
packages = [ (pkgs.python3.withPackages (p: [p.tomlkit])) ]; # for "make release"
27+
};
28+
packages = {
29+
default = self'.packages.example-robot-data;
30+
example-robot-data = pkgs.python3Packages.example-robot-data.overrideAttrs (_: {
31+
src = pkgs.lib.fileset.toSource {
32+
root = ./.;
33+
fileset = pkgs.lib.fileset.unions [
34+
./CMakeLists.txt
35+
./colcon.pkg
36+
./include
37+
./package.xml
38+
./pyproject.toml
39+
./python
40+
./robots
41+
./unittest
42+
];
43+
};
44+
});
45+
};
46+
};
47+
};
48+
}

0 commit comments

Comments
 (0)