mirror of
https://codeberg.org/demostf/parser.git
synced 2026-06-03 18:24:05 +02:00
move nix
This commit is contained in:
parent
c2985d13f2
commit
4e6d6e4b3a
5 changed files with 39 additions and 14 deletions
|
|
@ -24,7 +24,7 @@
|
|||
in (eachDefaultSystem (system: let
|
||||
overlays = [
|
||||
(import rust-overlay)
|
||||
(import ./overlay.nix)
|
||||
(import ./nix/overlay.nix)
|
||||
];
|
||||
pkgs = (import nixpkgs) {
|
||||
inherit system overlays;
|
||||
|
|
@ -156,7 +156,7 @@
|
|||
};
|
||||
})
|
||||
// {
|
||||
overlays.default = import ./overlay.nix;
|
||||
overlays.default = import ./nix/overlay.nix;
|
||||
hydraJobs = eachSystem ["x86_64-linux" "aarch64-linux"] (system: {
|
||||
parser = self.packages.${system}.demostf-parser;
|
||||
});
|
||||
|
|
|
|||
|
|
@ -4,12 +4,16 @@
|
|||
lib,
|
||||
}: let
|
||||
inherit (lib.sources) sourceByRegex;
|
||||
src = sourceByRegex ./. ["Cargo.*" "(src|benches)(/.*)?"];
|
||||
src = sourceByRegex ../. ["Cargo.*" "(src|benches)(/.*)?"];
|
||||
in
|
||||
rustPlatform.buildRustPackage {
|
||||
pname = "demostf-parser-codegen";
|
||||
version = "0.1.0";
|
||||
|
||||
cargoBuildFlags = ''
|
||||
--bin codegen
|
||||
'';
|
||||
|
||||
src = lib.traceVal src;
|
||||
|
||||
buildType = "debug";
|
||||
|
|
@ -18,9 +22,6 @@ in
|
|||
doCheck = false;
|
||||
|
||||
cargoLock = {
|
||||
lockFile = ./Cargo.lock;
|
||||
outputHashes = {
|
||||
"schemars-0.8.16" = "sha256-mQR56Ym76gSRulZrThmZHHw2JfhEgYhWXabwaYmyMYs=";
|
||||
};
|
||||
lockFile = ../Cargo.lock;
|
||||
};
|
||||
}
|
||||
|
|
@ -2,11 +2,11 @@ final: prev: {
|
|||
demostf-parser = final.callPackage ./parser.nix {};
|
||||
demostf-parser-codegen = final.callPackage ./codegen.nix {};
|
||||
demostf-parser-codegen-events = final.runCommand "gameevent_gen.rs" {} ''
|
||||
${final.demostf-parser-codegen}/bin/codegen ${./test_data/short-2024.dem} events > $out
|
||||
${final.demostf-parser-codegen}/bin/codegen ${../test_data/short-2024.dem} events > $out
|
||||
${final.rustfmt}/bin/rustfmt $out
|
||||
'';
|
||||
demostf-parser-codegen-props = final.runCommand "sendprop_gen.rs" {} ''
|
||||
${final.demostf-parser-codegen}/bin/codegen ${./test_data/short-2024.dem} props > $out
|
||||
${final.demostf-parser-codegen}/bin/codegen ${../test_data/short-2024.dem} props > $out
|
||||
${final.rustfmt}/bin/rustfmt $out
|
||||
'';
|
||||
}
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
lib,
|
||||
}: let
|
||||
inherit (lib.sources) sourceByRegex;
|
||||
src = sourceByRegex ./. ["Cargo.*" "(src|benches|tests|test_data)(/.*)?"];
|
||||
src = sourceByRegex ../. ["Cargo.*" "(src|benches|tests|test_data)(/.*)?"];
|
||||
in
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "demostf-parser";
|
||||
|
|
@ -19,9 +19,6 @@ in
|
|||
doCheck = stdenv.system == "x86_64-linux"; # building the tests takes +- forever on aarch64 for some reason
|
||||
|
||||
cargoLock = {
|
||||
lockFile = ./Cargo.lock;
|
||||
outputHashes = {
|
||||
"schemars-0.8.16" = "sha256-mQR56Ym76gSRulZrThmZHHw2JfhEgYhWXabwaYmyMYs=";
|
||||
};
|
||||
lockFile = ../Cargo.lock;
|
||||
};
|
||||
}
|
||||
27
nix/schema.nix
Normal file
27
nix/schema.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
stdenv,
|
||||
rustPlatform,
|
||||
lib,
|
||||
}: let
|
||||
inherit (lib.sources) sourceByRegex;
|
||||
src = sourceByRegex ../. ["Cargo.*" "(src|benches)(/.*)?"];
|
||||
in
|
||||
rustPlatform.buildRustPackage {
|
||||
pname = "demostf-parser-schema";
|
||||
version = "0.1.0";
|
||||
|
||||
cargoBuildFlags = ''
|
||||
--bin schema
|
||||
'';
|
||||
|
||||
src = lib.traceVal src;
|
||||
|
||||
buildType = "debug";
|
||||
buildFeatures = ["schema"];
|
||||
|
||||
doCheck = false;
|
||||
|
||||
cargoLock = {
|
||||
lockFile = ../Cargo.lock;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue