hostapps/flake.nix

65 lines
1.4 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-10-29 21:33:23 -05:00
make-shell = {
url = "github:ursi/nix-make-shell";
2023-03-24 10:53:20 -05:00
};
2022-05-28 14:14:08 -05:00
};
2023-10-29 21:33:23 -05:00
outputs = {
self,
nixpkgs,
flake-utils,
make-shell,
} @ inputs:
2022-10-09 09:57:03 -05:00
flake-utils.lib.eachDefaultSystem
2023-10-29 21:33:23 -05:00
(
system: let
version = self.lastModifiedDate;
pkgs = import nixpkgs {
inherit system;
};
make-shell = import inputs.make-shell {
inherit system pkgs;
};
in {
packages.hostapps = pkgs.poetry2nix.mkPoetryApplication {
2023-10-30 13:59:27 -05:00
python = pkgs.python311;
2023-10-29 21:33:23 -05:00
projectDir = ./.;
propagatedBuildInputs = [
2023-10-30 13:59:27 -05:00
pkgs.inetutils
2023-10-29 21:33:23 -05:00
pkgs.openssh
pkgs.sshpass
];
};
defaultPackage = self.packages.${system}.hostapps;
devShells.default = let
python = pkgs.python312.withPackages (
ps:
with ps; [
# poetry-core
]
);
project = "hostapps";
2022-10-09 09:57:03 -05:00
in
2023-10-29 21:33:23 -05:00
make-shell {
packages = [
python
2023-10-30 13:59:27 -05:00
pkgs.inetutils
2022-10-09 09:57:03 -05:00
pkgs.openssh
2023-10-29 21:33:23 -05:00
pkgs.poetry
2023-10-30 13:59:27 -05:00
pkgs.sshpass
2022-10-09 09:57:03 -05:00
];
2023-10-29 21:33:23 -05:00
env = {
NIX_PROJECT = project;
2022-10-09 09:57:03 -05:00
};
2023-10-29 21:33:23 -05:00
};
}
);
2022-05-28 14:14:08 -05:00
}