Skip to content

Add cardano-dev, add get-chap-versions.sh #1

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
92 changes: 19 additions & 73 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,73 +1,19 @@
.stack-work/
.ghc.environment.*
.nix-shell-cabal.project
/cabal.project.diff
/cabal.project.freeze
/cabal.project.local*
/cabal.project.old
configuration/defaults/simpleview/genesis/
configuration/defaults/liveview/genesis/
dist-newstyle/
dist-profiled/
dist/
*~
\#*
\.#*
*.swp
.dir-locals.el
.Rhistory
result*
/launch-*
stack.yaml.lock

/.cache
/db
/db-[0-9]
/logs
/mainnet
/profile
/launch_*
/state-*
*.eventlog
*.hp
*.prof
*.stats
/cluster
/cluster.*
/run
supervisord.pid

tags
/config
/data
./*.skey
./*.vkey
./*.cert

# For now require that users generate their own hie.yaml
hie.yaml

# Ignore Visual Studio code configuration
.vscode/tasks.json

# Ignore files generated by tests
tmp
logs
/chairman/db
/html

# Ignore files generated by haddock
/haddocks
/*.socket

# Ignore files generated by scripts
/example
/testnet

.vscode/

# Test artifacts
cardano-tracer/cardano-tracer-test

# IntellIJ project folder
.idea/
# this ignores everything except meta-project configuration files
# this allows users to keep anything they want in this directory like
# temporarily cloned repos with dependencies for the time being
*

# metaproject configuration files
!.gitignore
!.gitmodules
!README.md
!cabal.project
!cabal-hackage.project
!hie.yaml
!get-chap-versions.sh

# cardano projects
!cardano-dev
!cardano-api
!cardano-cli
!cardano-node
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,9 @@
[submodule "cardano-cli"]
path = cardano-cli
url = [email protected]:input-output-hk/cardano-cli.git
[submodule "cardano-node"]
path = cardano-node
url = [email protected]:input-output-hk/cardano-node.git
[submodule "cardano-dev"]
path = cardano-dev
url = [email protected]:input-output-hk/cardano-dev.git
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
# fusion-flamingo
Development repository for the fusion-flamingo team

after cloning do
```bash
git submodule init
git submodule update
```
45 changes: 45 additions & 0 deletions cabal-hackage.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
repository cardano-haskell-packages
url: https://input-output-hk.github.io/cardano-haskell-packages
secure: True
root-keys:
3e0cce471cf09815f930210f7827266fd09045445d65923e6d0238a6cd15126f
443abb7fb497a134c343faf52f0b659bd7999bc06b7f63fa76dc99d631f9bea1
a86a1f6ce86c449c46666bda44268677abf29b5b2d2eb5ec7af903ec2f117a82
bcec67e8e99cabfa7764d75ad9b158d72bfacf70ca1d0ec8bc6b4406d1bf8413
c00aae8461a256275598500ea0e187588c35a5d5d7454fb57eac18d9edb86a56
d4a35cd3121aa00d18544bb0ac01c3e1691d618f462c46129271bccf39f7e8ee

index-state: 2023-06-02T00:00:00Z

packages:
-- cardano-api/*/*.cabal
-- uncomment when we start using separate repo
-- cardano-cli/*/*.cabal
cardano-node/*/*.cabal

-- [email protected]:input-output-hk/hedgehog-extras.git
-- hedgehog-extras/*.cabal

-- [email protected]:input-output-hk/ouroboros-network.git
-- ouroboros-network/*/*.cabal

tests: True

test-show-details: direct

-- Always write GHC env files, because they are needed for ghci.
write-ghc-environment-files: always

package *
ghc-options: -Wwarn

package cryptonite
-- Using RDRAND instead of /dev/urandom as an entropy source for key
-- generation is dubious. Set the flag so we use /dev/urandom by default.
flags: -support_rdrand

package snap-server
flags: +openssl

package cardano-crypto-praos
flags: -external-libsodium-vrf
45 changes: 25 additions & 20 deletions cabal.project
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-- Custom repository for cardano haskell packages, see CONTRIBUTING for more

repository cardano-haskell-packages
url: https://input-output-hk.github.io/cardano-haskell-packages
secure: True
Expand All @@ -10,27 +10,22 @@ repository cardano-haskell-packages
c00aae8461a256275598500ea0e187588c35a5d5d7454fb57eac18d9edb86a56
d4a35cd3121aa00d18544bb0ac01c3e1691d618f462c46129271bccf39f7e8ee

-- See CONTRIBUTING for information about these, including some Nix commands
-- you need to run if you change them
index-state:
, hackage.haskell.org 2023-05-25T00:00:00Z
, cardano-haskell-packages 2023-05-29T01:40:13Z
index-state: 2023-06-02T00:00:00Z

packages:
cardano-api/cardano-api
cardano-api/cardano-api-gen
cardano-cli/cardano-cli
cardano-api/*/*.cabal
-- TODO: uncomment when we start using separate repo
-- cardano-cli/*/*.cabal
cardano-node/*/*.cabal

package cardano-api
ghc-options: -Werror
-- [email protected]:input-output-hk/hedgehog-extras.git
-- hedgehog-extras/*.cabal

package cardano-api-gen
ghc-options: -Werror
-- [email protected]:input-output-hk/ouroboros-network.git
-- ouroboros-network/*/*.cabal

package cryptonite
-- Using RDRAND instead of /dev/urandom as an entropy source for key
-- generation is dubious. Set the flag so we use /dev/urandom by default.
flags: -support_rdrand
-- beware of repos with multiple cabal projects with different release cadence
-- thise may render the project unbuildable, like when you include here ouroboros-network

tests: True

Expand All @@ -39,6 +34,16 @@ test-show-details: direct
-- Always write GHC env files, because they are needed for ghci.
write-ghc-environment-files: always

-- IMPORTANT
-- Do NOT add more source-repository-package stanzas here unless they are strictly
-- temporary! Please read the section in CONTRIBUTING about updating dependencies.
package *
ghc-options: -Wwarn

package cryptonite
-- Using RDRAND instead of /dev/urandom as an entropy source for key
-- generation is dubious. Set the flag so we use /dev/urandom by default.
flags: -support_rdrand

package snap-server
flags: +openssl

package cardano-crypto-praos
flags: -external-libsodium-vrf
1 change: 1 addition & 0 deletions cardano-dev
Submodule cardano-dev added at 67e7a4
1 change: 1 addition & 0 deletions cardano-node
Submodule cardano-node added at 80c085
17 changes: 17 additions & 0 deletions get-chap-versions.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/env bash

# displays versions and hashes for chap dependencies for the current build plan

set -euo pipefail

echo '*** Creating build plan...'
cabal build --project-file cabal-hackage.project --dry-run all >/dev/null

jq '."install-plan"[] | select(."pkg-src".repo.uri == "https://input-output-hk.github.io/cardano-haskell-packages")'< dist-newstyle/cache/plan.json

## TODO how those produced hashes relate to the versions in CHaP?
# Probable workaround:
# 1. Resolve package-version pair into toml file in https://github.com/input-output-hk/cardano-haskell-packages
# 2. Get hash from CHaP
# 3. Use git worktree to checkout package subdirectory basically emulating `cabal get` which does not seem to
# be working for custom repositories
2 changes: 2 additions & 0 deletions hie.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
cradle:
cabal: