From 34bd692941f26db31e3f7faf63c51e15ea49ade9 Mon Sep 17 00:00:00 2001 From: jolheiser Date: Thu, 14 Sep 2023 19:51:11 -0500 Subject: [PATCH] feat: add opengist Signed-off-by: jolheiser --- default.nix | 1 + pkgs/opengist/default.nix | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 pkgs/opengist/default.nix diff --git a/default.nix b/default.nix index 581f1c8..99b959f 100644 --- a/default.nix +++ b/default.nix @@ -19,6 +19,7 @@ tmpl = pkgs.callPackage ./pkgs/tmpl {}; # Other projects + opengist = pkgs.callPackage ./pkgs/opengist {}; prospect-mail = pkgs.callPackage ./pkgs/prospect-mail {}; tclip = pkgs.callPackage ./pkgs/tclip {}; } diff --git a/pkgs/opengist/default.nix b/pkgs/opengist/default.nix new file mode 100644 index 0000000..7a88017 --- /dev/null +++ b/pkgs/opengist/default.nix @@ -0,0 +1,27 @@ +{ + buildGoModule, + fetchFromGitHub, + lib, + ... +}: +buildGoModule rec { + pname = "opengist"; + version = "1.4.2"; + + src = fetchFromGitHub { + owner = "thomiceli"; + repo = "opengist"; + rev = "v${version}"; + sha256 = "sha256-pDqjoeoVcsbLkAW9EGvIekeMoBqe6YR8LRgTiKS1wLA="; + }; + + vendorSha256 = "sha256-6qLiflF7ncQ6yXAAcxm9P4ZNFMOwPleKmmu1q6CpiXY="; + + ldflags = ["-s" "-w" "-X=github.com/thomicelia/opengist/internal/config.OpengistVersion.Version=${version}"]; + + meta = with lib; { + description = "Self-hosted pastebin powered by Git, open-source alternative to Github Gist. "; + homepage = "https://github.com/thomiceli/opengist"; + license = licenses.agpl3; + }; +}