Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # nix-prefetch-url file://<path>/Maple2020.2X64Installer.run
- # nix-shell -p "callPackage ~/Code/maple2020-nix/maple2020.nix {}"
- { stdenv, requireFile }:
- let
- message = ''
- Please purchase Maple 2020 and download it at
- https://maplesoft.com/download
- '';
- in
- stdenv.mkDerivation rec {
- pname = "maple";
- version = "2020.2";
- src = requireFile {
- name = "Maple${version}LinuxX64Installer.run";
- #sha256 = "0622dedf163359de7f29837b580d14703f09417792a8cf885da18377b1be207c";
- sha256 = "0z10psqpg0x1bn4cza4jfx0hjgvh2h6mhyw355zxwn9k2vgxw8h6";
- inherit message;
- };
- dontUnpack = true;
- buildPhase = ''
- exec /nix/store/pzwvijvdn64x92gw1w7wfbdxvis6ymjr-Maple${version}LinuxX64Installer.run --mode unattended --installdir "''${out}/maple2020" --desktopshortcut 0 --defaultapp 0
- '';
- installPhase = ''
- install -d "''${out}/usr/bin/"
- install -d "''${out}/usr/share/licenses/maple2020/"
- cp -r "''${out}/maple2020/man" "''${out}/usr/share/"
- cp -r "''${out}/maple2020" "''${out}/usr/share/"
- ln -s "/usr/share/maple2020/bin/maple" "''${out}/usr/bin/maple"
- ln -s "/usr/share/maple2020/bin/xmaple" "''${out}/usr/bin/xmaple"
- ln -s "/usr/share/maple2020/bin/maple.system.type" "''${out}/usr/bin/maple.system.type"
- ln -s "/usr/share/maple2020/bin/mint" "''${out}/usr/bin/mint"
- ln -s "/usr/share/maple2020/EULA.html" "''${out}/usr/share/licenses/maple2020/LICENSE.html"
- find "''${out}/" -name "*.log" -delete
- '';
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement