Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use poetry2nix from top-level when importing ./tools #1380

Merged
merged 2 commits into from
Oct 28, 2023
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
20 changes: 20 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
9 changes: 2 additions & 7 deletions tools/default.nix
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
{ pkgs ? import <nixpkgs> {
overlays = [
(import ../overlay.nix)
];
}
}:
{ pkgs, poetry2nix }:
let
inherit (pkgs) lib;

Expand Down Expand Up @@ -36,7 +31,7 @@ in
flamegraph.pl $workdir/traceFile.folded > poetry2nix-flamegraph.svg
'';

env = pkgs.poetry2nix.mkPoetryEnv {
env = poetry2nix.mkPoetryEnv {
projectDir = ./.;
};

Expand Down