2021-04-08 05:46:06 +02:00
|
|
|
{ pkgs, config, lib, ... }:
|
2021-09-11 20:05:27 +02:00
|
|
|
with pkgs.lib; {
|
2021-11-01 09:20:42 +01:00
|
|
|
environment.systemPackages =
|
|
|
|
let
|
|
|
|
llvm = pkgs.llvm;
|
|
|
|
llvm-config = pkgs.writers.writeBashBin "llvm-config" ''
|
|
|
|
while [[ $# -gt 0 ]]; do
|
|
|
|
arg="$1"
|
|
|
|
case $arg in
|
|
|
|
--assertion-mode)
|
|
|
|
echo "OFF"
|
|
|
|
;;
|
|
|
|
--bindir)
|
|
|
|
echo "${getBin llvm}/bin"
|
|
|
|
;;
|
|
|
|
--libdir)
|
|
|
|
echo "${getLib llvm}/lib"
|
|
|
|
;;
|
|
|
|
--includedir)
|
|
|
|
echo "${getDev llvm}/include"
|
|
|
|
;;
|
|
|
|
--prefix)
|
|
|
|
echo "${llvm.out}"
|
|
|
|
;;
|
|
|
|
--src-root)
|
|
|
|
echo "/build/llvm";
|
|
|
|
;;
|
|
|
|
--obj-root)
|
|
|
|
echo "/build/llvm/build";
|
|
|
|
;;
|
|
|
|
--cmakedir)
|
|
|
|
echo "${getDev llvm}/lib/cmake/llvm"
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
echo "Unhandled argument '$arg' passed to dummy llvm-config!"
|
|
|
|
exit 1
|
|
|
|
esac
|
|
|
|
shift
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
in
|
|
|
|
[ llvm-config ];
|
2021-04-08 05:46:06 +02:00
|
|
|
}
|