Merge remote-tracking branches 'origin/update-flake', 'origin/disable-disable-spaces-patch' and 'origin/disable-vf2-kernel-non-rv32'
This commit is contained in:
commit
870457eb27
3 changed files with 63 additions and 159 deletions
119
default.nix
119
default.nix
|
@ -15,60 +15,67 @@
|
|||
input = "mautrix-cleanup";
|
||||
inherit (pkgs) system;
|
||||
};
|
||||
in rec {
|
||||
# The `lib`, `modules`, and `overlay` names are special
|
||||
inherit lib;
|
||||
modules = import ./modules; # NixOS modules
|
||||
overlays = import ./overlays; # nixpkgs overlays
|
||||
in
|
||||
rec {
|
||||
# The `lib`, `modules`, and `overlay` names are special
|
||||
inherit lib;
|
||||
modules = import ./modules; # NixOS modules
|
||||
overlays = import ./overlays; # nixpkgs overlays
|
||||
|
||||
akkoma = pkgs.callPackage ./akkoma {};
|
||||
pleroma-fe = pkgs.callPackage ./akkoma/pleroma-fe {};
|
||||
admin-fe = pkgs.callPackage ./akkoma/admin-fe {};
|
||||
emoji-lotte = pkgs.callPackage ./art/emoji/lotte {};
|
||||
emoji-volpeon-blobfox = pkgs.callPackage ./art/emoji/volpeon/blobfox.nix {};
|
||||
emoji-volpeon-blobfox-flip = pkgs.callPackage ./art/emoji/volpeon/blobfox_flip.nix {};
|
||||
emoji-volpeon-bunhd = pkgs.callPackage ./art/emoji/volpeon/bunhd.nix {};
|
||||
emoji-volpeon-bunhd-flip = pkgs.callPackage ./art/emoji/volpeon/bunhd_flip.nix {};
|
||||
emoji-volpeon-drgn = pkgs.callPackage ./art/emoji/volpeon/drgn.nix {};
|
||||
emoji-volpeon-fox = pkgs.callPackage ./art/emoji/volpeon/fox.nix {};
|
||||
emoji-volpeon-gphn = pkgs.callPackage ./art/emoji/volpeon/gphn.nix {};
|
||||
emoji-volpeon-raccoon = pkgs.callPackage ./art/emoji/volpeon/raccoon.nix {};
|
||||
emoji-volpeon-vlpn = pkgs.callPackage ./art/emoji/volpeon/vlpn.nix {};
|
||||
emoji-caro = pkgs.callPackage ./art/emoji/caro {};
|
||||
lotte-art = pkgs.callPackage ./art/lotte {};
|
||||
drone-runner-docker = pkgs.callPackage ./ci/drone-runner-docker {};
|
||||
alco-sans = pkgs.callPackage ./fonts/kreative/alco-sans.nix {};
|
||||
constructium = pkgs.callPackage ./fonts/kreative/constructium.nix {};
|
||||
fairfax = pkgs.callPackage ./fonts/kreative/fairfax.nix {};
|
||||
fairfax-hd = pkgs.callPackage ./fonts/kreative/fairfax-hd.nix {};
|
||||
kreative-square = pkgs.callPackage ./fonts/kreative/kreative-square.nix {};
|
||||
nasin-nanpa = pkgs.callPackage ./fonts/nasin-nanpa {};
|
||||
matrix-media-repo = pkgs.callPackage ./matrix/matrix-media-repo {};
|
||||
mautrix-discord = pkgs.callPackage ./matrix/mautrix-discord {};
|
||||
mautrix-whatsapp = pkgs.callPackage ./matrix/mautrix-whatsapp {};
|
||||
mautrix-signal = pkgs.callPackage ./matrix/mautrix-signal {};
|
||||
mautrix-telegram = pkgs.callPackage ./matrix/mautrix-telegram {};
|
||||
python-mautrix = pkgs.python3Packages.callPackage ./python/mautrix.nix {};
|
||||
python-tulir-telethon = pkgs.python3Packages.callPackage ./python/tulir-telethon.nix {};
|
||||
papermc = pkgs.callPackage ./minecraft/papermc {};
|
||||
python-plover-stroke = pkgs.python3Packages.callPackage ./plover/plover-stroke.nix {};
|
||||
python-rtf-tokenize = pkgs.python3Packages.callPackage ./python/rtf-tokenize.nix {};
|
||||
plover = pkgs.python3Packages.callPackage ./plover/plover {};
|
||||
plover-plugins-manager = pkgs.python3Packages.callPackage ./plover/plover-plugins-manager.nix {};
|
||||
python-simplefuzzyset = pkgs.python3Packages.callPackage ./python/simplefuzzyset.nix {};
|
||||
plover-plugin-emoji = pkgs.python3Packages.callPackage ./plover/plover-emoji.nix {};
|
||||
plover-plugin-tapey-tape = pkgs.python3Packages.callPackage ./plover/plover-tapey-tape.nix {};
|
||||
plover-plugin-yaml-dictionary = pkgs.python3Packages.callPackage ./plover/plover-yaml-dictionary.nix {};
|
||||
plover-plugin-machine-hid = pkgs.python3Packages.callPackage ./plover/plover-machine-hid.nix {};
|
||||
plover-plugin-rkb1-hid = pkgs.python3Packages.callPackage ./plover/plover-rkb1-hid.nix {};
|
||||
plover-dict-didoesdigital = pkgs.callPackage ./plover/didoesdigital-dictionary.nix {};
|
||||
miifox-net = pkgs.python3Packages.callPackage ./web/miifox-net.nix {};
|
||||
old-homepage = pkgs.callPackage ./web/old-homepage.nix {};
|
||||
python-instagram = pkgs.python3Packages.callPackage ./python/instagram.nix {};
|
||||
moa = pkgs.python3Packages.callPackage ./moa {};
|
||||
inherit (attic'.defaultNix.packages.${pkgs.system}) attic attic-client attic-server;
|
||||
vf2Kernel = pkgs.callPackage ./linux/vf2 {kernelPatches = [];};
|
||||
vf2KernelPackages = pkgs.linuxPackagesFor vf2Kernel;
|
||||
element-web = pkgs.callPackage ./matrix/element-web {};
|
||||
mautrix-cleanup = mautrix-cleanup'.defaultNix.packages.${pkgs.system}.default;
|
||||
}
|
||||
akkoma = pkgs.callPackage ./akkoma {};
|
||||
pleroma-fe = pkgs.callPackage ./akkoma/pleroma-fe {};
|
||||
admin-fe = pkgs.callPackage ./akkoma/admin-fe {};
|
||||
emoji-lotte = pkgs.callPackage ./art/emoji/lotte {};
|
||||
emoji-volpeon-blobfox = pkgs.callPackage ./art/emoji/volpeon/blobfox.nix {};
|
||||
emoji-volpeon-blobfox-flip = pkgs.callPackage ./art/emoji/volpeon/blobfox_flip.nix {};
|
||||
emoji-volpeon-bunhd = pkgs.callPackage ./art/emoji/volpeon/bunhd.nix {};
|
||||
emoji-volpeon-bunhd-flip = pkgs.callPackage ./art/emoji/volpeon/bunhd_flip.nix {};
|
||||
emoji-volpeon-drgn = pkgs.callPackage ./art/emoji/volpeon/drgn.nix {};
|
||||
emoji-volpeon-fox = pkgs.callPackage ./art/emoji/volpeon/fox.nix {};
|
||||
emoji-volpeon-gphn = pkgs.callPackage ./art/emoji/volpeon/gphn.nix {};
|
||||
emoji-volpeon-raccoon = pkgs.callPackage ./art/emoji/volpeon/raccoon.nix {};
|
||||
emoji-volpeon-vlpn = pkgs.callPackage ./art/emoji/volpeon/vlpn.nix {};
|
||||
emoji-caro = pkgs.callPackage ./art/emoji/caro {};
|
||||
lotte-art = pkgs.callPackage ./art/lotte {};
|
||||
drone-runner-docker = pkgs.callPackage ./ci/drone-runner-docker {};
|
||||
alco-sans = pkgs.callPackage ./fonts/kreative/alco-sans.nix {};
|
||||
constructium = pkgs.callPackage ./fonts/kreative/constructium.nix {};
|
||||
fairfax = pkgs.callPackage ./fonts/kreative/fairfax.nix {};
|
||||
fairfax-hd = pkgs.callPackage ./fonts/kreative/fairfax-hd.nix {};
|
||||
kreative-square = pkgs.callPackage ./fonts/kreative/kreative-square.nix {};
|
||||
nasin-nanpa = pkgs.callPackage ./fonts/nasin-nanpa {};
|
||||
matrix-media-repo = pkgs.callPackage ./matrix/matrix-media-repo {};
|
||||
mautrix-discord = pkgs.callPackage ./matrix/mautrix-discord {};
|
||||
mautrix-whatsapp = pkgs.callPackage ./matrix/mautrix-whatsapp {};
|
||||
mautrix-signal = pkgs.callPackage ./matrix/mautrix-signal {};
|
||||
mautrix-telegram = pkgs.callPackage ./matrix/mautrix-telegram {};
|
||||
python-mautrix = pkgs.python3Packages.callPackage ./python/mautrix.nix {};
|
||||
python-tulir-telethon = pkgs.python3Packages.callPackage ./python/tulir-telethon.nix {};
|
||||
papermc = pkgs.callPackage ./minecraft/papermc {};
|
||||
python-plover-stroke = pkgs.python3Packages.callPackage ./plover/plover-stroke.nix {};
|
||||
python-rtf-tokenize = pkgs.python3Packages.callPackage ./python/rtf-tokenize.nix {};
|
||||
plover = pkgs.python3Packages.callPackage ./plover/plover {};
|
||||
plover-plugins-manager = pkgs.python3Packages.callPackage ./plover/plover-plugins-manager.nix {};
|
||||
python-simplefuzzyset = pkgs.python3Packages.callPackage ./python/simplefuzzyset.nix {};
|
||||
plover-plugin-emoji = pkgs.python3Packages.callPackage ./plover/plover-emoji.nix {};
|
||||
plover-plugin-tapey-tape = pkgs.python3Packages.callPackage ./plover/plover-tapey-tape.nix {};
|
||||
plover-plugin-yaml-dictionary = pkgs.python3Packages.callPackage ./plover/plover-yaml-dictionary.nix {};
|
||||
plover-plugin-machine-hid = pkgs.python3Packages.callPackage ./plover/plover-machine-hid.nix {};
|
||||
plover-plugin-rkb1-hid = pkgs.python3Packages.callPackage ./plover/plover-rkb1-hid.nix {};
|
||||
plover-dict-didoesdigital = pkgs.callPackage ./plover/didoesdigital-dictionary.nix {};
|
||||
miifox-net = pkgs.python3Packages.callPackage ./web/miifox-net.nix {};
|
||||
old-homepage = pkgs.callPackage ./web/old-homepage.nix {};
|
||||
python-instagram = pkgs.python3Packages.callPackage ./python/instagram.nix {};
|
||||
moa = pkgs.python3Packages.callPackage ./moa {};
|
||||
inherit (attic'.defaultNix.packages.${pkgs.system}) attic attic-client attic-server;
|
||||
element-web = pkgs.callPackage ./matrix/element-web {};
|
||||
mautrix-cleanup = mautrix-cleanup'.defaultNix.packages.${pkgs.system}.default;
|
||||
}
|
||||
// (
|
||||
if pkgs.system == "riscv64-linux"
|
||||
then rec {
|
||||
vf2Kernel = pkgs.callPackage ./linux/vf2 {kernelPatches = [];};
|
||||
vf2KernelPackages = pkgs.linuxPackagesFor vf2Kernel;
|
||||
}
|
||||
else {}
|
||||
)
|
||||
|
|
|
@ -16,9 +16,6 @@ in
|
|||
repo = "discord";
|
||||
inherit (source) rev sha256;
|
||||
};
|
||||
patches = [
|
||||
./no-category-spaces.patch
|
||||
];
|
||||
vendorSha256 = builtins.readFile ./vendor.sha256;
|
||||
buildInputs = [
|
||||
olm
|
||||
|
|
|
@ -1,100 +0,0 @@
|
|||
diff --git a/database/portal.go b/database/portal.go
|
||||
index ba6bccd..2feebba 100644
|
||||
--- a/database/portal.go
|
||||
+++ b/database/portal.go
|
||||
@@ -159,13 +159,13 @@ func (p *Portal) Scan(row dbutil.Scannable) *Portal {
|
||||
|
||||
func (p *Portal) Insert() {
|
||||
query := `
|
||||
- INSERT INTO portal (dcid, receiver, type, other_user_id, dc_guild_id, dc_parent_id, mxid,
|
||||
+ INSERT INTO portal (dcid, receiver, type, other_user_id, dc_guild_id, mxid,
|
||||
plain_name, name, name_set, topic, topic_set, avatar, avatar_url, avatar_set,
|
||||
encrypted, in_space, first_event_id, relay_webhook_id, relay_webhook_secret)
|
||||
- VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20)
|
||||
+ VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19)
|
||||
`
|
||||
_, err := p.db.Exec(query, p.Key.ChannelID, p.Key.Receiver, p.Type,
|
||||
- strPtr(p.OtherUserID), strPtr(p.GuildID), strPtr(p.ParentID), strPtr(string(p.MXID)),
|
||||
+ strPtr(p.OtherUserID), strPtr(p.GuildID), strPtr(string(p.MXID)),
|
||||
p.PlainName, p.Name, p.NameSet, p.Topic, p.TopicSet, p.Avatar, p.AvatarURL.String(), p.AvatarSet,
|
||||
p.Encrypted, p.InSpace, p.FirstEventID.String(), strPtr(p.RelayWebhookID), strPtr(p.RelayWebhookSecret))
|
||||
|
||||
@@ -178,13 +178,13 @@ func (p *Portal) Insert() {
|
||||
func (p *Portal) Update() {
|
||||
query := `
|
||||
UPDATE portal
|
||||
- SET type=$1, other_user_id=$2, dc_guild_id=$3, dc_parent_id=$4, mxid=$5,
|
||||
- plain_name=$6, name=$7, name_set=$8, topic=$9, topic_set=$10, avatar=$11, avatar_url=$12, avatar_set=$13,
|
||||
- encrypted=$14, in_space=$15, first_event_id=$16, relay_webhook_id=$17, relay_webhook_secret=$18
|
||||
- WHERE dcid=$19 AND receiver=$20
|
||||
+ SET type=$1, other_user_id=$2, dc_guild_id=$3, mxid=$6,
|
||||
+ plain_name=$7, name=$8, name_set=$9, topic=$10, topic_set=$11, avatar=$12, avatar_url=$13, avatar_set=$14,
|
||||
+ encrypted=$15, in_space=$16, first_event_id=$17, relay_webhook_id=$18, relay_webhook_secret=$19
|
||||
+ WHERE dcid=$20 AND receiver=$21
|
||||
`
|
||||
_, err := p.db.Exec(query,
|
||||
- p.Type, strPtr(p.OtherUserID), strPtr(p.GuildID), strPtr(p.ParentID), strPtr(string(p.MXID)),
|
||||
+ p.Type, strPtr(p.OtherUserID), strPtr(p.GuildID), strPtr(string(p.MXID)),
|
||||
p.PlainName, p.Name, p.NameSet, p.Topic, p.TopicSet, p.Avatar, p.AvatarURL.String(), p.AvatarSet,
|
||||
p.Encrypted, p.InSpace, p.FirstEventID.String(), strPtr(p.RelayWebhookID), strPtr(p.RelayWebhookSecret),
|
||||
p.Key.ChannelID, p.Key.Receiver)
|
||||
diff --git a/portal.go b/portal.go
|
||||
index bcdbb37..c4b3ecd 100644
|
||||
--- a/portal.go
|
||||
+++ b/portal.go
|
||||
@@ -119,14 +119,6 @@ func (br *DiscordBridge) loadPortal(dbPortal *database.Portal, key *database.Por
|
||||
if portal.GuildID != "" {
|
||||
portal.Guild = portal.bridge.GetGuildByID(portal.GuildID, true)
|
||||
}
|
||||
- if portal.ParentID != "" {
|
||||
- parentKey := database.NewPortalKey(portal.ParentID, "")
|
||||
- var ok bool
|
||||
- portal.Parent, ok = br.portalsByID[parentKey]
|
||||
- if !ok {
|
||||
- portal.Parent = br.loadPortal(br.DB.Portal.GetByID(parentKey), nil, -1)
|
||||
- }
|
||||
- }
|
||||
|
||||
return portal
|
||||
}
|
||||
@@ -384,7 +376,7 @@ func (portal *Portal) CreateMatrixRoom(user *User, channel *discordgo.Channel) e
|
||||
|
||||
creationContent := make(map[string]interface{})
|
||||
if portal.Type == discordgo.ChannelTypeGuildCategory {
|
||||
- creationContent["type"] = event.RoomTypeSpace
|
||||
+ return nil
|
||||
}
|
||||
if !portal.bridge.Config.Bridge.FederateRooms {
|
||||
creationContent["m.federate"] = false
|
||||
@@ -1861,18 +1853,12 @@ func (portal *Portal) UpdateParent(parentID string) bool {
|
||||
}
|
||||
portal.log.Debugfln("Updating parent ID %q -> %q", portal.ParentID, parentID)
|
||||
portal.ParentID = parentID
|
||||
- if portal.ParentID != "" {
|
||||
- portal.Parent = portal.bridge.GetPortalByID(database.NewPortalKey(parentID, ""), discordgo.ChannelTypeGuildCategory)
|
||||
- } else {
|
||||
- portal.Parent = nil
|
||||
- }
|
||||
+ portal.Parent = nil
|
||||
return true
|
||||
}
|
||||
|
||||
func (portal *Portal) ExpectedSpaceID() id.RoomID {
|
||||
- if portal.Parent != nil {
|
||||
- return portal.Parent.MXID
|
||||
- } else if portal.Guild != nil {
|
||||
+ if portal.Guild != nil {
|
||||
return portal.Guild.MXID
|
||||
}
|
||||
return ""
|
||||
@@ -1882,9 +1868,7 @@ func (portal *Portal) updateSpace() bool {
|
||||
if portal.MXID == "" {
|
||||
return false
|
||||
}
|
||||
- if portal.Parent != nil {
|
||||
- return portal.addToSpace(portal.Parent.MXID)
|
||||
- } else if portal.Guild != nil {
|
||||
+ if portal.Guild != nil {
|
||||
return portal.addToSpace(portal.Guild.MXID)
|
||||
}
|
||||
return false
|
Reference in a new issue