From f7922a4996b52605b9cf94422e57318c44de7080 Mon Sep 17 00:00:00 2001 From: fredrikr79 Date: Wed, 20 Aug 2025 14:53:16 +0200 Subject: [PATCH] working mozart2 hello world --- .envrc | 1 + Makefile | 7 +++++++ flake.lock | 27 +++++++++++++++++++++++++++ flake.nix | 24 ++++++++++++++++++++++++ main.oz | 8 ++++++++ main.ozf | Bin 0 -> 742 bytes 6 files changed, 67 insertions(+) create mode 100644 .envrc create mode 100644 Makefile create mode 100644 flake.lock create mode 100644 flake.nix create mode 100644 main.oz create mode 100644 main.ozf diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..3550a30 --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use flake diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..ed2a67d --- /dev/null +++ b/Makefile @@ -0,0 +1,7 @@ +build: + ozc -c $(OZ_SRC) + +run: + make build + echo "make: built successfully" + ozengine $(OZ_SRC)f diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..0c4da0f --- /dev/null +++ b/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1755615617, + "narHash": "sha256-HMwfAJBdrr8wXAkbGhtcby1zGFvs+StOp19xNsbqdOg=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "20075955deac2583bb12f07151c2df830ef346b4", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..95e1485 --- /dev/null +++ b/flake.nix @@ -0,0 +1,24 @@ +{ + description = "mozart2 for writing oz"; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + }; + + outputs = + { self, nixpkgs, ... }: + let + system = "x86_64-linux"; + pkgs = import nixpkgs { inherit system; }; + in + { + devShells.${system}.default = pkgs.mkShell { + buildInputs = with pkgs; [ + mozart2-binary + ]; + shellHook = '' + echo "enjoy m*oz*art2" + ''; + }; + }; +} diff --git a/main.oz b/main.oz new file mode 100644 index 0000000..5f01d1c --- /dev/null +++ b/main.oz @@ -0,0 +1,8 @@ +functor +import + System + Application +define + {System.show 'hello world'} + {Application.exit 0} +end diff --git a/main.ozf b/main.ozf new file mode 100644 index 0000000000000000000000000000000000000000..e6a992547b397d04d075725e94335141c5b4d080 GIT binary patch literal 742 zcmZQzV9;S;U|J|^1A_*L z%aWOwme0VzpbqAgR2F~~DuYa9G-P04Pyz|F=O$+6>E%~3Ffb^9_-vWE1^GoK3=9nN zU~X__aY_?EoLG{X53)rDB*vVVnZv-qAOT{trB*<7i-WB(U|?Vn z14*!?R%C(<6$Np)Gg5PM@)gSSi*i7o5&?;^6ldg@GcYg+aWOD3u!be(l!6?~sK>y- zAOMnQOk-eR;1^{BKNMusqu*BBhYHZd@OLX83B9|i^nkbmVtArB1%5e5bZQBb@w zFffQi{m%;W4L4LXhz*J*W`R%EH-yEXIjrCG&i1pb(f|8U(?BLOfmDG!1`0-yvn4?B O3W_68APGW^VgLY^7DsUa literal 0 HcmV?d00001