about summary refs log tree commit diff
path: root/pkgs/tools/networking/magic-wormhole-rs
diff options
context:
space:
mode:
authorSandro <sandro.jaeckel@gmail.com>2022-05-30 23:36:36 +0200
committerGitHub <noreply@github.com>2022-05-30 23:36:36 +0200
commitb2dc65f399dd5754f8602b5777590441d7384536 (patch)
tree5246d4cd362d13b7a13eed007b9fffb7075f1b7b /pkgs/tools/networking/magic-wormhole-rs
parentc10e14acc786808d4bd07aabcbe0adc15af13ac0 (diff)
parenta6558445617e2b5924d02ed2d4414ce31060e18f (diff)
downloadnixlib-b2dc65f399dd5754f8602b5777590441d7384536.tar
nixlib-b2dc65f399dd5754f8602b5777590441d7384536.tar.gz
nixlib-b2dc65f399dd5754f8602b5777590441d7384536.tar.bz2
nixlib-b2dc65f399dd5754f8602b5777590441d7384536.tar.lz
nixlib-b2dc65f399dd5754f8602b5777590441d7384536.tar.xz
nixlib-b2dc65f399dd5754f8602b5777590441d7384536.tar.zst
nixlib-b2dc65f399dd5754f8602b5777590441d7384536.zip
Merge pull request #174626 from dywedir/magic-wormhole-rs
magic-wormhole-rs: 0.3.0 -> 0.5.0
Diffstat (limited to 'pkgs/tools/networking/magic-wormhole-rs')
-rw-r--r--pkgs/tools/networking/magic-wormhole-rs/Cargo.toml.patch67
-rw-r--r--pkgs/tools/networking/magic-wormhole-rs/default.nix18
2 files changed, 11 insertions, 74 deletions
diff --git a/pkgs/tools/networking/magic-wormhole-rs/Cargo.toml.patch b/pkgs/tools/networking/magic-wormhole-rs/Cargo.toml.patch
deleted file mode 100644
index debb1e264390..000000000000
--- a/pkgs/tools/networking/magic-wormhole-rs/Cargo.toml.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-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
index 84479de49eba..742292e168bb 100644
--- a/pkgs/tools/networking/magic-wormhole-rs/default.nix
+++ b/pkgs/tools/networking/magic-wormhole-rs/default.nix
@@ -2,23 +2,25 @@
 , stdenv
 , fetchFromGitHub
 , rustPlatform
+, libxcb
+, Security
+, AppKit
 }:
 rustPlatform.buildRustPackage rec {
   pname = "magic-wormhole-rs";
-  version = "0.3.0";
+  version = "0.5.0";
 
   src = fetchFromGitHub {
     owner = "magic-wormhole";
     repo = "magic-wormhole.rs";
     rev = version;
-    sha256 = "sha256-i4vJ6HmtM42m1x1UtOq9xlmhYIa5ZKXUm1rGFNRprmY=";
+    sha256 = "sha256-+H/IzMxiGz7UVVkEWpmyBepGET9doQFNDvOCZEMF0p4=";
   };
 
-  # 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-ujwvwr4GR/rQWnXFfL8sqPyz4QvGeOxwBrT+gf+vjsI=";
+  cargoSha256 = "sha256-pRdb5NSqueHmK5vbZfmbDGOz7NQvmUI/pj9KgShiIn0=";
+
+  buildInputs = [ libxcb ]
+    ++ lib.optionals stdenv.isDarwin [ Security AppKit ];
 
   # all tests involve networking and are bound fail
   doCheck = false;
@@ -27,7 +29,9 @@ rustPlatform.buildRustPackage rec {
     broken = stdenv.isDarwin;
     description = "Rust implementation of Magic Wormhole, with new features and enhancements";
     homepage = "https://github.com/magic-wormhole/magic-wormhole.rs";
+    changelog = "https://github.com/magic-wormhole/magic-wormhole.rs/raw/${version}/changelog.md";
     license = licenses.eupl12;
     maintainers = with maintainers; [ zeri piegames ];
+    mainProgram = "wormhole-rs";
   };
 }