From 06567334beec3fe0f33ed8f91b33a4a195a3b9ba Mon Sep 17 00:00:00 2001 From: Artturin Date: Thu, 23 Feb 2023 18:09:09 +0200 Subject: [PATCH] emscriptenPackages: s/overrideDerivation/overrideAttrs https://nixos.org/manual/nixpkgs/stable/#sec-pkg-overrideDerivation > Do not use this function in Nixpkgs as it evaluates a Derivation before modifying it, which breaks package abstraction and removes error-checking of function arguments --- doc/languages-frameworks/emscripten.section.md | 2 +- pkgs/top-level/emscripten-packages.nix | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/languages-frameworks/emscripten.section.md b/doc/languages-frameworks/emscripten.section.md index 67c8ed42bfda..5f93dd5ff315 100644 --- a/doc/languages-frameworks/emscripten.section.md +++ b/doc/languages-frameworks/emscripten.section.md @@ -56,7 +56,7 @@ See the `zlib` example: zlib = (pkgs.zlib.override { stdenv = pkgs.emscriptenStdenv; - }).overrideDerivation + }).overrideAttrs (old: rec { buildInputs = old.buildInputs ++ [ pkg-config ]; # we need to reset this setting! diff --git a/pkgs/top-level/emscripten-packages.nix b/pkgs/top-level/emscripten-packages.nix index 5e64739b8653..15baf5ba7291 100644 --- a/pkgs/top-level/emscripten-packages.nix +++ b/pkgs/top-level/emscripten-packages.nix @@ -8,7 +8,7 @@ with pkgs; rec { json_c = (pkgs.json_c.override { stdenv = pkgs.emscriptenStdenv; - }).overrideDerivation + }).overrideAttrs (old: { nativeBuildInputs = [ pkg-config cmake ]; propagatedBuildInputs = [ zlib ]; @@ -47,7 +47,7 @@ rec { libxml2 = (pkgs.libxml2.override { stdenv = emscriptenStdenv; pythonSupport = false; - }).overrideDerivation + }).overrideAttrs (old: { propagatedBuildInputs = [ zlib ]; nativeBuildInputs = (old.nativeBuildInputs or []) ++ [ pkg-config ]; @@ -138,7 +138,7 @@ rec { zlib = (pkgs.zlib.override { stdenv = pkgs.emscriptenStdenv; - }).overrideDerivation + }).overrideAttrs (old: { nativeBuildInputs = (old.nativeBuildInputs or []) ++ [ pkg-config ]; # we need to reset this setting!