File tree Expand file tree Collapse file tree 3 files changed +34
-60
lines changed
Expand file tree Collapse file tree 3 files changed +34
-60
lines changed Original file line number Diff line number Diff line change 2727 ] ;
2828
2929 forAllSystems = f : nixpkgs . lib . genAttrs systems ( system : f nixpkgs . legacyPackages . ${ system } ) ;
30- mkCargoAbout = pkgs : pkgs . callPackage ./nix/cargo-about.nix { } ;
3130 mkZed =
3231 pkgs :
3332 let
34- lib = pkgs . lib ;
3533 rustBin = rust-overlay . lib . mkRustBin { } pkgs ;
3634 in
37- pkgs . callPackage ./nix/build.nix (
38- {
39- crane = crane . mkLib pkgs ;
40- rustToolchain = rustBin . fromRustupToolchainFile ./rust-toolchain.toml ;
41- }
42- // ( lib . optionalAttrs ( pkgs . cargo-about . version != "0.8.2" ) {
43- # Only vendor the build of cargo-about if the input nixpkgs has the wrong version.
44- cargo-about = mkCargoAbout pkgs ;
45- } )
46- ) ;
35+ pkgs . callPackage ./nix/build.nix {
36+ crane = crane . mkLib pkgs ;
37+ rustToolchain = rustBin . fromRustupToolchainFile ./rust-toolchain.toml ;
38+ } ;
4739 in
4840 rec {
4941 packages = forAllSystems ( pkgs : rec {
Original file line number Diff line number Diff line change 9090 perl
9191 pkg-config
9292 protobuf
93- cargo-about
9493 rustPlatform . bindgenHook
9594 ]
9695 ++ lib . optionals stdenv' . hostPlatform . isLinux [ makeWrapper ]
106105 } ;
107106 cargoHash = "sha256-urn+A3yuw2uAO4HGmvQnKvWtHqvG9KHxNCCWTiytE4k=" ;
108107
108+ # NOTE: can drop once upstream uses `finalAttrs` here:
109+ # https://github.com/NixOS/nixpkgs/blob/10214747f5e6e7cb5b9bdf9e018a3c7b3032f5af/pkgs/build-support/rust/build-rust-package/default.nix#L104
110+ #
111+ # See (for context): https://github.com/NixOS/nixpkgs/pull/382550
112+ cargoDeps = rustPlatform . fetchCargoVendor {
113+ inherit ( new ) src ;
114+ hash = new . cargoHash ;
115+ patches = new . cargoPatches or [ ] ;
116+ name = new . cargoDepsName or new . finalPackage . name ;
117+ } ;
118+ }
119+ ) )
120+ ]
121+ # Pin cargo-about to 0.8.2. Newer versions don't work with the current license identifiers
122+ # See https://github.com/zed-industries/zed/pull/44012
123+ ++ lib . optionals ( cargo-about . version == "0.8.2" ) [ cargo-about ]
124+ ++ lib . optionals ( cargo-about . version != "0.8.2" ) [
125+ ( cargo-about . overrideAttrs (
126+ new : old : rec {
127+ version = "0.8.2" ;
128+
129+ src = fetchFromGitHub {
130+ owner = "EmbarkStudios" ;
131+ repo = "cargo-about" ;
132+ tag = version ;
133+ sha256 = "sha256-cNKZpDlfqEXeOE5lmu79AcKOawkPpk4PQCsBzNtIEbs=" ;
134+ } ;
135+
136+ cargoHash = "sha256-NnocSs6UkuF/mCM3lIdFk+r51Iz2bHuYzMT/gEbT/nk=" ;
137+
109138 # NOTE: can drop once upstream uses `finalAttrs` here:
110139 # https://github.com/NixOS/nixpkgs/blob/10214747f5e6e7cb5b9bdf9e018a3c7b3032f5af/pkgs/build-support/rust/build-rust-package/default.nix#L104
111140 #
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments