47 lines
1.2 KiB
Nix
47 lines
1.2 KiB
Nix
{
|
|
description = "Pleshevski personal site";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
};
|
|
|
|
outputs = { self, nixpkgs, flake-utils }:
|
|
let
|
|
out = system:
|
|
let
|
|
inherit (builtins) substring;
|
|
|
|
pkgs = import nixpkgs { inherit system; };
|
|
version = "0.0.1+${substring 0 8 self.lastModifiedDate}_${self.shortRev or "dirty"}";
|
|
in
|
|
{
|
|
packages.default = with pkgs; stdenv.mkDerivation (finalAttrs: {
|
|
pname = "pleshevski_site";
|
|
inherit version;
|
|
|
|
src = ./.;
|
|
|
|
dontBuild = true;
|
|
|
|
installPhase = ''
|
|
mkdir -p $out
|
|
cp -r dist/* $out
|
|
'';
|
|
});
|
|
|
|
devShells.default = pkgs.mkShell {
|
|
buildInputs = with pkgs; [
|
|
pre-commit
|
|
nodejs_22
|
|
gnumake
|
|
pnpm
|
|
nodePackages.typescript-language-server # typescript
|
|
nodePackages.vscode-langservers-extracted # html, css, json, eslint
|
|
];
|
|
};
|
|
};
|
|
in
|
|
flake-utils.lib.eachDefaultSystem out;
|
|
|
|
}
|