Skip to content

checkMeta works in strange ways? #37350

@pbogdan

Description

@pbogdan

I would like to better understand the semantics of checkMeta. When applying the following patch on top of commit 4e1ab9d

diff --git a/pkgs/applications/misc/gmtp/default.nix b/pkgs/applications/misc/gmtp/default.nix
index 423eea914b9..8b2c006ffe6 100644
--- a/pkgs/applications/misc/gmtp/default.nix
+++ b/pkgs/applications/misc/gmtp/default.nix
@@ -21,7 +21,7 @@ stdenv.mkDerivation {
     description = "A simple MP3 and Media player client for UNIX and UNIX like systems.";
     homepage = https://gmtp.sourceforge.io;
     platforms = stdenv.lib.platforms.linux;
-    maintainers = [ stdenv.lib.maintainers.pbogdan ];
+    maintainer = stdenv.lib.maintainers.doesnotexist;
     license = stdenv.lib.licenses.bsd3;
   };
 }

performing the following

~/Code/nixpkgs master@4e1ab9d44c0 ✗ nix-env -qaP  --arg config '{ checkMeta = true; }'  --show-trace -f .  --meta --json --out-path -A gmtp -I nixpkgs=.
{}%                                                                                                                                                                                                                  ~/Code/nixpkgs master@4e1ab9d44c0 ✗ echo $?
0
~/Code/nixpkgs master@4e1ab9d44c0 ✗ nix-env -qaP  --show-trace -f .  --meta --json --out-path -A gmtp -I nixpkgs=.                                      
{
  "gmtp": {
    "name": "gmtp-1.3.11",
    "system": "x86_64-linux",
    "meta": {
      "available": true,
      "description": "A simple MP3 and Media player client for UNIX and UNIX like systems.",
      "homepage": "https://gmtp.sourceforge.io",
      "license": {
        "fullName": "BSD 3-clause \"New\" or \"Revised\" License",
        "shortName": "bsd3",
        "spdxId": "BSD-3-Clause",
        "url": "http://spdx.org/licenses/BSD-3-Clause.html"
      },
      "maintainer": 
    }
  }
error: while evaluating the attribute 'lib.maintainers.doesnotexist' at /shared/Code/nixpkgs/lib/default.nix:24:5:
attribute 'doesnotexist' missing, at /shared/Code/nixpkgs/pkgs/applications/misc/gmtp/default.nix:24:18
}%                             
 ~/Code/nixpkgs master@4e1ab9d44c0 ✗ echo $?
1

yields results that are unexpected to me. I would expect adding checkMeta to result in more stringent evaluation of the result, instead it appears to return with no result at all with exit code indicating a success. Without checkMeta the evaluation fails with an error and exit code indicating so.

I'm probably misunderstanding what checkMeta is supposed to do - I would appreciate any help in trying to understand it better.

Metadata

Metadata

Assignees

No one assigned

    Labels

    2.status: stalehttps://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions