summaryrefslogtreecommitdiff
path: root/custom/bar/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'custom/bar/default.nix')
-rw-r--r--custom/bar/default.nix47
1 files changed, 47 insertions, 0 deletions
diff --git a/custom/bar/default.nix b/custom/bar/default.nix
new file mode 100644
index 00000000..98b36901
--- /dev/null
+++ b/custom/bar/default.nix
@@ -0,0 +1,47 @@
1{ haskellPackages
2, stdenv
3, fetchFromGitHub
4, fetchurl
5, haskell
6}:
7
8let
9 pkg = haskellPackages.callPackage ./generated.nix {};
10 webshim = stdenv.mkDerivation rec {
11 name = "webshim-${version}";
12 version = "1.16.0";
13 src = fetchFromGitHub {
14 owner = "aFarkas";
15 repo = "webshim";
16 rev = "1.16.0";
17 sha256 = "14pk7hljqipzp0n7vpgcfxr3w4bla57cwyd7bmwmmxrm2zn62cyh";
18 };
19
20 installPhase = ''
21 mkdir -p $out/js
22 cp -r $src/js-webshim/dev/* $out/js/
23 '';
24 };
25 jquery = stdenv.mkDerivation rec {
26 name = "jquery-${version}";
27 version = "3.3.1";
28 src = fetchurl {
29 url = "https://github.com/jquery/jquery/archive/${version}.tar.gz";
30 sha256 = "1d1pilrwiz0yjx27cd7gbn8qar6hw5zgwjhpsyaijcg52z82wi5q";
31 };
32
33 installPhase = ''
34 mkdir -p $out/js
35 cp -r dist/jquery.js $out/js/
36 '';
37 };
38in stdenv.lib.overrideDerivation pkg (drv: {
39 postUnpack = ''
40 (
41 cd bar-*/static
42 rm -rf jquery.js webshim
43 ln -vs ${jquery}/js/jquery.js .
44 ln -vs ${webshim}/js webshim
45 )
46 '';
47})