From e6d258bc2a884bffae606a71b6a2b45a6fb4faf5 Mon Sep 17 00:00:00 2001 From: Karl Ostmo Date: Sun, 30 Jun 2024 12:03:54 -0700 Subject: [PATCH 1/3] Split input events into separate package --- cabal.project | 1 + .../src}/Graphics/Vty/Input/Events.hs | 0 vty-input/vty-input.cabal | 25 +++++++++++++++++++ vty.cabal | 6 +++-- 4 files changed, 30 insertions(+), 2 deletions(-) rename {src => vty-input/src}/Graphics/Vty/Input/Events.hs (100%) create mode 100644 vty-input/vty-input.cabal diff --git a/cabal.project b/cabal.project index c59e74ea..5ce5af9a 100644 --- a/cabal.project +++ b/cabal.project @@ -1,2 +1,3 @@ packages: . tests/ + vty-input/ diff --git a/src/Graphics/Vty/Input/Events.hs b/vty-input/src/Graphics/Vty/Input/Events.hs similarity index 100% rename from src/Graphics/Vty/Input/Events.hs rename to vty-input/src/Graphics/Vty/Input/Events.hs diff --git a/vty-input/vty-input.cabal b/vty-input/vty-input.cabal new file mode 100644 index 00000000..ad2000fd --- /dev/null +++ b/vty-input/vty-input.cabal @@ -0,0 +1,25 @@ +name: vty-input +version: 5.37 +license: BSD3 +license-file: LICENSE +author: AUTHORS +maintainer: Jonathan Daugherty (cygnus@foobox.com) +homepage: https://github.com/jtdaugherty/vty +category: User Interfaces +synopsis: Input event definitions for the Vty library +cabal-version: 1.18 +build-type: Simple +extra-doc-files: LICENSE +tested-with: GHC==7.10.3, GHC==8.0.2, GHC==8.2.2, GHC==8.4.3, GHC==8.6.5 + +source-repository head + type: git + location: https://github.com/jtdaugherty/vty.git + +library + default-language: Haskell2010 + hs-source-dirs: src + exposed-modules: Graphics.Vty.Input.Events + build-depends: base >= 4.8 && < 5, + bytestring, + deepseq >= 1.1 && < 1.6 diff --git a/vty.cabal b/vty.cabal index 28533303..6a4a9798 100644 --- a/vty.cabal +++ b/vty.cabal @@ -51,7 +51,8 @@ library binary, parsec, filepath, - directory + directory, + vty-input if !impl(ghc >= 8.0) build-depends: semigroups >= 0.16, @@ -70,7 +71,6 @@ library Graphics.Vty.Image.Internal Graphics.Vty.Inline Graphics.Vty.Input - Graphics.Vty.Input.Events Graphics.Vty.Output Graphics.Vty.Output.Mock Graphics.Vty.Picture @@ -81,4 +81,6 @@ library Graphics.Vty.UnicodeWidthTable.Main Graphics.Vty.UnicodeWidthTable.Query Graphics.Vty.UnicodeWidthTable.Types + reexported-modules: Graphics.Vty.Input.Events + c-sources: cbits/mk_wcwidth.c From e983516bde3bcc3d673df7406ca10f14d7596ccd Mon Sep 17 00:00:00 2001 From: Karl Ostmo Date: Sun, 30 Jun 2024 13:35:01 -0700 Subject: [PATCH 2/3] cabal.project generation for CI --- .github/workflows/haskell-ci.yml | 2 +- vty-input/vty-input.cabal | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml index 3fc1c467..889dd067 100644 --- a/.github/workflows/haskell-ci.yml +++ b/.github/workflows/haskell-ci.yml @@ -186,7 +186,7 @@ jobs: - name: initial cabal.project for sdist run: | touch cabal.project - echo "packages: $GITHUB_WORKSPACE/source/." >> cabal.project + echo "packages: $GITHUB_WORKSPACE/source/.,$GITHUB_WORKSPACE/source/vty-input" >> cabal.project cat cabal.project - name: sdist run: | diff --git a/vty-input/vty-input.cabal b/vty-input/vty-input.cabal index ad2000fd..a9ac3d01 100644 --- a/vty-input/vty-input.cabal +++ b/vty-input/vty-input.cabal @@ -1,15 +1,12 @@ name: vty-input -version: 5.37 +version: 1.0.0 license: BSD3 -license-file: LICENSE -author: AUTHORS maintainer: Jonathan Daugherty (cygnus@foobox.com) homepage: https://github.com/jtdaugherty/vty category: User Interfaces synopsis: Input event definitions for the Vty library cabal-version: 1.18 build-type: Simple -extra-doc-files: LICENSE tested-with: GHC==7.10.3, GHC==8.0.2, GHC==8.2.2, GHC==8.4.3, GHC==8.6.5 source-repository head From 82c15fb76211bd0a2c493e674b7eb746882446fe Mon Sep 17 00:00:00 2001 From: Karl Ostmo Date: Sun, 30 Jun 2024 14:27:19 -0700 Subject: [PATCH 3/3] add vty-input to generated cabal.project --- .github/workflows/haskell-ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml index 889dd067..281e0b54 100644 --- a/.github/workflows/haskell-ci.yml +++ b/.github/workflows/haskell-ci.yml @@ -199,11 +199,13 @@ jobs: - name: generate cabal.project run: | PKGDIR_vty="$(find "$GITHUB_WORKSPACE/unpacked" -maxdepth 1 -type d -regex '.*/vty-[0-9.]*')" + PKGDIR_vtyinput="$(find "$GITHUB_WORKSPACE/unpacked" -maxdepth 1 -type d -regex '.*/vty-input-[0-9.]*')" echo "PKGDIR_vty=${PKGDIR_vty}" >> "$GITHUB_ENV" + echo "PKGDIR_vtyinput=${PKGDIR_vtyinput}" >> "$GITHUB_ENV" rm -f cabal.project cabal.project.local touch cabal.project touch cabal.project.local - echo "packages: ${PKGDIR_vty}" >> cabal.project + echo "packages: ${PKGDIR_vty},${PKGDIR_vtyinput}" >> cabal.project if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package vty" >> cabal.project ; fi if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi cat >> cabal.project <