Files
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

68 lines
1.7 KiB
Nix

{
nodePkgs,
pkgs,
lib,
makeWrapper,
}:
let
ESBUILD_BINARY_PATH = lib.getExe (
pkgs.esbuild.override {
buildGoModule =
args:
pkgs.buildGoModule (
args
// rec {
version = "0.25.5";
src = pkgs.fetchFromGitHub {
owner = "evanw";
repo = "esbuild";
rev = "v${version}";
hash = "sha256-jemGZkWmN1x2+ZzJ5cLp3MoXO0oDKjtZTmZS9Be/TDw=";
};
vendorHash = "sha256-+BfxCyg0KkDQpHt/wycy/8CTG6YBA/VJvJFhhzUnSiQ=";
}
);
}
);
in
nodePkgs."elm-pages".overrideAttrs (old: {
inherit ESBUILD_BINARY_PATH;
nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [
makeWrapper
old.nodejs.pkgs.node-gyp-build
];
# can't use `patches = [ <patch_file> ]` with a nodePkgs derivation;
# need to patch in one of the build phases instead.
# see upstream issue https://github.com/dillonkearns/elm-pages/issues/305 for dealing with the read-only problem
preFixup = ''
patch $out/lib/node_modules/elm-pages/generator/src/codegen.js ${./fix-read-only.patch}
patch $out/lib/node_modules/elm-pages/generator/src/init.js ${./fix-init-read-only.patch}
'';
postFixup = ''
wrapProgram $out/bin/elm-pages --prefix PATH : ${
with pkgs.elmPackages;
lib.makeBinPath [
elm
elm-review
elm-optimize-level-2
]
}
'';
meta =
with lib;
nodePkgs."elm-pages".meta
// {
description = "Statically typed site generator for Elm";
homepage = "https://github.com/dillonkearns/elm-pages";
license = licenses.bsd3;
maintainers = [
maintainers.turbomack
maintainers.jali-clarke
];
};
})