Merge pull request #140612 from sternenseemann/cbqn-no-patch

cbqn: remove vendoring using builtin capabilities
This commit is contained in:
Anderson Torres 2021-10-05 13:25:45 -03:00 committed by GitHub
commit 2de004090b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 28 deletions

View file

@ -1,15 +0,0 @@
diff --git a/makefile b/makefile
index a5f3d75..f617e25 100644
--- a/makefile
+++ b/makefile
@@ -109,9 +109,7 @@ ${bd}/%.o: src/builtins/%.c
src/gen/customRuntime:
- @echo "Copying precompiled bytecode from the bytecode branch"
- git checkout remotes/origin/bytecode src/gen/{compiler,formatter,runtime0,runtime1,src}
- git reset src/gen/{compiler,formatter,runtime0,runtime1,src}
+ @echo "src/gen/ files retrieved externally"
${bd}/load.o: src/gen/customRuntime
-include $(bd)/*.d

View file

@ -29,23 +29,18 @@ stdenv.mkDerivation rec {
dontConfigure = true;
patches = [
# self-explaining
./001-remove-vendoring.diff
];
postPatch = ''
sed -i '/SHELL =.*/ d' makefile
'';
preBuild =
if genBytecode
then ''
${bqn-path} genRuntime ${mbqn-source}
''
else ''
cp ${cbqn-bytecode-files}/src/gen/{compiler,formatter,runtime0,runtime1,src} src/gen/
'';
preBuild = ''
# inform make we are providing the runtime ourselves
touch src/gen/customRuntime
'' + (if genBytecode then ''
${bqn-path} genRuntime ${mbqn-source}
'' else ''
cp ${cbqn-bytecode-files}/src/gen/{compiler,formatter,runtime0,runtime1,src} src/gen/
'');
makeFlags = [
"CC=${stdenv.cc.targetPrefix}cc"