From b08a915532fc42c71253c4cf261d13bec2ef298a Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Sat, 18 May 2024 11:35:02 +0200 Subject: [PATCH] treewide: drop workarounds for cargo --frozen Since 4816a73bb53c ("rustPlatform: --frozen -> --offline"), these are no longer necessary! --- pkgs/applications/display-managers/lemurs/default.nix | 3 --- pkgs/applications/misc/slippy/default.nix | 5 ----- pkgs/applications/networking/irc/tiny/default.nix | 5 ----- pkgs/applications/networking/sync/celeste/default.nix | 5 ----- pkgs/by-name/bu/bunbun/package.nix | 5 ----- pkgs/by-name/es/esbuild-config/package.nix | 5 ----- pkgs/development/compilers/rust/cargo-auditable.nix | 5 ----- pkgs/development/python-modules/quil/default.nix | 4 ---- pkgs/development/python-modules/tokenizers/default.nix | 6 ------ .../development/tools/rust/cargo-local-registry/default.nix | 5 ----- pkgs/development/tools/rust/sqlx-cli/default.nix | 6 ------ pkgs/tools/graphics/gifski/default.nix | 5 ----- pkgs/tools/misc/bartib/default.nix | 3 --- pkgs/tools/misc/kalker/default.nix | 5 ----- pkgs/tools/misc/pouf/default.nix | 5 ----- pkgs/tools/text/teip/default.nix | 5 ----- 16 files changed, 77 deletions(-) diff --git a/pkgs/applications/display-managers/lemurs/default.nix b/pkgs/applications/display-managers/lemurs/default.nix index a83b6c271448..a480b4fbd8a8 100644 --- a/pkgs/applications/display-managers/lemurs/default.nix +++ b/pkgs/applications/display-managers/lemurs/default.nix @@ -19,9 +19,6 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-uuHPJe+1VsnLRGbHtgTMrib6Tk359cwTDVfvtHnDToo="; - # Fixes a lock issue - preConfigure = "cargo update --offline"; - buildInputs = [ linux-pam ]; diff --git a/pkgs/applications/misc/slippy/default.nix b/pkgs/applications/misc/slippy/default.nix index 40de95838ad5..cf5cd1ff0b3d 100644 --- a/pkgs/applications/misc/slippy/default.nix +++ b/pkgs/applications/misc/slippy/default.nix @@ -53,11 +53,6 @@ rustPlatform.buildRustPackage rec { darwin.apple_sdk.frameworks.Security ]; - # Cargo.lock is outdated - postConfigure = '' - cargo metadata --offline - ''; - meta = with lib; { description = "Markdown slideshows in Rust"; homepage = "https://github.com/axodotdev/slippy"; diff --git a/pkgs/applications/networking/irc/tiny/default.nix b/pkgs/applications/networking/irc/tiny/default.nix index 4eae9c18111c..a4bca115a0b0 100644 --- a/pkgs/applications/networking/irc/tiny/default.nix +++ b/pkgs/applications/networking/irc/tiny/default.nix @@ -23,11 +23,6 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-AhQCfLCoJU7o8s+XL3hDOPmZi9QjOxXSA9uglA1KSuY="; - # Cargo.lock is outdated - preConfigure = '' - cargo metadata --offline - ''; - nativeBuildInputs = lib.optional stdenv.isLinux pkg-config; buildInputs = lib.optionals dbusSupport [ dbus ] ++ lib.optionals useOpenSSL [ openssl ] diff --git a/pkgs/applications/networking/sync/celeste/default.nix b/pkgs/applications/networking/sync/celeste/default.nix index 1836ebd1e6d9..7eef4f451005 100644 --- a/pkgs/applications/networking/sync/celeste/default.nix +++ b/pkgs/applications/networking/sync/celeste/default.nix @@ -47,11 +47,6 @@ rustPlatform.buildRustPackage rec { sed -i "#/bin/celeste#d" justfile ''; - # Cargo.lock is outdated - preConfigure = '' - cargo update --offline - ''; - RUSTC_BOOTSTRAP = 1; nativeBuildInputs = [ diff --git a/pkgs/by-name/bu/bunbun/package.nix b/pkgs/by-name/bu/bunbun/package.nix index 79d158fb6ae7..915f29fcec09 100644 --- a/pkgs/by-name/bu/bunbun/package.nix +++ b/pkgs/by-name/bu/bunbun/package.nix @@ -24,11 +24,6 @@ rustPlatform.buildRustPackage rec { darwin.apple_sdk.frameworks.SystemConfiguration ]; - # Cargo.lock is outdated - preConfigure = '' - cargo update --offline - ''; - meta = with lib; { description = "A simple and adorable sysinfo utility written in Rust"; homepage = "https://github.com/devraza/bunbun"; diff --git a/pkgs/by-name/es/esbuild-config/package.nix b/pkgs/by-name/es/esbuild-config/package.nix index d68db5c89a47..6324add2b934 100644 --- a/pkgs/by-name/es/esbuild-config/package.nix +++ b/pkgs/by-name/es/esbuild-config/package.nix @@ -16,11 +16,6 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-Z7uYOjMNxsEmsEXDOIr1zIq4nCgHvHIqpRnRH037b8g="; - # Cargo.lock is outdated - postConfigure = '' - cargo metadata --offline - ''; - meta = with lib; { description = "Config files for esbuild"; homepage = "https://github.com/bpierre/esbuild-config"; diff --git a/pkgs/development/compilers/rust/cargo-auditable.nix b/pkgs/development/compilers/rust/cargo-auditable.nix index 1cf765b35100..0b3b6a4ede98 100644 --- a/pkgs/development/compilers/rust/cargo-auditable.nix +++ b/pkgs/development/compilers/rust/cargo-auditable.nix @@ -22,11 +22,6 @@ let cargoHash = "sha256-4o3ctun/8VcBRuj+j0Yaawdkyn6Z6LPp+FTyhPxQWU8="; - # Cargo.lock is outdated - preConfigure = '' - cargo update --offline - ''; - meta = with lib; { description = "A tool to make production Rust binaries auditable"; mainProgram = "cargo-auditable"; diff --git a/pkgs/development/python-modules/quil/default.nix b/pkgs/development/python-modules/quil/default.nix index 4043f8b332fd..225f80d45f26 100644 --- a/pkgs/development/python-modules/quil/default.nix +++ b/pkgs/development/python-modules/quil/default.nix @@ -33,10 +33,6 @@ buildPythonPackage rec { buildAndTestSubdir = "quil-py"; - preConfigure = '' - cargo metadata --offline - ''; - build-system = [ rustPlatform.cargoSetupHook rustPlatform.maturinBuildHook diff --git a/pkgs/development/python-modules/tokenizers/default.nix b/pkgs/development/python-modules/tokenizers/default.nix index 92d55ef4a235..06a4d4217550 100644 --- a/pkgs/development/python-modules/tokenizers/default.nix +++ b/pkgs/development/python-modules/tokenizers/default.nix @@ -100,12 +100,6 @@ buildPythonPackage rec { Security ]; - # Cargo.lock is outdated - # TODO: remove at next release - preConfigure = '' - cargo update --offline - ''; - dependencies = [ numpy huggingface-hub diff --git a/pkgs/development/tools/rust/cargo-local-registry/default.nix b/pkgs/development/tools/rust/cargo-local-registry/default.nix index 0b2f31d05a80..36a52bc1763a 100644 --- a/pkgs/development/tools/rust/cargo-local-registry/default.nix +++ b/pkgs/development/tools/rust/cargo-local-registry/default.nix @@ -42,11 +42,6 @@ rustPlatform.buildRustPackage rec { # tests require internet access doCheck = false; - # Cargo.lock is outdated - preConfigure = '' - cargo metadata --offline - ''; - meta = with lib; { description = "A cargo subcommand to manage local registries"; mainProgram = "cargo-local-registry"; diff --git a/pkgs/development/tools/rust/sqlx-cli/default.nix b/pkgs/development/tools/rust/sqlx-cli/default.nix index 81c02a0d636b..fed8c02a5eaf 100644 --- a/pkgs/development/tools/rust/sqlx-cli/default.nix +++ b/pkgs/development/tools/rust/sqlx-cli/default.nix @@ -27,12 +27,6 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-sMyK1v4pJmmlN47mvgUkpLBjcpmT346VSp984IpvVWY="; - # Prepare the Cargo.lock for offline use. - # See https://github.com/NixOS/nixpkgs/issues/261412 - postConfigure = '' - cargo metadata --offline > /dev/null - ''; - buildNoDefaultFeatures = true; buildFeatures = [ "native-tls" diff --git a/pkgs/tools/graphics/gifski/default.nix b/pkgs/tools/graphics/gifski/default.nix index ba2427281528..b95fc26e6715 100644 --- a/pkgs/tools/graphics/gifski/default.nix +++ b/pkgs/tools/graphics/gifski/default.nix @@ -44,11 +44,6 @@ rustPlatform.buildRustPackage rec { # checkType = "debug"; - # Cargo.lock is outdated - postPatch = '' - cargo metadata --offline - ''; - meta = with lib; { description = "GIF encoder based on libimagequant (pngquant)"; homepage = "https://gif.ski/"; diff --git a/pkgs/tools/misc/bartib/default.nix b/pkgs/tools/misc/bartib/default.nix index 0719f8a168bb..f958c5396f1d 100644 --- a/pkgs/tools/misc/bartib/default.nix +++ b/pkgs/tools/misc/bartib/default.nix @@ -12,9 +12,6 @@ rustPlatform.buildRustPackage rec { }; cargoSha256 = "sha256-s/oGv7/0LgNpdGu6dnvvbxDgFDvcvcHL01dSPxhMVWE="; - preConfigure = '' - cargo metadata --offline - ''; nativeBuildInputs = [ installShellFiles ]; diff --git a/pkgs/tools/misc/kalker/default.nix b/pkgs/tools/misc/kalker/default.nix index ef152524da7a..604fab1878f5 100644 --- a/pkgs/tools/misc/kalker/default.nix +++ b/pkgs/tools/misc/kalker/default.nix @@ -23,11 +23,6 @@ rustPlatform.buildRustPackage rec { outputs = [ "out" "lib" ]; - # Cargo.lock is outdated - preConfigure = '' - cargo metadata --offline - ''; - postInstall = '' moveToOutput "lib" "$lib" ''; diff --git a/pkgs/tools/misc/pouf/default.nix b/pkgs/tools/misc/pouf/default.nix index e114af2c2c1e..ac37b64a7a88 100644 --- a/pkgs/tools/misc/pouf/default.nix +++ b/pkgs/tools/misc/pouf/default.nix @@ -16,11 +16,6 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-rVJAaeg27SdM8cTx12rKLIGEYtXUhLHXUYpT78oVNlo="; - # Cargo.lock is outdated. - preConfigure = '' - cargo update --offline - ''; - postInstall = "make PREFIX=$out copy-data"; meta = with lib; { diff --git a/pkgs/tools/text/teip/default.nix b/pkgs/tools/text/teip/default.nix index caa665fc3c93..df36a0a2129c 100644 --- a/pkgs/tools/text/teip/default.nix +++ b/pkgs/tools/text/teip/default.nix @@ -23,11 +23,6 @@ rustPlatform.buildRustPackage rec { nativeCheckInputs = [ perl ]; - # Cargo.lock is outdated - preConfigure = '' - cargo update --offline - ''; - # tests are locale sensitive preCheck = '' export LANG=${if stdenv.isDarwin then "en_US.UTF-8" else "C.UTF-8"}