ieda: init at 0-unstable-2024-10-11 (#338769)
[NixPkgs.git] / pkgs / by-name / ku / kubo / test-repoVersion.nix
blob25fd8fcfbf43a520120f4f71894f303be2e1cf1b
1 { runCommand, kubo }:
3 runCommand "kubo-test-repoVersion" { } ''
4   export IPFS_PATH="$TMPDIR"
5   "${kubo}/bin/ipfs" init --empty-repo
6   declared_repo_version='${kubo.repoVersion}'
7   actual_repo_version="$(cat "$IPFS_PATH/version")"
8   if [ "$declared_repo_version" != "$actual_repo_version" ]; then
9     echo "kubo.repoVersion is not set correctly. It should be $actual_repo_version but is $declared_repo_version."
10     exit 1
11   fi
12   touch "$out"