Alyssa Ross c368e3cb07
treewide: migrate to fetchCargoVendor, batch 3
Cargo 1.84.0 seems to have changed the output format of cargo vendor
again, once again invalidating fetchCargoTarball FOD hashes.  It's
time to fix this once and for all, switching across the board to
fetchCargoVendor, which is not dependent on cargo vendor's output
format.

It should be possible to reproduce this diff.  To do so, get the list
of files changed by this commit, e.g. with git diff --name-only, then
run the following two commands, each with that list of files as their
standard input:

	xargs sed -i 's/fetchCargoTarball/fetchCargoVendor/'
	cut -d / -f 4 | xargs -n 1 nix-update --version=skip

This will take a long time.  It might be possible to parallelize it
using xargs' -P option.  I haven't tested it.
2025-01-23 14:35:41 +01:00

102 lines
2.0 KiB
Nix

{
cargo,
darwin,
desktop-file-utils,
fetchFromGitLab,
gettext,
glib,
gtk4,
gtksourceview5,
lib,
libadwaita,
meson,
ninja,
pkg-config,
poppler,
rustPlatform,
rustc,
stdenv,
testers,
wrapGAppsHook4,
clippy,
nix-update-script,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "citations";
version = "0.7.0";
src = fetchFromGitLab {
domain = "gitlab.gnome.org";
owner = "World";
repo = "citations";
rev = finalAttrs.version;
hash = "sha256-WYy6cyPmyWL/11yHf+dRbcZGBfvVfELeTwKvpJMu5ns=";
};
cargoDeps = rustPlatform.fetchCargoVendor {
src = finalAttrs.src;
hash = "sha256-bqZZIA7sE0viAhI5GUFIVCXTkK+U9aWPvCPCug5SR94=";
};
nativeBuildInputs = [
desktop-file-utils
gettext
glib
meson
ninja
pkg-config
rustPlatform.cargoSetupHook
cargo
rustc
wrapGAppsHook4
];
buildInputs =
[
glib
gtk4
gtksourceview5
libadwaita
poppler
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
darwin.apple_sdk.frameworks.Foundation
];
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang (
lib.concatStringsSep " " [
"-Wno-typedef-redefinition"
"-Wno-unused-parameter"
"-Wno-missing-field-initializers"
"-Wno-incompatible-function-pointer-types"
]
);
doCheck = true;
nativeCheckInputs = [ clippy ];
preCheck = ''
sed -i -e '/PATH=/d' ../src/meson.build
'';
passthru = {
tests.version = testers.testVersion {
package = finalAttrs.finalPackage;
command = "citations --help";
};
updateScript = nix-update-script { };
};
meta = with lib; {
description = "Manage your bibliographies using the BibTeX format";
homepage = "https://apps.gnome.org/app/org.gnome.World.Citations";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ benediktbroich ] ++ lib.teams.gnome-circle.members;
platforms = platforms.unix;
mainProgram = "citations";
};
})