Merge pull request #158389 from legendofmiracles/wordle

cl-wordle: init at 0.1.2
This commit is contained in:
Ben Siraphob 2022-02-06 22:23:01 +00:00 committed by GitHub
commit 1869f7cf93
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 39 additions and 0 deletions

View File

@ -0,0 +1,24 @@
{ lib, rustPlatform, fetchCrate }:
rustPlatform.buildRustPackage rec {
pname = "cl-wordle";
version = "0.1.2";
src = fetchCrate {
inherit pname version;
sha256 = "sha256-mcPC2Lj+Vsytfl3+ghYn74QRfM6U4dQLUybtCqkjKlk=";
};
cargoSha256 = "sha256-3Ef8gLFWIAYpKdPixvILvDee5Gezh68hc9TR5+zRX0I=";
patches = [ ./rust-1-57.diff ];
meta = with lib; {
description = "Wordle TUI in Rust";
homepage = "https://github.com/conradludgate/wordle";
# repo has no license, but crates.io says it's MIT
license = licenses.mit;
maintainers = with maintainers; [ lom ];
mainProgram = "wordle";
};
}

View File

@ -0,0 +1,13 @@
diff --git a/src/bin/wordle/game.rs b/src/bin/wordle/game.rs
index 8500732..6f26e2a 100644
--- a/src/bin/wordle/game.rs
+++ b/src/bin/wordle/game.rs
@@ -235,7 +235,7 @@ impl Display for GameShare {
score = self.score
)?;
for m in &self.matches {
- write!(f, "\n{m}")?;
+ write!(f, "\n{}", m)?;
}
Ok(())
}

View File

@ -29905,6 +29905,8 @@ with pkgs;
wofi-emoji = callPackage ../applications/misc/wofi-emoji { }; wofi-emoji = callPackage ../applications/misc/wofi-emoji { };
cl-wordle = callPackage ../games/cl-wordle { };
wordnet = callPackage ../applications/misc/wordnet { wordnet = callPackage ../applications/misc/wordnet {
inherit (darwin.apple_sdk.frameworks) Cocoa; inherit (darwin.apple_sdk.frameworks) Cocoa;
}; };