mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-01 19:33:03 +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" ```
66 lines
1.4 KiB
Nix
66 lines
1.4 KiB
Nix
{ stdenv
|
|
, lib
|
|
, fetchFromGitHub
|
|
, cmake
|
|
, ninja
|
|
, qttools
|
|
, qtwebengine
|
|
, wrapQtAppsHook
|
|
}:
|
|
|
|
let
|
|
eb = fetchFromGitHub {
|
|
owner = "mvf";
|
|
repo = "eb";
|
|
rev = "58e1c3bb9847ed5d05863f478f21e7a8ca3d74c8";
|
|
hash = "sha256-gZP+2P6fFADWht2c0hXmljVJQX8RpCq2mWP+KDi+GzE=";
|
|
};
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
|
pname = "qolibri";
|
|
version = "2.1.5-unstable-2024-03-17";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "mvf";
|
|
repo = "qolibri";
|
|
rev = "99f0771184fcb2c5f47aad11c16002ebb8469a3f";
|
|
hash = "sha256-ArupqwejOO2YK9a3Ky0j20dIHs1jIqJksNIb4K2jwgI=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
cmake
|
|
ninja
|
|
qttools
|
|
wrapQtAppsHook
|
|
];
|
|
|
|
buildInputs = [
|
|
qtwebengine
|
|
];
|
|
|
|
cmakeFlags = [
|
|
"-DQOLIBRI_EB_SOURCE_DIR=${eb}"
|
|
];
|
|
|
|
postInstall = ''
|
|
install -Dm644 $src/qolibri.desktop -t $out/share/applications
|
|
|
|
for size in 16 32 48 64 128; do
|
|
install -Dm644 \
|
|
$src/images/qolibri-$size.png \
|
|
$out/share/icons/hicolor/''${size}x''${size}/apps/qolibri.png
|
|
done
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "EPWING reader for viewing Japanese dictionaries";
|
|
homepage = "https://github.com/mvf/qolibri";
|
|
license = licenses.gpl2;
|
|
maintainers = with maintainers; [ azahi ];
|
|
platforms = platforms.unix;
|
|
broken = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64; # Looks like a libcxx version mismatch problem.
|
|
mainProgram = "qolibri";
|
|
};
|
|
}
|