mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-28 08:33:54 +00:00
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" ```
71 lines
1.5 KiB
Nix
71 lines
1.5 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchFromGitHub
|
|
, fetchpatch
|
|
, cmake
|
|
, magic-enum
|
|
, range-v3
|
|
, spdlog
|
|
, qtbase
|
|
, qtconnectivity
|
|
, qttools
|
|
, qtlanguageserver
|
|
, qtwayland
|
|
, wrapQtAppsHook
|
|
, libXScrnSaver
|
|
, nix-update-script
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "kemai";
|
|
version = "0.10.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "AlexandrePTJ";
|
|
repo = "kemai";
|
|
rev = version;
|
|
hash = "sha256-wclBAgeDyAIw/nGF6lzIwbwdoZMBTu+tjxsnIxIkODM=";
|
|
};
|
|
|
|
patches = [
|
|
# Backport the fix for an issue where LICENSE.txt ends up in /bin
|
|
# Remove in next release
|
|
(fetchpatch {
|
|
url = "https://github.com/AlexandrePTJ/kemai/commit/e279679dd7308efebe004252d168d7308f3b99ce.patch";
|
|
hash = "sha256-5cmRRMVATf4ul4HhaQKiE0yTN2qd+MfNFQzGTLLpOyg=";
|
|
})
|
|
];
|
|
|
|
buildInputs = [
|
|
qtbase
|
|
qtconnectivity
|
|
qttools
|
|
qtlanguageserver
|
|
libXScrnSaver
|
|
magic-enum
|
|
range-v3
|
|
spdlog
|
|
] ++ lib.optional stdenv.hostPlatform.isLinux qtwayland;
|
|
cmakeFlags = [
|
|
"-DFETCHCONTENT_FULLY_DISCONNECTED=ON"
|
|
"-DFETCHCONTENT_QUIET=OFF"
|
|
"-DFETCHCONTENT_TRY_FIND_PACKAGE_MODE=ALWAYS"
|
|
];
|
|
|
|
nativeBuildInputs = [ cmake wrapQtAppsHook ];
|
|
|
|
passthru = {
|
|
updateScript = nix-update-script { };
|
|
};
|
|
|
|
meta = with lib; {
|
|
description = "Kimai desktop client written in QT6";
|
|
homepage = "https://github.com/AlexandrePTJ/kemai";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ poelzi ];
|
|
platforms = platforms.unix;
|
|
broken = stdenv.hostPlatform.isDarwin;
|
|
mainProgram = "Kemai";
|
|
};
|
|
}
|