Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nix: move package to nixpkgs #73

Merged
merged 2 commits into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
48 changes: 0 additions & 48 deletions default.nix

This file was deleted.

11 changes: 5 additions & 6 deletions flake.lock

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

34 changes: 21 additions & 13 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -1,37 +1,45 @@
{
description = "Debugging tools for the HPP project";

nixConfig = {
extra-substituters = [ "https://gepetto.cachix.org" ];
extra-trusted-public-keys = [ "gepetto.cachix.org-1:toswMl31VewC0jGkN6+gOelO2Yom0SOHzPwJMY2XiDY=" ];
};

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";
};
};

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 =
{ self', pkgs, ... }:
{ pkgs, self', ... }:
{
devShells.default = pkgs.mkShell { inputsFrom = [ self'.packages.default ]; };
packages = {
inherit (pkgs) cachix;
default = pkgs.callPackage ./. { };
default = self'.packages.hpp-util;
hpp-util = pkgs.hpp-util.overrideAttrs (_: {
# TODO: remove this patch override after next release
patches = [];
src = pkgs.lib.fileset.toSource {
root = ./.;
fileset = pkgs.lib.fileset.unions [
./CMakeLists.txt
./doc
./include
./package.xml
./src
./tests
];
};
});
};
devShells.default = pkgs.mkShell { inputsFrom = [ self'.packages.default ]; };
};
};
}