diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2bfe8b4..5e5be2f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,27 +7,13 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2.4.0 - - uses: cachix/install-nix-action@v20 - with: - nix_path: nixpkgs=channel:nixos-unstable - - run: | - mkdir -p $HOME/.config/nix/ - echo "substituters = https://cache.nixos.org https://hydra.iohk.io" >> $HOME/.config/nix/nix.conf - echo "trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=" >> $HOME/.config/nix/nix.conf - - uses: cachix/cachix-action@v12 - with: - name: simmsb-calamity - authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' - - name: Cache Nix dependencies - run: | - nix develop -j 4 -c echo + - name: Install Nix + uses: DeterminateSystems/nix-installer-action@v4 + - name: Run the Magic Nix Cache + uses: DeterminateSystems/magic-nix-cache-action@v2 - name: Build 🔨 - id: build run: | - nix build -j auto -L + nix build .#calamity -L - name: Flake checks 🧪 run: | - # Because 'nix flake check' is not system-aware - # See https://srid.ca/haskell-template/checks - nix run nixpkgs#sd 'systems = nixpkgs.lib.systems.flakeExposed' 'systems = [ "x86_64-linux" ]' flake.nix - nix flake check -L + nix --option sandbox false build .#check -L diff --git a/bot/bot.cabal b/bot/bot.cabal index 053d86f..f1d362f 100644 --- a/bot/bot.cabal +++ b/bot/bot.cabal @@ -1,17 +1,17 @@ -cabal-version: 2.0 -name: bot -version: 0.0.0 -license: MIT -copyright: 2019 Ben Simms -maintainer: ben@bensimms.moe -author: Ben Simms -tested-with: GHC ==8.10.7 -homepage: https://github.com/nitros12/calamity-bot -bug-reports: https://github.com/nitros12/calamity-bot/issues -synopsis: A discord bot -description: A discord bot -category: Bots -build-type: Simple +cabal-version: 2.0 +name: bot +version: 0.0.0 +license: MIT +copyright: 2019 Ben Simms +maintainer: ben@bensimms.moe +author: Ben Simms +tested-with: GHC ==8.10.7 +homepage: https://github.com/nitros12/calamity-bot +bug-reports: https://github.com/nitros12/calamity-bot/issues +synopsis: A discord bot +description: A discord bot +category: Bots +build-type: Simple source-repository head type: git diff --git a/calamity/calamity.cabal b/calamity/calamity.cabal index efdb1bc..3321126 100644 --- a/calamity/calamity.cabal +++ b/calamity/calamity.cabal @@ -195,9 +195,9 @@ library , calamity-commands >=0.4 && <0.5 , colour >=2.3.5 && <2.4 , concurrent-extra >=0.7 && <0.8 + , containers >=0.6 && <0.7 , crypton-connection >=0.2.6 && <0.4 , crypton-x509-system >=1.6.6 && <1.7 - , containers >=0.6 && <0.7 , data-default-class >=0.1 && <0.2 , data-flags >=0.0.3 && <0.1 , deepseq >=1.4.4.0 && <2 diff --git a/flake.lock b/flake.lock index f313ab1..255225e 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,20 @@ { "nodes": { + "check-flake": { + "locked": { + "lastModified": 1683070462, + "narHash": "sha256-FrfgxQaMGIMGGgT1K0jbGEiXqZoIyyUR8jzuJ03Cf00=", + "owner": "srid", + "repo": "check-flake", + "rev": "24ba082179435ce37085c06ffcfcac6d4c570674", + "type": "github" + }, + "original": { + "owner": "srid", + "repo": "check-flake", + "type": "github" + } + }, "flake-parts": { "inputs": { "nixpkgs-lib": "nixpkgs-lib" @@ -120,6 +135,7 @@ }, "root": { "inputs": { + "check-flake": "check-flake", "flake-parts": "flake-parts", "flake-root": "flake-root", "gitignore": "gitignore", diff --git a/flake.nix b/flake.nix index cbdff77..b21faa0 100644 --- a/flake.nix +++ b/flake.nix @@ -10,6 +10,7 @@ flake-parts.url = "github:hercules-ci/flake-parts"; haskell-flake.url = "github:srid/haskell-flake"; + check-flake.url = "github:srid/check-flake"; treefmt-nix.url = "github:numtide/treefmt-nix"; treefmt-nix.inputs.nixpkgs.follows = "nixpkgs"; @@ -28,10 +29,11 @@ inputs.haskell-flake.flakeModule inputs.treefmt-nix.flakeModule inputs.flake-root.flakeModule + inputs.check-flake.flakeModule ]; perSystem = { self', lib, config, pkgs, ... }: { haskellProjects.default = { - basePackages = pkgs.haskell.packages.ghc944; + basePackages = pkgs.haskell.packages.ghc944; packages = { crypton-connection.source = "0.3.1";