2018-03-10 03:21:36 -08:00
|
|
|
|
{ stdenv
|
|
|
|
|
, fetchFromGitHub
|
|
|
|
|
, pkgconfig
|
2020-08-31 10:50:12 -07:00
|
|
|
|
, python3
|
|
|
|
|
, meson
|
|
|
|
|
, ninja
|
2019-10-09 19:47:37 -07:00
|
|
|
|
, vala
|
2018-03-10 03:21:36 -08:00
|
|
|
|
, gtk3
|
2019-03-20 19:53:41 -07:00
|
|
|
|
, glib
|
2018-08-20 13:31:18 -07:00
|
|
|
|
, pantheon
|
2019-03-20 19:53:41 -07:00
|
|
|
|
, libsoup
|
2019-02-13 13:47:50 -08:00
|
|
|
|
, gtksourceview
|
|
|
|
|
, libgee
|
2020-08-31 10:50:12 -07:00
|
|
|
|
, nix-update-script
|
|
|
|
|
, webkitgtk
|
2018-03-10 03:21:36 -08:00
|
|
|
|
, libqalculate
|
2020-08-31 10:50:12 -07:00
|
|
|
|
, intltool
|
|
|
|
|
, gnuplot
|
2019-03-20 19:53:41 -07:00
|
|
|
|
, wrapGAppsHook
|
|
|
|
|
}:
|
2018-03-10 03:21:36 -08:00
|
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-03-20 19:53:41 -07:00
|
|
|
|
pname = "nasc";
|
2020-08-31 10:50:12 -07:00
|
|
|
|
version = "0.7.5";
|
2018-03-10 03:21:36 -08:00
|
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
|
owner = "parnold-x";
|
2019-03-20 19:53:41 -07:00
|
|
|
|
repo = pname;
|
2018-03-10 03:21:36 -08:00
|
|
|
|
rev = version;
|
2020-08-31 10:50:12 -07:00
|
|
|
|
sha256 = "kSRc5RLkI6SBJirUYw6swZi8IJhaL3y74b2Zw8kh2XA=";
|
|
|
|
|
fetchSubmodules = true;
|
2018-03-10 03:21:36 -08:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2020-08-31 10:50:12 -07:00
|
|
|
|
glib # post_install.py
|
|
|
|
|
gtk3 # post_install.py
|
|
|
|
|
intltool # for libqalculate
|
|
|
|
|
meson
|
|
|
|
|
ninja
|
2018-08-20 13:31:18 -07:00
|
|
|
|
pkgconfig
|
2020-08-31 10:50:12 -07:00
|
|
|
|
python3
|
|
|
|
|
vala
|
2018-08-20 13:31:18 -07:00
|
|
|
|
wrapGAppsHook
|
2018-03-10 03:21:36 -08:00
|
|
|
|
];
|
2018-11-10 05:15:27 -08:00
|
|
|
|
|
2018-03-10 03:21:36 -08:00
|
|
|
|
buildInputs = [
|
2019-03-20 19:53:41 -07:00
|
|
|
|
glib
|
2020-08-31 10:50:12 -07:00
|
|
|
|
gtk3
|
2019-02-13 13:47:50 -08:00
|
|
|
|
gtksourceview
|
|
|
|
|
libgee
|
2019-03-20 19:53:41 -07:00
|
|
|
|
pantheon.elementary-icon-theme
|
|
|
|
|
pantheon.granite
|
2020-08-31 10:50:12 -07: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 = {
|
2020-08-31 10:53:25 -07:00
|
|
|
|
updateScript = nix-update-script {
|
2020-08-31 10:50:12 -07:00
|
|
|
|
attrPath = pname;
|
|
|
|
|
};
|
|
|
|
|
};
|
2018-03-10 03:21:36 -08:00
|
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2020-08-31 10:50:12 -07:00
|
|
|
|
description = "Do maths like a normal person, designed for elementary OS";
|
2018-03-10 03:21:36 -08: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-03-31 18:11:51 -07:00
|
|
|
|
homepage = "https://github.com/parnold-x/nasc";
|
2020-08-31 10:50:12 -07:00
|
|
|
|
maintainers = pantheon.maintainers;
|
2018-03-10 03:21:36 -08:00
|
|
|
|
platforms = platforms.linux;
|
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
|
};
|
|
|
|
|
}
|