-
Notifications
You must be signed in to change notification settings - Fork 2
/
flake.nix
36 lines (35 loc) · 1.15 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
{
inputs = {
nixpkgs.url = github:NixOS/nixpkgs/nixos-22.11;
flake-utils.url = github:numtide/flake-utils;
};
outputs = { self, nixpkgs, flake-utils, ... }@attrs: flake-utils.lib.eachSystem [ "x86_64-linux" "aarch64-linux" ] (system: let
pkgs = nixpkgs.legacyPackages.${system};
add-setuptools = super: name: {
${name} = super.${name}.overridePythonAttrs (
old: {
buildInputs = (old.buildInputs or [ ]) ++ [ super.setuptools ];
}
);
};
nixosLib = import (nixpkgs + "/nixos/lib") { inherit system; };
common = {
projectDir = self;
overrides = pkgs.poetry2nix.defaultPoetryOverrides.extend
(self: super:
(add-setuptools super "django-bootstrap5")
// (add-setuptools super "django-sass-processor")
// (add-setuptools super "uwsgi")
);
};
autologin = { ... }: { services.getty.autologinUser = "root"; };
in {
devShells.default = (pkgs.poetry2nix.mkPoetryEnv common // {
editablePackageSources = {
ctf = ./.;
};
}).env.overrideAttrs (prev: {
buildInputs = [ pkgs.python310 pkgs.poetry ];
});
});
}