1{ lib, stdenv, fetchFromGitHub, cmake, pkg-config
2, libpng, libsndfile
3}:
4
5stdenv.mkDerivation {
6 pname = "aptdec";
7 version = "unstable-2022-05-18";
8
9 src = fetchFromGitHub {
10 owner = "Xerbo";
11 repo = "aptdec";
12 rev = "b1cc7480732349a7c772124f984b58f4c734c91b";
13 sha256 = "sha256-Fi9IkZcvqxpmHzqucpCr++37bmTtMy18P4LPznoaYIY=";
14 };
15
16 # fixes https://github.com/Xerbo/aptdec/issues/15
17 postPatch = ''
18 substituteInPlace CMakeLists.txt --replace "-Werror" ""
19 '';
20
21 nativeBuildInputs = [ cmake pkg-config ];
22 buildInputs = [ libpng libsndfile ];
23
24 meta = with lib; {
25 description = "NOAA APT satellite imagery decoding library";
26 homepage = "https://github.com/Xerbo/aptdec";
27 license = licenses.gpl2;
28 maintainers = with maintainers; [ alexwinter ];
29 platforms = platforms.linux;
30 };
31}