From f48ddf4ba9c73654d848902d19b8c739eefb1a05 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Mon, 2 Sep 2024 19:46:45 +0200 Subject: [PATCH] treewide: remove uses of deprecated Rust functions speakersafetyd was using the wrong one, so I've fixed it while I was here. --- .../networking/instant-messengers/element/seshat/default.nix | 2 +- pkgs/by-name/co/cosmic-greeter/package.nix | 4 ++-- pkgs/by-name/co/cosmic-session/package.nix | 2 +- pkgs/by-name/sp/speakersafetyd/package.nix | 2 +- pkgs/development/tools/devpod/default.nix | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pkgs/applications/networking/instant-messengers/element/seshat/default.nix b/pkgs/applications/networking/instant-messengers/element/seshat/default.nix index c1c9a57d4356..bc163fb50a89 100644 --- a/pkgs/applications/networking/instant-messengers/element/seshat/default.nix +++ b/pkgs/applications/networking/instant-messengers/element/seshat/default.nix @@ -36,7 +36,7 @@ in rustPlatform.buildRustPackage rec { fixup-yarn-lock yarn.lock yarn install --offline --frozen-lockfile --ignore-platform --ignore-scripts --no-progress --non-interactive patchShebangs node_modules/ - node_modules/.bin/neon build --release -- --target ${rust.toRustTargetSpec stdenv.hostPlatform} -Z unstable-options --out-dir target/release + node_modules/.bin/neon build --release -- --target ${stdenv.hostPlatform.rust.rustcTarget} -Z unstable-options --out-dir target/release runHook postBuild ''; diff --git a/pkgs/by-name/co/cosmic-greeter/package.nix b/pkgs/by-name/co/cosmic-greeter/package.nix index d1a21fdc9c91..372bddac3293 100644 --- a/pkgs/by-name/co/cosmic-greeter/package.nix +++ b/pkgs/by-name/co/cosmic-greeter/package.nix @@ -60,10 +60,10 @@ rustPlatform.buildRustPackage rec { (placeholder "out") "--set" "bin-src" - "target/${rust.lib.toRustTargetSpecShort stdenv.hostPlatform}/release/cosmic-greeter" + "target/${stdenv.hostPlatform.rust.cargoShortTarget}/release/cosmic-greeter" "--set" "daemon-src" - "target/${rust.lib.toRustTargetSpecShort stdenv.hostPlatform}/release/cosmic-greeter-daemon" + "target/${stdenv.hostPlatform.rust.cargoShortTarget}/release/cosmic-greeter-daemon" ]; postPatch = '' diff --git a/pkgs/by-name/co/cosmic-session/package.nix b/pkgs/by-name/co/cosmic-session/package.nix index 572a5d830777..ca12e3448332 100644 --- a/pkgs/by-name/co/cosmic-session/package.nix +++ b/pkgs/by-name/co/cosmic-session/package.nix @@ -30,7 +30,7 @@ rustPlatform.buildRustPackage rec { postPatch = '' substituteInPlace Justfile \ - --replace-fail '{{cargo-target-dir}}/release/cosmic-session' 'target/${rust.lib.toRustTargetSpecShort stdenv.hostPlatform}/release/cosmic-session' + --replace-fail '{{cargo-target-dir}}/release/cosmic-session' 'target/${stdenv.hostPlatform.rust.cargoShortTarget}/release/cosmic-session' substituteInPlace data/start-cosmic \ --replace-fail '/usr/bin/cosmic-session' "${placeholder "out"}/bin/cosmic-session" \ --replace-fail '/usr/bin/dbus-run-session' "${lib.getBin dbus}/bin/dbus-run-session" diff --git a/pkgs/by-name/sp/speakersafetyd/package.nix b/pkgs/by-name/sp/speakersafetyd/package.nix index de37b4080486..550b8af9a5f1 100644 --- a/pkgs/by-name/sp/speakersafetyd/package.nix +++ b/pkgs/by-name/sp/speakersafetyd/package.nix @@ -22,7 +22,7 @@ rustPlatform.buildRustPackage rec { postPatch = '' substituteInPlace speakersafetyd.service --replace "/usr" "$out" - substituteInPlace Makefile --replace "target/release" "target/${rust.lib.toRustTargetSpec stdenv.hostPlatform}/$cargoBuildType" + substituteInPlace Makefile --replace "target/release" "target/${stdenv.hostPlatform.rust.cargoShortTarget}/$cargoBuildType" # creating files in /var does not make sense in a nix package substituteInPlace Makefile --replace 'install -dDm0755 $(DESTDIR)/$(VARDIR)/lib/speakersafetyd/blackbox' "" ''; diff --git a/pkgs/development/tools/devpod/default.nix b/pkgs/development/tools/devpod/default.nix index 9be99097751b..a09d2a4ee51a 100644 --- a/pkgs/development/tools/devpod/default.nix +++ b/pkgs/development/tools/devpod/default.nix @@ -96,7 +96,7 @@ rec { dontInstall = true; }; - rustTargetPlatformSpec = rust.toRustTargetSpec stdenv.hostPlatform; + rustTargetPlatformSpec = stdenv.hostPlatform.rust.rustcTarget; in rustPlatform.buildRustPackage { inherit version src;