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/
node_modules/
.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 {
packages = forAllSystems (pkgs: rec {
eleventyEnv = (env pkgs);
blog = pkgs.callPackage (
{ stdenvNoCC, eleventyEnv, lib, nodejs, vips}:
stdenvNoCC.mkDerivation {
pname = "blog";
version = "2.2.2";
src = ./.;
nativeBuildInputs = [
eleventyEnv
default = pkgs.buildNpmPackage {
name = "hi";
buildInputs = with pkgs; [
nodejs
vips
];
ELEVENTY_ENVIRONMENT = "prod";
configurePhase = ''
ln -s ${eleventyEnv}/node_modules ./node_modules
'';
buildPhase = ''
npx eleventy
'';
nativeBuildInputs = with pkgs; [
pkg-config
];
# npmDepsHash = "sha256-lm0CUyMjW7nu4XcbhbbFCfLZpI3XgW7Ep7l2appnVCU=";
npmDepsHash = "sha256-/OuIrO7zEMSR6sCenB2A2rJatVcYcq976lMugQtQTEs=";
# npmBuild = "npm run build";
src = ./.;
installPhase = ''
cp -ar _site $out
cp -ar _site/ $out
'';
}) { inherit eleventyEnv; };
};
});
devShells = forAllSystems (pkgs: {
default = pkgs.mkShell {
packages = with pkgs; [
nodejs
yarn
(env pkgs)
vips
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