2024-02-07 01:22:34 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, gtk3
|
|
|
|
, pythonPackages
|
|
|
|
, glibcLocales
|
|
|
|
, intltool
|
|
|
|
, gexiv2
|
|
|
|
, pango
|
|
|
|
, gobject-introspection
|
2024-05-15 15:35:15 +00:00
|
|
|
, wrapGAppsHook3
|
2024-02-07 01:22:34 +00:00
|
|
|
, gettext
|
2024-04-21 15:54:59 +00:00
|
|
|
# Optional packages:
|
|
|
|
, enableOSM ? true
|
2024-02-07 01:22:34 +00:00
|
|
|
, osm-gps-map
|
|
|
|
, glib-networking
|
|
|
|
, enableGraphviz ? true
|
|
|
|
, graphviz
|
|
|
|
, enableGhostscript ? true
|
|
|
|
, ghostscript
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
let
|
2024-04-21 15:54:59 +00:00
|
|
|
inherit (pythonPackages) buildPythonApplication pythonOlder;
|
2024-02-07 01:22:34 +00:00
|
|
|
in
|
|
|
|
buildPythonApplication rec {
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "5.2.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "gramps";
|
2024-02-07 01:22:34 +00:00
|
|
|
pyproject = true;
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "gramps-project";
|
|
|
|
repo = "gramps";
|
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-umyc5G4p0GSEQEtq6sPUgtq1waNL1OW7iLxnf5dGcLc=";
|
|
|
|
};
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
# textdomain doesn't exist as a property on locale when running on Darwin
|
|
|
|
./check-locale-hasattr-textdomain.patch
|
|
|
|
# disables the startup warning about bad GTK installation
|
|
|
|
./disable-gtk-warning-dialog.patch
|
|
|
|
];
|
|
|
|
|
2024-02-07 01:22:34 +00:00
|
|
|
nativeBuildInputs = [
|
2024-05-15 15:35:15 +00:00
|
|
|
wrapGAppsHook3
|
2024-02-07 01:22:34 +00:00
|
|
|
intltool
|
|
|
|
gettext
|
|
|
|
gobject-introspection
|
|
|
|
pythonPackages.setuptools
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
glibcLocales
|
2024-04-21 15:54:59 +00:00
|
|
|
pythonPackages.unittestCheckHook
|
2024-02-07 01:22:34 +00:00
|
|
|
pythonPackages.jsonschema
|
|
|
|
pythonPackages.mock
|
|
|
|
pythonPackages.lxml
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-08-10 07:59:29 +00:00
|
|
|
buildInputs = [ gtk3 pango gexiv2 ]
|
2020-04-24 23:36:52 +00:00
|
|
|
# Map support
|
2021-12-30 13:39:12 +00:00
|
|
|
++ lib.optionals enableOSM [ osm-gps-map glib-networking ]
|
2020-04-24 23:36:52 +00:00
|
|
|
# Graphviz support
|
2021-01-15 22:18:51 +00:00
|
|
|
++ lib.optional enableGraphviz graphviz
|
2020-04-24 23:36:52 +00:00
|
|
|
# Ghostscript support
|
2021-01-15 22:18:51 +00:00
|
|
|
++ lib.optional enableGhostscript ghostscript
|
2020-04-24 23:36:52 +00:00
|
|
|
;
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
propagatedBuildInputs = with pythonPackages; [
|
2024-06-20 14:57:18 +00:00
|
|
|
berkeleydb
|
2024-02-07 01:22:34 +00:00
|
|
|
pyicu
|
|
|
|
pygobject3
|
|
|
|
pycairo
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
preCheck = ''
|
|
|
|
export HOME=$(mktemp -d)
|
|
|
|
mkdir .git # Make gramps think that it's not in an installed state
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
dontWrapGApps = true;
|
|
|
|
|
|
|
|
preFixup = ''
|
|
|
|
makeWrapperArgs+=(
|
|
|
|
"''${gappsWrapperArgs[@]}"
|
|
|
|
)
|
2024-02-07 01:22:34 +00:00
|
|
|
'';
|
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
# https://github.com/NixOS/nixpkgs/issues/149812
|
|
|
|
# https://nixos.org/manual/nixpkgs/stable/#ssec-gnome-hooks-gobject-introspection
|
|
|
|
strictDeps = false;
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Genealogy software";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "gramps";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://gramps-project.org";
|
2024-04-21 15:54:59 +00:00
|
|
|
maintainers = with maintainers; [ jk pinpox tomasajt ];
|
|
|
|
changelog = "https://github.com/gramps-project/gramps/blob/${src.rev}/ChangeLog";
|
2024-02-07 01:22:34 +00:00
|
|
|
longDescription = ''
|
|
|
|
Every person has their own story but they are also part of a collective
|
|
|
|
family history. Gramps gives you the ability to record the many details of
|
|
|
|
an individual's life as well as the complex relationships between various
|
|
|
|
people, places and events. All of your research is kept organized,
|
|
|
|
searchable and as precise as you need it to be.
|
|
|
|
'';
|
|
|
|
license = licenses.gpl2Plus;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|