mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-11 22:54:17 +00:00
![Artturin](/assets/img/avatar_default.png)
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" ```
39 lines
897 B
Nix
39 lines
897 B
Nix
{
|
|
rustPlatform,
|
|
lib,
|
|
fetchFromGitHub,
|
|
darwin,
|
|
openssl,
|
|
pkg-config,
|
|
stdenv,
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "gitlab-ci-ls";
|
|
version = "0.21.2";
|
|
src = fetchFromGitHub {
|
|
owner = "alesbrelih";
|
|
repo = "gitlab-ci-ls";
|
|
rev = "${version}";
|
|
hash = "sha256-wkL6ko43oWrpyscEpCMuoFamDMJk9+xI3qYOs+DgI8g=";
|
|
};
|
|
|
|
cargoHash = "sha256-H/p29QbCaZRa81g+5eUsG47tUJPVgB1J9zZYY5/n5Vk=";
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
buildInputs =
|
|
[ openssl ]
|
|
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
|
darwin.apple_sdk.frameworks.SystemConfiguration
|
|
];
|
|
|
|
meta = with lib; {
|
|
homepage = "https://github.com/alesbrelih/gitlab-ci-ls";
|
|
description = "GitLab CI Language Server (gitlab-ci-ls)";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ ma27 ];
|
|
platforms = platforms.unix;
|
|
mainProgram = "gitlab-ci-ls";
|
|
};
|
|
}
|