diff --git a/.github/workflows/Cabal-Linux-Remote.yml b/.github/workflows/Cabal-Linux-Remote.yml index 88f9ef0..74bd2a9 100644 --- a/.github/workflows/Cabal-Linux-Remote.yml +++ b/.github/workflows/Cabal-Linux-Remote.yml @@ -26,13 +26,13 @@ jobs: steps: - name: "Git checkout" - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: submodules: recursive - name: "Haskell env setup" id: HaskEnvSetup - uses: haskell/actions/setup@v1 + uses: haskell/actions/setup@v2 with: ghc-version: ${{ matrix.ghc }} @@ -44,7 +44,7 @@ jobs: # Still required for Remote - name: "Install Nix" - uses: cachix/install-nix-action@v16 + uses: cachix/install-nix-action@v17 if: matrix.packageRoot == 'hnix-store-remote' # Remote: Enabling testsuite, because it requires networking in the default Nix environment. @@ -60,13 +60,14 @@ jobs: run: cp -a cabal.project.freeze ../cabal.project.freeze - name: "Configuring GitHub cache" - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: | ${{ steps.HaskEnvSetup.outputs.cabal-store }} dist-newstyle key: ${{ matrix.packageRoot }}-${{ runner.os }}-Cabal-${{ matrix.ghc }}-${{ hashFiles( 'cabal.project.freeze' ) }} - restore-keys: ${{ matrix.packageRoot }}-${{ runner.os }}-Cabal-${{ matrix.ghc }}- + # 2022-04-22: `v2-` added to invalidate corrupted caches, can be removed after one week + restore-keys: ${{ matrix.packageRoot }}-${{ runner.os }}-Cabal-${{ matrix.ghc }}-v2 - name: "Build" run: cabal v2-build $cabalConfig diff --git a/.github/workflows/Core-Cabal-Linux.yml b/.github/workflows/Core-Cabal-Linux.yml index ba683f8..a7c0fd5 100644 --- a/.github/workflows/Core-Cabal-Linux.yml +++ b/.github/workflows/Core-Cabal-Linux.yml @@ -28,13 +28,13 @@ jobs: steps: - name: "Git checkout" - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: submodules: recursive - name: "Haskell env setup" id: HaskEnvSetup - uses: haskell/actions/setup@v1 + uses: haskell/actions/setup@v2 with: ghc-version: ${{ matrix.ghc }} @@ -52,13 +52,14 @@ jobs: run: cp -a cabal.project.freeze ../cabal.project.freeze - name: "Configuring GitHub cache" - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: | ${{ steps.HaskEnvSetup.outputs.cabal-store }} dist-newstyle key: ${{ matrix.packageRoot }}-${{ runner.os }}-Cabal-${{ matrix.ghc }}-${{ hashFiles( 'cabal.project.freeze' ) }} - restore-keys: ${{ matrix.packageRoot }}-${{ runner.os }}-Cabal-${{ matrix.ghc }}- + # 2022-04-22: `v2-` added to invalidate corrupted caches, can be removed after one week + restore-keys: ${{ matrix.packageRoot }}-${{ runner.os }}-Cabal-${{ matrix.ghc }}-v2- - name: "Build" run: cabal v2-build $cabalConfig diff --git a/.github/workflows/Core-Cabal-macOS.yml b/.github/workflows/Core-Cabal-macOS.yml index 1116751..e6cde8e 100644 --- a/.github/workflows/Core-Cabal-macOS.yml +++ b/.github/workflows/Core-Cabal-macOS.yml @@ -25,13 +25,13 @@ jobs: steps: - name: "Git checkout" - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: submodules: recursive - name: "Haskell env setup" id: HaskEnvSetup - uses: haskell/actions/setup@v1 + uses: haskell/actions/setup@v2 with: ghc-version: '9.0' @@ -49,7 +49,7 @@ jobs: run: cp -a cabal.project.freeze ../cabal.project.freeze - name: "Configuring GitHub cache" - uses: actions/cache@v2 + uses: actions/cache@v3.0.1 with: path: | ${{ steps.HaskEnvSetup.outputs.cabal-store }} diff --git a/.github/workflows/On-Release-Cabal-Linux.yml b/.github/workflows/On-Release-Cabal-Linux.yml index 800a934..dc3d388 100644 --- a/.github/workflows/On-Release-Cabal-Linux.yml +++ b/.github/workflows/On-Release-Cabal-Linux.yml @@ -25,13 +25,13 @@ jobs: steps: - name: "Git checkout" - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: submodules: recursive - name: "Haskell env setup" id: HaskEnvSetup - uses: haskell/actions/setup@v1 + uses: haskell/actions/setup@v2 with: ghc-version: ${{ matrix.ghc }} @@ -43,7 +43,7 @@ jobs: # Still required for Remote - name: "Install Nix" - uses: cachix/install-nix-action@v16 + uses: cachix/install-nix-action@v17 if: matrix.packageRoot == 'hnix-store-remote' # Remote: Enabling testsuite, because it requires networking in the default Nix environment. @@ -59,12 +59,13 @@ jobs: run: cp -a cabal.project.freeze ../cabal.project.freeze - name: "Configuring GitHub cache" - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: | ${{ steps.HaskEnvSetup.outputs.cabal-store }} dist-newstyle key: ${{ matrix.packageRoot }}-${{ runner.os }}-Cabal-${{ matrix.ghc }}-${{ hashFiles( 'cabal.project.freeze' ) }} + # 2022-04-22: `v2-` added to invalidate corrupted caches, can be removed after one week restore-keys: ${{ matrix.packageRoot }}-${{ runner.os }}-Cabal-${{ matrix.ghc }}- - name: "Build" diff --git a/.github/workflows/Optional-Nix-dev-env-main.yml b/.github/workflows/Optional-Nix-dev-env-main.yml index 8bc8beb..29bc7e4 100644 --- a/.github/workflows/Optional-Nix-dev-env-main.yml +++ b/.github/workflows/Optional-Nix-dev-env-main.yml @@ -28,11 +28,11 @@ jobs: working-directory: "./${{ matrix.packageRoot }}" steps: - name: "Git checkout" - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: submodules: recursive - name: "Install Nix" - uses: cachix/install-nix-action@v16 + uses: cachix/install-nix-action@v17 with: nix_path: nixpkgs=channel:nixos-unstable - name: "Install Cachix" @@ -42,9 +42,3 @@ jobs: signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}' - name: "Determined Nix-build" run: nix-build ../ -A "haskellPackages.${{ matrix.packageRoot }}" - env: - # 2020-12-22: NOTE: allowBroken ideally should be temporary. - NIXPKGS_ALLOW_BROKEN: "1" - - - diff --git a/default.nix b/default.nix index da64968..d80828a 100644 --- a/default.nix +++ b/default.nix @@ -1,4 +1,14 @@ -{ pkgs ? import {} }: let +{ rev ? "c542baa0c894796c92a8173dead027f3b952c22e" +, pkgs ? + if ((rev == "") || (rev == "default") || (rev == "local")) + then import {} + # Do not guard with hash, so the project is able to use current channels (rolling `rev`) of Nixpkgs + else import (builtins.fetchTarball "https://github.com/NixOS/nixpkgs/archive/${rev}.tar.gz") {} + // { + # Try to build dependencies even if they are marked broken. + config.allowBroken = true; + } +}: let overlay = import ./overlay.nix pkgs pkgs.haskell.lib; overrideHaskellPackages = orig: { buildHaskellPackages = diff --git a/overlay.nix b/overlay.nix index 819a40d..0687a6e 100644 --- a/overlay.nix +++ b/overlay.nix @@ -1,6 +1,6 @@ pkgs: hlib: helf: huper: { hnix-store-remote = - ( helf.callCabal2nixWithOptions "hnix-store-remote" ./hnix-store-remote "-fio-testsuite" { relude = helf.relude_1_0_0_1; } + ( helf.callCabal2nixWithOptions "hnix-store-remote" ./hnix-store-remote "-fio-testsuite" { } ).overrideAttrs (attrs: { buildInputs = attrs.buildInputs ++ [ pkgs.nix