From aeb416bb22b32b4fbb23001956417202be9e0259 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Tue, 2 Nov 2021 11:00:43 +0100 Subject: [PATCH 01/14] cadence: switch to fetchFromGitHub --- pkgs/applications/audio/cadence/default.nix | 86 ++++++++++++--------- 1 file changed, 48 insertions(+), 38 deletions(-) diff --git a/pkgs/applications/audio/cadence/default.nix b/pkgs/applications/audio/cadence/default.nix index 62bf32eb71d0..72f13bdb09bf 100644 --- a/pkgs/applications/audio/cadence/default.nix +++ b/pkgs/applications/audio/cadence/default.nix @@ -3,7 +3,7 @@ , coreutils , libjack2 , fetchpatch -, fetchzip +, fetchFromGitHub , jack_capture , pkg-config , pulseaudioFull @@ -20,9 +20,11 @@ mkDerivation rec { version = "0.9.1"; pname = "cadence"; - src = fetchzip { - url = "https://github.com/falkTX/Cadence/archive/v${version}.tar.gz"; - sha256 = "07z8grnnpkd0nf3y3r6qjlk1jlzrbhdrp9mnhrhhmws54p1bhl20"; + src = fetchFromGitHub { + owner = "falkTX"; + repo = "Cadence"; + rev = "v${version}"; + sha256 = "sha256-QFC4wiVF8wphhrammxtc+VMZJpXY5OGHs6DNa21+6B8="; }; patches = [ @@ -39,11 +41,11 @@ mkDerivation rec { ]; postPatch = '' - libjackso=$(realpath ${lib.makeLibraryPath [libjack2]}/libjack.so.0); - substituteInPlace ./src/jacklib.py --replace libjack.so.0 $libjackso - substituteInPlace ./src/cadence.py --replace "/usr/bin/pulseaudio" \ - "${lib.makeBinPath[pulseaudioFull]}/pulseaudio" - substituteInPlace ./c++/jackbridge/JackBridge.cpp --replace libjack.so.0 $libjackso + libjackso=$(realpath ${lib.makeLibraryPath [libjack2]}/libjack.so.0); + substituteInPlace ./src/jacklib.py --replace libjack.so.0 $libjackso + substituteInPlace ./src/cadence.py --replace "/usr/bin/pulseaudio" \ + "${lib.makeBinPath[pulseaudioFull]}/pulseaudio" + substituteInPlace ./c++/jackbridge/JackBridge.cpp --replace libjack.so.0 $libjackso ''; nativeBuildInputs = [ @@ -54,10 +56,12 @@ mkDerivation rec { qtbase jack_capture pulseaudioFull - ((python3.withPackages (ps: with ps; [ - pyqt5 - dbus-python - ]))) + ( + (python3.withPackages (ps: with ps; [ + pyqt5 + dbus-python + ])) + ) ]; makeFlags = [ @@ -68,31 +72,37 @@ mkDerivation rec { dontWrapQtApps = true; # Replace with our own wrappers. They need to be changed manually since it wouldn't work otherwise. - preFixup = let - outRef = placeholder "out"; - prefix = "${outRef}/share/cadence/src"; - scriptAndSource = lib.mapAttrs' (script: source: - lib.nameValuePair ("${outRef}/bin/" + script) ("${prefix}/" + source) - ) { - "cadence" = "cadence.py"; - "claudia" = "claudia.py"; - "catarina" = "catarina.py"; - "catia" = "catia.py"; - "cadence-jacksettings" = "jacksettings.py"; - "cadence-aloop-daemon" = "cadence_aloop_daemon.py"; - "cadence-logs" = "logs.py"; - "cadence-render" = "render.py"; - "claudia-launcher" = "claudia_launcher.py"; - "cadence-session-start" = "cadence_session_start.py"; - }; - in lib.mapAttrsToList (script: source: '' - rm -f ${script} - makeQtWrapper ${source} ${script} \ - --prefix PATH : "${lib.makeBinPath [ - jack_capture # cadence-render - pulseaudioFull # cadence, cadence-session-start - ]}" - '') scriptAndSource; + preFixup = + let + outRef = placeholder "out"; + prefix = "${outRef}/share/cadence/src"; + scriptAndSource = lib.mapAttrs' + (script: source: + lib.nameValuePair ("${outRef}/bin/" + script) ("${prefix}/" + source) + ) + { + "cadence" = "cadence.py"; + "claudia" = "claudia.py"; + "catarina" = "catarina.py"; + "catia" = "catia.py"; + "cadence-jacksettings" = "jacksettings.py"; + "cadence-aloop-daemon" = "cadence_aloop_daemon.py"; + "cadence-logs" = "logs.py"; + "cadence-render" = "render.py"; + "claudia-launcher" = "claudia_launcher.py"; + "cadence-session-start" = "cadence_session_start.py"; + }; + in + lib.mapAttrsToList + (script: source: '' + rm -f ${script} + makeQtWrapper ${source} ${script} \ + --prefix PATH : "${lib.makeBinPath [ + jack_capture # cadence-render + pulseaudioFull # cadence, cadence-session-start + ]}" + '') + scriptAndSource; meta = { homepage = "https://github.com/falkTX/Cadence/"; From 82bb0302ca8203bbf947a4ec8ea66140f1e6a1e4 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Tue, 2 Nov 2021 11:01:01 +0100 Subject: [PATCH 02/14] hybridreverb2: switch to fetchFromGitHub --- .../audio/hybridreverb2/default.nix | 53 +++++++++++++++---- 1 file changed, 44 insertions(+), 9 deletions(-) diff --git a/pkgs/applications/audio/hybridreverb2/default.nix b/pkgs/applications/audio/hybridreverb2/default.nix index c539a316422a..b83eb591d813 100644 --- a/pkgs/applications/audio/hybridreverb2/default.nix +++ b/pkgs/applications/audio/hybridreverb2/default.nix @@ -1,6 +1,24 @@ -{ lib, stdenv, fetchFromGitHub, fetchzip, cmake, pkg-config, lv2, alsa-lib, libjack2, - freetype, libX11, gtk3, pcre, libpthreadstubs, libXdmcp, libxkbcommon, - epoxy, at-spi2-core, dbus, curl, fftwFloat }: +{ lib +, stdenv +, fetchFromGitHub +, cmake +, pkg-config +, lv2 +, alsa-lib +, libjack2 +, freetype +, libX11 +, gtk3 +, pcre +, libpthreadstubs +, libXdmcp +, libxkbcommon +, epoxy +, at-spi2-core +, dbus +, curl +, fftwFloat +}: let pname = "HybridReverb2"; @@ -10,11 +28,13 @@ let in stdenv.mkDerivation rec { - name = "${pname}-${version}"; + inherit pname version; - impulseDB = fetchzip { - url = "https://github.com/${owner}/${pname}-impulse-response-database/archive/v${DBversion}.zip"; - sha256 = "1hlfxbbkahm1k2sk3c3n2mjaz7k80ky3r55xil8nfbvbv0qan89z"; + impulseDB = fetchFromGitHub { + inherit owner; + repo = "HybridReverb2-impulse-response-database"; + rev = "v${DBversion}"; + sha256 = "sha256-PyGrMNhrL2cRjb2UPPwEaJ6vZBV2sDG1mKFCNdfqjsI="; }; src = fetchFromGitHub { @@ -26,8 +46,23 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ pkg-config cmake ]; - buildInputs = [ lv2 alsa-lib libjack2 freetype libX11 gtk3 pcre - libpthreadstubs libXdmcp libxkbcommon epoxy at-spi2-core dbus curl fftwFloat ]; + buildInputs = [ + lv2 + alsa-lib + libjack2 + freetype + libX11 + gtk3 + pcre + libpthreadstubs + libXdmcp + libxkbcommon + epoxy + at-spi2-core + dbus + curl + fftwFloat + ]; cmakeFlags = [ "-DHybridReverb2_AdvancedJackStandalone=ON" From 221ec72f0ed9a12dc035a9e8137b8abd456ef1eb Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Tue, 2 Nov 2021 11:01:17 +0100 Subject: [PATCH 03/14] hydrogen0: switch to fetchFromGitHub --- pkgs/applications/audio/hydrogen/0.nix | 34 +++++++++++++++++++++----- 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/pkgs/applications/audio/hydrogen/0.nix b/pkgs/applications/audio/hydrogen/0.nix index ad3566571b0c..aa1821657867 100644 --- a/pkgs/applications/audio/hydrogen/0.nix +++ b/pkgs/applications/audio/hydrogen/0.nix @@ -1,19 +1,41 @@ -{ lib, stdenv, fetchurl, pkg-config, cmake -, alsa-lib, boost, glib, lash, libjack2, libarchive, libsndfile, lrdf, qt4 +{ lib +, stdenv +, fetchFromGitHub +, pkg-config +, cmake +, alsa-lib +, boost +, glib +, lash +, libjack2 +, libarchive +, libsndfile +, lrdf +, qt4 }: stdenv.mkDerivation rec { version = "0.9.7"; pname = "hydrogen"; - src = fetchurl { - url = "https://github.com/hydrogen-music/hydrogen/archive/${version}.tar.gz"; - sha256 = "1dy2jfkdw0nchars4xi4isrz66fqn53a9qk13bqza7lhmsg3s3qy"; + src = fetchFromGitHub { + owner = "hydrogen-music"; + repo = "hydrogen"; + rev = version; + sha256 = "sha256-6ycNUcumtAEl/6XbIpW6JglGv4nNOdMrOJ1nvJg3z/c="; }; nativeBuildInputs = [ pkg-config cmake ]; buildInputs = [ - alsa-lib boost glib lash libjack2 libarchive libsndfile lrdf qt4 + alsa-lib + boost + glib + lash + libjack2 + libarchive + libsndfile + lrdf + qt4 ]; meta = with lib; { From fb1cc88a084a1c1e4dcf12116ec9dfe4030ca827 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Tue, 2 Nov 2021 11:01:32 +0100 Subject: [PATCH 04/14] ladspa-plugins: switch to fetchFromGitHub --- .../audio/ladspa-plugins/default.nix | 24 +++++++++++++------ 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/pkgs/applications/audio/ladspa-plugins/default.nix b/pkgs/applications/audio/ladspa-plugins/default.nix index fe8e9f323a57..491a18bba3ea 100644 --- a/pkgs/applications/audio/ladspa-plugins/default.nix +++ b/pkgs/applications/audio/ladspa-plugins/default.nix @@ -1,18 +1,28 @@ -{ lib, stdenv, fetchurl, autoreconfHook, automake, fftw, ladspaH, libxml2, pkg-config -, perlPackages }: +{ lib +, stdenv +, fetchFromGitHub +, autoreconfHook +, automake +, fftw +, ladspaH +, libxml2 +, pkg-config +, perlPackages +}: stdenv.mkDerivation rec { pname = "swh-plugins"; version = "0.4.17"; - - src = fetchurl { - url = "https://github.com/swh/ladspa/archive/v${version}.tar.gz"; - sha256 = "1rqwh8xrw6hnp69dg4gy336bfbfpmbx4fjrk0nb8ypjcxkz91c6i"; + src = fetchFromGitHub { + owner = "swh"; + repo = "ladspa"; + rev = "v${version}"; + sha256 = "sha256-eOtIhNcuItREUShI8JRlBVKfMfovpdfIYu+m37v4KLE="; }; nativeBuildInputs = [ autoreconfHook pkg-config ]; - buildInputs = [ fftw ladspaH libxml2 perlPackages.perl perlPackages.XMLParser ]; + buildInputs = [ fftw ladspaH libxml2 perlPackages.perl perlPackages.XMLParser ]; patchPhase = '' patchShebangs . From 2e74d854f3749c2dd8f72fba76d656791ae7dd35 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Tue, 2 Nov 2021 11:01:48 +0100 Subject: [PATCH 05/14] swh-lv2: switch to fetchFromGitHub --- pkgs/applications/audio/swh-lv2/default.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/audio/swh-lv2/default.nix b/pkgs/applications/audio/swh-lv2/default.nix index f2b71c1ce291..338877d2be21 100644 --- a/pkgs/applications/audio/swh-lv2/default.nix +++ b/pkgs/applications/audio/swh-lv2/default.nix @@ -1,12 +1,14 @@ -{ lib, stdenv, fetchurl, fftwSinglePrec, libxslt, lv2, pkg-config }: +{ lib, stdenv, fetchFromGitHub, fftwSinglePrec, libxslt, lv2, pkg-config }: stdenv.mkDerivation rec { pname = "swh-lv2"; version = "1.0.16"; - src = fetchurl { - url = "https://github.com/swh/lv2/archive/v${version}.tar.gz"; - sha256 = "0j1mih0lp4fds07knp5i32in515sh0df1qi6694pmyz2wqnm295w"; + src = fetchFromGitHub { + owner = "swh"; + repo = "lv2"; + rev = "v${version}"; + sha256 = "sha256-v6aJUWDbBZEmz0v6+cSCi/KhOYNUeK/MJLUSgzi39ng="; }; patchPhase = '' From 2a8a50b45731921aa9c1c60bb6d461ec18354626 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Tue, 2 Nov 2021 11:02:05 +0100 Subject: [PATCH 06/14] particl-core: switch to fetchFromGitHub --- .../blockchains/particl-core/default.nix | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/pkgs/applications/blockchains/particl-core/default.nix b/pkgs/applications/blockchains/particl-core/default.nix index d5838a4f4f28..c9fb1a458692 100644 --- a/pkgs/applications/blockchains/particl-core/default.nix +++ b/pkgs/applications/blockchains/particl-core/default.nix @@ -1,8 +1,9 @@ -{ lib, stdenv +{ lib +, stdenv , autoreconfHook , boost , db48 -, fetchurl +, fetchFromGitHub , libevent , miniupnpc , openssl @@ -19,9 +20,11 @@ stdenv.mkDerivation rec { pname = "particl-core"; version = "0.19.2.14"; - src = fetchurl { - url = "https://github.com/particl/particl-core/archive/v${version}.tar.gz"; - sha256 = "sha256-UMU3384r4RGVl0/7OPwdDva09vhQr+9Lqb1oD/PTva8="; + src = fetchFromGitHub { + owner = "particl"; + repo = "particl-core"; + rev = "v${version}"; + sha256 = "sha256-gJLEMfEvQ35xjKt8iN/FXi2T/GBMSS7eUqOC8XHKPBg="; }; nativeBuildInputs = [ pkg-config autoreconfHook ]; @@ -41,7 +44,7 @@ stdenv.mkDerivation rec { meta = { description = "Privacy-Focused Marketplace & Decentralized Application Platform"; - longDescription= '' + longDescription = '' An open source, decentralized privacy platform built for global person to person eCommerce. RPC daemon and CLI client only. ''; From a1cea09cd57f7f0a6733bed3f2759449e6ca607e Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Tue, 2 Nov 2021 11:02:19 +0100 Subject: [PATCH 07/14] fme: switch to fetchFromGitHub --- pkgs/applications/misc/fme/default.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/misc/fme/default.nix b/pkgs/applications/misc/fme/default.nix index 6f6a143ae8e0..03a9f875a793 100644 --- a/pkgs/applications/misc/fme/default.nix +++ b/pkgs/applications/misc/fme/default.nix @@ -1,6 +1,6 @@ { lib , stdenv -, fetchurl +, fetchFromGitHub , autoconf , automake , bc @@ -17,9 +17,11 @@ stdenv.mkDerivation rec { pname = "fme"; version = "1.1.3"; - src = fetchurl { - url = "https://github.com/rdehouss/fme/archive/v${version}.tar.gz"; - hash = "sha256-0cgaajjA+q0ClDrWXW0DFL0gXG3oQWaaLv5D5MUD5j0="; + src = fetchFromGitHub { + owner = "rdehouss"; + repo = "fme"; + rev = "v${version}"; + sha256 = "sha256-P67OmExBdWM6NZhDyYceVJOZiy8RC+njk/QvgQcWZeQ="; }; nativeBuildInputs = [ From 7849d37611f343f439cea7c3a527b9364163497c Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Tue, 2 Nov 2021 11:02:29 +0100 Subject: [PATCH 08/14] ricochet: switch to fetchFromGitHub --- .../instant-messengers/ricochet/default.nix | 33 ++++++++++++++----- 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/pkgs/applications/networking/instant-messengers/ricochet/default.nix b/pkgs/applications/networking/instant-messengers/ricochet/default.nix index 97d8d39f6567..0aa2d4cc6771 100644 --- a/pkgs/applications/networking/instant-messengers/ricochet/default.nix +++ b/pkgs/applications/networking/instant-messengers/ricochet/default.nix @@ -1,15 +1,27 @@ -{ mkDerivation, lib, fetchurl, pkg-config, makeDesktopItem -, qtbase, qttools, qtmultimedia, qtquick1, qtquickcontrols -, openssl, protobuf, qmake +{ mkDerivation +, lib +, fetchFromGitHub +, pkg-config +, makeDesktopItem +, qtbase +, qttools +, qtmultimedia +, qtquick1 +, qtquickcontrols +, openssl +, protobuf +, qmake }: mkDerivation rec { pname = "ricochet"; version = "1.1.4"; - src = fetchurl { - url = "https://github.com/ricochet-im/ricochet/archive/v${version}.tar.gz"; - sha256 = "1kfj42ksvj7axc809lb8siqzj5hck2pib427b63a3ipnqc5h1faf"; + src = fetchFromGitHub { + owner = "ricochet-im"; + repo = "ricochet"; + rev = "v${version}"; + sha256 = "sha256-CGVTHa0Hqj90WvB6ZbA156DVgzv/R7blsU550y2Ai9c="; }; desktopItem = makeDesktopItem { @@ -23,8 +35,13 @@ mkDerivation rec { }; buildInputs = [ - qtbase qttools qtmultimedia qtquick1 qtquickcontrols - openssl protobuf + qtbase + qttools + qtmultimedia + qtquick1 + qtquickcontrols + openssl + protobuf ]; nativeBuildInputs = [ pkg-config qmake ]; From 51d7d762066085cf79bb4c69017eaa000b8f187d Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Tue, 2 Nov 2021 11:02:45 +0100 Subject: [PATCH 09/14] scudcloud: switch to fetchFromGitHub --- .../instant-messengers/scudcloud/default.nix | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/pkgs/applications/networking/instant-messengers/scudcloud/default.nix b/pkgs/applications/networking/instant-messengers/scudcloud/default.nix index 29d4c3600c39..76e6dc0f3d06 100644 --- a/pkgs/applications/networking/instant-messengers/scudcloud/default.nix +++ b/pkgs/applications/networking/instant-messengers/scudcloud/default.nix @@ -1,12 +1,14 @@ -{ lib, fetchurl, python3Packages }: +{ lib, fetchFromGitHub, python3Packages }: -let version = "1.63"; -in python3Packages.buildPythonPackage { - name = "scudcloud-${version}"; +python3Packages.buildPythonPackage rec { + pname = "scudcloud"; + version = "1.63"; - src = fetchurl { - url = "https://github.com/raelgc/scudcloud/archive/v${version}.tar.gz"; - sha256 = "e0d1cb72115d0fda17db92d28be51558ad8fe250972683fac3086dbe8d350d22"; + src = fetchFromGitHub { + owner = "raelgc"; + repo = "scudcloud"; + rev = "v${version}"; + sha256 = "sha256-b8+MVjYKbSpnfM2ow2MNVY6MiT+urpNYDkFR/yUC7ik="; }; propagatedBuildInputs = with python3Packages; [ pyqt5_with_qtwebkit dbus-python jsmin ]; From 58993fbd4da683d5d0d25a78e340a94f6bc48543 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Tue, 2 Nov 2021 14:23:17 +0100 Subject: [PATCH 10/14] ib/controller: switch to fetchFromGitHub --- pkgs/applications/office/ib/controller/default.nix | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/pkgs/applications/office/ib/controller/default.nix b/pkgs/applications/office/ib/controller/default.nix index 0815dfc8982f..c26349c3d610 100644 --- a/pkgs/applications/office/ib/controller/default.nix +++ b/pkgs/applications/office/ib/controller/default.nix @@ -1,12 +1,14 @@ -{ lib, stdenv, fetchurl, unzip, jdk, ib-tws, xpra }: +{ lib, stdenv, fetchFromGitHub, unzip, jdk, ib-tws, xpra }: stdenv.mkDerivation rec { version = "2.14.0"; pname = "ib-controller"; - src = fetchurl { - url = "https://github.com/ib-controller/ib-controller/archive/${version}.tar.gz"; - sha256 = "17a8bcgg9z3b4y38k035hm2lgvhmf8srlz59c7n2q3fdw2i95i68"; + src = fetchFromGitHub { + owner = "ib-controller"; + repo = "ib-controller"; + rev = version; + sha256 = "sha256-R175CKb3uErjBNe73HEFMI+bNmmuH2nWGraCSh5bXwc="; }; phases = [ "unpackPhase" "installPhase" ]; @@ -150,7 +152,7 @@ stdenv.mkDerivation rec { fi EOF chmod u+x $out/bin/ib-gw-c - ''; + ''; meta = with lib; { From 3a2808eab1c3f9bc0d954464f3b3e32f59bf1caa Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Tue, 2 Nov 2021 14:23:29 +0100 Subject: [PATCH 11/14] mytetra: switch to fetchFromGitHub --- pkgs/applications/office/mytetra/default.nix | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/pkgs/applications/office/mytetra/default.nix b/pkgs/applications/office/mytetra/default.nix index cb90af5244c6..5ffd178b055d 100644 --- a/pkgs/applications/office/mytetra/default.nix +++ b/pkgs/applications/office/mytetra/default.nix @@ -1,13 +1,14 @@ -{ lib, mkDerivation, fetchurl, qmake, qtsvg, makeWrapper, xdg-utils }: +{ lib, mkDerivation, fetchFromGitHub, qmake, qtsvg, makeWrapper, xdg-utils }: -let - version = "1.44.55"; -in mkDerivation { +mkDerivation rec { pname = "mytetra"; - inherit version; - src = fetchurl { - url = "https://github.com/xintrea/mytetra_dev/archive/v.${version}.tar.gz"; - sha256 = "13lmfvschm1xwr0ys2ykhs0bb83m2f39rk1jdd7zf8yxlqki4i6l"; + version = "1.44.55"; + + src = fetchFromGitHub { + owner = "xintrea"; + repo = "mytetra_dev"; + rev = "v.${version}"; + sha256 = "sha256-jQXnDoLkqbDZxfsYKPDsTOE7p/BFeA8wEznpbkRVGdw="; }; nativeBuildInputs = [ qmake makeWrapper ]; From 7dfb853434b5a1124c664d3fdb6f28274e640956 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Tue, 2 Nov 2021 14:23:43 +0100 Subject: [PATCH 12/14] svn2git: switch to fetchFromGitHub --- .../git-and-tools/svn2git/default.nix | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/pkgs/applications/version-management/git-and-tools/svn2git/default.nix b/pkgs/applications/version-management/git-and-tools/svn2git/default.nix index 74f10a142883..562658a6e99f 100644 --- a/pkgs/applications/version-management/git-and-tools/svn2git/default.nix +++ b/pkgs/applications/version-management/git-and-tools/svn2git/default.nix @@ -1,15 +1,14 @@ -{ lib, stdenv, fetchurl, ruby, makeWrapper, git }: +{ lib, stdenv, fetchFromGitHub, ruby, makeWrapper, git }: -let - version = "2.4.0"; -in -stdenv.mkDerivation { +stdenv.mkDerivation rec { pname = "svn2git"; - inherit version; + version = "2.4.0"; - src = fetchurl { - url = "https://github.com/nirvdrum/svn2git/archive/v${version}.tar.gz"; - sha256 = "0ly2vrv6q31n0xhciwb7a1ilr5c6ndyi3bg81yfp4axiypps7l41"; + src = fetchFromGitHub { + owner = "nirvdrum"; + repo = "svn2git"; + rev = "v${version}"; + sha256 = "sha256-w649l/WO68vYYxZOBKzI8XhGFkaSwWx/O3oVOtnGg6w="; }; nativeBuildInputs = [ ruby makeWrapper ]; From e4726e19e70808a27947fa7e828640da2a7feca1 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Tue, 2 Nov 2021 14:23:58 +0100 Subject: [PATCH 13/14] gitinspector: switch to fetchFromGitHub --- .../version-management/gitinspector/default.nix | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pkgs/applications/version-management/gitinspector/default.nix b/pkgs/applications/version-management/gitinspector/default.nix index 384f5d0f01f7..63ceb6e3868f 100644 --- a/pkgs/applications/version-management/gitinspector/default.nix +++ b/pkgs/applications/version-management/gitinspector/default.nix @@ -1,14 +1,15 @@ -{ lib, fetchzip, python2Packages}: +{ lib, fetchFromGitHub, python2Packages }: python2Packages.buildPythonApplication rec { pname = "gitinspector"; version = "0.4.4"; namePrefix = ""; - src = fetchzip { - url = "https://github.com/ejwa/gitinspector/archive/v${version}.tar.gz"; - sha256 = "1pfsw6xldm6jigs3nhysvqaxk8a0zf8zczgfkrp920as9sya3c7m"; - name = "${pname}-${version}" + "-src"; + src = fetchFromGitHub { + owner = "ejwa"; + repo = "gitinspector"; + rev = "v${version}"; + sha256 = "sha256-9bChvE5aAZFunu599pH7QKHZFd7aQzv0i9LURrvh2t0="; }; checkInputs = with python2Packages; [ From a76d49eaf8e4ebac1d32e124e3171dd03d96c12f Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Tue, 2 Nov 2021 14:24:09 +0100 Subject: [PATCH 14/14] gitstats: switch to fetchFromGitHub --- .../version-management/gitstats/default.nix | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pkgs/applications/version-management/gitstats/default.nix b/pkgs/applications/version-management/gitstats/default.nix index b987a3f55128..6cfcb0077427 100644 --- a/pkgs/applications/version-management/gitstats/default.nix +++ b/pkgs/applications/version-management/gitstats/default.nix @@ -1,14 +1,15 @@ -{ lib, stdenv, fetchzip, perl, python2, gnuplot, coreutils, gnugrep }: +{ lib, stdenv, fetchFromGitHub, perl, python2, gnuplot, coreutils, gnugrep }: stdenv.mkDerivation rec { pname = "gitstats"; version = "2016-01-08"; # upstream does not make releases - src = fetchzip { - url = "https://github.com/hoxu/gitstats/archive/55c5c285558c410bb35ebf421245d320ab9ee9fa.zip"; - sha256 = "1bfcwhksylrpm88vyp33qjby4js31zcxy7w368dzjv4il3fh2i59"; - name = "${pname}-${version}" + "-src"; + src = fetchFromGitHub { + owner = "hoxu"; + repo = "gitstats"; + rev = "55c5c285558c410bb35ebf421245d320ab9ee9fa"; + sha256 = "sha256-qUQB3aCRbPkbMoMf39kPQ0vil8RjXL8RqjdTryfkzK0="; }; nativeBuildInputs = [ perl ];