From 2be1c9eae1fa33cc1e4c8c6b9ccee44a8d3f474d Mon Sep 17 00:00:00 2001 From: Ryan Burns Date: Fri, 22 Oct 2021 14:02:26 -0700 Subject: [PATCH 1/8] navidrome: remove toplevel system attr --- pkgs/servers/misc/navidrome/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/misc/navidrome/default.nix b/pkgs/servers/misc/navidrome/default.nix index f81a2c4d9ab6..19a89bbbf1cb 100644 --- a/pkgs/servers/misc/navidrome/default.nix +++ b/pkgs/servers/misc/navidrome/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, pkgs, fetchurl, ffmpeg, ffmpegSupport ? true, makeWrapper, nixosTests }: +{ lib, stdenv, fetchurl, ffmpeg, ffmpegSupport ? true, makeWrapper, nixosTests }: with lib; @@ -7,7 +7,7 @@ stdenv.mkDerivation rec { version = "0.45.1"; - src = fetchurl (if pkgs.system == "x86_64-linux" + src = fetchurl (if stdenv.hostPlatform.system == "x86_64-linux" then { url = "https://github.com/deluan/navidrome/releases/download/v${version}/navidrome_${version}_Linux_x86_64.tar.gz"; sha256 = "sha256-TZcXq51sKoeLPmcRpv4VILDmS6dsS7lxlJzTDH0tEWM="; From 54aa92a5425bb34e6765b8f57acf13dd6652e48b Mon Sep 17 00:00:00 2001 From: Ryan Burns Date: Fri, 22 Oct 2021 14:03:01 -0700 Subject: [PATCH 2/8] fx_cast: remove toplevel system attr --- pkgs/tools/misc/fx_cast/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/tools/misc/fx_cast/default.nix b/pkgs/tools/misc/fx_cast/default.nix index e3458ccfe5cf..b94b16d7bf54 100644 --- a/pkgs/tools/misc/fx_cast/default.nix +++ b/pkgs/tools/misc/fx_cast/default.nix @@ -8,7 +8,7 @@ # nix run nixpkgs.nodePackages.node2nix -c node2nix -l package-lock.json -d # cp -v node-*.nix package*.json ~/p/nixpkgs/pkgs/tools/misc/fx_cast/app # ``` -{ pkgs, stdenv, system }: let +{ pkgs, stdenv }: let nodeEnv = import ./node-env.nix { inherit (pkgs) nodejs stdenv lib python2 runCommand writeTextFile; inherit pkgs; From 2bbc2eaed34175505f8c864bd7b10579a156bce9 Mon Sep 17 00:00:00 2001 From: Ryan Burns Date: Fri, 22 Oct 2021 14:03:17 -0700 Subject: [PATCH 3/8] bookstack: remove toplevel system attr --- pkgs/servers/web-apps/bookstack/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/web-apps/bookstack/default.nix b/pkgs/servers/web-apps/bookstack/default.nix index f7a02b5c13dd..724ff4c95c65 100644 --- a/pkgs/servers/web-apps/bookstack/default.nix +++ b/pkgs/servers/web-apps/bookstack/default.nix @@ -1,8 +1,9 @@ -{ pkgs, system, lib, fetchFromGitHub, dataDir ? "/var/lib/bookstack" }: +{ pkgs, stdenv, lib, fetchFromGitHub, dataDir ? "/var/lib/bookstack" }: let package = (import ./composition.nix { - inherit pkgs system; + inherit pkgs; + inherit (stdenv.hostPlatform) system; noDev = true; # Disable development dependencies }).overrideAttrs (attrs : { installPhase = attrs.installPhase + '' From 4423c7ecbcf0cdb3810c09df8a962ea7197edff9 Mon Sep 17 00:00:00 2001 From: Ryan Burns Date: Fri, 22 Oct 2021 14:03:38 -0700 Subject: [PATCH 4/8] crun: remove toplevel system attr --- pkgs/applications/virtualization/crun/default.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkgs/applications/virtualization/crun/default.nix b/pkgs/applications/virtualization/crun/default.nix index 1788c970f298..c91bf3d142ab 100644 --- a/pkgs/applications/virtualization/crun/default.nix +++ b/pkgs/applications/virtualization/crun/default.nix @@ -11,7 +11,6 @@ , yajl , nixosTests , criu -, system }: let @@ -52,7 +51,7 @@ stdenv.mkDerivation rec { buildInputs = [ libcap libseccomp systemd yajl ] # Criu currently only builds on x86_64-linux - ++ lib.optional (lib.elem system criu.meta.platforms) criu; + ++ lib.optional (lib.elem stdenv.hostPlatform.system criu.meta.platforms) criu; enableParallelBuilding = true; From aed6bb336ecf85d85acfd79f21054eb4ec288de7 Mon Sep 17 00:00:00 2001 From: Ryan Burns Date: Fri, 22 Oct 2021 14:04:05 -0700 Subject: [PATCH 5/8] build-support/docker: remove toplevel system attr --- pkgs/build-support/docker/default.nix | 2 -- 1 file changed, 2 deletions(-) diff --git a/pkgs/build-support/docker/default.nix b/pkgs/build-support/docker/default.nix index a42b025bc7f2..dcfa5ec593d1 100644 --- a/pkgs/build-support/docker/default.nix +++ b/pkgs/build-support/docker/default.nix @@ -31,8 +31,6 @@ , writeText , writeTextDir , writePython3 -, system -, # Note: This is the cross system we're compiling for }: let From 0b918edc99a66cbd0a4db819ff2e730dc58847a8 Mon Sep 17 00:00:00 2001 From: Ryan Burns Date: Fri, 22 Oct 2021 14:04:49 -0700 Subject: [PATCH 6/8] adguardhome: remove toplevel system attr Note that targetPlatform was incorrect when cross-compiling, and should be hostPlatform --- pkgs/servers/adguardhome/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/adguardhome/default.nix b/pkgs/servers/adguardhome/default.nix index 34f64edc6ba3..848e259256b9 100644 --- a/pkgs/servers/adguardhome/default.nix +++ b/pkgs/servers/adguardhome/default.nix @@ -1,10 +1,10 @@ -{ lib, stdenv, fetchurl, fetchzip, system ? stdenv.targetPlatform }: +{ lib, stdenv, fetchurl, fetchzip }: stdenv.mkDerivation rec { pname = "adguardhome"; version = "0.106.3"; - src = (import ./bins.nix { inherit fetchurl fetchzip; }).${system}; + src = (import ./bins.nix { inherit fetchurl fetchzip; }).${stdenv.hostPlatform.system}; installPhase = '' install -m755 -D ./AdGuardHome $out/bin/adguardhome From 3a3c1e94fba46e9da61f42721dec989b15afe84c Mon Sep 17 00:00:00 2001 From: Ryan Burns Date: Fri, 22 Oct 2021 14:17:50 -0700 Subject: [PATCH 7/8] zigbee2mqtt: remove toplevel system attr --- pkgs/servers/zigbee2mqtt/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/zigbee2mqtt/default.nix b/pkgs/servers/zigbee2mqtt/default.nix index 2a7c31a47a0f..7f561c493e66 100644 --- a/pkgs/servers/zigbee2mqtt/default.nix +++ b/pkgs/servers/zigbee2mqtt/default.nix @@ -1,6 +1,6 @@ -{ pkgs, system, dataDir ? "/opt/zigbee2mqtt/data", nixosTests }: +{ pkgs, stdenv, dataDir ? "/opt/zigbee2mqtt/data", nixosTests }: let - package = (import ./node.nix { inherit pkgs system; }).package; + package = (import ./node.nix { inherit pkgs; inherit (stdenv.hostPlatform) system; }).package; in package.override rec { # don't upgrade! Newer versions cause stack overflows and fail trunk-combined From 4246d6ce21d2d8d33e2d30f42b3d9d446c5dc143 Mon Sep 17 00:00:00 2001 From: Ryan Burns Date: Fri, 22 Oct 2021 16:38:55 -0700 Subject: [PATCH 8/8] aliases: add pkgs.system This is an old compat definition for stdenv.hostPlatform.system --- pkgs/top-level/aliases.nix | 2 ++ pkgs/top-level/stage.nix | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index e28d75c84211..69633ad76028 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -1246,4 +1246,6 @@ mapAliases ({ targetLlvmLibraries = targetPackages.llvmPackages_git.libraries; }); + inherit (stdenv.hostPlatform) system; # added 2021-10-22 + }) diff --git a/pkgs/top-level/stage.nix b/pkgs/top-level/stage.nix index a990c5ed70cb..7db79276d899 100644 --- a/pkgs/top-level/stage.nix +++ b/pkgs/top-level/stage.nix @@ -116,7 +116,6 @@ let inherit (super.stdenv) buildPlatform hostPlatform targetPlatform; in { inherit buildPlatform hostPlatform targetPlatform; - inherit (hostPlatform) system; }; splice = self: super: import ./splice.nix lib self (adjacentPackages != null);