about summary refs log tree commit diff
path: root/pkgs/applications/misc/survex/default.nix
blob: 17888cc8041f1f286d82f77349dc25405cdb4fc3 (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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
{ lib
, stdenv
, fetchurl
, Carbon
, Cocoa
, ffmpeg
, glib
, libGLU
, mesa
, perl
, pkg-config
, proj
, python3
, wrapGAppsHook
, wxGTK30-gtk3
, wxmac
, xlibsWrapper
}:

stdenv.mkDerivation rec {
  pname = "survex";
  version = "1.4.1";

  nativeBuildInputs = [
    perl
    pkg-config
    python3
    wrapGAppsHook
  ];

  buildInputs = [
    ffmpeg
    glib
    libGLU
    mesa
    proj
  ] ++ lib.optionals stdenv.hostPlatform.isDarwin [
    Carbon
    Cocoa
    wxmac
  ] ++ lib.optionals stdenv.hostPlatform.isLinux [
    wxGTK30-gtk3
    xlibsWrapper
  ];

  src = fetchurl {
    url = "https://survex.com/software/${version}/${pname}-${version}.tar.gz";
    hash = "sha256-69X1jGjBTQIQzkD1mTZTzE8L/GXnnf5SI52l7eIiLz4=";
  };

  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;
  };
}