1
0
Fork 0
blog/flake.nix

50 lines
1 KiB
Nix
Raw Normal View History

2024-07-07 17:00:34 +00:00
{
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 {
2024-07-07 18:27:07 +00:00
default = pkgs.buildNpmPackage {
name = "hi";
buildInputs = with pkgs; [
nodejs
2024-07-07 17:00:34 +00:00
vips
2024-07-07 18:27:07 +00:00
];
nativeBuildInputs = with pkgs; [
pkg-config
];
# npmDepsHash = "sha256-lm0CUyMjW7nu4XcbhbbFCfLZpI3XgW7Ep7l2appnVCU=";
npmDepsHash = "sha256-/OuIrO7zEMSR6sCenB2A2rJatVcYcq976lMugQtQTEs=";
# npmBuild = "npm run build";
src = ./.;
installPhase = ''
cp -ar _site/ $out
'';
};
2024-07-07 17:00:34 +00:00
});
devShells = forAllSystems (pkgs: {
default = pkgs.mkShell {
packages = with pkgs; [
nodejs
2024-07-07 18:27:07 +00:00
vips
pkg-config
2024-07-07 17:00:34 +00:00
];
};
});
};
}