-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathsource.nix
34 lines (29 loc) · 944 Bytes
/
source.nix
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
{ pkgs ? import <nixpkgs> {}
, lib ? pkgs.lib
}:
{
src = lib.cleanSourceWith {
src = ./.;
filter = name: type: let baseName = baseNameOf (toString name); in
(builtins.match ".*.un~" baseName == null)
&& (baseName != "dist")
&& (baseName != "result")
&& (baseName != "results")
&& (baseName != "__pycache__")
&& (baseName != ".mypy_cache")
&& (baseName != ".pytest_cache")
&& (builtins.match ".*/simple_server/pwebarc-dump.*" name == null)
;
};
unpackPhase = ''
mkdir home
HOME=$PWD/home
${pkgs.git}/bin/git config --global --add safe.directory '*'
${pkgs.git}/bin/git clone $src source
${pkgs.git}/bin/git clone $src/vendor/pako source/vendor/pako
${pkgs.git}/bin/git clone $src/vendor/kisstdlib source/vendor/kisstdlib
cp -a $src/extension/private source/extension || true
patchShebangs source
find source | grep -vF '/.git/'
'';
}