{ 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"; version = "unstable"; 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 ]; }; }); }; }