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

pay-respects: add module #6210

Merged
merged 1 commit into from
Dec 21, 2024

Conversation

ALameLlama
Copy link
Contributor

@ALameLlama ALameLlama commented Dec 16, 2024

Description

Add pay-respects module including shell integration support for bash, zsh, fish and nushell

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

@ALameLlama
Copy link
Contributor Author

Closes #6204

@ALameLlama
Copy link
Contributor Author

I'm still fairly new to nix so if anything needs changing let me know :)

I looked over how a few other modules work and put this together. the tests passed using

nix-shell --pure tests -A run.pay-respects-integration-enabled
nix-shell --pure tests -A run.pay-respects-integration-disabled

I manually tested it in ZSH in my own configuration. and used https://github.com/iffse/pay-respects to get the config for fish and nu.

@ALameLlama
Copy link
Contributor Author

I'm not sure if @SigmaSquadron has any interest in maintaining this also as they are the ones that added into nixpkgs

@ALameLlama ALameLlama force-pushed the feat/add-pay-respects branch from b36e601 to c33bce6 Compare December 16, 2024 10:32
@minhtrancccp
Copy link

i specified pay-respects.package = inputs.pay-respect.packages.[system].default (i.e. the repo's flake) in my home.nix and i got a rebuild error.

`nix log /nix/store/ys249ajvmjwgrvsdlx6iw2n0fbjgchna-pay-respects-0.6.6.drv`
Running phase: unpackPhase
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking source archive /nix/store/azdvcx3fkh98bjq8a6ii9cz5bhzc3l89-source
source root is source
Executing cargoSetupPostUnpackHook
Finished cargoSetupPostUnpackHook
Running phase: patchPhase
@nix { "action": "setPhase", "phase": "patchPhase" }
Executing cargoSetupPostPatchHook
Validating consistency between /build/source/Cargo.lock and /build/cargo-vendor-dir/Cargo.lock
Finished cargoSetupPostPatchHook
Running phase: updateAutotoolsGnuConfigScriptsPhase
@nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" }
Running phase: configurePhase
@nix { "action": "setPhase", "phase": "configurePhase" }
Running phase: buildPhase
@nix { "action": "setPhase", "phase": "buildPhase" }
Executing cargoBuildHook
cargoBuildHook flags: -j 16 --target x86_64-unknown-linux-gnu --offline --profile release
�[1m�[31merror�[0m�[1m:�[0m failed to load manifest for workspace member `/build/source/core`
referenced by workspace at `/build/source/Cargo.toml`

Caused by:
  failed to load manifest for dependency `pay-respects-parser`

Caused by:
  failed to read `/build/source/parser/Cargo.toml`

Caused by:
  No such file or directory (os error 2)

@ALameLlama
Copy link
Contributor Author

ALameLlama commented Dec 18, 2024

@minhtrancccp I'm not entirely sure about building pay-respects via a nix flake, I installed it via the package manager

This PR is just to add options to run eval "$(pay-respects zsh --alias)" so you can access it via f

@SigmaSquadron
Copy link

I'm not sure if @SigmaSquadron has any interest in maintaining this also as they are the ones that added into nixpkgs

I'd maintain it if NixOS/rfcs#182 is accepted and home-manager is merged/re-created in Nixpkgs, but not before.

@SigmaSquadron
Copy link

i specified pay-respects.package = inputs.pay-respect.packages.[system].default (i.e. the repo's flake) in my home.nix and i got a rebuild error.
nix log /nix/store/ys249ajvmjwgrvsdlx6iw2n0fbjgchna-pay-respects-0.6.6.drv

Upstream issue. Looks like their build stopped working at some point. (Nixpkgs updates do take time, but they're usually reliable and well tested.)

modules/lib/maintainers.nix Outdated Show resolved Hide resolved
modules/programs/pay-respects.nix Outdated Show resolved Hide resolved
modules/programs/pay-respects.nix Outdated Show resolved Hide resolved
modules/programs/pay-respects.nix Outdated Show resolved Hide resolved
@ALameLlama ALameLlama force-pushed the feat/add-pay-respects branch 2 times, most recently from 47825c6 to b32d424 Compare December 18, 2024 04:31
@ALameLlama
Copy link
Contributor Author

Thanks for taking the time to do a code review, I've made those changes :D

Add pay-respects module including shell integration support for bash,
zsh, fish and nushell.
@rycee rycee force-pushed the feat/add-pay-respects branch from b32d424 to db9a98e Compare December 21, 2024 17:13
@rycee rycee merged commit db9a98e into nix-community:master Dec 21, 2024
3 checks passed
@rycee
Copy link
Member

rycee commented Dec 21, 2024

Thanks! Merged to master now 🙂

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.

4 participants