push sheeet
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

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,89 @@
{
lib,
stdenv,
fetchurl,
makeWrapper,
boost,
gmp,
tcl-8_5,
tk-8_5,
emacs,
}:
let
version = "2.0.0";
binaries = {
x86_64-linux = fetchurl {
url = "mirror://sourceforge/project/mozart-oz/v${version}-alpha.0/mozart2-${version}-alpha.0+build.4105.5c06ced-x86_64-linux.tar.gz";
sha256 = "0rsfrjimjxqbwprpzzlmydl3z3aiwg5qkb052jixdxjyad7gyh5z";
};
};
in
stdenv.mkDerivation {
pname = "mozart-binary";
inherit version;
preferLocalBuild = true;
src =
binaries.${stdenv.hostPlatform.system}
or (throw "unsupported system: ${stdenv.hostPlatform.system}");
libPath = lib.makeLibraryPath [
stdenv.cc.cc
boost
gmp
tcl-8_5
tk-8_5
];
TK_LIBRARY = "${tk-8_5}/lib/tk8.5";
nativeBuildInputs = [ makeWrapper ];
buildCommand = ''
mkdir $out
tar xvf $src -C $out --strip-components=1
for exe in $out/bin/{ozemulator,ozwish} ; do
patchelf --set-interpreter $(< $NIX_CC/nix-support/dynamic-linker) \
--set-rpath $libPath \
$exe
done
wrapProgram $out/bin/ozwish \
--set OZHOME $out \
--set TK_LIBRARY $TK_LIBRARY
wrapProgram $out/bin/ozemulator --set OZHOME $out
${lib.optionalString (emacs != null) ''
wrapProgram $out/bin/oz --suffix PATH ":" ${lib.makeBinPath [ emacs ]}
''}
sed -i $out/share/applications/oz.desktop \
-e "s,Exec=oz %u,Exec=$out/bin/oz %u,"
gzip -9n $out/share/mozart/elisp"/"*.elc
patchShebangs $out
'';
meta = with lib; {
homepage = "https://www.mozart-oz.org/";
description = "Multiplatform implementation of the Oz programming language";
longDescription = ''
The Mozart Programming System combines ongoing research in
programming language design and implementation, constraint logic
programming, distributed computing, and human-computer
interfaces. Mozart implements the Oz language and provides both
expressive power and advanced functionality.
'';
sourceProvenance = with sourceTypes; [ binaryBytecode ];
license = licenses.mit;
platforms = attrNames binaries;
hydraPlatforms = [ ];
};
}

View File

@@ -0,0 +1,92 @@
{
lib,
fetchurl,
fetchpatch,
cmake,
unzip,
makeWrapper,
boost183,
llvmPackages,
gmp,
emacs,
jre_headless,
tcl,
tk,
}:
let
stdenv = llvmPackages.stdenv;
in
stdenv.mkDerivation rec {
pname = "mozart2";
version = "2.0.1";
name = "${pname}-${version}";
src = fetchurl {
url = "https://github.com/mozart/mozart2/releases/download/v${version}/${name}-Source.zip";
sha256 = "1mad9z5yzzix87cdb05lmif3960vngh180s2mb66cj5gwh5h9dll";
};
# This is a workaround to avoid using sbt.
# I guess it is acceptable to fetch the bootstrapping compiler in binary form.
bootcompiler = fetchurl {
url = "https://github.com/layus/mozart2/releases/download/v2.0.0-beta.1/bootcompiler.jar";
sha256 = "1hgh1a8hgzgr6781as4c4rc52m2wbazdlw3646s57c719g5xphjz";
};
patches = [
./patch-limits.diff
(fetchpatch {
name = "remove-uses-of-deprecated-boost-apis.patch";
url = "https://github.com/mozart/mozart2/commit/4256d3a9122e1cbb01400a1807bdee66088ff274.patch";
hash = "sha256-AnOrBnxoCxqis+RdCsq8EKBg//jcNHSOFYUvf7vh+Hc=";
})
];
postConfigure = ''
cp ${bootcompiler} bootcompiler/bootcompiler.jar
'';
nativeBuildInputs = [
cmake
makeWrapper
unzip
];
cmakeFlags = [
"-DBoost_USE_STATIC_LIBS=OFF"
"-DMOZART_BOOST_USE_STATIC_LIBS=OFF"
# We are building with clang, as nix does not support having clang and
# gcc together as compilers and we need clang for the sources generation.
# However, clang emits tons of warnings about gcc's atomic-base library.
"-DCMAKE_CXX_FLAGS=-Wno-braced-scalar-init"
];
fixupPhase = ''
wrapProgram $out/bin/oz --set OZEMACS ${emacs}/bin/emacs
'';
buildInputs = [
boost183
gmp
emacs
jre_headless
tcl
tk
];
meta = with lib; {
description = "Open source implementation of Oz 3";
maintainers = with maintainers; [
layus
h7x4
];
license = licenses.bsd2;
homepage = "https://mozart.github.io";
platforms = platforms.all;
# Trace/BPT trap: 5
broken = stdenv.hostPlatform.isDarwin;
};
}

View File

@@ -0,0 +1,10 @@
--- mozart2-2.0.1.orig/vm/vm/main/core-forward-decl.hh 2018-09-05 03:16:51.000000000 +0200
+++ mozart2-2.0.1/vm/vm/main/core-forward-decl.hh 2021-08-03 10:31:50.281476430 +0200
@@ -36,6 +36,7 @@
#include <cstdint>
#include <ostream>
#include <functional>
+#include <limits>
#include <memory>
#include <cassert>