Drop node2nix and devShell.

pull/2/head
Joshua Potter 2024-02-01 08:11:29 -07:00
parent abfa7ef836
commit 3743c3e1b7
1 changed files with 15 additions and 22 deletions

View File

@ -18,16 +18,20 @@
let let
pkgs = nixpkgs.legacyPackages.${system}; pkgs = nixpkgs.legacyPackages.${system};
quartz = rec { quartz-src = pkgs.fetchFromGitHub {
src = pkgs.fetchFromGitHub { owner = "jackyzha0";
owner = "jrpotter";
repo = "quartz"; repo = "quartz";
rev = "8c126e9d21cd0bc90da5f78677d458fc81892af1"; rev = "444e05ee21687473c17c19e1d52d7da39694971c";
hash = "sha256-caB9F5lvroQ+ZcvzKW8RnKfzSHjEiYfZUSqZiuaggVs="; hash = "sha256-wUbNNNxp6LiNtnzFMSgzSB05AjbyOBMcfkfaA5wbCnQ=";
};
nodeDependencies = (pkgs.callPackage "${src}/default.nix" {}).nodeDependencies;
}; };
quartz = pkgs.buildNpmPackage {
pname = "quartz";
version = "v4";
src = quartz-src;
npmDepsHash = "sha256-W95Lr7rspPxYdFe1AVEJRcA/srM+uDDc8wpbRbGiLoQ=";
dontNpmBuild = true;
};
in in
{ {
packages = { packages = {
@ -39,13 +43,13 @@
nativeBuildInputs = [ pkgs.nodejs ]; nativeBuildInputs = [ pkgs.nodejs ];
buildPhase = '' buildPhase = ''
cp -r ${quartz.src} quartz cp -r ${quartz-src} quartz
cd quartz cd quartz
find -type f -execdir chmod 644 {} + find -type f -execdir chmod 644 {} +
find -type d -execdir chmod 755 {} + find -type d -execdir chmod 755 {} +
ln -s ${quartz.nodeDependencies}/lib/node_modules ./node_modules ln -s ${quartz}/lib/node_modules/@jackyzha0/quartz/node_modules ./node_modules
export PATH="${quartz.nodeDependencies}/bin:$PATH" export PATH="${quartz}/bin:$PATH"
rm -r content rm -r content
cp -r ${./notes} content cp -r ${./notes} content
@ -63,16 +67,5 @@
default = self.packages.${system}.app; default = self.packages.${system}.app;
}; };
devShells.default = pkgs.mkShell {
packages = with pkgs; [
node2nix
nodePackages.prettier
nodePackages.typescript-language-server
nodejs
prefetch-npm-deps
typescript
];
};
}); });
} }