nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
fork

Configure Feed

Select the types of activity you want to include in your feed.

nitter: patch source version/rev/url into about

authored by

Infinidoge and committed by
ehmry
b1429a1f 78bc5aad

+27
+10
pkgs/servers/nitter/default.nix
··· 2 2 , fetchFromGitHub 3 3 , nimPackages 4 4 , nixosTests 5 + , substituteAll 5 6 }: 6 7 7 8 nimPackages.buildNimPackage rec { ··· 15 14 rev = "138826fb4fbdec73fc6fee2e025fda88f7f2fb49"; 16 15 hash = "sha256-fdzVfzmEFIej6Kb/K9MQyvbN8aN3hO7RetHL53cD59k="; 17 16 }; 17 + 18 + patches = [ 19 + (substituteAll { 20 + src = ./nitter-version.patch; 21 + inherit version; 22 + inherit (src) rev; 23 + url = builtins.replaceStrings [ "archive" ".tar.gz" ] [ "commit" "" ] src.url; 24 + }) 25 + ]; 18 26 19 27 buildInputs = with nimPackages; [ 20 28 flatty
+17
pkgs/servers/nitter/nitter-version.patch
··· 1 + diff --git a/src/views/about.nim b/src/views/about.nim 2 + index e7e8de9..54a6050 100644 3 + --- a/src/views/about.nim 4 + +++ b/src/views/about.nim 5 + @@ -3,10 +3,8 @@ import os, strformat 6 + import karax/[karaxdsl, vdom] 7 + 8 + const 9 + - date = staticExec("git show -s --format=\"%cd\" --date=format:\"%Y.%m.%d\"") 10 + - hash = staticExec("git show -s --format=\"%h\"") 11 + - link = "https://github.com/zedeus/nitter/commit/" & hash 12 + - version = &"{date}-{hash}" 13 + + link = "@url@" 14 + + version = "@version@-@rev@" 15 + 16 + var aboutHtml: string 17 +