nixpkgs/pkgs/by-name/ni/nitter/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

54 lines
1.3 KiB
Nix
Raw Normal View History

2022-06-04 21:45:21 +03:00
{ lib
2023-08-02 16:31:42 +03:00
, buildNimPackage
2022-06-04 21:45:21 +03:00
, fetchFromGitHub
, nixosTests
, substituteAll
, unstableGitUpdater
2022-06-04 21:45:21 +03:00
}:
2021-07-23 19:17:25 +03:00
2023-10-31 03:19:36 +03:00
buildNimPackage (finalAttrs: prevAttrs: {
2021-07-23 19:17:25 +03:00
pname = "nitter";
version = "unstable-2024-02-26";
2021-07-23 19:17:25 +03:00
src = fetchFromGitHub {
owner = "zedeus";
repo = "nitter";
rev = "c6edec04901d0a37799499ed4c6921db640fb5a4";
hash = "sha256-N3d63nyVzUTa2+UemA1REFfVsw6iOVU8xUlYraR55m4=";
2021-07-23 19:17:25 +03:00
};
2023-10-31 03:19:36 +03:00
lockFile = ./lock.json;
patches = [
(substituteAll {
src = ./nitter-version.patch;
2023-10-31 03:19:36 +03:00
inherit (finalAttrs) version;
inherit (finalAttrs.src) rev;
url = builtins.replaceStrings [ "archive" ".tar.gz" ] [ "commit" "" ] finalAttrs.src.url;
})
];
2021-09-02 19:11:54 +03:00
postBuild = ''
2023-10-31 03:19:36 +03:00
nim compile ${toString finalAttrs.nimFlags} -r tools/gencss
nim compile ${toString finalAttrs.nimFlags} -r tools/rendermd
2021-07-23 19:17:25 +03:00
'';
2021-09-02 19:11:54 +03:00
postInstall = ''
2021-07-23 19:17:25 +03:00
mkdir -p $out/share/nitter
cp -r public $out/share/nitter/public
'';
passthru = {
tests = { inherit (nixosTests) nitter; };
updateScript = unstableGitUpdater { branch = "guest_accounts"; };
};
2021-07-23 19:17:25 +03:00
meta = with lib; {
homepage = "https://github.com/zedeus/nitter";
2022-06-04 21:45:21 +03:00
description = "Alternative Twitter front-end";
2021-07-23 19:17:25 +03:00
license = licenses.agpl3Only;
2023-04-09 21:35:35 +03:00
maintainers = with maintainers; [ erdnaxe infinidoge ];
2021-10-08 22:22:57 +03:00
mainProgram = "nitter";
2021-07-23 19:17:25 +03:00
};
2023-10-31 03:19:36 +03:00
})