Loading doc/languages-frameworks/rust.section.md +65 −0 Original line number Diff line number Diff line Loading @@ -939,3 +939,68 @@ Fenix also has examples with `buildRustPackage`, [crane](https://github.com/ipetkov/crane), [naersk](https://github.com/nix-community/naersk), and cross compilation in its [Examples](https://github.com/nix-community/fenix#examples) section. ## Using `git bisect` on the Rust compiler {#using-git-bisect-on-the-rust-compiler} Sometimes an upgrade of the Rust compiler (`rustc`) will break a downstream package. In these situations, being able to `git bisect` the `rustc` version history to find the offending commit is quite useful. Nixpkgs makes it easy to do this. First, roll back your nixpkgs to a commit in which its `rustc` used *the most recent one which doesn't have the problem.* You'll need to do this because of `rustc`'s extremely aggressive version-pinning. Next, add the following overlay, updating the Rust version to the one in your rolled-back nixpkgs, and replacing `/git/scratch/rust` with the path into which you have `git clone`d the `rustc` git repository: ```nix (final: prev: /*lib.optionalAttrs prev.stdenv.targetPlatform.isAarch64*/ { rust_1_72 = lib.updateManyAttrsByPath [{ path = [ "packages" "stable" ]; update = old: old.overrideScope(final: prev: { rustc = prev.rustc.overrideAttrs (_: { src = lib.cleanSource /git/scratch/rust; # do *not* put passthru.isReleaseTarball=true here }); }); }] prev.rust_1_72; }) ``` If the problem you're troubleshooting only manifests when cross-compiling you can uncomment the `lib.optionalAttrs` in the example above, and replace `isAarch64` with the target that is having problems. This will speed up your bisect quite a bit, since the host compiler won't need to be rebuilt. Now, you can start a `git bisect` in the directory where you checked out the `rustc` source code. It is recommended to select the endpoint commits by searching backwards from `origin/master` for the *commits which added the release notes for the versions in question.* If you set the endpoints to commits on the release branches (i.e. the release tags), git-bisect will often get confused by the complex merge-commit structures it will need to traverse. The command loop you'll want to use for bisecting looks like this: ```bash git bisect {good,bad} # depending on result of last build git submodule update --init CARGO_NET_OFFLINE=false cargo vendor \ --sync ./src/tools/cargo/Cargo.toml \ --sync ./src/tools/rust-analyzer/Cargo.toml \ --sync ./compiler/rustc_codegen_cranelift/Cargo.toml \ --sync ./src/bootstrap/Cargo.toml nix-build $NIXPKGS -A package-broken-by-rust-changes ``` The `git submodule update --init` and `cargo vendor` commands above require network access, so they can't be performed from within the `rustc` derivation, unfortunately. pkgs/applications/networking/browsers/floorp/default.nix +2 −2 Original line number Diff line number Diff line Loading @@ -7,7 +7,7 @@ ((buildMozillaMach rec { pname = "floorp"; packageVersion = "11.5.0"; packageVersion = "11.5.1"; applicationName = "Floorp"; binaryName = "floorp"; version = "155.4.0"; Loading @@ -17,7 +17,7 @@ repo = "Floorp"; fetchSubmodules = true; rev = "v${packageVersion}"; hash = "sha256-adK3LAu3cDh6d+GvtnkWmSnxansnSZoIgtA9TAqIMyA="; hash = "sha256-988jKyfIGZ2UPHTNO1cK2lxR/5j3U/QYR3ZI9WsvHUI="; }; extraConfigureFlags = [ Loading pkgs/applications/networking/browsers/microsoft-edge/default.nix +6 −6 Original line number Diff line number Diff line { stable = import ./browser.nix { channel = "stable"; version = "118.0.2088.76"; version = "119.0.2151.44"; revision = "1"; sha256 = "sha256-cd8W/0UZi+NhPSILR8e8aOLxy6ra+0DVwRowo2jG8DA="; sha256 = "sha256-QY9Dk4tcpuNJGVcAcaIaVXAT95K87rK7ZQo7COMDpVU="; }; beta = import ./browser.nix { channel = "beta"; version = "119.0.2151.32"; version = "119.0.2151.44"; revision = "1"; sha256 = "sha256-tsDFUKZDiusr/fGO5NMRqzTDIF+MTgC/1gJu95wXwAw="; sha256 = "sha256-aLiitzCoMvJH2xAfo9bO7lEPMqKlb++BdJkrWx61SMc="; }; dev = import ./browser.nix { channel = "dev"; version = "120.0.2172.1"; version = "120.0.2186.2"; revision = "1"; sha256 = "sha256-EvTS0AO3/A8Ut9H36mMOnS9PRR062WAoas9/Pd90NBM="; sha256 = "sha256-L/rtOddk4bt8ffkRnq0BYcVjrSb7RmDaay85S5vixSM="; }; } pkgs/data/fonts/iosevka/default.nix +3 −3 Original line number Diff line number Diff line Loading @@ -55,16 +55,16 @@ assert (extraParameters != null) -> set != null; buildNpmPackage rec { pname = if set != null then "iosevka-${set}" else "iosevka"; version = "27.3.4"; version = "27.3.5"; src = fetchFromGitHub { owner = "be5invis"; repo = "iosevka"; rev = "v${version}"; hash = "sha256-JsK2jzXyAACh9e3P2y0YLky2XQuR/dKyEbRpFUSnJdM="; hash = "sha256-dqXr/MVOuEmAMueaRWsnzY9MabhnyBRtLR9IDVLN79I="; }; npmDepsHash = "sha256-uchJ+1NWbo4FpNOjOO3luhIdZyQZLToZ1UCMLdGzjkY="; npmDepsHash = "sha256-bux8aFBP1Pi5pAQY1jkNTqD2Ny2j+QQs+QRaXWJj6xg="; nativeBuildInputs = [ remarshal Loading pkgs/desktops/gnome/core/gnome-control-center/default.nix +6 −1 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ , gnome , gsettings-desktop-schemas , gsound , gst_all_1 , gtk4 , ibus , libgnomekbd Loading Loading @@ -134,7 +135,11 @@ stdenv.mkDerivation rec { tracker-miners # for search locations dialog udisks2 upower ]; ] ++ (with gst_all_1; [ # For animations in Mouse panel. gst-plugins-base gst-plugins-good ]); preConfigure = '' # For ITS rules Loading Loading
doc/languages-frameworks/rust.section.md +65 −0 Original line number Diff line number Diff line Loading @@ -939,3 +939,68 @@ Fenix also has examples with `buildRustPackage`, [crane](https://github.com/ipetkov/crane), [naersk](https://github.com/nix-community/naersk), and cross compilation in its [Examples](https://github.com/nix-community/fenix#examples) section. ## Using `git bisect` on the Rust compiler {#using-git-bisect-on-the-rust-compiler} Sometimes an upgrade of the Rust compiler (`rustc`) will break a downstream package. In these situations, being able to `git bisect` the `rustc` version history to find the offending commit is quite useful. Nixpkgs makes it easy to do this. First, roll back your nixpkgs to a commit in which its `rustc` used *the most recent one which doesn't have the problem.* You'll need to do this because of `rustc`'s extremely aggressive version-pinning. Next, add the following overlay, updating the Rust version to the one in your rolled-back nixpkgs, and replacing `/git/scratch/rust` with the path into which you have `git clone`d the `rustc` git repository: ```nix (final: prev: /*lib.optionalAttrs prev.stdenv.targetPlatform.isAarch64*/ { rust_1_72 = lib.updateManyAttrsByPath [{ path = [ "packages" "stable" ]; update = old: old.overrideScope(final: prev: { rustc = prev.rustc.overrideAttrs (_: { src = lib.cleanSource /git/scratch/rust; # do *not* put passthru.isReleaseTarball=true here }); }); }] prev.rust_1_72; }) ``` If the problem you're troubleshooting only manifests when cross-compiling you can uncomment the `lib.optionalAttrs` in the example above, and replace `isAarch64` with the target that is having problems. This will speed up your bisect quite a bit, since the host compiler won't need to be rebuilt. Now, you can start a `git bisect` in the directory where you checked out the `rustc` source code. It is recommended to select the endpoint commits by searching backwards from `origin/master` for the *commits which added the release notes for the versions in question.* If you set the endpoints to commits on the release branches (i.e. the release tags), git-bisect will often get confused by the complex merge-commit structures it will need to traverse. The command loop you'll want to use for bisecting looks like this: ```bash git bisect {good,bad} # depending on result of last build git submodule update --init CARGO_NET_OFFLINE=false cargo vendor \ --sync ./src/tools/cargo/Cargo.toml \ --sync ./src/tools/rust-analyzer/Cargo.toml \ --sync ./compiler/rustc_codegen_cranelift/Cargo.toml \ --sync ./src/bootstrap/Cargo.toml nix-build $NIXPKGS -A package-broken-by-rust-changes ``` The `git submodule update --init` and `cargo vendor` commands above require network access, so they can't be performed from within the `rustc` derivation, unfortunately.
pkgs/applications/networking/browsers/floorp/default.nix +2 −2 Original line number Diff line number Diff line Loading @@ -7,7 +7,7 @@ ((buildMozillaMach rec { pname = "floorp"; packageVersion = "11.5.0"; packageVersion = "11.5.1"; applicationName = "Floorp"; binaryName = "floorp"; version = "155.4.0"; Loading @@ -17,7 +17,7 @@ repo = "Floorp"; fetchSubmodules = true; rev = "v${packageVersion}"; hash = "sha256-adK3LAu3cDh6d+GvtnkWmSnxansnSZoIgtA9TAqIMyA="; hash = "sha256-988jKyfIGZ2UPHTNO1cK2lxR/5j3U/QYR3ZI9WsvHUI="; }; extraConfigureFlags = [ Loading
pkgs/applications/networking/browsers/microsoft-edge/default.nix +6 −6 Original line number Diff line number Diff line { stable = import ./browser.nix { channel = "stable"; version = "118.0.2088.76"; version = "119.0.2151.44"; revision = "1"; sha256 = "sha256-cd8W/0UZi+NhPSILR8e8aOLxy6ra+0DVwRowo2jG8DA="; sha256 = "sha256-QY9Dk4tcpuNJGVcAcaIaVXAT95K87rK7ZQo7COMDpVU="; }; beta = import ./browser.nix { channel = "beta"; version = "119.0.2151.32"; version = "119.0.2151.44"; revision = "1"; sha256 = "sha256-tsDFUKZDiusr/fGO5NMRqzTDIF+MTgC/1gJu95wXwAw="; sha256 = "sha256-aLiitzCoMvJH2xAfo9bO7lEPMqKlb++BdJkrWx61SMc="; }; dev = import ./browser.nix { channel = "dev"; version = "120.0.2172.1"; version = "120.0.2186.2"; revision = "1"; sha256 = "sha256-EvTS0AO3/A8Ut9H36mMOnS9PRR062WAoas9/Pd90NBM="; sha256 = "sha256-L/rtOddk4bt8ffkRnq0BYcVjrSb7RmDaay85S5vixSM="; }; }
pkgs/data/fonts/iosevka/default.nix +3 −3 Original line number Diff line number Diff line Loading @@ -55,16 +55,16 @@ assert (extraParameters != null) -> set != null; buildNpmPackage rec { pname = if set != null then "iosevka-${set}" else "iosevka"; version = "27.3.4"; version = "27.3.5"; src = fetchFromGitHub { owner = "be5invis"; repo = "iosevka"; rev = "v${version}"; hash = "sha256-JsK2jzXyAACh9e3P2y0YLky2XQuR/dKyEbRpFUSnJdM="; hash = "sha256-dqXr/MVOuEmAMueaRWsnzY9MabhnyBRtLR9IDVLN79I="; }; npmDepsHash = "sha256-uchJ+1NWbo4FpNOjOO3luhIdZyQZLToZ1UCMLdGzjkY="; npmDepsHash = "sha256-bux8aFBP1Pi5pAQY1jkNTqD2Ny2j+QQs+QRaXWJj6xg="; nativeBuildInputs = [ remarshal Loading
pkgs/desktops/gnome/core/gnome-control-center/default.nix +6 −1 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ , gnome , gsettings-desktop-schemas , gsound , gst_all_1 , gtk4 , ibus , libgnomekbd Loading Loading @@ -134,7 +135,11 @@ stdenv.mkDerivation rec { tracker-miners # for search locations dialog udisks2 upower ]; ] ++ (with gst_all_1; [ # For animations in Mouse panel. gst-plugins-base gst-plugins-good ]); preConfigure = '' # For ITS rules Loading