forked from FloatTech/ZeroBot-Plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* https://github.com/FloatTech/ZeroBot-Plugin: Initial Commit for nix (FloatTech#856) [issues 840] Modify the "score" of the Image send type add base64 (FloatTech#853) update guessmusic:Reduce the difficulty (FloatTech#854) Update pull.yml fix: danbooru fix chess & kfc && optimize lolicon & bilibili (FloatTech#817) fix hyaku & omikuji lazy & score (FloatTech#815) 🔖 v1.7.6 fix: hyaku 🔖 v1.7.5 🐛 custom lazy
- Loading branch information
Showing
21 changed files
with
560 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
use flake |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,3 +8,4 @@ nohup.out | |
zerobot | ||
ZeroBot-Plugin* | ||
*.syso | ||
/.direnv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
pkgs ? ( | ||
let | ||
inherit (builtins) fetchTree fromJSON readFile; | ||
inherit ((fromJSON (readFile ./flake.lock)).nodes) nixpkgs gomod2nix; | ||
in | ||
import (fetchTree nixpkgs.locked) { | ||
overlays = [ | ||
(import "${fetchTree gomod2nix.locked}/overlay.nix") | ||
]; | ||
} | ||
), | ||
buildGoApplication ? pkgs.buildGoApplication, | ||
}: | ||
buildGoApplication { | ||
pname = "ZeroBot-Plugin"; | ||
version = "1.7.6"; | ||
pwd = ./.; | ||
src = ./.; | ||
# spec go version manually bcs | ||
# https://github.com/nix-community/gomod2nix/blob/30e3c3a9ec4ac8453282ca7f67fca9e1da12c3e6/builder/default.nix#L130 | ||
# do no work | ||
go = pkgs.go_1_20; | ||
modules = ./gomod2nix.toml; | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{ | ||
description = "基于 ZeroBot 的 OneBot 插件"; | ||
|
||
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; | ||
inputs.flake-utils.url = "github:numtide/flake-utils"; | ||
inputs.gomod2nix.url = "github:nix-community/gomod2nix"; | ||
inputs.gomod2nix.inputs.nixpkgs.follows = "nixpkgs"; | ||
inputs.gomod2nix.inputs.flake-utils.follows = "flake-utils"; | ||
|
||
outputs = { | ||
self, | ||
nixpkgs, | ||
flake-utils, | ||
gomod2nix, | ||
}: ( | ||
flake-utils.lib.eachDefaultSystem | ||
(system: let | ||
pkgs = nixpkgs.legacyPackages.${system}; | ||
|
||
# The current default sdk for macOS fails to compile go projects, so we use a newer one for now. | ||
# This has no effect on other platforms. | ||
callPackage = pkgs.darwin.apple_sdk_11_0.callPackage or pkgs.callPackage; | ||
in { | ||
# doCheck will fail at write files | ||
packages.default = | ||
(callPackage ./. { | ||
inherit (gomod2nix.legacyPackages.${system}) buildGoApplication; | ||
}) | ||
.overrideAttrs (_: {doCheck = false;}); | ||
devShells.default = callPackage ./shell.nix { | ||
inherit (gomod2nix.legacyPackages.${system}) mkGoEnv gomod2nix; | ||
}; | ||
formatter = pkgs.alejandra; | ||
}) | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.