blob: dc8c226d02fceb927919d73dcdc9b2bb2d5252bc (
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
30
31
32
33
34
35
36
37
38
39
40
41
42
|
argumentPackages@{ ... }:
let
pkgs = (import <nixpkgs> {}).pkgs // argumentPackages;
haskellPackages = pkgs.haskellPackages // argumentPackages;
pkg = haskellPackages.callPackage ./bar.nix {};
webshim = pkgs.stdenv.mkDerivation rec {
name = "webshim-${version}";
version = "1.16.0";
src = pkgs.fetchFromGitHub {
owner = "aFarkas";
repo = "webshim";
rev = "1.16.0";
sha256 = "14pk7hljqipzp0n7vpgcfxr3w4bla57cwyd7bmwmmxrm2zn62cyh";
};
installPhase = ''
mkdir -p $out/js
cp -r $src/js-webshim/dev/* $out/js/
'';
};
jquery = pkgs.stdenv.mkDerivation rec {
name = "jquery-${version}";
version = "3.3.1";
src = pkgs.fetchurl {
url = "https://github.com/jquery/jquery/archive/${version}.tar.gz";
sha256 = "1d1pilrwiz0yjx27cd7gbn8qar6hw5zgwjhpsyaijcg52z82wi5q";
};
installPhase = ''
mkdir -p $out/js
cp -r dist/jquery.js $out/js/
'';
};
in pkgs.stdenv.lib.overrideDerivation pkg (drv: {
postUnpack = ''
cd bar-*/static
rm -rf jquery.js webshim
ln -vs ${jquery}/js/jquery.js .
ln -vs ${webshim}/js webshim
'';
})
|