From 6d580b39f846b5304ccff076e9ffd0c94dae2433 Mon Sep 17 00:00:00 2001 From: wilhelmines Date: Thu, 1 Jan 2026 13:00:20 +0100 Subject: [PATCH] versatiles: 2.0.1 -> 3.1.0 implemented some syntax changes, skipped test that requires internet access and removed old comments --- pkgs/by-name/ve/versatiles/package.nix | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/pkgs/by-name/ve/versatiles/package.nix b/pkgs/by-name/ve/versatiles/package.nix index 6d2449b0c5e5..bd545c3c61c9 100644 --- a/pkgs/by-name/ve/versatiles/package.nix +++ b/pkgs/by-name/ve/versatiles/package.nix @@ -2,27 +2,27 @@ lib, fetchFromGitHub, rustPlatform, + versionCheckHook, }: -rustPlatform.buildRustPackage rec { +rustPlatform.buildRustPackage (finalAttrs: { pname = "versatiles"; - version = "2.0.1"; # When updating: Replace with current version + version = "3.1.0"; src = fetchFromGitHub { owner = "versatiles-org"; repo = "versatiles-rs"; - tag = "v${version}"; # When updating: Replace with long commit hash of new version - hash = "sha256-qFVqikq1T6LQnOWgM66uKzFhWQbVjEuUK3N5vNvaDq4="; # When updating: Use `lib.fakeHash` for recomputing the hash once. Run: 'nix-build -A versatiles'. Swap with new hash and proceed. + tag = "v${finalAttrs.version}"; + hash = "sha256-U9Os5HiehujU+/O2ZeUEtBJCVOBOi4dfH89Y9d0+RlI="; }; - cargoHash = "sha256-kkYdQEBydxPwxxSjTiwk4huCDK3xJ9FoyrcHL88ytfk="; # When updating: Same as above + cargoHash = "sha256-p2ezrYhAxGvxzI3Q8BA0nGWwzim3L3AdIdf+8oMquSA="; __darwinAllowLocalNetworking = true; - # Testing only necessary for the `bins` and `lib` features + # Testing only necessary for `bins` cargoTestFlags = [ "--bins" - "--lib" ]; # Skip tests that require network access @@ -30,6 +30,7 @@ rustPlatform.buildRustPackage rec { "--skip=tools::convert::tests::test_remote1" "--skip=tools::convert::tests::test_remote2" "--skip=tools::probe::tests::test_remote" + "--skip=tools::serve::tests::test_config" "--skip=tools::serve::tests::test_remote" "--skip=utils::io::data_reader_http" "--skip=utils::io::data_reader_http::tests::read_range_git" @@ -38,6 +39,12 @@ rustPlatform.buildRustPackage rec { "--skip=io::data_reader_http::tests::read_range_googleapis" ]; + nativeInstallCheckInputs = [ + versionCheckHook + ]; + versionCheckProgramArg = "--version"; + doInstallCheck = true; + meta = { description = "Toolbox for converting, checking and serving map tiles in various formats"; longDescription = '' @@ -46,10 +53,10 @@ rustPlatform.buildRustPackage rec { ''; homepage = "https://versatiles.org/"; downloadPage = "https://github.com/versatiles-org/versatiles-rs"; - changelog = "https://github.com/versatiles-org/versatiles-rs/releases/tag/v${version}"; + changelog = "https://github.com/versatiles-org/versatiles-rs/releases/tag/v${finalAttrs.version}"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ wilhelmines ]; mainProgram = "versatiles"; platforms = with lib.platforms; linux ++ darwin ++ windows; }; -} +})