Skip to content

Commit

Permalink
move to new flake system
Browse files Browse the repository at this point in the history
  • Loading branch information
mstksg committed Sep 8, 2024
1 parent 3ba4586 commit a81b2e0
Show file tree
Hide file tree
Showing 11 changed files with 938 additions and 168 deletions.
2 changes: 2 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
watch_file *.cabal
use flake
78 changes: 78 additions & 0 deletions .github/workflows/flake-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: "Flake CI"
on:
pull_request:
push:
jobs:
checks:
runs-on: ubuntu-latest
steps:
- name: Free Disk Space
uses: insightsengineering/[email protected]
- uses: actions/checkout@v3
- uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- uses: cachix/install-nix-action@v22
with:
nix_path: nixpkgs=channel:nixos-unstable
github_access_token: ${{ secrets.GITHUB_TOKEN }}
extra_nix_config: |
trusted-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= loony-tools:pr9m4BkM/5/eSTZlkQyRt57Jz7OMBxNSUiMC4FkcNfk=
allow-import-from-derivation = true
auto-optimise-store = true
substituters = https://hydra.iohk.io https://cache.nixos.org/ https://cache.iog.io https://cache.zw3rk.com https://mstksg.cachix.org
- uses: cachix/cachix-action@v13
with:
name: mstksg
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- run: nix flake check --show-trace

cache:
runs-on: ubuntu-latest
steps:
- name: Free Disk Space
uses: insightsengineering/[email protected]
- uses: actions/[email protected]
- uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- uses: cachix/install-nix-action@v22
with:
nix_path: nixpkgs=channel:nixos-unstable
github_access_token: ${{ secrets.GITHUB_TOKEN }}
extra_nix_config: |
trusted-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= loony-tools:pr9m4BkM/5/eSTZlkQyRt57Jz7OMBxNSUiMC4FkcNfk=
allow-import-from-derivation = true
auto-optimise-store = true
substituters = https://hydra.iohk.io https://cache.nixos.org/ https://cache.iog.io https://cache.zw3rk.com https://mstksg.cachix.org
- uses: cachix/cachix-action@v13
with:
name: mstksg
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- run: nix build --show-trace
- run: nix develop --show-trace

every-compiler:
runs-on: ubuntu-latest
steps:
- name: Free Disk Space
uses: insightsengineering/[email protected]
- uses: actions/checkout@v3
- uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- uses: cachix/install-nix-action@v22
with:
nix_path: nixpkgs=channel:nixos-unstable
github_access_token: ${{ secrets.GITHUB_TOKEN }}
extra_nix_config: |
trusted-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= loony-tools:pr9m4BkM/5/eSTZlkQyRt57Jz7OMBxNSUiMC4FkcNfk=
allow-import-from-derivation = true
auto-optimise-store = true
substituters = https://hydra.iohk.io https://cache.nixos.org/ https://cache.iog.io https://cache.zw3rk.com https://mstksg.cachix.org
- uses: cachix/cachix-action@v13
with:
name: mstksg
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- run: nix build .#everyCompiler

4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/.stack-work
/src/highlight.js
/src/style.css

/hamilton.cabal
/dist-newstyle
/.direnv
4 changes: 3 additions & 1 deletion app/Examples.hs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ import Data.List
import Data.Semigroup ((<>))
import GHC.TypeLits
import Graphics.Vty hiding (Config, (<|>))
import Graphics.Vty.Config
import Graphics.Vty.CrossPlatform (mkVty)
import Numeric.Hamilton
import Numeric.LinearAlgebra.Static hiding (dim, (<>))
import Numeric.LinearAlgebra.Static.Vector
Expand Down Expand Up @@ -315,7 +317,7 @@ main = do
<> progDescDoc (Just descr)
)

vty <- mkVty =<< standardIOConfig
vty <- mkVty defaultConfig

opts <- newIORef $ SO 0.5 1 25

Expand Down
Loading

0 comments on commit a81b2e0

Please sign in to comment.