nixpkgs/pkgs/by-name/ne/newsflash/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

110 lines
2.3 KiB
Nix

{
lib,
stdenv,
fetchFromGitLab,
rustPlatform,
blueprint-compiler,
cargo,
desktop-file-utils,
meson,
ninja,
pkg-config,
rustc,
wrapGAppsHook4,
gdk-pixbuf,
clapper,
gtk4,
libadwaita,
libxml2,
openssl,
sqlite,
webkitgtk_6_0,
glib-networking,
librsvg,
gst_all_1,
gitUpdater,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "newsflash";
version = "3.3.5";
src = fetchFromGitLab {
owner = "news-flash";
repo = "news_flash_gtk";
rev = "refs/tags/v.${finalAttrs.version}";
hash = "sha256-H2/qKnsByidziUldX5MZBrMyMHfuQ4SN9wXizJUGQ8I=";
};
cargoDeps = rustPlatform.importCargoLock {
lockFile = ./Cargo.lock;
outputHashes = {
"article_scraper-2.1.0" = "sha256-0jDXH5kkX34tAWK+3hpmW1LWBsFksVgTnSuQX+XXVEM=";
"clapper-0.1.0" = "sha256-IFFqfSq2OpzfopQXSYfnJ68HGLY+rvcLqk7NTdDd+28=";
"news-flash-2.3.0-alpha.0" = "sha256-L7siGYdb8v57nBGYs86smlw971fvurYQJKK/AdTpi6s=";
"newsblur_api-0.3.0" = "sha256-m2178zdJzeskl3BQpZr6tlxTAADehxz8uYcZzi15nhQ=";
};
};
postPatch = ''
patchShebangs build-aux/cargo.sh
meson rewrite kwargs set project / version '${finalAttrs.version}'
'';
strictDeps = true;
nativeBuildInputs = [
blueprint-compiler
cargo
desktop-file-utils
meson
ninja
pkg-config
rustc
rustPlatform.cargoSetupHook
wrapGAppsHook4
# Provides setup hook to fix "Unrecognized image file format"
gdk-pixbuf
];
buildInputs =
[
clapper
gtk4
libadwaita
libxml2
openssl
sqlite
webkitgtk_6_0
# TLS support for loading external content in webkitgtk WebView
glib-networking
# SVG support for gdk-pixbuf
librsvg
]
++ (with gst_all_1; [
# Audio & video support for webkitgtk WebView
gstreamer
gst-plugins-base
gst-plugins-good
gst-plugins-bad
]);
passthru.updateScript = gitUpdater { rev-prefix = "v."; };
meta = {
description = "Modern feed reader designed for the GNOME desktop";
homepage = "https://gitlab.com/news-flash/news_flash_gtk";
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [
kira-bruneau
stunkymonkey
];
platforms = lib.platforms.unix;
mainProgram = "io.gitlab.news_flash.NewsFlash";
};
})