Skip to content

Commit

Permalink
Problem: dependency being old (#118)
Browse files Browse the repository at this point in the history
Solution:
- relax and upgrade some dependencies

upgrade dotenv

update jsonnet

fix build

upgrade pytest

pytest v8

cleanup
  • Loading branch information
yihuang authored Feb 19, 2024
1 parent d86272f commit 6fe15c8
Show file tree
Hide file tree
Showing 4 changed files with 569 additions and 346 deletions.
93 changes: 88 additions & 5 deletions flake.lock

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

63 changes: 28 additions & 35 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -1,45 +1,38 @@
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/release-22.11";
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
poetry2nix = {
url = "github:nix-community/poetry2nix";
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-utils.follows = "flake-utils";
};
};
outputs = { self, nixpkgs, flake-utils }:
outputs = { self, nixpkgs, flake-utils, poetry2nix }:
(flake-utils.lib.eachDefaultSystem (system:
let
pkgs = (import nixpkgs { inherit system; config = { }; });
overrides = pkgs.poetry2nix.overrides.withDefaults (pkgs.lib.composeManyExtensions [
(self: super:
let
buildSystems = {
eth-bloom = [ "setuptools" ];
cprotobuf = [ "setuptools" ];
durations = [ "setuptools" ];
multitail2 = [ "setuptools" ];
pytest-github-actions-annotate-failures = [ "setuptools" ];
flake8-black = [ "setuptools" ];
multiaddr = [ "setuptools" ];
};
in
pkgs.lib.mapAttrs
(attr: systems: super.${attr}.overridePythonAttrs
(old: {
nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ map (a: self.${a}) systems;
}))
buildSystems
)
(self: super: {
eth-bloom = super.eth-bloom.overridePythonAttrs {
preConfigure = ''
substituteInPlace setup.py --replace \'setuptools-markdown\' ""
'';
pkgs = (import nixpkgs {
inherit system;
config = { };
overlays = [
poetry2nix.overlays.default
];
});
overrides = pkgs.poetry2nix.overrides.withDefaults (self: super:
let
buildSystems = {
durations = [ "setuptools" ];
multitail2 = [ "setuptools" ];
pytest-github-actions-annotate-failures = [ "setuptools" ];
};
pyyaml-include = super.pyyaml-include.overridePythonAttrs {
preConfigure = ''
substituteInPlace setup.py --replace "setup()" "setup(version=\"1.3\")"
'';
};
})
]);
in
pkgs.lib.mapAttrs
(attr: systems: super.${attr}.overridePythonAttrs
(old: {
nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ map (a: self.${a}) systems;
}))
buildSystems
);
in
rec {
packages.default = pkgs.poetry2nix.mkPoetryApplication
Expand Down
Loading

0 comments on commit 6fe15c8

Please sign in to comment.