tea-create-pr: get rid of runtime nix eval

...instead use our treefmt wrapper derivation which is exactly the same
but doesn't require an eval at runtime
This commit is contained in:
DavHau
2024-09-06 15:44:29 +02:00
parent c94bec68f0
commit b13081a84c
3 changed files with 7 additions and 2 deletions

View File

@@ -24,7 +24,7 @@
{
packages =
{
tea-create-pr = pkgs.callPackage ./tea-create-pr { };
tea-create-pr = pkgs.callPackage ./tea-create-pr { formatter = config.treefmt.build.wrapper; };
zerotier-members = pkgs.callPackage ./zerotier-members { };
zt-tcp-relay = pkgs.callPackage ./zt-tcp-relay { };
moonlight-sunshine-accept = pkgs.callPackage ./moonlight-sunshine-accept { };

View File

@@ -5,6 +5,8 @@
git,
tea,
openssh,
# our formatter
formatter,
}:
writeShellApplication {
name = "tea-create-pr";
@@ -14,6 +16,9 @@ writeShellApplication {
git
tea
openssh
# our treefmt formatter wrapped with correct config
formatter
];
text = builtins.readFile ./script.sh;
}

View File

@@ -29,7 +29,7 @@ if ! check_remote "$remoteUpstream"; then
exit 1
fi
nix fmt -- --fail-on-change --no-cache
treefmt --fail-on-change --no-cache
upstream_url=$(git remote get-url "$remoteUpstream")
set -x