Merge pull request #153862 from Stunkymonkey/treewide-github-5

treewide: switch to fetchFromGitHub
This commit is contained in:
Felix Bühler 2022-01-13 00:24:44 +01:00 committed by GitHub
commit f0616a2045
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 99 additions and 74 deletions

View File

@ -1,6 +1,6 @@
{ lib
, stdenv
, fetchurl
, fetchFromGitHub
, autoreconfHook
, pkg-config
, util-linux
@ -26,9 +26,11 @@ stdenv.mkDerivation rec {
pname = if withGui then "elements" else "elementsd";
version = "0.21.0.1";
src = fetchurl {
url = "https://github.com/ElementsProject/elements/archive/elements-${version}.tar.gz";
sha256 = "00a2lrn77mfmr5dvrqwplk20gaxxq4cd9gcx667hgmfmmz1v6r6b";
src = fetchFromGitHub {
owner = "ElementsProject";
repo = "elements";
rev = "elements-${version}";
sha256 = "sha256-nZa5doiFQJhtK8cUUISTZhS61HzW7CMB9pPsWKc8Gac=";
};
nativeBuildInputs =

View File

@ -1,4 +1,4 @@
{ mkDerivation, lib, fetchzip, buildEnv, makeDesktopItem, runCommand, writeText, pkg-config
{ mkDerivation, lib, fetchFromGitHub, buildEnv, makeDesktopItem, runCommand, writeText, pkg-config
, cmake, qmake, cacert, jsoncpp, libX11, libXScrnSaver, lua, openssl, poco
, qtbase, qtwebengine, qtx11extras, sqlite }:
@ -6,18 +6,22 @@ let
name = "toggldesktop-${version}";
version = "7.4.231";
src = fetchzip {
url = "https://github.com/toggl/toggldesktop/archive/v${version}.tar.gz";
sha256 = "01hqkx9dljnhwnyqi6mmzfp02hnbi2j50rsfiasniqrkbi99x9v1";
src = fetchFromGitHub {
owner = "toggl";
repo = "toggldesktop";
rev = "v${version}";
sha256 = "sha256-YaeeUlwz42i1ik5nUKSIy0IBrvu1moi95dBK2lKfGAY=";
};
bugsnag-qt = mkDerivation rec {
pname = "bugsnag-qt";
version = "20180522.005732";
src = fetchzip {
url = "https://github.com/alpakido/bugsnag-qt/archive/${version}.tar.gz";
sha256 = "02s6mlggh0i4a856md46dipy6mh47isap82jlwmjr7hfsk2ykgnq";
src = fetchFromGitHub {
owner = "alpakido";
repo = "bugsnag-qt";
rev = version;
sha256 = "sha256-2L7pxdQOniwrp1Kgq3Q8BFbjb2yGtGoKUiQC+B6tRgs=";
};
nativeBuildInputs = [ qmake ];
@ -28,9 +32,11 @@ let
pname = "qxtglobalshortcut";
version = "f584471dada2099ba06c574bdfdd8b078c2e3550";
src = fetchzip {
url = "https://github.com/hluk/qxtglobalshortcut/archive/${version}.tar.gz";
sha256 = "1iy17gypav10z8aa62s5jb6mq9y4kb9ms4l61ydmk3xwlap7igw1";
src = fetchFromGitHub {
owner = "hluk";
repo = "qxtglobalshortcut";
rev = version;
sha256 = "sha256-gb94rqK8j1mbD4YSXdOaxCdczZJFC6MU+iBsdf07wcc=";
};
nativeBuildInputs = [ cmake ];
@ -41,9 +47,11 @@ let
pname = "qt-oauth-lib";
version = "20190125.190943";
src = fetchzip {
url = "https://github.com/alpakido/qt-oauth-lib/archive/${version}.tar.gz";
sha256 = "0zmfgvdf6n79mgfvbda7lkdxxlzjmy86436gqi2r5x05vq04sfrj";
src = fetchFromGitHub {
owner = "alpakido";
repo = "qt-oauth-lib";
rev = version;
sha256 = "sha256-MjtNAN4F9JJFxM8MYpCv8tPe26RHtbXdq+lY49p+rn4=";
};
nativeBuildInputs = [ qmake ];

View File

@ -1,18 +1,19 @@
{ lib, eggDerivation, fetchurl, chickenEggs }:
{ lib, eggDerivation, fetchFromGitHub, chickenEggs }:
# Note: This mostly reimplements the default.nix already contained in
# the tarball. Is there a nicer way than duplicating code?
let
eggDerivation rec {
name = "egg2nix-${version}";
version = "0.5";
in
eggDerivation {
src = fetchurl {
url = "https://github.com/the-kenny/egg2nix/archive/${version}.tar.gz";
sha256 = "0adal428v4i7h9lzs7sfq75q2mxhsbf1qqwzrsjv8j41paars20y";
src = fetchFromGitHub {
owner = "the-kenny";
repo = "egg2nix";
rev = version;
sha256 = "sha256-5ov2SWVyTUQ6NHnZNPRywd9e7oIxHlVWv4uWbsNaj/s=";
};
name = "egg2nix-${version}";
buildInputs = with chickenEggs; [
matchable http-client
];

View File

@ -1,14 +1,16 @@
# Temporarily avoid dependency on dotnetbuildhelpers to avoid rebuilding many times while working on it
{ lib, stdenv, fetchurl, mono, pkg-config, dotnetbuildhelpers, autoconf, automake, which }:
{ lib, stdenv, fetchFromGitHub, mono, pkg-config, dotnetbuildhelpers, autoconf, automake, which }:
stdenv.mkDerivation rec {
pname = "fsharp";
version = "4.0.1.1";
src = fetchurl {
url = "https://github.com/fsharp/fsharp/archive/${version}.tar.gz";
sha256 = "0mvmvwwpl4zq0yvgzdizww8l9azvlrc82xm32nz1fi1nw8x5qfqk";
src = fetchFromGitHub {
owner = "fsharp";
repo = "fsharp";
rev = version;
sha256 = "sha256-dgTEM2aL8lVjVMuW0+HLc+TUA39IiuBv/RfHYNURh5s=";
};
nativeBuildInputs = [ pkg-config ];

View File

@ -1,4 +1,4 @@
{ lib, stdenv, fetchurl, gmp, perl }:
{ lib, stdenv, fetchFromGitHub, gmp, perl }:
stdenv.mkDerivation rec {
pname = "mosml";
@ -8,9 +8,11 @@ stdenv.mkDerivation rec {
makeFlags = [ "PREFIX=$(out)" "CC=${stdenv.cc.targetPrefix}cc" ];
src = fetchurl {
url = "https://github.com/kfl/mosml/archive/ver-${version}.tar.gz";
sha256 = "13x7wj94p0inn84pzpj52dch5s9lznqrj287bd3nk3dqd0v3kmgy";
src = fetchFromGitHub {
owner = "kfl";
repo = "mosml";
rev = "ver-${version}";
sha256 = "sha256-GK39WvM7NNhoC5f0Wjy4/5VWT+Rbh2qo+W71hWrbPso=";
};
setSourceRoot = ''export sourceRoot="$(echo */src)"'';

View File

@ -1,16 +1,14 @@
{ lib, stdenv, fetchurl, omake, ocaml, flex, bison }:
{ lib, stdenv, fetchFromGitHub, omake, ocaml, flex, bison }:
let
version = "2.1";
in
stdenv.mkDerivation {
stdenv.mkDerivation rec {
pname = "teyjus";
inherit version;
version = "2.1";
src = fetchurl {
url = "https://github.com/teyjus/teyjus/archive/v${version}.tar.gz";
sha256 = "0393wpg8v1vvarqy2xh4fdmrwlrl6jaj960kql7cq79mb9p3m269";
src = fetchFromGitHub {
owner = "teyjus";
repo = "teyjus";
rev = "v${version}";
sha256 = "sha256-nz7jZ+GdF6mZQPzBrVD9K/RtoeuVRuhfs7vej4zDkhg=";
};
patches = [ ./fix-lex-to-flex.patch ];

View File

@ -1,12 +1,14 @@
{ stdenv, lib, fetchzip, bash, makeWrapper, coreutils, gnugrep, ncurses, doCheck ? true }:
{ stdenv, lib, fetchFromGitHub, bash, makeWrapper, coreutils, gnugrep, ncurses, doCheck ? true }:
stdenv.mkDerivation rec {
pname = "bats";
version = "1.5.0";
src = fetchzip {
url = "https://github.com/bats-core/bats-core/archive/v${version}.tar.gz";
hash = "sha256-MEkMi2w8G9FZhE3JvzzbqObcErQ9WFXy5mtKwQOoxbk=";
src = fetchFromGitHub {
owner = "bats-core";
repo = "bats-core";
rev = "v${version}";
sha256 = "sha256-MEkMi2w8G9FZhE3JvzzbqObcErQ9WFXy5mtKwQOoxbk=";
};
nativeBuildInputs = [ makeWrapper ];

View File

@ -1,4 +1,4 @@
{ lib, stdenv, fetchurl, pkg-config, doxygen, cmake, readline }:
{ lib, stdenv, fetchFromGitHub, pkg-config, doxygen, cmake, readline }:
with lib;
stdenv.mkDerivation rec {
@ -6,9 +6,11 @@ stdenv.mkDerivation rec {
pname = "lolcode";
version = "0.11.2";
src = fetchurl {
url = "https://github.com/justinmeza/lci/archive/v${version}.tar.gz";
sha256 = "1li7ikcrs7wqah7gqkirg0k61n6pm12w7pydin966x1sdn9na46b";
src = fetchFromGitHub {
owner = "justinmeza";
repo = "lci";
rev = "v${version}";
sha256 = "sha256-VMBW3/sw+1kI6iuOckSPU1TIeY6QORcSfFLFkRYw3Gs=";
};
nativeBuildInputs = [ pkg-config cmake doxygen ];

View File

@ -1,12 +1,14 @@
{ lib, stdenv, fetchurl, cmake }:
{ lib, stdenv, fetchFromGitHub, cmake }:
stdenv.mkDerivation rec {
pname = "p8-platform";
version = "2.1.0.1";
src = fetchurl {
url = "https://github.com/Pulse-Eight/platform/archive/p8-platform-${version}.tar.gz";
sha256 = "18381y54f7d18ckpzf9cfxbz1ws6imprbbm9pvhcg5c86ln8skq6";
src = fetchFromGitHub {
owner = "Pulse-Eight";
repo = "platform";
rev = "p8-platform-${version}";
sha256 = "sha256-zAI/AOLJAunv+cCQ6bOXrgkW+wl5frj3ktzx2cDeCCk=";
};
nativeBuildInputs = [ cmake ];

View File

@ -1,4 +1,4 @@
{ fetchzip, buildDunePackage, lwt, ppxlib }:
{ fetchFromGitHub, buildDunePackage, lwt, ppxlib }:
buildDunePackage {
pname = "lwt_ppx";
@ -8,16 +8,18 @@ buildDunePackage {
minimumOCamlVersion = "4.04";
src = fetchzip {
# `lwt_ppx` has a different release cycle than Lwt, but it's included in
# one of its release bundles.
# Because there could exist an Lwt release _without_ a `lwt_ppx` release,
# this `src` field doesn't inherit from the Lwt derivation.
#
# This is particularly useful for overriding Lwt without breaking `lwt_ppx`,
# as new Lwt releases may contain broken `lwt_ppx` code.
url = "https://github.com/ocsigen/lwt/archive/5.4.0.tar.gz";
sha256 = "1ay1zgadnw19r9hl2awfjr22n37l7rzxd9v73pjbahavwm2ay65d";
# `lwt_ppx` has a different release cycle than Lwt, but it's included in
# one of its release bundles.
# Because there could exist an Lwt release _without_ a `lwt_ppx` release,
# this `src` field doesn't inherit from the Lwt derivation.
#
# This is particularly useful for overriding Lwt without breaking `lwt_ppx`,
# as new Lwt releases may contain broken `lwt_ppx` code.
src = fetchFromGitHub {
owner = "ocsigen";
repo = "lwt";
rev = "5.4.0";
sha256 = "sha256-rRivROVbQbXkHWen1n8+9AwrRJaOK0Fhyilw29T7was=";
};
propagatedBuildInputs = [ lwt ppxlib ];

View File

@ -1,4 +1,4 @@
{ stdenv, lib, fetchurl, ocaml, findlib, camlp4 }:
{ stdenv, lib, fetchFromGitHub, ocaml, findlib, camlp4 }:
if !lib.versionAtLeast ocaml.version "4.00"
|| lib.versionAtLeast ocaml.version "4.03"
@ -8,9 +8,11 @@ stdenv.mkDerivation rec {
pname = "ocaml-type_conv";
version = "109.60.01";
src = fetchurl {
url = "https://github.com/janestreet/type_conv/archive/${version}.tar.gz";
sha256 = "0lpxri68glgq1z2pp02rp45cb909xywbff8d4idljrf6fzzil2zx";
src = fetchFromGitHub {
owner = "janestreet";
repo = "type_conv";
rev = version;
sha256 = "sha256-8Oz/fPL3+RghyxQp5u6seSEdf0BgfP6XNcsMYty0rNs=";
};
buildInputs = [ ocaml findlib camlp4 ];

View File

@ -1,4 +1,4 @@
{ lib, fetchurl, buildOcaml}:
{ lib, fetchFromGitHub, buildOcaml}:
buildOcaml rec {
minimumSupportedOcamlVersion = "4.02";
@ -6,9 +6,11 @@ buildOcaml rec {
pname = "type_conv";
version = "113.00.02";
src = fetchurl {
url = "https://github.com/janestreet/type_conv/archive/${version}.tar.gz";
sha256 = "1718yl2q8zandrs4xqffkfmssfld1iz62dzcqdm925735c1x01fk";
src = fetchFromGitHub {
owner = "janestreet";
repo = "type_conv";
rev = version;
sha256 = "sha256-HzH0hnceCQ2kDRATjl+tfKk3XSBDsGnPzVUGYpDQUmU=";
};
meta = {