Browse Source

Upkeep, add nix build thingy

master
Cassidy Dingenskirchen 10 months ago
parent
commit
e055de4374
Signed by: StDingenskirchen GPG Key ID: 14FE9712CC42FE8B
6 changed files with 68 additions and 5 deletions
  1. +2
    -0
      .gitignore
  2. +11
    -0
      default.nix
  3. +0
    -0
      example.env
  4. +4
    -4
      shard.lock
  5. +50
    -0
      shards.nix
  6. +1
    -1
      src/responses/resolve.cr

+ 2
- 0
.gitignore View File

@ -4,3 +4,5 @@
/.shards/
*.dwarf
shashort.sqlite3
result
.env

+ 11
- 0
default.nix View File

@ -0,0 +1,11 @@
with import <nixpkgs> {};
crystal.buildCrystalPackage rec {
version = "0.1.0";
pname = "SHAShort";
src = ./.;
shardsFile = ./shards.nix;
crystalBinaries.SHAShort.src = "src/shashort.cr";
buildInputs = [ sqlite-interactive.dev ];
}

.env → example.env View File


+ 4
- 4
shard.lock View File

@ -2,11 +2,11 @@ version: 1.0
shards:
db:
github: crystal-lang/crystal-db
version: 0.5.1
version: 0.7.0
dotenv:
github: gdotdesign/cr-dotenv
version: 0.2.0
version: 0.3.1
exception_page:
github: crystal-loot/exception_page
@ -14,7 +14,7 @@ shards:
kemal:
github: kemalcr/kemal
version: 0.25.2
version: 0.26.0
kilt:
github: jeromegn/kilt
@ -30,5 +30,5 @@ shards:
sqlite3:
github: crystal-lang/crystal-sqlite3
version: 0.10.0
version: 0.14.0

+ 50
- 0
shards.nix View File

@ -0,0 +1,50 @@
{
db = {
owner = "crystal-lang";
repo = "crystal-db";
rev = "v0.7.0";
sha256 = "0is08qrz5wc09j052jsj67zwmg362xv4k2wl353hn7lzim3s517j";
};
dotenv = {
owner = "gdotdesign";
repo = "cr-dotenv";
rev = "v0.3.1";
sha256 = "1xp7c3g8dj1hqk2b885qr4y0s8661gpp9q28lv6rhr0ckllc6zgz";
};
exception_page = {
owner = "crystal-loot";
repo = "exception_page";
rev = "v0.1.2";
sha256 = "0j5ishhyriq9p339yaawrmawl9wgmp1paniq30a8d6a0568h3avq";
};
kemal = {
owner = "kemalcr";
repo = "kemal";
rev = "v0.26.0";
sha256 = "0ja5q87djz43fdwc6wgvghgd0qly9pliwjcw4gidb8vwvjmn8hsx";
};
kilt = {
owner = "jeromegn";
repo = "kilt";
rev = "v0.4.0";
sha256 = "1w9ib6j4xhwxdxx58nzc06gw7ci7vga03vgj1z1bnklamb0b0l0k";
};
radix = {
owner = "luislavena";
repo = "radix";
rev = "v0.3.9";
sha256 = "19pksfr7ddc31hvikb433jg0zav1ar93k6zmsgaf3vsrjnvia3ix";
};
sha3 = {
owner = "OscarBarrett";
repo = "crystal-sha3";
rev = "v0.3.1";
sha256 = "1p4p9f9sj1vygx0pqjzzpmiji82b16rakpf070xwnd38fdgy82yx";
};
sqlite3 = {
owner = "crystal-lang";
repo = "crystal-sqlite3";
rev = "v0.14.0";
sha256 = "0hmfya6zj2nhyqk910hj250p5dhiw52s7pm3ykk9vlbfs4wj74mi";
};
}

+ 1
- 1
src/responses/resolve.cr View File

@ -1,4 +1,4 @@
require "../../logic"
require "../logic"
get "/resolve/:hash" do |env|
hash = env.params.url["hash"]


Loading…
Cancel
Save