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 GHC (Haskell) 9.8.1 #16339

Closed
wants to merge 1 commit into from
Closed

Conversation

booniepepper
Copy link
Contributor

@booniepepper booniepepper commented Oct 15, 2023

Just a late-night attempt. I am very new to aqua, and I'm not sure if this can work, and I might give up on this entirely.

(For active development it may be better to use ghcup. I wanted to be able to codify an exact version of GHC direct from aqua)

@suzuki-shunsuke suzuki-shunsuke added the enhancement New feature or request label Oct 15, 2023
@suzuki-shunsuke
Copy link
Member

Thank you!

@suzuki-shunsuke
Copy link
Member

suzuki-shunsuke commented Oct 15, 2023

From the next time, could you create a feature branch to send a pull request?
I fixed the setting, but I couldn't push a commit to the main branch.

$ git push https://github.com/booniepepper/aqua-registry.git HEAD:main
To https://github.com/booniepepper/aqua-registry.git
 ! [rejected]            HEAD -> main (non-fast-forward)
error: failed to push some refs to 'https://github.com/booniepepper/aqua-registry.git'
hint: Updates were rejected because a pushed branch tip is behind its remote
hint: counterpart. If you want to integrate the remote changes, use 'git pull'
hint: before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
$ git diff pkgs 
diff --git a/pkgs/ghc/ghc/registry.yaml b/pkgs/ghc/ghc/registry.yaml
index c0d50a60f..9b4dfb4fe 100644
--- a/pkgs/ghc/ghc/registry.yaml
+++ b/pkgs/ghc/ghc/registry.yaml
@@ -7,14 +7,21 @@ packages:
     url: https://downloads.haskell.org/~ghc/{{.Version}}/ghc-{{.Version}}-{{.Arch}}-{{.OS}}.{{.Format}}
     format: tar.xz
     replacements:
-      linux: unknown-linux
       darwin: apple-darwin
       windows: unknown-mingw32
       arm64: aarch64
       amd64: x86_64
     overrides:
       - goos: linux
-        url: https://downloads.haskell.org/~ghc/{{.Version}}/ghc-{{.Version}}-{{.Arch}}-alpine3_12-linux-static.{{.Format}}
+        goarch: amd64
+        replacements:
+          linux: alpine3_12-linux
+          amd64: x86_64
+      - goos: linux
+        goarch: arm64
+        replacements:
+          linux: deb10-linux
+          amd64: x86_64
     files:
       - name: ghc
         src: ghc-{{.Version}}-{{.Arch}}-{{.OS}}/wrappers/ghc

@suzuki-shunsuke
Copy link
Member

On m1 Mac, ghc doesn't work well. 🤔

$ ghc --help
FATA[0000] aqua failed                                   aqua_version= env=darwin/arm64 error="it failed to start the process" exe_name=ghc package_name=ghc/ghc package_version=9.8.1 program=aqua

$ aqua which ghc
/Users/shunsukesuzuki/.local/share/aquaproj-aqua/pkgs/http/downloads.haskell.org/~ghc/9.8.1/ghc-9.8.1-aarch64-apple-darwin.tar.xz/ghc-9.8.1-aarch64-apple-darwin/wrappers/ghc

$ /Users/shunsukesuzuki/.local/share/aquaproj-aqua/pkgs/http/downloads.haskell.org/~ghc/9.8.1/ghc-9.8.1-aarch64-apple-darwin.tar.xz/ghc-9.8.1-aarch64-apple-darwin/wrappers/ghc --help
/Users/shunsukesuzuki/.local/share/aquaproj-aqua/pkgs/http/downloads.haskell.org/~ghc/9.8.1/ghc-9.8.1-aarch64-apple-darwin.tar.xz/ghc-9.8.1-aarch64-apple-darwin/wrappers/ghc: line 1: exec: : not found

$ cat /Users/shunsukesuzuki/.local/share/aquaproj-aqua/pkgs/http/downloads.haskell.org/~ghc/9.8.1/ghc-9.8.1-aarch64-apple-darwin.tar.xz/ghc-9.8.1-aarch64-apple-darwin/wrappers/ghc
exec "$executablename" -B"$libdir" ${1+"$@"}

@suzuki-shunsuke
Copy link
Member

Let me recreate the pull request because I can't push commits to this pull request.

@booniepepper booniepepper deleted the add-ghc branch October 15, 2023 22:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants