about summary refs log tree commit diff
path: root/pkgs/development/libraries/aptdec/default.nix
blob: dce52f7e668c5fdc39c8b2be88b477b9e70a81ae (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{ lib, stdenv, fetchFromGitHub, cmake, pkg-config
, libpng, libsndfile
}:

stdenv.mkDerivation {
  pname = "aptdec";
  version = "unstable-2022-05-18";

  src = fetchFromGitHub {
    owner = "Xerbo";
    repo = "aptdec";
    rev = "b1cc7480732349a7c772124f984b58f4c734c91b";
    sha256 = "sha256-Fi9IkZcvqxpmHzqucpCr++37bmTtMy18P4LPznoaYIY=";
  };

  # fixes https://github.com/Xerbo/aptdec/issues/15
  postPatch = ''
    substituteInPlace CMakeLists.txt --replace "-Werror" ""
  '';

  nativeBuildInputs = [ cmake pkg-config ];
  buildInputs = [ libpng libsndfile ];

  meta = with lib; {
    description = "NOAA APT satellite imagery decoding library";
    homepage = "https://github.com/Xerbo/aptdec";
    license = licenses.gpl2;
    maintainers = with maintainers; [ alexwinter ];
    platforms = platforms.unix;
  };
}