Skip to content

Instantly share code, notes, and snippets.

@adophilus
Created September 1, 2024 17:38
Show Gist options
  • Save adophilus/cb520f2796b3cc4b147ed250b5302a2d to your computer and use it in GitHub Desktop.
Save adophilus/cb520f2796b3cc4b147ed250b5302a2d to your computer and use it in GitHub Desktop.
{
description = "CryptoNex nix flake";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-24.05";
};
outputs = { self, nixpkgs }:
let
system = "x86_64-linux";
pkgs = import nixpkgs { inherit system; };
in {
devShells.${system} = {
default = pkgs.mkShell {
buildInputs = with pkgs; [
d2
mdbook
mdbook-d2
];
};
};
packages.${system} = {
docs = pkgs.stdenv.mkDerivation {
name = "cryptonex-docs";
buildInputs = with pkgs; [
d2
mdbook
mdbook-d2
];
phases = "installPhase";
src = ./.;
installPhase = ''
cd $src
mkdir -p $out
mdbook build --dest-dir $out
'';
};
};
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment