at master 1.7 kB view raw
1{ 2 lib, 3 stdenv, 4 replaceVars, 5 autoreconfHook, 6 pkg-config, 7 fetchurl, 8 python3, 9 dropbox, 10 gtk4, 11 nautilus, 12 gdk-pixbuf, 13 gobject-introspection, 14}: 15 16let 17 version = "2024.04.17"; 18 dropboxd = "${dropbox}/bin/dropbox"; 19in 20stdenv.mkDerivation { 21 pname = "dropbox-cli"; 22 inherit version; 23 24 outputs = [ 25 "out" 26 "nautilusExtension" 27 ]; 28 29 src = fetchurl { 30 url = "https://linux.dropbox.com/packages/nautilus-dropbox-${version}.tar.bz2"; 31 hash = "sha256-pqCYzxaqR0f0CBaseT1Z436K47cIDQswYR1sK4Zj8sE="; 32 }; 33 34 strictDeps = true; 35 36 patches = [ 37 (replaceVars ./fix-cli-paths.patch { 38 inherit dropboxd; 39 # patch context 40 DESKTOP_FILE_DIR = null; 41 }) 42 ]; 43 44 nativeBuildInputs = [ 45 autoreconfHook 46 pkg-config 47 gobject-introspection 48 gdk-pixbuf 49 # only for build, the install command also wants to use GTK through introspection 50 # but we are using Nix for installation so we will not need that. 51 (python3.withPackages ( 52 ps: with ps; [ 53 docutils 54 pygobject3 55 ] 56 )) 57 ]; 58 59 buildInputs = [ 60 python3 61 gtk4 62 nautilus 63 ]; 64 65 configureFlags = [ 66 "--with-nautilus-extension-dir=${placeholder "nautilusExtension"}/lib/nautilus/extension-4" 67 ]; 68 69 makeFlags = [ 70 "EMBLEM_DIR=${placeholder "nautilusExtension"}/share/nautilus-dropbox/emblems" 71 ]; 72 73 meta = { 74 homepage = "https://www.dropbox.com"; 75 description = "Command line client for the dropbox daemon"; 76 license = lib.licenses.gpl3Plus; 77 mainProgram = "dropbox"; 78 maintainers = with lib.maintainers; [ ]; 79 # NOTE: Dropbox itself only works on linux, so this is ok. 80 platforms = lib.platforms.linux; 81 }; 82}