blob: 6d78c28ace7795183f3cede3aee7f6c0bfc4ca2d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
{ lib
, stdenv
, fetchFromGitHub
, cmake
, help2man
, gzip
, vtk_9
, autoPatchelfHook
, libX11
, libGL
, Cocoa
, OpenGL
}:
stdenv.mkDerivation rec {
pname = "f3d";
version = "2.2.1";
outputs = [ "out" "man" ];
src = fetchFromGitHub {
owner = "f3d-app";
repo = "f3d";
rev = "refs/tags/v${version}";
hash = "sha256-3Pg8uvrUGPKPmsn24q5HPMg9dgvukAXBgSVTW0NiCME=";
};
nativeBuildInputs = [
cmake
help2man
gzip
# https://github.com/f3d-app/f3d/pull/1217
autoPatchelfHook
];
buildInputs = [ vtk_9 ] ++ lib.optionals stdenv.isDarwin [ Cocoa OpenGL ];
cmakeFlags = [
# conflict between VTK and Nixpkgs;
# see https://github.com/NixOS/nixpkgs/issues/89167
"-DCMAKE_INSTALL_LIBDIR=lib"
"-DCMAKE_INSTALL_INCLUDEDIR=include"
"-DCMAKE_INSTALL_BINDIR=bin"
"-DF3D_LINUX_GENERATE_MAN=ON"
];
meta = with lib; {
description = "Fast and minimalist 3D viewer using VTK";
homepage = "https://f3d-app.github.io/f3d";
changelog = "https://github.com/f3d-app/f3d/releases/tag/v${version}";
license = licenses.bsd3;
maintainers = with maintainers; [ bcdarwin pbsds ];
platforms = with platforms; unix;
};
}
|