From 70c48134654ef2fc386a2f4c4daedfcad281824f Mon Sep 17 00:00:00 2001 From: Arnaud Date: Fri, 6 Mar 2026 10:44:57 +0400 Subject: [PATCH] Update documentation --- README.md | 2 +- RELEASE.md | 22 +++++++++++----------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 3c70802..baf6e03 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ clean: First you need to `fetch` the artefacts for your `OS` and `ARCH`: ```sh -OS=macos ARCH=arm64 make fetch +OS=darwin ARCH=arm64 make fetch ``` Then you can build your project using: diff --git a/RELEASE.md b/RELEASE.md index 33af32f..0df4179 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -23,7 +23,7 @@ git push --tags Once published, the artifacts can be downloaded using the `version`, example: -`https://github.com/logos-storage/logos-storage-go-bindings/releases/download/v0.0.16/storage-linux-amd64.zip` +`https://github.com/logos-storage/logos-storage-nim/releases/download/v0.3.2/libstorage-linux-amd64-v0.3.2.zip` It is not recommended to use the `latest` URL because you may face cache issues. @@ -41,24 +41,24 @@ Then you can use the following `Makefile` command to fetch the artifact: LIBS_DIR := $(abspath ./libs) STORAGE_OS := linux STORAGE_ARCH := amd64 -STORAGE_VERSION := $(shell go list -m -f '{{.Version}}' github.com/logos-storage/logos-storage-go-bindings 2>/dev/null) -STORAGE_DOWNLOAD_URL := "https://github.com/logos-storage/logos-storage-go-bindings/releases/download/$(STORAGE_VERSION)/storage-${STORAGE_OS}-${STORAGE_ARCH}.zip" +STORAGE_VERSION := v0.3.2 +STORAGE_DOWNLOAD_URL := "https://github.com/logos-storage/logos-storage-nim/releases/download/$(STORAGE_VERSION)/storage-${STORAGE_OS}-${STORAGE_ARCH}-${STORAGE_VERSION}.zip" fetch-libstorage: mkdir -p $(LIBS_DIR); \ - curl -fSL --create-dirs -o $(LIBS_DIR)/storage-${STORAGE_OS}-${STORAGE_ARCH}.zip ${STORAGE_DOWNLOAD_URL}; \ - unzip -o -qq $(LIBS_DIR)/storage-${STORAGE_OS}-${STORAGE_ARCH}.zip -d $(LIBS_DIR); \ - rm -f $(LIBS_DIR)/storage*.zip; + curl -fSL --create-dirs -o $(LIBS_DIR)/storage-${STORAGE_OS}-${STORAGE_ARCH}-${STORAGE_VESION}.zip ${STORAGE_DOWNLOAD_URL}; \ + unzip -o -qq $(LIBS_DIR)/libstorage-${STORAGE_OS}-${STORAGE_ARCH}-${STORAGE_VESION}.zip -d $(LIBS_DIR); \ + rm -f $(LIBS_DIR)/libstorage*.zip; ``` -`STORAGE_VERSION` uses the same version as the Logos Storage Go dependency declared in your project. +`STORAGE_VERSION` is the release version from Logos Storage Nim. ### Nix If you use Nix in a sandboxed environment, you cannot use curl to download the artifacts, so you have to prefetch them using the artifacts `SHA-256` hash. To generate the hash, you can use the following command: ```bash -nix store prefetch-file --json --unpack https://github.com/logos-storage/logos-storage-go-bindings/releases/download/v0.0.26/storage-macos-arm64.zip | jq -r .hash +nix store prefetch-file --json --unpack https://github.com/logos-storage/logos-storage-nim/releases/download/v0.3.2/libstorage-darwin-arm64-v0.3.2.zip | jq -r .hash # [10.4 MiB DL] sha256-3CHIWoSjo0plsYqzXQWm1EtY1STcljV4yfXTPon90uE= ``` @@ -76,14 +76,14 @@ let os = if stdenv.isDarwin then "macos" else "Linux"; hash = if stdenv.hostPlatform.isDarwin - # nix store prefetch-file --json --unpack https://github.com/logos-storage/logos-storage-go-bindings/releases/download/v0.0.26/storage-macos-arm64.zip | jq -r .hash + # nix store prefetch-file --json --unpack https://github.com/logos-storage/logos-storage-nim/releases/download/v0.3.2/libstorage-darwin-arm64-v0.3.2.zip | jq -r .hash then "sha256-3CHIWoSjo0plsYqzXQWm1EtY1STcljV4yfXTPon90uE=" - # nix store prefetch-file --json --unpack https://github.com/logos-storage/logos-storage-go-bindings/releases/download/v0.0.26/storage-Linux-amd64.zip | jq -r .hash + # nix store prefetch-file --json --unpack https://github.com/logos-storage/logos-storage-nim/releases/download/v0.3.2/libstorage-linux-amd64-v0.3.2.zip | jq -r .hash else "sha256-YxW2vFZlcLrOx1PYgWW4MIstH/oFBRF0ooS0sl3v6ig="; # Pre-fetch libstorage to avoid network during build storageLib = pkgs.fetchzip { - url = "https://github.com/logos-storage/logos-storage-go-bindings/releases/download/${storageVersion}/storage-${os}-${arch}.zip"; + url = "https://github.com/logos-storage/logos-storage-nim/releases/download/${storageVersion}/storage-${os}-${arch}-${storageVersion}.zip"; hash = hash; stripRoot = false; };