-
Notifications
You must be signed in to change notification settings - Fork 18
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
feat: pass SRI hashes for Git sources #87
base: master
Are you sure you want to change the base?
Conversation
This way, we avoid using `fetchGit` unlocked and we get better properties on caching, etc. Signed-off-by: Raito Bezarius <[email protected]>
ee043ab
to
864a972
Compare
@@ -6,6 +6,25 @@ pub struct PrefetchInfo { | |||
hash: String, | |||
} | |||
|
|||
pub async fn hash_to_sri(hash_type: &str, hash: String) -> Result<String> { | |||
let output = tokio::process::Command::new("nix") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will this require a specific minimum nix version? e.g. 2.4 and newer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only if we shell out, if we use Tvix, not really.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If tvix manages to publish these operations in some useable format. I've some random bits and pieces from other nix-related projects that do this. Since I also want to remove reliance on nix-prefetch-url
entirely and add that to npins.
(This is missing handling |
I would love to see this be merged. What's left to be done here? |
From what I can see:
other then that it's probably good to go. |
I am opening this to leave it as an example (and because I need it), I may not have time to polish it for upstream inclusion, feel free to close it if you are not interested.
Could fix #71.