Skip to content

Commit

Permalink
Add nix support (space-wizards#115)
Browse files Browse the repository at this point in the history
(Don't want to be the nix shill but I don't want to have cargo installed
on my computer.)

### Add nix support to this repo,

Can quickly set up locally with:
`nix-shell --command 'mdbook serve'`
or
`nix develop -c mdbook serve`
  • Loading branch information
yathxyz authored Jan 1, 2024
1 parent 4fdba91 commit ea32169
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 0 deletions.
27 changes: 27 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
description = "Development environment for Space Station 14";

inputs.nixpkgs.url = "github:NixOS/nixpkgs/release-23.11";

outputs = { self, nixpkgs }:
let
forAllSystems = function:
nixpkgs.lib.genAttrs [ "x86_64-linux" "aarch64-linux" ]
(system: function nixpkgs.legacyPackages.${system});
in {
devShells = forAllSystems
(pkgs: { default = import ./shell.nix { inherit pkgs; }; });
};

}
16 changes: 16 additions & 0 deletions shell.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{ pkgs ? import (builtins.fetchTarball {
url =
"https://github.com/nixos/nixpkgs/archive/66559cae054c9abe9f6f997c3c9720fbad8d5443.tar.gz";
sha256 = "sha256-2u/2oCSFH4QCVKeL/GHnse/S+rZ7aOMQeFJOIwCdBYU=";
}) { } }:

with pkgs;
mkShell {
buildInputs = [
mdbook
mdbook-mermaid
mdbook-linkcheck
mdbook-admonish
mdbook-emojicodes
];
}

0 comments on commit ea32169

Please sign in to comment.