-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(nix): Build all crates, for now
- Loading branch information
Showing
4 changed files
with
174 additions
and
70 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,158 @@ | ||
{ inputs, ... }: | ||
{ | ||
perSystem = { config, self', pkgs, lib, system, ... }: | ||
let | ||
inherit (pkgs.stdenv) isDarwin; | ||
inherit (pkgs.darwin) apple_sdk; | ||
in | ||
{ | ||
rust-project = { | ||
# NOTE: It may be possible to obviate much of these buildInputs using | ||
# https://github.com/juspay/rust-flake/issues/14 | ||
# TODO(CI time): autoWire only necessary crates (i.e., those with binaries) | ||
# https://github.com/juspay/rust-flake/pull/13#issuecomment-2226992061 | ||
crates = { | ||
"cac_client" = { | ||
crane = { | ||
args = { | ||
buildInputs = lib.optionals isDarwin | ||
(with apple_sdk.frameworks; [ | ||
Security | ||
]) ++ [ | ||
pkgs.postgresql_12 | ||
pkgs.openssl | ||
]; | ||
}; | ||
}; | ||
}; | ||
"experimentation_client" = { | ||
crane = { | ||
args = { | ||
buildInputs = lib.optionals isDarwin | ||
([ | ||
apple_sdk.frameworks.Security | ||
]) ++ [ | ||
pkgs.postgresql_12 | ||
pkgs.openssl | ||
]; | ||
}; | ||
}; | ||
}; | ||
"experimentation_example" = { | ||
crane = { | ||
args = { | ||
buildInputs = lib.optionals isDarwin | ||
([ | ||
apple_sdk.frameworks.Security | ||
]) ++ [ | ||
pkgs.openssl | ||
]; | ||
}; | ||
}; | ||
}; | ||
"experimentation_platform" = { | ||
crane = { | ||
args = { | ||
buildInputs = lib.optionals isDarwin | ||
([ | ||
apple_sdk.frameworks.Security | ||
]) ++ [ | ||
pkgs.openssl | ||
pkgs.postgresql_12 | ||
]; | ||
}; | ||
}; | ||
}; | ||
"frontend" = { | ||
crane = { | ||
args = { | ||
buildInputs = lib.optionals isDarwin | ||
([ | ||
apple_sdk.frameworks.Security | ||
]) ++ [ | ||
pkgs.openssl | ||
]; | ||
}; | ||
}; | ||
}; | ||
"service_utils" = { | ||
crane = { | ||
args = { | ||
buildInputs = lib.optionals isDarwin | ||
([ | ||
apple_sdk.frameworks.Security | ||
]) ++ [ | ||
pkgs.openssl | ||
pkgs.postgresql_12 | ||
]; | ||
}; | ||
}; | ||
}; | ||
"cac_client_integration_example" = { | ||
crane = { | ||
args = { | ||
buildInputs = lib.optionals isDarwin | ||
([ | ||
apple_sdk.frameworks.Security | ||
]) ++ [ | ||
pkgs.openssl | ||
pkgs.postgresql_12 | ||
]; | ||
}; | ||
}; | ||
}; | ||
"context_aware_config" = { | ||
crane = { | ||
args = { | ||
buildInputs = lib.optionals isDarwin | ||
([ | ||
apple_sdk.frameworks.Security | ||
]) ++ [ | ||
pkgs.openssl | ||
pkgs.postgresql_12 | ||
]; | ||
}; | ||
}; | ||
}; | ||
"superposition_types" = { | ||
crane = { | ||
args = { | ||
buildInputs = lib.optionals isDarwin | ||
([ | ||
# apple_sdk.frameworks.Security | ||
]) ++ [ | ||
pkgs.postgresql_12 | ||
]; | ||
}; | ||
}; | ||
}; | ||
"superposition" = { | ||
crane = { | ||
clippy.enable = false; # https://github.com/juspay/superposition/issues/19 | ||
args = { | ||
buildInputs = lib.optionals isDarwin | ||
([ | ||
apple_sdk.frameworks.Security | ||
apple_sdk.frameworks.SystemConfiguration | ||
pkgs.fixDarwinDylibNames | ||
]) ++ [ | ||
pkgs.libiconv | ||
pkgs.openssl | ||
pkgs.postgresql_12 | ||
]; | ||
nativeBuildInputs = with pkgs; [ | ||
pkg-config | ||
]; | ||
}; | ||
extraBuildArgs = { | ||
# https://discourse.nixos.org/t/how-to-use-install-name-tool-on-darwin/9931/2 | ||
postInstall = '' | ||
${if isDarwin then "fixDarwinDylibNames" else ""} | ||
''; | ||
}; | ||
}; | ||
}; | ||
}; | ||
}; | ||
}; | ||
} |