Skip to content

Commit

Permalink
more progress but still not building with purescript
Browse files Browse the repository at this point in the history
  • Loading branch information
mstksg committed Dec 28, 2023
1 parent 77b3da6 commit c5cac9c
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 14 deletions.
7 changes: 7 additions & 0 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,10 @@ source-repository-package
location: https://github.com/mstksg/hakyll-dhall.git
tag: 3b1ac529568e1c999e8d77d609d5095bfcbd8e7f
--sha256: 13r52ma5g2cagy4fx8py56gp1a517yxid1kak0yh8j7fxdad7rn9

-- import * syntax
source-repository-package
type: git
location: https://github.com/reach-sh/language-javascript.git
tag: f1b4cd7d4a6502c385c64a5d0c80ce325202a48d
--sha256: 196sl27qm7f465xg1nx3daydlvphb9d9gc6cd330jyjc0ky25vjs
30 changes: 17 additions & 13 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -40,27 +40,31 @@
impure = true;
name = "inCode";
buildInputs = [ purescript haskell ];
src = pkgs.nix-gitignore.gitignoreSourcePure ''
*
!/code-samples/
!/config/
!/copy/
!/css/
!/js/
!/latex/
!/scss/
!/static/
'' ./.;
srcs = [
./code-samples
./config
./copy
./css
./js
./latex
./scss
./static
];
LANG = "en_US.UTF-8";
LOCALE_ARCHIVE = pkgs.lib.optionalString
(pkgs.buildPlatform.libc == "glibc")
"${pkgs.glibcLocales}/lib/locale/locale-archive";
preBuild = ''
unpackPhase = ''
for srcFile in $srcs; do
cp -a $srcFile/. $(stripHash $srcFile)
done
mkdir _purescript
find ${purescript}/output -type f -name index.js -exec sh -c '
file={};
subdir=$(basename $(dirname $file))
cp $file _purescript/$(echo $subdir | tr "[:upper:]" "[:lower:]").js' \;
destfile=_purescript/$(echo $subdir | tr "[:upper:]" "[:lower:]").js
cp $file $destfile' \;
'';
buildPhase = ''
export XDG_CACHE_HOME=$(mktemp -d)
Expand Down
1 change: 0 additions & 1 deletion inCode.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ library
, hakyll-sass
, hjsmin
, hsass
-- , inliterate
, lens
, pandoc
, pandoc-types
Expand Down

0 comments on commit c5cac9c

Please sign in to comment.