tiddlywiki: migrate from nodePackages

This commit is contained in:
dish
2025-11-10 10:44:51 -05:00
parent bd16d452b0
commit 727d02790a
4 changed files with 44 additions and 19 deletions

View File

@@ -0,0 +1,43 @@
{
lib,
stdenv,
fetchFromGitHub,
makeBinaryWrapper,
nodejs,
nix-update-script,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "tiddlywiki";
version = "5.3.8";
src = fetchFromGitHub {
owner = "tiddlywiki";
repo = "tiddlywiki5";
tag = "v${finalAttrs.version}";
hash = "sha256-nBBjD9JB4tliRJ5N1aK3pc9PzCHG1fByj7vWtKnNEzI=";
};
nativeBuildInputs = [
makeBinaryWrapper
nodejs
];
installPhase = ''
mkdir -p $out/lib/node_modules/tiddlywiki/
mv * $out/lib/node_modules/tiddlywiki/
makeWrapper ${lib.getExe nodejs} $out/bin/tiddlywiki \
--add-flags "$out/lib/node_modules/tiddlywiki/tiddlywiki.js"
'';
passthru.updateScript = nix-update-script { };
meta = {
description = "Self-contained JavaScript wiki for the browser, Node.js, AWS Lambda etc";
homepage = "https://tiddlywiki.com";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ pyrox0 ];
mainProgram = "tiddlywiki";
};
})

View File

@@ -348,6 +348,7 @@ mapAliases {
thelounge-theme-zenburn-monospace = throw "thelounge-theme-zenburn-monospace has been removed because thelounge was moved out of nodePackages"; # added 2025-03-12
thelounge-theme-zenburn-sourcecodepro = throw "thelounge-theme-zenburn-sourcecodepro has been removed because thelounge was moved out of nodePackages"; # added 2025-03-12
three = throw "three was removed because it was no longer needed"; # Added 2023-09-08
inherit (pkgs) tiddlywiki; # Added 2025-11-10
triton = pkgs.triton; # Added 2023-05-06
ts-node = throw "'ts-node' was removed because it is unmaintained, and since NodeJS 22.6.0+, experimental TypeScript support is built-in to NodeJS."; # Added 2025-11-07
typescript = pkgs.typescript; # Added 2023-06-21

View File

@@ -61,7 +61,6 @@
, "semver"
, "sloc"
, "smartdc"
, "tiddlywiki"
, "tsun"
, "ttf2eot"
, "vega-cli"

View File

@@ -37012,24 +37012,6 @@ in
bypassCache = true;
reconstructLock = true;
};
tiddlywiki = nodeEnv.buildNodePackage {
name = "tiddlywiki";
packageName = "tiddlywiki";
version = "5.3.6";
src = fetchurl {
url = "https://registry.npmjs.org/tiddlywiki/-/tiddlywiki-5.3.6.tgz";
sha512 = "RfWt+Bo/UsTdzP5N4nEInjaJjgAzylUMf21hE4FL5v65c3x054+A+3g3sgW1m68lTJbTbiiqSZ6q6BEIZMwhSQ==";
};
buildInputs = globalBuildInputs;
meta = {
description = "a non-linear personal web notebook";
homepage = "https://github.com/TiddlyWiki/TiddlyWiki5#readme";
license = "BSD";
};
production = true;
bypassCache = true;
reconstructLock = true;
};
tsun = nodeEnv.buildNodePackage {
name = "tsun";
packageName = "tsun";