Compare commits

..

2 Commits

Author SHA1 Message Date
8cafd1a57d added flake.nix 2025-11-09 00:51:24 +01:00
39307d92e2 moved main from cmd to main.go 2025-11-09 00:51:04 +01:00
6 changed files with 84 additions and 6 deletions

View File

@@ -1,4 +1,4 @@
package main
package cmd
import (
"log"
@@ -18,7 +18,7 @@ type args struct {
Album string `arg:"--album" help:"UUID of a album to upload to"`
}
func main() {
func Run() {
var args args
arg.MustParse(&args)

27
flake.lock generated Normal file
View File

@@ -0,0 +1,27 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1762363567,
"narHash": "sha256-YRqMDEtSMbitIMj+JLpheSz0pwEr0Rmy5mC7myl17xs=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "ae814fd3904b621d8ab97418f1d0f2eb0d3716f4",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

39
flake.nix Normal file
View File

@@ -0,0 +1,39 @@
{
description = "Steam screenshot to Immich";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs =
{ nixpkgs, ... }:
let
systems = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
forAllSystems = nixpkgs.lib.genAttrs systems;
nixpkgsFor = forAllSystems (system: import nixpkgs { inherit system; });
in
{
packages = forAllSystems (
system:
let
pkgs = nixpkgsFor.${system};
in
{
default = pkgs.buildGoModule {
pname = "steamimmich";
version = "0.1.0";
src = ./.;
vendorHash = "sha256-lZ6wO1k0zwhlxhzNTU1jJz+liC9ly00StqkyrnuWSQM=";
};
}
);
};
}

7
go.mod
View File

@@ -2,7 +2,6 @@ module git.kapelle.org/niklas/steam-immich
go 1.24.6
require (
github.com/alexflint/go-arg v1.6.0 // indirect
github.com/alexflint/go-scalar v1.2.0 // indirect
)
require github.com/alexflint/go-arg v1.6.0
require github.com/alexflint/go-scalar v1.2.0 // indirect

6
go.sum
View File

@@ -2,6 +2,12 @@ github.com/alexflint/go-arg v1.6.0 h1:wPP9TwTPO54fUVQl4nZoxbFfKCcy5E6HBCumj1XVRS
github.com/alexflint/go-arg v1.6.0/go.mod h1:A7vTJzvjoaSTypg4biM5uYNTkJ27SkNTArtYXnlqVO8=
github.com/alexflint/go-scalar v1.2.0 h1:WR7JPKkeNpnYIOfHRa7ivM21aWAdHD0gEWHCx+WQBRw=
github.com/alexflint/go-scalar v1.2.0/go.mod h1:LoFvNMqS1CPrMVltza4LvnGKhaSpc3oyLEBUZVhhS2o=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
gopkg.in/yaml.v3 v3.0.0 h1:hjy8E9ON/egN1tAYqKb61G10WtihqetD4sz2H+8nIeA=
gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

7
main.go Normal file
View File

@@ -0,0 +1,7 @@
package main
import "git.kapelle.org/niklas/steam-immich/cmd"
func main() {
cmd.Run()
}