mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-19 10:34:54 +00:00

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
794 B
Nix
42 lines
794 B
Nix
{ buildNpmPackage
|
|
, darwin
|
|
, fetchFromGitHub
|
|
, lib
|
|
, python3
|
|
, stdenv
|
|
}:
|
|
|
|
buildNpmPackage rec {
|
|
pname = "nest-cli";
|
|
version = "10.4.5";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "nestjs";
|
|
repo = pname;
|
|
rev = version;
|
|
hash = "sha256-F/Oi7ra+UE4YKXHZalH5qFk4coaGfHRpWaxamYunRuw=";
|
|
};
|
|
|
|
npmDepsHash = "sha256-6yh8TKfq3fuq4QcnA4uM49/G0Kp1sccRyTcV5s9dVck=";
|
|
|
|
env = {
|
|
npm_config_build_from_source = true;
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
python3
|
|
];
|
|
|
|
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
|
|
darwin.apple_sdk.frameworks.CoreServices
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "CLI tool for Nest applications";
|
|
homepage = "https://nestjs.com";
|
|
license = licenses.mit;
|
|
mainProgram = "nest";
|
|
maintainers = [ maintainers.ehllie ];
|
|
};
|
|
}
|