2021-01-11 07:54:33 +00:00
|
|
|
|
{ lib, stdenv
|
2018-03-10 11:21:36 +00:00
|
|
|
|
, fetchFromGitHub
|
2021-01-19 06:50:56 +00:00
|
|
|
|
, pkg-config
|
2020-08-31 17:50:12 +00:00
|
|
|
|
, python3
|
|
|
|
|
, meson
|
|
|
|
|
, ninja
|
2019-10-10 02:47:37 +00:00
|
|
|
|
, vala
|
2018-03-10 11:21:36 +00:00
|
|
|
|
, gtk3
|
2019-03-21 02:53:41 +00:00
|
|
|
|
, glib
|
2018-08-20 20:31:18 +00:00
|
|
|
|
, pantheon
|
2019-02-13 21:47:50 +00:00
|
|
|
|
, gtksourceview
|
|
|
|
|
, libgee
|
2020-08-31 17:50:12 +00:00
|
|
|
|
, nix-update-script
|
|
|
|
|
, webkitgtk
|
2018-03-10 11:21:36 +00:00
|
|
|
|
, libqalculate
|
2020-08-31 17:50:12 +00:00
|
|
|
|
, intltool
|
|
|
|
|
, gnuplot
|
2019-03-21 02:53:41 +00:00
|
|
|
|
, wrapGAppsHook
|
|
|
|
|
}:
|
2018-03-10 11:21:36 +00:00
|
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-03-21 02:53:41 +00:00
|
|
|
|
pname = "nasc";
|
2021-08-23 21:23:52 +00:00
|
|
|
|
version = "0.8.0";
|
2018-03-10 11:21:36 +00:00
|
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
|
owner = "parnold-x";
|
2019-03-21 02:53:41 +00:00
|
|
|
|
repo = pname;
|
2018-03-10 11:21:36 +00:00
|
|
|
|
rev = version;
|
2021-08-23 21:23:52 +00:00
|
|
|
|
sha256 = "02b9a59a9fzsb6nn3ycwwbcbv04qfzm6x7csq2addpzx5wak6dd8";
|
2020-08-31 17:50:12 +00:00
|
|
|
|
fetchSubmodules = true;
|
2018-03-10 11:21:36 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2020-08-31 17:50:12 +00:00
|
|
|
|
glib # post_install.py
|
|
|
|
|
gtk3 # post_install.py
|
|
|
|
|
intltool # for libqalculate
|
|
|
|
|
meson
|
|
|
|
|
ninja
|
2021-01-19 06:50:56 +00:00
|
|
|
|
pkg-config
|
2020-08-31 17:50:12 +00:00
|
|
|
|
python3
|
|
|
|
|
vala
|
2018-08-20 20:31:18 +00:00
|
|
|
|
wrapGAppsHook
|
2018-03-10 11:21:36 +00:00
|
|
|
|
];
|
2018-11-10 13:15:27 +00:00
|
|
|
|
|
2018-03-10 11:21:36 +00:00
|
|
|
|
buildInputs = [
|
2019-03-21 02:53:41 +00:00
|
|
|
|
glib
|
2020-08-31 17:50:12 +00:00
|
|
|
|
gtk3
|
2019-02-13 21:47:50 +00:00
|
|
|
|
gtksourceview
|
|
|
|
|
libgee
|
2019-03-21 02:53:41 +00:00
|
|
|
|
pantheon.granite
|
2020-08-31 17:50:12 +00:00
|
|
|
|
webkitgtk
|
|
|
|
|
# We add libqalculate's runtime dependencies because nasc has it as a modified subproject.
|
|
|
|
|
] ++ libqalculate.buildInputs ++ libqalculate.propagatedBuildInputs;
|
|
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
|
chmod +x meson/post_install.py
|
|
|
|
|
patchShebangs meson/post_install.py
|
|
|
|
|
|
|
|
|
|
# patch subproject. same code in libqalculate expression
|
|
|
|
|
substituteInPlace subprojects/libqalculate/libqalculate/Calculator-plot.cc \
|
|
|
|
|
--replace 'commandline = "gnuplot"' 'commandline = "${gnuplot}/bin/gnuplot"' \
|
|
|
|
|
--replace '"gnuplot - ' '"${gnuplot}/bin/gnuplot - '
|
|
|
|
|
'';
|
|
|
|
|
|
|
|
|
|
passthru = {
|
2022-12-25 22:11:14 +00:00
|
|
|
|
updateScript = nix-update-script { };
|
2020-08-31 17:50:12 +00:00
|
|
|
|
};
|
2018-03-10 11:21:36 +00:00
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
|
meta = with lib; {
|
2020-08-31 17:50:12 +00:00
|
|
|
|
description = "Do maths like a normal person, designed for elementary OS";
|
2018-03-10 11:21:36 +00:00
|
|
|
|
longDescription = ''
|
|
|
|
|
It’s an app where you do maths like a normal person. It lets you
|
|
|
|
|
type whatever you want and smartly figures out what is math and
|
|
|
|
|
spits out an answer on the right pane. Then you can plug those
|
|
|
|
|
answers in to future equations and if that answer changes, so does
|
|
|
|
|
the equations it’s used in.
|
|
|
|
|
'';
|
2020-04-01 01:11:51 +00:00
|
|
|
|
homepage = "https://github.com/parnold-x/nasc";
|
2021-09-18 15:00:51 +00:00
|
|
|
|
maintainers = teams.pantheon.members;
|
2018-03-10 11:21:36 +00:00
|
|
|
|
platforms = platforms.linux;
|
|
|
|
|
license = licenses.gpl3Plus;
|
2021-11-03 10:27:38 +00:00
|
|
|
|
mainProgram = "com.github.parnold_x.nasc";
|
2022-09-23 13:33:04 +00:00
|
|
|
|
broken = true; # at 2022-09-23
|
2018-03-10 11:21:36 +00:00
|
|
|
|
};
|
|
|
|
|
}
|