added nix flake
This commit is contained in:
parent
3138d0f6ff
commit
6f3b20d737
6 changed files with 124 additions and 29 deletions
1
.envrc
Normal file
1
.envrc
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
use flake
|
||||||
31
.gitignore
vendored
31
.gitignore
vendored
|
|
@ -1,26 +1,5 @@
|
||||||
# If you prefer the allow list template instead of the deny list, see community template:
|
.direnv
|
||||||
# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore
|
GoCalTui
|
||||||
#
|
bin
|
||||||
# Binaries for programs and plugins
|
result
|
||||||
*.exe
|
data
|
||||||
*.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
|
|
||||||
|
|
|
||||||
40
flake.lock
generated
Normal file
40
flake.lock
generated
Normal file
|
|
@ -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
|
||||||
|
}
|
||||||
76
flake.nix
Normal file
76
flake.nix
Normal file
|
|
@ -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";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
);
|
||||||
|
};
|
||||||
|
}
|
||||||
3
go.mod
3
go.mod
|
|
@ -1,5 +1,4 @@
|
||||||
module speccon18/yunodo_redux
|
module speccon18/yunodo
|
||||||
|
|
||||||
go 1.23.4
|
go 1.23.4
|
||||||
|
|
||||||
require github.com/spf13/cobra v1.9.1
|
require github.com/spf13/cobra v1.9.1
|
||||||
|
|
|
||||||
2
main.go
2
main.go
|
|
@ -4,7 +4,7 @@ Copyright © 2025 Steven Carpenter <steven.carpenter@skdevstudios.com>
|
||||||
|
|
||||||
package main
|
package main
|
||||||
//TODO: P:4 testing todo in other file
|
//TODO: P:4 testing todo in other file
|
||||||
import "speccon18/yunodo_redux/cmd"
|
import "speccon18/yunodo/cmd"
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
cmd.Execute()
|
cmd.Execute()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue