Initial Commit: Rust Flake

This commit is contained in:
bluepython508
2024-11-02 20:19:23 +00:00
commit 0b0950959b
8 changed files with 2299 additions and 0 deletions

1
.envrc Normal file
View File

@@ -0,0 +1 @@
use flake

2
.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
/target
/.direnv/

2121
Cargo.lock generated Normal file

File diff suppressed because it is too large Load Diff

10
Cargo.toml Normal file
View File

@@ -0,0 +1,10 @@
[package]
name = "botc-discord"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
poise = "0.6.1"
serenity = "0.12.2"

135
flake.lock generated Normal file
View File

@@ -0,0 +1,135 @@
{
"nodes": {
"crane": {
"inputs": {
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1714864355,
"narHash": "sha256-uXNW6bapWFfkYIkK1EagydSrFMqycOYEDSq75GmUpjk=",
"owner": "ipetkov",
"repo": "crane",
"rev": "442a7a6152f49b907e73206dc8e1f46a61e8e873",
"type": "github"
},
"original": {
"owner": "ipetkov",
"repo": "crane",
"type": "github"
}
},
"crane-flake-parts": {
"inputs": {
"crane": "crane",
"rust-overlay": [
"rust-overlay"
]
},
"locked": {
"lastModified": 1715269385,
"narHash": "sha256-97UnOLbYWqBP2RY6GtMf49SoVrYiYd3EEm6phWBjKv8=",
"owner": "bluepython508",
"repo": "crane-flake-parts",
"rev": "abd7ab48488e81617740eeb4eeefc3be2e4a6b7f",
"type": "github"
},
"original": {
"owner": "bluepython508",
"repo": "crane-flake-parts",
"type": "github"
}
},
"flake-parts": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1730504689,
"narHash": "sha256-hgmguH29K2fvs9szpq2r3pz2/8cJd2LPS+b4tfNFCwE=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "506278e768c2a08bec68eb62932193e341f55c90",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1714656196,
"narHash": "sha256-kjQkA98lMcsom6Gbhw8SYzmwrSo+2nruiTcTZp5jK7o=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "94035b482d181af0a0f8f77823a790b256b7c3cc",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-lib": {
"locked": {
"lastModified": 1730504152,
"narHash": "sha256-lXvH/vOfb4aGYyvFmZK/HlsNsr/0CVWlwYvo2rxJk3s=",
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/cc2f28000298e1269cea6612cd06ec9979dd5d7f.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/cc2f28000298e1269cea6612cd06ec9979dd5d7f.tar.gz"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1730200266,
"narHash": "sha256-l253w0XMT8nWHGXuXqyiIC/bMvh1VRszGXgdpQlfhvU=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "807e9154dcb16384b1b765ebe9cd2bba2ac287fd",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"crane-flake-parts": "crane-flake-parts",
"flake-parts": "flake-parts",
"nixpkgs": "nixpkgs_2",
"rust-overlay": "rust-overlay"
}
},
"rust-overlay": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1730514457,
"narHash": "sha256-cjFX208s9pyaOfMvF9xI6WyafyXINqdhMF7b1bMQpLI=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "1ff38ca26eb31858e4dfe7fe738b6b3ce5d74922",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

25
flake.nix Normal file
View File

@@ -0,0 +1,25 @@
{
description = "Description for the project";
inputs = {
flake-parts.url = "github:hercules-ci/flake-parts";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
crane-flake-parts = {
url = "github:bluepython508/crane-flake-parts";
inputs.rust-overlay.follows = "rust-overlay";
};
};
outputs = inputs@{ flake-parts, crane-flake-parts, ... }:
flake-parts.lib.mkFlake { inherit inputs; } {
imports = [
crane-flake-parts.flakeModules.default
];
systems = [ "x86_64-linux" "aarch64-linux" "aarch64-darwin" "x86_64-darwin" ];
crane.source = ./.;
};
}

1
src/main.rs Normal file
View File

@@ -0,0 +1 @@
fn main() {}

4
toolchain.toml Normal file
View File

@@ -0,0 +1,4 @@
[toolchain]
channel = "stable"
components = [ "rustfmt", "rust-analyzer", "rust-src", "clippy" ]
profile = "default"