mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-28 16:43:58 +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" ```
38 lines
1.1 KiB
Nix
38 lines
1.1 KiB
Nix
{ lib, fetchFromGitHub, python3Packages, wmctrl, qtbase, mkDerivationWith }:
|
|
|
|
{
|
|
stable = throw "plover.stable was removed because it used Python 2. Use plover.dev instead."; # added 2022-06-05
|
|
|
|
dev = with python3Packages; mkDerivationWith buildPythonPackage rec {
|
|
pname = "plover";
|
|
version = "4.0.0.dev10";
|
|
|
|
meta = with lib; {
|
|
broken = stdenv.hostPlatform.isDarwin;
|
|
description = "OpenSteno Plover stenography software";
|
|
maintainers = with maintainers; [ twey kovirobi ];
|
|
license = licenses.gpl2;
|
|
};
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "openstenoproject";
|
|
repo = "plover";
|
|
rev = "v${version}";
|
|
sha256 = "sha256-oJ7+R3ZWhUbNTTAw1AfMg2ur8vW1XEbsa5FgSTam1Ns=";
|
|
};
|
|
|
|
# I'm not sure why we don't find PyQt5 here but there's a similar
|
|
# sed on many of the platforms Plover builds for
|
|
postPatch = "sed -i /PyQt5/d setup.cfg";
|
|
|
|
nativeCheckInputs = [ pytest mock ];
|
|
propagatedBuildInputs = [ babel pyqt5 xlib pyserial appdirs wcwidth setuptools ];
|
|
|
|
dontWrapQtApps = true;
|
|
|
|
preFixup = ''
|
|
makeWrapperArgs+=("''${qtWrapperArgs[@]}")
|
|
'';
|
|
};
|
|
}
|