attic: init at unstable-2024-2-8
This commit is contained in:
parent
f176df8072
commit
495613d555
5174
pkgs/by-name/at/attic-client/Cargo.lock
generated
Normal file
5174
pkgs/by-name/at/attic-client/Cargo.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
72
pkgs/by-name/at/attic-client/package.nix
Normal file
72
pkgs/by-name/at/attic-client/package.nix
Normal file
@ -0,0 +1,72 @@
|
||||
{ lib
|
||||
, rustPlatform
|
||||
, fetchFromGitHub
|
||||
, nix
|
||||
, boost
|
||||
, pkg-config
|
||||
, stdenv
|
||||
, installShellFiles
|
||||
, darwin
|
||||
, crates ? [ "attic-client" ]
|
||||
}:
|
||||
rustPlatform.buildRustPackage {
|
||||
pname = "attic";
|
||||
version = "0.1.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "zhaofengli";
|
||||
repo = "attic";
|
||||
rev = "6eabc3f02fae3683bffab483e614bebfcd476b21";
|
||||
hash = "sha256-wSZjK+rOXn+UQiP1NbdNn5/UW6UcBxjvlqr2wh++MbM=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
installShellFiles
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
nix
|
||||
boost
|
||||
] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [
|
||||
SystemConfiguration
|
||||
]);
|
||||
|
||||
cargoLock = {
|
||||
lockFile = ./Cargo.lock;
|
||||
outputHashes = {
|
||||
"nix-base32-0.1.2-alpha.0" = "sha256-wtPWGOamy3+ViEzCxMSwBcoR4HMMD0t8eyLwXfCDFdo=";
|
||||
};
|
||||
};
|
||||
cargoBuildFlags = lib.concatMapStrings (c: "-p ${c} ") crates;
|
||||
|
||||
ATTIC_DISTRIBUTOR = "attic";
|
||||
|
||||
# Workaround for https://github.com/NixOS/nixpkgs/issues/166205
|
||||
env = lib.optionalAttrs stdenv.cc.isClang {
|
||||
NIX_LDFLAGS = "-l${stdenv.cc.libcxx.cxxabi.libName}";
|
||||
};
|
||||
|
||||
# Attic interacts with Nix directly and its tests require trusted-user access
|
||||
# to nix-daemon to import NARs, which is not possible in the build sandbox.
|
||||
doCheck = false;
|
||||
|
||||
postInstall = lib.optionalString (stdenv.hostPlatform == stdenv.buildPlatform) ''
|
||||
if [[ -f $out/bin/attic ]]; then
|
||||
installShellCompletion --cmd attic \
|
||||
--bash <($out/bin/attic gen-completions bash) \
|
||||
--zsh <($out/bin/attic gen-completions zsh) \
|
||||
--fish <($out/bin/attic gen-completions fish)
|
||||
fi
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Multi-tenant Nix Binary Cache";
|
||||
homepage = "https://github.com/zhaofengli/attic";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ zhaofengli aciceri ];
|
||||
platforms = platforms.linux ++ platforms.darwin;
|
||||
mainProgram = "attic";
|
||||
};
|
||||
}
|
||||
|
7
pkgs/by-name/at/attic-server/package.nix
Normal file
7
pkgs/by-name/at/attic-server/package.nix
Normal file
@ -0,0 +1,7 @@
|
||||
{ attic-client
|
||||
}:
|
||||
(attic-client.override {
|
||||
crates = [ "attic-server" ];
|
||||
}).overrideAttrs {
|
||||
meta.mainProgram = "atticd";
|
||||
}
|
Loading…
Reference in New Issue
Block a user