-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Add packaging files and yamllint workflow.
- Loading branch information
Showing
15 changed files
with
235 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: yamllint | ||
"on": | ||
pull_request: | ||
branches: ["main"] | ||
paths: | ||
- '**.nix' | ||
- '**.yaml' | ||
- '**.yml' | ||
- .github/workflows/yamllint.yaml | ||
- flake.lock | ||
push: | ||
branches: ["main"] | ||
paths: | ||
- '**.nix' | ||
- '**.yaml' | ||
- '**.yml' | ||
- .github/workflows/yamllint.yaml | ||
- flake.lock | ||
jobs: | ||
yamllint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: DeterminateSystems/nix-installer-action@v14 | ||
- uses: DeterminateSystems/magic-nix-cache-action@v8 | ||
- name: Check YAML files | ||
run: nix develop --command yamllint --format github . | ||
Check failure on line 27 in .github/workflows/yamllint.yaml Trunk.io / Trunk Checkactionlint(syntax-check)
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
{ | ||
inputs = { | ||
flake-utils.url = "github:numtide/flake-utils"; | ||
nix-update-scripts = { | ||
url = "github:jwillikers/nix-update-scripts"; | ||
inputs = { | ||
flake-utils.follows = "flake-utils"; | ||
nixpkgs.follows = "nixpkgs"; | ||
nixpkgs-unstable.follows = "nixpkgs"; | ||
pre-commit-hooks.follows = "pre-commit-hooks"; | ||
treefmt-nix.follows = " treefmt-nix"; | ||
}; | ||
}; | ||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; | ||
pre-commit-hooks = { | ||
url = "github:cachix/pre-commit-hooks.nix"; | ||
inputs = { | ||
nixpkgs.follows = "nixpkgs"; | ||
nixpkgs-stable.follows = "nixpkgs"; | ||
}; | ||
}; | ||
treefmt-nix = { | ||
url = "github:numtide/treefmt-nix"; | ||
inputs.nixpkgs.follows = "nixpkgs"; | ||
}; | ||
}; | ||
outputs = | ||
{ | ||
# deadnix: skip | ||
self | ||
, nix-update-scripts | ||
, nixpkgs | ||
, flake-utils | ||
, pre-commit-hooks | ||
, treefmt-nix | ||
, | ||
}; | ||
flake-utils.lib.eachDefaultSystem ( | ||
system: | ||
let | ||
overlays = [ ]; | ||
pkgs = import nixpkgs { | ||
inherit system overlays; | ||
}; | ||
pre-commit = pre-commit-hooks.lib.${system}.run ( | ||
import ./pre-commit-hooks.nix { inherit pkgs treefmtEval; } | ||
); | ||
treefmtEval = treefmt-nix.lib.evalModule pkgs ./treefmt-nix; | ||
in | ||
with pkgs; | ||
{ | ||
apps = { | ||
inherit (pre-commit) shellHook; | ||
buildInputs = with pkgs; [ | ||
microsoft-gsl | ||
qt6.qtbase | ||
qt6.wayland | ||
ut | ||
]; | ||
nativeBuildInputs = | ||
[ | ||
appstream | ||
appstream-glib | ||
asciidoctor | ||
ccache | ||
clang | ||
clang-tools | ||
cmake | ||
desktop-file-utils | ||
fish | ||
flatpak-builder | ||
gdb | ||
include-what-you-use | ||
just | ||
lonv | ||
librsvg | ||
lldb | ||
llvm | ||
lychee | ||
mold-wrapped | ||
nil | ||
ninja | ||
nushell | ||
python311Packages.lcov-cobertura | ||
qt6.wrapQtAppsHook | ||
treefmtEcal.config.build.wrapper | ||
(builtins.attrValues treefmtEval.config.build.programs) | ||
] | ||
++ pre-commit.enabledPackages; | ||
}; | ||
formatter = treefmtEval.config.build.wrapper; | ||
packages.default = qt6Packages.callPackage ./package.nix { }; | ||
} | ||
|
||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{ cmake | ||
, microsoft-gsl | ||
, modl-wrapped | ||
, ninja | ||
, qtbase | ||
, qtwayland | ||
, stdenv | ||
, ut | ||
, wrapQtAppsHook | ||
, | ||
}; | ||
stdenv.mkDerivation = { | ||
pname = "jmbde"; | ||
version = "0.7.0"; | ||
src ) ./. | ||
buildInputs =[ | ||
microsoft-gsl | ||
qtbase | ||
qtwayland | ||
ut | ||
]; | ||
nativeBuildInputs = [ | ||
cmake | ||
mold-wrapped | ||
ninja | ||
wrapQtAppsHook | ||
]; | ||
cmakeFlags = [ | ||
"--preset=minimal" | ||
"-DCMAKE_LINKER_TYPE=MOLD" | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ pkgs, treefmtEval, ... }: | ||
{ | ||
src = ./.; | ||
hooks = { | ||
check-added-large-files.enable = true; | ||
check-builtin-literals.enable = true; | ||
check-case-conflicts.enable = true; | ||
check-executables-have-shebangs.enable = true; | ||
|
||
# todo Not integrated with Nix? | ||
check-format = { | ||
enable = true; | ||
entry = "${treefmtEval.config.build.wrapper}/bin/treefmt --fail-on-change"; | ||
}; | ||
|
||
check-json.enable = true; | ||
check-shebang-scripts-are-executable.enable = true; | ||
check-toml.enable = true; | ||
check-xml.enable = true; | ||
check-yml.enable = true; | ||
deadnix.enable = true; | ||
detect-private-keys.enable = true; | ||
editorconfig-checker.enable = true; | ||
end-of-file-fixer.enable = true; | ||
fix-byte-order-marker.enable = true; | ||
flake-checker.enable = true; | ||
forbid-new-submodules.enable = true; | ||
mixed-line-endings.enable = true; | ||
nil.enable = true; | ||
|
||
strip-location-metadata = { | ||
name = "Strip location metadata"; | ||
description = "Strip gelocation metadata from image files"; | ||
enable = true; | ||
entry = "${pkgs.exiftool}/bin/exiftool --duplicates --overwrite_original '-gps*='"; | ||
package = pkgs.exiftool; | ||
types = [ "image" ]; | ||
}; | ||
trim-trailing-whitespace.enable = true; | ||
yamllint.enable = true; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
_: { | ||
config = { | ||
programs = { | ||
actionlint.enable = true; | ||
clang-format.enable = true; | ||
cmake-format.enable = true; | ||
jsonfmt.enable = true; | ||
nixfmt.enable = true; | ||
statix.enable = true; | ||
taplo.enable = true; | ||
typos.enable = true; | ||
yamlfmt.enable = true; | ||
}; | ||
projectRootFile = "flake.nix"; | ||
settings.formatter = { | ||
typos.excludes = [ | ||
"*.avif" | ||
"*.bmp" | ||
"*.gif" | ||
"*.jpeg" | ||
"*jpg" | ||
"*.png" | ||
"*.svg" | ||
"*.tiff" | ||
"*.webp" | ||
".vscode/settings.json" | ||
]; | ||
}; | ||
}; | ||
} |