commit 16ca4e12fdf4183a10c94f77df4e21325a7a0c85
parent 9be43c719244569f8ac4b4005c4d38f2a1e5b34c
Author: Nikolay Korotkiy <sikmir@gmail.com>
Date: Sat, 8 May 2021 08:28:03 +0300
xtr: fix on darwin
Diffstat:
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/pkgs/default.nix b/pkgs/default.nix
@@ -242,7 +242,9 @@ lib.makeScope newScope (
reproxy = callPackage ./misc/reproxy { };
taskcoach = callPackage ./misc/taskcoach { };
xfractint = callPackage ./misc/xfractint { };
- xtr = callPackage ./misc/xtr { };
+ xtr = callPackage ./misc/xtr {
+ inherit (darwin.apple_sdk.frameworks) Foundation;
+ };
yabai = callPackage ./misc/yabai {
inherit (darwin.apple_sdk.frameworks) Cocoa ScriptingBridge;
};
diff --git a/pkgs/misc/xtr/default.nix b/pkgs/misc/xtr/default.nix
@@ -1,4 +1,4 @@
-{ lib, rustPlatform, fetchFromGitHub }:
+{ lib, stdenv, rustPlatform, fetchFromGitHub, libiconv, Foundation }:
rustPlatform.buildRustPackage rec {
pname = "xtr";
@@ -14,6 +14,10 @@ rustPlatform.buildRustPackage rec {
cargoPatches = [ ./cargo-lock.patch ];
cargoHash = "sha256-6a+n1ApCyfcPQy4wqWNDhXCRGCbJ8BgxHxz/b9uY6Qk=";
+ buildInputs = lib.optionals stdenv.isDarwin [ libiconv Foundation ];
+
+ hardeningDisable = lib.optional stdenv.isDarwin "format";
+
meta = with lib; {
description = "Translation tools for rust";
inherit (src.meta) homepage;