Add flake and zine

This commit is contained in:
2025-08-05 00:32:58 +08:00
commit 477b3c9a79
2 changed files with 112 additions and 0 deletions

51
flake.nix Normal file
View File

@@ -0,0 +1,51 @@
{
description = "yadunut.dev website";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-utils = {
url = "github:numtide/flake-utils";
};
};
outputs =
{
nixpkgs,
flake-utils,
...
}:
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = import nixpkgs {
inherit system;
};
zineBinary =
if system == "aarch64-darwin" then
pkgs.stdenvNoCC.mkDerivation {
pname = "zine";
version = "0.11.1";
src = pkgs.fetchzip {
url = "https://github.com/kristoff-it/zine/releases/download/v0.11.1/aarch64-macos.zip";
sha256 = "WKY9B4ObE4D7fkvMsF3cLvGHyxOT2FI8YNwLmOAujrQ=";
stripRoot = false;
};
installPhase = ''
mkdir -p $out/bin
cp $src/zine $out/bin/
chmod +x $out/bin/zine
'';
}
else
{ };
in
{
devShells = {
default = pkgs.mkShell {
buildInputs = [
zineBinary
];
};
};
}
);
}