From a8ff9be2b61bd5c257b15a526e6354ef4590be9a Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Tue, 22 Sep 2020 17:27:17 +0300 Subject: [PATCH] newsboat: 2.20.1 -> 2.21 Add missing deps for Darwin, and tell it where gettext is installed. --- .../feedreaders/newsboat/default.nix | 30 ++++++++++++------- pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 21 insertions(+), 11 deletions(-) diff --git a/pkgs/applications/networking/feedreaders/newsboat/default.nix b/pkgs/applications/networking/feedreaders/newsboat/default.nix index 18c39588775..3b8f6e0a056 100644 --- a/pkgs/applications/networking/feedreaders/newsboat/default.nix +++ b/pkgs/applications/networking/feedreaders/newsboat/default.nix @@ -1,26 +1,29 @@ { stdenv, rustPlatform, fetchFromGitHub, stfl, sqlite, curl, gettext, pkg-config, libxml2, json_c, ncurses -, asciidoctor, libiconv, Security, makeWrapper }: +, asciidoctor, libiconv, Security, Foundation, makeWrapper }: rustPlatform.buildRustPackage rec { pname = "newsboat"; - version = "2.20.1"; + version = "2.21"; src = fetchFromGitHub { owner = "newsboat"; repo = "newsboat"; rev = "r${version}"; - sha256 = "1i9dpkdlsm3ya0w2x4c8kplrp3qzd8slbkcqvzfpqggb67gvczvv"; + sha256 = "0ignfmh5193bigvk9f057r0r4yaxymxv2afycn2b98w05gljccb6"; }; - cargoSha256 = "1ykffx2lhn4w56qm1wypkg9wsqpvzzrz419qkl95w1384xf3f7ix"; + cargoSha256 = "16652i2hbs6d3fam2hdlc947i5nrb3na186zfcb4nfh7hnb7lh8g"; postPatch = '' substituteInPlace Makefile --replace "|| true" "" - '' + stdenv.lib.optionalString stdenv.isDarwin '' - # Allow other ncurses versions on Darwin - substituteInPlace config.sh \ - --replace "ncurses5.4" "ncurses" - ''; + '' + # TODO: Check if that's still needed + + stdenv.lib.optionalString stdenv.isDarwin '' + # Allow other ncurses versions on Darwin + substituteInPlace config.sh \ + --replace "ncurses5.4" "ncurses" + '' + ; nativeBuildInputs = [ pkg-config @@ -29,7 +32,7 @@ rustPlatform.buildRustPackage rec { ] ++ stdenv.lib.optionals stdenv.isDarwin [ makeWrapper ncurses ]; buildInputs = [ stfl sqlite curl libxml2 json_c ncurses ] - ++ stdenv.lib.optionals stdenv.isDarwin [ Security libiconv gettext ]; + ++ stdenv.lib.optionals stdenv.isDarwin [ Security Foundation libiconv gettext ]; postBuild = '' make prefix="$out" @@ -38,6 +41,13 @@ rustPlatform.buildRustPackage rec { # TODO: Check if that's still needed NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.isDarwin " -Wno-error=format-security"; + # https://github.com/NixOS/nixpkgs/pull/98471#issuecomment-703100014 . We set + # these for all platforms, since upstream's gettext crate behavior might + # change in the future. + GETTEXT_LIB_DIR = "${stdenv.lib.getLib gettext}/lib"; + GETTEXT_INCLUDE_DIR = "${stdenv.lib.getDev gettext}/include"; + GETTEXT_BIN_DIR = "${stdenv.lib.getBin gettext}/bin"; + doCheck = true; preCheck = '' diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f69cc670dc4..1511aca4d17 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5745,7 +5745,7 @@ in nm-tray = libsForQt5.callPackage ../tools/networking/network-manager/tray.nix { }; newsboat = callPackage ../applications/networking/feedreaders/newsboat { - inherit (darwin.apple_sdk.frameworks) Security; + inherit (darwin.apple_sdk.frameworks) Security Foundation; }; grocy = callPackage ../servers/grocy { };