starlink-grpc-tools/flake.nix

85 lines
2.1 KiB
Nix
Raw Normal View History

2023-08-31 22:15:04 -05:00
{
description = "Starling gRPC Tools";
inputs = {
nixpkgs = {
2023-12-07 10:17:35 -06:00
url = "nixpkgs/nixos-23.11";
2023-08-31 22:15:04 -05:00
};
poetry2nix = {
url = "github:nix-community/poetry2nix";
inputs.nixpkgs.follows = "nixpkgs";
};
flake-utils = {
url = "github:numtide/flake-utils";
};
make-shell = {
url = "github:ursi/nix-make-shell";
};
};
2023-12-07 10:17:35 -06:00
outputs = {
self,
nixpkgs,
poetry2nix,
flake-utils,
make-shell,
...
} @ inputs:
2023-08-31 22:15:04 -05:00
flake-utils.lib.eachDefaultSystem
2023-12-07 10:17:35 -06:00
(
system: let
inherit (poetry2nix.lib.mkPoetry2Nix {inherit pkgs;}) mkPoetryApplication overrides;
pkgs = import nixpkgs {
inherit system;
};
python = pkgs.python311.withPackages (ps:
with ps; [
2023-08-31 22:15:04 -05:00
poetry-core
]);
2023-12-07 10:17:35 -06:00
in {
devShells.default = let
make-shell = import inputs.make-shell {
inherit system;
pkgs = pkgs;
};
project = "starlink";
2023-08-31 22:15:04 -05:00
in
2023-12-07 10:17:35 -06:00
make-shell {
packages = [
python
pkgs.poetry
];
env = {
POETRY_VIRTUALENVS_IN_PROJECT = "true";
name = project;
2023-08-31 22:15:04 -05:00
};
2023-12-07 10:17:35 -06:00
setup = ''
export PATH=''$(pwd)/.venv/bin:$PATH
'';
};
packages = {
starlink-grpc-tools = mkPoetryApplication {
python = pkgs.python311;
projectDir = ./.;
groups = [];
overrides = overrides.withDefaults (
self: super: {
yagrc = super.yagrc.overridePythonAttrs (
old: {
buildInputs = old.buildInputs ++ [self.setuptools];
}
);
}
);
meta = with pkgs.lib; {
homepage = "https://github.com/sparky8512/starlink-grpc-tools";
description = "";
longDescription = '''';
license = licenses.unlicense;
2023-08-31 22:15:04 -05:00
};
};
2023-12-07 10:17:35 -06:00
};
default = self.packages.${system}.starlink-grpc-tools;
}
);
2023-08-31 22:15:04 -05:00
}