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 6 7 7 [[ -d "$DATA_DIR" ]] # Ensure DATA_DIR is defined and exists 8 8 9 + # Drizzle will look for configuration in the working directory 10 + cd "$KARAKEEP_LIB_PATH/packages/db" 11 + 9 12 export RELEASE NODE_ENV 10 - exec "$KARAKEEP_LIB_PATH/node_modules/.bin/tsx" "$KARAKEEP_LIB_PATH/packages/db/migrate.ts" "$@" 13 + exec "$KARAKEEP_LIB_PATH/node_modules/.bin/drizzle-kit" migrate
+4 -1
pkgs/by-name/ka/karakeep/helpers/start-workers
··· 2 2 set -eu -o pipefail 3 3 KARAKEEP_LIB_PATH= 4 4 RELEASE= 5 + NODEJS= 5 6 NODE_ENV=production 6 7 NODE_PATH="$KARAKEEP_LIB_PATH/apps/workers" 7 8 8 9 [[ -d "$DATA_DIR" ]] # Ensure DATA_DIR is defined and exists 9 10 11 + cd "$KARAKEEP_LIB_PATH/apps/workers" 12 + 10 13 export RELEASE NODE_ENV NODE_PATH 11 - exec "$KARAKEEP_LIB_PATH/node_modules/.bin/tsx" "$KARAKEEP_LIB_PATH/apps/workers/index.ts" 14 + exec "$NODEJS/bin/node" "$KARAKEEP_LIB_PATH/apps/workers/dist/index.js"
+8 -4
pkgs/by-name/ka/karakeep/package.nix
··· 17 17 in 18 18 stdenv.mkDerivation (finalAttrs: { 19 19 pname = "karakeep"; 20 - version = "0.26.0"; 20 + version = "0.27.0"; 21 21 22 22 src = fetchFromGitHub { 23 23 owner = "karakeep-app"; 24 24 repo = "karakeep"; 25 25 tag = "v${finalAttrs.version}"; 26 - hash = "sha256-t5mQmrBrXc1wl5PRCdEHZvIEMxeCokrd0x4YhZU+qE0="; 26 + hash = "sha256-KkRCMS/g+xCQyVh1qB/kf5Seqrn2McYBaUHqKOeigCA="; 27 27 }; 28 28 29 29 patches = [ 30 30 ./patches/use-local-font.patch 31 - ./patches/fix-migrations-path.patch 32 31 ./patches/dont-lock-pnpm-version.patch 33 32 ]; 34 33 postPatch = '' ··· 54 53 }; 55 54 56 55 fetcherVersion = 1; 57 - hash = "sha256-8NdYEcslo9dxSyJbNWzO81/MrDLO+QyrhQN1hwM0/j4="; 56 + hash = "sha256-74jLff9v2+qc09b8ArooUX6qpFt2tDNW3ZayHPcDVj0="; 58 57 }; 59 58 buildPhase = '' 60 59 runHook preBuild ··· 74 73 75 74 echo "Building apps/cli" 76 75 pushd apps/cli 76 + pnpm run build 77 + popd 78 + 79 + echo "Building apps/workers" 80 + pushd apps/workers 77 81 pnpm run build 78 82 popd 79 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") });