Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Add new step: GNU Guix #982

Closed
wants to merge 3 commits into from
Closed

Add new step: GNU Guix #982

wants to merge 3 commits into from

Conversation

JamesClarke7283
Copy link

@JamesClarke7283 JamesClarke7283 commented Jul 28, 2022

Adds support for GNU Guix package manager.

Closes #979
Needs better error handling/messages. But it functions when ive tested it & if the step fails, the program continues as normal.
No custom error messages, happen yet, at the moment error output is just the default from the package manager. see the prior mentioned issue for more details.

I have run the checks, on check that failed, was cargo clippy. because of a unneeded return statement, i will fix that warning later. Sorry if my code is not great, i have no experience with rust, until now. Feedback on what to improve would be much appreciated.

Standards checklist:

  • The PR title is descriptive.
  • The code compiles (cargo build)
  • The code passes rustfmt (cargo fmt)
  • The code passes clippy (cargo clippy)
  • The code passes tests (cargo test)
  • Optional: I have tested the code myself
    • I also tested that Topgrade skips the step where needed

Features

  • Update guix (both the database, and the guix binary itself)
  • Upgrade guix packages

@JamesClarke7283 JamesClarke7283 changed the title Added new step: guix (basic support) Added new step: GNU Guix Jul 28, 2022
@JamesClarke7283 JamesClarke7283 changed the title Added new step: GNU Guix Add new step: GNU Guix Jul 28, 2022
@JamesClarke7283 JamesClarke7283 changed the title Add new step: GNU Guix Add new step: GNU Guix package manager Jul 28, 2022
@JamesClarke7283 JamesClarke7283 changed the title Add new step: GNU Guix package manager Add new step: GNU Guix Jul 28, 2022
@JamesClarke7283
Copy link
Author

Cargo Clippy gives no warnings caused by my changes (checked upstream master and was consistent with that), and I removed the custom Error/Messages handling item, from the requirements.

Had help from Leo Spratt (@enchant94) who knows a lot more about rust specific best practices.

@strangelittlemonkey
Copy link
Contributor

Please remove the swp file that was accidentally added to the commit.

@JamesClarke7283
Copy link
Author

JamesClarke7283 commented Aug 20, 2022

Please remove the swp file that was accidentally added to the commit.

Thanks for letting me know, do let me know if anything needs to be improved, I had no experience with programming in Rust before this, so I made the decision to not add the extra messages as a feature, initially.

Do you think it would be worthwhile to add a printout when guix is not found, saying what command to run to install the GNU Guix package manager?

If so, Would the method to install GNU Guix stated here, be too long?
https://guix.gnu.org/manual/en/html_node/Binary-Installation.html#example

@JamesClarke7283
Copy link
Author

Does anything else need doing for this to be ready for merge?

s34m added a commit to s34m/topgrade that referenced this pull request Oct 10, 2022
* Added new step: guix (basic support)

* Fixed clippy errors and better practice, Thanks To guidence from @enchant97 <Leo Spratt>

* Removed accidental swp file, as pointed out by @strangelittlemonkey in pull request r-darwish#982

Authored-by: James Clarke <[email protected]>
Approved-by: Thomas Schönauer <[email protected]>
@s34m
Copy link

s34m commented Oct 10, 2022

Merged at new fork because of inactivity by maintainer.
Link: s34m#1

@JamesClarke7283 JamesClarke7283 closed this by deleting the head repository Nov 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support GNU Guix: distro independent, declarative
3 participants