# pdtv26-speech: the speech capability's JavaScript, and its clients. # npm runs here, in Nix's build sandbox, from package-lock.json; so do the tests. # The output is plain JavaScript, the same on every architecture (allowedReferences keeps it so): # each user supplies its own node, at lib/node_modules/pdtv26-speech/*.js. { lib, buildNpmPackage }: buildNpmPackage { pname = "pdtv26-speech"; version = "0.1.0"; src = lib.fileset.toSource { root = ./.; fileset = lib.fileset.unions [ ./package.json ./package-lock.json ./run.js ./gate.js ./gate.test.js ./speech.js ./speech.test.js ./server.js ./hear-client.js ./speak-client.js ]; }; npmDepsHash = "sha256-C7Em37Mm3+mUHqQ2n37JshgLCByzMOlhgoQEex3CnlU="; dontNpmBuild = true; # The scripts' #!/usr/bin/env node stays as is: patched, it would tie the package to one node. dontPatchShebangs = true; npmInstallFlags = [ "--ignore-scripts" ]; doCheck = true; checkPhase = '' runHook preCheck # Every file parses, the server and clients included: no test imports them. for f in *.js; do node --check "$f"; done node --test runHook postCheck ''; allowedReferences = [ ]; }