From 329053fcf7c824fc359d27ec69e46d3dd7718e9f Mon Sep 17 00:00:00 2001 From: blokyk Date: Sat, 20 Dec 2025 05:01:59 +0000 Subject: [PATCH] picoshare: init at 1.5.1 Co-authored-by: cybardev --- pkgs/by-name/pi/picoshare/package.nix | 46 +++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 pkgs/by-name/pi/picoshare/package.nix diff --git a/pkgs/by-name/pi/picoshare/package.nix b/pkgs/by-name/pi/picoshare/package.nix new file mode 100644 index 000000000000..b0663e81cf87 --- /dev/null +++ b/pkgs/by-name/pi/picoshare/package.nix @@ -0,0 +1,46 @@ +{ + lib, + buildGoModule, + fetchFromGitHub, + nix-update-script, + litestream, + litestreamSupport ? false, +}: + +buildGoModule (finalAttrs: { + pname = "picoshare"; + version = "1.5.1"; + + src = fetchFromGitHub { + owner = "mtlynch"; + repo = "picoshare"; + tag = finalAttrs.version; + hash = "sha256-8mgrwnY0Y1CggAtc7BrAqC32+Wu82FQNhoK0ijM1RKw="; + }; + + vendorHash = "sha256-Wf0qKs/9XKnO2nx2KmTGPdqI0iFih30AGvOi94RPEjw="; + + ldflags = [ + # make sure build time is always set to 0 to make the build reproducible + "-X github.com/mtlynch/picoshare/v2/build.unixTime=0" + # the app displays the version in the "system > information" menu + "-X github.com/mtlynch/picoshare/v2/build.Version=${finalAttrs.version}" + ]; + + buildInputs = lib.optional litestreamSupport litestream; + + passthru = { + updateScript = nix-update-script { }; + }; + + meta = { + description = "Minimalist, easy-to-host service for sharing images and other files"; + homepage = "https://github.com/mtlynch/picoshare"; + license = lib.licenses.agpl3Only; + platforms = lib.platforms.linux ++ lib.platforms.darwin; + mainProgram = "picoshare"; + maintainers = with lib.maintainers; [ + blokyk + ]; + }; +})