mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-08 05:54:24 +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, rustPlatform, fetchFromGitHub, pkg-config, openssl, stdenv, Security }:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "zee";
|
|
version = "0.3.2";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "zee-editor";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
sha256 = "sha256-/9SogKOaXdFDB+e0//lrenTTbfmXqNFGr23L+6Pnm8w=";
|
|
};
|
|
|
|
cargoPatches = [
|
|
# fixed upstream but unreleased
|
|
./update-ropey-for-rust-1.65.diff
|
|
];
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
buildInputs = [ openssl ] ++ lib.optional stdenv.hostPlatform.isDarwin Security;
|
|
|
|
# disable downloading and building the tree-sitter grammars at build time
|
|
# grammars can be configured in a config file and installed with `zee --build`
|
|
# see https://github.com/zee-editor/zee#syntax-highlighting
|
|
ZEE_DISABLE_GRAMMAR_BUILD=1;
|
|
|
|
cargoHash = "sha256-fBBjtjM7AnyAL6EOFstL4h6yS+UoLgxck6Mc0tJcXaI=";
|
|
|
|
meta = with lib; {
|
|
description = "Modern text editor for the terminal written in Rust";
|
|
homepage = "https://github.com/zee-editor/zee";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ booklearner ];
|
|
mainProgram = "zee";
|
|
};
|
|
}
|