mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-18 19:03:28 +00:00
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:
commit
d30ff65b24
@ -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"
|
@ -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 { };
|
||||
|
Loading…
Reference in New Issue
Block a user