feat: Add a flake
This commit is contained in:
36
pkgs/blog.nix
Normal file
36
pkgs/blog.nix
Normal file
@@ -0,0 +1,36 @@
|
||||
{
|
||||
lib, stdenv
|
||||
, gnumake, imagemagick
|
||||
, shared-assets
|
||||
}:
|
||||
stdenv.mkDerivation {
|
||||
pname = "blog";
|
||||
version = "20211128";
|
||||
|
||||
src = ../.;
|
||||
|
||||
buildInputs = [ shared-assets gnumake imagemagick ];
|
||||
|
||||
patchPhase = ''
|
||||
sed -i Makefile -e "s|python ../shared-assets/makesite.py|python ${shared-assets}/bin/makesite.py|g"
|
||||
sed -i Makefile -e "s|tar -czf blog.tar.gz _site||g"
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
make buildnosign
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/srv/www/blog
|
||||
cp -vr _site/* $out/srv/www/blog
|
||||
'';
|
||||
|
||||
doCheck = false;
|
||||
|
||||
meta = with lib; {
|
||||
description = "The blog hosted at https://blog.polynom.me";
|
||||
homepage = "https://git.polynom.me/polynom.me/blog.polynom.me";
|
||||
maintainers = [];
|
||||
license = licenses.gpl3;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user