Skip to content

Commit

Permalink
nix
Browse files Browse the repository at this point in the history
  • Loading branch information
nim65s committed Jun 30, 2024
1 parent 964503f commit 27e88bd
Show file tree
Hide file tree
Showing 5 changed files with 805 additions and 1 deletion.
19 changes: 19 additions & 0 deletions .github/workflows/nix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: "Nix CI"

on: [pull_request, push]

jobs:
tests:
name: "Nix build on ${{ matrix.os }}"
runs-on: "${{ matrix.os }}-latest"
strategy:
matrix:
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)
env:
CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }}
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ MACRO(ADD_PKG pkg)
ENDMACRO(ADD_PKG)

MACRO(ADD_HPP_PKG pkg)
ADD_PKG(${pkg} git://github.com:humanoid-path-planner/${pkg})
ADD_PKG(${pkg} git+https://github.com:humanoid-path-planner/${pkg})
ENDMACRO(ADD_HPP_PKG)

SET(SETUP_DOC_PKG)
Expand Down
58 changes: 58 additions & 0 deletions default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
lib,
stdenv,
cmake,
doxygen,
hpp-practicals,
hpp-tutorial,
libsForQt5,
pkg-config,
python3Packages,
}:

stdenv.mkDerivation {
pname = "hpp-doc";
version = "5.0.0";

src = lib.fileset.toSource {
root = ./.;
fileset = lib.fileset.unions [
./CMakeLists.txt
./doc
./package.xml
./scripts
];
};

prePatch = ''
substituteInPlace scripts/auto-install-hpp.sh \
--replace-fail /bin/bash ${stdenv.shell}
substituteInPlace scripts/install-tar-on-remote \
--replace-fail /bin/bash ${stdenv.shell}
substituteInPlace scripts/generate-tar-doc \
--replace-fail /bin/sh ${stdenv.shell}
substituteInPlace scripts/packageDep \
--replace-fail /usr/bin/python ${python3Packages.python.interpreter}
'';

strictDeps = true;

nativeBuildInputs = [
cmake
doxygen
libsForQt5.wrapQtAppsHook
pkg-config
];
buildInputs = [ libsForQt5.qtbase ];
propagatedBuildInputs = [
hpp-practicals
hpp-tutorial
];

meta = {
description = "Documentation for project Humanoid Path Planner";
homepage = "https://github.com/humanoid-path-planner/hpp-doc";
license = lib.licenses.bsd2;
maintainers = [ lib.maintainers.nim65s ];
};
}
Loading

0 comments on commit 27e88bd

Please sign in to comment.