Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add workarounds for aarch64 cross-compilation #54

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions Build.hs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ rules wanted ghc maybeTarget = do
putInfo $ "Copying " <> file <> " to " <> copy
bool copyFileChanged minifyFileJS (takeExtension file == ".js") file copy

let haskell path flags = do
let haskell path flags extra = do
need assets
-- TODO shouldn't need to exclude `dist-newstyle` but it can still end up being used for `cabal repl` etc.
-- due to https://github.com/haskell/cabal/issues/5271
Expand All @@ -109,6 +109,7 @@ rules wanted ghc maybeTarget = do
, "--builddir=" <> (".." </> hsBuildDir)
, "-w" <> ghc
]
<> extra
cmd_
(Cwd hsDir)
cabal
Expand All @@ -126,8 +127,11 @@ rules wanted ghc maybeTarget = do
[path'] -> copyFileChanged path' path
fs -> error $ "Multiple matches: " <> intercalate ", " fs

-- like "debug" in that it doesn't embed files - but optimised and with no suffix on the binary
monpad %> \_ -> do
haskell monpad "release"
rscs <- liftIO $ Dir.listDirectory rscDir
for_ rscs $ \r -> copyFileChanged (rscDir </> r) (distDir </> rsc </> r)
haskell monpad "" ["-O2"]

let elm optimise = do
needDirExcept elmBuildDir elmDir
Expand All @@ -152,7 +156,7 @@ rules wanted ghc maybeTarget = do

-- unoptimised, and needs to be run from a directory containing `rsc`, with all the JS/CSS etc. assets
"debug" ~> do
haskell monpadDebug ""
haskell monpadDebug "" []
rscs <- liftIO $ Dir.listDirectory rscDir
for_ rscs $ \r -> copyFileChanged (rscDir </> r) (distDir </> rsc </> r)

Expand Down
30 changes: 30 additions & 0 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,33 @@ source-repository-package
location: https://github.com/georgefst/haskell-to-elm
tag: fbe8417ebac8d5936bc2f7ca5f39348f7e341b46
--sha256: o9PSRUJUnPpt883C11wKosr8sOyAD6tjq5UYcxNgwEA=

--TODO https://github.com/haskell/entropy/pull/20
source-repository-package
type: git
location: https://github.com/georgefst/entropy
tag: 7c7bd1d24b90d31b38e8b3f8f4b1a8d7ceae792b

--TODO https://github.com/cdepillabout/pretty-simple/pull/107
source-repository-package
type: git
location: https://github.com/cdepillabout/pretty-simple
tag: 9e74d700b63b35aed3dcbda8afca4e4fce21081e

--TODO custom setup removed, but no release yet
source-repository-package
type: git
location: https://github.com/kazu-yamamoto/logger
subdir: wai-logger
tag: cc1ec1d8e6700b66b1b1c037694e962311d165b8

--TODO https://github.com/haskell-servant/servant/issues/1187#issuecomment-1681962015
source-repository-package
type: git
location: https://github.com/georgefst/servant
subdir: servant-server servant servant-client
tag: 918570fb19f2ef40edafbcba52530f1a23f98e87

allow-newer:
--TODO https://github.com/haskell-servant/servant-lucid/issues/29
servant-lucid:servant
2 changes: 0 additions & 2 deletions dhall/lib/evdev.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ let RelAxis =
| RelDial
| RelWheel
| RelMisc
| RelHWheelHiRes
| RelWheelHiRes
| RelReserved
>

Expand Down
5 changes: 0 additions & 5 deletions haskell/monpad.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,6 @@ library
other-modules:
Test
Embed
GenerateElm
GenerateElm.Via
Layout
Opts
Orphans.Colour
Expand All @@ -132,13 +130,10 @@ library
colour ^>= 2.3.5,
convertible ^>= 1.1.1,
deriving-aeson ^>= 0.2.6.1,
elm-syntax ^>= 0.3.0,
exceptions ^>= 0.10.4,
fsnotify ^>= 0.3,
generic-data ^>= {0.9.2, 1.1},
generic-functor ^>= {0.2, 1.1},
generics-sop ^>= 0.5.0,
haskell-to-elm ^>= 0.3.1,
hostname ^>= 1.0,
http-types ^>= 0.12.3,
JuicyPixels ^>= 3.3.5,
Expand Down
270 changes: 0 additions & 270 deletions haskell/src/GenerateElm.hs

This file was deleted.

Loading