Genode Packages collection https://git.sr.ht/~ehmry/genodepkgs/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

default.nix 1.0KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. # SPDX-FileCopyrightText: Emery Hemingway
  2. #
  3. # SPDX-License-Identifier: LicenseRef-Hippocratic-1.1
  4. self: super:
  5. let
  6. inherit (super) lib;
  7. hasGenode = with super.stdenv;
  8. (if hostPlatform ? isGenode then hostPlatform.isGenode else false)
  9. || (if targetPlatform ? isGenode then targetPlatform.isGenode else false);
  10. genodelibc = self.callPackage ./libc { stdenv = self.crossLibcStdenv; };
  11. in {
  12. binutils-unwrapped = super.binutils-unwrapped.overrideAttrs (attrs: {
  13. patches = attrs.patches ++ (lib.optional hasGenode ./binutils.patch);
  14. });
  15. cmake = super.cmake.overrideAttrs (attrs: {
  16. postInstall = if hasGenode then ''
  17. local MODULE="$out/share/cmake-${
  18. lib.versions.majorMinor attrs.version
  19. }/Modules/Platform/Genode.cmake"
  20. if [ -e "$MODULE" ]; then
  21. echo "Upstream provides $MODULE!"
  22. exit 1
  23. fi
  24. cp ${./Genode.cmake} $MODULE
  25. '' else
  26. null;
  27. });
  28. genodeHeaders = self.callPackage ./headers { };
  29. inherit genodelibc;
  30. libcCross = genodelibc;
  31. }