diff options
author | John D. Boy <2187261+jboynyc@users.noreply.github.com> | 2023-01-20 22:14:05 +0100 |
---|---|---|
committer | John D. Boy <2187261+jboynyc@users.noreply.github.com> | 2023-01-26 17:20:02 +0100 |
commit | 22c85eab53fa8f7fbb04a7ef29702f7108894aad (patch) | |
tree | a10c03fa91a35a441080f3f934676f5142954429 /pkgs/development/compilers | |
parent | e7ad4296d6e7d7de68dd5689cdd8b2d4b6801b44 (diff) | |
download | nixlib-22c85eab53fa8f7fbb04a7ef29702f7108894aad.tar nixlib-22c85eab53fa8f7fbb04a7ef29702f7108894aad.tar.gz nixlib-22c85eab53fa8f7fbb04a7ef29702f7108894aad.tar.bz2 nixlib-22c85eab53fa8f7fbb04a7ef29702f7108894aad.tar.lz nixlib-22c85eab53fa8f7fbb04a7ef29702f7108894aad.tar.xz nixlib-22c85eab53fa8f7fbb04a7ef29702f7108894aad.tar.zst nixlib-22c85eab53fa8f7fbb04a7ef29702f7108894aad.zip |
minimacy: init at 0.6.2
Diffstat (limited to 'pkgs/development/compilers')
-rw-r--r-- | pkgs/development/compilers/minimacy/default.nix | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/pkgs/development/compilers/minimacy/default.nix b/pkgs/development/compilers/minimacy/default.nix new file mode 100644 index 000000000000..0ad4fa0db83e --- /dev/null +++ b/pkgs/development/compilers/minimacy/default.nix @@ -0,0 +1,73 @@ +{ lib, stdenv, fetchFromGitHub, makeBinaryWrapper +, alsaLib, libX11, libXext, libGL, libGLU +}: + +stdenv.mkDerivation rec { + pname = "minimacy"; + version = "0.6.2"; + + src = fetchFromGitHub { + owner = "ambermind"; + repo = pname; + rev = version; + sha256 = "i0Z1UKApX+elHmFgujwjiF7k6OmtFF37HJim464OMfU="; + }; + + nativeBuildInputs = [ makeBinaryWrapper ]; + + buildInputs = [ libGL libGLU ] ++ lib.optionals stdenv.isLinux [ alsaLib libX11 libXext ]; + + enableParallelBuilding = true; + + NIX_CFLAGS_COMPILE = "-Wno-unused-result"; + + preBuild = '' + pushd ${if stdenv.isDarwin then "macos/cmdline" else "unix"} + ''; + + # TODO: build graphic version for darwin + buildFlags = (if stdenv.isDarwin then [ "nox" ] else [ "all" ]) ++ [ "CC=${stdenv.cc.targetPrefix}cc" ]; + + postBuild = '' + popd + ''; + + doCheck = true; + + checkPhase = '' + runHook preCheck + + bin/${if stdenv.isDarwin then "minimacyMac" else "minimacy"} system/demo/demo.fun.mandelbrot.mcy + + runHook postCheck + ''; + + installPhase = '' + runHook preInstall + + mkdir -p $out/lib/minimacy + cp -r {README.md,LICENSE,system,rom,topLevel.mcy} $out/lib/minimacy + install bin/minimacy* -Dt $out/bin + + runHook postInstall + ''; + + postFixup = '' + for prog in $out/bin/minimacy*; + do wrapProgram $prog \ + --set MINIMACY $out/lib/minimacy + done + ''; + + meta = { + description = "An open-source minimalist computing technology"; + longDescription = '' + Minimacy is an open-source minimalist computation system based on the principle "Less is more". + It is designed and programmed by Sylvain Huet. + ''; + maintainers = with lib.maintainers; [ jboy ]; + homepage = "https://minimacy.net"; + license = lib.licenses.gpl2; + platforms = lib.platforms.linux ++ lib.platforms.darwin; + }; +} |