From 0b1e24b85f527a36673836ccea68b4db3750cdf9 Mon Sep 17 00:00:00 2001 From: Josh Rahm Date: Thu, 8 Feb 2024 21:54:09 -0700 Subject: Add wlroots submodule and add custom build commands to build it. --- .gitmodules | 3 +++ Setup.hs | 16 ++++++++++++++++ package.yaml | 7 +++++++ wlroots | 1 + 4 files changed, 27 insertions(+) create mode 100644 .gitmodules create mode 100644 Setup.hs create mode 160000 wlroots diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..97560e8 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "wlroots"] + path = wlroots + url = https://github.com/swaywm/wlroots.git diff --git a/Setup.hs b/Setup.hs new file mode 100644 index 0000000..8ccd975 --- /dev/null +++ b/Setup.hs @@ -0,0 +1,16 @@ +import Distribution.Simple +import Distribution.Types.HookedBuildInfo +import System.Environment (getArgs) +import System.Process + +main = do + args <- getArgs + putStrLn $ "This is an MFing custom build script!!! " ++ show args + defaultMainWithHooks $ + simpleUserHooks + { preBuild = \_ _ -> do + callCommand "cd wlroots && meson setup build -Dexamples=false --reconfigure && ninja -C build" + return emptyHookedBuildInfo, + cleanHook = \_ _ _ _ -> do + callCommand "cd wlroots && ninja -C build clean" + } diff --git a/package.yaml b/package.yaml index 4f4c6a3..7966291 100644 --- a/package.yaml +++ b/package.yaml @@ -19,6 +19,13 @@ extra-source-files: # common to point users to the README.md file. description: Please see the README on GitHub at + +custom-setup: + dependencies: + - base + - Cabal + - process + dependencies: - base >= 4.7 && < 5 - mtl diff --git a/wlroots b/wlroots new file mode 160000 index 0000000..0855cda --- /dev/null +++ b/wlroots @@ -0,0 +1 @@ +Subproject commit 0855cdacb2eeeff35849e2e9c4db0aa996d78d10 -- cgit