diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ba9c93e99..cb634280d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -47,6 +47,26 @@ jobs: signingKey: "VhaWuN3IyJVpWg+aZvTocVB+W8ziZKKRGLKR53Pkld3YRZxYOUfXZf0fvqF+LkqVW0eA60trVd5vsqNONpX9Hw==" - run: nix build -L ".#${{ matrix.attr }}" --keep-going + nix-build-shell: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - macos-latest + steps: + - uses: actions/checkout@v4 + - uses: cachix/install-nix-action@v23 + - uses: cachix/cachix-action@v12 + with: + name: poetry2nix + signingKey: "VhaWuN3IyJVpWg+aZvTocVB+W8ziZKKRGLKR53Pkld3YRZxYOUfXZf0fvqF+LkqVW0eA60trVd5vsqNONpX9Hw==" + - name: compute system from nixpkgs + run: | + echo "NIXPKGS_SYSTEM=$(nix eval --raw 'nixpkgs#system')" >> "$GITHUB_ENV" + - run: nix build -L ".#devShells.${NIXPKGS_SYSTEM}.default" --keep-going + test-template: runs-on: ${{ matrix.os }} strategy: diff --git a/flake.nix b/flake.nix index 94d580346..ce7e368d0 100644 --- a/flake.nix +++ b/flake.nix @@ -76,7 +76,7 @@ }; poetry2nix = import ./default.nix { inherit pkgs; }; - p2nix-tools = pkgs.callPackage ./tools { }; + p2nix-tools = pkgs.callPackage ./tools { inherit poetry2nix; }; in rec { formatter = treefmtEval.${system}.config.build.wrapper; diff --git a/tools/default.nix b/tools/default.nix index 8e675b819..2759874d3 100644 --- a/tools/default.nix +++ b/tools/default.nix @@ -1,9 +1,4 @@ -{ pkgs ? import { - overlays = [ - (import ../overlay.nix) - ]; - } -}: +{ pkgs, poetry2nix }: let inherit (pkgs) lib; @@ -36,7 +31,7 @@ in flamegraph.pl $workdir/traceFile.folded > poetry2nix-flamegraph.svg ''; - env = pkgs.poetry2nix.mkPoetryEnv { + env = poetry2nix.mkPoetryEnv { projectDir = ./.; };