-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 670ec21
Showing
10 changed files
with
437 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Automatically sets up your devbox environment whenever you cd into this | ||
# directory via our direnv integration: | ||
|
||
eval "$(devbox generate direnv --print-envrc)" | ||
|
||
# check out https://www.jetpack.io/devbox/docs/ide_configuration/direnv/ | ||
# for more details |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
# This file is autogenerated by maturin v1.4.0 | ||
# To update, run | ||
# | ||
# maturin generate-ci github | ||
# | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- master | ||
tags: | ||
- '*' | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
linux: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
target: [x86_64, x86, aarch64, armv7, s390x, ppc64le] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
- name: Build wheels | ||
uses: PyO3/maturin-action@v1 | ||
with: | ||
target: ${{ matrix.target }} | ||
args: --release --out dist --find-interpreter | ||
sccache: 'true' | ||
manylinux: auto | ||
- name: Upload wheels | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: wheels | ||
path: dist | ||
|
||
windows: | ||
runs-on: windows-latest | ||
strategy: | ||
matrix: | ||
target: [x64, x86] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
architecture: ${{ matrix.target }} | ||
- name: Build wheels | ||
uses: PyO3/maturin-action@v1 | ||
with: | ||
target: ${{ matrix.target }} | ||
args: --release --out dist --find-interpreter | ||
sccache: 'true' | ||
- name: Upload wheels | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: wheels | ||
path: dist | ||
|
||
macos: | ||
runs-on: macos-latest | ||
strategy: | ||
matrix: | ||
target: [x86_64, aarch64] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
- name: Build wheels | ||
uses: PyO3/maturin-action@v1 | ||
with: | ||
target: ${{ matrix.target }} | ||
args: --release --out dist --find-interpreter | ||
sccache: 'true' | ||
- name: Upload wheels | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: wheels | ||
path: dist | ||
|
||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
if: "startsWith(github.ref, 'refs/tags/')" | ||
needs: [linux, windows, macos] | ||
steps: | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: wheels | ||
- name: Publish to PyPI | ||
uses: PyO3/maturin-action@v1 | ||
env: | ||
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }} | ||
with: | ||
command: upload | ||
args: --non-interactive --skip-existing * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Generated by Cargo | ||
# will have compiled files and executables | ||
debug/ | ||
target/ | ||
|
||
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries | ||
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html | ||
Cargo.lock | ||
|
||
# These are backup files generated by rustfmt | ||
**/*.rs.bk | ||
|
||
# MSVC Windows builds of rustc generate these, which store debugging information | ||
*.pdb | ||
|
||
.rustup/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[package] | ||
name = "nixserver-rust-bindings" | ||
version = "0.1.0" | ||
edition = "2021" | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[dependencies] | ||
rnix = "0.11.0" | ||
rowan = "0.15.15" | ||
pyo3 = { version = "0.21.0-beta.0", features = ["extension-module"] } | ||
|
||
|
||
[lib] | ||
name = "nixserver_rust_bindings" | ||
crate-type = ["cdylib"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
echo "project dir is ${PROJECT_DIR}" | ||
|
||
rustupHomeDir="${PROJECT_DIR}/.rustup" | ||
mkdir -p "${rustupHomeDir}" | ||
export RUSTUP_HOME="${rustupHomeDir}" | ||
export LIBRARY_PATH="${LIBRARY_PATH}:${PROJECT_DIR}/nix/profile/default/lib" | ||
. $VENV_DIR/bin/activate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
services.sonarr.enable = true; | ||
services.sabnzbd = { | ||
pkg = pkgs.unstable.sabnzbd; | ||
enable = true; | ||
}; | ||
services = { | ||
radarr = { | ||
enable = true; | ||
port = 8080; | ||
}; | ||
}; | ||
|
||
systemd.services."sonarr" = { | ||
enable = true; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"packages": [ | ||
"rustup@latest", | ||
"libiconv@latest", | ||
"maturin@latest", | ||
"python3@latest" | ||
], | ||
"env": { | ||
"PROJECT_DIR": "$PWD" | ||
}, | ||
"shell": { | ||
"init_hook": [ | ||
". conf/set-env.sh", | ||
"rustup default stable", | ||
"cargo fetch" | ||
], | ||
"scripts": { | ||
"build-docs": "cargo doc", | ||
"start": "cargo run", | ||
"run_test": [ | ||
"cargo test -- --show-output" | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
{ | ||
"lockfile_version": "1", | ||
"packages": { | ||
"libiconv@latest": { | ||
"last_modified": "2024-03-08T13:51:52Z", | ||
"resolved": "github:NixOS/nixpkgs/a343533bccc62400e8a9560423486a3b6c11a23b#libiconv", | ||
"source": "devbox-search", | ||
"version": "2.38", | ||
"systems": { | ||
"aarch64-linux": { | ||
"store_path": "/nix/store/8a4v6l5wav9kc672ws0mj4i40w39dr10-glibc-iconv-2.38" | ||
}, | ||
"x86_64-linux": { | ||
"store_path": "/nix/store/bijjhvx3wgz22cz0c6fx5g138d1zn89v-glibc-iconv-2.38" | ||
} | ||
} | ||
}, | ||
"maturin@latest": { | ||
"last_modified": "2024-03-19T05:49:19Z", | ||
"resolved": "github:NixOS/nixpkgs/5710127d9693421e78cca4f74fac2db6d67162b1#maturin", | ||
"source": "devbox-search", | ||
"version": "1.4.0", | ||
"systems": { | ||
"aarch64-darwin": { | ||
"store_path": "/nix/store/6ic50jfwa2a84aqdi75s8lddkl9wv4f4-maturin-1.4.0" | ||
}, | ||
"aarch64-linux": { | ||
"store_path": "/nix/store/qzs1lldld39abx7vn5ayqnnnhzdkczfi-maturin-1.4.0" | ||
}, | ||
"x86_64-darwin": { | ||
"store_path": "/nix/store/zkjy1wa8p80xvdwsl8dvvv8dz89xslf4-maturin-1.4.0" | ||
}, | ||
"x86_64-linux": { | ||
"store_path": "/nix/store/1p709j1f4glp5m7b9ydns7za6i8jvmdl-maturin-1.4.0" | ||
} | ||
} | ||
}, | ||
"python3@latest": { | ||
"last_modified": "2024-03-08T13:51:52Z", | ||
"resolved": "github:NixOS/nixpkgs/a343533bccc62400e8a9560423486a3b6c11a23b#python3", | ||
"source": "devbox-search", | ||
"version": "3.11.8", | ||
"systems": { | ||
"aarch64-darwin": { | ||
"store_path": "/nix/store/83q23q0drz3xjc0dks7k7hci923kd7s1-python3-3.11.8" | ||
}, | ||
"aarch64-linux": { | ||
"store_path": "/nix/store/xyzvnwgbzxin3ks0qnb8w6c3xqsifalh-python3-3.11.8" | ||
}, | ||
"x86_64-darwin": { | ||
"store_path": "/nix/store/3d6vir7gpf5k179fqdq2ji6lhgpfhxg4-python3-3.11.8" | ||
}, | ||
"x86_64-linux": { | ||
"store_path": "/nix/store/3v2ch16fkl50i85n05h5ckss8pxx6836-python3-3.11.8" | ||
} | ||
} | ||
}, | ||
"rustup@latest": { | ||
"last_modified": "2024-03-08T13:51:52Z", | ||
"resolved": "github:NixOS/nixpkgs/a343533bccc62400e8a9560423486a3b6c11a23b#rustup", | ||
"source": "devbox-search", | ||
"version": "1.26.0", | ||
"systems": { | ||
"aarch64-darwin": { | ||
"store_path": "/nix/store/hgzyfdwvy68mp3xpbniwavizcpd67s2y-rustup-1.26.0" | ||
}, | ||
"aarch64-linux": { | ||
"store_path": "/nix/store/2pn6r28vj0lf62shzwj3i8r3mg2njdvh-rustup-1.26.0" | ||
}, | ||
"x86_64-darwin": { | ||
"store_path": "/nix/store/xwf6zn2y28655864c3m5453m02ig9id4-rustup-1.26.0" | ||
}, | ||
"x86_64-linux": { | ||
"store_path": "/nix/store/49kaqs594l0i29b0dgzm3mvjz9blsdlj-rustup-1.26.0" | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[build-system] | ||
requires = ["maturin>=1,<2"] | ||
build-backend = "maturin" | ||
|
||
[project] | ||
name = "nixserver_rust_bindings" | ||
requires-python = ">=3.7" | ||
classifiers = [ | ||
"Programming Language :: Rust", | ||
"Programming Language :: Python :: Implementation :: CPython", | ||
"Programming Language :: Python :: Implementation :: PyPy", | ||
] |
Oops, something went wrong.