treewide: remove uses of deprecated Rust functions
speakersafetyd was using the wrong one, so I've fixed it while I was here.
This commit is contained in:
parent
99d58d3d2b
commit
f48ddf4ba9
@ -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
|
||||
'';
|
||||
|
||||
|
@ -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 = ''
|
||||
|
@ -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"
|
||||
|
@ -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' ""
|
||||
'';
|
||||
|
@ -96,7 +96,7 @@ rec {
|
||||
dontInstall = true;
|
||||
};
|
||||
|
||||
rustTargetPlatformSpec = rust.toRustTargetSpec stdenv.hostPlatform;
|
||||
rustTargetPlatformSpec = stdenv.hostPlatform.rust.rustcTarget;
|
||||
in
|
||||
rustPlatform.buildRustPackage {
|
||||
inherit version src;
|
||||
|
Loading…
Reference in New Issue
Block a user