diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..3550a30 --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use flake diff --git a/.gitignore b/.gitignore index dfe1a36..8d58c0e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,26 +1,5 @@ -# If you prefer the allow list template instead of the deny list, see community template: -# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore -# -# Binaries for programs and plugins -*.exe -*.exe~ -*.dll -*.so -*.dylib -yunodo_redux - -# Test binary, built with `go test -c` -*.test - -# Output of the go coverage tool, specifically when used with LiteIDE -*.out - -# Dependency directories (remove the comment below to include it) -# vendor/ - -# Go workspace file -go.work -go.work.sum - -# env file -.env +.direnv +GoCalTui +bin +result +data diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..04d9f21 --- /dev/null +++ b/flake.lock @@ -0,0 +1,40 @@ +{ + "nodes": { + "flake-schemas": { + "locked": { + "lastModified": 1721999734, + "narHash": "sha256-G5CxYeJVm4lcEtaO87LKzOsVnWeTcHGKbKxNamNWgOw=", + "rev": "0a5c42297d870156d9c57d8f99e476b738dcd982", + "revCount": 75, + "type": "tarball", + "url": "https://api.flakehub.com/f/pinned/DeterminateSystems/flake-schemas/0.1.5/0190ef2f-61e0-794b-ba14-e82f225e55e6/source.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://flakehub.com/f/DeterminateSystems/flake-schemas/%2A" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1752308619, + "narHash": "sha256-pzrVLKRQNPrii06Rm09Q0i0dq3wt2t2pciT/GNq5EZQ=", + "rev": "650e572363c091045cdbc5b36b0f4c1f614d3058", + "revCount": 806273, + "type": "tarball", + "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.2505.806273%2Brev-650e572363c091045cdbc5b36b0f4c1f614d3058/019804de-4447-7b40-88ef-4e58b0e7553e/source.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://flakehub.com/f/NixOS/nixpkgs/%2A" + } + }, + "root": { + "inputs": { + "flake-schemas": "flake-schemas", + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..e400cac --- /dev/null +++ b/flake.nix @@ -0,0 +1,76 @@ +# This flake was initially generated by fh, the CLI for FlakeHub (version 0.1.22) +{ + # A helpful description of your flake + description = "a go calander tui"; + + # Flake inputs + inputs = { + flake-schemas.url = "https://flakehub.com/f/DeterminateSystems/flake-schemas/*"; + + nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/*"; + }; + + # Flake outputs that other flakes can use + outputs = + { + self, + flake-schemas, + nixpkgs, + }: + let + # Helpers for producing system-specific outputs + supportedSystems = [ "x86_64-linux" ]; + forEachSupportedSystem = + f: + nixpkgs.lib.genAttrs supportedSystems ( + system: + f { + inherit (nixpkgs) lib; + pkgs = import nixpkgs { inherit system; }; + } + ); + in + { + # Schemas tell Nix about the structure of your flake's outputs + schemas = flake-schemas.schemas; + packages = forEachSupportedSystem ( + { pkgs, lib }: + { + default = pkgs.callPackage ( + { buildGoModule }: + buildGoModule { + pname = "yunodo"; + version = "0.0.1"; + src = builtins.path { + name = "source"; + path = ./.; + }; + vendorHash = "sha256-m5mBubfbXXqXKsygF5j7cHEY+bXhAMcXUts5KBKoLzM="; + } + ) { }; + } + ); + # Development environments + devShells = forEachSupportedSystem ( + { pkgs, ... }: + { + default = pkgs.mkShell { + # Pinned packages available in the environment + packages = with pkgs; [ + just + gcc + go_1_23 + nixpkgs-fmt + protobuf + badger + protoc-gen-go + ]; + env = { + CGO_ENABLED = "1"; + CC = "gcc"; + }; + }; + } + ); + }; +} diff --git a/go.mod b/go.mod index 08c03e9..82d68c1 100644 --- a/go.mod +++ b/go.mod @@ -1,5 +1,4 @@ -module speccon18/yunodo_redux - +module speccon18/yunodo go 1.23.4 require github.com/spf13/cobra v1.9.1 diff --git a/main.go b/main.go index dbed8c8..e0457f0 100644 --- a/main.go +++ b/main.go @@ -4,7 +4,7 @@ Copyright © 2025 Steven Carpenter package main //TODO: P:4 testing todo in other file -import "speccon18/yunodo_redux/cmd" +import "speccon18/yunodo/cmd" func main() { cmd.Execute()