summaryrefslogtreecommitdiff
path: root/default.nix
blob: 1e631cf3d37b7ae660b18cd9a7a716495f1948b6 (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
argumentPackages@{ ... }:

let
  defaultPackages = (import <nixpkgs> {}).haskellPackages;
  haskellPackages = defaultPackages // argumentPackages;
  pkgs = (import <nixpkgs> {}).pkgs // argumentPackages;

  webshim = with pkgs; 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 pkgs.stdenv.lib.overrideDerivation (haskellPackages.callPackage ./bar.nix {}) (oldAttrs: {
    postUnpack = ''
      rm -rf bar/static/jquery.js bar/static/webshim
      ln -vs ${pkgs.jquery}/js/jquery.js bar/static
      ln -vs ${webshim}/js bar/static/webshim
    '';
})