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