summaryrefslogtreecommitdiff
path: root/bragi/bar/default.nix
blob: bbfa170c77e6b7b49ffbd3006d7594a4a0449c50 (plain)
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
{ haskellPackages
, stdenv
, fetchFromGitHub
, jquery
}:

let
  pkg = haskellPackages.callPackage ./generated.nix {};
  webshim = stdenv.mkDerivation rec {
    name = "webshim-${version}";
    version = "1.16.0";
    src = fetchFromGitHub {
      owner = "aFarkas";
      repo = "webshim";
      rev = "1.16.0";
      sha256 = "14pk7hljqipzp0n7vpgcfxr3w4bla57cwyd7bmwmmxrm2zn62cyh";
    };

    installPhase = ''
      mkdir -p $out/js
      cp -r $src/js-webshim/dev/* $out/js/
    '';
  };
in stdenv.lib.overrideDerivation pkg (drv: {
  postUnpack = ''
    (
      cd bar-*/static
      rm -rf jquery.js webshim
      ln -vs ${jquery}/js/jquery.js .
      ln -vs ${webshim}/js webshim
    )
  '';
})