-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
Adding the sed replacement sd, written in rust #54761
Conversation
Without actually looking at the code, you would need to put the file in it's own directory and not just as Secondly you need to add a line to the And thirdly you should amend your commit and push it with a message like: |
And another thing, you have to add yourself to the file |
I see, thanks @etu I've added myself as a maintainer and I'll be re-working this PR soon. |
I wonder if |
name = "sd-${version}"; | ||
version = "0.4.3"; | ||
|
||
cargoSha256 = "08zzn3a32xfjkmpawcjppn1mr26ws3iv40cckiz8ldz4qc8y9gdh"; |
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 hash is from the exa
package. Should be changed to the correct value that you can get from a failed build, like described in the manual.
owner = "chmln"; | ||
repo = "sd"; | ||
rev = "v${version}"; | ||
sha256 = "0jy11a3xfnfnmyw1kjmv4ffavhijs8c940kw24vafklnacx5n88m"; |
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 hash is also from the exa
package. You should be able to get the correct hash with this command:
nix run nixpkgs.nix-prefetch-git -c nix-prefetch-git https://github.com/chmln/sd 0.4.3
}; | ||
|
||
nativeBuildInputs = [ cmake pkgconfig perl ]; | ||
buildInputs = [ zlib ] |
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.
Neither of nativeBuildInputs
or buildInputs
are needed for sd.
libiconv darwin.apple_sdk.frameworks.Security ] | ||
; | ||
|
||
postInstall = '' |
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 is also from exa
and should be removed.
''; | ||
|
||
# Some tests fail, but Travis ensures a proper build | ||
doCheck = false; |
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.
Not needed for sd.
with rustPlatform; | ||
|
||
buildRustPackage rec { | ||
name = "sd-${version}"; |
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.
Could use pname = "sd"
instead.
Thanks for the PR! |
Motivation for this change
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)