mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 23:03:40 +01:00
cargo-wasi: init at 0.1.26 (#186725)
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
This commit is contained in:
parent
34ec80d662
commit
4e37749e54
3 changed files with 1559 additions and 0 deletions
1513
pkgs/development/tools/rust/cargo-wasi/0001-Add-Cargo.lock.patch
Normal file
1513
pkgs/development/tools/rust/cargo-wasi/0001-Add-Cargo.lock.patch
Normal file
File diff suppressed because it is too large
Load diff
43
pkgs/development/tools/rust/cargo-wasi/default.nix
Normal file
43
pkgs/development/tools/rust/cargo-wasi/default.nix
Normal file
|
@ -0,0 +1,43 @@
|
|||
{ stdenv
|
||||
, lib
|
||||
, fetchFromGitHub
|
||||
, openssl
|
||||
, pkg-config
|
||||
, rustPlatform
|
||||
, Security
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "cargo-wasi";
|
||||
version = "0.1.26";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "bytecodealliance";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "sha256-jugq7A3L+5+YUSyp9WWKBd4BA2pcXKd4CMVg5OVMcEA=";
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-L4vRLYm1WaCmA4bGyY7D0yxXuqxGSHMMD/wlY8+MgPk=";
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
|
||||
buildInputs = lib.optionals stdenv.isLinux [ openssl ]
|
||||
++ lib.optionals stdenv.isDarwin [ Security ];
|
||||
|
||||
cargoPatches = [
|
||||
./0001-Add-Cargo.lock.patch
|
||||
];
|
||||
|
||||
# Checks need to be disabled here because the current test suite makes assumptions
|
||||
# about the surrounding environment that aren't Nix friendly. See these lines for specifics:
|
||||
# https://github.com/bytecodealliance/cargo-wasi/blob/0.1.26/tests/tests/support.rs#L13-L18
|
||||
doCheck = false;
|
||||
|
||||
meta = with lib; {
|
||||
description = "A lightweight Cargo subcommand to build code for the wasm32-wasi target";
|
||||
homepage = "https://bytecodealliance.github.io/cargo-wasi";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ lucperkins ];
|
||||
};
|
||||
}
|
|
@ -14347,6 +14347,9 @@ with pkgs;
|
|||
inherit (darwin.apple_sdk.frameworks) CoreServices Security SystemConfiguration;
|
||||
};
|
||||
cargo-valgrind = callPackage ../development/tools/rust/cargo-valgrind { };
|
||||
cargo-wasi = callPackage ../development/tools/rust/cargo-wasi {
|
||||
inherit (darwin.apple_sdk.frameworks) Security;
|
||||
};
|
||||
cargo-watch = callPackage ../development/tools/rust/cargo-watch {
|
||||
inherit (darwin.apple_sdk.frameworks) CoreServices Foundation;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue