~yoctocell/yoctocell.xyz

ref: 616c659931eed08560b252dd7b58b44a17732843 yoctocell.xyz/default.nix -rw-r--r-- 768 bytes
616c6599 — yoctocell contact: Remove pgp key 10 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
{ compiler ? "ghc884"
, pkgs
}:
let
  haskellPackages = pkgs.haskell.packages.${compiler}.override {
    overrides = hpNew: hpOld: {

      yoctocell-xyz = hpNew.callCabal2nix "yoctocell-xyz" ./. { };

    };
  };

  project = haskellPackages.yoctocell-xyz;

  updateServer = pkgs.writeScriptBin "update-server"
    ''
      ./result/bin/site rebuild && rsync -r public/* root@yoctocell.xyz:/var/www/yoctocell.xyz
    '';
in
{
  myProject = project;

  myShell = haskellPackages.shellFor {
    packages = p: with p; [
      project
    ];

    buildInputs = with haskellPackages; [
      updateServer
      brittany
      cabal-install
    ];

    shellHook = ''
      ln -s ${updateServer}/bin/update-server .git/hooks/pre-push
    '';

    withHoogle = true;
  };
}