From bd8ebcbb013d01ddb0c686b93d6c29cb54238828 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Thu, 29 Aug 2024 17:13:47 +0200 Subject: [PATCH] dev: Add hercules-ci-effects dev input (cherry picked from commit 85f10d0410a061f151722042924afc8523869aa7) --- dev/flake-module.nix | 13 ++++++---- dev/flake.lock | 56 ++++++++++++++++++++++++++++++++++++++++++++ dev/flake.nix | 1 + 3 files changed, 66 insertions(+), 4 deletions(-) diff --git a/dev/flake-module.nix b/dev/flake-module.nix index 8869c87..1f07ecb 100644 --- a/dev/flake-module.nix +++ b/dev/flake-module.nix @@ -1,5 +1,8 @@ -{ inputs, ... }: { - imports = [ inputs.pre-commit-hooks-nix.flakeModule ]; +{ lib, inputs, withSystem, ... }: { + imports = [ + inputs.pre-commit-hooks-nix.flakeModule + inputs.hercules-ci-effects.flakeModule + ]; perSystem = { config, pkgs, ... }: { pre-commit.settings.hooks.nixpkgs-fmt.enable = true; @@ -55,6 +58,7 @@ pkgs.clang-tools # clangd pkgs.valgrind pkgs.gdb + pkgs.hci # TODO: set up cargo-valgrind in shell and build # currently both this and `cargo install cargo-valgrind` # produce a binary that says ENOENT. @@ -68,7 +72,8 @@ NIX_PATH = "nixpkgs=${inputs.nixpkgs}"; }; }; - flake = { - herculesCI.ciSystems = [ "x86_64-linux" ]; + herculesCI = hci@{ config, ... }: { + ciSystems = [ "x86_64-linux" ]; }; + flake = { }; } diff --git a/dev/flake.lock b/dev/flake.lock index 3647d2e..f8b1bc3 100644 --- a/dev/flake.lock +++ b/dev/flake.lock @@ -16,6 +16,26 @@ "type": "github" } }, + "flake-parts": { + "inputs": { + "nixpkgs-lib": [ + "hercules-ci-effects", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1712014858, + "narHash": "sha256-sB4SWl2lX95bExY2gMFG5HIzvva5AVMJd4Igm+GpZNw=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "9126214d0a59633752a136528f5f3b9aa8565b7d", + "type": "github" + }, + "original": { + "id": "flake-parts", + "type": "indirect" + } + }, "gitignore": { "inputs": { "nixpkgs": [ @@ -37,6 +57,41 @@ "type": "github" } }, + "hercules-ci-effects": { + "inputs": { + "flake-parts": "flake-parts", + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1719226092, + "narHash": "sha256-YNkUMcCUCpnULp40g+svYsaH1RbSEj6s4WdZY/SHe38=", + "owner": "hercules-ci", + "repo": "hercules-ci-effects", + "rev": "11e4b8dc112e2f485d7c97e1cee77f9958f498f5", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "hercules-ci-effects", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1713714899, + "narHash": "sha256-+z/XjO3QJs5rLE5UOf015gdVauVRQd2vZtsFkaXBq2Y=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "6143fc5eeb9c4f00163267708e26191d1e918932", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgs-stable": { "locked": { "lastModified": 1720386169, @@ -76,6 +131,7 @@ }, "root": { "inputs": { + "hercules-ci-effects": "hercules-ci-effects", "pre-commit-hooks-nix": "pre-commit-hooks-nix" } } diff --git a/dev/flake.nix b/dev/flake.nix index ff27954..062e27a 100644 --- a/dev/flake.nix +++ b/dev/flake.nix @@ -3,6 +3,7 @@ inputs = { pre-commit-hooks-nix.url = "github:cachix/pre-commit-hooks.nix"; pre-commit-hooks-nix.inputs.nixpkgs.follows = ""; + hercules-ci-effects.url = "github:hercules-ci/hercules-ci-effects"; }; outputs = { ... }: { }; }