nix: init tooling
This commit is contained in:
parent
17a3f15131
commit
e4d397ac9c
5 changed files with 115 additions and 0 deletions
37
nix/package.nix
Normal file
37
nix/package.nix
Normal file
|
@ -0,0 +1,37 @@
|
|||
{
|
||||
lib,
|
||||
rustPlatform,
|
||||
}: let
|
||||
fs = lib.fileset;
|
||||
|
||||
lockfile = ../Cargo.lock;
|
||||
cargoToml = ../Cargo.toml;
|
||||
in
|
||||
rustPlatform.buildRustPackage {
|
||||
pname = "eris";
|
||||
version = "0.0.1";
|
||||
|
||||
src = let
|
||||
s = ../.;
|
||||
in
|
||||
fs.toSource {
|
||||
root = s;
|
||||
fileset = fs.unions [
|
||||
(fs.fileFilter (file: builtins.any file.hasExt ["rs"]) s + /src)
|
||||
lockfile
|
||||
cargoToml
|
||||
];
|
||||
};
|
||||
|
||||
postInstall = ''
|
||||
mkdir -p $out/share
|
||||
install -Dm755 ${../contrib} $out/share/contrib
|
||||
'';
|
||||
|
||||
cargoLock.lockFile = lockfile;
|
||||
|
||||
meta = {
|
||||
description = "Sophisticated HTTP tarpit and honeypot stream";
|
||||
mainProgram = "eris";
|
||||
};
|
||||
}
|
28
nix/shell.nix
Normal file
28
nix/shell.nix
Normal file
|
@ -0,0 +1,28 @@
|
|||
{
|
||||
mkShell,
|
||||
rust-analyzer,
|
||||
rustfmt,
|
||||
clippy,
|
||||
cargo,
|
||||
gcc,
|
||||
openssl,
|
||||
pkg-config,
|
||||
rustc,
|
||||
}:
|
||||
mkShell {
|
||||
name = "eris";
|
||||
packages = [
|
||||
rust-analyzer
|
||||
rustfmt
|
||||
clippy
|
||||
cargo
|
||||
gcc
|
||||
clippy
|
||||
rustfmt
|
||||
rustc
|
||||
|
||||
# For TLS and friends
|
||||
openssl
|
||||
pkg-config
|
||||
];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue