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: add macos support & CI #1452

Merged
merged 4 commits into from
Aug 22, 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
4 changes: 2 additions & 2 deletions .github/workflows/nix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:
runs-on: "${{ matrix.os }}-latest"
strategy:
matrix:
os: [ubuntu] # TODO: macos
os: [ubuntu, macos]
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- uses: DeterminateSystems/flake-checker-action@main
- run: nix build
- run: nix build -L
66 changes: 32 additions & 34 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
{
cmake,
coin3d,
darwin,
doxygen,
eigen,
#fetchFromGitHub,
Expand All @@ -18,7 +19,7 @@
libdc1394,
libdmtx,
libglvnd,
libjpeg, # this is libjpeg-turbo
libjpeg, # this is libjpeg-turbo
libpng,
librealsense,
libxml2,
Expand All @@ -29,7 +30,7 @@
openblas,
opencv,
pkg-config,
python3,
python3Packages,
stdenv,
texliveSmall,
v4l-utils,
Expand All @@ -42,14 +43,6 @@ stdenv.mkDerivation (finalAttrs: {
pname = "visp";
version = "3.6.0";

/*
src = fetchFromGitHub {
owner = "lagadic";
repo = "visp";
rev = "v${finalAttrs.version}";
hash = "sha256-m5Tmr+cZab7eSjmbXb8HpJpFHb0UYFTyimY+CkfBIAo=";
};
*/
src = nix-gitignore.gitignoreSource [ ./.nixignore ] ./.;

nativeBuildInputs = [
Expand All @@ -59,35 +52,40 @@ stdenv.mkDerivation (finalAttrs: {
texliveSmall
];

doCheck = true;
buildInputs =
[
eigen
lapack
libdc1394
libdmtx
libglvnd
libjpeg
libpng
librealsense
libX11
libxml2
nlohmann_json
#ogre
openblas
opencv
python3Packages.numpy
xorg.libpthreadstubs
zbar
zlib
]
++ lib.optionals stdenv.isLinux [
coin3d
v4l-utils
]
++ lib.optionals stdenv.isDarwin [ darwin.IOKit ];

buildInputs = [
coin3d
eigen
lapack
libdc1394
libdmtx
libglvnd
libjpeg
libpng
librealsense
libX11
libxml2
nlohmann_json
#ogre
openblas
opencv
(python3.withPackages (p: [ p.numpy ]))
v4l-utils
xorg.libpthreadstubs
zbar
zlib
];
doCheck = true;

meta = {
description = "Open Source Visual Servoing Platform";
homepage = "https://visp.inria.fr";
changelog = "https://github.com/lagadic/visp/blob/v${finalAttrs.version}/ChangeLog.txt";
license = lib.licenses.gpl2Plus;
maintainers = [ lib.maintainers.nim65s ];
maintainers = with lib.maintainers; [ nim65s ];
};
})
Loading