|
32 | 32 | url = "github:holochain/lair/lair_keystore-v0.4.4";
|
33 | 33 | flake = false;
|
34 | 34 | };
|
| 35 | + |
| 36 | + # Holochain Launcher CLI |
| 37 | + launcher-src = { |
| 38 | + url = "github:holochain/launcher/holochain-0.3"; |
| 39 | + flake = false; |
| 40 | + }; |
35 | 41 | };
|
36 | 42 |
|
37 | 43 | # outputs that this flake should produce
|
38 |
| - outputs = inputs @ { self, nixpkgs, flake-parts, rust-overlay, crane, holochain-src, lair-keystore-src, ... }: |
| 44 | + outputs = inputs @ { self, nixpkgs, flake-parts, rust-overlay, crane, holochain-src, lair-keystore-src, launcher-src, ... }: |
39 | 45 | # refer to flake-parts docs https://flake.parts/
|
40 | 46 | flake-parts.lib.mkFlake { inherit inputs; } {
|
41 | 47 | # systems that his flake can be used on
|
|
78 | 84 | };
|
79 | 85 | # additional packages needed for build
|
80 | 86 | buildInputs = [
|
81 |
| - pkgs.perl |
82 | 87 | pkgs.go
|
| 88 | + pkgs.perl |
83 | 89 | ];
|
84 | 90 | # do not check built package as it either builds successfully or not
|
85 | 91 | doCheck = false;
|
|
115 | 121 | # do not check built package as it either builds successfully or not
|
116 | 122 | doCheck = false;
|
117 | 123 | };
|
| 124 | + |
| 125 | + # define how to build Holochain Launcher binary |
| 126 | + launcher = |
| 127 | + let |
| 128 | + # Crane filters out all non-cargo related files. Define include filter with files needed for build. |
| 129 | + includeFilesFilter = path: type: (craneLib.filterCargoSources path type); |
| 130 | + in |
| 131 | + craneLib.buildPackage { |
| 132 | + pname = "hc-launch"; |
| 133 | + version = "workspace"; |
| 134 | + # only build hc-launch command |
| 135 | + cargoExtraArgs = "--bin hc-launch"; |
| 136 | + # Use Launcher sources as defined in input dependencies and include only those files defined in the |
| 137 | + # filter previously. |
| 138 | + src = pkgs.lib.cleanSourceWith { |
| 139 | + src = launcher-src; |
| 140 | + filter = includeFilesFilter; |
| 141 | + }; |
| 142 | + # additional packages needed for build |
| 143 | + # perl needed for openssl on all platforms |
| 144 | + buildInputs = [ |
| 145 | + pkgs.go |
| 146 | + pkgs.perl |
| 147 | + ] |
| 148 | + ++ (pkgs.lib.optionals pkgs.stdenv.isDarwin [ |
| 149 | + # additional packages needed for darwin platforms |
| 150 | + pkgs.darwin.apple_sdk.frameworks.AppKit |
| 151 | + pkgs.darwin.apple_sdk.frameworks.WebKit |
| 152 | + # pkgs.darwin.apple_sdk.frameworks.CoreFoundation |
| 153 | + # pkgs.darwin.apple_sdk.frameworks.CoreServices |
| 154 | + # pkgs.darwin.apple_sdk.frameworks.Security |
| 155 | + # pkgs.darwin.apple_sdk.frameworks.IOKit |
| 156 | + # # additional packages needed for darwin platforms on x86_64 |
| 157 | + # pkgs.darwin.apple_sdk_11_0.frameworks.CoreFoundation |
| 158 | + ]); |
| 159 | + # do not check built package as it either builds successfully or not |
| 160 | + doCheck = false; |
| 161 | + }; |
118 | 162 | in
|
119 | 163 | {
|
120 | 164 | packages = {
|
121 |
| - inherit holochain; |
122 |
| - inherit lair-keystore; |
123 |
| - inherit rust; |
| 165 | + # inherit holochain; |
| 166 | + # inherit lair-keystore; |
| 167 | + # inherit rust; |
| 168 | + inherit launcher; |
124 | 169 | };
|
125 | 170 |
|
126 | 171 | devShells = {
|
127 | 172 | default = pkgs.mkShell {
|
128 | 173 | packages = [
|
129 |
| - holochain |
130 |
| - lair-keystore |
131 |
| - rust |
| 174 | + # holochain |
| 175 | + # lair-keystore |
| 176 | + # rust |
132 | 177 | ];
|
133 | 178 | };
|
134 | 179 | };
|
|
0 commit comments