From 3dd8b1366ecdb2122d3e253464306f6b3cc7b198 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Sun, 19 Sep 2021 19:08:06 +0200 Subject: [PATCH 1/9] dir2opus: switch to fetchFromGitHub --- pkgs/tools/audio/dir2opus/default.nix | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pkgs/tools/audio/dir2opus/default.nix b/pkgs/tools/audio/dir2opus/default.nix index d23c334ad62f..c9729fa43d87 100644 --- a/pkgs/tools/audio/dir2opus/default.nix +++ b/pkgs/tools/audio/dir2opus/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, python, mutagen, wrapPython, opusTools, mpg123 }: +{ lib, stdenv, fetchFromGitHub, python, mutagen, wrapPython, opusTools, mpg123 }: let version = "0.12.2"; in stdenv.mkDerivation rec { @@ -9,10 +9,11 @@ stdenv.mkDerivation rec { buildInputs = [ wrapPython ]; propagatedBuildInputs = [ opusTools mpg123 ]; - src = fetchurl { - url = "https://github.com/ehmry/dir2opus/archive/${version}.tar.gz"; - name = "${pname}-${version}.tar.gz"; - sha256 = "0bl8fa9zhccihnj1v3lpz5jb737frf9za06xb7j5rsjws6xky80d"; + src = fetchFromGitHub { + owner = "ehmry"; + repo = "dir2opus"; + rev = version; + hash = "sha256-ZEsXwqxikWxFOz99wTI3rEK/rEYA+BSWGrCwW4q+FFc="; }; postPatch = "sed -i -e 's|#!/usr/bin/python|#!${python}/bin/python|' dir2opus"; From 797843e42b22856f3513be6bfb4e9d89368fb40b Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Sun, 19 Sep 2021 19:08:20 +0200 Subject: [PATCH 2/9] wal-e: switch to fetchFromGitHub --- pkgs/tools/backup/wal-e/default.nix | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/pkgs/tools/backup/wal-e/default.nix b/pkgs/tools/backup/wal-e/default.nix index 8e54b58e2017..544f61918de9 100644 --- a/pkgs/tools/backup/wal-e/default.nix +++ b/pkgs/tools/backup/wal-e/default.nix @@ -1,4 +1,4 @@ -{ lib, fetchurl, python3Packages, lzop, postgresql, pv }: +{ lib, fetchFromGitHub, python3Packages, lzop, postgresql, pv }: python3Packages.buildPythonApplication rec { pname = "wal-e"; @@ -6,9 +6,11 @@ python3Packages.buildPythonApplication rec { namePrefix = ""; - src = fetchurl { - url = "https://github.com/wal-e/wal-e/archive/v${version}.tar.gz"; - sha256 = "5TTd7NTO73+MCJf3dHIcNojjHdoaKJ1T051iW7Kt9Ow="; + src = fetchFromGitHub { + owner = "wal-e"; + repo = "wal-e"; + rev = "v${version}"; + hash = "sha256-I6suHkAYzDtlNFNPH4SziY93Ryp+NTHkCBuojDvv+U4="; }; # needs tox @@ -27,7 +29,7 @@ python3Packages.buildPythonApplication rec { meta = { description = "A Postgres WAL-shipping disaster recovery and replication toolkit"; homepage = "https://github.com/wal-e/wal-e"; - maintainers = []; + maintainers = [ ]; license = lib.licenses.bsd3; platforms = lib.platforms.linux; }; From 004822554c840c322153770381d90969be9a2d93 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Sun, 19 Sep 2021 19:08:39 +0200 Subject: [PATCH 3/9] zbackup: switch to fetchFromGitHub --- pkgs/tools/backup/zbackup/default.nix | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/pkgs/tools/backup/zbackup/default.nix b/pkgs/tools/backup/zbackup/default.nix index 12913ed62225..795a45f8864d 100644 --- a/pkgs/tools/backup/zbackup/default.nix +++ b/pkgs/tools/backup/zbackup/default.nix @@ -1,13 +1,18 @@ -{ lib, stdenv, fetchurl, cmake, zlib, openssl, protobuf, protobufc, lzo, libunwind } : -stdenv.mkDerivation { +{ lib, stdenv, fetchFromGitHub, cmake, zlib, openssl, protobuf, protobufc, lzo, libunwind }: +stdenv.mkDerivation rec { pname = "zbackup"; version = "1.4.4"; - src = fetchurl { - url = "https://github.com/zbackup/zbackup/archive/1.4.4.tar.gz"; - sha256 = "11csla7n44lg7x6yqg9frb21vnkr8cvnh6ardibr3nj5l39crk7g"; + + src = fetchFromGitHub { + owner = "zbackup"; + repo = "zbackup"; + rev = version; + hash = "sha256-9Fk4EhEeQ2J4Kirc7oad4CzmW70Mmza6uozd87qfgZI="; }; + buildInputs = [ zlib openssl protobuf lzo libunwind ]; nativeBuildInputs = [ cmake protobufc ]; + meta = { description = "A versatile deduplicating backup tool"; homepage = "http://zbackup.org/"; From fd0cbc696a6cf96ec8d0de7f67e44d51debf782e Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Sun, 19 Sep 2021 19:08:58 +0200 Subject: [PATCH 4/9] bcache-tools: switch to fetchFromGitHub --- pkgs/tools/filesystems/bcache-tools/default.nix | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pkgs/tools/filesystems/bcache-tools/default.nix b/pkgs/tools/filesystems/bcache-tools/default.nix index ba6cb79fbd57..f6dfdd84d8c4 100644 --- a/pkgs/tools/filesystems/bcache-tools/default.nix +++ b/pkgs/tools/filesystems/bcache-tools/default.nix @@ -1,13 +1,14 @@ -{ lib, stdenv, fetchurl, pkg-config, util-linux, bash }: +{ lib, stdenv, fetchFromGitHub, pkg-config, util-linux, bash }: stdenv.mkDerivation rec { pname = "bcache-tools"; version = "1.0.7"; - src = fetchurl { - name = "${pname}-${version}.tar.gz"; - url = "https://github.com/g2p/bcache-tools/archive/v${version}.tar.gz"; - sha256 = "1gbsh2qw0a7kgck6w0apydiy37nnz5xvdgipa0yqrfmghl86vmv4"; + src = fetchFromGitHub { + owner = "g2p"; + repo = "bcache-tools"; + rev = "v${version}"; + hash = "sha256-Ors2xXRrVTf8Cq3BYnSVSfJy/nyGjT5BGLSNpxOcHR4="; }; nativeBuildInputs = [ pkg-config ]; From 3ef5a889f58b2889c7028018b84f9bce7df1c514 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Sun, 19 Sep 2021 19:09:18 +0200 Subject: [PATCH 5/9] jbig2enc: switch to fetchFromGitHub --- pkgs/tools/graphics/jbig2enc/default.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pkgs/tools/graphics/jbig2enc/default.nix b/pkgs/tools/graphics/jbig2enc/default.nix index c04862610b69..ea5008dcf5cb 100644 --- a/pkgs/tools/graphics/jbig2enc/default.nix +++ b/pkgs/tools/graphics/jbig2enc/default.nix @@ -1,12 +1,14 @@ -{ lib, stdenv, fetchurl, leptonica, zlib, libwebp, giflib, libjpeg, libpng, libtiff }: +{ lib, stdenv, fetchFromGitHub, leptonica, zlib, libwebp, giflib, libjpeg, libpng, libtiff }: stdenv.mkDerivation rec { pname = "jbig2enc"; version = "0.28"; - src = fetchurl { - url = "https://github.com/agl/jbig2enc/archive/${version}-dist.tar.gz"; - sha256 = "1wc0lmqz4jag3rhhk1xczlqpfv2qqp3fz7wzic2lba3vsbi1rrw3"; + src = fetchFromGitHub { + owner = "agl"; + repo = "jbig2enc"; + rev = "${version}-dist"; + hash = "sha256-Y3IVTjvO5tqn/O076y/llnTyenKpbx1WyT/JFZ/s0VY="; }; propagatedBuildInputs = [ leptonica zlib libwebp giflib libjpeg libpng libtiff ]; From 95222c9d85b9972222cce0d4515c168e3933ef4f Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Sun, 19 Sep 2021 19:09:45 +0200 Subject: [PATCH 6/9] sipsakw: switch to fetchFromGitHub --- pkgs/tools/networking/sipsak/default.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pkgs/tools/networking/sipsak/default.nix b/pkgs/tools/networking/sipsak/default.nix index 556204972860..a55a32c21a9a 100644 --- a/pkgs/tools/networking/sipsak/default.nix +++ b/pkgs/tools/networking/sipsak/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, autoreconfHook, c-ares, openssl ? null }: +{ lib, stdenv, fetchFromGitHub, autoreconfHook, c-ares, openssl ? null }: stdenv.mkDerivation rec { pname = "sipsak"; @@ -12,9 +12,11 @@ stdenv.mkDerivation rec { NIX_CFLAGS_COMPILE = "--std=gnu89"; - src = fetchurl { - url = "https://github.com/sipwise/sipsak/archive/mr${version}.tar.gz"; - sha256 = "769fe59966b1962b67aa35aad7beb9a2110ebdface36558072a05c6405fb5374"; + src = fetchFromGitHub { + owner = "sipwise"; + repo = "sipsak"; + rev = "mr${version}"; + hash = "sha256-y9P6t3xjazRNT6lDZAx+CttdyXruC6Q14b8XF9loeU4="; }; meta = with lib; { From 51aa71bffb699ba086161379f05a80f0eecb4274 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Sun, 19 Sep 2021 19:10:07 +0200 Subject: [PATCH 7/9] tcptraceroute: switch to fetchFromGitHub --- .../networking/tcptraceroute/default.nix | 46 +++++++++++-------- 1 file changed, 26 insertions(+), 20 deletions(-) diff --git a/pkgs/tools/networking/tcptraceroute/default.nix b/pkgs/tools/networking/tcptraceroute/default.nix index 1eacd685463e..379caedaaf1b 100644 --- a/pkgs/tools/networking/tcptraceroute/default.nix +++ b/pkgs/tools/networking/tcptraceroute/default.nix @@ -1,28 +1,34 @@ -{ lib, stdenv , fetchurl, libpcap, libnet +{ lib +, stdenv +, fetchFromGitHub +, libpcap +, libnet }: stdenv.mkDerivation rec { - pkgname = "tcptraceroute"; - name = "${pkgname}-${version}"; - version = "1.5beta7"; + pname = "tcptraceroute"; + version = "1.5beta7"; - src = fetchurl { - url = "https://github.com/mct/${pkgname}/archive/${name}.tar.gz"; - sha256 = "1rz8bgc6r1isb40awv1siirpr2i1paa2jc1cd3l5pg1m9522xzap"; - }; + src = fetchFromGitHub { + owner = "mct"; + repo = "tcptraceroute"; + rev = "${pname}-${version}"; + hash = "sha256-KU4MLWtOFzzNr+I99fRbhBokhS1JUNL+OgVltkOGav4="; + }; - # for reasons unknown --disable-static configure flag doesn't disable static - # linking.. we instead override CFLAGS with -static omitted - preBuild = '' - makeFlagsArray=(CFLAGS=" -g -O2 -Wall") - ''; - buildInputs = [ libpcap libnet ]; + # for reasons unknown --disable-static configure flag doesn't disable static + # linking.. we instead override CFLAGS with -static omitted + preBuild = '' + makeFlagsArray=(CFLAGS=" -g -O2 -Wall") + ''; - meta = { - description = "A traceroute implementation using TCP packets"; - homepage = "https://github.com/mct/tcptraceroute"; - license = lib.licenses.gpl2; - maintainers = [ ]; - }; + buildInputs = [ libpcap libnet ]; + + meta = { + description = "A traceroute implementation using TCP packets"; + homepage = "https://github.com/mct/tcptraceroute"; + license = lib.licenses.gpl2; + maintainers = [ ]; + }; } From 02c1bcfc38d961203c39d6c2f07f7700ccc526e1 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Sun, 19 Sep 2021 19:10:22 +0200 Subject: [PATCH 8/9] tracebox: switch to fetchFromGitHub --- pkgs/tools/networking/tracebox/default.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pkgs/tools/networking/tracebox/default.nix b/pkgs/tools/networking/tracebox/default.nix index 3d50b11f8e1a..79efc95036d9 100644 --- a/pkgs/tools/networking/tracebox/default.nix +++ b/pkgs/tools/networking/tracebox/default.nix @@ -1,12 +1,14 @@ -{ lib, stdenv, fetchzip, autoreconfHook, libcrafter, libpcap, lua }: +{ lib, stdenv, fetchFromGitHub, autoreconfHook, libcrafter, libpcap, lua }: stdenv.mkDerivation rec { pname = "tracebox"; version = "0.2"; - src = fetchzip { - url = "https://github.com/tracebox/tracebox/archive/v${version}.zip"; - sha256 = "0gxdapm6b5a41gymi1f0nr2kyz70vllnk10085yz3pq527gp9gns"; + src = fetchFromGitHub { + owner = "tracebox"; + repo = "tracebox"; + rev = "v${version}"; + hash = "sha256-2r503xEF3/F9QQCEaSnd4Hw/RbbAhVj9C0SVZepVrT8="; }; nativeBuildInputs = [ autoreconfHook ]; From cfaa89b03ba45b142be130d79de9fb6b8d2e0154 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Sun, 19 Sep 2021 19:10:58 +0200 Subject: [PATCH 9/9] openssh-portable: switch to fetchFromGitHub --- pkgs/tools/networking/openssh/default.nix | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/pkgs/tools/networking/openssh/default.nix b/pkgs/tools/networking/openssh/default.nix index 4cc943fc75f5..2652f6823425 100644 --- a/pkgs/tools/networking/openssh/default.nix +++ b/pkgs/tools/networking/openssh/default.nix @@ -1,7 +1,8 @@ -{ callPackage, fetchurl, fetchpatch, autoreconfHook }: +{ callPackage, fetchurl, fetchpatch, fetchFromGitHub, autoreconfHook }: let - common = opts: callPackage (import ./common.nix opts) {}; -in { + common = opts: callPackage (import ./common.nix opts) { }; +in +{ openssh = common rec { pname = "openssh"; @@ -20,9 +21,11 @@ in { version = "8.4p1"; extraDesc = " with high performance networking patches"; - src = fetchurl { - url = "https://github.com/rapier1/openssh-portable/archive/hpn-KitchenSink-${builtins.replaceStrings [ "." "p" ] [ "_" "_P" ] version}.tar.gz"; - sha256 = "1x2afjy1isslbg7qlvhhs4zhj2c8q2h1ljz0fc5b4h9pqcm9j540"; + src = fetchFromGitHub { + owner = "rapier1"; + repo = "openssh-portable"; + rev = "hpn-KitchenSink-${builtins.replaceStrings [ "." "p" ] [ "_" "_P" ] version}"; + hash = "sha256-SYQPDGxZR41m4g603RaZaOYm4vCr9uZnFnZoKhruueY="; }; extraPatches = [