1
0
Fork 0
blog/flake.nix
2024-07-07 13:27:07 -05:00

50 lines
1 KiB
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 = "hi";
buildInputs = with pkgs; [
nodejs
vips
];
nativeBuildInputs = with pkgs; [
pkg-config
];
# npmDepsHash = "sha256-lm0CUyMjW7nu4XcbhbbFCfLZpI3XgW7Ep7l2appnVCU=";
npmDepsHash = "sha256-/OuIrO7zEMSR6sCenB2A2rJatVcYcq976lMugQtQTEs=";
# npmBuild = "npm run build";
src = ./.;
installPhase = ''
cp -ar _site/ $out
'';
};
});
devShells = forAllSystems (pkgs: {
default = pkgs.mkShell {
packages = with pkgs; [
nodejs
vips
pkg-config
];
};
});
};
}