Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 3 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,13 @@ jobs:
nix:
name: nix build
runs-on: ubuntu-latest
container:
image: 'nixos/nix:2.3.6'
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v31

- name: Build
run: |
nix-build
nix build

cabal:
name: ${{ matrix.os }} / ghc ${{ matrix.ghc }}
Expand All @@ -45,7 +44,6 @@ jobs:

steps:
- uses: actions/checkout@v3
# if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/master'

- uses: haskell-actions/setup@v2
id: setup-haskell-cabal
Expand All @@ -54,19 +52,12 @@ jobs:
ghc-version: ${{ matrix.ghc }}
cabal-version: ${{ matrix.cabal }}

# This can be dropped once
# https://github.com/clash-lang/clash-compiler/pull/2790 is merged.
- name: Apply GHC-9.10 cabal project configuration
if: matrix.ghc == "9.10.1"
run: |
mv cabal.ghc-9.10.project cabal.project

- name: Freeze
run: |
cabal update
cabal freeze

- uses: actions/cache@v1
- uses: actions/cache@v4
name: Cache ~/.cabal/store
with:
path: ${{ steps.setup-haskell-cabal.outputs.cabal-store }}
Expand Down
15 changes: 0 additions & 15 deletions cabal.ghc-9.10.project

This file was deleted.

16 changes: 0 additions & 16 deletions default.nix

This file was deleted.

197 changes: 197 additions & 0 deletions flake.lock

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

52 changes: 52 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
description = "A flake for developing & using circuit-notation";
inputs = {
clash-compiler.url = "github:clash-lang/clash-compiler";
};
outputs = { self, flake-utils, clash-compiler, ... }:
flake-utils.lib.eachDefaultSystem (system:
let
# What version of the GHC compiler to use
compiler-version = "ghc910";

pkgs = (import clash-compiler.inputs.nixpkgs {
inherit system;
}).extend clash-compiler.overlays.${compiler-version};
clash-pkgs = pkgs."clashPackages-${compiler-version}";

overlay = final: prev: {
circuit-notation = prev.developPackage {
root = ./.;
overrides = _: _: final;
};
};

hs-pkgs = clash-pkgs.extend overlay;
in
{
# Expose the overlay which adds circuit-notation
# The base of the overlay is clash-pkgs
overlay = overlay;

devShells.default = hs-pkgs.shellFor {
packages = p: [
p.circuit-notation
];

nativeBuildInputs =
[
# Haskell stuff
hs-pkgs.cabal-install
hs-pkgs.cabal-plan
hs-pkgs.haskell-language-server
hs-pkgs.fourmolu
]
;
};
packages = {
circuit-notation = hs-pkgs.circuit-notation;

default = hs-pkgs.circuit-notation;
};
});
}
9 changes: 0 additions & 9 deletions nix/ghcid.nix

This file was deleted.

5 changes: 0 additions & 5 deletions nix/nixpkgs.json

This file was deleted.

8 changes: 0 additions & 8 deletions nix/nixpkgs.nix

This file was deleted.

43 changes: 0 additions & 43 deletions nix/update-nixpkgs.sh

This file was deleted.

Loading
Loading