2022-06-16 17:23:12 +00:00
|
|
|
{ lib
|
2023-08-22 20:05:09 +00:00
|
|
|
, buildNimPackage
|
2022-06-16 17:23:12 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, nimPackages
|
|
|
|
, nixosTests
|
2022-11-21 17:40:18 +00:00
|
|
|
, substituteAll
|
2023-08-04 22:07:22 +00:00
|
|
|
, unstableGitUpdater
|
2023-08-22 20:05:09 +00:00
|
|
|
, flatty
|
|
|
|
, jester
|
|
|
|
, jsony
|
|
|
|
, karax
|
|
|
|
, markdown
|
|
|
|
, nimcrypto
|
|
|
|
, packedjson
|
|
|
|
, redis
|
|
|
|
, redpool
|
|
|
|
, sass
|
|
|
|
, supersnappy
|
|
|
|
, zippy
|
2022-06-16 17:23:12 +00:00
|
|
|
}:
|
2021-08-05 21:33:18 +00:00
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
buildNimPackage rec {
|
2021-08-05 21:33:18 +00:00
|
|
|
pname = "nitter";
|
2023-08-22 20:05:09 +00:00
|
|
|
version = "unstable-2023-08-08";
|
2021-08-05 21:33:18 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "zedeus";
|
|
|
|
repo = "nitter";
|
2023-08-22 20:05:09 +00:00
|
|
|
rev = "d7ca353a55ea3440a2ec1f09155951210a374cc7";
|
|
|
|
hash = "sha256-nlpUzbMkDzDk1n4X+9Wk7+qQk+KOfs5ID6euIfHBoa8=";
|
2021-08-05 21:33:18 +00:00
|
|
|
};
|
|
|
|
|
2022-11-21 17:40:18 +00:00
|
|
|
patches = [
|
|
|
|
(substituteAll {
|
|
|
|
src = ./nitter-version.patch;
|
|
|
|
inherit version;
|
|
|
|
inherit (src) rev;
|
|
|
|
url = builtins.replaceStrings [ "archive" ".tar.gz" ] [ "commit" "" ] src.url;
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
buildInputs = [
|
2022-06-16 17:23:12 +00:00
|
|
|
flatty
|
2021-09-23 15:35:13 +00:00
|
|
|
jester
|
2022-06-16 17:23:12 +00:00
|
|
|
jsony
|
2021-09-23 15:35:13 +00:00
|
|
|
karax
|
|
|
|
markdown
|
2022-06-16 17:23:12 +00:00
|
|
|
nimcrypto
|
2021-09-23 15:35:13 +00:00
|
|
|
packedjson
|
|
|
|
redis
|
2022-06-16 17:23:12 +00:00
|
|
|
redpool
|
|
|
|
sass
|
|
|
|
supersnappy
|
2022-01-23 02:10:13 +00:00
|
|
|
zippy
|
2021-09-23 15:35:13 +00:00
|
|
|
];
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
nimBinOnly = true;
|
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
nimFlags = [ "--mm:refc" ];
|
|
|
|
|
2021-09-23 15:35:13 +00:00
|
|
|
postBuild = ''
|
|
|
|
nim c --hint[Processing]:off -r tools/gencss
|
2022-05-18 14:49:53 +00:00
|
|
|
nim c --hint[Processing]:off -r tools/rendermd
|
2021-08-05 21:33:18 +00:00
|
|
|
'';
|
|
|
|
|
2021-09-23 15:35:13 +00:00
|
|
|
postInstall = ''
|
2021-08-05 21:33:18 +00:00
|
|
|
mkdir -p $out/share/nitter
|
|
|
|
cp -r public $out/share/nitter/public
|
|
|
|
'';
|
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
passthru = {
|
|
|
|
tests = { inherit (nixosTests) nitter; };
|
|
|
|
updateScript = unstableGitUpdater {};
|
|
|
|
};
|
|
|
|
|
2021-08-05 21:33:18 +00:00
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/zedeus/nitter";
|
2022-06-16 17:23:12 +00:00
|
|
|
description = "Alternative Twitter front-end";
|
2021-08-05 21:33:18 +00:00
|
|
|
license = licenses.agpl3Only;
|
2023-04-29 16:46:19 +00:00
|
|
|
maintainers = with maintainers; [ erdnaxe infinidoge ];
|
2021-10-09 14:59:57 +00:00
|
|
|
mainProgram = "nitter";
|
2021-08-05 21:33:18 +00:00
|
|
|
};
|
|
|
|
}
|