2021-06-08 04:23:33 +02:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2022-02-24 19:06:13 +01:00
|
|
|
, fetchurl
|
2022-10-08 03:07:14 +02:00
|
|
|
, fetchpatch
|
2022-02-24 19:06:13 +01:00
|
|
|
, Carbon
|
|
|
|
, Cocoa
|
|
|
|
, ffmpeg
|
|
|
|
, glib
|
|
|
|
, libGLU
|
2022-11-14 10:17:52 +01:00
|
|
|
, libICE
|
|
|
|
, libX11
|
2022-02-24 19:06:13 +01:00
|
|
|
, mesa
|
|
|
|
, perl
|
2021-06-08 04:23:33 +02:00
|
|
|
, pkg-config
|
2022-02-24 19:06:13 +01:00
|
|
|
, proj
|
|
|
|
, python3
|
2024-04-26 22:24:03 +02:00
|
|
|
, wrapGAppsHook3
|
2022-10-08 03:07:14 +02:00
|
|
|
, wxGTK32
|
2021-06-08 04:23:33 +02:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "survex";
|
2022-10-08 03:07:14 +02:00
|
|
|
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=";
|
|
|
|
})
|
|
|
|
];
|
2021-06-08 04:23:33 +02:00
|
|
|
|
2022-02-24 19:06:13 +01:00
|
|
|
nativeBuildInputs = [
|
|
|
|
perl
|
|
|
|
pkg-config
|
|
|
|
python3
|
2024-04-26 22:24:03 +02:00
|
|
|
wrapGAppsHook3
|
2022-02-24 19:06:13 +01:00
|
|
|
];
|
2021-06-14 03:22:25 +02:00
|
|
|
|
|
|
|
buildInputs = [
|
2022-02-24 19:06:13 +01:00
|
|
|
ffmpeg
|
|
|
|
glib
|
|
|
|
proj
|
2022-10-08 03:07:14 +02:00
|
|
|
wxGTK32
|
2021-06-14 03:22:25 +02:00
|
|
|
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
|
2022-02-24 19:06:13 +01:00
|
|
|
Carbon
|
|
|
|
Cocoa
|
2021-06-14 03:22:25 +02:00
|
|
|
] ++ lib.optionals stdenv.hostPlatform.isLinux [
|
2023-07-15 19:03:01 +02:00
|
|
|
# TODO: libGLU doesn't build for macOS because of Mesa issues
|
|
|
|
# (#233265); is it required for anything?
|
|
|
|
libGLU
|
|
|
|
mesa
|
2022-11-14 10:17:52 +01:00
|
|
|
libICE
|
|
|
|
libX11
|
2021-06-14 03:22:25 +02:00
|
|
|
];
|
2021-06-08 04:23:33 +02:00
|
|
|
|
2021-06-14 03:22:25 +02:00
|
|
|
postPatch = ''
|
|
|
|
patchShebangs .
|
2021-06-08 04:23:33 +02:00
|
|
|
'';
|
|
|
|
|
2022-02-24 19:06:13 +01:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
doCheck = (!stdenv.isDarwin); # times out
|
|
|
|
enableParallelChecking = false;
|
|
|
|
|
2021-06-08 04:23:33 +02:00
|
|
|
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/";
|
2022-02-24 19:06:13 +01:00
|
|
|
changelog = "https://github.com/ojwb/survex/raw/v${version}/NEWS";
|
2021-06-08 04:23:33 +02:00
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
maintainers = [ maintainers.matthewcroughan ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|