mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-23 12:34:15 +00:00
llvmPackages_15.llvm: add in a missing check dep
This commit is contained in:
parent
2a58596dd2
commit
6d0c87602f
@ -17,6 +17,7 @@
|
|||||||
, which
|
, which
|
||||||
, buildLlvmTools
|
, buildLlvmTools
|
||||||
, debugVersion ? false
|
, debugVersion ? false
|
||||||
|
, doCheck ? true
|
||||||
, enableManpages ? false
|
, enableManpages ? false
|
||||||
, enableSharedLibraries ? !stdenv.hostPlatform.isStatic
|
, enableSharedLibraries ? !stdenv.hostPlatform.isStatic
|
||||||
, enablePFM ? stdenv.isLinux /* PFM only supports Linux */
|
, enablePFM ? stdenv.isLinux /* PFM only supports Linux */
|
||||||
@ -33,6 +34,29 @@ let
|
|||||||
shortVersion = with lib;
|
shortVersion = with lib;
|
||||||
concatStringsSep "." (take 1 (splitString "." release_version));
|
concatStringsSep "." (take 1 (splitString "." release_version));
|
||||||
|
|
||||||
|
# Ordinarily we would just the `doCheck` and `checkDeps` functionality
|
||||||
|
# `mkDerivation` gives us to manage our test dependencies (instead of breaking
|
||||||
|
# out `doCheck` as a package level attribute).
|
||||||
|
#
|
||||||
|
# Unfortunately `lit` does not forward `$PYTHONPATH` to children processes, in
|
||||||
|
# particular the children it uses to do feature detection.
|
||||||
|
#
|
||||||
|
# This means that python deps we add to `checkDeps` (which the python
|
||||||
|
# interpreter is made aware of via `$PYTHONPATH` – populated by the python
|
||||||
|
# setup hook) are not picked up by `lit` which causes it to skip tests.
|
||||||
|
#
|
||||||
|
# Adding `python3.withPackages (ps: [ ... ])` to `checkDeps` also doesn't work
|
||||||
|
# because this package is shadowed in `$PATH` by the regular `python3`
|
||||||
|
# package.
|
||||||
|
#
|
||||||
|
# So, we "manually" assemble one python derivation for the package to depend
|
||||||
|
# on, taking into account whether checks are enabled or not:
|
||||||
|
python = if doCheck then
|
||||||
|
let
|
||||||
|
checkDeps = ps: with ps; [ psutil ];
|
||||||
|
in python3.withPackages checkDeps
|
||||||
|
else python3;
|
||||||
|
|
||||||
in stdenv.mkDerivation (rec {
|
in stdenv.mkDerivation (rec {
|
||||||
pname = "llvm";
|
pname = "llvm";
|
||||||
inherit version;
|
inherit version;
|
||||||
@ -51,7 +75,7 @@ in stdenv.mkDerivation (rec {
|
|||||||
|
|
||||||
outputs = [ "out" "lib" "dev" "python" ];
|
outputs = [ "out" "lib" "dev" "python" ];
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake ninja python3 ]
|
nativeBuildInputs = [ cmake ninja python ]
|
||||||
++ optionals enableManpages [ python3.pkgs.sphinx python3.pkgs.recommonmark ];
|
++ optionals enableManpages [ python3.pkgs.sphinx python3.pkgs.recommonmark ];
|
||||||
|
|
||||||
buildInputs = [ libxml2 libffi ]
|
buildInputs = [ libxml2 libffi ]
|
||||||
@ -59,7 +83,9 @@ in stdenv.mkDerivation (rec {
|
|||||||
|
|
||||||
propagatedBuildInputs = [ ncurses zlib ];
|
propagatedBuildInputs = [ ncurses zlib ];
|
||||||
|
|
||||||
nativeCheckInputs = [ which ];
|
nativeCheckInputs = [
|
||||||
|
which
|
||||||
|
] ++ lib.optional stdenv.isDarwin sysctl;
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
./gnu-install-dirs.patch
|
./gnu-install-dirs.patch
|
||||||
|
Loading…
Reference in New Issue
Block a user