[One (M8) Android Development] fizbanrapper:
I sent a brief PM to one of the devs earlier, but I figured it's best if I just post the detail here, so that other people can see it too... and benefit from it (hopefully). This applies to all slim-based (and many aosp-based) roms. With luck, slim will merge in the commits and none of this will be necessary soon.

Here's what I got. This is all I needed to build slim.

roomservice.xml

<?xml version="1.0" encoding="UTF-8"?>

<manifest>

<project name="fizbanrapper/android_device_htc_m8" path="device/htc/m8" remote="github" revision="cm-12.1" />

<project name="Split-Screen/android_kernel_htc_msm8974" path="kernel/htc/msm8974" remote="github" revision="pac-5.1" />

<project name="TheMuppets/proprietary_vendor_htc" path="vendor/htc" remote="github" revision="cm-12.1" />

</manifest>

qcom_swap.xml

<?xml version="1.0" encoding="UTF-8"?>

<manifest>

<!-- This garbage is just useless -->

<remove-project path="hardware/qcom/msm8960" name="platform/hardware/qcom/msm8960" groups="qcom_msm8960" remote="aosp" />

<remove-project path="hardware/qcom/msm8x26" name="platform/hardware/qcom/msm8x26" groups="qcom_msm8x26" remote="aosp" />

<remove-project path="hardware/qcom/msm8x27" name="platform/hardware/qcom/msm8x27" groups="qcom_msm8x27" remote="aosp" />

<remove-project path="hardware/qcom/msm8x84" name="platform/hardware/qcom/msm8x84" groups="qcom_msm8x84" remote="aosp" />

<!-- Swap audio hal -->

<remove-project path="hardware/qcom/audio/default" name="SlimRoms/hardware_qcom_audio" remote="github" revision="lp5.1" />

<project path="hardware/qcom/audio-caf/msm8974" name="CyanogenMod/android_hardware_qcom_audio" groups="qcom,qcom_audio" revision="cm-12.1-caf-8974" remote="github" />

<project path="hardware/qcom/audio/default" name="CyanogenMod/android_hardware_qcom_audio" groups="qcom,qcom_audio" remote="github" revision="cm-12.1" />

<!-- Swap display hal -->

<remove-project path="hardware/qcom/display-caf/apq8084" name="SlimRoms/hardware_qcom_display" groups="qcom,qcom_display" revision="cm-12.1-caf-8084" remote="github" />

<project path="hardware/qcom/display" name="CyanogenMod/android_hardware_qcom_display" groups="qcom,qcom_display" remote="github" revision="cm-12.1" />

<project path="hardware/qcom/display-caf/msm8974" name="CyanogenMod/android_hardware_qcom_display" groups="qcom,qcom_display" revision="cm-12.1-caf-8974" remote="github" />

<!-- Swap media hal -->

<remove-project path="hardware/qcom/media-caf/apq8084" name="SlimRoms/hardware_qcom_media" groups="qcom" revision="cm-12.1-caf-8084" remote="github" />

<project path="hardware/qcom/media-caf/msm8974" name="CyanogenMod/android_hardware_qcom_media" groups="qcom" revision="cm-12.1-caf-8974" remote="github" />

</manifest>

then you'll probably have to...

cd hardware/qcom/audio-caf/msm8974 && git revert f7bddecdcbc65109dfcb152656eac7858bef2abc

before you...

env,lunch & make

You can tweak some of the stuff in the qcom_swap. You probably don't want to delete as much as I did, not sure. It probably isn't even necessary to swap out the media & display caf, but since I started with what's basically a CM tree, I figured I might as well.

After reverting that audio hal commit, Slim compiles fine for me using CM caf sources.