aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2026-01-01 18:04:40 -0700
committerJosh Rahm <joshuarahm@gmail.com>2026-01-01 18:04:40 -0700
commit628174c992a5a740feb4dc119adf8dfb1f89f992 (patch)
tree683361b27cf4b6df2c5cc782d70de9bdf5fd38a8
parentbe1ef8cee5f68eb9afecca94071069a1ff82825e (diff)
downloadmontis-628174c992a5a740feb4dc119adf8dfb1f89f992.tar.gz
montis-628174c992a5a740feb4dc119adf8dfb1f89f992.tar.bz2
montis-628174c992a5a740feb4dc119adf8dfb1f89f992.zip
Have Meson orchestrate the whole build rather than stack.
As a part of this, I changed the file layout to: rt/ - the Montis runtime plug/ - the Montis plugin wlroots/ - wlroots
-rw-r--r--Setup.hs69
-rw-r--r--plug/README.md1
-rw-r--r--plug/package.yaml (renamed from package.yaml)29
-rw-r--r--plug/plug.stamp0
-rw-r--r--plug/src/Config.hs (renamed from src/Config.hs)0
-rw-r--r--plug/src/Lib.hs (renamed from src/Lib.hs)0
-rw-r--r--plug/src/Wetterhorn/Constraints.hs (renamed from src/Wetterhorn/Constraints.hs)0
-rw-r--r--plug/src/Wetterhorn/Core.hs (renamed from src/Wetterhorn/Core.hs)0
-rw-r--r--plug/src/Wetterhorn/Core/ButtonEvent.hs (renamed from src/Wetterhorn/Core/ButtonEvent.hs)0
-rw-r--r--plug/src/Wetterhorn/Core/KeyEvent.hs (renamed from src/Wetterhorn/Core/KeyEvent.hs)0
-rw-r--r--plug/src/Wetterhorn/Core/Keys.hs (renamed from src/Wetterhorn/Core/Keys.hs)0
-rw-r--r--plug/src/Wetterhorn/Core/SurfaceEvent.hs (renamed from src/Wetterhorn/Core/SurfaceEvent.hs)0
-rw-r--r--plug/src/Wetterhorn/Core/W.hs (renamed from src/Wetterhorn/Core/W.hs)0
-rw-r--r--plug/src/Wetterhorn/Dsl/Bind.hs (renamed from src/Wetterhorn/Dsl/Bind.hs)0
-rw-r--r--plug/src/Wetterhorn/Dsl/Buttons.hsc (renamed from src/Wetterhorn/Dsl/Buttons.hsc)0
-rw-r--r--plug/src/Wetterhorn/Dsl/Input.hs (renamed from src/Wetterhorn/Dsl/Input.hs)0
-rw-r--r--plug/src/Wetterhorn/Foreign.hs (renamed from src/Wetterhorn/Foreign.hs)0
-rw-r--r--plug/src/Wetterhorn/Foreign/Export.hs (renamed from src/Wetterhorn/Foreign/Export.hs)0
-rw-r--r--plug/src/Wetterhorn/Foreign/ForeignInterface.hs (renamed from src/Wetterhorn/Foreign/ForeignInterface.hs)0
-rw-r--r--plug/src/Wetterhorn/Foreign/WlRoots.hs (renamed from src/Wetterhorn/Foreign/WlRoots.hs)0
-rw-r--r--plug/src/Wetterhorn/Keys/Macros.hs (renamed from src/Wetterhorn/Keys/Macros.hs)0
-rw-r--r--plug/src/Wetterhorn/Keys/MagicModifierKey.hs (renamed from src/Wetterhorn/Keys/MagicModifierKey.hs)0
-rw-r--r--plug/src/Wetterhorn/Layout/Combine.hs (renamed from src/Wetterhorn/Layout/Combine.hs)0
-rw-r--r--plug/src/Wetterhorn/Layout/Full.hs (renamed from src/Wetterhorn/Layout/Full.hs)0
-rw-r--r--plug/src/Wetterhorn/StackSet.hs (renamed from src/Wetterhorn/StackSet.hs)0
-rw-r--r--plug/src/harness_adapter.c (renamed from src/harness_adapter.c)0
-rw-r--r--plug/stack.yaml (renamed from stack.yaml)2
-rw-r--r--plug/test/Spec.hs (renamed from test/Spec.hs)0
-rw-r--r--rt/CMakeLists.txt (renamed from harness/CMakeLists.txt)0
-rw-r--r--rt/include/foreign_intf.h (renamed from harness/include/foreign_intf.h)0
-rw-r--r--rt/include/plugin.h (renamed from harness/include/plugin.h)0
-rw-r--r--rt/include/plugin_types.h (renamed from harness/include/plugin_types.h)0
-rw-r--r--rt/include/wl.h (renamed from harness/include/wl.h)0
-rw-r--r--rt/src/plugin.c (renamed from harness/src/plugin.c)0
-rw-r--r--rt/src/wl.c (renamed from harness/src/wl.c)0
-rw-r--r--rt/tools/genbuild.pl (renamed from harness/tools/genbuild.pl)0
-rw-r--r--rt/tools/genintf.pl (renamed from harness/tools/genintf.pl)0
37 files changed, 12 insertions, 89 deletions
diff --git a/Setup.hs b/Setup.hs
deleted file mode 100644
index e8a6b6b..0000000
--- a/Setup.hs
+++ /dev/null
@@ -1,69 +0,0 @@
-import Control.Exception
-import Control.Monad (forM_, when)
-import Data.Maybe (fromJust)
-import Distribution.Simple
-import Distribution.Simple.Setup
-import Distribution.Types.HookedBuildInfo
-import System.Directory
-import System.Environment (getArgs)
-import System.FilePath
-import System.Posix.Files
-import System.Process
-import Text.Printf
-
-main = do
- putStrLn "Running Setup.hs"
-
- defaultMainWithHooks $
- simpleUserHooks
- { preConf = \_ conf -> do
- let buildPath = fromJust (flagToMaybe $ configDistPref conf)
-
- callCommand $
- printf "cd wlroots && meson setup %s -Dexamples=false -Dbackends=x11,drm,libinput --reconfigure" (wlrootsDir buildPath)
-
- callCommand $
- printf "cmake -B %s -S harness" (harnessDir buildPath)
-
- lnF ("../" ++ harnessDir buildPath) "harness/build"
-
- return emptyHookedBuildInfo,
- preBuild = \_ conf -> do
- let path = fromJust (flagToMaybe $ buildDistPref conf)
-
- callCommand $ printf "cd wlroots && ninja -C %s" (wlrootsDir path)
-
- callCommand $
- printf "make -C %s" (harnessDir path)
-
- lnF (printf "%s/wtr_harness" (harnessDir path)) "wtr_harness"
-
- return emptyHookedBuildInfo,
- postCopy = \a f pd _ -> do
- forM_ (flagToMaybe (copyDistPref f)) $ \copyDest -> do
- let pluginFile = copyDest </> "build" </> "wtr.so" </> "wtr.so"
- lnF pluginFile "wtr.so"
- }
- where
- wlrootsDir :: String -> String
- wlrootsDir = printf "../%s/build/wlroots"
-
- harnessDir :: String -> String
- harnessDir = printf "%s/build/wtr_harness"
-
- lnF from to = do
- printf "%s -> %s\n" from to
- flip
- when
- ( do
- printf "Removing %s." to
- removeLink to
- )
- =<< doesExist to
- createSymbolicLink from to
-
- doesExist f = do
- b1 <- doesFileExist f
- b2 <- doesDirectoryExist f
- b3 <- catch (pathIsSymbolicLink f) (\(e :: SomeException) -> return False)
- return (b1 || b2 || b3)
diff --git a/plug/README.md b/plug/README.md
new file mode 100644
index 0000000..5592f08
--- /dev/null
+++ b/plug/README.md
@@ -0,0 +1 @@
+The Plugin for the Montis Runtime.
diff --git a/package.yaml b/plug/package.yaml
index d9e4add..a9f29ae 100644
--- a/package.yaml
+++ b/plug/package.yaml
@@ -1,6 +1,6 @@
-name: wetterhorn
+name: montis
-github: "githubuser/wetterhorn"
+github: "jrahm/montis"
license: BSD-3-Clause
author: "Author name here"
maintainer: "example@example.com"
@@ -16,18 +16,9 @@ extra-source-files:
# To avoid duplicated efforts in documentation and dealing with the
# complications of embedding Haddock markup inside cabal files, it is
# common to point users to the README.md file.
-description: Please see the README on GitHub at <https://github.com/githubuser/wetterhorn#readme>
+description: Please see the README on GitHub at <https://github.com/githubuser/montis#readme>
-custom-setup:
- dependencies:
- - base
- - Cabal
- - process
- - filepath
- - unix
- - directory
-
dependencies:
- base >= 4.7 && < 5
- mtl
@@ -64,7 +55,7 @@ ghc-options:
- -fPIC
executables:
- wtr.so:
+ montis.so:
main: Config.hs
source-dirs: src
c-sources: src/harness_adapter.c
@@ -72,19 +63,19 @@ executables:
- -shared
- -dynamic
- -no-hs-main
- - -lHSrts-1.0.2-ghc9.6.4
+ - -lHSrts-1.0.2-ghc9.8.4
- -O3
cc-options:
- -g3
- -O2
- -shared
- - -Iharness/build/
- - -Iharness/include/
- - -Iwlroots/include
+ - -I../build/rt/
+ - -I../rt/include/
+ - -I../wlroots/include
- -DWLR_USE_UNSTABLE
tests:
- wetterhorn-test:
+ montis-test:
main: Spec.hs
source-dirs: test
ghc-options:
@@ -92,4 +83,4 @@ tests:
- -rtsopts
- -with-rtsopts=-N
dependencies:
- - wetterhorn
+ - montis
diff --git a/plug/plug.stamp b/plug/plug.stamp
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/plug/plug.stamp
diff --git a/src/Config.hs b/plug/src/Config.hs
index e76e6ea..e76e6ea 100644
--- a/src/Config.hs
+++ b/plug/src/Config.hs
diff --git a/src/Lib.hs b/plug/src/Lib.hs
index d36ff27..d36ff27 100644
--- a/src/Lib.hs
+++ b/plug/src/Lib.hs
diff --git a/src/Wetterhorn/Constraints.hs b/plug/src/Wetterhorn/Constraints.hs
index 129fd6c..129fd6c 100644
--- a/src/Wetterhorn/Constraints.hs
+++ b/plug/src/Wetterhorn/Constraints.hs
diff --git a/src/Wetterhorn/Core.hs b/plug/src/Wetterhorn/Core.hs
index d853191..d853191 100644
--- a/src/Wetterhorn/Core.hs
+++ b/plug/src/Wetterhorn/Core.hs
diff --git a/src/Wetterhorn/Core/ButtonEvent.hs b/plug/src/Wetterhorn/Core/ButtonEvent.hs
index cc3d905..cc3d905 100644
--- a/src/Wetterhorn/Core/ButtonEvent.hs
+++ b/plug/src/Wetterhorn/Core/ButtonEvent.hs
diff --git a/src/Wetterhorn/Core/KeyEvent.hs b/plug/src/Wetterhorn/Core/KeyEvent.hs
index 77d273f..77d273f 100644
--- a/src/Wetterhorn/Core/KeyEvent.hs
+++ b/plug/src/Wetterhorn/Core/KeyEvent.hs
diff --git a/src/Wetterhorn/Core/Keys.hs b/plug/src/Wetterhorn/Core/Keys.hs
index 54d7125..54d7125 100644
--- a/src/Wetterhorn/Core/Keys.hs
+++ b/plug/src/Wetterhorn/Core/Keys.hs
diff --git a/src/Wetterhorn/Core/SurfaceEvent.hs b/plug/src/Wetterhorn/Core/SurfaceEvent.hs
index 3e7eaf3..3e7eaf3 100644
--- a/src/Wetterhorn/Core/SurfaceEvent.hs
+++ b/plug/src/Wetterhorn/Core/SurfaceEvent.hs
diff --git a/src/Wetterhorn/Core/W.hs b/plug/src/Wetterhorn/Core/W.hs
index 862f9fa..862f9fa 100644
--- a/src/Wetterhorn/Core/W.hs
+++ b/plug/src/Wetterhorn/Core/W.hs
diff --git a/src/Wetterhorn/Dsl/Bind.hs b/plug/src/Wetterhorn/Dsl/Bind.hs
index 0b6adaf..0b6adaf 100644
--- a/src/Wetterhorn/Dsl/Bind.hs
+++ b/plug/src/Wetterhorn/Dsl/Bind.hs
diff --git a/src/Wetterhorn/Dsl/Buttons.hsc b/plug/src/Wetterhorn/Dsl/Buttons.hsc
index c3e049c..c3e049c 100644
--- a/src/Wetterhorn/Dsl/Buttons.hsc
+++ b/plug/src/Wetterhorn/Dsl/Buttons.hsc
diff --git a/src/Wetterhorn/Dsl/Input.hs b/plug/src/Wetterhorn/Dsl/Input.hs
index 1a0c294..1a0c294 100644
--- a/src/Wetterhorn/Dsl/Input.hs
+++ b/plug/src/Wetterhorn/Dsl/Input.hs
diff --git a/src/Wetterhorn/Foreign.hs b/plug/src/Wetterhorn/Foreign.hs
index 2d0a42c..2d0a42c 100644
--- a/src/Wetterhorn/Foreign.hs
+++ b/plug/src/Wetterhorn/Foreign.hs
diff --git a/src/Wetterhorn/Foreign/Export.hs b/plug/src/Wetterhorn/Foreign/Export.hs
index 51bd72b..51bd72b 100644
--- a/src/Wetterhorn/Foreign/Export.hs
+++ b/plug/src/Wetterhorn/Foreign/Export.hs
diff --git a/src/Wetterhorn/Foreign/ForeignInterface.hs b/plug/src/Wetterhorn/Foreign/ForeignInterface.hs
index 471e3a9..471e3a9 100644
--- a/src/Wetterhorn/Foreign/ForeignInterface.hs
+++ b/plug/src/Wetterhorn/Foreign/ForeignInterface.hs
diff --git a/src/Wetterhorn/Foreign/WlRoots.hs b/plug/src/Wetterhorn/Foreign/WlRoots.hs
index 0581b77..0581b77 100644
--- a/src/Wetterhorn/Foreign/WlRoots.hs
+++ b/plug/src/Wetterhorn/Foreign/WlRoots.hs
diff --git a/src/Wetterhorn/Keys/Macros.hs b/plug/src/Wetterhorn/Keys/Macros.hs
index a794193..a794193 100644
--- a/src/Wetterhorn/Keys/Macros.hs
+++ b/plug/src/Wetterhorn/Keys/Macros.hs
diff --git a/src/Wetterhorn/Keys/MagicModifierKey.hs b/plug/src/Wetterhorn/Keys/MagicModifierKey.hs
index 6bc8bb3..6bc8bb3 100644
--- a/src/Wetterhorn/Keys/MagicModifierKey.hs
+++ b/plug/src/Wetterhorn/Keys/MagicModifierKey.hs
diff --git a/src/Wetterhorn/Layout/Combine.hs b/plug/src/Wetterhorn/Layout/Combine.hs
index 10a0208..10a0208 100644
--- a/src/Wetterhorn/Layout/Combine.hs
+++ b/plug/src/Wetterhorn/Layout/Combine.hs
diff --git a/src/Wetterhorn/Layout/Full.hs b/plug/src/Wetterhorn/Layout/Full.hs
index b7e4d91..b7e4d91 100644
--- a/src/Wetterhorn/Layout/Full.hs
+++ b/plug/src/Wetterhorn/Layout/Full.hs
diff --git a/src/Wetterhorn/StackSet.hs b/plug/src/Wetterhorn/StackSet.hs
index 86d1b8e..86d1b8e 100644
--- a/src/Wetterhorn/StackSet.hs
+++ b/plug/src/Wetterhorn/StackSet.hs
diff --git a/src/harness_adapter.c b/plug/src/harness_adapter.c
index 24b813c..24b813c 100644
--- a/src/harness_adapter.c
+++ b/plug/src/harness_adapter.c
diff --git a/stack.yaml b/plug/stack.yaml
index b66ae37..2c4375a 100644
--- a/stack.yaml
+++ b/plug/stack.yaml
@@ -8,7 +8,7 @@
# A snapshot resolver dictates the compiler version and the set of packages
# to be used for project dependencies. For example:
#
-resolver: lts-22.12
+resolver: lts-23.28
# ghc-9.6.4
# lts-21.21
# resolver: nightly-2023-09-24
diff --git a/test/Spec.hs b/plug/test/Spec.hs
index cd4753f..cd4753f 100644
--- a/test/Spec.hs
+++ b/plug/test/Spec.hs
diff --git a/harness/CMakeLists.txt b/rt/CMakeLists.txt
index a7a0a77..a7a0a77 100644
--- a/harness/CMakeLists.txt
+++ b/rt/CMakeLists.txt
diff --git a/harness/include/foreign_intf.h b/rt/include/foreign_intf.h
index 6558fab..6558fab 100644
--- a/harness/include/foreign_intf.h
+++ b/rt/include/foreign_intf.h
diff --git a/harness/include/plugin.h b/rt/include/plugin.h
index 4d69d76..4d69d76 100644
--- a/harness/include/plugin.h
+++ b/rt/include/plugin.h
diff --git a/harness/include/plugin_types.h b/rt/include/plugin_types.h
index df1eab5..df1eab5 100644
--- a/harness/include/plugin_types.h
+++ b/rt/include/plugin_types.h
diff --git a/harness/include/wl.h b/rt/include/wl.h
index dc7fe9f..dc7fe9f 100644
--- a/harness/include/wl.h
+++ b/rt/include/wl.h
diff --git a/harness/src/plugin.c b/rt/src/plugin.c
index 37a6dd3..37a6dd3 100644
--- a/harness/src/plugin.c
+++ b/rt/src/plugin.c
diff --git a/harness/src/wl.c b/rt/src/wl.c
index 261e082..261e082 100644
--- a/harness/src/wl.c
+++ b/rt/src/wl.c
diff --git a/harness/tools/genbuild.pl b/rt/tools/genbuild.pl
index 1acabc0..1acabc0 100644
--- a/harness/tools/genbuild.pl
+++ b/rt/tools/genbuild.pl
diff --git a/harness/tools/genintf.pl b/rt/tools/genintf.pl
index 794f966..794f966 100644
--- a/harness/tools/genintf.pl
+++ b/rt/tools/genintf.pl