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
91 lines
2.0 KiB
Nix
91 lines
2.0 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitHub,
|
|
fetchpatch,
|
|
cmake,
|
|
perl,
|
|
enableGui ? false,
|
|
qtbase,
|
|
wrapQtAppsHook,
|
|
qtwebengine,
|
|
enableJupyter ? true,
|
|
boost,
|
|
jsoncpp,
|
|
openssl,
|
|
zmqpp,
|
|
enableJava ? false,
|
|
openjdk,
|
|
gtest,
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "yacas";
|
|
version = "1.9.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "grzegorzmazur";
|
|
repo = "yacas";
|
|
rev = "v${version}";
|
|
sha256 = "0dqgqvsb6ggr8jb3ngf0jwfkn6xwj2knhmvqyzx3amc74yd3ckqx";
|
|
};
|
|
|
|
hardeningDisable = [ "format" ];
|
|
|
|
cmakeFlags = [
|
|
"-DENABLE_CYACAS_GUI=${if enableGui then "ON" else "OFF"}"
|
|
"-DENABLE_CYACAS_KERNEL=${if enableJupyter then "ON" else "OFF"}"
|
|
"-DENABLE_JYACAS=${if enableJava then "ON" else "OFF"}"
|
|
"-DENABLE_CYACAS_UNIT_TESTS=ON"
|
|
];
|
|
patches = [
|
|
# upstream issue: https://github.com/grzegorzmazur/yacas/issues/340
|
|
# Upstream patch which doesn't apply on 1.9.1 is:
|
|
# https://github.com/grzegorzmazur/yacas/pull/342
|
|
./jsoncpp-fix-include.patch
|
|
# Fixes testing - https://github.com/grzegorzmazur/yacas/issues/339
|
|
# PR: https://github.com/grzegorzmazur/yacas/pull/343
|
|
(fetchpatch {
|
|
url = "https://github.com/grzegorzmazur/yacas/commit/8bc22d517ecfdde3ac94800dc8506f5405564d48.patch";
|
|
sha256 = "sha256-aPO5T8iYNkGtF8j12YxNJyUPJJPKrXje1DmfCPt317A=";
|
|
})
|
|
];
|
|
preCheck = ''
|
|
patchShebangs ../tests/test-yacas
|
|
'';
|
|
nativeCheckInputs = [
|
|
gtest
|
|
];
|
|
doCheck = true;
|
|
|
|
nativeBuildInputs = [
|
|
cmake
|
|
# Perl is only for the documentation
|
|
perl
|
|
]
|
|
++ lib.optionals enableJava [
|
|
openjdk
|
|
];
|
|
buildInputs = [
|
|
]
|
|
++ lib.optionals enableGui [
|
|
qtbase
|
|
wrapQtAppsHook
|
|
qtwebengine
|
|
]
|
|
++ lib.optionals enableJupyter [
|
|
boost
|
|
jsoncpp
|
|
openssl
|
|
zmqpp
|
|
];
|
|
|
|
meta = {
|
|
description = "Easy to use, general purpose Computer Algebra System, optionally with GUI";
|
|
homepage = "http://www.yacas.org/";
|
|
license = lib.licenses.gpl2Plus;
|
|
maintainers = [ ];
|
|
platforms = with lib.platforms; linux;
|
|
};
|
|
}
|