add py-poetry template

pull/7/head
Hung 2023-01-19 14:02:39 -08:00
parent f9387aafc0
commit 651806c0e4
5 changed files with 50 additions and 1 deletions

View File

@ -1,5 +1,6 @@
# TODO: vim-plug and Mason supports laziness. Probably worth it to explore
# incremental dependencies based on the project
# TODO: just install these things, then symlink to mason's bin directory
#
# One thing to consider, though, /nix/store of `nix-shell` or `nix-develop`
# might be different from `home-manager`'s
@ -44,7 +45,7 @@ let
pkgs.zk # Zettelkasten (limited support)
pkgs.fd # Required by a Telescope plugin (?)
pkgs.stdenv.cc.cc.lib
# pkgs.rnix-lsp # doesn't work, Mason just installs it using cargo
pkgs.rnix-lsp # doesn't work, Mason just installs it using cargo
pkgs.rust4cargo

View File

@ -16,4 +16,8 @@
path = ./ts/turborepo;
description = "Typescript monorepo with tsconfig, eslint, but with minimal framework attached";
};
py-poetry = {
path = ./py-poetry;
description = "Python repository with poetry & poetry2nix";
};
}

View File

@ -0,0 +1,10 @@
(import
(
fetchTarball {
url = "https://github.com/edolstra/flake-compat/archive/99f1c2157fba4bfe6211a321fd0ee43199025dbf.tar.gz";
sha256 = "0x2jn3vrawwv9xp15674wjz9pixwjyj3j771izayl962zziivbx2";
}
)
{
src = ./.;
}).defaultNix

View File

@ -0,0 +1,24 @@
{
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
outputs = { self, nixpkgs }:
let
supportedSystems = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
pkgs = forAllSystems (system: nixpkgs.legacyPackages.${system});
in
{
packages = forAllSystems (system: {
default = pkgs.${system}.poetry2nix.mkPoetryApplication { projectDir = self; };
});
devShells = forAllSystems (system: {
default = pkgs.${system}.mkShellNoCC {
packages = with pkgs.${system}; [
(poetry2nix.mkPoetryEnv { projectDir = self; })
poetry
];
};
});
};
}

View File

@ -0,0 +1,10 @@
(import
(
fetchTarball {
url = "https://github.com/edolstra/flake-compat/archive/99f1c2157fba4bfe6211a321fd0ee43199025dbf.tar.gz";
sha256 = "0x2jn3vrawwv9xp15674wjz9pixwjyj3j771izayl962zziivbx2";
}
)
{
src = ./.;
}).shellNix