diff options
author | zeri42 <68825133+zeri42@users.noreply.github.com> | 2022-03-16 20:08:48 +0100 |
---|---|---|
committer | Julian Waelde <julian.waelde@gmail.com> | 2022-03-17 22:27:19 +0100 |
commit | dc39d05a53afcd21c3d737d68fb2f39c3fc043b9 (patch) | |
tree | 447185474700c48e5a6984c864b49ffa2fd5efb5 /pkgs/tools/networking | |
parent | ae772b075c63434fdeb3abd3f7187a5604a66987 (diff) | |
download | nixpkgs-dc39d05a53afcd21c3d737d68fb2f39c3fc043b9.tar nixpkgs-dc39d05a53afcd21c3d737d68fb2f39c3fc043b9.tar.gz nixpkgs-dc39d05a53afcd21c3d737d68fb2f39c3fc043b9.tar.bz2 nixpkgs-dc39d05a53afcd21c3d737d68fb2f39c3fc043b9.tar.lz nixpkgs-dc39d05a53afcd21c3d737d68fb2f39c3fc043b9.tar.xz nixpkgs-dc39d05a53afcd21c3d737d68fb2f39c3fc043b9.tar.zst nixpkgs-dc39d05a53afcd21c3d737d68fb2f39c3fc043b9.zip |
magic-wormhole-rs: init at 0.3.0
Diffstat (limited to 'pkgs/tools/networking')
-rw-r--r-- | pkgs/tools/networking/magic-wormhole-rs/Cargo.toml.patch | 67 | ||||
-rw-r--r-- | pkgs/tools/networking/magic-wormhole-rs/default.nix | 32 |
2 files changed, 99 insertions, 0 deletions
diff --git a/pkgs/tools/networking/magic-wormhole-rs/Cargo.toml.patch b/pkgs/tools/networking/magic-wormhole-rs/Cargo.toml.patch new file mode 100644 index 00000000000..debb1e26439 --- /dev/null +++ b/pkgs/tools/networking/magic-wormhole-rs/Cargo.toml.patch @@ -0,0 +1,67 @@ +diff --git a/Cargo.lock b/Cargo.lock +index d33b5d6..ddde8ed 100644 +--- a/Cargo.lock ++++ b/Cargo.lock +@@ -150,33 +150,6 @@ dependencies = [ + "winapi 0.3.9", + ] + +-[[package]] +-name = "async-std" +-version = "1.10.0" +-source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "f8056f1455169ab86dd47b47391e4ab0cbd25410a70e9fe675544f49bafaf952" +-dependencies = [ +- "async-channel", +- "async-global-executor", +- "async-io", +- "async-lock", +- "crossbeam-utils", +- "futures-channel", +- "futures-core", +- "futures-io", +- "futures-lite", +- "gloo-timers", +- "kv-log-macro", +- "log", +- "memchr", +- "num_cpus", +- "once_cell", +- "pin-project-lite", +- "pin-utils", +- "slab", +- "wasm-bindgen-futures", +-] +- + [[package]] + name = "async-std" + version = "1.10.0" +@@ -230,7 +203,7 @@ version = "0.16.1" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "5682ea0913e5c20780fe5785abacb85a411e7437bf52a1bedb93ddb3972cb8dd" + dependencies = [ +- "async-std 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", ++ "async-std", + "async-tls", + "futures-io", + "futures-util", +@@ -1154,7 +1127,7 @@ name = "magic-wormhole" + version = "0.3.0" + dependencies = [ + "async-io", +- "async-std 1.10.0 (git+https://github.com/async-rs/async-std)", ++ "async-std", + "async-tungstenite", + "base64", + "bytecodec", +diff --git a/Cargo.toml b/Cargo.toml +index b4ff2c0..d4094af 100644 +--- a/Cargo.toml ++++ b/Cargo.toml +@@ -82,3 +82,6 @@ required-features = ["bin"] + + [profile.release] + overflow-checks = true ++ ++[patch.crates-io] ++async-std = { version = "1.9.0", features = ["attributes", "unstable"], git = "https://github.com/async-rs/async-std" } diff --git a/pkgs/tools/networking/magic-wormhole-rs/default.nix b/pkgs/tools/networking/magic-wormhole-rs/default.nix new file mode 100644 index 00000000000..951a0664376 --- /dev/null +++ b/pkgs/tools/networking/magic-wormhole-rs/default.nix @@ -0,0 +1,32 @@ +{ lib +, stdenv +, fetchFromGitHub +, rustPlatform +}: +rustPlatform.buildRustPackage rec { + name = "magic-wormhole-rs"; + version = "0.3.0"; + + src = fetchFromGitHub { + owner = "magic-wormhole"; + repo = "magic-wormhole.rs"; + rev = version; + sha256 = "sha256-i4vJ6HmtM42m1x1UtOq9xlmhYIa5ZKXUm1rGFNRprmY="; + }; + + # this patch serves as a workaround for the problems of cargo-vendor described in + # https://github.com/NixOS/nixpkgs/issues/30742 + # and can probably be removed once the issue is resolved + cargoPatches = [ ./Cargo.toml.patch ]; + cargoSha256 = "sha256-DG1kyukgzDbolX9Mg9hK1TRyzIWbAX6f54jSM8clj/c="; + + # all tests involve networking and are bound fail + doCheck = false; + + meta = with lib; { + description = "Rust implementation of Magic Wormhole, with new features and enhancements"; + homepage = "https://github.com/magic-wormhole/magic-wormhole.rs"; + license = licenses.eupl12; + maintainers = with maintainers; [ zeri piegames ]; + }; +} |