mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-21 12:23:55 +00:00
4f0dadbf38
After final improvements to the official formatter implementation, this commit now performs the first treewide reformat of Nix files using it. This is part of the implementation of RFC 166. Only "inactive" files are reformatted, meaning only files that aren't being touched by any PR with activity in the past 2 months. This is to avoid conflicts for PRs that might soon be merged. Later we can do a full treewide reformat to get the rest, which should not cause as many conflicts. A CI check has already been running for some time to ensure that new and already-formatted files are formatted, so the files being reformatted here should also stay formatted. This commit was automatically created and can be verified using nix-builda08b3a4d19
.tar.gz \ --argstr baseRevb32a094368
result/bin/apply-formatting $NIXPKGS_PATH
142 lines
3.5 KiB
Nix
142 lines
3.5 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
resholve,
|
|
fetchFromGitHub,
|
|
git,
|
|
bash,
|
|
openssl,
|
|
gawk,
|
|
/*
|
|
TODO: yadm can use git-crypt and transcrypt
|
|
but it does so in a way that resholve 0.6.0
|
|
can't yet do anything smart about. It looks
|
|
like these are for interactive use, so the
|
|
main impact should just be that users still
|
|
need both of these packages in their profile
|
|
to support their use in yadm.
|
|
*/
|
|
# , git-crypt
|
|
# , transcrypt
|
|
j2cli,
|
|
esh,
|
|
gnupg,
|
|
coreutils,
|
|
gnutar,
|
|
installShellFiles,
|
|
runCommand,
|
|
yadm,
|
|
}:
|
|
|
|
resholve.mkDerivation rec {
|
|
pname = "yadm";
|
|
version = "3.3.0";
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "TheLocehiliosan";
|
|
repo = "yadm";
|
|
rev = version;
|
|
hash = "sha256-VQhfRtg9wtquJGjhB8fFQqHIJ5GViMfNQQep13ZH5SE=";
|
|
};
|
|
|
|
dontConfigure = true;
|
|
dontBuild = true;
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
install -Dt $out/bin yadm
|
|
runHook postInstall
|
|
'';
|
|
|
|
postInstall = ''
|
|
installManPage yadm.1
|
|
installShellCompletion --cmd yadm \
|
|
--zsh completion/zsh/_yadm \
|
|
--bash completion/bash/yadm
|
|
'';
|
|
|
|
solutions = {
|
|
yadm = {
|
|
scripts = [ "bin/yadm" ];
|
|
interpreter = "${bash}/bin/sh";
|
|
inputs = [
|
|
git
|
|
gnupg
|
|
openssl
|
|
gawk
|
|
# see head comment
|
|
# git-crypt
|
|
# transcrypt
|
|
j2cli
|
|
esh
|
|
bash
|
|
coreutils
|
|
gnutar
|
|
];
|
|
fake = {
|
|
external = if stdenv.hostPlatform.isCygwin then [ ] else [ "cygpath" ];
|
|
};
|
|
fix = {
|
|
"$GPG_PROGRAM" = [ "gpg" ];
|
|
"$OPENSSL_PROGRAM" = [ "openssl" ];
|
|
"$GIT_PROGRAM" = [ "git" ];
|
|
"$AWK_PROGRAM" = [ "awk" ];
|
|
# see head comment
|
|
# "$GIT_CRYPT_PROGRAM" = [ "git-crypt" ];
|
|
# "$TRANSCRYPT_PROGRAM" = [ "transcrypt" ];
|
|
"$J2CLI_PROGRAM" = [ "j2" ];
|
|
"$ESH_PROGRAM" = [ "esh" ];
|
|
# not in nixpkgs (yet)
|
|
# "$ENVTPL_PROGRAM" = [ "envtpl" ];
|
|
# "$LSB_RELEASE_PROGRAM" = [ "lsb_release" ];
|
|
};
|
|
keep = {
|
|
"$YADM_COMMAND" = true; # internal cmds
|
|
"$template_cmd" = true; # dynamic, template-engine
|
|
"$SHELL" = true; # probably user env? unsure
|
|
"$hook_command" = true; # ~git hooks?
|
|
"exec" = [ "$YADM_BOOTSTRAP" ]; # yadm bootstrap script
|
|
|
|
# not in nixpkgs
|
|
"$ENVTPL_PROGRAM" = true;
|
|
"$LSB_RELEASE_PROGRAM" = true;
|
|
};
|
|
/*
|
|
TODO: these should be dropped as fast as they can be dealt
|
|
with properly in binlore and/or resholve.
|
|
*/
|
|
execer = [
|
|
"cannot:${j2cli}/bin/j2"
|
|
"cannot:${esh}/bin/esh"
|
|
"cannot:${git}/bin/git"
|
|
"cannot:${gnupg}/bin/gpg"
|
|
];
|
|
};
|
|
};
|
|
|
|
passthru.tests = {
|
|
minimal = runCommand "${pname}-test" { } ''
|
|
export HOME=$out
|
|
${yadm}/bin/yadm init
|
|
'';
|
|
};
|
|
|
|
meta = {
|
|
homepage = "https://github.com/TheLocehiliosan/yadm";
|
|
description = "Yet Another Dotfiles Manager";
|
|
longDescription = ''
|
|
yadm is a dotfile management tool with 3 main features:
|
|
* Manages files across systems using a single Git repository.
|
|
* Provides a way to use alternate files on a specific OS or host.
|
|
* Supplies a method of encrypting confidential data so it can safely be stored in your repository.
|
|
'';
|
|
changelog = "https://github.com/TheLocehiliosan/yadm/blob/${version}/CHANGES";
|
|
license = lib.licenses.gpl3Plus;
|
|
maintainers = with lib.maintainers; [ abathur ];
|
|
platforms = lib.platforms.unix;
|
|
mainProgram = "yadm";
|
|
};
|
|
}
|