diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2017-03-14 01:06:28 +0100 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2017-03-14 01:06:28 +0100 |
commit | d84b462a711ce95593ff05a7581e722562c3835a (patch) | |
tree | 41e5af455fea925b2680b29718b24ba2876e803a /default.nix | |
download | bar-d84b462a711ce95593ff05a7581e722562c3835a.tar bar-d84b462a711ce95593ff05a7581e722562c3835a.tar.gz bar-d84b462a711ce95593ff05a7581e722562c3835a.tar.bz2 bar-d84b462a711ce95593ff05a7581e722562c3835a.tar.xz bar-d84b462a711ce95593ff05a7581e722562c3835a.zip |
Implement old bar.hs
Diffstat (limited to 'default.nix')
-rw-r--r-- | default.nix | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..1e631cf --- /dev/null +++ b/default.nix | |||
@@ -0,0 +1,29 @@ | |||
1 | argumentPackages@{ ... }: | ||
2 | |||
3 | let | ||
4 | defaultPackages = (import <nixpkgs> {}).haskellPackages; | ||
5 | haskellPackages = defaultPackages // argumentPackages; | ||
6 | pkgs = (import <nixpkgs> {}).pkgs // argumentPackages; | ||
7 | |||
8 | webshim = with pkgs; stdenv.mkDerivation rec { | ||
9 | name = "webshim-${version}"; | ||
10 | version = "1.16.0"; | ||
11 | src = fetchFromGitHub { | ||
12 | owner = "aFarkas"; | ||
13 | repo = "webshim"; | ||
14 | rev = "1.16.0"; | ||
15 | sha256 = "14pk7hljqipzp0n7vpgcfxr3w4bla57cwyd7bmwmmxrm2zn62cyh"; | ||
16 | }; | ||
17 | |||
18 | installPhase = '' | ||
19 | mkdir -p $out/js | ||
20 | cp -r $src/js-webshim/dev/* $out/js/ | ||
21 | ''; | ||
22 | }; | ||
23 | in pkgs.stdenv.lib.overrideDerivation (haskellPackages.callPackage ./bar.nix {}) (oldAttrs: { | ||
24 | postUnpack = '' | ||
25 | rm -rf bar/static/jquery.js bar/static/webshim | ||
26 | ln -vs ${pkgs.jquery}/js/jquery.js bar/static | ||
27 | ln -vs ${webshim}/js bar/static/webshim | ||
28 | ''; | ||
29 | }) | ||