2023-05-24 13:37:59 +00:00
|
|
|
{ cargo
|
|
|
|
, darwin
|
2022-12-17 10:02:37 +00:00
|
|
|
, desktop-file-utils
|
|
|
|
, fetchFromGitLab
|
|
|
|
, gettext
|
|
|
|
, glib
|
|
|
|
, gtk4
|
|
|
|
, gtksourceview5
|
|
|
|
, lib
|
|
|
|
, libadwaita
|
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, pkg-config
|
|
|
|
, poppler
|
|
|
|
, rustPlatform
|
2023-05-24 13:37:59 +00:00
|
|
|
, rustc
|
2022-12-17 10:02:37 +00:00
|
|
|
, stdenv
|
|
|
|
, testers
|
|
|
|
, wrapGAppsHook4
|
2023-07-15 17:15:38 +00:00
|
|
|
, clippy
|
2022-12-17 10:02:37 +00:00
|
|
|
}:
|
2023-07-15 17:15:38 +00:00
|
|
|
|
2022-12-17 10:02:37 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
|
|
pname = "citations";
|
2024-01-13 08:15:51 +00:00
|
|
|
version = "0.6.2";
|
2022-12-17 10:02:37 +00:00
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
|
|
|
domain = "gitlab.gnome.org";
|
|
|
|
owner = "World";
|
|
|
|
repo = finalAttrs.pname;
|
|
|
|
rev = finalAttrs.version;
|
2024-01-13 08:15:51 +00:00
|
|
|
hash = "sha256-RV9oQcXzRsNcvZc/8Xt7qZ/88DvHofC2Av0ftxzeF6Q=";
|
2022-12-17 10:02:37 +00:00
|
|
|
};
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
cargoDeps = rustPlatform.fetchCargoTarball {
|
|
|
|
src = finalAttrs.src;
|
|
|
|
hash = "sha256-XlqwgXuwxR6oEz0+hYAp/3b+XxH+Vd/DGr5j+iKhUjQ=";
|
2022-12-17 10:02:37 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
desktop-file-utils
|
|
|
|
gettext
|
|
|
|
glib
|
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
pkg-config
|
|
|
|
rustPlatform.cargoSetupHook
|
2023-05-24 13:37:59 +00:00
|
|
|
cargo
|
|
|
|
rustc
|
2022-12-17 10:02:37 +00:00
|
|
|
wrapGAppsHook4
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
glib
|
|
|
|
gtk4
|
|
|
|
gtksourceview5
|
|
|
|
libadwaita
|
|
|
|
poppler
|
2023-03-15 16:39:30 +00:00
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
2022-12-17 10:02:37 +00:00
|
|
|
darwin.apple_sdk.frameworks.Foundation
|
|
|
|
];
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
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"
|
|
|
|
]);
|
|
|
|
|
2022-12-17 10:02:37 +00:00
|
|
|
doCheck = true;
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
nativeCheckInputs = [ clippy ];
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
sed -i -e '/PATH=/d' ../src/meson.build
|
|
|
|
'';
|
|
|
|
|
2022-12-17 10:02:37 +00:00
|
|
|
passthru.tests.version = testers.testVersion {
|
|
|
|
package = finalAttrs.finalPackage;
|
|
|
|
command = "citations --help";
|
|
|
|
};
|
|
|
|
|
|
|
|
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 ];
|
|
|
|
platforms = platforms.unix;
|
2024-01-13 08:15:51 +00:00
|
|
|
mainProgram = "citations";
|
2022-12-17 10:02:37 +00:00
|
|
|
};
|
|
|
|
})
|