mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-09-29 19:30:11 +00:00
aurral: run unit and integration tests
Assisted-by: Codex, gpt-5.6-sol medium
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
lib,
|
||||
buildNpmPackage,
|
||||
fetchFromGitHub,
|
||||
gitMinimal,
|
||||
nix-update-script,
|
||||
nodejs_26,
|
||||
sqlite,
|
||||
@@ -33,11 +34,26 @@ buildNpmPackage (finalAttrs: {
|
||||
./package.json.patch
|
||||
];
|
||||
|
||||
# https://github.com/lklynet/aurral/pull/873
|
||||
postPatch = ''
|
||||
# Keep automatic ports above Fetch's highest blocked port (10080).
|
||||
substituteInPlace .tests/helpers/backendTestHarness.js \
|
||||
--replace-fail '4100 + Math.floor(Math.random() * 1000)' \
|
||||
'11000 + Math.floor(Math.random() * 1000)'
|
||||
'';
|
||||
|
||||
npmDepsHash = "sha256-NVz5eqDDtMBKiTDl3aX0pHBYGTcYal8lmCf8mbKu31I=";
|
||||
|
||||
nodejs = nodejs_26;
|
||||
|
||||
env.VITE_APP_VERSION = finalAttrs.version;
|
||||
env.LD_LIBRARY_PATH = lib.makeLibraryPath [ sqlite ];
|
||||
env.FONTCONFIG_FILE = makeFontsConf {
|
||||
fontDirectories = [
|
||||
noto-fonts-color-emoji
|
||||
dejavu_fonts
|
||||
];
|
||||
};
|
||||
|
||||
npmInstallFlags = [
|
||||
"--include=optional"
|
||||
@@ -46,6 +62,22 @@ buildNpmPackage (finalAttrs: {
|
||||
|
||||
npmBuildFlags = [ "--workspace=frontend" ];
|
||||
|
||||
doCheck = true;
|
||||
|
||||
nativeCheckInputs = [
|
||||
ffmpeg
|
||||
gitMinimal
|
||||
];
|
||||
|
||||
checkPhase = ''
|
||||
runHook preCheck
|
||||
|
||||
npm test
|
||||
npm run test:integration
|
||||
|
||||
runHook postCheck
|
||||
'';
|
||||
|
||||
npmPruneFlags = [
|
||||
"--workspace=backend"
|
||||
"--include=optional"
|
||||
@@ -69,14 +101,7 @@ buildNpmPackage (finalAttrs: {
|
||||
yt-dlp
|
||||
]
|
||||
}\''${PATH:+:}\$PATH
|
||||
export FONTCONFIG_FILE=${
|
||||
makeFontsConf {
|
||||
fontDirectories = [
|
||||
noto-fonts-color-emoji
|
||||
dejavu_fonts
|
||||
];
|
||||
}
|
||||
}
|
||||
export FONTCONFIG_FILE=${finalAttrs.env.FONTCONFIG_FILE}
|
||||
export APP_VERSION=${finalAttrs.version}
|
||||
export NODE_ENV=production
|
||||
case "\$1" in
|
||||
|
||||
Reference in New Issue
Block a user