Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mathematica: 13.1.0 -> 13.2.0 #207697

Merged
merged 4 commits into from
Dec 31, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions pkgs/applications/science/math/mathematica/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
, cudaPackages
, cudaSupport ? config.cudaSupport or false
, lang ? "en"
, webdoc ? false
, version ? null
}:

Expand All @@ -12,16 +13,20 @@ let versions = callPackage ./versions.nix { };
matching-versions =
lib.sort (v1: v2: lib.versionAtLeast v1.version v2.version) (lib.filter
(v: v.lang == lang
&& (if version == null then true else isMatching v.version version))
&& (version == null || isMatching v.version version)
&& webdoc == v.webdoc)
versions);

found-version =
if matching-versions == []
then throw ("No registered Mathematica version found to match"
+ " version=${version} and language=${lang}")
+ " version=${version} and language=${lang},"
+ " ${if webdoc
then "using web documentation"
else "and with documentation"}")
else lib.head matching-versions;

specific-drv = ./. + "/(lib.versions.major found-version.version).nix";
specific-drv = ./. + "/${lib.versions.major found-version.version}.nix";

real-drv = if lib.pathExists specific-drv
then specific-drv
Expand Down
21 changes: 19 additions & 2 deletions pkgs/applications/science/math/mathematica/versions.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,22 @@
{ lib, requireFile }:

let versions = [
{
version = "13.2.0";
lang = "en";
language = "English";
sha256 = "sha256-T9XOXA6jpgN6bcO/do9sw1L73ABtyxuZCLzftv4Cl6o=";
installer = "Mathematica_13.2.0_LINUX.sh";
webdoc = true;
}
{
version = "13.2.0";
lang = "en";
language = "English";
sha256 = "sha256-YRUvl2H9SwpwDZx04ugd7ZnK5G+t88bzAObXsGGVhk0=";
installer = "Mathematica_13.2.0_BNDL_LINUX.sh";
webdoc = false;
doronbehar marked this conversation as resolved.
Show resolved Hide resolved
}
{
version = "13.1.0";
lang = "en";
Expand Down Expand Up @@ -96,8 +112,9 @@ let versions = [

in

lib.flip map versions ({ version, lang, language, sha256, installer }: {
inherit version lang;
lib.flip map versions ({ version, lang, language, sha256, installer
, webdoc ? false }: {
inherit version lang webdoc;
src = requireFile {
name = installer;
message = ''
Expand Down