1
0
Fork 0
blog/flake.nix
saji eed2412b92
All checks were successful
Build Blog / Build (push) Successful in 3m21s
make flake.nix work again
2025-04-11 16:35:42 -05:00

49 lines
961 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 = "sha256-EjGF9XG4j0Dd4yjxgfwZGOZ1gf0ypYliNxtJMgSy224=";
# npmBuild = "npm run build";
src = ./.;
installPhase = ''
cp -ar _site/ $out
'';
};
});
devShells = forAllSystems (pkgs: {
default = pkgs.mkShell {
packages = with pkgs; [
nodejs
vips
pkg-config
];
};
});
};
}