Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{stdenv, lib, fetchurl, registryDat}:
2
3ver: deps:
4 let cmds = lib.mapAttrsToList (name: info: let
5 pkg = stdenv.mkDerivation {
6 name = lib.replaceStrings ["/"] ["-"] name + "-${info.version}";
7
8 src = fetchurl {
9 url = "https://github.com/${name}/archive/${info.version}.tar.gz";
10 meta.homepage = "https://github.com/${name}/";
11 inherit (info) sha256;
12 };
13
14 configurePhase = ''
15 true
16 '';
17
18 buildPhase = ''
19 true
20 '';
21
22 installPhase = ''
23 mkdir -p $out
24 cp -r * $out
25 '';
26 };
27 in ''
28 mkdir -p .elm/${ver}/packages/${name}
29 cp -R ${pkg} .elm/${ver}/packages/${name}/${info.version}
30 '') deps;
31 in (lib.concatStrings cmds) + ''
32 mkdir -p .elm/${ver}/packages;
33 cp ${registryDat} .elm/${ver}/packages/registry.dat;
34 chmod -R +w .elm
35 ''