Skip to content

Commit

Permalink
Nix package for pdh as lib (#138)
Browse files Browse the repository at this point in the history
  • Loading branch information
mbovo authored Apr 4, 2024
1 parent ddf2e51 commit f74fea9
Show file tree
Hide file tree
Showing 5 changed files with 62 additions and 8 deletions.
3 changes: 2 additions & 1 deletion devbox.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"poetry@latest",
"docker@latest",
"pre-commit@latest",
"cachix@latest"
"cachix@latest",
"statix@latest"
],
"shell": {
"init_hook": [
Expand Down
48 changes: 48 additions & 0 deletions devbox.lock
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,54 @@
"store_path": "/nix/store/7wz6hm9i8wljz0hgwz1wqmn2zlbgavrq-python3-3.11.8"
}
}
},
"statix@latest": {
"last_modified": "2024-03-22T11:26:23Z",
"resolved": "github:NixOS/nixpkgs/a3ed7406349a9335cb4c2a71369b697cecd9d351#statix",
"source": "devbox-search",
"version": "0.5.8",
"systems": {
"aarch64-darwin": {
"outputs": [
{
"name": "out",
"path": "/nix/store/br1n599z5q1ddm4inm7wg64a9r7iwjw8-statix-0.5.8",
"default": true
}
],
"store_path": "/nix/store/br1n599z5q1ddm4inm7wg64a9r7iwjw8-statix-0.5.8"
},
"aarch64-linux": {
"outputs": [
{
"name": "out",
"path": "/nix/store/gf5vjmqx3cf0n59zfn58sw36fnkyx8lk-statix-0.5.8",
"default": true
}
],
"store_path": "/nix/store/gf5vjmqx3cf0n59zfn58sw36fnkyx8lk-statix-0.5.8"
},
"x86_64-darwin": {
"outputs": [
{
"name": "out",
"path": "/nix/store/bd7dg22ghyha7cwr5c6mvcjh0caz9wmb-statix-0.5.8",
"default": true
}
],
"store_path": "/nix/store/bd7dg22ghyha7cwr5c6mvcjh0caz9wmb-statix-0.5.8"
},
"x86_64-linux": {
"outputs": [
{
"name": "out",
"path": "/nix/store/5wr52fn72ri8v1sz9v23q96frhmc6gk8-statix-0.5.8",
"default": true
}
],
"store_path": "/nix/store/5wr52fn72ri8v1sz9v23q96frhmc6gk8-statix-0.5.8"
}
}
}
}
}
12 changes: 9 additions & 3 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
(system:
let
pkgs = import nixpkgs { inherit system; };
inherit (poetry2nix.lib.mkPoetry2Nix { inherit pkgs; }) mkPoetryApplication defaultPoetryOverrides;
inherit (poetry2nix.lib.mkPoetry2Nix { inherit pkgs; }) mkPoetryApplication defaultPoetryOverrides mkPoetryPackages;
override = defaultPoetryOverrides.extend
(self: super: {
pdpyras = super.pdpyras.overridePythonAttrs
Expand All @@ -31,13 +31,19 @@
}
);
});
poetryPkgs = mkPoetryPackages {
projectDir = ./.;
overrides = override;
preferWheels = true;
};
in
{
packages = {
pdh = mkPoetryApplication {
pdh = mkPoetryApplication {
projectDir = ./.;
overrides = override;
# preferWheels = true;
preferWheels = true;
propagatedBuildInputs = [ poetryPkgs.poetryPackages ];
};
default = self.packages.${system}.pdh;
};
Expand Down
3 changes: 1 addition & 2 deletions poetry.lock

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

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ ignore = [

[tool.poetry]
name = "pdh"
version = "0.3.19"
version = "0.3.20"
description = "Pagerduty CLI for Humans"
authors = ["Manuel Bovo <manuel.bovo@gmail.com>"]
license = "GPL-3.0-or-later"
Expand All @@ -42,7 +42,7 @@ deprecation = "^2.1.0"
setuptools = "^69.0.0"


[tool.poetry.dev-dependencies]
[tool.poetry.group.dev.dependencies]
black = "^23.12.1"
pytest = "^7.4.4"
pytest-cov = "^4.1.0"
Expand Down

0 comments on commit f74fea9

Please sign in to comment.