Skip to content

Commit

Permalink
replace ncps with ncps-db-helper
Browse files Browse the repository at this point in the history
  • Loading branch information
42LoCo42 committed Jan 22, 2025
1 parent d53b6eb commit dfe0a85
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 49 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ A personal collection of unusual things
|`SDL3`|`3.1.6`|Simple Directmedia Layer|https://libsdl.org|
|`agregore`|`2.4.0`|A minimal browser for the distributed web|https://github.com/AgregoreWeb/agregore-browser|
|`argtable2`|`2.13`|An ANSI C command line parser|https://argtable.sourceforge.io|
|`avh`|`n/a`|AvH video storage|https://github.com/42LoCo42/avh|
|`avh`|``|AvH video storage|https://github.com/42LoCo42/avh|
|`bedrockdb`|`2023-10-25`|Rock solid distributed database specializing in active/active automatic failover and WAN replication|https://bedrockdb.com|
|`capnp-go`|`3.0.0-alpha.30`|Cap'n Proto library and code generator for Go|https://github.com/capnproto/go-capnp|
|`chronometer`|`1`|The Chronometer of Endless Whimsy!|https://github.com/42LoCo42/chronometer|
Expand Down Expand Up @@ -46,11 +46,11 @@ A personal collection of unusual things
|`mwxml2sql`|`2017-11-02`|Convert Mediawiki XML dumps to SQL|https://gerrit.wikimedia.org/g/operations/dumps/import-tools|
|`my-htop`|`5d778ea`|htop with sorting in tree mode fixed|https://htop.dev|
|`nchess`|`0.0`|A curses based, UCI compatible, chess gui|https://github.com/spinojara/nchess|
|`ncps`|`0.1.1`|Nix binary cache proxy service -- with local caching and signing|https://github.com/kalbasit/ncps|
|`ncps-db-helper`|``|Wrap ncps with automatic database creation||
|`nvflash`|`5.833.0`|NVIDIA NVFlash is used to flash the graphics card BIOS on Ampere, Turing, Pascal and all older NVIDIA cards|https://www.techpowerup.com/download/nvidia-nvflash|
|`pcr-oracle`|`0.5.4`|Predict TPM PCR values for future boot|https://github.com/okirch/pcr-oracle|
|`photoview`|`v2.4.0`|Photo gallery for self-hosted personal servers|https://photoview.github.io|
|`pinlist`|`n/a`|Super simple text/link pinlist tool|https://github.com/42LoCo42/pinlist|
|`pinlist`|``|Super simple text/link pinlist tool|https://github.com/42LoCo42/pinlist|
|`prettier-plugin-go-template`|`d91c82e`|Fixes prettier formatting for go templates|https://github.com/NiklasPor/prettier-plugin-go-template|
|`proton-mail-export`|`1.0.4`|Proton Mail Export allows you to export your emails as eml files|https://github.com/ProtonMail/proton-mail-export|
|`pug`|`3.0.1`|Pug 3 CLI interface|https://github.com/tokilabs/pug3-cli|
Expand Down
2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@

readme = pipe self.packages.${pkgs.system} [
(mapAttrsToList (name: p:
"|`${name}`|`${p.version or "n/a"}`|${p.meta.description or ""}|${p.meta.homepage or ""}|"))
"|`${name}`|`${p.version or ""}`|${p.meta.description or ""}|${p.meta.homepage or ""}|"))
(x: pipe x [
(builtins.concatStringsSep "\n")
(s: pipe ./README.md.in [
Expand Down
17 changes: 17 additions & 0 deletions packages/ncps-db-helper/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
pkgs: pkgs.writeShellApplication rec {
name = "ncps-db-helper";

runtimeInputs = with pkgs; [ coreutils dbmate ];
text = pkgs.lib.pipe ./main.sh [
builtins.readFile
(builtins.replaceStrings [ "@bin@" "@mgr@" ] [
(pkgs.lib.getExe pkgs.ncps)
"${pkgs.ncps}/share/ncps/db/migrations"
])
];

meta = {
description = "Wrap ncps with automatic database creation";
mainProgram = name;
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ fi

db="$cache/db.sqlite"
mkdir -p "$(dirname "$db")"
dbmate --url "sqlite:$db" --migrations-dir "@src@/db/migrations" up
dbmate --url "sqlite:$db" --migrations-dir "@mgr@" up

exec "@bin@" "${args[@]}" --cache-database-url "sqlite:$db"
44 changes: 0 additions & 44 deletions packages/ncps/default.nix

This file was deleted.

0 comments on commit dfe0a85

Please sign in to comment.