Compare commits
334 Commits
Author | SHA1 | Date | |
---|---|---|---|
bdd25aefd6 | |||
2444b29734 | |||
d298e5ecdb | |||
3ecab29cdd | |||
c4638dc8aa | |||
7ffa2ba9a2 | |||
10f4390b75 | |||
a3b224a8df | |||
45e20edb2b | |||
db763ff817 | |||
449e1347f4 | |||
d57df16509 | |||
c1c499e003 | |||
225d652545 | |||
948f06ba33 | |||
dcd8c41bb3 | |||
0ab2c60f06 | |||
d20da8b1e3 | |||
ffd1378b44 | |||
ecce255ee2 | |||
69410f10b6 | |||
340220d4ce | |||
27fb116d26 | |||
228a1767f2 | |||
7a45bc2d2e | |||
f02b05f4e9 | |||
04b58e53a6 | |||
849ccb58d2 | |||
aeeb688be2 | |||
89b5d8cc60 | |||
19cae24133 | |||
656cc009e1 | |||
47c8229eb1 | |||
fba5070e8f | |||
732f7b0ed9 | |||
ecf34928f7 | |||
d0242e6e2e | |||
aacff0e63e | |||
d5f4304a60 | |||
622a5a335a | |||
8f16fdf33c | |||
792a1f5743 | |||
9900518d62 | |||
d37f5ba32b | |||
bcb5650cc9 | |||
dff8151938 | |||
9d71ef14fc | |||
888e85b1f4 | |||
73e0bfad92 | |||
ae4266044b | |||
c5bae481da | |||
d71656295f | |||
565a2e3129 | |||
e2da36d2e9 | |||
ad770f71ec | |||
f6d47baefd | |||
44d47b1d5f | |||
f87b6ee8f4 | |||
6322e6e7e3 | |||
39592effd2 | |||
632638ddd8 | |||
c4e31f2f67 | |||
46d7ae030e | |||
3a57fcca9d | |||
3051bdc0c7 | |||
e267a4fc8a | |||
441ab76ca6 | |||
155d79a019 | |||
1fe39fbd3c | |||
1fae322993 | |||
13c193d04a | |||
701299ab5b | |||
2277931d3c | |||
6c59acc0ab | |||
79d947fb36 | |||
a1133259c2 | |||
9eb47bd94b | |||
8f6c52a6f5 | |||
b50112c7c0 | |||
62c80a81de | |||
04f1437d0c | |||
e706176d84 | |||
a2a0047e03 | |||
be7320e24e | |||
55f937aac2 | |||
d929a559b6 | |||
5e7374deea | |||
0821559471 | |||
a9ede0b2c7 | |||
be48ebd2d9 | |||
c80bef7cbd | |||
c9b67eb6e6 | |||
1ab4cb6c71 | |||
9785b38ce0 | |||
492e17b997 | |||
43586e534b | |||
70bca967f3 | |||
61013e43ab | |||
0c100e76ad | |||
000c7457f5 | |||
70361e8b70 | |||
4237f6cc06 | |||
04a90469fe | |||
117a052aa5 | |||
b2bc7fc217 | |||
cd2624ae11 | |||
fa9601bb9a | |||
ae9d31b82c | |||
2afe5fc172 | |||
ea7f074661 | |||
d5e3cad299 | |||
6570daef02 | |||
6ac389e3ee | |||
36196975ac | |||
1dd83829b2 | |||
1b0817bc25 | |||
f57dc8e890 | |||
bdda6292d2 | |||
a2826c9922 | |||
3b2a368df0 | |||
8b7444bd7c | |||
9d719e7d85 | |||
584379e047 | |||
951124e038 | |||
e574f4bdd0 | |||
5c8e3fa35d | |||
4c0df1fa19 | |||
f6b46a1e90 | |||
5eb16ac38e | |||
3486d44bc5 | |||
1311e724ce | |||
5da9e74992 | |||
8dadc0ddea | |||
cba235eadf | |||
5284249acf | |||
d28f56dac0 | |||
ab02a45bf6 | |||
837c1c160b | |||
3d26823425 | |||
d9553871fa | |||
d2bc9c2149 | |||
b0b97653a9 | |||
0b1bc60790 | |||
e93588a6d9 | |||
cd5046a276 | |||
919348d49d | |||
8378b0b51b | |||
0394ae52e9 | |||
fb34f6bf2f | |||
36622ad322 | |||
89bb27e137 | |||
7d4385764c | |||
5df97f0e64 | |||
a3d98a326e | |||
76bf5f2f98 | |||
e827d2ef39 | |||
65576140ce | |||
cea54cf2f3 | |||
8c28c68c17 | |||
b86a080ead | |||
1b0c959a8d | |||
806baf7460 | |||
080f7379ea | |||
7409de5dba | |||
07f4ef518a | |||
820ebdd899 | |||
527d793914 | |||
7df6c3fc75 | |||
17e1af1dd7 | |||
baade8fbc2 | |||
cfc07664fc | |||
52938c9106 | |||
b64f573a38 | |||
ebbd1ea8cb | |||
93a0147a78 | |||
2040e718d7 | |||
5679f67de0 | |||
8babdb978e | |||
b3388912c2 | |||
bce511ce0b | |||
50e36769d1 | |||
9477338331 | |||
c1d0930354 | |||
688067e5c5 | |||
529f36dc40 | |||
d8fdabfca6 | |||
8060b80ae6 | |||
15965c5b5f | |||
1eade03b63 | |||
f41fbc8baf | |||
14cd21dc1c | |||
1bdee4ee36 | |||
9e33742d81 | |||
8e78d13443 | |||
391fa39470 | |||
e6e90214e2 | |||
6f734b103a | |||
413bb824e1 | |||
58ad13dbad | |||
9f8b781f7b | |||
175b7c828b | |||
002119324f | |||
df78b6f1e5 | |||
e1bff0d280 | |||
4c9454aa9e | |||
e9e57495a6 | |||
b6505f6a37 | |||
a2463bf657 | |||
53cb73cd9b | |||
423a3aa0b0 | |||
7a2c6b6f06 | |||
ffb306a7a8 | |||
cef2ae2299 | |||
b91de72d19 | |||
fd08489587 | |||
ce0d6041ea | |||
3af60a82ce | |||
bcdf7db549 | |||
9b2f1f4ebb | |||
84e47237de | |||
909f6585b5 | |||
b48d7f1492 | |||
f1e9d1806f | |||
8c62d01f3c | |||
26a5025a32 | |||
6f931ce46f | |||
2d46592c4a | |||
c2d496f2b4 | |||
19d37806f2 | |||
b4bd9b8830 | |||
3c8227d0e9 | |||
d6409c21ec | |||
990b5acbda | |||
f9e14e2ffd | |||
a73afe6851 | |||
20544b27d9 | |||
288573b1a4 | |||
a12755d7be | |||
a248531ce2 | |||
de7919a031 | |||
3913039010 | |||
078d3cdcf9 | |||
c552a84870 | |||
7c1a14b6ad | |||
c69b8207b8 | |||
a319f400e9 | |||
ddcb041f3f | |||
2a73370c9f | |||
689a2109fa | |||
e82146c912 | |||
568398f1c6 | |||
1cc6363cba | |||
dcfca96051 | |||
981c347acf | |||
22aad6ed77 | |||
b06bbbba8f | |||
e06e6736c0 | |||
0abfba8b4f | |||
ca87bf9282 | |||
4f37b101ae | |||
e16f02d729 | |||
1256996d19 | |||
c1d1551283 | |||
26bdb3dbb5 | |||
c9d959d4c5 | |||
15ca2f10b8 | |||
2a81fbe9f2 | |||
fe276458db | |||
73d034ff00 | |||
63e6a3d2db | |||
fbb5bbd20e | |||
7ff238fea6 | |||
06e9926cb5 | |||
c9a54eda49 | |||
382cd73bae | |||
8e5270a1d8 | |||
fdf3fda24a | |||
219099779b | |||
7393ba54f1 | |||
c14cf28a3e | |||
68a0604365 | |||
8dc07554f6 | |||
64bb6c2922 | |||
4be0cdeb5f | |||
0c9da804bb | |||
f95a2a7923 | |||
8eff7db8ae | |||
57df8ab209 | |||
ffea4f21ef | |||
0b0e88c604 | |||
c48e27c649 | |||
dfa353c356 | |||
2f1209d1e0 | |||
195815fc8a | |||
4e393fdd57 | |||
75f14f7878 | |||
349640acc5 | |||
1d0eca90a7 | |||
81bb65db4e | |||
6295477ccf | |||
b7324b3b38 | |||
e90fb7f54c | |||
253de8cea2 | |||
bd014301fd | |||
45c0d26e33 | |||
0edceb6a7d | |||
056d798d61 | |||
96f2e9422c | |||
df19951729 | |||
bfc97dad32 | |||
d28ac95aa2 | |||
8a0df3e52c | |||
e2c42a5287 | |||
f638124930 | |||
9cabea63c3 | |||
20074ac4e1 | |||
0ec7bd93d8 | |||
c1a1af0109 | |||
2c0094670b | |||
58fdc32627 | |||
cbeca19467 | |||
4cc8bd4385 | |||
fac1efeb7d | |||
1abc2d6333 | |||
a69c523e3c | |||
766c67f723 | |||
2f70e42f9a | |||
763910b515 | |||
dca32e4317 | |||
c301978f0b | |||
97fcb5a420 | |||
724c49d056 | |||
7b5d225701 | |||
90fc0ee584 |
7
.env.example
Normal file
7
.env.example
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
HOC_REPODIR='./repos'
|
||||||
|
HOC_CACHEDIR='./cache'
|
||||||
|
HOC_PORT=8080
|
||||||
|
HOC_HOST='0.0.0.0'
|
||||||
|
HOC_WORKERS=4
|
||||||
|
|
||||||
|
HOC_BASE_URL='http://0.0.0.0:8080'
|
10
.github/dependabot.yml
vendored
Normal file
10
.github/dependabot.yml
vendored
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
version: 2
|
||||||
|
updates:
|
||||||
|
- package-ecosystem: cargo
|
||||||
|
directory: "/"
|
||||||
|
schedule:
|
||||||
|
interval: daily
|
||||||
|
time: "04:00"
|
||||||
|
open-pull-requests-limit: 10
|
||||||
|
assignees:
|
||||||
|
- vbrandl
|
23
.github/workflows/audit.yml
vendored
23
.github/workflows/audit.yml
vendored
@ -4,27 +4,24 @@ on:
|
|||||||
- cron: '0 1 * * *'
|
- cron: '0 1 * * *'
|
||||||
push:
|
push:
|
||||||
paths:
|
paths:
|
||||||
- 'Cargo.toml'
|
- '**/Cargo.toml'
|
||||||
- 'Cargo.lock'
|
- '**/Cargo.lock'
|
||||||
pull_request:
|
pull_request:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
security_audit:
|
security_audit:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Cache cargo registry
|
- name: Cache cargo registry, index and build directory
|
||||||
uses: actions/cache@v1
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: /usr/share/rust/.cargo/registry
|
path: |
|
||||||
key: ${{ runner.os }}-cargo-registry
|
~/.cargo/registry
|
||||||
|
~/.cargo/git
|
||||||
- name: Cache cargo index
|
./target
|
||||||
uses: actions/cache@v1
|
key: audit-${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
||||||
with:
|
|
||||||
path: /usr/share/rust/.cargo/git
|
|
||||||
key: ${{ runner.os }}-cargo-index
|
|
||||||
|
|
||||||
- uses: actions-rs/audit-check@v1
|
- uses: actions-rs/audit-check@v1
|
||||||
with:
|
with:
|
||||||
|
76
.github/workflows/release.yml
vendored
Normal file
76
.github/workflows/release.yml
vendored
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
name: Release
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- 'v[0-9]+.[0-9]+.[0-9]+'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
publish:
|
||||||
|
name: Publishing for ${{ matrix.os }}
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os: [macos-latest, ubuntu-latest, windows-latest]
|
||||||
|
rust: [stable]
|
||||||
|
include:
|
||||||
|
- os: macos-latest
|
||||||
|
artifact_prefix: macos
|
||||||
|
target: x86_64-apple-darwin
|
||||||
|
binary_postfix: ""
|
||||||
|
- os: ubuntu-latest
|
||||||
|
artifact_prefix: linux
|
||||||
|
target: x86_64-unknown-linux-gnu
|
||||||
|
binary_postfix: ""
|
||||||
|
- os: windows-latest
|
||||||
|
artifact_prefix: windows
|
||||||
|
target: x86_64-pc-windows-msvc
|
||||||
|
binary_postfix: ".exe"
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout sources
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Install stable toolchain
|
||||||
|
uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
toolchain: ${{ matrix.rust }}
|
||||||
|
override: true
|
||||||
|
|
||||||
|
- name: Cache cargo registry, index and build directory
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
~/.cargo/registry
|
||||||
|
~/.cargo/git
|
||||||
|
./target
|
||||||
|
key: release-${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
||||||
|
|
||||||
|
- name: Cargo build
|
||||||
|
uses: actions-rs/cargo@v1
|
||||||
|
with:
|
||||||
|
command: build
|
||||||
|
toolchain: ${{ matrix.rust }}
|
||||||
|
args: --release --target ${{ matrix.target }}
|
||||||
|
|
||||||
|
- name: Packaging final binary
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
cd target/${{ matrix.target }}/release
|
||||||
|
strip hoc${{ matrix.binary_postfix }}
|
||||||
|
tar czvf hoc-${{ matrix.artifact_prefix }}.tar.gz hoc${{ matrix.binary_postfix }}
|
||||||
|
|
||||||
|
if [[ ${{ runner.os }} == 'Windows' ]]; then
|
||||||
|
certutil -hashfile hoc-${{ matrix.artifact_prefix }}.tar.gz sha256 | grep -E [A-Fa-f0-9]{64} > hoc-${{ matrix.artifact_prefix }}.sha256
|
||||||
|
else
|
||||||
|
shasum -a 256 hoc-${{ matrix.artifact_prefix }}.tar.gz > hoc-${{ matrix.artifact_prefix }}.sha256
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Releasing assets
|
||||||
|
uses: softprops/action-gh-release@v1
|
||||||
|
with:
|
||||||
|
files: |
|
||||||
|
target/${{ matrix.target }}/release/hoc-${{ matrix.artifact_prefix }}.tar.gz
|
||||||
|
target/${{ matrix.target }}/release/hoc-${{ matrix.artifact_prefix }}.sha256
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
94
.github/workflows/rust.yml
vendored
94
.github/workflows/rust.yml
vendored
@ -1,41 +1,30 @@
|
|||||||
name: Rust
|
|
||||||
|
|
||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
lint:
|
|
||||||
name: Linting and Formatting Checks
|
rustfmt:
|
||||||
|
name: Rustfmt
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v1
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Install stable toolchain
|
- name: Install stable toolchain
|
||||||
uses: actions-rs/toolchain@v1
|
uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
toolchain: stable
|
toolchain: stable
|
||||||
|
profile: minimal
|
||||||
override: true
|
override: true
|
||||||
|
components: rustfmt
|
||||||
|
|
||||||
- name: Install rustfmt
|
- name: Cache cargo registry, index and build directory
|
||||||
run: rustup component add rustfmt
|
uses: actions/cache@v2
|
||||||
|
|
||||||
- name: Cache cargo registry
|
|
||||||
uses: actions/cache@v1
|
|
||||||
with:
|
with:
|
||||||
path: ~/.cargo/registry
|
path: |
|
||||||
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
|
~/.cargo/registry
|
||||||
|
~/.cargo/git
|
||||||
- name: Cache cargo index
|
./target
|
||||||
uses: actions/cache@v1
|
key: rustfmt-${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
||||||
with:
|
|
||||||
path: ~/.cargo/git
|
|
||||||
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
|
|
||||||
|
|
||||||
- name: Cache cargo build
|
|
||||||
uses: actions/cache@v1
|
|
||||||
with:
|
|
||||||
path: target
|
|
||||||
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
|
|
||||||
|
|
||||||
- name: Check Formatting
|
- name: Check Formatting
|
||||||
uses: actions-rs/cargo@v1
|
uses: actions-rs/cargo@v1
|
||||||
@ -43,8 +32,29 @@ jobs:
|
|||||||
command: fmt
|
command: fmt
|
||||||
args: --all -- --check
|
args: --all -- --check
|
||||||
|
|
||||||
- name: Install clippy
|
clippy:
|
||||||
run: rustup component add clippy
|
name: Clippy
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout sources
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Install stable toolchain
|
||||||
|
uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
toolchain: stable
|
||||||
|
profile: minimal
|
||||||
|
override: true
|
||||||
|
components: rustfmt
|
||||||
|
|
||||||
|
- name: Cache cargo registry, index and build directory
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
~/.cargo/registry
|
||||||
|
~/.cargo/git
|
||||||
|
./target
|
||||||
|
key: clippy-${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
||||||
|
|
||||||
- name: Clippy Linting
|
- name: Clippy Linting
|
||||||
uses: actions-rs/cargo@v1
|
uses: actions-rs/cargo@v1
|
||||||
@ -52,41 +62,35 @@ jobs:
|
|||||||
command: clippy
|
command: clippy
|
||||||
args: -- -D warnings
|
args: -- -D warnings
|
||||||
|
|
||||||
|
|
||||||
test:
|
test:
|
||||||
name: Run Tests
|
name: Test Suite
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
# add windows-latest when it is clear why tests are failing
|
# add windows-latest when it is clear why tests are failing
|
||||||
os: [ubuntu-latest, macos-latest]
|
# os: [ubuntu-latest, macos-latest]
|
||||||
|
os: [ubuntu-latest]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v1
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Install stable toolchain
|
- name: Install stable toolchain
|
||||||
uses: actions-rs/toolchain@v1
|
uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
toolchain: stable
|
toolchain: stable
|
||||||
|
profile: minimal
|
||||||
override: true
|
override: true
|
||||||
|
|
||||||
- name: Cache cargo registry
|
- name: Cache cargo registry, index and build directory
|
||||||
uses: actions/cache@v1
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: ~/.cargo/registry
|
path: |
|
||||||
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
|
~/.cargo/registry
|
||||||
|
~/.cargo/git
|
||||||
- name: Cache cargo index
|
./target
|
||||||
uses: actions/cache@v1
|
key: test-${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
||||||
with:
|
|
||||||
path: ~/.cargo/git
|
|
||||||
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
|
|
||||||
|
|
||||||
- name: Cache cargo build
|
|
||||||
uses: actions/cache@v1
|
|
||||||
with:
|
|
||||||
path: target
|
|
||||||
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
|
|
||||||
|
|
||||||
- name: Run Tests
|
- name: Run Tests
|
||||||
uses: actions-rs/cargo@v1
|
uses: actions-rs/cargo@v1
|
||||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -4,3 +4,4 @@ repos
|
|||||||
cache
|
cache
|
||||||
hoc.log
|
hoc.log
|
||||||
result
|
result
|
||||||
|
.env
|
||||||
|
@ -1,53 +0,0 @@
|
|||||||
image: docker:19.03
|
|
||||||
services:
|
|
||||||
- docker:19.03-dind
|
|
||||||
|
|
||||||
stages:
|
|
||||||
- build
|
|
||||||
- release
|
|
||||||
|
|
||||||
variables:
|
|
||||||
DOCKER_HOST: tcp://docker:2375
|
|
||||||
DOCKER_DRIVER: overlay2
|
|
||||||
# DOCKER_TLS_CERTDIR: "/certs"
|
|
||||||
DOCKER_TLS_CERTDIR: ""
|
|
||||||
CONTAINER_BUILDER_IMAGE: $CI_REGISTRY_IMAGE:builder-latest
|
|
||||||
CONTAINER_TEST_IMAGE: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
|
|
||||||
CONTAINER_RELEASE_IMAGE: $CI_REGISTRY_IMAGE:latest
|
|
||||||
|
|
||||||
before_script:
|
|
||||||
- export CONTAINER_TAG_IMAGE="$CI_REGISTRY_IMAGE:${CI_COMMIT_TAG:1}"
|
|
||||||
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
|
|
||||||
|
|
||||||
build:
|
|
||||||
stage: build
|
|
||||||
script:
|
|
||||||
- docker pull $CONTAINER_TEST_IMAGE || true
|
|
||||||
- docker pull $CONTAINER_RELEASE_IMAGE || true
|
|
||||||
- docker pull $CONTAINER_TAG_IMAGE || true
|
|
||||||
- docker pull $CONTAINER_BUILDER_IMAGE || true
|
|
||||||
- docker build --pull -t $CONTAINER_BUILDER_IMAGE --target builder .
|
|
||||||
- docker build --pull -t $CONTAINER_TEST_IMAGE .
|
|
||||||
- docker push $CONTAINER_BUILDER_IMAGE
|
|
||||||
- docker push $CONTAINER_TEST_IMAGE
|
|
||||||
|
|
||||||
release-image:
|
|
||||||
stage: release
|
|
||||||
script:
|
|
||||||
- docker pull $CONTAINER_TEST_IMAGE
|
|
||||||
- docker tag $CONTAINER_TEST_IMAGE $CONTAINER_RELEASE_IMAGE
|
|
||||||
- docker push $CONTAINER_RELEASE_IMAGE
|
|
||||||
only:
|
|
||||||
- master
|
|
||||||
|
|
||||||
release-tag:
|
|
||||||
stage: release
|
|
||||||
script:
|
|
||||||
- docker pull $CONTAINER_TEST_IMAGE
|
|
||||||
- docker tag $CONTAINER_TEST_IMAGE $CONTAINER_TAG_IMAGE
|
|
||||||
- docker push $CONTAINER_TAG_IMAGE
|
|
||||||
only:
|
|
||||||
- /^v\d+\.\d+\.\d+/
|
|
||||||
except:
|
|
||||||
- branch
|
|
||||||
|
|
17
.travis.yml
17
.travis.yml
@ -1,17 +0,0 @@
|
|||||||
language: rust
|
|
||||||
|
|
||||||
rust:
|
|
||||||
- stable
|
|
||||||
- beta
|
|
||||||
- nightly
|
|
||||||
|
|
||||||
cache:
|
|
||||||
- cargo
|
|
||||||
|
|
||||||
matrix:
|
|
||||||
allow_failures:
|
|
||||||
- rust: nightly
|
|
||||||
|
|
||||||
notifications:
|
|
||||||
email:
|
|
||||||
on_failure: always
|
|
2059
Cargo.lock
generated
2059
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
431
Cargo.nix
431
Cargo.nix
@ -27,7 +27,7 @@ in
|
|||||||
{
|
{
|
||||||
cargo2nixVersion = "0.8.2";
|
cargo2nixVersion = "0.8.2";
|
||||||
workspace = {
|
workspace = {
|
||||||
hoc = rustPackages.unknown.hoc."0.11.5";
|
hoc = rustPackages.unknown.hoc."0.12.0";
|
||||||
};
|
};
|
||||||
"registry+https://github.com/rust-lang/crates.io-index".actix-codec."0.2.0" = overridableMkRustCrate (profileName: rec {
|
"registry+https://github.com/rust-lang/crates.io-index".actix-codec."0.2.0" = overridableMkRustCrate (profileName: rec {
|
||||||
name = "actix-codec";
|
name = "actix-codec";
|
||||||
@ -37,8 +37,8 @@ in
|
|||||||
dependencies = {
|
dependencies = {
|
||||||
bitflags = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bitflags."1.2.1" { inherit profileName; };
|
bitflags = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bitflags."1.2.1" { inherit profileName; };
|
||||||
bytes = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."0.5.4" { inherit profileName; };
|
bytes = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."0.5.4" { inherit profileName; };
|
||||||
futures_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.4" { inherit profileName; };
|
futures_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.5" { inherit profileName; };
|
||||||
futures_sink = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-sink."0.3.4" { inherit profileName; };
|
futures_sink = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-sink."0.3.5" { inherit profileName; };
|
||||||
log = rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.8" { inherit profileName; };
|
log = rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.8" { inherit profileName; };
|
||||||
tokio = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."0.2.11" { inherit profileName; };
|
tokio = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."0.2.11" { inherit profileName; };
|
||||||
tokio_util = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio-util."0.2.0" { inherit profileName; };
|
tokio_util = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio-util."0.2.0" { inherit profileName; };
|
||||||
@ -57,12 +57,12 @@ in
|
|||||||
];
|
];
|
||||||
dependencies = {
|
dependencies = {
|
||||||
actix_codec = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-codec."0.2.0" { inherit profileName; };
|
actix_codec = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-codec."0.2.0" { inherit profileName; };
|
||||||
actix_rt = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-rt."1.0.0" { inherit profileName; };
|
actix_rt = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-rt."1.1.1" { inherit profileName; };
|
||||||
actix_service = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-service."1.0.5" { inherit profileName; };
|
actix_service = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-service."1.0.5" { inherit profileName; };
|
||||||
actix_utils = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-utils."1.0.6" { inherit profileName; };
|
actix_utils = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-utils."1.0.6" { inherit profileName; };
|
||||||
derive_more = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".derive_more."0.99.2" { profileName = "__noProfile"; };
|
derive_more = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".derive_more."0.99.2" { profileName = "__noProfile"; };
|
||||||
either = rustPackages."registry+https://github.com/rust-lang/crates.io-index".either."1.5.3" { inherit profileName; };
|
either = rustPackages."registry+https://github.com/rust-lang/crates.io-index".either."1.5.3" { inherit profileName; };
|
||||||
futures = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures."0.3.4" { inherit profileName; };
|
futures = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures."0.3.5" { inherit profileName; };
|
||||||
http = rustPackages."registry+https://github.com/rust-lang/crates.io-index".http."0.2.0" { inherit profileName; };
|
http = rustPackages."registry+https://github.com/rust-lang/crates.io-index".http."0.2.0" { inherit profileName; };
|
||||||
log = rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.8" { inherit profileName; };
|
log = rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.8" { inherit profileName; };
|
||||||
trust_dns_proto = rustPackages."registry+https://github.com/rust-lang/crates.io-index".trust-dns-proto."0.18.0-alpha.2" { inherit profileName; };
|
trust_dns_proto = rustPackages."registry+https://github.com/rust-lang/crates.io-index".trust-dns-proto."0.18.0-alpha.2" { inherit profileName; };
|
||||||
@ -86,7 +86,7 @@ in
|
|||||||
dependencies = {
|
dependencies = {
|
||||||
actix_codec = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-codec."0.2.0" { inherit profileName; };
|
actix_codec = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-codec."0.2.0" { inherit profileName; };
|
||||||
actix_connect = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-connect."1.0.2" { inherit profileName; };
|
actix_connect = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-connect."1.0.2" { inherit profileName; };
|
||||||
actix_rt = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-rt."1.0.0" { inherit profileName; };
|
actix_rt = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-rt."1.1.1" { inherit profileName; };
|
||||||
actix_service = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-service."1.0.5" { inherit profileName; };
|
actix_service = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-service."1.0.5" { inherit profileName; };
|
||||||
actix_threadpool = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-threadpool."0.3.1" { inherit profileName; };
|
actix_threadpool = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-threadpool."0.3.1" { inherit profileName; };
|
||||||
actix_utils = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-utils."1.0.6" { inherit profileName; };
|
actix_utils = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-utils."1.0.6" { inherit profileName; };
|
||||||
@ -101,11 +101,11 @@ in
|
|||||||
encoding_rs = rustPackages."registry+https://github.com/rust-lang/crates.io-index".encoding_rs."0.8.22" { inherit profileName; };
|
encoding_rs = rustPackages."registry+https://github.com/rust-lang/crates.io-index".encoding_rs."0.8.22" { inherit profileName; };
|
||||||
fail_ure = rustPackages."registry+https://github.com/rust-lang/crates.io-index".failure."0.1.6" { inherit profileName; };
|
fail_ure = rustPackages."registry+https://github.com/rust-lang/crates.io-index".failure."0.1.6" { inherit profileName; };
|
||||||
flate2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".flate2."1.0.13" { inherit profileName; };
|
flate2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".flate2."1.0.13" { inherit profileName; };
|
||||||
futures_channel = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-channel."0.3.4" { inherit profileName; };
|
futures_channel = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-channel."0.3.5" { inherit profileName; };
|
||||||
futures_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.4" { inherit profileName; };
|
futures_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.5" { inherit profileName; };
|
||||||
futures_util = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-util."0.3.4" { inherit profileName; };
|
futures_util = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-util."0.3.5" { inherit profileName; };
|
||||||
fxhash = rustPackages."registry+https://github.com/rust-lang/crates.io-index".fxhash."0.2.1" { inherit profileName; };
|
fxhash = rustPackages."registry+https://github.com/rust-lang/crates.io-index".fxhash."0.2.1" { inherit profileName; };
|
||||||
h2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".h2."0.2.1" { inherit profileName; };
|
h2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".h2."0.2.4" { inherit profileName; };
|
||||||
http = rustPackages."registry+https://github.com/rust-lang/crates.io-index".http."0.2.0" { inherit profileName; };
|
http = rustPackages."registry+https://github.com/rust-lang/crates.io-index".http."0.2.0" { inherit profileName; };
|
||||||
httparse = rustPackages."registry+https://github.com/rust-lang/crates.io-index".httparse."1.3.4" { inherit profileName; };
|
httparse = rustPackages."registry+https://github.com/rust-lang/crates.io-index".httparse."1.3.4" { inherit profileName; };
|
||||||
indexmap = rustPackages."registry+https://github.com/rust-lang/crates.io-index".indexmap."1.3.2" { inherit profileName; };
|
indexmap = rustPackages."registry+https://github.com/rust-lang/crates.io-index".indexmap."1.3.2" { inherit profileName; };
|
||||||
@ -117,8 +117,8 @@ in
|
|||||||
pin_project = rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project."0.4.8" { inherit profileName; };
|
pin_project = rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project."0.4.8" { inherit profileName; };
|
||||||
rand = rustPackages."registry+https://github.com/rust-lang/crates.io-index".rand."0.7.3" { inherit profileName; };
|
rand = rustPackages."registry+https://github.com/rust-lang/crates.io-index".rand."0.7.3" { inherit profileName; };
|
||||||
regex = rustPackages."registry+https://github.com/rust-lang/crates.io-index".regex."1.3.4" { inherit profileName; };
|
regex = rustPackages."registry+https://github.com/rust-lang/crates.io-index".regex."1.3.4" { inherit profileName; };
|
||||||
serde = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.105" { inherit profileName; };
|
serde = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.110" { inherit profileName; };
|
||||||
serde_json = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_json."1.0.48" { inherit profileName; };
|
serde_json = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_json."1.0.53" { inherit profileName; };
|
||||||
serde_urlencoded = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_urlencoded."0.6.1" { inherit profileName; };
|
serde_urlencoded = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_urlencoded."0.6.1" { inherit profileName; };
|
||||||
sha1 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".sha1."0.6.0" { inherit profileName; };
|
sha1 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".sha1."0.6.0" { inherit profileName; };
|
||||||
slab = rustPackages."registry+https://github.com/rust-lang/crates.io-index".slab."0.4.2" { inherit profileName; };
|
slab = rustPackages."registry+https://github.com/rust-lang/crates.io-index".slab."0.4.2" { inherit profileName; };
|
||||||
@ -151,20 +151,22 @@ in
|
|||||||
http = rustPackages."registry+https://github.com/rust-lang/crates.io-index".http."0.2.0" { inherit profileName; };
|
http = rustPackages."registry+https://github.com/rust-lang/crates.io-index".http."0.2.0" { inherit profileName; };
|
||||||
log = rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.8" { inherit profileName; };
|
log = rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.8" { inherit profileName; };
|
||||||
regex = rustPackages."registry+https://github.com/rust-lang/crates.io-index".regex."1.3.4" { inherit profileName; };
|
regex = rustPackages."registry+https://github.com/rust-lang/crates.io-index".regex."1.3.4" { inherit profileName; };
|
||||||
serde = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.105" { inherit profileName; };
|
serde = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.110" { inherit profileName; };
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
"registry+https://github.com/rust-lang/crates.io-index".actix-rt."1.0.0" = overridableMkRustCrate (profileName: rec {
|
"registry+https://github.com/rust-lang/crates.io-index".actix-rt."1.1.1" = overridableMkRustCrate (profileName: rec {
|
||||||
name = "actix-rt";
|
name = "actix-rt";
|
||||||
version = "1.0.0";
|
version = "1.1.1";
|
||||||
registry = "registry+https://github.com/rust-lang/crates.io-index";
|
registry = "registry+https://github.com/rust-lang/crates.io-index";
|
||||||
src = fetchCratesIo { inherit name version; sha256 = "3f6a0a55507046441a496b2f0d26a84a65e67c8cafffe279072412f624b5fb6d"; };
|
src = fetchCratesIo { inherit name version; sha256 = "143fcc2912e0d1de2bcf4e2f720d2a60c28652ab4179685a1ee159e0fb3db227"; };
|
||||||
dependencies = {
|
dependencies = {
|
||||||
actix_macros = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-macros."0.1.1" { profileName = "__noProfile"; };
|
actix_macros = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-macros."0.1.1" { profileName = "__noProfile"; };
|
||||||
actix_threadpool = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-threadpool."0.3.1" { inherit profileName; };
|
actix_threadpool = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-threadpool."0.3.1" { inherit profileName; };
|
||||||
copyless = rustPackages."registry+https://github.com/rust-lang/crates.io-index".copyless."0.1.4" { inherit profileName; };
|
copyless = rustPackages."registry+https://github.com/rust-lang/crates.io-index".copyless."0.1.4" { inherit profileName; };
|
||||||
futures = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures."0.3.4" { inherit profileName; };
|
futures_channel = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-channel."0.3.5" { inherit profileName; };
|
||||||
|
futures_util = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-util."0.3.5" { inherit profileName; };
|
||||||
|
smallvec = rustPackages."registry+https://github.com/rust-lang/crates.io-index".smallvec."1.2.0" { inherit profileName; };
|
||||||
tokio = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."0.2.11" { inherit profileName; };
|
tokio = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."0.2.11" { inherit profileName; };
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
@ -179,10 +181,10 @@ in
|
|||||||
];
|
];
|
||||||
dependencies = {
|
dependencies = {
|
||||||
actix_codec = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-codec."0.2.0" { inherit profileName; };
|
actix_codec = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-codec."0.2.0" { inherit profileName; };
|
||||||
actix_rt = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-rt."1.0.0" { inherit profileName; };
|
actix_rt = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-rt."1.1.1" { inherit profileName; };
|
||||||
actix_service = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-service."1.0.5" { inherit profileName; };
|
actix_service = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-service."1.0.5" { inherit profileName; };
|
||||||
actix_utils = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-utils."1.0.6" { inherit profileName; };
|
actix_utils = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-utils."1.0.6" { inherit profileName; };
|
||||||
futures = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures."0.3.4" { inherit profileName; };
|
futures = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures."0.3.5" { inherit profileName; };
|
||||||
log = rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.8" { inherit profileName; };
|
log = rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.8" { inherit profileName; };
|
||||||
mio = rustPackages."registry+https://github.com/rust-lang/crates.io-index".mio."0.6.21" { inherit profileName; };
|
mio = rustPackages."registry+https://github.com/rust-lang/crates.io-index".mio."0.6.21" { inherit profileName; };
|
||||||
mio_uds = rustPackages."registry+https://github.com/rust-lang/crates.io-index".mio-uds."0.6.7" { inherit profileName; };
|
mio_uds = rustPackages."registry+https://github.com/rust-lang/crates.io-index".mio-uds."0.6.7" { inherit profileName; };
|
||||||
@ -198,7 +200,7 @@ in
|
|||||||
registry = "registry+https://github.com/rust-lang/crates.io-index";
|
registry = "registry+https://github.com/rust-lang/crates.io-index";
|
||||||
src = fetchCratesIo { inherit name version; sha256 = "d3e4fc95dfa7e24171b2d0bb46b85f8ab0e8499e4e3caec691fc4ea65c287564"; };
|
src = fetchCratesIo { inherit name version; sha256 = "d3e4fc95dfa7e24171b2d0bb46b85f8ab0e8499e4e3caec691fc4ea65c287564"; };
|
||||||
dependencies = {
|
dependencies = {
|
||||||
futures_util = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-util."0.3.4" { inherit profileName; };
|
futures_util = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-util."0.3.5" { inherit profileName; };
|
||||||
pin_project = rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project."0.4.8" { inherit profileName; };
|
pin_project = rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project."0.4.8" { inherit profileName; };
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
@ -210,10 +212,10 @@ in
|
|||||||
src = fetchCratesIo { inherit name version; sha256 = "48494745b72d0ea8ff0cf874aaf9b622a3ee03d7081ee0c04edea4f26d32c911"; };
|
src = fetchCratesIo { inherit name version; sha256 = "48494745b72d0ea8ff0cf874aaf9b622a3ee03d7081ee0c04edea4f26d32c911"; };
|
||||||
dependencies = {
|
dependencies = {
|
||||||
actix_macros = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-macros."0.1.1" { profileName = "__noProfile"; };
|
actix_macros = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-macros."0.1.1" { profileName = "__noProfile"; };
|
||||||
actix_rt = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-rt."1.0.0" { inherit profileName; };
|
actix_rt = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-rt."1.1.1" { inherit profileName; };
|
||||||
actix_server = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-server."1.0.1" { inherit profileName; };
|
actix_server = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-server."1.0.1" { inherit profileName; };
|
||||||
actix_service = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-service."1.0.5" { inherit profileName; };
|
actix_service = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-service."1.0.5" { inherit profileName; };
|
||||||
futures = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures."0.3.4" { inherit profileName; };
|
futures = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures."0.3.5" { inherit profileName; };
|
||||||
log = rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.8" { inherit profileName; };
|
log = rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.8" { inherit profileName; };
|
||||||
net2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".net2."0.2.33" { inherit profileName; };
|
net2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".net2."0.2.33" { inherit profileName; };
|
||||||
};
|
};
|
||||||
@ -226,7 +228,7 @@ in
|
|||||||
src = fetchCratesIo { inherit name version; sha256 = "cf4082192601de5f303013709ff84d81ca6a1bc4af7fb24f367a500a23c6e84e"; };
|
src = fetchCratesIo { inherit name version; sha256 = "cf4082192601de5f303013709ff84d81ca6a1bc4af7fb24f367a500a23c6e84e"; };
|
||||||
dependencies = {
|
dependencies = {
|
||||||
derive_more = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".derive_more."0.99.2" { profileName = "__noProfile"; };
|
derive_more = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".derive_more."0.99.2" { profileName = "__noProfile"; };
|
||||||
futures_channel = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-channel."0.3.4" { inherit profileName; };
|
futures_channel = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-channel."0.3.5" { inherit profileName; };
|
||||||
lazy_static = rustPackages."registry+https://github.com/rust-lang/crates.io-index".lazy_static."1.4.0" { inherit profileName; };
|
lazy_static = rustPackages."registry+https://github.com/rust-lang/crates.io-index".lazy_static."1.4.0" { inherit profileName; };
|
||||||
log = rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.8" { inherit profileName; };
|
log = rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.8" { inherit profileName; };
|
||||||
num_cpus = rustPackages."registry+https://github.com/rust-lang/crates.io-index".num_cpus."1.12.0" { inherit profileName; };
|
num_cpus = rustPackages."registry+https://github.com/rust-lang/crates.io-index".num_cpus."1.12.0" { inherit profileName; };
|
||||||
@ -245,12 +247,12 @@ in
|
|||||||
];
|
];
|
||||||
dependencies = {
|
dependencies = {
|
||||||
actix_codec = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-codec."0.2.0" { inherit profileName; };
|
actix_codec = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-codec."0.2.0" { inherit profileName; };
|
||||||
actix_rt = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-rt."1.0.0" { inherit profileName; };
|
actix_rt = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-rt."1.1.1" { inherit profileName; };
|
||||||
actix_service = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-service."1.0.5" { inherit profileName; };
|
actix_service = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-service."1.0.5" { inherit profileName; };
|
||||||
actix_utils = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-utils."1.0.6" { inherit profileName; };
|
actix_utils = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-utils."1.0.6" { inherit profileName; };
|
||||||
derive_more = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".derive_more."0.99.2" { profileName = "__noProfile"; };
|
derive_more = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".derive_more."0.99.2" { profileName = "__noProfile"; };
|
||||||
either = rustPackages."registry+https://github.com/rust-lang/crates.io-index".either."1.5.3" { inherit profileName; };
|
either = rustPackages."registry+https://github.com/rust-lang/crates.io-index".either."1.5.3" { inherit profileName; };
|
||||||
futures = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures."0.3.4" { inherit profileName; };
|
futures = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures."0.3.5" { inherit profileName; };
|
||||||
log = rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.8" { inherit profileName; };
|
log = rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.8" { inherit profileName; };
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
@ -262,12 +264,12 @@ in
|
|||||||
src = fetchCratesIo { inherit name version; sha256 = "fcf8f5631bf01adec2267808f00e228b761c60c0584cc9fa0b5364f41d147f4e"; };
|
src = fetchCratesIo { inherit name version; sha256 = "fcf8f5631bf01adec2267808f00e228b761c60c0584cc9fa0b5364f41d147f4e"; };
|
||||||
dependencies = {
|
dependencies = {
|
||||||
actix_codec = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-codec."0.2.0" { inherit profileName; };
|
actix_codec = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-codec."0.2.0" { inherit profileName; };
|
||||||
actix_rt = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-rt."1.0.0" { inherit profileName; };
|
actix_rt = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-rt."1.1.1" { inherit profileName; };
|
||||||
actix_service = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-service."1.0.5" { inherit profileName; };
|
actix_service = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-service."1.0.5" { inherit profileName; };
|
||||||
bitflags = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bitflags."1.2.1" { inherit profileName; };
|
bitflags = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bitflags."1.2.1" { inherit profileName; };
|
||||||
bytes = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."0.5.4" { inherit profileName; };
|
bytes = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."0.5.4" { inherit profileName; };
|
||||||
either = rustPackages."registry+https://github.com/rust-lang/crates.io-index".either."1.5.3" { inherit profileName; };
|
either = rustPackages."registry+https://github.com/rust-lang/crates.io-index".either."1.5.3" { inherit profileName; };
|
||||||
futures = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures."0.3.4" { inherit profileName; };
|
futures = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures."0.3.5" { inherit profileName; };
|
||||||
log = rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.8" { inherit profileName; };
|
log = rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.8" { inherit profileName; };
|
||||||
pin_project = rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project."0.4.8" { inherit profileName; };
|
pin_project = rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project."0.4.8" { inherit profileName; };
|
||||||
slab = rustPackages."registry+https://github.com/rust-lang/crates.io-index".slab."0.4.2" { inherit profileName; };
|
slab = rustPackages."registry+https://github.com/rust-lang/crates.io-index".slab."0.4.2" { inherit profileName; };
|
||||||
@ -289,7 +291,7 @@ in
|
|||||||
actix_http = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-http."1.0.1" { inherit profileName; };
|
actix_http = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-http."1.0.1" { inherit profileName; };
|
||||||
actix_macros = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-macros."0.1.1" { profileName = "__noProfile"; };
|
actix_macros = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-macros."0.1.1" { profileName = "__noProfile"; };
|
||||||
actix_router = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-router."0.2.4" { inherit profileName; };
|
actix_router = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-router."0.2.4" { inherit profileName; };
|
||||||
actix_rt = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-rt."1.0.0" { inherit profileName; };
|
actix_rt = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-rt."1.1.1" { inherit profileName; };
|
||||||
actix_server = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-server."1.0.1" { inherit profileName; };
|
actix_server = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-server."1.0.1" { inherit profileName; };
|
||||||
actix_service = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-service."1.0.5" { inherit profileName; };
|
actix_service = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-service."1.0.5" { inherit profileName; };
|
||||||
actix_testing = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-testing."1.0.0" { inherit profileName; };
|
actix_testing = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-testing."1.0.0" { inherit profileName; };
|
||||||
@ -301,15 +303,15 @@ in
|
|||||||
bytes = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."0.5.4" { inherit profileName; };
|
bytes = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."0.5.4" { inherit profileName; };
|
||||||
derive_more = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".derive_more."0.99.2" { profileName = "__noProfile"; };
|
derive_more = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".derive_more."0.99.2" { profileName = "__noProfile"; };
|
||||||
encoding_rs = rustPackages."registry+https://github.com/rust-lang/crates.io-index".encoding_rs."0.8.22" { inherit profileName; };
|
encoding_rs = rustPackages."registry+https://github.com/rust-lang/crates.io-index".encoding_rs."0.8.22" { inherit profileName; };
|
||||||
futures = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures."0.3.4" { inherit profileName; };
|
futures = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures."0.3.5" { inherit profileName; };
|
||||||
fxhash = rustPackages."registry+https://github.com/rust-lang/crates.io-index".fxhash."0.2.1" { inherit profileName; };
|
fxhash = rustPackages."registry+https://github.com/rust-lang/crates.io-index".fxhash."0.2.1" { inherit profileName; };
|
||||||
log = rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.8" { inherit profileName; };
|
log = rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.8" { inherit profileName; };
|
||||||
mime = rustPackages."registry+https://github.com/rust-lang/crates.io-index".mime."0.3.16" { inherit profileName; };
|
mime = rustPackages."registry+https://github.com/rust-lang/crates.io-index".mime."0.3.16" { inherit profileName; };
|
||||||
net2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".net2."0.2.33" { inherit profileName; };
|
net2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".net2."0.2.33" { inherit profileName; };
|
||||||
pin_project = rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project."0.4.8" { inherit profileName; };
|
pin_project = rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project."0.4.8" { inherit profileName; };
|
||||||
regex = rustPackages."registry+https://github.com/rust-lang/crates.io-index".regex."1.3.4" { inherit profileName; };
|
regex = rustPackages."registry+https://github.com/rust-lang/crates.io-index".regex."1.3.4" { inherit profileName; };
|
||||||
serde = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.105" { inherit profileName; };
|
serde = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.110" { inherit profileName; };
|
||||||
serde_json = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_json."1.0.48" { inherit profileName; };
|
serde_json = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_json."1.0.53" { inherit profileName; };
|
||||||
serde_urlencoded = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_urlencoded."0.6.1" { inherit profileName; };
|
serde_urlencoded = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_urlencoded."0.6.1" { inherit profileName; };
|
||||||
time = rustPackages."registry+https://github.com/rust-lang/crates.io-index".time."0.1.42" { inherit profileName; };
|
time = rustPackages."registry+https://github.com/rust-lang/crates.io-index".time."0.1.42" { inherit profileName; };
|
||||||
url = rustPackages."registry+https://github.com/rust-lang/crates.io-index".url."2.1.1" { inherit profileName; };
|
url = rustPackages."registry+https://github.com/rust-lang/crates.io-index".url."2.1.1" { inherit profileName; };
|
||||||
@ -434,18 +436,18 @@ in
|
|||||||
dependencies = {
|
dependencies = {
|
||||||
actix_codec = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-codec."0.2.0" { inherit profileName; };
|
actix_codec = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-codec."0.2.0" { inherit profileName; };
|
||||||
actix_http = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-http."1.0.1" { inherit profileName; };
|
actix_http = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-http."1.0.1" { inherit profileName; };
|
||||||
actix_rt = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-rt."1.0.0" { inherit profileName; };
|
actix_rt = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-rt."1.1.1" { inherit profileName; };
|
||||||
actix_service = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-service."1.0.5" { inherit profileName; };
|
actix_service = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-service."1.0.5" { inherit profileName; };
|
||||||
base64 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".base64."0.11.0" { inherit profileName; };
|
base64 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".base64."0.11.0" { inherit profileName; };
|
||||||
bytes = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."0.5.4" { inherit profileName; };
|
bytes = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."0.5.4" { inherit profileName; };
|
||||||
derive_more = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".derive_more."0.99.2" { profileName = "__noProfile"; };
|
derive_more = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".derive_more."0.99.2" { profileName = "__noProfile"; };
|
||||||
futures_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.4" { inherit profileName; };
|
futures_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.5" { inherit profileName; };
|
||||||
log = rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.8" { inherit profileName; };
|
log = rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.8" { inherit profileName; };
|
||||||
mime = rustPackages."registry+https://github.com/rust-lang/crates.io-index".mime."0.3.16" { inherit profileName; };
|
mime = rustPackages."registry+https://github.com/rust-lang/crates.io-index".mime."0.3.16" { inherit profileName; };
|
||||||
percent_encoding = rustPackages."registry+https://github.com/rust-lang/crates.io-index".percent-encoding."2.1.0" { inherit profileName; };
|
percent_encoding = rustPackages."registry+https://github.com/rust-lang/crates.io-index".percent-encoding."2.1.0" { inherit profileName; };
|
||||||
rand = rustPackages."registry+https://github.com/rust-lang/crates.io-index".rand."0.7.3" { inherit profileName; };
|
rand = rustPackages."registry+https://github.com/rust-lang/crates.io-index".rand."0.7.3" { inherit profileName; };
|
||||||
serde = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.105" { inherit profileName; };
|
serde = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.110" { inherit profileName; };
|
||||||
serde_json = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_json."1.0.48" { inherit profileName; };
|
serde_json = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_json."1.0.53" { inherit profileName; };
|
||||||
serde_urlencoded = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_urlencoded."0.6.1" { inherit profileName; };
|
serde_urlencoded = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_urlencoded."0.6.1" { inherit profileName; };
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
@ -518,6 +520,17 @@ in
|
|||||||
];
|
];
|
||||||
});
|
});
|
||||||
|
|
||||||
|
"registry+https://github.com/rust-lang/crates.io-index".base64."0.12.0" = overridableMkRustCrate (profileName: rec {
|
||||||
|
name = "base64";
|
||||||
|
version = "0.12.0";
|
||||||
|
registry = "registry+https://github.com/rust-lang/crates.io-index";
|
||||||
|
src = fetchCratesIo { inherit name version; sha256 = "7d5ca2cd0adc3f48f9e9ea5a6bbdf9ccc0bfade884847e484d452414c7ccffb3"; };
|
||||||
|
features = builtins.concatLists [
|
||||||
|
[ "default" ]
|
||||||
|
[ "std" ]
|
||||||
|
];
|
||||||
|
});
|
||||||
|
|
||||||
"registry+https://github.com/rust-lang/crates.io-index".bitflags."1.2.1" = overridableMkRustCrate (profileName: rec {
|
"registry+https://github.com/rust-lang/crates.io-index".bitflags."1.2.1" = overridableMkRustCrate (profileName: rec {
|
||||||
name = "bitflags";
|
name = "bitflags";
|
||||||
version = "1.2.1";
|
version = "1.2.1";
|
||||||
@ -899,11 +912,11 @@ in
|
|||||||
src = fetchCratesIo { inherit name version; sha256 = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7"; };
|
src = fetchCratesIo { inherit name version; sha256 = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7"; };
|
||||||
});
|
});
|
||||||
|
|
||||||
"registry+https://github.com/rust-lang/crates.io-index".futures."0.3.4" = overridableMkRustCrate (profileName: rec {
|
"registry+https://github.com/rust-lang/crates.io-index".futures."0.3.5" = overridableMkRustCrate (profileName: rec {
|
||||||
name = "futures";
|
name = "futures";
|
||||||
version = "0.3.4";
|
version = "0.3.5";
|
||||||
registry = "registry+https://github.com/rust-lang/crates.io-index";
|
registry = "registry+https://github.com/rust-lang/crates.io-index";
|
||||||
src = fetchCratesIo { inherit name version; sha256 = "5c329ae8753502fb44ae4fc2b622fa2a94652c41e795143765ba0927f92ab780"; };
|
src = fetchCratesIo { inherit name version; sha256 = "1e05b85ec287aac0dc34db7d4a569323df697f9c55b99b15d6b4ef8cde49f613"; };
|
||||||
features = builtins.concatLists [
|
features = builtins.concatLists [
|
||||||
[ "alloc" ]
|
[ "alloc" ]
|
||||||
[ "async-await" ]
|
[ "async-await" ]
|
||||||
@ -913,21 +926,21 @@ in
|
|||||||
[ "std" ]
|
[ "std" ]
|
||||||
];
|
];
|
||||||
dependencies = {
|
dependencies = {
|
||||||
futures_channel = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-channel."0.3.4" { inherit profileName; };
|
futures_channel = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-channel."0.3.5" { inherit profileName; };
|
||||||
futures_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.4" { inherit profileName; };
|
futures_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.5" { inherit profileName; };
|
||||||
futures_executor = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-executor."0.3.4" { inherit profileName; };
|
futures_executor = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-executor."0.3.5" { inherit profileName; };
|
||||||
futures_io = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-io."0.3.4" { inherit profileName; };
|
futures_io = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-io."0.3.5" { inherit profileName; };
|
||||||
futures_sink = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-sink."0.3.4" { inherit profileName; };
|
futures_sink = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-sink."0.3.5" { inherit profileName; };
|
||||||
futures_task = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-task."0.3.4" { inherit profileName; };
|
futures_task = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-task."0.3.5" { inherit profileName; };
|
||||||
futures_util = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-util."0.3.4" { inherit profileName; };
|
futures_util = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-util."0.3.5" { inherit profileName; };
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
"registry+https://github.com/rust-lang/crates.io-index".futures-channel."0.3.4" = overridableMkRustCrate (profileName: rec {
|
"registry+https://github.com/rust-lang/crates.io-index".futures-channel."0.3.5" = overridableMkRustCrate (profileName: rec {
|
||||||
name = "futures-channel";
|
name = "futures-channel";
|
||||||
version = "0.3.4";
|
version = "0.3.5";
|
||||||
registry = "registry+https://github.com/rust-lang/crates.io-index";
|
registry = "registry+https://github.com/rust-lang/crates.io-index";
|
||||||
src = fetchCratesIo { inherit name version; sha256 = "f0c77d04ce8edd9cb903932b608268b3fffec4163dc053b3b402bf47eac1f1a8"; };
|
src = fetchCratesIo { inherit name version; sha256 = "f366ad74c28cca6ba456d95e6422883cfb4b252a83bed929c83abfdbbf2967d5"; };
|
||||||
features = builtins.concatLists [
|
features = builtins.concatLists [
|
||||||
[ "alloc" ]
|
[ "alloc" ]
|
||||||
[ "default" ]
|
[ "default" ]
|
||||||
@ -936,16 +949,16 @@ in
|
|||||||
[ "std" ]
|
[ "std" ]
|
||||||
];
|
];
|
||||||
dependencies = {
|
dependencies = {
|
||||||
futures_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.4" { inherit profileName; };
|
futures_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.5" { inherit profileName; };
|
||||||
futures_sink = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-sink."0.3.4" { inherit profileName; };
|
futures_sink = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-sink."0.3.5" { inherit profileName; };
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
"registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.4" = overridableMkRustCrate (profileName: rec {
|
"registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.5" = overridableMkRustCrate (profileName: rec {
|
||||||
name = "futures-core";
|
name = "futures-core";
|
||||||
version = "0.3.4";
|
version = "0.3.5";
|
||||||
registry = "registry+https://github.com/rust-lang/crates.io-index";
|
registry = "registry+https://github.com/rust-lang/crates.io-index";
|
||||||
src = fetchCratesIo { inherit name version; sha256 = "f25592f769825e89b92358db00d26f965761e094951ac44d3663ef25b7ac464a"; };
|
src = fetchCratesIo { inherit name version; sha256 = "59f5fff90fd5d971f936ad674802482ba441b6f09ba5e15fd8b39145582ca399"; };
|
||||||
features = builtins.concatLists [
|
features = builtins.concatLists [
|
||||||
[ "alloc" ]
|
[ "alloc" ]
|
||||||
[ "default" ]
|
[ "default" ]
|
||||||
@ -953,36 +966,36 @@ in
|
|||||||
];
|
];
|
||||||
});
|
});
|
||||||
|
|
||||||
"registry+https://github.com/rust-lang/crates.io-index".futures-executor."0.3.4" = overridableMkRustCrate (profileName: rec {
|
"registry+https://github.com/rust-lang/crates.io-index".futures-executor."0.3.5" = overridableMkRustCrate (profileName: rec {
|
||||||
name = "futures-executor";
|
name = "futures-executor";
|
||||||
version = "0.3.4";
|
version = "0.3.5";
|
||||||
registry = "registry+https://github.com/rust-lang/crates.io-index";
|
registry = "registry+https://github.com/rust-lang/crates.io-index";
|
||||||
src = fetchCratesIo { inherit name version; sha256 = "f674f3e1bcb15b37284a90cedf55afdba482ab061c407a9c0ebbd0f3109741ba"; };
|
src = fetchCratesIo { inherit name version; sha256 = "10d6bb888be1153d3abeb9006b11b02cf5e9b209fda28693c31ae1e4e012e314"; };
|
||||||
features = builtins.concatLists [
|
features = builtins.concatLists [
|
||||||
[ "std" ]
|
[ "std" ]
|
||||||
];
|
];
|
||||||
dependencies = {
|
dependencies = {
|
||||||
futures_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.4" { inherit profileName; };
|
futures_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.5" { inherit profileName; };
|
||||||
futures_task = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-task."0.3.4" { inherit profileName; };
|
futures_task = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-task."0.3.5" { inherit profileName; };
|
||||||
futures_util = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-util."0.3.4" { inherit profileName; };
|
futures_util = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-util."0.3.5" { inherit profileName; };
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
"registry+https://github.com/rust-lang/crates.io-index".futures-io."0.3.4" = overridableMkRustCrate (profileName: rec {
|
"registry+https://github.com/rust-lang/crates.io-index".futures-io."0.3.5" = overridableMkRustCrate (profileName: rec {
|
||||||
name = "futures-io";
|
name = "futures-io";
|
||||||
version = "0.3.4";
|
version = "0.3.5";
|
||||||
registry = "registry+https://github.com/rust-lang/crates.io-index";
|
registry = "registry+https://github.com/rust-lang/crates.io-index";
|
||||||
src = fetchCratesIo { inherit name version; sha256 = "a638959aa96152c7a4cddf50fcb1e3fede0583b27157c26e67d6f99904090dc6"; };
|
src = fetchCratesIo { inherit name version; sha256 = "de27142b013a8e869c14957e6d2edeef89e97c289e69d042ee3a49acd8b51789"; };
|
||||||
features = builtins.concatLists [
|
features = builtins.concatLists [
|
||||||
[ "std" ]
|
[ "std" ]
|
||||||
];
|
];
|
||||||
});
|
});
|
||||||
|
|
||||||
"registry+https://github.com/rust-lang/crates.io-index".futures-macro."0.3.4" = overridableMkRustCrate (profileName: rec {
|
"registry+https://github.com/rust-lang/crates.io-index".futures-macro."0.3.5" = overridableMkRustCrate (profileName: rec {
|
||||||
name = "futures-macro";
|
name = "futures-macro";
|
||||||
version = "0.3.4";
|
version = "0.3.5";
|
||||||
registry = "registry+https://github.com/rust-lang/crates.io-index";
|
registry = "registry+https://github.com/rust-lang/crates.io-index";
|
||||||
src = fetchCratesIo { inherit name version; sha256 = "9a5081aa3de1f7542a794a397cde100ed903b0630152d0973479018fd85423a7"; };
|
src = fetchCratesIo { inherit name version; sha256 = "d0b5a30a4328ab5473878237c447333c093297bded83a4983d10f4deea240d39"; };
|
||||||
dependencies = {
|
dependencies = {
|
||||||
proc_macro_hack = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro-hack."0.5.11" { profileName = "__noProfile"; };
|
proc_macro_hack = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro-hack."0.5.11" { profileName = "__noProfile"; };
|
||||||
proc_macro2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.8" { inherit profileName; };
|
proc_macro2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.8" { inherit profileName; };
|
||||||
@ -991,11 +1004,11 @@ in
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
"registry+https://github.com/rust-lang/crates.io-index".futures-sink."0.3.4" = overridableMkRustCrate (profileName: rec {
|
"registry+https://github.com/rust-lang/crates.io-index".futures-sink."0.3.5" = overridableMkRustCrate (profileName: rec {
|
||||||
name = "futures-sink";
|
name = "futures-sink";
|
||||||
version = "0.3.4";
|
version = "0.3.5";
|
||||||
registry = "registry+https://github.com/rust-lang/crates.io-index";
|
registry = "registry+https://github.com/rust-lang/crates.io-index";
|
||||||
src = fetchCratesIo { inherit name version; sha256 = "3466821b4bc114d95b087b850a724c6f83115e929bc88f1fa98a3304a944c8a6"; };
|
src = fetchCratesIo { inherit name version; sha256 = "3f2032893cb734c7a05d85ce0cc8b8c4075278e93b24b66f9de99d6eb0fa8acc"; };
|
||||||
features = builtins.concatLists [
|
features = builtins.concatLists [
|
||||||
[ "alloc" ]
|
[ "alloc" ]
|
||||||
[ "default" ]
|
[ "default" ]
|
||||||
@ -1003,22 +1016,26 @@ in
|
|||||||
];
|
];
|
||||||
});
|
});
|
||||||
|
|
||||||
"registry+https://github.com/rust-lang/crates.io-index".futures-task."0.3.4" = overridableMkRustCrate (profileName: rec {
|
"registry+https://github.com/rust-lang/crates.io-index".futures-task."0.3.5" = overridableMkRustCrate (profileName: rec {
|
||||||
name = "futures-task";
|
name = "futures-task";
|
||||||
version = "0.3.4";
|
version = "0.3.5";
|
||||||
registry = "registry+https://github.com/rust-lang/crates.io-index";
|
registry = "registry+https://github.com/rust-lang/crates.io-index";
|
||||||
src = fetchCratesIo { inherit name version; sha256 = "7b0a34e53cf6cdcd0178aa573aed466b646eb3db769570841fda0c7ede375a27"; };
|
src = fetchCratesIo { inherit name version; sha256 = "bdb66b5f09e22019b1ab0830f7785bcea8e7a42148683f99214f73f8ec21a626"; };
|
||||||
features = builtins.concatLists [
|
features = builtins.concatLists [
|
||||||
[ "alloc" ]
|
[ "alloc" ]
|
||||||
|
[ "once_cell" ]
|
||||||
[ "std" ]
|
[ "std" ]
|
||||||
];
|
];
|
||||||
|
dependencies = {
|
||||||
|
once_cell = rustPackages."registry+https://github.com/rust-lang/crates.io-index".once_cell."1.3.1" { inherit profileName; };
|
||||||
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
"registry+https://github.com/rust-lang/crates.io-index".futures-util."0.3.4" = overridableMkRustCrate (profileName: rec {
|
"registry+https://github.com/rust-lang/crates.io-index".futures-util."0.3.5" = overridableMkRustCrate (profileName: rec {
|
||||||
name = "futures-util";
|
name = "futures-util";
|
||||||
version = "0.3.4";
|
version = "0.3.5";
|
||||||
registry = "registry+https://github.com/rust-lang/crates.io-index";
|
registry = "registry+https://github.com/rust-lang/crates.io-index";
|
||||||
src = fetchCratesIo { inherit name version; sha256 = "22766cf25d64306bedf0384da004d05c9974ab104fcc4528f1236181c18004c5"; };
|
src = fetchCratesIo { inherit name version; sha256 = "8764574ff08b701a084482c3c7031349104b07ac897393010494beaa18ce32c6"; };
|
||||||
features = builtins.concatLists [
|
features = builtins.concatLists [
|
||||||
[ "alloc" ]
|
[ "alloc" ]
|
||||||
[ "async-await" ]
|
[ "async-await" ]
|
||||||
@ -1038,14 +1055,15 @@ in
|
|||||||
[ "std" ]
|
[ "std" ]
|
||||||
];
|
];
|
||||||
dependencies = {
|
dependencies = {
|
||||||
futures_channel = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-channel."0.3.4" { inherit profileName; };
|
futures_channel = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-channel."0.3.5" { inherit profileName; };
|
||||||
futures_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.4" { inherit profileName; };
|
futures_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.5" { inherit profileName; };
|
||||||
futures_io = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-io."0.3.4" { inherit profileName; };
|
futures_io = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-io."0.3.5" { inherit profileName; };
|
||||||
futures_macro = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-macro."0.3.4" { profileName = "__noProfile"; };
|
futures_macro = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-macro."0.3.5" { profileName = "__noProfile"; };
|
||||||
futures_sink = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-sink."0.3.4" { inherit profileName; };
|
futures_sink = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-sink."0.3.5" { inherit profileName; };
|
||||||
futures_task = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-task."0.3.4" { inherit profileName; };
|
futures_task = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-task."0.3.5" { inherit profileName; };
|
||||||
memchr = rustPackages."registry+https://github.com/rust-lang/crates.io-index".memchr."2.3.0" { inherit profileName; };
|
memchr = rustPackages."registry+https://github.com/rust-lang/crates.io-index".memchr."2.3.0" { inherit profileName; };
|
||||||
pin_utils = rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-utils."0.1.0-alpha.4" { inherit profileName; };
|
pin_project = rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project."0.4.8" { inherit profileName; };
|
||||||
|
pin_utils = rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-utils."0.1.0" { inherit profileName; };
|
||||||
proc_macro_hack = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro-hack."0.5.11" { profileName = "__noProfile"; };
|
proc_macro_hack = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro-hack."0.5.11" { profileName = "__noProfile"; };
|
||||||
proc_macro_nested = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro-nested."0.1.3" { inherit profileName; };
|
proc_macro_nested = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro-nested."0.1.3" { inherit profileName; };
|
||||||
slab = rustPackages."registry+https://github.com/rust-lang/crates.io-index".slab."0.4.2" { inherit profileName; };
|
slab = rustPackages."registry+https://github.com/rust-lang/crates.io-index".slab."0.4.2" { inherit profileName; };
|
||||||
@ -1077,11 +1095,11 @@ in
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
"registry+https://github.com/rust-lang/crates.io-index".git2."0.13.0" = overridableMkRustCrate (profileName: rec {
|
"registry+https://github.com/rust-lang/crates.io-index".git2."0.13.5" = overridableMkRustCrate (profileName: rec {
|
||||||
name = "git2";
|
name = "git2";
|
||||||
version = "0.13.0";
|
version = "0.13.5";
|
||||||
registry = "registry+https://github.com/rust-lang/crates.io-index";
|
registry = "registry+https://github.com/rust-lang/crates.io-index";
|
||||||
src = fetchCratesIo { inherit name version; sha256 = "b7da16ceafe24cedd9ba02c4463a2b506b6493baf4317c79c5acb553134a3c15"; };
|
src = fetchCratesIo { inherit name version; sha256 = "e1e02a51cd90229028c9bd8be0a0364f85b6b3199cccaa0ef39005ddbd5ac165"; };
|
||||||
features = builtins.concatLists [
|
features = builtins.concatLists [
|
||||||
[ "default" ]
|
[ "default" ]
|
||||||
[ "https" ]
|
[ "https" ]
|
||||||
@ -1093,7 +1111,7 @@ in
|
|||||||
dependencies = {
|
dependencies = {
|
||||||
bitflags = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bitflags."1.2.1" { inherit profileName; };
|
bitflags = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bitflags."1.2.1" { inherit profileName; };
|
||||||
libc = rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.66" { inherit profileName; };
|
libc = rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.66" { inherit profileName; };
|
||||||
libgit2_sys = rustPackages."registry+https://github.com/rust-lang/crates.io-index".libgit2-sys."0.12.0+0.99.0" { inherit profileName; };
|
libgit2_sys = rustPackages."registry+https://github.com/rust-lang/crates.io-index".libgit2-sys."0.12.5+1.0.0" { inherit profileName; };
|
||||||
log = rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.8" { inherit profileName; };
|
log = rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.8" { inherit profileName; };
|
||||||
${ if hostPlatform.isUnix && !(hostPlatform.parsed.kernel.name == "darwin") then "openssl_probe" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".openssl-probe."0.1.2" { inherit profileName; };
|
${ if hostPlatform.isUnix && !(hostPlatform.parsed.kernel.name == "darwin") then "openssl_probe" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".openssl-probe."0.1.2" { inherit profileName; };
|
||||||
${ if hostPlatform.isUnix && !(hostPlatform.parsed.kernel.name == "darwin") then "openssl_sys" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".openssl-sys."0.9.54" { inherit profileName; };
|
${ if hostPlatform.isUnix && !(hostPlatform.parsed.kernel.name == "darwin") then "openssl_sys" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".openssl-sys."0.9.54" { inherit profileName; };
|
||||||
@ -1101,23 +1119,23 @@ in
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
"registry+https://github.com/rust-lang/crates.io-index".h2."0.2.1" = overridableMkRustCrate (profileName: rec {
|
"registry+https://github.com/rust-lang/crates.io-index".h2."0.2.4" = overridableMkRustCrate (profileName: rec {
|
||||||
name = "h2";
|
name = "h2";
|
||||||
version = "0.2.1";
|
version = "0.2.4";
|
||||||
registry = "registry+https://github.com/rust-lang/crates.io-index";
|
registry = "registry+https://github.com/rust-lang/crates.io-index";
|
||||||
src = fetchCratesIo { inherit name version; sha256 = "b9433d71e471c1736fd5a61b671fc0b148d7a2992f666c958d03cd8feb3b88d1"; };
|
src = fetchCratesIo { inherit name version; sha256 = "377038bf3c89d18d6ca1431e7a5027194fbd724ca10592b9487ede5e8e144f42"; };
|
||||||
dependencies = {
|
dependencies = {
|
||||||
bytes = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."0.5.4" { inherit profileName; };
|
bytes = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."0.5.4" { inherit profileName; };
|
||||||
fnv = rustPackages."registry+https://github.com/rust-lang/crates.io-index".fnv."1.0.6" { inherit profileName; };
|
fnv = rustPackages."registry+https://github.com/rust-lang/crates.io-index".fnv."1.0.6" { inherit profileName; };
|
||||||
futures_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.4" { inherit profileName; };
|
futures_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.5" { inherit profileName; };
|
||||||
futures_sink = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-sink."0.3.4" { inherit profileName; };
|
futures_sink = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-sink."0.3.5" { inherit profileName; };
|
||||||
futures_util = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-util."0.3.4" { inherit profileName; };
|
futures_util = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-util."0.3.5" { inherit profileName; };
|
||||||
http = rustPackages."registry+https://github.com/rust-lang/crates.io-index".http."0.2.0" { inherit profileName; };
|
http = rustPackages."registry+https://github.com/rust-lang/crates.io-index".http."0.2.0" { inherit profileName; };
|
||||||
indexmap = rustPackages."registry+https://github.com/rust-lang/crates.io-index".indexmap."1.3.2" { inherit profileName; };
|
indexmap = rustPackages."registry+https://github.com/rust-lang/crates.io-index".indexmap."1.3.2" { inherit profileName; };
|
||||||
log = rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.8" { inherit profileName; };
|
log = rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.8" { inherit profileName; };
|
||||||
slab = rustPackages."registry+https://github.com/rust-lang/crates.io-index".slab."0.4.2" { inherit profileName; };
|
slab = rustPackages."registry+https://github.com/rust-lang/crates.io-index".slab."0.4.2" { inherit profileName; };
|
||||||
tokio = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."0.2.11" { inherit profileName; };
|
tokio = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."0.2.11" { inherit profileName; };
|
||||||
tokio_util = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio-util."0.2.0" { inherit profileName; };
|
tokio_util = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio-util."0.3.1" { inherit profileName; };
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -1144,31 +1162,34 @@ in
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
"unknown".hoc."0.11.5" = overridableMkRustCrate (profileName: rec {
|
"unknown".hoc."0.12.0" = overridableMkRustCrate (profileName: rec {
|
||||||
name = "hoc";
|
name = "hoc";
|
||||||
version = "0.11.5";
|
version = "0.12.0";
|
||||||
registry = "unknown";
|
registry = "unknown";
|
||||||
src = fetchCrateLocal ./.;
|
src = fetchCrateLocal ./.;
|
||||||
dependencies = {
|
dependencies = {
|
||||||
actix_rt = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-rt."1.0.0" { inherit profileName; };
|
actix_rt = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-rt."1.1.1" { inherit profileName; };
|
||||||
actix_web = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-web."2.0.0" { inherit profileName; };
|
actix_web = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-web."2.0.0" { inherit profileName; };
|
||||||
badge = rustPackages."registry+https://github.com/rust-lang/crates.io-index".badge."0.2.0" { inherit profileName; };
|
badge = rustPackages."registry+https://github.com/rust-lang/crates.io-index".badge."0.2.0" { inherit profileName; };
|
||||||
bytes = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."0.5.4" { inherit profileName; };
|
bytes = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."0.5.4" { inherit profileName; };
|
||||||
futures = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures."0.3.4" { inherit profileName; };
|
futures = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures."0.3.5" { inherit profileName; };
|
||||||
git2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".git2."0.13.0" { inherit profileName; };
|
git2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".git2."0.13.5" { inherit profileName; };
|
||||||
lazy_static = rustPackages."registry+https://github.com/rust-lang/crates.io-index".lazy_static."1.4.0" { inherit profileName; };
|
lazy_static = rustPackages."registry+https://github.com/rust-lang/crates.io-index".lazy_static."1.4.0" { inherit profileName; };
|
||||||
log = rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.8" { inherit profileName; };
|
log = rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.8" { inherit profileName; };
|
||||||
log4rs = rustPackages."registry+https://github.com/rust-lang/crates.io-index".log4rs."0.11.0" { inherit profileName; };
|
log4rs = rustPackages."registry+https://github.com/rust-lang/crates.io-index".log4rs."0.12.0" { inherit profileName; };
|
||||||
number_prefix = rustPackages."registry+https://github.com/rust-lang/crates.io-index".number_prefix."0.3.0" { inherit profileName; };
|
number_prefix = rustPackages."registry+https://github.com/rust-lang/crates.io-index".number_prefix."0.4.0" { inherit profileName; };
|
||||||
openssl_probe = rustPackages."registry+https://github.com/rust-lang/crates.io-index".openssl-probe."0.1.2" { inherit profileName; };
|
openssl_probe = rustPackages."registry+https://github.com/rust-lang/crates.io-index".openssl-probe."0.1.2" { inherit profileName; };
|
||||||
reqwest = rustPackages."registry+https://github.com/rust-lang/crates.io-index".reqwest."0.10.3" { inherit profileName; };
|
reqwest = rustPackages."registry+https://github.com/rust-lang/crates.io-index".reqwest."0.10.4" { inherit profileName; };
|
||||||
serde = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.105" { inherit profileName; };
|
serde = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.110" { inherit profileName; };
|
||||||
serde_derive = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_derive."1.0.105" { profileName = "__noProfile"; };
|
serde_derive = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_derive."1.0.110" { profileName = "__noProfile"; };
|
||||||
serde_json = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_json."1.0.48" { inherit profileName; };
|
serde_json = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_json."1.0.53" { inherit profileName; };
|
||||||
structopt = rustPackages."registry+https://github.com/rust-lang/crates.io-index".structopt."0.3.12" { inherit profileName; };
|
structopt = rustPackages."registry+https://github.com/rust-lang/crates.io-index".structopt."0.3.14" { inherit profileName; };
|
||||||
|
};
|
||||||
|
devDependencies = {
|
||||||
|
tempfile = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tempfile."3.1.0" { inherit profileName; };
|
||||||
};
|
};
|
||||||
buildDependencies = {
|
buildDependencies = {
|
||||||
ructe = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".ructe."0.9.2" { profileName = "__noProfile"; };
|
ructe = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".ructe."0.11.4" { profileName = "__noProfile"; };
|
||||||
vergen = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".vergen."3.1.0" { profileName = "__noProfile"; };
|
vergen = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".vergen."3.1.0" { profileName = "__noProfile"; };
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
@ -1228,21 +1249,21 @@ in
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
"registry+https://github.com/rust-lang/crates.io-index".hyper."0.13.2" = overridableMkRustCrate (profileName: rec {
|
"registry+https://github.com/rust-lang/crates.io-index".hyper."0.13.4" = overridableMkRustCrate (profileName: rec {
|
||||||
name = "hyper";
|
name = "hyper";
|
||||||
version = "0.13.2";
|
version = "0.13.4";
|
||||||
registry = "registry+https://github.com/rust-lang/crates.io-index";
|
registry = "registry+https://github.com/rust-lang/crates.io-index";
|
||||||
src = fetchCratesIo { inherit name version; sha256 = "fa1c527bbc634be72aa7ba31e4e4def9bbb020f5416916279b7c705cd838893e"; };
|
src = fetchCratesIo { inherit name version; sha256 = "ed6081100e960d9d74734659ffc9cc91daf1c0fc7aceb8eaa94ee1a3f5046f2e"; };
|
||||||
features = builtins.concatLists [
|
features = builtins.concatLists [
|
||||||
[ "net2" ]
|
[ "net2" ]
|
||||||
[ "tcp" ]
|
[ "tcp" ]
|
||||||
];
|
];
|
||||||
dependencies = {
|
dependencies = {
|
||||||
bytes = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."0.5.4" { inherit profileName; };
|
bytes = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."0.5.4" { inherit profileName; };
|
||||||
futures_channel = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-channel."0.3.4" { inherit profileName; };
|
futures_channel = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-channel."0.3.5" { inherit profileName; };
|
||||||
futures_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.4" { inherit profileName; };
|
futures_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.5" { inherit profileName; };
|
||||||
futures_util = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-util."0.3.4" { inherit profileName; };
|
futures_util = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-util."0.3.5" { inherit profileName; };
|
||||||
h2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".h2."0.2.1" { inherit profileName; };
|
h2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".h2."0.2.4" { inherit profileName; };
|
||||||
http = rustPackages."registry+https://github.com/rust-lang/crates.io-index".http."0.2.0" { inherit profileName; };
|
http = rustPackages."registry+https://github.com/rust-lang/crates.io-index".http."0.2.0" { inherit profileName; };
|
||||||
http_body = rustPackages."registry+https://github.com/rust-lang/crates.io-index".http-body."0.3.1" { inherit profileName; };
|
http_body = rustPackages."registry+https://github.com/rust-lang/crates.io-index".http-body."0.3.1" { inherit profileName; };
|
||||||
httparse = rustPackages."registry+https://github.com/rust-lang/crates.io-index".httparse."1.3.4" { inherit profileName; };
|
httparse = rustPackages."registry+https://github.com/rust-lang/crates.io-index".httparse."1.3.4" { inherit profileName; };
|
||||||
@ -1264,7 +1285,7 @@ in
|
|||||||
src = fetchCratesIo { inherit name version; sha256 = "3adcd308402b9553630734e9c36b77a7e48b3821251ca2493e8cd596763aafaa"; };
|
src = fetchCratesIo { inherit name version; sha256 = "3adcd308402b9553630734e9c36b77a7e48b3821251ca2493e8cd596763aafaa"; };
|
||||||
dependencies = {
|
dependencies = {
|
||||||
bytes = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."0.5.4" { inherit profileName; };
|
bytes = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."0.5.4" { inherit profileName; };
|
||||||
hyper = rustPackages."registry+https://github.com/rust-lang/crates.io-index".hyper."0.13.2" { inherit profileName; };
|
hyper = rustPackages."registry+https://github.com/rust-lang/crates.io-index".hyper."0.13.4" { inherit profileName; };
|
||||||
native_tls = rustPackages."registry+https://github.com/rust-lang/crates.io-index".native-tls."0.2.3" { inherit profileName; };
|
native_tls = rustPackages."registry+https://github.com/rust-lang/crates.io-index".native-tls."0.2.3" { inherit profileName; };
|
||||||
tokio = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."0.2.11" { inherit profileName; };
|
tokio = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."0.2.11" { inherit profileName; };
|
||||||
tokio_tls = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio-tls."0.3.0" { inherit profileName; };
|
tokio_tls = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio-tls."0.3.0" { inherit profileName; };
|
||||||
@ -1316,11 +1337,11 @@ in
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
"registry+https://github.com/rust-lang/crates.io-index".itertools."0.8.2" = overridableMkRustCrate (profileName: rec {
|
"registry+https://github.com/rust-lang/crates.io-index".itertools."0.9.0" = overridableMkRustCrate (profileName: rec {
|
||||||
name = "itertools";
|
name = "itertools";
|
||||||
version = "0.8.2";
|
version = "0.9.0";
|
||||||
registry = "registry+https://github.com/rust-lang/crates.io-index";
|
registry = "registry+https://github.com/rust-lang/crates.io-index";
|
||||||
src = fetchCratesIo { inherit name version; sha256 = "f56a2d0bc861f9165be4eb3442afd3c236d8a98afd426f65d92324ae1091a484"; };
|
src = fetchCratesIo { inherit name version; sha256 = "284f18f85651fe11e8a991b2adb42cb078325c996ed026d994719efcfca1d54b"; };
|
||||||
features = builtins.concatLists [
|
features = builtins.concatLists [
|
||||||
[ "default" ]
|
[ "default" ]
|
||||||
[ "use_std" ]
|
[ "use_std" ]
|
||||||
@ -1423,11 +1444,11 @@ in
|
|||||||
];
|
];
|
||||||
});
|
});
|
||||||
|
|
||||||
"registry+https://github.com/rust-lang/crates.io-index".libgit2-sys."0.12.0+0.99.0" = overridableMkRustCrate (profileName: rec {
|
"registry+https://github.com/rust-lang/crates.io-index".libgit2-sys."0.12.5+1.0.0" = overridableMkRustCrate (profileName: rec {
|
||||||
name = "libgit2-sys";
|
name = "libgit2-sys";
|
||||||
version = "0.12.0+0.99.0";
|
version = "0.12.5+1.0.0";
|
||||||
registry = "registry+https://github.com/rust-lang/crates.io-index";
|
registry = "registry+https://github.com/rust-lang/crates.io-index";
|
||||||
src = fetchCratesIo { inherit name version; sha256 = "05dff41ac39e7b653f5f1550886cf00ba52f8e7f57210b633cdeedb3de5b236c"; };
|
src = fetchCratesIo { inherit name version; sha256 = "3eadeec65514971355bf7134967a543f71372f35b53ac6c7143e7bd157f07535"; };
|
||||||
features = builtins.concatLists [
|
features = builtins.concatLists [
|
||||||
[ "https" ]
|
[ "https" ]
|
||||||
[ "libssh2-sys" ]
|
[ "libssh2-sys" ]
|
||||||
@ -1507,7 +1528,7 @@ in
|
|||||||
];
|
];
|
||||||
dependencies = {
|
dependencies = {
|
||||||
cfg_if = rustPackages."registry+https://github.com/rust-lang/crates.io-index".cfg-if."0.1.10" { inherit profileName; };
|
cfg_if = rustPackages."registry+https://github.com/rust-lang/crates.io-index".cfg-if."0.1.10" { inherit profileName; };
|
||||||
serde = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.105" { inherit profileName; };
|
serde = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.110" { inherit profileName; };
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -1518,11 +1539,11 @@ in
|
|||||||
src = fetchCratesIo { inherit name version; sha256 = "a94d21414c1f4a51209ad204c1776a3d0765002c76c6abcb602a6f09f1e881c7"; };
|
src = fetchCratesIo { inherit name version; sha256 = "a94d21414c1f4a51209ad204c1776a3d0765002c76c6abcb602a6f09f1e881c7"; };
|
||||||
});
|
});
|
||||||
|
|
||||||
"registry+https://github.com/rust-lang/crates.io-index".log4rs."0.11.0" = overridableMkRustCrate (profileName: rec {
|
"registry+https://github.com/rust-lang/crates.io-index".log4rs."0.12.0" = overridableMkRustCrate (profileName: rec {
|
||||||
name = "log4rs";
|
name = "log4rs";
|
||||||
version = "0.11.0";
|
version = "0.12.0";
|
||||||
registry = "registry+https://github.com/rust-lang/crates.io-index";
|
registry = "registry+https://github.com/rust-lang/crates.io-index";
|
||||||
src = fetchCratesIo { inherit name version; sha256 = "b47ba5437ccdf01e4addd4d2347ef561911d57f908f4db1e1b192d5c25a92715"; };
|
src = fetchCratesIo { inherit name version; sha256 = "f4d8e6e1d5f89acca713132acc6034f30bad09b961d1338161bdb71c08f6e4fa"; };
|
||||||
features = builtins.concatLists [
|
features = builtins.concatLists [
|
||||||
[ "all_components" ]
|
[ "all_components" ]
|
||||||
[ "ansi_writer" ]
|
[ "ansi_writer" ]
|
||||||
@ -1567,10 +1588,10 @@ in
|
|||||||
log = rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.8" { inherit profileName; };
|
log = rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.8" { inherit profileName; };
|
||||||
log_mdc = rustPackages."registry+https://github.com/rust-lang/crates.io-index".log-mdc."0.1.0" { inherit profileName; };
|
log_mdc = rustPackages."registry+https://github.com/rust-lang/crates.io-index".log-mdc."0.1.0" { inherit profileName; };
|
||||||
parking_lot = rustPackages."registry+https://github.com/rust-lang/crates.io-index".parking_lot."0.10.0" { inherit profileName; };
|
parking_lot = rustPackages."registry+https://github.com/rust-lang/crates.io-index".parking_lot."0.10.0" { inherit profileName; };
|
||||||
serde = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.105" { inherit profileName; };
|
serde = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.110" { inherit profileName; };
|
||||||
serde_value = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde-value."0.6.0" { inherit profileName; };
|
serde_value = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde-value."0.6.0" { inherit profileName; };
|
||||||
serde_derive = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_derive."1.0.105" { profileName = "__noProfile"; };
|
serde_derive = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_derive."1.0.110" { profileName = "__noProfile"; };
|
||||||
serde_json = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_json."1.0.48" { inherit profileName; };
|
serde_json = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_json."1.0.53" { inherit profileName; };
|
||||||
serde_yaml = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_yaml."0.8.11" { inherit profileName; };
|
serde_yaml = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_yaml."0.8.11" { inherit profileName; };
|
||||||
thread_id = rustPackages."registry+https://github.com/rust-lang/crates.io-index".thread-id."3.3.0" { inherit profileName; };
|
thread_id = rustPackages."registry+https://github.com/rust-lang/crates.io-index".thread-id."3.3.0" { inherit profileName; };
|
||||||
typemap = rustPackages."registry+https://github.com/rust-lang/crates.io-index".typemap."0.3.3" { inherit profileName; };
|
typemap = rustPackages."registry+https://github.com/rust-lang/crates.io-index".typemap."0.3.3" { inherit profileName; };
|
||||||
@ -1831,17 +1852,27 @@ in
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
"registry+https://github.com/rust-lang/crates.io-index".number_prefix."0.3.0" = overridableMkRustCrate (profileName: rec {
|
"registry+https://github.com/rust-lang/crates.io-index".number_prefix."0.4.0" = overridableMkRustCrate (profileName: rec {
|
||||||
name = "number_prefix";
|
name = "number_prefix";
|
||||||
version = "0.3.0";
|
version = "0.4.0";
|
||||||
registry = "registry+https://github.com/rust-lang/crates.io-index";
|
registry = "registry+https://github.com/rust-lang/crates.io-index";
|
||||||
src = fetchCratesIo { inherit name version; sha256 = "17b02fc0ff9a9e4b35b3342880f48e896ebf69f2967921fe8646bf5b7125956a"; };
|
src = fetchCratesIo { inherit name version; sha256 = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3"; };
|
||||||
features = builtins.concatLists [
|
features = builtins.concatLists [
|
||||||
[ "default" ]
|
[ "default" ]
|
||||||
[ "std" ]
|
[ "std" ]
|
||||||
];
|
];
|
||||||
});
|
});
|
||||||
|
|
||||||
|
"registry+https://github.com/rust-lang/crates.io-index".once_cell."1.3.1" = overridableMkRustCrate (profileName: rec {
|
||||||
|
name = "once_cell";
|
||||||
|
version = "1.3.1";
|
||||||
|
registry = "registry+https://github.com/rust-lang/crates.io-index";
|
||||||
|
src = fetchCratesIo { inherit name version; sha256 = "b1c601810575c99596d4afc46f78a678c80105117c379eb3650cf99b8a21ce5b"; };
|
||||||
|
features = builtins.concatLists [
|
||||||
|
[ "std" ]
|
||||||
|
];
|
||||||
|
});
|
||||||
|
|
||||||
"registry+https://github.com/rust-lang/crates.io-index".openssl."0.10.28" = overridableMkRustCrate (profileName: rec {
|
"registry+https://github.com/rust-lang/crates.io-index".openssl."0.10.28" = overridableMkRustCrate (profileName: rec {
|
||||||
name = "openssl";
|
name = "openssl";
|
||||||
version = "0.10.28";
|
version = "0.10.28";
|
||||||
@ -1970,11 +2001,11 @@ in
|
|||||||
src = fetchCratesIo { inherit name version; sha256 = "237844750cfbb86f67afe27eee600dfbbcb6188d734139b534cbfbf4f96792ae"; };
|
src = fetchCratesIo { inherit name version; sha256 = "237844750cfbb86f67afe27eee600dfbbcb6188d734139b534cbfbf4f96792ae"; };
|
||||||
});
|
});
|
||||||
|
|
||||||
"registry+https://github.com/rust-lang/crates.io-index".pin-utils."0.1.0-alpha.4" = overridableMkRustCrate (profileName: rec {
|
"registry+https://github.com/rust-lang/crates.io-index".pin-utils."0.1.0" = overridableMkRustCrate (profileName: rec {
|
||||||
name = "pin-utils";
|
name = "pin-utils";
|
||||||
version = "0.1.0-alpha.4";
|
version = "0.1.0";
|
||||||
registry = "registry+https://github.com/rust-lang/crates.io-index";
|
registry = "registry+https://github.com/rust-lang/crates.io-index";
|
||||||
src = fetchCratesIo { inherit name version; sha256 = "5894c618ce612a3fa23881b152b608bafb8c56cfc22f434a3ba3120b40f7b587"; };
|
src = fetchCratesIo { inherit name version; sha256 = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"; };
|
||||||
});
|
});
|
||||||
|
|
||||||
"registry+https://github.com/rust-lang/crates.io-index".pkg-config."0.3.17" = overridableMkRustCrate (profileName: rec {
|
"registry+https://github.com/rust-lang/crates.io-index".pkg-config."0.3.17" = overridableMkRustCrate (profileName: rec {
|
||||||
@ -1995,34 +2026,36 @@ in
|
|||||||
];
|
];
|
||||||
});
|
});
|
||||||
|
|
||||||
"registry+https://github.com/rust-lang/crates.io-index".proc-macro-error."0.4.8" = overridableMkRustCrate (profileName: rec {
|
"registry+https://github.com/rust-lang/crates.io-index".proc-macro-error."1.0.2" = overridableMkRustCrate (profileName: rec {
|
||||||
name = "proc-macro-error";
|
name = "proc-macro-error";
|
||||||
version = "0.4.8";
|
version = "1.0.2";
|
||||||
registry = "registry+https://github.com/rust-lang/crates.io-index";
|
registry = "registry+https://github.com/rust-lang/crates.io-index";
|
||||||
src = fetchCratesIo { inherit name version; sha256 = "875077759af22fa20b610ad4471d8155b321c89c3f2785526c9839b099be4e0a"; };
|
src = fetchCratesIo { inherit name version; sha256 = "98e9e4b82e0ef281812565ea4751049f1bdcdfccda7d3f459f2e138a40c08678"; };
|
||||||
dependencies = {
|
dependencies = {
|
||||||
proc_macro_error_attr = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro-error-attr."0.4.8" { profileName = "__noProfile"; };
|
proc_macro_error_attr = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro-error-attr."1.0.2" { profileName = "__noProfile"; };
|
||||||
proc_macro2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.8" { inherit profileName; };
|
proc_macro2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.8" { inherit profileName; };
|
||||||
quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.2" { inherit profileName; };
|
quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.2" { inherit profileName; };
|
||||||
syn = rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."1.0.14" { inherit profileName; };
|
syn = rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."1.0.14" { inherit profileName; };
|
||||||
};
|
};
|
||||||
buildDependencies = {
|
buildDependencies = {
|
||||||
rustversion = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".rustversion."1.0.2" { profileName = "__noProfile"; };
|
version_check = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".version_check."0.9.1" { profileName = "__noProfile"; };
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
"registry+https://github.com/rust-lang/crates.io-index".proc-macro-error-attr."0.4.8" = overridableMkRustCrate (profileName: rec {
|
"registry+https://github.com/rust-lang/crates.io-index".proc-macro-error-attr."1.0.2" = overridableMkRustCrate (profileName: rec {
|
||||||
name = "proc-macro-error-attr";
|
name = "proc-macro-error-attr";
|
||||||
version = "0.4.8";
|
version = "1.0.2";
|
||||||
registry = "registry+https://github.com/rust-lang/crates.io-index";
|
registry = "registry+https://github.com/rust-lang/crates.io-index";
|
||||||
src = fetchCratesIo { inherit name version; sha256 = "c5717d9fa2664351a01ed73ba5ef6df09c01a521cb42cb65a061432a826f3c7a"; };
|
src = fetchCratesIo { inherit name version; sha256 = "4f5444ead4e9935abd7f27dc51f7e852a0569ac888096d5ec2499470794e2e53"; };
|
||||||
dependencies = {
|
dependencies = {
|
||||||
proc_macro2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.8" { inherit profileName; };
|
proc_macro2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.8" { inherit profileName; };
|
||||||
quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.2" { inherit profileName; };
|
quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.2" { inherit profileName; };
|
||||||
rustversion = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".rustversion."1.0.2" { profileName = "__noProfile"; };
|
|
||||||
syn = rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."1.0.14" { inherit profileName; };
|
syn = rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."1.0.14" { inherit profileName; };
|
||||||
syn_mid = rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn-mid."0.5.0" { inherit profileName; };
|
syn_mid = rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn-mid."0.5.0" { inherit profileName; };
|
||||||
};
|
};
|
||||||
|
buildDependencies = {
|
||||||
|
version_check = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".version_check."0.9.1" { profileName = "__noProfile"; };
|
||||||
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
"registry+https://github.com/rust-lang/crates.io-index".proc-macro-hack."0.5.11" = overridableMkRustCrate (profileName: rec {
|
"registry+https://github.com/rust-lang/crates.io-index".proc-macro-hack."0.5.11" = overridableMkRustCrate (profileName: rec {
|
||||||
@ -2206,11 +2239,11 @@ in
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
"registry+https://github.com/rust-lang/crates.io-index".reqwest."0.10.3" = overridableMkRustCrate (profileName: rec {
|
"registry+https://github.com/rust-lang/crates.io-index".reqwest."0.10.4" = overridableMkRustCrate (profileName: rec {
|
||||||
name = "reqwest";
|
name = "reqwest";
|
||||||
version = "0.10.3";
|
version = "0.10.4";
|
||||||
registry = "registry+https://github.com/rust-lang/crates.io-index";
|
registry = "registry+https://github.com/rust-lang/crates.io-index";
|
||||||
src = fetchCratesIo { inherit name version; sha256 = "a9f62f24514117d09a8fc74b803d3d65faa27cea1c7378fb12b0d002913f3831"; };
|
src = fetchCratesIo { inherit name version; sha256 = "02b81e49ddec5109a9dcfc5f2a317ff53377c915e9ae9d4f2fb50914b85614e2"; };
|
||||||
features = builtins.concatLists [
|
features = builtins.concatLists [
|
||||||
[ "__tls" ]
|
[ "__tls" ]
|
||||||
[ "default" ]
|
[ "default" ]
|
||||||
@ -2223,11 +2256,11 @@ in
|
|||||||
${ if !(hostPlatform.parsed.cpu.name == "wasm32") then "base64" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".base64."0.11.0" { inherit profileName; };
|
${ if !(hostPlatform.parsed.cpu.name == "wasm32") then "base64" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".base64."0.11.0" { inherit profileName; };
|
||||||
bytes = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."0.5.4" { inherit profileName; };
|
bytes = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."0.5.4" { inherit profileName; };
|
||||||
${ if !(hostPlatform.parsed.cpu.name == "wasm32") then "encoding_rs" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".encoding_rs."0.8.22" { inherit profileName; };
|
${ if !(hostPlatform.parsed.cpu.name == "wasm32") then "encoding_rs" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".encoding_rs."0.8.22" { inherit profileName; };
|
||||||
${ if !(hostPlatform.parsed.cpu.name == "wasm32") then "futures_core" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.4" { inherit profileName; };
|
${ if !(hostPlatform.parsed.cpu.name == "wasm32") then "futures_core" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.5" { inherit profileName; };
|
||||||
${ if !(hostPlatform.parsed.cpu.name == "wasm32") then "futures_util" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-util."0.3.4" { inherit profileName; };
|
${ if !(hostPlatform.parsed.cpu.name == "wasm32") then "futures_util" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-util."0.3.5" { inherit profileName; };
|
||||||
http = rustPackages."registry+https://github.com/rust-lang/crates.io-index".http."0.2.0" { inherit profileName; };
|
http = rustPackages."registry+https://github.com/rust-lang/crates.io-index".http."0.2.0" { inherit profileName; };
|
||||||
${ if !(hostPlatform.parsed.cpu.name == "wasm32") then "http_body" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".http-body."0.3.1" { inherit profileName; };
|
${ if !(hostPlatform.parsed.cpu.name == "wasm32") then "http_body" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".http-body."0.3.1" { inherit profileName; };
|
||||||
${ if !(hostPlatform.parsed.cpu.name == "wasm32") then "hyper" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".hyper."0.13.2" { inherit profileName; };
|
${ if !(hostPlatform.parsed.cpu.name == "wasm32") then "hyper" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".hyper."0.13.4" { inherit profileName; };
|
||||||
${ if !(hostPlatform.parsed.cpu.name == "wasm32") then "hyper_tls" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".hyper-tls."0.4.1" { inherit profileName; };
|
${ if !(hostPlatform.parsed.cpu.name == "wasm32") then "hyper_tls" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".hyper-tls."0.4.1" { inherit profileName; };
|
||||||
${ if hostPlatform.parsed.cpu.name == "wasm32" then "js_sys" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".js-sys."0.3.35" { inherit profileName; };
|
${ if hostPlatform.parsed.cpu.name == "wasm32" then "js_sys" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".js-sys."0.3.35" { inherit profileName; };
|
||||||
${ if !(hostPlatform.parsed.cpu.name == "wasm32") then "lazy_static" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".lazy_static."1.4.0" { inherit profileName; };
|
${ if !(hostPlatform.parsed.cpu.name == "wasm32") then "lazy_static" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".lazy_static."1.4.0" { inherit profileName; };
|
||||||
@ -2237,7 +2270,7 @@ in
|
|||||||
${ if !(hostPlatform.parsed.cpu.name == "wasm32") then "native_tls_crate" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".native-tls."0.2.3" { inherit profileName; };
|
${ if !(hostPlatform.parsed.cpu.name == "wasm32") then "native_tls_crate" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".native-tls."0.2.3" { inherit profileName; };
|
||||||
${ if !(hostPlatform.parsed.cpu.name == "wasm32") then "percent_encoding" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".percent-encoding."2.1.0" { inherit profileName; };
|
${ if !(hostPlatform.parsed.cpu.name == "wasm32") then "percent_encoding" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".percent-encoding."2.1.0" { inherit profileName; };
|
||||||
${ if !(hostPlatform.parsed.cpu.name == "wasm32") then "pin_project_lite" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project-lite."0.1.4" { inherit profileName; };
|
${ if !(hostPlatform.parsed.cpu.name == "wasm32") then "pin_project_lite" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project-lite."0.1.4" { inherit profileName; };
|
||||||
serde = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.105" { inherit profileName; };
|
serde = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.110" { inherit profileName; };
|
||||||
${ if !(hostPlatform.parsed.cpu.name == "wasm32") then "serde_urlencoded" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_urlencoded."0.6.1" { inherit profileName; };
|
${ if !(hostPlatform.parsed.cpu.name == "wasm32") then "serde_urlencoded" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_urlencoded."0.6.1" { inherit profileName; };
|
||||||
${ if !(hostPlatform.parsed.cpu.name == "wasm32") then "time" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".time."0.1.42" { inherit profileName; };
|
${ if !(hostPlatform.parsed.cpu.name == "wasm32") then "time" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".time."0.1.42" { inherit profileName; };
|
||||||
${ if !(hostPlatform.parsed.cpu.name == "wasm32") then "tokio" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."0.2.11" { inherit profileName; };
|
${ if !(hostPlatform.parsed.cpu.name == "wasm32") then "tokio" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."0.2.11" { inherit profileName; };
|
||||||
@ -2265,15 +2298,15 @@ in
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
"registry+https://github.com/rust-lang/crates.io-index".ructe."0.9.2" = overridableMkRustCrate (profileName: rec {
|
"registry+https://github.com/rust-lang/crates.io-index".ructe."0.11.4" = overridableMkRustCrate (profileName: rec {
|
||||||
name = "ructe";
|
name = "ructe";
|
||||||
version = "0.9.2";
|
version = "0.11.4";
|
||||||
registry = "registry+https://github.com/rust-lang/crates.io-index";
|
registry = "registry+https://github.com/rust-lang/crates.io-index";
|
||||||
src = fetchCratesIo { inherit name version; sha256 = "c85620b8046f88a870d93d90fa56904dec76cc79139bfcc22e71e87f0cd2169f"; };
|
src = fetchCratesIo { inherit name version; sha256 = "f615d1e172dcc01a7cd78c7f77f21a5669c6de4341548ad2e7764e9045d06657"; };
|
||||||
dependencies = {
|
dependencies = {
|
||||||
base64 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".base64."0.11.0" { inherit profileName; };
|
base64 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".base64."0.12.0" { inherit profileName; };
|
||||||
bytecount = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytecount."0.6.0" { inherit profileName; };
|
bytecount = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytecount."0.6.0" { inherit profileName; };
|
||||||
itertools = rustPackages."registry+https://github.com/rust-lang/crates.io-index".itertools."0.8.2" { inherit profileName; };
|
itertools = rustPackages."registry+https://github.com/rust-lang/crates.io-index".itertools."0.9.0" { inherit profileName; };
|
||||||
md5 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".md5."0.7.0" { inherit profileName; };
|
md5 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".md5."0.7.0" { inherit profileName; };
|
||||||
nom = rustPackages."registry+https://github.com/rust-lang/crates.io-index".nom."5.1.0" { inherit profileName; };
|
nom = rustPackages."registry+https://github.com/rust-lang/crates.io-index".nom."5.1.0" { inherit profileName; };
|
||||||
};
|
};
|
||||||
@ -2308,18 +2341,6 @@ in
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
"registry+https://github.com/rust-lang/crates.io-index".rustversion."1.0.2" = overridableMkRustCrate (profileName: rec {
|
|
||||||
name = "rustversion";
|
|
||||||
version = "1.0.2";
|
|
||||||
registry = "registry+https://github.com/rust-lang/crates.io-index";
|
|
||||||
src = fetchCratesIo { inherit name version; sha256 = "b3bba175698996010c4f6dce5e7f173b6eb781fce25d2cfc45e27091ce0b79f6"; };
|
|
||||||
dependencies = {
|
|
||||||
proc_macro2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.8" { inherit profileName; };
|
|
||||||
quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.2" { inherit profileName; };
|
|
||||||
syn = rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."1.0.14" { inherit profileName; };
|
|
||||||
};
|
|
||||||
});
|
|
||||||
|
|
||||||
"registry+https://github.com/rust-lang/crates.io-index".ryu."1.0.2" = overridableMkRustCrate (profileName: rec {
|
"registry+https://github.com/rust-lang/crates.io-index".ryu."1.0.2" = overridableMkRustCrate (profileName: rec {
|
||||||
name = "ryu";
|
name = "ryu";
|
||||||
version = "1.0.2";
|
version = "1.0.2";
|
||||||
@ -2399,11 +2420,11 @@ in
|
|||||||
src = fetchCratesIo { inherit name version; sha256 = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3"; };
|
src = fetchCratesIo { inherit name version; sha256 = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3"; };
|
||||||
});
|
});
|
||||||
|
|
||||||
"registry+https://github.com/rust-lang/crates.io-index".serde."1.0.105" = overridableMkRustCrate (profileName: rec {
|
"registry+https://github.com/rust-lang/crates.io-index".serde."1.0.110" = overridableMkRustCrate (profileName: rec {
|
||||||
name = "serde";
|
name = "serde";
|
||||||
version = "1.0.105";
|
version = "1.0.110";
|
||||||
registry = "registry+https://github.com/rust-lang/crates.io-index";
|
registry = "registry+https://github.com/rust-lang/crates.io-index";
|
||||||
src = fetchCratesIo { inherit name version; sha256 = "e707fbbf255b8fc8c3b99abb91e7257a622caeb20a9818cbadbeeede4e0932ff"; };
|
src = fetchCratesIo { inherit name version; sha256 = "99e7b308464d16b56eba9964e4972a3eee817760ab60d88c3f86e1fecb08204c"; };
|
||||||
features = builtins.concatLists [
|
features = builtins.concatLists [
|
||||||
[ "default" ]
|
[ "default" ]
|
||||||
[ "derive" ]
|
[ "derive" ]
|
||||||
@ -2411,7 +2432,7 @@ in
|
|||||||
[ "std" ]
|
[ "std" ]
|
||||||
];
|
];
|
||||||
dependencies = {
|
dependencies = {
|
||||||
serde_derive = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_derive."1.0.105" { profileName = "__noProfile"; };
|
serde_derive = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_derive."1.0.110" { profileName = "__noProfile"; };
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -2422,15 +2443,15 @@ in
|
|||||||
src = fetchCratesIo { inherit name version; sha256 = "5a65a7291a8a568adcae4c10a677ebcedbc6c9cec91c054dee2ce40b0e3290eb"; };
|
src = fetchCratesIo { inherit name version; sha256 = "5a65a7291a8a568adcae4c10a677ebcedbc6c9cec91c054dee2ce40b0e3290eb"; };
|
||||||
dependencies = {
|
dependencies = {
|
||||||
ordered_float = rustPackages."registry+https://github.com/rust-lang/crates.io-index".ordered-float."1.0.2" { inherit profileName; };
|
ordered_float = rustPackages."registry+https://github.com/rust-lang/crates.io-index".ordered-float."1.0.2" { inherit profileName; };
|
||||||
serde = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.105" { inherit profileName; };
|
serde = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.110" { inherit profileName; };
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
"registry+https://github.com/rust-lang/crates.io-index".serde_derive."1.0.105" = overridableMkRustCrate (profileName: rec {
|
"registry+https://github.com/rust-lang/crates.io-index".serde_derive."1.0.110" = overridableMkRustCrate (profileName: rec {
|
||||||
name = "serde_derive";
|
name = "serde_derive";
|
||||||
version = "1.0.105";
|
version = "1.0.110";
|
||||||
registry = "registry+https://github.com/rust-lang/crates.io-index";
|
registry = "registry+https://github.com/rust-lang/crates.io-index";
|
||||||
src = fetchCratesIo { inherit name version; sha256 = "ac5d00fc561ba2724df6758a17de23df5914f20e41cb00f94d5b7ae42fffaff8"; };
|
src = fetchCratesIo { inherit name version; sha256 = "818fbf6bfa9a42d3bfcaca148547aa00c7b915bec71d1757aa2d44ca68771984"; };
|
||||||
features = builtins.concatLists [
|
features = builtins.concatLists [
|
||||||
[ "default" ]
|
[ "default" ]
|
||||||
];
|
];
|
||||||
@ -2441,11 +2462,11 @@ in
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
"registry+https://github.com/rust-lang/crates.io-index".serde_json."1.0.48" = overridableMkRustCrate (profileName: rec {
|
"registry+https://github.com/rust-lang/crates.io-index".serde_json."1.0.53" = overridableMkRustCrate (profileName: rec {
|
||||||
name = "serde_json";
|
name = "serde_json";
|
||||||
version = "1.0.48";
|
version = "1.0.53";
|
||||||
registry = "registry+https://github.com/rust-lang/crates.io-index";
|
registry = "registry+https://github.com/rust-lang/crates.io-index";
|
||||||
src = fetchCratesIo { inherit name version; sha256 = "9371ade75d4c2d6cb154141b9752cf3781ec9c05e0e5cf35060e1e70ee7b9c25"; };
|
src = fetchCratesIo { inherit name version; sha256 = "993948e75b189211a9b31a7528f950c6adc21f9720b6438ff80a7fa2f864cea2"; };
|
||||||
features = builtins.concatLists [
|
features = builtins.concatLists [
|
||||||
[ "default" ]
|
[ "default" ]
|
||||||
[ "std" ]
|
[ "std" ]
|
||||||
@ -2453,7 +2474,7 @@ in
|
|||||||
dependencies = {
|
dependencies = {
|
||||||
itoa = rustPackages."registry+https://github.com/rust-lang/crates.io-index".itoa."0.4.5" { inherit profileName; };
|
itoa = rustPackages."registry+https://github.com/rust-lang/crates.io-index".itoa."0.4.5" { inherit profileName; };
|
||||||
ryu = rustPackages."registry+https://github.com/rust-lang/crates.io-index".ryu."1.0.2" { inherit profileName; };
|
ryu = rustPackages."registry+https://github.com/rust-lang/crates.io-index".ryu."1.0.2" { inherit profileName; };
|
||||||
serde = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.105" { inherit profileName; };
|
serde = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.110" { inherit profileName; };
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -2465,7 +2486,7 @@ in
|
|||||||
dependencies = {
|
dependencies = {
|
||||||
dtoa = rustPackages."registry+https://github.com/rust-lang/crates.io-index".dtoa."0.4.5" { inherit profileName; };
|
dtoa = rustPackages."registry+https://github.com/rust-lang/crates.io-index".dtoa."0.4.5" { inherit profileName; };
|
||||||
itoa = rustPackages."registry+https://github.com/rust-lang/crates.io-index".itoa."0.4.5" { inherit profileName; };
|
itoa = rustPackages."registry+https://github.com/rust-lang/crates.io-index".itoa."0.4.5" { inherit profileName; };
|
||||||
serde = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.105" { inherit profileName; };
|
serde = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.110" { inherit profileName; };
|
||||||
url = rustPackages."registry+https://github.com/rust-lang/crates.io-index".url."2.1.1" { inherit profileName; };
|
url = rustPackages."registry+https://github.com/rust-lang/crates.io-index".url."2.1.1" { inherit profileName; };
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
@ -2478,7 +2499,7 @@ in
|
|||||||
dependencies = {
|
dependencies = {
|
||||||
dtoa = rustPackages."registry+https://github.com/rust-lang/crates.io-index".dtoa."0.4.5" { inherit profileName; };
|
dtoa = rustPackages."registry+https://github.com/rust-lang/crates.io-index".dtoa."0.4.5" { inherit profileName; };
|
||||||
linked_hash_map = rustPackages."registry+https://github.com/rust-lang/crates.io-index".linked-hash-map."0.5.2" { inherit profileName; };
|
linked_hash_map = rustPackages."registry+https://github.com/rust-lang/crates.io-index".linked-hash-map."0.5.2" { inherit profileName; };
|
||||||
serde = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.105" { inherit profileName; };
|
serde = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.110" { inherit profileName; };
|
||||||
yaml_rust = rustPackages."registry+https://github.com/rust-lang/crates.io-index".yaml-rust."0.4.3" { inherit profileName; };
|
yaml_rust = rustPackages."registry+https://github.com/rust-lang/crates.io-index".yaml-rust."0.4.3" { inherit profileName; };
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
@ -2573,29 +2594,29 @@ in
|
|||||||
src = fetchCratesIo { inherit name version; sha256 = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a"; };
|
src = fetchCratesIo { inherit name version; sha256 = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a"; };
|
||||||
});
|
});
|
||||||
|
|
||||||
"registry+https://github.com/rust-lang/crates.io-index".structopt."0.3.12" = overridableMkRustCrate (profileName: rec {
|
"registry+https://github.com/rust-lang/crates.io-index".structopt."0.3.14" = overridableMkRustCrate (profileName: rec {
|
||||||
name = "structopt";
|
name = "structopt";
|
||||||
version = "0.3.12";
|
version = "0.3.14";
|
||||||
registry = "registry+https://github.com/rust-lang/crates.io-index";
|
registry = "registry+https://github.com/rust-lang/crates.io-index";
|
||||||
src = fetchCratesIo { inherit name version; sha256 = "c8faa2719539bbe9d77869bfb15d4ee769f99525e707931452c97b693b3f159d"; };
|
src = fetchCratesIo { inherit name version; sha256 = "863246aaf5ddd0d6928dfeb1a9ca65f505599e4e1b399935ef7e75107516b4ef"; };
|
||||||
features = builtins.concatLists [
|
features = builtins.concatLists [
|
||||||
[ "default" ]
|
[ "default" ]
|
||||||
];
|
];
|
||||||
dependencies = {
|
dependencies = {
|
||||||
clap = rustPackages."registry+https://github.com/rust-lang/crates.io-index".clap."2.33.0" { inherit profileName; };
|
clap = rustPackages."registry+https://github.com/rust-lang/crates.io-index".clap."2.33.0" { inherit profileName; };
|
||||||
lazy_static = rustPackages."registry+https://github.com/rust-lang/crates.io-index".lazy_static."1.4.0" { inherit profileName; };
|
lazy_static = rustPackages."registry+https://github.com/rust-lang/crates.io-index".lazy_static."1.4.0" { inherit profileName; };
|
||||||
structopt_derive = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".structopt-derive."0.4.5" { profileName = "__noProfile"; };
|
structopt_derive = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".structopt-derive."0.4.7" { profileName = "__noProfile"; };
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
"registry+https://github.com/rust-lang/crates.io-index".structopt-derive."0.4.5" = overridableMkRustCrate (profileName: rec {
|
"registry+https://github.com/rust-lang/crates.io-index".structopt-derive."0.4.7" = overridableMkRustCrate (profileName: rec {
|
||||||
name = "structopt-derive";
|
name = "structopt-derive";
|
||||||
version = "0.4.5";
|
version = "0.4.7";
|
||||||
registry = "registry+https://github.com/rust-lang/crates.io-index";
|
registry = "registry+https://github.com/rust-lang/crates.io-index";
|
||||||
src = fetchCratesIo { inherit name version; sha256 = "3f88b8e18c69496aad6f9ddf4630dd7d585bcaf765786cb415b9aec2fe5a0430"; };
|
src = fetchCratesIo { inherit name version; sha256 = "d239ca4b13aee7a2142e6795cbd69e457665ff8037aed33b3effdc430d2f927a"; };
|
||||||
dependencies = {
|
dependencies = {
|
||||||
heck = rustPackages."registry+https://github.com/rust-lang/crates.io-index".heck."0.3.1" { inherit profileName; };
|
heck = rustPackages."registry+https://github.com/rust-lang/crates.io-index".heck."0.3.1" { inherit profileName; };
|
||||||
proc_macro_error = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro-error."0.4.8" { inherit profileName; };
|
proc_macro_error = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro-error."1.0.2" { inherit profileName; };
|
||||||
proc_macro2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.8" { inherit profileName; };
|
proc_macro2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.8" { inherit profileName; };
|
||||||
quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.2" { inherit profileName; };
|
quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.2" { inherit profileName; };
|
||||||
syn = rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."1.0.14" { inherit profileName; };
|
syn = rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."1.0.14" { inherit profileName; };
|
||||||
@ -2759,7 +2780,7 @@ in
|
|||||||
dependencies = {
|
dependencies = {
|
||||||
bytes = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."0.5.4" { inherit profileName; };
|
bytes = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."0.5.4" { inherit profileName; };
|
||||||
fnv = rustPackages."registry+https://github.com/rust-lang/crates.io-index".fnv."1.0.6" { inherit profileName; };
|
fnv = rustPackages."registry+https://github.com/rust-lang/crates.io-index".fnv."1.0.6" { inherit profileName; };
|
||||||
futures_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.4" { inherit profileName; };
|
futures_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.5" { inherit profileName; };
|
||||||
iovec = rustPackages."registry+https://github.com/rust-lang/crates.io-index".iovec."0.1.4" { inherit profileName; };
|
iovec = rustPackages."registry+https://github.com/rust-lang/crates.io-index".iovec."0.1.4" { inherit profileName; };
|
||||||
lazy_static = rustPackages."registry+https://github.com/rust-lang/crates.io-index".lazy_static."1.4.0" { inherit profileName; };
|
lazy_static = rustPackages."registry+https://github.com/rust-lang/crates.io-index".lazy_static."1.4.0" { inherit profileName; };
|
||||||
${ if hostPlatform.isUnix then "libc" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.66" { inherit profileName; };
|
${ if hostPlatform.isUnix then "libc" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.66" { inherit profileName; };
|
||||||
@ -2789,14 +2810,32 @@ in
|
|||||||
version = "0.2.0";
|
version = "0.2.0";
|
||||||
registry = "registry+https://github.com/rust-lang/crates.io-index";
|
registry = "registry+https://github.com/rust-lang/crates.io-index";
|
||||||
src = fetchCratesIo { inherit name version; sha256 = "571da51182ec208780505a32528fc5512a8fe1443ab960b3f2f3ef093cd16930"; };
|
src = fetchCratesIo { inherit name version; sha256 = "571da51182ec208780505a32528fc5512a8fe1443ab960b3f2f3ef093cd16930"; };
|
||||||
|
features = builtins.concatLists [
|
||||||
|
[ "codec" ]
|
||||||
|
];
|
||||||
|
dependencies = {
|
||||||
|
bytes = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."0.5.4" { inherit profileName; };
|
||||||
|
futures_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.5" { inherit profileName; };
|
||||||
|
futures_sink = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-sink."0.3.5" { inherit profileName; };
|
||||||
|
log = rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.8" { inherit profileName; };
|
||||||
|
pin_project_lite = rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project-lite."0.1.4" { inherit profileName; };
|
||||||
|
tokio = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."0.2.11" { inherit profileName; };
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
|
"registry+https://github.com/rust-lang/crates.io-index".tokio-util."0.3.1" = overridableMkRustCrate (profileName: rec {
|
||||||
|
name = "tokio-util";
|
||||||
|
version = "0.3.1";
|
||||||
|
registry = "registry+https://github.com/rust-lang/crates.io-index";
|
||||||
|
src = fetchCratesIo { inherit name version; sha256 = "be8242891f2b6cbef26a2d7e8605133c2c554cd35b3e4948ea892d6d68436499"; };
|
||||||
features = builtins.concatLists [
|
features = builtins.concatLists [
|
||||||
[ "codec" ]
|
[ "codec" ]
|
||||||
[ "default" ]
|
[ "default" ]
|
||||||
];
|
];
|
||||||
dependencies = {
|
dependencies = {
|
||||||
bytes = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."0.5.4" { inherit profileName; };
|
bytes = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."0.5.4" { inherit profileName; };
|
||||||
futures_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.4" { inherit profileName; };
|
futures_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.5" { inherit profileName; };
|
||||||
futures_sink = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-sink."0.3.4" { inherit profileName; };
|
futures_sink = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-sink."0.3.5" { inherit profileName; };
|
||||||
log = rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.8" { inherit profileName; };
|
log = rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.8" { inherit profileName; };
|
||||||
pin_project_lite = rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project-lite."0.1.4" { inherit profileName; };
|
pin_project_lite = rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project-lite."0.1.4" { inherit profileName; };
|
||||||
tokio = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."0.2.11" { inherit profileName; };
|
tokio = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."0.2.11" { inherit profileName; };
|
||||||
@ -2831,7 +2870,7 @@ in
|
|||||||
async_trait = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".async-trait."0.1.24" { profileName = "__noProfile"; };
|
async_trait = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".async-trait."0.1.24" { profileName = "__noProfile"; };
|
||||||
enum_as_inner = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".enum-as-inner."0.3.0" { profileName = "__noProfile"; };
|
enum_as_inner = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".enum-as-inner."0.3.0" { profileName = "__noProfile"; };
|
||||||
failure = rustPackages."registry+https://github.com/rust-lang/crates.io-index".failure."0.1.6" { inherit profileName; };
|
failure = rustPackages."registry+https://github.com/rust-lang/crates.io-index".failure."0.1.6" { inherit profileName; };
|
||||||
futures = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures."0.3.4" { inherit profileName; };
|
futures = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures."0.3.5" { inherit profileName; };
|
||||||
idna = rustPackages."registry+https://github.com/rust-lang/crates.io-index".idna."0.2.0" { inherit profileName; };
|
idna = rustPackages."registry+https://github.com/rust-lang/crates.io-index".idna."0.2.0" { inherit profileName; };
|
||||||
lazy_static = rustPackages."registry+https://github.com/rust-lang/crates.io-index".lazy_static."1.4.0" { inherit profileName; };
|
lazy_static = rustPackages."registry+https://github.com/rust-lang/crates.io-index".lazy_static."1.4.0" { inherit profileName; };
|
||||||
log = rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.8" { inherit profileName; };
|
log = rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.8" { inherit profileName; };
|
||||||
@ -2856,7 +2895,7 @@ in
|
|||||||
dependencies = {
|
dependencies = {
|
||||||
cfg_if = rustPackages."registry+https://github.com/rust-lang/crates.io-index".cfg-if."0.1.10" { inherit profileName; };
|
cfg_if = rustPackages."registry+https://github.com/rust-lang/crates.io-index".cfg-if."0.1.10" { inherit profileName; };
|
||||||
failure = rustPackages."registry+https://github.com/rust-lang/crates.io-index".failure."0.1.6" { inherit profileName; };
|
failure = rustPackages."registry+https://github.com/rust-lang/crates.io-index".failure."0.1.6" { inherit profileName; };
|
||||||
futures = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures."0.3.4" { inherit profileName; };
|
futures = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures."0.3.5" { inherit profileName; };
|
||||||
${ if hostPlatform.isWindows then "ipconfig" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".ipconfig."0.2.1" { inherit profileName; };
|
${ if hostPlatform.isWindows then "ipconfig" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".ipconfig."0.2.1" { inherit profileName; };
|
||||||
lazy_static = rustPackages."registry+https://github.com/rust-lang/crates.io-index".lazy_static."1.4.0" { inherit profileName; };
|
lazy_static = rustPackages."registry+https://github.com/rust-lang/crates.io-index".lazy_static."1.4.0" { inherit profileName; };
|
||||||
log = rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.8" { inherit profileName; };
|
log = rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.8" { inherit profileName; };
|
||||||
@ -3063,8 +3102,8 @@ in
|
|||||||
];
|
];
|
||||||
dependencies = {
|
dependencies = {
|
||||||
cfg_if = rustPackages."registry+https://github.com/rust-lang/crates.io-index".cfg-if."0.1.10" { inherit profileName; };
|
cfg_if = rustPackages."registry+https://github.com/rust-lang/crates.io-index".cfg-if."0.1.10" { inherit profileName; };
|
||||||
serde = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.105" { inherit profileName; };
|
serde = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.110" { inherit profileName; };
|
||||||
serde_json = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_json."1.0.48" { inherit profileName; };
|
serde_json = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_json."1.0.53" { inherit profileName; };
|
||||||
wasm_bindgen_macro = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen-macro."0.2.58" { profileName = "__noProfile"; };
|
wasm_bindgen_macro = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen-macro."0.2.58" { profileName = "__noProfile"; };
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
@ -3246,8 +3285,8 @@ in
|
|||||||
[ "ws2tcpip" ]
|
[ "ws2tcpip" ]
|
||||||
];
|
];
|
||||||
dependencies = {
|
dependencies = {
|
||||||
${ if hostPlatform.config == "i686-pc-windows-gnu" || hostPlatform.config == "i686-pc-windows-gnu" || hostPlatform.config == "i686-pc-windows-gnu" || hostPlatform.config == "i686-pc-windows-gnu" || hostPlatform.config == "i686-pc-windows-gnu" || hostPlatform.config == "i686-pc-windows-gnu" || hostPlatform.config == "i686-pc-windows-gnu" || hostPlatform.config == "i686-pc-windows-gnu" || hostPlatform.config == "i686-pc-windows-gnu" || hostPlatform.config == "i686-pc-windows-gnu" then "winapi_i686_pc_windows_gnu" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".winapi-i686-pc-windows-gnu."0.4.0" { inherit profileName; };
|
${ if hostPlatform.config == "i686-pc-windows-gnu" || hostPlatform.config == "i686-pc-windows-gnu" || hostPlatform.config == "i686-pc-windows-gnu" || hostPlatform.config == "i686-pc-windows-gnu" || hostPlatform.config == "i686-pc-windows-gnu" || hostPlatform.config == "i686-pc-windows-gnu" || hostPlatform.config == "i686-pc-windows-gnu" || hostPlatform.config == "i686-pc-windows-gnu" || hostPlatform.config == "i686-pc-windows-gnu" || hostPlatform.config == "i686-pc-windows-gnu" || hostPlatform.config == "i686-pc-windows-gnu" then "winapi_i686_pc_windows_gnu" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".winapi-i686-pc-windows-gnu."0.4.0" { inherit profileName; };
|
||||||
${ if hostPlatform.config == "x86_64-pc-windows-gnu" || hostPlatform.config == "x86_64-pc-windows-gnu" || hostPlatform.config == "x86_64-pc-windows-gnu" || hostPlatform.config == "x86_64-pc-windows-gnu" || hostPlatform.config == "x86_64-pc-windows-gnu" || hostPlatform.config == "x86_64-pc-windows-gnu" || hostPlatform.config == "x86_64-pc-windows-gnu" || hostPlatform.config == "x86_64-pc-windows-gnu" || hostPlatform.config == "x86_64-pc-windows-gnu" || hostPlatform.config == "x86_64-pc-windows-gnu" then "winapi_x86_64_pc_windows_gnu" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".winapi-x86_64-pc-windows-gnu."0.4.0" { inherit profileName; };
|
${ if hostPlatform.config == "x86_64-pc-windows-gnu" || hostPlatform.config == "x86_64-pc-windows-gnu" || hostPlatform.config == "x86_64-pc-windows-gnu" || hostPlatform.config == "x86_64-pc-windows-gnu" || hostPlatform.config == "x86_64-pc-windows-gnu" || hostPlatform.config == "x86_64-pc-windows-gnu" || hostPlatform.config == "x86_64-pc-windows-gnu" || hostPlatform.config == "x86_64-pc-windows-gnu" || hostPlatform.config == "x86_64-pc-windows-gnu" || hostPlatform.config == "x86_64-pc-windows-gnu" || hostPlatform.config == "x86_64-pc-windows-gnu" then "winapi_x86_64_pc_windows_gnu" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".winapi-x86_64-pc-windows-gnu."0.4.0" { inherit profileName; };
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
54
Cargo.toml
54
Cargo.toml
@ -1,28 +1,46 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "hoc"
|
name = "hoc"
|
||||||
version = "0.11.6"
|
version = "0.20.2"
|
||||||
authors = ["Valentin Brandl <vbrandl@riseup.net>"]
|
authors = ["Valentin Brandl <vbrandl@riseup.net>"]
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
build = "build.rs"
|
build = "build.rs"
|
||||||
|
|
||||||
|
[lib]
|
||||||
|
path = "src/lib.rs"
|
||||||
|
|
||||||
|
[[bin]]
|
||||||
|
path = "src/main.rs"
|
||||||
|
name = "hoc"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
actix-web = "2.0.0"
|
actix-rt = "2.3.0"
|
||||||
badge = "0.2.0"
|
actix-web = "4.0.0-beta.8"
|
||||||
bytes = "0.5.4"
|
badge = "0.3.0"
|
||||||
futures = "0.3.1"
|
bytes = "1.1.0"
|
||||||
git2 = "0.13.0"
|
config = { version = "0.11.0", features = ["toml"] }
|
||||||
|
dotenv = "0.15.0"
|
||||||
|
futures = "0.3.17"
|
||||||
|
git2 = "0.13.23"
|
||||||
lazy_static = "1.4.0"
|
lazy_static = "1.4.0"
|
||||||
log = "0.4.8"
|
number_prefix = "0.4.0"
|
||||||
log4rs = "0.11.0"
|
openssl-probe = "0.1.4"
|
||||||
number_prefix = "0.3.0"
|
reqwest = "0.11.6"
|
||||||
openssl-probe = "0.1.2"
|
serde = "1.0.130"
|
||||||
reqwest = "0.10.3"
|
serde_derive = "1.0.130"
|
||||||
serde = "1.0.105"
|
serde_json = "1.0.68"
|
||||||
serde_derive = "1.0.103"
|
tracing = "0.1.29"
|
||||||
serde_json = "1.0.48"
|
tracing-actix-web = "0.4.0-beta.14"
|
||||||
structopt = "0.3.12"
|
tracing-bunyan-formatter = "0.3.0"
|
||||||
actix-rt = "1.0.0"
|
tracing-futures = "0.2.5"
|
||||||
|
tracing-log = "0.1.2"
|
||||||
|
tracing-subscriber = { version = "0.3.1", features = ["registry", "env-filter"] }
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
ructe = "0.9.2"
|
ructe = "0.13.4"
|
||||||
vergen = "3.1.0"
|
vergen = { version = "5.1.16", default-features = false, features = ["git"] }
|
||||||
|
|
||||||
|
[dev-dependencies]
|
||||||
|
awc = "3.0.0-beta.9"
|
||||||
|
ructe = "0.13.4"
|
||||||
|
tempfile = "3.2.0"
|
||||||
|
tokio = "1.12.0"
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
FROM ekidd/rust-musl-builder:stable as builder
|
FROM ekidd/rust-musl-builder:stable as builder
|
||||||
|
|
||||||
# create new cargo project
|
# create new cargo project
|
||||||
RUN USER=rust cargo init --bin
|
RUN USER=rust cargo init --lib
|
||||||
|
RUN echo 'fn main() { println!("Hello, world!"); }' >> src/main.rs
|
||||||
# copy build config
|
# copy build config
|
||||||
COPY --chown=rust ./Cargo.lock ./Cargo.lock
|
COPY --chown=rust ./Cargo.lock ./Cargo.lock
|
||||||
COPY ./Cargo.toml ./Cargo.toml
|
COPY ./Cargo.toml ./Cargo.toml
|
||||||
|
35
README.md
35
README.md
@ -1,9 +1,8 @@
|
|||||||
# Hits-of-Code
|
# Hits-of-Code
|
||||||
|
|
||||||
[](https://hitsofcode.com/view/github/vbrandl/hoc)
|
[](https://hitsofcode.com/github/vbrandl/hoc/view)
|
||||||
[](https://drone.vbrandl.net/vbrandl/hoc)
|
[](https://drone.vbrandl.net/vbrandl/hoc)
|
||||||
[](https://gitlab.com/vbrandl/hoc/pipelines)
|
[](https://gitlab.com/vbrandl/hoc/pipelines)
|
||||||
[](https://travis-ci.org/vbrandl/hoc)
|
|
||||||
[](https://deps.rs/repo/github/vbrandl/hoc)
|
[](https://deps.rs/repo/github/vbrandl/hoc)
|
||||||
|
|
||||||
Small webservice, that returns a badge of the Hits-of-Code of a git repository, as described by [Yegor
|
Small webservice, that returns a badge of the Hits-of-Code of a git repository, as described by [Yegor
|
||||||
@ -20,14 +19,18 @@ The API is as simple as
|
|||||||
https://<host>/<service>/<user>/<repo>
|
https://<host>/<service>/<user>/<repo>
|
||||||
```
|
```
|
||||||
|
|
||||||
where `<service>` is one of `gitub`, `gitlab` or `bitbucket`. The HoC data can also be received as JSON by appending
|
where `<service>` is one of `gitub`, `gitlab`, `bitbucket` or `sourcehut`. The HoC data can also be received as JSON by
|
||||||
`/json` to the reuqest path:
|
appending `/json` to the reuqest path:
|
||||||
|
|
||||||
```
|
```
|
||||||
https://<host>/<service>/<user>/<repo>/json
|
https://<host>/<service>/<user>/<repo>/json
|
||||||
```
|
```
|
||||||
|
|
||||||
There is also an overview page available via `https://<host>/view/<service>/<user>/<repo>`
|
There is also an overview page available via `https://<host>/<service>/<user>/<repo>/view`
|
||||||
|
|
||||||
|
To delete a repository and the cache from the server, send a `POST` request to
|
||||||
|
`https://<host>/<service>/<user>/<repo>/delete`. On the overview page, there is a button to perform this operation. It
|
||||||
|
will respond with a redirect to the overview page so the cache is rebuilt directly.
|
||||||
|
|
||||||
## Building
|
## Building
|
||||||
|
|
||||||
@ -45,21 +48,29 @@ $ docker build .
|
|||||||
|
|
||||||
inside the repository.
|
inside the repository.
|
||||||
|
|
||||||
I'm currently working on migrating to [nix](https://nixos.org/nix). To get a
|
I'm currently working on migrating to [nix](https://nixos.org/nix). To get a development shell, run `nix-shell`, to
|
||||||
development shell, run `nix-shell`, to build the package run `nix-build --attr
|
build the package run `nix-build --attr package` and to build the Docker image, run `nix-build --attr dockerImage`.
|
||||||
package` and to build the Docker image, run `nix-build --attr dockerImage`.
|
|
||||||
|
|
||||||
|
|
||||||
## Running
|
## Running
|
||||||
|
|
||||||
Run either the binary produced by cargo, the Docker container you just built (using docker-compose) or pull the image
|
Rename [`hoc.toml.example`](./hoc.toml.example) to `hoc.toml` or [`.env.example`](./.env.example) to `.env` and set the
|
||||||
from [Docker Hub](https://hub.docker.com/r/vbrandl/hits-of-code)
|
correct value for `base_url`/`HOC_BASE_URL`. If you don't want to use a configuration or dotenv file, you can pass all
|
||||||
|
parameters directly via environment variables. For variable names see [`.env.example`](./.env.example).
|
||||||
|
|
||||||
|
To start a local instance of the service just run:
|
||||||
|
|
||||||
```
|
```
|
||||||
$ docker run -it --rm vbrandl/hits-of-code --help
|
$ HOC_BASE_URL='http://0.0.0.0:8080' ./hoc
|
||||||
```
|
```
|
||||||
|
|
||||||
When running the binary directly, you need a git binary in your `PATH`.
|
You can also use the Docker image:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ docker run -p 8080:8080 --env HOC_BASE_URL='http://0.0.0.0:8080' -it --rm vbrandl/hits-of-code
|
||||||
|
```
|
||||||
|
|
||||||
|
When running the binary directly, you need a `git` binary in your `PATH`.
|
||||||
|
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
7
build.rs
7
build.rs
@ -2,11 +2,12 @@ extern crate ructe;
|
|||||||
extern crate vergen;
|
extern crate vergen;
|
||||||
|
|
||||||
use ructe::Ructe;
|
use ructe::Ructe;
|
||||||
use vergen::{generate_cargo_keys, ConstantsFlags};
|
use vergen::{vergen, Config, ShaKind};
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let flags = ConstantsFlags::SHA_SHORT;
|
let mut config = Config::default();
|
||||||
generate_cargo_keys(flags).expect("Unable to generate the cargo keys!");
|
*config.git_mut().sha_kind_mut() = ShaKind::Short;
|
||||||
|
vergen(config).expect("Unable to generate static repo info");
|
||||||
Ructe::from_env()
|
Ructe::from_env()
|
||||||
.expect("ructe")
|
.expect("ructe")
|
||||||
.compile_templates("templates")
|
.compile_templates("templates")
|
||||||
|
11
default.nix
11
default.nix
@ -39,13 +39,18 @@ rec {
|
|||||||
dockerImage =
|
dockerImage =
|
||||||
pkgs.dockerTools.buildImage {
|
pkgs.dockerTools.buildImage {
|
||||||
name = "vbrandl/hits-of-code";
|
name = "vbrandl/hits-of-code";
|
||||||
tag = "1";
|
tag = package.version;
|
||||||
|
|
||||||
contents = [ package ];
|
contents =
|
||||||
|
[
|
||||||
|
package
|
||||||
|
pkgs.cacert
|
||||||
|
pkgs.gitMinimal
|
||||||
|
];
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
Cmd = [ "/bin/hoc" ];
|
Cmd = [ "/bin/hoc" ];
|
||||||
WorkingDir = "/";
|
WorkingDir = "/home/hoc";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
version: "2"
|
version: "3"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
hoc:
|
hoc:
|
||||||
@ -9,3 +9,5 @@ services:
|
|||||||
# ports:
|
# ports:
|
||||||
# - "127.0.0.1:8080:8080"
|
# - "127.0.0.1:8080:8080"
|
||||||
restart: always
|
restart: always
|
||||||
|
env_file:
|
||||||
|
- ./.env
|
||||||
|
15
hoc.toml
Normal file
15
hoc.toml
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
# every parameter can also be set (or overwritten) by passing an environment
|
||||||
|
# variable namend `HOC_<PARAMETERNAME>`, e.g.
|
||||||
|
# `HOC_BASE_URL='https://hitsofcode.com' ./hoc`
|
||||||
|
|
||||||
|
# these config parameters have default values and must not explicitly be set
|
||||||
|
repodir = "./repos"
|
||||||
|
cachedir = "./cache"
|
||||||
|
port = 8080
|
||||||
|
host = "0.0.0.0"
|
||||||
|
workers = 4
|
||||||
|
|
||||||
|
# these parameters don't have default values and must be set
|
||||||
|
|
||||||
|
# this should be the public base URL of the service, e.g. `https://hitsofcode.com`
|
||||||
|
base_url = "http://0.0.0.0:8080"
|
15
hoc.toml.example
Normal file
15
hoc.toml.example
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
# every parameter can also be set (or overwritten) by passing an environment
|
||||||
|
# variable namend `HOC_<PARAMETERNAME>`, e.g.
|
||||||
|
# `HOC_BASE_URL='https://hitsofcode.com' ./hoc`
|
||||||
|
|
||||||
|
# these config parameters have default values and must not explicitly be set
|
||||||
|
repodir = "./repos"
|
||||||
|
cachedir = "./cache"
|
||||||
|
port = 8080
|
||||||
|
host = "0.0.0.0"
|
||||||
|
workers = 4
|
||||||
|
|
||||||
|
# these parameters don't have default values and must be set
|
||||||
|
|
||||||
|
# this should be the public base URL of the service, e.g. `https://hitsofcode.com`
|
||||||
|
base_url = "http://0.0.0.0:8080"
|
@ -29,10 +29,10 @@
|
|||||||
"homepage": "https://github.com/NixOS/nixpkgs",
|
"homepage": "https://github.com/NixOS/nixpkgs",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs-channels",
|
"repo": "nixpkgs-channels",
|
||||||
"rev": "053ad4e0db7241ae6a02394d62750fdc5d64aa9f",
|
"rev": "f6bfb371cba2b5a02f200c2747c1fe2c72bd782f",
|
||||||
"sha256": "11l9sr8zg8j1n5p43zjkqwpj59gn8c84z1kf16icnsbnv2smzqdc",
|
"sha256": "0y3hlbyvznrpr1d2vxj2511hkjg733wdnxfaib3fgy9i9jr8ivzn",
|
||||||
"type": "tarball",
|
"type": "tarball",
|
||||||
"url": "https://github.com/NixOS/nixpkgs-channels/archive/053ad4e0db7241ae6a02394d62750fdc5d64aa9f.tar.gz",
|
"url": "https://github.com/NixOS/nixpkgs-channels/archive/f6bfb371cba2b5a02f200c2747c1fe2c72bd782f.tar.gz",
|
||||||
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
|
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
|
||||||
},
|
},
|
||||||
"nixpkgs-mozilla": {
|
"nixpkgs-mozilla": {
|
||||||
|
113
src/cache.rs
113
src/cache.rs
@ -1,57 +1,124 @@
|
|||||||
use crate::error::{Error, Result};
|
use crate::error::{Error, Result};
|
||||||
use std::{
|
use std::{
|
||||||
borrow::Cow,
|
borrow::Cow,
|
||||||
|
collections::HashMap,
|
||||||
fs::{create_dir_all, File, OpenOptions},
|
fs::{create_dir_all, File, OpenOptions},
|
||||||
io::BufReader,
|
io::BufReader,
|
||||||
path::Path,
|
path::Path,
|
||||||
};
|
};
|
||||||
|
|
||||||
/// Enum to indicate the state of the cache
|
/// Enum to indicate the state of the cache
|
||||||
|
#[derive(Debug)]
|
||||||
pub(crate) enum CacheState<'a> {
|
pub(crate) enum CacheState<'a> {
|
||||||
/// Current head and cached head are the same
|
/// Current head and cached head are the same
|
||||||
Current { count: u64, commits: u64 },
|
Current {
|
||||||
|
count: u64,
|
||||||
|
commits: u64,
|
||||||
|
cache: Cache<'a>,
|
||||||
|
},
|
||||||
/// Cached head is older than current head
|
/// Cached head is older than current head
|
||||||
Old(Cache<'a>),
|
Old {
|
||||||
|
head: String,
|
||||||
|
cache: Cache<'a>,
|
||||||
|
},
|
||||||
|
NoneForBranch(Cache<'a>),
|
||||||
/// No cache was found
|
/// No cache was found
|
||||||
No,
|
No,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> CacheState<'a> {
|
impl<'a> CacheState<'a> {
|
||||||
pub(crate) fn read_from_file(path: impl AsRef<Path>, head: &str) -> Result<CacheState> {
|
#[instrument]
|
||||||
|
pub(crate) fn read_from_file(
|
||||||
|
path: impl AsRef<Path> + std::fmt::Debug,
|
||||||
|
branch: &str,
|
||||||
|
head: &str,
|
||||||
|
) -> Result<CacheState<'a>> {
|
||||||
|
trace!("Reading cache");
|
||||||
if path.as_ref().exists() {
|
if path.as_ref().exists() {
|
||||||
let cache: Cache = serde_json::from_reader(BufReader::new(File::open(path)?))?;
|
let cache: Cache = serde_json::from_reader(BufReader::new(File::open(path)?))?;
|
||||||
if cache.head == head {
|
Ok(cache
|
||||||
Ok(CacheState::Current {
|
.entries
|
||||||
count: cache.count,
|
.get(branch)
|
||||||
commits: cache.commits,
|
.map(|c| {
|
||||||
|
if c.head == head {
|
||||||
|
trace!("Cache is up to date");
|
||||||
|
CacheState::Current {
|
||||||
|
count: c.count,
|
||||||
|
commits: c.commits,
|
||||||
|
// TODO: get rid of clone
|
||||||
|
cache: cache.clone(),
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
trace!("Cache is out of date");
|
||||||
|
CacheState::Old {
|
||||||
|
head: c.head.to_string(),
|
||||||
|
// TODO: get rid of clone
|
||||||
|
cache: cache.clone(),
|
||||||
|
}
|
||||||
|
}
|
||||||
})
|
})
|
||||||
} else {
|
// TODO: get rid of clone
|
||||||
Ok(CacheState::Old(cache))
|
.unwrap_or_else(|| CacheState::NoneForBranch(cache.clone())))
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
Ok(CacheState::No)
|
Ok(CacheState::No)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) fn calculate_new_cache(self, count: u64, commits: u64, head: Cow<'a, str>) -> Cache {
|
#[instrument]
|
||||||
|
pub(crate) fn calculate_new_cache(
|
||||||
|
self,
|
||||||
|
count: u64,
|
||||||
|
commits: u64,
|
||||||
|
head: Cow<'a, str>,
|
||||||
|
branch: &'a str,
|
||||||
|
) -> Cache<'a> {
|
||||||
|
trace!("Calculating new cache");
|
||||||
match self {
|
match self {
|
||||||
CacheState::Old(mut cache) => {
|
CacheState::Old { mut cache, .. } => {
|
||||||
cache.head = head;
|
if let Some(mut cache) = cache.entries.get_mut(branch) {
|
||||||
cache.count += count;
|
cache.head = head;
|
||||||
cache.commits += commits;
|
cache.count += count;
|
||||||
|
cache.commits += commits;
|
||||||
|
}
|
||||||
cache
|
cache
|
||||||
}
|
}
|
||||||
CacheState::No | CacheState::Current { .. } => Cache {
|
CacheState::Current { cache, .. } => cache,
|
||||||
head,
|
CacheState::NoneForBranch(mut cache) => {
|
||||||
count,
|
trace!("Creating new cache for branch");
|
||||||
commits,
|
cache.entries.insert(
|
||||||
},
|
branch.into(),
|
||||||
|
CacheEntry {
|
||||||
|
head,
|
||||||
|
count,
|
||||||
|
commits,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
cache
|
||||||
|
}
|
||||||
|
CacheState::No => {
|
||||||
|
trace!("Creating new cache file");
|
||||||
|
let mut entries = HashMap::with_capacity(1);
|
||||||
|
entries.insert(
|
||||||
|
branch.into(),
|
||||||
|
CacheEntry {
|
||||||
|
head,
|
||||||
|
count,
|
||||||
|
commits,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
Cache { entries }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Serialize, Deserialize)]
|
#[derive(Serialize, Deserialize, Clone, Debug)]
|
||||||
pub(crate) struct Cache<'a> {
|
pub(crate) struct Cache<'a> {
|
||||||
|
pub entries: HashMap<Cow<'a, str>, CacheEntry<'a>>,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Serialize, Deserialize, Clone, Debug)]
|
||||||
|
pub(crate) struct CacheEntry<'a> {
|
||||||
/// HEAD commit ref
|
/// HEAD commit ref
|
||||||
pub head: Cow<'a, str>,
|
pub head: Cow<'a, str>,
|
||||||
/// HoC value
|
/// HoC value
|
||||||
@ -61,7 +128,9 @@ pub(crate) struct Cache<'a> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Cache<'a> {
|
impl<'a> Cache<'a> {
|
||||||
pub(crate) fn write_to_file(&self, path: impl AsRef<Path>) -> Result<()> {
|
#[instrument]
|
||||||
|
pub(crate) fn write_to_file(&self, path: impl AsRef<Path> + std::fmt::Debug) -> Result<()> {
|
||||||
|
trace!("Persisting cache to disk");
|
||||||
create_dir_all(path.as_ref().parent().ok_or(Error::Internal)?)?;
|
create_dir_all(path.as_ref().parent().ok_or(Error::Internal)?)?;
|
||||||
serde_json::to_writer(
|
serde_json::to_writer(
|
||||||
OpenOptions::new()
|
OpenOptions::new()
|
||||||
|
@ -1,71 +1,38 @@
|
|||||||
use crate::{error::Result, statics::OPT};
|
use config::{Config, ConfigError, Environment, File};
|
||||||
use log::LevelFilter;
|
|
||||||
use log4rs::{
|
|
||||||
append::{console::ConsoleAppender, file::FileAppender},
|
|
||||||
config::{Appender, Config, Root},
|
|
||||||
encode::pattern::PatternEncoder,
|
|
||||||
};
|
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
use structopt::StructOpt;
|
|
||||||
|
|
||||||
#[derive(StructOpt, Debug)]
|
#[derive(Debug, Deserialize)]
|
||||||
pub(crate) struct Opt {
|
pub struct Settings {
|
||||||
#[structopt(
|
|
||||||
short = "o",
|
|
||||||
long = "outdir",
|
|
||||||
parse(from_os_str),
|
|
||||||
default_value = "./repos"
|
|
||||||
)]
|
|
||||||
/// Path to store cloned repositories
|
/// Path to store cloned repositories
|
||||||
pub(crate) outdir: PathBuf,
|
pub repodir: PathBuf,
|
||||||
#[structopt(
|
|
||||||
short = "c",
|
|
||||||
long = "cachedir",
|
|
||||||
parse(from_os_str),
|
|
||||||
default_value = "./cache"
|
|
||||||
)]
|
|
||||||
/// Path to store cache
|
/// Path to store cache
|
||||||
pub(crate) cachedir: PathBuf,
|
pub cachedir: PathBuf,
|
||||||
#[structopt(short = "p", long = "port", default_value = "8080")]
|
|
||||||
/// Port to listen on
|
/// Port to listen on
|
||||||
pub(crate) port: u16,
|
pub port: u16,
|
||||||
#[structopt(short = "h", long = "host", default_value = "0.0.0.0")]
|
|
||||||
/// Interface to listen on
|
/// Interface to listen on
|
||||||
pub(crate) host: String,
|
pub host: String,
|
||||||
#[structopt(short = "d", long = "domain", default_value = "hitsofcode.com")]
|
/// Base URL
|
||||||
/// Interface to listen on
|
pub base_url: String,
|
||||||
pub(crate) domain: String,
|
|
||||||
#[structopt(short = "w", long = "workers", default_value = "4")]
|
|
||||||
/// Number of worker threads
|
/// Number of worker threads
|
||||||
pub(crate) workers: usize,
|
pub workers: usize,
|
||||||
#[structopt(
|
|
||||||
short = "l",
|
|
||||||
long = "logfile",
|
|
||||||
parse(from_os_str),
|
|
||||||
default_value = "./hoc.log"
|
|
||||||
)]
|
|
||||||
/// The logfile
|
|
||||||
pub(crate) logfile: PathBuf,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) async fn init() -> Result<()> {
|
impl Settings {
|
||||||
std::env::set_var("RUST_LOG", "actix_web=info,hoc=info");
|
#[deprecated]
|
||||||
// pretty_env_logger::init();
|
pub fn new() -> Result<Self, ConfigError> {
|
||||||
openssl_probe::init_ssl_cert_env_vars();
|
Self::load()
|
||||||
let stdout = ConsoleAppender::builder().build();
|
}
|
||||||
let file = FileAppender::builder()
|
|
||||||
.encoder(Box::new(PatternEncoder::new("{d} - {m}{n}")))
|
pub fn load() -> Result<Self, ConfigError> {
|
||||||
.build(&OPT.logfile)
|
let mut config = Config::new();
|
||||||
.unwrap();
|
config
|
||||||
let config = Config::builder()
|
.merge(File::with_name("hoc.toml").required(false))?
|
||||||
.appender(Appender::builder().build("stdout", Box::new(stdout)))
|
.merge(Environment::with_prefix("hoc"))?
|
||||||
.appender(Appender::builder().build("file", Box::new(file)))
|
.set_default("repodir", "./repos")?
|
||||||
.build(
|
.set_default("cachedir", "./cache")?
|
||||||
Root::builder()
|
.set_default("workers", 4)?
|
||||||
.appender("stdout")
|
.set_default("port", 8080)?
|
||||||
.appender("file")
|
.set_default("host", "0.0.0.0")?;
|
||||||
.build(LevelFilter::Info),
|
config.try_into()
|
||||||
)?;
|
}
|
||||||
log4rs::init_config(config)?;
|
|
||||||
Ok(())
|
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,13 @@
|
|||||||
use crate::error::Result;
|
use crate::error::Result;
|
||||||
use std::{fs::read_dir, path::Path, result::Result as StdResult};
|
use std::{fs::read_dir, path::Path, result::Result as StdResult};
|
||||||
|
|
||||||
|
#[instrument]
|
||||||
pub(crate) fn count_repositories<P>(repo_path: P) -> Result<usize>
|
pub(crate) fn count_repositories<P>(repo_path: P) -> Result<usize>
|
||||||
where
|
where
|
||||||
P: AsRef<Path>,
|
P: AsRef<Path> + std::fmt::Debug,
|
||||||
{
|
{
|
||||||
|
trace!("Counting repositories");
|
||||||
|
std::fs::create_dir_all(&repo_path)?;
|
||||||
Ok(read_dir(repo_path)?
|
Ok(read_dir(repo_path)?
|
||||||
.filter_map(StdResult::ok)
|
.filter_map(StdResult::ok)
|
||||||
.filter(|entry| entry.file_type().map(|ft| ft.is_dir()).unwrap_or(false))
|
.filter(|entry| entry.file_type().map(|ft| ft.is_dir()).unwrap_or(false))
|
||||||
|
48
src/error.rs
48
src/error.rs
@ -1,9 +1,6 @@
|
|||||||
use crate::{
|
use crate::{statics::VERSION_INFO, templates};
|
||||||
statics::{REPO_COUNT, VERSION_INFO},
|
use actix_web::{http::StatusCode, HttpResponse, ResponseError};
|
||||||
templates,
|
use std::fmt;
|
||||||
};
|
|
||||||
use actix_web::{HttpResponse, ResponseError};
|
|
||||||
use std::{fmt, sync::atomic::Ordering};
|
|
||||||
|
|
||||||
pub(crate) type Result<T> = std::result::Result<T, Error>;
|
pub(crate) type Result<T> = std::result::Result<T, Error>;
|
||||||
|
|
||||||
@ -14,11 +11,9 @@ pub(crate) enum Error {
|
|||||||
Git(git2::Error),
|
Git(git2::Error),
|
||||||
Internal,
|
Internal,
|
||||||
Io(std::io::Error),
|
Io(std::io::Error),
|
||||||
Log(log::SetLoggerError),
|
|
||||||
LogBuilder(log4rs::config::Errors),
|
|
||||||
Parse(std::num::ParseIntError),
|
Parse(std::num::ParseIntError),
|
||||||
Serial(serde_json::Error),
|
Serial(serde_json::Error),
|
||||||
GitNoMaster,
|
BranchNotFound,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl fmt::Display for Error {
|
impl fmt::Display for Error {
|
||||||
@ -29,31 +24,30 @@ impl fmt::Display for Error {
|
|||||||
Error::Git(e) => write!(fmt, "Git({})", e),
|
Error::Git(e) => write!(fmt, "Git({})", e),
|
||||||
Error::Internal => write!(fmt, "Internal Error"),
|
Error::Internal => write!(fmt, "Internal Error"),
|
||||||
Error::Io(e) => write!(fmt, "Io({})", e),
|
Error::Io(e) => write!(fmt, "Io({})", e),
|
||||||
Error::Log(e) => write!(fmt, "Log({})", e),
|
|
||||||
Error::LogBuilder(e) => write!(fmt, "LogBuilder({})", e),
|
|
||||||
Error::Parse(e) => write!(fmt, "Parse({})", e),
|
Error::Parse(e) => write!(fmt, "Parse({})", e),
|
||||||
Error::Serial(e) => write!(fmt, "Serial({})", e),
|
Error::Serial(e) => write!(fmt, "Serial({})", e),
|
||||||
Error::GitNoMaster => write!(fmt, "Repo doesn't have master branch"),
|
Error::BranchNotFound => write!(fmt, "Repo doesn't have master branch"),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl ResponseError for Error {
|
impl ResponseError for Error {
|
||||||
|
fn status_code(&self) -> StatusCode {
|
||||||
|
match self {
|
||||||
|
Error::BranchNotFound => StatusCode::NOT_FOUND,
|
||||||
|
_ => StatusCode::INTERNAL_SERVER_ERROR,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fn error_response(&self) -> HttpResponse {
|
fn error_response(&self) -> HttpResponse {
|
||||||
let mut buf = Vec::new();
|
let mut buf = Vec::new();
|
||||||
match self {
|
match self {
|
||||||
Error::GitNoMaster => {
|
Error::BranchNotFound => {
|
||||||
templates::p404_no_master(
|
templates::p404_no_master(&mut buf, VERSION_INFO, 0).unwrap();
|
||||||
&mut buf,
|
|
||||||
VERSION_INFO,
|
|
||||||
REPO_COUNT.load(Ordering::Relaxed),
|
|
||||||
)
|
|
||||||
.unwrap();
|
|
||||||
HttpResponse::NotFound().content_type("text/html").body(buf)
|
HttpResponse::NotFound().content_type("text/html").body(buf)
|
||||||
}
|
}
|
||||||
_ => {
|
_ => {
|
||||||
templates::p500(&mut buf, VERSION_INFO, REPO_COUNT.load(Ordering::Relaxed))
|
templates::p500(&mut buf, VERSION_INFO, 0).unwrap();
|
||||||
.unwrap();
|
|
||||||
HttpResponse::InternalServerError()
|
HttpResponse::InternalServerError()
|
||||||
.content_type("text/html")
|
.content_type("text/html")
|
||||||
.body(buf)
|
.body(buf)
|
||||||
@ -76,12 +70,6 @@ impl From<git2::Error> for Error {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl From<log::SetLoggerError> for Error {
|
|
||||||
fn from(err: log::SetLoggerError) -> Self {
|
|
||||||
Error::Log(err)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl From<std::io::Error> for Error {
|
impl From<std::io::Error> for Error {
|
||||||
fn from(err: std::io::Error) -> Self {
|
fn from(err: std::io::Error) -> Self {
|
||||||
Error::Io(err)
|
Error::Io(err)
|
||||||
@ -100,12 +88,6 @@ impl From<reqwest::Error> for Error {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl From<log4rs::config::Errors> for Error {
|
|
||||||
fn from(err: log4rs::config::Errors) -> Self {
|
|
||||||
Error::LogBuilder(err)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl From<std::num::ParseIntError> for Error {
|
impl From<std::num::ParseIntError> for Error {
|
||||||
fn from(err: std::num::ParseIntError) -> Self {
|
fn from(err: std::num::ParseIntError) -> Self {
|
||||||
Error::Parse(err)
|
Error::Parse(err)
|
||||||
|
532
src/lib.rs
Normal file
532
src/lib.rs
Normal file
@ -0,0 +1,532 @@
|
|||||||
|
#![type_length_limit = "2257138"]
|
||||||
|
|
||||||
|
#[macro_use]
|
||||||
|
extern crate actix_web;
|
||||||
|
#[macro_use]
|
||||||
|
extern crate lazy_static;
|
||||||
|
#[macro_use]
|
||||||
|
extern crate serde_derive;
|
||||||
|
#[macro_use]
|
||||||
|
extern crate tracing;
|
||||||
|
|
||||||
|
mod cache;
|
||||||
|
pub mod config;
|
||||||
|
mod count;
|
||||||
|
mod error;
|
||||||
|
mod service;
|
||||||
|
mod statics;
|
||||||
|
pub mod telemetry;
|
||||||
|
mod template;
|
||||||
|
|
||||||
|
use crate::{
|
||||||
|
cache::CacheState,
|
||||||
|
config::Settings,
|
||||||
|
error::{Error, Result},
|
||||||
|
service::{Bitbucket, FormService, GitHub, Gitlab, Service, Sourcehut},
|
||||||
|
statics::{CLIENT, CSS, FAVICON, VERSION_INFO},
|
||||||
|
template::RepoInfo,
|
||||||
|
};
|
||||||
|
use actix_web::{
|
||||||
|
dev::Server,
|
||||||
|
http::header::{CacheControl, CacheDirective, Expires, LOCATION},
|
||||||
|
middleware::{self, TrailingSlash},
|
||||||
|
web, App, HttpResponse, HttpServer, Responder,
|
||||||
|
};
|
||||||
|
use badge::{Badge, BadgeOptions};
|
||||||
|
use git2::{BranchType, Repository};
|
||||||
|
use number_prefix::NumberPrefix;
|
||||||
|
use std::{
|
||||||
|
borrow::Cow,
|
||||||
|
fs::create_dir_all,
|
||||||
|
io,
|
||||||
|
net::TcpListener,
|
||||||
|
path::Path,
|
||||||
|
process::Command,
|
||||||
|
sync::atomic::AtomicUsize,
|
||||||
|
sync::atomic::Ordering,
|
||||||
|
time::{Duration, SystemTime},
|
||||||
|
};
|
||||||
|
use tracing::Instrument;
|
||||||
|
|
||||||
|
include!(concat!(env!("OUT_DIR"), "/templates.rs"));
|
||||||
|
|
||||||
|
#[derive(Deserialize, Serialize)]
|
||||||
|
struct GeneratorForm<'a> {
|
||||||
|
service: FormService,
|
||||||
|
user: Cow<'a, str>,
|
||||||
|
repo: Cow<'a, str>,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Debug)]
|
||||||
|
pub(crate) struct State {
|
||||||
|
settings: Settings,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl State {
|
||||||
|
fn repos(&self) -> String {
|
||||||
|
self.settings.repodir.display().to_string()
|
||||||
|
}
|
||||||
|
|
||||||
|
fn cache(&self) -> String {
|
||||||
|
self.settings.cachedir.display().to_string()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Serialize)]
|
||||||
|
struct JsonResponse<'a> {
|
||||||
|
head: &'a str,
|
||||||
|
branch: &'a str,
|
||||||
|
count: u64,
|
||||||
|
commits: u64,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Deserialize, Debug)]
|
||||||
|
struct BranchQuery {
|
||||||
|
branch: Option<String>,
|
||||||
|
}
|
||||||
|
|
||||||
|
fn pull(path: impl AsRef<Path>) -> Result<()> {
|
||||||
|
let repo = Repository::open_bare(path)?;
|
||||||
|
let mut origin = repo.find_remote("origin")?;
|
||||||
|
origin.fetch(&["refs/heads/*:refs/heads/*"], None, None)?;
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
|
||||||
|
fn hoc(repo: &str, repo_dir: &str, cache_dir: &str, branch: &str) -> Result<(u64, String, u64)> {
|
||||||
|
let repo_dir = format!("{}/{}", repo_dir, repo);
|
||||||
|
let cache_dir = format!("{}/{}.json", cache_dir, repo);
|
||||||
|
let cache_dir = Path::new(&cache_dir);
|
||||||
|
let repo = Repository::open_bare(&repo_dir)?;
|
||||||
|
// TODO: do better...
|
||||||
|
let head = repo
|
||||||
|
.find_branch(branch, BranchType::Local)
|
||||||
|
.map_err(|_| Error::BranchNotFound)?
|
||||||
|
.into_reference();
|
||||||
|
let head = format!("{}", head.target().ok_or(Error::BranchNotFound)?);
|
||||||
|
let mut arg_commit_count = vec!["rev-list".to_string(), "--count".to_string()];
|
||||||
|
let mut arg = vec![
|
||||||
|
"log".to_string(),
|
||||||
|
"--pretty=tformat:".to_string(),
|
||||||
|
"--numstat".to_string(),
|
||||||
|
"--ignore-space-change".to_string(),
|
||||||
|
"--ignore-all-space".to_string(),
|
||||||
|
"--ignore-submodules".to_string(),
|
||||||
|
"--no-color".to_string(),
|
||||||
|
"--find-copies-harder".to_string(),
|
||||||
|
"-M".to_string(),
|
||||||
|
"--diff-filter=ACDM".to_string(),
|
||||||
|
];
|
||||||
|
let cache = CacheState::read_from_file(&cache_dir, branch, &head)?;
|
||||||
|
match &cache {
|
||||||
|
CacheState::Current { count, commits, .. } => {
|
||||||
|
info!("Using cache");
|
||||||
|
return Ok((*count, head, *commits));
|
||||||
|
}
|
||||||
|
CacheState::Old { head, .. } => {
|
||||||
|
info!("Updating cache");
|
||||||
|
arg.push(format!("{}..{}", head, branch));
|
||||||
|
arg_commit_count.push(format!("{}..{}", head, branch));
|
||||||
|
}
|
||||||
|
CacheState::No | CacheState::NoneForBranch(..) => {
|
||||||
|
info!("Creating cache");
|
||||||
|
arg.push(branch.to_string());
|
||||||
|
arg_commit_count.push(branch.to_string());
|
||||||
|
}
|
||||||
|
};
|
||||||
|
arg.push("--".to_string());
|
||||||
|
arg.push(".".to_string());
|
||||||
|
let output = Command::new("git")
|
||||||
|
.args(&arg)
|
||||||
|
.current_dir(&repo_dir)
|
||||||
|
.output()?
|
||||||
|
.stdout;
|
||||||
|
let output = String::from_utf8_lossy(&output);
|
||||||
|
let output_commits = Command::new("git")
|
||||||
|
.args(&arg_commit_count)
|
||||||
|
.current_dir(&repo_dir)
|
||||||
|
.output()?
|
||||||
|
.stdout;
|
||||||
|
let output_commits = String::from_utf8_lossy(&output_commits);
|
||||||
|
let commits: u64 = output_commits.trim().parse()?;
|
||||||
|
let count: u64 = output
|
||||||
|
.lines()
|
||||||
|
.map(|s| {
|
||||||
|
s.split_whitespace()
|
||||||
|
.take(2)
|
||||||
|
.map(str::parse::<u64>)
|
||||||
|
.filter_map(std::result::Result::ok)
|
||||||
|
.sum::<u64>()
|
||||||
|
})
|
||||||
|
.sum();
|
||||||
|
|
||||||
|
let cache = cache.calculate_new_cache(count, commits, (&head).into(), branch);
|
||||||
|
cache.write_to_file(cache_dir)?;
|
||||||
|
|
||||||
|
Ok((count, head, commits))
|
||||||
|
}
|
||||||
|
|
||||||
|
async fn remote_exists(url: &str) -> Result<bool> {
|
||||||
|
let resp = CLIENT.head(url).send().await?;
|
||||||
|
Ok(resp.status() == reqwest::StatusCode::OK)
|
||||||
|
}
|
||||||
|
|
||||||
|
enum HocResult {
|
||||||
|
Hoc {
|
||||||
|
hoc: u64,
|
||||||
|
commits: u64,
|
||||||
|
hoc_pretty: String,
|
||||||
|
head: String,
|
||||||
|
url: String,
|
||||||
|
repo: String,
|
||||||
|
service_path: String,
|
||||||
|
},
|
||||||
|
NotFound,
|
||||||
|
}
|
||||||
|
|
||||||
|
async fn delete_repo_and_cache<T>(
|
||||||
|
state: web::Data<State>,
|
||||||
|
repo_count: web::Data<AtomicUsize>,
|
||||||
|
data: web::Path<(String, String)>,
|
||||||
|
) -> Result<impl Responder>
|
||||||
|
where
|
||||||
|
T: Service,
|
||||||
|
{
|
||||||
|
let data = data.into_inner();
|
||||||
|
let span = info_span!(
|
||||||
|
"deleting repository and cache",
|
||||||
|
service = T::domain(),
|
||||||
|
user = data.0.as_str(),
|
||||||
|
repo = data.1.as_str()
|
||||||
|
);
|
||||||
|
let future = async {
|
||||||
|
let repo = format!(
|
||||||
|
"{}/{}/{}",
|
||||||
|
T::domain(),
|
||||||
|
data.0.to_lowercase(),
|
||||||
|
data.1.to_lowercase()
|
||||||
|
);
|
||||||
|
info!("Deleting cache and repository");
|
||||||
|
let cache_dir = format!("{}/{}.json", &state.cache(), repo);
|
||||||
|
let repo_dir = format!("{}/{}", &state.repos(), repo);
|
||||||
|
std::fs::remove_file(&cache_dir).or_else(|e| {
|
||||||
|
if e.kind() == io::ErrorKind::NotFound {
|
||||||
|
Ok(())
|
||||||
|
} else {
|
||||||
|
Err(e)
|
||||||
|
}
|
||||||
|
})?;
|
||||||
|
std::fs::remove_dir_all(&repo_dir).or_else(|e| {
|
||||||
|
if e.kind() == io::ErrorKind::NotFound {
|
||||||
|
Ok(())
|
||||||
|
} else {
|
||||||
|
Err(e)
|
||||||
|
}
|
||||||
|
})?;
|
||||||
|
repo_count.fetch_sub(1, Ordering::Relaxed);
|
||||||
|
Ok(HttpResponse::TemporaryRedirect()
|
||||||
|
.insert_header((
|
||||||
|
LOCATION,
|
||||||
|
format!("/{}/{}/{}/view", T::url_path(), data.0, data.1),
|
||||||
|
))
|
||||||
|
.finish())
|
||||||
|
};
|
||||||
|
future.instrument(span).await
|
||||||
|
}
|
||||||
|
|
||||||
|
async fn handle_hoc_request<T, F>(
|
||||||
|
state: web::Data<State>,
|
||||||
|
repo_count: web::Data<AtomicUsize>,
|
||||||
|
data: web::Path<(String, String)>,
|
||||||
|
branch: &str,
|
||||||
|
mapper: F,
|
||||||
|
) -> Result<HttpResponse>
|
||||||
|
where
|
||||||
|
T: Service,
|
||||||
|
F: FnOnce(HocResult) -> Result<HttpResponse>,
|
||||||
|
{
|
||||||
|
let data = data.into_inner();
|
||||||
|
let span = info_span!(
|
||||||
|
"handling hoc calculation",
|
||||||
|
service = T::domain(),
|
||||||
|
user = data.0.as_str(),
|
||||||
|
repo = data.1.as_str(),
|
||||||
|
branch
|
||||||
|
);
|
||||||
|
let future = async {
|
||||||
|
let repo = format!("{}/{}", data.0.to_lowercase(), data.1.to_lowercase());
|
||||||
|
let service_path = format!("{}/{}", T::url_path(), repo);
|
||||||
|
let service_url = format!("{}/{}", T::domain(), repo);
|
||||||
|
let path = format!("{}/{}", state.repos(), service_url);
|
||||||
|
let url = format!("https://{}", service_url);
|
||||||
|
let remote_exists = remote_exists(&url).await?;
|
||||||
|
let file = Path::new(&path);
|
||||||
|
if !file.exists() {
|
||||||
|
if !remote_exists {
|
||||||
|
warn!("Repository does not exist");
|
||||||
|
return mapper(HocResult::NotFound);
|
||||||
|
}
|
||||||
|
info!("Cloning for the first time");
|
||||||
|
create_dir_all(file)?;
|
||||||
|
let repo = Repository::init_bare(file)?;
|
||||||
|
repo.remote_add_fetch("origin", "refs/heads/*:refs/heads/*")?;
|
||||||
|
repo.remote_set_url("origin", &url)?;
|
||||||
|
repo_count.fetch_add(1, Ordering::Relaxed);
|
||||||
|
}
|
||||||
|
pull(&path)?;
|
||||||
|
let (hoc, head, commits) = hoc(&service_url, &state.repos(), &state.cache(), branch)?;
|
||||||
|
let hoc_pretty = match NumberPrefix::decimal(hoc as f64) {
|
||||||
|
NumberPrefix::Standalone(hoc) => hoc.to_string(),
|
||||||
|
NumberPrefix::Prefixed(prefix, hoc) => format!("{:.1}{}", hoc, prefix),
|
||||||
|
};
|
||||||
|
let res = HocResult::Hoc {
|
||||||
|
hoc,
|
||||||
|
commits,
|
||||||
|
hoc_pretty,
|
||||||
|
head,
|
||||||
|
url,
|
||||||
|
repo,
|
||||||
|
service_path,
|
||||||
|
};
|
||||||
|
mapper(res)
|
||||||
|
};
|
||||||
|
future.instrument(span).await
|
||||||
|
}
|
||||||
|
|
||||||
|
pub(crate) async fn json_hoc<T: Service>(
|
||||||
|
state: web::Data<State>,
|
||||||
|
repo_count: web::Data<AtomicUsize>,
|
||||||
|
data: web::Path<(String, String)>,
|
||||||
|
branch: web::Query<BranchQuery>,
|
||||||
|
) -> Result<HttpResponse> {
|
||||||
|
let branch = branch.branch.as_deref().unwrap_or("master");
|
||||||
|
let rc_clone = repo_count.clone();
|
||||||
|
let mapper = move |r| match r {
|
||||||
|
HocResult::NotFound => p404(rc_clone),
|
||||||
|
HocResult::Hoc {
|
||||||
|
hoc, head, commits, ..
|
||||||
|
} => Ok(HttpResponse::Ok().json(JsonResponse {
|
||||||
|
branch,
|
||||||
|
head: &head,
|
||||||
|
count: hoc,
|
||||||
|
commits,
|
||||||
|
})),
|
||||||
|
};
|
||||||
|
handle_hoc_request::<T, _>(state, repo_count, data, branch, mapper).await
|
||||||
|
}
|
||||||
|
|
||||||
|
fn no_cache_response(body: Vec<u8>) -> HttpResponse {
|
||||||
|
let expiration = SystemTime::now() + Duration::from_secs(30);
|
||||||
|
HttpResponse::Ok()
|
||||||
|
.content_type("image/svg+xml")
|
||||||
|
.insert_header(Expires(expiration.into()))
|
||||||
|
.insert_header(CacheControl(vec![
|
||||||
|
CacheDirective::MaxAge(0u32),
|
||||||
|
CacheDirective::MustRevalidate,
|
||||||
|
CacheDirective::NoCache,
|
||||||
|
CacheDirective::NoStore,
|
||||||
|
]))
|
||||||
|
.body(body)
|
||||||
|
}
|
||||||
|
|
||||||
|
pub(crate) async fn calculate_hoc<T: Service>(
|
||||||
|
state: web::Data<State>,
|
||||||
|
repo_count: web::Data<AtomicUsize>,
|
||||||
|
data: web::Path<(String, String)>,
|
||||||
|
branch: web::Query<BranchQuery>,
|
||||||
|
) -> HttpResponse {
|
||||||
|
let rc_clone = repo_count.clone();
|
||||||
|
let mapper = move |r| match r {
|
||||||
|
HocResult::NotFound => p404(rc_clone),
|
||||||
|
HocResult::Hoc { hoc_pretty, .. } => {
|
||||||
|
let badge_opt = BadgeOptions {
|
||||||
|
subject: "Hits-of-Code".to_string(),
|
||||||
|
color: "#007ec6".to_string(),
|
||||||
|
status: hoc_pretty,
|
||||||
|
};
|
||||||
|
let badge = Badge::new(badge_opt)?;
|
||||||
|
// TODO: remove clone
|
||||||
|
let body = badge.to_svg().as_bytes().to_vec();
|
||||||
|
|
||||||
|
Ok(no_cache_response(body))
|
||||||
|
}
|
||||||
|
};
|
||||||
|
let branch = branch.branch.as_deref().unwrap_or("master");
|
||||||
|
let error_badge = |_| {
|
||||||
|
let error_badge = Badge::new(BadgeOptions {
|
||||||
|
subject: "Hits-of-Code".to_string(),
|
||||||
|
color: "#ff0000".to_string(),
|
||||||
|
status: "error".to_string(),
|
||||||
|
})
|
||||||
|
.unwrap();
|
||||||
|
let body = error_badge.to_svg().as_bytes().to_vec();
|
||||||
|
no_cache_response(body)
|
||||||
|
};
|
||||||
|
handle_hoc_request::<T, _>(state, repo_count, data, branch, mapper)
|
||||||
|
.await
|
||||||
|
.unwrap_or_else(error_badge)
|
||||||
|
}
|
||||||
|
|
||||||
|
async fn overview<T: Service>(
|
||||||
|
state: web::Data<State>,
|
||||||
|
repo_count: web::Data<AtomicUsize>,
|
||||||
|
data: web::Path<(String, String)>,
|
||||||
|
branch: web::Query<BranchQuery>,
|
||||||
|
) -> Result<HttpResponse> {
|
||||||
|
let branch = branch.branch.as_deref().unwrap_or("master");
|
||||||
|
let base_url = state.settings.base_url.clone();
|
||||||
|
let rc_clone = repo_count.clone();
|
||||||
|
let mapper = move |r| match r {
|
||||||
|
HocResult::NotFound => p404(rc_clone),
|
||||||
|
HocResult::Hoc {
|
||||||
|
hoc,
|
||||||
|
commits,
|
||||||
|
hoc_pretty,
|
||||||
|
url,
|
||||||
|
head,
|
||||||
|
repo,
|
||||||
|
service_path,
|
||||||
|
} => {
|
||||||
|
let mut buf = Vec::new();
|
||||||
|
let repo_info = RepoInfo {
|
||||||
|
commit_url: &T::commit_url(&repo, &head),
|
||||||
|
commits,
|
||||||
|
base_url: &base_url,
|
||||||
|
head: &head,
|
||||||
|
hoc,
|
||||||
|
hoc_pretty: &hoc_pretty,
|
||||||
|
path: &service_path,
|
||||||
|
url: &url,
|
||||||
|
branch,
|
||||||
|
};
|
||||||
|
templates::overview(
|
||||||
|
&mut buf,
|
||||||
|
VERSION_INFO,
|
||||||
|
rc_clone.load(Ordering::Relaxed),
|
||||||
|
repo_info,
|
||||||
|
)?;
|
||||||
|
|
||||||
|
Ok(HttpResponse::Ok().content_type("text/html").body(buf))
|
||||||
|
}
|
||||||
|
};
|
||||||
|
handle_hoc_request::<T, _>(state, repo_count, data, branch, mapper).await
|
||||||
|
}
|
||||||
|
|
||||||
|
#[get("/health_check")]
|
||||||
|
async fn health_check() -> HttpResponse {
|
||||||
|
HttpResponse::Ok().finish()
|
||||||
|
}
|
||||||
|
|
||||||
|
#[get("/")]
|
||||||
|
async fn index(
|
||||||
|
state: web::Data<State>,
|
||||||
|
repo_count: web::Data<AtomicUsize>,
|
||||||
|
) -> Result<HttpResponse> {
|
||||||
|
let mut buf = Vec::new();
|
||||||
|
templates::index(
|
||||||
|
&mut buf,
|
||||||
|
VERSION_INFO,
|
||||||
|
repo_count.load(Ordering::Relaxed),
|
||||||
|
&state.settings.base_url,
|
||||||
|
)?;
|
||||||
|
Ok(HttpResponse::Ok().content_type("text/html").body(buf))
|
||||||
|
}
|
||||||
|
|
||||||
|
#[post("/generate")]
|
||||||
|
async fn generate(
|
||||||
|
params: web::Form<GeneratorForm<'_>>,
|
||||||
|
state: web::Data<State>,
|
||||||
|
repo_count: web::Data<AtomicUsize>,
|
||||||
|
) -> Result<HttpResponse> {
|
||||||
|
let repo = format!("{}/{}", params.user, params.repo);
|
||||||
|
let mut buf = Vec::new();
|
||||||
|
templates::generate(
|
||||||
|
&mut buf,
|
||||||
|
VERSION_INFO,
|
||||||
|
repo_count.load(Ordering::Relaxed),
|
||||||
|
&state.settings.base_url,
|
||||||
|
params.service.url(),
|
||||||
|
params.service.service(),
|
||||||
|
&repo,
|
||||||
|
)?;
|
||||||
|
|
||||||
|
Ok(HttpResponse::Ok().content_type("text/html").body(buf))
|
||||||
|
}
|
||||||
|
|
||||||
|
fn p404(repo_count: web::Data<AtomicUsize>) -> Result<HttpResponse> {
|
||||||
|
let mut buf = Vec::new();
|
||||||
|
templates::p404(&mut buf, VERSION_INFO, repo_count.load(Ordering::Relaxed))?;
|
||||||
|
Ok(HttpResponse::NotFound().content_type("text/html").body(buf))
|
||||||
|
}
|
||||||
|
|
||||||
|
async fn async_p404(repo_count: web::Data<AtomicUsize>) -> Result<HttpResponse> {
|
||||||
|
p404(repo_count)
|
||||||
|
}
|
||||||
|
|
||||||
|
fn css() -> HttpResponse {
|
||||||
|
HttpResponse::Ok().content_type("text/css").body(CSS)
|
||||||
|
}
|
||||||
|
|
||||||
|
fn favicon32() -> HttpResponse {
|
||||||
|
HttpResponse::Ok().content_type("image/png").body(FAVICON)
|
||||||
|
}
|
||||||
|
|
||||||
|
async fn start_server(listener: TcpListener, settings: Settings) -> std::io::Result<Server> {
|
||||||
|
let workers = settings.workers;
|
||||||
|
let repo_count =
|
||||||
|
// TODO: errorhandling
|
||||||
|
web::Data::new(AtomicUsize::new(count::count_repositories(&settings.repodir).unwrap()));
|
||||||
|
let state = web::Data::new(State { settings });
|
||||||
|
Ok(HttpServer::new(move || {
|
||||||
|
App::new()
|
||||||
|
.app_data(state.clone())
|
||||||
|
.app_data(repo_count.clone())
|
||||||
|
.wrap(tracing_actix_web::TracingLogger::default())
|
||||||
|
.wrap(middleware::NormalizePath::new(TrailingSlash::Trim))
|
||||||
|
.service(index)
|
||||||
|
.service(health_check)
|
||||||
|
.service(web::resource("/tacit-css.min.css").route(web::get().to(css)))
|
||||||
|
.service(web::resource("/favicon.ico").route(web::get().to(favicon32)))
|
||||||
|
.service(generate)
|
||||||
|
.service(web::resource("/github/{user}/{repo}").to(calculate_hoc::<GitHub>))
|
||||||
|
.service(web::resource("/gitlab/{user}/{repo}").to(calculate_hoc::<Gitlab>))
|
||||||
|
.service(web::resource("/bitbucket/{user}/{repo}").to(calculate_hoc::<Bitbucket>))
|
||||||
|
.service(web::resource("/sourcehut/{user}/{repo}").to(calculate_hoc::<Sourcehut>))
|
||||||
|
.service(
|
||||||
|
web::resource("/github/{user}/{repo}/delete")
|
||||||
|
.route(web::post().to(delete_repo_and_cache::<GitHub>)),
|
||||||
|
)
|
||||||
|
.service(
|
||||||
|
web::resource("/gitlab/{user}/{repo}/delete")
|
||||||
|
.route(web::post().to(delete_repo_and_cache::<Gitlab>)),
|
||||||
|
)
|
||||||
|
.service(
|
||||||
|
web::resource("/bitbucket/{user}/{repo}/delete")
|
||||||
|
.route(web::post().to(delete_repo_and_cache::<Bitbucket>)),
|
||||||
|
)
|
||||||
|
.service(
|
||||||
|
web::resource("/sourcehut/{user}/{repo}/delete")
|
||||||
|
.route(web::post().to(delete_repo_and_cache::<Sourcehut>)),
|
||||||
|
)
|
||||||
|
.service(web::resource("/github/{user}/{repo}/json").to(json_hoc::<GitHub>))
|
||||||
|
.service(web::resource("/gitlab/{user}/{repo}/json").to(json_hoc::<Gitlab>))
|
||||||
|
.service(web::resource("/bitbucket/{user}/{repo}/json").to(json_hoc::<Bitbucket>))
|
||||||
|
.service(web::resource("/sourcehut/{user}/{repo}/json").to(json_hoc::<Sourcehut>))
|
||||||
|
.service(web::resource("/view/github/{user}/{repo}").to(overview::<GitHub>))
|
||||||
|
.service(web::resource("/view/gitlab/{user}/{repo}").to(overview::<Gitlab>))
|
||||||
|
.service(web::resource("/view/bitbucket/{user}/{repo}").to(overview::<Bitbucket>))
|
||||||
|
.service(web::resource("/github/{user}/{repo}/view").to(overview::<GitHub>))
|
||||||
|
.service(web::resource("/gitlab/{user}/{repo}/view").to(overview::<Gitlab>))
|
||||||
|
.service(web::resource("/bitbucket/{user}/{repo}/view").to(overview::<Bitbucket>))
|
||||||
|
.service(web::resource("/sourcehut/{user}/{repo}/view").to(overview::<Sourcehut>))
|
||||||
|
.default_service(web::to(async_p404))
|
||||||
|
})
|
||||||
|
.workers(workers)
|
||||||
|
.listen(listener)?
|
||||||
|
.run())
|
||||||
|
}
|
||||||
|
|
||||||
|
pub async fn run(listener: TcpListener, settings: Settings) -> std::io::Result<Server> {
|
||||||
|
let span = info_span!("hoc", version = env!("CARGO_PKG_VERSION"));
|
||||||
|
let _ = span.enter();
|
||||||
|
start_server(listener, settings).instrument(span).await
|
||||||
|
}
|
394
src/main.rs
394
src/main.rs
@ -1,384 +1,26 @@
|
|||||||
#![type_length_limit = "2257138"]
|
use hoc::{config::Settings, telemetry};
|
||||||
|
|
||||||
#[macro_use]
|
use std::net::TcpListener;
|
||||||
extern crate actix_web;
|
|
||||||
#[macro_use]
|
|
||||||
extern crate lazy_static;
|
|
||||||
#[macro_use]
|
|
||||||
extern crate log;
|
|
||||||
#[macro_use]
|
|
||||||
extern crate serde_derive;
|
|
||||||
|
|
||||||
mod cache;
|
fn init() {
|
||||||
mod config;
|
dotenv::dotenv().ok();
|
||||||
mod count;
|
openssl_probe::init_ssl_cert_env_vars();
|
||||||
mod error;
|
|
||||||
mod service;
|
|
||||||
mod statics;
|
|
||||||
mod template;
|
|
||||||
|
|
||||||
use crate::{
|
telemetry::init_subscriber(telemetry::get_subscriber("hoc", "info"))
|
||||||
cache::CacheState,
|
|
||||||
error::{Error, Result},
|
|
||||||
service::{Bitbucket, FormService, GitHub, Gitlab, Service},
|
|
||||||
statics::{CLIENT, CSS, FAVICON, OPT, REPO_COUNT, VERSION_INFO},
|
|
||||||
template::RepoInfo,
|
|
||||||
};
|
|
||||||
use actix_web::{
|
|
||||||
http::header::{CacheControl, CacheDirective, Expires},
|
|
||||||
middleware, web, App, HttpResponse, HttpServer,
|
|
||||||
};
|
|
||||||
use badge::{Badge, BadgeOptions};
|
|
||||||
use futures::future::Future;
|
|
||||||
use git2::Repository;
|
|
||||||
use number_prefix::{NumberPrefix, Prefixed, Standalone};
|
|
||||||
use std::{
|
|
||||||
borrow::Cow,
|
|
||||||
fs::create_dir_all,
|
|
||||||
path::Path,
|
|
||||||
process::Command,
|
|
||||||
sync::atomic::Ordering,
|
|
||||||
sync::Arc,
|
|
||||||
time::{Duration, SystemTime},
|
|
||||||
};
|
|
||||||
|
|
||||||
include!(concat!(env!("OUT_DIR"), "/templates.rs"));
|
|
||||||
|
|
||||||
#[derive(Deserialize, Serialize)]
|
|
||||||
struct GeneratorForm<'a> {
|
|
||||||
service: FormService,
|
|
||||||
user: Cow<'a, str>,
|
|
||||||
repo: Cow<'a, str>,
|
|
||||||
}
|
|
||||||
|
|
||||||
struct State {
|
|
||||||
repos: String,
|
|
||||||
cache: String,
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Serialize)]
|
|
||||||
struct JsonResponse<'a> {
|
|
||||||
head: &'a str,
|
|
||||||
count: u64,
|
|
||||||
commits: u64,
|
|
||||||
}
|
|
||||||
|
|
||||||
fn pull(path: impl AsRef<Path>) -> Result<()> {
|
|
||||||
let repo = Repository::open_bare(path)?;
|
|
||||||
let mut origin = repo.find_remote("origin")?;
|
|
||||||
origin.fetch(&["refs/heads/*:refs/heads/*"], None, None)?;
|
|
||||||
Ok(())
|
|
||||||
}
|
|
||||||
|
|
||||||
fn hoc(repo: &str, repo_dir: &str, cache_dir: &str) -> Result<(u64, String, u64)> {
|
|
||||||
let repo_dir = format!("{}/{}", repo_dir, repo);
|
|
||||||
let cache_dir = format!("{}/{}.json", cache_dir, repo);
|
|
||||||
let cache_dir = Path::new(&cache_dir);
|
|
||||||
let repo = Repository::open_bare(&repo_dir)?;
|
|
||||||
// TODO: do better...
|
|
||||||
let head = match repo.head() {
|
|
||||||
Ok(v) => v,
|
|
||||||
Err(_) => return Err(Error::GitNoMaster),
|
|
||||||
};
|
|
||||||
let head = format!("{}", head.target().ok_or(Error::Internal)?);
|
|
||||||
let mut arg_commit_count = vec!["rev-list".to_string(), "--count".to_string()];
|
|
||||||
let mut arg = vec![
|
|
||||||
"log".to_string(),
|
|
||||||
"--pretty=tformat:".to_string(),
|
|
||||||
"--numstat".to_string(),
|
|
||||||
"--ignore-space-change".to_string(),
|
|
||||||
"--ignore-all-space".to_string(),
|
|
||||||
"--ignore-submodules".to_string(),
|
|
||||||
"--no-color".to_string(),
|
|
||||||
"--find-copies-harder".to_string(),
|
|
||||||
"-M".to_string(),
|
|
||||||
"--diff-filter=ACDM".to_string(),
|
|
||||||
];
|
|
||||||
let cache = CacheState::read_from_file(&cache_dir, &head)?;
|
|
||||||
match &cache {
|
|
||||||
CacheState::Current { count, commits } => {
|
|
||||||
info!("Using cache for {}", repo_dir);
|
|
||||||
return Ok((*count, head, *commits));
|
|
||||||
}
|
|
||||||
CacheState::Old(cache) => {
|
|
||||||
info!("Updating cache for {}", repo_dir);
|
|
||||||
arg.push(format!("{}..HEAD", cache.head));
|
|
||||||
arg_commit_count.push(format!("{}..HEAD", cache.head));
|
|
||||||
}
|
|
||||||
CacheState::No => {
|
|
||||||
info!("Creating cache for {}", repo_dir);
|
|
||||||
arg_commit_count.push("HEAD".to_string());
|
|
||||||
}
|
|
||||||
};
|
|
||||||
arg.push("--".to_string());
|
|
||||||
arg.push(".".to_string());
|
|
||||||
let output = Command::new("git")
|
|
||||||
.args(&arg)
|
|
||||||
.current_dir(&repo_dir)
|
|
||||||
.output()?
|
|
||||||
.stdout;
|
|
||||||
let output = String::from_utf8_lossy(&output);
|
|
||||||
let output_commits = Command::new("git")
|
|
||||||
.args(&arg_commit_count)
|
|
||||||
.current_dir(&repo_dir)
|
|
||||||
.output()?
|
|
||||||
.stdout;
|
|
||||||
let output_commits = String::from_utf8_lossy(&output_commits);
|
|
||||||
let commits: u64 = output_commits.trim().parse()?;
|
|
||||||
let count: u64 = output
|
|
||||||
.lines()
|
|
||||||
.map(|s| {
|
|
||||||
s.split_whitespace()
|
|
||||||
.take(2)
|
|
||||||
.map(str::parse::<u64>)
|
|
||||||
.filter_map(std::result::Result::ok)
|
|
||||||
.sum::<u64>()
|
|
||||||
})
|
|
||||||
.sum();
|
|
||||||
|
|
||||||
let cache = cache.calculate_new_cache(count, commits, (&head).into());
|
|
||||||
cache.write_to_file(cache_dir)?;
|
|
||||||
|
|
||||||
Ok((cache.count, head, commits))
|
|
||||||
}
|
|
||||||
|
|
||||||
async fn remote_exists(url: &str) -> Result<bool> {
|
|
||||||
let resp = CLIENT.head(url).send().await?;
|
|
||||||
Ok(resp.status() == reqwest::StatusCode::OK)
|
|
||||||
|
|
||||||
// .map(|resp| resp.status() == reqwest::StatusCode::OK)
|
|
||||||
// .from_err()
|
|
||||||
}
|
|
||||||
|
|
||||||
enum HocResult {
|
|
||||||
Hoc {
|
|
||||||
hoc: u64,
|
|
||||||
commits: u64,
|
|
||||||
hoc_pretty: String,
|
|
||||||
head: String,
|
|
||||||
url: String,
|
|
||||||
repo: String,
|
|
||||||
service_path: String,
|
|
||||||
},
|
|
||||||
NotFound,
|
|
||||||
}
|
|
||||||
|
|
||||||
async fn handle_hoc_request<T, F>(
|
|
||||||
state: web::Data<Arc<State>>,
|
|
||||||
data: web::Path<(String, String)>,
|
|
||||||
mapper: F,
|
|
||||||
) -> Result<HttpResponse>
|
|
||||||
where
|
|
||||||
T: Service,
|
|
||||||
F: Fn(HocResult) -> Result<HttpResponse>,
|
|
||||||
{
|
|
||||||
let repo = format!("{}/{}", data.0.to_lowercase(), data.1.to_lowercase());
|
|
||||||
let service_path = format!("{}/{}", T::domain(), repo);
|
|
||||||
let path = format!("{}/{}", state.repos, service_path);
|
|
||||||
let url = format!("https://{}", service_path);
|
|
||||||
let remote_exists = remote_exists(&url).await?;
|
|
||||||
let file = Path::new(&path);
|
|
||||||
if !file.exists() {
|
|
||||||
if !remote_exists {
|
|
||||||
warn!("Repository does not exist: {}", url);
|
|
||||||
return mapper(HocResult::NotFound);
|
|
||||||
}
|
|
||||||
info!("Cloning {} for the first time", url);
|
|
||||||
create_dir_all(file)?;
|
|
||||||
let repo = Repository::init_bare(file)?;
|
|
||||||
repo.remote_add_fetch("origin", "refs/heads/*:refs/heads/*")?;
|
|
||||||
repo.remote_set_url("origin", &url)?;
|
|
||||||
REPO_COUNT.fetch_add(1, Ordering::Relaxed);
|
|
||||||
}
|
|
||||||
pull(&path)?;
|
|
||||||
let (hoc, head, commits) = hoc(&service_path, &state.repos, &state.cache)?;
|
|
||||||
let hoc_pretty = match NumberPrefix::decimal(hoc as f64) {
|
|
||||||
Standalone(hoc) => hoc.to_string(),
|
|
||||||
Prefixed(prefix, hoc) => format!("{:.1}{}", hoc, prefix),
|
|
||||||
};
|
|
||||||
let res = HocResult::Hoc {
|
|
||||||
hoc,
|
|
||||||
commits,
|
|
||||||
hoc_pretty,
|
|
||||||
head,
|
|
||||||
url,
|
|
||||||
repo,
|
|
||||||
service_path,
|
|
||||||
};
|
|
||||||
mapper(res)
|
|
||||||
}
|
|
||||||
|
|
||||||
fn json_hoc<T: Service>(
|
|
||||||
state: web::Data<Arc<State>>,
|
|
||||||
data: web::Path<(String, String)>,
|
|
||||||
) -> impl Future<Output = Result<HttpResponse>> {
|
|
||||||
let mapper = |r| match r {
|
|
||||||
HocResult::NotFound => p404(),
|
|
||||||
HocResult::Hoc {
|
|
||||||
hoc, head, commits, ..
|
|
||||||
} => Ok(HttpResponse::Ok().json(JsonResponse {
|
|
||||||
head: &head,
|
|
||||||
count: hoc,
|
|
||||||
commits,
|
|
||||||
})),
|
|
||||||
};
|
|
||||||
handle_hoc_request::<T, _>(state, data, mapper)
|
|
||||||
}
|
|
||||||
|
|
||||||
fn calculate_hoc<T: Service>(
|
|
||||||
state: web::Data<Arc<State>>,
|
|
||||||
data: web::Path<(String, String)>,
|
|
||||||
) -> impl Future<Output = Result<HttpResponse>> {
|
|
||||||
let mapper = move |r| match r {
|
|
||||||
HocResult::NotFound => p404(),
|
|
||||||
HocResult::Hoc { hoc_pretty, .. } => {
|
|
||||||
let badge_opt = BadgeOptions {
|
|
||||||
subject: "Hits-of-Code".to_string(),
|
|
||||||
color: "#007ec6".to_string(),
|
|
||||||
status: hoc_pretty,
|
|
||||||
};
|
|
||||||
let badge = Badge::new(badge_opt)?;
|
|
||||||
// TODO: remove clone
|
|
||||||
let body = badge.to_svg().as_bytes().to_vec();
|
|
||||||
|
|
||||||
let expiration = SystemTime::now() + Duration::from_secs(30);
|
|
||||||
Ok(HttpResponse::Ok()
|
|
||||||
.content_type("image/svg+xml")
|
|
||||||
.set(Expires(expiration.into()))
|
|
||||||
.set(CacheControl(vec![
|
|
||||||
CacheDirective::MaxAge(0u32),
|
|
||||||
CacheDirective::MustRevalidate,
|
|
||||||
CacheDirective::NoCache,
|
|
||||||
CacheDirective::NoStore,
|
|
||||||
]))
|
|
||||||
.body(body))
|
|
||||||
}
|
|
||||||
};
|
|
||||||
handle_hoc_request::<T, _>(state, data, mapper)
|
|
||||||
}
|
|
||||||
|
|
||||||
fn overview<T: Service>(
|
|
||||||
state: web::Data<Arc<State>>,
|
|
||||||
data: web::Path<(String, String)>,
|
|
||||||
) -> impl Future<Output = Result<HttpResponse>> {
|
|
||||||
let mapper = |r| match r {
|
|
||||||
HocResult::NotFound => p404(),
|
|
||||||
HocResult::Hoc {
|
|
||||||
hoc,
|
|
||||||
commits,
|
|
||||||
hoc_pretty,
|
|
||||||
url,
|
|
||||||
head,
|
|
||||||
repo,
|
|
||||||
service_path,
|
|
||||||
} => {
|
|
||||||
let mut buf = Vec::new();
|
|
||||||
let repo_info = RepoInfo {
|
|
||||||
commit_url: &T::commit_url(&repo, &head),
|
|
||||||
commits,
|
|
||||||
domain: &OPT.domain,
|
|
||||||
head: &head,
|
|
||||||
hoc,
|
|
||||||
hoc_pretty: &hoc_pretty,
|
|
||||||
path: &service_path,
|
|
||||||
url: &url,
|
|
||||||
};
|
|
||||||
templates::overview(
|
|
||||||
&mut buf,
|
|
||||||
VERSION_INFO,
|
|
||||||
REPO_COUNT.load(Ordering::Relaxed),
|
|
||||||
repo_info,
|
|
||||||
)?;
|
|
||||||
|
|
||||||
Ok(HttpResponse::Ok().content_type("text/html").body(buf))
|
|
||||||
}
|
|
||||||
};
|
|
||||||
handle_hoc_request::<T, _>(state, data, mapper)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[get("/")]
|
|
||||||
async fn index() -> Result<HttpResponse> {
|
|
||||||
let mut buf = Vec::new();
|
|
||||||
templates::index(
|
|
||||||
&mut buf,
|
|
||||||
VERSION_INFO,
|
|
||||||
REPO_COUNT.load(Ordering::Relaxed),
|
|
||||||
&OPT.domain,
|
|
||||||
)?;
|
|
||||||
Ok(HttpResponse::Ok().content_type("text/html").body(buf))
|
|
||||||
}
|
|
||||||
|
|
||||||
#[post("/generate")]
|
|
||||||
async fn generate(params: web::Form<GeneratorForm<'_>>) -> Result<HttpResponse> {
|
|
||||||
let repo = format!("{}/{}", params.user, params.repo);
|
|
||||||
let mut buf = Vec::new();
|
|
||||||
templates::generate(
|
|
||||||
&mut buf,
|
|
||||||
VERSION_INFO,
|
|
||||||
REPO_COUNT.load(Ordering::Relaxed),
|
|
||||||
&OPT.domain,
|
|
||||||
params.service.url(),
|
|
||||||
params.service.service(),
|
|
||||||
&repo,
|
|
||||||
)?;
|
|
||||||
|
|
||||||
Ok(HttpResponse::Ok().content_type("text/html").body(buf))
|
|
||||||
}
|
|
||||||
|
|
||||||
fn p404() -> Result<HttpResponse> {
|
|
||||||
let mut buf = Vec::new();
|
|
||||||
templates::p404(&mut buf, VERSION_INFO, REPO_COUNT.load(Ordering::Relaxed))?;
|
|
||||||
Ok(HttpResponse::NotFound().content_type("text/html").body(buf))
|
|
||||||
}
|
|
||||||
|
|
||||||
async fn async_p404() -> Result<HttpResponse> {
|
|
||||||
p404()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[get("/tacit-css.min.css")]
|
|
||||||
fn css() -> HttpResponse {
|
|
||||||
HttpResponse::Ok().content_type("text/css").body(CSS)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[get("/favicon.ico")]
|
|
||||||
fn favicon32() -> HttpResponse {
|
|
||||||
HttpResponse::Ok().content_type("image/png").body(FAVICON)
|
|
||||||
}
|
|
||||||
|
|
||||||
async fn start_server() -> std::io::Result<()> {
|
|
||||||
let interface = format!("{}:{}", OPT.host, OPT.port);
|
|
||||||
let state = Arc::new(State {
|
|
||||||
repos: OPT.outdir.display().to_string(),
|
|
||||||
cache: OPT.cachedir.display().to_string(),
|
|
||||||
});
|
|
||||||
HttpServer::new(move || {
|
|
||||||
App::new()
|
|
||||||
.data(state.clone())
|
|
||||||
.wrap(middleware::Logger::default())
|
|
||||||
.wrap(middleware::NormalizePath)
|
|
||||||
.service(index)
|
|
||||||
.service(css)
|
|
||||||
.service(favicon32)
|
|
||||||
.service(generate)
|
|
||||||
.service(web::resource("/github/{user}/{repo}").to(calculate_hoc::<GitHub>))
|
|
||||||
.service(web::resource("/gitlab/{user}/{repo}").to(calculate_hoc::<Gitlab>))
|
|
||||||
.service(web::resource("/bitbucket/{user}/{repo}").to(calculate_hoc::<Bitbucket>))
|
|
||||||
.service(web::resource("/github/{user}/{repo}/json").to(json_hoc::<GitHub>))
|
|
||||||
.service(web::resource("/gitlab/{user}/{repo}/json").to(json_hoc::<Gitlab>))
|
|
||||||
.service(web::resource("/bitbucket/{user}/{repo}/json").to(json_hoc::<Bitbucket>))
|
|
||||||
.service(web::resource("/view/github/{user}/{repo}").to(overview::<GitHub>))
|
|
||||||
.service(web::resource("/view/gitlab/{user}/{repo}").to(overview::<Gitlab>))
|
|
||||||
.service(web::resource("/view/bitbucket/{user}/{repo}").to(overview::<Bitbucket>))
|
|
||||||
.default_service(web::resource("").route(web::get().to(async_p404)))
|
|
||||||
})
|
|
||||||
.workers(OPT.workers)
|
|
||||||
.bind(interface)?
|
|
||||||
.run()
|
|
||||||
.await
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[actix_rt::main]
|
#[actix_rt::main]
|
||||||
async fn main() -> std::io::Result<()> {
|
async fn main() -> std::io::Result<()> {
|
||||||
config::init().await.unwrap();
|
init();
|
||||||
start_server().await
|
|
||||||
|
// TODO: error handling
|
||||||
|
let settings = Settings::load().expect("Cannot load config");
|
||||||
|
|
||||||
|
let address = format!("{}:{}", settings.host, settings.port);
|
||||||
|
// TODO: error handling
|
||||||
|
let listener = TcpListener::bind(address)?;
|
||||||
|
hoc::run(listener, settings)
|
||||||
|
.await
|
||||||
|
.expect("Server error")
|
||||||
|
.await
|
||||||
}
|
}
|
||||||
|
@ -12,6 +12,8 @@ pub(crate) enum FormService {
|
|||||||
Gitlab,
|
Gitlab,
|
||||||
#[serde(rename = "bitbucket")]
|
#[serde(rename = "bitbucket")]
|
||||||
Bitbucket,
|
Bitbucket,
|
||||||
|
#[serde(rename = "sourcehut")]
|
||||||
|
Sourcehut,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl FormService {
|
impl FormService {
|
||||||
@ -20,6 +22,7 @@ impl FormService {
|
|||||||
FormService::GitHub => "github.com",
|
FormService::GitHub => "github.com",
|
||||||
FormService::Gitlab => "gitlab.com",
|
FormService::Gitlab => "gitlab.com",
|
||||||
FormService::Bitbucket => "bitbucket.org",
|
FormService::Bitbucket => "bitbucket.org",
|
||||||
|
FormService::Sourcehut => "git.sr.ht",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -28,6 +31,7 @@ impl FormService {
|
|||||||
FormService::GitHub => "github",
|
FormService::GitHub => "github",
|
||||||
FormService::Gitlab => "gitlab",
|
FormService::Gitlab => "gitlab",
|
||||||
FormService::Bitbucket => "bitbucket",
|
FormService::Bitbucket => "bitbucket",
|
||||||
|
FormService::Sourcehut => "sourcehut",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -73,3 +77,17 @@ impl Service for Bitbucket {
|
|||||||
format!("https://{}/{}/commits/{}", Self::domain(), repo, commit_ref)
|
format!("https://{}/{}/commits/{}", Self::domain(), repo, commit_ref)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub(crate) struct Sourcehut;
|
||||||
|
|
||||||
|
impl Service for Sourcehut {
|
||||||
|
fn domain() -> &'static str {
|
||||||
|
"git.sr.ht"
|
||||||
|
}
|
||||||
|
fn url_path() -> &'static str {
|
||||||
|
"sourcehut"
|
||||||
|
}
|
||||||
|
fn commit_url(repo: &str, commit_ref: &str) -> String {
|
||||||
|
format!("https://{}/{}/commit/{}", Self::domain(), repo, commit_ref)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -1,14 +1,10 @@
|
|||||||
use crate::{config::Opt, count::count_repositories};
|
|
||||||
use std::sync::atomic::AtomicUsize;
|
|
||||||
use structopt::StructOpt;
|
|
||||||
|
|
||||||
pub struct VersionInfo<'a> {
|
pub struct VersionInfo<'a> {
|
||||||
pub commit: &'a str,
|
pub commit: &'a str,
|
||||||
pub version: &'a str,
|
pub version: &'a str,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) const VERSION_INFO: VersionInfo = VersionInfo {
|
pub(crate) const VERSION_INFO: VersionInfo = VersionInfo {
|
||||||
commit: env!("VERGEN_SHA_SHORT"),
|
commit: env!("VERGEN_GIT_SHA_SHORT"),
|
||||||
version: env!("CARGO_PKG_VERSION"),
|
version: env!("CARGO_PKG_VERSION"),
|
||||||
};
|
};
|
||||||
pub(crate) const CSS: &str = include_str!("../static/tacit-css.min.css");
|
pub(crate) const CSS: &str = include_str!("../static/tacit-css.min.css");
|
||||||
@ -16,7 +12,4 @@ pub(crate) const FAVICON: &[u8] = include_bytes!("../static/favicon32.png");
|
|||||||
|
|
||||||
lazy_static! {
|
lazy_static! {
|
||||||
pub(crate) static ref CLIENT: reqwest::Client = reqwest::Client::new();
|
pub(crate) static ref CLIENT: reqwest::Client = reqwest::Client::new();
|
||||||
pub(crate) static ref OPT: Opt = Opt::from_args();
|
|
||||||
pub(crate) static ref REPO_COUNT: AtomicUsize =
|
|
||||||
AtomicUsize::new(count_repositories(&OPT.outdir).unwrap());
|
|
||||||
}
|
}
|
||||||
|
21
src/telemetry.rs
Normal file
21
src/telemetry.rs
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
use tracing::{subscriber::set_global_default, Subscriber};
|
||||||
|
use tracing_bunyan_formatter::{BunyanFormattingLayer, JsonStorageLayer};
|
||||||
|
use tracing_log::LogTracer;
|
||||||
|
use tracing_subscriber::{layer::SubscriberExt, EnvFilter, Registry};
|
||||||
|
|
||||||
|
pub fn get_subscriber(name: &str, env_filter: &str) -> impl Subscriber + Send + Sync {
|
||||||
|
let env_filter =
|
||||||
|
EnvFilter::try_from_default_env().unwrap_or_else(|_| EnvFilter::new(env_filter));
|
||||||
|
|
||||||
|
let formatting_layer = BunyanFormattingLayer::new(name.to_string(), std::io::stdout);
|
||||||
|
|
||||||
|
Registry::default()
|
||||||
|
.with(env_filter)
|
||||||
|
.with(JsonStorageLayer)
|
||||||
|
.with(formatting_layer)
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn init_subscriber(subscriber: impl Subscriber + Send + Sync) {
|
||||||
|
LogTracer::init().expect("Failed to set logger");
|
||||||
|
set_global_default(subscriber).expect("Failed to set tracing subscriber");
|
||||||
|
}
|
@ -1,10 +1,11 @@
|
|||||||
pub struct RepoInfo<'a> {
|
pub struct RepoInfo<'a> {
|
||||||
pub commit_url: &'a str,
|
pub commit_url: &'a str,
|
||||||
pub commits: u64,
|
pub commits: u64,
|
||||||
pub domain: &'a str,
|
pub base_url: &'a str,
|
||||||
pub head: &'a str,
|
pub head: &'a str,
|
||||||
pub hoc: u64,
|
pub hoc: u64,
|
||||||
pub hoc_pretty: &'a str,
|
pub hoc_pretty: &'a str,
|
||||||
pub path: &'a str,
|
pub path: &'a str,
|
||||||
pub url: &'a str,
|
pub url: &'a str,
|
||||||
|
pub branch: &'a str,
|
||||||
}
|
}
|
||||||
|
4
static/tacit-css.min.css
vendored
4
static/tacit-css.min.css
vendored
File diff suppressed because one or more lines are too long
@ -1,7 +1,7 @@
|
|||||||
@use super::base;
|
@use super::base;
|
||||||
@use crate::statics::VersionInfo;
|
@use crate::statics::VersionInfo;
|
||||||
|
|
||||||
@(version_info: VersionInfo, repo_count: usize, domain: &str, url: &str, service: &str, path: &str)
|
@(version_info: VersionInfo, repo_count: usize, base_url: &str, url: &str, service: &str, path: &str)
|
||||||
|
|
||||||
@:base("Hits-of-Code Badges", "Badge Generator", {
|
@:base("Hits-of-Code Badges", "Badge Generator", {
|
||||||
|
|
||||||
@ -10,7 +10,7 @@ Here is the markdown for the badge for <a href="https://@url/@path">@url/@path</
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
[](https://@domain/view/@service/@path)
|
[](@base_url/@service/@path/view)
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
@ -18,6 +18,6 @@ It will be rendered like this
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
<a href="https://@domain/view/@service/@path"><img src="https://@domain/@service/@path" alt="example badge" /></a>
|
<a href="@base_url/@service/@path/view"><img src="@base_url/@service/@path" alt="example badge" /></a>
|
||||||
</pre>
|
</pre>
|
||||||
}, version_info, repo_count)
|
}, version_info, repo_count)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
@use super::base;
|
@use super::base;
|
||||||
@use crate::statics::VersionInfo;
|
@use crate::statics::VersionInfo;
|
||||||
|
|
||||||
@(version_info: VersionInfo, repo_count: usize, domain: &str)
|
@(version_info: VersionInfo, repo_count: usize, base_url: &str)
|
||||||
|
|
||||||
@:base("Hits-of-Code Badges", "Hits-of-Code Badges", {
|
@:base("Hits-of-Code Badges", "Hits-of-Code Badges", {
|
||||||
|
|
||||||
@ -20,20 +20,20 @@ gives an overview about the amount of work put into a codebase.
|
|||||||
<p>
|
<p>
|
||||||
There is a <a href="https://github.com/yegor256/hoc/">command-line tool</a> to calculate the HoC of a repository, but
|
There is a <a href="https://github.com/yegor256/hoc/">command-line tool</a> to calculate the HoC of a repository, but
|
||||||
some people might want a nice badge to put in their README, that's why I implemented this API. Currently the API can be
|
some people might want a nice badge to put in their README, that's why I implemented this API. Currently the API can be
|
||||||
used for GitHub, GitLab and Bitbucket repositories. Just put the following code in your README:
|
used for GitHub, GitLab, Bitbucket and Sourcehut repositories. Just put the following code in your README:
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
[](https://@domain/view/<service>/<user>/<repo>)
|
[](@base_url/<service>/<user>/<repo>/view)
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
where <code><service></code> is one of <code>github</code>, <code>gitlab</code> or <code>bitbucket</code>. So the
|
where <code><service></code> is one of <code>github</code>, <code>gitlab</code>, <code>bitbucket</code> or
|
||||||
following Markdown
|
<code>sourcehut</code>. So the following Markdown
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
[](https://@domain/view/github/vbrandl/hoc)
|
[](@base_url/github/vbrandl/hoc/view)
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
@ -41,15 +41,21 @@ would render this badge:
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
<a href="https://@domain/view/github/vbrandl/hoc"><img src="https://@domain/github/vbrandl/hoc"
|
<a href="@base_url/github/vbrandl/hoc/view"><img src="@base_url/github/vbrandl/hoc"
|
||||||
alt="example badge" /></a>
|
alt="example badge" /></a>
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
By default, this service assumes the existence of a branch named <code>master</code>. If no branch with that name exists
|
||||||
|
in your repository or you want a badge for another branch of your repository, just append
|
||||||
|
<code>?branch=<branch-name></code> to the URL.
|
||||||
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
You can also request the HoC as JSON by appending <code>/json</code> to the request path. This will return a JSON object
|
You can also request the HoC as JSON by appending <code>/json</code> to the request path. This will return a JSON object
|
||||||
with three fields: <code>count</code> (the HoC value), <code>commits</code> (the number of commits) and
|
with three fields: <code>count</code> (the HoC value), <code>commits</code> (the number of commits) and
|
||||||
<code>head</code> (the commit ref of HEAD). Requesting <a
|
<code>head</code> (the commit ref of HEAD). Requesting <a
|
||||||
href="https://@domain/github/vbrandl/hoc/json">https://@domain/github/vbrandl/hoc/json</a> might return something along
|
href="@base_url/github/vbrandl/hoc/json">@base_url/github/vbrandl/hoc/json</a> might return something along
|
||||||
the lines of
|
the lines of
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@ -68,6 +74,7 @@ the lines of
|
|||||||
<option value="github">GitHub</option>
|
<option value="github">GitHub</option>
|
||||||
<option value="gitlab">Gitlab</option>
|
<option value="gitlab">Gitlab</option>
|
||||||
<option value="bitbucket">Bitbucket</option>
|
<option value="bitbucket">Bitbucket</option>
|
||||||
|
<option value="sourcehut">Sourcehut</option>
|
||||||
</select>
|
</select>
|
||||||
<label>/</label>
|
<label>/</label>
|
||||||
<input name="user" id="user" type="text" placeholder="user" />
|
<input name="user" id="user" type="text" placeholder="user" />
|
||||||
@ -88,7 +95,7 @@ welcome.
|
|||||||
|
|
||||||
<p>
|
<p>
|
||||||
You can reach me via mail: <a href="mailto:mail+hoc@@vbrandl.net">mail+hoc@@vbrandl.net</a> preferably using
|
You can reach me via mail: <a href="mailto:mail+hoc@@vbrandl.net">mail+hoc@@vbrandl.net</a> preferably using
|
||||||
my <a href="https://mirror.oldsql.cc/key.asc">GPG key</a>
|
my <a href="https://www.vbrandl.net/static/keys/0x1FFE431282F4B8CC0A7579167FB009175885FC76.asc">GPG key</a>
|
||||||
(<a href="http://pool.sks-keyservers.net/pks/lookup?op=get&search=0x1FFE431282F4B8CC0A7579167FB009175885FC76">from a
|
(<a href="http://pool.sks-keyservers.net/pks/lookup?op=get&search=0x1FFE431282F4B8CC0A7579167FB009175885FC76">from a
|
||||||
keyserver</a>), or by using any other UID from my key.
|
keyserver</a>), or by using any other UID from my key.
|
||||||
</p>
|
</p>
|
||||||
|
@ -9,7 +9,8 @@
|
|||||||
<p>
|
<p>
|
||||||
The project <a href="@repo_info.url">@repo_info.url</a> has
|
The project <a href="@repo_info.url">@repo_info.url</a> has
|
||||||
<strong>@repo_info.hoc_pretty</strong> (exactly @repo_info.hoc) hits of code at
|
<strong>@repo_info.hoc_pretty</strong> (exactly @repo_info.hoc) hits of code at
|
||||||
<a href="@repo_info.commit_url">@repo_info.head</a>. The repository contains
|
<a href="@repo_info.commit_url">@repo_info.head</a> on the
|
||||||
|
<code>@repo_info.branch</code> branch. The repository contains
|
||||||
<strong>@repo_info.commits</strong> commits.
|
<strong>@repo_info.commits</strong> commits.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@ -18,6 +19,11 @@ To include the badge in your readme, use the following markdown:
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
[](https://@repo_info.domain/view/@repo_info.path)
|
[](@repo_info.base_url/@repo_info.path/view?branch=@repo_info.branch)
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
|
|
||||||
|
<form method="post" action="/@repo_info.path/delete">
|
||||||
|
<button type="submit">Rebuild Cache</button>
|
||||||
|
</form>
|
||||||
}, version_info, repo_count)
|
}, version_info, repo_count)
|
||||||
|
@ -3,11 +3,11 @@
|
|||||||
|
|
||||||
@(version_info: VersionInfo, repo_count: usize)
|
@(version_info: VersionInfo, repo_count: usize)
|
||||||
|
|
||||||
@:base("Master Branch not Found - Hits-of-Code Badges", "404 - Master Branch not Found", {
|
@:base("Branch not Found - Hits-of-Code Badges", "404 - Branch not Found", {
|
||||||
<p>
|
<p>
|
||||||
<big>Sorry</big>. I couldn't find the master branch of your repositroy.
|
<big>Sorry</big>. I couldn't find the requested branch of your repositroy. Currently this service assumes the
|
||||||
Currently this service depends on the existence of a master branch. Please go
|
extistence of a branch named <code>master</code>. If you'd like to request a badge for another branch, you can do so by
|
||||||
<a href="/">back to the homepage</a>.
|
attaching <code>?branch=<branch-name></code> to the request.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
|
16
tests/badge.rs
Normal file
16
tests/badge.rs
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
mod util;
|
||||||
|
|
||||||
|
#[actix_rt::test]
|
||||||
|
async fn badge_succeeds() {
|
||||||
|
let test_app = util::spawn_app().await;
|
||||||
|
|
||||||
|
let client = awc::Client::default();
|
||||||
|
|
||||||
|
let response = client
|
||||||
|
.get(&format!("{}/github/vbrandl/hoc", test_app.address))
|
||||||
|
.send()
|
||||||
|
.await
|
||||||
|
.expect("Failed to execute request");
|
||||||
|
|
||||||
|
assert!(response.status().is_success());
|
||||||
|
}
|
16
tests/health_check.rs
Normal file
16
tests/health_check.rs
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
mod util;
|
||||||
|
|
||||||
|
#[actix_rt::test]
|
||||||
|
async fn health_check_works() {
|
||||||
|
let test_app = util::spawn_app().await;
|
||||||
|
|
||||||
|
let client = awc::Client::default();
|
||||||
|
|
||||||
|
let response = client
|
||||||
|
.get(&format!("{}/health_check", test_app.address))
|
||||||
|
.send()
|
||||||
|
.await
|
||||||
|
.expect("Failed to execute request");
|
||||||
|
|
||||||
|
assert!(response.status().is_success());
|
||||||
|
}
|
16
tests/index.rs
Normal file
16
tests/index.rs
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
mod util;
|
||||||
|
|
||||||
|
#[actix_rt::test]
|
||||||
|
async fn index_returns_success() {
|
||||||
|
let test_app = util::spawn_app().await;
|
||||||
|
|
||||||
|
let client = awc::Client::default();
|
||||||
|
|
||||||
|
let response = client
|
||||||
|
.get(&format!("{}/", test_app.address))
|
||||||
|
.send()
|
||||||
|
.await
|
||||||
|
.expect("Failed to execute request");
|
||||||
|
|
||||||
|
assert!(response.status().is_success());
|
||||||
|
}
|
16
tests/json.rs
Normal file
16
tests/json.rs
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
mod util;
|
||||||
|
|
||||||
|
#[actix_rt::test]
|
||||||
|
async fn json_returns_success() {
|
||||||
|
let test_app = util::spawn_app().await;
|
||||||
|
|
||||||
|
let client = awc::Client::default();
|
||||||
|
|
||||||
|
let response = client
|
||||||
|
.get(&format!("{}/github/vbrandl/hoc/json", test_app.address))
|
||||||
|
.send()
|
||||||
|
.await
|
||||||
|
.expect("Failed to execute request");
|
||||||
|
|
||||||
|
assert!(response.status().is_success());
|
||||||
|
}
|
50
tests/util/mod.rs
Normal file
50
tests/util/mod.rs
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
use hoc::{config::Settings, telemetry};
|
||||||
|
|
||||||
|
use std::net::TcpListener;
|
||||||
|
|
||||||
|
use tempfile::{tempdir, TempDir};
|
||||||
|
|
||||||
|
lazy_static::lazy_static! {
|
||||||
|
static ref TRACING: () = {
|
||||||
|
let filter = if std::env::var("TEST_LOG").is_ok() { "debug" } else { "" };
|
||||||
|
let subscriber = telemetry::get_subscriber("test", filter);
|
||||||
|
telemetry::init_subscriber(subscriber);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
pub struct TestApp {
|
||||||
|
pub address: String,
|
||||||
|
repo_dir: TempDir,
|
||||||
|
cache_dir: TempDir,
|
||||||
|
}
|
||||||
|
|
||||||
|
pub async fn spawn_app() -> TestApp {
|
||||||
|
lazy_static::initialize(&TRACING);
|
||||||
|
|
||||||
|
let listener = TcpListener::bind("127.0.0.1:0").expect("Failed to bind random port");
|
||||||
|
|
||||||
|
let port = listener.local_addr().unwrap().port();
|
||||||
|
let address = format!("http://127.0.0.1:{}", port);
|
||||||
|
|
||||||
|
let repo_dir = tempdir().expect("Cannot create repo_dir");
|
||||||
|
let cache_dir = tempdir().expect("Cannot create cache_dir");
|
||||||
|
|
||||||
|
let mut settings = Settings::load().expect("Failed to read configuration.");
|
||||||
|
settings.repodir = repo_dir.path().to_path_buf();
|
||||||
|
settings.cachedir = cache_dir.path().to_path_buf();
|
||||||
|
// configuration.database.database_name = Uuid::new_v4().to_string();
|
||||||
|
|
||||||
|
// let connection_pool = configure_database(&configuration.database).await;
|
||||||
|
|
||||||
|
let server = hoc::run(listener, settings)
|
||||||
|
.await
|
||||||
|
.expect("Failed to bind address");
|
||||||
|
|
||||||
|
let _ = tokio::spawn(server);
|
||||||
|
|
||||||
|
TestApp {
|
||||||
|
address,
|
||||||
|
repo_dir,
|
||||||
|
cache_dir,
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue
Block a user