Skip to content

Commit

Permalink
Merge pull request #4 from dao42/feature-change-url-to-local-nginx
Browse files Browse the repository at this point in the history
使用本地文件托管
  • Loading branch information
YushuaiLI authored May 16, 2022
2 parents f0d2055 + 73bcf01 commit bb47ea5
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 6 deletions.
23 changes: 22 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,27 @@ pkgs.mkShell {
备注: 初次执行比较慢,可通过 `nix-shell -v` 查看日志,另外后续进入时,为避免从substituters查询,可以使用
`nix-shell --no-substitute` 快速进入shell环境

## 本地代理

基于nginx文件服务器,对与下载比较慢的文件进行托管。
```
http://119.91.141.92:8080
```

### 基于本地代理的nix-channel设置

终端执行添加channel:
```
#nix-channel --add http://119.91.141.92:8080/nixpkgs-showmebug/{branch|commit etc.}.tar.gz nixpkgs-showmebug
nix-channel --add http://119.91.141.92:8080/nixpkgs-showmebug/nixpkgs-showmebug-feature-change-url-to-local-nginx.tar.gz nixpkgs-showmebug
nix-channel --update
```

使用时直接在nix文件头部指定channel
```nix
{ pkgs ? import <nixpkgs-showmebug> {} }:
# 环境设置表达式
```
## 支持语言说明

| 序号 | 支持语言 | 支持LSP | 支持测试用例 | 预置环境 |
Expand Down Expand Up @@ -108,7 +129,7 @@ pkgs.mkShell {
| 29 | [R](doc/R.md) | | | |
| 30 | [Rust](doc/Rust.md) | :white_check_mark: | :white_check_mark: | |
| 31 | [Scala](doc/Scala.md) | | | |
| 32 | [Swift](doc/Swift.md) | | | |
| 32 | [Swift](doc/Swift.md) | :white_check_mark: | | |
| 33 | [Visual Basic](doc/VisualBasic.md) | | | |
| 34 | [Verilog](doc/Verilog.md) | | :white_check_mark: | |
| 35 | [VHDL](doc/VHDL.md) | | | |
Expand Down
6 changes: 3 additions & 3 deletions nix/sources.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"rev": "dff5496b12817e3d019983827c4b7ba7beb96580",
"sha256": "14hmk545rhlr03lmagkbh42m63wqdmqbw502fnrqgcxmns657nds",
"type": "tarball",
"url": "https://github.com/nixos/nixpkgs/archive/nixpkgs-21.11-dff5496b12817e3d019983827c4b7ba7beb96580.tar.gz",
"url": "http://119.91.141.92:8080/nixpkgs/nixpkgs-21.11-dff5496b12817e3d019983827c4b7ba7beb96580.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"nixpkgs-legacy": {
Expand All @@ -31,7 +31,7 @@
"rev": "503209808cd613daed238e21e7a18ffcbeacebe3",
"sha256": "09yxyfd1gzcwjs8zm8yhvqpgdzxdj6l4yvjbz675nkk3nw6iyavk",
"type": "tarball",
"url": "https://github.com/nixos/nixpkgs/archive/503209808cd613daed238e21e7a18ffcbeacebe3.tar.gz",
"url": "http://119.91.141.92:8080/nixpkgs/nixpkgs-legacy-503209808cd613daed238e21e7a18ffcbeacebe3.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"nixpkgs-unstable": {
Expand All @@ -43,7 +43,7 @@
"rev": "cbe587c735b734405f56803e267820ee1559e6c1",
"sha256": "0jii8slqbwbvrngf9911z3al1s80v7kk8idma9p9k0d5fm3g4z7h",
"type": "tarball",
"url": "https://github.com/nixos/nixpkgs/archive/cbe587c735b734405f56803e267820ee1559e6c1.tar.gz",
"url": "http://119.91.141.92:8080/nixpkgs/nixpkgs-unstable-cbe587c735b734405f56803e267820ee1559e6c1.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
}
}
2 changes: 1 addition & 1 deletion pkgs/kotlin-language-server/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ stdenv.mkDerivation rec {
version = "1.3.0";

src = fetchurl {
url = "https://github.com/dao42/kotlin-language-server/releases/download/1.3.1/server.tar.gz";
url = "http://119.91.141.92:8080/language-source/kotlin/server.tar.gz";
sha256 = "sha256-DApQaZN0smwEdyd+YWKSiJJwCkb9uFac547N3RGwAWk=";
};

Expand Down
2 changes: 1 addition & 1 deletion pkgs/phpunit/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ stdenv.mkDerivation rec {
version = "9.5.20";

src = fetchurl {
url = "https://phar.phpunit.de/phpunit-9.5.20.phar";
url = "http://119.91.141.92:8080/language-source/php/phpunit-9.5.20.phar";
sha256 = "6becad2da5c37f5ad101cc665ef05a2f1a6a45d2427c8edcc74f72c92fb1e05a";
};

Expand Down

0 comments on commit bb47ea5

Please sign in to comment.