From cdfa34e1a84a58a31253e69073bcdaf35b3054de Mon Sep 17 00:00:00 2001 From: Dee Anzorge Date: Tue, 14 Nov 2023 03:04:54 +0100 Subject: [PATCH] nix: move to separate poetry2nix flake input As upstream nixos-unstable (23.11) is dropping in-tree poetry2nix, we're switching to using it from a separate input. --- flake.lock | 91 +++++++++++++++++++++++++++++++++++++++++++++++++++--- flake.nix | 8 ++++- 2 files changed, 94 insertions(+), 5 deletions(-) diff --git a/flake.lock b/flake.lock index 85b7ca147..ca69d8d06 100644 --- a/flake.lock +++ b/flake.lock @@ -1,12 +1,33 @@ { "nodes": { + "nix-github-actions": { + "inputs": { + "nixpkgs": [ + "poetry2nix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1698974481, + "narHash": "sha256-yPncV9Ohdz1zPZxYHQf47S8S0VrnhV7nNhCawY46hDA=", + "owner": "nix-community", + "repo": "nix-github-actions", + "rev": "4bb5e752616262457bc7ca5882192a564c0472d2", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nix-github-actions", + "type": "github" + } + }, "nixpkgs": { "locked": { - "lastModified": 1694767346, - "narHash": "sha256-5uH27SiVFUwsTsqC5rs3kS7pBoNhtoy9QfTP9BmknGk=", + "lastModified": 1699099776, + "narHash": "sha256-X09iKJ27mGsGambGfkKzqvw5esP1L/Rf8H3u3fCqIiU=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "ace5093e36ab1e95cb9463863491bee90d5a4183", + "rev": "85f1ba3e51676fa8cc604a3d863d729026a6b8eb", "type": "github" }, "original": { @@ -16,13 +37,54 @@ "type": "github" } }, + "poetry2nix": { + "inputs": { + "flake-utils": [ + "utils" + ], + "nix-github-actions": "nix-github-actions", + "nixpkgs": [ + "nixpkgs" + ], + "systems": "systems", + "treefmt-nix": "treefmt-nix" + }, + "locked": { + "lastModified": 1699840429, + "narHash": "sha256-MmnYcEht/ACXT1jVz+52PKFaX3ahz7+utOSjOVVdgGs=", + "owner": "nix-community", + "repo": "poetry2nix", + "rev": "4b235496501eacebc1afe7cc9bd8ce9cf88502e7", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "poetry2nix", + "type": "github" + } + }, "root": { "inputs": { "nixpkgs": "nixpkgs", + "poetry2nix": "poetry2nix", "utils": "utils" } }, "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "id": "systems", + "type": "indirect" + } + }, + "systems_2": { "locked": { "lastModified": 1681028828, "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", @@ -37,9 +99,30 @@ "type": "github" } }, + "treefmt-nix": { + "inputs": { + "nixpkgs": [ + "poetry2nix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1699786194, + "narHash": "sha256-3h3EH1FXQkIeAuzaWB+nK0XK54uSD46pp+dMD3gAcB4=", + "owner": "numtide", + "repo": "treefmt-nix", + "rev": "e82f32aa7f06bbbd56d7b12186d555223dc399d1", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "treefmt-nix", + "type": "github" + } + }, "utils": { "inputs": { - "systems": "systems" + "systems": "systems_2" }, "locked": { "lastModified": 1694529238, diff --git a/flake.nix b/flake.nix index e7668b5d0..607adfe56 100644 --- a/flake.nix +++ b/flake.nix @@ -4,14 +4,20 @@ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; utils.url = "github:numtide/flake-utils"; + poetry2nix = { + url = "github:nix-community/poetry2nix"; + inputs.nixpkgs.follows = "nixpkgs"; + inputs.flake-utils.follows = "utils"; + }; }; - outputs = { self, nixpkgs, utils }: + outputs = { self, nixpkgs, utils, ... }@inputs: utils.lib.eachDefaultSystem (system: let pkgs = import nixpkgs { inherit system; config.allowUnfree = true; + overlays = [ inputs.poetry2nix.overlays.default ]; }; in { packages.bookwyrm = pkgs.callPackage ./nix/default.nix { };