basant/flake.nix

45 lines
1.4 KiB
Nix
Raw Normal View History

2021-11-29 04:26:21 -08:00
{
description = "Reproducible Environment for anish.lakhwara.com";
2021-11-29 04:26:21 -08:00
inputs = {
nixpkgs.url = "github:nixos/nixpkgs";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
2021-11-29 04:26:21 -08:00
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
my-python = pkgs.python3;
python-with-my-packages = my-python.withPackages (p: with p; [
icecream
python-ctags3
jinja2
click
pypandoc
# other python packages you want
]);
in
{
devShell = pkgs.mkShell {
buildInputs = [
python-with-my-packages
pkgs.pandoc
];
shellHook = ''
PYTHONPATH=${python-with-my-packages}/${python-with-my-packages.sitePackages}
# This only works when you have ~/vimwiki locally, since I'm not putting my unfiltered kitaab online
alias build='python3 src/kitaab-public/main.py'
# maybe set more env-vars
'';
};
2022-03-16 22:04:58 -07:00
defaultPackage = pkgs.python3Packages.buildPythonPackage {
# We should probably only call grab from main.py here
2022-03-16 22:04:58 -07:00
pname = "basant";
src = ./src;
version = "0.1";
propagatedBuildInputs = [ python-with-my-packages ];
};
});
2021-11-29 04:26:21 -08:00
}