-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathidx-template.nix
22 lines (22 loc) · 888 Bytes
/
idx-template.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{pkgs, template ? "templates/basic", ...}: {
packages = [
pkgs.curl
pkgs.gnutar
pkgs.xz
pkgs.git
pkgs.busybox
];
bootstrap = ''
mkdir "$out"
${
if template == "samples/ads" then "cp -r ${./samples/ads}/. \"$out\""
else if template == "samples/crossword" then "cp -r ${./samples/crossword}/. \"$out\""
else if template == "samples/multiplayer" then "cp -r ${./samples/multiplayer}/. \"$out\""
else if template == "templates/basic" then "cp -r ${./templates/basic}/. \"$out\""
else if template == "templates/card" then "cp -r ${./templates/card}/. \"$out\""
else if template == "templates/endless_runner" then "cp -r ${./templates/endless_runner}/. \"$out\""
else "cp -r ${./templates/basic}/. \"$out\""
}
chmod -R u+w "$out"
'';
}