Advertisement
Guest User

Untitled

a guest
Dec 27th, 2020
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.56 KB | None | 0 0
  1. # nix-prefetch-url file://<path>/Maple2020.2X64Installer.run
  2. # nix-shell -p "callPackage ~/Code/maple2020-nix/maple2020.nix {}"
  3.  
  4. { stdenv, requireFile }:
  5.  
  6. let
  7. message = ''
  8. Please purchase Maple 2020 and download it at
  9. https://maplesoft.com/download
  10. '';
  11. in
  12.  
  13. stdenv.mkDerivation rec {
  14. pname = "maple";
  15. version = "2020.2";
  16.  
  17. src = requireFile {
  18. name = "Maple${version}LinuxX64Installer.run";
  19. #sha256 = "0622dedf163359de7f29837b580d14703f09417792a8cf885da18377b1be207c";
  20. sha256 = "0z10psqpg0x1bn4cza4jfx0hjgvh2h6mhyw355zxwn9k2vgxw8h6";
  21. inherit message;
  22. };
  23.  
  24. dontUnpack = true;
  25.  
  26. buildPhase = ''
  27. exec /nix/store/pzwvijvdn64x92gw1w7wfbdxvis6ymjr-Maple${version}LinuxX64Installer.run --mode unattended --installdir "''${out}/maple2020" --desktopshortcut 0 --defaultapp 0
  28. '';
  29.  
  30. installPhase = ''
  31. install -d "''${out}/usr/bin/"
  32. install -d "''${out}/usr/share/licenses/maple2020/"
  33.  
  34. cp -r "''${out}/maple2020/man" "''${out}/usr/share/"
  35. cp -r "''${out}/maple2020" "''${out}/usr/share/"
  36.  
  37. ln -s "/usr/share/maple2020/bin/maple" "''${out}/usr/bin/maple"
  38. ln -s "/usr/share/maple2020/bin/xmaple" "''${out}/usr/bin/xmaple"
  39. ln -s "/usr/share/maple2020/bin/maple.system.type" "''${out}/usr/bin/maple.system.type"
  40. ln -s "/usr/share/maple2020/bin/mint" "''${out}/usr/bin/mint"
  41. ln -s "/usr/share/maple2020/EULA.html" "''${out}/usr/share/licenses/maple2020/LICENSE.html"
  42.  
  43. find "''${out}/" -name "*.log" -delete
  44. '';
  45.  
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement