diff options
| author | Chris Wells <chris@mathematicaster.org> | 2026-10-28 17:42:00 -0400 |
|---|---|---|
| committer | Chris Wells <chris@mathematicaster.org> | 2026-10-28 17:42:00 -0400 |
| commit | fa6302b58e11680e8ef36d0def6acb179393c0bc (patch) | |
| tree | fb3a9e66dc5065cdfce6f50652f9e2f428fd384e /modules/main.nix | |
| parent | b87ced9a95fd0de4e3631e67cc5a7a929adee464 (diff) | |
| download | ko-manager-fa6302b58e11680e8ef36d0def6acb179393c0bc.tar ko-manager-fa6302b58e11680e8ef36d0def6acb179393c0bc.tar.gz ko-manager-fa6302b58e11680e8ef36d0def6acb179393c0bc.tar.bz2 ko-manager-fa6302b58e11680e8ef36d0def6acb179393c0bc.tar.lz ko-manager-fa6302b58e11680e8ef36d0def6acb179393c0bc.tar.xz ko-manager-fa6302b58e11680e8ef36d0def6acb179393c0bc.tar.zst ko-manager-fa6302b58e11680e8ef36d0def6acb179393c0bc.zip | |
Diffstat (limited to 'modules/main.nix')
| -rw-r--r-- | modules/main.nix | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/modules/main.nix b/modules/main.nix index 974f599..cd5262a 100644 --- a/modules/main.nix +++ b/modules/main.nix @@ -36,9 +36,35 @@ with builtins // lib; RSYNC="rsync -a --copy-links -v" $RSYNC "${config.koreader.basePackage}/" "$out/" - $RSYNC "${config._files}/" "$out/${config.koreaderPath}/" + $RSYNC "${config._files}/" "$out/${config.koreader.koreaderPath}/" ''; }; + finalPackageTar = mkOption { + type = types.path; + readOnly = true; + default = pkgs.runCommandLocal "tar" { nativeBuildInputs = [ pkgs.tar ]; } '' + cd "${config.koreader.finalPackage}" + tar cvf "$out" . + ''; + }; + deploy = mkOption { + type = types.package; + readOnly = true; + default = pkgs.writeShellApplication { + name = "deploy"; + runtimeInputs = [ pkgs.tar ]; + text = '' + DESTINATION="''${1-}" + + if [ -z "$DESTINATION" ]; then + echo "Must include a destination" + exit 1 + fi + + tar xvf "${config.koreader.finalPackageTar}" --directory "$DESTINATION" + ''; + }; + }; }; }; |
