Unverified Commit b56ac23d authored by isabel's avatar isabel Committed by GitHub
Browse files

picoshare: init at 1.5.1 (#472616)

parents 2308e0bb 329053fc
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -3601,6 +3601,12 @@
    githubId = 37768199;
    name = "Christian Bergschneider";
  };
  blokyk = {
    email = "pro@zoeee.net";
    github = "blokyk";
    githubId = 32983140;
    name = "Zoë Courvoisier";
  };
  bloominstrong = {
    email = "github@mail.bloominstrong.net";
    github = "bloominstrong";
+46 −0
Original line number Diff line number Diff line
{
  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
    ];
  };
})