Add clangStdenv

This commit is contained in:
Andrea Bedini 2023-07-13 17:45:06 +08:00 committed by mergify[bot]
parent 4006da54d5
commit cc9fa47406
2 changed files with 9 additions and 13 deletions

View file

@ -1,36 +1,31 @@
{ stdenv
, lib
, nix
, meson
, cmake
, ninja
, pkg-config
, boost
, nlohmann_json
, pkgs
, srcDir ? null
}:
let
filterMesonBuild = dir: builtins.filterSource
(path: type: type != "directory" || baseNameOf path != "build")
dir;
filterMesonBuild = builtins.filterSource
(path: type: type != "directory" || baseNameOf path != "build");
in
stdenv.mkDerivation rec {
stdenv.mkDerivation {
pname = "nix-eval-jobs";
version = "2.16.0";
src = if srcDir == null then filterMesonBuild ./. else srcDir;
buildInputs = [
buildInputs = with pkgs; [
nlohmann_json
nix
boost
];
nativeBuildInputs = [
nativeBuildInputs = with pkgs; [
bear
meson
pkg-config
ninja
# nlohmann_json can be only discovered via cmake files
cmake
];
] ++ (lib.optional stdenv.cc.isClang [ pkgs.bear pkgs.clang-tools ]);
meta = {
description = "Hydra's builtin hydra-eval-jobs as a standalone";

View file

@ -31,6 +31,7 @@
in
{
packages.nix-eval-jobs = pkgs.callPackage ./default.nix drvArgs;
packages.clangStdenv-nix-eval-jobs = pkgs.callPackage ./default.nix (drvArgs // { stdenv = pkgs.clangStdenv; });
checks.treefmt = pkgs.stdenv.mkDerivation {
name = "treefmt-check";