diff options
author | Alyssa Ross <hi@alyssa.is> | 2023-11-05 16:15:01 +0100 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2023-11-05 16:15:01 +0100 |
commit | a2c1eff83c3118a9aee8076c7f84f58137416b6e (patch) | |
tree | 4668c9ad2bba229a0eb3ccc8adbe78402e04ab07 /nixpkgs/pkgs/by-name/m2/m2-mesoplanet/package.nix | |
parent | fa7e5142244bb8fd1c51b66df6e623a7f41cc0d3 (diff) | |
parent | 85f1ba3e51676fa8cc604a3d863d729026a6b8eb (diff) | |
download | nixlib-a2c1eff83c3118a9aee8076c7f84f58137416b6e.tar nixlib-a2c1eff83c3118a9aee8076c7f84f58137416b6e.tar.gz nixlib-a2c1eff83c3118a9aee8076c7f84f58137416b6e.tar.bz2 nixlib-a2c1eff83c3118a9aee8076c7f84f58137416b6e.tar.lz nixlib-a2c1eff83c3118a9aee8076c7f84f58137416b6e.tar.xz nixlib-a2c1eff83c3118a9aee8076c7f84f58137416b6e.tar.zst nixlib-a2c1eff83c3118a9aee8076c7f84f58137416b6e.zip |
Merge branch 'nixos-unstable' of https://github.com/NixOS/nixpkgs into HEAD
Diffstat (limited to 'nixpkgs/pkgs/by-name/m2/m2-mesoplanet/package.nix')
-rw-r--r-- | nixpkgs/pkgs/by-name/m2/m2-mesoplanet/package.nix | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/by-name/m2/m2-mesoplanet/package.nix b/nixpkgs/pkgs/by-name/m2/m2-mesoplanet/package.nix new file mode 100644 index 000000000000..d4f7419f91f4 --- /dev/null +++ b/nixpkgs/pkgs/by-name/m2/m2-mesoplanet/package.nix @@ -0,0 +1,48 @@ +{ 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; + maintainers = teams.minimal-bootstrap.members; + inherit (m2libc.meta) platforms; + mainProgram = "M2-Mesoplanet"; + }; +}) |