1
0
Fork 0

Compare commits

..

2 Commits

Author SHA1 Message Date
Bill Ewanick 73235cf0ab Move build script to Nix derivation 2023-08-02 18:32:04 -04:00
Bill Ewanick 4d710afae3 Update versions 2023-08-02 18:26:08 -04:00
3 changed files with 20 additions and 14 deletions

3
.gitignore vendored
View File

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

View File

@ -2,16 +2,16 @@
"nodes": { "nodes": {
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1681482634, "lastModified": 1690927903,
"narHash": "sha256-cT/nr3L8khEYZSGp8qqwxFH+/q4/547MfyOdSj6MhBk=", "narHash": "sha256-D5gCaCROnjEKDOel//8TO/pOP87pAEtT0uT8X+0Bj/U=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "fda0d99c2cbbb5c89d8855d258cb0821bd9113ad", "rev": "bd836ac5e5a7358dea73cb74a013ca32864ccb86",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "NixOS",
"ref": "nixos-22.11", "ref": "nixos-23.05",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
@ -42,11 +42,11 @@
"systems": "systems" "systems": "systems"
}, },
"locked": { "locked": {
"lastModified": 1681202837, "lastModified": 1689068808,
"narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=", "narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "cfacdce06f30d2b68473a46042957675eebb3401", "rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@ -2,7 +2,7 @@
description = "A Nix flake for a blog-post generating script, written in Haskell, with a seal bent."; description = "A Nix flake for a blog-post generating script, written in Haskell, with a seal bent.";
inputs = { inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-22.11"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05";
utils.url = "github:numtide/flake-utils"; utils.url = "github:numtide/flake-utils";
}; };
@ -18,18 +18,23 @@
]); ]);
in 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 { devShells.default = pkgs.mkShell {
name = "seal-generator-shell"; name = "seal-generator-shell";
buildInputs = with pkgs.haskellPackages; buildInputs = with pkgs.haskellPackages;
[ [
ghc' ghc'
hlint hlint
haskell-language-server haskell-language-server
(pkgs.writeShellScriptBin "build-seal-generator" ''
${ghc'}/bin/ghc -outputdir dist -O2 -static generateSealPosts.hs
'')
]; ];
}; };
}); });