Skip to content

Commit 3ca0324

Browse files
committed
chore: update flake to latest nixpkgs + out-of-tree poetry2nix
Prepare for poetry2nix removal in nixpkgs
1 parent 747e9c8 commit 3ca0324

File tree

3 files changed

+113
-40
lines changed

3 files changed

+113
-40
lines changed

flake.lock

Lines changed: 102 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 11 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
{
22
description = "NixOps: a tool for deploying to [NixOS](https://nixos.org) machines in a network or the cloud";
33

4-
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
4+
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable-small";
5+
6+
inputs.poetry2nix.url = "github:nix-community/poetry2nix";
7+
inputs.poetry2nix.inputs.nixpkgs.follows = "nixpkgs";
58

69
inputs.utils.url = "github:numtide/flake-utils";
710

8-
outputs = { self, nixpkgs, utils }: utils.lib.eachDefaultSystem (system: let
11+
outputs = { self, nixpkgs, poetry2nix, utils }: utils.lib.eachDefaultSystem (system: let
912
pkgs = import nixpkgs { inherit system; };
13+
poetry2nix' = import poetry2nix { inherit pkgs; };
1014

11-
pythonEnv = (pkgs.poetry2nix.mkPoetryEnv {
15+
pythonEnv = poetry2nix'.mkPoetryEnv {
1216
projectDir = ./.;
13-
overrides = [
14-
pkgs.poetry2nix.defaultPoetryOverrides
15-
(import ./overrides.nix { inherit pkgs; })
16-
];
17-
});
17+
};
1818
linters.doc = pkgs.writers.writeBashBin "lint-docs" ''
1919
set -eux
2020
# When running it in the Nix sandbox, there is no git repository
@@ -57,22 +57,14 @@
5757

5858
defaultApp = apps.default;
5959

60-
packages.default = let
61-
overrides = import ./overrides.nix { inherit pkgs; };
62-
63-
in pkgs.poetry2nix.mkPoetryApplication {
60+
packages.default = poetry2nix'.mkPoetryApplication {
6461
projectDir = ./.;
6562

6663
propagatedBuildInputs = [
6764
pkgs.openssh
6865
pkgs.rsync
6966
];
7067

71-
overrides = [
72-
pkgs.poetry2nix.defaultPoetryOverrides
73-
overrides
74-
];
75-
7668
# TODO: Re-add manual build
7769
};
7870

@@ -118,7 +110,7 @@
118110
name = "nixops-docs";
119111
# we use cleanPythonSources because the default gitignore
120112
# implementation doesn't support the restricted evaluation
121-
src = pkgs.poetry2nix.cleanPythonSources {
113+
src = poetry2nix'.cleanPythonSources {
122114
src = ./.;
123115
};
124116

@@ -138,7 +130,7 @@
138130
name = "check-lint-docs";
139131
# we use cleanPythonSources because the default gitignore
140132
# implementation doesn't support the restricted evaluation
141-
src = pkgs.poetry2nix.cleanPythonSources {
133+
src = poetry2nix'.cleanPythonSources {
142134
src = ./.;
143135
};
144136
dontBuild = true;

overrides.nix

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)