Skip to content

Commit

Permalink
replace nix-eval-jobs input with override
Browse files Browse the repository at this point in the history
  • Loading branch information
Mic92 committed Sep 12, 2024
1 parent 057237d commit 5ab8704
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 60 deletions.
50 changes: 0 additions & 50 deletions flake.lock

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

8 changes: 0 additions & 8 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@
flake-parts.url = "github:hercules-ci/flake-parts";
flake-parts.inputs.nixpkgs-lib.follows = "nixpkgs";

nix-eval-jobs.url = "github:nix-community/nix-eval-jobs?ref=expose-more-build-status";
nix-eval-jobs.inputs.nixpkgs.follows = "nixpkgs";
nix-eval-jobs.inputs.flake-parts.follows = "flake-parts";
nix-eval-jobs.inputs.treefmt-nix.follows = "treefmt-nix";

# used for development
treefmt-nix.url = "github:numtide/treefmt-nix";
treefmt-nix.inputs.nixpkgs.follows = "nixpkgs";
Expand Down Expand Up @@ -43,9 +38,6 @@
(
{ pkgs, ... }:
{
services.buildbot-nix.worker.nixEvalJobsPackage =
lib.mkDefault
inputs.nix-eval-jobs.packages.${pkgs.hostPlatform.system}.default;
services.buildbot-nix.worker.buildbotNixpkgs =
lib.mkDefault
inputs.nixpkgs.legacyPackages.${pkgs.hostPlatform.system};
Expand Down
24 changes: 24 additions & 0 deletions nix/nix-eval-jobs.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
fetchFromGitHub,
nix-eval-jobs,
nixVersions,
boost,
curl,
nlohmann_json,
}:
nix-eval-jobs.overrideAttrs (oldAttrs: {
src = fetchFromGitHub {
owner = "nix-community";
repo = "nix-eval-jobs";
# https://github.com/nix-community/nix-eval-jobs/pull/325
rev = "91ca6cffaecbe5d0df79d2d97d4b286252c17aef";
sha256 = "sha256-uTroApEsrSVxGtKcnrOBSEGImS3UolxMmy/9z97FpWE=";
};

buildInputs = [
boost
nixVersions.nix_2_24
curl
nlohmann_json
];
})
5 changes: 3 additions & 2 deletions nix/worker.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ in
default = config.networking.hostName;
description = "The buildbot worker name.";
};
nixEvalJobsPackage = lib.mkOption {
nixEvalJobs.package = lib.mkOption {
type = lib.types.package;
default = pkgs.callPackage ./nix-eval-jobs.nix { };
description = "nix-eval-jobs to use for evaluation";
};
buildbotNixpkgs = lib.mkOption {
Expand Down Expand Up @@ -76,7 +77,7 @@ in
pkgs.git
pkgs.openssh
pkgs.nix
cfg.nixEvalJobsPackage
cfg.nixEvalJobs.package
];
environment.PYTHONPATH = "${python.withPackages (_: [ cfg.package ])}/${python.sitePackages}";
environment.MASTER_URL = cfg.masterUrl;
Expand Down

0 comments on commit 5ab8704

Please sign in to comment.