13 # Note: Currently only release tags are supported, because they have the Consul UI
15 # https://github.com/NixOS/nixpkgs/pull/48714#issuecomment-433454834
16 # If you want to use a non-release commit as `src`, you probably want to improve
17 # this derivation so that it can build the UI's JavaScript from source.
18 # See https://github.com/NixOS/nixpkgs/pull/49082 for something like that.
19 # Or, if you want to patch something that doesn't touch the UI, you may want
20 # to apply your changes as patches on top of a release commit.
21 src = fetchFromGitHub {
25 hash = "sha256-pUKX94OgJ2PTchBokAI5QzLxvdzQjcePrKHEiB782hc=";
28 # This corresponds to paths with package main - normally unneeded but consul
29 # has a split module structure in one repo
35 vendorHash = "sha256-pH9KVyHgSULZ+fuUSDIXOzLhrdhsbJEom67k6jaW31E=";
40 "-X github.com/hashicorp/consul/version.GitDescribe=v${version}"
41 "-X github.com/hashicorp/consul/version.Version=${version}"
42 "-X github.com/hashicorp/consul/version.VersionPrerelease="
47 inherit (nixosTests) consul;
50 updateScript = nix-update-script { };
54 description = "Tool for service discovery, monitoring and configuration";
55 changelog = "https://github.com/hashicorp/consul/releases/tag/v${version}";
56 homepage = "https://www.consul.io/";
57 platforms = platforms.linux ++ platforms.darwin;
58 license = licenses.bsl11;
59 maintainers = with maintainers; [
66 mainProgram = "consul";