packages: insta-wow pkg init

This commit is contained in:
ooks-io 2024-10-29 16:45:11 +11:00
parent c6d0e010ff
commit 7d683e712f
10 changed files with 188 additions and 47 deletions

View file

@ -3,7 +3,7 @@
in {
perSystem = {config, ...}: {
apps = {
ooks-vim.program = getExe config.packages.ook-vim;
ook-vim.program = getExe config.packages.ook-vim;
default = config.apps.ook-vim;
};
};

View file

@ -5,5 +5,6 @@
./hosts
./keys.nix
./pkgs
./images.nix
];
}

View file

@ -1,5 +1,6 @@
{
imports = [
./workstations.nix
./servers.nix
];
}

18
outputs/hosts/servers.nix Normal file
View file

@ -0,0 +1,18 @@
{
withSystem,
ook,
...
}: let
inherit (ook.lib.builders) mkServer;
in {
flake.nixosConfigurations = {
ooknode = mkServer {
inherit withSystem;
system = "x86_64-linux";
hostname = "ooknode";
type = "vm";
profile = "linode";
services = [];
};
};
}

11
outputs/images.nix Normal file
View file

@ -0,0 +1,11 @@
{
ook,
self,
...
}: let
inherit (ook.lib.builders) mkImage;
in {
flake.images = {
ooknode = self.nixosConfigurations.ooknode.config.system.build.image;
};
}

View file

@ -2,10 +2,13 @@
perSystem = {pkgs, ...}: let
inherit (ook.lib) mkNeovim;
ook-vim-config = import ./ook-vim;
inherit (pkgs) callPackage;
in {
packages = {
repopack = pkgs.callPackage ./repopack {};
live-buds-cli = pkgs.callPackage ./live-buds-cli {};
repopack = callPackage ./repopack {};
live-buds-cli = callPackage ./live-buds-cli {};
instawow-tsm = callPackage ./instawow/plugins/tsm.nix {};
ook-vim = mkNeovim pkgs [ook-vim-config];
};
};

View file

@ -0,0 +1,54 @@
# Credit github:seirl
# <https://github.com/seirl/seirl-nixos/blob/a10128546a5412049ce547f2f6ce6a80b3c253af/pkgs/instawow/default.nix>
{
lib,
python3,
fetchFromGitHub,
plugins ? [],
}:
python3.pkgs.buildPythonApplication rec {
pname = "instawow";
version = "4.7.0";
pyproject = true;
src = fetchFromGitHub {
owner = "layday";
repo = pname;
rev = "refs/tags/v${version}";
sha256 = "sha256-tk/Lugjdzufl8VPcpj7R2q81SBE/+KtS3VhsXQ2VKZM=";
};
extras = []; # Disable GUI, most dependencies are not packaged.
nativeBuildInputs = with python3.pkgs; [
hatchling
hatch-vcs
];
propagatedBuildInputs = with python3.pkgs;
[
aiohttp
aiohttp-client-cache
attrs
cattrs
click
diskcache
iso8601
loguru
packaging
pluggy
prompt-toolkit
rapidfuzz
truststore
typing-extensions
yarl
]
++ plugins;
meta = with lib; {
homepage = "https://github.com/layday/instawow";
description = "World of Warcraft add-on manager CLI and GUI";
mainProgram = "instawow";
license = licenses.gpl3;
maintainers = with maintainers; [seirl];
};
}

View file

@ -0,0 +1,43 @@
# Credit github:seirl
# <https://github.com/seirl/seirl-nixos/blob/a10128546a5412049ce547f2f6ce6a80b3c253af/pkgs/instawow/plugins/tsm.nix>
{
lib,
python3,
fetchFromGitHub,
instawow,
}: let
inherit (builtins) attrValues;
in
python3.pkgs.buildPythonPackage rec {
pname = "instawow-tsm";
version = "72edf2ba3850eaaa5041d5aa1f55166aeee81409";
src = fetchFromGitHub {
owner = "seirl";
repo = "instawow-tsm";
rev = version;
sha256 = "sha256-+ojxVwPOfy3/3/raROEDS5pWCONAiALCdg7li+K6ZjI=";
};
pythonRemoveDeps = [
"instawow" # Reverse the dependency
];
doCheck = false; # tests require dependencies
nativeBuildInputs = [python3.pkgs.setuptools];
propagatedBuildInputs = attrValues {
inherit
(python3.pkgs)
aiohttp
click
loguru
;
};
meta = with lib; {
homepage = "https://github.com/seirl/instawow-tsm";
description = "Instawow plugin for TradeSkillMaster";
license = lib.licenses.gpl3;
maintainers = with maintainers; [seirl];
};
}

View file

@ -1,5 +1,15 @@
{
vim.binds.whichKey = {
enable = true;
vim = {
binds.whichKey = {
enable = true;
};
utility = {
preview = {
markdownPreview = {
enable = true;
autoStart = true;
};
};
};
};
}