571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
45 lines
1.1 KiB
Nix
45 lines
1.1 KiB
Nix
{ buildGoModule
|
|
, fetchFromGitHub
|
|
, lib
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "coreth";
|
|
version = "0.13.8";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "ava-labs";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
hash = "sha256-TR4c+7VUHoxZfLCOip7WqjOQFFxGyg+36FUaNw0Sc9k=";
|
|
};
|
|
|
|
# go mod vendor has a bug, see: golang/go#57529
|
|
proxyVendor = true;
|
|
|
|
vendorHash = "sha256-41r6tsrHw533ygvS3G2OQA9wsVXVxJi96DVu6stBq3c=";
|
|
|
|
ldflags = [
|
|
"-s"
|
|
"-w"
|
|
"-X github.com/ava-labs/coreth/plugin/evm.Version=${version}"
|
|
"-X github.com/ava-labs/coreth/cmd/abigen.gitCommit=${version}"
|
|
"-X github.com/ava-labs/coreth/cmd/abigen.gitDate=1970-01-01"
|
|
];
|
|
|
|
subPackages = [
|
|
"cmd/abigen"
|
|
"plugin"
|
|
];
|
|
|
|
postInstall = "mv $out/bin/{plugin,evm}";
|
|
|
|
meta = with lib; {
|
|
description = "Code and wrapper to extract Ethereum blockchain functionalities without network/consensus, for building custom blockchain services";
|
|
homepage = "https://github.com/ava-labs/coreth";
|
|
changelog = "https://github.com/ava-labs/coreth/releases/tag/v${version}";
|
|
license = licenses.lgpl3Only;
|
|
maintainers = with maintainers; [ urandom ];
|
|
};
|
|
}
|