Commit 727d0279 authored by dish's avatar dish
Browse files

tiddlywiki: migrate from nodePackages

parent bd16d452
Loading
Loading
Loading
Loading
+43 −0
Original line number Diff line number Diff line
{
  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";
  };
})
+1 −0
Original line number Diff line number Diff line
@@ -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
+0 −1
Original line number Diff line number Diff line
@@ -61,7 +61,6 @@
, "semver"
, "sloc"
, "smartdc"
, "tiddlywiki"
, "tsun"
, "ttf2eot"
, "vega-cli"
+0 −18
Original line number Diff line number Diff line
@@ -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";