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
|
{ lib
, stdenv
, fetchurl
, fetchpatch
, Carbon
, Cocoa
, ffmpeg
, glib
, libGLU
, libICE
, libX11
, mesa
, perl
, pkg-config
, proj
, python3
, wrapGAppsHook
, wxGTK32
}:
stdenv.mkDerivation rec {
pname = "survex";
version = "1.4.3";
src = fetchurl {
url = "https://survex.com/software/${version}/${pname}-${version}.tar.gz";
hash = "sha256-7NtGTe9xNRPEvG9fQ2fC6htQLEMHfqGmBM2ezhi6oNM=";
};
patches = [
# Fix cavern.tst to work with SOURCE_DATE_EPOCH set
(fetchpatch {
url = "https://github.com/ojwb/survex/commit/b1200a60be7bdea20ffebbd8bb15386041727fa6.patch";
hash = "sha256-OtFjqpU+u8XGy+PAHg2iea++b681p/Kl8YslisBs4sA=";
})
];
nativeBuildInputs = [
perl
pkg-config
python3
wrapGAppsHook
];
buildInputs = [
ffmpeg
glib
proj
wxGTK32
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
Carbon
Cocoa
] ++ lib.optionals stdenv.hostPlatform.isLinux [
# TODO: libGLU doesn't build for macOS because of Mesa issues
# (#233265); is it required for anything?
libGLU
mesa
libICE
libX11
];
postPatch = ''
patchShebangs .
'';
enableParallelBuilding = true;
doCheck = (!stdenv.isDarwin); # times out
enableParallelChecking = false;
meta = with lib; {
description = "Free Software/Open Source software package for mapping caves";
longDescription = ''
Survex is a Free Software/Open Source software package for mapping caves,
licensed under the GPL. It is designed to be portable and can be run on a
variety of platforms, including Linux/Unix, macOS, and Microsoft Windows.
'';
homepage = "https://survex.com/";
changelog = "https://github.com/ojwb/survex/raw/v${version}/NEWS";
license = licenses.gpl2Plus;
maintainers = [ maintainers.matthewcroughan ];
platforms = platforms.all;
};
}
|