moved to new suckless-conf

This commit is contained in:
Dmitry Zuikov 2024-05-17 08:01:11 +03:00
parent 6bbc451c2f
commit 3717471b3f
9 changed files with 27 additions and 28 deletions

View File

@ -3,7 +3,7 @@ packages: **/*.cabal
allow-newer: all allow-newer: all
constraints: pandoc ==3.1.11, suckless-conf ==0.1.2.1 constraints: pandoc ==3.1.11, suckless-conf >= 0.1.2.6
-- executable-static: True -- executable-static: True

View File

@ -58,7 +58,7 @@ common shared-properties
, hbs2-keyman , hbs2-keyman
, hbs2-git , hbs2-git
, db-pipe , db-pipe
, suckless-conf , suckless-conf >= 0.1.2.6
, fuzzy-parse , fuzzy-parse
, aeson , aeson

View File

@ -484,7 +484,7 @@ where
{fst predic} {fst predic}
) )
order by f0.ts nulls first order by f0.ts asc nulls first
|] |]

View File

@ -300,7 +300,7 @@ commentKey fp =
"" -> takeFileName fp "" -> takeFileName fp
xs -> xs xs -> xs
type ContextShit c = (Data c, Data (Context c), IsContext c) type ContextShit c = (Data c, Data (Context c), IsContext c, Data (Syntax c))
mksym :: FixmeAttrName -> Id mksym :: FixmeAttrName -> Id
mksym (k :: FixmeAttrName) = Id ("$" <> coerce k) mksym (k :: FixmeAttrName) = Id ("$" <> coerce k)

View File

@ -206,19 +206,18 @@
"nixpkgs": "nixpkgs_2" "nixpkgs": "nixpkgs_2"
}, },
"locked": { "locked": {
"lastModified": 1715856223, "lastModified": 1715918584,
"narHash": "sha256-Q9I6YbvzGuV9yHtxGxxU10LMQf9AdcsecSszPT7PDuc=", "narHash": "sha256-moioa3ixAZb0y/xxyxUVjSvXoSiDGXy/vAx6B70d2yM=",
"ref": "sexp-parser", "ref": "refs/heads/master",
"rev": "b0a7f96d6569d16b0d27c2f9477d94e5ee39df66", "rev": "831879978213a1aed15ac70aa116c33bcbe964b8",
"revCount": 62, "revCount": 63,
"type": "git", "type": "git",
"url": "http://git.hbs2/GmcLB9gEPT4tbx9eyQiECwsu8oPyEh6qKEpQDtyBWVPA" "url": "http://git.hbs2/GmcLB9gEPT4tbx9eyQiECwsu8oPyEh6qKEpQDtyBWVPA?tag=0.1.3.1"
}, },
"original": { "original": {
"ref": "sexp-parser", "rev": "831879978213a1aed15ac70aa116c33bcbe964b8",
"rev": "b0a7f96d6569d16b0d27c2f9477d94e5ee39df66",
"type": "git", "type": "git",
"url": "http://git.hbs2/GmcLB9gEPT4tbx9eyQiECwsu8oPyEh6qKEpQDtyBWVPA" "url": "http://git.hbs2/GmcLB9gEPT4tbx9eyQiECwsu8oPyEh6qKEpQDtyBWVPA?tag=0.1.3.1"
} }
}, },
"haskell-flake-utils": { "haskell-flake-utils": {
@ -520,18 +519,18 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1715866786, "lastModified": 1715919707,
"narHash": "sha256-Pl4JDMBw1kzdcK/g2yA/BGu97dMRkQ2hJHi09PLbeq8=", "narHash": "sha256-lbvrCqJHC//NJgfvsy15+Evup5CS+CE50NolDwPIh94=",
"ref": "refs/heads/master", "ref": "refs/heads/master",
"rev": "864b359f44a4824f2a7b3dd49a37356c05f3ceff", "rev": "41830ea2f2e9bb589976f0433207a8f1b73b0b01",
"revCount": 31, "revCount": 35,
"type": "git", "type": "git",
"url": "https://git.hbs2.net/JAuk1UJzZfbDGKVazSQU5yYQ3NGfk4gVeZzBCduf5TgQ" "url": "https://git.hbs2.net/JAuk1UJzZfbDGKVazSQU5yYQ3NGfk4gVeZzBCduf5TgQ?tag=0.1.2.6"
}, },
"original": { "original": {
"rev": "864b359f44a4824f2a7b3dd49a37356c05f3ceff", "rev": "41830ea2f2e9bb589976f0433207a8f1b73b0b01",
"type": "git", "type": "git",
"url": "https://git.hbs2.net/JAuk1UJzZfbDGKVazSQU5yYQ3NGfk4gVeZzBCduf5TgQ" "url": "https://git.hbs2.net/JAuk1UJzZfbDGKVazSQU5yYQ3NGfk4gVeZzBCduf5TgQ?tag=0.1.2.6"
} }
} }
}, },

View File

@ -14,7 +14,7 @@ inputs = {
fixme.inputs.nixpkgs.follows = "nixpkgs"; fixme.inputs.nixpkgs.follows = "nixpkgs";
suckless-conf.url = suckless-conf.url =
"git+https://git.hbs2.net/JAuk1UJzZfbDGKVazSQU5yYQ3NGfk4gVeZzBCduf5TgQ?rev=864b359f44a4824f2a7b3dd49a37356c05f3ceff"; "git+https://git.hbs2.net/JAuk1UJzZfbDGKVazSQU5yYQ3NGfk4gVeZzBCduf5TgQ?rev=41830ea2f2e9bb589976f0433207a8f1b73b0b01&tag=0.1.2.6";
suckless-conf.inputs.nixpkgs.follows = "nixpkgs"; suckless-conf.inputs.nixpkgs.follows = "nixpkgs";

View File

@ -13,8 +13,8 @@ import HBS2.Net.Proto.Types
import PeerTypes import PeerTypes
import PeerConfig import PeerConfig
import CheckPeer (peerBanned) import CheckPeer (peerBanned)
import BlockDownload import BlockDownload()
import DownloadQ import DownloadQ()
import Control.Monad.Trans.Maybe import Control.Monad.Trans.Maybe
import Control.Monad.Reader import Control.Monad.Reader
@ -38,7 +38,7 @@ instance Pretty AcceptAnnounce where
instance HasCfgKey PeerAcceptAnnounceKey AcceptAnnounce m where instance HasCfgKey PeerAcceptAnnounceKey AcceptAnnounce where
key = "accept-block-announce" key = "accept-block-announce"
instance (Monad m, HasConf m) => HasCfgValue PeerAcceptAnnounceKey AcceptAnnounce m where instance (Monad m, HasConf m) => HasCfgValue PeerAcceptAnnounceKey AcceptAnnounce m where
@ -51,7 +51,7 @@ instance (Monad m, HasConf m) => HasCfgValue PeerAcceptAnnounceKey AcceptAnnounc
catMaybes [ fromStringMay @(PubKey 'Sign (Encryption L4Proto)) (Text.unpack e) catMaybes [ fromStringMay @(PubKey 'Sign (Encryption L4Proto)) (Text.unpack e)
| ListVal (Key s [LitStrVal e]) <- syn, s == kk | ListVal (Key s [LitStrVal e]) <- syn, s == kk
] ]
kk = key @PeerAcceptAnnounceKey @AcceptAnnounce @m kk = key @PeerAcceptAnnounceKey @AcceptAnnounce
acceptAnnouncesFromPeer :: forall e m . ( MonadIO m acceptAnnouncesFromPeer :: forall e m . ( MonadIO m

View File

@ -16,10 +16,10 @@ import Lens.Micro.Platform
data PeerBlackListKey data PeerBlackListKey
data PeerWhiteListKey data PeerWhiteListKey
instance PeerBlackListKey (Set String) where instance HasCfgKey PeerBlackListKey (Set String) where
key = "blacklist" key = "blacklist"
instance PeerWhiteListKey (Set String) where instance HasCfgKey PeerWhiteListKey (Set String) where
key = "whitelist" key = "whitelist"
peerBanned :: forall e m . ( Monad m peerBanned :: forall e m . ( Monad m

View File

@ -70,7 +70,7 @@ instance {-# OVERLAPPABLE #-} (HasConf m, HasCfgKey a b) => HasCfgValue a Featur
cfgValue = lastDef FeatureOff . val <$> getConf cfgValue = lastDef FeatureOff . val <$> getConf
where where
val syn = [ if e == "on" then FeatureOn else FeatureOff val syn = [ if e == "on" then FeatureOn else FeatureOff
| ListVal (Key s [SymbolVal e]) <- syn, s == key @a @b @m | ListVal (Key s [SymbolVal e]) <- syn, s == key @a @b
] ]
cfgName :: FilePath cfgName :: FilePath