Skip to content

Commit 05ad8ef

Browse files
authored
ihp: update to v1.3.1 (#9594)
* ihp: update to v1.3.1 * ihp: use specific nixpkgs commit to avoid out of memory on github actions
1 parent a807ce8 commit 05ad8ef

File tree

9 files changed

+1316
-55
lines changed

9 files changed

+1316
-55
lines changed

frameworks/Haskell/ihp/ihp.dockerfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
FROM nixos/nix
22

3-
COPY ./src /ihp
4-
WORKDIR /ihp
5-
63
# Add build dependencies
7-
RUN nix-env -i cachix
4+
RUN nix-env -f https://github.com/NixOS/nixpkgs/archive/54b4bb956f9891b872904abdb632cea85a033ff2.tar.gz -iA cachix
85
RUN cachix use digitallyinduced
96

7+
COPY ./src /ihp
8+
WORKDIR /ihp
9+
1010
# Build
11-
RUN nix-build -j auto --cores 0
11+
RUN nix --extra-experimental-features "nix-command flakes" build -j auto --cores 0 .#optimized-prod-server
1212

1313
# Setup
1414
ENV DATABASE_URL=postgres://benchmarkdbuser:benchmarkdbpass@tfb-database:5432/hello_world

frameworks/Haskell/ihp/src/.envrc

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
if ! has nix_direnv_version || ! nix_direnv_version 2.3.0; then
2+
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/2.3.0/direnvrc" "sha256-Dmd+j63L84wuzgyjITIfSxSD57Tx7v51DMxVZOsiUD8="
3+
fi
4+
5+
use flake . --impure --accept-flake-config
6+
7+
# Include .env file if it exists locally. Use the .env file to load env vars that you don't want to commit to git
8+
if [ -f .env ]
9+
then
10+
set -o allexport
11+
source .env
12+
set +o allexport
13+
fi
14+
# Add your env vars here
15+
#
16+
# E.g. export AWS_ACCESS_KEY_ID="XXXXX"

frameworks/Haskell/ihp/src/.ghci

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1-
import Prelude
2-
:def source readFile
3-
:source build/ihp-lib/applicationGhciConfig
1+
:set -XNoImplicitPrelude
2+
:def loadFromIHP \file -> (System.Environment.getEnv "IHP_LIB") >>= (\ihpLib -> readFile (ihpLib <> "/" <> file))
3+
:loadFromIHP applicationGhciConfig
4+
import IHP.Prelude

frameworks/Haskell/ihp/src/.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
.DS_Store
2-
.envrc
32
.idea
43
tmp
54
result
@@ -17,3 +16,8 @@ gen
1716
del
1817
static/prod.*
1918
Config/client_session_key.aes
19+
20+
.devenv*
21+
devenv.local.nix
22+
.direnv
23+
.env

frameworks/Haskell/ihp/src/Makefile

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
ifneq ($(wildcard IHP/.*),)
2-
IHP = IHP/lib/IHP
3-
else
4-
IHP = $(shell dirname $$(which RunDevServer))/../lib/IHP
5-
endif
6-
7-
include ${IHP}/Makefile.dist
8-
91
CSS_FILES += ${IHP}/static/vendor/bootstrap.min.css
102
CSS_FILES += ${IHP}/static/vendor/flatpickr.min.css
113

@@ -19,3 +11,5 @@ JS_FILES += ${IHP}/static/vendor/morphdom-umd.min.js
1911
JS_FILES += ${IHP}/static/vendor/turbolinks.js
2012
JS_FILES += ${IHP}/static/vendor/turbolinksInstantClick.js
2113
JS_FILES += ${IHP}/static/vendor/turbolinksMorphdom.js
14+
15+
include ${IHP}/Makefile.dist

frameworks/Haskell/ihp/src/default.nix

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)