blob: 76b65dcc1b1fca1c8049f156db65a3986f2f8854 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
{
stdenv,
lib,
rustPlatform,
fetchFromGitHub,
pkg-config,
openssl,
versionCheckHook,
nix-update-script,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "numr";
version = "0.6.0";
src = fetchFromGitHub {
owner = "nasedkinpv";
repo = "numr";
rev = "v${finalAttrs.version}";
hash = "sha256-GmG6iGcN0Y+0YgUmV+sAtdnusNpuVKLUrzKklmz+dvs=";
};
cargoHash = "sha256-SbgCF+m4dR2zPPJrVFxRLOOAyyjOSubXsYvzOa5tTyg=";
nativeBuildInputs = [
pkg-config
];
buildInputs = lib.optionals stdenv.hostPlatform.isLinux [
openssl
];
env.OPENSSL_NO_VENDOR = true;
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgramArg = "--version";
doInstallCheck = true;
passthru.updateScript = nix-update-script { };
meta = {
description = "Text calculator inspired by Numi - natural language expressions, variables, unit conversions";
homepage = "https://github.com/nasedkinpv/numr";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
matthiasbeyer
];
mainProgram = "numr";
};
})
|