2021-12-06 16:07:01 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, cmake, vtk_9, libX11, libGL, Cocoa, OpenGL }:
|
2020-10-11 12:50:04 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "f3d";
|
2022-09-14 18:05:37 +00:00
|
|
|
version = "1.3.1";
|
2020-10-11 12:50:04 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "f3d-app";
|
2020-10-11 12:50:04 +00:00
|
|
|
repo = "f3d";
|
|
|
|
rev = "v${version}";
|
2022-09-14 18:05:37 +00:00
|
|
|
hash = "sha256-dOpiX7xJWDKHqPLGvlgv7NHgfzyeZhJd898+KzAmD4Q=";
|
2020-10-11 12:50:04 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
|
|
|
|
buildInputs = [ vtk_9 ]
|
2021-01-17 00:15:33 +00:00
|
|
|
++ lib.optionals stdenv.isLinux [ libGL libX11 ]
|
|
|
|
++ lib.optionals stdenv.isDarwin [ Cocoa OpenGL ];
|
2020-10-11 12:50:04 +00:00
|
|
|
|
2022-09-14 18:05:37 +00:00
|
|
|
# conflict between VTK and Nixpkgs;
|
|
|
|
# see https://github.com/NixOS/nixpkgs/issues/89167
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DCMAKE_INSTALL_LIBDIR=lib"
|
|
|
|
"-DCMAKE_INSTALL_INCLUDEDIR=include"
|
|
|
|
"-DCMAKE_INSTALL_BINDIR=bin"
|
|
|
|
];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-10-11 12:50:04 +00:00
|
|
|
description = "Fast and minimalist 3D viewer using VTK";
|
2021-12-06 16:07:01 +00:00
|
|
|
homepage = "https://f3d-app.github.io/f3d";
|
2020-10-11 12:50:04 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ bcdarwin ];
|
|
|
|
platforms = with platforms; unix;
|
|
|
|
};
|
|
|
|
}
|