Add flake and zine
This commit is contained in:
51
flake.nix
Normal file
51
flake.nix
Normal 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
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user