Skip to content

Commit

Permalink
chore(nix): build and develop with nix (#173)
Browse files Browse the repository at this point in the history
* chore(nix): update packages

* fix(linux): install script

* fix(linux): install script
  • Loading branch information
cristianoliveira authored Jul 9, 2024
1 parent b3ea082 commit c5641ff
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 4 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/on-push-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,11 @@ jobs:

- name: Run integration tests
run: make test-integration

- name: Check intall linux
shell: bash
run: curl -s https://raw.githubusercontent.com/cristianoliveira/ergo/master/install.sh | bash

- name: Check if executable is avaible
shell: bash
run: ergo -h # Check if ergo is available
5 changes: 3 additions & 2 deletions .watch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@

- name: build nix
run:
- nix flake check
- nix build .#nightly --verbose
- make nix-check
# if fails open nix.log which contains the new hash
- make nix-build 2> nix.log || nvim nix.log
run_on_init: true
change:
- '**/*.go'
Expand Down
10 changes: 9 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -92,5 +92,13 @@ setup-golant:
deps:
@go list -f '{{join .Imports "\n"}}{{"\n"}}{{join .TestImports "\n"}}' ./... | sort | uniq | grep -v ergo | go get

nixbuild:
.PHONY: nix-shell nix-build nix-check nix-hash-reset
nix-check:
@nix flake check

nix-build:
@nix build .#nightly
@nix build .#

nix-hash-reset:
@sed -i '' 's/sha256-.*=//g' nix/package.nix
2 changes: 1 addition & 1 deletion nix/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
owner = "cristianoliveira";
repo = "ergo";
rev = _version;
sha256 = "sha256-C3lJWuRyGuvo33kvj3ktWKYuUZ2yJ8pDBNX7YZn6wNM=";
sha256 = "sha256-/VhHuJsQrxewmfP/V25r5rZady0snfYNOGyIrv3vpGA=";
};

modSha256 = "0fagi529m1gf5jrqdlg9vxxq4yz9k9q8h92ch0gahp43kxfbgr4q";
Expand Down

0 comments on commit c5641ff

Please sign in to comment.