nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib
2, stdenv
3, fetchurl
4, fetchpatch
5, Carbon
6, Cocoa
7, ffmpeg
8, glib
9, libGLU
10, libICE
11, libX11
12, mesa
13, perl
14, pkg-config
15, proj
16, python3
17, wrapGAppsHook
18, wxGTK32
19}:
20
21stdenv.mkDerivation rec {
22 pname = "survex";
23 version = "1.4.3";
24
25 src = fetchurl {
26 url = "https://survex.com/software/${version}/${pname}-${version}.tar.gz";
27 hash = "sha256-7NtGTe9xNRPEvG9fQ2fC6htQLEMHfqGmBM2ezhi6oNM=";
28 };
29
30 patches = [
31 # Fix cavern.tst to work with SOURCE_DATE_EPOCH set
32 (fetchpatch {
33 url = "https://github.com/ojwb/survex/commit/b1200a60be7bdea20ffebbd8bb15386041727fa6.patch";
34 hash = "sha256-OtFjqpU+u8XGy+PAHg2iea++b681p/Kl8YslisBs4sA=";
35 })
36 ];
37
38 nativeBuildInputs = [
39 perl
40 pkg-config
41 python3
42 wrapGAppsHook
43 ];
44
45 buildInputs = [
46 ffmpeg
47 glib
48 libGLU
49 mesa
50 proj
51 wxGTK32
52 ] ++ lib.optionals stdenv.hostPlatform.isDarwin [
53 Carbon
54 Cocoa
55 ] ++ lib.optionals stdenv.hostPlatform.isLinux [
56 libICE
57 libX11
58 ];
59
60 postPatch = ''
61 patchShebangs .
62 '';
63
64 enableParallelBuilding = true;
65 doCheck = (!stdenv.isDarwin); # times out
66 enableParallelChecking = false;
67
68 meta = with lib; {
69 description = "Free Software/Open Source software package for mapping caves";
70 longDescription = ''
71 Survex is a Free Software/Open Source software package for mapping caves,
72 licensed under the GPL. It is designed to be portable and can be run on a
73 variety of platforms, including Linux/Unix, macOS, and Microsoft Windows.
74 '';
75 homepage = "https://survex.com/";
76 changelog = "https://github.com/ojwb/survex/raw/v${version}/NEWS";
77 license = licenses.gpl2Plus;
78 maintainers = [ maintainers.matthewcroughan ];
79 platforms = platforms.all;
80 };
81}