From 0d65cdb64bd38d37b45343cc4287684ae3b633ec Mon Sep 17 00:00:00 2001 From: Alexis Hildebrandt Date: Mon, 23 Sep 2024 18:35:18 +0200 Subject: [PATCH 1/3] newsboat: migrate to pkgs/by-name --- .../newsboat/default.nix => by-name/ne/newsboat/package.nix} | 4 ++-- pkgs/top-level/all-packages.nix | 4 ---- 2 files changed, 2 insertions(+), 6 deletions(-) rename pkgs/{applications/networking/feedreaders/newsboat/default.nix => by-name/ne/newsboat/package.nix} (91%) diff --git a/pkgs/applications/networking/feedreaders/newsboat/default.nix b/pkgs/by-name/ne/newsboat/package.nix similarity index 91% rename from pkgs/applications/networking/feedreaders/newsboat/default.nix rename to pkgs/by-name/ne/newsboat/package.nix index 144634d60d03..46c7e7c21684 100644 --- a/pkgs/applications/networking/feedreaders/newsboat/default.nix +++ b/pkgs/by-name/ne/newsboat/package.nix @@ -1,5 +1,5 @@ { lib, stdenv, rustPlatform, fetchFromGitHub, stfl, sqlite, curl, gettext, pkg-config, libxml2, json_c, ncurses -, asciidoctor, libiconv, Security, Foundation, makeWrapper, nix-update-script }: +, darwin, asciidoctor, libiconv, makeWrapper, nix-update-script }: rustPlatform.buildRustPackage rec { pname = "newsboat"; @@ -28,7 +28,7 @@ rustPlatform.buildRustPackage rec { ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ makeWrapper ncurses ]; buildInputs = [ stfl sqlite curl libxml2 json_c ncurses ] - ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security Foundation libiconv gettext ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [ Security Foundation libiconv gettext ]); postBuild = '' make -j $NIX_BUILD_CORES prefix="$out" diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 3cba16c1aa9f..418074450c7b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -10408,10 +10408,6 @@ with pkgs; nm-tray = libsForQt5.callPackage ../tools/networking/networkmanager/tray.nix { }; - newsboat = callPackage ../applications/networking/feedreaders/newsboat { - inherit (darwin.apple_sdk.frameworks) Security Foundation; - }; - grocy = callPackage ../servers/grocy { }; inherit (callPackages ../servers/nextcloud {}) From f079da8702ea59ba308286fec041f4296c4e394d Mon Sep 17 00:00:00 2001 From: Alexis Hildebrandt Date: Mon, 23 Sep 2024 18:36:58 +0200 Subject: [PATCH 2/3] newsboat: reformat unix nixfmt-rfc-style --- pkgs/by-name/ne/newsboat/package.nix | 81 +++++++++++++++++++++++----- 1 file changed, 67 insertions(+), 14 deletions(-) diff --git a/pkgs/by-name/ne/newsboat/package.nix b/pkgs/by-name/ne/newsboat/package.nix index 46c7e7c21684..fcdcc8d4cc36 100644 --- a/pkgs/by-name/ne/newsboat/package.nix +++ b/pkgs/by-name/ne/newsboat/package.nix @@ -1,5 +1,22 @@ -{ lib, stdenv, rustPlatform, fetchFromGitHub, stfl, sqlite, curl, gettext, pkg-config, libxml2, json_c, ncurses -, darwin, asciidoctor, libiconv, makeWrapper, nix-update-script }: +{ + lib, + stdenv, + rustPlatform, + fetchFromGitHub, + stfl, + sqlite, + curl, + gettext, + pkg-config, + libxml2, + json_c, + ncurses, + darwin, + asciidoctor, + libiconv, + makeWrapper, + nix-update-script, +}: rustPlatform.buildRustPackage rec { pname = "newsboat"; @@ -21,14 +38,35 @@ rustPlatform.buildRustPackage rec { --replace "ncurses5.4" "ncurses" ''; - nativeBuildInputs = [ - pkg-config - asciidoctor - gettext - ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ makeWrapper ncurses ]; + nativeBuildInputs = + [ + pkg-config + asciidoctor + gettext + ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ + makeWrapper + ncurses + ]; - buildInputs = [ stfl sqlite curl libxml2 json_c ncurses ] - ++ lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [ Security Foundation libiconv gettext ]); + buildInputs = + [ + stfl + sqlite + curl + libxml2 + json_c + ncurses + ] + ++ lib.optionals stdenv.hostPlatform.isDarwin ( + with darwin.apple_sdk.frameworks; + [ + Security + Foundation + libiconv + gettext + ] + ); postBuild = '' make -j $NIX_BUILD_CORES prefix="$out" @@ -47,6 +85,7 @@ rustPlatform.buildRustPackage rec { make -j $NIX_BUILD_CORES test ''; +<<<<<<< HEAD postInstall = '' make -j $NIX_BUILD_CORES prefix="$out" install '' + lib.optionalString stdenv.hostPlatform.isDarwin '' @@ -54,18 +93,32 @@ rustPlatform.buildRustPackage rec { wrapProgram "$prog" --prefix DYLD_LIBRARY_PATH : "${stfl}/lib" done ''; +======= + postInstall = + '' + make -j $NIX_BUILD_CORES prefix="$out" install + '' + + lib.optionalString stdenv.isDarwin '' + for prog in $out/bin/*; do + wrapProgram "$prog" --prefix DYLD_LIBRARY_PATH : "${stfl}/lib" + done + ''; +>>>>>>> f6bae49a470c (newsboat: reformat unix nixfmt-rfc-style) passthru = { updateScript = nix-update-script { }; }; meta = { - homepage = "https://newsboat.org/"; - changelog = "https://github.com/newsboat/newsboat/blob/${src.rev}/CHANGELOG.md"; + homepage = "https://newsboat.org/"; + changelog = "https://github.com/newsboat/newsboat/blob/${src.rev}/CHANGELOG.md"; description = "Fork of Newsbeuter, an RSS/Atom feed reader for the text console"; - maintainers = with lib.maintainers; [ dotlambda nicknovitski ]; - license = lib.licenses.mit; - platforms = lib.platforms.unix; + maintainers = with lib.maintainers; [ + dotlambda + nicknovitski + ]; + license = lib.licenses.mit; + platforms = lib.platforms.unix; mainProgram = "newsboat"; }; } From f2da14933fe5c29a332d4dfd0e345981169e7b2c Mon Sep 17 00:00:00 2001 From: Alexis Hildebrandt Date: Mon, 23 Sep 2024 18:44:38 +0200 Subject: [PATCH 3/3] newsboat: 2.36 -> 2.37 --- pkgs/by-name/ne/newsboat/package.nix | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/pkgs/by-name/ne/newsboat/package.nix b/pkgs/by-name/ne/newsboat/package.nix index fcdcc8d4cc36..5c6bfcfd8852 100644 --- a/pkgs/by-name/ne/newsboat/package.nix +++ b/pkgs/by-name/ne/newsboat/package.nix @@ -20,16 +20,16 @@ rustPlatform.buildRustPackage rec { pname = "newsboat"; - version = "2.36"; + version = "2.37"; src = fetchFromGitHub { owner = "newsboat"; repo = "newsboat"; rev = "r${version}"; - hash = "sha256-RnDnyRAZ71aE5st5wUcUKjFFGY288oFpiyDXAno15MQ="; + hash = "sha256-RNvzGGvicujqkRWVHBwnlROuhpH5XqPNWmx6q7n4g+U="; }; - cargoHash = "sha256-0z3G8j0Qk0HEDUKA7fmjFfNW956rRtzKO+0ltNQR4es="; + cargoHash = "sha256-EBA+ucegXr3YtU2K7bhwli8O+knnugMMUuSksDuaY9E="; # TODO: Check if that's still needed postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' @@ -85,25 +85,15 @@ rustPlatform.buildRustPackage rec { make -j $NIX_BUILD_CORES test ''; -<<<<<<< HEAD - postInstall = '' - make -j $NIX_BUILD_CORES prefix="$out" install - '' + lib.optionalString stdenv.hostPlatform.isDarwin '' - for prog in $out/bin/*; do - wrapProgram "$prog" --prefix DYLD_LIBRARY_PATH : "${stfl}/lib" - done - ''; -======= postInstall = '' make -j $NIX_BUILD_CORES prefix="$out" install '' - + lib.optionalString stdenv.isDarwin '' + + lib.optionalString stdenv.hostPlatform.isDarwin '' for prog in $out/bin/*; do wrapProgram "$prog" --prefix DYLD_LIBRARY_PATH : "${stfl}/lib" done ''; ->>>>>>> f6bae49a470c (newsboat: reformat unix nixfmt-rfc-style) passthru = { updateScript = nix-update-script { };