From 017403673630bd6586393c5d2ed40127fbc315b4 Mon Sep 17 00:00:00 2001 From: phanirithvij Date: Mon, 16 Dec 2024 11:39:42 +0530 Subject: [PATCH] opengist: 1.8.3 -> 1.8.4 Signed-off-by: phanirithvij --- pkgs/by-name/op/opengist/package.nix | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/pkgs/by-name/op/opengist/package.nix b/pkgs/by-name/op/opengist/package.nix index 9c5fc9bd9652..459b7b2d29d6 100644 --- a/pkgs/by-name/op/opengist/package.nix +++ b/pkgs/by-name/op/opengist/package.nix @@ -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";