mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-05-23 21:56:02 +00:00
move nix files to folder (#520)
* move nix files to folder * move nix to scripts
This commit is contained in:
committed by
GitHub
parent
1b930e717a
commit
7f8afb0c12
@@ -0,0 +1,15 @@
|
||||
diff --git a/direct-sqlite.cabal b/direct-sqlite.cabal
|
||||
index 96f26b7..996198e 100644
|
||||
--- a/direct-sqlite.cabal
|
||||
+++ b/direct-sqlite.cabal
|
||||
@@ -69,7 +69,9 @@ library
|
||||
install-includes: sqlite3.h, sqlite3ext.h
|
||||
include-dirs: cbits
|
||||
|
||||
- if !os(windows) && !os(android)
|
||||
+ extra-libraries: dl
|
||||
+
|
||||
+ if !os(windows) && !os(android)
|
||||
extra-libraries: pthread
|
||||
|
||||
if flag(fulltextsearch)
|
||||
@@ -0,0 +1,30 @@
|
||||
diff --git a/cbits/random_initialized.c b/cbits/random_initialized.c
|
||||
index 36ac968..ab708b0 100644
|
||||
--- a/cbits/random_initialized.c
|
||||
+++ b/cbits/random_initialized.c
|
||||
@@ -5,14 +5,6 @@
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
|
||||
-#ifdef HAVE_GETENTROPY
|
||||
-static int ensure_pool_initialized_getentropy()
|
||||
-{
|
||||
- char tmp;
|
||||
- return getentropy(&tmp, sizeof(tmp));
|
||||
-}
|
||||
-#endif
|
||||
-
|
||||
// Poll /dev/random to wait for randomness. This is a proxy for the /dev/urandom
|
||||
// pool being initialized.
|
||||
static int ensure_pool_initialized_poll()
|
||||
@@ -45,10 +37,5 @@ static int ensure_pool_initialized_poll()
|
||||
// Returns 0 on success, non-zero on failure.
|
||||
int ensure_pool_initialized()
|
||||
{
|
||||
-#ifdef HAVE_GETENTROPY
|
||||
- if (ensure_pool_initialized_getentropy() == 0)
|
||||
- return 0;
|
||||
-#endif
|
||||
-
|
||||
return ensure_pool_initialized_poll();
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"https://github.com/simplex-chat/simplexmq.git"."a638486bb3a9b212d15775d0bc63de2e619e0518" = "14m6ljmkfvcqnv53lp4ygaqnn2vydhws1hc3ah8zh5l5g4hkif36";
|
||||
"https://github.com/simplex-chat/aeson.git"."3eb66f9a68f103b5f1489382aad89f5712a64db7" = "0kilkx59fl6c3qy3kjczqvm8c3f4n3p0bdk9biyflf51ljnzp4yp";
|
||||
"https://github.com/simplex-chat/haskell-terminal.git"."f708b00009b54890172068f168bf98508ffcd495" = "0zmq7lmfsk8m340g47g5963yba7i88n4afa6z93sg9px5jv1mijj";
|
||||
"https://github.com/zw3rk/android-support.git"."3c3a5ab0b8b137a072c98d3d0937cbdc96918ddb" = "1r6jyxbim3dsvrmakqfyxbd6ms6miaghpbwyl0sr6dzwpgaprz97";
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
BEGIN {
|
||||
print "{"
|
||||
loc=""
|
||||
ref=""
|
||||
isGit=false
|
||||
}
|
||||
/source-repository-package/ { loc=""; ref=""; isGit=false; }
|
||||
|
||||
/type: git/ { isGit=true; }
|
||||
/location/ && isGit == true { loc=$2 }
|
||||
/tag/ && isGit == true { ref=$2 }
|
||||
|
||||
isGit == true && loc != "" && ref != "" {
|
||||
cmd = "nix-prefetch-git --quiet "loc" "ref" | jq -r .sha256"
|
||||
cmd | getline sha256
|
||||
close(cmd)
|
||||
print " \""loc"\".\""ref"\" = \""sha256"\";";
|
||||
isGit=false; loc=""; ref="";
|
||||
}
|
||||
|
||||
END {
|
||||
print "}"
|
||||
}
|
||||
Reference in New Issue
Block a user