2022-02-18 20:31:01 +03:00
|
|
|
{
|
|
|
|
pkgs,
|
|
|
|
extraModulesPath,
|
|
|
|
...
|
2022-03-09 23:55:02 +03:00
|
|
|
}: let
|
2021-07-21 07:36:41 +03:00
|
|
|
hooks = import ./hooks;
|
2022-03-09 23:55:02 +03:00
|
|
|
pkgWithCategory = category: package: {inherit package category;};
|
2021-07-21 07:36:41 +03:00
|
|
|
linter = pkgWithCategory "linter";
|
|
|
|
docs = pkgWithCategory "docs";
|
|
|
|
devos = pkgWithCategory "devos";
|
2022-02-18 20:31:01 +03:00
|
|
|
in {
|
2021-07-21 07:36:41 +03:00
|
|
|
_file = toString ./.;
|
2022-02-18 20:31:01 +03:00
|
|
|
imports = ["${extraModulesPath}/git/hooks.nix"];
|
2022-03-09 23:55:02 +03:00
|
|
|
git = {inherit hooks;};
|
2021-07-21 07:36:41 +03:00
|
|
|
# tempfix: remove when merged https://github.com/numtide/devshell/pull/123
|
2022-02-18 20:31:01 +03:00
|
|
|
devshell.startup.load_profiles =
|
|
|
|
pkgs.lib.mkForce
|
|
|
|
(
|
|
|
|
pkgs.lib.noDepEntry
|
|
|
|
''
|
|
|
|
# PATH is devshell's exorbitant privilige:
|
|
|
|
# fence against its pollution
|
|
|
|
_PATH=''${PATH}
|
|
|
|
# Load installed profiles
|
|
|
|
for file in "$DEVSHELL_DIR/etc/profile.d/"*.sh; do
|
|
|
|
# If that folder doesn't exist, bash loves to return the whole glob
|
|
|
|
[[ -f "$file" ]] && source "$file"
|
|
|
|
done
|
|
|
|
# Exert exorbitant privilige and leave no trace
|
|
|
|
export PATH=''${_PATH}
|
|
|
|
unset _PATH
|
|
|
|
''
|
|
|
|
);
|
|
|
|
packages = with pkgs; [git-crypt];
|
2022-03-09 23:55:02 +03:00
|
|
|
commands = with pkgs;
|
2022-02-18 20:31:01 +03:00
|
|
|
[
|
|
|
|
(devos nixUnstable)
|
|
|
|
#(devos agenix)
|
|
|
|
/*
|
|
|
|
{
|
|
|
|
category = "devos";
|
|
|
|
name = pkgs.nvfetcher-bin.pname;
|
|
|
|
help = pkgs.nvfetcher-bin.meta.description;
|
|
|
|
command = "cd $PRJ_ROOT/pkgs; ${pkgs.nvfetcher-bin}/bin/nvfetcher -c ./sources.toml $@";
|
|
|
|
}
|
|
|
|
*/
|
|
|
|
#(linter nixpkgs-fmt)
|
|
|
|
#(linter editorconfig-checker)
|
|
|
|
# (docs python3Packages.grip) too many deps
|
|
|
|
# (docs mdbook)
|
|
|
|
]
|
|
|
|
++ lib.optional (pkgs ? deploy-rs) (devos deploy-rs.deploy-rs)
|
|
|
|
++ lib.optional (system != "i686-linux") (devos cachix);
|
2021-07-21 07:36:41 +03:00
|
|
|
}
|