2021-05-20 23:08:51 +00:00
|
|
|
{ lib
|
|
|
|
, fetchurl
|
|
|
|
, python3
|
|
|
|
, gettext
|
|
|
|
, makeDesktopItem
|
|
|
|
, copyDesktopItems
|
|
|
|
}:
|
|
|
|
|
|
|
|
python3.pkgs.buildPythonApplication rec {
|
|
|
|
pname = "timeline";
|
2022-03-30 09:31:56 +00:00
|
|
|
version = "2.6.0";
|
2023-03-24 00:07:29 +00:00
|
|
|
format = "other";
|
2021-05-20 23:08:51 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://sourceforge/thetimelineproj/${pname}-${version}.zip";
|
2022-03-30 09:31:56 +00:00
|
|
|
sha256 = "sha256-qwH2mt3Va62QJKJGOpt5WV3QksqQaRGEif4CcPC5F2E=";
|
2021-05-20 23:08:51 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ python3.pkgs.wrapPython copyDesktopItems ];
|
|
|
|
|
|
|
|
pythonPath = with python3.pkgs; [
|
2023-03-24 00:07:29 +00:00
|
|
|
wxPython_4_2
|
2021-05-20 23:08:51 +00:00
|
|
|
humblewx
|
|
|
|
icalendar
|
|
|
|
markdown
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-05-20 23:08:51 +00:00
|
|
|
gettext
|
|
|
|
python3.pkgs.mock
|
|
|
|
];
|
|
|
|
|
|
|
|
desktopItems = [
|
|
|
|
(makeDesktopItem {
|
|
|
|
desktopName = "Timeline";
|
|
|
|
name = "timeline";
|
|
|
|
comment = "Display and navigate information on a timeline";
|
|
|
|
icon = "timeline";
|
|
|
|
exec = "timeline";
|
2022-03-05 16:20:37 +00:00
|
|
|
categories = [ "Office" "Calendar" ];
|
2021-05-20 23:08:51 +00:00
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
dontBuild = true;
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
patchPhase = ''
|
|
|
|
sed -i "s|_ROOT =.*|_ROOT = \"$out/usr/share/timeline/\"|" source/timelinelib/config/paths.py
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
site_packages=$out/${python3.pkgs.python.sitePackages}
|
|
|
|
install -D -m755 source/timeline.py $out/bin/timeline
|
|
|
|
mkdir -p $site_packages
|
|
|
|
cp -r source/timelinelib $site_packages/
|
|
|
|
|
|
|
|
mkdir -p $out/usr/share/timeline/locale
|
|
|
|
cp -r icons $out/usr/share/timeline/
|
|
|
|
cp -r translations/ $out/usr/share/timeline/
|
|
|
|
|
|
|
|
mkdir -p $out/share/icons/hicolor/{48x48,32x32,16x16}/apps
|
|
|
|
cp icons/48.png $out/share/icons/hicolor/48x48/apps/timeline.png
|
|
|
|
cp icons/32.png $out/share/icons/hicolor/32x32/apps/timeline.png
|
|
|
|
cp icons/16.png $out/share/icons/hicolor/16x16/apps/timeline.png
|
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
# tests fail because they need an x server
|
|
|
|
# Unable to access the X Display, is $DISPLAY set properly?
|
|
|
|
checkPhase = ''
|
|
|
|
runHook preCheck
|
|
|
|
${python3.interpreter} tools/execute-specs.py
|
|
|
|
runHook postCheck
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
2023-02-02 18:25:31 +00:00
|
|
|
homepage = "https://thetimelineproj.sourceforge.net/";
|
|
|
|
changelog = "https://thetimelineproj.sourceforge.net/changelog.html";
|
2021-05-20 23:08:51 +00:00
|
|
|
description = "Display and navigate information on a timeline";
|
|
|
|
license = with licenses; [ gpl3Only cc-by-sa-30 ];
|
|
|
|
platforms = with platforms; unix;
|
|
|
|
maintainers = with maintainers; [ davidak ];
|
|
|
|
};
|
|
|
|
}
|