Compare commits
2 Commits
21e9e89de2
...
97b2897edc
Author | SHA1 | Date |
---|---|---|
Dmitriy Pleshevskiy | 97b2897edc | |
Dmitriy Pleshevskiy | ac3f245a1c |
|
@ -1,4 +0,0 @@
|
|||
/target
|
||||
|
||||
.env*
|
||||
!.envrc
|
|
@ -1,6 +1,7 @@
|
|||
/target
|
||||
/result
|
||||
|
||||
.direnv
|
||||
.env*
|
||||
!.env.example
|
||||
|
||||
.direnv
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
[package]
|
||||
name = "vnetod"
|
||||
description = "Are you still switching sections in your dotenv file manually? Try this dotenv section switcher"
|
||||
version = "0.3.2"
|
||||
version = "0.3.3"
|
||||
edition = "2021"
|
||||
license = "GPL-3.0+"
|
||||
homepage = "https://github.com/pleshevskiy/vnetod/discussions"
|
||||
|
|
22
Dockerfile
22
Dockerfile
|
@ -1,22 +0,0 @@
|
|||
FROM rust:1.62.0-slim-buster
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN cargo init .
|
||||
|
||||
COPY Cargo.* ./
|
||||
|
||||
RUN cargo build --release \
|
||||
&& rm -rf src
|
||||
|
||||
COPY ./src ./src
|
||||
|
||||
RUN cargo install --bin vnetod --path . \
|
||||
&& rm -rf ./src Cargo.*
|
||||
|
||||
VOLUME ["/data"]
|
||||
|
||||
WORKDIR /data
|
||||
|
||||
ENTRYPOINT ["/usr/local/cargo/bin/vnetod"]
|
||||
|
58
flake.nix
58
flake.nix
|
@ -10,34 +10,46 @@
|
|||
|
||||
version = "${cargoToml.package.version}_${builtins.substring 0 8 self.lastModifiedDate}_${self.shortRev or "dirty"}";
|
||||
in
|
||||
utils.lib.eachDefaultSystem
|
||||
(system:
|
||||
let
|
||||
inherit (nixpkgs) lib;
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
utils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
inherit (nixpkgs) lib;
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
|
||||
vnetod = pkgs.rustPlatform.buildRustPackage {
|
||||
name = "vnetod-${version}";
|
||||
vnetod = pkgs.rustPlatform.buildRustPackage {
|
||||
name = "vnetod-${version}";
|
||||
|
||||
src = lib.cleanSource ./.;
|
||||
cargoLock.lockFile = ./Cargo.lock;
|
||||
src = lib.cleanSource ./.;
|
||||
cargoLock.lockFile = ./Cargo.lock;
|
||||
|
||||
doCheck = true;
|
||||
};
|
||||
in
|
||||
{
|
||||
apps.default = {
|
||||
type = "app";
|
||||
program = "${vnetod}/bin/vnetod";
|
||||
doCheck = true;
|
||||
};
|
||||
|
||||
docker = pkgs.dockerTools.buildLayeredImage {
|
||||
name = "pleshevskiy/vnetod";
|
||||
tag = cargoToml.package.version;
|
||||
config = {
|
||||
Volumes."/data" = { };
|
||||
WorkingDir = "/data";
|
||||
Entrypoint = [ "${vnetod}/bin/vnetod" ];
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
apps.default = {
|
||||
type = "app";
|
||||
program = "${vnetod}/bin/vnetod";
|
||||
};
|
||||
|
||||
packages.default = vnetod;
|
||||
packages = {
|
||||
inherit docker;
|
||||
default = vnetod;
|
||||
};
|
||||
|
||||
devShell = pkgs.mkShell {
|
||||
packages = with pkgs; [ cargo rustc rustfmt clippy rust-analyzer ];
|
||||
RUST_SRC_PATH = pkgs.rustPlatform.rustLibSrc;
|
||||
};
|
||||
devShell = pkgs.mkShell {
|
||||
packages = with pkgs; [ cargo rustc rustfmt clippy rust-analyzer ];
|
||||
RUST_SRC_PATH = pkgs.rustPlatform.rustLibSrc;
|
||||
};
|
||||
|
||||
overlays = f: p: { inherit vnetod; };
|
||||
});
|
||||
overlays = f: p: { inherit vnetod; };
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue