push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,82 @@
{
lib,
stdenv,
replaceVars,
autoreconfHook,
pkg-config,
fetchurl,
python3,
dropbox,
gtk4,
nautilus,
gdk-pixbuf,
gobject-introspection,
}:
let
version = "2024.04.17";
dropboxd = "${dropbox}/bin/dropbox";
in
stdenv.mkDerivation {
pname = "dropbox-cli";
inherit version;
outputs = [
"out"
"nautilusExtension"
];
src = fetchurl {
url = "https://linux.dropbox.com/packages/nautilus-dropbox-${version}.tar.bz2";
hash = "sha256-pqCYzxaqR0f0CBaseT1Z436K47cIDQswYR1sK4Zj8sE=";
};
strictDeps = true;
patches = [
(replaceVars ./fix-cli-paths.patch {
inherit dropboxd;
# patch context
DESKTOP_FILE_DIR = null;
})
];
nativeBuildInputs = [
autoreconfHook
pkg-config
gobject-introspection
gdk-pixbuf
# only for build, the install command also wants to use GTK through introspection
# but we are using Nix for installation so we will not need that.
(python3.withPackages (
ps: with ps; [
docutils
pygobject3
]
))
];
buildInputs = [
python3
gtk4
nautilus
];
configureFlags = [
"--with-nautilus-extension-dir=${placeholder "nautilusExtension"}/lib/nautilus/extension-4"
];
makeFlags = [
"EMBLEM_DIR=${placeholder "nautilusExtension"}/share/nautilus-dropbox/emblems"
];
meta = {
homepage = "https://www.dropbox.com";
description = "Command line client for the dropbox daemon";
license = lib.licenses.gpl3Plus;
mainProgram = "dropbox";
maintainers = [ ];
# NOTE: Dropbox itself only works on linux, so this is ok.
platforms = lib.platforms.linux;
};
}

View File

@@ -0,0 +1,141 @@
{
stdenv,
lib,
buildFHSEnv,
writeScript,
makeDesktopItem,
}:
# Dropbox client to bootstrap installation.
# The client is self-updating, so the actual version may be newer.
let
version =
{
x86_64-linux = "217.4.4417";
i686-linux = "206.3.6386";
}
.${stdenv.hostPlatform.system} or "";
arch =
{
x86_64-linux = "x86_64";
i686-linux = "x86";
}
.${stdenv.hostPlatform.system};
installer = "https://clientupdates.dropboxstatic.com/dbx-releng/client/dropbox-lnx.${arch}-${version}.tar.gz";
desktopItem = makeDesktopItem {
name = "dropbox";
exec = "dropbox";
comment = "Sync your files across computers and to the web";
desktopName = "Dropbox";
genericName = "File Synchronizer";
categories = [
"Network"
"FileTransfer"
];
startupNotify = false;
icon = "dropbox";
};
in
buildFHSEnv {
inherit version;
pname = "dropbox";
# The dropbox-cli command `dropbox start` starts the dropbox daemon in a
# separate session, and wants the daemon to outlive the launcher. Enabling
# `--die-with-parent` defeats this and causes the daemon to exit when
# dropbox-cli exits.
dieWithParent = false;
# dropbox-cli (i.e. nautilus-dropbox) needs the PID to confirm dropbox is running.
# Dropbox's internal limit-to-one-instance check also relies on the PID.
unsharePid = false;
targetPkgs =
pkgs:
with pkgs;
with xorg;
[
libICE
libSM
libX11
libXcomposite
libXdamage
libXext
libXfixes
libXrender
libXmu
libXxf86vm
libGL
libxcb
xkeyboardconfig
curl
dbus
firefox-bin
fontconfig
freetype
gcc
glib
gnutar
gtk3
libxml2
libxslt
procps
zlib
libgbm
libxshmfence
libpthreadstubs
libappindicator
];
extraInstallCommands = ''
mkdir -p "$out/share/applications"
cp "${desktopItem}/share/applications/"* $out/share/applications
'';
runScript = writeScript "install-and-start-dropbox" ''
export BROWSER=firefox
set -e
do_install=
if ! [ -d "$HOME/.dropbox-dist" ]; then
do_install=1
else
installed_version=$(cat "$HOME/.dropbox-dist/VERSION")
latest_version=$(printf "${version}\n$installed_version\n" | sort -rV | head -n 1)
if [ "x$installed_version" != "x$latest_version" ]; then
do_install=1
fi
fi
if [ -n "$do_install" ]; then
installer=$(mktemp)
# Dropbox is not installed.
# Download and unpack the client. If a newer version is available,
# the client will update itself when run.
curl '${installer}' >"$installer"
pkill dropbox || true
rm -fr "$HOME/.dropbox-dist"
tar -C "$HOME" -x -z -f "$installer"
rm "$installer"
fi
exec "$HOME/.dropbox-dist/dropboxd" "$@"
'';
meta = {
description = "Online stored folders (daemon version)";
homepage = "https://www.dropbox.com/";
license = lib.licenses.unfree;
maintainers = with lib.maintainers; [ ttuegel ];
platforms = [
"i686-linux"
"x86_64-linux"
];
mainProgram = "dropbox";
};
}

View File

@@ -0,0 +1,11 @@
--- a/dropbox.in
+++ b/dropbox.in
@@ -71,7 +71,7 @@
PARENT_DIR = os.path.expanduser("~")
DROPBOX_DIST_PATH = "%s/.dropbox-dist" % PARENT_DIR
-DROPBOXD_PATH = os.path.join(DROPBOX_DIST_PATH, "dropboxd")
+DROPBOXD_PATH = "@dropboxd@"
DESKTOP_FILE = "@DESKTOP_FILE_DIR@/dropbox.desktop"
enc = locale.getpreferredencoding()