Compare commits

..

3 commits

Author SHA1 Message Date
6e89308104 flake.lock: Update
Flake lock file updates:

• Updated input 'hyprland':
    'git+https://github.com/hyprwm/Hyprland/?ref=refs/heads/main&rev=3c9716acfd00c6ea1b7bcd1dc63f97b51cc09998' (2024-09-17)
  → 'git+https://github.com/hyprwm/Hyprland/?ref=refs/heads/main&rev=e6cf643f5ab1c1545fb858ab1fd9d7538ef9e0f3' (2024-09-18)
• Updated input 'hyprland/aquamarine':
    'github:hyprwm/aquamarine/e4a13203112a036fc7f437d391c7810f3dd5ab52' (2024-09-07)
  → 'github:hyprwm/aquamarine/752d0fbd141fabb5a1e7f865199b80e6e76f8d8e' (2024-09-18)
• Updated input 'lix':
    '8ab5743904.tar.gz?narHash=sha256-CrvIEzBzvvfE7jGIXBv6hSYDxv4eYeHWAwVho5WrF48%3D&rev=8ab5743904a06c78153281bf61b3aa8aa451a489' (2024-09-17)
  → '2afdf1ed66.tar.gz?narHash=sha256-8S8PaAXd%2BS5ik8Bd/cDFVRgiieee08rzpDQ%2BUisvHZU%3D&rev=2afdf1ed660d0592bf488fa1be68fe0666716421' (2024-09-18)
• Updated input 'lix-module':
    '353b25f0b6.tar.gz?narHash=sha256-dCbHCwqrzcHlEsRilMX%2BKM3IfRV46ieGqDyAD3GgCSs%3D&rev=353b25f0b6da5ede15206d416345a2ec4195b5c8' (2024-09-08)
  → 'b0e6f35950.tar.gz?narHash=sha256-b2rMO8%2BjKjY55d8uynX7FjV4NIPu/WzPux0kWOAzwoo%3D&rev=b0e6f359500d66670cc16f521e4f62d6a0a4864e' (2024-09-18)
• Updated input 'lix-module/flake-utils':
    'github:numtide/flake-utils/b1d9ab70662946ef0850d488da1c9019f3a9752a' (2024-03-11)
  → 'github:numtide/flake-utils/c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a' (2024-09-17)
• Updated input 'nixpkgs-wayland':
    'github:nix-community/nixpkgs-wayland/e2d0b0171ddf364b687d091ee603d0c3a7079166' (2024-09-17)
  → 'github:nix-community/nixpkgs-wayland/8bfa0c8e3a4466bcc062c6668aeb51fb03182e36' (2024-09-18)
• Updated input 'zig-overlay':
    'github:mitchellh/zig-overlay/a2f15c93b689b31044d5604fb0cd5bac818daf01' (2024-09-17)
  → 'github:mitchellh/zig-overlay/be1d29f1d47d42e205d3646e9202bf1fd051137c' (2024-09-18)
2024-09-18 19:32:37 +00:00
55747530b9
use development version of nixd for pipe support 2024-09-18 14:30:49 -05:00
91dc727259
bbansi was consumed by hwylterm 2024-09-18 14:30:21 -05:00
8 changed files with 151 additions and 63 deletions

View file

