ci(nix): drop pre-commit-hooks
Signed-off-by: seth <getchoo@tuta.io>
This commit is contained in:
parent
4c81d8c53d
commit
7a83d0cea0
51
flake.lock
generated
51
flake.lock
generated
@ -36,27 +36,6 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"gitignore": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"pre-commit-hooks",
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1709087332,
|
|
||||||
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
|
|
||||||
"owner": "hercules-ci",
|
|
||||||
"repo": "gitignore.nix",
|
|
||||||
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "hercules-ci",
|
|
||||||
"repo": "gitignore.nix",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"libnbtplusplus": {
|
"libnbtplusplus": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
@ -89,40 +68,12 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"pre-commit-hooks": {
|
|
||||||
"inputs": {
|
|
||||||
"flake-compat": [
|
|
||||||
"flake-compat"
|
|
||||||
],
|
|
||||||
"gitignore": "gitignore",
|
|
||||||
"nixpkgs": [
|
|
||||||
"nixpkgs"
|
|
||||||
],
|
|
||||||
"nixpkgs-stable": [
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1723803910,
|
|
||||||
"narHash": "sha256-yezvUuFiEnCFbGuwj/bQcqg7RykIEqudOy/RBrId0pc=",
|
|
||||||
"owner": "cachix",
|
|
||||||
"repo": "pre-commit-hooks.nix",
|
|
||||||
"rev": "bfef0ada09e2c8ac55bbcd0831bd0c9d42e651ba",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "cachix",
|
|
||||||
"repo": "pre-commit-hooks.nix",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-compat": "flake-compat",
|
"flake-compat": "flake-compat",
|
||||||
"flake-parts": "flake-parts",
|
"flake-parts": "flake-parts",
|
||||||
"libnbtplusplus": "libnbtplusplus",
|
"libnbtplusplus": "libnbtplusplus",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs"
|
||||||
"pre-commit-hooks": "pre-commit-hooks"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
38
flake.nix
38
flake.nix
@ -12,30 +12,36 @@
|
|||||||
url = "github:hercules-ci/flake-parts";
|
url = "github:hercules-ci/flake-parts";
|
||||||
inputs.nixpkgs-lib.follows = "nixpkgs";
|
inputs.nixpkgs-lib.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
pre-commit-hooks = {
|
|
||||||
url = "github:cachix/pre-commit-hooks.nix";
|
|
||||||
inputs = {
|
|
||||||
nixpkgs.follows = "nixpkgs";
|
|
||||||
nixpkgs-stable.follows = "nixpkgs";
|
|
||||||
flake-compat.follows = "flake-compat";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
flake-compat = {
|
|
||||||
url = "github:edolstra/flake-compat";
|
|
||||||
flake = false;
|
|
||||||
};
|
|
||||||
libnbtplusplus = {
|
libnbtplusplus = {
|
||||||
url = "github:PrismLauncher/libnbtplusplus";
|
url = "github:PrismLauncher/libnbtplusplus";
|
||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
Inputs below this are optional and can be removed
|
||||||
|
|
||||||
|
```
|
||||||
|
{
|
||||||
|
inputs.prismlauncher = {
|
||||||
|
url = "github:PrismLauncher/PrismLauncher";
|
||||||
|
inputs = {
|
||||||
|
flake-compat.follows = "";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
```
|
||||||
|
*/
|
||||||
|
|
||||||
|
flake-compat = {
|
||||||
|
url = "github:edolstra/flake-compat";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs =
|
outputs =
|
||||||
{ flake-parts, pre-commit-hooks, ... }@inputs:
|
inputs:
|
||||||
flake-parts.lib.mkFlake { inherit inputs; } {
|
inputs.flake-parts.lib.mkFlake { inherit inputs; } {
|
||||||
imports = [
|
imports = [
|
||||||
pre-commit-hooks.flakeModule
|
|
||||||
|
|
||||||
./nix/dev.nix
|
./nix/dev.nix
|
||||||
./nix/distribution.nix
|
./nix/distribution.nix
|
||||||
];
|
];
|
||||||
|
36
nix/dev.nix
36
nix/dev.nix
@ -1,41 +1,9 @@
|
|||||||
{
|
{
|
||||||
perSystem =
|
perSystem =
|
||||||
|
{ pkgs, self', ... }:
|
||||||
{
|
{
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
pre-commit.settings = {
|
|
||||||
hooks = {
|
|
||||||
markdownlint.enable = true;
|
|
||||||
|
|
||||||
deadnix.enable = true;
|
|
||||||
nil.enable = true;
|
|
||||||
nixfmt.enable = true;
|
|
||||||
|
|
||||||
clang-format = {
|
|
||||||
enable = true;
|
|
||||||
types_or = [
|
|
||||||
"c"
|
|
||||||
"c++"
|
|
||||||
"java"
|
|
||||||
"json"
|
|
||||||
"objective-c"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
tools.clang-tools = lib.mkForce pkgs.clang-tools_18;
|
|
||||||
};
|
|
||||||
|
|
||||||
devShells.default = pkgs.mkShell {
|
devShells.default = pkgs.mkShell {
|
||||||
shellHook = ''
|
inputsFrom = [ self'.packages.prismlauncher-unwrapped ];
|
||||||
${config.pre-commit.installationScript}
|
|
||||||
'';
|
|
||||||
|
|
||||||
inputsFrom = [ config.packages.prismlauncher-unwrapped ];
|
|
||||||
buildInputs = with pkgs; [
|
buildInputs = with pkgs; [
|
||||||
ccache
|
ccache
|
||||||
ninja
|
ninja
|
||||||
|
Loading…
Reference in New Issue
Block a user