ghc-standalone-archive
pkgs.ghc-standalone-archive
Docs pulled from | This Revision | about 1 hour ago
Contribute
Enhance the ecosystem with your expertise! Contribute to fill the gaps in documentation. Your input can make a difference.
Noogle detected
Implementation
The following is the current implementation of this function.
{
haskellPackages,
src,
deps ? p: [ ],
name,
}:
let
inherit (haskellPackages) ghc ghcWithPackages;
with-env = ghcWithPackages deps;
ghcName = "${ghc.targetPrefix}ghc";
in
runCommand name
{
buildInputs = [
with-env
cctools
];
}
''
mkdir -p $out/lib
mkdir -p $out/include
${ghcName} ${src} -staticlib -outputdir . -o $out/lib/${name}.a -stubdir $out/include
for file in ${ghc}/lib/${ghcName}-${ghc.version}/include/*; do
ln -sv $file $out/include
done
''