switch to songbird next

This commit is contained in:
Gabriel Fontes
2023-06-11 02:07:53 -03:00
parent 486e8b5306
commit c7872b0ace
5 changed files with 610 additions and 116 deletions

630
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -26,12 +26,15 @@ features = [ "rustls-tls" ]
[dependencies.serenity] [dependencies.serenity]
version = "0.11" version = "0.11"
git = "https://github.com/serenity-rs/serenity"
branch = "next"
features = [ "voice" ] features = [ "voice" ]
[dependencies.songbird] [dependencies.songbird]
version = "0.3" version = "0.3"
default-features = false git = "https://github.com/serenity-rs/songbird"
features = [ "serenity-rustls", "driver", "gateway", "builtin-queue" ] branch = "next"
features = [ "builtin-queue" ]
[dependencies.tokio] [dependencies.tokio]
version = "1.0" version = "1.0"

View File

@@ -13,7 +13,9 @@ in rustPlatform.buildRustPackage {
cargoLock = { cargoLock = {
lockFile = ./Cargo.lock; lockFile = ./Cargo.lock;
outputHashes = { outputHashes = {
"sunk-0.1.2" = "sha256-edipTPS8d6D2Rf6WFwutycI93YjuWK/Z5GQR2HHIxAU="; "sunk-0.1.2" = "sha256-AFmMGiLcgBLni60x2dFgfCCz9oswYcqm3yLO1Kt3ltA=";
"serenity-0.11.5" = "sha256-10s0kflNYEMwUXAgrh6d1IUk3ZRSCkAilz9m1lVhXhA=";
"songbird-0.3.2" = "sha256-8wzCcV9W6K0MHqZ8yhTIMjh165NV8OQ9zlgrRrIhlOI=";
}; };
}; };

57
flake.lock generated
View File

@@ -1,5 +1,23 @@
{ {
"nodes": { "nodes": {
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1681202837,
"narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "cfacdce06f30d2b68473a46042957675eebb3401",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1686331006, "lastModified": 1686331006,
@@ -18,7 +36,44 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs",
"rust-overlay": "rust-overlay"
}
},
"rust-overlay": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1686450923,
"narHash": "sha256-a7B9VT2NHJWRCerHmZagAXu3z2QHJKhxUhzjh5vAnXU=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "4b3cb15179af3b8d640a29fa85cc9f332b4123e6",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
} }
} }
}, },

View File

@@ -7,26 +7,40 @@
[ "cache.m7.rs:kszZ/NSwE/TjhOcPPQ16IuUiuRSisdiIwhKZCxguaWg=" ]; [ "cache.m7.rs:kszZ/NSwE/TjhOcPPQ16IuUiuRSisdiIwhKZCxguaWg=" ];
}; };
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05"; inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05";
rust-overlay.url = "github:oxalica/rust-overlay";
rust-overlay.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = { self, nixpkgs }: outputs = { self, nixpkgs, rust-overlay }:
let let
forAllSystems = nixpkgs.lib.genAttrs [ "x86_64-linux" "aarch64-linux" ]; forAllSystems = nixpkgs.lib.genAttrs [ "x86_64-linux" "aarch64-linux" ];
forAllPkgs = f: forAllSystems (sys: f pkgsFor.${sys}); forAllPkgs = f: forAllSystems (sys: f pkgsFor.${sys});
pkgsFor = nixpkgs.legacyPackages; pkgsFor = forAllSystems (system: import nixpkgs {
inherit system;
overlays = [ rust-overlay.overlays.default ];
});
mkPackage = pkgs: pkgs.callPackage ./default.nix {
rustPlatform = pkgs.makeRustPlatform rec {
rustc = pkgs.rust-bin.stable.latest.default;
cargo = rustc;
};
};
in { in {
nixosModules.default = import ./module.nix; nixosModules.default = import ./module.nix;
overlays.default = final: _prev: { overlays.default = final: _prev: {
disconic = final.callPackage ./default.nix { }; disconic = mkPackage final;
}; };
packages = packages = forAllPkgs (pkgs: {
forAllPkgs (pkgs: { default = pkgs.callPackage ./default.nix { }; }); default = mkPackage pkgs;
});
devShells = forAllPkgs (pkgs: { devShells = forAllPkgs (pkgs: {
default = pkgs.mkShell { default = pkgs.mkShell {
inputsFrom = [ self.outputs.packages.${pkgs.system}.default ]; inputsFrom = [(mkPackage pkgs)];
buildInputs = with pkgs; [ clippy rust-analyzer rustc rustfmt ffmpeg ]; buildInputs = with pkgs; [ clippy rust-analyzer rustc rustfmt ffmpeg ];
}; };
}); });