mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-11 08:13:04 +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" ```
73 lines
1.6 KiB
Nix
73 lines
1.6 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchpatch
|
|
, fetchFromGitHub
|
|
, buildPythonApplication
|
|
, click
|
|
, pydantic
|
|
, toml
|
|
, watchdog
|
|
, pytestCheckHook
|
|
, pytest-cov-stub
|
|
, rsync
|
|
}:
|
|
|
|
buildPythonApplication rec {
|
|
pname = "remote-exec";
|
|
version = "1.13.3";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "remote-cli";
|
|
repo = "remote";
|
|
rev = "refs/tags/v${version}";
|
|
hash = "sha256-rsboHJLOHXnpXtsVsvsfKsav8mSbloaq2lzZnU2pw6c=";
|
|
};
|
|
|
|
patches = [
|
|
# relax install requirements
|
|
# https://github.com/remote-cli/remote/pull/60.patch
|
|
(fetchpatch {
|
|
url = "https://github.com/remote-cli/remote/commit/a2073c30c7f576ad7ceb46e39f996de8d06bf186.patch";
|
|
hash = "sha256-As0j+yY6LamhOCGFzvjUQoXFv46BN/tRBpvIS7r6DaI=";
|
|
})
|
|
];
|
|
|
|
# remove legacy endpoints, we use --multi now
|
|
postPatch = ''
|
|
substituteInPlace setup.py \
|
|
--replace-fail '"mremote' '#"mremote'
|
|
'';
|
|
|
|
dependencies = [
|
|
click
|
|
pydantic
|
|
toml
|
|
watchdog
|
|
];
|
|
|
|
doCheck = true;
|
|
|
|
nativeCheckInputs = [
|
|
rsync
|
|
];
|
|
|
|
checkInputs = [
|
|
pytestCheckHook
|
|
pytest-cov-stub
|
|
];
|
|
|
|
disabledTestPaths = lib.optionals stdenv.hostPlatform.isDarwin [
|
|
# `watchdog` dependency does not correctly detect fsevents on darwin.
|
|
# this only affects `remote --stream-changes`
|
|
"test/test_file_changes.py"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Work with remote hosts seamlessly via rsync and ssh";
|
|
homepage = "https://github.com/remote-cli/remote";
|
|
changelog = "https://github.com/remote-cli/remote/releases/tag/v${version}";
|
|
license = licenses.bsd2;
|
|
maintainers = with maintainers; [ pbsds ];
|
|
};
|
|
}
|