Skip to content

Commit

Permalink
move backy to 23.05
Browse files Browse the repository at this point in the history
  • Loading branch information
Johann Bahl committed Oct 2, 2023
1 parent 3cb1fa9 commit 88f5bb0
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 59 deletions.
2 changes: 1 addition & 1 deletion nixos/roles/backyserver.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ let
role = config.flyingcircus.roles.backyserver;
enc = config.flyingcircus.enc;

backy = pkgs.callPackage ../../pkgs/backy/default.nix { };
backy = pkgs.backy;

backyExtract = let
src = pkgs.fetchFromGitHub {
Expand Down
57 changes: 12 additions & 45 deletions pkgs/backy/default.nix
Original file line number Diff line number Diff line change
@@ -1,54 +1,21 @@
{
poetry2nix,
fetchFromGitHub,
poetry2nix,
lzo,
python310
}:
python310,
mkShellNoCC,
poetry,
runCommand,
}@inputs:
let
#src = /home/os/backy;
src = fetchFromGitHub {
owner = "flyingcircusio";
repo = "backy";
rev = "5fa55f0c512e557bea3802f0be10e997e6f33f03";
hash = "sha256-n3q8xr7o/REiftxHc2LYRvKnhu7Ab2MuQ+OfhSniOhk=";
rev = "e37a7f6570b6b9194cb3a27d8db2951eb5c992ce";
hash = "sha256-s7FazUx/o68VY0gaSfzSMQI4XX8o1qqKf6IEoynM4nQ=";
};

in poetry2nix.mkPoetryApplication {
projectDir = src;
src = src;
doCheck = true;
python = python310;
extras = [];
overrides = poetry2nix.overrides.withDefaults (self: super: {
python-lzo = super.python-lzo.overrideAttrs (old: {
buildInputs = [ lzo ];
});
telnetlib3 = super.telnetlib3.overrideAttrs (old: {
buildInputs = [ super.setuptools ];
});
pytest-flake8 = super.pytest-flake8.overrideAttrs (old: {
buildInputs = [ super.setuptools ];
});
filelock = super.iniconfig.overrideAttrs (old: {
buildInputs = [ super.hatchling super.hatch-vcs ];
});
iniconfig = super.iniconfig.overrideAttrs (old: {
buildInputs = [ super.hatchling super.hatch-vcs ];
});
humanize = super.humanize.overrideAttrs (old: {
buildInputs = [ super.hatchling super.hatch-vcs ];
});
prettytable = super.prettytable.overrideAttrs (old: {
buildInputs = [ super.hatchling super.hatch-vcs ];
});
# dirty workaround, as the virtualenv-20.17.1 extracted via poetry2nix did not
# find its `filelock` dependency
virtualenv = python310.pkgs.virtualenv;
#virtualenv = super.virtualenv.overrideAttrs (old: {
# buildInputs = [ self.distlib self.filelock self.platformdirs ];
#});
consulate-fc-nix-test = super.consulate-fc-nix-test.overrideAttrs (old: {
buildInputs = [ super.setuptools super.setuptools-scm ];
});
});
}
lib = import "${src}/lib.nix" inputs;

in
lib.packages.default
9 changes: 2 additions & 7 deletions pkgs/overlay.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ let
phps = (import ../nix-phps/pkgs/phps.nix) (../nix-phps)
{} super;

nixpkgs-22_11 = import versions.nixpkgs-22_11 {};
nixpkgs-23_05 = import versions.nixpkgs-23_05 {};

inherit (super) fetchpatch fetchurl lib;
Expand All @@ -26,6 +25,8 @@ in {
pythonPackages = nixpkgs-23_05.python310Packages;
});

backy = super.callPackage ./backy { inherit (nixpkgs-23_05) poetry2nix python310 mkShellNoCC;};

#
# imports from other nixpkgs versions or local definitions
#
Expand Down Expand Up @@ -449,12 +450,6 @@ in {
];
});

poetry = nixpkgs-22_11.poetry;
poetry2nix = nixpkgs-22_11.poetry2nix;

python310 = nixpkgs-22_11.python310;
python310Packages = nixpkgs-22_11.python310Packages;

postgis_2_5 = super.postgis.overrideAttrs(_: rec {
version = "2.5.5";
src = super.fetchurl {
Expand Down
6 changes: 0 additions & 6 deletions versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,6 @@
"rev": "0f5fbc131671be14b6e76daa8125284b5111b33b",
"sha256": "mL+pG1NIg8kKthDRz3zWgo+lzinSauslAxgxLZZmxX8="
},
"nixpkgs-22.11": {
"owner": "flyingcircusio",
"repo": "nixpkgs",
"rev": "6a70ea11060b8acf6ec3867d4db3d078e745a377",
"sha256": "sha256-g01dOC/P8QedWBkLp4fevIIsJrjV5FdFdK3n6OUADs8="
},
"nixpkgs-23.05": {
"owner": "flyingcircusio",
"repo": "nixpkgs",
Expand Down

0 comments on commit 88f5bb0

Please sign in to comment.