nixified
This commit is contained in:
parent
01943ff5a0
commit
9da6725d90
6 changed files with 2067 additions and 1 deletions
37
flake.nix
Normal file
37
flake.nix
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
{
|
||||
description = "";
|
||||
|
||||
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
inputs.flake-utils.url = "github:numtide/flake-utils";
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
nixpkgs,
|
||||
flake-utils,
|
||||
}: (
|
||||
flake-utils.lib.eachDefaultSystem
|
||||
(system: let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
quartz = self.packages."${system}".quartz;
|
||||
inherit self;
|
||||
in {
|
||||
packages.default = pkgs.stdenv.mkDerivation {
|
||||
name = "quartz-site";
|
||||
src = ./.;
|
||||
buildPhase = ''
|
||||
ln -s ${quartz}/lib/node_modules/@jackyzha0/quartz/node_modules node_modules
|
||||
${quartz}/bin/quartz build
|
||||
'';
|
||||
installPhase = ''
|
||||
cp -r public $out
|
||||
'';
|
||||
};
|
||||
packages.quartz = pkgs.buildNpmPackage {
|
||||
name = "quartz";
|
||||
src = ./.;
|
||||
npmDepsHash = "sha256-hawMRXs2VvIeZ7hP8NZDBU8yqg/f2cTzmGEvn+VzjE4=";
|
||||
dontNpmBuild = true;
|
||||
};
|
||||
})
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue