Preserve compiler metadata context and diagnose exact identity differences (#931)
This commit is contained in:
parent
e5232098aa
commit
61881f9cda
@@ -5,6 +5,8 @@
|
||||
}:
|
||||
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;
|
||||
source = pkgs.lib.fileset.toSource {
|
||||
root = ./.;
|
||||
fileset = pkgs.lib.fileset.unions [
|
||||
@@ -28,14 +30,23 @@ let
|
||||
};
|
||||
inputs = pkgs.writeText "protocol-source-inputs.json" (
|
||||
builtins.toJSON {
|
||||
inherit source nixpkgsNarHash;
|
||||
inherit source nixpkgsNarHash productionDerivation;
|
||||
narHashContext = builtins.getContext nixpkgsNarHash;
|
||||
evaluatorVersion = builtins.nixVersion;
|
||||
pinnedNixVersion = pkgs.nix.version;
|
||||
nixpkgs = pkgs.path;
|
||||
system = pkgs.stdenv.hostPlatform.system;
|
||||
expected = comparisonIdentity library;
|
||||
expectedSource = builtins.unsafeDiscardStringContext (toString library.src);
|
||||
yarn = comparisonIdentity library.yarn-freestanding;
|
||||
}
|
||||
);
|
||||
closure = pkgs.closureInfo { rootPaths = [ pkgs.path ]; };
|
||||
closure = pkgs.closureInfo {
|
||||
rootPaths = [
|
||||
pkgs.path
|
||||
productionDerivation
|
||||
];
|
||||
};
|
||||
in
|
||||
pkgs.runCommand "quixos-protocol-source-check"
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user