1
0
Fork 0

Move build script to Nix derivation

main
Bill Ewanick 2023-08-02 18:32:04 -04:00
parent 4d710afae3
commit 73235cf0ab
2 changed files with 12 additions and 6 deletions

3
.gitignore vendored
View File

@ -6,8 +6,9 @@
dist
generateSealPosts
# Direnv lorri stuff
# Nix related
.direnv
result
# Too many posts, hiding for now
posts

View File

@ -18,18 +18,23 @@
]);
in
{
packages.default = pkgs.runCommand "generateSealPosts" { } ''
echo Generating seal posts
mkdir -p $out/bin
${ghc'}/bin/ghc \
-O2 \
-static \
-o $out/bin/generateSealPosts \
${./generateSealPosts.hs}
'';
devShells.default = pkgs.mkShell {
name = "seal-generator-shell";
buildInputs = with pkgs.haskellPackages;
[
ghc'
hlint
haskell-language-server
(pkgs.writeShellScriptBin "build-seal-generator" ''
${ghc'}/bin/ghc -outputdir dist -O2 -static generateSealPosts.hs
'')
];
};
});