commit f7922a4996b52605b9cf94422e57318c44de7080 Author: fredrikr79 Date: Wed Aug 20 14:53:16 2025 +0200 working mozart2 hello world 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 0000000..e6a9925 Binary files /dev/null and b/main.ozf differ