Advertisement
Guest User

Untitled

a guest
Oct 27th, 2019
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.56 KB | None | 0 0
  1. { compiler ? "ghc843" }: let pkgs = import ./pkgs.nix; in with pkgs; with lib;
  2. let
  3.  
  4. jsaddle-src = fetchFromGitHub
  5. { owner = "ghcjs";
  6. repo = "jsaddle";
  7. rev = "68208be806c49a2a0c9f037dfac85feae10a8c80";
  8. sha256 = "0acj0x716ikfb08ndib36jmwxkwq399lvkip46sfkh1ynn0pvc1c";
  9. };
  10.  
  11.  
  12. gitignore = (callPackage (fetchFromGitHub
  13. { owner = "Fresheyeball";
  14. repo = "nix-gitignore";
  15. rev = "d27bfb07dc63e36d5ea53f375f023f9ae49aea1d";
  16. sha256 = "19j47sjxj2fm36y50gfx3kvyxwbiscja45gmbkb01vnqck80rlq6";
  17. }) {}).gitignoreSource
  18. [ ".git"
  19. ".ghc.environment.x86_64-linux-8.4.3"
  20. ];
  21.  
  22. # shpa-src = ../Shpadoinkle;
  23. shpa-src = fetchFromGitLab
  24. { owner = "fresheyeball";
  25. repo = "Shpadoinkle";
  26. rev = "4919ef476b78e484490d443f4db1ae74fd15b5ae";
  27. sha256 = "1ay1gb09lsv5yhzji9s9bii86gcym7jgmx8sikincmv4242cns34";
  28. };
  29.  
  30. src = gitignore ./.;
  31.  
  32. haskellPackages = with pkgs.haskell.lib; haskell.packages.${compiler}.override {
  33. overrides = self: super: {
  34. Shpadoinkle = self.callCabal2nix "Shpadoinkle" "${shpa-src}/core" {};
  35. Shpadoinkle-backend-pardiff = self.callCabal2nix "Shpadoinkle-backend-pardiff" "${shpa-src}/backends/pardiff" {};
  36. Shpadoinkle-html = self.callCabal2nix "Shpadoinkle" "${shpa-src}/html" {};
  37.  
  38. jsaddle-warp = dontCheck (self.callCabal2nix "jsaddle-warp"
  39. "${jsaddle-src}/jsaddle-warp" {});
  40. jsaddle = self.callCabal2nix "jsaddle" "${jsaddle-src}/jsaddle" {};
  41.  
  42. comonad = dontCheck super.comonad;
  43. extra = dontCheck super.extra;
  44. SHA = dontCheck super.SHA;
  45. pureMD5 = dontCheck super.pureMD5;
  46. unliftio = dontCheck super.unliftio;
  47. semigroupoids = dontCheck super.semigroupoids;
  48. megaparsec = dontCheck super.megaparsec;
  49. lens = dontCheck super.lens;
  50. http-types = dontCheck super.http-types;
  51. silently = dontCheck super.silently;
  52. hpack = haskell.packages.ghc843.hpack;
  53. };
  54. };
  55.  
  56. site = haskell.lib.overrideCabal (haskellPackages.callCabal2nix "platonic-marketing" src {}) (old: {
  57. enableLibraryProfiling = false;
  58. enableExecutableProfiling = false;
  59. });
  60.  
  61. dev = site.overrideAttrs (old: {
  62. buildInputs = with pkgs.haskell.packages.ghc843;
  63. old.buildInputs ++ [ stylish-haskell ghcid cabal-install ];
  64. });
  65.  
  66.  
  67. in if lib.inNixShell then dev else site
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement