mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-19 03:14: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" ```
44 lines
896 B
Nix
44 lines
896 B
Nix
{ lib
|
|
, rustPlatform
|
|
, fetchFromGitHub
|
|
, llvmPackages_13
|
|
, libxml2
|
|
, ncurses
|
|
, zlib
|
|
, stdenv
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "bfc";
|
|
version = "1.12.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "Wilfred";
|
|
repo = "bfc";
|
|
rev = version;
|
|
hash = "sha256-5pcvwCtXWEexvV3TS62dZ6Opg8ANP2L8B0Z8u/OQENU=";
|
|
};
|
|
|
|
cargoHash = "sha256-1w/jPBO1TZpa0ju+O/NxQ/oMyzIvYVoXpj+ZLcIpQoU=";
|
|
|
|
buildInputs = [
|
|
libxml2
|
|
ncurses
|
|
zlib
|
|
];
|
|
|
|
env.LLVM_SYS_130_PREFIX = llvmPackages_13.llvm.dev;
|
|
|
|
# process didn't exit successfully: <...> SIGSEGV
|
|
doCheck = false;
|
|
|
|
meta = with lib; {
|
|
description = "Industrial-grade brainfuck compiler";
|
|
mainProgram = "bfc";
|
|
homepage = "https://bfc.wilfred.me.uk";
|
|
license = licenses.gpl2Plus;
|
|
maintainers = with maintainers; [ figsoda ];
|
|
broken = stdenv.hostPlatform.isAarch64 && stdenv.hostPlatform.isLinux;
|
|
};
|
|
}
|