diff options
author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2023-01-27 00:02:25 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-27 00:02:25 +0000 |
commit | 2a8fae3ee59a38a31dfe388bd873772f47e00a5b (patch) | |
tree | 2dd9d3b0594af505e95eac57f4e289f5a267129f /pkgs/tools | |
parent | 578f1ba854d2c4d5a628c2749558e89dd38359eb (diff) | |
parent | 32e7d3f420607c2d7f9fe66fdd945a2f95c7fded (diff) |
Merge master into staging-next
Diffstat (limited to 'pkgs/tools')
-rw-r--r-- | pkgs/tools/misc/krunner-translator/default.nix | 54 | ||||
-rw-r--r-- | pkgs/tools/package-management/nix/default.nix | 13 | ||||
-rw-r--r-- | pkgs/tools/text/hck/default.nix | 21 |
3 files changed, 70 insertions, 18 deletions
diff --git a/pkgs/tools/misc/krunner-translator/default.nix b/pkgs/tools/misc/krunner-translator/default.nix new file mode 100644 index 0000000000000..c97428b9469c9 --- /dev/null +++ b/pkgs/tools/misc/krunner-translator/default.nix @@ -0,0 +1,54 @@ +{ stdenv +, lib +, fetchFromGitHub +, cmake +, extra-cmake-modules +, krunner +, kconfigwidgets +, ktextwidgets +, kservice +, ki18n +, translate-shell +, qtbase +, qtdeclarative +, qtlocation +}: + +stdenv.mkDerivation rec { + pname = "krunner-translator"; + version = "1.5.0"; + + src = fetchFromGitHub { + owner = "naraesk"; + repo = pname; + rev = "v${version}"; + sha256 = "8MusGvNhTxa8Sm8WiSwRaVIfZOeXmgcO4T6H9LqFGLs="; + }; + + nativeBuildInputs = [ cmake extra-cmake-modules ]; + + dontWrapQtApps = true; + + buildInputs = [ + krunner + kconfigwidgets + ktextwidgets + kservice + ki18n + qtbase + qtdeclarative + qtlocation + ]; + + postPatch = '' + substituteInPlace src/translateShellProcess.cpp --replace "start(\"trans\", arguments);" "start(\"${translate-shell}/bin/trans\", arguments);" + ''; + + meta = with lib; { + description = "A plugin for KRunner which integrates a translator, supports Google Translate, Bing Translator, youdao and Baidu Fanyi"; + homepage = "https://github.com/naraesk/krunner-translator"; + license = licenses.gpl3; + maintainers = with maintainers; [ pongo1231 ]; + platforms = platforms.unix; + }; +} diff --git a/pkgs/tools/package-management/nix/default.nix b/pkgs/tools/package-management/nix/default.nix index 1534de533cbee..b0b4c61ee1583 100644 --- a/pkgs/tools/package-management/nix/default.nix +++ b/pkgs/tools/package-management/nix/default.nix @@ -39,6 +39,13 @@ let aws-sdk-cpp = aws-sdk-cpp-nix; }; + # https://github.com/NixOS/nix/pull/7585 + patch-monitorfdhup = fetchpatch2 { + name = "nix-7585-monitor-fd-hup.patch"; + url = "https://github.com/NixOS/nix/commit/1df3d62c769dc68c279e89f68fdd3723ed3bcb5a.patch"; + sha256 = "sha256-f+F0fUO+bqyPXjt+IXJtISVr589hdc3y+Cdrxznb+Nk="; + }; + # https://github.com/NixOS/nix/pull/7473 patch-sqlite-exception = fetchpatch2 { name = "nix-7473-sqlite-exception-add-message.patch"; @@ -53,6 +60,9 @@ in lib.makeExtensible (self: { url = "https://nixos.org/releases/nix/nix-${version}/nix-${version}.tar.xz"; sha256 = "sha256-fuaBtp8FtSVJLSAsO+3Nne4ZYLuBj2JpD2xEk7fCqrw="; }; + patches = [ + patch-monitorfdhup + ]; }).override { boehmgc = boehmgc-nix_2_3; }; nix_2_4 = throw "nixVersions.nix_2_4 has been removed"; @@ -78,6 +88,7 @@ in lib.makeExtensible (self: { url = "https://github.com/NixOS/nix/commit/3ade5f5d6026b825a80bdcc221058c4f14e10a27.patch"; sha256 = "sha256-s1ybRFCjQaSGj7LKu0Z5g7UiHqdJGeD+iPoQL0vaiS0="; }) + patch-monitorfdhup patch-sqlite-exception ]; }; @@ -93,6 +104,7 @@ in lib.makeExtensible (self: { url = "https://github.com/NixOS/nix/commit/3ade5f5d6026b825a80bdcc221058c4f14e10a27.patch"; sha256 = "sha256-s1ybRFCjQaSGj7LKu0Z5g7UiHqdJGeD+iPoQL0vaiS0="; }) + patch-monitorfdhup patch-sqlite-exception ]; }; @@ -102,6 +114,7 @@ in lib.makeExtensible (self: { sha256 = "sha256-sQ9C101CL/eVN5JgH91ozHFWU4+bXr8/Fi/8NQk6xRI="; patches = [ ./patches/flaky-tests.patch + patch-monitorfdhup patch-sqlite-exception ]; }; diff --git a/pkgs/tools/text/hck/default.nix b/pkgs/tools/text/hck/default.nix index c94580588056f..a1d30da61d30d 100644 --- a/pkgs/tools/text/hck/default.nix +++ b/pkgs/tools/text/hck/default.nix @@ -2,38 +2,23 @@ , rustPlatform , fetchFromGitHub , cmake -, stdenv -, darwin }: rustPlatform.buildRustPackage rec { pname = "hck"; - version = "0.8.2"; + version = "0.9.1"; src = fetchFromGitHub { owner = "sstadick"; repo = pname; rev = "v${version}"; - sha256 = "sha256-66wunZuRAJ6QVWgBUy2+HGaow33F5+16LitGSQC4kCE="; + sha256 = "sha256-wsuXEHwnTP+vl8Gn1mfH+cKoasDdZ+ILiAaJ7510lsI="; }; - cargoSha256 = "sha256-4CAj94wm9qxr9wejD2ffKSdRV1UeofMhxNxLi++At+I="; + cargoSha256 = "sha256-qWat0QIMLmMrbK/QCr3dSyWP27wFFQ+IDQAzLngThQE="; nativeBuildInputs = [ cmake ]; - buildInputs = lib.optionals stdenv.isDarwin [ - darwin.apple_sdk.frameworks.Security - ]; - - # link System as a dylib instead of a framework on macos - postPatch = lib.optionalString stdenv.isDarwin '' - core_affinity=../$(stripHash $cargoDeps)/core_affinity - oldHash=$(sha256sum $core_affinity/src/lib.rs | cut -d " " -f 1) - substituteInPlace $core_affinity/src/lib.rs --replace framework dylib - substituteInPlace $core_affinity/.cargo-checksum.json \ - --replace $oldHash $(sha256sum $core_affinity/src/lib.rs | cut -d " " -f 1) - ''; - meta = with lib; { description = "A close to drop in replacement for cut that can use a regex delimiter instead of a fixed string"; homepage = "https://github.com/sstadick/hck"; |