Created
September 1, 2024 17:38
-
-
Save adophilus/cb520f2796b3cc4b147ed250b5302a2d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
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