Skip to content

Commit

Permalink
nzbget: 24.3 -> 24.5 (#360130)
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperSandro2000 authored Dec 17, 2024
2 parents c67f1af + dfeab1d commit 959dee9
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 2 deletions.
23 changes: 21 additions & 2 deletions pkgs/by-name/nz/nzbget/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,30 @@
, nixosTests
}:

let
par2TurboSrc = fetchFromGitHub {
owner = "nzbgetcom";
repo = "par2cmdline-turbo";
rev = "v1.1.1-nzbget-20241128"; # from cmake/par2-turbo.cmake
hash = "sha256-YBv61DAUWgf4jGQciTsGX7SAC2oZZ6h/lnJgJ40gMZE=";
};
in
stdenv.mkDerivation (finalAttrs: {
pname = "nzbget";
version = "24.3";
version = "24.5";

src = fetchFromGitHub {
owner = "nzbgetcom";
repo = "nzbget";
rev = "v${finalAttrs.version}";
hash = "sha256-Gci9bVjmewoEii6OiOuRpLgEBEKApmMmlA5v3OedCo4=";
hash = "sha256-HftzgdG6AjCyJVMV2btjBRLJLQ0wc1f8FJzGDWrdxR4=";
};

patches = [
# remove git usage for fetching modified+vendored par2cmdline-turbo
./remove-git-usage.patch
];

nativeBuildInputs = [ cmake pkg-config ];

buildInputs = [
Expand All @@ -43,6 +56,12 @@ stdenv.mkDerivation (finalAttrs: {
zlib
];

preConfigure = ''
mkdir -p build/par2-turbo/src
cp -r ${par2TurboSrc} build/par2-turbo/src/par2-turbo
chmod -R u+w build/par2-turbo/src/par2-turbo
'';

postPatch = ''
substituteInPlace daemon/util/Util.cpp \
--replace-fail "std::string(\"uname \")" "std::string(\"${lib.getExe deterministic-uname} \")"
Expand Down
29 changes: 29 additions & 0 deletions pkgs/by-name/nz/nzbget/remove-git-usage.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
diff --git a/cmake/par2-turbo.cmake b/cmake/par2-turbo.cmake
index 4fa76b54..cf293452 100644
--- a/cmake/par2-turbo.cmake
+++ b/cmake/par2-turbo.cmake
@@ -24,17 +24,13 @@ if(CMAKE_SYSROOT)
)
endif()

-ExternalProject_add(
- par2-turbo
- PREFIX par2-turbo
- GIT_REPOSITORY https://github.com/nzbgetcom/par2cmdline-turbo.git
- GIT_TAG v1.1.1-nzbget-20241128
- TLS_VERIFY TRUE
- GIT_SHALLOW TRUE
- GIT_PROGRESS TRUE
- DOWNLOAD_EXTRACT_TIMESTAMP TRUE
- CMAKE_ARGS ${CMAKE_ARGS}
- INSTALL_COMMAND ""
+
+ExternalProject_Add(
+ par2-turbo
+ PREFIX par2-turbo
+ SOURCE_DIR ${CMAKE_BINARY_DIR}/par2-turbo/src/par2-turbo
+ CMAKE_ARGS ${CMAKE_ARGS}
+ INSTALL_COMMAND ""
)

if(WIN32)

0 comments on commit 959dee9

Please sign in to comment.