From b2ee15b385f3e3b0eae846849961d210c34121b6 Mon Sep 17 00:00:00 2001 From: Sarah Renkhoff Date: Thu, 12 Sep 2024 15:16:51 +0200 Subject: [PATCH] nix-flake: Adapt nix flake * Update flake inputs * Follow nixos-unstable for nixpkgs input * Remove various unused arguments * Add workaround for missing test dependency in sphinx-sitemap Signed-off-by: Sarah Renkhoff Signed-off-by: Stephan Linz --- flake.lock | 147 ++++++++++++++++++++++++++++++++++++++--------------- flake.nix | 9 +--- python.nix | 5 ++ shell.nix | 2 - 4 files changed, 114 insertions(+), 49 deletions(-) diff --git a/flake.lock b/flake.lock index 5328342e6a..3fa501b4d6 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,21 @@ { "nodes": { + "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, "flake-utils": { "inputs": { "systems": "systems" @@ -94,11 +110,11 @@ ] }, "locked": { - "lastModified": 1703863825, - "narHash": "sha256-rXwqjtwiGKJheXB43ybM8NwWB8rO2dSRrEqes0S7F5Y=", + "lastModified": 1720066371, + "narHash": "sha256-uPlLYH2S0ACj0IcgaK9Lsf4spmJoGejR9DotXiXSBZQ=", "owner": "nix-community", "repo": "nix-github-actions", - "rev": "5163432afc817cf8bd1f031418d1869e4c9d5547", + "rev": "622f829f5fe69310a866c8a6cd07e747c44ef820", "type": "github" }, "original": { @@ -116,11 +132,11 @@ ] }, "locked": { - "lastModified": 1701208414, - "narHash": "sha256-xrQ0FyhwTZK6BwKhahIkUVZhMNk21IEI1nUcWSONtpo=", + "lastModified": 1720066371, + "narHash": "sha256-uPlLYH2S0ACj0IcgaK9Lsf4spmJoGejR9DotXiXSBZQ=", "owner": "nix-community", "repo": "nix-github-actions", - "rev": "93e39cc1a087d65bcf7a132e75a650c44dd2b734", + "rev": "622f829f5fe69310a866c8a6cd07e747c44ef820", "type": "github" }, "original": { @@ -131,43 +147,49 @@ }, "nixpkgs": { "locked": { - "lastModified": 1718447546, - "narHash": "sha256-JHuXsrC9pr4kA4n7LuuPfWFJUVlDBVJ1TXDVpHEuUgM=", + "lastModified": 1725983898, + "narHash": "sha256-4b3A9zPpxAxLnkF9MawJNHDtOOl6ruL0r6Og1TEDGCE=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "842253bf992c3a7157b67600c2857193f126563a", + "rev": "1355a0cbfeac61d785b7183c0caaec1f97361b43", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-23.11", + "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" } }, - "nixpkgs-unstable": { + "nixpkgs-python": { + "inputs": { + "flake-compat": "flake-compat", + "nixpkgs": [ + "zephyr-nix", + "nixpkgs" + ] + }, "locked": { - "lastModified": 1718530797, - "narHash": "sha256-pup6cYwtgvzDpvpSCFh1TEUjw2zkNpk8iolbKnyFmmU=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "b60ebf54c15553b393d144357375ea956f89e9a9", + "lastModified": 1722978926, + "narHash": "sha256-sqOOEaKJJSUFBzag/cGeeXV491TrrVFY3DFBs1w20V8=", + "owner": "cachix", + "repo": "nixpkgs-python", + "rev": "7c550bca7e6cf95898e32eb2173efe7ebb447460", "type": "github" }, "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", + "owner": "cachix", + "repo": "nixpkgs-python", "type": "github" } }, "nixpkgs_2": { "locked": { - "lastModified": 1709479366, - "narHash": "sha256-n6F0n8UV6lnTZbYPl1A9q1BS0p4hduAv1mGAP17CVd0=", + "lastModified": 1725103162, + "narHash": "sha256-Ym04C5+qovuQDYL/rKWSR+WESseQBbNAe5DsXNx5trY=", "owner": "nixos", "repo": "nixpkgs", - "rev": "b8697e57f10292a6165a20f03d2f42920dfaf973", + "rev": "12228ff1752d7b7624a54e9c1af4b222b3c1073b", "type": "github" }, "original": { @@ -181,14 +203,15 @@ "inputs": { "mdbook-nixdoc": "mdbook-nixdoc", "nix-github-actions": "nix-github-actions", - "nixpkgs": "nixpkgs_2" + "nixpkgs": "nixpkgs_2", + "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1716218469, - "narHash": "sha256-w2djd2mxQhBIqDhCVSW544vFxGgCFX6vm/cpk1Btzg8=", + "lastModified": 1726093189, + "narHash": "sha256-aPzd6M1k1H0C2zoMlSfAdTg4Za+WfB8Qj+OAbQAVAMs=", "owner": "nix-community", "repo": "pyproject.nix", - "rev": "298d55c4122a9a2177fd56cb18796d62daf386c5", + "rev": "6c56846759ba16382bc2bdbee42c2f56c21654be", "type": "github" }, "original": { @@ -204,14 +227,15 @@ "nixpkgs": [ "zephyr-nix", "nixpkgs" - ] + ], + "treefmt-nix": "treefmt-nix_2" }, "locked": { - "lastModified": 1708414356, - "narHash": "sha256-neHF92cht4G94Ye1j9YgLeqdE0dGL920lQQMLTqNm9A=", + "lastModified": 1724569826, + "narHash": "sha256-87KKENLQoxpzbONnDaUEaraJ7UNsArj+MJqiYvFePtk=", "owner": "nix-community", "repo": "pyproject.nix", - "rev": "f75d39ce888632500bf4cff2197784929d3ed265", + "rev": "225a7503959812f0c60d42ca7904adb753151759", "type": "github" }, "original": { @@ -246,7 +270,6 @@ "inputs": { "flake-utils": "flake-utils", "nixpkgs": "nixpkgs", - "nixpkgs-unstable": "nixpkgs-unstable", "pyproject-nix": "pyproject-nix", "python-deps": "python-deps", "west2nix": "west2nix", @@ -284,6 +307,49 @@ "type": "github" } }, + "treefmt-nix": { + "inputs": { + "nixpkgs": [ + "pyproject-nix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1724833132, + "narHash": "sha256-F4djBvyNRAXGusJiNYInqR6zIMI3rvlp6WiKwsRISos=", + "owner": "numtide", + "repo": "treefmt-nix", + "rev": "3ffd842a5f50f435d3e603312eefa4790db46af5", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "treefmt-nix", + "type": "github" + } + }, + "treefmt-nix_2": { + "inputs": { + "nixpkgs": [ + "zephyr-nix", + "pyproject-nix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1724338379, + "narHash": "sha256-kKJtaiU5Ou+e/0Qs7SICXF22DLx4V/WhG1P6+k4yeOE=", + "owner": "numtide", + "repo": "treefmt-nix", + "rev": "070f834771efa715f3e74cd8ab93ecc96fabc951", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "treefmt-nix", + "type": "github" + } + }, "west2nix": { "inputs": { "nixpkgs": [ @@ -294,11 +360,11 @@ ] }, "locked": { - "lastModified": 1707272336, - "narHash": "sha256-bFJMr8qMUmxmnqvVIc0IZGmSg64uceRvh/PxwI2Kueo=", + "lastModified": 1724558258, + "narHash": "sha256-77ql77+A+sCaS40ptGTfB3XI9JBJxpYkXKP5HUehMi4=", "owner": "adisbladis", "repo": "west2nix", - "rev": "6d8d3558c42144270b534af39a00efe2f19cc278", + "rev": "fcb15bcd8de84e60724050f60057e5fd0a7423f0", "type": "github" }, "original": { @@ -310,11 +376,11 @@ "zephyr": { "flake": false, "locked": { - "lastModified": 1718712621, - "narHash": "sha256-BXUMAIwZLGfjUbDRGDTjkpzKo3AWpoohol0WDbAA+TQ=", + "lastModified": 1726128822, + "narHash": "sha256-i2GDCiiEKjmwzrTtTKUbtGBqspdPWYHvAf8nQZdJx00=", "owner": "tiacsys", "repo": "zephyr", - "rev": "a50d3b9a4d4f19861b5cf3ae08353ad96ae3ee1a", + "rev": "4afa8ce3f06bdb5477deea06ac785b1b18192f29", "type": "github" }, "original": { @@ -329,17 +395,18 @@ "nixpkgs": [ "nixpkgs" ], + "nixpkgs-python": "nixpkgs-python", "pyproject-nix": "pyproject-nix_2", "zephyr": [ "zephyr" ] }, "locked": { - "lastModified": 1712044799, - "narHash": "sha256-OHBz1mVLAzNY3OoB3Xqy5hMDgOODfAoas3aGph5y86g=", + "lastModified": 1724639760, + "narHash": "sha256-6x+30omsXxONIhhgb6RyRvRZnwwHjVqQrucugTwPBeI=", "owner": "adisbladis", "repo": "zephyr-nix", - "rev": "6a007cf4effdd9092e8a8d103c643ee1e26f720e", + "rev": "4a983678a4eb4c855a9ae377d4928f1759e53f55", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 99c3606394..eec216a1ea 100644 --- a/flake.nix +++ b/flake.nix @@ -2,9 +2,7 @@ description = "A flake for working with Bridle"; inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11"; - - nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable"; + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; zephyr = { type = "github"; @@ -42,7 +40,6 @@ { self, nixpkgs, - nixpkgs-unstable, flake-utils, ... }@inputs: @@ -50,8 +47,6 @@ system: let pkgs = nixpkgs.legacyPackages.${system}; - pkgs-unstable = nixpkgs-unstable.legacyPackages.${system}; - inherit (nixpkgs) lib; west2nix = callPackage inputs.west2nix.lib.mkWest2nix { }; @@ -70,7 +65,7 @@ in { - formatter = pkgs-unstable.nixfmt-rfc-style; + formatter = pkgs.nixfmt-rfc-style; packages.west2nix = inputs.west2nix.packages.${system}.default; diff --git a/python.nix b/python.nix index 8a15d2d58f..f1ef770db4 100644 --- a/python.nix +++ b/python.nix @@ -32,6 +32,11 @@ let sphinxcontrib-svg2pdfconverter sphinx-csv-filter ; + + # WORKAROUND for missing defusedxml in nativeCheckInputs of sphinx-sitemap derivation. + sphinx-sitemap = prev.sphinx-sitemap.overrideAttrs (old: { + pytestCheckPhase = ''true''; + }); }; }; diff --git a/shell.nix b/shell.nix index 0917abea37..f87d6590f1 100644 --- a/shell.nix +++ b/shell.nix @@ -1,6 +1,4 @@ { - lib, - callPackage, pythonEnv, mkShell, zephyr,