Skip to content

ihp: update to v1.3.1 #9594

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions frameworks/Haskell/ihp/ihp.dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
FROM nixos/nix

COPY ./src /ihp
WORKDIR /ihp

# Add build dependencies
RUN nix-env -i cachix
RUN nix-env -f https://github.com/NixOS/nixpkgs/archive/54b4bb956f9891b872904abdb632cea85a033ff2.tar.gz -iA cachix
RUN cachix use digitallyinduced

COPY ./src /ihp
WORKDIR /ihp

# Build
RUN nix-build -j auto --cores 0
RUN nix --extra-experimental-features "nix-command flakes" build -j auto --cores 0 .#optimized-prod-server

# Setup
ENV DATABASE_URL=postgres://benchmarkdbuser:benchmarkdbpass@tfb-database:5432/hello_world
Expand Down
16 changes: 16 additions & 0 deletions frameworks/Haskell/ihp/src/.envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
if ! has nix_direnv_version || ! nix_direnv_version 2.3.0; then
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/2.3.0/direnvrc" "sha256-Dmd+j63L84wuzgyjITIfSxSD57Tx7v51DMxVZOsiUD8="
fi

use flake . --impure --accept-flake-config

# Include .env file if it exists locally. Use the .env file to load env vars that you don't want to commit to git
if [ -f .env ]
then
set -o allexport
source .env
set +o allexport
fi
# Add your env vars here
#
# E.g. export AWS_ACCESS_KEY_ID="XXXXX"
7 changes: 4 additions & 3 deletions frameworks/Haskell/ihp/src/.ghci
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import Prelude
:def source readFile
:source build/ihp-lib/applicationGhciConfig
:set -XNoImplicitPrelude
:def loadFromIHP \file -> (System.Environment.getEnv "IHP_LIB") >>= (\ihpLib -> readFile (ihpLib <> "/" <> file))
:loadFromIHP applicationGhciConfig
import IHP.Prelude
6 changes: 5 additions & 1 deletion frameworks/Haskell/ihp/src/.gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.DS_Store
.envrc
.idea
tmp
result
Expand All @@ -17,3 +16,8 @@ gen
del
static/prod.*
Config/client_session_key.aes

.devenv*
devenv.local.nix
.direnv
.env
10 changes: 2 additions & 8 deletions frameworks/Haskell/ihp/src/Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
ifneq ($(wildcard IHP/.*),)
IHP = IHP/lib/IHP
else
IHP = $(shell dirname $$(which RunDevServer))/../lib/IHP
endif

include ${IHP}/Makefile.dist

CSS_FILES += ${IHP}/static/vendor/bootstrap.min.css
CSS_FILES += ${IHP}/static/vendor/flatpickr.min.css

Expand All @@ -19,3 +11,5 @@ JS_FILES += ${IHP}/static/vendor/morphdom-umd.min.js
JS_FILES += ${IHP}/static/vendor/turbolinks.js
JS_FILES += ${IHP}/static/vendor/turbolinksInstantClick.js
JS_FILES += ${IHP}/static/vendor/turbolinksMorphdom.js

include ${IHP}/Makefile.dist
21 changes: 0 additions & 21 deletions frameworks/Haskell/ihp/src/default.nix

This file was deleted.

Loading
Loading