summaryrefslogtreecommitdiff
path: root/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'default.nix')
-rw-r--r--default.nix39
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 @@
1argumentPackages@{ ... }: 1argumentPackages@{ ... }:
2 2
3let 3let
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 };
23in 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 };
35in 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})