3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #200406 from figsoda/cargo-wasi

cargo-wasi: switch to fetchCrate to remove patch
This commit is contained in:
figsoda 2022-11-10 20:52:33 -05:00 committed by GitHub
commit d68882a5d3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 1528 deletions

View file

@ -1,9 +1,9 @@
{ stdenv { lib
, lib
, fetchFromGitHub
, openssl
, pkg-config
, rustPlatform , rustPlatform
, fetchCrate
, pkg-config
, stdenv
, openssl
, Security , Security
}: }:
@ -11,24 +11,19 @@ rustPlatform.buildRustPackage rec {
pname = "cargo-wasi"; pname = "cargo-wasi";
version = "0.1.26"; version = "0.1.26";
src = fetchFromGitHub { src = fetchCrate {
owner = "bytecodealliance"; inherit version;
repo = pname; pname = "cargo-wasi-src";
rev = version; sha256 = "sha256-/u5GKqGwJWS6Gzc1WZ7O5ZSHHGoqBVZ4jQDEIfAyciE=";
sha256 = "sha256-jugq7A3L+5+YUSyp9WWKBd4BA2pcXKd4CMVg5OVMcEA=";
}; };
cargoSha256 = "sha256-L4vRLYm1WaCmA4bGyY7D0yxXuqxGSHMMD/wlY8+MgPk="; cargoSha256 = "sha256-eF3HrulY7HrKseCYyZyC2EuWboFvmia2qLymBxvopKI=";
nativeBuildInputs = [ pkg-config ]; nativeBuildInputs = [ pkg-config ];
buildInputs = lib.optionals stdenv.isLinux [ openssl ] buildInputs = lib.optionals stdenv.isLinux [ openssl ]
++ lib.optionals stdenv.isDarwin [ Security ]; ++ lib.optionals stdenv.isDarwin [ Security ];
cargoPatches = [
./0001-Add-Cargo.lock.patch
];
# Checks need to be disabled here because the current test suite makes assumptions # 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: # 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 # https://github.com/bytecodealliance/cargo-wasi/blob/0.1.26/tests/tests/support.rs#L13-L18