diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2018-04-13 11:42:49 +0200 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2018-04-13 11:42:49 +0200 |
commit | 76fe2bc3bf14fb3f4cbd892e680f61183ff6db83 (patch) | |
tree | ff73c24fbbd0311450c66342b498fb344071cc76 /default.nix | |
parent | f61bba8fbd7f596e503e67eac1b57945e81a709d (diff) | |
download | bar-76fe2bc3bf14fb3f4cbd892e680f61183ff6db83.tar bar-76fe2bc3bf14fb3f4cbd892e680f61183ff6db83.tar.gz bar-76fe2bc3bf14fb3f4cbd892e680f61183ff6db83.tar.bz2 bar-76fe2bc3bf14fb3f4cbd892e680f61183ff6db83.tar.xz bar-76fe2bc3bf14fb3f4cbd892e680f61183ff6db83.zip |
Fix build
Diffstat (limited to 'default.nix')
-rw-r--r-- | default.nix | 39 |
1 files changed, 26 insertions, 13 deletions
diff --git a/default.nix b/default.nix index 1e631cf..dc8c226 100644 --- a/default.nix +++ b/default.nix | |||
@@ -1,14 +1,13 @@ | |||
1 | argumentPackages@{ ... }: | 1 | argumentPackages@{ ... }: |
2 | 2 | ||
3 | let | 3 | let |
4 | defaultPackages = (import <nixpkgs> {}).haskellPackages; | ||
5 | haskellPackages = defaultPackages // argumentPackages; | ||
6 | pkgs = (import <nixpkgs> {}).pkgs // argumentPackages; | 4 | pkgs = (import <nixpkgs> {}).pkgs // argumentPackages; |
7 | 5 | haskellPackages = pkgs.haskellPackages // argumentPackages; | |
8 | webshim = with pkgs; stdenv.mkDerivation rec { | 6 | pkg = haskellPackages.callPackage ./bar.nix {}; |
7 | webshim = pkgs.stdenv.mkDerivation rec { | ||
9 | name = "webshim-${version}"; | 8 | name = "webshim-${version}"; |
10 | version = "1.16.0"; | 9 | version = "1.16.0"; |
11 | src = fetchFromGitHub { | 10 | src = pkgs.fetchFromGitHub { |
12 | owner = "aFarkas"; | 11 | owner = "aFarkas"; |
13 | repo = "webshim"; | 12 | repo = "webshim"; |
14 | rev = "1.16.0"; | 13 | rev = "1.16.0"; |
@@ -20,10 +19,24 @@ let | |||
20 | cp -r $src/js-webshim/dev/* $out/js/ | 19 | cp -r $src/js-webshim/dev/* $out/js/ |
21 | ''; | 20 | ''; |
22 | }; | 21 | }; |
23 | in pkgs.stdenv.lib.overrideDerivation (haskellPackages.callPackage ./bar.nix {}) (oldAttrs: { | 22 | jquery = pkgs.stdenv.mkDerivation rec { |
24 | postUnpack = '' | 23 | name = "jquery-${version}"; |
25 | rm -rf bar/static/jquery.js bar/static/webshim | 24 | version = "3.3.1"; |
26 | ln -vs ${pkgs.jquery}/js/jquery.js bar/static | 25 | src = pkgs.fetchurl { |
27 | ln -vs ${webshim}/js bar/static/webshim | 26 | url = "https://github.com/jquery/jquery/archive/${version}.tar.gz"; |
27 | sha256 = "1d1pilrwiz0yjx27cd7gbn8qar6hw5zgwjhpsyaijcg52z82wi5q"; | ||
28 | }; | ||
29 | |||
30 | installPhase = '' | ||
31 | mkdir -p $out/js | ||
32 | cp -r dist/jquery.js $out/js/ | ||
28 | ''; | 33 | ''; |
34 | }; | ||
35 | in pkgs.stdenv.lib.overrideDerivation pkg (drv: { | ||
36 | postUnpack = '' | ||
37 | cd bar-*/static | ||
38 | rm -rf jquery.js webshim | ||
39 | ln -vs ${jquery}/js/jquery.js . | ||
40 | ln -vs ${webshim}/js webshim | ||
41 | ''; | ||
29 | }) | 42 | }) |