Files
nixpkgs/pkgs/by-name/ti/timeline/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

107 lines
2.4 KiB
Nix

{
lib,
fetchurl,
python3,
gettext,
makeDesktopItem,
copyDesktopItems,
wrapGAppsHook3,
}:
python3.pkgs.buildPythonApplication rec {
pname = "timeline";
version = "2.11.0";
format = "other";
src = fetchurl {
url = "mirror://sourceforge/thetimelineproj/${pname}-${version}.zip";
sha256 = "sha256-XJ5Gu3nFLtSaEedzxBZERtPydIFMWWGi5frXWmgKxVA=";
};
nativeBuildInputs = [
python3.pkgs.wrapPython
copyDesktopItems
wrapGAppsHook3
];
pythonPath = with python3.pkgs; [
wxpython
humblewx
icalendar
markdown
];
nativeCheckInputs = [
gettext
python3.pkgs.mock
];
desktopItems = [
(makeDesktopItem {
desktopName = "Timeline";
name = "timeline";
comment = "Display and navigate information on a timeline";
icon = "timeline";
exec = "timeline";
categories = [
"Office"
"Calendar"
];
})
];
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
'';
dontWrapGApps = true;
preFixup = ''
makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
'';
meta = {
homepage = "https://thetimelineproj.sourceforge.net/";
changelog = "https://thetimelineproj.sourceforge.net/changelog.html";
description = "Display and navigate information on a timeline";
mainProgram = "timeline";
license = with lib.licenses; [
gpl3Only
cc-by-sa-30
];
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [ davidak ];
};
}