nixpkgs/pkgs/development/tools/dprint/default.nix
Kenichi Kamiya 57b5518727
dprint: fix build on darwin
https://github.com/dprint/dprint/compare/0.40.2...0.41.0

Build on darwin is broken with following errors since #260107

```
      sysinfo:🍎:disk::get_disks::hf0f5e9ca54811ca0 in libsysinfo-2ada6af970649dda.rlib(sysinfo-2ada6af970649dda.sysinfo.7c30ee2e47e3fa9d-cgu.12.rcgu.o)
  "_kCFURLVolumeAvailableCapacityKey", referenced from:
      _$LT$sysinfo..apple..disk..Disk$u20$as$u20$sysinfo..traits..DiskExt$GT$::refresh::h54fb3881d5127506 in libsysinfo-2ada6af970649dda.rlib(sysinfo-2ada6af970649dda.sysinfo.7c30ee2e47e3fa9d-cgu.12.rcgu.o)
      sysinfo:🍎:disk::get_disks::hf0f5e9ca54811ca0 in libsysinfo-2ada6af970649dda.rlib(sysinfo-2ada6af970649dda.sysinfo.7c30ee2e47e3fa9d-cgu.12.rcgu.o)
ld: symbol(s) not found for architecture x86_64
clang-11: error: linker command failed with exit code 1 (use -v to see invocation)
```
2023-10-15 20:10:23 +09:00

34 lines
1.1 KiB
Nix
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{ lib, stdenv, fetchCrate, rustPlatform, CoreFoundation, Security }:
rustPlatform.buildRustPackage rec {
pname = "dprint";
version = "0.41.0";
src = fetchCrate {
inherit pname version;
sha256 = "sha256-qPyHDQ6KcXwiWlys86L3cnLIxigEkXWD/IkB2+WtOcY=";
};
cargoHash = "sha256-DauLzn+QkqTCPubrtasAZmD3DrIXkHk7zd8g589TCCk=";
buildInputs = lib.optionals stdenv.isDarwin [ CoreFoundation Security ];
# Tests fail because they expect a test WASM plugin. Tests already run for
# every commit upstream on GitHub Actions
doCheck = false;
meta = with lib; {
description = "Code formatting platform written in Rust";
longDescription = ''
dprint is a pluggable and configurable code formatting platform written in Rust.
It offers multiple WASM plugins to support various languages. It's written in
Rust, so its small, fast, and portable.
'';
changelog = "https://github.com/dprint/dprint/releases/tag/${version}";
homepage = "https://dprint.dev";
license = licenses.mit;
maintainers = with maintainers; [ khushraj ];
mainProgram = "dprint";
};
}