1
0
Fork 0
blog/flake.nix
saji 67c2e81892
All checks were successful
Build Blog / Build (push) Successful in 3m24s
fix build
2025-04-12 11:21:02 -05:00

50 lines
1,003 B
Nix

{
description = "Bloggy time!";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
};
outputs = { self, nixpkgs }: let
systems = [ "x86_64-linux" "aarch64-linux" "aarch64-darwin" "x86_64-darwin" ];
forAllSystems = function:
nixpkgs.lib.genAttrs systems (system: function (
import nixpkgs {
inherit system;
config.allowUnfree = true;
}
));
in {
packages = forAllSystems (pkgs: rec {
default = pkgs.buildNpmPackage {
name = "myblog";
buildInputs = with pkgs; [
nodejs
vips
];
nativeBuildInputs = with pkgs; [
pkg-config
];
# npmDepsHash = nixpkgs.lib.fakeHash;
npmDepsHash = "sha256-Q7rhCjAPPn44DyUZ/uoD+7o4XH33IATfL+v1azEhuW0=";
# npmBuild = "npm run build";
src = ./.;
installPhase = ''
cp -ar _site/ $out
'';
};
});
devShells = forAllSystems (pkgs: {
default = pkgs.mkShell {
packages = with pkgs; [
nodejs
vips
pkg-config
];
};
});
};
}