diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 93db923c267ec1..6fae754f0a9f3c 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -22628,6 +22628,11 @@ githubId = 1220572; name = "Christian Theune"; }; + theverygaming = { + name = "theverygaming"; + github = "theverygaming"; + githubId = 18639279; + }; thiagokokada = { email = "thiagokokada@gmail.com"; github = "thiagokokada"; diff --git a/pkgs/by-name/sa/satdump/cmake-fix.patch b/pkgs/by-name/sa/satdump/cmake-fix.patch new file mode 100644 index 00000000000000..6a6ee090d5d0bb --- /dev/null +++ b/pkgs/by-name/sa/satdump/cmake-fix.patch @@ -0,0 +1,13 @@ +diff --git a/src-core/CMakeLists.txt b/src-core/CMakeLists.txt +index 46070104..e7aa5a5a 100644 +--- a/src-core/CMakeLists.txt ++++ b/src-core/CMakeLists.txt +@@ -34,7 +34,7 @@ if(MSVC OR BUILD_MSVC) + target_compile_definitions(satdump_core PUBLIC LIBRARIES_PATH="./") + else() + target_compile_definitions(satdump_core PUBLIC RESOURCES_PATH="${CMAKE_INSTALL_PREFIX}/share/satdump/") +- target_compile_definitions(satdump_core PUBLIC LIBRARIES_PATH="${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/satdump/") ++ target_compile_definitions(satdump_core PUBLIC LIBRARIES_PATH="${CMAKE_INSTALL_FULL_LIBDIR}/satdump/") + endif() + + # We have to... For MSVC diff --git a/pkgs/by-name/sa/satdump/package.nix b/pkgs/by-name/sa/satdump/package.nix new file mode 100644 index 00000000000000..8a6665825bdab5 --- /dev/null +++ b/pkgs/by-name/sa/satdump/package.nix @@ -0,0 +1,114 @@ +{ + lib, + stdenv, + fetchFromGitHub, + 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, +}: + +let + nng_shared = ( + nng.overrideAttrs (old: { + cmakeFlags = old.cmakeFlags ++ [ "-DBUILD_SHARED_LIBS=ON" ]; + }) + ); +in +stdenv.mkDerivation (finalAttrs: { + pname = "satdump"; + version = "1.2.2"; + + src = fetchFromGitHub { + owner = "SatDump"; + repo = "SatDump"; + tag = "${finalAttrs.version}"; + hash = "sha256-+Sne+NMwnIAs3ff64fBHAIE4/iDExIC64sXtO0LJwI0="; + }; + + cmakeFlags = [ + "-DCMAKE_BUILD_TYPE=Release" + ]; + + nativeBuildInputs = [ + cmake + pkg-config + ]; + + buildInputs = + [ + fftwFloat + libpng + libtiff + jemalloc + volk + nng_shared + 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; + + patches = [ ./cmake-fix.patch ]; + + 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"; + }; +})