mirror of
https://github.com/vale981/poetry2nix
synced 2025-03-06 01:31:39 -05:00
cleanup: reorganize flake a bit, export lib.mkPoetry2Nix as a function
This commit is contained in:
parent
8f2c483f9a
commit
22b31f0c29
2 changed files with 4 additions and 19 deletions
21
flake.nix
21
flake.nix
|
@ -22,6 +22,7 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
overlay = import ./overlay.nix;
|
overlay = import ./overlay.nix;
|
||||||
|
lib.mkPoetry2Nix = { pkgs }: import ./default.nix { inherit pkgs; };
|
||||||
|
|
||||||
githubActions =
|
githubActions =
|
||||||
let
|
let
|
||||||
|
@ -71,27 +72,11 @@
|
||||||
let
|
let
|
||||||
pkgs = import nixpkgs {
|
pkgs = import nixpkgs {
|
||||||
inherit system;
|
inherit system;
|
||||||
overlays = [
|
config.allowAliases = false;
|
||||||
(_: _: {
|
|
||||||
p2nix-tools = pkgs.callPackage ./tools { };
|
|
||||||
})
|
|
||||||
];
|
|
||||||
config = {
|
|
||||||
allowAliases = false;
|
|
||||||
permittedInsecurePackages = [
|
|
||||||
"python3.8-requests-2.29.0"
|
|
||||||
"python3.8-cryptography-40.0.2"
|
|
||||||
"python3.9-requests-2.29.0"
|
|
||||||
"python3.9-cryptography-40.0.2"
|
|
||||||
"python3.10-requests-2.29.0"
|
|
||||||
"python3.10-cryptography-40.0.2"
|
|
||||||
"python3.11-requests-2.29.0"
|
|
||||||
"python3.11-cryptography-40.0.2"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
poetry2nix = import ./default.nix { inherit pkgs; };
|
poetry2nix = import ./default.nix { inherit pkgs; };
|
||||||
|
p2nix-tools = pkgs.callPackage ./tools { };
|
||||||
in
|
in
|
||||||
rec {
|
rec {
|
||||||
formatter = treefmtEval.${system}.config.build.wrapper;
|
formatter = treefmtEval.${system}.config.build.wrapper;
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
let
|
let
|
||||||
# see https://github.com/nix-community/poetry2nix/tree/master#api for more functions and examples.
|
# see https://github.com/nix-community/poetry2nix/tree/master#api for more functions and examples.
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
inherit (import poetry2nix { inherit pkgs; }) mkPoetryApplication;
|
inherit (poetry2nix.lib.mkPoetry2Nix { inherit pkgs; }) mkPoetryApplication;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
packages = {
|
packages = {
|
||||||
|
|
Loading…
Add table
Reference in a new issue