Skip to content

Commit

Permalink
Revert "Move hydra-spec to input repository (#1512)"
Browse files Browse the repository at this point in the history
This reverts commit b391020.
  • Loading branch information
locallycompact committed Jul 31, 2024
1 parent b391020 commit 0330b4f
Show file tree
Hide file tree
Showing 36 changed files with 5,804 additions and 95 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci-nix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -276,14 +276,14 @@ jobs:

- name: ❄ Build specification PDF
run: |
nix build .#spec && cp result/*.pdf .
nix build .#spec && cp result/*.pdf spec/
- name: 💾 Upload specification
uses: actions/upload-artifact@v4
with:
name: hydra-spec
path: |
*.pdf
./spec/*.pdf
documentation:
name: Documentation
Expand Down
100 changes: 9 additions & 91 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
cardano-node.url = "github:intersectmbo/cardano-node/9.1.0";
mithril.url = "github:input-output-hk/mithril/2428.0";
nix-npm-buildpackage.url = "github:serokell/nix-npm-buildpackage";
hydra-spec.url = "github:cardano-scaling/hydra-formal-specification";
};

outputs =
Expand Down Expand Up @@ -131,7 +130,9 @@
packages =
hydraPackages //
(if pkgs.stdenv.isLinux then (prefixAttrs "docker-" hydraImages) else { }) // {
spec = inputs.hydra-spec.packages.${system}.default;
spec = import ./spec {
inherit pkgs;
};
};
process-compose."demo" = import ./nix/hydra/demo.nix {
inherit system pkgs inputs self;
Expand Down
1 change: 1 addition & 0 deletions spec/.envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use flake .#spec
3 changes: 3 additions & 0 deletions spec/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/main.*
!/main.tex
/.auctex-auto/
27 changes: 27 additions & 0 deletions spec/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Hydra Specification

The Hydra Head protocol is specified in the single document built from this
directory.

We use LaTeX to write the specification and used to compose this on
[overleaf](www.overleaf.com). Going forward, any changes to the specification
should follow the common pull request rules as set out in our [contribution
guidelines](../CONTRIBUTING.md).

The [Overleaf documentation](https://www.overleaf.com/learn) does provide a good
introduction to LaTeX syntax and functions to get started.

## Building

You can use `nix` to build a PDF from the LaTeX files using

``` shell
nix build .#spec
```

which will write the PDF into `result/hydra-spec.pdf`.

Alternatively, you would need to have a LaTeX distribution installed (e.g.
`texlive`) and produce a PDF output using `pdflatex` etc. The [LaTeX
wikibook](https://en.wikibooks.org/wiki/LaTeX/Basics#Building_a_document) might
be helpful to set things up.
Loading

0 comments on commit 0330b4f

Please sign in to comment.