
This reverts commit 65a333600d5c88a98d674f637d092807cfc12253. This wasn't tested for correctness with something like fodwatch [0], and should not have been (self-)merged so quickly, especially without further review. It also resulted in the breakage of at least one package [1] (and that's the one we know of and was caught). A few packages that were updated in between this commit and this revert were not reverted back to using `rev`, but other than that, this is a 1:1 revert. [0]: https://codeberg.org/raphaelr/fodwatch [1]: https://github.com/NixOS/nixpkgs/pull/396904 / 758551e4587d75882aebc21a04bee960418f8ce9
46 lines
1.3 KiB
Nix
46 lines
1.3 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitHub,
|
|
rustPlatform,
|
|
libxcb,
|
|
installShellFiles,
|
|
}:
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "magic-wormhole-rs";
|
|
version = "0.7.6";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "magic-wormhole";
|
|
repo = "magic-wormhole.rs";
|
|
rev = version;
|
|
sha256 = "sha256-01u1DJNd/06q9dH/Y4E5kj5gb2CA7EKdoPtMhzCLtso=";
|
|
};
|
|
|
|
useFetchCargoVendor = true;
|
|
cargoHash = "sha256-sZuvhJWgBlptfgsKglWvL6oxK5W3y2x0Gwf+r2pNRi8=";
|
|
|
|
buildInputs = lib.optionals (!stdenv.hostPlatform.isDarwin) [ libxcb ];
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
|
installShellCompletion --cmd wormhole-rs \
|
|
--bash <($out/bin/wormhole-rs completion bash) \
|
|
--fish <($out/bin/wormhole-rs completion fish) \
|
|
--zsh <($out/bin/wormhole-rs completion zsh)
|
|
'';
|
|
|
|
meta = with lib; {
|
|
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";
|
|
};
|
|
}
|