Inspect constructor values and contexts without unrelated derivation closures (#931)

This commit is contained in:
Quixos Development Agent 01f26965-84fa-4a79-8069-725682c13065
2026-11-05 21:32:42 +00:00
parent 61881f9cda
commit 4f672d027d
3 changed files with 59 additions and 33 deletions
+5 -9
View File
@@ -5,8 +5,7 @@
}:
let
comparisonIdentity = import ../tools/local-first/derivation-identity.nix;
# Inspect the actual .drv as data, without its derivation-deep output context.
productionDerivation = builtins.unsafeDiscardOutputDependency library.drvPath;
inspect = import ./source-qualification-metadata.nix;
source = pkgs.lib.fileset.toSource {
root = ./.;
fileset = pkgs.lib.fileset.unions [
@@ -23,6 +22,7 @@ let
./tsconfig.build.json
./tsconfig.test.json
./default.nix
./source-qualification-metadata.nix
./yarn-project.nix
./flake.nix
./README.md
@@ -30,23 +30,19 @@ let
};
inputs = pkgs.writeText "protocol-source-inputs.json" (
builtins.toJSON {
inherit source nixpkgsNarHash productionDerivation;
inherit source nixpkgsNarHash;
narHashContext = builtins.getContext nixpkgsNarHash;
evaluatorVersion = builtins.nixVersion;
pinnedNixVersion = pkgs.nix.version;
nixpkgs = pkgs.path;
system = pkgs.stdenv.hostPlatform.system;
expected = comparisonIdentity library;
expectedMetadata = inspect library;
expectedSource = builtins.unsafeDiscardStringContext (toString library.src);
yarn = comparisonIdentity library.yarn-freestanding;
}
);
closure = pkgs.closureInfo {
rootPaths = [
pkgs.path
productionDerivation
];
};
closure = pkgs.closureInfo { rootPaths = [ pkgs.path ]; };
in
pkgs.runCommand "quixos-protocol-source-check"
{