Compare commits
4 Commits
dc66d1a643
...
25d28531a1
Author | SHA1 | Date |
---|---|---|
Dmitriy Pleshevskiy | 25d28531a1 | |
Dmitriy Pleshevskiy | 6eddd4c2a0 | |
Dmitriy Pleshevskiy | 7983beaea3 | |
Dmitriy Pleshevskiy | 5f0c94af77 |
|
@ -12,7 +12,7 @@ categories = ["command-line-interface", "config", "development-tools"]
|
|||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "3.2.15", default-features = false, features = ["std", "derive"] }
|
||||
clap = { version = "3.2.15", default-features = false, features = ["std", "env", "derive"] }
|
||||
|
||||
[features]
|
||||
color = ["clap/color"]
|
||||
|
|
|
@ -90,7 +90,7 @@ nix run git+https://git.pleshevski.ru/pleshevskiy/vnetod -- --help
|
|||
- [send feedback](https://github.com/pleshevskiy/vnetod/discussions)
|
||||
- [make an issue](https://github.com/pleshevskiy/vnetod/issues)
|
||||
- matrix: @pleshevskiy:matrix.org
|
||||
- email: dmitriy@ideascup.me
|
||||
- email: dmitriy@pleshevski.ru
|
||||
|
||||
# License
|
||||
|
||||
|
|
34
flake.lock
34
flake.lock
|
@ -1,5 +1,20 @@
|
|||
{
|
||||
"nodes": {
|
||||
"flake-utils": {
|
||||
"locked": {
|
||||
"lastModified": 1667395993,
|
||||
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1659190188,
|
||||
|
@ -18,23 +33,8 @@
|
|||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs",
|
||||
"utils": "utils"
|
||||
}
|
||||
},
|
||||
"utils": {
|
||||
"locked": {
|
||||
"lastModified": 1656928814,
|
||||
"narHash": "sha256-RIFfgBuKz6Hp89yRr7+NR5tzIAbn52h8vT6vXkYjZoM=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "7e2a3b3dfd9af950a856d66b0a7d01e3c18aa249",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
15
flake.nix
15
flake.nix
|
@ -1,15 +1,15 @@
|
|||
{
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||
utils.url = "github:numtide/flake-utils";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, utils }:
|
||||
outputs = { self, nixpkgs, flake-utils }:
|
||||
let
|
||||
inherit (builtins) fromTOML readFile substring;
|
||||
|
||||
cargoToml = fromTOML (readFile ./Cargo.toml);
|
||||
version = "${cargoToml.package.version}_${substring 0 8 self.lastModifiedDate}_${self.shortRev or "dirty"}";
|
||||
version = "${cargoToml.package.version}+${substring 0 8 self.lastModifiedDate}.${self.shortRev or "dirty"}";
|
||||
|
||||
mkVnetod = { lib, rustPlatform, ... }:
|
||||
rustPlatform.buildRustPackage {
|
||||
|
@ -22,11 +22,14 @@
|
|||
};
|
||||
in
|
||||
{
|
||||
overlay = final: prev: {
|
||||
vnetod = final.callPackage mkVnetod { };
|
||||
overlays = rec {
|
||||
vnetod = final: prev: {
|
||||
vnetod = final.callPackage mkVnetod { };
|
||||
};
|
||||
default = vnetod;
|
||||
};
|
||||
}
|
||||
// utils.lib.eachDefaultSystem (system:
|
||||
// flake-utils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//! Copyright (C) 2022, Dmitriy Pleshevskiy <dmitriy@ideascup.me>
|
||||
//! Copyright (C) 2022, Dmitriy Pleshevskiy <dmitriy@pleshevski.ru>
|
||||
//!
|
||||
//! vnetod is free software: you can redistribute it and/or modify
|
||||
//! it under the terms of the GNU General Public License as published by
|
||||
|
@ -27,7 +27,7 @@ use clap::Parser;
|
|||
about = "\
|
||||
Dotenv state switcher
|
||||
---------------------------------------------------------------------
|
||||
vnetod Copyright (C) 2022 Dmitriy Pleshevskiy <dmitriy@ideascup.me>
|
||||
vnetod Copyright (C) 2022 Dmitriy Pleshevskiy <dmitriy@pleshevski.ru>
|
||||
This program comes with ABSOLUTELY NO WARRANTY;
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions;
|
||||
|
@ -39,6 +39,7 @@ pub struct Args {
|
|||
short = 'f',
|
||||
long,
|
||||
default_value = ".env",
|
||||
env = "VNETOD_FILE",
|
||||
help = "Change source file with environment variables"
|
||||
)]
|
||||
pub file: PathBuf,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//! Copyright (C) 2022, Dmitriy Pleshevskiy <dmitriy@ideascup.me>
|
||||
//! Copyright (C) 2022, Dmitriy Pleshevskiy <dmitriy@pleshevski.ru>
|
||||
//!
|
||||
//! vnetod is free software: you can redistribute it and/or modify
|
||||
//! it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//! Copyright (C) 2022, Dmitriy Pleshevskiy <dmitriy@ideascup.me>
|
||||
//! Copyright (C) 2022, Dmitriy Pleshevskiy <dmitriy@pleshevski.ru>
|
||||
//!
|
||||
//! vnetod is free software: you can redistribute it and/or modify
|
||||
//! it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//! Copyright (C) 2022, Dmitriy Pleshevskiy <dmitriy@ideascup.me>
|
||||
//! Copyright (C) 2022, Dmitriy Pleshevskiy <dmitriy@pleshevski.ru>
|
||||
//!
|
||||
//! vnetod is free software: you can redistribute it and/or modify
|
||||
//! it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//! Copyright (C) 2022, Dmitriy Pleshevskiy <dmitriy@ideascup.me>
|
||||
//! Copyright (C) 2022, Dmitriy Pleshevskiy <dmitriy@pleshevski.ru>
|
||||
//!
|
||||
//! vnetod is free software: you can redistribute it and/or modify
|
||||
//! it under the terms of the GNU General Public License as published by
|
||||
|
|
Loading…
Reference in New Issue