mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-06 17:13:24 -05:00
ci.eval.compare: extract a derivation for cmp-stats
It's not very useful yet.
This commit is contained in:
parent
4c2c6d9c43
commit
2fe7b1cec2
1 changed files with 40 additions and 9 deletions
|
|
@ -5,7 +5,45 @@
|
|||
runCommand,
|
||||
writeText,
|
||||
python3,
|
||||
stdenvNoCC,
|
||||
makeWrapper,
|
||||
}:
|
||||
let
|
||||
python = python3.withPackages (ps: [
|
||||
ps.numpy
|
||||
ps.pandas
|
||||
ps.scipy
|
||||
]);
|
||||
|
||||
cmp-stats = stdenvNoCC.mkDerivation {
|
||||
pname = "cmp-stats";
|
||||
version = lib.trivial.release;
|
||||
|
||||
dontUnpack = true;
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/share/cmp-stats
|
||||
|
||||
cp ${./cmp-stats.py} "$out/share/cmp-stats/cmp-stats.py"
|
||||
|
||||
makeWrapper ${python.interpreter} "$out/bin/cmp-stats" \
|
||||
--add-flags "$out/share/cmp-stats/cmp-stats.py"
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Performance comparison of Nix evaluation statistics";
|
||||
license = lib.licenses.mit;
|
||||
mainProgram = "cmp-stats";
|
||||
maintainers = with lib.maintainers; [ philiptaron ];
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
combinedDir,
|
||||
touchedFilesJson,
|
||||
|
|
@ -140,14 +178,7 @@ runCommand "compare"
|
|||
# Don't depend on -dev outputs to reduce closure size for CI.
|
||||
nativeBuildInputs = map lib.getBin [
|
||||
jq
|
||||
(python3.withPackages (
|
||||
ps: with ps; [
|
||||
numpy
|
||||
pandas
|
||||
scipy
|
||||
]
|
||||
))
|
||||
|
||||
cmp-stats
|
||||
];
|
||||
maintainers = builtins.toJSON maintainers;
|
||||
passAsFile = [ "maintainers" ];
|
||||
|
|
@ -181,7 +212,7 @@ runCommand "compare"
|
|||
echo
|
||||
} >> $out/step-summary.md
|
||||
|
||||
python3 ${./cmp-stats.py} >> $out/step-summary.md
|
||||
cmp-stats >> $out/step-summary.md
|
||||
|
||||
else
|
||||
# Package chunks are the same in both revisions
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue