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