0001-update-to-php8.patch | ||
composer-env.nix | ||
default.nix | ||
eac-logchecker.nix | ||
flake.lock | ||
flake.nix | ||
logchecker.nix | ||
php-packages.nix | ||
pprp.nix | ||
README.md | ||
xld-logchecker.nix |
Logchecker package
Usage
$ git clone https://git.numtide.com/nix-packaging/logchecker
$ cd logchecker
$ nix build .#
$ ./result/bin/logchecker analyze cdrip.log
How this package was created
Logchecker currently has dependencies locked to php7. As this version is end-of-life (no security updates) and no longer part of nixpkgs, we upgraded the composer.lock to php8.
$ git clone https://github.com/OPSnet/Logchecker
$ cd Logchecker
$ git checkout 0.11.1
$ nix-shell -p phpPackages.composer --command 'composer update'
$ git commit -m 'update to php8'
$ git format-patch HEAD^1
The resulting 0001-update-to-php8.patch
is part of this repository.
Afterwards we used composer2nix to generate a nix package like this. (This was run in the Logchecker directory)
git clone https://github.com/svanderburg/composer2nix/
nix-build ./composer2nix/release.nix -A package.x86_64-linux
./result/bin/composer2nix
This generated composer-env.nix, composer-env.nix and default.nix, that we copied as well.
Afterwards we created logchecker.nix, which overrides the source with a fetchFromGitHub
pointing to the latest release as well as applying the php8 patch
and added a flake.lock/flake.nix to load this package.