Skip to content

Commit

Permalink
stdenv: add test to make sure meta.position can be overridden
Browse files Browse the repository at this point in the history
Co-Authored-By: Victor Engmark <[email protected]>
  • Loading branch information
lolbinarycat and l0b0 committed Nov 26, 2024
1 parent 9d2645d commit 7e36543
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkgs/test/overriding.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ let
expr = (pkgs.hello.overrideAttrs { pname = "hello-overriden"; }).pname == "hello-overriden";
expected = true;
};
override-position = {
name = "override-position";
expr = (pkgs.hello.overrideAttrs (previousAttrs: { meta = previousAttrs.meta // { position = pkgs.cowsay.meta.position; }; })).meta.position == pkgs.cowsay.meta.position;
expected = true;
};
overriding-using-only-attrset-no-final-attrs = {
name = "overriding-using-only-attrset-no-final-attrs";
expr = ((stdenvNoCC.mkDerivation { pname = "hello-no-final-attrs"; }).overrideAttrs { pname = "hello-no-final-attrs-overridden"; }).pname == "hello-no-final-attrs-overridden";
Expand Down

0 comments on commit 7e36543

Please sign in to comment.