mirror of
https://codeberg.org/demostf/parser.git
synced 2026-06-03 10:14:06 +02:00
newer demo for codegen
This commit is contained in:
parent
1a549b7c40
commit
cc83dced64
4 changed files with 4 additions and 3 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -1,6 +1,7 @@
|
||||||
/target
|
/target
|
||||||
**/*.rs.bk
|
**/*.rs.bk
|
||||||
*.dem
|
*.dem
|
||||||
|
!/test_data/*.dem
|
||||||
*.svg
|
*.svg
|
||||||
*.data*
|
*.data*
|
||||||
*.iml
|
*.iml
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
lib,
|
lib,
|
||||||
}: let
|
}: let
|
||||||
inherit (lib.sources) sourceByRegex;
|
inherit (lib.sources) sourceByRegex;
|
||||||
src = sourceByRegex ./. ["Cargo.*" "(src|benches|tests|test_data)(/.*)?"];
|
src = sourceByRegex ./. ["Cargo.*" "(src|benches)(/.*)?"];
|
||||||
in
|
in
|
||||||
rustPlatform.buildRustPackage {
|
rustPlatform.buildRustPackage {
|
||||||
pname = "demostf-parser-codegen";
|
pname = "demostf-parser-codegen";
|
||||||
|
|
|
||||||
|
|
@ -2,11 +2,11 @@ final: prev: {
|
||||||
demostf-parser = final.callPackage ./parser.nix {};
|
demostf-parser = final.callPackage ./parser.nix {};
|
||||||
demostf-parser-codegen = final.callPackage ./codegen.nix {};
|
demostf-parser-codegen = final.callPackage ./codegen.nix {};
|
||||||
demostf-parser-codegen-events = final.runCommand "gameevent_gen.rs" {} ''
|
demostf-parser-codegen-events = final.runCommand "gameevent_gen.rs" {} ''
|
||||||
${final.demostf-parser-codegen}/bin/generate ${./test_data/small.dem} events > $out
|
${final.demostf-parser-codegen}/bin/codegen ${./test_data/short-2024.dem} events > $out
|
||||||
${final.rustfmt}/bin/rustfmt $out
|
${final.rustfmt}/bin/rustfmt $out
|
||||||
'';
|
'';
|
||||||
demostf-parser-codegen-props = final.runCommand "sendprop_gen.rs" {} ''
|
demostf-parser-codegen-props = final.runCommand "sendprop_gen.rs" {} ''
|
||||||
${final.demostf-parser-codegen}/bin/generate ${./test_data/small.dem} props > $out
|
${final.demostf-parser-codegen}/bin/codegen ${./test_data/short-2024.dem} props > $out
|
||||||
${final.rustfmt}/bin/rustfmt $out
|
${final.rustfmt}/bin/rustfmt $out
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
|
||||||
BIN
test_data/short-2024.dem
Normal file
BIN
test_data/short-2024.dem
Normal file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue