Skip to content

Commit

Permalink
mathematica: fix properly
Browse files Browse the repository at this point in the history
  • Loading branch information
LEXUGE committed Dec 1, 2023
1 parent 4b6cf09 commit eee28f1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 16 deletions.
12 changes: 1 addition & 11 deletions cfgs/x1c7/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -78,17 +78,7 @@
steam
obsidian
# We fix installer version so don't get updated automatically when Wolfram releases new version
# Fix the libdbus error
(pkgs.buildFHSUserEnv {
name = "mathematica";

targetPkgs = pkgs: ([
mathematica_13_3_1'
dbus.lib
]);

runScript = "mathematica";
})
mathematica_13_3_1
];
extraDconf = {
"org/gnome/desktop/interface"."scaling-factor" = hm.gvariant.mkUint32 2;
Expand Down
15 changes: 10 additions & 5 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,15 @@
rec {
# Use the default overlay to export all packages under ./pkgs
overlays = {
# Patch mathematica to solve "libdbus not found" error.
mathematica = (final: prev: {
mathematica_13_3_1 = (prev.mathematica.overrideAttrs (_: prevAttrs: {
wrapProgramFlags = prevAttrs.wrapProgramFlags ++ [ "--prefix LD_LIBRARY_PATH : ${prev.lib.makeLibraryPath [ prev.dbus.lib ]}" ];
})).override {
version = "13.3.1";
};
});

default = final: prev:
(import ./pkgs {
inherit (prev) lib;
Expand Down Expand Up @@ -108,11 +117,7 @@
extraOverlays = [
dcompass.overlays.default
ash-emacs.overlays.default
(final: prev: {
mathematica_13_3_1' = prev.mathematica.override {
version = "13.3.1";
};
})
self.overlays.mathematica
];
system = system.x86_64-linux;
};
Expand Down

0 comments on commit eee28f1

Please sign in to comment.