update
This commit is contained in:
parent
8cc696c43d
commit
d20d2a98cb
2 changed files with 113 additions and 95 deletions
87
flake.lock
87
flake.lock
|
@ -1,30 +1,15 @@
|
||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"bash": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1678247195,
|
|
||||||
"narHash": "sha256-m/wSwlSket+hob3JED4XUvoWJLtW7yhtOiZrlRDMShs=",
|
|
||||||
"ref": "refs/heads/main",
|
|
||||||
"rev": "e7a00dcc0e75bc3ef6856bdd94d7d809245f5636",
|
|
||||||
"revCount": 1,
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://git.ocjtech.us/jeff/nixos-bash-prompt-builder.git"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://git.ocjtech.us/jeff/nixos-bash-prompt-builder.git"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"flake-utils": {
|
"flake-utils": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"systems": "systems"
|
"systems": "systems"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1692799911,
|
"lastModified": 1701680307,
|
||||||
"narHash": "sha256-3eihraek4qL744EvQXsK1Ha6C3CR7nnT8X2qWap4RNk=",
|
"narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "flake-utils",
|
"repo": "flake-utils",
|
||||||
"rev": "f9e7cf818399d17d347f847525c5a5a8032e4e44",
|
"rev": "4022d587cbbfd70fe950c1e2083a02621806a725",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -38,11 +23,11 @@
|
||||||
"systems": "systems_2"
|
"systems": "systems_2"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1689068808,
|
"lastModified": 1694529238,
|
||||||
"narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=",
|
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "flake-utils",
|
"repo": "flake-utils",
|
||||||
"rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4",
|
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -74,11 +59,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1688870561,
|
"lastModified": 1698974481,
|
||||||
"narHash": "sha256-4UYkifnPEw1nAzqqPOTL2MvWtm3sNGw1UTYTalkTcGY=",
|
"narHash": "sha256-yPncV9Ohdz1zPZxYHQf47S8S0VrnhV7nNhCawY46hDA=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nix-github-actions",
|
"repo": "nix-github-actions",
|
||||||
"rev": "165b1650b753316aa7f1787f3005a8d2da0f5301",
|
"rev": "4bb5e752616262457bc7ca5882192a564c0472d2",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -89,16 +74,16 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1693341273,
|
"lastModified": 1701802827,
|
||||||
"narHash": "sha256-wrsPjsIx2767909MPGhSIOmkpGELM9eufqLQOPxmZQg=",
|
"narHash": "sha256-wTn0lpV75Uv6tU6haEypNsmnJJPb0hpaMIy/4uf5AiQ=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "2ab91c8d65c00fd22a441c69bbf1bc9b420d5ea1",
|
"rev": "a804fc878d7ba1558b960b4c64b0903da426ac41",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"id": "nixpkgs",
|
"id": "nixpkgs",
|
||||||
"ref": "nixos-23.05",
|
"ref": "nixos-23.11",
|
||||||
"type": "indirect"
|
"type": "indirect"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -108,14 +93,16 @@
|
||||||
"nix-github-actions": "nix-github-actions",
|
"nix-github-actions": "nix-github-actions",
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
]
|
],
|
||||||
|
"systems": "systems_3",
|
||||||
|
"treefmt-nix": "treefmt-nix"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1693051011,
|
"lastModified": 1701861752,
|
||||||
"narHash": "sha256-HNbuVCS/Fnl1YZOjBk9/MlIem+wM8fvIzTH0CVQrLSQ=",
|
"narHash": "sha256-QfrE05P66856b1SMan69NPhjc9e82VtLxBKg3yiQGW8=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "poetry2nix",
|
"repo": "poetry2nix",
|
||||||
"rev": "5b3a5151cf212021ff8d424f215fb030e4ff2837",
|
"rev": "9fc487b32a68473da4bf9573f85b388043c5ecda",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -126,7 +113,6 @@
|
||||||
},
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"bash": "bash",
|
|
||||||
"flake-utils": "flake-utils",
|
"flake-utils": "flake-utils",
|
||||||
"make-shell": "make-shell",
|
"make-shell": "make-shell",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
|
@ -162,6 +148,41 @@
|
||||||
"repo": "default",
|
"repo": "default",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"systems_3": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1681028828,
|
||||||
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"id": "systems",
|
||||||
|
"type": "indirect"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"treefmt-nix": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"poetry2nix",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1699786194,
|
||||||
|
"narHash": "sha256-3h3EH1FXQkIeAuzaWB+nK0XK54uSD46pp+dMD3gAcB4=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "treefmt-nix",
|
||||||
|
"rev": "e82f32aa7f06bbbd56d7b12186d555223dc399d1",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "treefmt-nix",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"root": "root",
|
"root": "root",
|
||||||
|
|
121
flake.nix
121
flake.nix
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs = {
|
nixpkgs = {
|
||||||
url = "nixpkgs/nixos-23.05";
|
url = "nixpkgs/nixos-23.11";
|
||||||
};
|
};
|
||||||
poetry2nix = {
|
poetry2nix = {
|
||||||
url = "github:nix-community/poetry2nix";
|
url = "github:nix-community/poetry2nix";
|
||||||
|
@ -12,76 +12,73 @@
|
||||||
flake-utils = {
|
flake-utils = {
|
||||||
url = "github:numtide/flake-utils";
|
url = "github:numtide/flake-utils";
|
||||||
};
|
};
|
||||||
bash = {
|
|
||||||
url = "git+https://git.ocjtech.us/jeff/nixos-bash-prompt-builder.git";
|
|
||||||
};
|
|
||||||
make-shell = {
|
make-shell = {
|
||||||
url = "github:ursi/nix-make-shell";
|
url = "github:ursi/nix-make-shell";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
outputs = { self, nixpkgs, poetry2nix, flake-utils, bash, make-shell, ... }@inputs:
|
outputs = {
|
||||||
|
self,
|
||||||
|
nixpkgs,
|
||||||
|
poetry2nix,
|
||||||
|
flake-utils,
|
||||||
|
make-shell,
|
||||||
|
...
|
||||||
|
} @ inputs:
|
||||||
flake-utils.lib.eachDefaultSystem
|
flake-utils.lib.eachDefaultSystem
|
||||||
(system:
|
(
|
||||||
let
|
system: let
|
||||||
inherit (poetry2nix.legacyPackages.${system}) mkPoetryApplication overrides;
|
inherit (poetry2nix.lib.mkPoetry2Nix {inherit pkgs;}) mkPoetryApplication overrides;
|
||||||
pkgs = import nixpkgs {
|
pkgs = import nixpkgs {
|
||||||
inherit system;
|
inherit system;
|
||||||
};
|
};
|
||||||
python = pkgs.python311.withPackages (ps: with ps; [
|
python = pkgs.python311.withPackages (ps:
|
||||||
|
with ps; [
|
||||||
poetry-core
|
poetry-core
|
||||||
]);
|
]);
|
||||||
|
in {
|
||||||
|
devShells.default = let
|
||||||
|
make-shell = import inputs.make-shell {
|
||||||
|
inherit system;
|
||||||
|
pkgs = pkgs;
|
||||||
|
};
|
||||||
|
project = "starlink";
|
||||||
in
|
in
|
||||||
{
|
make-shell {
|
||||||
devShells.default =
|
packages = [
|
||||||
let
|
python
|
||||||
make-shell = import inputs.make-shell {
|
pkgs.poetry
|
||||||
inherit system;
|
];
|
||||||
pkgs = pkgs;
|
env = {
|
||||||
};
|
POETRY_VIRTUALENVS_IN_PROJECT = "true";
|
||||||
project = "starlink";
|
name = project;
|
||||||
prompt = (
|
|
||||||
bash.build_prompt
|
|
||||||
bash.ansi_normal_blue
|
|
||||||
"${project} - ${bash.username}@${bash.hostname_short}: ${bash.current_working_directory}"
|
|
||||||
"${project}:${bash.current_working_directory}"
|
|
||||||
);
|
|
||||||
in
|
|
||||||
make-shell {
|
|
||||||
packages = [
|
|
||||||
python
|
|
||||||
pkgs.poetry
|
|
||||||
];
|
|
||||||
env = {
|
|
||||||
POETRY_VIRTUALENVS_IN_PROJECT = "true";
|
|
||||||
PS1 = prompt;
|
|
||||||
};
|
|
||||||
setup = ''
|
|
||||||
export PATH=''$(pwd)/.venv/bin:$PATH
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
packages = {
|
setup = ''
|
||||||
starlink-grpc-tools = mkPoetryApplication {
|
export PATH=''$(pwd)/.venv/bin:$PATH
|
||||||
python = pkgs.python311;
|
'';
|
||||||
projectDir = ./.;
|
};
|
||||||
groups = [ ];
|
packages = {
|
||||||
overrides = overrides.withDefaults (
|
starlink-grpc-tools = mkPoetryApplication {
|
||||||
self: super: {
|
python = pkgs.python311;
|
||||||
yagrc = super.yagrc.overridePythonAttrs (
|
projectDir = ./.;
|
||||||
old: {
|
groups = [];
|
||||||
buildInputs = old.buildInputs ++ [ self.setuptools ];
|
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;
|
meta = with pkgs.lib; {
|
||||||
};
|
homepage = "https://github.com/sparky8512/starlink-grpc-tools";
|
||||||
|
description = "";
|
||||||
|
longDescription = '''';
|
||||||
|
license = licenses.unlicense;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
default = self.packages.${system}.starlink-grpc-tools;
|
};
|
||||||
}
|
default = self.packages.${system}.starlink-grpc-tools;
|
||||||
);
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue