make flake work, sorta
This commit is contained in:
parent
c1eb71b9ec
commit
a846dac17e
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,3 +1,4 @@
|
||||||
_site/
|
_site/
|
||||||
node_modules/
|
node_modules/
|
||||||
.cache
|
.cache
|
||||||
|
result
|
||||||
|
|
44
flake.nix
44
flake.nix
|
@ -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
3416
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue