Skip to content

Commit 5a5f31d

Browse files
committed
Add portable build file
1 parent 09957fb commit 5a5f31d

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

Diff for: .gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ public/
33
.direnv
44
.hugo_build.lock
55
result/
6+
nix-portable

Diff for: flake.nix

+5-2
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,12 @@
3939
pkgs.hugo
4040
];
4141

42+
patchPhase = ''
43+
mkdir -p themes/
44+
cp -r ${even-theme}/ themes/even
45+
'';
46+
4247
buildPhase = ''
43-
mkdir -p themes/even/
44-
cp -r ${even-theme} themes/even
4548
hugo ${extraBuildArgs}
4649
'';
4750

Diff for: portable_build.sh

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
5+
curl -L https://github.com/DavHau/nix-portable/releases/latest/download/nix-portable-$(uname -m) > ./nix-portable
6+
chmod +x ./nix-portable
7+
8+
./nix-portable nix build
9+
./nix-portable nix-shell -p bash --run "cp -rL result public"

0 commit comments

Comments
 (0)