diff --git a/pkgs/tools/networking/dd-agent/default.nix b/pkgs/tools/networking/dd-agent/default.nix index ca240f76d84e..02ad58e77998 100644 --- a/pkgs/tools/networking/dd-agent/default.nix +++ b/pkgs/tools/networking/dd-agent/default.nix @@ -1,12 +1,14 @@ -{ stdenv, fetchzip, python, pythonPackages, sysstat, unzip, tornado +{ stdenv, fetchGitHub, python, pythonPackages, sysstat, unzip, tornado , makeWrapper }: stdenv.mkDerivation rec { version = "4.2.1"; name = "dd-agent-${version}"; - src = fetchzip { - url = "https://github.com/DataDog/dd-agent/archive/${version}.zip"; + src = fetchGitHub { + owner = "DataDog"; + repo = "dd-agent"; + rev = version; sha256 = "06f9nkvnpfzs2nw75cac2y9wnp2bay4sg94zz0wjm8886rigjjjm"; }; diff --git a/pkgs/tools/text/recode/default.nix b/pkgs/tools/text/recode/default.nix index db9ed5d30f30..81b863a35df4 100644 --- a/pkgs/tools/text/recode/default.nix +++ b/pkgs/tools/text/recode/default.nix @@ -1,14 +1,15 @@ # XXX: this may need -liconv on non-glibc systems.. -{ stdenv, fetchgit, python, perl, autoconf, automake, libtool, intltool, flex }: +{ stdenv, fetchGitHub, python, perl, autoconf, automake, libtool, intltool, flex }: stdenv.mkDerivation rec { - name = "recode-3.7-pff85fdbd"; + name = "recode-3.7-2fd838565"; - src = fetchgit { - url = https://github.com/pinard/Recode.git; + src = fetchGitHub { + owner = "pinard"; + repo = "Recode"; rev = "2fd8385658e5a08700e3b916053f6680ff85fdbd"; - sha256 = "1xhlfmqld6af16l444jli9crj9brym2jihg1n6lkxh2gar68f5l7"; + sha256 = "06vyjqaraamcc5vka66mlvxj27ihccqc74aymv2wn8nphr2rhh03"; }; buildInputs = [ python perl autoconf automake libtool intltool flex ]; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f402eb50f482..573810135b8c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -340,6 +340,11 @@ let fetchzip = import ../build-support/fetchzip { inherit lib fetchurl unzip; }; + fetchGitHub = { owner, repo, rev, sha256 }: fetchzip { + url = "https://github.com/${owner}/${repo}/archive/${rev}.zip"; + inherit sha256; + }; + resolveMirrorURLs = {url}: fetchurl { showURLs = true; inherit url;