... oops forgot to format

This commit is contained in:
Artemis Tosini 2024-01-20 04:35:35 +00:00
parent 17f428ec41
commit f8477295a5
Signed by: artemist
GPG key ID: EE5227935FE3FF18

View file

@ -1,18 +1,14 @@
# Based on original package.nix from zhaofengli
{ lib, stdenv, rustPlatform
, fetchFromGitHub
, pkg-config
, installShellFiles
, nix
, boost
, darwin
{ lib, stdenv, rustPlatform, fetchFromGitHub, pkg-config, installShellFiles, nix
, boost, darwin
# Only build the client
, clientOnly ? false
# Only build certain crates
, crates ? if clientOnly then [ "attic-client" ] else [ "attic-client" "attic-server" ]
, crates ?
if clientOnly then [ "attic-client" ] else [ "attic-client" "attic-server" ]
}:
rustPlatform.buildRustPackage {
@ -31,16 +27,10 @@ rustPlatform.buildRustPackage {
allowBuiltinFetchGit = true;
};
nativeBuildInputs = [
pkg-config
installShellFiles
];
nativeBuildInputs = [ pkg-config installShellFiles ];
buildInputs = [
nix boost
] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [
SystemConfiguration
]);
buildInputs = [ nix boost ] ++ lib.optionals stdenv.isDarwin
(with darwin.apple_sdk.frameworks; [ SystemConfiguration ]);
cargoBuildFlags = lib.concatMapStrings (c: "-p ${c} ") crates;
@ -54,7 +44,8 @@ rustPlatform.buildRustPackage {
# Recursive Nix is not stable yet
doCheck = false;
postInstall = lib.optionalString (stdenv.hostPlatform == stdenv.buildPlatform) ''
postInstall =
lib.optionalString (stdenv.hostPlatform == stdenv.buildPlatform) ''
if [[ -f $out/bin/attic ]]; then
installShellCompletion --cmd attic \
--bash <($out/bin/attic gen-completions bash) \