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