Skip to content

Commit 7fe3abb

Browse files
authored
Merge pull request #94 from input-output-hk/nm/flake
Switch from nickel to haskell.nix
2 parents 7855022 + 7a83987 commit 7fe3abb

File tree

10 files changed

+861
-108
lines changed

10 files changed

+861
-108
lines changed

.envrc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1-
watch_file project.ncl
2-
use flake
1+
# shellcheck shell=bash
2+
if has nix; then
3+
use flake
4+
fi

.github/workflows/nix-build.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Nix Build
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: ["master"]
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
17+
- name: Install nix
18+
uses: cachix/install-nix-action@v31
19+
with:
20+
nix_path: nixpkgs=channel:nixos-unstable
21+
22+
- name: Build
23+
id: build
24+
run: |
25+
nix build --accept-flake-config .#static
26+
echo "name=$(nix derivation show ./result | jq -r .[].env.name)" >>"$GITHUB_OUTPUT"
27+
echo "artifacts=$(find -L result -type f)" >>"$GITHUB_OUTPUT"
28+
29+
- name: Record system details
30+
id: system-details
31+
run: |
32+
echo "system=$(uname -s)" >>"$GITHUB_OUTPUT"
33+
echo "machine=$(uname -m)" >>"$GITHUB_OUTPUT"
34+
35+
- name: Upload artifacts
36+
uses: actions/upload-artifact@v4
37+
with:
38+
name: ${{ steps.build.outputs.name }}-${{ steps.system-details.outputs.system }}-${{ steps.system-details.outputs.machine }}
39+
path: ${{ steps.build.outputs.artifacts }}

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,7 @@
22

33
.devenv
44
dist-newstyle
5-
.vscode
5+
.vscode
6+
7+
/.pre-commit-config.yaml
8+
/result

cuddle.cabal

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ copyright: 2025 Input Output Global Inc (IOG)
2121
category: Codec
2222
build-type: Simple
2323
extra-doc-files: CHANGELOG.md
24-
tested-with: ghc =={9.6, 9.8, 9.10, 9.12}
24+
tested-with: ghc ==9.6 || ==9.8 || ==9.10 || ==9.12
2525

2626
source-repository head
2727
type: git
@@ -38,8 +38,7 @@ flag example
3838
default: False
3939

4040
common warnings
41-
ghc-options:
42-
-Wall
41+
ghc-options: -Wall
4342

4443
library
4544
import: warnings

0 commit comments

Comments
 (0)