nixpkgs/pkgs/by-name/no/noaa-apt/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

72 lines
1.6 KiB
Nix

{ lib
, rustPlatform
, fetchFromGitHub
, pkg-config
, atk
, cairo
, gdk-pixbuf
, glib
, gtk3
, openssl
, pango
}:
rustPlatform.buildRustPackage rec {
pname = "noaa-apt";
version = "1.4.0";
src = fetchFromGitHub {
owner = "martinber";
repo = "noaa-apt";
rev = "v${version}";
sha256 = "sha256-wmjglF2+BFmlTfvqt90nbCxuldN8AEFXj7y9tgTvA2Y=";
};
nativeBuildInputs = [
pkg-config
];
buildInputs = [
atk
cairo
gdk-pixbuf
glib
gtk3
openssl
pango
];
cargoLock = {
lockFile = ./Cargo.lock;
outputHashes = {
"satellite-0.1.0" = "sha256-R5Tz4MpRnAEnMmkx/LhWPmwRIKpnCLIB4VxApMTBn78=";
};
};
preBuild = ''
# Used by macro pointing to resource location at compile time.
export NOAA_APT_RES_DIR=$out/share/noaa-apt
'';
postInstall = ''
# Resources.
mkdir -p $out/share/noaa-apt
cp -R $src/res/* $out/share/noaa-apt/
# Desktop icon.
install -Dm644 -t $out/share/applications $src/debian/ar.com.mbernardi.noaa-apt.desktop
install -Dm644 -t $out/share/icons/hicolor/48x48/apps $src/debian/ar.com.mbernardi.noaa-apt.png
install -Dm644 -t $out/share/icons/hicolor/scalable/apps $src/debian/ar.com.mbernardi.noaa-apt.svg
'';
meta = with lib; {
description = "NOAA APT image decoder";
homepage = "https://noaa-apt.mbernardi.com.ar/";
license = licenses.gpl3Only;
maintainers = with maintainers; [ trepetti tmarkus ];
platforms = platforms.all;
changelog = "https://github.com/martinber/noaa-apt/releases/tag/v${version}";
mainProgram = "noaa-apt";
};
}