Accidental big update to flake, but actually just fixing the version of nixpkgs to 24.11

This commit is contained in:
2025-05-13 20:31:33 +02:00
parent f3a2d4bb52
commit 91c6618202
2 changed files with 59 additions and 29 deletions

45
flake.lock generated
View File

@@ -5,11 +5,11 @@
"systems": "systems" "systems": "systems"
}, },
"locked": { "locked": {
"lastModified": 1710146030, "lastModified": 1726560853,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", "narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", "rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -26,11 +26,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1703863825, "lastModified": 1729742964,
"narHash": "sha256-rXwqjtwiGKJheXB43ybM8NwWB8rO2dSRrEqes0S7F5Y=", "narHash": "sha256-B4mzTcQ0FZHdpeWcpDYPERtyjJd/NIuaQ9+BV1h+MpA=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nix-github-actions", "repo": "nix-github-actions",
"rev": "5163432afc817cf8bd1f031418d1869e4c9d5547", "rev": "e04df33f62cdcf93d73e9a04142464753a16db67",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -41,33 +41,33 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1727089097, "lastModified": 1746957726,
"narHash": "sha256-ZMHMThPsthhUREwDebXw7GX45bJnBCVbfnH1g5iuSPc=", "narHash": "sha256-k9ut1LSfHCr0AW82ttEQzXVCqmyWVA5+SHJkS5ID/Jo=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "568bfef547c14ca438c56a0bece08b8bb2b71a9c", "rev": "a39ed32a651fdee6842ec930761e31d1f242cb94",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "NixOS",
"ref": "nixpkgs-unstable", "ref": "nixos-24.11",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1719763542, "lastModified": 1730157240,
"narHash": "sha256-mXkOj9sJ0f69Nkc2dGGOWtof9d1YNY8Le/Hia3RN+8Q=", "narHash": "sha256-P8wF4ag6Srmpb/gwskYpnIsnspbjZlRvu47iN527ABQ=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "e6cdd8a11b26b4d60593733106042141756b54a3", "rev": "75e28c029ef2605f9841e0baa335d70065fe7ae2",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "NixOS",
"ref": "nixos-unstable-small",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "75e28c029ef2605f9841e0baa335d70065fe7ae2",
"type": "github" "type": "github"
} }
}, },
@@ -80,11 +80,11 @@
"treefmt-nix": "treefmt-nix" "treefmt-nix": "treefmt-nix"
}, },
"locked": { "locked": {
"lastModified": 1727169160, "lastModified": 1743690424,
"narHash": "sha256-m/3tT0Wvk2V4H15riZC/yT7i7t+8V58HTDpthKV5yhk=", "narHash": "sha256-cX98bUuKuihOaRp8dNV1Mq7u6/CQZWTPth2IJPATBXc=",
"owner": "nix-community", "owner": "nix-community",
"repo": "poetry2nix", "repo": "poetry2nix",
"rev": "7624b3e0275d9b52dbdda46ef7ffee66b36ff823", "rev": "ce2369db77f45688172384bbeb962bc6c2ea6f94",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -124,8 +124,9 @@
"type": "github" "type": "github"
}, },
"original": { "original": {
"id": "systems", "owner": "nix-systems",
"type": "indirect" "repo": "default",
"type": "github"
} }
}, },
"treefmt-nix": { "treefmt-nix": {
@@ -136,11 +137,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1719749022, "lastModified": 1730120726,
"narHash": "sha256-ddPKHcqaKCIFSFc/cvxS14goUhCOAwsM1PbMr0ZtHMg=", "narHash": "sha256-LqHYIxMrl/1p3/kvm2ir925tZ8DkI0KA10djk8wecSk=",
"owner": "numtide", "owner": "numtide",
"repo": "treefmt-nix", "repo": "treefmt-nix",
"rev": "8df5ff62195d4e67e2264df0b7f5e8c9995fd0bd", "rev": "9ef337e492a5555d8e17a51c911ff1f02635be15",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@@ -1,5 +1,5 @@
{ {
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
inputs.poetry2nix.url = "github:nix-community/poetry2nix"; inputs.poetry2nix.url = "github:nix-community/poetry2nix";
outputs = { self, nixpkgs, poetry2nix }: outputs = { self, nixpkgs, poetry2nix }:
@@ -7,20 +7,49 @@
supportedSystems = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ]; supportedSystems = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];
forAllSystems = nixpkgs.lib.genAttrs supportedSystems; forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
pkgs = forAllSystems (system: nixpkgs.legacyPackages.${system}); pkgs = forAllSystems (system: nixpkgs.legacyPackages.${system});
getPythonEnv = system: let
systemPkgs = pkgs.${system};
python = systemPkgs.python3;
#.override {
# packageOverrides = final: prev: {
# pillow = prev.pillow.overridePythonAttrs (old: {
# buildInputs = [ systemPkgs.libavif systemPkgs.libwebp ];
# nativeBuildInputs = [ systemPkgs.pkg-config ];
# #preConfigure = ''
# # export AVIF_ROOT=${systemPkgs.libavif}
# # export WEBP_ROOT=${systemPkgs.libwebp}
# # ${old.preConfigure or ""}
# #'';
# shellHook = ''
# export AVIF_ROOT=${systemPkgs.libavif}
# export WEBP_ROOT=${systemPkgs.libwebp}
# ${old.shellHook or ""}
# '';
# });
# };
#};
poetryLib = poetry2nix.lib.mkPoetry2Nix { pkgs = systemPkgs; };
inherit (poetryLib) mkPoetryApplication mkPoetryEnv;
in {
systemPkgs = systemPkgs;
python = python;
mkPoetryApplication = mkPoetryApplication;
mkPoetryEnv = mkPoetryEnv;
};
in in
{ {
packages = forAllSystems (system: let packages = forAllSystems (system: let
inherit (poetry2nix.lib.mkPoetry2Nix { pkgs = pkgs.${system}; }) mkPoetryApplication; env = getPythonEnv system;
in { in {
default = mkPoetryApplication { projectDir = self; }; default = env.mkPoetryApplication { python = env.python; projectDir = self; };
}); });
devShells = forAllSystems (system: let devShells = forAllSystems (system: let
inherit (poetry2nix.lib.mkPoetry2Nix { pkgs = pkgs.${system}; }) mkPoetryEnv; env = getPythonEnv system;
in { in {
default = pkgs.${system}.mkShellNoCC { default = env.systemPkgs.mkShellNoCC {
packages = with pkgs.${system}; [ packages = with env.systemPkgs; [
(mkPoetryEnv { projectDir = self; }) (env.mkPoetryEnv { python = env.python; projectDir = self; })
poetry poetry
]; ];
}; };