makeDarwinBundle
pkgs.makeDarwinBundle
Functor
Docs pulled from | This Revision | 9 days ago
Contribute
Enhance the ecosystem with your expertise! Contribute to fill the gaps in documentation. Your input can make a difference.
Noogle detected
This is a Functor
Learn about functors
Implementation
The following is the current implementation of this function.
{
name, # The name of the Application file.
exec, # Executable file.
icon ? "", # Optional icon file.
}:
writeShellScript "make-darwin-bundle-${name}" ''
function makeDarwinBundlePhase() {
mkdir -p "''${!outputBin}/Applications/${name}.app/Contents/MacOS"
mkdir -p "''${!outputBin}/Applications/${name}.app/Contents/Resources"
if [ -n "${icon}" ]; then
ln -s "${icon}" "''${!outputBin}/Applications/${name}.app/Contents/Resources"
fi
${writeDarwinBundle}/bin/write-darwin-bundle "''${!outputBin}" "${name}" "${exec}"
}
appendToVar preDistPhases makeDarwinBundlePhase
''