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

Compute hash of git and CRAN archive packages locally if nix is installed #221

Merged
merged 32 commits into from
Jun 30, 2024

Conversation

b-rodrigues
Copy link
Contributor

WIP

Kinda works, but snapshot tests for rix/ don't pass anymore, and weirdly enough it seems unrelated

@philipp-baumann
Copy link
Collaborator

> devtools::load_all(".")
ℹ Loading rix
> url <- paste0("https://github.com/rap4all/housing/", "archive/",
+   "1c860959310b80e67c41f7bbdc3e84cef00df18e", ".tar.gz")
> 
> hash_url(url = url)
$sri_hash
[1] "sha256-s4KGtfKQ7hL0sfDhGb4BpBpspfefBN6hf+XlslqyEn4="

$deps
[1] "dplyr ggplot2 janitor purrr readxl rlang rvest stringr tidyr"

@philipp-baumann
Copy link
Collaborator

philipp-baumann commented Jun 28, 2024

Todos

  • Remove git2r
  • add an option via options(rix.sri_hash) to demand local or remote hashing of url resources. Possible values are "locally" and "api_server".One should have the option to choose a plumber API server hashing or do the same locally when nix is installed.
  • Redesign the interface

@b-rodrigues
Copy link
Contributor Author

The default behavior should be to hash locally if nix-hash is present, otherwise use the online service and add message to inform the user, what do you think ?

@philipp-baumann
Copy link
Collaborator

NixOS/nix#7690

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.

2 participants