Repository navigation
Expand file tree
/
Copy pathflake.nix
More file actions
88 lines (76 loc) · 1.95 KB
/
Copy pathflake.nix
File metadata and controls
88 lines (76 loc) · 1.95 KB
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
{
description = "3dfier development shell and package";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
outputs =
{ self, nixpkgs }:
let
systems = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
forAllSystems = nixpkgs.lib.genAttrs systems;
pkgsFor = system: import nixpkgs { inherit system; };
in
{
packages = forAllSystems (
system:
let
pkgs = pkgsFor system;
in
{
default = pkgs.stdenv.mkDerivation {
pname = "3dfier";
version = "1.5.0";
src = self;
nativeBuildInputs = with pkgs; [
cmake
pkg-config
];
buildInputs = with pkgs; [
boost
cgal
gdal
gmp
mpfr
pdal
yaml-cpp
];
cmakeFlags = [
"-DCMAKE_BUILD_TYPE=Release"
];
meta = {
description = "Open-source tool for creating 3D models from 2D GIS datasets";
homepage = "https://github.com/tudelft3d/3dfier";
license = pkgs.lib.licenses.gpl3Only;
mainProgram = "3dfier";
platforms = pkgs.lib.platforms.unix;
};
};
}
);
devShells = forAllSystems (
system:
let
pkgs = pkgsFor system;
in
{
default = pkgs.mkShell {
inputsFrom = [
self.packages.${system}.default
];
packages = with pkgs; [
gdb
ninja
];
shellHook = ''
echo "3dfier dev shell"
echo "Configure: cmake -S . -B build -DCMAKE_BUILD_TYPE=Release"
echo "Build: cmake --build build"
'';
};
}
);
};
}