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
sd: init at 0.5.0 #60241
sd: init at 0.5.0 #60241
Conversation
sha256 = "1y44qizciir75d1srwm1mlskhflab2b6153d19vblw410in82f5d"; | ||
}; | ||
|
||
cargoSha256 = "1gls68lw8a2c3gsav70l2wasrgav68q5w1nf50jsrbqq9kb4i7nb"; |
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.
I get 0lg8lm4rv9ai61621l6pm19hnj7xzbiaj9v46ihfij1bw7ii54v4
instead.
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.
is 0lg8lm4rv9ai61621l6pm19hnj7xzbiaj9v46ihfij1bw7ii54v4
kernel-specific or something? I'm currently building this on darwin, and changing either the sha256
or the cargoSha256
to 01g...
results in a sha mismatch and failed build.
If this is supposed to be the cargoSha256, is there a way I can check this via command line (like with nix-prefetch-github
)?
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.
Does it build for you now?
Yeah, I'm talking about cargoSha256
.
I don't know what the reason could be, I'm building on NixOS.
I don't think there's a command to check the hash.
@Mic92 Do you know what cargoSha256
depends on? Can we build the same Rust derivations on Linux and MacOS?
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.
Yeah, it builds for me. ./result/bin/sd
works fine too. I assume it fails on NixOS?
I can keep this open and test on a linux machine this weekend.
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.
Your new comit works, but only with my hash.
We could use if stdenv.isDarwin then "yourHash" else "myHash"
as a workaround.
But we should ask someone who knows about the nixpkgs rust infrastructure whether that's normal.
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.
This definitely shouldn't happen. The hash is computed from the crate name, version, features, and the (transitive) dependencies:
metadata = builtins.substring 0 10 (builtins.hashString "sha256" (crateName + "-" + crateVersion + "___" + toString crateFeatures + "___" + depsMetadata )); |
Cargo.lock
should fix all dependencies. I think it is more useful to find the source of this difference.
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.
BTW, builds fine on my NixOS machine with the cargoSha256 in the PR (1gls68lw8a2c3gsav70l2wasrgav68q5w1nf50jsrbqq9kb4i7nb
).
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.
Hmm, yeah it does work now. I wonder what I had changed.
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.
Yup, double-checked on darwin and (arch) linux, both work fine.
@Amar1729 your commit msg should be formatted like
|
@GrahamcOfBorg build sd |
26da70f
to
2df2038
Compare
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.
Looks good, but I think you got the commit message mixed up. It should be: sd: init at 0.5.0
:-)
welp that's embarrassing :/ |
Motivation for this change
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)Note on the relevant documentation -
sd
doesn't seem to buildman
pages yet