Skip to content

Commit

Permalink
test(grafana): Use older nixpkgs for grafana on macOS
Browse files Browse the repository at this point in the history
This speeds up build, because we no longer have to compile grafana locally and wait for eternity.

cf. NixOS/nixpkgs#273998
  • Loading branch information
srid committed Mar 7, 2024
1 parent 8eef915 commit 64b06f4
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 37 deletions.
17 changes: 17 additions & 0 deletions test/flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions test/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,23 @@
systems.url = "github:nix-systems/default";
process-compose-flake.url = "github:Platonic-Systems/process-compose-flake";
services-flake = { };

# Deal with broken packages:
# grafana is broken on aarch64-darwin: https://github.com/NixOS/nixpkgs/issues/273998
nixpkgs-grafana.url = "github:nixos/nixpkgs/b604023e0a5549b65da3040a07d2beb29ac9fc63";
};
outputs = inputs:
inputs.flake-parts.lib.mkFlake { inherit inputs; } {
systems = import inputs.systems;
imports = [
inputs.process-compose-flake.flakeModule
];
perSystem = { self', pkgs, system, lib, ... }: {
perSystem = { self', inputs', pkgs, system, lib, ... }: {
_module.args.pkgs = import inputs.nixpkgs {
inherit system;
# Required for elastic search
config.allowUnfree = true;
overlays = import ./overlays { inherit system lib; };
overlays = import ./overlays { inherit system inputs' lib; };
};
process-compose =
let
Expand Down
6 changes: 4 additions & 2 deletions test/overlays/default.nix
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
{ lib, system, ... }:
{ inputs', lib, system, ... }:

let
isDarwin = system == "x86_64-darwin" || system == "aarch64-darwin";
in
lib.optionals isDarwin [
(import ./pgadmin.nix)
(import ./grafana.nix)
(self: super: {
grafana = inputs'.nixpkgs-grafana.legacyPackages.grafana;
})
]
++
[
Expand Down
33 changes: 0 additions & 33 deletions test/overlays/grafana.nix

This file was deleted.

0 comments on commit 64b06f4

Please sign in to comment.