Export template source from be30143a326d5d7d7b0cbabea5bc5ac0301ef5b9:examples/local-first/packages/language-reader-runtime
This commit is contained in:
@@ -0,0 +1,66 @@
|
||||
{
|
||||
inputs.protocol.url = "git+https://gitea-external.egads.tutti.syntaxblitz.net/quixos/quixos-protocol.git?ref=refs/tags/quixos-reachability/5b44c8154dc038efd87cf1cbdd2c00b66bfd4f87&rev=5b44c8154dc038efd87cf1cbdd2c00b66bfd4f87";
|
||||
inputs.nixpkgs.follows = "protocol/nixpkgs";
|
||||
inputs.flake-utils.follows = "protocol/flake-utils";
|
||||
inputs.helpers = {
|
||||
url = "git+https://gitea-external.egads.tutti.syntaxblitz.net/quixos/quixos-nix-helpers.git?ref=refs/tags/quixos-reachability/91679e8cc82133093cb0b4f9e519cbb39a5bba4f&rev=91679e8cc82133093cb0b4f9e519cbb39a5bba4f";
|
||||
flake = false;
|
||||
};
|
||||
outputs =
|
||||
{
|
||||
nixpkgs,
|
||||
flake-utils,
|
||||
helpers,
|
||||
...
|
||||
}:
|
||||
flake-utils.lib.eachDefaultSystem (
|
||||
system:
|
||||
let
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
camino = import (helpers + "/quixos-package-helpers.nix");
|
||||
in
|
||||
{
|
||||
quixosPackages.checkedArtifacts =
|
||||
context:
|
||||
let
|
||||
pkgs = camino.packageSet { inherit nixpkgs system context; };
|
||||
testedSource =
|
||||
pkgs.runCommand "language-reader-runtime-tested-source"
|
||||
{
|
||||
nativeBuildInputs = [
|
||||
pkgs.nodejs_24
|
||||
pkgs.esbuild
|
||||
];
|
||||
}
|
||||
''
|
||||
esbuild ${./.}/tests/network.test.ts --bundle --platform=node --format=esm --outfile=network.mjs
|
||||
node network.mjs
|
||||
esbuild ${./.}/tests/processors.test.ts --bundle --platform=node --format=esm --outfile=processors.mjs
|
||||
node processors.mjs
|
||||
cp -r ${./.} "$out"
|
||||
chmod u+w "$out/src"
|
||||
printf '%s\n' 'export const processorSource = "${builtins.hashString "sha256" (toString ./.)}";' > "$out/src/source-version.ts"
|
||||
printf '%s\n' 'export const annotationTaskSource = "${builtins.hashString "sha256" (builtins.readFile ./src/text-processing.ts)}";' >> "$out/src/source-version.ts"
|
||||
'';
|
||||
|
||||
in
|
||||
camino.assembleCaminoPackage {
|
||||
inherit pkgs context;
|
||||
artifacts = [
|
||||
(camino.mkCaminoTypeScriptPackage {
|
||||
inherit pkgs context;
|
||||
src = testedSource;
|
||||
entry = "src/portable.ts";
|
||||
entries.server = "src/server.ts";
|
||||
})
|
||||
(camino.mkCaminoTypeScriptService {
|
||||
inherit pkgs context;
|
||||
src = testedSource;
|
||||
entry = "src/remote.ts";
|
||||
})
|
||||
];
|
||||
};
|
||||
devShells.default = camino.mkCaminoYarnShell { inherit pkgs; };
|
||||
}
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user