numr: init at 0.1.7 (#466514)

This commit is contained in:
Matthias Beyer
2025-12-06 13:16:05 +00:00
committed by GitHub
+50
View File
@@ -0,0 +1,50 @@
{
stdenv,
lib,
rustPlatform,
fetchFromGitHub,
pkg-config,
openssl,
versionCheckHook,
nix-update-script,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "numr";
version = "0.1.7";
src = fetchFromGitHub {
owner = "nasedkinpv";
repo = "numr";
rev = "v${finalAttrs.version}";
hash = "sha256-tDQxDU/CrzZvXjsVSkUtDHX53WddFt6G8RBrHd8mXyg=";
};
cargoHash = "sha256-4Ig35ev3L2Sr8m4JsQVv/3lSLDc9RxSFMYeI+N+Wg7A=";
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 = with lib; {
description = "Text calculator inspired by Numi - natural language expressions, variables, unit conversions";
homepage = "https://github.com/nasedkinpv/numr";
license = licenses.mit;
maintainers = with maintainers; [
matthiasbeyer
];
mainProgram = "numr";
};
})