-
-
Notifications
You must be signed in to change notification settings - Fork 14.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
50807e9
commit eaa37ee
Showing
1 changed file
with
109 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
{ | ||
lib, | ||
stdenv, | ||
fetchFromGitHub, | ||
gitUpdater, | ||
cmake, | ||
pkg-config, | ||
# required dependencies | ||
fftwFloat, | ||
libpng, | ||
libtiff, | ||
jemalloc, | ||
volk, | ||
nng, | ||
curl, | ||
# Optional dependencies | ||
withZIQRecordingCompression ? true, | ||
zstd, | ||
withGUI ? true, | ||
glfw, | ||
zenity, | ||
withAudio ? true, | ||
portaudio, | ||
withOfficialProductSupport ? true, | ||
hdf5, | ||
withOpenCL ? true, | ||
opencl-headers, | ||
ocl-icd, | ||
withSourceRtlsdr ? true, | ||
rtl-sdr-librtlsdr, | ||
withSourceHackRF ? true, | ||
hackrf, | ||
withSourceAirspy ? true, | ||
airspy, | ||
withSourceAirspyHF ? true, | ||
airspyhf, | ||
withSourceAD9361 ? true, | ||
libad9361, | ||
libiio, | ||
withSourceBladeRF ? true, | ||
libbladeRF, | ||
}: | ||
|
||
stdenv.mkDerivation (finalAttrs: { | ||
pname = "satdump"; | ||
version = "1.2.2"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "SatDump"; | ||
repo = "SatDump"; | ||
tag = finalAttrs.version; | ||
hash = "sha256-+Sne+NMwnIAs3ff64fBHAIE4/iDExIC64sXtO0LJwI0="; | ||
}; | ||
|
||
nativeBuildInputs = [ | ||
cmake | ||
pkg-config | ||
]; | ||
|
||
buildInputs = | ||
[ | ||
fftwFloat | ||
libpng | ||
libtiff | ||
jemalloc | ||
volk | ||
nng | ||
curl | ||
] | ||
++ lib.optional withZIQRecordingCompression zstd | ||
++ lib.optionals withGUI [ | ||
glfw | ||
zenity | ||
] | ||
++ lib.optional withAudio portaudio | ||
++ lib.optional withOfficialProductSupport hdf5 | ||
++ lib.optionals withOpenCL [ | ||
opencl-headers | ||
ocl-icd | ||
] | ||
++ lib.optional withSourceRtlsdr rtl-sdr-librtlsdr | ||
++ lib.optional withSourceHackRF hackrf | ||
++ lib.optional withSourceAirspy airspy | ||
++ lib.optional withSourceAirspyHF airspyhf | ||
++ lib.optionals withSourceAD9361 [ | ||
libad9361 | ||
libiio | ||
] | ||
++ lib.optional withSourceBladeRF libbladeRF; | ||
|
||
postPatch = '' | ||
substituteInPlace src-core/CMakeLists.txt \ | ||
--replace-fail '$'{CMAKE_INSTALL_PREFIX}/'$'{CMAKE_INSTALL_LIBDIR} '$'{CMAKE_INSTALL_FULL_LIBDIR} | ||
''; | ||
|
||
passthru.updateScript = gitUpdater { }; | ||
|
||
meta = { | ||
description = "A generic satellite data processing software"; | ||
homepage = "https://www.satdump.org/"; | ||
changelog = "https://github.com/SatDump/SatDump/releases/tag/${finalAttrs.version}"; | ||
license = lib.licenses.gpl3Only; | ||
platforms = lib.platforms.linux; | ||
maintainers = with lib.maintainers; [ | ||
theverygaming | ||
]; | ||
mainProgram = "satdump"; | ||
}; | ||
}) |