Files
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

50 lines
1.1 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
m2libc,
mescc-tools,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "m2-mesoplanet";
version = "1.11.0";
src = fetchFromGitHub {
owner = "oriansj";
repo = "M2-Mesoplanet";
rev = "Release_${finalAttrs.version}";
hash = "sha256-hE7xvX84q3tk0XakveYDJhrhfBnpoItQs456NCzFfws=";
};
# Don't use vendored M2libc
postPatch = ''
rmdir M2libc
ln -s ${m2libc}/include/M2libc M2libc
'';
# Upstream overrides the optimisation to be -O0, which is incompatible with fortify. Let's disable it.
hardeningDisable = [ "fortify" ];
doCheck = true;
checkTarget = "test";
nativeCheckInputs = [ mescc-tools ];
installPhase = ''
runHook preInstall
install -D bin/M2-Mesoplanet $out/bin/M2-Mesoplanet
runHook postInstall
'';
meta = with lib; {
description = "Macro Expander Saving Our m2-PLANET";
homepage = "https://github.com/oriansj/M2-Mesoplanet";
license = licenses.gpl3Only;
teams = [ teams.minimal-bootstrap ];
inherit (m2libc.meta) platforms;
mainProgram = "M2-Mesoplanet";
};
})