-
Notifications
You must be signed in to change notification settings - Fork 6
/
flake.nix
41 lines (37 loc) · 1.4 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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
{
description = "Python LDAP library";
inputs.flake-utils.url = "github:numtide/flake-utils";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
inputs.poetry2nix = {
url = "github:nix-community/poetry2nix";
# url = "github:sciyoshi/poetry2nix/new-bootstrap-fixes";
inputs.nixpkgs.follows = "nixpkgs";
};
outputs = { self, nixpkgs, flake-utils, poetry2nix }:
flake-utils.lib.eachDefaultSystem (system:
let
p2n = import poetry2nix { inherit pkgs; };
mkPoetryApplication = p2n.mkPoetryApplication;
pkgs = nixpkgs.legacyPackages.${system};
slapd = pkgs.writeShellScriptBin "slapd" ''
exec ${pkgs.openldap}/libexec/slapd "$@"
'';
in {
packages = {
python-tldap = mkPoetryApplication {
projectDir = self;
overrides = p2n.overrides.withDefaults (final: prev: {
nh3 = prev.nh3.override { preferWheel = true; };
furo = prev.furo.override { preferWheel = true; };
bump2version = prev.bump2version.overridePythonAttrs (oldAttrs: {
buildInputs = oldAttrs.buildInputs ++ [ final.setuptools ];
});
});
};
default = self.packages.${system}.python-tldap;
};
devShells.default = pkgs.mkShell {
packages = [ pkgs.poetry pkgs.libffi slapd pkgs.openldap ];
};
});
}