hoarder: 0.23.0 -> 0.23.2, rename to karakeep
This commit is contained in:
@@ -1,5 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eu -o pipefail
|
||||
HOARDER_LIB_PATH=
|
||||
NODEJS=
|
||||
exec "$NODEJS/bin/node" "$HOARDER_LIB_PATH/apps/cli/dist/index.mjs" "$@"
|
||||
Executable
+5
@@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eu -o pipefail
|
||||
KARAKEEP_LIB_PATH=
|
||||
NODEJS=
|
||||
exec "$NODEJS/bin/node" "$KARAKEEP_LIB_PATH/apps/cli/dist/index.mjs" "$@"
|
||||
@@ -1,10 +1,10 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eu -o pipefail
|
||||
HOARDER_LIB_PATH=
|
||||
KARAKEEP_LIB_PATH=
|
||||
RELEASE=
|
||||
NODE_ENV=production
|
||||
|
||||
[[ -d "$DATA_DIR" ]] # Ensure DATA_DIR is defined and exists
|
||||
|
||||
export RELEASE NODE_ENV
|
||||
exec "$HOARDER_LIB_PATH/node_modules/.bin/tsx" "$HOARDER_LIB_PATH/packages/db/migrate.ts" "$@"
|
||||
exec "$KARAKEEP_LIB_PATH/node_modules/.bin/tsx" "$KARAKEEP_LIB_PATH/packages/db/migrate.ts" "$@"
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eu -o pipefail
|
||||
HOARDER_LIB_PATH=
|
||||
KARAKEEP_LIB_PATH=
|
||||
RELEASE=
|
||||
NODEJS=
|
||||
NODE_ENV=production
|
||||
@@ -8,4 +8,4 @@ NODE_ENV=production
|
||||
[[ -d "$DATA_DIR" ]] # Ensure DATA_DIR is defined and exists
|
||||
|
||||
export RELEASE NODE_ENV
|
||||
exec "$NODEJS/bin/node" "$HOARDER_LIB_PATH/apps/web/.next/standalone/apps/web/server.js"
|
||||
exec "$NODEJS/bin/node" "$KARAKEEP_LIB_PATH/apps/web/.next/standalone/apps/web/server.js"
|
||||
+3
-3
@@ -1,11 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eu -o pipefail
|
||||
HOARDER_LIB_PATH=
|
||||
KARAKEEP_LIB_PATH=
|
||||
RELEASE=
|
||||
NODE_ENV=production
|
||||
NODE_PATH="$HOARDER_LIB_PATH/apps/workers"
|
||||
NODE_PATH="$KARAKEEP_LIB_PATH/apps/workers"
|
||||
|
||||
[[ -d "$DATA_DIR" ]] # Ensure DATA_DIR is defined and exists
|
||||
|
||||
export RELEASE NODE_ENV NODE_PATH
|
||||
exec "$HOARDER_LIB_PATH/node_modules/.bin/tsx" "$HOARDER_LIB_PATH/apps/workers/index.ts"
|
||||
exec "$KARAKEEP_LIB_PATH/node_modules/.bin/tsx" "$KARAKEEP_LIB_PATH/apps/workers/index.ts"
|
||||
@@ -14,14 +14,14 @@ let
|
||||
pnpm = pnpm_9;
|
||||
in
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "hoarder";
|
||||
version = "0.23.0";
|
||||
pname = "karakeep";
|
||||
version = "0.23.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "hoarder-app";
|
||||
repo = "hoarder";
|
||||
owner = "karakeep-app";
|
||||
repo = "karakeep";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-ro2+jXfp83JfQ9HQr0imy7aohSFbH5J6Wx5bxhMT5TM=";
|
||||
hash = "sha256-Cm6e1XEmMHzQ3vODxa9+Yuwt+9zLvQ9S7jmwAozjA/k=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
@@ -52,7 +52,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
'';
|
||||
};
|
||||
|
||||
hash = "sha256-FzQPBIwe7OQ1KHaMtWaFe+RI+pXko5Ly11/jOmYSuFA=";
|
||||
hash = "sha256-HZb11CAbnlGSmP/Gxyjncd/RuIWkPv3GvwYs9QZ12Ss=";
|
||||
};
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
@@ -81,56 +81,56 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/share/doc/hoarder
|
||||
cp README.md LICENSE $out/share/doc/hoarder
|
||||
mkdir -p $out/share/doc/karakeep
|
||||
cp README.md LICENSE $out/share/doc/karakeep
|
||||
|
||||
# Copy necessary files into lib/hoarder while keeping the directory structure
|
||||
# Copy necessary files into lib/karakeep while keeping the directory structure
|
||||
LIB_TO_COPY="node_modules apps/web/.next/standalone apps/cli/dist apps/workers packages/db packages/shared packages/trpc"
|
||||
HOARDER_LIB_PATH="$out/lib/hoarder"
|
||||
KARAKEEP_LIB_PATH="$out/lib/karakeep"
|
||||
for DIR in $LIB_TO_COPY; do
|
||||
mkdir -p "$HOARDER_LIB_PATH/$DIR"
|
||||
cp -a $DIR/{.,}* "$HOARDER_LIB_PATH/$DIR"
|
||||
chmod -R u+w "$HOARDER_LIB_PATH/$DIR"
|
||||
mkdir -p "$KARAKEEP_LIB_PATH/$DIR"
|
||||
cp -a $DIR/{.,}* "$KARAKEEP_LIB_PATH/$DIR"
|
||||
chmod -R u+w "$KARAKEEP_LIB_PATH/$DIR"
|
||||
done
|
||||
|
||||
# NextJS requires static files are copied in a specific way
|
||||
# https://nextjs.org/docs/pages/api-reference/config/next-config-js/output#automatically-copying-traced-files
|
||||
cp -r ./apps/web/public "$HOARDER_LIB_PATH/apps/web/.next/standalone/apps/web/"
|
||||
cp -r ./apps/web/.next/static "$HOARDER_LIB_PATH/apps/web/.next/standalone/apps/web/.next/"
|
||||
cp -r ./apps/web/public "$KARAKEEP_LIB_PATH/apps/web/.next/standalone/apps/web/"
|
||||
cp -r ./apps/web/.next/static "$KARAKEEP_LIB_PATH/apps/web/.next/standalone/apps/web/.next/"
|
||||
|
||||
# Copy and patch helper scripts
|
||||
for HELPER_SCRIPT in ${./helpers}/*; do
|
||||
HELPER_SCRIPT_NAME="$(basename "$HELPER_SCRIPT")"
|
||||
cp "$HELPER_SCRIPT" "$HOARDER_LIB_PATH/"
|
||||
substituteInPlace "$HOARDER_LIB_PATH/$HELPER_SCRIPT_NAME" \
|
||||
--replace-warn "HOARDER_LIB_PATH=" "HOARDER_LIB_PATH=$HOARDER_LIB_PATH" \
|
||||
cp "$HELPER_SCRIPT" "$KARAKEEP_LIB_PATH/"
|
||||
substituteInPlace "$KARAKEEP_LIB_PATH/$HELPER_SCRIPT_NAME" \
|
||||
--replace-warn "KARAKEEP_LIB_PATH=" "KARAKEEP_LIB_PATH=$KARAKEEP_LIB_PATH" \
|
||||
--replace-warn "RELEASE=" "RELEASE=${finalAttrs.version}" \
|
||||
--replace-warn "NODEJS=" "NODEJS=${nodejs}"
|
||||
chmod +x "$HOARDER_LIB_PATH/$HELPER_SCRIPT_NAME"
|
||||
patchShebangs "$HOARDER_LIB_PATH/$HELPER_SCRIPT_NAME"
|
||||
chmod +x "$KARAKEEP_LIB_PATH/$HELPER_SCRIPT_NAME"
|
||||
patchShebangs "$KARAKEEP_LIB_PATH/$HELPER_SCRIPT_NAME"
|
||||
done
|
||||
|
||||
# The cli should be in bin/
|
||||
mkdir -p $out/bin
|
||||
mv "$HOARDER_LIB_PATH/hoarder-cli" $out/bin/
|
||||
mv "$KARAKEEP_LIB_PATH/karakeep" $out/bin/
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
# Remove large dependencies that are not necessary during runtime
|
||||
rm -rf $out/lib/hoarder/node_modules/{@next,next,@swc,react-native,monaco-editor,faker,@typescript-eslint,@microsoft,@typescript-eslint,pdfjs-dist}
|
||||
rm -rf $out/lib/karakeep/node_modules/{@next,next,@swc,react-native,monaco-editor,faker,@typescript-eslint,@microsoft,@typescript-eslint,pdfjs-dist}
|
||||
|
||||
# Remove broken symlinks
|
||||
find $out -type l ! -exec test -e {} \; -delete
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = "https://github.com/hoarder-app/hoarder";
|
||||
description = "Self-hostable bookmark-everything app with a touch of AI for the data hoarders out there";
|
||||
homepage = "https://karakeep.app/";
|
||||
description = "Self-hostable bookmark-everything app (links, notes and images) with AI-based automatic tagging and full text search";
|
||||
license = lib.licenses.agpl3Only;
|
||||
maintainers = [ lib.maintainers.three ];
|
||||
mainProgram = "hoarder-cli";
|
||||
mainProgram = "karakeep";
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
})
|
||||
@@ -812,6 +812,7 @@ mapAliases {
|
||||
haven-cli = throw "'haven-cli' has been removed due to the official announcement of the project closure. Read more at https://havenprotocol.org/2024/12/12/project-closure-announcement"; # Added 2025-02-25
|
||||
HentaiAtHome = hentai-at-home; # Added 2024-06-12
|
||||
hll2390dw-cups = throw "The hll2390dw-cups package was dropped since it was unmaintained."; # Added 2024-06-21
|
||||
hoarder = throw "'hoarder' has been renamed to 'karakeep'"; # Added 2025-04-21
|
||||
hop-cli = throw "hop-cli has been removed as the service has been shut-down"; # Added 2024-08-13
|
||||
hpp-fcl = coal; # Added 2024-11-15
|
||||
ht-rust = throw "'ht-rust' has been renamed to/replaced by 'xh'"; # Converted to throw 2024-10-17
|
||||
|
||||
Reference in New Issue
Block a user