-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathflake.nix
27 lines (25 loc) · 1.19 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
{ description = "Application packaged using poetry2nix";
inputs.flake-utils.url = "github:numtide/flake-utils";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
inputs.poetry2nix =
{ url = "github:nix-community/poetry2nix/master";
inputs.flake-utils.follows = "flake-utils";
inputs.nixpkgs.follows = "nixpkgs"; };
outputs = {self, nixpkgs, flake-utils, poetry2nix}:
let out =
system: let
pkgs = import nixpkgs {inherit system; overlays = [poetry2nix.overlay];};
python = pkgs.python310;
poetryEnv = pkgs.poetry2nix.mkPoetryEnv
{ inherit python; projectDir = ./.;
overrides = [pkgs.poetry2nix.defaultPoetryOverrides]; };
tl = with pkgs;
( texlive.combine
{ inherit (texlive) scheme-basic standalone xkeyval pgf tikz-cd fontsize
varwidth bussproofs; } );
pyEnv = python.withPackages (p: with p; [poetry]);
in rec
{ devShell = pkgs.mkShell { buildInputs = [tl pkgs.pdf2svg pyEnv]; };
packages.default = devShell; };
in
with flake-utils.lib; eachSystem defaultSystems out; }