# SPDX-FileCopyrightText: Emery Hemingway # # SPDX-License-Identifier: LicenseRef-Hippocratic-1.1 self: super: let inherit (super) lib; hasGenode = with super.stdenv; (if hostPlatform ? isGenode then hostPlatform.isGenode else false) || (if targetPlatform ? isGenode then targetPlatform.isGenode else false); genodelibc = self.callPackage ./libc { stdenv = self.crossLibcStdenv; }; in { binutils-unwrapped = super.binutils-unwrapped.overrideAttrs (attrs: { patches = attrs.patches ++ (lib.optional hasGenode ./binutils.patch); }); cmake = super.cmake.overrideAttrs (attrs: { postInstall = if hasGenode then '' local MODULE="$out/share/cmake-${ lib.versions.majorMinor attrs.version }/Modules/Platform/Genode.cmake" if [ -e "$MODULE" ]; then echo "Upstream provides $MODULE!" exit 1 fi cp ${./Genode.cmake} $MODULE '' else null; }); genodeHeaders = self.callPackage ./headers { }; inherit genodelibc; libcCross = genodelibc; }