Add Nix derivation
This commit is contained in:
parent
ee9d8972e0
commit
162486191c
21
README.md
21
README.md
|
@ -22,23 +22,10 @@ This program is heavily inspired by Shotwell's backup feature. I actually used t
|
|||
|
||||
## Usage
|
||||
|
||||
Overall:
|
||||
Send the files you want to backup via stdin, then point picobak to the directory where you archive your pictures:
|
||||
|
||||
E.G:
|
||||
|
||||
```txt
|
||||
Usage: pictures-backup [OPTIONS] <BACKUP_ROOT> <FILE_PATH>
|
||||
|
||||
Arguments:
|
||||
<BACKUP_ROOT> Pictures library directory
|
||||
<FILE_PATH> Picture to backup
|
||||
|
||||
Options:
|
||||
-d, --dry-run Do not create any directory or copy any file. Only prints out the operations it would perform
|
||||
-h, --help Print help
|
||||
-V, --version Print version
|
||||
```
|
||||
|
||||
For instance:
|
||||
|
||||
```txt
|
||||
ls dir-containing-pictures/* | picobak /my/pic-backup-root/
|
||||
ls /tmp/Sync2/* | picobak ~/nas/Photos-Video
|
||||
```
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
{ pkgs ? import <nixpkgs> {}, lib ? pkgs.lib }:
|
||||
|
||||
pkgs.rustPlatform.buildRustPackage {
|
||||
pname = "picobak";
|
||||
version = "0.1.0";
|
||||
src = lib.cleanSource ./.;
|
||||
cargoHash = "sha256-gytrsYdL9WuxJDZBaK/w+1KLmAKKBD711efHTzQqs4o=";
|
||||
meta = {
|
||||
description = "Backup and organize your pictures library";
|
||||
};
|
||||
}
|
|
@ -15,7 +15,8 @@ use rayon::prelude::*;
|
|||
struct CliArgs {
|
||||
/// Pictures library directory
|
||||
backup_root: String,
|
||||
/// Picture to backup
|
||||
/// Picture to backup. Alternatively, you can send a list of
|
||||
/// pictures to backup via stdin.
|
||||
file_path: Option<String>,
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue