Commit Graph

112 Commits

Author SHA1 Message Date
Artturin
f9fdf2d402 treewide: move NIX_CFLAGS_COMPILE to the env attrset
with structuredAttrs lists will be bash arrays which cannot be exported
which will be a issue with some patches and some wrappers like cc-wrapper

this makes it clearer that NIX_CFLAGS_COMPILE must be a string as lists
in env cause a eval failure
2023-02-22 21:23:04 +02:00
John Ericson
6e4a1b18d9 meta.pkgConfigModules: Init convention
See docs.

Follow-up work:

- Existing packages should be converted

- `defaultPkgConfigPackages` should assert on `meta.pkgConfigModules`
  and let `tests.pkg-config` alone test the build results.

CC @sternenseemann

Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2023-02-03 09:37:31 -05:00
John Ericson
3dcde1c342 zlib: Use finalAttrs instead of rec 2023-02-03 08:42:48 -05:00
Vladimír Čunát
40192db220
Merge #197116: zlib: cleanup
...into staging
2022-10-28 10:55:53 +02:00
Sandro Jäckel
401544bcac
zlib: cleanup 2022-10-21 22:40:49 +02:00
Vladimír Čunát
735d63b668
zlib.src: shuffle download URLs
On sourceforge I see only versions up to 1.2.11:
  https://sourceforge.net/projects/libpng/files/zlib/
