mirror of
https://github.com/unmojang/drasl.git
synced 2025-08-03 19:06:04 -04:00
Switch to nixos-unstable & remove outdated patch
Also update supportedSystems to include darwin • Updated input 'nixpkgs': 'github:NixOS/nixpkgs/9d29cd266cebf80234c98dd0b87256b6be0af44e' (2024-05-25) → 'github:NixOS/nixpkgs/2768c7d042a37de65bb1b5b3268fc987e534c49d' (2024-10-23)
This commit is contained in:
parent
69117ad899
commit
833c6ebe03
12
flake.lock
generated
12
flake.lock
generated
@ -2,7 +2,9 @@
|
|||||||
"nodes": {
|
"nodes": {
|
||||||
"buildNodeModules": {
|
"buildNodeModules": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": ["nixpkgs"]
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1707354861,
|
"lastModified": 1707354861,
|
||||||
@ -20,16 +22,16 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1716633019,
|
"lastModified": 1729665710,
|
||||||
"narHash": "sha256-xim1b5/HZYbWaZKyI7cn9TJCM6ewNVZnesRr00mXeS4=",
|
"narHash": "sha256-AlcmCXJZPIlO5dmFzV3V2XF6x/OpNWUV8Y/FMPGd8Z4=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "9d29cd266cebf80234c98dd0b87256b6be0af44e",
|
"rev": "2768c7d042a37de65bb1b5b3268fc987e534c49d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"id": "nixpkgs",
|
"id": "nixpkgs",
|
||||||
"ref": "nixos-23.11",
|
"ref": "nixos-unstable",
|
||||||
"type": "indirect"
|
"type": "indirect"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
14
flake.nix
14
flake.nix
@ -2,7 +2,7 @@
|
|||||||
description = "Self-hosted API server for Minecraft";
|
description = "Self-hosted API server for Minecraft";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "nixpkgs/nixos-23.11";
|
nixpkgs.url = "nixpkgs/nixos-unstable";
|
||||||
buildNodeModules = {
|
buildNodeModules = {
|
||||||
url = "github:adisbladis/buildNodeModules";
|
url = "github:adisbladis/buildNodeModules";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
@ -16,20 +16,12 @@
|
|||||||
}: let
|
}: let
|
||||||
version = "2.0.2";
|
version = "2.0.2";
|
||||||
|
|
||||||
# nodejs_20 is currently broken on Darwin
|
supportedSystems = ["x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin"];
|
||||||
supportedSystems = ["x86_64-linux" "aarch64-linux"];
|
|
||||||
# supportedSystems = ["x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin"];
|
|
||||||
|
|
||||||
# Helper function to generate an attrset '{ x86_64-linux = f "x86_64-linux"; ... }'.
|
# Helper function to generate an attrset '{ x86_64-linux = f "x86_64-linux"; ... }'.
|
||||||
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
|
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
|
||||||
|
|
||||||
overlays = [
|
overlays = [ ];
|
||||||
(final: prev: {
|
|
||||||
go-swag = prev.go-swag.overrideAttrs (oldAttrs: {
|
|
||||||
patches = [./go-swag.patch];
|
|
||||||
});
|
|
||||||
})
|
|
||||||
];
|
|
||||||
|
|
||||||
nixpkgsFor = forAllSystems (system: import nixpkgs {inherit system overlays;});
|
nixpkgsFor = forAllSystems (system: import nixpkgs {inherit system overlays;});
|
||||||
nixpkgsCross =
|
nixpkgsCross =
|
||||||
|
@ -1,13 +0,0 @@
|
|||||||
diff --git a/packages.go b/packages.go
|
|
||||||
index 69a1b05..466db86 100644
|
|
||||||
--- a/packages.go
|
|
||||||
+++ b/packages.go
|
|
||||||
@@ -93,7 +93,7 @@ func (pkgDefs *PackagesDefinitions) RangeFiles(handle func(info *AstFileInfo) er
|
|
||||||
for _, info := range pkgDefs.files {
|
|
||||||
// ignore package path prefix with 'vendor' or $GOROOT,
|
|
||||||
// because the router info of api will not be included these files.
|
|
||||||
- if strings.HasPrefix(info.PackagePath, "vendor") || strings.HasPrefix(info.Path, runtime.GOROOT()) {
|
|
||||||
+ if strings.HasPrefix(info.PackagePath, "vendor") || (runtime.GOROOT() != "" && strings.HasPrefix(info.Path, runtime.GOROOT())) {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
sortedFiles = append(sortedFiles, info)
|
|
Loading…
x
Reference in New Issue
Block a user