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
|
|
|
|
, nixosTests
|
2022-11-21 17:40:18 +00:00
|
|
|
, substituteAll
|
2023-08-04 22:07:22 +00:00
|
|
|
, unstableGitUpdater
|
2022-06-16 17:23:12 +00:00
|
|
|
}:
|
2021-08-05 21:33:18 +00:00
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
buildNimPackage (finalAttrs: prevAttrs: {
|
2021-08-05 21:33:18 +00:00
|
|
|
pname = "nitter";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "unstable-2024-02-26";
|
2021-08-05 21:33:18 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "zedeus";
|
|
|
|
repo = "nitter";
|
2024-04-21 15:54:59 +00:00
|
|
|
rev = "c6edec04901d0a37799499ed4c6921db640fb5a4";
|
|
|
|
hash = "sha256-N3d63nyVzUTa2+UemA1REFfVsw6iOVU8xUlYraR55m4=";
|
2021-08-05 21:33:18 +00:00
|
|
|
};
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
lockFile = ./lock.json;
|
|
|
|
|
2022-11-21 17:40:18 +00:00
|
|
|
patches = [
|
|
|
|
(substituteAll {
|
|
|
|
src = ./nitter-version.patch;
|
2024-01-02 11:29:13 +00:00
|
|
|
inherit (finalAttrs) version;
|
|
|
|
inherit (finalAttrs.src) rev;
|
|
|
|
url = builtins.replaceStrings [ "archive" ".tar.gz" ] [ "commit" "" ] finalAttrs.src.url;
|
2022-11-21 17:40:18 +00:00
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2021-09-23 15:35:13 +00:00
|
|
|
postBuild = ''
|
2024-01-02 11:29:13 +00:00
|
|
|
nim compile ${toString finalAttrs.nimFlags} -r tools/gencss
|
|
|
|
nim compile ${toString finalAttrs.nimFlags} -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; };
|
2024-01-02 11:29:13 +00:00
|
|
|
updateScript = unstableGitUpdater { branch = "guest_accounts"; };
|
2023-08-04 22:07:22 +00:00
|
|
|
};
|
|
|
|
|
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
|
|
|
};
|
2024-01-02 11:29:13 +00:00
|
|
|
})
|