biome: 1.9.2 -> 1.9.3
[NixPkgs.git] / pkgs / applications / radio / noaa-apt / default.nix
blob65024c24b00ebd6f1b998637964e686a3d519c74
1 { lib
2 , rustPlatform
3 , fetchFromGitHub
4 , pkg-config
5 , atk
6 , cairo
7 , gdk-pixbuf
8 , glib
9 , gtk3
10 , openssl
11 , pango
14 rustPlatform.buildRustPackage rec {
15   pname = "noaa-apt";
16   version = "1.4.0";
18   src = fetchFromGitHub {
19     owner = "martinber";
20     repo = "noaa-apt";
21     rev = "v${version}";
22     sha256 = "sha256-wmjglF2+BFmlTfvqt90nbCxuldN8AEFXj7y9tgTvA2Y=";
23   };
25   nativeBuildInputs = [
26     pkg-config
27   ];
29   buildInputs = [
30     atk
31     cairo
32     gdk-pixbuf
33     glib
34     gtk3
35     openssl
36     pango
37   ];
39   cargoLock = {
40     lockFile = ./Cargo.lock;
41     outputHashes = {
42       "satellite-0.1.0" = "sha256-R5Tz4MpRnAEnMmkx/LhWPmwRIKpnCLIB4VxApMTBn78=";
43     };
44   };
46   preBuild = ''
47     # Used by macro pointing to resource location at compile time.
48     export NOAA_APT_RES_DIR=$out/share/noaa-apt
49   '';
51   postInstall = ''
52     # Resources.
53     mkdir -p $out/share/noaa-apt
54     cp -R $src/res/* $out/share/noaa-apt/
56     # Desktop icon.
57     install -Dm644 -t $out/share/applications $src/debian/ar.com.mbernardi.noaa-apt.desktop
58     install -Dm644 -t $out/share/icons/hicolor/48x48/apps $src/debian/ar.com.mbernardi.noaa-apt.png
59     install -Dm644 -t $out/share/icons/hicolor/scalable/apps $src/debian/ar.com.mbernardi.noaa-apt.svg
60   '';
62   meta = with lib; {
63     description = "NOAA APT image decoder";
64     homepage = "https://noaa-apt.mbernardi.com.ar/";
65     license = licenses.gpl3Only;
66     maintainers = with maintainers; [ trepetti tmarkus ];
67     platforms = platforms.all;
68     changelog = "https://github.com/martinber/noaa-apt/releases/tag/v${version}";
69     mainProgram = "noaa-apt";
70   };