32 Star 98 Fork 0

Gitee 极速下载 / ghost-blog

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/tryghost/ghost
克隆/下载
flake.nix 1.31 KB
一键复制 编辑 原始数据 按行查看 历史
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
systems.url = "github:nix-systems/default";
};
outputs = {
systems,
nixpkgs,
...
} @ inputs: let
yarn_overlay = final: prev: {
yarn = prev.yarn.overrideAttrs(finalAttrs: prevAttrs: {
# This is to make sure that yarn runs the correct node version
# https://github.com/NixOS/nixpkgs/issues/145634#issuecomment-1627476963
installPhase = prevAttrs.installPhase + ''
ln -fs $out/libexec/yarn/bin/yarn $out/bin/yarn
ln -fs $out/libexec/yarn/bin/yarn.js $out/bin/yarn.js
ln -fs $out/libexec/yarn/bin/yarn $out/bin/yarnpkg
'';
});
};
# This gives us a central place to set the node version
node_overlay = final: prev: {
nodejs = prev.nodejs-18_x;
};
eachSystem = f:
nixpkgs.lib.genAttrs (import systems) (
system:
f ((nixpkgs.legacyPackages.${system}.extend yarn_overlay).extend node_overlay)
);
in {
devShells = eachSystem (pkgs: {
default = pkgs.mkShell {
buildInputs = with pkgs; [
nodejs
yarn
];
shellHook = ''
echo "node `${pkgs.nodejs}/bin/node --version`"
'';
};
});
};
}
JavaScript
1
https://gitee.com/mirrors/ghost-blog.git
git@gitee.com:mirrors/ghost-blog.git
mirrors
ghost-blog
ghost-blog
main

搜索帮助