Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,18 @@ If you prefer to get the newest version and compile it yourself, follow these st
cp resources/english.txt ~/.local/share/typy/
```

If you have Nix with flakes enabled, you can install typy-cli directly:

```bash
nix profile install github:Pazl27/typy-cli
```

Or to run without installing:

```bash
nix run github:Pazl27/typy-cli
```

## Flags
The `Typy` application supports the following flags:

Expand Down
82 changes: 82 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

55 changes: 55 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
description = "typy-cli - Minimalistic Monkeytype clone for the CLI";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, rust-overlay, flake-utils, ... }:
flake-utils.lib.eachDefaultSystem (system:
let
overlays = [ (import rust-overlay) ];
pkgs = import nixpkgs {
inherit system overlays;
};

buildInputs = with pkgs; [ ];

nativeBuildInputs = with pkgs; [
rust-bin.stable.latest.default
pkg-config
makeWrapper
];

in
{
packages.default = pkgs.rustPlatform.buildRustPackage {
pname = "typy-cli";
version = "0.7.0";
src = ./.;
cargoLock = {
lockFile = ./Cargo.lock;
};
inherit buildInputs nativeBuildInputs;
postInstall = ''
mkdir -p $out/share/typy
cp $src/resources/english.txt $out/share/typy/english.txt

wrapProgram $out/bin/typy-cli \
--run "mkdir -p ~/.local/share/typy" \
--run "cp -n $out/share/typy/english.txt ~/.local/share/typy/english.txt"
'';

meta = with pkgs.lib; {
description = "typy-cli - Minimalistic Monkeytype clone for the CLI";
homepage = "https://github.com/Pazl27/typy-cli";
license = licenses.mit;
};
};
}
);
}