Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python3Packages.hg-commitsigs: init at unstable-2021-01-08 #122318

Merged
merged 1 commit into from Sep 5, 2021
Merged

python3Packages.hg-commitsigs: init at unstable-2021-01-08 #122318

merged 1 commit into from Sep 5, 2021

Conversation

yoctocell
Copy link
Member

@yoctocell yoctocell commented May 9, 2021

A Mercurial extension for signing changesets.

If people want to be able to use this extension they have to manually
set their PYTHONPATH to
/nix/store/...-profile/lib/python3.8/site-packages/hgext3rd. It
would be nice if we could make the Mercurial package automatically
read things from this directory without any intervention from the
user.

CC: @lukegb

Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

A Mercurial extension for signing changesets.
@r-rmcgibbo
Copy link

r-rmcgibbo commented May 9, 2021

Result of nixpkgs-review pr 122318 at ec0dc73 run on aarch64-linux 1

1 package built successfully:
  • python38Packages.hg-commitsigs (python39Packages.hg-commitsigs)
1 suggestion:
  • warning: missing-phase-hooks

    installPhase should probably contain runHook preInstall and runHook postInstall.

    Near pkgs/development/python-modules/hg-commitsigs/default.nix:22:3:

       |
    22 |   installPhase = ''
       |   ^
    

Result of nixpkgs-review pr 122318 at ec0dc73 run on x86_64-linux 1

1 package built successfully:
  • python38Packages.hg-commitsigs (python39Packages.hg-commitsigs)
1 suggestion:
  • warning: missing-phase-hooks

    installPhase should probably contain runHook preInstall and runHook postInstall.

    Near pkgs/development/python-modules/hg-commitsigs/default.nix:22:3:

       |
    22 |   installPhase = ''
       |   ^
    

@lukegb
Copy link
Contributor

lukegb commented Sep 5, 2021

Sorry for the excessively slow review - I didn't see this in my GH notifications inbox and I junked all my email at the time.

Since this PR, I've added a "withExtensions" mechanism to the Mercurial derivation to support loading things like this; it works with hg-evolve for instance, but not with this one, because this doesn't use the standard Python building mechanism so it doesn't export the attributes it expects.

If you're still interested in this, would you mind switching this to use the standard Python buildPythonPackage thing?

You should be able to test it's working with e.g.

nix-shell -p '((import ./. {}).mercurial.withExtensions (pm: [ pm.hg-commitsigs ]))' --run "hg --config extensions.commitsigs= help verifysigs"

@lukegb lukegb self-assigned this Sep 5, 2021
@lukegb lukegb self-requested a review September 5, 2021 09:49
@lukegb lukegb merged commit e066629 into NixOS:master Sep 5, 2021
@dotlambda
Copy link
Member

This has to be moved out of python-packages.nix.

@dotlambda
Copy link
Member

Never mind, it just has to use the correct interpreter: #172975

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants