95 lines
2.5 KiB
Nix
95 lines
2.5 KiB
Nix
{
|
|
description = "hostapps";
|
|
inputs = {
|
|
nixpkgs = {
|
|
url = "github:nixos/nixpkgs/nixos-unstable";
|
|
};
|
|
flake-utils = {
|
|
url = "github:numtide/flake-utils";
|
|
};
|
|
poetry2nix = {
|
|
url = "github:nix-community/poetry2nix";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
inputs.flake-utils.follows = "flake-utils";
|
|
};
|
|
make-shell = {
|
|
url = "github:ursi/nix-make-shell";
|
|
};
|
|
};
|
|
outputs = {
|
|
self,
|
|
nixpkgs,
|
|
poetry2nix,
|
|
flake-utils,
|
|
make-shell,
|
|
} @ inputs:
|
|
flake-utils.lib.eachDefaultSystem
|
|
(
|
|
system: let
|
|
version = self.lastModifiedDate;
|
|
pkgs = import nixpkgs {
|
|
inherit system;
|
|
config.permittedInsecurePackages = [
|
|
"python3.11-requests-2.29.0"
|
|
"python3.11-cryptography-40.0.2"
|
|
];
|
|
};
|
|
make-shell = import inputs.make-shell {
|
|
inherit system pkgs;
|
|
};
|
|
inherit (poetry2nix.lib.mkPoetry2Nix {inherit pkgs;}) mkPoetryApplication overrides;
|
|
in {
|
|
packages.hostapps = mkPoetryApplication {
|
|
python = pkgs.python311;
|
|
projectDir = ./.;
|
|
propagatedBuildInputs = [
|
|
pkgs.inetutils
|
|
pkgs.openssh
|
|
pkgs.sshpass
|
|
];
|
|
overrides = overrides.withDefaults (
|
|
self: super: {
|
|
pyansi = super.pyansi.overridePythonAttrs (
|
|
old: {
|
|
buildInputs = old.buildInputs ++ [self.poetry];
|
|
}
|
|
);
|
|
# annotated-types = super.annotated-types.overridePythonAttrs (
|
|
# old: {
|
|
# buildInputs = old.buildInputs ++ [self.hatchling];
|
|
# }
|
|
# );
|
|
# pydantic-core = super.pydantic-core.overridePythonAttrs (
|
|
# old: {
|
|
# buildInputs = old.buildInputs ++ [self.maturin];
|
|
# }
|
|
# );
|
|
}
|
|
);
|
|
};
|
|
defaultPackage = self.packages.${system}.hostapps;
|
|
devShells.default = let
|
|
python = pkgs.python312.withPackages (
|
|
ps:
|
|
with ps; [
|
|
# poetry-core
|
|
]
|
|
);
|
|
project = "hostapps";
|
|
in
|
|
make-shell {
|
|
packages = [
|
|
python
|
|
pkgs.inetutils
|
|
pkgs.openssh
|
|
pkgs.poetry
|
|
pkgs.sshpass
|
|
];
|
|
env = {
|
|
NIX_PROJECT = project;
|
|
};
|
|
};
|
|
}
|
|
);
|
|
}
|