refactor: use nix flake instead venv
This commit is contained in:
parent
e63074a903
commit
e7abbd0891
6 changed files with 128 additions and 6 deletions
64
flake.nix
Normal file
64
flake.nix
Normal file
|
@ -0,0 +1,64 @@
|
|||
{
|
||||
description = "Development shell for Personal blog";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
|
||||
flake-utils = {
|
||||
url = "github:numtide/flake-utils";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = { nixpkgs , flake-utils, ... }: flake-utils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
};
|
||||
pelicanplugins-neighbors = ( with pkgs; stdenv.mkDerivation {
|
||||
pname = "pelicanplugins-neighbors";
|
||||
version = "1.2.0";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "pelican-plugins";
|
||||
repo = "neighbors";
|
||||
rev = "60649ac6f3494d01a37b9c6d3d455f9dc2502d55";
|
||||
hash = "sha256-c6etuRqve9xj6NhGRAim2A0ae8xv6mI/yez+suQuZ8U=";
|
||||
};
|
||||
installPhase = ''
|
||||
cp -r $src/pelican/plugins/neighbors $out
|
||||
'';
|
||||
});
|
||||
pelicanplugins-md_include = ( with pkgs; stdenv.mkDerivation {
|
||||
pname = "pelicanplugins-md_include";
|
||||
version = "1.0.4";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "pelican-plugins";
|
||||
repo = "markdown-include";
|
||||
rev = "df0b3e55c45471283ca62d6e157b61a8caa35e37";
|
||||
hash = "sha256-y0dIvyEYLbYqkm+6yJOUYI3apzEMJ/N/JUwWTqjdsNg=";
|
||||
};
|
||||
installPhase = ''
|
||||
cp -r $src/pelican/plugins/md_include $out
|
||||
'';
|
||||
});
|
||||
in {
|
||||
devShells = {
|
||||
default = pkgs.mkShell {
|
||||
nativeBuildInputs = with pkgs; [
|
||||
lefthook
|
||||
go-task
|
||||
convco
|
||||
typos
|
||||
shellcheck
|
||||
shfmt
|
||||
python3
|
||||
python3Packages.pelican
|
||||
python3Packages.markdown-include
|
||||
];
|
||||
shellHook = ''
|
||||
mkdir -p plugins
|
||||
ln -snf "${pelicanplugins-neighbors}" "plugins/neighbors"
|
||||
ln -snf "${pelicanplugins-md_include}" "plugins/md_include"
|
||||
'';
|
||||
};
|
||||
};
|
||||
});
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue