1
0
Fork 0

make flake work, sorta

This commit is contained in:
saji 2024-07-07 13:27:07 -05:00
parent c1eb71b9ec
commit a846dac17e
4 changed files with 3435 additions and 2014 deletions

1
.gitignore vendored
View file

@ -1,3 +1,4 @@
_site/ _site/
node_modules/ node_modules/
.cache .cache
result

View file

@ -14,49 +14,33 @@
} }
)); ));
env = pkgs: pkgs.callPackage ({ mkYarnModules }:
mkYarnModules {
pname = "blog-env";
version = "2.2.2";
yarnLock = ./yarn.lock;
packageJSON = ./package.json;
}) { };
in { in {
packages = forAllSystems (pkgs: rec { packages = forAllSystems (pkgs: rec {
eleventyEnv = (env pkgs); default = pkgs.buildNpmPackage {
blog = pkgs.callPackage ( name = "hi";
{ stdenvNoCC, eleventyEnv, lib, nodejs, vips}: buildInputs = with pkgs; [
stdenvNoCC.mkDerivation {
pname = "blog";
version = "2.2.2";
src = ./.;
nativeBuildInputs = [
eleventyEnv
nodejs nodejs
vips vips
]; ];
ELEVENTY_ENVIRONMENT = "prod"; nativeBuildInputs = with pkgs; [
configurePhase = '' pkg-config
ln -s ${eleventyEnv}/node_modules ./node_modules ];
''; # npmDepsHash = "sha256-lm0CUyMjW7nu4XcbhbbFCfLZpI3XgW7Ep7l2appnVCU=";
npmDepsHash = "sha256-/OuIrO7zEMSR6sCenB2A2rJatVcYcq976lMugQtQTEs=";
buildPhase = '' # npmBuild = "npm run build";
npx eleventy src = ./.;
'';
installPhase = '' installPhase = ''
cp -ar _site $out cp -ar _site/ $out
''; '';
}) { inherit eleventyEnv; }; };
}); });
devShells = forAllSystems (pkgs: { devShells = forAllSystems (pkgs: {
default = pkgs.mkShell { default = pkgs.mkShell {
packages = with pkgs; [ packages = with pkgs; [
nodejs nodejs
yarn vips
(env pkgs) pkg-config
]; ];
}; };
}); });

3416
package-lock.json generated Normal file

File diff suppressed because it is too large Load diff

1980
yarn.lock

File diff suppressed because it is too large Load diff