Skip to content

Instantly share code, notes, and snippets.

@rpearce
Created June 19, 2021 18:29
Show Gist options
  • Save rpearce/c6b8a228b737bd6d6c1661eaa5721f25 to your computer and use it in GitHub Desktop.
Save rpearce/c6b8a228b737bd6d6c1661eaa5721f25 to your computer and use it in GitHub Desktop.
IHP Web Framework Nix Flake
{
description = "IHP flake";
nixConfig.bash-prompt = "[nix]\\e\[38;5;172mλ \\e\[m";
inputs = {
nixpkgs.url = "nixpkgs/nixos-21.05";
flake-utils = {
url = "github:numtide/flake-utils";
inputs.nixpkgs.follows = "nixpkgs";
};
ihp-new = {
url = "https://ihp.digitallyinduced.com/ihp-new.tar.gz";
flake = false;
};
};
outputs = { flake-utils, ihp-new, nixpkgs, self }:
flake-utils.lib.eachDefaultSystem (system:
let
ihpOverlay = (final: prev: { inherit ihp-new; });
config = {};
overlays = [ ihpOverlay ];
pkgs = import nixpkgs { inherit config overlays system; };
in rec {
devShell = pkgs.mkShell {
buildInputs = with pkgs; [
direnv
cachix
ihp-new
];
shellHook = ''
eval "$(direnv hook bash)"
'';
};
}
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment