2
0
genodepkgs/toolchain-overlay/default.nix
Emery Hemingway cede594e15 Add dhall-haskell submodule
We need the latest version of the Dhall interpreter, but that needs
a pin to Nixpkgs release-17.09. Use submodule rather than a fetchgit
because dhall-haskell requires a submodule itself, and fetgit does
not pull this in.
2019-10-05 20:41:02 +02:00

46 lines
1.1 KiB
Nix

# SPDX-FileCopyrightText: Emery Hemingway
#
# SPDX-License-Identifier: LicenseRef-Hippocratic-1.1
dhall-haskell:
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;
});
inherit (import dhall-haskell) linux-dhall;
genodeHeaders = self.callPackage ./headers { };
inherit genodelibc;
libcCross = genodelibc;
}