This commit is contained in:
Jeffrey C. Ollie 2023-08-29 21:25:39 -05:00
parent df62d68e15
commit 3278fd431f
Signed by: jeff
GPG key ID: 6F86035A6D97044E
3 changed files with 38 additions and 49 deletions

View file

@ -89,26 +89,40 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1693231525,
"narHash": "sha256-Zmh8m0HHcgGBDth6jdJPmc4UAAP0L4jQmqIztywF1Iw=",
"lastModified": 1693250523,
"narHash": "sha256-y3up5gXMTbnCsXrNEB5j+7TVantDLUYyQLu/ueiXuyg=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "c540061ac8d72d6e6d99345bd2d590c82b2f58c1",
"rev": "3efb0f6f404ec8dae31bdb1a9b17705ce0d6986e",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-23.05",
"ref": "nixos-unstable",
"type": "indirect"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1693250523,
"narHash": "sha256-y3up5gXMTbnCsXrNEB5j+7TVantDLUYyQLu/ueiXuyg=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "3efb0f6f404ec8dae31bdb1a9b17705ce0d6986e",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"poetry2nix": {
"inputs": {
"flake-utils": "flake-utils_2",
"nix-github-actions": "nix-github-actions",
"nixpkgs": [
"nixpkgs"
]
"nixpkgs": "nixpkgs_2"
},
"locked": {
"lastModified": 1693051011,
@ -119,9 +133,8 @@
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "poetry2nix",
"type": "github"
"id": "poetry2nix",
"type": "indirect"
}
},
"root": {

View file

@ -3,12 +3,12 @@
inputs = {
nixpkgs = {
url = "nixpkgs/nixos-23.05";
};
poetry2nix = {
url = "github:nix-community/poetry2nix";
inputs.nixpkgs.follows = "nixpkgs";
url = "nixpkgs/nixos-unstable";
};
# poetry2nix = {
# url = "github:nix-community/poetry2nix";
# inputs.nixpkgs.follows = "nixpkgs";
# };
flake-utils = {
url = "github:numtide/flake-utils";
};
@ -23,10 +23,13 @@
flake-utils.lib.eachDefaultSystem
(system:
let
inherit (poetry2nix.legacyPackages.${system}) mkPoetryApplication overrides;
# inherit (poetry2nix.legacyPackages.${system}) mkPoetryApplication overrides;
pkgs = import nixpkgs {
inherit system;
};
python = pkgs.python311.withPackages (ps: with ps; [
poetry-core
]);
in
{
devShells.default =
@ -35,9 +38,6 @@
inherit system;
pkgs = pkgs;
};
python = pkgs.python311.withPackages (ps: with ps; [
poetry-core
]);
project = "greendeck";
prompt = (
bash.build_prompt
@ -64,9 +64,10 @@
'';
};
packages = {
greendeck = mkPoetryApplication {
greendeck = pkgs.poetry2nix.mkPoetryApplication {
python = pkgs.python311;
projectDir = ./.;
groups = [ ];
propagatedBuildInputs = [
pkgs.hidapi
];
@ -76,7 +77,7 @@
'os.getenv("HIDAPI_LIBRARY")' \
'"${pkgs.hidapi}/lib/libhidapi-libusb.so.0"'
'';
overrides = overrides.withDefaults
overrides = pkgs.poetry2nix.overrides.withDefaults
(
self: super: {
wand = super.wand.overridePythonAttrs
@ -91,41 +92,16 @@
propagatedBuildInputs = old.propagatedBuildInputs ++ [ pkgs.imagemagickBig ];
}
);
# types-deprecated = super.types-deprecated.overridePythonAttrs (
# old: {
# buildInputs = old.buildInputs ++ [ pkgs.python3Packages.setuptools ];
# }
# );
pydantic-yaml = super.pydantic-yaml.overridePythonAttrs (
old: {
buildInputs = old.buildInputs ++ [ pkgs.python311Packages.setuptools ];
buildInputs = old.buildInputs ++ [ super.setuptools ];
}
);
# pydocstyle = super.pydocstyle.overridePythonAttrs (
# old: {
# buildInputs = old.buildInputs ++ [
# # pkgs.python3Packages.poetry-core
# ];
# }
# );
# pydocstringformatter = super.pydocstringformatter.overridePythonAttrs (
# old: {
# buildInputs = old.buildInputs ++ [
# pkgs.python3Packages.poetry-core
# pkgs.python3Packages.setuptools
# ];
# }
# );
asyncdbus = super.asyncdbus.overridePythonAttrs (
old: {
buildInputs = old.buildInputs ++ [ pkgs.python311Packages.setuptools-scm ];
buildInputs = old.buildInputs ++ [ super.setuptools-scm ];
}
);
# Pillow = super.Pillow.overridePythonAttrs (
# old: {
# buildInputs = old.buildInputs ++ [ pkgs.python311Packages.setuptools-scm ];
# }
# );
}
);
};

View file

@ -33,7 +33,7 @@ flake8-pyproject = "^1.2.3"
isort = "^5.12.0"
[build-system]
requires = ["poetry-core==1.6.1"]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.black]