mirror of
https://github.com/digital-asset/daml.git
synced 2024-09-11 04:45:57 +03:00
Update rules_haskell - now generates Haskell version macros (#769)
* Update rules_haskell: Generates version macros - rules_haskell now generates a version macros header file that is passed on to preprocessors such as c2hs or hsc2hs. - The haskell_import rule was also renamed to haskell_toolchain_library. * Drop unix-compat patch This was necessary to work around missing version macros.
This commit is contained in:
parent
5b26f68ee6
commit
3def0bd901
@ -160,15 +160,15 @@ sets the default visibility property globally for our targets as `public`. This
|
||||
The `load` statments
|
||||
```
|
||||
load("@io_tweag_rules_haskell//haskell:haskell.bzl",
|
||||
"haskell_toolchain", "haskell_import", "haskell_cc_import",
|
||||
"haskell_toolchain", "haskell_toolchain_library", "haskell_cc_import",
|
||||
)
|
||||
load("@io_tweag_rules_haskell//haskell:c2hs.bzl",
|
||||
"c2hs_toolchain",
|
||||
)
|
||||
```
|
||||
bring the macros `haskell_toolchain`, `haskell_import`, `haskell_cc_import` and `c2hs_toolchain` into scope from `rules_haskell`.
|
||||
bring the macros `haskell_toolchain`, `haskell_toolchain_library`, `haskell_cc_import` and `c2hs_toolchain` into scope from `rules_haskell`.
|
||||
|
||||
`haskell_import`:
|
||||
`haskell_toolchain_library`:
|
||||
- import a package that is prebuilt outside of Bazel
|
||||
|
||||
`haskell_cc_import`:
|
||||
|
@ -452,12 +452,7 @@ hazel_repositories(
|
||||
hazel_hackage("filepattern", "0.1.1", "f7fc5bdcfef0d43a793a3c64e7c0fd3b1d35eea97a37f0e69d6612ab255c9b4b") +
|
||||
hazel_hackage("terminal-progress-bar", "0.4.0.1", "c5a9720fcbcd9d83f9551e431ee3975c61d7da6432aa687aef0c0e04e59ae277") +
|
||||
hazel_hackage("rope-utf16-splay", "0.2.0.0", "83d1961bf55355da49a6b55d6f58d02483eff1f8e6df53f4dccdab1ac49e101d") +
|
||||
hazel_hackage(
|
||||
"unix-compat",
|
||||
"0.5.1",
|
||||
"a39d0c79dd906763770b80ba5b6c5cb710e954f894350e9917de0d73f3a19c52",
|
||||
patches = ["@com_github_digital_asset_daml//bazel_tools:unix-compat.patch"],
|
||||
) +
|
||||
hazel_hackage("unix-compat", "0.5.1", "a39d0c79dd906763770b80ba5b6c5cb710e954f894350e9917de0d73f3a19c52") +
|
||||
# This is a special version of Haskell LSP without GPL dependencies
|
||||
hazel_github(
|
||||
"haskell-lsp",
|
||||
|
@ -1,14 +0,0 @@
|
||||
--- src/System/PosixCompat/Files.hsc 2018-08-23 02:44:16.000000000 +0200
|
||||
+++ src/System/PosixCompat/Files.hsc 2019-04-15 13:41:46.371761110 +0200
|
||||
@@ -392,11 +392,7 @@
|
||||
-- Renaming
|
||||
|
||||
rename :: FilePath -> FilePath -> IO ()
|
||||
-#if MIN_VERSION_Win32(2, 6, 0)
|
||||
rename name1 name2 = moveFileEx name1 (Just name2) mOVEFILE_REPLACE_EXISTING
|
||||
-#else
|
||||
-rename name1 name2 = moveFileEx name1 name2 mOVEFILE_REPLACE_EXISTING
|
||||
-#endif
|
||||
|
||||
-- -----------------------------------------------------------------------------
|
||||
-- chown()
|
4
deps.bzl
4
deps.bzl
@ -27,8 +27,8 @@
|
||||
# be resolvable from external workspaces otherwise.
|
||||
|
||||
rules_scala_version = "6f8ee3d951d2ac6154356314600f6edb4eb5df8b"
|
||||
rules_haskell_version = "42f32a4017235b8c600a6cdd076232698285eef9"
|
||||
rules_haskell_sha256 = "0ed1a2cecd85fb03720893c4a122f8a64eed9d87c173de7bdf2dd295ea1ccf98"
|
||||
rules_haskell_version = "23eaaa8c85d908fb3ccc69b470d3730dcef165a0"
|
||||
rules_haskell_sha256 = "9fab4f50a0ea0e02d98c918fdf0859cf0f6828b6dbf167c7acb1293cd2b37d65"
|
||||
rules_nixpkgs_version = "40b5a9f23abca57f364c93245c7451206ef1a855"
|
||||
|
||||
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
|
||||
|
@ -103,7 +103,7 @@ ppFullLicense libFullText = "\n\n" ++ replicate 80 '-' ++ "\n" ++ packageName l
|
||||
|
||||
generateDepsFileFromBazel :: IO String
|
||||
generateDepsFileFromBazel = do
|
||||
let cmd = "bazel query 'kind(\"(haskell_library|haskell_import)\",filter(\"^((?!da-hs-|:daml-|:daml_).)*$\", deps(//...)))' --output xml"
|
||||
let cmd = "bazel query 'kind(\"(haskell_library|haskell_toolchain_library)\",filter(\"^((?!da-hs-|:daml-|:daml_).)*$\", deps(//...)))' --output xml"
|
||||
readCreateProcess (shell cmd) ""
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user