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" ```
42 lines
1.0 KiB
Nix
42 lines
1.0 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
buildPythonPackage,
|
|
fetchPypi,
|
|
pkgs,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "fusepy";
|
|
version = "3.0.1";
|
|
format = "setuptools";
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
sha256 = "1gg69qfi9pjcic3g98l8ya64rw2vc1bp8gsf76my6gglq8z7izvj";
|
|
};
|
|
|
|
propagatedBuildInputs = [ pkgs.fuse ];
|
|
|
|
# No tests included
|
|
doCheck = false;
|
|
|
|
# On macOS, users are expected to install macFUSE. This means fusepy should
|
|
# be able to find libfuse in /usr/local/lib.
|
|
patchPhase = lib.optionalString (!stdenv.hostPlatform.isDarwin) ''
|
|
substituteInPlace fuse.py --replace \
|
|
"find_library('fuse')" "'${pkgs.fuse}/lib/libfuse.so'"
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Simple ctypes bindings for FUSE";
|
|
longDescription = ''
|
|
Python module that provides a simple interface to FUSE and MacFUSE.
|
|
It's just one file and is implemented using ctypes.
|
|
'';
|
|
homepage = "https://github.com/terencehonles/fusepy";
|
|
license = licenses.isc;
|
|
platforms = platforms.unix;
|
|
};
|
|
}
|