nixpkgs/pkgs/applications/misc/plots/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

70 lines
2.0 KiB
Nix
Raw Normal View History

2024-02-18 12:17:41 +00:00
{ lib
, fetchFromGitHub
, python3Packages
2023-07-25 14:15:11 +00:00
, gobject-introspection
, libadwaita
, wrapGAppsHook
, lmmath
}:
2024-02-18 12:17:41 +00:00
python3Packages.buildPythonApplication rec {
2023-07-25 14:15:11 +00:00
pname = "plots";
version = "0.8.5";
src = fetchFromGitHub {
owner = "alexhuntley";
repo = "Plots";
rev = "v${version}";
hash = "sha256-GjNpaorxkkhZsqrKq4kO5nqF5+4I4tmSc023AZpY8Sw=";
};
2024-02-18 12:17:41 +00:00
nativeBuildInputs = [ gobject-introspection wrapGAppsHook ];
buildInputs = [ libadwaita ];
2023-07-25 14:15:11 +00:00
2024-02-18 12:17:41 +00:00
propagatedBuildInputs = with python3Packages; [
pygobject3
numpy
lark
jinja2
freetype-py
pyopengl
pycairo
pyglm
2023-07-25 14:15:11 +00:00
];
2024-02-18 12:17:41 +00:00
nativeCheckInputs = with python3Packages; [ pytest ];
2023-07-25 14:15:11 +00:00
postInstall = ''
install -D ${lmmath}/share/fonts/opentype/latinmodern-math.otf -t $out/share/fonts/
install -D res/com.github.alexhuntley.Plots.metainfo.xml -t $out/share/metainfo/
install -D res/com.github.alexhuntley.Plots.desktop -t $out/share/applications/
install -D res/com.github.alexhuntley.Plots.svg -t $out/share/icons/hicolor/scalable/apps/
install -D res/com.github.alexhuntley.Plots-symbolic.svg -t $out/share/icons/hicolor/symbolic/apps/
for lang_dir in help/*; do
lang=$(basename "$lang_dir")
install -D -t $out/share/help/$lang/plots/ $lang_dir/*
done
'';
2024-02-18 12:17:41 +00:00
dontWrapGApps = true;
preFixup = ''
makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
'';
2023-07-25 14:15:11 +00:00
meta = with lib; {
description = "Graph plotting app for GNOME";
longDescription = ''
Plots is a graph plotting app for GNOME.
Plots makes it easy to visualise mathematical formulae.
In addition to basic arithmetic operations, it supports trigonometric, hyperbolic, exponential and logarithmic functions, as well as arbitrary sums and products.
It can display polar equations, and both implicit and explicit Cartesian equations.
'';
homepage = "https://github.com/alexhuntley/Plots";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ sund3RRR ];
};
}