Merge pull request #82982 from cole-h/rust-cleanup
improve robustness of various Rust packages
This commit is contained in:
commit
ee58c7a363
10 changed files with 15 additions and 17 deletions
|
@ -15,7 +15,7 @@ rustPlatform.buildRustPackage rec {
|
|||
|
||||
installPhase = ''
|
||||
mkdir -p $out/lib
|
||||
cp target/release/librustzcash.a $out/lib/
|
||||
cp $releaseDir/librustzcash.a $out/lib/
|
||||
mkdir -p $out/include
|
||||
cp librustzcash/include/librustzcash.h $out/include/
|
||||
'';
|
||||
|
|
|
@ -95,7 +95,7 @@ rustPlatform.buildRustPackage rec {
|
|||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
install -D target/release/alacritty $out/bin/alacritty
|
||||
install -D $releaseDir/alacritty $out/bin/alacritty
|
||||
|
||||
'' + (
|
||||
if stdenv.isDarwin then ''
|
||||
|
|
|
@ -19,7 +19,7 @@ buildRustPackage rec {
|
|||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp -p target/release/cfdyndns $out/bin/
|
||||
cp -p $releaseDir/cfdyndns $out/bin/
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, fetchFromGitHub, rustPlatform, pkgconfig, openssl, darwin }:
|
||||
{ stdenv, fetchFromGitHub, installShellFiles, rustPlatform, pkgconfig, openssl, darwin }:
|
||||
|
||||
with rustPlatform;
|
||||
|
||||
|
@ -15,7 +15,7 @@ buildRustPackage rec {
|
|||
|
||||
cargoSha256 = "0vcg2pl0s329fr8p23pwdx2jy7qahbr7n337ib61f69aaxi1xmq0";
|
||||
|
||||
nativeBuildInputs = [ pkgconfig ];
|
||||
nativeBuildInputs = [ pkgconfig installShellFiles ];
|
||||
buildInputs = [ openssl ]
|
||||
++ stdenv.lib.optionals stdenv.isDarwin [
|
||||
darwin.apple_sdk.frameworks.Security
|
||||
|
@ -23,8 +23,7 @@ buildRustPackage rec {
|
|||
|
||||
outputs = [ "out" "man" ];
|
||||
preFixup = ''
|
||||
mkdir -p "$man/man/man1"
|
||||
cp target/release/build/git-ignore-*/out/git-ignore.1 "$man/man/man1/"
|
||||
installManPage $releaseDir/build/git-ignore-*/out/git-ignore.1
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
|
|
@ -32,7 +32,7 @@ rustPlatform.buildRustPackage rec {
|
|||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp -p target/release/racerd $out/bin/
|
||||
cp -p $releaseDir/racerd $out/bin/
|
||||
wrapProgram $out/bin/racerd --set-default RUST_SRC_PATH "$RUST_SRC_PATH"
|
||||
'';
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ rustPlatform.buildRustPackage rec {
|
|||
|
||||
postInstall = ''
|
||||
# install shell completion files
|
||||
OUT_DIR=target/release/build/broot-*/out
|
||||
OUT_DIR=$releaseDir/build/broot-*/out
|
||||
|
||||
installShellCompletion --bash $OUT_DIR/{br,broot}.bash
|
||||
installShellCompletion --fish $OUT_DIR/{br,broot}.fish
|
||||
|
|
|
@ -18,9 +18,8 @@ rustPlatform.buildRustPackage rec {
|
|||
preFixup = ''
|
||||
installManPage "$src/doc/fd.1"
|
||||
|
||||
(cd target/release/build/fd-find-*/out
|
||||
installShellCompletion fd.{bash,fish}
|
||||
installShellCompletion --zsh _fd)
|
||||
installShellCompletion $releaseDir/build/fd-find-*/out/fd.{bash,fish}
|
||||
installShellCompletion --zsh $releaseDir/build/fd-find-*/out/_fd
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
|
|
|
@ -19,7 +19,7 @@ rustPlatform.buildRustPackage rec {
|
|||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
postInstall = ''
|
||||
installShellCompletion target/release/build/lsd-*/out/{_lsd,lsd.{bash,fish}}
|
||||
installShellCompletion $releaseDir/build/lsd-*/out/{_lsd,lsd.{bash,fish}}
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
|
|
@ -24,7 +24,7 @@ buildRustPackage rec {
|
|||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
install -D target/release/tox-node $out/bin/tox-node
|
||||
install -D $releaseDir/tox-node $out/bin/tox-node
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
|
|
@ -30,9 +30,9 @@ rustPlatform.buildRustPackage rec {
|
|||
++ (stdenv.lib.optional stdenv.isDarwin Security);
|
||||
|
||||
preFixup = ''
|
||||
(cd target/release/build/ripgrep-*/out
|
||||
installManPage rg.1
|
||||
installShellCompletion rg.{bash,fish})
|
||||
installManPage $releaseDir/build/ripgrep-*/out/rg.1
|
||||
|
||||
installShellCompletion $releaseDir/build/ripgrep-*/out/rg.{bash,fish}
|
||||
installShellCompletion --zsh "$src/complete/_rg"
|
||||
'';
|
||||
|
||||
|
|
Loading…
Reference in a new issue