mirror of
https://git.sr.ht/~magic_rb/website
synced 2024-11-22 08:04:21 +01:00
6b5cb3b5ab
Signed-off-by: Magic_RB <magic_rb@redalder.org>
43 lines
1.1 KiB
Nix
43 lines
1.1 KiB
Nix
{
|
|
inputs = {
|
|
nixpkgs.url = "nixpkgs";
|
|
org-thtml = {
|
|
url = "github:juanjosegarciaripoll/org-thtml";
|
|
flake = false;
|
|
};
|
|
};
|
|
|
|
outputs = { self, nixpkgs, org-thtml }:
|
|
let
|
|
supportedSystems = [ "x86_64-linux" "i686-linux" "aarch64-linux" ];
|
|
forAllSystems = f: nixpkgs.lib.genAttrs supportedSystems (system: f system);
|
|
in
|
|
{
|
|
website = forAllSystems (system:
|
|
let
|
|
pkgs = import nixpkgs { inherit system; };
|
|
|
|
in
|
|
pkgs.stdenv.mkDerivation {
|
|
name = "magic_rb-website";
|
|
version = "0.1";
|
|
src = ./.;
|
|
nativeBuildInputs = [ pkgs.emacs ];
|
|
|
|
buildPhase = ''
|
|
cp ${org-thtml}/ox-thtml.el ./ox-thtml.el
|
|
mkdir tmp && export HOME=$(pwd)/tmp
|
|
emacs --script ./make.el
|
|
|
|
find public_html -name 'sitemap.*' -exec rm {} \;
|
|
'';
|
|
|
|
installPhase = ''
|
|
mkdir -p $out
|
|
cp -r public_html/* $out
|
|
'';
|
|
}
|
|
);
|
|
};
|
|
}
|