Merged
Conversation
10 tasks
838ea55 to
2dda992
Compare
2dda992 to
09f99fe
Compare
Member
|
the patch for pxz isn't needed anymore diff --git a/pkgs/tools/compression/pxz/_SC_ARG_MAX.patch b/pkgs/tools/compression/pxz/_SC_ARG_MAX.patch
deleted file mode 100644
index fac8f1fc147..00000000000
--- a/pkgs/tools/compression/pxz/_SC_ARG_MAX.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From b8f9827fc4de9296c7a6f5e6fdac46e070cd6cb4 Mon Sep 17 00:00:00 2001
-From: Igor Pashev <pashev.igor@gmail.com>
-Date: Sat, 1 Nov 2014 18:10:05 +0300
-Subject: [PATCH] Fixed crash on Linux when stack size is unlimited
-
----
- pxz.c | 7 +++++--
- 1 file changed, 5 insertions(+), 2 deletions(-)
-
-diff --git a/pxz.c b/pxz.c
-index 9cb843e..52713e2 100644
---- a/pxz.c
-+++ b/pxz.c
-@@ -65,7 +65,7 @@ FILE **ftemp;
- char str[0x100];
- char buf[BUFFSIZE];
- char *xzcmd;
--size_t xzcmd_max;
-+const size_t xzcmd_max = 10240;
-
- unsigned opt_complevel = 6, opt_stdout, opt_keep, opt_threads, opt_verbose;
- unsigned opt_force, opt_stdout;
-@@ -243,9 +243,12 @@ int main( int argc, char **argv ) {
- lzma_filter filters[LZMA_FILTERS_MAX + 1];
- lzma_options_lzma lzma_options;
-
-- xzcmd_max = sysconf(_SC_ARG_MAX);
- page_size = sysconf(_SC_PAGE_SIZE);
- xzcmd = malloc(xzcmd_max);
-+ if (!xzcmd) {
-+ fprintf(stderr, "Failed to allocate %lu bytes for xz command.\n", xzcmd_max);
-+ return -1;
-+ }
- snprintf(xzcmd, xzcmd_max, XZ_BINARY);
-
- parse_args(argc, argv);
diff --git a/pkgs/tools/compression/pxz/default.nix b/pkgs/tools/compression/pxz/default.nix
index 725dd4defb9..4ea95a3f78a 100644
--- a/pkgs/tools/compression/pxz/default.nix
+++ b/pkgs/tools/compression/pxz/default.nix
@@ -13,8 +13,6 @@ stdenv.mkDerivation rec {
buildInputs = [ xz ];
- patches = [ ./_SC_ARG_MAX.patch ];
-
buildPhase = ''
gcc -o pxz pxz.c -llzma \
-fopenmp -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -O2 \ |
ajs124
requested changes
Jul 21, 2021
This comment has been minimized.
This comment has been minimized.
Member
Author
|
This is a semi-automatic executed nixpkgs-review with nixpkgs-review-checks extension. It is checked by a human on a best effort basis and does not build all packages (e.g. lumo, tensorflow or pytorch). Result of 21 packages built:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation for this change
Things done
sandboxinnix.confon non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"./result/bin/)