libpng: migrate to pkgs/by-name
This moves libpng to the by-name directory layout: pkgs/development/libraries/libpng → pkgs/by-name/li/libpng The package is renamed to package.nix. The previous Darwin-specific stdenv override (using darwin.bootstrapStdenv to avoid xcbuild recursion) is preserved by introducing a local stdenv' binding and using it for mkDerivation. This keeps the bootstrap behavior identical to the old location. The old libpng entry in all-packages.nix is removed, since by-name packages are now auto-discovered.
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
zlib,
|
||||
apngSupport ? true,
|
||||
testers,
|
||||
darwin,
|
||||
}:
|
||||
|
||||
assert zlib != null;
|
||||
@@ -16,9 +17,9 @@ let
|
||||
hash = "sha256-aH3cDHyxKKPqWOFZtRKSUlN8J+3gwyqT8R8DEn8MAWU=";
|
||||
};
|
||||
whenPatched = lib.optionalString apngSupport;
|
||||
|
||||
stdenv' = if stdenv.hostPlatform.isDarwin then darwin.bootstrapStdenv else stdenv;
|
||||
in
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
stdenv'.mkDerivation (finalAttrs: {
|
||||
pname = "libpng" + whenPatched "-apng";
|
||||
version = "1.6.53";
|
||||
|
||||
@@ -7151,13 +7151,6 @@ with pkgs;
|
||||
libpeas = callPackage ../development/libraries/libpeas { };
|
||||
libpeas2 = callPackage ../development/libraries/libpeas/2.x.nix { };
|
||||
|
||||
libpng = callPackage ../development/libraries/libpng {
|
||||
stdenv =
|
||||
# libpng is a dependency of xcbuild. Avoid an infinite recursion by using a bootstrap stdenv
|
||||
# that does not propagate xcrun.
|
||||
if stdenv.hostPlatform.isDarwin then darwin.bootstrapStdenv else stdenv;
|
||||
};
|
||||
|
||||
libpng12 = callPackage ../development/libraries/libpng/12.nix { };
|
||||
|
||||
inherit
|
||||
|
||||
Reference in New Issue
Block a user