hostapps/flake.nix

62 lines
1.7 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";
};
2023-03-24 10:53:20 -05:00
bash = {
url = "git+https://git.ocjtech.us/jeff/nixos-bash-prompt-builder.git";
};
2022-05-28 14:14:08 -05:00
};
2023-03-24 10:53:20 -05:00
outputs = { self, nixpkgs, flake-utils, bash }@input:
2022-10-09 09:57:03 -05:00
flake-utils.lib.eachDefaultSystem
(system:
let
version = self.lastModifiedDate;
pkgs = import nixpkgs {
inherit system;
};
in
{
packages.hostapps = pkgs.poetry2nix.mkPoetryApplication {
2023-03-30 14:19:13 -05:00
python = pkgs.python311;
2022-10-09 09:57:03 -05:00
projectDir = ./.;
propagatedBuildInputs = [
pkgs.openssh
2023-03-24 10:47:06 -05:00
pkgs.sshpass
2022-10-09 09:57:03 -05:00
];
};
defaultPackage = self.packages.${system}.hostapps;
devShells.default =
let
2023-03-30 14:19:13 -05:00
python = pkgs.python311.withPackages (
2022-10-09 09:57:03 -05:00
ps: with ps; [
2023-04-09 11:51:16 -05:00
# poetry-core
2022-10-09 09:57:03 -05:00
]
);
2023-04-09 11:51:16 -05:00
project = "hostapps";
2023-03-24 10:53:20 -05:00
prompt = (
2023-10-18 20:26:59 -05:00
bash.build_ps1_prompt
2023-03-24 10:53:20 -05:00
bash.ansi_normal_blue
"${project} - ${bash.username}@${bash.hostname_short}: ${bash.current_working_directory}"
"${project}:${bash.current_working_directory}"
);
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 = ''
2023-03-24 10:53:20 -05:00
export PS1='${prompt}'
2022-10-10 17:20:59 -05:00
'';
2022-10-09 09:57:03 -05:00
};
}
);
2022-05-28 14:14:08 -05:00
}