22 stdenv ,
33 lib ,
44 fetchFromGitHub ,
5+ fetchpatch2 ,
56 coreutils ,
67 darwin ,
78 glibcLocales ,
2829 versionCheckHook ,
2930 writableTmpDirAsHomeHook ,
3031
31- fetchpatch2 ,
32- applyPatches ,
33-
3432 # used to generate autocompletions from manpages and for configuration editing in the browser
3533 usePython ? true ,
3634
@@ -157,23 +155,11 @@ stdenv.mkDerivation (finalAttrs: {
157155 pname = "fish" ;
158156 version = "4.0.0" ;
159157
160- src = applyPatches {
161- src = fetchFromGitHub {
162- owner = "fish-shell" ;
163- repo = "fish-shell" ;
164- tag = finalAttrs . version ;
165- hash = "sha256-BLbL5Tj3FQQCOeX5TWXMaxCpvdzZtKe5dDQi66uU/BM=" ;
166- } ;
167- patches = [
168- # Fix for wrong version number in Cargo.toml
169- # We need to apply this here instead of in the patch phase since we need
170- # the patched lock file for the cargo deps fetching
171- ( fetchpatch2 {
172- name = "cargo_version.diff" ;
173- url = "https://github.com/fish-shell/fish-shell/commit/1e069b0fff20b153bc7f824f9f9b820ca4117e1e.diff?full_index=1" ;
174- hash = "sha256-XFJ0fT2Zanvdqt/iwgyH2IA/kIOcOHMNdsmuzjTX5qs=" ;
175- } )
176- ] ;
158+ src = fetchFromGitHub {
159+ owner = "fish-shell" ;
160+ repo = "fish-shell" ;
161+ tag = finalAttrs . version ;
162+ hash = "sha256-BLbL5Tj3FQQCOeX5TWXMaxCpvdzZtKe5dDQi66uU/BM=" ;
177163 } ;
178164
179165 env = {
@@ -183,7 +169,7 @@ stdenv.mkDerivation (finalAttrs: {
183169 } ;
184170
185171 cargoDeps = rustPlatform . fetchCargoVendor {
186- inherit ( finalAttrs ) src ;
172+ inherit ( finalAttrs ) src patches ;
187173 hash = "sha256-4ol4LvabhtjiMMWwV1wrcywFePOmU0Jub1sy+Ay7mLA=" ;
188174 } ;
189175
@@ -204,6 +190,12 @@ stdenv.mkDerivation (finalAttrs: {
204190 # * <https://github.com/fish-shell/fish-shell/issues/7142>
205191 ./nix-darwin-path.patch
206192
193+ ( fetchpatch2 {
194+ name = "cargo_version.diff" ;
195+ url = "https://github.com/fish-shell/fish-shell/commit/1e069b0fff20b153bc7f824f9f9b820ca4117e1e.diff?full_index=1" ;
196+ hash = "sha256-XFJ0fT2Zanvdqt/iwgyH2IA/kIOcOHMNdsmuzjTX5qs=" ;
197+ } )
198+
207199 # Fixes a build issue in kitty, see https://github.com/fish-shell/fish-shell/commit/97f0809b62a1fa77df1b9fcbbfe623b6187b5013
208200 # The first patch is needed since it introduces the BufferedOutputter type that's
209201 # used by the second one.
0 commit comments