karakeep: 0.26.0 -> 0.27.0

Co-authored-by: Tim Englart <timenglartdev@gmail.com>

+16 -21
+4 -1
pkgs/by-name/ka/karakeep/helpers/migrate
··· 6 7 [[ -d "$DATA_DIR" ]] # Ensure DATA_DIR is defined and exists 8 9 export RELEASE NODE_ENV 10 - exec "$KARAKEEP_LIB_PATH/node_modules/.bin/tsx" "$KARAKEEP_LIB_PATH/packages/db/migrate.ts" "$@"
··· 6 7 [[ -d "$DATA_DIR" ]] # Ensure DATA_DIR is defined and exists 8 9 + # Drizzle will look for configuration in the working directory 10 + cd "$KARAKEEP_LIB_PATH/packages/db" 11 + 12 export RELEASE NODE_ENV 13 + exec "$KARAKEEP_LIB_PATH/node_modules/.bin/drizzle-kit" migrate
+4 -1
pkgs/by-name/ka/karakeep/helpers/start-workers
··· 2 set -eu -o pipefail 3 KARAKEEP_LIB_PATH= 4 RELEASE= 5 NODE_ENV=production 6 NODE_PATH="$KARAKEEP_LIB_PATH/apps/workers" 7 8 [[ -d "$DATA_DIR" ]] # Ensure DATA_DIR is defined and exists 9 10 export RELEASE NODE_ENV NODE_PATH 11 - exec "$KARAKEEP_LIB_PATH/node_modules/.bin/tsx" "$KARAKEEP_LIB_PATH/apps/workers/index.ts"
··· 2 set -eu -o pipefail 3 KARAKEEP_LIB_PATH= 4 RELEASE= 5 + NODEJS= 6 NODE_ENV=production 7 NODE_PATH="$KARAKEEP_LIB_PATH/apps/workers" 8 9 [[ -d "$DATA_DIR" ]] # Ensure DATA_DIR is defined and exists 10 11 + cd "$KARAKEEP_LIB_PATH/apps/workers" 12 + 13 export RELEASE NODE_ENV NODE_PATH 14 + exec "$NODEJS/bin/node" "$KARAKEEP_LIB_PATH/apps/workers/dist/index.js"
+8 -4
pkgs/by-name/ka/karakeep/package.nix
··· 17 in 18 stdenv.mkDerivation (finalAttrs: { 19 pname = "karakeep"; 20 - version = "0.26.0"; 21 22 src = fetchFromGitHub { 23 owner = "karakeep-app"; 24 repo = "karakeep"; 25 tag = "v${finalAttrs.version}"; 26 - hash = "sha256-t5mQmrBrXc1wl5PRCdEHZvIEMxeCokrd0x4YhZU+qE0="; 27 }; 28 29 patches = [ 30 ./patches/use-local-font.patch 31 - ./patches/fix-migrations-path.patch 32 ./patches/dont-lock-pnpm-version.patch 33 ]; 34 postPatch = '' ··· 54 }; 55 56 fetcherVersion = 1; 57 - hash = "sha256-8NdYEcslo9dxSyJbNWzO81/MrDLO+QyrhQN1hwM0/j4="; 58 }; 59 buildPhase = '' 60 runHook preBuild ··· 74 75 echo "Building apps/cli" 76 pushd apps/cli 77 pnpm run build 78 popd 79
··· 17 in 18 stdenv.mkDerivation (finalAttrs: { 19 pname = "karakeep"; 20 + version = "0.27.0"; 21 22 src = fetchFromGitHub { 23 owner = "karakeep-app"; 24 repo = "karakeep"; 25 tag = "v${finalAttrs.version}"; 26 + hash = "sha256-KkRCMS/g+xCQyVh1qB/kf5Seqrn2McYBaUHqKOeigCA="; 27 }; 28 29 patches = [ 30 ./patches/use-local-font.patch 31 ./patches/dont-lock-pnpm-version.patch 32 ]; 33 postPatch = '' ··· 53 }; 54 55 fetcherVersion = 1; 56 + hash = "sha256-74jLff9v2+qc09b8ArooUX6qpFt2tDNW3ZayHPcDVj0="; 57 }; 58 buildPhase = '' 59 runHook preBuild ··· 73 74 echo "Building apps/cli" 75 pushd apps/cli 76 + pnpm run build 77 + popd 78 + 79 + echo "Building apps/workers" 80 + pushd apps/workers 81 pnpm run build 82 popd 83
-15
pkgs/by-name/ka/karakeep/patches/fix-migrations-path.patch
··· 1 - Without this change the migrations script will fail if the working directory 2 - isn't the same directory this file is located in. To improve usability we 3 - specify the migrations folder relative to __dirname, which doesn't depend on the 4 - working directory. 5 - 6 - --- 7 - --- a/packages/db/migrate.ts 8 - +++ b/packages/db/migrate.ts 9 - @@ -1,4 +1,5 @@ 10 - import { db } from "./drizzle"; 11 - import { migrate } from "drizzle-orm/better-sqlite3/migrator"; 12 - +import path from "path"; 13 - 14 - -migrate(db, { migrationsFolder: "./drizzle" }); 15 - +migrate(db, { migrationsFolder: path.join(__dirname, "./drizzle") });
···