Compare commits
4 Commits
dc3f8c94f8
...
master
Author | SHA1 | Date | |
---|---|---|---|
356897045f | |||
1e1f8cebe8
|
|||
b21ad67cfc
|
|||
4fffa8784a
|
16
.github/workflows/flake-check.yaml
vendored
Normal file
16
.github/workflows/flake-check.yaml
vendored
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
name: flake-check
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: master
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: [ ubuntu-latest, homelab ]
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: cachix/install-nix-action@v31
|
||||||
|
- run: nix flake check
|
||||||
|
|
27
flake.nix
27
flake.nix
@@ -46,6 +46,30 @@
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
checks = forAllSystems (
|
||||||
|
{ pkgs }:
|
||||||
|
{
|
||||||
|
gdformat = pkgs.stdenvNoCC.mkDerivation {
|
||||||
|
name = "gdformat-check";
|
||||||
|
src = pkgs.lib.sources.sourceFilesBySuffices (pkgs.lib.cleanSource ./.) [ ".gd" ];
|
||||||
|
|
||||||
|
nativeBuildInputs = with pkgs; [
|
||||||
|
gdtoolkit_4
|
||||||
|
];
|
||||||
|
|
||||||
|
dontBuild = true;
|
||||||
|
doCheck = true;
|
||||||
|
|
||||||
|
checkPhase = ''
|
||||||
|
export HOME=$(mktemp -d)
|
||||||
|
find . -name "*.gd" -print0 | xargs -0 gdformat --check
|
||||||
|
echo "All .gd files are properly formatted"
|
||||||
|
'';
|
||||||
|
installPhase = "mkdir $out";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
packages = forAllSystems (
|
packages = forAllSystems (
|
||||||
{ pkgs }:
|
{ pkgs }:
|
||||||
let
|
let
|
||||||
@@ -77,7 +101,6 @@
|
|||||||
runHook postBuild
|
runHook postBuild
|
||||||
'';
|
'';
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
find .
|
|
||||||
install -D -m 755 -t $out/libexec ./build/slopvivors
|
install -D -m 755 -t $out/libexec ./build/slopvivors
|
||||||
install -D -m 644 -t $out/libexec ./build/slopvivors.pck
|
install -D -m 644 -t $out/libexec ./build/slopvivors.pck
|
||||||
install -d -m 755 $out/bin
|
install -d -m 755 $out/bin
|
||||||
@@ -158,7 +181,7 @@
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
slopvivors_docker = pkgs.dockerTools.buildLayeredImage {
|
slopvivors_docker = pkgs.dockerTools.buildLayeredImage {
|
||||||
name = "slopvivors-docker-${version}";
|
name = "slopvivors-docker";
|
||||||
tag = version;
|
tag = version;
|
||||||
created = "now";
|
created = "now";
|
||||||
contents = [
|
contents = [
|
||||||
|
Reference in New Issue
Block a user