1
0

Add Nix flake

This commit is contained in:
Alexis Hildebrandt
2023-04-14 08:48:07 +02:00
committed by Simon Michael
parent 6623ec88e1
commit b3c23ce6c1
2 changed files with 85 additions and 0 deletions

26
flake.nix Normal file
View File

@@ -0,0 +1,26 @@
{
description = "Website for all things related plain text accounting";
nixConfig.bash-prompt = "plaintextaccounting.org$ ";
inputs.flake-utils.url = "github:numtide/flake-utils";
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let pkgs = nixpkgs.legacyPackages.${system}; in {
packages = rec {
default = pkgs.stdenvNoCC.mkDerivation {
pname = "plaintextaccounting.org";
version = "master-${self.shortRev or "dirty"}";
src = self;
nativeBuildInputs = with pkgs; [pandoc];
installPhase = ''
runHook preInstall
mkdir -p $out/quickref
cp -R index.html css images $out
cp quickref/*.html $out/quickref
runHook postInstall
'';
};
};
});
}