Skip to content

Commit

Permalink
Build now works (#1292)
Browse files Browse the repository at this point in the history
  • Loading branch information
brianmay authored Oct 28, 2023
1 parent ba0d740 commit f2d0a5e
Show file tree
Hide file tree
Showing 4 changed files with 195 additions and 27 deletions.
71 changes: 54 additions & 17 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 33 additions & 5 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
description = "Cluster account management";

inputs.flake-utils.url = "github:numtide/flake-utils";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
inputs.poetry2nix = {
url = "github:nix-community/poetry2nix";
inputs.nixpkgs.follows = "nixpkgs";
Expand All @@ -11,22 +11,50 @@
outputs = { self, nixpkgs, flake-utils, poetry2nix }:
flake-utils.lib.eachDefaultSystem (system:
let
# see https://github.com/nix-community/poetry2nix/tree/master#api for more functions and examples.
inherit (poetry2nix.legacyPackages.${system}) mkPoetryApplication;
p2n = import poetry2nix { inherit pkgs; };
mkPoetryApplication = p2n.mkPoetryApplication;
pkgs = nixpkgs.legacyPackages.${system};
slapd = pkgs.writeShellScriptBin "slapd" ''
exec ${pkgs.openldap}/libexec/slapd "$@"
'';

in {
packages = {
karaage = mkPoetryApplication { projectDir = self; };
karaage = mkPoetryApplication {
projectDir = self;
overrides = p2n.overrides.withDefaults (final: prev: {
#nh3 = prev.nh3.override { preferWheel = true; };
furo = prev.furo.override { preferWheel = true; };
cracklib = prev.cracklib.overridePythonAttrs (oldattrs: {
buildInputs = oldattrs.buildInputs
++ [ final.setuptools pkgs.cracklib ];
});
django-filter = prev.django-filter.overridePythonAttrs
(oldattrs: {
buildInputs = oldattrs.buildInputs ++ [ final.flit-core ];
});
django-ajax-selects = prev.django-ajax-selects.overridePythonAttrs
(oldattrs: {
buildInputs = oldattrs.buildInputs ++ [ final.setuptools ];
});
python-alogger = prev.python-alogger.overridePythonAttrs
(oldattrs: {
buildInputs = oldattrs.buildInputs ++ [ final.setuptools ];
});
python-tldap = prev.python-tldap.overridePythonAttrs (oldattrs: {
buildInputs = oldattrs.buildInputs ++ [ final.poetry-core ];
});
bump2version = prev.bump2version.overridePythonAttrs (oldAttrs: {
buildInputs = oldAttrs.buildInputs ++ [ final.setuptools ];
});
});
};
default = self.packages.${system}.karaage;
};

devShells.default = pkgs.mkShell {
packages = [
poetry2nix.packages.${system}.poetry
pkgs.poetry
pkgs.libffi
slapd
pkgs.openldap
Expand Down
Loading

0 comments on commit f2d0a5e

Please sign in to comment.