mirror of
https://gerrit.hackerspace.pl/hscloud
synced 2024-10-18 12:27:46 +00:00
Patryk Jakuszew
28742b8106
This commit aims to increase the speed of hscloud rebuild process by optimizing the behavior of Go dependency fetching routines. Gazelle v0.25.0 introduced a new dependency resolution mode where it does not reach out for external dependencies; instead, it operates solely on what is contained inside the workspace. Because static dependency resolution mode is now the default behavior in go_repository() rules, we are also updating the contents of //third_party/go/repositories.bzl. Also, I changed some of the bigger Go dependencies to be downloaded by a tarball fetch in order to speed up the rebuild process. Other changes: * Bump nixpkgs to a fresh snapshot * Upgrade to Bazel v5 Change-Id: Icfe752411b3128bcd5b25fa28bb76bec45ae2f71 Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1441 Reviewed-by: q3k <q3k@hackerspace.pl>
38 lines
922 B
Nix
38 lines
922 B
Nix
{ ... }@args:
|
|
|
|
with builtins;
|
|
|
|
let
|
|
fix = f: let x = f x; in x;
|
|
|
|
readTree = import ./nix/readtree {};
|
|
|
|
# Tracking nixos-unstable as of 2021-08-11.
|
|
nixpkgsCommit = "42aae6fa748a41ced37373fc6d914de512658178";
|
|
nixpkgsSrc = fetchTarball {
|
|
url = "https://github.com/NixOS/nixpkgs/archive/${nixpkgsCommit}.tar.gz";
|
|
sha256 = "I7oAGC1Ldm5kcryUQxLubMmMCj5o0n+JSLVGRCL0wm8=";
|
|
};
|
|
nixpkgs = import nixpkgsSrc {
|
|
config.allowUnfree = true;
|
|
config.allowBroken = true;
|
|
|
|
# Nixpkgs marked this package as insecure.
|
|
# We need it for HTML-to-PDF conversion.
|
|
config.permittedInsecurePackages = [
|
|
"qtwebkit-5.212.0-alpha4"
|
|
];
|
|
};
|
|
|
|
resForPkgs = pkgs: fix (self: (readTree rec {
|
|
hscloud = self;
|
|
inherit pkgs;
|
|
pkgsSrc = pkgs.path;
|
|
inherit (pkgs) lib stdenv;
|
|
hscloudForPkgs = pkgs: resForPkgs pkgs;
|
|
} ./.));
|
|
|
|
in (resForPkgs nixpkgs) // {
|
|
root = ./.;
|
|
pkgs = nixpkgs;
|
|
}
|