hostapps/flake.nix

71 lines
2 KiB
Nix
Raw Normal View History

2022-05-28 14:14:08 -05:00
{
description = "hostapps";
inputs = {
nixpkgs = {
url = "github:nixos/nixpkgs/nixos-unstable";
};
2022-10-09 09:57:03 -05:00
flake-utils = {
url = "github:numtide/flake-utils";
};
2022-05-28 14:14:08 -05:00
};
2022-10-09 09:57:03 -05:00
outputs = { self, nixpkgs, flake-utils }@input:
flake-utils.lib.eachDefaultSystem
(system:
let
version = self.lastModifiedDate;
pkgs = import nixpkgs {
inherit system;
};
in
{
packages.hostapps = pkgs.poetry2nix.mkPoetryApplication {
python = pkgs.python310;
projectDir = ./.;
propagatedBuildInputs = [
pkgs.openssh
2023-03-24 10:47:06 -05:00
pkgs.sshpass
2022-10-09 09:57:03 -05:00
];
2022-10-10 17:31:38 -05:00
overrides = pkgs.poetry2nix.overrides.withDefaults
(
self: super: {
2023-03-24 10:47:06 -05:00
pynetbox = super.pynetbox.overridePythonAttrs
(
old: {
propagatedBuildInputs = [ super.setuptools-scm ] ++ super.pynetbox.propagatedBuildInputs;
}
);
2023-03-24 09:51:57 -05:00
pathspec = super.pathspec.overridePythonAttrs
2022-10-10 17:31:38 -05:00
(
old: {
2023-03-24 09:51:57 -05:00
propagatedBuildInputs = [ super.flit-core ] ++ super.flit-core.propagatedBuildInputs;
2022-10-10 17:31:38 -05:00
}
);
}
);
2022-10-09 09:57:03 -05:00
};
defaultPackage = self.packages.${system}.hostapps;
devShells.default =
let
python = pkgs.python310.withPackages (
ps: with ps; [
2023-03-24 09:51:57 -05:00
poetry-core
2022-10-09 09:57:03 -05:00
]
);
in
2022-10-10 17:20:59 -05:00
pkgs.mkShell {
2023-03-24 09:51:57 -05:00
buildInputs = [
2022-10-10 17:20:59 -05:00
python
2023-03-24 09:51:57 -05:00
pkgs.openssh
2023-03-24 10:47:06 -05:00
pkgs.sshpass
2023-03-24 09:51:57 -05:00
pkgs.poetry
2022-10-10 17:20:59 -05:00
];
shellHook = ''
export POETRY_VIRTUALENVS_IN_PROJECT=true
export PS1='\[\033[1;34m\][hostapps:\w]\$\[\033[0m\] '
'';
2022-10-09 09:57:03 -05:00
};
}
);
2022-05-28 14:14:08 -05:00
}