|
33 | 33 | # nix-repl> :lf nixpkgs |
34 | 34 | # nix-repl> pkgs = legacyPackages.${builtins.currentSystem} |
35 | 35 |
|
36 | | - # - Build `f` with the version and the hash of the `src` of the new version. |
37 | | - # - Use the `got:` hash. |
38 | | - |
39 | | - # Hashes of the source code in releases (https://github.com/vadimcn/codelldb/releases) |
40 | | - # nix-repl> rev = "1.11.6" |
| 36 | + # Get the hash of a source code in a release (https://github.com/vadimcn/codelldb/releases) |
| 37 | + # |
| 38 | + # nix-repl> rev = "1.11.7" |
41 | 39 | # nix-repl> src = pkgs.fetchFromGitHub { owner = "vadimcn"; repo = "codelldb"; rev = "v${rev}"; hash = ""; } |
42 | 40 | # nix-repl> :b src |
43 | 41 | # |
44 | | - # copy the hash that you got |
45 | | - # |
46 | | - # nix-repl> src = pkgs.fetchFromGitHub { owner = "vadimcn"; repo = "codelldb"; rev = "v${rev}"; hash = "sha256-uqvcixxJduF1l/qgt2rIACNsPcH1REiVwRz3zZBA82Q="; } |
47 | | - hash = |
48 | | - { |
49 | | - "1.11.0" = "sha256-BzLKRs1fbLN4XSltnxPsgUG7ZJSMz/yJ/jQDZ9OTVxY="; |
50 | | - "1.11.1" = "sha256-b063cCuiDpaeSSWxY0sbKsZucY7BCxI5s+35soJRFFQ="; |
51 | | - "1.11.2" = "sha256-wj0X7nAcMU+kwl2qQRKixF+kTbTlnpgU7BYwaibIIKQ="; |
52 | | - "1.11.3" = "sha256-zqaJzRTYc2gsipnbn4t16u62C/gkIohenWJDTEvZRvU="; |
53 | | - "1.11.4" = "sha256-+Pe7ij5ukF5pLgwvr+HOHjIv1TQDiPOEeJtkpIW9XWI="; |
54 | | - "1.11.5" = "sha256-mp50QmYmqMjIUfGKAt8fWcov4Bn9ruya+SwXGT3T/zk="; |
55 | | - "1.11.6" = "sha256-uqvcixxJduF1l/qgt2rIACNsPcH1REiVwRz3zZBA82Q="; |
56 | | - } |
57 | | - .${version}; |
| 42 | + # Write here the hash that you `got:`. |
| 43 | + hash = "sha256-qbpl+/GsMjhs7xZdt8r3CM5gYOowBlu/yCd5RmU2eXE="; |
| 44 | + |
| 45 | + # Write here the hash from above. |
| 46 | + # nix-repl> src = pkgs.fetchFromGitHub { owner = "vadimcn"; repo = "codelldb"; rev = "v${rev}"; hash = "sha256-qbpl+/GsMjhs7xZdt8r3CM5gYOowBlu/yCd5RmU2eXE="; } |
58 | 47 |
|
59 | 48 | # nix-repl> :b pkgs.rustPlatform.buildRustPackage { cargoHash = ""; name = "dummy"; inherit src; useFetchCargoVendor = true; } |
60 | 49 | # |
61 | | - # add here the cargoHash that you got. |
62 | | - cargoHash = |
63 | | - { |
64 | | - "1.11.0" = "sha256-cLmL+QnFh2HwS2FcKTmGYI1NsrGV7MLWf3UBhNzBo0g="; |
65 | | - "1.11.1" = "sha256-HFu3u/DX+SOIwwgk7+2EbQZ1tp9yqaV1CxiCN1PgXwM="; |
66 | | - "1.11.2" = "sha256-Bl7bD+ulRJkeTdzyS8T/eMBmFaeqgMFFg3OTwSfo/RY="; |
67 | | - "1.11.3" = "sha256-Nh4YesgWa1JR8tLfrIRps9TBdsAfilXu6G2/kB08co8="; |
68 | | - "1.11.4" = "sha256-Nh4YesgWa1JR8tLfrIRps9TBdsAfilXu6G2/kB08co8="; |
69 | | - "1.11.5" = "sha256-nTQbgYDDDI+pnKpCAUWDtk5rujjlK+7ZLUgPp1C/foo="; |
70 | | - "1.11.6" = "sha256-jAr/5wW9Vy2xfgHKeJGz/vuIRuouVAGH3XHFdQ34x4A="; |
71 | | - } |
72 | | - .${version}; |
| 50 | + # Write here the hash that you `got:`. |
| 51 | + cargoHash = "sha256-jAr/5wW9Vy2xfgHKeJGz/vuIRuouVAGH3XHFdQ34x4A="; |
73 | 52 |
|
74 | 53 | # nix-repl> :b pkgs.buildNpmPackage { npmDepsHash = ""; name = "dummy"; inherit src; dontNpmBuild = true; } |
75 | 54 | # |
76 | | - # add here the npmDepsHash that you got. |
77 | | - npmDepsHash = |
78 | | - { |
79 | | - "1.11.0" = "sha256-JRLXPsru+4cJe/WInYSr57+Js7mohL1CMR9LLCXORDg="; |
80 | | - "1.11.1" = "sha256-4CCvOh7XOUsdI/gzDfx0OwzE7rhdCYFO49wVv6Gn/J0="; |
81 | | - "1.11.2" = "sha256-oqRV9oDYPJkSkvYJA0jCgDyfzy6AnYq/ftRPM3swDyE="; |
82 | | - "1.11.3" = "sha256-Efeun7AFMAnoNXLbTGH7OWHaBHT2tO9CodfjKrIYw40="; |
83 | | - "1.11.4" = "sha256-Efeun7AFMAnoNXLbTGH7OWHaBHT2tO9CodfjKrIYw40="; |
84 | | - "1.11.5" = "sha256-mHSY4LqcQiaVs6qvusxjybdKyrMh9sQatBanpIo6xk4="; |
85 | | - "1.11.6" = "sha256-cS7Fr4mrq0QIPFtG5VjLEOOiC2QuVDW+Ispt2LmI258="; |
86 | | - } |
87 | | - .${version}; |
| 55 | + # Write here the hash that you `got:`. |
| 56 | + npmDepsHash = "sha256-cS7Fr4mrq0QIPFtG5VjLEOOiC2QuVDW+Ispt2LmI258="; |
88 | 57 |
|
89 | 58 | src = fetchFromGitHub { |
90 | 59 | owner = "vadimcn"; |
|
125 | 94 | ; |
126 | 95 | } |
127 | 96 | ); |
| 97 | + |
| 98 | + codelldb-types = ( |
| 99 | + callPackage ./lldb-types.nix { |
| 100 | + inherit |
| 101 | + pname |
| 102 | + src |
| 103 | + version |
| 104 | + cargoHash |
| 105 | + nodeDeps |
| 106 | + ; |
| 107 | + } |
| 108 | + ); |
128 | 109 | in |
129 | 110 | lib.customisation.makeOverridable stdenv.mkDerivation { |
130 | 111 | pname = "vscode-extension-${publisher}-${pname}"; |
@@ -155,6 +136,14 @@ lib.customisation.makeOverridable stdenv.mkDerivation { |
155 | 136 |
|
156 | 137 | postConfigure = '' |
157 | 138 | cp -r ${nodeDeps}/lib/node_modules . |
| 139 | +
|
| 140 | + # Copy pre-built package.json and generated types from codelldb-types |
| 141 | + cp ${codelldb-types}/package.json . |
| 142 | + mkdir -p generated |
| 143 | + cp -r ${codelldb-types}/generated/* generated/ |
| 144 | +
|
| 145 | + # Touch the files to ensure they're newer than dependencies |
| 146 | + touch package.json generated/codelldb.ts |
158 | 147 | '' |
159 | 148 | + lib.optionalString stdenv.hostPlatform.isDarwin '' |
160 | 149 | export HOME="$TMPDIR/home" |
@@ -197,7 +186,7 @@ lib.customisation.makeOverridable stdenv.mkDerivation { |
197 | 186 | ''; |
198 | 187 |
|
199 | 188 | passthru = { |
200 | | - inherit lldb adapter; |
| 189 | + inherit lldb adapter codelldb-types; |
201 | 190 | updateScript = ./update.sh; |
202 | 191 | }; |
203 | 192 |
|
|
0 commit comments