Skip to content

Commit

Permalink
add Nix CI workflow; update Nix flake
Browse files Browse the repository at this point in the history
  • Loading branch information
raehik committed Jun 23, 2023
1 parent 405ba05 commit 0fd7936
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 23 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/nix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: nix

on:
# run on every push to every branch (visibility doesn't matter)
push:
# don't want pull_request config, since it would run twice

jobs:
nix-flake-build:
runs-on: ubuntu-latest
name: build (flake)
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v20
with:
nix_path: nixpkgs=channel:nixos-unstable
- uses: cachix/cachix-action@v12
with:
name: camfort
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- run: nix build
24 changes: 12 additions & 12 deletions flake.lock

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

13 changes: 2 additions & 11 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,9 @@
flake-parts.lib.mkFlake { inherit inputs; } {
systems = nixpkgs.lib.systems.flakeExposed;
imports = [ inputs.haskell-flake.flakeModule ];
perSystem = { self', pkgs, ... }: {
haskellProjects.default = {
# packages.example.root = ./.; # This value is detected based on .cabal files
# overrides = self: super: { };
# devShell = {
# enable = true; # Enabled by default
# tools = hp: { fourmolu = hp.fourmolu; ghcid = null; };
# hlsCheck.enable = true;
# };
};
# haskell-flake doesn't set the default package, but you can do it here.
perSystem = { self', pkgs, config, ... }: {
packages.default = self'.packages.fortran-src;
haskellProjects.default = {};
};
};
}

0 comments on commit 0fd7936

Please sign in to comment.