mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-23 21:33:49 +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" ```
43 lines
1.1 KiB
Nix
43 lines
1.1 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchFromGitHub
|
|
, autoreconfHook
|
|
, fuse
|
|
, git
|
|
}:
|
|
|
|
stdenv.mkDerivation {
|
|
pname = "aefs";
|
|
version = "unstable-2015-05-06";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "edolstra";
|
|
repo = "aefs";
|
|
rev = "e7a9bf8cfa9166668fe1514cc1afd31fc4e10e9a";
|
|
hash = "sha256-a3YQWxJ7+bYhf1W1kdIykV8U1R4dcDZJ7K3NvNxbF0s=";
|
|
};
|
|
|
|
# autoconf's AC_CHECK_HEADERS and AC_CHECK_LIBS fail to detect libfuse on
|
|
# Darwin if FUSE_USE_VERSION isn't set at configure time.
|
|
#
|
|
# NOTE: Make sure the value of FUSE_USE_VERSION specified here matches the
|
|
# actual version used in the source code:
|
|
#
|
|
# $ tar xf "$(nix-build -A aefs.src)"
|
|
# $ grep -R FUSE_USE_VERSION
|
|
configureFlags = lib.optional stdenv.hostPlatform.isDarwin "CPPFLAGS=-DFUSE_USE_VERSION=26";
|
|
|
|
nativeBuildInputs = [ autoreconfHook git ];
|
|
|
|
buildInputs = [ fuse ];
|
|
|
|
meta = with lib; {
|
|
homepage = "https://github.com/edolstra/aefs";
|
|
description = "Cryptographic filesystem implemented in userspace using FUSE";
|
|
maintainers = [ ];
|
|
license = licenses.gpl2Plus;
|
|
platforms = platforms.unix;
|
|
broken = stdenv.hostPlatform.isDarwin;
|
|
};
|
|
}
|