uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
47
pkgs/development/tools/rust/bindgen/default.nix
Normal file
47
pkgs/development/tools/rust/bindgen/default.nix
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
{ rust-bindgen-unwrapped, zlib, bash, runCommand, runCommandCC }:
|
||||
let
|
||||
clang = rust-bindgen-unwrapped.clang;
|
||||
self = runCommand "rust-bindgen-${rust-bindgen-unwrapped.version}"
|
||||
{
|
||||
#for substituteAll
|
||||
inherit bash;
|
||||
unwrapped = rust-bindgen-unwrapped;
|
||||
libclang = clang.cc.lib;
|
||||
meta = rust-bindgen-unwrapped.meta // {
|
||||
longDescription = rust-bindgen-unwrapped.meta.longDescription + ''
|
||||
This version of bindgen is wrapped with the required compiler flags
|
||||
required to find the c and c++ standard libary, as well as the libraries
|
||||
specified in the buildInputs of your derivation.
|
||||
'';
|
||||
};
|
||||
passthru.tests = {
|
||||
simple-c = runCommandCC "simple-c-bindgen-tests" { } ''
|
||||
echo '#include <stdlib.h>' > a.c
|
||||
${self}/bin/bindgen a.c --whitelist-function atoi | tee output
|
||||
grep atoi output
|
||||
touch $out
|
||||
'';
|
||||
simple-cpp = runCommandCC "simple-cpp-bindgen-tests" { } ''
|
||||
echo '#include <cmath>' > a.cpp
|
||||
${self}/bin/bindgen a.cpp --whitelist-function erf -- -xc++ | tee output
|
||||
grep erf output
|
||||
touch $out
|
||||
'';
|
||||
with-lib = runCommandCC "zlib-bindgen-tests" { buildInputs = [ zlib ]; } ''
|
||||
echo '#include <zlib.h>' > a.c
|
||||
${self}/bin/bindgen a.c --whitelist-function compress | tee output
|
||||
grep compress output
|
||||
touch $out
|
||||
'';
|
||||
};
|
||||
}
|
||||
# if you modify the logic to find the right clang flags, also modify rustPlatform.bindgenHook
|
||||
''
|
||||
mkdir -p $out/bin
|
||||
export cincludes="$(< ${clang}/nix-support/cc-cflags) $(< ${clang}/nix-support/libc-cflags)"
|
||||
export cxxincludes="$(< ${clang}/nix-support/libcxx-cxxflags)"
|
||||
substituteAll ${./wrapper.sh} $out/bin/bindgen
|
||||
chmod +x $out/bin/bindgen
|
||||
'';
|
||||
in
|
||||
self
|
||||
53
pkgs/development/tools/rust/bindgen/unwrapped.nix
Normal file
53
pkgs/development/tools/rust/bindgen/unwrapped.nix
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
{ lib, fetchFromGitHub, rustPlatform, clang, rustfmt
|
||||
, runtimeShell
|
||||
, bash
|
||||
}:
|
||||
let
|
||||
# bindgen hardcodes rustfmt outputs that use nightly features
|
||||
rustfmt-nightly = rustfmt.override { asNightly = true; };
|
||||
in rustPlatform.buildRustPackage rec {
|
||||
pname = "rust-bindgen-unwrapped";
|
||||
version = "0.59.2";
|
||||
|
||||
RUSTFLAGS = "--cap-lints warn"; # probably OK to remove after update
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "rust-lang";
|
||||
repo = "rust-bindgen";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-bJYdyf5uZgWe7fQ80/3QsRV0qyExYn6P9UET3tzwPFs=";
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-RKZY5vf6CSFaKweuuNkeFF0ZXlSUibAkcL/YhkE0MoQ=";
|
||||
|
||||
buildInputs = [ clang.cc.lib ];
|
||||
|
||||
preConfigure = ''
|
||||
export LIBCLANG_PATH="${clang.cc.lib}/lib"
|
||||
'';
|
||||
|
||||
doCheck = true;
|
||||
checkInputs = [ clang ];
|
||||
|
||||
RUSTFMT = "${rustfmt-nightly}/bin/rustfmt";
|
||||
|
||||
preCheck = ''
|
||||
# for the ci folder, notably
|
||||
patchShebangs .
|
||||
'';
|
||||
|
||||
passthru = { inherit clang; };
|
||||
|
||||
meta = with lib; {
|
||||
description = "Automatically generates Rust FFI bindings to C (and some C++) libraries";
|
||||
longDescription = ''
|
||||
Bindgen takes a c or c++ header file and turns them into
|
||||
rust ffi declarations.
|
||||
'';
|
||||
homepage = "https://github.com/rust-lang/rust-bindgen";
|
||||
license = with licenses; [ bsd3 ];
|
||||
maintainers = with maintainers; [ johntitor ralith ];
|
||||
mainProgram = "bindgen";
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
36
pkgs/development/tools/rust/bindgen/wrapper.sh
Executable file
36
pkgs/development/tools/rust/bindgen/wrapper.sh
Executable file
|
|
@ -0,0 +1,36 @@
|
|||
#!@bash@/bin/bash
|
||||
sep='--' # whether to add -- before new options
|
||||
cxx=0 # whether cxx was explicitly requested
|
||||
lastWasx=0 # whether the last argument passed was -x
|
||||
for e in "$@"; do
|
||||
if [[ "$e" == "--" ]]; then
|
||||
sep=
|
||||
fi;
|
||||
if [[ "$sep" == "" ]]; then
|
||||
# we look for -x c++ after -- only
|
||||
if [[ "$e" == "-x" ]]; then
|
||||
lastWasx=1
|
||||
fi;
|
||||
if [[ $lastWasx -eq 1 && "$e" == "c++" ]]; then
|
||||
lastWasx=0
|
||||
cxx=1
|
||||
fi;
|
||||
if [[ "$e" == "-xc++" || "$e" == -std=c++* ]]; then
|
||||
cxx=1
|
||||
fi;
|
||||
fi;
|
||||
done;
|
||||
cxxflags=
|
||||
if [[ $cxx -eq 1 ]]; then
|
||||
cxxflags="@cxxincludes@"
|
||||
fi;
|
||||
if [[ -n "$NIX_DEBUG" ]]; then
|
||||
set -x;
|
||||
fi;
|
||||
export LIBCLANG_PATH="@libclang@/lib"
|
||||
# shellcheck disable=SC2086
|
||||
# cxxflags and NIX_CFLAGS_COMPILE should be word-split
|
||||
exec -a "$0" @unwrapped@/bin/bindgen "$@" $sep $cxxflags @cincludes@ $NIX_CFLAGS_COMPILE
|
||||
# note that we add the flags after $@ which is incorrect. This is only for the sake
|
||||
# of simplicity.
|
||||
|
||||
26
pkgs/development/tools/rust/bootimage/default.nix
Normal file
26
pkgs/development/tools/rust/bootimage/default.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, rustPlatform
|
||||
, fetchFromGitHub
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "bootimage";
|
||||
version = "0.10.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "rust-osdev";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "12p18mk3l473is3ydv3zmn6s7ck8wgjwavllimcpja3yjilxm3zg";
|
||||
};
|
||||
|
||||
cargoSha256 = "03jximwqgjq7359c5mxbyfja2d04y57h34f87aby8jy0lz99jy2x";
|
||||
|
||||
meta = with lib; {
|
||||
description = "Creates a bootable disk image from a Rust OS kernel.";
|
||||
homepage = "https://github.com/rust-osdev/bootimage";
|
||||
license = with licenses; [ asl20 mit ];
|
||||
maintainers = with maintainers; [ dbeckwith ];
|
||||
};
|
||||
}
|
||||
22
pkgs/development/tools/rust/cargo-all-features/default.nix
Normal file
22
pkgs/development/tools/rust/cargo-all-features/default.nix
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
{ lib, rustPlatform, fetchFromGitHub }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "cargo-all-features";
|
||||
version = "1.6.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "frewsxcv";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "1pdr34ygc0qmh0dyrw1qcrh1vgg9jv9lm6ypl3fgjzz7npdj1dw4";
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-BsRJo55gYT8OkDUBepWq48sW7QPt5OZkm8RR9f7HqZY=";
|
||||
|
||||
meta = with lib; {
|
||||
description = "A Cargo subcommand to build and test all feature flag combinations";
|
||||
homepage = "https://github.com/frewsxcv/cargo-all-features";
|
||||
license = with licenses; [ asl20 /* or */ mit ];
|
||||
maintainers = with maintainers; [ figsoda ];
|
||||
};
|
||||
}
|
||||
28
pkgs/development/tools/rust/cargo-asm/default.nix
Normal file
28
pkgs/development/tools/rust/cargo-asm/default.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
{ lib, stdenv, fetchFromGitHub, rustPlatform, Security }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "cargo-asm";
|
||||
version = "2019-12-24";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "gnzlbg";
|
||||
repo = "cargo-asm";
|
||||
rev = "577f890ebd4a09c8265710261e976fe7bfce8668";
|
||||
sha256 = "1f6kzsmxgdms9lq5z9ynnmxymk9k2lzlp3caa52wqjvdw1grw0rb";
|
||||
};
|
||||
|
||||
cargoSha256 = "1c22aal3i7zbyxr2c41fimfx13fwp9anmhh641951yd7cqb8xij2";
|
||||
|
||||
buildInputs = lib.optional stdenv.isDarwin Security;
|
||||
|
||||
# Test checks against machine code output, which fails with some
|
||||
# LLVM/compiler versions.
|
||||
doCheck = false;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Display the assembly or LLVM-IR generated for Rust source code";
|
||||
homepage = "https://github.com/gnzlbg/cargo-asm";
|
||||
license = licenses.mit;
|
||||
maintainers = [ ];
|
||||
};
|
||||
}
|
||||
24
pkgs/development/tools/rust/cargo-binutils/default.nix
Normal file
24
pkgs/development/tools/rust/cargo-binutils/default.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{ lib, rustPlatform, fetchCrate }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "cargo-binutils";
|
||||
version = "0.3.3";
|
||||
|
||||
src = fetchCrate {
|
||||
inherit pname version;
|
||||
sha256 = "sha256-1sJ+vi78lZsYEQBDyUzifdiU47R1Z6Y8ejNI9h5U+Ao=";
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-kZhxKwSEI24LNJ9lPPjtX5etE0XeqaVN7h3HTzpoAY0=";
|
||||
|
||||
meta = with lib; {
|
||||
description = "Cargo subcommands to invoke the LLVM tools shipped with the Rust toolchain";
|
||||
longDescription = ''
|
||||
In order for this to work, you either need to run `rustup component add llvm-tools-preview` or install the `llvm-tools-preview` component using your Nix library (e.g. nixpkgs-mozilla, or rust-overlay)
|
||||
'';
|
||||
homepage = "https://github.com/rust-embedded/cargo-binutils";
|
||||
changelog = "https://github.com/rust-embedded/cargo-binutils/blob/v${version}/CHANGELOG.md";
|
||||
license = with licenses; [ asl20 mit ];
|
||||
maintainers = with maintainers; [ stupremee ];
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
diff --git a/src/toolchains.rs b/src/toolchains.rs
|
||||
index 4d85e7c..b1353c6 100644
|
||||
--- a/src/toolchains.rs
|
||||
+++ b/src/toolchains.rs
|
||||
@@ -259,6 +259,8 @@ impl Toolchain {
|
||||
.map_err(InstallError::Download)?;
|
||||
}
|
||||
|
||||
+ nix_patchelf(tmpdir.path().to_path_buf())
|
||||
+ .expect("failed to patch toolchain for NixOS");
|
||||
fs::rename(tmpdir.into_path(), dest).map_err(InstallError::Move)?;
|
||||
|
||||
Ok(())
|
||||
@@ -557,3 +559,42 @@ pub(crate) fn download_tarball(
|
||||
}
|
||||
download_tar_gz(client, name, &format!("{}.gz", url,), strip_prefix, dest)
|
||||
}
|
||||
+
|
||||
+fn nix_patchelf(mut toolchain_path: PathBuf) -> Result<(), Error> {
|
||||
+ toolchain_path.push("bin");
|
||||
+
|
||||
+ for entry in toolchain_path.read_dir()? {
|
||||
+ let entry = entry?;
|
||||
+ if !entry.file_type()?.is_file() {
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ eprintln!("info: you seem to be running NixOS. Attempting to patch {}",
|
||||
+ entry.path().to_str().unwrap());
|
||||
+ let _ = ::std::process::Command::new("@patchelf@/bin/patchelf")
|
||||
+ .arg("--set-interpreter")
|
||||
+ .arg("@dynamicLinker@")
|
||||
+ .arg(entry.path())
|
||||
+ .output();
|
||||
+ }
|
||||
+
|
||||
+ toolchain_path.pop();
|
||||
+ toolchain_path.push("lib");
|
||||
+
|
||||
+ for entry in toolchain_path.read_dir()? {
|
||||
+ let entry = entry?;
|
||||
+ if !entry.file_type()?.is_file() {
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ eprintln!("info: you seem to be running NixOS. Attempting to patch {}",
|
||||
+ entry.path().to_str().unwrap());
|
||||
+ let _ = ::std::process::Command::new("@patchelf@/bin/patchelf")
|
||||
+ .arg("--set-rpath")
|
||||
+ .arg("@libPath@")
|
||||
+ .arg(entry.path())
|
||||
+ .output();
|
||||
+ }
|
||||
+
|
||||
+ Ok(())
|
||||
+}
|
||||
56
pkgs/development/tools/rust/cargo-bisect-rustc/default.nix
Normal file
56
pkgs/development/tools/rust/cargo-bisect-rustc/default.nix
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
{ stdenv
|
||||
, lib
|
||||
, fetchFromGitHub
|
||||
, rustPlatform
|
||||
, pkg-config
|
||||
, openssl
|
||||
, runCommand
|
||||
, patchelf
|
||||
, zlib
|
||||
, Security
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "cargo-bisect-rustc";
|
||||
version = "0.6.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "rust-lang";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
hash = "sha256-LEmILWVU6hbh2FmdnQVV1Ob2MQvj+/lCr1hdRoTIOkI=";
|
||||
};
|
||||
|
||||
patches =
|
||||
let
|
||||
patchelfPatch = runCommand "0001-dynamically-patchelf-binaries.patch" {
|
||||
CC = stdenv.cc;
|
||||
patchelf = patchelf;
|
||||
libPath = "$ORIGIN/../lib:${lib.makeLibraryPath [ zlib ]}";
|
||||
}
|
||||
''
|
||||
export dynamicLinker=$(cat $CC/nix-support/dynamic-linker)
|
||||
substitute ${./0001-dynamically-patchelf-binaries.patch} $out \
|
||||
--subst-var patchelf \
|
||||
--subst-var dynamicLinker \
|
||||
--subst-var libPath
|
||||
'';
|
||||
in
|
||||
lib.optionals stdenv.isLinux [ patchelfPatch ];
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = [
|
||||
openssl
|
||||
] ++ lib.optionals stdenv.isDarwin [
|
||||
Security
|
||||
];
|
||||
|
||||
cargoSha256 = "Ls51DQ0yScRhpkuEInCfR45+/WeaUoG935w4BJvwSRk=";
|
||||
|
||||
meta = with lib; {
|
||||
description = "Bisects rustc, either nightlies or CI artifacts";
|
||||
homepage = "https://github.com/rust-lang/${pname}";
|
||||
license = with licenses; [ asl20 mit ];
|
||||
maintainers = with maintainers; [ davidtwco ];
|
||||
};
|
||||
}
|
||||
26
pkgs/development/tools/rust/cargo-bitbake/default.nix
Normal file
26
pkgs/development/tools/rust/cargo-bitbake/default.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{ lib, pkg-config, rustPlatform, fetchFromGitHub, openssl }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "cargo-bitbake";
|
||||
version = "0.3.16";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "meta-rust";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-+ovC4nZwHzf9hjfv2LcnTztM2m++tpC3mUSS/I0l6Ck=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = [ openssl ];
|
||||
|
||||
cargoSha256 = "sha256-LYdQ0FLfCopY8kPTCmiW0Qyx6sHA4nlb+hK9hXezGLg=";
|
||||
|
||||
meta = with lib; {
|
||||
description = "Cargo extension that can generate BitBake recipes utilizing the classes from meta-rust";
|
||||
homepage = "https://github.com/meta-rust/cargo-bitbake";
|
||||
license = with licenses; [ mit asl20 ];
|
||||
maintainers = with maintainers; [ rvarago ];
|
||||
platforms = [ "x86_64-linux" ];
|
||||
};
|
||||
}
|
||||
24
pkgs/development/tools/rust/cargo-bloat/default.nix
Normal file
24
pkgs/development/tools/rust/cargo-bloat/default.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{ lib, rustPlatform, fetchFromGitHub }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "cargo-bloat";
|
||||
version = "0.11.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "RazrFalcon";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-UzMo+IqoP3GpGu7tWlrkEU1YpVLgEL7UwIU1hPmoJNg=";
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-w3+ypGuVRGwC94zj/OaDUUoUbBnepGHvqulY4IVIsfo=";
|
||||
|
||||
meta = with lib; {
|
||||
description = "A tool and Cargo subcommand that helps you find out what takes most of the space in your executable";
|
||||
homepage = "https://github.com/RazrFalcon/cargo-bloat";
|
||||
license = licenses.mit;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ xrelkd ];
|
||||
};
|
||||
}
|
||||
|
||||
751
pkgs/development/tools/rust/cargo-bolero/Cargo.lock
generated
Normal file
751
pkgs/development/tools/rust/cargo-bolero/Cargo.lock
generated
Normal file
|
|
@ -0,0 +1,751 @@
|
|||
# This file is automatically @generated by Cargo.
|
||||
# It is not intended for manual editing.
|
||||
version = 3
|
||||
|
||||
[[package]]
|
||||
name = "addr2line"
|
||||
version = "0.17.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b9ecd88a8c8378ca913a680cd98f0f13ac67383d35993f86c90a70e3f137816b"
|
||||
dependencies = [
|
||||
"gimli",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "adler"
|
||||
version = "1.0.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe"
|
||||
|
||||
[[package]]
|
||||
name = "ansi_term"
|
||||
version = "0.12.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2"
|
||||
dependencies = [
|
||||
"winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "anyhow"
|
||||
version = "1.0.57"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "08f9b8508dccb7687a1d6c4ce66b2b0ecef467c94667de27d8d7fe1f8d2a9cdc"
|
||||
|
||||
[[package]]
|
||||
name = "atty"
|
||||
version = "0.2.14"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8"
|
||||
dependencies = [
|
||||
"hermit-abi",
|
||||
"libc",
|
||||
"winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "autocfg"
|
||||
version = "1.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
|
||||
|
||||
[[package]]
|
||||
name = "backtrace"
|
||||
version = "0.3.65"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "11a17d453482a265fd5f8479f2a3f405566e6ca627837aaddb85af8b1ab8ef61"
|
||||
dependencies = [
|
||||
"addr2line",
|
||||
"cc",
|
||||
"cfg-if 1.0.0",
|
||||
"libc",
|
||||
"miniz_oxide",
|
||||
"object",
|
||||
"rustc-demangle",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "bit-set"
|
||||
version = "0.5.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6e11e16035ea35e4e5997b393eacbf6f63983188f7a2ad25bfb13465f5ad59de"
|
||||
dependencies = [
|
||||
"bit-vec",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "bit-vec"
|
||||
version = "0.6.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb"
|
||||
|
||||
[[package]]
|
||||
name = "bitflags"
|
||||
version = "1.3.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
|
||||
|
||||
[[package]]
|
||||
name = "bolero"
|
||||
version = "0.6.2"
|
||||
dependencies = [
|
||||
"bolero-afl",
|
||||
"bolero-engine",
|
||||
"bolero-generator",
|
||||
"bolero-honggfuzz",
|
||||
"bolero-libfuzzer",
|
||||
"cfg-if 1.0.0",
|
||||
"libtest-mimic",
|
||||
"rand",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "bolero-afl"
|
||||
version = "0.6.2"
|
||||
dependencies = [
|
||||
"bolero-engine",
|
||||
"cc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "bolero-engine"
|
||||
version = "0.6.2"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"backtrace",
|
||||
"bolero-generator",
|
||||
"lazy_static",
|
||||
"pretty-hex",
|
||||
"rand",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "bolero-generator"
|
||||
version = "0.6.2"
|
||||
dependencies = [
|
||||
"bolero-generator-derive",
|
||||
"byteorder",
|
||||
"either",
|
||||
"rand",
|
||||
"rand_core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "bolero-generator-derive"
|
||||
version = "0.6.2"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "bolero-honggfuzz"
|
||||
version = "0.6.2"
|
||||
dependencies = [
|
||||
"bolero-engine",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "bolero-libfuzzer"
|
||||
version = "0.6.2"
|
||||
dependencies = [
|
||||
"bolero-engine",
|
||||
"cc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "byteorder"
|
||||
version = "1.4.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610"
|
||||
|
||||
[[package]]
|
||||
name = "cargo-bolero"
|
||||
version = "0.6.2"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bit-set",
|
||||
"bolero",
|
||||
"bolero-afl",
|
||||
"bolero-honggfuzz",
|
||||
"humantime",
|
||||
"rustc_version",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"structopt",
|
||||
"tempfile",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cc"
|
||||
version = "1.0.73"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11"
|
||||
|
||||
[[package]]
|
||||
name = "cfg-if"
|
||||
version = "0.1.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822"
|
||||
|
||||
[[package]]
|
||||
name = "cfg-if"
|
||||
version = "1.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
|
||||
|
||||
[[package]]
|
||||
name = "clap"
|
||||
version = "2.34.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c"
|
||||
dependencies = [
|
||||
"ansi_term",
|
||||
"atty",
|
||||
"bitflags",
|
||||
"strsim",
|
||||
"textwrap",
|
||||
"unicode-width",
|
||||
"vec_map",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "crossbeam-channel"
|
||||
version = "0.4.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b153fe7cbef478c567df0f972e02e6d736db11affe43dfc9c56a9374d1adfb87"
|
||||
dependencies = [
|
||||
"crossbeam-utils 0.7.2",
|
||||
"maybe-uninit",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "crossbeam-channel"
|
||||
version = "0.5.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5aaa7bd5fb665c6864b5f963dd9097905c54125909c7aa94c9e18507cdbe6c53"
|
||||
dependencies = [
|
||||
"cfg-if 1.0.0",
|
||||
"crossbeam-utils 0.8.8",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "crossbeam-deque"
|
||||
version = "0.8.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6455c0ca19f0d2fbf751b908d5c55c1f5cbc65e03c4225427254b46890bdde1e"
|
||||
dependencies = [
|
||||
"cfg-if 1.0.0",
|
||||
"crossbeam-epoch",
|
||||
"crossbeam-utils 0.8.8",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "crossbeam-epoch"
|
||||
version = "0.9.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1145cf131a2c6ba0615079ab6a638f7e1973ac9c2634fcbeaaad6114246efe8c"
|
||||
dependencies = [
|
||||
"autocfg",
|
||||
"cfg-if 1.0.0",
|
||||
"crossbeam-utils 0.8.8",
|
||||
"lazy_static",
|
||||
"memoffset",
|
||||
"scopeguard",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "crossbeam-utils"
|
||||
version = "0.7.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8"
|
||||
dependencies = [
|
||||
"autocfg",
|
||||
"cfg-if 0.1.10",
|
||||
"lazy_static",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "crossbeam-utils"
|
||||
version = "0.8.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0bf124c720b7686e3c2663cf54062ab0f68a88af2fb6a030e87e30bf721fcb38"
|
||||
dependencies = [
|
||||
"cfg-if 1.0.0",
|
||||
"lazy_static",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "either"
|
||||
version = "1.6.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457"
|
||||
|
||||
[[package]]
|
||||
name = "fastrand"
|
||||
version = "1.7.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c3fcf0cee53519c866c09b5de1f6c56ff9d647101f81c1964fa632e148896cdf"
|
||||
dependencies = [
|
||||
"instant",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "getrandom"
|
||||
version = "0.2.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9be70c98951c83b8d2f8f60d7065fa6d5146873094452a1008da8c2f1e4205ad"
|
||||
dependencies = [
|
||||
"cfg-if 1.0.0",
|
||||
"libc",
|
||||
"wasi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "gimli"
|
||||
version = "0.26.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "78cc372d058dcf6d5ecd98510e7fbc9e5aec4d21de70f65fea8fecebcd881bd4"
|
||||
|
||||
[[package]]
|
||||
name = "heck"
|
||||
version = "0.3.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c"
|
||||
dependencies = [
|
||||
"unicode-segmentation",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "hermit-abi"
|
||||
version = "0.1.19"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33"
|
||||
dependencies = [
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "humantime"
|
||||
version = "2.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4"
|
||||
|
||||
[[package]]
|
||||
name = "instant"
|
||||
version = "0.1.12"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c"
|
||||
dependencies = [
|
||||
"cfg-if 1.0.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "itoa"
|
||||
version = "1.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35"
|
||||
|
||||
[[package]]
|
||||
name = "lazy_static"
|
||||
version = "1.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
version = "0.2.125"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5916d2ae698f6de9bfb891ad7a8d65c09d232dc58cc4ac433c7da3b2fd84bc2b"
|
||||
|
||||
[[package]]
|
||||
name = "libtest-mimic"
|
||||
version = "0.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "08a7b8ac1f53f7be8d895ce6f7f534e49581c85c499b47429634b2cb2995e2ae"
|
||||
dependencies = [
|
||||
"crossbeam-channel 0.4.4",
|
||||
"rayon",
|
||||
"structopt",
|
||||
"termcolor",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "maybe-uninit"
|
||||
version = "2.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00"
|
||||
|
||||
[[package]]
|
||||
name = "memchr"
|
||||
version = "2.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d"
|
||||
|
||||
[[package]]
|
||||
name = "memoffset"
|
||||
version = "0.6.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce"
|
||||
dependencies = [
|
||||
"autocfg",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "miniz_oxide"
|
||||
version = "0.5.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d2b29bd4bc3f33391105ebee3589c19197c4271e3e5a9ec9bfe8127eeff8f082"
|
||||
dependencies = [
|
||||
"adler",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "num_cpus"
|
||||
version = "1.13.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1"
|
||||
dependencies = [
|
||||
"hermit-abi",
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "object"
|
||||
version = "0.28.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e42c982f2d955fac81dd7e1d0e1426a7d702acd9c98d19ab01083a6a0328c424"
|
||||
dependencies = [
|
||||
"memchr",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ppv-lite86"
|
||||
version = "0.2.16"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "eb9f9e6e233e5c4a35559a617bf40a4ec447db2e84c20b55a6f83167b7e57872"
|
||||
|
||||
[[package]]
|
||||
name = "pretty-hex"
|
||||
version = "0.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bc5c99d529f0d30937f6f4b8a86d988047327bb88d04d2c4afc356de74722131"
|
||||
|
||||
[[package]]
|
||||
name = "proc-macro-error"
|
||||
version = "1.0.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c"
|
||||
dependencies = [
|
||||
"proc-macro-error-attr",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
"version_check",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "proc-macro-error-attr"
|
||||
version = "1.0.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"version_check",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "proc-macro2"
|
||||
version = "1.0.38"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9027b48e9d4c9175fa2218adf3557f91c1137021739951d4932f5f8268ac48aa"
|
||||
dependencies = [
|
||||
"unicode-xid",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "quote"
|
||||
version = "1.0.18"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a1feb54ed693b93a84e14094943b84b7c4eae204c512b7ccb95ab0c66d278ad1"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rand"
|
||||
version = "0.8.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"rand_chacha",
|
||||
"rand_core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rand_chacha"
|
||||
version = "0.3.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88"
|
||||
dependencies = [
|
||||
"ppv-lite86",
|
||||
"rand_core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rand_core"
|
||||
version = "0.6.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7"
|
||||
dependencies = [
|
||||
"getrandom",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rayon"
|
||||
version = "1.5.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fd249e82c21598a9a426a4e00dd7adc1d640b22445ec8545feef801d1a74c221"
|
||||
dependencies = [
|
||||
"autocfg",
|
||||
"crossbeam-deque",
|
||||
"either",
|
||||
"rayon-core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rayon-core"
|
||||
version = "1.9.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9f51245e1e62e1f1629cbfec37b5793bbabcaeb90f30e94d2ba03564687353e4"
|
||||
dependencies = [
|
||||
"crossbeam-channel 0.5.4",
|
||||
"crossbeam-deque",
|
||||
"crossbeam-utils 0.8.8",
|
||||
"num_cpus",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "redox_syscall"
|
||||
version = "0.2.13"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "62f25bc4c7e55e0b0b7a1d43fb893f4fa1361d0abe38b9ce4f323c2adfe6ef42"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "remove_dir_all"
|
||||
version = "0.5.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7"
|
||||
dependencies = [
|
||||
"winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rustc-demangle"
|
||||
version = "0.1.21"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7ef03e0a2b150c7a90d01faf6254c9c48a41e95fb2a8c2ac1c6f0d2b9aefc342"
|
||||
|
||||
[[package]]
|
||||
name = "rustc_version"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366"
|
||||
dependencies = [
|
||||
"semver",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ryu"
|
||||
version = "1.0.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "73b4b750c782965c211b42f022f59af1fbceabdd026623714f104152f1ec149f"
|
||||
|
||||
[[package]]
|
||||
name = "scopeguard"
|
||||
version = "1.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
|
||||
|
||||
[[package]]
|
||||
name = "semver"
|
||||
version = "1.0.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8cb243bdfdb5936c8dc3c45762a19d12ab4550cdc753bc247637d4ec35a040fd"
|
||||
|
||||
[[package]]
|
||||
name = "serde"
|
||||
version = "1.0.137"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "61ea8d54c77f8315140a05f4c7237403bf38b72704d031543aa1d16abbf517d1"
|
||||
dependencies = [
|
||||
"serde_derive",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_derive"
|
||||
version = "1.0.137"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1f26faba0c3959972377d3b2d306ee9f71faee9714294e41bb777f83f88578be"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_json"
|
||||
version = "1.0.81"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9b7ce2b32a1aed03c558dc61a5cd328f15aff2dbc17daad8fb8af04d2100e15c"
|
||||
dependencies = [
|
||||
"itoa",
|
||||
"ryu",
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "strsim"
|
||||
version = "0.8.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a"
|
||||
|
||||
[[package]]
|
||||
name = "structopt"
|
||||
version = "0.3.26"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0c6b5c64445ba8094a6ab0c3cd2ad323e07171012d9c98b0b15651daf1787a10"
|
||||
dependencies = [
|
||||
"clap",
|
||||
"lazy_static",
|
||||
"structopt-derive",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "structopt-derive"
|
||||
version = "0.4.18"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "dcb5ae327f9cc13b68763b5749770cb9e048a99bd9dfdfa58d0cf05d5f64afe0"
|
||||
dependencies = [
|
||||
"heck",
|
||||
"proc-macro-error",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "1.0.93"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "04066589568b72ec65f42d65a1a52436e954b168773148893c020269563decf2"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"unicode-xid",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tempfile"
|
||||
version = "3.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4"
|
||||
dependencies = [
|
||||
"cfg-if 1.0.0",
|
||||
"fastrand",
|
||||
"libc",
|
||||
"redox_syscall",
|
||||
"remove_dir_all",
|
||||
"winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "termcolor"
|
||||
version = "1.1.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755"
|
||||
dependencies = [
|
||||
"winapi-util",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "textwrap"
|
||||
version = "0.11.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060"
|
||||
dependencies = [
|
||||
"unicode-width",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "unicode-segmentation"
|
||||
version = "1.9.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7e8820f5d777f6224dc4be3632222971ac30164d4a258d595640799554ebfd99"
|
||||
|
||||
[[package]]
|
||||
name = "unicode-width"
|
||||
version = "0.1.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973"
|
||||
|
||||
[[package]]
|
||||
name = "unicode-xid"
|
||||
version = "0.2.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "957e51f3646910546462e67d5f7599b9e4fb8acdd304b087a6494730f9eebf04"
|
||||
|
||||
[[package]]
|
||||
name = "vec_map"
|
||||
version = "0.8.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191"
|
||||
|
||||
[[package]]
|
||||
name = "version_check"
|
||||
version = "0.9.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"
|
||||
|
||||
[[package]]
|
||||
name = "wasi"
|
||||
version = "0.10.2+wasi-snapshot-preview1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6"
|
||||
|
||||
[[package]]
|
||||
name = "winapi"
|
||||
version = "0.3.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
|
||||
dependencies = [
|
||||
"winapi-i686-pc-windows-gnu",
|
||||
"winapi-x86_64-pc-windows-gnu",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "winapi-i686-pc-windows-gnu"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
|
||||
|
||||
[[package]]
|
||||
name = "winapi-util"
|
||||
version = "0.1.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178"
|
||||
dependencies = [
|
||||
"winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "winapi-x86_64-pc-windows-gnu"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
|
||||
25
pkgs/development/tools/rust/cargo-bolero/default.nix
Normal file
25
pkgs/development/tools/rust/cargo-bolero/default.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{ lib, fetchFromGitHub, rustPlatform, stdenv, libbfd, libopcodes, libunwind }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "cargo-bolero";
|
||||
version = "0.6.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "camshaft";
|
||||
repo = "bolero";
|
||||
rev = "${pname}-v${version}";
|
||||
sha256 = "1p8g8av0l1qsmq09m0nwyyryk1v5bbah5izl4hf80ivi41mywkyi";
|
||||
};
|
||||
|
||||
cargoLock.lockFile = ./Cargo.lock;
|
||||
postPatch = "cp ${./Cargo.lock} Cargo.lock";
|
||||
|
||||
buildInputs = [ libbfd libopcodes libunwind ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Fuzzing and property testing front-end framework for Rust";
|
||||
homepage = "https://github.com/camshaft/cargo-bolero";
|
||||
license = with licenses; [ mit ];
|
||||
maintainers = [ maintainers.ekleog ];
|
||||
};
|
||||
}
|
||||
55
pkgs/development/tools/rust/cargo-c/default.nix
Normal file
55
pkgs/development/tools/rust/cargo-c/default.nix
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
{ lib
|
||||
, rustPlatform
|
||||
, fetchCrate
|
||||
, pkg-config
|
||||
, curl
|
||||
, openssl
|
||||
, stdenv
|
||||
, CoreFoundation
|
||||
, libiconv
|
||||
, Security
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "cargo-c";
|
||||
version = "0.9.2";
|
||||
|
||||
src = fetchCrate {
|
||||
inherit pname;
|
||||
# this version may need to be updated along with package version
|
||||
version = "${version}+cargo-0.55";
|
||||
sha256 = "sha256-yh5vAtKlBvoSlJBsW2RSduSK6T8aOssM84WQMNjLZqA=";
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-YikTjAeroaHyNe3ygUWRHSXJwdm2BSBV7RgIDN4suZ4=";
|
||||
|
||||
nativeBuildInputs = [ pkg-config (lib.getDev curl) ];
|
||||
buildInputs = [ openssl curl ] ++ lib.optionals stdenv.isDarwin [
|
||||
CoreFoundation
|
||||
libiconv
|
||||
Security
|
||||
];
|
||||
|
||||
# Ensure that we are avoiding build of the curl vendored in curl-sys
|
||||
doInstallCheck = stdenv.hostPlatform.libc == "glibc";
|
||||
installCheckPhase = ''
|
||||
runHook preInstallCheck
|
||||
|
||||
ldd "$out/bin/cargo-cbuild" | grep libcurl.so
|
||||
|
||||
runHook postInstallCheck
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A cargo subcommand to build and install C-ABI compatibile dynamic and static libraries";
|
||||
longDescription = ''
|
||||
Cargo C-ABI helpers. A cargo applet that produces and installs a correct
|
||||
pkg-config file, a static library and a dynamic library, and a C header
|
||||
to be used by any C (and C-compatible) software.
|
||||
'';
|
||||
homepage = "https://github.com/lu-zero/cargo-c";
|
||||
changelog = "https://github.com/lu-zero/cargo-c/releases/tag/v${version}";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ ];
|
||||
};
|
||||
}
|
||||
26
pkgs/development/tools/rust/cargo-cache/default.nix
Normal file
26
pkgs/development/tools/rust/cargo-cache/default.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{ lib, stdenv, fetchFromGitHub, rustPlatform, libiconv, Security }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "cargo-cache";
|
||||
version = "0.8.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "matthiaskrgr";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "sha256-1/h9o8ldxI/Q1E6AurGfZ1xruf12g1OO5QlzMJLcEGo=";
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-yUa40j1yOrczCbp9IsL1e5FlHcSEeHPAmbrA8zpuTpI=";
|
||||
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ libiconv Security ];
|
||||
|
||||
checkFlagsArray = [ "offline_tests" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Manage cargo cache (\${CARGO_HOME}, ~/.cargo/), print sizes of dirs and remove dirs selectively";
|
||||
homepage = "https://github.com/matthiaskrgr/cargo-cache";
|
||||
license = with licenses; [ asl20 /* or */ mit ];
|
||||
maintainers = with maintainers; [ Br1ght0ne ];
|
||||
};
|
||||
}
|
||||
45
pkgs/development/tools/rust/cargo-crev/default.nix
Normal file
45
pkgs/development/tools/rust/cargo-crev/default.nix
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
{ lib, stdenv
|
||||
, fetchFromGitHub
|
||||
, rustPlatform
|
||||
, perl
|
||||
, pkg-config
|
||||
, SystemConfiguration
|
||||
, Security
|
||||
, curl
|
||||
, libiconv
|
||||
, openssl
|
||||
, git
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "cargo-crev";
|
||||
version = "0.23.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "crev-dev";
|
||||
repo = "cargo-crev";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-XzjZEVyPVn+7VrjG4QsqVBFmuGC1TWTWLEoqFcwQhaI=";
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-p87ZnOxaF9ytSUxp0P3QE3K1/jo7hz/N7BH1f2Lc0I0=";
|
||||
|
||||
preCheck = ''
|
||||
export HOME=$(mktemp -d)
|
||||
git config --global user.name "Nixpkgs Test"
|
||||
git config --global user.email "nobody@example.com"
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ perl pkg-config ];
|
||||
|
||||
buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ SystemConfiguration Security libiconv curl ];
|
||||
|
||||
checkInputs = [ git ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A cryptographically verifiable code review system for the cargo (Rust) package manager";
|
||||
homepage = "https://github.com/crev-dev/cargo-crev";
|
||||
license = with licenses; [ asl20 mit mpl20 ];
|
||||
maintainers = with maintainers; [ b4dm4n ];
|
||||
};
|
||||
}
|
||||
22
pkgs/development/tools/rust/cargo-criterion/default.nix
Normal file
22
pkgs/development/tools/rust/cargo-criterion/default.nix
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
{ lib, fetchFromGitHub, rustPlatform }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "cargo-criterion";
|
||||
version = "1.1.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "bheisler";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "sha256-RPix9DM6E32PhObvV3xPGrnXrrVHn3auxLUhysP8GM0=";
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-L/ILHKWlcYTkbEi2qDu7tf/3NHfTl6GhW0s+fUlsW08=";
|
||||
|
||||
meta = with lib; {
|
||||
description = "Cargo extension for running Criterion.rs benchmarks";
|
||||
homepage = "https://github.com/bheisler/cargo-criterion";
|
||||
license = with licenses; [ asl20 /* or */ mit ];
|
||||
maintainers = with maintainers; [ humancalico ];
|
||||
};
|
||||
}
|
||||
41
pkgs/development/tools/rust/cargo-cross/default.nix
Normal file
41
pkgs/development/tools/rust/cargo-cross/default.nix
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
{ lib
|
||||
, rustPlatform
|
||||
, fetchFromGitHub
|
||||
, fetchpatch
|
||||
, nix-update-script
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "cargo-cross";
|
||||
version = "0.2.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "rust-embedded";
|
||||
repo = "cross";
|
||||
rev = "v${version}";
|
||||
sha256 = "1py5w4kf612x4qxi190ilsrx0zzwdzk9i47ppvqblska1s47qa2w";
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-zk6cbN4iSHnyoeWupufVf2yQK6aq3S99uk9lqpjCw4c=";
|
||||
|
||||
cargoPatches = [
|
||||
(fetchpatch {
|
||||
url = "https://github.com/rust-embedded/cross/commit/e86ad2e5a55218395df7eaaf91900e22b809083c.patch";
|
||||
sha256 = "1zrcj5fm3irmlrfkgb65kp2pjkry0rg5nn9pwsk9p0i6dpapjc7k";
|
||||
})
|
||||
];
|
||||
|
||||
passthru = {
|
||||
updateScript = nix-update-script {
|
||||
attrPath = pname;
|
||||
};
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "Zero setup cross compilation and cross testing";
|
||||
homepage = "https://github.com/rust-embedded/cross";
|
||||
license = with licenses; [ asl20 /* or */ mit ];
|
||||
maintainers = with maintainers; [ otavio ];
|
||||
mainProgram = "cross";
|
||||
};
|
||||
}
|
||||
32
pkgs/development/tools/rust/cargo-deadlinks/default.nix
Normal file
32
pkgs/development/tools/rust/cargo-deadlinks/default.nix
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
{ lib, stdenv, rustPlatform, fetchFromGitHub, Security }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "cargo-deadlinks";
|
||||
version = "0.8.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "deadlinks";
|
||||
repo = pname;
|
||||
rev = "${version}";
|
||||
sha256 = "0s5q9aghncsk9834azn5cgnn5ms3zzyjan2rq06kaqcgzhld4cjh";
|
||||
};
|
||||
|
||||
cargoSha256 = "00g06zf0m1wry0mhf098pw99kbb99d8a17985pb90yf1w74rdkh6";
|
||||
|
||||
checkFlags = [
|
||||
# uses internet
|
||||
"--skip non_existent_http_link --skip working_http_check"
|
||||
] ++ lib.optional (stdenv.hostPlatform.system != "x86_64-linux")
|
||||
# assumes the target is x86_64-unknown-linux-gnu
|
||||
"--skip simple_project::it_checks_okay_project_correctly";
|
||||
|
||||
buildInputs = lib.optional stdenv.isDarwin Security;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Cargo subcommand to check rust documentation for broken links";
|
||||
homepage = "https://github.com/deadlinks/cargo-deadlinks";
|
||||
changelog = "https://github.com/deadlinks/cargo-deadlinks/blob/${version}/CHANGELOG.md";
|
||||
license = with licenses; [ asl20 /* or */ mit ];
|
||||
maintainers = with maintainers; [ newam ];
|
||||
};
|
||||
}
|
||||
45
pkgs/development/tools/rust/cargo-deny/default.nix
Normal file
45
pkgs/development/tools/rust/cargo-deny/default.nix
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
{ lib
|
||||
, rustPlatform
|
||||
, fetchFromGitHub
|
||||
, pkg-config
|
||||
, openssl
|
||||
, zstd
|
||||
, stdenv
|
||||
, curl
|
||||
, Security
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "cargo-deny";
|
||||
version = "0.12.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "EmbarkStudios";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "sha256-w64fdjKXiCaM+U28Hte+I0LPqmGKxbCVRUyhNWcVyTc=";
|
||||
};
|
||||
|
||||
# enable pkg-config feature of zstd
|
||||
cargoPatches = [ ./zstd-pkg-config.patch ];
|
||||
|
||||
cargoSha256 = "sha256-K9Ab4L/wnpUqe+gLKhtHX4fOgWXv6ZL9faa58hzdq/0=";
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
|
||||
buildInputs = [ openssl zstd ]
|
||||
++ lib.optionals stdenv.isDarwin [ curl Security ];
|
||||
|
||||
buildNoDefaultFeatures = true;
|
||||
|
||||
# tests require internet access
|
||||
doCheck = false;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Cargo plugin to generate list of all licenses for a crate";
|
||||
homepage = "https://github.com/EmbarkStudios/cargo-deny";
|
||||
changelog = "https://github.com/EmbarkStudios/cargo-deny/blob/${version}/CHANGELOG.md";
|
||||
license = with licenses; [ asl20 /* or */ mit ];
|
||||
maintainers = with maintainers; [ figsoda matthiasbeyer jk ];
|
||||
};
|
||||
}
|
||||
29
pkgs/development/tools/rust/cargo-deny/zstd-pkg-config.patch
Normal file
29
pkgs/development/tools/rust/cargo-deny/zstd-pkg-config.patch
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
--- a/Cargo.lock
|
||||
+++ b/Cargo.lock
|
||||
@@ -242,6 +242,7 @@ dependencies = [
|
||||
"toml_edit",
|
||||
"twox-hash",
|
||||
"url",
|
||||
+ "zstd",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1904,4 +1905,5 @@ checksum = "2141bed8922b427761470e6bbfeff255da94fa20b0bbeab0d9297fcaf71e3aa7"
|
||||
dependencies = [
|
||||
"cc",
|
||||
"libc",
|
||||
+ "pkg-config",
|
||||
]
|
||||
diff --git a/Cargo.toml b/Cargo.toml
|
||||
index 8f24673..b59c350 100644
|
||||
--- a/Cargo.toml
|
||||
+++ b/Cargo.toml
|
||||
@@ -92,6 +92,8 @@ twox-hash = { version = "1.5", default-features = false }
|
||||
# Url parsing/manipulation
|
||||
url = "2.1"
|
||||
|
||||
+zstd = { version = "*", features = ["pkg-config"] }
|
||||
+
|
||||
[dev-dependencies]
|
||||
# Avoid loading license check many times
|
||||
lazy_static = "1.4.0"
|
||||
23
pkgs/development/tools/rust/cargo-depgraph/default.nix
Normal file
23
pkgs/development/tools/rust/cargo-depgraph/default.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{ lib, rustPlatform, fetchFromSourcehut }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "cargo-depgraph";
|
||||
version = "1.2.4";
|
||||
|
||||
src = fetchFromSourcehut {
|
||||
owner = "~jplatte";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-EbAV2VM73K0KiEKcy9kkK1TQHFQ1jRmKG3Tn9GAsWIk=";
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-AAZlAYhl62c8nFvFtwwGniGbQqXu2vHTO4++O1VJ4LM=";
|
||||
|
||||
meta = with lib; {
|
||||
description = "Create dependency graphs for cargo projects using `cargo metadata` and graphviz";
|
||||
homepage = "https://sr.ht/~jplatte/cargo-depgraph";
|
||||
changelog = "https://git.sr.ht/~jplatte/cargo-depgraph/tree/v${version}/item/CHANGELOG.md";
|
||||
license = licenses.gpl3Plus;
|
||||
maintainers = with maintainers; [ figsoda ];
|
||||
};
|
||||
}
|
||||
26
pkgs/development/tools/rust/cargo-dephell/default.nix
Normal file
26
pkgs/development/tools/rust/cargo-dephell/default.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{ lib, rustPlatform, fetchFromGitHub, pkg-config, openssl, stdenv, Security }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "cargo-dephell";
|
||||
version = "0.5.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "mimoo";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "1v3psrkjhgbkq9lm3698ac77qgk090jbly4r187nryj0vcmf9s1l";
|
||||
};
|
||||
|
||||
cargoSha256 = "0fwj782dbyj3ps16hxmq61drf8714863jb0d3mhivn3zlqawyyil";
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
|
||||
buildInputs = [ openssl ] ++ lib.optional stdenv.isDarwin Security;
|
||||
|
||||
meta = with lib; {
|
||||
description = "A tool to analyze the third-party dependencies imported by a rust crate or rust workspace";
|
||||
homepage = "https://github.com/mimoo/cargo-dephell";
|
||||
license = with licenses; [ mit /* or */ asl20 ];
|
||||
maintainers = with maintainers; [ figsoda ];
|
||||
};
|
||||
}
|
||||
23
pkgs/development/tools/rust/cargo-diet/default.nix
Normal file
23
pkgs/development/tools/rust/cargo-diet/default.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{ lib, rustPlatform, fetchFromGitHub }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "cargo-diet";
|
||||
version = "1.2.4";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "the-lean-crate";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-olF+F2y7F3ZpyluyslRDlfRKkWmE+zJ01bXyzy9x5EQ=";
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-ayi7Px1A8XzswlGnm31YWF7+8+lBChBaVJFwozSAimw=";
|
||||
|
||||
meta = with lib; {
|
||||
description = "Help computing optimal include directives for your Cargo.toml manifest";
|
||||
homepage = "https://github.com/the-lean-crate/cargo-diet";
|
||||
changelog = "https://github.com/the-lean-crate/cargo-diet/blob/v${version}/CHANGELOG.md";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ figsoda ];
|
||||
};
|
||||
}
|
||||
37
pkgs/development/tools/rust/cargo-embed/default.nix
Normal file
37
pkgs/development/tools/rust/cargo-embed/default.nix
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, rustPlatform
|
||||
, fetchFromGitHub
|
||||
, libusb1
|
||||
, libftdi1
|
||||
, pkg-config
|
||||
, rustfmt
|
||||
, AppKit
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "cargo-embed";
|
||||
version = "0.12.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "probe-rs";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "1is58n8y5lvnvzkbnh3gfk3r3f2r1w4l2qjdp2k8373apxzjxdvr";
|
||||
};
|
||||
|
||||
cargoSha256 = "0kalwigck9lf734zdpzg01sf2zzyrgdgq2rg3qj7hy94gfxlsk63";
|
||||
|
||||
nativeBuildInputs = [ pkg-config rustfmt ];
|
||||
buildInputs = [ libusb1 libftdi1 ] ++ lib.optionals stdenv.isDarwin [ AppKit ];
|
||||
|
||||
buildFeatures = [ "ftdi" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A cargo extension for working with microcontrollers";
|
||||
homepage = "https://probe.rs/";
|
||||
changelog = "https://github.com/probe-rs/cargo-embed/blob/v${version}/CHANGELOG.md";
|
||||
license = with licenses; [ asl20 /* or */ mit ];
|
||||
maintainers = with maintainers; [ fooker ];
|
||||
};
|
||||
}
|
||||
30
pkgs/development/tools/rust/cargo-expand/default.nix
Normal file
30
pkgs/development/tools/rust/cargo-expand/default.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, rustPlatform
|
||||
, fetchFromGitHub
|
||||
, libiconv
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "cargo-expand";
|
||||
version = "1.0.21";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "dtolnay";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "sha256-hxG7e5JBDv79eA7IQEdU8kpvE0B69Gqc+aPdCoc6Uf4=";
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-7CMNJb/HGHPP4CIBEYK+2HC/JAce25qGI86NkSvyxos=";
|
||||
|
||||
buildInputs = lib.optional stdenv.isDarwin libiconv;
|
||||
|
||||
meta = with lib; {
|
||||
description =
|
||||
"A utility and Cargo subcommand designed to let people expand macros in their Rust source code";
|
||||
homepage = "https://github.com/dtolnay/cargo-expand";
|
||||
license = with licenses; [ mit asl20 ];
|
||||
maintainers = with maintainers; [ xrelkd ];
|
||||
};
|
||||
}
|
||||
26
pkgs/development/tools/rust/cargo-feature/default.nix
Normal file
26
pkgs/development/tools/rust/cargo-feature/default.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{ lib, rustPlatform, fetchFromGitHub, stdenv, libiconv }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "cargo-feature";
|
||||
version = "0.7.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Riey";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-UPpqkz/PwoMaJan9itfldjyTmZmiMb6PzCyu9Vtjj1s=";
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-8qrpW/gU7BvxN3nSbFWhbgu5bwsdzYZTS3w3kcwsGbU=";
|
||||
|
||||
buildInputs = lib.optional stdenv.isDarwin libiconv;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Cargo plugin to manage dependency features";
|
||||
homepage = "https://github.com/Riey/cargo-feature";
|
||||
license = licenses.mit;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ riey ];
|
||||
};
|
||||
}
|
||||
|
||||
34
pkgs/development/tools/rust/cargo-flash/default.nix
Normal file
34
pkgs/development/tools/rust/cargo-flash/default.nix
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, rustPlatform
|
||||
, fetchFromGitHub
|
||||
, libusb1
|
||||
, pkg-config
|
||||
, rustfmt
|
||||
, AppKit
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "cargo-flash";
|
||||
version = "0.12.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "probe-rs";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-bd0TY8bdpLHLCdDQgJeJvqjAcSF67+LGSNx8yafYbys=";
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-bx2N8zP7BmqU6oM/7Nf2i9S1uNWItReQMD59vtG1RKE=";
|
||||
|
||||
nativeBuildInputs = [ pkg-config rustfmt ];
|
||||
buildInputs = [ libusb1 ] ++ lib.optionals stdenv.isDarwin [ AppKit ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A cargo extension for working with microcontrollers";
|
||||
homepage = "https://probe.rs/";
|
||||
changelog = "https://github.com/probe-rs/cargo-flash/blob/v${version}/CHANGELOG.md";
|
||||
license = with licenses; [ asl20 /* or */ mit ];
|
||||
maintainers = with maintainers; [ fooker ];
|
||||
};
|
||||
}
|
||||
29
pkgs/development/tools/rust/cargo-fund/default.nix
Normal file
29
pkgs/development/tools/rust/cargo-fund/default.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{ lib, stdenv, fetchFromGitHub, pkg-config, rustPlatform, Security, curl, openssl, libiconv }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "cargo-fund";
|
||||
version = "0.2.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "acfoltzer";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "sha256-MlAFnwX++OYRzqhEcSjxNzmSyJiVE5t6UuCKy9J+SsQ=";
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-pI5iz/V7/2jH3t3W3fuLzqd6oJC3PqHIWEJhDLmjLI0=";
|
||||
|
||||
# The tests need a GitHub API token.
|
||||
doCheck = false;
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
|
||||
buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ Security libiconv curl ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Discover funding links for your project's dependencies";
|
||||
homepage = "https://github.com/acfoltzer/cargo-fund";
|
||||
license = with licenses; [ mit /* or */ asl20 ];
|
||||
maintainers = with maintainers; [ johntitor ];
|
||||
};
|
||||
}
|
||||
26
pkgs/development/tools/rust/cargo-fuzz/default.nix
Normal file
26
pkgs/development/tools/rust/cargo-fuzz/default.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{ lib, fetchFromGitHub, rustPlatform, stdenv, libiconv }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "cargo-fuzz";
|
||||
version = "0.11.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "rust-fuzz";
|
||||
repo = "cargo-fuzz";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-vjKo0L7sYrC7qWdOGSJDWpL04tmNjO3QRwAIRHN/DiI=";
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-8XVRMwrBEJ1duQtXzNpuN5wJPUgziJlka4n/nAIqeEc=";
|
||||
|
||||
buildInputs = lib.optional stdenv.isDarwin libiconv;
|
||||
|
||||
doCheck = false;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Command line helpers for fuzzing";
|
||||
homepage = "https://github.com/rust-fuzz/cargo-fuzz";
|
||||
license = with licenses; [ mit asl20 ];
|
||||
maintainers = [ maintainers.ekleog ];
|
||||
};
|
||||
}
|
||||
61
pkgs/development/tools/rust/cargo-geiger/default.nix
Normal file
61
pkgs/development/tools/rust/cargo-geiger/default.nix
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
{ stdenv
|
||||
, lib
|
||||
, fetchFromGitHub
|
||||
, rustPlatform
|
||||
, pkg-config
|
||||
, openssl
|
||||
# darwin dependencies
|
||||
, Security
|
||||
, CoreFoundation
|
||||
, libiconv
|
||||
, curl
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "cargo-geiger";
|
||||
version = "0.11.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "rust-secure-code";
|
||||
repo = pname;
|
||||
rev = "${pname}-${version}";
|
||||
sha256 = "sha256-xymDV/FHJABw1s94m8fl8D51PQwkF5dX+1XD96++RX8=";
|
||||
};
|
||||
cargoSha256 = "sha256-2szgR9N3PGjGCIjqgtGNFSnzfSv57sGfslZ/PZyqMjI=";
|
||||
|
||||
buildInputs = [ openssl ]
|
||||
++ lib.optionals stdenv.isDarwin [ CoreFoundation Security libiconv curl ];
|
||||
nativeBuildInputs = [ pkg-config ]
|
||||
# curl-sys wants to run curl-config on darwin
|
||||
++ lib.optionals stdenv.isDarwin [ curl.dev ];
|
||||
|
||||
# skip tests with networking or other failures
|
||||
checkFlags = [
|
||||
"--skip serialize_test2_quick_report"
|
||||
"--skip serialize_test3_quick_report"
|
||||
"--skip serialize_test6_quick_report"
|
||||
"--skip serialize_test2_report"
|
||||
"--skip serialize_test3_report"
|
||||
"--skip serialize_test6_report"
|
||||
"--skip test_package::case_2"
|
||||
"--skip test_package::case_3"
|
||||
"--skip test_package::case_6"
|
||||
"--skip test_package_update_readme::case_2"
|
||||
"--skip test_package_update_readme::case_3"
|
||||
"--skip test_package_update_readme::case_5"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/rust-secure-code/cargo-geiger";
|
||||
changelog = "https://github.com/rust-secure-code/cargo-geiger/blob/${pname}-${version}/CHANGELOG.md";
|
||||
description = "Detects usage of unsafe Rust in a Rust crate and its dependencies";
|
||||
longDescription = ''
|
||||
A cargo plugin that detects the usage of unsafe Rust in a Rust crate and
|
||||
its dependencies. It provides information to aid auditing and guide
|
||||
dependency selection but it can not help you decide when and why unsafe
|
||||
code is appropriate.
|
||||
'';
|
||||
license = with licenses; [ asl20 /* or */ mit ];
|
||||
maintainers = with maintainers; [ evanjs jk ];
|
||||
};
|
||||
}
|
||||
39
pkgs/development/tools/rust/cargo-generate/default.nix
Normal file
39
pkgs/development/tools/rust/cargo-generate/default.nix
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
{ lib, stdenv, fetchFromGitHub, rustPlatform, Security, openssl, pkg-config, libiconv, curl }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "cargo-generate";
|
||||
version = "0.14.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ashleygwilliams";
|
||||
repo = "cargo-generate";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-OYYGOB1NfNnOl8bd8KozgMCyW4Gb39LoFtD80DPzpdw=";
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-qmRKjPhPLpzVVuTHuoo0iTlX3BnT2Udo1kFXvA3zNQE=";
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
|
||||
buildInputs = [ openssl ]
|
||||
++ lib.optionals stdenv.isDarwin [ Security libiconv curl ];
|
||||
|
||||
preCheck = ''
|
||||
export HOME=$(mktemp -d) USER=nixbld
|
||||
git config --global user.name Nixbld
|
||||
git config --global user.email nixbld@localhost.localnet
|
||||
'';
|
||||
|
||||
# Exclude some tests that don't work in sandbox:
|
||||
# - favorites_default_to_git_if_not_defined: requires network access to github.com
|
||||
# - should_canonicalize: the test assumes that it will be called from the /Users/<project_dir>/ folder on darwin variant.
|
||||
checkFlags = [ "--skip favorites::favorites_default_to_git_if_not_defined" ]
|
||||
++ lib.optionals stdenv.isDarwin [ "--skip git::should_canonicalize" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "cargo, make me a project";
|
||||
homepage = "https://github.com/ashleygwilliams/cargo-generate";
|
||||
license = licenses.asl20;
|
||||
maintainers = [ maintainers.turbomack ];
|
||||
};
|
||||
}
|
||||
24
pkgs/development/tools/rust/cargo-inspect/default.nix
Normal file
24
pkgs/development/tools/rust/cargo-inspect/default.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{ stdenv, lib, rustPlatform, fetchFromGitHub, Security }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "cargo-inspect";
|
||||
version = "0.10.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "mre";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "026vc8d0jkc1d7dlp3ldmwks7svpvqzl0k5niri8a12cl5w5b9hj";
|
||||
};
|
||||
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ Security ];
|
||||
|
||||
cargoSha256 = "069i8ydrp1pssnjq7d6mydwr7xh2cmcpzpf8bzd6nfjr6xx1pipr";
|
||||
|
||||
meta = with lib; {
|
||||
description = "See what Rust is doing behind the curtains";
|
||||
homepage = "https://github.com/mre/cargo-inspect";
|
||||
license = with licenses; [ mit asl20 ];
|
||||
maintainers = with maintainers; [ minijackson ];
|
||||
};
|
||||
}
|
||||
24
pkgs/development/tools/rust/cargo-insta/default.nix
Normal file
24
pkgs/development/tools/rust/cargo-insta/default.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{ lib, rustPlatform, fetchFromGitHub, libiconv, stdenv }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "cargo-insta";
|
||||
version = "1.14.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "mitsuhiko";
|
||||
repo = "insta";
|
||||
rev = version;
|
||||
sha256 = "sha256-kTICdLL3paJIj779w4i7QUzhdynzyjo+YjtBorJsms4=";
|
||||
};
|
||||
|
||||
sourceRoot = "source/cargo-insta";
|
||||
cargoSha256 = "sha256-Hfjz3arOvRbMIvV3o60zjRB2p4JbBUFPj66OpHZdIJg=";
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A Cargo subcommand for snapshot testing";
|
||||
homepage = "https://github.com/mitsuhiko/insta";
|
||||
license = licenses.asl20;
|
||||
maintainers = with lib.maintainers; [ oxalica ];
|
||||
};
|
||||
}
|
||||
36
pkgs/development/tools/rust/cargo-limit/default.nix
Normal file
36
pkgs/development/tools/rust/cargo-limit/default.nix
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
{ lib
|
||||
, rustPlatform
|
||||
, fetchFromGitHub
|
||||
, nix-update-script
|
||||
, stdenv
|
||||
, libiconv
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "cargo-limit";
|
||||
version = "0.0.9";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "alopatindev";
|
||||
repo = "cargo-limit";
|
||||
rev = version;
|
||||
sha256 = "sha256-GRitz9LOdZhbakbLZI2BUfZjqXLrsMK2MQJgixiEHaA=";
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-uiANH9HOvy41FiABTTx2D9Rz1z/F7eITc5aiofaMSfI=";
|
||||
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
|
||||
|
||||
passthru = {
|
||||
updateScript = nix-update-script {
|
||||
attrPath = pname;
|
||||
};
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "Cargo subcommand \"limit\": reduces the noise of compiler messages";
|
||||
homepage = "https://github.com/alopatindev/cargo-limit";
|
||||
license = with licenses; [ asl20 /* or */ mit ];
|
||||
maintainers = with maintainers; [ otavio ];
|
||||
};
|
||||
}
|
||||
22
pkgs/development/tools/rust/cargo-llvm-lines/default.nix
Normal file
22
pkgs/development/tools/rust/cargo-llvm-lines/default.nix
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
{ lib, rustPlatform, fetchFromGitHub }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "cargo-llvm-lines";
|
||||
version = "0.4.15";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "dtolnay";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "sha256-pP1kMwxIrL2ADvj4AkbhqKH5vzGyQnfL7hjg3/QYIY8=";
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-V9mD9NAG7bB8uB/pjl0XGXmJqOUm4ZrFJV7nv569XOM=";
|
||||
|
||||
meta = with lib; {
|
||||
description = "Count the number of lines of LLVM IR across all instantiations of a generic function";
|
||||
homepage = "https://github.com/dtolnay/cargo-llvm-lines";
|
||||
license = with licenses; [ asl20 /* or */ mit ];
|
||||
maintainers = with maintainers; [ figsoda ];
|
||||
};
|
||||
}
|
||||
42
pkgs/development/tools/rust/cargo-make/default.nix
Normal file
42
pkgs/development/tools/rust/cargo-make/default.nix
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchurl
|
||||
, runCommand
|
||||
, fetchCrate
|
||||
, rustPlatform
|
||||
, Security
|
||||
, openssl
|
||||
, pkg-config
|
||||
, SystemConfiguration
|
||||
, libiconv
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "cargo-make";
|
||||
version = "0.35.12";
|
||||
|
||||
src = fetchCrate {
|
||||
inherit pname version;
|
||||
sha256 = "sha256-BBSZTbzT+8obY677Yfmf1VTwg0GtvMNY/FTlS6isJTE=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
|
||||
buildInputs = [ openssl ]
|
||||
++ lib.optionals stdenv.isDarwin [ Security SystemConfiguration libiconv ];
|
||||
|
||||
cargoSha256 = "sha256-Nsm6KnL72HjqGevXwg2qYagzMG5nEFuH9DblbcUv6Qg=";
|
||||
|
||||
# Some tests fail because they need network access.
|
||||
# However, Travis ensures a proper build.
|
||||
# See also:
|
||||
# https://travis-ci.org/sagiegurari/cargo-make
|
||||
doCheck = false;
|
||||
|
||||
meta = with lib; {
|
||||
description = "A Rust task runner and build tool";
|
||||
homepage = "https://github.com/sagiegurari/cargo-make";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ xrelkd ma27 ];
|
||||
};
|
||||
}
|
||||
30
pkgs/development/tools/rust/cargo-modules/default.nix
Normal file
30
pkgs/development/tools/rust/cargo-modules/default.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{ lib, rustPlatform, fetchFromGitHub, stdenv, CoreFoundation, CoreServices }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "cargo-modules";
|
||||
version = "0.5.6";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "regexident";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "sha256-bLljwxNrCmg1ZWfSninIxJIFIn2oHY8dmbHYPdwtD+M=";
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-heyVeQwEIOA9qtyXnHY8lPo06YgIUJaWCtaht9dWLoo=";
|
||||
|
||||
buildInputs = lib.optionals stdenv.isDarwin [
|
||||
CoreFoundation
|
||||
CoreServices
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A cargo plugin for showing a tree-like overview of a crate's modules";
|
||||
homepage = "https://github.com/regexident/cargo-modules";
|
||||
license = with licenses; [ mpl20 ];
|
||||
# all tests fail with:
|
||||
# thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: "tests run with disabled concurrency, automatic snapshot name generation is not supported. Consider using the \"backtrace\" feature of insta which tries to recover test names from the call stack."', /private/tmp/nix-build-cargo-modules-0.5.6.drv-0/cargo-modules-0.5.6-vendor.tar.gz/insta/src/runtime.rs:908:22
|
||||
broken = (stdenv.isDarwin && stdenv.isx86_64);
|
||||
maintainers = with maintainers; [ figsoda rvarago ];
|
||||
};
|
||||
}
|
||||
53
pkgs/development/tools/rust/cargo-msrv/default.nix
Normal file
53
pkgs/development/tools/rust/cargo-msrv/default.nix
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
{ lib
|
||||
, rustPlatform
|
||||
, fetchFromGitHub
|
||||
, nix-update-script
|
||||
, pkg-config
|
||||
, rustup
|
||||
, openssl
|
||||
, stdenv
|
||||
, libiconv
|
||||
, Security
|
||||
, makeWrapper
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "cargo-msrv";
|
||||
version = "0.15.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "foresterre";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-rmWPkxxrpVamYHII0xkZq62ubL3/jrcqXUvFH9VuNtg=";
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-/Bspy94uIP/e4uJY8qo+UPK1tnPjglxiMWeYWx2qoHk=";
|
||||
|
||||
passthru = {
|
||||
updateScript = nix-update-script {
|
||||
attrPath = pname;
|
||||
};
|
||||
};
|
||||
|
||||
# Integration tests fail
|
||||
doCheck = false;
|
||||
|
||||
buildInputs = if stdenv.isDarwin
|
||||
then [ libiconv Security ]
|
||||
else [ openssl ];
|
||||
|
||||
nativeBuildInputs = [ pkg-config makeWrapper ];
|
||||
|
||||
# Depends at run-time on having rustup in PATH
|
||||
postInstall = ''
|
||||
wrapProgram $out/bin/cargo-msrv --prefix PATH : ${lib.makeBinPath [ rustup ]};
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Cargo subcommand \"msrv\": assists with finding your minimum supported Rust version (MSRV)";
|
||||
homepage = "https://github.com/foresterre/cargo-msrv";
|
||||
license = with licenses; [ asl20 /* or */ mit ];
|
||||
maintainers = with maintainers; [ otavio ];
|
||||
};
|
||||
}
|
||||
29
pkgs/development/tools/rust/cargo-nextest/default.nix
Normal file
29
pkgs/development/tools/rust/cargo-nextest/default.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{ lib, fetchFromGitHub, rustPlatform, stdenv, libiconv }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "cargo-nextest";
|
||||
version = "0.9.16";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "nextest-rs";
|
||||
repo = "nextest";
|
||||
rev = "cargo-nextest-${version}";
|
||||
sha256 = "sha256-XxsJSuUyw2q2kXaITWbkka8R6fx0ikoRMtw0hiySJ+M=";
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-aE/yKf2HIjN/yk3Euj2KaX4DPB4wFywAAHWkRQ1SWKw=";
|
||||
|
||||
cargoTestFlags = [ # TODO: investigate some more why these tests fail in nix
|
||||
"--"
|
||||
"--skip=tests_integration::test_relocated_run"
|
||||
"--skip=tests_integration::test_run"
|
||||
"--skip=tests_integration::test_run_after_build"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Next-generation test runner for Rust projects";
|
||||
homepage = "https://github.com/nextest-rs/nextest";
|
||||
license = with licenses; [ mit asl20 ];
|
||||
maintainers = [ maintainers.ekleog ];
|
||||
};
|
||||
}
|
||||
28
pkgs/development/tools/rust/cargo-play/default.nix
Normal file
28
pkgs/development/tools/rust/cargo-play/default.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
{ lib, rustPlatform, fetchFromGitHub }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "cargo-play";
|
||||
version = "0.5.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "fanzeyi";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "01r00akfmvpzp924yqqybd9s0pwiwxy8vklsg4m9ypzljc3nlv02";
|
||||
};
|
||||
|
||||
cargoSha256 = "1xkscd9ci9vlkmbsaxvavrna1xpi16xcf9ri879lw8bdh7sa3nx8";
|
||||
|
||||
# these tests require internet access
|
||||
checkFlags = [
|
||||
"--skip=dtoa_test"
|
||||
"--skip=infer_override"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Run your rust code without setting up cargo";
|
||||
homepage = "https://github.com/fanzeyi/cargo-play";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ figsoda ];
|
||||
};
|
||||
}
|
||||
32
pkgs/development/tools/rust/cargo-raze/default.nix
Normal file
32
pkgs/development/tools/rust/cargo-raze/default.nix
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
{ lib, stdenv, fetchFromGitHub, rustPlatform
|
||||
, pkg-config, curl, libgit2, openssl, Security }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "cargo-raze";
|
||||
version = "0.12.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "google";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "161m4y6i4sgqi9mg3f3348f5cr0m45vhix4a4bcw54wnmhiklnnl";
|
||||
};
|
||||
sourceRoot = "source/impl";
|
||||
|
||||
cargoSha256 = "1vlywdq0bx6b1k3w1grisca0hvv2s4s88yxq7bil8nhm5ghjgxdr";
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = [ curl libgit2 openssl ]
|
||||
++ lib.optional stdenv.isDarwin Security;
|
||||
|
||||
# thread 'main' panicked at 'Cannot ping mock server.: "cannot send request to mock server: cannot send request to mock server: failed to resolve host name"'
|
||||
# __darwinAllowLocalNetworking does not fix the panic
|
||||
doCheck = !stdenv.isDarwin;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Generate Bazel BUILD files from Cargo dependencies";
|
||||
homepage = "https://github.com/google/cargo-raze";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ elasticdog ];
|
||||
};
|
||||
}
|
||||
34
pkgs/development/tools/rust/cargo-readme/default.nix
Normal file
34
pkgs/development/tools/rust/cargo-readme/default.nix
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
{ lib, rustPlatform, fetchFromGitHub, fetchpatch }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "cargo-readme";
|
||||
version = "3.2.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "livioribeiro";
|
||||
repo = pname;
|
||||
# Git tag is missing, see upstream issue:
|
||||
# https://github.com/livioribeiro/cargo-readme/issues/61
|
||||
rev = "cf66017c0120ae198210ebaf58a0be6a78372974";
|
||||
sha256 = "sha256-/ufHHM13L83M3UYi6mjdhIjgXx7bZgzvR/X02Zsx7Fw=";
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-Isd05qOuVBNfXOI5qsaDOhjF7QIKAG5xrZsBFK2PpQQ=";
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
# Fixup warning thrown at build when running test-suite
|
||||
# unused return, see upstream PR:
|
||||
# https://github.com/livioribeiro/cargo-readme/pull/62
|
||||
url = "https://github.com/livioribeiro/cargo-readme/commit/060f2daaa2b2cf981bf490dc36bcc6527545ea03.patch";
|
||||
sha256 = "sha256-wlAIgTI9OqtA/Jnswoqp7iOj+1zjrUZA7JpHUiF/n+s=";
|
||||
})
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Generate README.md from docstrings";
|
||||
homepage = "https://github.com/livioribeiro/cargo-readme";
|
||||
license = with licenses; [ mit asl20 ];
|
||||
maintainers = with maintainers; [ baloo ];
|
||||
};
|
||||
}
|
||||
42
pkgs/development/tools/rust/cargo-rr/default.nix
Normal file
42
pkgs/development/tools/rust/cargo-rr/default.nix
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
{ lib
|
||||
, rustPlatform
|
||||
, fetchFromGitHub
|
||||
, gitUpdater
|
||||
, common-updater-scripts
|
||||
, makeWrapper
|
||||
, rr
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "cargo-rr";
|
||||
version = "0.2.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "danielzfranklin";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-lQS+bp1u79iO8WGrkZSFEuonr1eYjxIQYhUvM/kBao4";
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-PdKqWMxTtBJbNqITs3IjNcpijXy6MHitEY4jDp4jZro=";
|
||||
|
||||
passthru = {
|
||||
updateScript = gitUpdater {
|
||||
inherit pname version;
|
||||
rev-prefix = "v";
|
||||
};
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
postInstall = ''
|
||||
wrapProgram $out/bin/cargo-rr --prefix PATH : ${lib.makeBinPath [ rr ]}
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Cargo subcommand \"rr\": a light wrapper around rr, the time-travelling debugger";
|
||||
homepage = "https://github.com/danielzfranklin/cargo-rr";
|
||||
license = with licenses; [ mit ];
|
||||
maintainers = with maintainers; [ otavio ];
|
||||
};
|
||||
}
|
||||
23
pkgs/development/tools/rust/cargo-sort/default.nix
Normal file
23
pkgs/development/tools/rust/cargo-sort/default.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{ fetchFromGitHub, lib, rustPlatform }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "cargo-sort";
|
||||
version = "1.0.7";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "devinr528";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-jESz3SujznGLJeR23LvxORNC0Tj4VcEzdzhIRwyvjd0=";
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-1iOZ1EEP4bObTweTN4Wjtb9Y9ysJQ/9xnNpprxKIaho=";
|
||||
|
||||
meta = with lib; {
|
||||
description = "A tool to check that your Cargo.toml dependencies are sorted alphabetically";
|
||||
homepage = "https://github.com/devinr528/cargo-sort";
|
||||
changelog = "https://github.com/devinr528/cargo-sort/blob/v${version}/changelog.md";
|
||||
license = with licenses; [ mit /* or */ asl20 ];
|
||||
maintainers = with maintainers; [ figsoda ];
|
||||
};
|
||||
}
|
||||
39
pkgs/development/tools/rust/cargo-spellcheck/default.nix
Normal file
39
pkgs/development/tools/rust/cargo-spellcheck/default.nix
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
{ lib
|
||||
, rustPlatform
|
||||
, fetchFromGitHub
|
||||
, libclang
|
||||
, stdenv
|
||||
, Security
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "cargo-spellcheck";
|
||||
version = "0.11.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "drahnr";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-ZiRa4XYnY4fwbMenRLnvFQms66tIyGbm5saK8gN39ag=";
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-gWQbhFPdBDhPZY1LHxFlWO9xG4AXfyhZp0UnZ3Y86/Y=";
|
||||
|
||||
buildInputs = lib.optional stdenv.isDarwin Security;
|
||||
|
||||
LIBCLANG_PATH = "${libclang.lib}/lib";
|
||||
|
||||
preCheck = "HOME=$(mktemp -d)";
|
||||
|
||||
checkFlags = [
|
||||
"--skip checker::hunspell::tests::hunspell_binding_is_sane"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Checks rust documentation for spelling and grammar mistakes";
|
||||
homepage = "https://github.com/drahnr/cargo-spellcheck";
|
||||
changelog = "https://github.com/drahnr/cargo-spellcheck/blob/v${version}/CHANGELOG.md";
|
||||
license = with licenses; [ asl20 /* or */ mit ];
|
||||
maintainers = with maintainers; [ newam ];
|
||||
};
|
||||
}
|
||||
23
pkgs/development/tools/rust/cargo-supply-chain/default.nix
Normal file
23
pkgs/development/tools/rust/cargo-supply-chain/default.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{ lib, rustPlatform, fetchCrate, stdenv, Security }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "cargo-supply-chain";
|
||||
version = "0.3.1";
|
||||
|
||||
src = fetchCrate {
|
||||
inherit pname version;
|
||||
sha256 = "sha256-2iOAa0f0C3tS4oLrSJYjGnuoziPFxcQzXZLqENQq5PY=";
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-7wjaakyh27U7jjQQ6wNKR4lKQ7Y/+EEfLCfjVojk3TU=";
|
||||
|
||||
buildInputs = lib.optional stdenv.isDarwin Security;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Gather author, contributor and publisher data on crates in your dependency graph";
|
||||
homepage = "https://github.com/rust-secure-code/cargo-supply-chain";
|
||||
changelog = "https://github.com/rust-secure-code/cargo-supply-chain/blob/master/CHANGELOG.md";
|
||||
license = with licenses; [ asl20 mit zlib ]; # any of three
|
||||
maintainers = with maintainers; [ figsoda ];
|
||||
};
|
||||
}
|
||||
22
pkgs/development/tools/rust/cargo-sweep/default.nix
Normal file
22
pkgs/development/tools/rust/cargo-sweep/default.nix
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
{ lib, rustPlatform, fetchFromGitHub }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "cargo-sweep";
|
||||
version = "0.6.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "holmgr";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-tumcGnYqY/FGP8UWA0ccfdAK49LBcT8qH6SshrDXNAI=";
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-fcosKyGOy0SKrHbsKdxQJimelt1ByAM4YKo7WpHV8CA=";
|
||||
|
||||
meta = with lib; {
|
||||
description = "A Cargo subcommand for cleaning up unused build files generated by Cargo";
|
||||
homepage = "https://github.com/holmgr/cargo-sweep";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ xrelkd ];
|
||||
};
|
||||
}
|
||||
23
pkgs/development/tools/rust/cargo-sync-readme/default.nix
Normal file
23
pkgs/development/tools/rust/cargo-sync-readme/default.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{ lib, rustPlatform, fetchFromGitHub }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "cargo-sync-readme";
|
||||
version = "1.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "phaazon";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "sha256-n9oIWblTTuXFFQFN6mpQiCH5N7yg5fAp8v9vpB5/DAo=";
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-DsB2C2ELuvuVSvxG/xztmnY2qfX8+Y7udbXlpRQoL/c=";
|
||||
|
||||
meta = with lib; {
|
||||
description = "A cargo plugin that generates a Markdown section in your README based on your Rust documentation";
|
||||
homepage = "https://github.com/phaazon/cargo-sync-readme";
|
||||
changelog = "https://github.com/phaazon/cargo-sync-readme/blob/${version}/CHANGELOG.md";
|
||||
license = licenses.bsd3;
|
||||
maintainers = with maintainers; [ b4dm4n ];
|
||||
};
|
||||
}
|
||||
26
pkgs/development/tools/rust/cargo-tally/default.nix
Normal file
26
pkgs/development/tools/rust/cargo-tally/default.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{ lib, rustPlatform, fetchCrate, stdenv, DiskArbitration, Foundation, IOKit }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "cargo-tally";
|
||||
version = "1.0.5";
|
||||
|
||||
src = fetchCrate {
|
||||
inherit pname version;
|
||||
sha256 = "sha256-LHkj+RiUF7Zg2egEDgpViAlhZEhrOBMgLaNdhk5BNFI=";
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-am5AcgqRpMzCNvrfqreyTHqSxxI9qlqUmGU/SVW7TMY=";
|
||||
|
||||
buildInputs = lib.optionals stdenv.isDarwin [
|
||||
DiskArbitration
|
||||
Foundation
|
||||
IOKit
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Graph the number of crates that depend on your crate over time";
|
||||
homepage = "https://github.com/dtolnay/cargo-tally";
|
||||
license = with licenses; [ asl20 /* or */ mit ];
|
||||
maintainers = with maintainers; [ figsoda ];
|
||||
};
|
||||
}
|
||||
31
pkgs/development/tools/rust/cargo-udeps/default.nix
Normal file
31
pkgs/development/tools/rust/cargo-udeps/default.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{ lib, stdenv, rustPlatform, fetchFromGitHub, pkg-config, openssl, CoreServices, Security, libiconv, SystemConfiguration }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "cargo-udeps";
|
||||
version = "0.1.27";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "est31";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-nxcrllAoS/1e5hFURtrB9e6zyHnot90PFAuyVCsO4lY=";
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-AV3fgKloQ/9UEWjYRI4gENSqilhFlpbUrXhXREytcWc=";
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
|
||||
# TODO figure out how to use provided curl instead of compiling curl from curl-sys
|
||||
buildInputs = [ openssl ]
|
||||
++ lib.optionals stdenv.isDarwin [ CoreServices Security libiconv SystemConfiguration ];
|
||||
|
||||
# Requires network access
|
||||
doCheck = false;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Find unused dependencies in Cargo.toml";
|
||||
homepage = "https://github.com/est31/cargo-udeps";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ b4dm4n ];
|
||||
};
|
||||
}
|
||||
43
pkgs/development/tools/rust/cargo-valgrind/default.nix
Normal file
43
pkgs/development/tools/rust/cargo-valgrind/default.nix
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
{ lib
|
||||
, rustPlatform
|
||||
, fetchFromGitHub
|
||||
, nix-update-script
|
||||
, makeWrapper
|
||||
, valgrind
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "cargo-valgrind";
|
||||
version = "2.0.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "jfrimmel";
|
||||
repo = "cargo-valgrind";
|
||||
rev = version;
|
||||
sha256 = "sha256-PEGDao010COqSJGha7GQvR7vNOV+C7faduijVNjB5DE=";
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-00WUYrkKKJOEN9jXKQ3YraTq89U+3djdvLRuZSbeNHk=";
|
||||
|
||||
passthru = {
|
||||
updateScript = nix-update-script {
|
||||
attrPath = pname;
|
||||
};
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
postInstall = ''
|
||||
wrapProgram $out/bin/cargo-valgrind --prefix PATH : ${lib.makeBinPath [ valgrind ]}
|
||||
'';
|
||||
|
||||
# Disable check phase as there are failures (2 tests fail)
|
||||
doCheck = false;
|
||||
|
||||
meta = with lib; {
|
||||
description = ''Cargo subcommand "valgrind": runs valgrind and collects its output in a helpful manner'';
|
||||
homepage = "https://github.com/jfrimmel/cargo-valgrind";
|
||||
license = with licenses; [ asl20 /* or */ mit ];
|
||||
maintainers = with maintainers; [ otavio ];
|
||||
};
|
||||
}
|
||||
30
pkgs/development/tools/rust/cargo-watch/default.nix
Normal file
30
pkgs/development/tools/rust/cargo-watch/default.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{ stdenv, lib, rustPlatform, fetchFromGitHub, CoreServices, Foundation, rust, libiconv }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "cargo-watch";
|
||||
version = "8.1.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "passcod";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-zhOYKvsCK5am4Ystt3+cPAQM77IlIBJysAEix5cXKbI=";
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-OAOzrGS8n0jfUiQyIAHWLJMEkRINyasgkIjiLw977LE=";
|
||||
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ CoreServices Foundation libiconv ];
|
||||
|
||||
# `test with_cargo` tries to call cargo-watch as a cargo subcommand
|
||||
# (calling cargo-watch with command `cargo watch`)
|
||||
preCheck = ''
|
||||
export PATH="$(pwd)/target/${rust.toRustTarget stdenv.hostPlatform}/release:$PATH"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A Cargo subcommand for watching over Cargo project's source";
|
||||
homepage = "https://github.com/passcod/cargo-watch";
|
||||
license = licenses.cc0;
|
||||
maintainers = with maintainers; [ xrelkd ivan ];
|
||||
};
|
||||
}
|
||||
27
pkgs/development/tools/rust/cargo-whatfeatures/default.nix
Normal file
27
pkgs/development/tools/rust/cargo-whatfeatures/default.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
{ lib, stdenv, fetchFromGitHub, rustPlatform, pkg-config, openssl, Security }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "cargo-whatfeatures";
|
||||
version = "0.9.6";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "museun";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "0vki37pxngg15za9c1z61dc6sqk0j59s0qhcf9hplnym4ib5kqx1";
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-ZEkSj/JzXXTHjaxBVS5RDk/ECvOPPjzH4eS3CmlQA9I=";
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
|
||||
buildInputs = [ openssl ]
|
||||
++ lib.optionals stdenv.isDarwin [ Security ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A simple cargo plugin to get a list of features for a specific crate";
|
||||
homepage = "https://github.com/museun/cargo-whatfeatures";
|
||||
license = with licenses; [ mit asl20 ];
|
||||
maintainers = with maintainers; [ ivan-babrou ];
|
||||
};
|
||||
}
|
||||
32
pkgs/development/tools/rust/cargo-wipe/default.nix
Normal file
32
pkgs/development/tools/rust/cargo-wipe/default.nix
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
{ lib
|
||||
, rustPlatform
|
||||
, fetchFromGitHub
|
||||
, nix-update-script
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "cargo-wipe";
|
||||
version = "0.3.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "mihai-dinculescu";
|
||||
repo = "cargo-wipe";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-AlmXq2jbU8mQ23Q64a8QiKXwiWkIfr98vAoq7FLImhA=";
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-vsN4cM4Q9LX1ZgAA5x7PupOTh0IcjI65xzuCPjy8YOs=";
|
||||
|
||||
passthru = {
|
||||
updateScript = nix-update-script {
|
||||
attrPath = pname;
|
||||
};
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = ''Cargo subcommand "wipe": recursively finds and optionally wipes all "target" or "node_modules" folders'';
|
||||
homepage = "https://github.com/mihai-dinculescu/cargo-wipe";
|
||||
license = with licenses; [ mit ];
|
||||
maintainers = with maintainers; [ otavio ];
|
||||
};
|
||||
}
|
||||
22
pkgs/development/tools/rust/cargo-xbuild/default.nix
Normal file
22
pkgs/development/tools/rust/cargo-xbuild/default.nix
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
{ lib, fetchFromGitHub, rustPlatform }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "cargo-xbuild";
|
||||
version = "0.6.5";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "rust-osdev";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-bnceN47OFGlxs3ibcKoZFjoTgXRQxA2ZqxnthJ/fsqE=";
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-qMPJC61ZVW9olMgNnGrvcQ/je4se4J5gOVoaOpNMUo8=";
|
||||
|
||||
meta = with lib; {
|
||||
description = "Automatically cross-compiles the sysroot crates core, compiler_builtins, and alloc";
|
||||
homepage = "https://github.com/rust-osdev/cargo-xbuild";
|
||||
license = with licenses; [ mit asl20 ];
|
||||
maintainers = with maintainers; [ johntitor xrelkd ];
|
||||
};
|
||||
}
|
||||
39
pkgs/development/tools/rust/cbindgen/default.nix
Normal file
39
pkgs/development/tools/rust/cbindgen/default.nix
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
{ lib, stdenv, fetchFromGitHub, rustPlatform, python3Packages, Security }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "rust-cbindgen";
|
||||
version = "0.23.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "eqrion";
|
||||
repo = "cbindgen";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-yux5VpN8UqBscu5TyojlZmu4q2uz8b9Tu++eNlPUj/M=";
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256:1838dsmaqdlbd3j040bdy1fvl3z77xmcz73r11qmnqsga4yva6d7";
|
||||
|
||||
buildInputs = lib.optional stdenv.isDarwin Security;
|
||||
|
||||
checkInputs = [
|
||||
python3Packages.cython
|
||||
];
|
||||
|
||||
checkFlags = [
|
||||
# Disable tests that require rust unstable features
|
||||
# https://github.com/eqrion/cbindgen/issues/338
|
||||
"--skip test_expand"
|
||||
"--skip test_bitfield"
|
||||
"--skip lib_default_uses_debug_build"
|
||||
"--skip lib_explicit_debug_build"
|
||||
"--skip lib_explicit_release_build"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
broken = stdenv.isDarwin;
|
||||
description = "A project for generating C bindings from Rust code";
|
||||
homepage = "https://github.com/eqrion/cbindgen";
|
||||
license = licenses.mpl20;
|
||||
maintainers = with maintainers; [ hexa ];
|
||||
};
|
||||
}
|
||||
48
pkgs/development/tools/rust/crate2nix/default.nix
Normal file
48
pkgs/development/tools/rust/crate2nix/default.nix
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
{ lib
|
||||
, rustPlatform
|
||||
, fetchFromGitHub
|
||||
, makeWrapper
|
||||
|
||||
, cargo
|
||||
, nix
|
||||
, nix-prefetch-git
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "crate2nix";
|
||||
version = "0.10.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "kolloch";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "sha256-JaF9/H3m4Wrc5MtXcONkOAgKVkswLVw0yZe0dBr2e4Y=";
|
||||
};
|
||||
|
||||
sourceRoot = "source/crate2nix";
|
||||
|
||||
cargoSha256 = "sha256-PD7R1vcb3FKd4hfpViKyvfCExJ5H1Xo2HPYden5zpxQ=";
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
# Tests use nix(1), which tries (and fails) to set up /nix/var inside the
|
||||
# sandbox
|
||||
doCheck = false;
|
||||
|
||||
postFixup = ''
|
||||
wrapProgram $out/bin/crate2nix \
|
||||
--suffix PATH ":" ${lib.makeBinPath [ cargo nix nix-prefetch-git ]}
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A Nix build file generator for Rust crates.";
|
||||
longDescription = ''
|
||||
Crate2nix generates Nix files from Cargo.toml/lock files
|
||||
so that you can build every crate individually in a Nix sandbox.
|
||||
'';
|
||||
homepage = "https://github.com/kolloch/crate2nix";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ kolloch cole-h ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
31
pkgs/development/tools/rust/devserver/default.nix
Normal file
31
pkgs/development/tools/rust/devserver/default.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchCrate
|
||||
, rustPlatform
|
||||
, openssl
|
||||
, pkg-config
|
||||
, CoreServices
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "devserver";
|
||||
version = "0.4.0";
|
||||
|
||||
src = fetchCrate {
|
||||
inherit pname version;
|
||||
sha256 = "sha256-UcrLzsALwl0zqNRMS1kTTXsR6wN8XDd5Iq+yrudh6M4=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
|
||||
buildInputs = [ openssl ] ++ lib.optional stdenv.isDarwin CoreServices;
|
||||
|
||||
cargoSha256 = "sha256-XlrQ6CvjeWnzvfaeNbe8FtMXMVSQNLxDVIEjyHm57Js=";
|
||||
|
||||
meta = with lib; {
|
||||
description = "An extremely tiny tool to serve a static folder locally";
|
||||
homepage = "https://github.com/kettle11/devserver";
|
||||
license = licenses.zlib;
|
||||
maintainers = with maintainers; [ nickhu ];
|
||||
};
|
||||
}
|
||||
37
pkgs/development/tools/rust/duckscript/default.nix
Normal file
37
pkgs/development/tools/rust/duckscript/default.nix
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchurl
|
||||
, runCommand
|
||||
, fetchCrate
|
||||
, rustPlatform
|
||||
, Security
|
||||
, openssl
|
||||
, pkg-config
|
||||
, SystemConfiguration
|
||||
, libiconv
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "duckscript_cli";
|
||||
version = "0.8.10";
|
||||
|
||||
src = fetchCrate {
|
||||
inherit pname version;
|
||||
sha256 = "sha256-cMvcCX8ViCcUFMuxAPo3/wxXvg5swAcBrLx1x7lSwvM=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
|
||||
buildInputs = [ openssl ]
|
||||
++ lib.optionals stdenv.isDarwin [ Security SystemConfiguration libiconv ];
|
||||
|
||||
cargoSha256 = "sha256-8ywMLXFmdq119K/hl1hpsVhzG+nrdO4eux3lAqUjB+A=";
|
||||
|
||||
meta = with lib; {
|
||||
description = "Simple, extendable and embeddable scripting language.";
|
||||
homepage = "https://github.com/sagiegurari/duckscript";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ mkg20001 ];
|
||||
mainProgram = "duck";
|
||||
};
|
||||
}
|
||||
49
pkgs/development/tools/rust/maturin/default.nix
Normal file
49
pkgs/development/tools/rust/maturin/default.nix
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
{ callPackage
|
||||
, lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, rustPlatform
|
||||
, pkg-config
|
||||
, dbus
|
||||
, libiconv
|
||||
, Security
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "maturin";
|
||||
version = "0.12.9";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "PyO3";
|
||||
repo = "maturin";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-FskCBviLl1yafPOlsp/IjaEOlGUuWLcGlxDrNA/qf8k=";
|
||||
};
|
||||
|
||||
cargoHash = "sha256-zakSQptKK/X/8MDJxRUHTDIGPh77cq5PrOmPEneD0YM=";
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
|
||||
buildInputs = lib.optionals stdenv.isLinux [ dbus ]
|
||||
++ lib.optionals stdenv.isDarwin [ Security libiconv ];
|
||||
|
||||
# Requires network access, fails in sandbox.
|
||||
doCheck = false;
|
||||
|
||||
passthru.tests.pyo3 = callPackage ./pyo3-test {};
|
||||
|
||||
meta = with lib; {
|
||||
description = "Build and publish Rust crates Python packages";
|
||||
longDescription = ''
|
||||
Build and publish Rust crates with PyO3, rust-cpython, and
|
||||
cffi bindings as well as Rust binaries as Python packages.
|
||||
|
||||
This project is meant as a zero-configuration replacement for
|
||||
setuptools-rust and Milksnake. It supports building wheels for
|
||||
Python and can upload them to PyPI.
|
||||
'';
|
||||
homepage = "https://github.com/PyO3/maturin";
|
||||
license = licenses.asl20;
|
||||
maintainers = [ ];
|
||||
};
|
||||
}
|
||||
688
pkgs/development/tools/rust/maturin/pyo3-test/Cargo.lock.patch
Normal file
688
pkgs/development/tools/rust/maturin/pyo3-test/Cargo.lock.patch
Normal file
|
|
@ -0,0 +1,688 @@
|
|||
diff --git a/Cargo.lock b/Cargo.lock
|
||||
new file mode 100644
|
||||
index 000000000..5e698d4ff
|
||||
--- /dev/null
|
||||
+++ b/Cargo.lock
|
||||
@@ -0,0 +1,682 @@
|
||||
+# This file is automatically @generated by Cargo.
|
||||
+# It is not intended for manual editing.
|
||||
+[[package]]
|
||||
+name = "ahash"
|
||||
+version = "0.4.7"
|
||||
+source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "739f4a8db6605981345c5654f3a85b056ce52f37a39d34da03f25bf2151ea16e"
|
||||
+
|
||||
+[[package]]
|
||||
+name = "assert_approx_eq"
|
||||
+version = "1.1.0"
|
||||
+source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "3c07dab4369547dbe5114677b33fbbf724971019f3818172d59a97a61c774ffd"
|
||||
+
|
||||
+[[package]]
|
||||
+name = "autocfg"
|
||||
+version = "1.0.1"
|
||||
+source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a"
|
||||
+
|
||||
+[[package]]
|
||||
+name = "bitflags"
|
||||
+version = "1.2.1"
|
||||
+source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693"
|
||||
+
|
||||
+[[package]]
|
||||
+name = "byteorder"
|
||||
+version = "1.4.2"
|
||||
+source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "ae44d1a3d5a19df61dd0c8beb138458ac2a53a7ac09eba97d55592540004306b"
|
||||
+
|
||||
+[[package]]
|
||||
+name = "cfg-if"
|
||||
+version = "1.0.0"
|
||||
+source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
|
||||
+
|
||||
+[[package]]
|
||||
+name = "const_fn"
|
||||
+version = "0.4.5"
|
||||
+source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "28b9d6de7f49e22cf97ad17fc4036ece69300032f45f78f30b4a4482cdc3f4a6"
|
||||
+
|
||||
+[[package]]
|
||||
+name = "crossbeam-channel"
|
||||
+version = "0.5.0"
|
||||
+source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "dca26ee1f8d361640700bde38b2c37d8c22b3ce2d360e1fc1c74ea4b0aa7d775"
|
||||
+dependencies = [
|
||||
+ "cfg-if",
|
||||
+ "crossbeam-utils",
|
||||
+]
|
||||
+
|
||||
+[[package]]
|
||||
+name = "crossbeam-deque"
|
||||
+version = "0.8.0"
|
||||
+source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "94af6efb46fef72616855b036a624cf27ba656ffc9be1b9a3c931cfc7749a9a9"
|
||||
+dependencies = [
|
||||
+ "cfg-if",
|
||||
+ "crossbeam-epoch",
|
||||
+ "crossbeam-utils",
|
||||
+]
|
||||
+
|
||||
+[[package]]
|
||||
+name = "crossbeam-epoch"
|
||||
+version = "0.9.1"
|
||||
+source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "a1aaa739f95311c2c7887a76863f500026092fb1dce0161dab577e559ef3569d"
|
||||
+dependencies = [
|
||||
+ "cfg-if",
|
||||
+ "const_fn",
|
||||
+ "crossbeam-utils",
|
||||
+ "lazy_static",
|
||||
+ "memoffset",
|
||||
+ "scopeguard",
|
||||
+]
|
||||
+
|
||||
+[[package]]
|
||||
+name = "crossbeam-utils"
|
||||
+version = "0.8.1"
|
||||
+source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "02d96d1e189ef58269ebe5b97953da3274d83a93af647c2ddd6f9dab28cedb8d"
|
||||
+dependencies = [
|
||||
+ "autocfg",
|
||||
+ "cfg-if",
|
||||
+ "lazy_static",
|
||||
+]
|
||||
+
|
||||
+[[package]]
|
||||
+name = "ctor"
|
||||
+version = "0.1.19"
|
||||
+source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "e8f45d9ad417bcef4817d614a501ab55cdd96a6fdb24f49aab89a54acfd66b19"
|
||||
+dependencies = [
|
||||
+ "quote",
|
||||
+ "syn",
|
||||
+]
|
||||
+
|
||||
+[[package]]
|
||||
+name = "either"
|
||||
+version = "1.6.1"
|
||||
+source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457"
|
||||
+
|
||||
+[[package]]
|
||||
+name = "getrandom"
|
||||
+version = "0.1.16"
|
||||
+source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce"
|
||||
+dependencies = [
|
||||
+ "cfg-if",
|
||||
+ "libc",
|
||||
+ "wasi",
|
||||
+]
|
||||
+
|
||||
+[[package]]
|
||||
+name = "ghost"
|
||||
+version = "0.1.2"
|
||||
+source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "1a5bcf1bbeab73aa4cf2fde60a846858dc036163c7c33bec309f8d17de785479"
|
||||
+dependencies = [
|
||||
+ "proc-macro2",
|
||||
+ "quote",
|
||||
+ "syn",
|
||||
+]
|
||||
+
|
||||
+[[package]]
|
||||
+name = "glob"
|
||||
+version = "0.3.0"
|
||||
+source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574"
|
||||
+
|
||||
+[[package]]
|
||||
+name = "hashbrown"
|
||||
+version = "0.9.1"
|
||||
+source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "d7afe4a420e3fe79967a00898cc1f4db7c8a49a9333a29f8a4bd76a253d5cd04"
|
||||
+dependencies = [
|
||||
+ "ahash",
|
||||
+]
|
||||
+
|
||||
+[[package]]
|
||||
+name = "hermit-abi"
|
||||
+version = "0.1.18"
|
||||
+source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "322f4de77956e22ed0e5032c359a0f1273f1f7f0d79bfa3b8ffbc730d7fbcc5c"
|
||||
+dependencies = [
|
||||
+ "libc",
|
||||
+]
|
||||
+
|
||||
+[[package]]
|
||||
+name = "indoc"
|
||||
+version = "0.3.6"
|
||||
+source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "47741a8bc60fb26eb8d6e0238bbb26d8575ff623fdc97b1a2c00c050b9684ed8"
|
||||
+dependencies = [
|
||||
+ "indoc-impl",
|
||||
+ "proc-macro-hack",
|
||||
+]
|
||||
+
|
||||
+[[package]]
|
||||
+name = "indoc-impl"
|
||||
+version = "0.3.6"
|
||||
+source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "ce046d161f000fffde5f432a0d034d0341dc152643b2598ed5bfce44c4f3a8f0"
|
||||
+dependencies = [
|
||||
+ "proc-macro-hack",
|
||||
+ "proc-macro2",
|
||||
+ "quote",
|
||||
+ "syn",
|
||||
+ "unindent",
|
||||
+]
|
||||
+
|
||||
+[[package]]
|
||||
+name = "instant"
|
||||
+version = "0.1.9"
|
||||
+source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "61124eeebbd69b8190558df225adf7e4caafce0d743919e5d6b19652314ec5ec"
|
||||
+dependencies = [
|
||||
+ "cfg-if",
|
||||
+]
|
||||
+
|
||||
+[[package]]
|
||||
+name = "inventory"
|
||||
+version = "0.1.10"
|
||||
+source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "0f0f7efb804ec95e33db9ad49e4252f049e37e8b0a4652e3cd61f7999f2eff7f"
|
||||
+dependencies = [
|
||||
+ "ctor",
|
||||
+ "ghost",
|
||||
+ "inventory-impl",
|
||||
+]
|
||||
+
|
||||
+[[package]]
|
||||
+name = "inventory-impl"
|
||||
+version = "0.1.10"
|
||||
+source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "75c094e94816723ab936484666968f5b58060492e880f3c8d00489a1e244fa51"
|
||||
+dependencies = [
|
||||
+ "proc-macro2",
|
||||
+ "quote",
|
||||
+ "syn",
|
||||
+]
|
||||
+
|
||||
+[[package]]
|
||||
+name = "itoa"
|
||||
+version = "0.4.7"
|
||||
+source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "dd25036021b0de88a0aff6b850051563c6516d0bf53f8638938edbb9de732736"
|
||||
+
|
||||
+[[package]]
|
||||
+name = "lazy_static"
|
||||
+version = "1.4.0"
|
||||
+source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
|
||||
+
|
||||
+[[package]]
|
||||
+name = "libc"
|
||||
+version = "0.2.86"
|
||||
+source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "b7282d924be3275cec7f6756ff4121987bc6481325397dde6ba3e7802b1a8b1c"
|
||||
+
|
||||
+[[package]]
|
||||
+name = "lock_api"
|
||||
+version = "0.4.2"
|
||||
+source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "dd96ffd135b2fd7b973ac026d28085defbe8983df057ced3eb4f2130b0831312"
|
||||
+dependencies = [
|
||||
+ "scopeguard",
|
||||
+]
|
||||
+
|
||||
+[[package]]
|
||||
+name = "memoffset"
|
||||
+version = "0.6.1"
|
||||
+source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "157b4208e3059a8f9e78d559edc658e13df41410cb3ae03979c83130067fdd87"
|
||||
+dependencies = [
|
||||
+ "autocfg",
|
||||
+]
|
||||
+
|
||||
+[[package]]
|
||||
+name = "num-bigint"
|
||||
+version = "0.3.1"
|
||||
+source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "5e9a41747ae4633fce5adffb4d2e81ffc5e89593cb19917f8fb2cc5ff76507bf"
|
||||
+dependencies = [
|
||||
+ "autocfg",
|
||||
+ "num-integer",
|
||||
+ "num-traits",
|
||||
+]
|
||||
+
|
||||
+[[package]]
|
||||
+name = "num-complex"
|
||||
+version = "0.3.1"
|
||||
+source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "747d632c0c558b87dbabbe6a82f3b4ae03720d0646ac5b7b4dae89394be5f2c5"
|
||||
+dependencies = [
|
||||
+ "num-traits",
|
||||
+]
|
||||
+
|
||||
+[[package]]
|
||||
+name = "num-integer"
|
||||
+version = "0.1.44"
|
||||
+source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db"
|
||||
+dependencies = [
|
||||
+ "autocfg",
|
||||
+ "num-traits",
|
||||
+]
|
||||
+
|
||||
+[[package]]
|
||||
+name = "num-traits"
|
||||
+version = "0.2.14"
|
||||
+source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290"
|
||||
+dependencies = [
|
||||
+ "autocfg",
|
||||
+]
|
||||
+
|
||||
+[[package]]
|
||||
+name = "num_cpus"
|
||||
+version = "1.13.0"
|
||||
+source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3"
|
||||
+dependencies = [
|
||||
+ "hermit-abi",
|
||||
+ "libc",
|
||||
+]
|
||||
+
|
||||
+[[package]]
|
||||
+name = "parking_lot"
|
||||
+version = "0.11.1"
|
||||
+source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "6d7744ac029df22dca6284efe4e898991d28e3085c706c972bcd7da4a27a15eb"
|
||||
+dependencies = [
|
||||
+ "instant",
|
||||
+ "lock_api",
|
||||
+ "parking_lot_core",
|
||||
+]
|
||||
+
|
||||
+[[package]]
|
||||
+name = "parking_lot_core"
|
||||
+version = "0.8.3"
|
||||
+source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "fa7a782938e745763fe6907fc6ba86946d72f49fe7e21de074e08128a99fb018"
|
||||
+dependencies = [
|
||||
+ "cfg-if",
|
||||
+ "instant",
|
||||
+ "libc",
|
||||
+ "redox_syscall",
|
||||
+ "smallvec",
|
||||
+ "winapi",
|
||||
+]
|
||||
+
|
||||
+[[package]]
|
||||
+name = "paste"
|
||||
+version = "0.1.18"
|
||||
+source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "45ca20c77d80be666aef2b45486da86238fabe33e38306bd3118fe4af33fa880"
|
||||
+dependencies = [
|
||||
+ "paste-impl",
|
||||
+ "proc-macro-hack",
|
||||
+]
|
||||
+
|
||||
+[[package]]
|
||||
+name = "paste-impl"
|
||||
+version = "0.1.18"
|
||||
+source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "d95a7db200b97ef370c8e6de0088252f7e0dfff7d047a28528e47456c0fc98b6"
|
||||
+dependencies = [
|
||||
+ "proc-macro-hack",
|
||||
+]
|
||||
+
|
||||
+[[package]]
|
||||
+name = "ppv-lite86"
|
||||
+version = "0.2.10"
|
||||
+source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857"
|
||||
+
|
||||
+[[package]]
|
||||
+name = "proc-macro-hack"
|
||||
+version = "0.5.19"
|
||||
+source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5"
|
||||
+
|
||||
+[[package]]
|
||||
+name = "proc-macro2"
|
||||
+version = "1.0.24"
|
||||
+source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "1e0704ee1a7e00d7bb417d0770ea303c1bccbabf0ef1667dae92b5967f5f8a71"
|
||||
+dependencies = [
|
||||
+ "unicode-xid",
|
||||
+]
|
||||
+
|
||||
+[[package]]
|
||||
+name = "proptest"
|
||||
+version = "0.10.1"
|
||||
+source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "12e6c80c1139113c28ee4670dc50cc42915228b51f56a9e407f0ec60f966646f"
|
||||
+dependencies = [
|
||||
+ "bitflags",
|
||||
+ "byteorder",
|
||||
+ "lazy_static",
|
||||
+ "num-traits",
|
||||
+ "quick-error",
|
||||
+ "rand",
|
||||
+ "rand_chacha",
|
||||
+ "rand_xorshift",
|
||||
+ "regex-syntax",
|
||||
+]
|
||||
+
|
||||
+[[package]]
|
||||
+name = "pyo3"
|
||||
+version = "0.13.2"
|
||||
+dependencies = [
|
||||
+ "assert_approx_eq",
|
||||
+ "cfg-if",
|
||||
+ "ctor",
|
||||
+ "hashbrown",
|
||||
+ "indoc",
|
||||
+ "inventory",
|
||||
+ "libc",
|
||||
+ "num-bigint",
|
||||
+ "num-complex",
|
||||
+ "parking_lot",
|
||||
+ "paste",
|
||||
+ "proptest",
|
||||
+ "pyo3",
|
||||
+ "pyo3-macros",
|
||||
+ "rustversion",
|
||||
+ "serde",
|
||||
+ "serde_json",
|
||||
+ "trybuild",
|
||||
+ "unindent",
|
||||
+]
|
||||
+
|
||||
+[[package]]
|
||||
+name = "pyo3-macros"
|
||||
+version = "0.13.2"
|
||||
+dependencies = [
|
||||
+ "pyo3-macros-backend",
|
||||
+ "quote",
|
||||
+ "syn",
|
||||
+]
|
||||
+
|
||||
+[[package]]
|
||||
+name = "pyo3-macros-backend"
|
||||
+version = "0.13.2"
|
||||
+dependencies = [
|
||||
+ "proc-macro2",
|
||||
+ "quote",
|
||||
+ "syn",
|
||||
+]
|
||||
+
|
||||
+[[package]]
|
||||
+name = "quick-error"
|
||||
+version = "1.2.3"
|
||||
+source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0"
|
||||
+
|
||||
+[[package]]
|
||||
+name = "quote"
|
||||
+version = "1.0.9"
|
||||
+source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "c3d0b9745dc2debf507c8422de05d7226cc1f0644216dfdfead988f9b1ab32a7"
|
||||
+dependencies = [
|
||||
+ "proc-macro2",
|
||||
+]
|
||||
+
|
||||
+[[package]]
|
||||
+name = "rand"
|
||||
+version = "0.7.3"
|
||||
+source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03"
|
||||
+dependencies = [
|
||||
+ "getrandom",
|
||||
+ "libc",
|
||||
+ "rand_chacha",
|
||||
+ "rand_core",
|
||||
+ "rand_hc",
|
||||
+]
|
||||
+
|
||||
+[[package]]
|
||||
+name = "rand_chacha"
|
||||
+version = "0.2.2"
|
||||
+source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402"
|
||||
+dependencies = [
|
||||
+ "ppv-lite86",
|
||||
+ "rand_core",
|
||||
+]
|
||||
+
|
||||
+[[package]]
|
||||
+name = "rand_core"
|
||||
+version = "0.5.1"
|
||||
+source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19"
|
||||
+dependencies = [
|
||||
+ "getrandom",
|
||||
+]
|
||||
+
|
||||
+[[package]]
|
||||
+name = "rand_hc"
|
||||
+version = "0.2.0"
|
||||
+source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c"
|
||||
+dependencies = [
|
||||
+ "rand_core",
|
||||
+]
|
||||
+
|
||||
+[[package]]
|
||||
+name = "rand_xorshift"
|
||||
+version = "0.2.0"
|
||||
+source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "77d416b86801d23dde1aa643023b775c3a462efc0ed96443add11546cdf1dca8"
|
||||
+dependencies = [
|
||||
+ "rand_core",
|
||||
+]
|
||||
+
|
||||
+[[package]]
|
||||
+name = "rayon"
|
||||
+version = "1.5.0"
|
||||
+source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "8b0d8e0819fadc20c74ea8373106ead0600e3a67ef1fe8da56e39b9ae7275674"
|
||||
+dependencies = [
|
||||
+ "autocfg",
|
||||
+ "crossbeam-deque",
|
||||
+ "either",
|
||||
+ "rayon-core",
|
||||
+]
|
||||
+
|
||||
+[[package]]
|
||||
+name = "rayon-core"
|
||||
+version = "1.9.0"
|
||||
+source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "9ab346ac5921dc62ffa9f89b7a773907511cdfa5490c572ae9be1be33e8afa4a"
|
||||
+dependencies = [
|
||||
+ "crossbeam-channel",
|
||||
+ "crossbeam-deque",
|
||||
+ "crossbeam-utils",
|
||||
+ "lazy_static",
|
||||
+ "num_cpus",
|
||||
+]
|
||||
+
|
||||
+[[package]]
|
||||
+name = "redox_syscall"
|
||||
+version = "0.2.5"
|
||||
+source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "94341e4e44e24f6b591b59e47a8a027df12e008d73fd5672dbea9cc22f4507d9"
|
||||
+dependencies = [
|
||||
+ "bitflags",
|
||||
+]
|
||||
+
|
||||
+[[package]]
|
||||
+name = "regex-syntax"
|
||||
+version = "0.6.22"
|
||||
+source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "b5eb417147ba9860a96cfe72a0b93bf88fee1744b5636ec99ab20c1aa9376581"
|
||||
+
|
||||
+[[package]]
|
||||
+name = "rustapi-module"
|
||||
+version = "0.1.0"
|
||||
+dependencies = [
|
||||
+ "pyo3",
|
||||
+]
|
||||
+
|
||||
+[[package]]
|
||||
+name = "rustversion"
|
||||
+version = "1.0.4"
|
||||
+source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "cb5d2a036dc6d2d8fd16fde3498b04306e29bd193bf306a57427019b823d5acd"
|
||||
+
|
||||
+[[package]]
|
||||
+name = "ryu"
|
||||
+version = "1.0.5"
|
||||
+source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e"
|
||||
+
|
||||
+[[package]]
|
||||
+name = "scopeguard"
|
||||
+version = "1.1.0"
|
||||
+source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
|
||||
+
|
||||
+[[package]]
|
||||
+name = "serde"
|
||||
+version = "1.0.123"
|
||||
+source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "92d5161132722baa40d802cc70b15262b98258453e85e5d1d365c757c73869ae"
|
||||
+dependencies = [
|
||||
+ "serde_derive",
|
||||
+]
|
||||
+
|
||||
+[[package]]
|
||||
+name = "serde_derive"
|
||||
+version = "1.0.123"
|
||||
+source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "9391c295d64fc0abb2c556bad848f33cb8296276b1ad2677d1ae1ace4f258f31"
|
||||
+dependencies = [
|
||||
+ "proc-macro2",
|
||||
+ "quote",
|
||||
+ "syn",
|
||||
+]
|
||||
+
|
||||
+[[package]]
|
||||
+name = "serde_json"
|
||||
+version = "1.0.62"
|
||||
+source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "ea1c6153794552ea7cf7cf63b1231a25de00ec90db326ba6264440fa08e31486"
|
||||
+dependencies = [
|
||||
+ "itoa",
|
||||
+ "ryu",
|
||||
+ "serde",
|
||||
+]
|
||||
+
|
||||
+[[package]]
|
||||
+name = "smallvec"
|
||||
+version = "1.6.1"
|
||||
+source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "fe0f37c9e8f3c5a4a66ad655a93c74daac4ad00c441533bf5c6e7990bb42604e"
|
||||
+
|
||||
+[[package]]
|
||||
+name = "syn"
|
||||
+version = "1.0.60"
|
||||
+source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "c700597eca8a5a762beb35753ef6b94df201c81cca676604f547495a0d7f0081"
|
||||
+dependencies = [
|
||||
+ "proc-macro2",
|
||||
+ "quote",
|
||||
+ "unicode-xid",
|
||||
+]
|
||||
+
|
||||
+[[package]]
|
||||
+name = "termcolor"
|
||||
+version = "1.1.2"
|
||||
+source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "2dfed899f0eb03f32ee8c6a0aabdb8a7949659e3466561fc0adf54e26d88c5f4"
|
||||
+dependencies = [
|
||||
+ "winapi-util",
|
||||
+]
|
||||
+
|
||||
+[[package]]
|
||||
+name = "toml"
|
||||
+version = "0.5.8"
|
||||
+source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "a31142970826733df8241ef35dc040ef98c679ab14d7c3e54d827099b3acecaa"
|
||||
+dependencies = [
|
||||
+ "serde",
|
||||
+]
|
||||
+
|
||||
+[[package]]
|
||||
+name = "trybuild"
|
||||
+version = "1.0.41"
|
||||
+source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "99471a206425fba51842a9186315f32d91c56eadc21ea4c21f847b59cf778f8b"
|
||||
+dependencies = [
|
||||
+ "glob",
|
||||
+ "lazy_static",
|
||||
+ "serde",
|
||||
+ "serde_json",
|
||||
+ "termcolor",
|
||||
+ "toml",
|
||||
+]
|
||||
+
|
||||
+[[package]]
|
||||
+name = "unicode-xid"
|
||||
+version = "0.2.1"
|
||||
+source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "f7fe0bb3479651439c9112f72b6c505038574c9fbb575ed1bf3b797fa39dd564"
|
||||
+
|
||||
+[[package]]
|
||||
+name = "unindent"
|
||||
+version = "0.1.7"
|
||||
+source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "f14ee04d9415b52b3aeab06258a3f07093182b88ba0f9b8d203f211a7a7d41c7"
|
||||
+
|
||||
+[[package]]
|
||||
+name = "wasi"
|
||||
+version = "0.9.0+wasi-snapshot-preview1"
|
||||
+source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519"
|
||||
+
|
||||
+[[package]]
|
||||
+name = "winapi"
|
||||
+version = "0.3.9"
|
||||
+source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
|
||||
+dependencies = [
|
||||
+ "winapi-i686-pc-windows-gnu",
|
||||
+ "winapi-x86_64-pc-windows-gnu",
|
||||
+]
|
||||
+
|
||||
+[[package]]
|
||||
+name = "winapi-i686-pc-windows-gnu"
|
||||
+version = "0.4.0"
|
||||
+source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
|
||||
+
|
||||
+[[package]]
|
||||
+name = "winapi-util"
|
||||
+version = "0.1.5"
|
||||
+source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178"
|
||||
+dependencies = [
|
||||
+ "winapi",
|
||||
+]
|
||||
+
|
||||
+[[package]]
|
||||
+name = "winapi-x86_64-pc-windows-gnu"
|
||||
+version = "0.4.0"
|
||||
+source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
|
||||
+
|
||||
+[[package]]
|
||||
+name = "word-count"
|
||||
+version = "0.1.0"
|
||||
+dependencies = [
|
||||
+ "pyo3",
|
||||
+ "rayon",
|
||||
+]
|
||||
12
pkgs/development/tools/rust/maturin/pyo3-test/default.nix
Normal file
12
pkgs/development/tools/rust/maturin/pyo3-test/default.nix
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
{ python3
|
||||
, rustPlatform
|
||||
}:
|
||||
|
||||
python3.pkgs.callPackage ./generic.nix {
|
||||
buildAndTestSubdir = "examples/word-count";
|
||||
|
||||
nativeBuildInputs = with rustPlatform; [
|
||||
cargoSetupHook
|
||||
maturinBuildHook
|
||||
];
|
||||
}
|
||||
45
pkgs/development/tools/rust/maturin/pyo3-test/generic.nix
Normal file
45
pkgs/development/tools/rust/maturin/pyo3-test/generic.nix
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
# Derivation prototype, used by maturin and setuptools-rust
|
||||
# passthrough tests.
|
||||
|
||||
{ lib
|
||||
, fetchFromGitHub
|
||||
, python
|
||||
, rustPlatform
|
||||
|
||||
, nativeBuildInputs
|
||||
|
||||
, buildAndTestSubdir ? null
|
||||
, format ? "pyproject"
|
||||
, preConfigure ? ""
|
||||
}:
|
||||
|
||||
python.pkgs.buildPythonPackage rec {
|
||||
pname = "word-count";
|
||||
version = "0.13.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "PyO3";
|
||||
repo = "pyo3";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-NOMrrfo8WjlPhtGxWUOPJS/UDDdbLQRCXR++Zd6JmIA=";
|
||||
};
|
||||
|
||||
cargoDeps = rustPlatform.fetchCargoTarball {
|
||||
inherit src patches;
|
||||
name = "${pname}-${version}";
|
||||
hash = "sha256-u3L9nXHKILznyZTgxdvZyOCQZFZhuADrtI7zXYQzrbE=";
|
||||
};
|
||||
|
||||
patches = [ ./Cargo.lock.patch ];
|
||||
|
||||
inherit buildAndTestSubdir format nativeBuildInputs preConfigure;
|
||||
|
||||
pythonImportsCheck = [ "word_count" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "PyO3 word count example";
|
||||
homepage = "https://github.com/PyO3/pyo3";
|
||||
license = licenses.asl20;
|
||||
maintainers = [ ];
|
||||
};
|
||||
}
|
||||
21
pkgs/development/tools/rust/ograc/default.nix
Normal file
21
pkgs/development/tools/rust/ograc/default.nix
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{ fetchFromGitLab, lib, rustPlatform, }:
|
||||
|
||||
rustPlatform.buildRustPackage {
|
||||
pname = "ograc";
|
||||
version = "0.1.6";
|
||||
src = fetchFromGitLab {
|
||||
owner = "lirnril";
|
||||
repo = "ograc";
|
||||
rev = "d09b3102ff7a364bf2593589327a16a473bd4f25";
|
||||
sha256 = "sha256-vdHPFY6zZ/OBNlJO3N/6YXcvlddw2wYHgFWI0yfSgVo=";
|
||||
};
|
||||
cargoSha256 = "sha256-HAeEd7HY+hbTUOkIt6aTfvPYLRPtdAcUGvkuBUMjohA=";
|
||||
|
||||
meta = with lib; {
|
||||
description = "like cargo, but backwards";
|
||||
homepage = "https://crates.io/crates/ograc";
|
||||
license = licenses.agpl3Plus;
|
||||
maintainers = with maintainers; [ sciencentistguy ];
|
||||
};
|
||||
}
|
||||
|
||||
24
pkgs/development/tools/rust/panamax/default.nix
Normal file
24
pkgs/development/tools/rust/panamax/default.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{ lib, rustPlatform, fetchCrate, pkg-config, openssl, stdenv, Security }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "panamax";
|
||||
version = "1.0.3";
|
||||
|
||||
src = fetchCrate {
|
||||
inherit pname version;
|
||||
sha256 = "sha256-w4waFdzd/Ps0whOp39QLBE/YF2eyc4t2Ili7FskUt1M=";
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-52snmkTFHI26xJo9qJkmqh1M5lLzhDxw8WT6uFd57aw=";
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
|
||||
buildInputs = [ openssl ] ++ lib.optional stdenv.isDarwin Security;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Mirror rustup and crates.io repositories for offline Rust and cargo usage";
|
||||
homepage = "https://github.com/panamax-rs/panamax";
|
||||
license = with licenses; [ mit /* or */ asl20 ];
|
||||
maintainers = with maintainers; [ figsoda ];
|
||||
};
|
||||
}
|
||||
24
pkgs/development/tools/rust/probe-rs-cli/default.nix
Normal file
24
pkgs/development/tools/rust/probe-rs-cli/default.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{ lib, stdenv, rustPlatform, fetchCrate, pkg-config, libusb1, AppKit }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "probe-rs-cli";
|
||||
version = "0.12.0";
|
||||
|
||||
src = fetchCrate {
|
||||
inherit pname version;
|
||||
sha256 = "sha256-XYrB/aKuFCe0FNe6N9vqDdr408tAiN6YvT5BL6lCxmU=";
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-aXSJMSGNl2fzob1j/qiPHHZLisYQeU1gUO5cYbzSHYA=";
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = [ libusb1 ] ++ lib.optionals stdenv.isDarwin [ AppKit ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "CLI tool for on-chip debugging and flashing of ARM chips";
|
||||
homepage = "https://probe.rs/";
|
||||
changelog = "https://github.com/probe-rs/probe-rs/blob/v${version}/CHANGELOG.md";
|
||||
license = with licenses; [ asl20 /* or */ mit ];
|
||||
maintainers = with maintainers; [ xgroleau ];
|
||||
};
|
||||
}
|
||||
26
pkgs/development/tools/rust/probe-run/default.nix
Normal file
26
pkgs/development/tools/rust/probe-run/default.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{ lib, stdenv, rustPlatform, fetchCrate, pkg-config, libusb1
|
||||
, libiconv, AppKit, IOKit }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "probe-run";
|
||||
version = "0.3.3";
|
||||
|
||||
src = fetchCrate {
|
||||
inherit pname version;
|
||||
sha256 = "sha256-7o0aRiCxWoDoMysXIPyiBqH/8TtFo87im6Y0OFL0cTA=";
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-vREz3FTZXMrc18LXIycJXX6SgW6IKGIgL/+79dMfNjk=";
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = [ libusb1 ]
|
||||
++ lib.optionals stdenv.isDarwin [ libiconv AppKit IOKit ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Run embedded programs just like native ones.";
|
||||
homepage = "https://github.com/knurling-rs/probe-run";
|
||||
changelog = "https://github.com/knurling-rs/probe-run/blob/v${version}/CHANGELOG.md";
|
||||
license = with licenses; [ asl20 /* or */ mit ];
|
||||
maintainers = with maintainers; [ hoverbear newam ];
|
||||
};
|
||||
}
|
||||
50
pkgs/development/tools/rust/racer/default.nix
Normal file
50
pkgs/development/tools/rust/racer/default.nix
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
{ lib, rustPlatform, fetchCrate, makeWrapper, stdenv, Security }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "racer";
|
||||
version = "2.2.1";
|
||||
|
||||
src = fetchCrate {
|
||||
inherit pname version;
|
||||
sha256 = "sha256-uAVtJwOyhe1lPz+MUUFCgHJPVGuIk/lNUkQWiNdOZ5Y=";
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-U2mI1y6t8CwxW/iPcPzxAafu61GNm/XLCKVGuyybV/4=";
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
buildInputs = lib.optional stdenv.isDarwin Security;
|
||||
|
||||
# a nightly compiler is required unless we use this cheat code.
|
||||
RUSTC_BOOTSTRAP = 1;
|
||||
|
||||
RUST_SRC_PATH = rustPlatform.rustLibSrc;
|
||||
postInstall = ''
|
||||
wrapProgram $out/bin/racer --set-default RUST_SRC_PATH ${rustPlatform.rustLibSrc}
|
||||
'';
|
||||
|
||||
checkFlags = [
|
||||
"--skip nameres::test_do_file_search_std"
|
||||
"--skip util::test_get_rust_src_path_rustup_ok"
|
||||
"--skip util::test_get_rust_src_path_not_rust_source_tree"
|
||||
"--skip extern --skip completes_pub_fn --skip find_crate_doc"
|
||||
"--skip follows_use_local_package --skip follows_use_for_reexport"
|
||||
"--skip follows_rand_crate --skip get_completion_in_example_dir"
|
||||
"--skip test_resolve_global_path_in_modules"
|
||||
];
|
||||
|
||||
# [2022-04-06] Its test suite contains two function calls with the
|
||||
# wrong number of arguments, breaking its build.
|
||||
doCheck = false;
|
||||
|
||||
doInstallCheck = true;
|
||||
installCheckPhase = ''
|
||||
$out/bin/racer --version
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A utility intended to provide Rust code completion for editors and IDEs";
|
||||
homepage = "https://github.com/racer-rust/racer";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ jagajaga ];
|
||||
};
|
||||
}
|
||||
22
pkgs/development/tools/rust/rhack/default.nix
Normal file
22
pkgs/development/tools/rust/rhack/default.nix
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
{ lib, rustPlatform, fetchFromGitHub }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "rhack";
|
||||
version = "0.1.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "nakabonne";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "088ynf65szaa86pxwwasn3wwi00z5pn7i8w9gh5dyn983z4d8237";
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-HmBh2qbO/HuNPfHKifq41IB5ResnGka2iaAsnwppm9s=";
|
||||
|
||||
meta = with lib; {
|
||||
description = "Temporary edit external crates that your project depends on";
|
||||
homepage = "https://github.com/nakabonne/rhack";
|
||||
license = licenses.bsd3;
|
||||
maintainers = with maintainers; [ figsoda ];
|
||||
};
|
||||
}
|
||||
27
pkgs/development/tools/rust/roogle/default.nix
Normal file
27
pkgs/development/tools/rust/roogle/default.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
{ lib, rustPlatform, fetchFromGitHub }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "roogle";
|
||||
version = "0.1.4";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "hkmatsumoto";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "1h0agialbvhhiijkdnr47y7babq432limdl6ag2rmjfs7yishn4r";
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-CzFfFKTmBUAafk8PkkWmUkRIyO+yEhmCfN1zsLRq4Iw=";
|
||||
|
||||
postInstall = ''
|
||||
mkdir -p $out/share/roogle
|
||||
cp -r assets $out/share/roogle
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A Rust API search engine which allows you to search functions by names and type signatures";
|
||||
homepage = "https://github.com/hkmatsumoto/roogle";
|
||||
license = with licenses; [ mit /* or */ asl20 ];
|
||||
maintainers = with maintainers; [ figsoda ];
|
||||
};
|
||||
}
|
||||
71
pkgs/development/tools/rust/rust-analyzer/default.nix
Normal file
71
pkgs/development/tools/rust/rust-analyzer/default.nix
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, callPackage
|
||||
, fetchFromGitHub
|
||||
, rustPlatform
|
||||
, CoreServices
|
||||
, cmake
|
||||
, libiconv
|
||||
, useMimalloc ? false
|
||||
, doCheck ? true
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "rust-analyzer-unwrapped";
|
||||
version = "2022-05-17";
|
||||
cargoSha256 = "sha256-H0nuS56mvo5YUAUOsEnR4Cv3iFKixoHK83BcM1PFMA8=";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "rust-lang";
|
||||
repo = "rust-analyzer";
|
||||
rev = version;
|
||||
sha256 = "sha256-vrVpgQYUuJPgK1NMb1nxlCdxjoYo40YkUbZpH2Z2mwM=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Code format and git history check require more dependencies but don't really matter for packaging.
|
||||
# So just ignore them.
|
||||
./ignore-git-and-rustfmt-tests.patch
|
||||
];
|
||||
|
||||
buildAndTestSubdir = "crates/rust-analyzer";
|
||||
|
||||
nativeBuildInputs = lib.optional useMimalloc cmake;
|
||||
|
||||
buildInputs = lib.optionals stdenv.isDarwin [
|
||||
CoreServices
|
||||
libiconv
|
||||
];
|
||||
|
||||
buildFeatures = lib.optional useMimalloc "mimalloc";
|
||||
|
||||
RUST_ANALYZER_REV = version;
|
||||
|
||||
inherit doCheck;
|
||||
preCheck = lib.optionalString doCheck ''
|
||||
export RUST_SRC_PATH=${rustPlatform.rustLibSrc}
|
||||
'';
|
||||
|
||||
doInstallCheck = true;
|
||||
installCheckPhase = ''
|
||||
runHook preInstallCheck
|
||||
versionOutput="$($out/bin/rust-analyzer --version)"
|
||||
echo "'rust-analyzer --version' returns: $versionOutput"
|
||||
[[ "$versionOutput" == "rust-analyzer ${version}" ]]
|
||||
runHook postInstallCheck
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
updateScript = ./update.sh;
|
||||
# FIXME: Pass overrided `rust-analyzer` once `buildRustPackage` also implements #119942
|
||||
tests.neovim-lsp = callPackage ./test-neovim-lsp.nix { };
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "A modular compiler frontend for the Rust language";
|
||||
homepage = "https://rust-analyzer.github.io";
|
||||
license = with licenses; [ mit asl20 ];
|
||||
maintainers = with maintainers; [ oxalica ];
|
||||
mainProgram = "rust-analyzer";
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
--- a/crates/rust-analyzer/tests/slow-tests/tidy.rs
|
||||
+++ b/crates/rust-analyzer/tests/slow-tests/tidy.rs
|
||||
@@ -6,6 +6,7 @@ use std::{
|
||||
use xshell::{cmd, pushd, pushenv, read_file};
|
||||
|
||||
#[test]
|
||||
+#[ignore]
|
||||
fn check_code_formatting() {
|
||||
let _dir = pushd(sourcegen::project_root()).unwrap();
|
||||
let _e = pushenv("RUSTUP_TOOLCHAIN", "stable");
|
||||
@@ -138,6 +139,7 @@ fn check_cargo_toml(path: &Path, text: String) -> () {
|
||||
}
|
||||
|
||||
#[test]
|
||||
+#[ignore]
|
||||
fn check_merge_commits() {
|
||||
let stdout = cmd!("git rev-list --merges --invert-grep --author 'bors\\[bot\\]' HEAD~19..")
|
||||
.read()
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
{ runCommand, cargo, neovim, rust-analyzer, rustc }:
|
||||
runCommand "test-neovim-rust-analyzer" {
|
||||
nativeBuildInputs = [ cargo neovim rust-analyzer rustc ];
|
||||
|
||||
testRustSrc = /* rust */ ''
|
||||
fn main() {
|
||||
let mut var = vec![None];
|
||||
var.push(Some("hello".to_owned()));
|
||||
}
|
||||
'';
|
||||
|
||||
nvimConfig = /* lua */ ''
|
||||
vim.lsp.buf_attach_client(vim.api.nvim_get_current_buf(), vim.lsp.start_client({
|
||||
cmd = { "rust-analyzer" },
|
||||
handlers = {
|
||||
["$/progress"] = function(_, msg, ctx)
|
||||
if msg.token == "rustAnalyzer/Indexing" and msg.value.kind == "end" then
|
||||
vim.cmd("goto 23") -- let mut |var =...
|
||||
vim.lsp.buf.hover()
|
||||
end
|
||||
end,
|
||||
["textDocument/hover"] = function(_, msg, ctx)
|
||||
-- Keep newlines.
|
||||
io.write(msg.contents.value)
|
||||
vim.cmd("q")
|
||||
end,
|
||||
},
|
||||
on_error = function(code)
|
||||
print("error: " .. code)
|
||||
vim.cmd("q")
|
||||
end
|
||||
}))
|
||||
'';
|
||||
|
||||
} ''
|
||||
# neovim requires a writable HOME.
|
||||
export HOME="$(pwd)"
|
||||
|
||||
cargo new --bin test-rust-analyzer
|
||||
cd test-rust-analyzer
|
||||
cat <<<"$testRustSrc" >src/main.rs
|
||||
cat <<<"$nvimConfig" >script.lua
|
||||
|
||||
# `-u` doesn't work
|
||||
result="$(nvim --headless +'lua dofile("script.lua")' src/main.rs)"
|
||||
echo "$result"
|
||||
[[ "$result" == *"var: Vec<Option<String>>"* ]]
|
||||
touch $out
|
||||
''
|
||||
36
pkgs/development/tools/rust/rust-analyzer/update.sh
Executable file
36
pkgs/development/tools/rust/rust-analyzer/update.sh
Executable file
|
|
@ -0,0 +1,36 @@
|
|||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p curl jq nix-prefetch libarchive
|
||||
# shellcheck shell=bash
|
||||
set -euo pipefail
|
||||
cd "$(dirname "$0")"
|
||||
owner=rust-lang
|
||||
repo=rust-analyzer
|
||||
nixpkgs=../../../../..
|
||||
|
||||
# Update lsp
|
||||
|
||||
ver=$(
|
||||
curl -s "https://api.github.com/repos/$owner/$repo/releases" |
|
||||
jq 'map(select(.prerelease | not)) | .[0].tag_name' --raw-output
|
||||
)
|
||||
old_ver=$(sed -nE 's/.*\bversion = "(.*)".*/\1/p' ./default.nix)
|
||||
if grep -q 'cargoSha256 = ""' ./default.nix; then
|
||||
old_ver='broken'
|
||||
fi
|
||||
if [[ "$ver" == "$old_ver" ]]; then
|
||||
echo "Up to date: $ver"
|
||||
exit
|
||||
fi
|
||||
echo "$old_ver -> $ver"
|
||||
|
||||
sha256=$(nix-prefetch -f "$nixpkgs" rust-analyzer-unwrapped.src --rev "$ver")
|
||||
# Clear cargoSha256 to avoid inconsistency.
|
||||
sed -e "s#version = \".*\"#version = \"$ver\"#" \
|
||||
-e "/fetchFromGitHub/,/}/ s#sha256 = \".*\"#sha256 = \"$sha256\"#" \
|
||||
-e "s#cargoSha256 = \".*\"#cargoSha256 = \"sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=\"#" \
|
||||
--in-place ./default.nix
|
||||
|
||||
echo "Prebuilding for cargoSha256"
|
||||
cargo_sha256=$(nix-prefetch "{ sha256 }: (import $nixpkgs {}).rust-analyzer-unwrapped.cargoDeps.overrideAttrs (_: { outputHash = sha256; })")
|
||||
sed "s#cargoSha256 = \".*\"#cargoSha256 = \"$cargo_sha256\"#" \
|
||||
--in-place ./default.nix
|
||||
15
pkgs/development/tools/rust/rust-analyzer/wrapper.nix
Normal file
15
pkgs/development/tools/rust/rust-analyzer/wrapper.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{ lib, rustPlatform, runCommand, makeWrapper, rust-analyzer-unwrapped
|
||||
, pname ? "rust-analyzer"
|
||||
, version ? rust-analyzer-unwrapped.version
|
||||
# Use name from `RUST_SRC_PATH`
|
||||
, rustSrc ? rustPlatform.rustLibSrc
|
||||
}:
|
||||
runCommand "${pname}-${version}" {
|
||||
inherit pname version;
|
||||
inherit (rust-analyzer-unwrapped) src meta;
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
} ''
|
||||
mkdir -p $out/bin
|
||||
makeWrapper ${rust-analyzer-unwrapped}/bin/rust-analyzer $out/bin/rust-analyzer \
|
||||
--set-default RUST_SRC_PATH "${rustSrc}"
|
||||
''
|
||||
25
pkgs/development/tools/rust/rust-script/default.nix
Normal file
25
pkgs/development/tools/rust/rust-script/default.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{ lib, rustPlatform, fetchFromGitHub }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "rust-script";
|
||||
version = "0.20.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "fornwall";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-WcvRkp57VyBB5gQgamFoR6wK1cRJ+3hQqixOBgeapJU=";
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-qJIftByppOrT4g3sxmKRSLhxtpAW4eXWX0FhmMDJNu0=";
|
||||
|
||||
# tests require network access
|
||||
doCheck = false;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Run Rust files and expressions as scripts without any setup or compilation step";
|
||||
homepage = "https://rust-script.org";
|
||||
license = with licenses; [ mit /* or */ asl20 ];
|
||||
maintainers = with maintainers; [ figsoda ];
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
diff --git a/src/main.rs b/src/main.rs
|
||||
index 3cb6896..7f070e0 100644
|
||||
--- a/src/main.rs
|
||||
+++ b/src/main.rs
|
||||
@@ -275,7 +275,9 @@ fn install_single_toolchain(
|
||||
|
||||
// install
|
||||
if maybe_dry_client.is_some() {
|
||||
- rename(&toolchain.dest, toolchain_path)?;
|
||||
+ rename(&toolchain.dest, toolchain_path.clone())?;
|
||||
+ nix_patchelf(toolchain_path)
|
||||
+ .expect("failed to patch toolchain for NixOS");
|
||||
eprintln!(
|
||||
"toolchain `{}` is successfully installed!",
|
||||
toolchain.dest.display()
|
||||
@@ -291,6 +293,45 @@ fn install_single_toolchain(
|
||||
Ok(())
|
||||
}
|
||||
|
||||
+fn nix_patchelf(mut toolchain_path: PathBuf) -> Result<(), Error> {
|
||||
+ toolchain_path.push("bin");
|
||||
+
|
||||
+ for entry in toolchain_path.read_dir()? {
|
||||
+ let entry = entry?;
|
||||
+ if !entry.file_type()?.is_file() {
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ eprintln!("info: you seem to be running NixOS. Attempting to patch {}",
|
||||
+ entry.path().to_str().unwrap());
|
||||
+ let _ = ::std::process::Command::new("@patchelf@/bin/patchelf")
|
||||
+ .arg("--set-interpreter")
|
||||
+ .arg("@dynamicLinker@")
|
||||
+ .arg(entry.path())
|
||||
+ .output();
|
||||
+ }
|
||||
+
|
||||
+ toolchain_path.pop();
|
||||
+ toolchain_path.push("lib");
|
||||
+
|
||||
+ for entry in toolchain_path.read_dir()? {
|
||||
+ let entry = entry?;
|
||||
+ if !entry.file_type()?.is_file() {
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ eprintln!("info: you seem to be running NixOS. Attempting to patch {}",
|
||||
+ entry.path().to_str().unwrap());
|
||||
+ let _ = ::std::process::Command::new("@patchelf@/bin/patchelf")
|
||||
+ .arg("--set-rpath")
|
||||
+ .arg("@libPath@")
|
||||
+ .arg(entry.path())
|
||||
+ .output();
|
||||
+ }
|
||||
+
|
||||
+ Ok(())
|
||||
+}
|
||||
+
|
||||
fn fetch_master_commit(client: &Client, github_token: Option<&str>) -> Result<String, Error> {
|
||||
eprintln!("fetching master commit hash... ");
|
||||
fetch_master_commit_via_git()
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
{ stdenv
|
||||
, lib
|
||||
, fetchFromGitHub
|
||||
, rustPlatform
|
||||
, pkg-config
|
||||
, openssl
|
||||
, runCommand
|
||||
, patchelf
|
||||
, zlib
|
||||
, Security
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "rustup-toolchain-install-master";
|
||||
version = "1.7.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "kennytm";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
hash = "sha256-J25ER/g8Kylw/oTIEl4Gl8i1xmhR+4JM5M5EHpl1ras=";
|
||||
};
|
||||
|
||||
patches =
|
||||
let
|
||||
patchelfPatch = runCommand "0001-dynamically-patchelf-binaries.patch" {
|
||||
CC = stdenv.cc;
|
||||
patchelf = patchelf;
|
||||
libPath = "$ORIGIN/../lib:${lib.makeLibraryPath [ zlib ]}";
|
||||
}
|
||||
''
|
||||
export dynamicLinker=$(cat $CC/nix-support/dynamic-linker)
|
||||
substitute ${./0001-dynamically-patchelf-binaries.patch} $out \
|
||||
--subst-var patchelf \
|
||||
--subst-var dynamicLinker \
|
||||
--subst-var libPath
|
||||
'';
|
||||
in
|
||||
lib.optionals stdenv.isLinux [ patchelfPatch ];
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = [
|
||||
openssl
|
||||
] ++ lib.optionals stdenv.isDarwin [
|
||||
Security
|
||||
];
|
||||
|
||||
cargoSha256 = "n7t8Ap9hdhrjmtKjfdyozf26J7yhu57pedm19CunLF4=";
|
||||
|
||||
meta = with lib; {
|
||||
description = "Install a rustc master toolchain usable from rustup";
|
||||
homepage = "https://github.com/kennytm/rustup-toolchain-install-master";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ davidtwco ];
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
diff --git a/src/dist/component/package.rs b/src/dist/component/package.rs
|
||||
index 3beddf54..0f859b8d 100644
|
||||
--- a/src/dist/component/package.rs
|
||||
+++ b/src/dist/component/package.rs
|
||||
@@ -113,6 +113,7 @@ impl Package for DirectoryPackage {
|
||||
} else {
|
||||
builder.move_file(path.clone(), &src_path)?
|
||||
}
|
||||
+ nix_patchelf_if_needed(&target.prefix().path().join(path.clone()), &src_path)
|
||||
}
|
||||
"dir" => {
|
||||
if self.copy {
|
||||
@@ -135,6 +136,29 @@ impl Package for DirectoryPackage {
|
||||
}
|
||||
}
|
||||
|
||||
+fn nix_patchelf_if_needed(dest_path: &Path, src_path: &Path) {
|
||||
+ let (is_bin, is_lib) = if let Some(p) = src_path.parent() {
|
||||
+ (p.ends_with("bin"), p.ends_with("lib"))
|
||||
+ } else {
|
||||
+ (false, false)
|
||||
+ };
|
||||
+
|
||||
+ if is_bin {
|
||||
+ let _ = ::std::process::Command::new("@patchelf@/bin/patchelf")
|
||||
+ .arg("--set-interpreter")
|
||||
+ .arg("@dynamicLinker@")
|
||||
+ .arg(dest_path)
|
||||
+ .output();
|
||||
+ }
|
||||
+ else if is_lib {
|
||||
+ let _ = ::std::process::Command::new("@patchelf@/bin/patchelf")
|
||||
+ .arg("--set-rpath")
|
||||
+ .arg("@libPath@")
|
||||
+ .arg(dest_path)
|
||||
+ .output();
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
#[derive(Debug)]
|
||||
pub struct TarPackage<'a>(DirectoryPackage, temp::Dir<'a>);
|
||||
|
||||
94
pkgs/development/tools/rust/rustup/default.nix
Normal file
94
pkgs/development/tools/rust/rustup/default.nix
Normal file
|
|
@ -0,0 +1,94 @@
|
|||
{ stdenv
|
||||
, lib
|
||||
, runCommand
|
||||
, patchelf
|
||||
, fetchFromGitHub
|
||||
, rustPlatform
|
||||
, makeWrapper
|
||||
, pkg-config
|
||||
, curl
|
||||
, zlib
|
||||
, Security
|
||||
, CoreServices
|
||||
, libiconv
|
||||
, xz
|
||||
}:
|
||||
|
||||
let
|
||||
libPath = lib.makeLibraryPath [
|
||||
zlib # libz.so.1
|
||||
];
|
||||
in
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "rustup";
|
||||
version = "1.24.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "rust-lang";
|
||||
repo = "rustup";
|
||||
rev = version;
|
||||
sha256 = "sha256-JpOOFwlTgwwBCrXOGYskFTgS6RZ7mHQJGT0jnHavxvI=";
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-hAfGpKaWD94IxFFpnW9XwQp4P9clUX6mmekwodCK0Ag=";
|
||||
|
||||
nativeBuildInputs = [ makeWrapper pkg-config ];
|
||||
|
||||
buildInputs = [
|
||||
curl
|
||||
zlib
|
||||
] ++ lib.optionals stdenv.isDarwin [ CoreServices Security libiconv xz ];
|
||||
|
||||
buildFeatures = [ "no-self-update" ];
|
||||
|
||||
checkFeatures = [ ];
|
||||
|
||||
patches = lib.optionals stdenv.isLinux [
|
||||
(runCommand "0001-dynamically-patchelf-binaries.patch" { CC = stdenv.cc; patchelf = patchelf; libPath = "$ORIGIN/../lib:${libPath}"; } ''
|
||||
export dynamicLinker=$(cat $CC/nix-support/dynamic-linker)
|
||||
substitute ${./0001-dynamically-patchelf-binaries.patch} $out \
|
||||
--subst-var patchelf \
|
||||
--subst-var dynamicLinker \
|
||||
--subst-var libPath
|
||||
'')
|
||||
];
|
||||
|
||||
doCheck = !stdenv.isAarch64 && !stdenv.isDarwin;
|
||||
|
||||
postInstall = ''
|
||||
pushd $out/bin
|
||||
mv rustup-init rustup
|
||||
binlinks=(
|
||||
cargo rustc rustdoc rust-gdb rust-lldb rls rustfmt cargo-fmt
|
||||
cargo-clippy clippy-driver cargo-miri
|
||||
)
|
||||
for link in ''${binlinks[@]}; do
|
||||
ln -s rustup $link
|
||||
done
|
||||
popd
|
||||
|
||||
wrapProgram $out/bin/rustup --prefix "LD_LIBRARY_PATH" : "${libPath}"
|
||||
|
||||
# tries to create .rustup
|
||||
export HOME=$(mktemp -d)
|
||||
mkdir -p "$out/share/"{bash-completion/completions,fish/vendor_completions.d,zsh/site-functions}
|
||||
|
||||
# generate completion scripts for rustup
|
||||
$out/bin/rustup completions bash rustup > "$out/share/bash-completion/completions/rustup"
|
||||
$out/bin/rustup completions fish rustup > "$out/share/fish/vendor_completions.d/rustup.fish"
|
||||
$out/bin/rustup completions zsh rustup > "$out/share/zsh/site-functions/_rustup"
|
||||
|
||||
# generate completion scripts for cargo
|
||||
# Note: fish completion script is not supported.
|
||||
$out/bin/rustup completions bash cargo > "$out/share/bash-completion/completions/cargo"
|
||||
$out/bin/rustup completions zsh cargo > "$out/share/zsh/site-functions/_cargo"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "The Rust toolchain installer";
|
||||
homepage = "https://www.rustup.rs/";
|
||||
license = with licenses; [ asl20 /* or */ mit ];
|
||||
maintainers = [ maintainers.mic92 ];
|
||||
};
|
||||
}
|
||||
23
pkgs/development/tools/rust/rusty-man/default.nix
Normal file
23
pkgs/development/tools/rust/rusty-man/default.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{ lib, rustPlatform, fetchFromSourcehut }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "rusty-man";
|
||||
version = "0.5.0";
|
||||
|
||||
src = fetchFromSourcehut {
|
||||
owner = "~ireas";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-djprzmogT1OEf0/+twdxzx30YaMNzFjXkZd4IDsH8oo=";
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-Wf8D6y3LRYJpQjFFt0w5X+BOllbR3mc4Gzcr1ad3zD0=";
|
||||
|
||||
meta = with lib; {
|
||||
description = "A command-line viewer for documentation generated by rustdoc";
|
||||
homepage = "https://git.sr.ht/~ireas/rusty-man";
|
||||
changelog = "https://git.sr.ht/~ireas/rusty-man/tree/v${version}/item/CHANGELOG.md";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ figsoda ];
|
||||
};
|
||||
}
|
||||
35
pkgs/development/tools/rust/sqlx-cli/default.nix
Normal file
35
pkgs/development/tools/rust/sqlx-cli/default.nix
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
{ stdenv, lib, rustPlatform, fetchFromGitHub, pkg-config, openssl, SystemConfiguration, CoreFoundation, Security, libiconv, testers, sqlx-cli }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "sqlx-cli";
|
||||
version = "0.5.13";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "launchbadge";
|
||||
repo = "sqlx";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-uUIvzUDDv6WUA25zMhaL2Tn3wHTu/IRgzmnB119BLvk=";
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-IHbOuW2FPt2cH0/ld28fp1uBrJadVsJ8izG0JrZy488=";
|
||||
|
||||
doCheck = false;
|
||||
cargoBuildFlags = [ "-p sqlx-cli" ];
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = lib.optionals stdenv.isLinux [ openssl ]
|
||||
++ lib.optionals stdenv.isDarwin [ SystemConfiguration CoreFoundation Security libiconv ];
|
||||
|
||||
passthru.tests.version = testers.testVersion {
|
||||
package = sqlx-cli;
|
||||
command = "sqlx --version";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description =
|
||||
"SQLx's associated command-line utility for managing databases, migrations, and enabling offline mode with sqlx::query!() and friends.";
|
||||
homepage = "https://github.com/launchbadge/sqlx";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ greizgh ];
|
||||
};
|
||||
}
|
||||
23
pkgs/development/tools/rust/svd2rust/default.nix
Normal file
23
pkgs/development/tools/rust/svd2rust/default.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{ lib, rustPlatform, fetchCrate, stdenv, libiconv }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "svd2rust";
|
||||
version = "0.24.0";
|
||||
|
||||
src = fetchCrate {
|
||||
inherit pname version;
|
||||
sha256 = "sha256-P0s2mrfYA7DUThvje0LH3Pq0Os6UZJrrnjnzAm8UlDQ=";
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-TDgd8RG97ROeAQJ1uDF2m+yIa8US7zFz+5qrQtFbazE=";
|
||||
|
||||
buildInputs = lib.optional stdenv.isDarwin libiconv;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Generate Rust register maps (`struct`s) from SVD files";
|
||||
homepage = "https://github.com/rust-embedded/svd2rust";
|
||||
changelog = "https://github.com/rust-embedded/svd2rust/blob/v${version}/CHANGELOG.md";
|
||||
license = with licenses; [ mit asl20 ];
|
||||
maintainers = with maintainers; [ newam ];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue