diff options
author | Silvan Mosberger <silvan.mosberger@tweag.io> | 2023-10-12 00:32:31 +0200 |
---|---|---|
committer | Silvan Mosberger <silvan.mosberger@tweag.io> | 2023-10-12 02:24:54 +0200 |
commit | 21d520fbf202e84c80e32afc6b1377974335e4e4 (patch) | |
tree | 1204c82d1f2be0ad9e2da7c6d776fa9d5a4f2941 /pkgs/test | |
parent | b11ced7a9c1fc44392358e337c0d8f58efc97c89 (diff) |
tests.nixpkgs-check-by-name: Minor Nix refactor
Diffstat (limited to 'pkgs/test')
-rw-r--r-- | pkgs/test/nixpkgs-check-by-name/src/eval.nix | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/pkgs/test/nixpkgs-check-by-name/src/eval.nix b/pkgs/test/nixpkgs-check-by-name/src/eval.nix index 7c0ae755215a0..378ecef46b57a 100644 --- a/pkgs/test/nixpkgs-check-by-name/src/eval.nix +++ b/pkgs/test/nixpkgs-check-by-name/src/eval.nix @@ -39,14 +39,18 @@ let overlays = [ callPackageOverlay ]; }; - attrInfo = attr: { + attrInfo = attr: + let + value = pkgs.${attr}; + in + { # These names are used by the deserializer on the Rust side call_package_path = - if pkgs.${attr} ? _callPackagePath && builtins.isPath pkgs.${attr}._callPackagePath then - toString pkgs.${attr}._callPackagePath + if value ? _callPackagePath && builtins.isPath value._callPackagePath then + toString value._callPackagePath else null; - is_derivation = pkgs.lib.isDerivation pkgs.${attr}; + is_derivation = pkgs.lib.isDerivation value; }; attrInfos = builtins.listToAttrs (map (name: { |