fclones: add support for Darwin builds

This commit is contained in:
Harsh Shandilya 2021-09-11 03:43:40 +05:30
parent b6d412f102
commit b2ec5cb0bd
No known key found for this signature in database
GPG key ID: 366D7BBAD1031E80
2 changed files with 15 additions and 7 deletions

View file

@ -1,4 +1,9 @@
{ lib, stdenv, rustPlatform, fetchFromGitHub, pkg-config, udev }:
{ lib, stdenv
, fetchFromGitHub
, libiconv
, rustPlatform
, AppKit
}:
rustPlatform.buildRustPackage rec {
pname = "fclones";
@ -13,12 +18,13 @@ rustPlatform.buildRustPackage rec {
cargoSha256 = "sha256-5qX45FJFaiE1vTXjllM9U1w57MX18GgKEFOEBMc64Jk=";
nativeBuildInputs = [ pkg-config ];
buildInputs = [ udev ];
buildInputs = lib.optionals stdenv.isDarwin [
AppKit
libiconv
];
# tests in dedupe.rs fail due to
# "creation time is not available for the filesystem"
doCheck = false;
# device::test_physical_device_name test fails on Darwin
doCheck = !stdenv.isDarwin;
meta = with lib; {
description = "Efficient Duplicate File Finder and Remover";

View file

@ -24738,7 +24738,9 @@ with pkgs;
fbida = callPackage ../applications/graphics/fbida { };
fclones = callPackage ../tools/misc/fclones { };
fclones = callPackage ../tools/misc/fclones {
inherit (darwin.apple_sdk.frameworks) AppKit;
};
fcp = callPackage ../tools/misc/fcp { };