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

View file

@ -31,6 +31,7 @@
in in
{ {
packages.nix-eval-jobs = pkgs.callPackage ./default.nix drvArgs; 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 { checks.treefmt = pkgs.stdenv.mkDerivation {
name = "treefmt-check"; name = "treefmt-check";