Merge pull request #20356 from gnidorah/master3
yandex-disk: 0.1.5.948 -> 0.1.5.978, yandex-disk service: add exclude-dirs option
This commit is contained in:
commit
1c3b496f0d
@ -55,6 +55,15 @@ in
|
|||||||
description = "The directory to use for Yandex.Disk storage";
|
description = "The directory to use for Yandex.Disk storage";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
excludes = mkOption {
|
||||||
|
default = "";
|
||||||
|
type = types.string;
|
||||||
|
example = "data,backup";
|
||||||
|
description = ''
|
||||||
|
Comma-separated list of directories which are excluded from synchronization.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
@ -86,7 +95,7 @@ in
|
|||||||
chown ${u} ${dir}
|
chown ${u} ${dir}
|
||||||
|
|
||||||
if ! test -d "${cfg.directory}" ; then
|
if ! test -d "${cfg.directory}" ; then
|
||||||
mkdir -p -m 755 ${cfg.directory} ||
|
(mkdir -p -m 755 ${cfg.directory} && chown ${u} ${cfg.directory}) ||
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -94,7 +103,7 @@ in
|
|||||||
-c '${pkgs.yandex-disk}/bin/yandex-disk token -p ${cfg.password} ${cfg.username} ${dir}/token'
|
-c '${pkgs.yandex-disk}/bin/yandex-disk token -p ${cfg.password} ${cfg.username} ${dir}/token'
|
||||||
|
|
||||||
${pkgs.su}/bin/su -s ${pkgs.stdenv.shell} ${u} \
|
${pkgs.su}/bin/su -s ${pkgs.stdenv.shell} ${u} \
|
||||||
-c '${pkgs.yandex-disk}/bin/yandex-disk start --no-daemon -a ${dir}/token -d ${cfg.directory}'
|
-c '${pkgs.yandex-disk}/bin/yandex-disk start --no-daemon -a ${dir}/token -d ${cfg.directory} --exclude-dirs=${cfg.excludes}'
|
||||||
'';
|
'';
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -6,18 +6,18 @@ let
|
|||||||
p = if stdenv.is64bit then {
|
p = if stdenv.is64bit then {
|
||||||
arch = "x86_64";
|
arch = "x86_64";
|
||||||
gcclib = "${stdenv.cc.cc.lib}/lib64";
|
gcclib = "${stdenv.cc.cc.lib}/lib64";
|
||||||
sha256 = "0k05ybvnv0zx4vfx55jyhia38qqysaj68mapq0gwgf74k3a943g2";
|
sha256 = "1skbzmrcjbw00a3jnbl2llqwz3ahsgvq74mjav68s2hw1wjidvk6";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
arch = "i386";
|
arch = "i386";
|
||||||
gcclib = "${stdenv.cc.cc.lib}/lib";
|
gcclib = "${stdenv.cc.cc.lib}/lib";
|
||||||
sha256 = "09z9idmp7idcq0alwkla9kal9h82dx11jqh678lc4rviqggxzxhp";
|
sha256 = "09h71i3k9d24ki81jdwhnav63fqbc44glbx228s9g3cr4ap41jcx";
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
|
|
||||||
name = "yandex-disk-${version}";
|
name = "yandex-disk-${version}";
|
||||||
version = "0.1.5.948";
|
version = "0.1.5.978";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "http://repo.yandex.ru/yandex-disk/rpm/stable/${p.arch}/${name}-1.fedora.${p.arch}.rpm";
|
url = "http://repo.yandex.ru/yandex-disk/rpm/stable/${p.arch}/${name}-1.fedora.${p.arch}.rpm";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user