Skip to content

Commit c2924f9

Browse files
committed
fix(nix): Update default.nix field names
Recent nix versions renamed two fields used in our default.nix file: - buildPlatform has been renamed/moved to stdenv.buildPlatform - hostPlatform has been renamed/moved to stdenv.hostPlatform This came up during the testing of stackabletech/operator-rs#1116 in the secret-operator.
1 parent e569102 commit c2924f9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

template/default.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# on Darwin (macOS), but doesn't seem to actually be necessary beyond
66
# production hardening.
77
fakeroot =
8-
if self.buildPlatform.isDarwin then
8+
if self.stdenv.buildPlatform.isDarwin then
99
self.writeScriptBin "fakeroot" ''exec "$@"''
1010
else
1111
super.fakeroot;
@@ -14,7 +14,7 @@
1414
# (non-Nix build tools like Tilt, as well as the container composition scripts)
1515
, pkgsLocal ? import nixpkgs { inherit overlays; }
1616
# Default to building for the local CPU architecture
17-
, targetArch ? pkgsLocal.hostPlatform.linuxArch
17+
, targetArch ? pkgsLocal.stdenv.hostPlatform.linuxArch
1818
, targetSystem ? "${targetArch}-unknown-linux-gnu"
1919
, pkgsTarget ? import nixpkgs {
2020
inherit overlays;

0 commit comments

Comments
 (0)