opengist: 1.8.3 -> 1.8.4

Signed-off-by: phanirithvij <phanirithvij2000@gmail.com>
This commit is contained in:
phanirithvij
2024-12-16 11:39:42 +05:30
parent af5a5c982a
commit 0174036736

View File

@@ -1,5 +1,6 @@
{
lib,
stdenv,
buildGoModule,
buildNpmPackage,
fetchFromGitHub,
@@ -11,25 +12,17 @@
let
# finalAttrs when 🥺 (buildGoModule does not support them)
# https://github.com/NixOS/nixpkgs/issues/273815
version = "1.8.3";
version = "1.8.4";
src = fetchFromGitHub {
owner = "thomiceli";
repo = "opengist";
rev = "v${version}";
hash = "sha256-Wpn9rqOUwbwi6pbPTnVzHb+ip3ay9WykEZDyHNdXYJU=";
tag = "v${version}";
hash = "sha256-vpl3ztLHeVZndAwDgobfiI+3Xu3CFU38qgXy83p06As=";
};
frontend = buildNpmPackage {
pname = "opengist-frontend";
inherit version src;
patches = [
# fix lock file
# https://github.com/thomiceli/opengist/pull/395
(fetchpatch {
url = "https://github.com/thomiceli/opengist/pull/395/commits/f77c624f73f18010c7e4360287d0a3c013c21c9d.patch";
hash = "sha256-oCMt1HptH0jsi2cvv8wEP0+bpujx1jBxCjw0KMDGFfk=";
})
];
# npm complains of "invalid package". shrug. we can give it a version.
postPatch = ''
${lib.getExe jq} '.version = "${version}"' package.json | ${lib.getExe' moreutils "sponge"} package.json
@@ -47,7 +40,7 @@ let
cp -R public $out
'';
npmDepsHash = "sha256-fj2U8oRNfdIEnRkAOQQGiPyQFuWltLGkMzT2IQO60v0=";
npmDepsHash = "sha256-l09TPGBGhWcsl3x14ovilDd1zZWv4XzFCAmAfapKtAE=";
};
in
buildGoModule {
@@ -70,6 +63,8 @@ buildGoModule {
export OG_OPENGIST_HOME=$(mktemp -d)
'';
doCheck = !stdenv.hostPlatform.isDarwin;
checkPhase = ''
runHook preCheck
make test
@@ -89,7 +84,7 @@ buildGoModule {
description = "Self-hosted pastebin powered by Git";
homepage = "https://github.com/thomiceli/opengist";
license = lib.licenses.agpl3Only;
changelog = "https://github.com/thomiceli/opengist/blob/master/CHANGELOG.md";
changelog = "https://github.com/thomiceli/opengist/blob/${src.tag}/CHANGELOG.md";
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [ phanirithvij ];
mainProgram = "opengist";