Update dependencies
Use nimcrypto rather than hashlib. Hashlib depends on nimcrypto anyway.
This commit is contained in:
parent
3a0bd1cd02
commit
dc134898b5
15
default.nix
15
default.nix
|
@ -1,20 +1,7 @@
|
||||||
{
|
{
|
||||||
pkgs ? import <nixpkgs> { },
|
pkgs ? import <nixpkgs> { },
|
||||||
}:
|
}:
|
||||||
|
with pkgs;
|
||||||
let
|
|
||||||
inherit (pkgs)
|
|
||||||
lib
|
|
||||||
buildNimPackage
|
|
||||||
fetchFromGitea
|
|
||||||
libxml2
|
|
||||||
libxslt
|
|
||||||
openssl
|
|
||||||
pkg-config
|
|
||||||
postgresql
|
|
||||||
sqlite
|
|
||||||
;
|
|
||||||
in
|
|
||||||
|
|
||||||
buildNimPackage {
|
buildNimPackage {
|
||||||
pname = "syndicate_utils";
|
pname = "syndicate_utils";
|
||||||
|
|
111
lock.json
111
lock.json
|
@ -1,5 +1,33 @@
|
||||||
{
|
{
|
||||||
"depends": [
|
"depends": [
|
||||||
|
{
|
||||||
|
"date": "2024-05-23T17:44:14+03:00",
|
||||||
|
"deepClone": false,
|
||||||
|
"fetchLFS": false,
|
||||||
|
"fetchSubmodules": true,
|
||||||
|
"hash": "sha256-qTRhHsOPNov1BQcm3P7NEkEPW6uh80XFfQRBdMp4o0Q=",
|
||||||
|
"leaveDotGit": false,
|
||||||
|
"method": "git",
|
||||||
|
"packages": [
|
||||||
|
"syndicate"
|
||||||
|
],
|
||||||
|
"path": "/nix/store/1lcxrap5n80hy1z4bcmsmdx83n4b9wjf-syndicate-nim",
|
||||||
|
"rev": "7ab4611824b676157523f2618e7893d5ac99e4f2",
|
||||||
|
"sha256": "0i53g3578h84gp2lbwx1mddhyh8jrpzdq9h70psqndlgqcg62d59",
|
||||||
|
"srcDir": "src",
|
||||||
|
"url": "https://git.syndicate-lang.org/ehmry/syndicate-nim.git"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"method": "fetchzip",
|
||||||
|
"packages": [
|
||||||
|
"bigints"
|
||||||
|
],
|
||||||
|
"path": "/nix/store/jvrm392g8adfsgf36prgwkbyd7vh5jsw-source",
|
||||||
|
"rev": "86ea14d31eea9275e1408ca34e6bfe9c99989a96",
|
||||||
|
"sha256": "15pcpmnk1bnw3k8769rjzcpg00nahyrypwbxs88jnwr4aczp99j4",
|
||||||
|
"srcDir": "src",
|
||||||
|
"url": "https://github.com/ehmry/nim-bigints/archive/86ea14d31eea9275e1408ca34e6bfe9c99989a96.tar.gz"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"method": "fetchzip",
|
"method": "fetchzip",
|
||||||
"packages": [
|
"packages": [
|
||||||
|
@ -25,24 +53,35 @@
|
||||||
{
|
{
|
||||||
"method": "fetchzip",
|
"method": "fetchzip",
|
||||||
"packages": [
|
"packages": [
|
||||||
"hashlib"
|
"nimcrypto"
|
||||||
],
|
],
|
||||||
"path": "/nix/store/fav82xdbicvlk34nmcbl89zx99lr3mbs-source",
|
"path": "/nix/store/fkrcpp8lzj2yi21na79xm63xk0ggnqsp-source",
|
||||||
"rev": "f9455d4be988e14e3dc7933eb7cc7d7c4820b7ac",
|
"rev": "485f7b3cfa83c1beecc0e31be0e964d697aa74d7",
|
||||||
"sha256": "1sx6j952lj98629qfgr7ds5aipyw9d6lldcnnqs205wpj4pkcjb3",
|
"sha256": "1h3dzdbc9kacwpi10mj73yjglvn7kbizj1x8qc9099ax091cj5xn",
|
||||||
"srcDir": "",
|
"srcDir": "",
|
||||||
"url": "https://github.com/ehmry/hashlib/archive/f9455d4be988e14e3dc7933eb7cc7d7c4820b7ac.tar.gz"
|
"url": "https://github.com/cheatfate/nimcrypto/archive/485f7b3cfa83c1beecc0e31be0e964d697aa74d7.tar.gz"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"method": "fetchzip",
|
||||||
|
"packages": [
|
||||||
|
"npeg"
|
||||||
|
],
|
||||||
|
"path": "/nix/store/xpn694ibgipj8xak3j4bky6b3k0vp7hh-source",
|
||||||
|
"rev": "ec0cc6e64ea4c62d2aa382b176a4838474238f8d",
|
||||||
|
"sha256": "1fi9ls3xl20bmv1ikillxywl96i9al6zmmxrbffx448gbrxs86kg",
|
||||||
|
"srcDir": "src",
|
||||||
|
"url": "https://github.com/zevv/npeg/archive/ec0cc6e64ea4c62d2aa382b176a4838474238f8d.tar.gz"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"method": "fetchzip",
|
"method": "fetchzip",
|
||||||
"packages": [
|
"packages": [
|
||||||
"preserves"
|
"preserves"
|
||||||
],
|
],
|
||||||
"path": "/nix/store/hzb7af7lbd4kgd5y4hbgxv1lswig36yj-source",
|
"path": "/nix/store/9zl4s2did00725n8ygbp37agvkskdhcx-source",
|
||||||
"rev": "fd498c6457cb9ad2f3179daa40da69eec00326dd",
|
"rev": "1fee87590940761e288cf9ab3c7270832403b719",
|
||||||
"sha256": "182xvw04vjw83mlcrkwkip29b44h0v8dapg2014k9011h90mdsj4",
|
"sha256": "1ny42rwr3yx52zwvkdg4lh54nxaxrmxdj9dlw3qarvvp2grfq4j2",
|
||||||
"srcDir": "src",
|
"srcDir": "src",
|
||||||
"url": "https://git.syndicate-lang.org/ehmry/preserves-nim/archive/fd498c6457cb9ad2f3179daa40da69eec00326dd.tar.gz"
|
"url": "https://git.syndicate-lang.org/ehmry/preserves-nim/archive/1fee87590940761e288cf9ab3c7270832403b719.tar.gz"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"method": "fetchzip",
|
"method": "fetchzip",
|
||||||
|
@ -55,17 +94,6 @@
|
||||||
"srcDir": "",
|
"srcDir": "",
|
||||||
"url": "https://github.com/status-im/nim-stew/archive/3c91b8694e15137a81ec7db37c6c58194ec94a6a.tar.gz"
|
"url": "https://github.com/status-im/nim-stew/archive/3c91b8694e15137a81ec7db37c6c58194ec94a6a.tar.gz"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"method": "fetchzip",
|
|
||||||
"packages": [
|
|
||||||
"syndicate"
|
|
||||||
],
|
|
||||||
"path": "/nix/store/dw30cq9gxz3353zgaq4a36ajq6chvbwc-source",
|
|
||||||
"rev": "3a4dc1f13392830b587138199643d30fdbec8541",
|
|
||||||
"sha256": "1mbd17rjm1fsx7d0ckzyjih2nzdjqs52ck9wscqcg9nvf3ib5mvh",
|
|
||||||
"srcDir": "src",
|
|
||||||
"url": "https://git.syndicate-lang.org/ehmry/syndicate-nim/archive/3a4dc1f13392830b587138199643d30fdbec8541.tar.gz"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"method": "fetchzip",
|
"method": "fetchzip",
|
||||||
"packages": [
|
"packages": [
|
||||||
|
@ -89,54 +117,21 @@
|
||||||
"url": "https://git.sr.ht/~ehmry/nim_taps/archive/8c8572cd971d1283e6621006b310993c632da247.tar.gz"
|
"url": "https://git.sr.ht/~ehmry/nim_taps/archive/8c8572cd971d1283e6621006b310993c632da247.tar.gz"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"date": "2024-04-02T15:38:57+01:00",
|
"date": "2024-05-22T06:09:38+02:00",
|
||||||
"deepClone": false,
|
"deepClone": false,
|
||||||
"fetchLFS": false,
|
"fetchLFS": false,
|
||||||
"fetchSubmodules": true,
|
"fetchSubmodules": true,
|
||||||
"hash": "sha256-iZb9aAgYr4FGkqfIg49QWiCqeizIi047kFhugHiP8o0=",
|
"hash": "sha256-B3fMwgBpO2Ty8143k9V1cnHXa5K8i1+zN+eF/rBLMe0=",
|
||||||
"leaveDotGit": false,
|
"leaveDotGit": false,
|
||||||
"method": "git",
|
"method": "git",
|
||||||
"packages": [
|
"packages": [
|
||||||
"solo5_dispatcher"
|
"solo5_dispatcher"
|
||||||
],
|
],
|
||||||
"path": "/nix/store/sf5dgj2ljvahcm6my7d61ibda51vnrii-solo5_dispatcher",
|
"path": "/nix/store/xqj48v4rqlffl1l94hi02szazj5gla8g-solo5_dispatcher",
|
||||||
"rev": "a7a894a96a2221284012800e6fd32923d83d20bd",
|
"rev": "cc64ef99416b22b12e4a076d33de9e25a163e57d",
|
||||||
"sha256": "13gjixw80vjqj0xlx2y85ixal82sa27q7j57j9383bqq11lgv5l9",
|
"sha256": "1v9i9fqgx1g76yrmz2xwj9mxfwbjfpar6dsyygr68fv9031cqxq7",
|
||||||
"srcDir": "pkg",
|
"srcDir": "pkg",
|
||||||
"url": "https://git.sr.ht/~ehmry/solo5_dispatcher"
|
"url": "https://git.sr.ht/~ehmry/solo5_dispatcher"
|
||||||
},
|
|
||||||
{
|
|
||||||
"method": "fetchzip",
|
|
||||||
"packages": [
|
|
||||||
"bigints"
|
|
||||||
],
|
|
||||||
"path": "/nix/store/jvrm392g8adfsgf36prgwkbyd7vh5jsw-source",
|
|
||||||
"rev": "86ea14d31eea9275e1408ca34e6bfe9c99989a96",
|
|
||||||
"sha256": "15pcpmnk1bnw3k8769rjzcpg00nahyrypwbxs88jnwr4aczp99j4",
|
|
||||||
"srcDir": "src",
|
|
||||||
"url": "https://github.com/ehmry/nim-bigints/archive/86ea14d31eea9275e1408ca34e6bfe9c99989a96.tar.gz"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"method": "fetchzip",
|
|
||||||
"packages": [
|
|
||||||
"nimcrypto"
|
|
||||||
],
|
|
||||||
"path": "/nix/store/h7lgq3by9mx8in03vzh0y964lnnlkalp-source",
|
|
||||||
"rev": "ff6afc6a753bd645cad4568472c7733d1715e31e",
|
|
||||||
"sha256": "0h9vpayp66pg66114bl0nsvlv1nzp7f0x5b35gbsbd7svzlcz5zj",
|
|
||||||
"srcDir": "",
|
|
||||||
"url": "https://github.com/cheatfate/nimcrypto/archive/ff6afc6a753bd645cad4568472c7733d1715e31e.tar.gz"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"method": "fetchzip",
|
|
||||||
"packages": [
|
|
||||||
"npeg"
|
|
||||||
],
|
|
||||||
"path": "/nix/store/xpn694ibgipj8xak3j4bky6b3k0vp7hh-source",
|
|
||||||
"rev": "ec0cc6e64ea4c62d2aa382b176a4838474238f8d",
|
|
||||||
"sha256": "1fi9ls3xl20bmv1ikillxywl96i9al6zmmxrbffx448gbrxs86kg",
|
|
||||||
"srcDir": "src",
|
|
||||||
"url": "https://github.com/zevv/npeg/archive/ec0cc6e64ea4c62d2aa382b176a4838474238f8d.tar.gz"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
# SPDX-FileCopyrightText: ☭ Emery Hemingway
|
# SPDX-FileCopyrightText: ☭ Emery Hemingway
|
||||||
# SPDX-License-Identifier: Unlicense
|
# SPDX-License-Identifier: Unlicense
|
||||||
|
|
||||||
import std/[base64, os]
|
import
|
||||||
import pkg/hashlib/misc/blake2
|
std/[base64, os],
|
||||||
import preserves, preserves/sugar, syndicate
|
pkg/nimcrypto/blake2,
|
||||||
import ../schema/config
|
preserves, preserves/sugar, syndicate,
|
||||||
import ../schema/base64 as schema
|
../schema/config,
|
||||||
|
../schema/base64 as schema
|
||||||
|
|
||||||
export Base64DecoderArguments
|
export Base64DecoderArguments
|
||||||
export schema
|
export schema
|
||||||
|
@ -31,11 +32,9 @@ proc spawnBase64Decoder*(turn: Turn; root: Cap): Actor {.discardable.} =
|
||||||
|
|
||||||
let decFilePat = observePattern( !Base64File, { @[%0]: grabLit() })
|
let decFilePat = observePattern( !Base64File, { @[%0]: grabLit() })
|
||||||
during(turn, ds, decFilePat) do (txt: string):
|
during(turn, ds, decFilePat) do (txt: string):
|
||||||
var bin = decode(txt)
|
var
|
||||||
var ctx = init[BLAKE2B_512]()
|
bin = decode(txt)
|
||||||
ctx.update(bin)
|
digest = $blake2_256.digest(bin)
|
||||||
let
|
|
||||||
digest = $ctx.final()
|
|
||||||
path = tmpDir / digest
|
path = tmpDir / digest
|
||||||
writeFile(path, bin)
|
writeFile(path, bin)
|
||||||
discard publish(turn, ds, Base64File(
|
discard publish(turn, ds, Base64File(
|
||||||
|
|
|
@ -1,13 +1,10 @@
|
||||||
# Package
|
# auto-update-version
|
||||||
|
|
||||||
version = "20240509"
|
version = "20240523"
|
||||||
author = "Emery Hemingway"
|
author = "Emery Hemingway"
|
||||||
description = "Utilites for Syndicated Actors and Synit"
|
description = "Utilites for Syndicated Actors and Synit"
|
||||||
license = "unlicense"
|
license = "unlicense"
|
||||||
srcDir = "src"
|
srcDir = "src"
|
||||||
bin = @["http_client", "mintsturdyref", "mount_actor", "msg", "postgre_actor", "preserve_process_environment", "rofi_script_actor", "sqlite_actor", "syndesizer", "syndump", "xslt_actor"]
|
bin = @["http_client", "mintsturdyref", "mount_actor", "msg", "postgre_actor", "preserve_process_environment", "rofi_script_actor", "sqlite_actor", "syndesizer", "syndump", "xslt_actor"]
|
||||||
|
|
||||||
|
requires "https://git.syndicate-lang.org/ehmry/syndicate-nim.git >= 20240522"
|
||||||
# Dependencies
|
|
||||||
|
|
||||||
requires "https://git.syndicate-lang.org/ehmry/syndicate-nim.git >= 20240507", "https://github.com/ehmry/nim-sys.git#4ef3b624db86e331ba334e705c1aa235d55b05e1", "https://git.sr.ht/~ehmry/nim_taps >= 20240405"
|
|
||||||
|
|
Loading…
Reference in New Issue