e0464e4788
In preparation for the deprecation of `stdenv.isX`. These shorthands are not conducive to cross-compilation because they hide the platforms. Darwin might get cross-compilation for which the continued usage of `stdenv.isDarwin` will get in the way One example of why this is bad and especially affects compiler packages https://www.github.com/NixOS/nixpkgs/pull/343059 There are too many files to go through manually but a treewide should get users thinking when they see a `hostPlatform.isX` in a place where it doesn't make sense. ``` fd --type f "\.nix" | xargs sd --fixed-strings "stdenv.is" "stdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "stdenv'.is" "stdenv'.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "clangStdenv.is" "clangStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "gccStdenv.is" "gccStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "stdenvNoCC.is" "stdenvNoCC.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "inherit (stdenv) is" "inherit (stdenv.hostPlatform) is" fd --type f "\.nix" | xargs sd --fixed-strings "buildStdenv.is" "buildStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "effectiveStdenv.is" "effectiveStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "originalStdenv.is" "originalStdenv.hostPlatform.is" ```
58 lines
1.2 KiB
Nix
58 lines
1.2 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchFromGitHub
|
|
, pkg-config
|
|
, cmake
|
|
, extra-cmake-modules
|
|
, qt6
|
|
, qt6Packages
|
|
, sqlite
|
|
, libsecret
|
|
, libre-graph-api-cpp-qt-client
|
|
, kdsingleapplication
|
|
# darwin only:
|
|
, libinotify-kqueue
|
|
, sparkleshare
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "owncloud-client";
|
|
version = "5.3.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "owncloud";
|
|
repo = "client";
|
|
rev = "refs/tags/v${version}";
|
|
hash = "sha256-ot+2hxipeZ5eI6nPJ8XGE8gFMNQoblUq+koAFZpZDv4=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
pkg-config
|
|
cmake
|
|
extra-cmake-modules
|
|
qt6.qttools
|
|
qt6.wrapQtAppsHook
|
|
];
|
|
|
|
buildInputs = [
|
|
sqlite
|
|
libsecret
|
|
qt6.qtbase
|
|
qt6.qtsvg # Needed for the systray icon
|
|
qt6Packages.qtkeychain
|
|
libre-graph-api-cpp-qt-client
|
|
kdsingleapplication
|
|
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
|
|
libinotify-kqueue sparkleshare
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Synchronise your ownCloud with your computer using this desktop client";
|
|
homepage = "https://owncloud.org";
|
|
maintainers = with maintainers; [ qknight hellwolf ];
|
|
platforms = platforms.unix;
|
|
license = licenses.gpl2Plus;
|
|
changelog = "https://github.com/owncloud/client/releases/tag/v${version}";
|
|
};
|
|
}
|