Skip to content

Commit

Permalink
nzbget: 24.1 -> 24.2
Browse files Browse the repository at this point in the history
  • Loading branch information
devusb committed Aug 11, 2024
1 parent e0d4ac2 commit 392f3c9
Showing 1 changed file with 21 additions and 6 deletions.
27 changes: 21 additions & 6 deletions pkgs/by-name/nz/nzbget/package.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{ lib
, stdenv
, fetchFromGitHub
, autoreconfHook
, fetchpatch2
, cmake
, boost
, pkg-config
, gnutls
Expand All @@ -13,21 +14,30 @@
, ncurses
, openssl
, zlib
, deterministic-uname
, nixosTests
}:

stdenv.mkDerivation (finalAttrs: {
pname = "nzbget";
version = "24.1";
version = "24.2";

src = fetchFromGitHub {
owner = "nzbgetcom";
repo = "nzbget";
rev = "v${finalAttrs.version}";
hash = "sha256-HovfnTsgu07/lp/spI+iA8H7lOj0Qyrri2MOJKyMKHQ=";
hash = "sha256-+iJ5n/meBrMxKHSLxL5QJ7+TI0RMfAM5n/8dwYupGoU=";
};

nativeBuildInputs = [ autoreconfHook pkg-config ];
patches = [
(fetchpatch2 {
# status page buffer overflow fix: https://github.com/nzbgetcom/nzbget/pull/346 -- remove when version > 24.2
url = "https://github.com/nzbgetcom/nzbget/commit/f89978f7479cbb0ff2f96c8632d9d2f31834e6c8.patch";
hash = "sha256-9K7PGzmoZ8cvEKBm5htfw5fr1GBSddNkDC/Vi4ngRto=";
})
];

nativeBuildInputs = [ cmake pkg-config ];

buildInputs = [
boost
Expand All @@ -42,8 +52,13 @@ stdenv.mkDerivation (finalAttrs: {
zlib
];

prePatch = ''
sed -i 's/AC_INIT.*/AC_INIT( nzbget, m4_esyscmd_s( echo ${finalAttrs.version} ) )/' configure.ac
postPatch = ''
substituteInPlace daemon/util/Util.cpp \
--replace-fail "std::string(\"uname \")" "std::string(\"${lib.getExe deterministic-uname} \")"
'';

postInstall = ''
install -Dm444 nzbget.conf $out/share/nzbget/nzbget.conf
'';

enableParallelBuilding = true;
Expand Down

0 comments on commit 392f3c9

Please sign in to comment.