Skip to content

Commit

Permalink
use flakehub urls for readme
Browse files Browse the repository at this point in the history
  • Loading branch information
tek committed Sep 6, 2023
1 parent 0495eaa commit 856ce95
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions lib/release.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
nix run .#test
fi
sed -i 's/ref=[^"#]\+/ref='"$version/" readme.md examples/*/flake.nix
sed -Ei 's/~[[:digit:]]+\.[[:digit:]]+\.tar/~'"''${version%.*}.tar/" readme.md
sed -i 's/hixVersion = ".*"/hixVersion = "'"$version"'"/' modules/basic.nix
sed -i "s/Unreleased/$version/" changelog.md
${pkgs.git}/bin/git --no-pager diff
Expand Down
10 changes: 6 additions & 4 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,25 @@ To learn more, please visit the [documentation page](https://tryp.io/hix/index.h

# tldr

You can convert an existing project with Cabal files by executing this command in the project root:
You can convert an existing project with Cabal files by executing this command in the project root, using
[FlakeHub](https://flakehub.com/docs) or GitHub:

```
nix run 'https://flakehub.com/f/tek/hix/~0.6.tar.gz#bootstrap'
nix run 'github:tek/hix?ref=0.6.4#bootstrap'
```

You can create a new project in the current directory:

```
nix run 'github:tek/hix?ref=0.6.4#new' -- --name 'project-name' --author 'Your Name'
nix run 'https://flakehub.com/f/tek/hix/~0.6.tar.gz#new' -- --name 'project-name' --author 'Your Name'
```

The manual process consists of first adding Hix to your Haskell project flake by specifying the input:

```nix
{
inputs.hix.url = "github:tek/hix?ref=0.6.4";
inputs.hix.url = "https://flakehub.com/f/tek/hix/~0.6.tar.gz";
}
```

Expand All @@ -41,7 +43,7 @@ Then configure your project with NixOS module options:
```nix
{
description = "Example";
inputs.hix.url = "github:tek/hix?ref=0.6.4";
inputs.hix.url = "https://flakehub.com/f/tek/hix/~0.6.tar.gz";
outputs = {hix, ...}: hix {
packages.parser = {
src = ./.;
Expand Down

0 comments on commit 856ce95

Please sign in to comment.