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