@ -20,11 +20,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1725753098, "lastModified": 1726665257,
"narHash": "sha256-/NO/h/qD/eJXAQr/fHA4mdDgYsNT9thHQ+oT6KPi2ac=", "narHash": "sha256-rEzEZtd3iyVo5RJ1OGujOlnywNf3gsrOnjAn1NLciD4=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "aquamarine", "repo": "aquamarine",
"rev": "e4a13203112a036fc7f437d391c7810f3dd5ab52", "rev": "752d0fbd141fabb5a1e7f865199b80e6e76f8d8e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -117,6 +117,24 @@
} }
}, },
"flake-parts": { "flake-parts": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1714606777,
"narHash": "sha256-bMkNmAXLj8iyTvxaaD/StcLSadbj1chPcJOjtuVnLmA=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "4d34ce6412bc450b1d4208c953dc97c7fc764f1a",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_2": {
"inputs": { "inputs": {
"nixpkgs-lib": [ "nixpkgs-lib": [
"nixpkgs-wayland", "nixpkgs-wayland",
@ -138,16 +156,31 @@
"type": "github" "type": "github"
} }
}, },
"flake-root": {
"locked": {
"lastModified": 1713493429,
"narHash": "sha256-ztz8JQkI08tjKnsTpfLqzWoKFQF4JGu2LRz8bkdnYUk=",
"owner": "srid",
"repo": "flake-root",
"rev": "bc748b93b86ee76e2032eecda33440ceb2532fcd",
"type": "github"
},
"original": {
"owner": "srid",
"repo": "flake-root",
"type": "github"
}
},
"flake-utils": { "flake-utils": {
"inputs": { "inputs": {
"systems": "systems_2" "systems": "systems_2"
}, },
"locked": { "locked": {
"lastModified": 1710146030, "lastModified": 1726560853,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", "narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", "rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -323,11 +356,11 @@
"xdph": "xdph" "xdph": "xdph"
}, },
"locked": { "locked": {
"lastModified": 1726580240, "lastModified": 1726681673,
"narHash": "sha256-VBXNeRJMaiqbIietRihPYnWA7bFJO2wqqlPg0f9Xfjc=", "narHash": "sha256-n7EMRe/uMZ4QdM/DWsewc7LLRaR0GGzQIV3uu9BFZbU=",
"ref": "refs/heads/main", "ref": "refs/heads/main",
"rev": "3c9716acfd00c6ea1b7bcd1dc63f97b51cc09998", "rev": "e6cf643f5ab1c1545fb858ab1fd9d7538ef9e0f3",
"revCount": 5227, "revCount": 5235,
"submodules": true, "submodules": true,
"type": "git", "type": "git",
"url": "https://github.com/hyprwm/Hyprland/" "url": "https://github.com/hyprwm/Hyprland/"
@ -485,7 +518,7 @@
"lib-aggregate": { "lib-aggregate": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_3", "flake-utils": "flake-utils_3",
"nixpkgs-lib": "nixpkgs-lib" "nixpkgs-lib": "nixpkgs-lib_2"
}, },
"locked": { "locked": {
"lastModified": 1726600542, "lastModified": 1726600542,
@ -504,11 +537,11 @@
"lix": { "lix": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1726590994, "lastModified": 1726680400,
"narHash": "sha256-CrvIEzBzvvfE7jGIXBv6hSYDxv4eYeHWAwVho5WrF48=", "narHash": "sha256-8S8PaAXd+S5ik8Bd/cDFVRgiieee08rzpDQ+UisvHZU=",
"rev": "8ab5743904a06c78153281bf61b3aa8aa451a489", "rev": "2afdf1ed660d0592bf488fa1be68fe0666716421",
"type": "tarball", "type": "tarball",
"url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/8ab5743904a06c78153281bf61b3aa8aa451a489.tar.gz?rev=8ab5743904a06c78153281bf61b3aa8aa451a489" "url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/2afdf1ed660d0592bf488fa1be68fe0666716421.tar.gz?rev=2afdf1ed660d0592bf488fa1be68fe0666716421"
}, },
"original": { "original": {
"type": "tarball", "type": "tarball",
@ -527,11 +560,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1725836728, "lastModified": 1726631249,
"narHash": "sha256-dCbHCwqrzcHlEsRilMX+KM3IfRV46ieGqDyAD3GgCSs=", "narHash": "sha256-b2rMO8+jKjY55d8uynX7FjV4NIPu/WzPux0kWOAzwoo=",
"rev": "353b25f0b6da5ede15206d416345a2ec4195b5c8", "rev": "b0e6f359500d66670cc16f521e4f62d6a0a4864e",
"type": "tarball", "type": "tarball",
"url": "https://git.lix.systems/api/v1/repos/lix-project/nixos-module/archive/353b25f0b6da5ede15206d416345a2ec4195b5c8.tar.gz?rev=353b25f0b6da5ede15206d416345a2ec4195b5c8" "url": "https://git.lix.systems/api/v1/repos/lix-project/nixos-module/archive/b0e6f359500d66670cc16f521e4f62d6a0a4864e.tar.gz?rev=b0e6f359500d66670cc16f521e4f62d6a0a4864e"
}, },
"original": { "original": {
"type": "tarball", "type": "tarball",
@ -599,10 +632,10 @@
}, },
"nix-eval-jobs": { "nix-eval-jobs": {
"inputs": { "inputs": {
"flake-parts": "flake-parts", "flake-parts": "flake-parts_2",
"nix-github-actions": "nix-github-actions", "nix-github-actions": "nix-github-actions",
"nixpkgs": "nixpkgs_5", "nixpkgs": "nixpkgs_5",
"treefmt-nix": "treefmt-nix" "treefmt-nix": "treefmt-nix_2"
}, },
"locked": { "locked": {
"lastModified": 1726529941, "lastModified": 1726529941,
@ -660,6 +693,30 @@
"type": "github" "type": "github"
} }
}, },
"nixd": {
"inputs": {
"flake-parts": "flake-parts",
"flake-root": "flake-root",
"nixpkgs": [
"nixpkgs"
],
"treefmt-nix": "treefmt-nix"
},
"locked": {
"lastModified": 1726640797,
"narHash": "sha256-tuqkFa7ZxcGwU8gTbKO61oGMdTmG9CiaI+NiaOV7SCI=",
"owner": "nix-community",
"repo": "nixd",
"rev": "e2f0d908d6f2ee7bf72c620ed3c78817143b50ae",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixd",
"rev": "e2f0d908d6f2ee7bf72c620ed3c78817143b50ae",
"type": "github"
}
},
"nixgl": { "nixgl": {
"inputs": { "inputs": {
"flake-utils": [ "flake-utils": [
@ -722,6 +779,24 @@
} }
}, },
"nixpkgs-lib": { "nixpkgs-lib": {
"locked": {
"dir": "lib",
"lastModified": 1714253743,
"narHash": "sha256-mdTQw2XlariysyScCv2tTE45QSU9v/ezLcHJ22f0Nxc=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "58a1abdbae3217ca6b702f03d3b35125d88a2994",
"type": "github"
},
"original": {
"dir": "lib",
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-lib_2": {
"locked": { "locked": {
"lastModified": 1726362065, "lastModified": 1726362065,
"narHash": "sha256-4h15WKdrs9zf6DGaeeV7ntU/pHHGkH6geYt1QBW0CP4=", "narHash": "sha256-4h15WKdrs9zf6DGaeeV7ntU/pHHGkH6geYt1QBW0CP4=",
@ -744,11 +819,11 @@
"nixpkgs": "nixpkgs_6" "nixpkgs": "nixpkgs_6"
}, },
"locked": { "locked": {
"lastModified": 1726608298, "lastModified": 1726672918,
"narHash": "sha256-jnkrX5WjYDRh6kYHHmf0mjOSiJNtrqDI/h2coistP7w=", "narHash": "sha256-7PYu2k0QrRbIZR2iBDxACWo4ar3HfWMoORC/Zj01yQQ=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixpkgs-wayland", "repo": "nixpkgs-wayland",
"rev": "0e4800bea63d6e60d1917c934ad7c5bba935d345", "rev": "8bfa0c8e3a4466bcc062c6668aeb51fb03182e36",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -923,6 +998,7 @@
"lix-module": "lix-module", "lix-module": "lix-module",
"nim2nix": "nim2nix", "nim2nix": "nim2nix",
"nix-index-database": "nix-index-database", "nix-index-database": "nix-index-database",
"nixd": "nixd",
"nixos-wsl": "nixos-wsl", "nixos-wsl": "nixos-wsl",
"nixpkgs": "nixpkgs_4", "nixpkgs": "nixpkgs_4",
"nixpkgs-wayland": "nixpkgs-wayland", "nixpkgs-wayland": "nixpkgs-wayland",
@ -1082,6 +1158,27 @@
} }
}, },
"treefmt-nix": { "treefmt-nix": {
"inputs": {
"nixpkgs": [
"nixd",
"nixpkgs"
]
},
"locked": {
"lastModified": 1722330636,
"narHash": "sha256-uru7JzOa33YlSRwf9sfXpJG+UAV+bnBEYMjrzKrQZFw=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "768acdb06968e53aa1ee8de207fd955335c754b7",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "treefmt-nix",
"type": "github"
}
},
"treefmt-nix_2": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"nixpkgs-wayland", "nixpkgs-wayland",
@ -1184,11 +1281,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1726619268, "lastModified": 1726661456,
"narHash": "sha256-YlVh/GZX/BA33RlkFRm3WZESFnVP0EXVLc/goXVYKVY=", "narHash": "sha256-UT3wZLMHec3AmuYSAoL5+liMZkeHlNeAa9Zjx6g6sE4=",
"owner": "mitchellh", "owner": "mitchellh",
"repo": "zig-overlay", "repo": "zig-overlay",
"rev": "04a63b5774dc3f9d5be373b03f4e461fe3b7d9d2", "rev": "be1d29f1d47d42e205d3646e9202bf1fd051137c",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -9,6 +9,8 @@
nixpkgs-wayland.url = "github:nix-community/nixpkgs-wayland"; nixpkgs-wayland.url = "github:nix-community/nixpkgs-wayland";
nixos-wsl.url = "github:nix-community/NixOS-WSL"; nixos-wsl.url = "github:nix-community/NixOS-WSL";
nix-index-database.url = "github:nix-community/nix-index-database"; nix-index-database.url = "github:nix-community/nix-index-database";
# pipe support added
nixd.url = "github:nix-community/nixd/e2f0d908d6f2ee7bf72c620ed3c78817143b50ae";
lix = { lix = {
url = "https://git.lix.systems/lix-project/lix/archive/main.tar.gz"; url = "https://git.lix.systems/lix-project/lix/archive/main.tar.gz";
@ -33,6 +35,7 @@
hyprman.url = "git+https://git.dayl.in/daylin/hyprman.git"; hyprman.url = "git+https://git.dayl.in/daylin/hyprman.git";
utils.url = "git+https://git.dayl.in/daylin/utils.git"; utils.url = "git+https://git.dayl.in/daylin/utils.git";
nixd.inputs.nixpkgs.follows = "nixpkgs";
nim2nix.inputs.nixpkgs.follows = "nixpkgs"; nim2nix.inputs.nixpkgs.follows = "nixpkgs";
hyprman.inputs.nixpkgs.follows = "nixpkgs"; hyprman.inputs.nixpkgs.follows = "nixpkgs";
f1multiviewer.inputs.nixpkgs.follows = "nixpkgs"; f1multiviewer.inputs.nixpkgs.follows = "nixpkgs";

View file

@ -4,6 +4,7 @@
lib, lib,
enabled, enabled,
self, self,
flake,
... ...
}: }:
let let
@ -42,11 +43,12 @@ in
# environment.etc."channels/nixpkgs".source = inputs.nixpkgs.outPath; # environment.etc."channels/nixpkgs".source = inputs.nixpkgs.outPath;
environment.systemPackages = [ environment.systemPackages = [
pkgs.nixd # pkgs.nixd
pkgs.nixfmt-rfc-style pkgs.nixfmt-rfc-style
pkgs.nix-output-monitor pkgs.nix-output-monitor
self.packages.${pkgs.system}.default self.packages.${pkgs.system}.default
(flake.pkg "nixd")
]; ];
programs.nix-index-database.comma = enabled; programs.nix-index-database.comma = enabled;

View file

@ -6,3 +6,5 @@ task build, "build oizys":
when withDir(thisDir(), system.fileExists("nimble.paths")): when withDir(thisDir(), system.fileExists("nimble.paths")):
include "nimble.paths" include "nimble.paths"
# end Nimble config # end Nimble config
#
--path:"../../../dev/github/daylinmorgan/hwylterm/src"

View file

@ -8,5 +8,5 @@ buildNimblePackage {
verions = "unstable"; verions = "unstable";
src = lib.cleanSource ./.; src = lib.cleanSource ./.;
nativeBuildInputs = [ openssl ]; nativeBuildInputs = [ openssl ];
nimbleDepsHash = "sha256-U44sZSUcus9minOs/Euy4h071eU9Cn83RnYb5jiKibo="; nimbleDepsHash = "sha256-o+CN0LlVOcgjLpDfjItW/5GCXTWcPSx9GfwQn+u2ST4=";
} }

View file

@ -13,12 +13,12 @@
}, },
"hwylterm": { "hwylterm": {
"version": "0.1.0", "version": "0.1.0",
"vcsRevision": "f743d4b2dc93e41d0e8b5bb0a3e5f26ffc2534e1", "vcsRevision": "9afc339a9791f25010ea89a4f52204ad8eeda858",
"url": "https://github.com/daylinmorgan/hwylterm", "url": "https://github.com/daylinmorgan/hwylterm",
"downloadMethod": "git", "downloadMethod": "git",
"dependencies": [], "dependencies": [],
"checksums": { "checksums": {
"sha1": "5a5e00533d5cf2660872738cabf8b7572128b05b" "sha1": "853c67ee7f789d825ec6f46c9fbae68e03e43cdb"
} }
}, },
"jsony": { "jsony": {

View file

@ -14,4 +14,5 @@ requires "nim >= 2.0.8"
requires "cligen" requires "cligen"
requires "jsony" requires "jsony"
requires "zippy" requires "zippy"
requires "https://github.com/daylinmorgan/hwylterm#HEAD" requires "https://github.com/daylinmorgan/hwylterm#9afc339"

View file

@ -1,10 +1,10 @@
## nix begat oizys ## nix begat oizys
import std/[os, tables, sequtils, strformat,strutils] import std/[os, tables, sequtils, strformat,strutils]
import cligen, hwylterm import hwylterm
import hwylterm/cli
import oizys/[context, github, nix, overlay, logging] import oizys/[context, github, nix, overlay, logging]
addHandler( addHandler(
newFancyConsoleLogger( newFancyConsoleLogger(
levelThreshold=lvlAll, levelThreshold=lvlAll,
@ -91,31 +91,11 @@ proc `//`(t1: Table[string, string], t2: Table[string, string]): Table[string, s
for k, v in t1.pairs(): result[k] = v for k, v in t1.pairs(): result[k] = v
for k, v in t2.pairs(): result[k] = v for k, v in t2.pairs(): result[k] = v
proc setupCligen() =
let isColor = getEnv("NO_COLOR") == ""
if clCfg.useMulti == "":
clCfg.useMulti =
if isColor: "${doc}\e[1mUsage\e[m:\n $command {SUBCMD} [sub-command options & parameters]\n\n\e[1msubcommands\e[m:\n$subcmds"
else: "${doc}Usage:\n $command {SUBCMD} [sub-command options & parameters]\n\nsubcommands:\n$subcmds"
if not isColor: return
if clCfg.helpAttr.len == 0:
clCfg.helpAttr = {"cmd": "\e[1;36m", "clDescrip": "", "clDflVal": "\e[33m",
"clOptKeys": "\e[32m", "clValType": "\e[31m", "args": "\e[3m"}.toTable()
clCfg.helpAttrOff = {"cmd": "\e[m", "clDescrip": "\e[m", "clDflVal": "\e[m",
"clOptKeys": "\e[m", "clValType": "\e[m", "args": "\e[m"}.toTable()
# clCfg.use does nothing?
clCfg.useHdr = "\e[1musage\e[m:\n "
when isMainModule: when isMainModule:
import cligen
checkExes() checkExes()
setupCligen() hwylCli(clCfg)
let (optOpen, optClose) =
if getEnv("NO_COLOR") == "": ("\e[1m","\e[m")
else: ("","")
let
usage = &"$command [flags]\n$doc{optOpen}Options{optClose}:\n$options"
osUsage = &"$command [subcmd] [flags]\n$doc{optOpen}Options{optClose}:\n$options"
const const
sharedHelp = { sharedHelp = {
@ -133,15 +113,18 @@ when isMainModule:
cacheHelp = { cacheHelp = {
"name" : "name of cachix binary cache" "name" : "name of cachix binary cache"
}.toTable() // sharedHelp }.toTable() // sharedHelp
let
# clUse must be set here using clCfg doesn't seem to work..
clUse* = $bb("$command $args\n${doc}[bold]Options[/]:\n$options")
osUsage = $bb("$command [[subcmd] $args\n$doc[bold]Options[/]:\n$options")
# setting clCfg.use wasn't working?
dispatchMulti( dispatchMulti(
[build, help = sharedHelp, usage = usage], [build, help = sharedHelp],
[cache, help = cacheHelp, usage = usage], [cache, help = cacheHelp ],
[ci, help = ciHelp, usage = usage], [ci, help = ciHelp ],
[dry, help = sharedHelp, usage = usage], [dry, help = sharedHelp],
[osCmd, help = sharedHelp, usage = osUsage, cmdName = "os"], [osCmd, help = sharedHelp, usage = osUsage, cmdName = "os"],
[output, help = sharedHelp, usage = usage], [output, help = sharedHelp],
[update, help = updateHelp, usage = usage], [update, help = updateHelp],
) )