Debian Codegraph @

flake.nix

raw symbols SCIP
1 {
2 inputs = {
3 nixpkgs.url = "github:NixOS/nixpkgs?ref=nixos-unstable";
4 flake-utils.url = "github:numtide/flake-utils?ref=main";
5 nix-filter.url = "github:numtide/nix-filter?ref=main";
6
7 poetry2nix = {
8 url = "github:nix-community/poetry2nix?ref=master";
9 inputs.nixpkgs.follows = "nixpkgs";
10 inputs.flake-utils.follows = "flake-utils";
11 };
12 };
13
14 outputs = inputs:
15 inputs.flake-utils.lib.eachDefaultSystem (system:
16 let
17 # pkgs = inputs.nixpkgs.legacyPackages.${system};
18 pkgs = import inputs.nixpkgs {
19 inherit system;
20 config.allowUnfree = true;
21 };
22
23 python = pkgs.python3;
24
25 builder = (inputs.poetry2nix.lib.mkPoetry2Nix {
26 inherit pkgs;
27 }).mkPoetryApplication;
28 in {
29 packages.default = builder {
30 inherit python;
31
32 pyproject = ./pyproject.toml;
33 poetrylock = ./poetry.lock;
34
35 src = let filter = inputs.nix-filter.lib;
36 in filter {
37 root = ./.;
38 include = [ "README.md" "poetry.lock" "pyproject.toml" "beangrow" ];
39 exclude = [ (filter.matchName "__pycache__") ];
40 };
41 };
42
43 devShells.default = pkgs.mkShell {
44 packages = [ python ]
45 ++ (with python.pkgs; [ black pip pytest pytest-cov ])
46 ++ (with pkgs; [
47 engage
48 nixpkgs-fmt
49 poetry
50 pyright
51 ruff
52 ]) ++ (with pkgs.nodePackages; [ markdownlint-cli ]);
53
54 NIX_PYTHON_SITE_PACKAGES = python.sitePackages;
55 shellHook = ''
56 export LD_LIBRARY_PATH="${
57 pkgs.lib.makeLibraryPath [ pkgs.zlib ]
58 }:$LD_LIBRARY_PATH"
59
60 export LD_LIBRARY_PATH="${pkgs.stdenv.cc.cc.lib}/lib:$LD_LIBRARY_PATH"
61 '';
62
63 };
64 });
65 }