and the order is switched to avoid captcha (I didn't encounter it):
  https://github.com/NixOS/nixpkgs/pull/196167#issuecomment-1280333184
2022-10-20 12:49:53 +02:00
Artturin
017b667099 zlib: 1.2.12 -> 1.2.13 2022-10-15 21:46:15 +03:00
Winter
d56d587e85 zlib: add fixed patch for CVE-2022-37434 2022-08-08 14:33:13 -04:00
Robert Scott
d5aaf15094 Revert "zlib: add patch for CVE-2022-37434" 2022-08-08 11:16:19 -04:00
Robert Scott
c8f7a21ea2 zlib: add patch for CVE-2022-37434 2022-08-07 14:41:48 +01:00
Raito Bezarius
8335c46632 zlib: backport upstream fix on CRC validation
Starting zlib 1.2.12, CRC validation has became stricter.
This broke Keycloak ≥ 17 in certain situations, for details, see:

- https://github.com/keycloak/keycloak/issues/11316 ;
- https://github.com/NixOS/nixpkgs/issues/170539

This patch makes the CRC validation comprehensive with respect to older
or already existing checksums out there.
2022-06-10 01:20:03 +02:00
Artturin
f002ffed9a treewide: enable strictDeps in bootstrap packages 2022-05-22 16:40:26 +03:00
Janne Heß
c911240e9c
Revert "Add mingwW64-llvm cross-system." 2022-05-18 13:50:23 +02:00
Shea Levy
504d38ae7b
cross: Allow Windows toolchains to use ucrt as libc. 2022-05-06 10:54:52 -04:00
Rick van Schijndel
f091c0e80d zlib: fix cross-compilation not producing shared libraries
Apply patch that already has been applied upstream:
- https://github.com/madler/zlib/pull/607
- 05796d3d8d
2022-04-05 21:57:23 +02:00
Markus S. Wamser
8cd9c041b4
zlib: 1.2.11 -> 1.2.12 (security, CVE-2018-25032)
This version bump is the official fix for CVE-2018-25032.

Release Notes:
https://zlib.net/
2022-03-31 20:18:15 +02:00
Tom Wieczorek
1832678aee zlib: add patches to fix CVE-2018-25032
https://nvd.nist.gov/vuln/detail/CVE-2018-25032
https://www.openwall.com/lists/oss-security/2022/03/24/1

A similar change landed in Alpine: https://git.alpinelinux.org/aports/commit/?id=361df5902aa1e81594b17f06a13e10527dfb8aed
2022-03-31 19:42:59 +02:00
Felix Bühler
3b8270ac54
zlib: rename name to pname&version (#157751) 2022-02-03 20:05:47 -05:00
John Ericson
904625852d pkgsStatic: Inline more of static overlay 2021-08-19 21:55:06 +00:00
Andrew Childs
24a378c070 zlib: fix cross compilation on darwin 2021-05-17 00:27:00 +09:00
Taeer Bar-Yam
9c662a39b2 zlib: fix windows static compile 2021-04-28 10:06:20 -04:00
Ben Siraphob
66e44425c6 pkgs/development/libraries: stdenv.lib -> lib 2021-01-21 19:11:02 -08:00
John Ericson
f52263ced0 treewide: Start to break up static overlay
We can use use `stdenv.hostPlatform.isStatic` instead, and move the
logic per package. The least opionated benefit of this is that it makes
it much easier to replace packages with modified ones, as there is no
longer any issue of overlay order.

CC @FRidh @matthewbauer
2021-01-03 19:18:16 +00:00
Matthew Bauer
d0677e6d45 treewide: add warning comment to “boot” packages
This adds a warning to the top of each “boot” package that reads:

  Note: this package is used for bootstrapping fetchurl, and thus cannot
  use fetchpatch! All mutable patches (generated by GitHub or cgit) that
  are needed here should be included directly in Nixpkgs as files.

This makes it clear to maintainer that they may need to treat this
package a little differently than others. Importantly, we can’t use
fetchpatch here due to using <nix/fetchurl.nix>. To avoid having stale
hashes, we need to include patches that are subject to changing
overtime (for instance, gitweb’s patches contain a version number at
the bottom).
2020-07-31 08:56:53 +02:00
Michael Reilly
84cf00f980
treewide: Per RFC45, remove all unquoted URLs 2020-04-10 17:54:53 +01:00
Niklas Hambüchen
6393bdb0ed zlib: Fix typo in comment. No eval changes.
This created confusion in #71813.
2019-12-06 20:45:58 +01:00
Benjamin Hipple
11acf66e00 zlib: enable check and parallel building (#62025)
* zlib: enable check and parallel building

* Remove empty maintainers line
2019-08-31 23:20:02 -04:00
Niklas Hambüchen
aa99a263cc zlib: Properly clean up static/shared distinction
This improves what commit

    e999def1 zlib: clean up static/shared distincion

described as "kind of a mess" and "confusing". And indeed it was confusing.

Now, the concept whether or not the .a file is moved to a split output
is controlled by a clean variable.

The defaults remain unchanged.

The new approach also finally cleanly allows building statically but NOT
using a split output, like all other autoconf-based projects in nixpkgs do
(using the `dontDisableStatic` setting).
That is important for overlays that want to enable static libs for all
packages in one go, without having to hand-patch idiosynchrasies like zlib
had until now.

Until now, if you wanted the .a in the main output, the only way was to go via
`static=false, shared=true` -- which made no sense, because you had to say
`static=false` even though you want a static lib. That is fixed now.
2019-08-17 15:59:29 +02:00
Niklas Hambüchen
bda6618bb6 zlib: Add comments regarding static/shared linking.
The main explanation was taken from commit:

    e999def1 zlib: clean up static/shared distincion

The `SHARED_MODE=1` bit was originally introduced in commit:

    0bfc84b0 Cross-compile zlib for Windows
2019-08-11 21:32:22 +02:00
worldofpeace
cab7c6cbd9 treewide: use dontConfigure 2019-07-01 04:23:51 -04:00
Matthew Bauer
e999def159 zlib: clean up static/shared distincion
This is kind of a mess, but basically:

- static=true, shared=true means to build statically but move it to
  the static output
- static=true, shared=false means to build statically and leave it in
  the main output
- static=false, shared=true means to not build static at all

Confusingly, the old default was static=true, shared=true even though
static=false? Still can’t figure out what was meant by that.
2018-12-04 21:14:41 -06:00
Matthew Bauer
845a364564 zlib: skip configure in windows
configure spits out an error when running on windows
2018-10-17 12:43:07 -05:00
John Ericson
cc83d59333 zlib: Fix iOS cross build
1. CHOST is how one specifies the cross host platform with this
  non-standard configure script. We were just getting lucky with Linux
  cross.

  2. install_name_tool needs the the binutils prefix.
2018-09-19 12:10:09 -04:00
John Ericson
0828e2d8c3 treewide: Remove usage of remaining redundant platform compatability stuff
Want to get this out of here for 18.09, so it can be deprecated
thereafter.
2018-08-30 17:20:32 -04:00
Markus Kowalewski
2ff7660178
zlib: add license 2018-08-09 11:13:44 +02:00
Silvan Mosberger
57bccb3cb8 treewide: http -> https sources (#42676)
* treewide: http -> https sources

This updates the source urls of all top-level packages from http to
https where possible.

* buildtorrent: fix url and tab -> spaces
2018-06-28 20:43:35 +02:00
John Ericson
e755a8a27d treewide: Use targetPrefix instead of prefix for platform name prefixes
Certain tools, e.g. compilers, are customarily prefixed with the name of
their target platform so that multiple builds can be used at once
without clobbering each other on the PATH. I was using identifiers named
`prefix` for this purpose, but that conflicts with the standard use of
`prefix` to mean the directory where something is installed. To avoid
conflict and confusion, I renamed those to `targetPrefix`.
2017-11-27 03:15:50 -05:00
John Ericson
e5567bae2d treewide: Do not limit hardenging because gcc 4.9 in bootstrap
Bootstrap tools has since been bumped
2017-09-14 10:27:13 -04:00
John Ericson
95c8277701 misc pkgs: Remove unneeded *Platform == *Platform comparisons
PR #26007 used these to avoid causing a mass rebuild. Now that we know
things work, we do that to clean up.
2017-06-30 10:09:31 -04:00
John Ericson
16be434b0b Merge accepted cross compilation PRs into staging 2017-06-28 23:17:21 -04:00
John Ericson
da668f66c7 zlib: cc-wrapper can be relied on to export this env var 2017-06-28 18:31:37 -04:00
David McFarland
cbc0db08f9 zlib: fix cygwin build 2017-06-26 09:33:25 -03:00
Ross MacLeod
f63f96ae35 zlib: don't really override CC at ay point
but leave the preConfigure script as it was when not cross building in order to avoid hash breakage
2017-06-22 17:53:52 -04:00
John Ericson
594d264205 cross stdenv adaptor: Support --host --build --target across the board
Packages get --host and --target by default, but can explicitly request
any subset to be passed as needed. See docs for more info.

rustc: Avoid hash breakage by using the old (ignored)
dontSetConfigureCross when not cross building
2017-06-22 17:52:28 -04:00
Vladimír Čunát
150cddca6f
zlib: 1.2.10 -> 1.2.11 2017-02-05 13:30:44 +01:00
Daiderd Jordan
bba12a6c90
Merge branch 'master' into staging 2017-01-09 23:57:47 +01:00
Sebastian Hagen
d042abef26 zlib: Fix zlib.net URL. (#21753)
Look for primary source file below
  http://zlib.net/fossils/ as opposed to
  http://zlib.net/
. zlib-1.2.8.tar.gz is still available at the former location, and will likely
remain there. In addition, it's important that the first URL work since zlib
is in the bootstrap path, and 16.09 (at least) bootstrap doesn't try to fetch
from later ones.
2017-01-08 18:09:57 +01:00
Vladimír Čunát
948e9edce6
zlib: maintenance 1.2.8 -> 1.2.10
The removed CVEs should be fixed in the release.
2017-01-06 21:45:20 +01:00
Graham Christensen
41f55691a9
zlib: patch for CVE-2016-9840, CVE-2016-9841, CVE-9842, CVE-9843 2016-12-21 17:15:52 -05:00
Tuomas Tynkkynen
a17216af4c treewide: Shuffle outputs
Make either 'bin' or 'out' the first output.
2016-08-29 14:49:51 +03:00