Merge pull request #296715 from linyinfeng/godns-by-name

godns: 3.0.7 -> 3.1.5, migrate to by-name
This commit is contained in:
Nick Cao 2024-03-20 10:43:15 -04:00 committed by GitHub
commit d30ff65b24
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 28 additions and 5 deletions

View File

@ -1,25 +1,50 @@
{ lib
, buildGoModule
, fetchFromGitHub
, nodejs
, npmHooks
, fetchNpmDeps
, nix-update-script
}:
buildGoModule rec {
pname = "godns";
version = "3.0.7";
version = "3.1.5";
src = fetchFromGitHub {
owner = "TimothyYe";
repo = "godns";
rev = "refs/tags/v${version}";
hash = "sha256-7zgvrEVt8xg54NijcqnXoZcXetzOu9h3Ucw7w03YagU=";
hash = "sha256-kdClyeU0hR0ymVLn9xe/kYVJE/9P/hAz/5UwRAQ2KCU=";
};
vendorHash = "sha256-veDrGB6gjUa8G/UyKzEgH2ItGGEPlXDePahq2XP2nAo=";
vendorHash = "sha256-kSREFNIGH0MXiyKMp1LmrLkhKBhovvNRz46LTXT2XME=";
npmDeps = fetchNpmDeps {
src = "${src}/web";
hash = "sha256-2yeqLly0guU/kpX+yH/QOoDGzyJTxkTaCt8EleJhybU=";
};
npmRoot = "web";
nativeBuildInputs = [
nodejs
npmHooks.npmConfigHook
];
overrideModAttrs = oldAttrs: {
# Do not add `npmConfigHook` to `goModules`
nativeBuildInputs = lib.remove npmHooks.npmConfigHook oldAttrs.nativeBuildInputs;
# Do not run `preBuild` when building `goModules`
preBuild = null;
};
# Some tests require internet access, broken in sandbox
doCheck = false;
preBuild = ''
npm --prefix="$npmRoot" run build
go generate ./...
'';
ldflags = [
"-s"
"-w"

View File

@ -1861,8 +1861,6 @@ with pkgs;
gofu = callPackage ../applications/misc/gofu { };
godns = callPackage ../tools/networking/godns { };
godspeed = callPackage ../tools/networking/godspeed { };
goodhosts = callPackage ../tools/networking/goodhosts { };