Compare commits

...

3 Commits

Author SHA1 Message Date
rm-dr 3c8ed9f4f3 Added documentation 2023-10-14 09:43:48 -07:00
rm-dr b7a6378589 Fixed default.nix 2023-10-14 09:36:25 -07:00
mark 5e34017225 Added nix package 2023-10-14 09:13:54 -07:00
3 changed files with 37 additions and 5 deletions

3
.gitignore vendored
View File

@ -1,3 +1,4 @@
/target
/src/target
/pkg
/pkg
/result

View File

@ -7,13 +7,25 @@ Many features are missing, this is still under development.
**Web demo: [here](https://daisy.betalupi.com) (won't work on mobile)**
# 📦 Installation
- **From source:** `cargo build --release`, binary will be at `./target/release/daisy`
- **Cargo:** `cargo install daisycalc`
- **Arch:** `yay -S daisy`
- **Debian:** coming soon
- **Nix:** Use `default.nix`. Daisy isn't in nixpkgs yet, you'll need to add something like the following to `configuration.nix`:
From source: `cargo build --release` \
Binary will be in `target/release/daisy`
```nix
let
daisy = builtins.fetchGit {
url = "https://github.com/rm-dr/daisy.git";
ref = "master";
} + /default.nix;
in
{
environment.systemPackages = with pkgs; [
(callPackage daisy { })
];
}
```
# 📹 Screenshot
@ -22,7 +34,7 @@ Binary will be in `target/release/daisy`
# 🛠️ Features
- Open-source
- Extremely high precision
- Uses a rational datatype when possible, and a high-precision float when not.
- Uses a rational datatype when possible, and a high-precision float when not.
- Pretty printing in prompt (with special substitutions)
- Supports many physical units, with metric and binary prefixes
- Supports exponential notation

19
default.nix Normal file
View File

@ -0,0 +1,19 @@
{ lib, fetchgit, rustPlatform }:
rustPlatform.buildRustPackage rec {
pname = "daisy";
version = "1.1.4";
cargoLock.lockFile = src + /Cargo.lock;
src = fetchgit {
url = "https://github.com/rm-dr/daisy.git";
rev = "v${version}";
sha256 = "sha256-aENuKtE1+tBRN0HZzRr8Gk+dVEYTiP6FNRz817Sk88o=";
};
meta = with lib; {
description = "A pretty command-line scientific calculator";
homepage = "https://github.com/rm-dr/daisy";
#license = licenses.GPL;
maintainers = [ maintainers.tailhook ];
};
}