|
15 | 15 | in
|
16 | 16 | {
|
17 | 17 | overlays.default = (final: prev: {
|
18 |
| - git-branchless = final.callPackage |
19 |
| - ( |
20 |
| - { lib |
21 |
| - , git |
22 |
| - , libiconv |
23 |
| - , ncurses |
24 |
| - , openssl |
25 |
| - , pkg-config |
26 |
| - , rustPlatform |
27 |
| - , sqlite |
28 |
| - , stdenv |
29 |
| - , Security |
30 |
| - , SystemConfiguration |
31 |
| - }: |
32 |
| - |
33 |
| - rustPlatform.buildRustPackage { |
34 |
| - name = "git-branchless"; |
35 | 18 |
|
36 |
| - src = self; |
37 |
| - |
38 |
| - cargoLock = { |
39 |
| - lockFile = "${self}/Cargo.lock"; |
40 |
| - }; |
41 |
| - |
42 |
| - nativeBuildInputs = [ pkg-config ]; |
| 19 | + # reuse the definition from nixpkgs git-branchless |
| 20 | + git-branchless = prev.git-branchless.overrideAttrs ({ meta, ... }: { |
| 21 | + name = "git-branchless"; |
| 22 | + src = self; |
| 23 | + cargoDeps = final.rustPlatform.importCargoLock { |
| 24 | + lockFile = ./Cargo.lock; |
| 25 | + }; |
43 | 26 |
|
44 |
| - buildInputs = [ |
45 |
| - ncurses |
46 |
| - openssl |
47 |
| - sqlite |
48 |
| - ] ++ lib.optionals stdenv.isDarwin [ |
49 |
| - Security |
50 |
| - SystemConfiguration |
51 |
| - libiconv |
52 |
| - ]; |
| 27 | + # for `flake.nix` contributors: put additional local overrides here. |
| 28 | + # if the changes are also applicable to the `git-branchless` package |
| 29 | + # in nixpkgs, consider first improving the definition there, and then |
| 30 | + # update the `flake.lock` here. |
53 | 31 |
|
54 |
| - preCheck = '' |
55 |
| - export TEST_GIT=${git}/bin/git |
56 |
| - export TEST_GIT_EXEC_PATH=$(${git}/bin/git --exec-path) |
57 |
| - ''; |
58 |
| - # FIXME: these tests time out when run in the Nix sandbox |
59 |
| - checkFlags = [ |
60 |
| - "--skip=test_switch_pty" |
61 |
| - "--skip=test_next_ambiguous_interactive" |
62 |
| - "--skip=test_switch_auto_switch_interactive" |
63 |
| - ]; |
64 |
| - } |
65 |
| - ) |
66 |
| - { |
67 |
| - inherit (final.darwin.apple_sdk.frameworks) Security SystemConfiguration; |
| 32 | + # in case local overrides might confuse upstream maintainers, |
| 33 | + # we do not list them here: |
| 34 | + meta = (removeAttrs meta [ "maintainers" ]) // { |
| 35 | + # to correctly generate meta.position for back trace: |
| 36 | + inherit (meta) description; |
68 | 37 | };
|
| 38 | + }); |
69 | 39 |
|
70 | 40 | scm-diff-editor = final.callPackage
|
71 | 41 | (
|
|
0 commit comments