Skip to content

fix(gpg-agent): fix broken variable reference#5139

Merged
rycee merged 1 commit intonix-community:masterfrom
cpcloud:fix-pinetrypackage-ref
Mar 14, 2024
Merged

fix(gpg-agent): fix broken variable reference#5139
rycee merged 1 commit intonix-community:masterfrom
cpcloud:fix-pinetrypackage-ref

Conversation

@cpcloud
Copy link
Copy Markdown
Contributor

@cpcloud cpcloud commented Mar 14, 2024

Description

Fix a reference to a non-existent variable.

Checklist

  • Change is backwards compatible.

  • Code formatted with ./format.

  • Code tested through nix-shell --pure tests -A run.all or nix develop --ignore-environment .#all using Flakes.

  • Test cases updated/added. See example.

  • Commit messages are formatted like

    {component}: {description}
    
    {long description}
    

    See CONTRIBUTING for more information and recent commit messages for examples.

  • If this PR adds a new module

    • Added myself as module maintainer. See example.

Maintainer CC

@rycee

@SebTM
Copy link
Copy Markdown
Collaborator

SebTM commented Mar 14, 2024

Can we add the test from #5141 here or afterwards?

@SebTM SebTM mentioned this pull request Mar 14, 2024
2 tasks
@cpcloud
Copy link
Copy Markdown
Contributor Author

cpcloud commented Mar 14, 2024

Can we add the test from #5141 here or afterwards?

Yep, I'll add the test

@cpcloud
Copy link
Copy Markdown
Contributor Author

cpcloud commented Mar 14, 2024

Done.

Comment thread tests/modules/services/gpg-agent/default-homedir.nix Outdated
@rycee rycee force-pushed the fix-pinetrypackage-ref branch from 6cbca09 to 3ea3d6d Compare March 14, 2024 13:12
@cpcloud
Copy link
Copy Markdown
Contributor Author

cpcloud commented Mar 14, 2024

I get this error when running the test:

❯ nix develop --ignore-environment '.#test-gpg-agent-default-homedir'
trace: warning: getExe: Package "pinentry-1.2.1" does not have the meta.mainProgram attribute. We'll assume that the main program has the same name for now, but this behavior is deprecated, because it leads to surprising errors when the assumption does not hold. If the package has a main program, please set `meta.mainProgram` in its definition to make this warning go away. Otherwise, if the package does not have a main program, or if you don't control its definition, use getExe' to specify the name to the program, such as lib.getExe' foo "bar".
error:
       … while calling the 'derivationStrict' builtin

         at /builtin/derivation.nix:9:12: (source not available)

       … while evaluating derivation 'nmt-test-gpg-agent-default-homedir'
         whose name attribute is located at /nix/store/nra828scc8qs92b9pxra5csqzffb6hpl-source/pkgs/stdenv/generic/make-derivation.nix:354:7

       … while evaluating attribute 'buildCommand' of derivation 'nmt-test-gpg-agent-default-homedir'

         at /nix/store/nra828scc8qs92b9pxra5csqzffb6hpl-source/pkgs/build-support/trivial-builders/default.nix:98:16:

           97|         enableParallelBuilding = true;
           98|         inherit buildCommand name;
             |                ^
           99|         passAsFile = [ "buildCommand" ]

       (stack trace truncated; use '--show-trace' to show the full trace)

       error: attribute 'override' missing

       at /nix/store/nra828scc8qs92b9pxra5csqzffb6hpl-source/pkgs/top-level/all-packages.nix:28399:20:

        28398|   };
        28399|   systemdMinimal = systemd.override {
             |                    ^
        28400|     pname = "systemd-minimal";

@cpcloud
Copy link
Copy Markdown
Contributor Author

cpcloud commented Mar 14, 2024

Is the warning because home-manager is tied to a nixpkgs that doesn't have meta.mainProgram set for pinentry-curses?

@rycee
Copy link
Copy Markdown
Member

rycee commented Mar 14, 2024

@cpcloud I've force pushed a change which uses a stub instead. Hopefully that'll work OK and avoid the unnecessary downloads.

@rycee rycee force-pushed the fix-pinetrypackage-ref branch from 3ea3d6d to 77b94fe Compare March 14, 2024 13:38
@rycee rycee force-pushed the fix-pinetrypackage-ref branch from 77b94fe to 5877194 Compare March 14, 2024 13:46
@cpcloud
Copy link
Copy Markdown
Contributor Author

cpcloud commented Mar 14, 2024

@rycee Thanks, LGTM

@cpcloud
Copy link
Copy Markdown
Contributor Author

cpcloud commented Mar 14, 2024

Tests pass for me locally.

@rycee rycee merged commit 5877194 into nix-community:master Mar 14, 2024
@rycee
Copy link
Copy Markdown
Member

rycee commented Mar 14, 2024

Yep, looks good. Thanks for the fix!

@cpcloud cpcloud deleted the fix-pinetrypackage-ref branch March 14, 2024 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants