update cloudstation
This commit is contained in:
parent
b8c0044faa
commit
f75cf9bfa9
2 changed files with 59 additions and 94 deletions
|
@ -1,58 +1,51 @@
|
||||||
{ stdenv
|
{ stdenv
|
||||||
, autoPatchelfHook
|
, buildFHSUserEnv
|
||||||
, dbus_libs
|
|
||||||
, dpkg
|
|
||||||
, fetchurl
|
, fetchurl
|
||||||
, fontconfig
|
, lib
|
||||||
, freetype
|
, pkgs
|
||||||
, glib
|
, writeScript
|
||||||
, libICE
|
|
||||||
, libSM
|
|
||||||
, xorg
|
|
||||||
, openssl_1_0_2
|
|
||||||
, openssl
|
|
||||||
, libX11
|
|
||||||
, makeWrapper
|
|
||||||
, sqlite
|
|
||||||
, wrapQtAppsHook
|
|
||||||
, xkeyboard_config
|
|
||||||
, zlib
|
|
||||||
, curl
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
let
|
||||||
name = "cloudstation";
|
|
||||||
version = "4.3.3";
|
version = "4.3.3";
|
||||||
release = "4469";
|
release = "4469";
|
||||||
|
cloudstation = stdenv.mkDerivation rec {
|
||||||
|
name = "cloudstation-unpack";
|
||||||
|
buildInputs = [
|
||||||
|
pkgs.dpkg
|
||||||
|
pkgs.qt5.qtbase
|
||||||
|
];
|
||||||
|
#nativeBuildInputs = [ pkgs.qt5.wrapQtAppsHook ];
|
||||||
|
src = fetchurl {
|
||||||
|
url = "https://global.download.synology.com/download/Tools/CloudStationDrive/${version}-${release}/Ubuntu/Installer/x86_64/synology-cloud-station-drive-${release}.x86_64.deb";
|
||||||
|
sha256 = "0v84yb70knmmjzp7lyn6jgy5bnfsfd47wmqh29phybqg4zk3d47j";
|
||||||
|
};
|
||||||
|
unpackPhase = ''
|
||||||
|
dpkg-deb -x $src .
|
||||||
|
'';
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out/bin
|
||||||
|
cp -R opt/Synology/CloudStation/* $out/
|
||||||
|
ls -lah $out
|
||||||
|
chmod +x $out/lib/*
|
||||||
|
cp $out/lib/plugins/platforms/libqxcb.so $out/lib/plugins/
|
||||||
|
|
||||||
src = fetchurl {
|
# fix xcb plugin
|
||||||
url = "https://global.download.synology.com/download/Tools/CloudStationDrive/${version}-${release}/Ubuntu/Installer/x86_64/synology-cloud-station-drive-${release}.x86_64.deb";
|
echo -e "[Paths]\nPlugins = ${pkgs.qt5.qtbase.bin}/${pkgs.qt5.qtbase.qtPluginPrefix}" > $out/bin/qt.conf
|
||||||
sha256 = "0v84yb70knmmjzp7lyn6jgy5bnfsfd47wmqh29phybqg4zk3d47j";
|
'';
|
||||||
|
dontWrapQtApps = true;
|
||||||
|
#preFixup = ''
|
||||||
|
# wrapQtApp "$out/bin/launcher"
|
||||||
|
#'';
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [
|
|
||||||
dpkg
|
|
||||||
autoPatchelfHook
|
|
||||||
makeWrapper
|
|
||||||
wrapQtAppsHook
|
|
||||||
];
|
|
||||||
buildInputs = [
|
|
||||||
dbus_libs
|
|
||||||
fontconfig
|
|
||||||
freetype
|
|
||||||
glib
|
|
||||||
libICE
|
|
||||||
libSM
|
|
||||||
libX11
|
|
||||||
sqlite
|
|
||||||
stdenv.cc.cc.lib
|
|
||||||
zlib
|
|
||||||
openssl_1_0_2
|
|
||||||
xorg.libxcb
|
|
||||||
curl
|
|
||||||
];
|
|
||||||
|
|
||||||
ldpath = stdenv.lib.makeLibraryPath [
|
in buildFHSUserEnv {
|
||||||
|
name = "cloudstation";
|
||||||
|
|
||||||
|
targetPkgs = pkgs: with pkgs; with xorg; [
|
||||||
|
cloudstation
|
||||||
|
curl
|
||||||
dbus_libs
|
dbus_libs
|
||||||
fontconfig
|
fontconfig
|
||||||
freetype
|
freetype
|
||||||
|
@ -60,53 +53,26 @@ stdenv.mkDerivation rec {
|
||||||
libICE
|
libICE
|
||||||
libSM
|
libSM
|
||||||
libX11
|
libX11
|
||||||
sqlite
|
libxcb
|
||||||
stdenv.cc.cc.lib
|
|
||||||
zlib
|
|
||||||
openssl_1_0_2
|
|
||||||
openssl
|
openssl
|
||||||
xorg.libxcb
|
qt5.qtbase
|
||||||
curl
|
qt5.qttools
|
||||||
|
qt5.qtwayland
|
||||||
|
qt5.qtx11extras
|
||||||
|
sqlite
|
||||||
|
stdenv.cc.cc.lib
|
||||||
|
xkeyboard_config
|
||||||
|
zlib
|
||||||
];
|
];
|
||||||
|
|
||||||
unpackPhase = ''
|
runScript = writeScript "cloudstation" ''
|
||||||
dpkg-deb -x $src .
|
#!/usr/bin/env bash
|
||||||
|
#export QT_PLUGIN_PATH="$QT_PLUGIN_PATH:${cloudstation}/lib/plugins/platforms"
|
||||||
|
export QT_PLUGIN_PATH="${pkgs.qt5.qtbase.bin}/${pkgs.qt5.qtbase.qtPluginPrefix}"
|
||||||
|
${cloudstation}/bin/launcher
|
||||||
|
|
||||||
|
export LD_LIBRARY_PATH="/home/stefan/.CloudStation/CloudStation.app/lib:$LD_LIBRARY_PATH"
|
||||||
|
~/.CloudStation/CloudStation.app/bin/cloud-drive-ui
|
||||||
|
type bash
|
||||||
'';
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
mkdir -p $out/bin
|
|
||||||
cp -R opt $out
|
|
||||||
chmod +x $out/opt/Synology/CloudStation/lib/*
|
|
||||||
|
|
||||||
#ln -s $out/opt/Synology/CloudStation/bin/launcher $out/bin/cloudstation
|
|
||||||
makeWrapper \
|
|
||||||
$out/opt/Synology/CloudStation/bin/launcher \
|
|
||||||
$out/bin/cloudstation \
|
|
||||||
--set QT_PLUGIN_PATH $out/opt/Synology/CloudStationBackup/lib/plugins/platforms \
|
|
||||||
--set QT_XKB_CONFIG_ROOT ${xkeyboard_config}/share/X11/xkb \
|
|
||||||
--set LD_LIBRARY_PATH $out/opt/Synology/CloudStation/lib:${ldpath}
|
|
||||||
|
|
||||||
cat >> $out/bin/usercloudstation <<EOF
|
|
||||||
export QT_PLUGIN_PATH="$out/opt/Synology/CloudStationBackup/lib/plugins/platforms"
|
|
||||||
export QT_XKB_CONFIG_ROOT="${xkeyboard_config}/share/X11/xkb"
|
|
||||||
export LD_LIBRARY_PATH="~/.CloudStation/CloudStation.app/lib/:$out/opt/Synology/CloudStation/lib:${ldpath}"
|
|
||||||
|
|
||||||
bins="cloud-drive-auto-updater cloud-drive-connect cloud-drive-daemon cloud-drive-ui"
|
|
||||||
for file in $bins; do
|
|
||||||
nix-shell \
|
|
||||||
--command "autoPatchelf ~/.CloudStation/CloudStation.app/bin/$file" \
|
|
||||||
-p patchelf autoPatchelfHook
|
|
||||||
done
|
|
||||||
|
|
||||||
QT_QPA_PLATFORM=xcb exec /home/stefan/.CloudStation/CloudStation.app/bin/cloud-drive-ui
|
|
||||||
EOF
|
|
||||||
chmod +x $out/bin/usercloudstation
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
|
||||||
homepage = "https://www.synology.com/de-de/support/download/RS815#utilities";
|
|
||||||
description = "Synology Cloud Station Drive";
|
|
||||||
platforms = platforms.linux;
|
|
||||||
maintainers = with maintainers; [ foosinn ];
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,8 +2,7 @@
|
||||||
|
|
||||||
let
|
let
|
||||||
unstable = import <nixos-unstable> { config.allowUnfree = true; };
|
unstable = import <nixos-unstable> { config.allowUnfree = true; };
|
||||||
cloudstation = pkgs.libsForQt5.callPackage (import ../packages/cloudstation.nix) {};
|
cloudstation = pkgs.callPackage (import ../packages/cloudstation.nix) {};
|
||||||
|
|
||||||
in {
|
in {
|
||||||
|
|
||||||
security.pki.certificateFiles = [
|
security.pki.certificateFiles = [
|
||||||
|
@ -20,9 +19,9 @@ in {
|
||||||
(import ../packages/oc311.nix)
|
(import ../packages/oc311.nix)
|
||||||
(import ../packages/oc46.nix)
|
(import ../packages/oc46.nix)
|
||||||
(import ../packages/openshift-install-4.5.nix)
|
(import ../packages/openshift-install-4.5.nix)
|
||||||
|
cloudstation
|
||||||
astroid
|
astroid
|
||||||
(pkgs.libsForQt5.callPackage (import ../packages/nagstamon.nix) {})
|
(pkgs.libsForQt5.callPackage (import ../packages/nagstamon.nix) {})
|
||||||
cloudstation
|
|
||||||
drone-cli
|
drone-cli
|
||||||
govc
|
govc
|
||||||
go-jira
|
go-jira
|
||||||
|
@ -32,6 +31,6 @@ in {
|
||||||
unstable.discord
|
unstable.discord
|
||||||
|
|
||||||
unstable.obs-studio
|
unstable.obs-studio
|
||||||
unstable.obs-wlrobs
|
unstable.obs-studio-plugins.wlrobs
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue