From 6ac47a1bcdc60e91bcc31add62e7de6a338b5ccf Mon Sep 17 00:00:00 2001 From: Thomas Singer Date: Sat, 15 Mar 2025 19:04:55 +0100 Subject: [PATCH 01/79] maintainers: add tmssngr --- maintainers/maintainer-list.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 74fec3f9b32a..571b990f7973 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -24372,6 +24372,12 @@ githubId = 6118602; name = "Viktor"; }; + tmssngr = { + email = "nixpkgs@syntevo.com"; + github = "tmssngr"; + githubId = 6029561; + name = "Thomas Singer"; + }; tne = { email = "tne@garudalinux.org"; github = "JustTNE"; From 69d729f6dd1ab108e7afce49b1c041e546da8461 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Fri, 11 Apr 2025 19:16:37 +0000 Subject: [PATCH 02/79] opcua-commander: 0.39.0 -> 0.40.0 --- pkgs/by-name/op/opcua-commander/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/op/opcua-commander/package.nix b/pkgs/by-name/op/opcua-commander/package.nix index ac137b7fe184..79af40699445 100644 --- a/pkgs/by-name/op/opcua-commander/package.nix +++ b/pkgs/by-name/op/opcua-commander/package.nix @@ -10,16 +10,16 @@ }: buildNpmPackage rec { pname = "opcua-commander"; - version = "0.39.0"; + version = "0.40.0"; src = fetchFromGitHub { owner = "node-opcua"; repo = "opcua-commander"; rev = version; - hash = "sha256-7KYwIdrhlvGR9RHZBfMFOcBa+opwx7Q/crCdvwZD6Y8="; + hash = "sha256-qoBpYN0EiXiuhH+hXjVPK2ET8Psjz52rocohU8ccVIg="; }; - npmDepsHash = "sha256-g4WFLh+UnziQR2NZ4eL84Vrk+Mz99kFQiBkdGmBEMHE="; + npmDepsHash = "sha256-HB4boWgZWoG+ib+cCoQbUmrrV5rECR3dMwj2lCyJjT0="; nativeBuildInputs = [ esbuild typescript From b5d1714bc1f73be50ec97818b72286cb4c2b9aec Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sat, 12 Apr 2025 10:26:40 +0000 Subject: [PATCH 03/79] interactive-html-bom: 2.9.0 -> 2.10.0 --- pkgs/by-name/in/interactive-html-bom/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/in/interactive-html-bom/package.nix b/pkgs/by-name/in/interactive-html-bom/package.nix index a4eaac2c705d..527f3ad89002 100644 --- a/pkgs/by-name/in/interactive-html-bom/package.nix +++ b/pkgs/by-name/in/interactive-html-bom/package.nix @@ -8,14 +8,14 @@ python3Packages.buildPythonApplication rec { pname = "interactive-html-bom"; - version = "2.9.0"; + version = "2.10.0"; pyproject = true; src = fetchFromGitHub { owner = "openscopeproject"; repo = "InteractiveHtmlBom"; tag = "v${version}"; - hash = "sha256-jUHEI0dWMFPQlXei3+0m1ruHzpG1hcRnxptNOXzXDqQ="; + hash = "sha256-o7GWdAFFK3zK0fc7aTSwOsd/c4uPg3cJfR0SXbl2RW8="; }; build-system = [ python3Packages.hatchling ]; @@ -43,7 +43,7 @@ python3Packages.buildPythonApplication rec { description = "Interactive HTML BOM generation for KiCad, EasyEDA, Eagle, Fusion360 and Allegro PCB designer"; homepage = "https://github.com/openscopeproject/InteractiveHtmlBom/"; license = lib.licenses.mit; - changelog = "https://github.com/openscopeproject/InteractiveHtmlBom/releases/tag/v${version}"; + changelog = "https://github.com/openscopeproject/InteractiveHtmlBom/releases/tag/${src.tag}"; maintainers = with lib.maintainers; [ wuyoli ]; mainProgram = "generate_interactive_bom"; }; From e07ece7c52808867fb14fd4006a079d368a97d9c Mon Sep 17 00:00:00 2001 From: linsui <36977733+linsui@users.noreply.github.com> Date: Sat, 12 Apr 2025 22:10:56 +0800 Subject: [PATCH 04/79] fdroidserver: 2.3.5 -> 2.4.0 --- pkgs/by-name/fd/fdroidserver/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/fd/fdroidserver/package.nix b/pkgs/by-name/fd/fdroidserver/package.nix index c894d37d1798..43f628f4ee95 100644 --- a/pkgs/by-name/fd/fdroidserver/package.nix +++ b/pkgs/by-name/fd/fdroidserver/package.nix @@ -10,7 +10,7 @@ python3Packages.buildPythonApplication rec { pname = "fdroidserver"; - version = "2.3.5"; + version = "2.4.0"; pyproject = true; @@ -18,7 +18,7 @@ python3Packages.buildPythonApplication rec { owner = "fdroid"; repo = "fdroidserver"; tag = version; - hash = "sha256-ESSjC44tdWpmtB+VhEDnUTQz+ZJVQ4jLBjj+0hMSAQA="; + hash = "sha256-PQZz3dyX6vCS0axHfSINMMX5ETdVs44K9XjR87gtd3s="; }; pythonRelaxDeps = [ From c0acc6d8840e16c938a0b9d3d9b94137580a94cf Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sun, 13 Apr 2025 09:03:11 +0000 Subject: [PATCH 05/79] dotnet-ef: 9.0.3 -> 9.0.4 --- pkgs/by-name/do/dotnet-ef/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/do/dotnet-ef/package.nix b/pkgs/by-name/do/dotnet-ef/package.nix index aaca7b41c30c..40a125634e65 100644 --- a/pkgs/by-name/do/dotnet-ef/package.nix +++ b/pkgs/by-name/do/dotnet-ef/package.nix @@ -2,9 +2,9 @@ buildDotnetGlobalTool { pname = "dotnet-ef"; - version = "9.0.3"; + version = "9.0.4"; - nugetHash = "sha256-oRBN6Qh5PuVofmboqCpFJR3hUD+MruRYp4whjd9Yu9g="; + nugetHash = "sha256-eQ821C6bx98LJEcdSiozgAaHD2m2+hKVowRTL+L6vzM="; meta = { description = "The Entity Framework Core tools help with design-time development tasks."; From a52ef9a0c8606a7b898fd9ce562f0fe6ff2d5cde Mon Sep 17 00:00:00 2001 From: Julia Mertz Date: Sun, 13 Apr 2025 21:01:09 +0200 Subject: [PATCH 06/79] aerospace: 0.17.1-Beta -> 0.18.1-Beta --- pkgs/by-name/ae/aerospace/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/ae/aerospace/package.nix b/pkgs/by-name/ae/aerospace/package.nix index a151e3890841..81284f84c0e9 100644 --- a/pkgs/by-name/ae/aerospace/package.nix +++ b/pkgs/by-name/ae/aerospace/package.nix @@ -9,7 +9,7 @@ let appName = "AeroSpace.app"; - version = "0.17.1-Beta"; + version = "0.18.1-Beta"; in stdenv.mkDerivation { pname = "aerospace"; @@ -18,7 +18,7 @@ stdenv.mkDerivation { src = fetchzip { url = "https://github.com/nikitabobko/AeroSpace/releases/download/v${version}/AeroSpace-v${version}.zip"; - sha256 = "sha256-IMU0s57dpes7Vm2Wv191LwkRgiF+ZIqNWHzrl4a1Pm0="; + sha256 = "sha256-46vSv/Hj36zF/WfZIBGBjGfC2683zFlYdlO9fc8BeHc="; }; nativeBuildInputs = [ installShellFiles ]; From 3ac049fabe8ec3817fa3218c9fb97ada07b6814a Mon Sep 17 00:00:00 2001 From: Thomas Singer Date: Sat, 15 Mar 2025 19:04:55 +0100 Subject: [PATCH 07/79] smartsynchronize: init at 4.6.1 similar to "smartgit" --- pkgs/by-name/sm/smartsynchronize/package.nix | 104 +++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 pkgs/by-name/sm/smartsynchronize/package.nix diff --git a/pkgs/by-name/sm/smartsynchronize/package.nix b/pkgs/by-name/sm/smartsynchronize/package.nix new file mode 100644 index 000000000000..5dffdf8e96b8 --- /dev/null +++ b/pkgs/by-name/sm/smartsynchronize/package.nix @@ -0,0 +1,104 @@ +{ + lib, + stdenv, + fetchurl, + makeDesktopItem, + openjdk21, + gtk3, + glib, + adwaita-icon-theme, + wrapGAppsHook3, + libXtst, + which, +}: +let + jre = openjdk21; +in +stdenv.mkDerivation (finalAttrs: { + pname = "smartsynchronize"; + version = "4.6.1"; + + src = fetchurl { + url = "https://www.syntevo.com/downloads/smartsynchronize/smartsynchronize-linux-${ + builtins.replaceStrings [ "." ] [ "_" ] finalAttrs.version + }.tar.gz"; + hash = "sha256-oc1GFwiA6LPbCsCsGGENEz9ktcu0NINfQ9dsL27VIpI="; + }; + + nativeBuildInputs = [ wrapGAppsHook3 ]; + + buildInputs = [ + jre + adwaita-icon-theme + gtk3 + ]; + + preFixup = '' + gappsWrapperArgs+=( \ + --prefix PATH : ${ + lib.makeBinPath [ + jre + which + ] + } \ + --prefix LD_LIBRARY_PATH : ${ + lib.makeLibraryPath [ + gtk3 + glib + libXtst + ] + } \ + --prefix JAVA_HOME : ${jre} \ + ) + ''; + + installPhase = '' + runHook preInstall + + mkdir -pv $out/{bin,share/applications,share/icons/hicolor/scalable/apps/} + cp -av ./lib $out/ + cp -av bin/smartsynchronize.sh $out/bin/smartsynchronize + + cp -av $desktopItem/share/applications/* $out/share/applications/ + for icon_size in 32 48 64 128 256; do + path=$icon_size'x'$icon_size + icon=bin/smartsynchronize-$icon_size.png + mkdir -p $out/share/icons/hicolor/$path/apps + cp $icon $out/share/icons/hicolor/$path/apps/smartsynchronize.png + done + + cp -av bin/smartsynchronize.svg $out/share/icons/hicolor/scalable/apps/ + + runHook postInstall + ''; + + desktopItem = makeDesktopItem { + name = "smartsynchronize"; + exec = "smartsynchronize"; + comment = finalAttrs.meta.description; + icon = "smartsynchronize"; + desktopName = "SmartSynchronize"; + categories = [ "Development" ]; + startupNotify = true; + startupWMClass = "smartsynchronize"; + keywords = [ + "compare" + "file manager" + ]; + }; + + meta = { + description = "File Manager, File/Directory Compare"; + longDescription = '' + SmartSynchronize is a dual-pane, keyboard-centric, multi-platform file manager. + It also is known for its file compare, directory compare and file merge. + SmartSynchronize is free to use for active Open Source developers and users from academic institutions. + ''; + homepage = "https://www.syntevo.com/smartsynchronize/"; + changelog = "https://www.syntevo.com/smartsynchronize/changelog-${lib.versions.majorMinor finalAttrs.version}.txt"; + license = lib.licenses.unfree; + mainProgram = "smartsynchronize"; + platforms = lib.platforms.linux; + maintainers = with lib.maintainers; [ tmssngr ]; + }; +}) From 04aa7156e7ef2b610dc02cb257317fbad3276046 Mon Sep 17 00:00:00 2001 From: Defelo Date: Mon, 14 Apr 2025 15:29:26 +0000 Subject: [PATCH 08/79] glance: 0.7.9 -> 0.7.12 --- pkgs/by-name/gl/glance/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/gl/glance/package.nix b/pkgs/by-name/gl/glance/package.nix index ac440677aabb..b62400a864e7 100644 --- a/pkgs/by-name/gl/glance/package.nix +++ b/pkgs/by-name/gl/glance/package.nix @@ -8,16 +8,16 @@ buildGoModule (finalAttrs: { pname = "glance"; - version = "0.7.9"; + version = "0.7.12"; src = fetchFromGitHub { owner = "glanceapp"; repo = "glance"; tag = "v${finalAttrs.version}"; - hash = "sha256-CUuYwbcKJ985fKcUEV6UNLgOZCjUCOzxNRV+pt5vbnc="; + hash = "sha256-HytxMin0IM6KAqGu/Cq/WCT79DiH01LpTK3RNgWf7iQ="; }; - vendorHash = "sha256-lURRHlZoxbuW1SXxrxy2BkMndcEllGFmVCB4pXBad8Q="; + vendorHash = "sha256-+7mOCU5GNQV8+s9QPki+7CDi4qtOIpwjC//QracwzHI="; ldflags = [ "-s" From 291e8e4ac50be8caa11aae0317fe37c90f532500 Mon Sep 17 00:00:00 2001 From: Julia Date: Tue, 15 Apr 2025 12:02:43 +0200 Subject: [PATCH 09/79] Apply suggestions from code review Co-authored-by: Alexandru Nechita <45104896+alexandru0-dev@users.noreply.github.com> --- pkgs/by-name/ae/aerospace/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/ae/aerospace/package.nix b/pkgs/by-name/ae/aerospace/package.nix index 81284f84c0e9..82f4dee258c5 100644 --- a/pkgs/by-name/ae/aerospace/package.nix +++ b/pkgs/by-name/ae/aerospace/package.nix @@ -9,7 +9,7 @@ let appName = "AeroSpace.app"; - version = "0.18.1-Beta"; + version = "0.18.2-Beta"; in stdenv.mkDerivation { pname = "aerospace"; @@ -18,7 +18,7 @@ stdenv.mkDerivation { src = fetchzip { url = "https://github.com/nikitabobko/AeroSpace/releases/download/v${version}/AeroSpace-v${version}.zip"; - sha256 = "sha256-46vSv/Hj36zF/WfZIBGBjGfC2683zFlYdlO9fc8BeHc="; + sha256 = "sha256-/Fc4Zk8KvAdaKXyHmeL9nh79CAQLx/Y6URFWIOL5YyQ="; }; nativeBuildInputs = [ installShellFiles ]; From cd9aaee627a14e4c5b91299487bd72144c4589f6 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 15 Apr 2025 10:41:30 +0000 Subject: [PATCH 10/79] python312Packages.meraki: 1.56.0 -> 2.0.1 --- pkgs/development/python-modules/meraki/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/meraki/default.nix b/pkgs/development/python-modules/meraki/default.nix index 17a851fb60e5..ccf53702e4f1 100644 --- a/pkgs/development/python-modules/meraki/default.nix +++ b/pkgs/development/python-modules/meraki/default.nix @@ -13,7 +13,7 @@ buildPythonPackage rec { pname = "meraki"; - version = "1.56.0"; + version = "2.0.1"; pyproject = true; disabled = pythonOlder "3.10"; @@ -22,7 +22,7 @@ buildPythonPackage rec { owner = "meraki"; repo = "dashboard-api-python"; tag = version; - hash = "sha256-OMoi4t7lMQF/fMV/lWg+GwSmKg5cXwiVSROfpZRtXJM="; + hash = "sha256-/zRPwPIpKQ56kjBA+zaQefVek51nd+3jlvm5jIz/Ekg="; }; pythonRelaxDeps = [ @@ -48,7 +48,7 @@ buildPythonPackage rec { meta = { description = "Cisco Meraki cloud-managed platform dashboard API python library"; homepage = "https://github.com/meraki/dashboard-api-python"; - changelog = "https://github.com/meraki/dashboard-api-python/releases/tag/${version}"; + changelog = "https://github.com/meraki/dashboard-api-python/releases/tag/${src.tag}"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ dylanmtaylor ]; }; From c420b67f338f5c16b47af0b0e25e9c0d1351d996 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 15 Apr 2025 17:33:10 +0000 Subject: [PATCH 11/79] minify: 2.22.4 -> 2.23.1 --- pkgs/by-name/mi/minify/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/mi/minify/package.nix b/pkgs/by-name/mi/minify/package.nix index 1742f171ecba..2ade8acd9428 100644 --- a/pkgs/by-name/mi/minify/package.nix +++ b/pkgs/by-name/mi/minify/package.nix @@ -10,16 +10,16 @@ buildGoModule rec { pname = "minify"; - version = "2.22.4"; + version = "2.23.1"; src = fetchFromGitHub { owner = "tdewolff"; repo = pname; rev = "v${version}"; - hash = "sha256-sN3gGxUOWNFBB+iz6i+a0SP8my+IdbMXAVd/bWzzKms="; + hash = "sha256-v0KLQlf2WhI18uanVtvWfX6/7s9ZtfPM5AGyEIHZf54="; }; - vendorHash = "sha256-PxmtYVMkZcJvaM9CYSy5OSUkpyhL1VLwkXoY7uIe7Q8="; + vendorHash = "sha256-Btc5d/wwDmjhyDZwAIHDSbXuh8xqq/nIjTAkPsdeHU4="; nativeBuildInputs = [ installShellFiles ]; From 7d5d615f5dd987e95b00c4e506d918021f933837 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 15 Apr 2025 17:44:55 +0000 Subject: [PATCH 12/79] python312Packages.shiny: 1.3.0 -> 1.4.0 --- pkgs/development/python-modules/shiny/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/shiny/default.nix b/pkgs/development/python-modules/shiny/default.nix index 8c0809a2da3e..474666efcbd0 100644 --- a/pkgs/development/python-modules/shiny/default.nix +++ b/pkgs/development/python-modules/shiny/default.nix @@ -47,14 +47,14 @@ buildPythonPackage rec { pname = "shiny"; - version = "1.3.0"; + version = "1.4.0"; pyproject = true; src = fetchFromGitHub { owner = "posit-dev"; repo = "py-shiny"; tag = "v${version}"; - hash = "sha256-YCPHjelGPYYo23Vzxy5+8Kn9fVlSZy1Qva7zp93+nzg="; + hash = "sha256-SsMZ+aiGFtP6roTiuBZWnHqPso3ZiWLgBToaTLiC2ko="; }; build-system = [ @@ -123,7 +123,7 @@ buildPythonPackage rec { meta = { description = "Build fast, beautiful web applications in Python"; homepage = "https://shiny.posit.co/py"; - changelog = "https://github.com/posit-dev/py-shiny/blob/v${version}/CHANGELOG.md"; + changelog = "https://github.com/posit-dev/py-shiny/blob/${src.tag}/CHANGELOG.md"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ sigmanificient ]; }; From ba346cb6d17d2806d3f44fb25c9d9f92444c8cc2 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 15 Apr 2025 19:34:30 +0000 Subject: [PATCH 13/79] kubeone: 1.9.2 -> 1.10.0 --- pkgs/by-name/ku/kubeone/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/ku/kubeone/package.nix b/pkgs/by-name/ku/kubeone/package.nix index 8b4f4e9c1b9e..82c9d1841aed 100644 --- a/pkgs/by-name/ku/kubeone/package.nix +++ b/pkgs/by-name/ku/kubeone/package.nix @@ -9,16 +9,16 @@ buildGoModule rec { pname = "kubeone"; - version = "1.9.2"; + version = "1.10.0"; src = fetchFromGitHub { owner = "kubermatic"; repo = "kubeone"; rev = "v${version}"; - hash = "sha256-pMY86Ucp5nuH63YgAh60l3WZYDPvM8LcTaV9QS2BzAA="; + hash = "sha256-lBeIhsPiEHGSvEhMNjSr5bv/jp2xbbd3wIgaaRARiI8="; }; - vendorHash = "sha256-dvsq2idsLmo1Tc8kfg3pJKNIMosrAMXN1fxvayS7glQ="; + vendorHash = "sha256-Ltrs86I5CAjx21BZZrG+UD5/YdLbaFwJqRQLvGwOA9E="; ldflags = [ "-s" From 254b8abbcbe7a6a3249fd2bc1710bc1269377e5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Fri, 11 Apr 2025 11:57:32 -0700 Subject: [PATCH 14/79] python313Packages.approvaltests: 14.3.1 -> 14.5.0 Diff: https://github.com/approvals/ApprovalTests.Python/compare/refs/tags/v14.3.1...v14.5.0 Changelog: https://github.com/approvals/ApprovalTests.Python/releases/tag/v14.4.0 https://github.com/approvals/ApprovalTests.Python/releases/tag/v14.5.0 --- .../python-modules/approvaltests/default.nix | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/pkgs/development/python-modules/approvaltests/default.nix b/pkgs/development/python-modules/approvaltests/default.nix index 639272c089f2..da7715b3e347 100644 --- a/pkgs/development/python-modules/approvaltests/default.nix +++ b/pkgs/development/python-modules/approvaltests/default.nix @@ -13,7 +13,6 @@ pytest, pytest-asyncio, pytestCheckHook, - pythonOlder, setuptools, testfixtures, typing-extensions, @@ -21,16 +20,14 @@ buildPythonPackage rec { pname = "approvaltests"; - version = "14.3.1"; + version = "14.5.0"; pyproject = true; - disabled = pythonOlder "3.8"; - src = fetchFromGitHub { owner = "approvals"; repo = "ApprovalTests.Python"; tag = "v${version}"; - hash = "sha256-cFxa+QNfMk8+5jC4cxhbUs09/0tHjOgdsaE8XfxG6yk="; + hash = "sha256-VWYl+8hS9XnvtqmokNntdKGHWSJVlGPomvAEwaBcjY8="; }; build-system = [ setuptools ]; @@ -67,11 +64,11 @@ buildPythonPackage rec { "approvaltests.reporters.generic_diff_reporter_factory" ]; - meta = with lib; { + meta = { description = "Assertion/verification library to aid testing"; homepage = "https://github.com/approvals/ApprovalTests.Python"; - changelog = "https://github.com/approvals/ApprovalTests.Python/releases/tag/v${version}"; - license = licenses.asl20; + changelog = "https://github.com/approvals/ApprovalTests.Python/releases/tag/${src.tag}"; + license = lib.licenses.asl20; maintainers = [ ]; }; } From c52974f596e6d01e267d939ad3139be31dc97d9f Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 15 Apr 2025 19:40:55 +0000 Subject: [PATCH 15/79] gotrue-supabase: 2.170.0 -> 2.171.0 --- pkgs/tools/security/gotrue/supabase.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/security/gotrue/supabase.nix b/pkgs/tools/security/gotrue/supabase.nix index e028e085d02d..c6c2f8a51f45 100644 --- a/pkgs/tools/security/gotrue/supabase.nix +++ b/pkgs/tools/security/gotrue/supabase.nix @@ -8,16 +8,16 @@ buildGoModule rec { pname = "auth"; - version = "2.170.0"; + version = "2.171.0"; src = fetchFromGitHub { owner = "supabase"; repo = "auth"; rev = "v${version}"; - hash = "sha256-dm6JBBHFX61acQ4tnkklZqAM4hiOqtvea0oy7/bSovQ="; + hash = "sha256-LvTFIfcvXdjsTi266mcR27pVL421E5Cxa9sGK5PwY2w="; }; - vendorHash = "sha256-D5wVbgxs5Hq+vmHNi/6t7rZVKez1DqAiTZCP5uJKRtA="; + vendorHash = "sha256-RJOCHilVKmymkPufX7HYG+biClYO3jn1XEFgzo7JsyY="; ldflags = [ "-s" From b7d56a3cbf444050dbce6e86ad7044b9f9fbff12 Mon Sep 17 00:00:00 2001 From: r-vdp Date: Tue, 15 Apr 2025 23:09:00 +0200 Subject: [PATCH 16/79] wstunnel: 10.1.10 -> 10.1.11 https://github.com/erebe/wstunnel/releases/tag/v10.1.11 --- pkgs/by-name/ws/wstunnel/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/ws/wstunnel/package.nix b/pkgs/by-name/ws/wstunnel/package.nix index cde6e4aa5548..c95feabf1d83 100644 --- a/pkgs/by-name/ws/wstunnel/package.nix +++ b/pkgs/by-name/ws/wstunnel/package.nix @@ -8,7 +8,7 @@ }: let - version = "10.1.10"; + version = "10.1.11"; in rustPlatform.buildRustPackage { @@ -19,11 +19,11 @@ rustPlatform.buildRustPackage { owner = "erebe"; repo = "wstunnel"; tag = "v${version}"; - hash = "sha256-7HW2AtMTNE05qSBhltj+ZxJhoMJmaMynko8+wIgpqCc="; + hash = "sha256-CtJws2O5ywR2prIlDoMbsPi6SH+ffxdqfCKUByukqpA="; }; useFetchCargoVendor = true; - cargoHash = "sha256-NujasFigZ+BETg3J8fOKu5QAm68ZzP7uIXwv7bI+2uM="; + cargoHash = "sha256-YZrScEdRNZ/RU3PBRThw29Yu04N42nwe5DLLABRZtLw="; cargoBuildFlags = [ "--package wstunnel-cli" ]; From 4d9b32bb09221911b8ef9f64d8eba57dc633c871 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 15 Apr 2025 23:05:36 +0000 Subject: [PATCH 17/79] terraform-providers.jetstream: 0.1.1 -> 0.2.0 --- .../networking/cluster/terraform-providers/providers.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/networking/cluster/terraform-providers/providers.json b/pkgs/applications/networking/cluster/terraform-providers/providers.json index 969f5cb7316e..f1a0720b116f 100644 --- a/pkgs/applications/networking/cluster/terraform-providers/providers.json +++ b/pkgs/applications/networking/cluster/terraform-providers/providers.json @@ -678,13 +678,13 @@ "vendorHash": null }, "jetstream": { - "hash": "sha256-RlYl8DNx+XjLjMQ8CbVJH0p2ZwBrDNp2OCvzHxQ7zLA=", + "hash": "sha256-N/cKiMwPHo8581PFg06RjgOGpGB02/CCARTIFu9kH3s=", "homepage": "https://registry.terraform.io/providers/nats-io/jetstream", "owner": "nats-io", "repo": "terraform-provider-jetstream", - "rev": "v0.1.1", + "rev": "v0.2.0", "spdx": "Apache-2.0", - "vendorHash": "sha256-NEGjgtrn6ZowqSF6NAK1NnSjYVUvfWuH/4R5ZPdTZSs=" + "vendorHash": "sha256-Dd02Ikt51eh/FBEtswe8Qr6P5tgQFZJTKgO01gxPX3s=" }, "kafka": { "hash": "sha256-O8fD974eEmIgMAbLsENBkHiS1+2onx7OOrhnwv+cGoo=", From 51b49784c72ac5960bcb9018ef40e99a23d08aef Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 15 Apr 2025 23:13:01 +0000 Subject: [PATCH 18/79] terraform-providers.docker: 3.0.2 -> 3.1.2 --- .../networking/cluster/terraform-providers/providers.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/networking/cluster/terraform-providers/providers.json b/pkgs/applications/networking/cluster/terraform-providers/providers.json index 969f5cb7316e..ef337f0733c6 100644 --- a/pkgs/applications/networking/cluster/terraform-providers/providers.json +++ b/pkgs/applications/networking/cluster/terraform-providers/providers.json @@ -390,13 +390,13 @@ "vendorHash": "sha256-HBwyjqKSshB4Nl2e/xnMnWgYVolSxvKZHi+bYfM2+Ho=" }, "docker": { - "hash": "sha256-UyHOI8C0eDV5YllAi9clHp/CEldHjIp3FHHMPy1rK58=", + "hash": "sha256-0GMZnrmuRKWnI3Fu97MPtKiNh9XSUkFO/U35+ym2xLk=", "homepage": "https://registry.terraform.io/providers/kreuzwerker/docker", "owner": "kreuzwerker", "repo": "terraform-provider-docker", - "rev": "v3.0.2", + "rev": "v3.1.2", "spdx": "MPL-2.0", - "vendorHash": "sha256-XxltOTtCgmJ9wZX8Yw39HkwVVZb58kZjAH7jfKPhjKM=" + "vendorHash": "sha256-YTxWawv5KbitMD9CoiDLt8FjZUvjyIjcoqQVmz9xZGs=" }, "doppler": { "hash": "sha256-VzdtksB/zrsf3z3J/1UEehiuQYM7cyxTef892PGYrxo=", From 9c4d8d058f02f365c55099394bb851c0187fd49d Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 15 Apr 2025 23:35:54 +0000 Subject: [PATCH 19/79] linkerd_edge: 25.4.1 -> 25.4.2 --- pkgs/applications/networking/cluster/linkerd/edge.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/networking/cluster/linkerd/edge.nix b/pkgs/applications/networking/cluster/linkerd/edge.nix index 877a33aec8c5..4ae752d29272 100644 --- a/pkgs/applications/networking/cluster/linkerd/edge.nix +++ b/pkgs/applications/networking/cluster/linkerd/edge.nix @@ -2,7 +2,7 @@ (callPackage ./generic.nix { }) { channel = "edge"; - version = "25.4.1"; - sha256 = "18hv0lfh1ldy7chjs2ssn62crn71a0mvvn1g8b35l91g8mqyh4ry"; - vendorHash = "sha256-vKehadl94okOd1YfaETgdQwWr8F2gOPGyjzzTjxKyLA="; + version = "25.4.2"; + sha256 = "0i0z2x9x2sf9lpkvw9pnvwp74hxm9rqbdhx9v91qwlsnw8clc950"; + vendorHash = "sha256-jIL/08mSvz6xLlB1Iyj2F9vnfOkadeYf92CeXXx0Otw="; } From ee1c07fc4cc3263ee7692b9a2ab69c135e31dc19 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 16 Apr 2025 01:45:57 +0000 Subject: [PATCH 20/79] terraform-providers.cloudamqp: 1.32.3 -> 1.33.0 --- .../networking/cluster/terraform-providers/providers.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/networking/cluster/terraform-providers/providers.json b/pkgs/applications/networking/cluster/terraform-providers/providers.json index f91c3b75078a..9d19eef0827f 100644 --- a/pkgs/applications/networking/cluster/terraform-providers/providers.json +++ b/pkgs/applications/networking/cluster/terraform-providers/providers.json @@ -243,13 +243,13 @@ "vendorHash": null }, "cloudamqp": { - "hash": "sha256-N+ci49HQq5TMQo7XstYar8SrdOO5tQb92o+R/9LfX3s=", + "hash": "sha256-nUzWtow4FLQzGoxGWA68LAs4Nau7xTdtxATSwsF6s9c=", "homepage": "https://registry.terraform.io/providers/cloudamqp/cloudamqp", "owner": "cloudamqp", "repo": "terraform-provider-cloudamqp", - "rev": "v1.32.3", + "rev": "v1.33.0", "spdx": "MPL-2.0", - "vendorHash": "sha256-lQrtAU8zbeIGplfC8+017Ib9d4MFVF0pMvxmE3MLt3M=" + "vendorHash": "sha256-nbz0QEIfnLnMOE/zGILMVBK+/hjYLlWeIqiwOLP6ebQ=" }, "cloudflare": { "hash": "sha256-5L5fnJCQU2gcXbbUq8KDid8NhedFXyYBgysggPxNxSY=", From 8bda57f385e115e8cc555752a20794225658abcf Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 16 Apr 2025 02:38:42 +0000 Subject: [PATCH 21/79] python312Packages.libbs: 2.11.3 -> 2.13.0 --- pkgs/development/python-modules/libbs/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/libbs/default.nix b/pkgs/development/python-modules/libbs/default.nix index 5b158ac41713..d52182af3482 100644 --- a/pkgs/development/python-modules/libbs/default.nix +++ b/pkgs/development/python-modules/libbs/default.nix @@ -20,14 +20,14 @@ buildPythonPackage rec { pname = "libbs"; - version = "2.11.3"; + version = "2.13.0"; pyproject = true; src = fetchFromGitHub { owner = "binsync"; repo = "libbs"; tag = "v${version}"; - hash = "sha256-Ztn4AYnDlHpUYsr8jMvzmQ4zlRpDVsL+J6F1ipLbwwI="; + hash = "sha256-QNiI8qNqh3DlYoGcfExu5PXK1FHXRmcyefMsAfpOMy0="; }; build-system = [ setuptools ]; From 9bf86d16d70211769f72c90fdb93c3b7f32e081e Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 16 Apr 2025 02:58:04 +0000 Subject: [PATCH 22/79] blobfuse: 2.4.1 -> 2.4.2 --- pkgs/by-name/bl/blobfuse/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/bl/blobfuse/package.nix b/pkgs/by-name/bl/blobfuse/package.nix index 2eb2b7b2a6ba..6de880843121 100644 --- a/pkgs/by-name/bl/blobfuse/package.nix +++ b/pkgs/by-name/bl/blobfuse/package.nix @@ -9,19 +9,19 @@ }: let - version = "2.4.1"; + version = "2.4.2"; src = fetchFromGitHub { owner = "Azure"; repo = "azure-storage-fuse"; rev = "blobfuse2-${version}"; - sha256 = "sha256-QCrBsEh8o4GblCWNcJssm9c6uSQYVs+qrdzfmI9l278="; + sha256 = "sha256-bpMX7flbb/QYZUtq1I1s2lAvrBhW7esPwxN/JupryDo="; }; in buildGoModule { pname = "blobfuse"; inherit version src; - vendorHash = "sha256-ZzpstCTABL9x5NM5tTiWZqOfI+BSKGZfb+ahbFUmcdo="; + vendorHash = "sha256-uWesaZshuBVf4yJiX6YqNMr0GiBkrHhOqefnCrpPCHg="; buildInputs = [ fuse3 ]; From 2c8b4290a8516488cb945eb739a5875cb14855da Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 16 Apr 2025 04:07:47 +0000 Subject: [PATCH 23/79] supersonic-wayland: 0.15.0 -> 0.15.1 --- pkgs/by-name/su/supersonic/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/su/supersonic/package.nix b/pkgs/by-name/su/supersonic/package.nix index 934a2fe2374e..4af8cecaf004 100644 --- a/pkgs/by-name/su/supersonic/package.nix +++ b/pkgs/by-name/su/supersonic/package.nix @@ -21,13 +21,13 @@ assert waylandSupport -> stdenv.hostPlatform.isLinux; buildGoModule rec { pname = "supersonic" + lib.optionalString waylandSupport "-wayland"; - version = "0.15.0"; + version = "0.15.1"; src = fetchFromGitHub { owner = "dweymouth"; repo = "supersonic"; rev = "v${version}"; - hash = "sha256-U6J1L2KDAEhIrSpbS5wMSc1Q9y5YMahhFNe6ArbwV2s="; + hash = "sha256-TuZtOZJM7bz14kOGvptSWJ2t3sgUD9GGoZlSaCRs4M0="; }; vendorHash = "sha256-fc86z8bvdFI3LdlyHej2G42O554hpRszqre+e3WUOKI="; From cf3649bf4274746db66ba3c4cbb8413ed3a1cea5 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 16 Apr 2025 04:11:39 +0000 Subject: [PATCH 24/79] terraform-providers.dnsimple: 1.8.0 -> 1.9.0 --- .../networking/cluster/terraform-providers/providers.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/networking/cluster/terraform-providers/providers.json b/pkgs/applications/networking/cluster/terraform-providers/providers.json index f91c3b75078a..7a73032cad8a 100644 --- a/pkgs/applications/networking/cluster/terraform-providers/providers.json +++ b/pkgs/applications/networking/cluster/terraform-providers/providers.json @@ -381,13 +381,13 @@ "vendorHash": "sha256-osSB88Xzvt5DTDE0AY2+QuKClfbGIVJNrXuy4Cbk1Tg=" }, "dnsimple": { - "hash": "sha256-ZKi8+EYLW/Pey0EHTKY0ly7+2Y13mqxMhGia6UUdEtI=", + "hash": "sha256-CkfgHBNtYCFZIMoXpX0ivkm1dyIs4mKSrHaiQ3qt/+w=", "homepage": "https://registry.terraform.io/providers/dnsimple/dnsimple", "owner": "dnsimple", "repo": "terraform-provider-dnsimple", - "rev": "v1.8.0", + "rev": "v1.9.0", "spdx": "MPL-2.0", - "vendorHash": "sha256-HBwyjqKSshB4Nl2e/xnMnWgYVolSxvKZHi+bYfM2+Ho=" + "vendorHash": "sha256-WZqwBkVXoFmDikIyt9GWszLA/9YBoQHAdBuWbGKZBZw=" }, "docker": { "hash": "sha256-UyHOI8C0eDV5YllAi9clHp/CEldHjIp3FHHMPy1rK58=", From 0dc200d8105d7038efc5141731d12a66f7657be9 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 16 Apr 2025 04:18:03 +0000 Subject: [PATCH 25/79] terraform-providers.tailscale: 0.18.0 -> 0.19.0 --- .../networking/cluster/terraform-providers/providers.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/networking/cluster/terraform-providers/providers.json b/pkgs/applications/networking/cluster/terraform-providers/providers.json index f91c3b75078a..8a29e0680a56 100644 --- a/pkgs/applications/networking/cluster/terraform-providers/providers.json +++ b/pkgs/applications/networking/cluster/terraform-providers/providers.json @@ -1282,13 +1282,13 @@ "vendorHash": "sha256-L+XwC7c4ph4lM0+BhHB9oi1R/Av8jlDcqHewOmtPU1s=" }, "tailscale": { - "hash": "sha256-I9t8HyLZmY98g/XjTy6JEryJ8ZOXfegnbymmxVwsy7Q=", + "hash": "sha256-1fHY1eU+8z48j485VONdCsKJWC5hOVbph2pOVGHjYjo=", "homepage": "https://registry.terraform.io/providers/tailscale/tailscale", "owner": "tailscale", "repo": "terraform-provider-tailscale", - "rev": "v0.18.0", + "rev": "v0.19.0", "spdx": "MIT", - "vendorHash": "sha256-bfcsqBusN311oncfCViG4aWy9rylvhrcjs/WUSbh4dI=" + "vendorHash": "sha256-X2YjJvMboS04ViaIP1ebzIX8txumlvTEpGmEAlZNV9E=" }, "talos": { "hash": "sha256-49woELLSpheuyGnXuwamZwsHdOfjwSB4v8/INzSrMRU=", From 463ec2b0c09382ebe3132d978b5fd33a78cbb937 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 16 Apr 2025 04:31:00 +0000 Subject: [PATCH 26/79] terraform-providers.pagerduty: 3.23.1 -> 3.24.0 --- .../networking/cluster/terraform-providers/providers.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/cluster/terraform-providers/providers.json b/pkgs/applications/networking/cluster/terraform-providers/providers.json index f91c3b75078a..7867ab530ec0 100644 --- a/pkgs/applications/networking/cluster/terraform-providers/providers.json +++ b/pkgs/applications/networking/cluster/terraform-providers/providers.json @@ -1003,11 +1003,11 @@ "vendorHash": null }, "pagerduty": { - "hash": "sha256-ed4i9Esj90h4bG4gzGZBqaaJJOsE2fLfip9xyneRAjg=", + "hash": "sha256-7C1oVVLrv1yoBVngUdBAjjLrGeaQhbiLp/g+5danDo4=", "homepage": "https://registry.terraform.io/providers/PagerDuty/pagerduty", "owner": "PagerDuty", "repo": "terraform-provider-pagerduty", - "rev": "v3.23.1", + "rev": "v3.24.0", "spdx": "MPL-2.0", "vendorHash": null }, From 0b34dc3ac8cd37135120aab49bef313967ccd176 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 16 Apr 2025 04:56:32 +0000 Subject: [PATCH 27/79] terraform-providers.checkly: 1.10.1 -> 1.11.0 --- .../networking/cluster/terraform-providers/providers.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/networking/cluster/terraform-providers/providers.json b/pkgs/applications/networking/cluster/terraform-providers/providers.json index f91c3b75078a..aeb0601f06b1 100644 --- a/pkgs/applications/networking/cluster/terraform-providers/providers.json +++ b/pkgs/applications/networking/cluster/terraform-providers/providers.json @@ -225,13 +225,13 @@ "vendorHash": "sha256-OqbnkuEy9w6F1DxmlYhRNYhBaYhWV0FtMK4wdwSybh8=" }, "checkly": { - "hash": "sha256-gpCE4W35h/3FBLVTM1o038lDB3dgjIwDs8mXjep07RM=", + "hash": "sha256-0PUapBId0y6R5a3+mTN/p57S3ZrkaB4NDFTO77B/QTY=", "homepage": "https://registry.terraform.io/providers/checkly/checkly", "owner": "checkly", "repo": "terraform-provider-checkly", - "rev": "v1.10.1", + "rev": "v1.11.0", "spdx": null, - "vendorHash": "sha256-FaqXLFc7ew7HgCZghNPm4sgmsm25/qMAqhqUtbduccU=" + "vendorHash": "sha256-mhuNDKTzkL6rWdoL54qt1s8lPMFMsRNNoFBGi5i9ksk=" }, "ciscoasa": { "hash": "sha256-xzc44FEy2MPo51Faq/VFwg411JK9e0kQucpt0vdN8yg=", From 1c1f4134e3c16908ab9f041d779d234a20f4eb14 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 16 Apr 2025 04:58:36 +0000 Subject: [PATCH 28/79] terraform-providers.newrelic: 3.60.0 -> 3.60.2 --- .../networking/cluster/terraform-providers/providers.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/networking/cluster/terraform-providers/providers.json b/pkgs/applications/networking/cluster/terraform-providers/providers.json index f91c3b75078a..17939d9455e9 100644 --- a/pkgs/applications/networking/cluster/terraform-providers/providers.json +++ b/pkgs/applications/networking/cluster/terraform-providers/providers.json @@ -858,13 +858,13 @@ "vendorHash": null }, "newrelic": { - "hash": "sha256-wh/6nkBtmZb+nwwGpk4F/YlSbmSFgCjMprnMmXslWHg=", + "hash": "sha256-ybOBWUxboRw+KTnWcDPPXo/oZVJs4qyWEekYoIB8bsI=", "homepage": "https://registry.terraform.io/providers/newrelic/newrelic", "owner": "newrelic", "repo": "terraform-provider-newrelic", - "rev": "v3.60.0", + "rev": "v3.60.2", "spdx": "MPL-2.0", - "vendorHash": "sha256-9E1I7ZgBwFo7XouQjBkQQVxQKvkwE6dhVF1hZxec+WY=" + "vendorHash": "sha256-WmrqA3wVUStJunm1eiftKekHJaPRvCAua5guqskd6CE=" }, "nexus": { "hash": "sha256-6RPga80ZoqEEFL7I2OVXcrwaxbdhSzZDEV07xL07rZs=", From 6beb740e06ba2ae2d61e0a2973c371488f387e75 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 16 Apr 2025 04:58:46 +0000 Subject: [PATCH 29/79] terraform-providers.linode: 2.36.0 -> 2.37.0 --- .../networking/cluster/terraform-providers/providers.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/networking/cluster/terraform-providers/providers.json b/pkgs/applications/networking/cluster/terraform-providers/providers.json index f91c3b75078a..5b4441545b09 100644 --- a/pkgs/applications/networking/cluster/terraform-providers/providers.json +++ b/pkgs/applications/networking/cluster/terraform-providers/providers.json @@ -750,13 +750,13 @@ "vendorHash": "sha256-fP6brpY/wRI1Yjgapzi+FfOci65gxWeOZulXbGdilrE=" }, "linode": { - "hash": "sha256-7CGut0z0NEu4yeJOCbqgL9CH7uDwGQbUKTnPK62Xbp0=", + "hash": "sha256-yMLX72T2TG1wyGrn0pmpgPFPNVIVMSkiqAAl3OAvEuA=", "homepage": "https://registry.terraform.io/providers/linode/linode", "owner": "linode", "repo": "terraform-provider-linode", - "rev": "v2.36.0", + "rev": "v2.37.0", "spdx": "MPL-2.0", - "vendorHash": "sha256-nrZNJZHb1FJ7csM/C3mR+RUYy/2TeUzQ1sDmQ8Q4F/s=" + "vendorHash": "sha256-hp2gtyC+AXlsbYJlloDnRRvbaF1s/cAc2XIniKdUf08=" }, "linuxbox": { "hash": "sha256-svQRz1/PdVLpHoxOam1sfRTwHqgqs4ohJQs3IPMMAM4=", From 4c11e7afb4cc0a42b872ce44f95564cfc43692af Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 16 Apr 2025 05:03:14 +0000 Subject: [PATCH 30/79] terraform-providers.cloudflare: 5.2.0 -> 5.3.0 --- .../networking/cluster/terraform-providers/providers.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/networking/cluster/terraform-providers/providers.json b/pkgs/applications/networking/cluster/terraform-providers/providers.json index f91c3b75078a..db90ab23327c 100644 --- a/pkgs/applications/networking/cluster/terraform-providers/providers.json +++ b/pkgs/applications/networking/cluster/terraform-providers/providers.json @@ -252,13 +252,13 @@ "vendorHash": "sha256-lQrtAU8zbeIGplfC8+017Ib9d4MFVF0pMvxmE3MLt3M=" }, "cloudflare": { - "hash": "sha256-5L5fnJCQU2gcXbbUq8KDid8NhedFXyYBgysggPxNxSY=", + "hash": "sha256-FPZBU93x82+szFCC8djO88WFedbsVRFlVxZfTf4uAxI=", "homepage": "https://registry.terraform.io/providers/cloudflare/cloudflare", "owner": "cloudflare", "repo": "terraform-provider-cloudflare", - "rev": "v5.2.0", + "rev": "v5.3.0", "spdx": "Apache-2.0", - "vendorHash": "sha256-vh31Teu4PruX3i7EIlfumOn/R6libKzAxMPqhTxqBTA=" + "vendorHash": "sha256-4iDZXMz3GN7vSAXyDtvGL77ChAjJ/2H7PD/AvYi4BMA=" }, "cloudfoundry": { "hash": "sha256-1nYncJLVU/f9WD6Quh9IieIXgixPzbPk4zbtI1zmf9g=", From 8026f84318ce1ae5a632a1bf73974646c19ee8a6 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 16 Apr 2025 07:17:51 +0000 Subject: [PATCH 31/79] powerpipe: 1.2.4 -> 1.2.5 --- pkgs/by-name/po/powerpipe/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/po/powerpipe/package.nix b/pkgs/by-name/po/powerpipe/package.nix index 1834b3973282..8bb44837f8e8 100644 --- a/pkgs/by-name/po/powerpipe/package.nix +++ b/pkgs/by-name/po/powerpipe/package.nix @@ -11,13 +11,13 @@ buildGoModule rec { pname = "powerpipe"; - version = "1.2.4"; + version = "1.2.5"; src = fetchFromGitHub { owner = "turbot"; repo = "powerpipe"; tag = "v${version}"; - hash = "sha256-nYlhB6EeT98FF/FuYsJXgGfe7+naKwhTmOPy1lX90XQ="; + hash = "sha256-S4NxKxro0K7uplB47CFO0Pm2qz7VvgqHbKxh/6Nd9P4="; }; vendorHash = "sha256-5+IapEYAL4p5jhGhqNw00s42e3dE0cXRDVawq8Fqb08="; From 2ac3597799d56bea477e1d8ec7f979fee7478969 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 16 Apr 2025 07:43:05 +0000 Subject: [PATCH 32/79] python312Packages.x-transformers: 2.2.7 -> 2.2.11 --- pkgs/development/python-modules/x-transformers/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/x-transformers/default.nix b/pkgs/development/python-modules/x-transformers/default.nix index 997c1dc33472..3afb4b68c2f3 100644 --- a/pkgs/development/python-modules/x-transformers/default.nix +++ b/pkgs/development/python-modules/x-transformers/default.nix @@ -19,14 +19,14 @@ buildPythonPackage rec { pname = "x-transformers"; - version = "2.2.7"; + version = "2.2.11"; pyproject = true; src = fetchFromGitHub { owner = "lucidrains"; repo = "x-transformers"; tag = version; - hash = "sha256-rrPwOTE+dK7g7p7DHTffhVZbcTSk7YvnYeCqR6zQeXA="; + hash = "sha256-8+uSxB91vaPMDYPUByqWfCy2G4l9KEdQhp2SxQXY6Tk="; }; build-system = [ hatchling ]; From 8d3561e9e6207a0143425aced505ac4889daa3e0 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 16 Apr 2025 07:53:49 +0000 Subject: [PATCH 33/79] nomad-pack: 0.2.0 -> 0.3.0 --- pkgs/by-name/no/nomad-pack/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/no/nomad-pack/package.nix b/pkgs/by-name/no/nomad-pack/package.nix index 0e5e0c6154dc..b2747e93fc6c 100644 --- a/pkgs/by-name/no/nomad-pack/package.nix +++ b/pkgs/by-name/no/nomad-pack/package.nix @@ -6,16 +6,16 @@ buildGoModule rec { pname = "nomad-pack"; - version = "0.2.0"; + version = "0.3.0"; src = fetchFromGitHub { owner = "hashicorp"; repo = "nomad-pack"; rev = "v${version}"; - sha256 = "sha256-dw6sueC1qibJYc6sbZX8HJlEf9R6O8dlE1aobw70UHw="; + sha256 = "sha256-QtpTnChLB9OfzLSJXr19geHzxmOeL5DQ0G4fgcqCdbc="; }; - vendorHash = "sha256-BKYJ9FZXKpFwK3+mrZAXRkfitSY9jeOLLeC0BOsKc/A="; + vendorHash = "sha256-lygNUHerj9bMJk2+PTUeAJIdTPK9nUYXaByZpzh7uLY="; # skip running go tests as they require network access doCheck = false; From 6607337fbf8885c8f63b5d4d72a84f40dcbdbe95 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 16 Apr 2025 07:57:37 +0000 Subject: [PATCH 34/79] patch2pr: 0.33.0 -> 0.34.0 --- pkgs/by-name/pa/patch2pr/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/pa/patch2pr/package.nix b/pkgs/by-name/pa/patch2pr/package.nix index 714c3140070a..ec1bbb709264 100644 --- a/pkgs/by-name/pa/patch2pr/package.nix +++ b/pkgs/by-name/pa/patch2pr/package.nix @@ -8,16 +8,16 @@ buildGoModule rec { pname = "patch2pr"; - version = "0.33.0"; + version = "0.34.0"; src = fetchFromGitHub { owner = "bluekeyes"; repo = "patch2pr"; rev = "v${version}"; - hash = "sha256-RQg7Fo8Z0P+z6Fv6YTv/IpEErP6ncxylvBaeargTrIQ="; + hash = "sha256-5Xb/M7M8PAVXMyr7dwpoT0H4BV7o6okPQQw2e273ogQ="; }; - vendorHash = "sha256-VzskPOd1nlrkiwGsS5OoXP0v8LQbqS+NumV2WoahFvY="; + vendorHash = "sha256-B/Xw8rR+cldLKHr5N6ifBRHWAzJLayiejLi/winPjKg="; ldflags = [ "-X main.version=${version}" From b361a53cbed5fd0088d53d0db9c167dbdd1dffa3 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 16 Apr 2025 08:20:50 +0000 Subject: [PATCH 35/79] tflint-plugins.tflint-ruleset-google: 0.31.0 -> 0.32.0 --- .../tools/analysis/tflint-plugins/tflint-ruleset-google.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/tools/analysis/tflint-plugins/tflint-ruleset-google.nix b/pkgs/development/tools/analysis/tflint-plugins/tflint-ruleset-google.nix index 71f0cc211e0c..16f654c5005b 100644 --- a/pkgs/development/tools/analysis/tflint-plugins/tflint-ruleset-google.nix +++ b/pkgs/development/tools/analysis/tflint-plugins/tflint-ruleset-google.nix @@ -6,16 +6,16 @@ buildGoModule rec { pname = "tflint-ruleset-google"; - version = "0.31.0"; + version = "0.32.0"; src = fetchFromGitHub { owner = "terraform-linters"; repo = pname; rev = "v${version}"; - hash = "sha256-DMFIJ0ywR2goHad3SvUSbj5w2057HJ4k0pNbiR/Y0pI="; + hash = "sha256-d15Co7rjqZpcnazkNWVepfGqh2ngI8tieCRugmZkr70="; }; - vendorHash = "sha256-plXiB1MTesjg54s0JZGdyf1hR159LlaewJhhyK7raZY="; + vendorHash = "sha256-qVzXOg/f9LOnCyV84rRtXi4DGs3jmbrnlviIvoUEEF4="; # upstream Makefile also does a go test $(go list ./... | grep -v integration) preCheck = '' From 478ed9cdfcd824db3313a4f5f9bd489279b36769 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 16 Apr 2025 08:32:21 +0000 Subject: [PATCH 36/79] scaleway-cli: 2.38.0 -> 2.39.0 --- pkgs/by-name/sc/scaleway-cli/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/sc/scaleway-cli/package.nix b/pkgs/by-name/sc/scaleway-cli/package.nix index 1cf763df8793..e85690293277 100644 --- a/pkgs/by-name/sc/scaleway-cli/package.nix +++ b/pkgs/by-name/sc/scaleway-cli/package.nix @@ -6,16 +6,16 @@ buildGoModule rec { pname = "scaleway-cli"; - version = "2.38.0"; + version = "2.39.0"; src = fetchFromGitHub { owner = "scaleway"; repo = "scaleway-cli"; rev = "v${version}"; - sha256 = "sha256-3yte4gNl8uBSHfDp11HH+l3trN+d5YcEYajpruyOrKc="; + sha256 = "sha256-i4fEOcoizlCZbyUln8DYVbYcAXgnimCFHV0FdgeOjHE="; }; - vendorHash = "sha256-BYWuAzsfqNtswiNHWzNWusgh0SyxlEBEHdOrGjpd1/8="; + vendorHash = "sha256-dy8alr6DM0sNEWrqW+vATmVKbupbKOuMsAodwgPLHk4="; ldflags = [ "-w" From 9f5ba96d6e62a045fa29615c83e79bce3d2e9038 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 16 Apr 2025 08:44:43 +0000 Subject: [PATCH 37/79] roxctl: 4.7.1 -> 4.7.2 --- pkgs/applications/networking/cluster/roxctl/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/networking/cluster/roxctl/default.nix b/pkgs/applications/networking/cluster/roxctl/default.nix index e10ba0c7e28f..fb3dd504386d 100644 --- a/pkgs/applications/networking/cluster/roxctl/default.nix +++ b/pkgs/applications/networking/cluster/roxctl/default.nix @@ -9,16 +9,16 @@ buildGoModule rec { pname = "roxctl"; - version = "4.7.1"; + version = "4.7.2"; src = fetchFromGitHub { owner = "stackrox"; repo = "stackrox"; rev = version; - sha256 = "sha256-AQaMWpI7kFFotEQa536dqKxuP/mHuzNm75RPqUWw1VY="; + sha256 = "sha256-W4g7//0r+XO1l6WoWm55pZAvyTsHNNI3kwBNvNvP+vw="; }; - vendorHash = "sha256-v2aLKU6FBkJqenWzftKmngeXvQBPR03RPR0WcmOiYD0="; + vendorHash = "sha256-eTxcJnAZUKk6VDQhbjxnsiQWEpM2jA228SAhrCqjbF4="; nativeBuildInputs = [ installShellFiles ]; From e5fbec406e3bd26605b54c4b10ae613c9b1cc124 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 16 Apr 2025 08:52:57 +0000 Subject: [PATCH 38/79] termius: 9.17.1 -> 9.18.1 --- pkgs/by-name/te/termius/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/te/termius/package.nix b/pkgs/by-name/te/termius/package.nix index 97d563d6498c..eb584cd18cb1 100644 --- a/pkgs/by-name/te/termius/package.nix +++ b/pkgs/by-name/te/termius/package.nix @@ -16,8 +16,8 @@ stdenv.mkDerivation rec { pname = "termius"; - version = "9.17.1"; - revision = "218"; + version = "9.18.1"; + revision = "220"; src = fetchurl { # find the latest version with @@ -27,7 +27,7 @@ stdenv.mkDerivation rec { # and the sha512 with # curl -H 'X-Ubuntu-Series: 16' https://api.snapcraft.io/api/v1/snaps/details/termius-app | jq '.download_sha512' -r url = "https://api.snapcraft.io/api/v1/snaps/download/WkTBXwoX81rBe3s3OTt3EiiLKBx2QhuS_${revision}.snap"; - hash = "sha512-KmBBE+0gNq85Kb9ouynXTkC7mcTvYOMeBaW3jjBN1IK2hoCIELrwkypFWfhpPNuo2e3GA30haql0tRZ1LU/JMg=="; + hash = "sha512-IpFMTY161PlXtsr64YAdE21BupqYHxZZC7ZNbh3Zd10F1zJhVd+qAQOLOv6vdryu0HdhPv91Z1AEfz6BwLGVYA=="; }; desktopItem = makeDesktopItem { From 1362ca211fd044a3d03c2510a21271753bf1af94 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 16 Apr 2025 09:33:23 +0000 Subject: [PATCH 39/79] terraform-providers.oci: 6.32.0 -> 6.34.0 --- .../networking/cluster/terraform-providers/providers.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/cluster/terraform-providers/providers.json b/pkgs/applications/networking/cluster/terraform-providers/providers.json index f91c3b75078a..16a673da2fdb 100644 --- a/pkgs/applications/networking/cluster/terraform-providers/providers.json +++ b/pkgs/applications/networking/cluster/terraform-providers/providers.json @@ -913,11 +913,11 @@ "vendorHash": "sha256-LRIfxQGwG988HE5fftGl6JmBG7tTknvmgpm4Fu1NbWI=" }, "oci": { - "hash": "sha256-UG2dXoHHH7sWma4+Zlvtj2aHwcvJPKgTxJFZDxqzKyc=", + "hash": "sha256-S3OsFoSPYOcD+mjOy1gBAVGpqd61G5S2Zl2GGknKA5o=", "homepage": "https://registry.terraform.io/providers/oracle/oci", "owner": "oracle", "repo": "terraform-provider-oci", - "rev": "v6.32.0", + "rev": "v6.34.0", "spdx": "MPL-2.0", "vendorHash": null }, From ae1be2c9704588dae036d6e8c044e327790c5eeb Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 16 Apr 2025 10:12:15 +0000 Subject: [PATCH 40/79] signalbackup-tools: 20250410-2 -> 20250413 --- pkgs/by-name/si/signalbackup-tools/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/si/signalbackup-tools/package.nix b/pkgs/by-name/si/signalbackup-tools/package.nix index bfbf1a63929f..c20ce4ae3c87 100644 --- a/pkgs/by-name/si/signalbackup-tools/package.nix +++ b/pkgs/by-name/si/signalbackup-tools/package.nix @@ -13,13 +13,13 @@ stdenv.mkDerivation rec { pname = "signalbackup-tools"; - version = "20250410-2"; + version = "20250413"; src = fetchFromGitHub { owner = "bepaald"; repo = "signalbackup-tools"; rev = version; - hash = "sha256-VnxqaZH9jTRnVgGOcUd8SaT+SndFGOWzNGZyFVa7Tlk="; + hash = "sha256-AToQwv0SHbk4KQj1iNsr9YWWAYAlO9hVbImqPEXPgYU="; }; nativeBuildInputs = From 6856d8da4f8ba5f6914e09e8f2a55d0c9a25a023 Mon Sep 17 00:00:00 2001 From: Piotr Kwiecinski <2151333+piotrkwiecinski@users.noreply.github.com> Date: Wed, 16 Apr 2025 13:24:44 +0200 Subject: [PATCH 41/79] nixosTests.mailman: migrate to runTest Part of #386873 --- nixos/tests/all-tests.nix | 2 +- nixos/tests/mailman.nix | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 8e83095a7ded..d55a64246030 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -768,7 +768,7 @@ in mailcatcher = runTest ./mailcatcher.nix; mailhog = handleTest ./mailhog.nix { }; mailpit = runTest ./mailpit.nix; - mailman = handleTest ./mailman.nix { }; + mailman = runTest ./mailman.nix; man = handleTest ./man.nix { }; mariadb-galera = handleTest ./mysql/mariadb-galera.nix { }; marytts = handleTest ./marytts.nix { }; diff --git a/nixos/tests/mailman.nix b/nixos/tests/mailman.nix index d4e09148a9dd..c513c1ed29d3 100644 --- a/nixos/tests/mailman.nix +++ b/nixos/tests/mailman.nix @@ -1,4 +1,5 @@ -import ./make-test-python.nix { +{ ... }: +{ name = "mailman"; nodes.machine = From 8a6ba8a9cccb47409435f739316135009028a67a Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 16 Apr 2025 11:35:54 +0000 Subject: [PATCH 42/79] python312Packages.clickhouse-connect: 0.8.16 -> 0.8.17 --- .../development/python-modules/clickhouse-connect/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/clickhouse-connect/default.nix b/pkgs/development/python-modules/clickhouse-connect/default.nix index d049b05bf594..5c13eeb4f348 100644 --- a/pkgs/development/python-modules/clickhouse-connect/default.nix +++ b/pkgs/development/python-modules/clickhouse-connect/default.nix @@ -24,7 +24,7 @@ }: buildPythonPackage rec { pname = "clickhouse-connect"; - version = "0.8.16"; + version = "0.8.17"; format = "setuptools"; @@ -34,7 +34,7 @@ buildPythonPackage rec { repo = "clickhouse-connect"; owner = "ClickHouse"; tag = "v${version}"; - hash = "sha256-qPlxgBWISd3hb2L5fgFDo1fREJ3DRgQeayzv9EkIVY0="; + hash = "sha256-UFsAKROnzaaAyUDHHARZIO8zZP3knUYoBdGSf9ZGjXo="; }; nativeBuildInputs = [ cython ]; From 1d25969e43f3683087c486b45b80bc19339ace35 Mon Sep 17 00:00:00 2001 From: DontEatOreo <57304299+DontEatOreo@users.noreply.github.com> Date: Wed, 16 Apr 2025 15:25:12 +0300 Subject: [PATCH 43/79] raycast: 1.95.0 -> 1.96.0 Changelog: https://www.raycast.com/changelog/1-96-0 --- pkgs/by-name/ra/raycast/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/ra/raycast/package.nix b/pkgs/by-name/ra/raycast/package.nix index 5790f8b8e5cd..d81453d25a56 100644 --- a/pkgs/by-name/ra/raycast/package.nix +++ b/pkgs/by-name/ra/raycast/package.nix @@ -12,19 +12,19 @@ stdenvNoCC.mkDerivation (finalAttrs: { pname = "raycast"; - version = "1.95.0"; + version = "1.96.0"; src = { aarch64-darwin = fetchurl { name = "Raycast.dmg"; url = "https://releases.raycast.com/releases/${finalAttrs.version}/download?build=arm"; - hash = "sha256-Fh0V/iZqryuqKs8D1V9isHJBh+WFHicrTMckKCh4pQE="; + hash = "sha256-GN9luYvWzUsLp6KzKV+Iwc2shxRHkOLSDq6ZJaKZ7vU="; }; x86_64-darwin = fetchurl { name = "Raycast.dmg"; url = "https://releases.raycast.com/releases/${finalAttrs.version}/download?build=x86_64"; - hash = "sha256-AD4iCBbNMU0Px/NieXvmG/Q3deJ6P/dcVgwFo0vNoOo="; + hash = "sha256-HGO6mZvnBk9R1IS8dNDGj3dwgSNJ+XPjAG4+gJ0KvY4="; }; } .${stdenvNoCC.system} or (throw "raycast: ${stdenvNoCC.system} is unsupported."); From 24d9ad5ecc05db71505957510291108643eec752 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 16 Apr 2025 12:45:59 +0000 Subject: [PATCH 44/79] sane-airscan: 0.99.33 -> 0.99.34 --- pkgs/by-name/sa/sane-airscan/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/sa/sane-airscan/package.nix b/pkgs/by-name/sa/sane-airscan/package.nix index 69738bf67f6b..fa89d36bd10e 100644 --- a/pkgs/by-name/sa/sane-airscan/package.nix +++ b/pkgs/by-name/sa/sane-airscan/package.nix @@ -15,7 +15,7 @@ }: stdenv.mkDerivation rec { pname = "sane-airscan"; - version = "0.99.33"; + version = "0.99.34"; nativeBuildInputs = [ meson @@ -36,7 +36,7 @@ stdenv.mkDerivation rec { owner = "alexpevzner"; repo = pname; rev = version; - sha256 = "sha256-qZ7j76cwJQxGXbgIkV2bYt7puG0lSEw/d6d3fw19TCk="; + sha256 = "sha256-4srMsZhco9YOukmguLQ5HvNeIz7wShmhWt7m5kP4iW8="; }; meta = with lib; { From cd674666de4af238a0c282a1dc8ee1f8890e3ea1 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 16 Apr 2025 13:20:36 +0000 Subject: [PATCH 45/79] mscp: 0.2.1 -> 0.2.2 --- pkgs/by-name/ms/mscp/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/ms/mscp/package.nix b/pkgs/by-name/ms/mscp/package.nix index f95b0a249d5f..978ea0c53a53 100644 --- a/pkgs/by-name/ms/mscp/package.nix +++ b/pkgs/by-name/ms/mscp/package.nix @@ -9,13 +9,13 @@ }: stdenv.mkDerivation (finalAttrs: { pname = "mscp"; - version = "0.2.1"; + version = "0.2.2"; src = fetchFromGitHub { owner = "upa"; repo = "mscp"; rev = "v${finalAttrs.version}"; - hash = "sha256-TWwvPLqGLhh/IE+hIz/jwaGLBoASs78Iqai1TxN7Wps="; + hash = "sha256-5lX0b3JfjmQh/HlESRMNxqCe2qFRAEZoazysoy252dY="; fetchSubmodules = true; }; From 8b901753ec7186d10d8f608d6b116b1d6276b06a Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 16 Apr 2025 14:09:01 +0000 Subject: [PATCH 46/79] fastp: 0.24.0 -> 0.24.1 --- pkgs/by-name/fa/fastp/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/fa/fastp/package.nix b/pkgs/by-name/fa/fastp/package.nix index 89ae4a59486d..d5eeeb41954a 100644 --- a/pkgs/by-name/fa/fastp/package.nix +++ b/pkgs/by-name/fa/fastp/package.nix @@ -9,13 +9,13 @@ stdenv.mkDerivation rec { pname = "fastp"; - version = "0.24.0"; + version = "0.24.1"; src = fetchFromGitHub { owner = "OpenGene"; repo = "fastp"; rev = "v${version}"; - sha256 = "sha256-Jl2Os/6yLWXTDv6irInYlUHpz6QTw8CEMVGFXblAay0="; + sha256 = "sha256-vTAuuhnJ5O2mUFUxM5RIq8w/Zo3SmAgQIDd99YpDcww="; }; buildInputs = [ From 818dbc2c14da163c8f347a61a3dc91891387ec77 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 16 Apr 2025 14:14:45 +0000 Subject: [PATCH 47/79] v2ray-domain-list-community: 20250326132209 -> 20250415151718 --- pkgs/by-name/v2/v2ray-domain-list-community/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/v2/v2ray-domain-list-community/package.nix b/pkgs/by-name/v2/v2ray-domain-list-community/package.nix index 2989d934eb78..cb26889110e2 100644 --- a/pkgs/by-name/v2/v2ray-domain-list-community/package.nix +++ b/pkgs/by-name/v2/v2ray-domain-list-community/package.nix @@ -9,12 +9,12 @@ let generator = pkgsBuildBuild.buildGoModule rec { pname = "v2ray-domain-list-community"; - version = "20250326132209"; + version = "20250415151718"; src = fetchFromGitHub { owner = "v2fly"; repo = "domain-list-community"; rev = version; - hash = "sha256-oxL9XgaTdMISdCQ37gAz4LtgV1bk09GirTtVbSOm8Z4="; + hash = "sha256-Q6/ZWwbsR8dFL6uBRFXKkuMGuWgH/VwHN3qxETbPq4k="; }; vendorHash = "sha256-NLh14rXRci4hgDkBJVJDIDvobndB7KYRKAX7UjyqSsg="; meta = with lib; { From 18e0719c262bd782d7befe0c7b17e143f82dacce Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 16 Apr 2025 14:45:09 +0000 Subject: [PATCH 48/79] pkgsite: 0-unstable-2025-04-01 -> 0-unstable-2025-04-16 --- pkgs/by-name/pk/pkgsite/package.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/by-name/pk/pkgsite/package.nix b/pkgs/by-name/pk/pkgsite/package.nix index 692c399a5855..e50a9be6bd0a 100644 --- a/pkgs/by-name/pk/pkgsite/package.nix +++ b/pkgs/by-name/pk/pkgsite/package.nix @@ -7,16 +7,16 @@ buildGoModule { pname = "pkgsite"; - version = "0-unstable-2025-04-01"; + version = "0-unstable-2025-04-16"; src = fetchFromGitHub { owner = "golang"; repo = "pkgsite"; - rev = "e806f9c8871f0247a0989e5124d82e7d841bce91"; - hash = "sha256-J8v0P+KIhh07c0G+XN5aWuVp2btaJel2T+U6g/D/2sM="; + rev = "0a075a2cae6ac8ff829d0d7c7841d064d6833167"; + hash = "sha256-kYmxR6ZzlHDBeAYFDlUN5EcgRDpB/S00Xx3N1MbKsIk="; }; - vendorHash = "sha256-M4cbpMZ/ujnMUoGp//KpBM2oEl/RCOfI1IcmoGMw+fw="; + vendorHash = "sha256-JoPuNktN4OsdNJ0e8BRuuD0CKuWiFsAcLAS5h9rH/Z0="; subPackages = [ "cmd/pkgsite" ]; From 0e8f74da448a4cfb4accb732972cb10a3cd819fe Mon Sep 17 00:00:00 2001 From: Martin Harvan Date: Wed, 16 Apr 2025 17:09:34 +0200 Subject: [PATCH 49/79] jetbrains.idea-ultimate: 2024.3.5 -> 2025.1 --- pkgs/applications/editors/jetbrains/bin/versions.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/editors/jetbrains/bin/versions.json b/pkgs/applications/editors/jetbrains/bin/versions.json index 9afcb4807d6d..dfb9764cd741 100644 --- a/pkgs/applications/editors/jetbrains/bin/versions.json +++ b/pkgs/applications/editors/jetbrains/bin/versions.json @@ -59,10 +59,10 @@ "idea-ultimate": { "update-channel": "IntelliJ IDEA RELEASE", "url-template": "https://download.jetbrains.com/idea/ideaIU-{version}.tar.gz", - "version": "2024.3.5", - "sha256": "f8e8e864f4fedddf1d366a7db23fc4132192c3a6029c614a382186ff564a78a1", - "url": "https://download.jetbrains.com/idea/ideaIU-2024.3.5.tar.gz", - "build_number": "243.26053.27" + "version": "2025.1", + "sha256": "9946a690072f166607fd7b0d29e9e9c6a24c79fd5d7365a5600366b0b27532ec", + "url": "https://download.jetbrains.com/idea/ideaIU-2025.1.tar.gz", + "build_number": "251.23774.435" }, "mps": { "update-channel": "MPS RELEASE", From e5d9d975af9938c7bf2113f42fac2370305aefb1 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 16 Apr 2025 15:12:21 +0000 Subject: [PATCH 50/79] git-repo: 2.53 -> 2.54 --- pkgs/by-name/gi/git-repo/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/gi/git-repo/package.nix b/pkgs/by-name/gi/git-repo/package.nix index 28766f08da6a..41b7a06a50c5 100644 --- a/pkgs/by-name/gi/git-repo/package.nix +++ b/pkgs/by-name/gi/git-repo/package.nix @@ -13,13 +13,13 @@ stdenv.mkDerivation rec { pname = "git-repo"; - version = "2.53"; + version = "2.54"; src = fetchFromGitHub { owner = "android"; repo = "tools_repo"; rev = "v${version}"; - hash = "sha256-mPmOnq9j9vnfTynGbOoChLslpyTpIzH6+B2fv5PTHZY="; + hash = "sha256-rZCpuJ4TpbVbTxq7qHfhokoj7qCj9/YcA9PGgd9ROCg="; }; # Fix 'NameError: name 'ssl' is not defined' From e727b2e847aa5db0fb2864e902faf863342d3711 Mon Sep 17 00:00:00 2001 From: awwpotato Date: Wed, 16 Apr 2025 08:24:37 -0700 Subject: [PATCH 51/79] sooperlooper: 1.7.8 -> 1.7.9, unbreak --- pkgs/by-name/so/sooperlooper/package.nix | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/pkgs/by-name/so/sooperlooper/package.nix b/pkgs/by-name/so/sooperlooper/package.nix index 2dd184be7ecf..441793caec61 100644 --- a/pkgs/by-name/so/sooperlooper/package.nix +++ b/pkgs/by-name/so/sooperlooper/package.nix @@ -2,7 +2,6 @@ lib, stdenv, fetchFromGitHub, - fetchpatch, autoreconfHook, pkg-config, which, @@ -23,23 +22,15 @@ stdenv.mkDerivation rec { pname = "sooperlooper"; - version = "1.7.8"; + version = "1.7.9"; src = fetchFromGitHub { owner = "essej"; repo = "sooperlooper"; rev = "v${version}"; - sha256 = "sha256-Lrsz/UDCgoac63FJ3CaPVaYwvBtzkGQQRLhUi6lUusE="; + sha256 = "sha256-bPu/VWTJLSIMoJSEQb+/nqtTpkPtCNVuXA17XsnFSP0="; }; - patches = [ - (fetchpatch { - name = "10-build_with_wx_32.patch"; - url = "https://sources.debian.org/data/main/s/sooperlooper/1.7.8~dfsg0-2/debian/patches/10-build_with_wx_32.patch"; - sha256 = "sha256-NF/w+zgRBNkSTqUJhfH9kQogXSYEF70pCN+loR0hjpg="; - }) - ]; - autoreconfPhase = '' patchShebangs ./autogen.sh ./autogen.sh @@ -67,6 +58,9 @@ stdenv.mkDerivation rec { fftw ]; + # see https://bugs.gentoo.org/925275 + CPPFLAGS = "-fpermissive"; + enableParallelBuilding = true; meta = with lib; { From 26886efec9bb7a9fe3e1235e5602b9bb172af50d Mon Sep 17 00:00:00 2001 From: awwpotato Date: Wed, 16 Apr 2025 08:25:23 -0700 Subject: [PATCH 52/79] sooperlooper: moderinize --- pkgs/by-name/so/sooperlooper/package.nix | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/pkgs/by-name/so/sooperlooper/package.nix b/pkgs/by-name/so/sooperlooper/package.nix index 441793caec61..c849da803959 100644 --- a/pkgs/by-name/so/sooperlooper/package.nix +++ b/pkgs/by-name/so/sooperlooper/package.nix @@ -20,14 +20,14 @@ fftw, }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "sooperlooper"; version = "1.7.9"; src = fetchFromGitHub { owner = "essej"; repo = "sooperlooper"; - rev = "v${version}"; + rev = "v${finalAttrs.version}"; sha256 = "sha256-bPu/VWTJLSIMoJSEQb+/nqtTpkPtCNVuXA17XsnFSP0="; }; @@ -63,7 +63,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - meta = with lib; { + meta = { description = "Live looping sampler capable of immediate loop recording, overdubbing, multiplying, reversing and more"; longDescription = '' It allows for multiple simultaneous multi-channel loops limited only by your computer's available memory. @@ -73,8 +73,9 @@ stdenv.mkDerivation rec { and the engine can be run standalone on a computer without a monitor. ''; homepage = "https://sonosaurus.com/sooperlooper/"; - license = licenses.gpl2; - maintainers = with maintainers; [ magnetophon ]; - platforms = platforms.linux; + downloadPage = "https://github.com/essej/sooperlooper"; + license = lib.licenses.gpl2; + maintainers = with lib.maintainers; [ magnetophon ]; + platforms = lib.platforms.linux; }; -} +}) From 240390342d251ea95a300a677a5a9b151757858f Mon Sep 17 00:00:00 2001 From: Diogo Correia Date: Wed, 16 Apr 2025 16:41:23 +0100 Subject: [PATCH 53/79] nixos/meilisearch: add dumpless upgrade option Default is false since it is still experimental. See #327978 --- nixos/modules/services/search/meilisearch.nix | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/nixos/modules/services/search/meilisearch.nix b/nixos/modules/services/search/meilisearch.nix index 1a1465b8e222..03b581c4d8cd 100644 --- a/nixos/modules/services/search/meilisearch.nix +++ b/nixos/modules/services/search/meilisearch.nix @@ -108,6 +108,21 @@ in type = lib.types.str; }; + # TODO: turn on by default when it stops being experimental + dumplessUpgrade = lib.mkOption { + default = false; + example = true; + description = '' + Whether to enable (experimental) dumpless upgrade. + + Allows upgrading from Meilisearch >=v1.12 to Meilisearch >=v1.13 without manually + dumping and importing the database. + + More information at https://www.meilisearch.com/docs/learn/update_and_migration/updating#dumpless-upgrade + ''; + type = lib.types.bool; + }; + }; ###### implementation @@ -129,6 +144,7 @@ in MEILI_DUMP_DIR = "/var/lib/meilisearch/dumps"; MEILI_LOG_LEVEL = cfg.logLevel; MEILI_MAX_INDEX_SIZE = cfg.maxIndexSize; + MEILI_EXPERIMENTAL_DUMPLESS_UPGRADE = lib.boolToString cfg.dumplessUpgrade; }; serviceConfig = { ExecStart = "${cfg.package}/bin/meilisearch"; From 3647cb5a8fa9a9302cdfa497a3566c55aad244bb Mon Sep 17 00:00:00 2001 From: Thiago Kenji Okada Date: Wed, 16 Apr 2025 17:35:32 +0100 Subject: [PATCH 54/79] pinta: 2.1.2 -> 3.0 --- pkgs/by-name/pi/pinta/deps.json | 726 ++++++++++++++++++++++++++++-- pkgs/by-name/pi/pinta/package.nix | 33 +- 2 files changed, 712 insertions(+), 47 deletions(-) diff --git a/pkgs/by-name/pi/pinta/deps.json b/pkgs/by-name/pi/pinta/deps.json index 7299114be0cb..c3f40bcc9293 100644 --- a/pkgs/by-name/pi/pinta/deps.json +++ b/pkgs/by-name/pi/pinta/deps.json @@ -1,58 +1,553 @@ [ { - "pname": "AtkSharp", - "version": "3.24.24.38", - "hash": "sha256-J9/+MU+zky18Lk3gfTCox6Jtm1SyjQQAK0vCb5Ecu4k=" + "pname": "GirCore.Adw-1", + "version": "0.6.3", + "hash": "sha256-wV4zTybD7yJldzQORBK2iI/77Fv3C9kjZvtj/S6v48k=" }, { - "pname": "CairoSharp", - "version": "3.24.24.38", - "hash": "sha256-DeXSAuSiGc7SzHb3HsUkLDLe5HZVpRn7VQFNhAAvflg=" + "pname": "GirCore.Cairo-1.0", + "version": "0.6.3", + "hash": "sha256-IJLzVmWkuCzdyiIqlzXyl8/ZDC6hmnh/bf4+i2HOpLw=" }, { - "pname": "GdkSharp", - "version": "3.24.24.38", - "hash": "sha256-JpggYCsUlrGZ1CKjCZMawiCjJDWQQc45YdYuA8L7rzA=" + "pname": "GirCore.FreeType2-2.0", + "version": "0.6.3", + "hash": "sha256-CsH4zQkZukyVw653sphDf5eveuvzY3HVphoO6fvjZiA=" }, { - "pname": "GioSharp", - "version": "3.24.24.38", - "hash": "sha256-RLd7hlelMgp9Eqga+0YxZVHN6GtbCe6IcHct2bPKcaw=" + "pname": "GirCore.Gdk-4.0", + "version": "0.6.3", + "hash": "sha256-3R7ikDBuQJ1iaVb8yuewdLggZ1IVecLuhmjaw1Hzm0s=" }, { - "pname": "GLibSharp", - "version": "3.24.24.38", - "hash": "sha256-df/8vV4OeQ2v8k7HPNrKcoEQdfPUWrHmM2S1F3DrEag=" + "pname": "GirCore.GdkPixbuf-2.0", + "version": "0.6.3", + "hash": "sha256-HZr3YmNLumXTGIN2CvxYZS9mHzvOvpMhUVJ1/DJlWN4=" }, { - "pname": "GtkSharp", - "version": "3.24.24.38", - "hash": "sha256-Uvx7/ylLL4HROPWifMZnOYD9fe0qxlc8QsCayN5TyDI=" + "pname": "GirCore.Gio-2.0", + "version": "0.6.3", + "hash": "sha256-pYc13vCSAH9Or7plQYffBzB/9b83oPNRBf5+HDeT/7w=" }, { - "pname": "Microsoft.Bcl.AsyncInterfaces", - "version": "6.0.0", - "hash": "sha256-49+H/iFwp+AfCICvWcqo9us4CzxApPKC37Q5Eqrw+JU=" + "pname": "GirCore.GLib-2.0", + "version": "0.6.3", + "hash": "sha256-Lsl44qroh+ENO7yBFoySrNgxs8FBeT0nH6PKJ5u+LAI=" + }, + { + "pname": "GirCore.GObject-2.0", + "version": "0.6.3", + "hash": "sha256-+gerXQbv8HNcFjA76AvtzAG3d+CRb7pPYDaAL+iUPz4=" + }, + { + "pname": "GirCore.GObject-2.0.Integration", + "version": "0.6.3", + "hash": "sha256-ujkhIzrqeKOcwdwjgzMh3eTcZ2N5PfgvItfyNj7Kc3s=" + }, + { + "pname": "GirCore.Graphene-1.0", + "version": "0.6.3", + "hash": "sha256-+pDFEj94WNbXD7Fso1xuxkkETjej/O/d1JNW8eV6UPA=" + }, + { + "pname": "GirCore.Gsk-4.0", + "version": "0.6.3", + "hash": "sha256-vV66rP1vVloB+DA1xPL2iSrJwEmdUDdl209RcRpNP9Q=" + }, + { + "pname": "GirCore.Gtk-4.0", + "version": "0.6.3", + "hash": "sha256-unQkwxnaoIihD+FWKnJgJNAR4i99qcTcN78SG8WhrZk=" + }, + { + "pname": "GirCore.HarfBuzz-0.0", + "version": "0.6.3", + "hash": "sha256-8I7+SMTeXBNe6Q/rE7R6WiAYRPuLjfSeDjwllP/n9tM=" + }, + { + "pname": "GirCore.Pango-1.0", + "version": "0.6.3", + "hash": "sha256-4qPtnqcd1gjt/bz6vyq7L4iA8TyDYTlqkkDD6H150Hs=" + }, + { + "pname": "GirCore.PangoCairo-1.0", + "version": "0.6.3", + "hash": "sha256-O8SVg5F8OBazisAwxDB66zlup2hB6hvmO7ubdpSJXpI=" + }, + { + "pname": "Microsoft.CodeAnalysis.Analyzers", + "version": "3.3.4", + "hash": "sha256-qDzTfZBSCvAUu9gzq2k+LOvh6/eRvJ9++VCNck/ZpnE=" + }, + { + "pname": "Microsoft.CodeAnalysis.Common", + "version": "4.8.0", + "hash": "sha256-3IEinVTZq6/aajMVA8XTRO3LTIEt0PuhGyITGJLtqz4=" + }, + { + "pname": "Microsoft.CodeAnalysis.CSharp", + "version": "4.8.0", + "hash": "sha256-MmOnXJvd/ezs5UPcqyGLnbZz5m+VedpRfB+kFZeeqkU=" + }, + { + "pname": "Microsoft.NETCore.Platforms", + "version": "1.0.1", + "hash": "sha256-mZotlGZqtrqDSoBrZhsxFe6fuOv5/BIo0w2Z2x0zVAU=" + }, + { + "pname": "Microsoft.NETCore.Platforms", + "version": "1.1.0", + "hash": "sha256-FeM40ktcObQJk4nMYShB61H/E8B7tIKfl9ObJ0IOcCM=" + }, + { + "pname": "Microsoft.NETCore.Platforms", + "version": "1.1.1", + "hash": "sha256-8hLiUKvy/YirCWlFwzdejD2Db3DaXhHxT7GSZx/znJg=" + }, + { + "pname": "Microsoft.NETCore.Targets", + "version": "1.0.1", + "hash": "sha256-lxxw/Gy32xHi0fLgFWNj4YTFBSBkjx5l6ucmbTyf7V4=" + }, + { + "pname": "Microsoft.NETCore.Targets", + "version": "1.1.0", + "hash": "sha256-0AqQ2gMS8iNlYkrD+BxtIg7cXMnr9xZHtKAuN4bjfaQ=" + }, + { + "pname": "Microsoft.Win32.Primitives", + "version": "4.3.0", + "hash": "sha256-mBNDmPXNTW54XLnPAUwBRvkIORFM7/j0D0I2SyQPDEg=" + }, + { + "pname": "Mono.Addins", + "version": "1.4.2-alpha.4", + "hash": "sha256-RZk63v41ByKGmv0wT57MfX77+ao8KcWEWtkWogucHYM=" + }, + { + "pname": "Mono.Addins.CecilReflector", + "version": "1.4.2-alpha.4", + "hash": "sha256-VPVhTWLKJDhOThuu3Z0Yv1DlOFXp+H7olqwY/YpZE2Q=" + }, + { + "pname": "Mono.Addins.Setup", + "version": "1.4.2-alpha.4", + "hash": "sha256-oPpISiP20NQLlBjkG9fyH0qdgDwl6vxaaykTxVgG9rY=" + }, + { + "pname": "Mono.Cecil", + "version": "0.10.1", + "hash": "sha256-JlELZujFtdTky8wt4k5lmLbY+hxLSzbAWJN0AHq41/4=" }, { "pname": "NGettext", "version": "0.6.7", "hash": "sha256-fmIODwPZkNJsnoNJG+EL1J5mpbuxYI4BsrgD1B4N2NI=" }, - { - "pname": "PangoSharp", - "version": "3.24.24.38", - "hash": "sha256-dq1c/G05iCmWmWZxwLV0e8qvQMS0620Bd0MSz4hEqjI=" - }, { "pname": "ParagonClipper", "version": "6.4.2", "hash": "sha256-jCT6rkghEqMuGwiVeiIAspHW+kuiB2jRl9ireBwhVV0=" }, + { + "pname": "runtime.any.System.Collections", + "version": "4.3.0", + "hash": "sha256-4PGZqyWhZ6/HCTF2KddDsbmTTjxs2oW79YfkberDZS8=" + }, + { + "pname": "runtime.any.System.Diagnostics.Tracing", + "version": "4.3.0", + "hash": "sha256-dsmTLGvt8HqRkDWP8iKVXJCS+akAzENGXKPV18W2RgI=" + }, + { + "pname": "runtime.any.System.Globalization", + "version": "4.3.0", + "hash": "sha256-PaiITTFI2FfPylTEk7DwzfKeiA/g/aooSU1pDcdwWLU=" + }, + { + "pname": "runtime.any.System.Globalization.Calendars", + "version": "4.3.0", + "hash": "sha256-AYh39tgXJVFu8aLi9Y/4rK8yWMaza4S4eaxjfcuEEL4=" + }, + { + "pname": "runtime.any.System.IO", + "version": "4.3.0", + "hash": "sha256-vej7ySRhyvM3pYh/ITMdC25ivSd0WLZAaIQbYj/6HVE=" + }, + { + "pname": "runtime.any.System.Reflection", + "version": "4.3.0", + "hash": "sha256-ns6f++lSA+bi1xXgmW1JkWFb2NaMD+w+YNTfMvyAiQk=" + }, + { + "pname": "runtime.any.System.Reflection.Primitives", + "version": "4.3.0", + "hash": "sha256-LkPXtiDQM3BcdYkAm5uSNOiz3uF4J45qpxn5aBiqNXQ=" + }, + { + "pname": "runtime.any.System.Resources.ResourceManager", + "version": "4.3.0", + "hash": "sha256-9EvnmZslLgLLhJ00o5MWaPuJQlbUFcUF8itGQNVkcQ4=" + }, + { + "pname": "runtime.any.System.Runtime", + "version": "4.3.0", + "hash": "sha256-qwhNXBaJ1DtDkuRacgHwnZmOZ1u9q7N8j0cWOLYOELM=" + }, + { + "pname": "runtime.any.System.Runtime.Handles", + "version": "4.3.0", + "hash": "sha256-PQRACwnSUuxgVySO1840KvqCC9F8iI9iTzxNW0RcBS4=" + }, + { + "pname": "runtime.any.System.Runtime.InteropServices", + "version": "4.3.0", + "hash": "sha256-Kaw5PnLYIiqWbsoF3VKJhy7pkpoGsUwn4ZDCKscbbzA=" + }, + { + "pname": "runtime.any.System.Text.Encoding", + "version": "4.3.0", + "hash": "sha256-Q18B9q26MkWZx68exUfQT30+0PGmpFlDgaF0TnaIGCs=" + }, + { + "pname": "runtime.any.System.Text.Encoding.Extensions", + "version": "4.3.0", + "hash": "sha256-6MYj0RmLh4EVqMtO/MRqBi0HOn5iG4x9JimgCCJ+EFM=" + }, + { + "pname": "runtime.any.System.Threading.Tasks", + "version": "4.3.0", + "hash": "sha256-agdOM0NXupfHbKAQzQT8XgbI9B8hVEh+a/2vqeHctg4=" + }, + { + "pname": "runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl", + "version": "4.3.0", + "hash": "sha256-LXUPLX3DJxsU1Pd3UwjO1PO9NM2elNEDXeu2Mu/vNps=" + }, + { + "pname": "runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl", + "version": "4.3.2", + "hash": "sha256-EbnOqPOrAgI9eNheXLR++VnY4pHzMsEKw1dFPJ/Fl2c=" + }, + { + "pname": "runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl", + "version": "4.3.0", + "hash": "sha256-qeSqaUI80+lqw5MK4vMpmO0CZaqrmYktwp6L+vQAb0I=" + }, + { + "pname": "runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl", + "version": "4.3.2", + "hash": "sha256-mVg02TNvJc1BuHU03q3fH3M6cMgkKaQPBxraSHl/Btg=" + }, + { + "pname": "runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl", + "version": "4.3.0", + "hash": "sha256-SrHqT9wrCBsxILWtaJgGKd6Odmxm8/Mh7Kh0CUkZVzA=" + }, + { + "pname": "runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl", + "version": "4.3.2", + "hash": "sha256-g9Uiikrl+M40hYe0JMlGHe/lrR0+nN05YF64wzLmBBA=" + }, + { + "pname": "runtime.native.System", + "version": "4.3.0", + "hash": "sha256-ZBZaodnjvLXATWpXXakFgcy6P+gjhshFXmglrL5xD5Y=" + }, + { + "pname": "runtime.native.System.Net.Http", + "version": "4.3.0", + "hash": "sha256-c556PyheRwpYhweBjSfIwEyZHnAUB8jWioyKEcp/2dg=" + }, + { + "pname": "runtime.native.System.Security.Cryptography", + "version": "4.0.0", + "hash": "sha256-6Q8eYzC32BbGIiTHoQaE6B3cD81vYQcH5SCswYRSp0w=" + }, + { + "pname": "runtime.native.System.Security.Cryptography.Apple", + "version": "4.3.0", + "hash": "sha256-2IhBv0i6pTcOyr8FFIyfPEaaCHUmJZ8DYwLUwJ+5waw=" + }, + { + "pname": "runtime.native.System.Security.Cryptography.OpenSsl", + "version": "4.3.0", + "hash": "sha256-Jy01KhtcCl2wjMpZWH+X3fhHcVn+SyllWFY8zWlz/6I=" + }, + { + "pname": "runtime.native.System.Security.Cryptography.OpenSsl", + "version": "4.3.2", + "hash": "sha256-xqF6LbbtpzNC9n1Ua16PnYgXHU0LvblEROTfK4vIxX8=" + }, + { + "pname": "runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl", + "version": "4.3.0", + "hash": "sha256-wyv00gdlqf8ckxEdV7E+Ql9hJIoPcmYEuyeWb5Oz3mM=" + }, + { + "pname": "runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl", + "version": "4.3.2", + "hash": "sha256-aJBu6Frcg6webvzVcKNoUP1b462OAqReF2giTSyBzCQ=" + }, + { + "pname": "runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl", + "version": "4.3.0", + "hash": "sha256-zi+b4sCFrA9QBiSGDD7xPV27r3iHGlV99gpyVUjRmc4=" + }, + { + "pname": "runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl", + "version": "4.3.2", + "hash": "sha256-Mpt7KN2Kq51QYOEVesEjhWcCGTqWckuPf8HlQ110qLY=" + }, + { + "pname": "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple", + "version": "4.3.0", + "hash": "sha256-serkd4A7F6eciPiPJtUyJyxzdAtupEcWIZQ9nptEzIM=" + }, + { + "pname": "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl", + "version": "4.3.0", + "hash": "sha256-gybQU6mPgaWV3rBG2dbH6tT3tBq8mgze3PROdsuWnX0=" + }, + { + "pname": "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl", + "version": "4.3.2", + "hash": "sha256-JvMltmfVC53mCZtKDHE69G3RT6Id28hnskntP9MMP9U=" + }, + { + "pname": "runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl", + "version": "4.3.0", + "hash": "sha256-VsP72GVveWnGUvS/vjOQLv1U80H2K8nZ4fDAmI61Hm4=" + }, + { + "pname": "runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl", + "version": "4.3.2", + "hash": "sha256-QfFxWTVRNBhN4Dm1XRbCf+soNQpy81PsZed3x6op/bI=" + }, + { + "pname": "runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl", + "version": "4.3.0", + "hash": "sha256-4yKGa/IrNCKuQ3zaDzILdNPD32bNdy6xr5gdJigyF5g=" + }, + { + "pname": "runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl", + "version": "4.3.2", + "hash": "sha256-EaJHVc9aDZ6F7ltM2JwlIuiJvqM67CKRq682iVSo+pU=" + }, + { + "pname": "runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl", + "version": "4.3.0", + "hash": "sha256-HmdJhhRsiVoOOCcUvAwdjpMRiyuSwdcgEv2j9hxi+Zc=" + }, + { + "pname": "runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl", + "version": "4.3.2", + "hash": "sha256-PHR0+6rIjJswn89eoiWYY1DuU8u6xRJLrtjykAMuFmA=" + }, + { + "pname": "runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl", + "version": "4.3.0", + "hash": "sha256-pVFUKuPPIx0edQKjzRon3zKq8zhzHEzko/lc01V/jdw=" + }, + { + "pname": "runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl", + "version": "4.3.2", + "hash": "sha256-LFkh7ua7R4rI5w2KGjcHlGXLecsncCy6kDXLuy4qD/Q=" + }, + { + "pname": "runtime.unix.Microsoft.Win32.Primitives", + "version": "4.3.0", + "hash": "sha256-LZb23lRXzr26tRS5aA0xyB08JxiblPDoA7HBvn6awXg=" + }, + { + "pname": "runtime.unix.System.Diagnostics.Debug", + "version": "4.3.0", + "hash": "sha256-ReoazscfbGH+R6s6jkg5sIEHWNEvjEoHtIsMbpc7+tI=" + }, + { + "pname": "runtime.unix.System.IO.FileSystem", + "version": "4.3.0", + "hash": "sha256-Pf4mRl6YDK2x2KMh0WdyNgv0VUNdSKVDLlHqozecy5I=" + }, + { + "pname": "runtime.unix.System.Net.Primitives", + "version": "4.3.0", + "hash": "sha256-pHJ+I6i16MV6m77uhTC6GPY6jWGReE3SSP3fVB59ti0=" + }, + { + "pname": "runtime.unix.System.Private.Uri", + "version": "4.3.0", + "hash": "sha256-c5tXWhE/fYbJVl9rXs0uHh3pTsg44YD1dJvyOA0WoMs=" + }, + { + "pname": "runtime.unix.System.Runtime.Extensions", + "version": "4.3.0", + "hash": "sha256-l8S9gt6dk3qYG6HYonHtdlYtBKyPb29uQ6NDjmrt3V4=" + }, { "pname": "SharpZipLib", - "version": "1.4.1", - "hash": "sha256-ZsmWYdcr73k6Vd9HK1sKBrit6LLiSr+haH8l9h+UAbY=" + "version": "1.3.3", + "hash": "sha256-HWEQTKh9Ktwg/zIl079dAiH+ob2ShWFAqLgG6XgIMr4=" + }, + { + "pname": "System.Buffers", + "version": "4.3.0", + "hash": "sha256-XqZWb4Kd04960h4U9seivjKseGA/YEIpdplfHYHQ9jk=" + }, + { + "pname": "System.Collections", + "version": "4.0.11", + "hash": "sha256-puoFMkx4Z55C1XPxNw3np8nzNGjH+G24j43yTIsDRL0=" + }, + { + "pname": "System.Collections", + "version": "4.3.0", + "hash": "sha256-afY7VUtD6w/5mYqrce8kQrvDIfS2GXDINDh73IjxJKc=" + }, + { + "pname": "System.Collections.Concurrent", + "version": "4.0.12", + "hash": "sha256-zIEM7AB4SyE9u6G8+o+gCLLwkgi6+3rHQVPdn/dEwB8=" + }, + { + "pname": "System.Collections.Concurrent", + "version": "4.3.0", + "hash": "sha256-KMY5DfJnDeIsa13DpqvyN8NkReZEMAFnlmNglVoFIXI=" + }, + { + "pname": "System.Collections.Immutable", + "version": "6.0.0", + "hash": "sha256-DKEbpFqXCIEfqp9p3ezqadn5b/S1YTk32/EQK+tEScs=" + }, + { + "pname": "System.Collections.Immutable", + "version": "7.0.0", + "hash": "sha256-9an2wbxue2qrtugYES9awshQg+KfJqajhnhs45kQIdk=" + }, + { + "pname": "System.Collections.NonGeneric", + "version": "4.3.0", + "hash": "sha256-8/yZmD4jjvq7m68SPkJZLBQ79jOTOyT5lyzX4SCYAx8=" + }, + { + "pname": "System.Collections.Specialized", + "version": "4.3.0", + "hash": "sha256-QNg0JJNx+zXMQ26MJRPzH7THdtqjrNtGLUgaR1SdvOk=" + }, + { + "pname": "System.CommandLine", + "version": "2.0.0-beta4.22272.1", + "hash": "sha256-zSO+CYnMH8deBHDI9DHhCPj79Ce3GOzHCyH1/TiHxcc=" + }, + { + "pname": "System.Diagnostics.Debug", + "version": "4.0.11", + "hash": "sha256-P+rSQJVoN6M56jQbs76kZ9G3mAWFdtF27P/RijN8sj4=" + }, + { + "pname": "System.Diagnostics.Debug", + "version": "4.3.0", + "hash": "sha256-fkA79SjPbSeiEcrbbUsb70u9B7wqbsdM9s1LnoKj0gM=" + }, + { + "pname": "System.Diagnostics.DiagnosticSource", + "version": "4.3.0", + "hash": "sha256-OFJRb0ygep0Z3yDBLwAgM/Tkfs4JCDtsNhwDH9cd1Xw=" + }, + { + "pname": "System.Diagnostics.Tracing", + "version": "4.1.0", + "hash": "sha256-JA0jJcLbU3zh52ub3zweob2EVHvxOqiC6SCYHrY5WbQ=" + }, + { + "pname": "System.Diagnostics.Tracing", + "version": "4.3.0", + "hash": "sha256-hCETZpHHGVhPYvb4C0fh4zs+8zv4GPoixagkLZjpa9Q=" + }, + { + "pname": "System.Globalization", + "version": "4.0.11", + "hash": "sha256-rbSgc2PIEc2c2rN6LK3qCREAX3DqA2Nq1WcLrZYsDBw=" + }, + { + "pname": "System.Globalization", + "version": "4.3.0", + "hash": "sha256-caL0pRmFSEsaoeZeWN5BTQtGrAtaQPwFi8YOZPZG5rI=" + }, + { + "pname": "System.Globalization.Calendars", + "version": "4.3.0", + "hash": "sha256-uNOD0EOVFgnS2fMKvMiEtI9aOw00+Pfy/H+qucAQlPc=" + }, + { + "pname": "System.Globalization.Extensions", + "version": "4.3.0", + "hash": "sha256-mmJWA27T0GRVuFP9/sj+4TrR4GJWrzNIk2PDrbr7RQk=" + }, + { + "pname": "System.IO", + "version": "4.1.0", + "hash": "sha256-V6oyQFwWb8NvGxAwvzWnhPxy9dKOfj/XBM3tEC5aHrw=" + }, + { + "pname": "System.IO", + "version": "4.3.0", + "hash": "sha256-ruynQHekFP5wPrDiVyhNiRIXeZ/I9NpjK5pU+HPDiRY=" + }, + { + "pname": "System.IO.FileSystem", + "version": "4.0.1", + "hash": "sha256-4VKXFgcGYCTWVXjAlniAVq0dO3o5s8KHylg2wg2/7k0=" + }, + { + "pname": "System.IO.FileSystem", + "version": "4.3.0", + "hash": "sha256-vNIYnvlayuVj0WfRfYKpDrhDptlhp1pN8CYmlVd2TXw=" + }, + { + "pname": "System.IO.FileSystem.Primitives", + "version": "4.0.1", + "hash": "sha256-IpigKMomqb6pmYWkrlf0ZdpILtRluX2cX5sOKVW0Feg=" + }, + { + "pname": "System.IO.FileSystem.Primitives", + "version": "4.3.0", + "hash": "sha256-LMnfg8Vwavs9cMnq9nNH8IWtAtSfk0/Fy4s4Rt9r1kg=" + }, + { + "pname": "System.Linq", + "version": "4.1.0", + "hash": "sha256-ZQpFtYw5N1F1aX0jUK3Tw+XvM5tnlnshkTCNtfVA794=" + }, + { + "pname": "System.Linq", + "version": "4.3.0", + "hash": "sha256-R5uiSL3l6a3XrXSSL6jz+q/PcyVQzEAByiuXZNSqD/A=" + }, + { + "pname": "System.Net.Http", + "version": "4.3.4", + "hash": "sha256-FMoU0K7nlPLxoDju0NL21Wjlga9GpnAoQjsFhFYYt00=" + }, + { + "pname": "System.Net.Primitives", + "version": "4.3.0", + "hash": "sha256-MY7Z6vOtFMbEKaLW9nOSZeAjcWpwCtdO7/W1mkGZBzE=" + }, + { + "pname": "System.Private.Uri", + "version": "4.3.0", + "hash": "sha256-fVfgcoP4AVN1E5wHZbKBIOPYZ/xBeSIdsNF+bdukIRM=" + }, + { + "pname": "System.Reflection", + "version": "4.1.0", + "hash": "sha256-idZHGH2Yl/hha1CM4VzLhsaR8Ljo/rV7TYe7mwRJSMs=" + }, + { + "pname": "System.Reflection", + "version": "4.3.0", + "hash": "sha256-NQSZRpZLvtPWDlvmMIdGxcVuyUnw92ZURo0hXsEshXY=" }, { "pname": "System.Reflection.Emit", @@ -60,13 +555,178 @@ "hash": "sha256-Fw/CSRD+wajH1MqfKS3Q/sIrUH7GN4K+F+Dx68UPNIg=" }, { - "pname": "System.Security.Principal.Windows", - "version": "4.7.0", - "hash": "sha256-rWBM2U8Kq3rEdaa1MPZSYOOkbtMGgWyB8iPrpIqmpqg=" + "pname": "System.Reflection.Metadata", + "version": "7.0.0", + "hash": "sha256-GwAKQhkhPBYTqmRdG9c9taqrKSKDwyUgOEhWLKxWNPI=" + }, + { + "pname": "System.Reflection.Primitives", + "version": "4.0.1", + "hash": "sha256-SFSfpWEyCBMAOerrMCOiKnpT+UAWTvRcmoRquJR6Vq0=" + }, + { + "pname": "System.Reflection.Primitives", + "version": "4.3.0", + "hash": "sha256-5ogwWB4vlQTl3jjk1xjniG2ozbFIjZTL9ug0usZQuBM=" + }, + { + "pname": "System.Resources.ResourceManager", + "version": "4.0.1", + "hash": "sha256-cZ2/3/fczLjEpn6j3xkgQV9ouOVjy4Kisgw5xWw9kSw=" + }, + { + "pname": "System.Resources.ResourceManager", + "version": "4.3.0", + "hash": "sha256-idiOD93xbbrbwwSnD4mORA9RYi/D/U48eRUsn/WnWGo=" + }, + { + "pname": "System.Runtime", + "version": "4.1.0", + "hash": "sha256-FViNGM/4oWtlP6w0JC0vJU+k9efLKZ+yaXrnEeabDQo=" + }, + { + "pname": "System.Runtime", + "version": "4.3.0", + "hash": "sha256-51813WXpBIsuA6fUtE5XaRQjcWdQ2/lmEokJt97u0Rg=" + }, + { + "pname": "System.Runtime.CompilerServices.Unsafe", + "version": "6.0.0", + "hash": "sha256-bEG1PnDp7uKYz/OgLOWs3RWwQSVYm+AnPwVmAmcgp2I=" + }, + { + "pname": "System.Runtime.Extensions", + "version": "4.1.0", + "hash": "sha256-X7DZ5CbPY7jHs20YZ7bmcXs9B5Mxptu/HnBUvUnNhGc=" + }, + { + "pname": "System.Runtime.Extensions", + "version": "4.3.0", + "hash": "sha256-wLDHmozr84v1W2zYCWYxxj0FR0JDYHSVRaRuDm0bd/o=" + }, + { + "pname": "System.Runtime.Handles", + "version": "4.0.1", + "hash": "sha256-j2QgVO9ZOjv7D1het98CoFpjoYgxjupuIhuBUmLLH7w=" + }, + { + "pname": "System.Runtime.Handles", + "version": "4.3.0", + "hash": "sha256-KJ5aXoGpB56Y6+iepBkdpx/AfaJDAitx4vrkLqR7gms=" + }, + { + "pname": "System.Runtime.InteropServices", + "version": "4.1.0", + "hash": "sha256-QceAYlJvkPRJc/+5jR+wQpNNI3aqGySWWSO30e/FfQY=" + }, + { + "pname": "System.Runtime.InteropServices", + "version": "4.3.0", + "hash": "sha256-8sDH+WUJfCR+7e4nfpftj/+lstEiZixWUBueR2zmHgI=" + }, + { + "pname": "System.Runtime.Numerics", + "version": "4.0.1", + "hash": "sha256-1pJt5ZGxLPTX1mjOi8qZPXyyOMkYV0NstoUCv91HYPg=" + }, + { + "pname": "System.Runtime.Numerics", + "version": "4.3.0", + "hash": "sha256-P5jHCgMbgFMYiONvzmaKFeOqcAIDPu/U8bOVrNPYKqc=" + }, + { + "pname": "System.Security.Cryptography.Algorithms", + "version": "4.2.0", + "hash": "sha256-BelNIpEyToEp/VYKnje/q1P7KNEpQNtOzGPU18pLGpE=" + }, + { + "pname": "System.Security.Cryptography.Algorithms", + "version": "4.3.0", + "hash": "sha256-tAJvNSlczYBJ3Ed24Ae27a55tq/n4D3fubNQdwcKWA8=" + }, + { + "pname": "System.Security.Cryptography.Cng", + "version": "4.3.0", + "hash": "sha256-u17vy6wNhqok91SrVLno2M1EzLHZm6VMca85xbVChsw=" + }, + { + "pname": "System.Security.Cryptography.Csp", + "version": "4.0.0", + "hash": "sha256-WHyR6vVK3zaT4De7jgQFUar1P5fiX9ECwiVkJDFFm7M=" + }, + { + "pname": "System.Security.Cryptography.Csp", + "version": "4.3.0", + "hash": "sha256-oefdTU/Z2PWU9nlat8uiRDGq/PGZoSPRgkML11pmvPQ=" + }, + { + "pname": "System.Security.Cryptography.Encoding", + "version": "4.0.0", + "hash": "sha256-ZO7ha39J5uHkIF2RoEKv/bW/bLbVvYMO4+rWyYsKHik=" + }, + { + "pname": "System.Security.Cryptography.Encoding", + "version": "4.3.0", + "hash": "sha256-Yuge89N6M+NcblcvXMeyHZ6kZDfwBv3LPMDiF8HhJss=" + }, + { + "pname": "System.Security.Cryptography.OpenSsl", + "version": "4.3.0", + "hash": "sha256-DL+D2sc2JrQiB4oAcUggTFyD8w3aLEjJfod5JPe+Oz4=" + }, + { + "pname": "System.Security.Cryptography.Primitives", + "version": "4.0.0", + "hash": "sha256-sEdPftfTxQd/8DpdpqUZC2XWC0SjVCPqAkEleLl17EQ=" + }, + { + "pname": "System.Security.Cryptography.Primitives", + "version": "4.3.0", + "hash": "sha256-fnFi7B3SnVj5a+BbgXnbjnGNvWrCEU6Hp/wjsjWz318=" + }, + { + "pname": "System.Security.Cryptography.X509Certificates", + "version": "4.3.0", + "hash": "sha256-MG3V/owDh273GCUPsGGraNwaVpcydupl3EtPXj6TVG0=" + }, + { + "pname": "System.Text.Encoding", + "version": "4.0.11", + "hash": "sha256-PEailOvG05CVgPTyKLtpAgRydlSHmtd5K0Y8GSHY2Lc=" + }, + { + "pname": "System.Text.Encoding", + "version": "4.3.0", + "hash": "sha256-GctHVGLZAa/rqkBNhsBGnsiWdKyv6VDubYpGkuOkBLg=" + }, + { + "pname": "System.Text.Encoding.Extensions", + "version": "4.3.0", + "hash": "sha256-vufHXg8QAKxHlujPHHcrtGwAqFmsCD6HKjfDAiHyAYc=" + }, + { + "pname": "System.Threading", + "version": "4.0.11", + "hash": "sha256-mob1Zv3qLQhQ1/xOLXZmYqpniNUMCfn02n8ZkaAhqac=" + }, + { + "pname": "System.Threading", + "version": "4.3.0", + "hash": "sha256-ZDQ3dR4pzVwmaqBg4hacZaVenQ/3yAF/uV7BXZXjiWc=" + }, + { + "pname": "System.Threading.Tasks", + "version": "4.0.11", + "hash": "sha256-5SLxzFg1df6bTm2t09xeI01wa5qQglqUwwJNlQPJIVs=" + }, + { + "pname": "System.Threading.Tasks", + "version": "4.3.0", + "hash": "sha256-Z5rXfJ1EXp3G32IKZGiZ6koMjRu0n8C1NGrwpdIen4w=" }, { "pname": "Tmds.DBus", - "version": "0.11.0", - "hash": "sha256-xNArjhSaEZcRiRB+mb9ZwUPQUqbLjRYt4JV2WUtM+hg=" + "version": "0.21.2", + "hash": "sha256-1rxUexOuj0raH8FvvUKeGdcWr3u8KmuAySe/4isy6S0=" } ] diff --git a/pkgs/by-name/pi/pinta/package.nix b/pkgs/by-name/pi/pinta/package.nix index e3704ef9ea77..e04cfa245bb5 100644 --- a/pkgs/by-name/pi/pinta/package.nix +++ b/pkgs/by-name/pi/pinta/package.nix @@ -4,26 +4,38 @@ dotnetCorePackages, fetchFromGitHub, glibcLocales, - gtk3, + gtk4, intltool, - wrapGAppsHook3, + libadwaita, + wrapGAppsHook4, }: buildDotnetModule rec { pname = "Pinta"; - version = "2.1.2"; + version = "3.0"; + + src = fetchFromGitHub { + owner = "PintaProject"; + repo = "Pinta"; + rev = version; + hash = "sha256-87uzUIgivBI2W+vJV/LflxJoUPJCW5SlodwcC1pSOUk="; + }; nativeBuildInputs = [ intltool - wrapGAppsHook3 + wrapGAppsHook4 ]; + runtimeDeps = [ + gtk4 + libadwaita + ]; + + buildInputs = runtimeDeps; + dotnet-sdk = dotnetCorePackages.sdk_8_0; dotnet-runtime = dotnetCorePackages.runtime_8_0; - runtimeDeps = [ gtk3 ]; - buildInputs = runtimeDeps; - # How-to update deps: # $ nix-build -A pinta.fetch-deps # $ ./result @@ -32,13 +44,6 @@ buildDotnetModule rec { projectFile = "Pinta"; - src = fetchFromGitHub { - owner = "PintaProject"; - repo = "Pinta"; - rev = version; - hash = "sha256-/GMYF7G469oX5W1zjv5A9a6tcLX+4g6Sf9cDqxSjgWg="; - }; - # https://github.com/NixOS/nixpkgs/issues/38991 # bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8) env.LOCALE_ARCHIVE = "${glibcLocales}/lib/locale/locale-archive"; From 893e5d504c0a82bb24fd7a4003e73cc9cdfde2a4 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 16 Apr 2025 16:58:03 +0000 Subject: [PATCH 55/79] pq-cli: 1.0.2-unstable-2025-04-04 -> 1.0.2-unstable-2025-04-10 --- pkgs/by-name/pq/pq-cli/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/pq/pq-cli/package.nix b/pkgs/by-name/pq/pq-cli/package.nix index e28c93026d70..225ee762b0d7 100644 --- a/pkgs/by-name/pq/pq-cli/package.nix +++ b/pkgs/by-name/pq/pq-cli/package.nix @@ -7,14 +7,14 @@ python3Packages.buildPythonApplication rec { pname = "pq-cli"; - version = "1.0.2-unstable-2025-04-04"; + version = "1.0.2-unstable-2025-04-10"; pyproject = true; src = fetchFromGitHub { owner = "rr-"; repo = "pq-cli"; - rev = "e6d18352c5874364a7bbb65ad41a198838d907ed"; - hash = "sha256-gT9vxz4oAtoatG8dUDJbr60yyKhglFrxNe1SQMKilb8="; + rev = "7790e52a6d3c0f6fbaf45f581f0fb98f78247af6"; + hash = "sha256-lRvjSOhEAur8dhrtpGb89BMD3o6/E1aJjyp+G4xZDnQ="; }; build-system = with python3Packages; [ From 132a1fa12c826ea6c2756d1e6c36abfdd07a8e59 Mon Sep 17 00:00:00 2001 From: Alexander Kjeldaas Date: Wed, 16 Apr 2025 19:33:47 +0200 Subject: [PATCH 56/79] aider-chat: 0.81.3 -> 0.82.0 --- pkgs/development/python-modules/aider-chat/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/aider-chat/default.nix b/pkgs/development/python-modules/aider-chat/default.nix index 4b82adfc134e..3b3428e8f0b6 100644 --- a/pkgs/development/python-modules/aider-chat/default.nix +++ b/pkgs/development/python-modules/aider-chat/default.nix @@ -124,7 +124,7 @@ let ]; }; - version = "0.81.3"; + version = "0.82.0"; aider-chat = buildPythonPackage { pname = "aider-chat"; inherit version; @@ -137,7 +137,7 @@ let owner = "Aider-AI"; repo = "aider"; tag = "v${version}"; - hash = "sha256-azoH/AYNN65iYuPUuiEibq68ovdocyHowcbj7MGrOmg="; + hash = "sha256-UlPYUYAYDhPPgoIvEWRLYjCe3iQ2ltH5mT3GkX+IrGI="; }; pythonRelaxDeps = true; From c6700eedca5516deb0cbd1af46beaa39a0bf41e4 Mon Sep 17 00:00:00 2001 From: DataHearth Date: Mon, 13 Jan 2025 19:03:34 +0100 Subject: [PATCH 57/79] beatprints: init at 1.1.4 --- pkgs/by-name/be/beatprints/package.nix | 51 ++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 pkgs/by-name/be/beatprints/package.nix diff --git a/pkgs/by-name/be/beatprints/package.nix b/pkgs/by-name/be/beatprints/package.nix new file mode 100644 index 000000000000..90e90c64d91e --- /dev/null +++ b/pkgs/by-name/be/beatprints/package.nix @@ -0,0 +1,51 @@ +{ + lib, + python3Packages, + fetchFromGitHub, +}: +python3Packages.buildPythonApplication rec { + pname = "BeatPrints"; + version = "1.1.4"; + pyproject = true; + + src = fetchFromGitHub { + owner = "TrueMyst"; + repo = "BeatPrints"; + rev = "v${version}"; + hash = "sha256-HtYPEnHbJarSC3P337l3IGagk62FgEohSAVyv6PBnIs="; + }; + + build-system = with python3Packages; [ + poetry-core + ]; + + pythonRelaxDeps = [ + "Pillow" + "rich" + ]; + + dependencies = with python3Packages; [ + requests + pylette + lrclibapi + fonttools + questionary + rich + toml + pillow + spotipy + ]; + + meta = with lib; { + description = "Create eye-catching, Pinterest-style music posters effortlessly"; + longDescription = '' + Create eye-catching, Pinterest-style music posters effortlessly. BeatPrints integrates with Spotify and LRClib API to help you design custom posters for your favorite tracks or albums. 🍀 + ''; + homepage = "https://beatprints.readthedocs.io"; + changelog = "https://github.com/TrueMyst/BeatPrints/releases/tag/v${version}"; + mainProgram = "beatprints"; + license = licenses.cc-by-nc-sa-40; + maintainers = with maintainers; [ DataHearth ]; + platforms = platforms.all; + }; +} From dcea429398ce3550942cd3da5104c733bffbe0ed Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 16 Apr 2025 18:03:26 +0000 Subject: [PATCH 58/79] clickable: 8.3.0 -> 8.3.1 --- pkgs/by-name/cl/clickable/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/cl/clickable/package.nix b/pkgs/by-name/cl/clickable/package.nix index 741103455c39..ba25c7e69d2d 100644 --- a/pkgs/by-name/cl/clickable/package.nix +++ b/pkgs/by-name/cl/clickable/package.nix @@ -8,13 +8,13 @@ python3Packages.buildPythonApplication rec { pname = "clickable"; - version = "8.3.0"; + version = "8.3.1"; src = fetchFromGitLab { owner = "clickable"; repo = "clickable"; rev = "v${version}"; - hash = "sha256-5fymmsZUYwB+wc1X7Y1HwwJbGRjQPwkk9JLTxnfH8fo="; + hash = "sha256-Vn2PyALaRrE+jJRdZzW+jjCm3f2GfpgrQcFGB7kr4EM="; }; propagatedBuildInputs = with python3Packages; [ From c9c16bf61a1b311cc79facccf0ff1a5f0247e9ee Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 16 Apr 2025 18:32:22 +0000 Subject: [PATCH 59/79] knowsmore: 0.1.43 -> 0.1.44 --- pkgs/by-name/kn/knowsmore/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/kn/knowsmore/package.nix b/pkgs/by-name/kn/knowsmore/package.nix index cba831dbe077..98e2ada7938d 100644 --- a/pkgs/by-name/kn/knowsmore/package.nix +++ b/pkgs/by-name/kn/knowsmore/package.nix @@ -6,14 +6,14 @@ python3.pkgs.buildPythonApplication rec { pname = "knowsmore"; - version = "0.1.43"; + version = "0.1.44"; pyproject = true; src = fetchFromGitHub { owner = "helviojunior"; repo = "knowsmore"; tag = "v${version}"; - hash = "sha256-rLESaedhEHTMYVbITr3vjyE6urhwl/g1/iTMZ4ruE1c="; + hash = "sha256-m9rleUMQdBrgmeLcoFGIWRm4PKiwiEXONnIfFDxOrHs="; }; pythonRelaxDeps = [ @@ -50,7 +50,7 @@ python3.pkgs.buildPythonApplication rec { meta = with lib; { description = "Tool for pentesting Microsoft Active Directory"; homepage = "https://github.com/helviojunior/knowsmore"; - changelog = "https://github.com/helviojunior/knowsmore/releases/tag/v${version}"; + changelog = "https://github.com/helviojunior/knowsmore/releases/tag/${src.tag}"; license = licenses.gpl3Only; maintainers = with maintainers; [ fab ]; mainProgram = "knowsmore"; From b7c8e22ea3cf2219c71f9855174acce6e4647298 Mon Sep 17 00:00:00 2001 From: Gabe Venberg Date: Mon, 14 Apr 2025 11:42:08 +0200 Subject: [PATCH 60/79] nixos/restic-rest-server: add htpasswd-file setting in the restic rest-server, you can set the file to use in place of $datadir/.htpasswd with the --htpasswd-file option. However, this was unusable from the module with extraConfig, due to systemd hardening. Adding a dedicated option fixes this. --- nixos/modules/services/backup/restic-rest-server.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/nixos/modules/services/backup/restic-rest-server.nix b/nixos/modules/services/backup/restic-rest-server.nix index 5850b17e9cb7..2f82c406c415 100644 --- a/nixos/modules/services/backup/restic-rest-server.nix +++ b/nixos/modules/services/backup/restic-rest-server.nix @@ -36,6 +36,12 @@ in ''; }; + htpasswd-file = lib.mkOption { + default = null; + type = lib.types.nullOr lib.types.path; + description = "The path to the servers .htpasswd file. Defaults to {dataDir}/htpasswd."; + }; + privateRepos = lib.mkOption { default = false; type = lib.types.bool; @@ -84,6 +90,7 @@ in ExecStart = '' ${cfg.package}/bin/rest-server \ --path ${cfg.dataDir} \ + --htpasswd-file ${cfg.htpasswd-file} \ ${lib.optionalString cfg.appendOnly "--append-only"} \ ${lib.optionalString cfg.privateRepos "--private-repos"} \ ${lib.optionalString cfg.prometheus "--prometheus"} \ @@ -112,6 +119,7 @@ in ProtectControlGroups = true; PrivateDevices = true; ReadWritePaths = [ cfg.dataDir ]; + ReadOnlyPaths = [ cfg.htpasswd-file ]; RemoveIPC = true; RestrictAddressFamilies = "none"; RestrictNamespaces = true; From fccc4247d7c92293d477b72c5e3de6041c0b6727 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 16 Apr 2025 18:44:56 +0000 Subject: [PATCH 61/79] tmux-mem-cpu-load: 3.8.1 -> 3.8.2 --- pkgs/by-name/tm/tmux-mem-cpu-load/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/tm/tmux-mem-cpu-load/package.nix b/pkgs/by-name/tm/tmux-mem-cpu-load/package.nix index 53fdc8e1be0f..9de391ab6e8c 100644 --- a/pkgs/by-name/tm/tmux-mem-cpu-load/package.nix +++ b/pkgs/by-name/tm/tmux-mem-cpu-load/package.nix @@ -7,13 +7,13 @@ stdenv.mkDerivation rec { pname = "tmux-mem-cpu-load"; - version = "3.8.1"; + version = "3.8.2"; src = fetchFromGitHub { owner = "thewtex"; repo = "tmux-mem-cpu-load"; rev = "v${version}"; - sha256 = "sha256-8QUcEbgk3DSsWt9TRHHtDhQ7a1hkK8RZEX+0d3h/c0w="; + sha256 = "sha256-g++6n6OD9FAw8CtXArKBgNwFf+3v+SBCHmbma7RpMBA="; }; nativeBuildInputs = [ cmake ]; From b991226d8719a935f73624b009c18454daa2a425 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 16 Apr 2025 18:45:47 +0000 Subject: [PATCH 62/79] tile38: 1.34.2 -> 1.34.3 --- pkgs/by-name/ti/tile38/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/ti/tile38/package.nix b/pkgs/by-name/ti/tile38/package.nix index 292199c15153..0768b620740d 100644 --- a/pkgs/by-name/ti/tile38/package.nix +++ b/pkgs/by-name/ti/tile38/package.nix @@ -6,13 +6,13 @@ buildGoModule rec { pname = "tile38"; - version = "1.34.2"; + version = "1.34.3"; src = fetchFromGitHub { owner = "tidwall"; repo = "tile38"; tag = version; - hash = "sha256-F6mSIKivRkqbuixWyl9EmUskHsiQyzNrEt1ONvDVKrg="; + hash = "sha256-0kBSMoHo6RD6NIP4fGXe3K5B+FLEN5BuphViwa6KLSg="; }; vendorHash = "sha256-SJ80FSoG8RhsReDmSX120bxzcgZ3cD3vNvWt/HiV3/w="; From a886e083ee205f1c438261a7e41fdfdb9b4739c3 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 16 Apr 2025 18:47:49 +0000 Subject: [PATCH 63/79] stylance-cli: 0.5.5 -> 0.6.0 --- pkgs/by-name/st/stylance-cli/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/st/stylance-cli/package.nix b/pkgs/by-name/st/stylance-cli/package.nix index c1b378d60a69..5e44efe1b338 100644 --- a/pkgs/by-name/st/stylance-cli/package.nix +++ b/pkgs/by-name/st/stylance-cli/package.nix @@ -5,15 +5,15 @@ }: rustPlatform.buildRustPackage rec { pname = "stylance-cli"; - version = "0.5.5"; + version = "0.6.0"; src = fetchCrate { inherit pname version; - hash = "sha256-/aTda9TOwC2spODMWQIaBzJJ17/8EoWIRZ7DjJE/ta4="; + hash = "sha256-uksDnxTBuzwpMDCO3HIg05IK1emba6BjbpN0TcWSOdQ="; }; useFetchCargoVendor = true; - cargoHash = "sha256-ZMIbNQMZ7uCYFSIX2NTGY/31V6e0QWHjZvVaA8Vv7IQ="; + cargoHash = "sha256-iSE6SmqYXg9IAMJOb4/q80w+J2OEVd7oyxRpWcCps9U="; meta = with lib; { description = "Library and cli tool for working with scoped CSS in rust"; From d8e9ce040227cc5d43ae501f34fb608a80b3c13d Mon Sep 17 00:00:00 2001 From: Paul Meyer Date: Fri, 11 Apr 2025 12:55:43 +0200 Subject: [PATCH 64/79] gofumpt: use finalAttrs, versionCheckHook Signed-off-by: Paul Meyer --- pkgs/by-name/go/gofumpt/package.nix | 32 +++++++++++++---------------- 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/pkgs/by-name/go/gofumpt/package.nix b/pkgs/by-name/go/gofumpt/package.nix index 7d9248cf9d73..13f35f5982b8 100644 --- a/pkgs/by-name/go/gofumpt/package.nix +++ b/pkgs/by-name/go/gofumpt/package.nix @@ -3,18 +3,17 @@ buildGoModule, fetchFromGitHub, nix-update-script, - testers, - gofumpt, + versionCheckHook, }: -buildGoModule rec { +buildGoModule (finalAttrs: { pname = "gofumpt"; version = "0.8.0"; src = fetchFromGitHub { owner = "mvdan"; - repo = pname; - rev = "v${version}"; + repo = "gofumpt"; + rev = "v${finalAttrs.version}"; hash = "sha256-37wYYB0k8mhQq30y1oo77qW3bIqqN/K/NG1RgxK6dyI="; }; @@ -24,7 +23,7 @@ buildGoModule rec { ldflags = [ "-s" - "-X main.version=v${version}" + "-X main.version=v${finalAttrs.version}" ]; checkFlags = [ @@ -32,23 +31,20 @@ buildGoModule rec { "-skip=^TestScript/diagnose$" ]; - passthru = { - updateScript = nix-update-script { }; - tests.version = testers.testVersion { - package = gofumpt; - version = "v${version}"; - }; - }; + doInstallCheck = true; + nativeInstallCheckInputs = [ versionCheckHook ]; - meta = with lib; { + passthru.updateScript = nix-update-script { }; + + meta = { description = "Stricter gofmt"; homepage = "https://github.com/mvdan/gofumpt"; - changelog = "https://github.com/mvdan/gofumpt/releases/tag/v${version}"; - license = licenses.bsd3; - maintainers = with maintainers; [ + changelog = "https://github.com/mvdan/gofumpt/releases/tag/v${finalAttrs.version}"; + license = lib.licenses.bsd3; + maintainers = with lib.maintainers; [ rvolosatovs katexochen ]; mainProgram = "gofumpt"; }; -} +}) From 4e91d57c4b9f9d6eee7d054dde14583f70f419ef Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 16 Apr 2025 19:18:18 +0000 Subject: [PATCH 65/79] nkeys: 0.4.10 -> 0.4.11 --- pkgs/by-name/nk/nkeys/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/nk/nkeys/package.nix b/pkgs/by-name/nk/nkeys/package.nix index 1272455703ea..9fa508349456 100644 --- a/pkgs/by-name/nk/nkeys/package.nix +++ b/pkgs/by-name/nk/nkeys/package.nix @@ -6,16 +6,16 @@ buildGoModule rec { pname = "nkeys"; - version = "0.4.10"; + version = "0.4.11"; src = fetchFromGitHub { owner = "nats-io"; repo = pname; tag = "v${version}"; - hash = "sha256-vSjIqeGWS9sDGyrPD11u4ngiZrW6gZfYd08kKXUDXdU="; + hash = "sha256-dSkIT+KW+hT/Rk3NSkrb5ABLLiGGz2dppr9rwhjLOnM="; }; - vendorHash = "sha256-TtplWIDLUsFXhT5OQVhW3KTfxh1MVY8Hssejy8GBYVQ="; + vendorHash = "sha256-89DGLTkt9c8jJhAX3Uo8BBtLcBbnYE0q4mCqq/RGXM4="; meta = with lib; { description = "Public-key signature system for NATS"; From 735edf86a70198b0a056f5b04b33d3d5377a8ae0 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 16 Apr 2025 19:25:02 +0000 Subject: [PATCH 66/79] lokalise2-cli: 3.1.2 -> 3.1.3 --- pkgs/by-name/lo/lokalise2-cli/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/lo/lokalise2-cli/package.nix b/pkgs/by-name/lo/lokalise2-cli/package.nix index 32cfb4202228..20bb285a13ad 100644 --- a/pkgs/by-name/lo/lokalise2-cli/package.nix +++ b/pkgs/by-name/lo/lokalise2-cli/package.nix @@ -6,13 +6,13 @@ buildGoModule rec { pname = "lokalise2-cli"; - version = "3.1.2"; + version = "3.1.3"; src = fetchFromGitHub { owner = "lokalise"; repo = "lokalise-cli-2-go"; rev = "v${version}"; - sha256 = "sha256-R8vzHuWkNznq/eeXUVHm9SJJmRV2B2WXKQFEHil+HiY="; + sha256 = "sha256-9d5rlVyGPLNzlKzGq/XJleiKvLtkE0AttIiH6NYUwFo="; }; vendorHash = "sha256-thD8NtG9uVI4KwNQiNsVCUdyUcgAmnr+szsUQ2Ika1c="; From ae03c978efbc546779f83b997935295c48347894 Mon Sep 17 00:00:00 2001 From: "Adam C. Stephens" Date: Wed, 16 Apr 2025 19:27:52 +0000 Subject: [PATCH 67/79] erlang_28: 28.0-rc2 -> 28.0-rc3 https://www.erlang.org/news/178 https://github.com/erlang/otp/releases/tag/OTP-28.0-rc3 --- pkgs/development/interpreters/erlang/28.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/interpreters/erlang/28.nix b/pkgs/development/interpreters/erlang/28.nix index 33915e1386c2..e9c1be187ca1 100644 --- a/pkgs/development/interpreters/erlang/28.nix +++ b/pkgs/development/interpreters/erlang/28.nix @@ -1,6 +1,6 @@ { mkDerivation }: mkDerivation { - version = "28.0-rc2"; - sha256 = "sha256-ENarmypS1rs6gG7e0/WOC9p/jabwrjbj/u1rFeWDHck="; + version = "28.0-rc3"; + sha256 = "sha256-ky0vjMi028tVJwLs5dw8Nx2w1/v763fEemxJL0WPRIA="; } From c94c1e6049c51e4c532330fcb01a6fa7eb123d74 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 16 Apr 2025 19:33:12 +0000 Subject: [PATCH 68/79] kaf: 0.2.11 -> 0.2.13 --- pkgs/by-name/ka/kaf/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/ka/kaf/package.nix b/pkgs/by-name/ka/kaf/package.nix index 697d6ca51305..34a542b8ac3a 100644 --- a/pkgs/by-name/ka/kaf/package.nix +++ b/pkgs/by-name/ka/kaf/package.nix @@ -6,13 +6,13 @@ buildGoModule rec { pname = "kaf"; - version = "0.2.11"; + version = "0.2.13"; src = fetchFromGitHub { owner = "birdayz"; repo = "kaf"; rev = "v${version}"; - hash = "sha256-SKQg3BCwvVwjZUkTjrMlSrfa8tu2VC8+ckMZpBJhnZE="; + hash = "sha256-tjHRIbTJJ8HPp2Jk7R2rl+ZN+ie6xRlssx4clcGc4U4="; }; vendorHash = "sha256-1QcQeeYQFsStK27NVdyCAb1Y40lyifBf0dlSgzocG3Y="; From 440bbbd341de4dfee35de66ddb8d01a0636f0ce1 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 16 Apr 2025 19:38:06 +0000 Subject: [PATCH 69/79] python312Packages.bytecode: 0.16.1 -> 0.16.2 --- pkgs/development/python-modules/bytecode/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/bytecode/default.nix b/pkgs/development/python-modules/bytecode/default.nix index 6a5cc4839add..e437fcefe215 100644 --- a/pkgs/development/python-modules/bytecode/default.nix +++ b/pkgs/development/python-modules/bytecode/default.nix @@ -9,7 +9,7 @@ buildPythonPackage rec { pname = "bytecode"; - version = "0.16.1"; + version = "0.16.2"; format = "pyproject"; disabled = pythonOlder "3.6"; @@ -17,7 +17,7 @@ buildPythonPackage rec { owner = "vstinner"; repo = pname; tag = version; - hash = "sha256-ckakH+H4h2Iwl4tkUpnVV23dkKP9Q7I86oygxfHkXU8="; + hash = "sha256-74qEwAYHXV4HakJQ05A9K7LuO0xP28Hub6no09KO4r4="; }; nativeBuildInputs = [ setuptools-scm ]; From 7512018a46a9f4fe7dd6cfcf8db2e3f7d1488ca6 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 16 Apr 2025 19:39:43 +0000 Subject: [PATCH 70/79] hobbits: 0.54.1 -> 0.55.0 --- pkgs/tools/graphics/hobbits/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/graphics/hobbits/default.nix b/pkgs/tools/graphics/hobbits/default.nix index 6a429f9e7065..8ffbf9a6084e 100644 --- a/pkgs/tools/graphics/hobbits/default.nix +++ b/pkgs/tools/graphics/hobbits/default.nix @@ -14,13 +14,13 @@ stdenv.mkDerivation rec { pname = "hobbits"; - version = "0.54.1"; + version = "0.55.0"; src = fetchFromGitHub { owner = "Mahlet-Inc"; repo = "hobbits"; rev = "v${version}"; - hash = "sha256-SbSuw5e2ll/wU5UBV0MOlvCXb4rvPtsE4l8XzRbBiLI="; + hash = "sha256-W6QBLj+GkmM88cOVSIc1PLiVXysjv74J7citFW6SRDM="; }; postPatch = '' From 30876db20b68252b900ee77a622ac3d88ca881fb Mon Sep 17 00:00:00 2001 From: Malo Bourgon Date: Wed, 16 Apr 2025 15:59:14 -0400 Subject: [PATCH 71/79] codex: init at 0.1.04160940 --- pkgs/by-name/co/codex/package.nix | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 pkgs/by-name/co/codex/package.nix diff --git a/pkgs/by-name/co/codex/package.nix b/pkgs/by-name/co/codex/package.nix new file mode 100644 index 000000000000..0722fd537422 --- /dev/null +++ b/pkgs/by-name/co/codex/package.nix @@ -0,0 +1,29 @@ +{ + lib, + buildNpmPackage, + fetchFromGitHub, +}: + +buildNpmPackage rec { + pname = "codex"; + version = "0.1.04160940"; # from codex-cli/package.json + + src = fetchFromGitHub { + owner = "openai"; + repo = "codex"; + rev = "e8afebac157f2069fc7ae0e33fb44c85ebf48892"; + hash = "sha256-FW03PSmeyJPDPpWw4XEqKZQqEwjOV2VFVQWXmXBevYU="; + }; + + sourceRoot = "${src.name}/codex-cli"; + + npmDepsHash = "sha256-QdfO/p8oQnwIANeNRD0vD55v5lc9dHeaScpnpLqWdxc="; + + meta = { + description = "Lightweight coding agent that runs in your terminal"; + homepage = "https://github.com/openai/codex"; + license = lib.licenses.asl20; + maintainers = [ lib.maintainers.malo ]; + mainProgram = "codex"; + }; +} From 640b6763555a1211a7775eedf4e2a2891f5d9c61 Mon Sep 17 00:00:00 2001 From: Nikolay Korotkiy Date: Thu, 17 Apr 2025 00:27:56 +0400 Subject: [PATCH 72/79] hobbits: modernize --- pkgs/tools/graphics/hobbits/default.nix | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/pkgs/tools/graphics/hobbits/default.nix b/pkgs/tools/graphics/hobbits/default.nix index 8ffbf9a6084e..46b72e5b92d5 100644 --- a/pkgs/tools/graphics/hobbits/default.nix +++ b/pkgs/tools/graphics/hobbits/default.nix @@ -12,22 +12,22 @@ wrapQtAppsHook, }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "hobbits"; version = "0.55.0"; src = fetchFromGitHub { owner = "Mahlet-Inc"; repo = "hobbits"; - rev = "v${version}"; + tag = "v${finalAttrs.version}"; hash = "sha256-W6QBLj+GkmM88cOVSIc1PLiVXysjv74J7citFW6SRDM="; }; postPatch = '' substituteInPlace src/hobbits-core/settingsdata.cpp \ - --replace "pythonHome = \"/usr\"" "pythonHome = \"${python3}\"" + --replace-warn "pythonHome = \"/usr\"" "pythonHome = \"${python3}\"" substituteInPlace cmake/gitversion.cmake \ - --replace "[Mystery Build]" "${version}" + --replace-warn "[Mystery Build]" "${finalAttrs.version}" ''; buildInputs = [ @@ -43,15 +43,15 @@ stdenv.mkDerivation rec { wrapQtAppsHook ]; - cmakeFlags = [ "-DUSE_SYSTEM_PFFFT=ON" ]; + cmakeFlags = [ (lib.cmakeBool "USE_SYSTEM_PFFFT" true) ]; env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isAarch64 "-Wno-error=narrowing"; - meta = with lib; { + meta = { description = "Multi-platform GUI for bit-based analysis, processing, and visualization"; homepage = "https://github.com/Mahlet-Inc/hobbits"; - license = licenses.mit; - maintainers = with maintainers; [ sikmir ]; - platforms = platforms.linux; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ sikmir ]; + platforms = lib.platforms.linux; }; -} +}) From 6bc52f475d8a0f6a607245a39bea8f18aaca55d7 Mon Sep 17 00:00:00 2001 From: Nikolay Korotkiy Date: Thu, 17 Apr 2025 00:47:53 +0400 Subject: [PATCH 73/79] hobbits: migrate to by-name --- .../hobbits/default.nix => by-name/ho/hobbits/package.nix} | 5 ++--- pkgs/top-level/all-packages.nix | 2 -- 2 files changed, 2 insertions(+), 5 deletions(-) rename pkgs/{tools/graphics/hobbits/default.nix => by-name/ho/hobbits/package.nix} (95%) diff --git a/pkgs/tools/graphics/hobbits/default.nix b/pkgs/by-name/ho/hobbits/package.nix similarity index 95% rename from pkgs/tools/graphics/hobbits/default.nix rename to pkgs/by-name/ho/hobbits/package.nix index 46b72e5b92d5..40afc2fbbadc 100644 --- a/pkgs/tools/graphics/hobbits/default.nix +++ b/pkgs/by-name/ho/hobbits/package.nix @@ -1,7 +1,6 @@ { lib, stdenv, - mkDerivation, fetchFromGitHub, cmake, pkg-config, @@ -9,7 +8,7 @@ libpcap, libusb1, python3, - wrapQtAppsHook, + qt5, }: stdenv.mkDerivation (finalAttrs: { @@ -40,7 +39,7 @@ stdenv.mkDerivation (finalAttrs: { nativeBuildInputs = [ cmake pkg-config - wrapQtAppsHook + qt5.wrapQtAppsHook ]; cmakeFlags = [ (lib.cmakeBool "USE_SYSTEM_PFFFT" true) ]; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 74de04a60503..edb35316c35e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3810,8 +3810,6 @@ with pkgs; buildGoModule = buildGo123Module; }; - hobbits = libsForQt5.callPackage ../tools/graphics/hobbits { }; - highlight = callPackage ../tools/text/highlight { lua = lua5; }; From 806ff157c6e28622dce74eff5c9598c5da81e11d Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Wed, 16 Apr 2025 00:19:33 +0200 Subject: [PATCH 74/79] ferrishot: init at 0.1.0 --- pkgs/by-name/fe/ferrishot/package.nix | 72 +++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 pkgs/by-name/fe/ferrishot/package.nix diff --git a/pkgs/by-name/fe/ferrishot/package.nix b/pkgs/by-name/fe/ferrishot/package.nix new file mode 100644 index 000000000000..618813ba8b3d --- /dev/null +++ b/pkgs/by-name/fe/ferrishot/package.nix @@ -0,0 +1,72 @@ +{ + lib, + stdenv, + rustPlatform, + fetchFromGitHub, + makeBinaryWrapper, + writableTmpDirAsHomeHook, + libGL, + libX11, + libxkbcommon, + libxcb, + wayland, + nix-update-script, +}: + +rustPlatform.buildRustPackage (finalAttrs: { + pname = "ferrishot"; + version = "0.1.0"; + + src = fetchFromGitHub { + owner = "nik-rev"; + repo = "ferrishot"; + tag = "v${finalAttrs.version}"; + hash = "sha256-1jKwbhn85KcIQrSakWTIfxPso7VZuuvPrUbTCF1NerM="; + }; + + useFetchCargoVendor = true; + cargoHash = "sha256-NPReNHKOS4PQIt2lmY5w19lVHPDjznR9gv5vHDXyqaI="; + + nativeBuildInputs = + [ + makeBinaryWrapper + ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ + # error: unable to open output file '/homeless-shelter/.cache/clang/ModuleCache/354UBE8EJRBZ3/Cocoa-31YYBL2V1XGQP.pcm': 'No such file or directory' + writableTmpDirAsHomeHook + ]; + + buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ + libxcb + ]; + + postInstall = + let + runtimeDeps = + [ + libGL + ] + ++ lib.optionals stdenv.hostPlatform.isLinux [ + libX11 + libxkbcommon + wayland + ]; + in + '' + wrapProgram $out/bin/ferrishot \ + --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath runtimeDeps}" + ''; + + passthru = { + updateScript = nix-update-script { }; + }; + + meta = { + description = "Screenshot app written in Rust"; + homepage = "https://github.com/nik-rev/ferrishot"; + changelog = "https://github.com/nik-rev/ferrishot/blob/v${finalAttrs.version}/CHANGELOG.md"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ GaetanLepage ]; + mainProgram = "ferrishot"; + }; +}) From 18c9b4c18f4c6c38e99930879ee0b2275451e48f Mon Sep 17 00:00:00 2001 From: networkException Date: Thu, 17 Apr 2025 01:27:17 +0200 Subject: [PATCH 75/79] ungoogled-chromium: 135.0.7049.84-1 -> 135.0.7049.95-1 https://chromereleases.googleblog.com/2025/04/stable-channel-update-for-desktop_15.html This update includes 2 security fixes. CVEs: CVE-2025-3619 CVE-2025-3620 --- .../networking/browsers/chromium/info.json | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/pkgs/applications/networking/browsers/chromium/info.json b/pkgs/applications/networking/browsers/chromium/info.json index d3a5de070330..76ab98a318d7 100644 --- a/pkgs/applications/networking/browsers/chromium/info.json +++ b/pkgs/applications/networking/browsers/chromium/info.json @@ -787,7 +787,7 @@ } }, "ungoogled-chromium": { - "version": "135.0.7049.84", + "version": "135.0.7049.95", "deps": { "depot_tools": { "rev": "85ec2718b5a29990c7eb67778348c9f76a00f392", @@ -798,16 +798,16 @@ "hash": "sha256-8NynNvLNCHxy8EYmsnPovKhXu9DcDcYBhg4A6d2QIfY=" }, "ungoogled-patches": { - "rev": "135.0.7049.84-1", - "hash": "sha256-Cncp+sLFWC8nuepXCbkeHZYgAw2cFIAIaQe9wgun/AA=" + "rev": "135.0.7049.95-1", + "hash": "sha256-kLLtJti5GIF9TT0cH8zvsxywJzD22X8u2bB/tqENSjo=" }, "npmHash": "sha256-wNrZaugdKJCyV1WchkKXzr/I1OW1AtjiC2p7qTZZOqU=" }, "DEPS": { "src": { "url": "https://chromium.googlesource.com/chromium/src.git", - "rev": "6c019e56001911b3fd467e03bf68c435924d62f4", - "hash": "sha256-BFw1o2cIHBeBudeigH6YTOuLGsp/+pTOeE1lXBO3aio=", + "rev": "de2eb485a1951079e63bdb57ce25544d2dc79c15", + "hash": "sha256-6ydyJWsDawt0bfYAFHotTB9ujmIYsqUUpNwB6q6RNQE=", "recompress": true }, "src/third_party/clang-format/script": { @@ -1352,8 +1352,8 @@ }, "src/third_party/pdfium": { "url": "https://pdfium.googlesource.com/pdfium.git", - "rev": "9afffebfa895ea6cdcc05516908c50bd7fe72797", - "hash": "sha256-89rJdhwUJtJCMO7FvVoTYO80swFRkoWUB/ZYs1tOLzE=" + "rev": "2919d07ee57020e3e4b66cce45c61104d80304d2", + "hash": "sha256-zE6a0R8NZ3SE0bHwPan3dTh5kmq5JmYTbDQIvyNICeg=" }, "src/third_party/perfetto": { "url": "https://android.googlesource.com/platform/external/perfetto.git", @@ -1402,8 +1402,8 @@ }, "src/third_party/skia": { "url": "https://skia.googlesource.com/skia.git", - "rev": "6e445bdea696eb6b6a46681dfc1a63edaa517edb", - "hash": "sha256-mSup6nKsEPjJ/HBV7PwjBI4PP7/RdwFm/dnavKeRqzI=" + "rev": "5a44cdd70f04aa65fa063caa1a7e3028d75236f8", + "hash": "sha256-QX3b+S0IuxJKmlMudL6420+bXRhDkWYC7GNRKxKNm8A=" }, "src/third_party/smhasher/src": { "url": "https://chromium.googlesource.com/external/smhasher.git", From 4d9f9647949702bbc3245eac7533c184be5b9011 Mon Sep 17 00:00:00 2001 From: Pol Dellaiera Date: Thu, 10 Apr 2025 10:32:38 +0200 Subject: [PATCH 76/79] markdown-code-runner: init at 0-unstable-2025-04-13 --- .../ma/markdown-code-runner/package.nix | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 pkgs/by-name/ma/markdown-code-runner/package.nix diff --git a/pkgs/by-name/ma/markdown-code-runner/package.nix b/pkgs/by-name/ma/markdown-code-runner/package.nix new file mode 100644 index 000000000000..8bae1623ec9b --- /dev/null +++ b/pkgs/by-name/ma/markdown-code-runner/package.nix @@ -0,0 +1,46 @@ +{ + lib, + fetchFromGitHub, + rustPlatform, +}: + +rustPlatform.buildRustPackage { + pname = "markdown-code-runner"; + version = "0-unstable-2025-04-13"; + + src = fetchFromGitHub { + owner = "drupol"; + repo = "markdown-code-runner"; + rev = "b39cdf8990e1a25adc958f58e87a12544724ca9d"; + hash = "sha256-JvsxS+qRrYzWzPlrCAccaPYPROGULCh1Gs5RAlL7dBo="; + }; + + cargoHash = "sha256-JVbBigWKramdtQR9VPRY777vODOw7Fkz+kyNPSnSCJg="; + dontUseCargoParallelTests = true; + + checkFlags = [ + # Flaky tests + "--skip=test_check_mode_detects_differences" + "--skip=test_check_mode_no_changes_returns_zero" + "--skip=test_dry_run_allows_command_failure" + "--skip=test_dry_run_does_not_fail_on_error" + "--skip=test_dry_run_outputs_warning_but_does_not_write" + ]; + + meta = { + description = "A configurable Markdown code runner that executes and optionally replaces code blocks using external commands"; + longDescription = '' + markdown-code-runner is a command-line tool that scans Markdown files for fenced code blocks, + executes them using per-language configuration, and optionally replaces the block content + with the command output. + + It is useful for documentation that stays in sync with linters, formatters, or scripts. + The tool supports placeholder substitution, configurable replace/check modes, and CI-friendly validation. + ''; + homepage = "https://github.com/drupol/markdown-code-runner"; + license = lib.licenses.eupl12; + mainProgram = "mdcr"; + maintainers = with lib.maintainers; [ drupol ]; + platforms = lib.platforms.all; + }; +} From 58cdd4e315e3eec80ea70b2772bcd3694b0ca64f Mon Sep 17 00:00:00 2001 From: Pol Dellaiera Date: Fri, 11 Apr 2025 09:31:45 +0200 Subject: [PATCH 77/79] {nixpkgs-manual, nixos-manual}: add new test `check-nix-code-blocks` --- doc/doc-support/package.nix | 7 ++++++- doc/tests/check-nix-code-blocks.nix | 32 +++++++++++++++++++++++++++++ doc/tests/mdcr-config.toml | 3 +++ 3 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 doc/tests/check-nix-code-blocks.nix create mode 100644 doc/tests/mdcr-config.toml diff --git a/doc/doc-support/package.nix b/doc/doc-support/package.nix index f316656a585c..dfe7a3c4cc9b 100644 --- a/doc/doc-support/package.nix +++ b/doc/doc-support/package.nix @@ -12,6 +12,7 @@ nixos-render-docs-redirects, writeShellScriptBin, nixpkgs ? { }, + markdown-code-runner, }: stdenvNoCC.mkDerivation ( @@ -119,10 +120,14 @@ stdenvNoCC.mkDerivation ( packages = [ devmode' nixos-render-docs-redirects' + markdown-code-runner ]; }; - tests.manpage-urls = callPackage ../tests/manpage-urls.nix { }; + tests = { + manpage-urls = callPackage ../tests/manpage-urls.nix { }; + check-nix-code-blocks = callPackage ../tests/check-nix-code-blocks.nix { }; + }; }; } ) diff --git a/doc/tests/check-nix-code-blocks.nix b/doc/tests/check-nix-code-blocks.nix new file mode 100644 index 000000000000..5ec934f6bba8 --- /dev/null +++ b/doc/tests/check-nix-code-blocks.nix @@ -0,0 +1,32 @@ +{ + runCommand, + markdown-code-runner, + nixfmt-rfc-style, +}: + +runCommand "manual_check-nix-code-blocks" + { + nativeBuildInputs = [ + markdown-code-runner + nixfmt-rfc-style + ]; + } + '' + set +e + + mdcr --check --config ${./mdcr-config.toml} ${./..} + + if [ $? -ne 0 ]; then + cat < Date: Tue, 8 Apr 2025 17:36:13 +0200 Subject: [PATCH 78/79] doc: fix various `nix` snippets --- doc/build-helpers/dev-shell-tools.chapter.md | 14 +++++----- .../special/makesetuphook.section.md | 4 +-- doc/hooks/memcached-test-hook.section.md | 10 ++++--- doc/hooks/redis-test-hook.section.md | 10 ++++--- doc/languages-frameworks/android.section.md | 6 ++++ doc/languages-frameworks/astal.section.md | 8 ++++-- doc/languages-frameworks/factor.section.md | 2 +- .../javascript.section.md | 28 +++++++++++++------ doc/languages-frameworks/maven.section.md | 4 +-- doc/languages-frameworks/neovim.section.md | 8 ++++++ 10 files changed, 64 insertions(+), 30 deletions(-) diff --git a/doc/build-helpers/dev-shell-tools.chapter.md b/doc/build-helpers/dev-shell-tools.chapter.md index 0168ea39f7aa..bfaeab0fee1b 100644 --- a/doc/build-helpers/dev-shell-tools.chapter.md +++ b/doc/build-helpers/dev-shell-tools.chapter.md @@ -20,12 +20,12 @@ Converts Nix values to strings in the way the [`derivation` built-in function](h ```nix devShellTools.valueToString (builtins.toFile "foo" "bar") -=> "/nix/store/...-foo" +# => "/nix/store/...-foo" ``` ```nix devShellTools.valueToString false -=> "" +# => "" ``` ::: @@ -47,11 +47,11 @@ devShellTools.unstructuredDerivationInputEnv { args = [ "-c" "${./builder.sh}" ]; }; } -=> { - name = "foo"; - buildInputs = "/nix/store/...-hello /nix/store/...-figlet"; - builder = "/nix/store/...-bash"; -} +# => { +# name = "foo"; +# buildInputs = "/nix/store/...-hello /nix/store/...-figlet"; +# builder = "/nix/store/...-bash"; +#} ``` Note that `args` is not included, because Nix does not added it to the builder process environment. diff --git a/doc/build-helpers/special/makesetuphook.section.md b/doc/build-helpers/special/makesetuphook.section.md index 179d8d456372..7b83653296eb 100644 --- a/doc/build-helpers/special/makesetuphook.section.md +++ b/doc/build-helpers/special/makesetuphook.section.md @@ -9,7 +9,7 @@ pkgs.makeSetupHook { name = "something-hook"; propagatedBuildInputs = [ pkgs.commandsomething ]; depsTargetTargetPropagated = [ pkgs.libsomething ]; -} ./script.sh; +} ./script.sh ``` ### setup hook that depends on the hello package and runs hello and @shell@ is substituted with path to bash {#sec-pkgs.makeSetupHook-usage-example} @@ -42,7 +42,7 @@ pkgs.makeSetupHook } preConfigureHooks+=(_printHelloHook) '' - ); + ) ``` ## Attributes {#sec-pkgs.makeSetupHook-attributes} diff --git a/doc/hooks/memcached-test-hook.section.md b/doc/hooks/memcached-test-hook.section.md index 6820cec20a1c..03fc91ab4bf0 100644 --- a/doc/hooks/memcached-test-hook.section.md +++ b/doc/hooks/memcached-test-hook.section.md @@ -20,13 +20,15 @@ stdenv.mkDerivation { If you use a custom `checkPhase`, remember to add the `runHook` calls: ```nix - checkPhase '' +{ + checkPhase = '' runHook preCheck # ... your tests runHook postCheck - '' + ''; +} ``` ## Variables {#sec-memcachedTestHook-variables} @@ -48,6 +50,6 @@ stdenv.mkDerivation { ]; preCheck = '' - memcachedTestPort=1234 - '' + memcachedTestPort=1234; + ''; } diff --git a/doc/hooks/redis-test-hook.section.md b/doc/hooks/redis-test-hook.section.md index b14d29801a0e..c01f6c33f44a 100644 --- a/doc/hooks/redis-test-hook.section.md +++ b/doc/hooks/redis-test-hook.section.md @@ -21,13 +21,15 @@ stdenv.mkDerivation { If you use a custom `checkPhase`, remember to add the `runHook` calls: ```nix - checkPhase '' +{ + checkPhase = '' runHook preCheck # ... your tests runHook postCheck - '' + ''; +} ``` ## Variables {#sec-redisTestHook-variables} @@ -55,6 +57,6 @@ stdenv.mkDerivation { ]; preCheck = '' - redisTestPort=6390 - '' + redisTestPort=6390; + ''; } diff --git a/doc/languages-frameworks/android.section.md b/doc/languages-frameworks/android.section.md index b640ba8d5011..95800f95351a 100644 --- a/doc/languages-frameworks/android.section.md +++ b/doc/languages-frameworks/android.section.md @@ -8,23 +8,29 @@ supporting features. Use the `android-studio-full` attribute for a very complete Android SDK, including system images: ```nix +{ buildInputs = [ android-studio-full ]; +} ``` This is identical to: ```nix +{ buildInputs = [ androidStudioPackages.stable.full ]; +} ``` Alternatively, you can pass composeAndroidPackages to the `withSdk` passthru: ```nix +{ buildInputs = [ (android-studio.withSdk (androidenv.composeAndroidPackages { includeNDK = true; }).androidsdk) ]; +} ``` These will export `ANDROID_SDK_ROOT` and `ANDROID_NDK_ROOT` to the SDK and NDK directories diff --git a/doc/languages-frameworks/astal.section.md b/doc/languages-frameworks/astal.section.md index 34022b9c5850..9b2d59a1c009 100644 --- a/doc/languages-frameworks/astal.section.md +++ b/doc/languages-frameworks/astal.section.md @@ -11,7 +11,9 @@ ags.bundle { pname = "hyprpanel"; version = "1.0.0"; - src = fetchFromGitHub { ... }; + src = fetchFromGitHub { + #... + }; # change your entry file (default is `app.ts`) entry = "app.ts"; @@ -32,7 +34,9 @@ ags.bundle { # GTK 4 support is opt-in enableGtk4 = true; - meta = { ... }; + meta = { + #... + }; } ``` diff --git a/doc/languages-frameworks/factor.section.md b/doc/languages-frameworks/factor.section.md index 62db50e1ff6a..0d67eede4d34 100644 --- a/doc/languages-frameworks/factor.section.md +++ b/doc/languages-frameworks/factor.section.md @@ -125,7 +125,7 @@ factorPackages.buildFactorApplication (finalAttrs: { version = "1.0"; src = fetchurl { - url = "https://some-forge.org/foo-${finalAttrs.version}.tar.gz" + url = "https://some-forge.org/foo-${finalAttrs.version}.tar.gz"; }; }) ``` diff --git a/doc/languages-frameworks/javascript.section.md b/doc/languages-frameworks/javascript.section.md index 9acfd4181108..655f5f9db435 100644 --- a/doc/languages-frameworks/javascript.section.md +++ b/doc/languages-frameworks/javascript.section.md @@ -323,7 +323,7 @@ buildNpmPackage { npmRoot = ./.; fetcherOpts = { # Pass 'curlOptsList' to 'pkgs.fetchurl' while fetching 'axios' - { "node_modules/axios" = { curlOptsList = [ "--verbose" ]; }; } + "node_modules/axios" = { curlOptsList = [ "--verbose" ]; }; }; }; @@ -410,7 +410,9 @@ stdenv.mkDerivation (finalAttrs: { pname = "foo"; version = "0-unstable-1980-01-01"; - src = ...; + src = { + #... + }; nativeBuildInputs = [ nodejs @@ -439,7 +441,9 @@ stdenv.mkDerivation (finalAttrs: { pname = "foo"; version = "0-unstable-1980-01-01"; - src = ...; + src = { + # ... + }; pnpmInstallFlags = [ "--shamefully-hoist" ]; @@ -466,14 +470,16 @@ Assuming the following directory structure, we can define `sourceRoot` and `pnpm ``` ```nix - ... +{ + # ... pnpmDeps = pnpm.fetchDeps { - ... + # ... sourceRoot = "${finalAttrs.src.name}/frontend"; }; # by default the working directory is the extracted source pnpmRoot = "frontend"; +} ``` #### PNPM Workspaces {#javascript-pnpm-workspaces} @@ -484,11 +490,13 @@ which will make PNPM only install dependencies for those workspace packages. For example: ```nix -... +{ +# ... pnpmWorkspaces = [ "@astrojs/language-server" ]; pnpmDeps = pnpm.fetchDeps { inherit (finalAttrs) pnpmWorkspaces; - ... + #... +}; } ``` @@ -498,6 +506,7 @@ Note that you do not need to set `sourceRoot` to make this work. Usually in such cases, you'd want to use `pnpm --filter= build` to build your project, as `npmHooks.npmBuildHook` probably won't work. A `buildPhase` based on the following example will probably fit most workspace projects: ```nix +{ buildPhase = '' runHook preBuild @@ -505,6 +514,7 @@ buildPhase = '' runHook postBuild ''; +} ``` #### Additional PNPM Commands and settings {#javascript-pnpm-extraCommands} @@ -513,13 +523,15 @@ If you require setting an additional PNPM configuration setting (such as `dedupe set `prePnpmInstall` to the right commands to run. For example: ```nix +{ prePnpmInstall = '' pnpm config set dedupe-peer-dependants false ''; pnpmDeps = pnpm.fetchDeps { inherit (finalAttrs) prePnpmInstall; - ... + # ... }; +} ``` In this example, `prePnpmInstall` will be run by both `pnpm.configHook` and by the `pnpm.fetchDeps` builder. diff --git a/doc/languages-frameworks/maven.section.md b/doc/languages-frameworks/maven.section.md index 88fe4d0c9224..548e2162484d 100644 --- a/doc/languages-frameworks/maven.section.md +++ b/doc/languages-frameworks/maven.section.md @@ -91,7 +91,7 @@ jd-cli.overrideMavenAttrs (old: rec { # old mvnHash of 1.2.0 maven dependencies mvnHash = "sha256-N9XC1pg6Y4sUiBWIQUf16QSXCuiAPpXEHGlgApviF4I="; -}); +}) ``` ::: @@ -129,7 +129,7 @@ maven.buildMavenPackage rec { "org.apache.maven.surefire:surefire-junit-platform:3.1.2" "org.junit.platform:junit-platform-launcher:1.10.0" ]; -}; +} ``` ::: diff --git a/doc/languages-frameworks/neovim.section.md b/doc/languages-frameworks/neovim.section.md index 1c58170e3fe6..5e2cc00c43d6 100644 --- a/doc/languages-frameworks/neovim.section.md +++ b/doc/languages-frameworks/neovim.section.md @@ -116,9 +116,11 @@ top-level while luarocks installs them in various subfolders by default. For instance: ```nix +{ rtp-nvim = neovimUtils.buildNeovimPlugin { luaAttr = luaPackages.rtp-nvim; }; +} ``` To update these packages, you should use the lua updater rather than vim's. @@ -164,16 +166,19 @@ The check hook will fail the build if any modules cannot be loaded. This encoura To only check a specific module, add it manually to the plugin definition [overrides](https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/editors/vim/plugins/overrides.nix). ```nix +{ gitsigns-nvim = super.gitsigns-nvim.overrideAttrs { dependencies = [ self.plenary-nvim ]; nvimRequireCheck = "gitsigns"; }; +} ``` Some plugins will have lua modules that require a user configuration to function properly or can contain optional lua modules that we dont want to test requiring. We can skip specific modules using `nvimSkipModules`. Similar to `nvimRequireCheck`, it accepts a list of strings. - `nvimSkipModules = [ MODULE1 MODULE2 ];` ```nix +{ asyncrun-vim = super.asyncrun-vim.overrideAttrs { nvimSkipModules = [ # vim plugin with optional toggleterm integration @@ -181,14 +186,17 @@ We can skip specific modules using `nvimSkipModules`. Similar to `nvimRequireChe "asyncrun.toggleterm2" ]; }; +} ``` In rare cases, we might not want to actually test loading lua modules for a plugin. In those cases, we can disable `neovimRequireCheck` with `doCheck = false;`. This can be manually added through plugin definition overrides in the [overrides.nix](https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/editors/vim/plugins/overrides.nix). ```nix +{ vim-test = super.vim-test.overrideAttrs { # Vim plugin with a test lua file doCheck = false; }; +} ``` From bcea0cf344ac5040a47a5bda4f4cec2ff3d164f6 Mon Sep 17 00:00:00 2001 From: Pol Dellaiera Date: Fri, 11 Apr 2025 09:36:54 +0200 Subject: [PATCH 79/79] doc: update Nix code snippets format Command: `mdcr --config doc/tests/mdcr-config.toml doc/` --- doc/build-helpers/dev-shell-tools.chapter.md | 15 +- doc/build-helpers/fetchers.chapter.md | 17 +- .../images/appimagetools.section.md | 9 +- .../images/binarycache.section.md | 2 +- .../images/dockertools.section.md | 42 +- .../images/makediskimage.section.md | 67 +-- doc/build-helpers/images/ocitools.section.md | 6 +- .../images/portableservice.section.md | 20 +- .../special/checkpoint-build.section.md | 7 +- doc/build-helpers/special/fakenss.section.md | 15 +- .../special/fhs-environments.section.md | 33 +- doc/build-helpers/special/mkshell.section.md | 9 +- doc/build-helpers/special/vm-tools.section.md | 49 ++- doc/build-helpers/testers.chapter.md | 104 +++-- .../trivial-build-helpers.chapter.md | 141 ++++--- doc/functions/generators.section.md | 20 +- doc/functions/nix-gitignore.section.md | 23 +- doc/functions/prefer-remote-fetch.section.md | 3 +- doc/hooks/mpi-check-hook.section.md | 16 +- doc/hooks/patch-rc-path-hooks.section.md | 14 +- doc/hooks/postgresql-test-hook.section.md | 16 +- doc/hooks/redis-test-hook.section.md | 9 +- doc/hooks/versionCheckHook.section.md | 2 +- doc/hooks/zig.section.md | 7 +- doc/interoperability/cyclonedx.md | 16 +- doc/languages-frameworks/agda.section.md | 20 +- doc/languages-frameworks/android.section.md | 40 +- doc/languages-frameworks/beam.section.md | 100 +++-- doc/languages-frameworks/bower.section.md | 25 +- doc/languages-frameworks/chicken.section.md | 20 +- doc/languages-frameworks/coq.section.md | 97 +++-- doc/languages-frameworks/crystal.section.md | 9 +- doc/languages-frameworks/cuda.section.md | 26 +- doc/languages-frameworks/cuelang.section.md | 26 +- doc/languages-frameworks/dart.section.md | 8 +- doc/languages-frameworks/dhall.section.md | 15 +- doc/languages-frameworks/dotnet.section.md | 31 +- .../emscripten.section.md | 112 ++--- doc/languages-frameworks/gnome.section.md | 7 +- doc/languages-frameworks/gradle.section.md | 16 +- doc/languages-frameworks/hare.section.md | 3 +- doc/languages-frameworks/haskell.section.md | 162 +++---- doc/languages-frameworks/hy.section.md | 10 +- doc/languages-frameworks/idris.section.md | 35 +- doc/languages-frameworks/idris2.section.md | 57 ++- doc/languages-frameworks/ios.section.md | 8 +- doc/languages-frameworks/java.section.md | 11 +- .../javascript.section.md | 73 ++-- doc/languages-frameworks/julia.section.md | 5 +- doc/languages-frameworks/lisp.section.md | 19 +- doc/languages-frameworks/lua.section.md | 62 ++- doc/languages-frameworks/maven.section.md | 61 ++- doc/languages-frameworks/neovim.section.md | 8 +- doc/languages-frameworks/nim.section.md | 42 +- doc/languages-frameworks/ocaml.section.md | 43 +- doc/languages-frameworks/octave.section.md | 4 +- doc/languages-frameworks/perl.section.md | 24 +- doc/languages-frameworks/php.section.md | 139 +++--- .../pkg-config.section.md | 9 +- doc/languages-frameworks/python.section.md | 394 +++++++++++------- doc/languages-frameworks/qt.section.md | 8 +- doc/languages-frameworks/r.section.md | 56 ++- doc/languages-frameworks/ruby.section.md | 75 +++- doc/languages-frameworks/rust.section.md | 219 ++++++---- doc/languages-frameworks/swift.section.md | 13 +- doc/languages-frameworks/texlive.section.md | 92 ++-- doc/languages-frameworks/vim.section.md | 61 +-- doc/packages/cataclysm-dda.section.md | 80 ++-- doc/packages/citrix.section.md | 3 +- doc/packages/darwin-builder.section.md | 130 +++--- doc/packages/eclipse.section.md | 66 +-- doc/packages/emacs.section.md | 161 +++---- doc/packages/fish.section.md | 9 +- doc/packages/ibus.section.md | 13 +- doc/packages/krita.section.md | 2 +- doc/packages/python-tree-sitter.section.md | 14 +- doc/packages/urxvt.section.md | 36 +- doc/packages/weechat.section.md | 90 ++-- doc/stdenv/cross-compilation.chapter.md | 20 +- doc/stdenv/meta.chapter.md | 9 +- doc/stdenv/multiple-output.chapter.md | 7 +- doc/stdenv/passthru.chapter.md | 4 +- doc/stdenv/stdenv.chapter.md | 74 ++-- doc/using/configuration.chapter.md | 287 +++++++------ doc/using/overlays.chapter.md | 7 +- doc/using/overrides.chapter.md | 44 +- 86 files changed, 2485 insertions(+), 1478 deletions(-) diff --git a/doc/build-helpers/dev-shell-tools.chapter.md b/doc/build-helpers/dev-shell-tools.chapter.md index bfaeab0fee1b..12018cd76cee 100644 --- a/doc/build-helpers/dev-shell-tools.chapter.md +++ b/doc/build-helpers/dev-shell-tools.chapter.md @@ -42,9 +42,15 @@ This function does not support `__structuredAttrs`, but does support `passAsFile devShellTools.unstructuredDerivationInputEnv { drvAttrs = { name = "foo"; - buildInputs = [ hello figlet ]; + buildInputs = [ + hello + figlet + ]; builder = bash; - args = [ "-c" "${./builder.sh}" ]; + args = [ + "-c" + "${./builder.sh}" + ]; }; } # => { @@ -69,7 +75,10 @@ Takes the relevant parts of a derivation and returns a set of environment variab let pkg = hello; in -devShellTools.derivationOutputEnv { outputList = pkg.outputs; outputMap = pkg; } +devShellTools.derivationOutputEnv { + outputList = pkg.outputs; + outputMap = pkg; +} ``` ::: diff --git a/doc/build-helpers/fetchers.chapter.md b/doc/build-helpers/fetchers.chapter.md index fd7b41f64c70..cfd0730d031c 100644 --- a/doc/build-helpers/fetchers.chapter.md +++ b/doc/build-helpers/fetchers.chapter.md @@ -491,7 +491,11 @@ It might be useful to manipulate the content downloaded by `fetchurl` directly i In this example, we'll adapt [](#ex-fetchers-fetchurl-nixpkgs-version) to append the result of running the `hello` package to the contents we download, purely to illustrate how to manipulate the content. ```nix -{ fetchurl, hello, lib }: +{ + fetchurl, + hello, + lib, +}: fetchurl { url = "https://raw.githubusercontent.com/NixOS/nixpkgs/23.11/.version"; @@ -714,9 +718,10 @@ A wrapper around `fetchpatch`, which takes: Here is an example of `fetchDebianPatch` in action: ```nix -{ lib -, fetchDebianPatch -, buildPythonPackage +{ + lib, + fetchDebianPatch, + buildPythonPackage, }: buildPythonPackage rec { @@ -914,7 +919,9 @@ It produces packages that cannot be built automatically. { fetchtorrent }: fetchtorrent { - config = { peer-limit-global = 100; }; + config = { + peer-limit-global = 100; + }; url = "magnet:?xt=urn:btih:dd8255ecdc7ca55fb0bbf81323d87062db1f6d1c"; hash = ""; } diff --git a/doc/build-helpers/images/appimagetools.section.md b/doc/build-helpers/images/appimagetools.section.md index cbd40ab6c35f..81d399e87812 100644 --- a/doc/build-helpers/images/appimagetools.section.md +++ b/doc/build-helpers/images/appimagetools.section.md @@ -66,7 +66,8 @@ let url = "https://github.com/irccloud/irccloud-desktop/releases/download/v${version}/IRCCloud-${version}-linux-x86_64.AppImage"; hash = "sha256-/hMPvYdnVB1XjKgU2v47HnVvW4+uC3rhRjbucqin4iI="; }; -in appimageTools.wrapType2 { +in +appimageTools.wrapType2 { inherit pname version src; extraPkgs = pkgs: [ pkgs.at-spi2-core ]; } @@ -106,7 +107,8 @@ let appimageContents = appimageTools.extract { inherit pname version src; }; -in appimageTools.wrapType2 { +in +appimageTools.wrapType2 { inherit pname version src; extraPkgs = pkgs: [ pkgs.at-spi2-core ]; @@ -150,7 +152,8 @@ let substituteInPlace $out/irccloud.desktop --replace-fail 'Exec=AppRun' 'Exec=${pname}' ''; }; -in appimageTools.wrapType2 { +in +appimageTools.wrapType2 { inherit pname version src; extraPkgs = pkgs: [ pkgs.at-spi2-core ]; diff --git a/doc/build-helpers/images/binarycache.section.md b/doc/build-helpers/images/binarycache.section.md index 954f07e93213..46b43bd4f65a 100644 --- a/doc/build-helpers/images/binarycache.section.md +++ b/doc/build-helpers/images/binarycache.section.md @@ -35,7 +35,7 @@ The following derivation will construct a flat-file binary cache containing the ```nix { mkBinaryCache, hello }: mkBinaryCache { - rootPaths = [hello]; + rootPaths = [ hello ]; } ``` diff --git a/doc/build-helpers/images/dockertools.section.md b/doc/build-helpers/images/dockertools.section.md index 04d477bdc506..fbb0df85d647 100644 --- a/doc/build-helpers/images/dockertools.section.md +++ b/doc/build-helpers/images/dockertools.section.md @@ -235,7 +235,11 @@ The following package builds a Docker image that runs the `redis-server` executa The Docker image will have name `redis` and tag `latest`. ```nix -{ dockerTools, buildEnv, redis }: +{ + dockerTools, + buildEnv, + redis, +}: dockerTools.buildImage { name = "redis"; tag = "latest"; @@ -253,7 +257,9 @@ dockerTools.buildImage { config = { Cmd = [ "/bin/redis-server" ]; WorkingDir = "/data"; - Volumes = { "/data" = { }; }; + Volumes = { + "/data" = { }; + }; }; } ``` @@ -286,7 +292,11 @@ It uses `runAsRoot` to create a directory and a file inside the image. This works the same as [](#ex-dockerTools-buildImage-extraCommands), but uses `runAsRoot` instead of `extraCommands`. ```nix -{ dockerTools, buildEnv, hello }: +{ + dockerTools, + buildEnv, + hello, +}: dockerTools.buildImage { name = "hello"; tag = "latest"; @@ -320,7 +330,11 @@ This works the same as [](#ex-dockerTools-buildImage-runAsRoot), but uses `extra Note that with `extraCommands`, we can't directly reference `/` and must create files and directories as if we were already on `/`. ```nix -{ dockerTools, buildEnv, hello }: +{ + dockerTools, + buildEnv, + hello, +}: dockerTools.buildImage { name = "hello"; tag = "latest"; @@ -350,7 +364,11 @@ dockerTools.buildImage { Note that using a value of `"now"` in the `created` attribute will break reproducibility. ```nix -{ dockerTools, buildEnv, hello }: +{ + dockerTools, + buildEnv, + hello, +}: dockerTools.buildImage { name = "hello"; tag = "latest"; @@ -766,7 +784,11 @@ The closure of `config` is automatically included in the generated image. The following package shows a more compact way to create the same output generated in [](#ex-dockerTools-streamLayeredImage-hello). ```nix -{ dockerTools, hello, lib }: +{ + dockerTools, + hello, + lib, +}: dockerTools.streamLayeredImage { name = "hello"; tag = "latest"; @@ -1547,11 +1569,15 @@ The Docker image generated will have a name like `hello--env` and tag ` This example uses [](#ex-dockerTools-streamNixShellImage-hello) as a starting point. ```nix -{ dockerTools, cowsay, hello }: +{ + dockerTools, + cowsay, + hello, +}: dockerTools.streamNixShellImage { tag = "latest"; drv = hello.overrideAttrs (old: { - nativeBuildInputs = old.nativeBuildInputs or [] ++ [ + nativeBuildInputs = old.nativeBuildInputs or [ ] ++ [ cowsay ]; }); diff --git a/doc/build-helpers/images/makediskimage.section.md b/doc/build-helpers/images/makediskimage.section.md index 3edfa906aa6a..6d9afccdbae5 100644 --- a/doc/build-helpers/images/makediskimage.section.md +++ b/doc/build-helpers/images/makediskimage.section.md @@ -52,23 +52,23 @@ A `deterministic` flag is available for best efforts determinism. To produce a Nix-store only image: ```nix let - pkgs = import {}; + pkgs = import { }; lib = pkgs.lib; make-disk-image = import ; in - make-disk-image { - inherit pkgs lib; - config = {}; - additionalPaths = [ ]; - format = "qcow2"; - onlyNixStore = true; - partitionTableType = "none"; - installBootLoader = false; - touchEFIVars = false; - diskSize = "auto"; - additionalSpace = "0M"; # Defaults to 512M. - copyChannel = false; - } +make-disk-image { + inherit pkgs lib; + config = { }; + additionalPaths = [ ]; + format = "qcow2"; + onlyNixStore = true; + partitionTableType = "none"; + installBootLoader = false; + touchEFIVars = false; + diskSize = "auto"; + additionalSpace = "0M"; # Defaults to 512M. + copyChannel = false; +} ``` Some arguments can be left out, they are shown explicitly for the sake of the example. @@ -78,29 +78,36 @@ Building this derivation will provide a QCOW2 disk image containing only the Nix To produce a NixOS installation image disk with UEFI and bootloader installed: ```nix let - pkgs = import {}; + pkgs = import { }; lib = pkgs.lib; make-disk-image = import ; evalConfig = import ; in - make-disk-image { - inherit pkgs lib; - inherit (evalConfig { +make-disk-image { + inherit pkgs lib; + inherit + (evalConfig { modules = [ { - fileSystems."/" = { device = "/dev/vda"; fsType = "ext4"; autoFormat = true; }; + fileSystems."/" = { + device = "/dev/vda"; + fsType = "ext4"; + autoFormat = true; + }; boot.grub.device = "/dev/vda"; } ]; - }) config; - format = "qcow2"; - onlyNixStore = false; - partitionTableType = "legacy+gpt"; - installBootLoader = true; - touchEFIVars = true; - diskSize = "auto"; - additionalSpace = "0M"; # Defaults to 512M. - copyChannel = false; - memSize = 2048; # Qemu VM memory size in megabytes. Defaults to 1024M. - } + }) + config + ; + format = "qcow2"; + onlyNixStore = false; + partitionTableType = "legacy+gpt"; + installBootLoader = true; + touchEFIVars = true; + diskSize = "auto"; + additionalSpace = "0M"; # Defaults to 512M. + copyChannel = false; + memSize = 2048; # Qemu VM memory size in megabytes. Defaults to 1024M. +} ``` diff --git a/doc/build-helpers/images/ocitools.section.md b/doc/build-helpers/images/ocitools.section.md index 96627615ffb5..5101dd81715b 100644 --- a/doc/build-helpers/images/ocitools.section.md +++ b/doc/build-helpers/images/ocitools.section.md @@ -76,7 +76,11 @@ Note that no user namespace is created, which means that you won't be able to ru This example uses `ociTools.buildContainer` to create a simple container that runs `bash`. ```nix -{ ociTools, lib, bash }: +{ + ociTools, + lib, + bash, +}: ociTools.buildContainer { args = [ (lib.getExe bash) diff --git a/doc/build-helpers/images/portableservice.section.md b/doc/build-helpers/images/portableservice.section.md index c271bc775dba..43e44fe33aec 100644 --- a/doc/build-helpers/images/portableservice.section.md +++ b/doc/build-helpers/images/portableservice.section.md @@ -91,7 +91,12 @@ See [](#ex-portableService-hello) to understand how to use the output of `portab The following example builds a Portable Service image with the `hello` package, along with a service unit that runs it. ```nix -{ lib, writeText, portableService, hello }: +{ + lib, + writeText, + portableService, + hello, +}: let hello-service = writeText "hello.service" '' [Unit] @@ -151,7 +156,13 @@ To make things available globally, you must specify the `symlinks` attribute whe The following package builds on the package from [](#ex-portableService-hello) to make `/etc/ssl` available globally (this is only for illustrative purposes, because `hello` doesn't use `/etc/ssl`). ```nix -{ lib, writeText, portableService, hello, cacert }: +{ + lib, + writeText, + portableService, + hello, + cacert, +}: let hello-service = writeText "hello.service" '' [Unit] @@ -167,7 +178,10 @@ portableService { inherit (hello) version; units = [ hello-service ]; symlinks = [ - { object = "${cacert}/etc/ssl"; symlink = "/etc/ssl"; } + { + object = "${cacert}/etc/ssl"; + symlink = "/etc/ssl"; + } ]; } ``` diff --git a/doc/build-helpers/special/checkpoint-build.section.md b/doc/build-helpers/special/checkpoint-build.section.md index a1ce5608f246..036fee286a99 100644 --- a/doc/build-helpers/special/checkpoint-build.section.md +++ b/doc/build-helpers/special/checkpoint-build.section.md @@ -26,7 +26,9 @@ To change a normal derivation to a checkpoint based build, these steps must be t ## Example {#sec-checkpoint-build-example} ```nix -{ pkgs ? import {} }: +{ + pkgs ? import { }, +}: let inherit (pkgs.checkpointBuildTools) prepareCheckpointBuild @@ -39,5 +41,6 @@ let sed -i 's/Hello, world!/Hello, Nix!/g' src/hello.c ''; }); -in mkCheckpointBuild changedHello helloCheckpoint +in +mkCheckpointBuild changedHello helloCheckpoint ``` diff --git a/doc/build-helpers/special/fakenss.section.md b/doc/build-helpers/special/fakenss.section.md index c890752c0653..7b1b6f2576f2 100644 --- a/doc/build-helpers/special/fakenss.section.md +++ b/doc/build-helpers/special/fakenss.section.md @@ -48,12 +48,19 @@ It is useful with functions in `dockerTools` to allow building Docker images tha This example includes the `hello` binary in the image so it can do something besides just have the extra files. ```nix -{ dockerTools, fakeNss, hello }: +{ + dockerTools, + fakeNss, + hello, +}: dockerTools.buildImage { name = "image-with-passwd"; tag = "latest"; - copyToRoot = [ fakeNss hello ]; + copyToRoot = [ + fakeNss + hello + ]; config = { Cmd = [ "/bin/hello" ]; @@ -70,8 +77,8 @@ The following code uses `override` to add extra lines to `/etc/passwd` and `/etc ```nix { fakeNss }: fakeNss.override { - extraPasswdLines = ["newuser:x:9001:9001:new user:/var/empty:/bin/sh"]; - extraGroupLines = ["newuser:x:9001:"]; + extraPasswdLines = [ "newuser:x:9001:9001:new user:/var/empty:/bin/sh" ]; + extraGroupLines = [ "newuser:x:9001:" ]; } ``` ::: diff --git a/doc/build-helpers/special/fhs-environments.section.md b/doc/build-helpers/special/fhs-environments.section.md index 815f6cac1126..e81dbdfdc641 100644 --- a/doc/build-helpers/special/fhs-environments.section.md +++ b/doc/build-helpers/special/fhs-environments.section.md @@ -36,22 +36,29 @@ Accepted arguments are: You can create a simple environment using a `shell.nix` like this: ```nix -{ pkgs ? import {} }: +{ + pkgs ? import { }, +}: (pkgs.buildFHSEnv { name = "simple-x11-env"; - targetPkgs = pkgs: (with pkgs; [ - udev - alsa-lib - ]) ++ (with pkgs.xorg; [ - libX11 - libXcursor - libXrandr - ]); - multiPkgs = pkgs: (with pkgs; [ - udev - alsa-lib - ]); + targetPkgs = + pkgs: + (with pkgs; [ + udev + alsa-lib + ]) + ++ (with pkgs.xorg; [ + libX11 + libXcursor + libXrandr + ]); + multiPkgs = + pkgs: + (with pkgs; [ + udev + alsa-lib + ]); runScript = "bash"; }).env ``` diff --git a/doc/build-helpers/special/mkshell.section.md b/doc/build-helpers/special/mkshell.section.md index e39bef7468e3..15443660c9ff 100644 --- a/doc/build-helpers/special/mkshell.section.md +++ b/doc/build-helpers/special/mkshell.section.md @@ -8,11 +8,16 @@ repetition when using it with `nix-shell` (or `nix develop`). Here is a common usage example: ```nix -{ pkgs ? import {} }: +{ + pkgs ? import { }, +}: pkgs.mkShell { packages = [ pkgs.gnumake ]; - inputsFrom = [ pkgs.hello pkgs.gnutar ]; + inputsFrom = [ + pkgs.hello + pkgs.gnutar + ]; shellHook = '' export DEBUG=1 diff --git a/doc/build-helpers/special/vm-tools.section.md b/doc/build-helpers/special/vm-tools.section.md index 46ced7cd9990..7591f62eb462 100644 --- a/doc/build-helpers/special/vm-tools.section.md +++ b/doc/build-helpers/special/vm-tools.section.md @@ -31,25 +31,34 @@ If the build fails and Nix is run with the `-K/--keep-failed` option, a script ` Build the derivation hello inside a VM: ```nix -{ pkgs }: with pkgs; with vmTools; -runInLinuxVM hello +{ pkgs }: with pkgs; with vmTools; runInLinuxVM hello ``` Build inside a VM with extra memory: ```nix -{ pkgs }: with pkgs; with vmTools; -runInLinuxVM (hello.overrideAttrs (_: { memSize = 1024; })) +{ pkgs }: +with pkgs; +with vmTools; +runInLinuxVM ( + hello.overrideAttrs (_: { + memSize = 1024; + }) +) ``` Use VM with a disk image (implicitly sets `diskImage`, see [`vmTools.createEmptyImage`](#vm-tools-createEmptyImage)): ```nix -{ pkgs }: with pkgs; with vmTools; -runInLinuxVM (hello.overrideAttrs (_: { - preVM = createEmptyImage { - size = 1024; - fullName = "vm-image"; - }; -})) +{ pkgs }: +with pkgs; +with vmTools; +runInLinuxVM ( + hello.overrideAttrs (_: { + preVM = createEmptyImage { + size = 1024; + fullName = "vm-image"; + }; + }) +) ``` ## `vmTools.extractFs` {#vm-tools-extractFs} @@ -66,8 +75,7 @@ Takes a file, such as an ISO, and extracts its contents into the store. Extract the contents of an ISO file: ```nix -{ pkgs }: with pkgs; with vmTools; -extractFs { file = ./image.iso; } +{ pkgs }: with pkgs; with vmTools; extractFs { file = ./image.iso; } ``` ## `vmTools.extractMTDfs` {#vm-tools-extractMTDfs} @@ -86,14 +94,12 @@ Generate a script that can be used to run an interactive session in the given im Create a script for running a Fedora 27 VM: ```nix -{ pkgs }: with pkgs; with vmTools; -makeImageTestScript diskImages.fedora27x86_64 +{ pkgs }: with pkgs; with vmTools; makeImageTestScript diskImages.fedora27x86_64 ``` Create a script for running an Ubuntu 20.04 VM: ```nix -{ pkgs }: with pkgs; with vmTools; -makeImageTestScript diskImages.ubuntu2004x86_64 +{ pkgs }: with pkgs; with vmTools; makeImageTestScript diskImages.ubuntu2004x86_64 ``` ## `vmTools.diskImageFuns` {#vm-tools-diskImageFuns} @@ -137,8 +143,13 @@ A set of functions that build a predefined set of minimal Linux distributions im 8GiB image containing Firefox in addition to the default packages: ```nix -{ pkgs }: with pkgs; with vmTools; -diskImageFuns.ubuntu2004x86_64 { extraPackages = [ "firefox" ]; size = 8192; } +{ pkgs }: +with pkgs; +with vmTools; +diskImageFuns.ubuntu2004x86_64 { + extraPackages = [ "firefox" ]; + size = 8192; +} ``` ## `vmTools.diskImageExtraFuns` {#vm-tools-diskImageExtraFuns} diff --git a/doc/build-helpers/testers.chapter.md b/doc/build-helpers/testers.chapter.md index fe1a0954348d..9e46635c600c 100644 --- a/doc/build-helpers/testers.chapter.md +++ b/doc/build-helpers/testers.chapter.md @@ -98,7 +98,8 @@ It has two modes: ```nix { "https://nix\\.dev/manual/nix/[a-z0-9.-]*" = "${nix.doc}/share/doc/nix/manual"; - "https://nixos\\.org/manual/nix/(un)?stable" = "${emptyDirectory}/placeholder-to-disallow-old-nix-docs-urls"; + "https://nixos\\.org/manual/nix/(un)?stable" = + "${emptyDirectory}/placeholder-to-disallow-old-nix-docs-urls"; } ``` @@ -302,18 +303,22 @@ While `testBuildFailure` is designed to keep changes to the original builder's e # Check that a build fails, and verify the changes made during build ```nix -runCommand "example" { - failed = testers.testBuildFailure (runCommand "fail" {} '' - echo ok-ish >$out - echo failing though - exit 3 - ''); -} '' - grep -F 'ok-ish' $failed/result - grep -F 'failing though' $failed/testBuildFailure.log - [[ 3 = $(cat $failed/testBuildFailure.exit) ]] - touch $out -'' +runCommand "example" + { + failed = testers.testBuildFailure ( + runCommand "fail" { } '' + echo ok-ish >$out + echo failing though + exit 3 + '' + ); + } + '' + grep -F 'ok-ish' $failed/result + grep -F 'failing though' $failed/testBuildFailure.log + [[ 3 = $(cat $failed/testBuildFailure.exit) ]] + touch $out + '' ``` ::: @@ -396,15 +401,18 @@ testers.testEqualContents { expected = writeText "expected" '' foo baz baz ''; - actual = runCommand "actual" { - # not really necessary for a package that's in stdenv - nativeBuildInputs = [ gnused ]; - base = writeText "base" '' - foo bar baz - ''; - } '' - sed -e 's/bar/baz/g' $base >$out - ''; + actual = + runCommand "actual" + { + # not really necessary for a package that's in stdenv + nativeBuildInputs = [ gnused ]; + base = writeText "base" '' + foo bar baz + ''; + } + '' + sed -e 's/bar/baz/g' $base >$out + ''; } ``` @@ -515,10 +523,11 @@ Otherwise, the build log explains the difference via `nix-diff`. # Check that two packages produce the same derivation ```nix -testers.testEqualDerivation - "The hello package must stay the same when enabling checks." - hello - (hello.overrideAttrs(o: { doCheck = true; })) +testers.testEqualDerivation "The hello package must stay the same when enabling checks." hello ( + hello.overrideAttrs (o: { + doCheck = true; + }) +) ``` ::: @@ -586,7 +595,10 @@ testers.runCommand { curl -o /dev/null https://example.com touch $out ''; - nativeBuildInputs = with pkgs; [ cacert curl ]; + nativeBuildInputs = with pkgs; [ + cacert + curl + ]; } ``` @@ -603,15 +615,20 @@ If your test is part of the Nixpkgs repository, or if you need a more general en # Run a NixOS test using `runNixOSTest` ```nix -pkgs.testers.runNixOSTest ({ lib, ... }: { - name = "hello"; - nodes.machine = { pkgs, ... }: { - environment.systemPackages = [ pkgs.hello ]; - }; - testScript = '' - machine.succeed("hello") - ''; -}) +pkgs.testers.runNixOSTest ( + { lib, ... }: + { + name = "hello"; + nodes.machine = + { pkgs, ... }: + { + environment.systemPackages = [ pkgs.hello ]; + }; + testScript = '' + machine.succeed("hello") + ''; + } +) ``` ::: @@ -634,10 +651,17 @@ A [NixOS VM test network](https://nixos.org/nixos/manual/index.html#sec-nixos-te { name = "my-test"; nodes = { - machine1 = { lib, pkgs, nodes, ... }: { - environment.systemPackages = [ pkgs.hello ]; - services.foo.enable = true; - }; + machine1 = + { + lib, + pkgs, + nodes, + ... + }: + { + environment.systemPackages = [ pkgs.hello ]; + services.foo.enable = true; + }; # machine2 = ...; }; testScript = '' diff --git a/doc/build-helpers/trivial-build-helpers.chapter.md b/doc/build-helpers/trivial-build-helpers.chapter.md index 9e818be674b4..48ed99b2fa36 100644 --- a/doc/build-helpers/trivial-build-helpers.chapter.md +++ b/doc/build-helpers/trivial-build-helpers.chapter.md @@ -66,15 +66,17 @@ runCommandWith :: { # Invocation of `runCommandWith` ```nix -runCommandWith { - name = "example"; - derivationArgs.nativeBuildInputs = [ cowsay ]; -} '' - cowsay > $out < $out </my-program.desktop` to the Nix store. ```nix -{makeDesktopItem}: +{ makeDesktopItem }: makeDesktopItem { name = "my-program"; desktopName = "My Program"; @@ -260,7 +262,10 @@ makeDesktopItem { mimeTypes = [ "video/mp4" ]; categories = [ "Utility" ]; implements = [ "org.my-program" ]; - keywords = [ "Video" "Player" ]; + keywords = [ + "Video" + "Player" + ]; startupNotify = false; startupWMClass = "MyProgram"; prefersNonDefaultGPU = false; @@ -276,18 +281,22 @@ makeDesktopItem { Override the `hello` package to add a desktop item. ```nix -{ copyDesktopItems -, hello -, makeDesktopItem }: +{ + copyDesktopItems, + hello, + makeDesktopItem, +}: hello.overrideAttrs { nativeBuildInputs = [ copyDesktopItems ]; - desktopItems = [(makeDesktopItem { - name = "hello"; - desktopName = "Hello"; - exec = "hello"; - })]; + desktopItems = [ + (makeDesktopItem { + name = "hello"; + desktopName = "Hello"; + exec = "hello"; + }) + ]; } ``` @@ -446,10 +455,9 @@ The store path will include the name, and it will be a file. Write the string `Contents of File` to `/nix/store/`: ```nix -writeText "my-file" - '' +writeText "my-file" '' Contents of File - '' +'' ``` ::: @@ -486,10 +494,9 @@ The store path will be a directory. Write the string `Contents of File` to `/nix/store//share/my-file`: ```nix -writeTextDir "share/my-file" - '' +writeTextDir "share/my-file" '' Contents of File - '' +'' ``` ::: @@ -528,10 +535,9 @@ The store path will include the name, and it will be a file. Write the string `Contents of File` to `/nix/store/` and make the file executable. ```nix -writeScript "my-file" - '' +writeScript "my-file" '' Contents of File - '' +'' ``` This is equivalent to: @@ -570,10 +576,9 @@ The store path will include the name, and it will be a directory. # Usage of `writeScriptBin` ```nix -writeScriptBin "my-script" - '' +writeScriptBin "my-script" '' echo "hi" - '' +'' ``` ::: @@ -614,10 +619,9 @@ This function is almost exactly like [](#trivial-builder-writeScript), except th # Usage of `writeShellScript` ```nix -writeShellScript "my-script" - '' +writeShellScript "my-script" '' echo "hi" - '' +'' ``` ::: @@ -657,10 +661,9 @@ This function is a combination of [](#trivial-builder-writeShellScript) and [](# # Usage of `writeShellScriptBin` ```nix -writeShellScriptBin "my-script" - '' +writeShellScriptBin "my-script" '' echo "hi" - '' +'' ``` ::: @@ -685,26 +688,40 @@ These functions concatenate `files` to the Nix store in a single file. This is u Here are a few examples: ```nix - # Writes my-file to /nix/store/ -concatTextFile { - name = "my-file"; - files = [ drv1 "${drv2}/path/to/file" ]; -} -# See also the `concatText` helper function below. +concatTextFile + { + name = "my-file"; + files = [ + drv1 + "${drv2}/path/to/file" + ]; + } + # See also the `concatText` helper function below. -# Writes executable my-file to /nix/store//bin/my-file -concatTextFile { - name = "my-file"; - files = [ drv1 "${drv2}/path/to/file" ]; - executable = true; - destination = "/bin/my-file"; -} -# Writes contents of files to /nix/store/ -concatText "my-file" [ file1 file2 ] + # Writes executable my-file to /nix/store//bin/my-file + concatTextFile + { + name = "my-file"; + files = [ + drv1 + "${drv2}/path/to/file" + ]; + executable = true; + destination = "/bin/my-file"; + } + # Writes contents of files to /nix/store/ + concatText + "my-file" + [ file1 file2 ] -# Writes contents of files to /nix/store/ -concatScript "my-file" [ file1 file2 ] + # Writes contents of files to /nix/store/ + concatScript + "my-file" + [ + file1 + file2 + ] ``` ## `writeShellApplication` {#trivial-builder-writeShellApplication} @@ -722,7 +739,10 @@ For example, the following shell application can refer to `curl` directly, rathe writeShellApplication { name = "show-nixos-org"; - runtimeInputs = [ curl w3m ]; + runtimeInputs = [ + curl + w3m + ]; text = '' curl -s 'https://nixos.org' | w3m -dump -T text/html @@ -736,7 +756,14 @@ This can be used to put many derivations into the same directory structure. It w Here is an example: ```nix # adds symlinks of hello and stack to current build and prints "links added" -symlinkJoin { name = "myexample"; paths = [ pkgs.hello pkgs.stack ]; postBuild = "echo links added"; } +symlinkJoin { + name = "myexample"; + paths = [ + pkgs.hello + pkgs.stack + ]; + postBuild = "echo links added"; +} ``` This creates a derivation with a directory structure like the following: ``` diff --git a/doc/functions/generators.section.md b/doc/functions/generators.section.md index 9d71a0240108..f636d00cc258 100644 --- a/doc/functions/generators.section.md +++ b/doc/functions/generators.section.md @@ -13,17 +13,23 @@ let # specifies how to format a key/value pair mkKeyValue = generators.mkKeyValueDefault { # specifies the generated string for a subset of nix values - mkValueString = v: - if v == true then ''"yes"'' - else if v == false then ''"no"'' - else if isString v then ''"${v}"'' + mkValueString = + v: + if v == true then + ''"yes"'' + else if v == false then + ''"no"'' + else if isString v then + ''"${v}"'' # and delegates all other values to the default generator - else generators.mkValueStringDefault {} v; + else + generators.mkValueStringDefault { } v; } ":"; }; -# the INI file can now be given as plain old nix values -in customToINI { + # the INI file can now be given as plain old nix values +in +customToINI { main = { pushinfo = true; autopush = false; diff --git a/doc/functions/nix-gitignore.section.md b/doc/functions/nix-gitignore.section.md index 8532ab68ac04..416b5435fa58 100644 --- a/doc/functions/nix-gitignore.section.md +++ b/doc/functions/nix-gitignore.section.md @@ -7,20 +7,23 @@ `pkgs.nix-gitignore` exports a number of functions, but you'll most likely need either `gitignoreSource` or `gitignoreSourcePure`. As their first argument, they both accept either 1. a file with gitignore lines or 2. a string with gitignore lines, or 3. a list of either of the two. They will be concatenated into a single big string. ```nix -{ pkgs ? import {} }: { +{ + pkgs ? import { }, +}: +{ - src = nix-gitignore.gitignoreSource [] ./source; - # Simplest version + src = nix-gitignore.gitignoreSource [ ] ./source; + # Simplest version - src = nix-gitignore.gitignoreSource "supplemental-ignores\n" ./source; - # This one reads the ./source/.gitignore and concats the auxiliary ignores + src = nix-gitignore.gitignoreSource "supplemental-ignores\n" ./source; + # This one reads the ./source/.gitignore and concats the auxiliary ignores - src = nix-gitignore.gitignoreSourcePure "ignore-this\nignore-that\n" ./source; - # Use this string as gitignore, don't read ./source/.gitignore. + src = nix-gitignore.gitignoreSourcePure "ignore-this\nignore-that\n" ./source; + # Use this string as gitignore, don't read ./source/.gitignore. - src = nix-gitignore.gitignoreSourcePure ["ignore-this\nignore-that\n" ~/.gitignore] ./source; - # It also accepts a list (of strings and paths) that will be concatenated - # once the paths are turned to strings via readFile. + src = nix-gitignore.gitignoreSourcePure [ "ignore-this\nignore-that\n" ~/.gitignore ] ./source; + # It also accepts a list (of strings and paths) that will be concatenated + # once the paths are turned to strings via readFile. } ``` diff --git a/doc/functions/prefer-remote-fetch.section.md b/doc/functions/prefer-remote-fetch.section.md index 8760c100224a..b3d4a84eb4fd 100644 --- a/doc/functions/prefer-remote-fetch.section.md +++ b/doc/functions/prefer-remote-fetch.section.md @@ -3,8 +3,7 @@ `prefer-remote-fetch` is an overlay that download sources on remote builder. This is useful when the evaluating machine has a slow upload while the builder can fetch faster directly from the source. To use it, put the following snippet as a new overlay: ```nix -self: super: - (super.prefer-remote-fetch self super) +self: super: (super.prefer-remote-fetch self super) ``` A full configuration example for that sets the overlay up for your own account, could look like this diff --git a/doc/hooks/mpi-check-hook.section.md b/doc/hooks/mpi-check-hook.section.md index c182c4cc6195..299069fc89ba 100644 --- a/doc/hooks/mpi-check-hook.section.md +++ b/doc/hooks/mpi-check-hook.section.md @@ -11,15 +11,15 @@ the neceesary environment variables to use Example: ```nix - { mpiCheckPhaseHook, mpi, ... }: - { - # ... +{ mpiCheckPhaseHook, mpi, ... }: +{ + # ... - nativeCheckInputs = [ - openssh - mpiCheckPhaseHook - ]; - } + nativeCheckInputs = [ + openssh + mpiCheckPhaseHook + ]; +} ``` diff --git a/doc/hooks/patch-rc-path-hooks.section.md b/doc/hooks/patch-rc-path-hooks.section.md index 5c870dc782c2..080a03da72d6 100644 --- a/doc/hooks/patch-rc-path-hooks.section.md +++ b/doc/hooks/patch-rc-path-hooks.section.md @@ -29,7 +29,11 @@ Given a package `foo` containing an init script `this-foo.fish` that depends on patch the init script for users to source without having the above dependencies in their `PATH`: ```nix -{ lib, stdenv, patchRcPathFish}: +{ + lib, + stdenv, + patchRcPathFish, +}: stdenv.mkDerivation { # ... @@ -39,7 +43,13 @@ stdenv.mkDerivation { ]; postFixup = '' - patchRcPathFish $out/bin/this-foo.fish ${lib.makeBinPath [ coreutils man which ]} + patchRcPathFish $out/bin/this-foo.fish ${ + lib.makeBinPath [ + coreutils + man + which + ] + } ''; } ``` diff --git a/doc/hooks/postgresql-test-hook.section.md b/doc/hooks/postgresql-test-hook.section.md index 59d7f7a644c9..8b3cc5f03f3e 100644 --- a/doc/hooks/postgresql-test-hook.section.md +++ b/doc/hooks/postgresql-test-hook.section.md @@ -4,7 +4,11 @@ This hook starts a PostgreSQL server during the `checkPhase`. Example: ```nix -{ stdenv, postgresql, postgresqlTestHook }: +{ + stdenv, + postgresql, + postgresqlTestHook, +}: stdenv.mkDerivation { # ... @@ -18,13 +22,13 @@ stdenv.mkDerivation { If you use a custom `checkPhase`, remember to add the `runHook` calls: ```nix - checkPhase '' - runHook preCheck +checkPhase '' + runHook preCheck - # ... your tests + # ... your tests - runHook postCheck - '' + runHook postCheck +'' ``` ## Variables {#sec-postgresqlTestHook-variables} diff --git a/doc/hooks/redis-test-hook.section.md b/doc/hooks/redis-test-hook.section.md index c01f6c33f44a..7971b29fa10a 100644 --- a/doc/hooks/redis-test-hook.section.md +++ b/doc/hooks/redis-test-hook.section.md @@ -7,7 +7,7 @@ This hook starts a Redis server during `checkPhase`. Example: { stdenv, redis, - redisTestHook + redisTestHook, }: stdenv.mkDerivation { @@ -47,7 +47,11 @@ Bash-only variables: Example usage: ```nix -{ stdenv, redis, redisTestHook }: +{ + stdenv, + redis, + redisTestHook, +}: stdenv.mkDerivation { # ... @@ -60,3 +64,4 @@ stdenv.mkDerivation { redisTestPort=6390; ''; } +``` diff --git a/doc/hooks/versionCheckHook.section.md b/doc/hooks/versionCheckHook.section.md index 6c45b37cd17b..16b1ee97e890 100644 --- a/doc/hooks/versionCheckHook.section.md +++ b/doc/hooks/versionCheckHook.section.md @@ -9,7 +9,7 @@ You use it like this: lib, stdenv, versionCheckHook, - # ... +# ... }: stdenv.mkDerivation (finalAttrs: { diff --git a/doc/hooks/zig.section.md b/doc/hooks/zig.section.md index 8bef293769e5..1c52e9827b41 100644 --- a/doc/hooks/zig.section.md +++ b/doc/hooks/zig.section.md @@ -7,9 +7,10 @@ In Nixpkgs, `zig.hook` overrides the default build, check and install phases. ## Example code snippet {#zig-hook-example-code-snippet} ```nix -{ lib -, stdenv -, zig +{ + lib, + stdenv, + zig, }: stdenv.mkDerivation { diff --git a/doc/interoperability/cyclonedx.md b/doc/interoperability/cyclonedx.md index 7a3dea3dbc2f..3c141b86d9f9 100644 --- a/doc/interoperability/cyclonedx.md +++ b/doc/interoperability/cyclonedx.md @@ -63,17 +63,27 @@ For example, the `fetchFromGitHub` is commonly used within Nixpkgs but should be `nix:fod` properties may be extracted and evaluated to a derivation using code similar to the following, assuming a fictitious function `filterPropertiesToAttrs`: ```nix -{ pkgs, filterPropertiesToAttrs, properties }: +{ + pkgs, + filterPropertiesToAttrs, + properties, +}: let fodProps = filterPropertiesToAttrs "nix:fod:" properties; methods = { fetchzip = - { name, url, sha256, ... }: + { + name, + url, + sha256, + ... + }: pkgs.fetchzip { inherit name url sha256; }; }; -in methods.${fodProps.method} fodProps +in +methods.${fodProps.method} fodProps ``` diff --git a/doc/languages-frameworks/agda.section.md b/doc/languages-frameworks/agda.section.md index 33fffc60c8db..95b8afcbd1c0 100644 --- a/doc/languages-frameworks/agda.section.md +++ b/doc/languages-frameworks/agda.section.md @@ -48,7 +48,7 @@ You can also reference a GitHub repository agda.withPackages (p: [ (p.standard-library.overrideAttrs (oldAttrs: { version = "1.5"; - src = fetchFromGitHub { + src = fetchFromGitHub { repo = "agda-stdlib"; owner = "agda"; rev = "v1.5"; @@ -114,7 +114,9 @@ This can be overridden by a different version of `ghc` as follows: ```nix agda.withPackages { - pkgs = [ /* ... */ ]; + pkgs = [ + # ... + ]; ghc = haskell.compiler.ghcHEAD; } ``` @@ -132,8 +134,10 @@ A derivation can then be written using `agdaPackages.mkDerivation`. This has sim Here is an example `default.nix` ```nix -{ nixpkgs ? }: -with (import nixpkgs {}); +{ + nixpkgs ? , +}: +with (import nixpkgs { }); agdaPackages.mkDerivation { version = "1.0"; pname = "my-agda-lib"; @@ -179,8 +183,12 @@ the Agda package set is small and can (still) be maintained by hand. To add an Agda package to `nixpkgs`, the derivation should be written to `pkgs/development/libraries/agda/${library-name}/` and an entry should be added to `pkgs/top-level/agda-packages.nix`. Here it is called in a scope with access to all other Agda libraries, so the top line of the `default.nix` can look like: ```nix -{ mkDerivation, standard-library, fetchFromGitHub }: -{} +{ + mkDerivation, + standard-library, + fetchFromGitHub, +}: +{ } ``` Note that the derivation function is called with `mkDerivation` set to `agdaPackages.mkDerivation`, therefore you diff --git a/doc/languages-frameworks/android.section.md b/doc/languages-frameworks/android.section.md index 95800f95351a..f970776a9b8d 100644 --- a/doc/languages-frameworks/android.section.md +++ b/doc/languages-frameworks/android.section.md @@ -9,7 +9,7 @@ Use the `android-studio-full` attribute for a very complete Android SDK, includi ```nix { -buildInputs = [ android-studio-full ]; + buildInputs = [ android-studio-full ]; } ``` @@ -17,7 +17,7 @@ This is identical to: ```nix { -buildInputs = [ androidStudioPackages.stable.full ]; + buildInputs = [ androidStudioPackages.stable.full ]; } ``` @@ -25,11 +25,13 @@ Alternatively, you can pass composeAndroidPackages to the `withSdk` passthru: ```nix { -buildInputs = [ - (android-studio.withSdk (androidenv.composeAndroidPackages { - includeNDK = true; - }).androidsdk) -]; + buildInputs = [ + (android-studio.withSdk + (androidenv.composeAndroidPackages { + includeNDK = true; + }).androidsdk + ) + ]; } ``` @@ -41,13 +43,19 @@ in the specified Android build environment. Alternatively, you can deploy the SDK separately with a desired set of plugins, or subsets of an SDK. ```nix -with import {}; +with import { }; let androidComposition = androidenv.composeAndroidPackages { - platformVersions = [ "34" "35" ]; + platformVersions = [ + "34" + "35" + ]; systemImageTypes = [ "google_apis_playstore" ]; - abiVersions = [ "armeabi-v7a" "arm64-v8a" ]; + abiVersions = [ + "armeabi-v7a" + "arm64-v8a" + ]; includeNDK = true; includeExtras = [ "extras;google;auto" @@ -171,7 +179,7 @@ We can also deploy subsets of the Android SDK. For example, to only the `platform-tools` package, you can evaluate the following expression: ```nix -with import {}; +with import { }; let androidComposition = androidenv.composeAndroidPackages { @@ -189,7 +197,7 @@ to use a predefined composition that contains a fairly complete set of Android p The following Nix expression can be used to deploy the entire SDK: ```nix -with import {}; +with import { }; androidenv.androidPkgs.androidsdk ``` @@ -197,7 +205,7 @@ androidenv.androidPkgs.androidsdk It is also possible to use one plugin only: ```nix -with import {}; +with import { }; androidenv.androidPkgs.platform-tools ``` @@ -211,7 +219,7 @@ An emulator spawn script can be configured by invoking the `emulateApp {}` function: ```nix -with import {}; +with import { }; androidenv.emulateApp { name = "emulate-MyAndroidApp"; @@ -227,7 +235,7 @@ It is also possible to specify an APK to deploy inside the emulator and the package and activity names to launch it: ```nix -with import {}; +with import { }; androidenv.emulateApp { name = "emulate-MyAndroidApp"; @@ -350,7 +358,7 @@ requires. Most newer Android projects use Gradle, and this is included for histo purposes. ```nix -with import {}; +with import { }; androidenv.buildApp { name = "MyAndroidApp"; diff --git a/doc/languages-frameworks/beam.section.md b/doc/languages-frameworks/beam.section.md index 6c88278def19..a7882ba25f57 100644 --- a/doc/languages-frameworks/beam.section.md +++ b/doc/languages-frameworks/beam.section.md @@ -60,7 +60,10 @@ $ nix-shell -p beamPackages.rebar3 ```nix let - pkgs = import { config = {}; overlays = []; }; + pkgs = import { + config = { }; + overlays = [ ]; + }; in pkgs.mkShell { packages = [ pkgs.beamPackages.rebar3 ]; @@ -120,26 +123,28 @@ If there are git dependencies. { mixNixDeps = import ./mix.nix { inherit beamPackages lib; - overrides = (final: prev: { - # mix2nix does not support git dependencies yet, - # so we need to add them manually - prometheus_ex = beamPackages.buildMix rec { - name = "prometheus_ex"; - version = "3.0.5"; + overrides = ( + final: prev: { + # mix2nix does not support git dependencies yet, + # so we need to add them manually + prometheus_ex = beamPackages.buildMix rec { + name = "prometheus_ex"; + version = "3.0.5"; - # Change the argument src with the git src that you actually need - src = fetchFromGitLab { - domain = "git.pleroma.social"; - group = "pleroma"; - owner = "elixir-libraries"; - repo = "prometheus.ex"; - rev = "a4e9beb3c1c479d14b352fd9d6dd7b1f6d7deee5"; - hash = "sha256-U17LlN6aGUKUFnT4XyYXppRN+TvUBIBRHEUsfeIiGOw="; + # Change the argument src with the git src that you actually need + src = fetchFromGitLab { + domain = "git.pleroma.social"; + group = "pleroma"; + owner = "elixir-libraries"; + repo = "prometheus.ex"; + rev = "a4e9beb3c1c479d14b352fd9d6dd7b1f6d7deee5"; + hash = "sha256-U17LlN6aGUKUFnT4XyYXppRN+TvUBIBRHEUsfeIiGOw="; + }; + # you can re-use the same beamDeps argument as generated + beamDeps = with final; [ prometheus ]; }; - # you can re-use the same beamDeps argument as generated - beamDeps = with final; [ prometheus ]; - }; - }); + } + ); }; } ``` @@ -195,15 +200,21 @@ let hash = lib.fakeHash; mixEnv = ""; # default is "prod", when empty includes all dependencies, such as "dev", "test". # if you have build time environment variables add them here - MY_ENV_VAR="my_value"; + MY_ENV_VAR = "my_value"; }; nodeDependencies = (pkgs.callPackage ./assets/default.nix { }).shell.nodeDependencies; -in packages.mixRelease { - inherit src pname version mixFodDeps; +in +packages.mixRelease { + inherit + src + pname + version + mixFodDeps + ; # if you have build time environment variables add them here - MY_ENV_VAR="my_value"; + MY_ENV_VAR = "my_value"; postBuild = '' ln -sf ${nodeDependencies}/lib/node_modules assets/node_modules @@ -231,7 +242,12 @@ In order to create a service with your release, you could add a `service.nix` in your project with the following ```nix -{config, pkgs, lib, ...}: +{ + config, + pkgs, + lib, + ... +}: let release = pkgs.callPackage ./default.nix; @@ -241,10 +257,16 @@ in { systemd.services.${release_name} = { wantedBy = [ "multi-user.target" ]; - after = [ "network.target" "postgresql.service" ]; + after = [ + "network.target" + "postgresql.service" + ]; # note that if you are connecting to a postgres instance on a different host # postgresql.service should not be included in the requires. - requires = [ "network-online.target" "postgresql.service" ]; + requires = [ + "network-online.target" + "postgresql.service" + ]; description = "my app"; environment = { # RELEASE_TMP is used to write the state of the @@ -292,7 +314,9 @@ in Usually, we need to create a `shell.nix` file and do our development inside of the environment specified therein. Just install your version of Erlang and any other interpreters, and then use your normal build tools. As an example with Elixir: ```nix -{ pkgs ? import {} }: +{ + pkgs ? import { }, +}: with pkgs; let @@ -311,12 +335,14 @@ If you need to use an overlay to change some attributes of a derivation, e.g. if ```nix let - elixir_1_18_1_overlay = (self: super: { + elixir_1_18_1_overlay = ( + self: super: { elixir_1_18 = super.elixir_1_18.override { version = "1.18.1"; sha256 = "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="; }; - }); + } + ); pkgs = import { overlays = [ elixir_1_18_1_overlay ]; }; in with pkgs; @@ -349,9 +375,16 @@ let nodePackages.prettier ]; - inputs = basePackages ++ lib.optionals stdenv.hostPlatform.isLinux [ inotify-tools ] - ++ lib.optionals stdenv.hostPlatform.isDarwin - (with darwin.apple_sdk.frameworks; [ CoreFoundation CoreServices ]); + inputs = + basePackages + ++ lib.optionals stdenv.hostPlatform.isLinux [ inotify-tools ] + ++ lib.optionals stdenv.hostPlatform.isDarwin ( + with darwin.apple_sdk.frameworks; + [ + CoreFoundation + CoreServices + ] + ); # define shell startup command hooks = '' @@ -380,7 +413,8 @@ let export ENV_VAR="your_env_var" ''; -in mkShell { +in +mkShell { buildInputs = inputs; shellHook = hooks; } diff --git a/doc/languages-frameworks/bower.section.md b/doc/languages-frameworks/bower.section.md index 346852c49426..9e12afc68273 100644 --- a/doc/languages-frameworks/bower.section.md +++ b/doc/languages-frameworks/bower.section.md @@ -24,11 +24,15 @@ Running `bower2nix` will produce something like the following output: ```nix { fetchbower, buildEnv }: -buildEnv { name = "bower-env"; ignoreCollisions = true; paths = [ - (fetchbower "angular" "1.5.3" "~1.5.0" "1749xb0firxdra4rzadm4q9x90v6pzkbd7xmcyjk6qfza09ykk9y") - (fetchbower "bootstrap" "3.3.6" "~3.3.6" "1vvqlpbfcy0k5pncfjaiskj3y6scwifxygfqnw393sjfxiviwmbv") - (fetchbower "jquery" "2.2.2" "1.9.1 - 2" "10sp5h98sqwk90y4k6hbdviwqzvzwqf47r3r51pakch5ii2y7js1") -]; } +buildEnv { + name = "bower-env"; + ignoreCollisions = true; + paths = [ + (fetchbower "angular" "1.5.3" "~1.5.0" "1749xb0firxdra4rzadm4q9x90v6pzkbd7xmcyjk6qfza09ykk9y") + (fetchbower "bootstrap" "3.3.6" "~3.3.6" "1vvqlpbfcy0k5pncfjaiskj3y6scwifxygfqnw393sjfxiviwmbv") + (fetchbower "jquery" "2.2.2" "1.9.1 - 2" "10sp5h98sqwk90y4k6hbdviwqzvzwqf47r3r51pakch5ii2y7js1") + ]; +} ``` Using the `bower2nix` command line arguments, the output can be redirected to a file. A name like `bower-packages.nix` would be fine. @@ -80,8 +84,12 @@ gulp.task('build', [], function () { ### Example Full example — default.nix {#ex-buildBowerComponentsDefaultNix} ```nix -{ myWebApp ? { outPath = ./.; name = "myWebApp"; } -, pkgs ? import {} +{ + myWebApp ? { + outPath = ./.; + name = "myWebApp"; + }, + pkgs ? import { }, }: pkgs.stdenv.mkDerivation { @@ -90,7 +98,8 @@ pkgs.stdenv.mkDerivation { buildInputs = [ pkgs.nodePackages.gulp ]; - bowerComponents = pkgs.buildBowerComponents { # note 1 + bowerComponents = pkgs.buildBowerComponents { + # note 1 name = "my-web-app"; generated = ./bower-packages.nix; src = myWebApp; diff --git a/doc/languages-frameworks/chicken.section.md b/doc/languages-frameworks/chicken.section.md index d1e12e2cccbc..78a4469a8e1d 100644 --- a/doc/languages-frameworks/chicken.section.md +++ b/doc/languages-frameworks/chicken.section.md @@ -60,19 +60,23 @@ all the other eggs: ```nix let - myChickenPackages = pkgs.chickenPackages.overrideScope (self: super: { + myChickenPackages = pkgs.chickenPackages.overrideScope ( + self: super: { # The chicken package itself can be overridden to effect the whole ecosystem. # chicken = super.chicken.overrideAttrs { # src = ... # }; - chickenEggs = super.chickenEggs.overrideScope (eggself: eggsuper: { - srfi-180 = eggsuper.srfi-180.overrideAttrs { - # path to a local copy of srfi-180 - src = <...>; - }; - }); - }); + chickenEggs = super.chickenEggs.overrideScope ( + eggself: eggsuper: { + srfi-180 = eggsuper.srfi-180.overrideAttrs { + # path to a local copy of srfi-180 + src = <...>; + }; + } + ); + } + ); in # Here, `myChickenPackages.chickenEggs.json-rpc`, which depends on `srfi-180` will use # the local copy of `srfi-180`. diff --git a/doc/languages-frameworks/coq.section.md b/doc/languages-frameworks/coq.section.md index ca983eec4f0d..c08ed2bc6f43 100644 --- a/doc/languages-frameworks/coq.section.md +++ b/doc/languages-frameworks/coq.section.md @@ -54,35 +54,78 @@ It also takes other standard `mkDerivation` attributes, they are added as such, Here is a simple package example. It is a pure Coq library, thus it depends on Coq. It builds on the Mathematical Components library, thus it also takes some `mathcomp` derivations as `extraBuildInputs`. ```nix -{ lib, mkCoqDerivation, version ? null -, coq, mathcomp, mathcomp-finmap, mathcomp-bigenough }: +{ + lib, + mkCoqDerivation, + version ? null, + coq, + mathcomp, + mathcomp-finmap, + mathcomp-bigenough, +}: mkCoqDerivation { - /* namePrefix leads to e.g. `name = coq8.11-mathcomp1.11-multinomials-1.5.2` */ - namePrefix = [ "coq" "mathcomp" ]; + # namePrefix leads to e.g. `name = coq8.11-mathcomp1.11-multinomials-1.5.2` + namePrefix = [ + "coq" + "mathcomp" + ]; pname = "multinomials"; owner = "math-comp"; inherit version; - defaultVersion = with lib.versions; lib.switch [ coq.version mathcomp.version ] [ - { cases = [ (range "8.7" "8.12") (isEq "1.11") ]; out = "1.5.2"; } - { cases = [ (range "8.7" "8.11") (range "1.8" "1.10") ]; out = "1.5.0"; } - { cases = [ (range "8.7" "8.10") (range "1.8" "1.10") ]; out = "1.4"; } - { cases = [ (isEq "8.6") (range "1.6" "1.7") ]; out = "1.1"; } - ] null; + defaultVersion = + with lib.versions; + lib.switch + [ coq.version mathcomp.version ] + [ + { + cases = [ + (range "8.7" "8.12") + (isEq "1.11") + ]; + out = "1.5.2"; + } + { + cases = [ + (range "8.7" "8.11") + (range "1.8" "1.10") + ]; + out = "1.5.0"; + } + { + cases = [ + (range "8.7" "8.10") + (range "1.8" "1.10") + ]; + out = "1.4"; + } + { + cases = [ + (isEq "8.6") + (range "1.6" "1.7") + ]; + out = "1.1"; + } + ] + null; release = { "1.5.2".hash = "sha256-mjCx9XKa38Nz9E6wNK7YSqHdJ7YTua5fD3d6J4e7WpU="; "1.5.1".hash = "sha256-Q8tm0y2FQAt2V1kZYkDlHWRia/lTvXAMVjdmzEV11I4="; "1.5.0".hash = "sha256-HIK0f21G69oEW8JG46gSBde/Q2LR3GiBCv680gHbmRg="; - "1.5.0".rev = "1.5"; - "1.4".hash = "sha256-F9g3MSIr3B6UZ3p8QWjz3/Jpw9sudJ+KRlvjiHSO024="; - "1.3".hash = "sha256-BPJTlAL0ETHvLMBslE0KFVt3DNoaGuMrHt2SBGyJe1A="; - "1.2".hash = "sha256-mHXBXSLYO4BN+jfN50y/+XCx0Qq5g4Ac2Y/qlsbgAdY="; - "1.1".hash = "sha256-ejAsMQbB/LtU9j+g160VdGXULrCe9s0gBWzyhKqmCuE="; - "1.0".hash = "sha256-tZTOltEBBKWciDxDMs/Ye4Jnq/33CANrHJ4FBMPtq+I="; + "1.5.0".rev = "1.5"; + "1.4".hash = "sha256-F9g3MSIr3B6UZ3p8QWjz3/Jpw9sudJ+KRlvjiHSO024="; + "1.3".hash = "sha256-BPJTlAL0ETHvLMBslE0KFVt3DNoaGuMrHt2SBGyJe1A="; + "1.2".hash = "sha256-mHXBXSLYO4BN+jfN50y/+XCx0Qq5g4Ac2Y/qlsbgAdY="; + "1.1".hash = "sha256-ejAsMQbB/LtU9j+g160VdGXULrCe9s0gBWzyhKqmCuE="; + "1.0".hash = "sha256-tZTOltEBBKWciDxDMs/Ye4Jnq/33CANrHJ4FBMPtq+I="; }; - propagatedBuildInputs = - [ mathcomp.ssreflect mathcomp.algebra mathcomp-finmap mathcomp-bigenough ]; + propagatedBuildInputs = [ + mathcomp.ssreflect + mathcomp.algebra + mathcomp-finmap + mathcomp-bigenough + ]; meta = { description = "Coq/SSReflect Library for Monoidal Rings and Multinomials"; @@ -124,12 +167,10 @@ The `overrideCoqDerivation` function lets you easily change arguments to `mkCoqD For example, here is how you could locally add a new release of the `multinomials` library, and set the `defaultVersion` to use this release: ```nix -coqPackages.lib.overrideCoqDerivation - { - defaultVersion = "2.0"; - release."2.0".hash = "sha256-czoP11rtrIM7+OLdMisv2EF7n/IbGuwFxHiPtg3qCNM="; - } - coqPackages.multinomials +coqPackages.lib.overrideCoqDerivation { + defaultVersion = "2.0"; + release."2.0".hash = "sha256-czoP11rtrIM7+OLdMisv2EF7n/IbGuwFxHiPtg3qCNM="; +} coqPackages.multinomials ``` ### `.overrideAttrs` {#coq-overrideAttrs} @@ -140,8 +181,10 @@ For instance, here is how you could add some code to be performed in the derivat ```nix coqPackages.multinomials.overrideAttrs (oldAttrs: { - postInstall = oldAttrs.postInstall or "" + '' - echo "you can do anything you want here" - ''; + postInstall = + oldAttrs.postInstall or "" + + '' + echo "you can do anything you want here" + ''; }) ``` diff --git a/doc/languages-frameworks/crystal.section.md b/doc/languages-frameworks/crystal.section.md index 9953f357048a..5ea70319dd49 100644 --- a/doc/languages-frameworks/crystal.section.md +++ b/doc/languages-frameworks/crystal.section.md @@ -18,7 +18,7 @@ This should have generated a `shards.nix` file. Next create a Nix file for your derivation and use `pkgs.crystal.buildCrystalPackage` as follows: ```nix -with import {}; +with import { }; crystal.buildCrystalPackage rec { pname = "mint"; version = "0.5.0"; @@ -51,14 +51,17 @@ Additionally you can override the default `crystal build` options (which are cur ```nix { - crystalBinaries.mint.options = [ "--release" "--verbose" ]; + crystalBinaries.mint.options = [ + "--release" + "--verbose" + ]; } ``` Depending on the project, you might need additional steps to get it to compile successfully. In Mint's case, we need to link against openssl, so in the end the Nix file looks as follows: ```nix -with import {}; +with import { }; crystal.buildCrystalPackage rec { version = "0.5.0"; pname = "mint"; diff --git a/doc/languages-frameworks/cuda.section.md b/doc/languages-frameworks/cuda.section.md index bb394a243b79..091fc57a53a0 100644 --- a/doc/languages-frameworks/cuda.section.md +++ b/doc/languages-frameworks/cuda.section.md @@ -12,11 +12,13 @@ compatible are available as well. For example, there can be a To use one or more CUDA packages in an expression, give the expression a `cudaPackages` parameter, and in case CUDA is optional ```nix -{ config -, cudaSupport ? config.cudaSupport -, cudaPackages ? { } -, ... -}: {} +{ + config, + cudaSupport ? config.cudaSupport, + cudaPackages ? { }, + ... +}: +{ } ``` When using `callPackage`, you can choose to pass in a different variant, e.g. @@ -32,11 +34,15 @@ package set to make it the default. This guarantees you get a consistent package set. ```nix { - mypkg = let - cudaPackages = cudaPackages_11_5.overrideScope (final: prev: { - cudnn = prev.cudnn_8_3; - }); - in callPackage { inherit cudaPackages; }; + mypkg = + let + cudaPackages = cudaPackages_11_5.overrideScope ( + final: prev: { + cudnn = prev.cudnn_8_3; + } + ); + in + callPackage { inherit cudaPackages; }; } ``` diff --git a/doc/languages-frameworks/cuelang.section.md b/doc/languages-frameworks/cuelang.section.md index 70329b15fd7d..bbef29ee78a8 100644 --- a/doc/languages-frameworks/cuelang.section.md +++ b/doc/languages-frameworks/cuelang.section.md @@ -27,13 +27,11 @@ Nixpkgs provides a `pkgs.writeCueValidator` helper, which will write a validatio Here is an example: ```nix -pkgs.writeCueValidator - (pkgs.writeText "schema.cue" '' - #Def1: { - field1: string - } - '') - { document = "#Def1"; } +pkgs.writeCueValidator (pkgs.writeText "schema.cue" '' + #Def1: { + field1: string + } +'') { document = "#Def1"; } ``` - The first parameter is the Cue schema file. @@ -43,19 +41,19 @@ pkgs.writeCueValidator Another example, given the following `validator.nix` : ```nix -{ pkgs ? import {} }: +{ + pkgs ? import { }, +}: let - genericValidator = version: - pkgs.writeCueValidator - (pkgs.writeText "schema.cue" '' + genericValidator = + version: + pkgs.writeCueValidator (pkgs.writeText "schema.cue" '' #Version1: { field1: string } #Version2: #Version1 & { field1: "unused" - }'' - ) - { document = "#Version${toString version}"; }; + }'') { document = "#Version${toString version}"; }; in { validateV1 = genericValidator 1; diff --git a/doc/languages-frameworks/dart.section.md b/doc/languages-frameworks/dart.section.md index dfb456ba1941..3855cca89987 100644 --- a/doc/languages-frameworks/dart.section.md +++ b/doc/languages-frameworks/dart.section.md @@ -30,7 +30,11 @@ The `dart` commands run can be overridden through `pubGetScript` and `dartCompil Dart supports multiple [outputs types](https://dart.dev/tools/dart-compile#types-of-output), you can choose between them using `dartOutputType` (defaults to `exe`). If you want to override the binaries path or the source path they come from, you can use `dartEntryPoints`. Outputs that require a runtime will automatically be wrapped with the relevant runtime (`dartaotruntime` for `aot-snapshot`, `dart run` for `jit-snapshot` and `kernel`, `node` for `js`), this can be overridden through `dartRuntimeCommand`. ```nix -{ lib, buildDartApplication, fetchFromGitHub }: +{ + lib, + buildDartApplication, + fetchFromGitHub, +}: buildDartApplication rec { pname = "dart-sass"; @@ -101,7 +105,7 @@ See the [Dart documentation](#ssec-dart-applications) for more details on requir `flutter` in Nixpkgs always points to `flutterPackages.stable`, which is the latest packaged version. To avoid unforeseen breakage during upgrade, packages in Nixpkgs should use a specific flutter version, such as `flutter319` and `flutter322`, instead of using `flutter` directly. ```nix -{ flutter322, fetchFromGitHub }: +{ flutter322, fetchFromGitHub }: flutter322.buildFlutterApplication { pname = "firmware-updater"; diff --git a/doc/languages-frameworks/dhall.section.md b/doc/languages-frameworks/dhall.section.md index 8d85c9f1daf7..469f1a4fe3d1 100644 --- a/doc/languages-frameworks/dhall.section.md +++ b/doc/languages-frameworks/dhall.section.md @@ -90,7 +90,7 @@ buildDhallPackage { let nixpkgs = builtins.fetchTarball { - url = "https://github.com/NixOS/nixpkgs/archive/94b2848559b12a8ed1fe433084686b2a81123c99.tar.gz"; + url = "https://github.com/NixOS/nixpkgs/archive/94b2848559b12a8ed1fe433084686b2a81123c99.tar.gz"; hash = "sha256-B4Q3c6IvTLg3Q92qYa8y+i4uTaphtFdjp+Ir3QQjdN0="; }; @@ -100,15 +100,17 @@ let overlay = self: super: { dhallPackages = super.dhallPackages.override (old: { - overrides = - self.lib.composeExtensions (old.overrides or (_: _: {})) dhallOverlay; + overrides = self.lib.composeExtensions (old.overrides or (_: _: { })) dhallOverlay; }); }; - pkgs = import nixpkgs { config = {}; overlays = [ overlay ]; }; + pkgs = import nixpkgs { + config = { }; + overlays = [ overlay ]; + }; in - pkgs +pkgs ``` … which we can then build using this command: @@ -190,8 +192,7 @@ Dhall overlay like this: { dhallOverrides = self: super: { # Enable source for all Dhall packages - buildDhallPackage = - args: super.buildDhallPackage (args // { source = true; }); + buildDhallPackage = args: super.buildDhallPackage (args // { source = true; }); true = self.callPackage ./true.nix { }; }; diff --git a/doc/languages-frameworks/dotnet.section.md b/doc/languages-frameworks/dotnet.section.md index 23e3be414573..ea3448542f5d 100644 --- a/doc/languages-frameworks/dotnet.section.md +++ b/doc/languages-frameworks/dotnet.section.md @@ -6,7 +6,7 @@ For local development, it's recommended to use nix-shell to create a dotnet envi ```nix # shell.nix -with import {}; +with import { }; mkShell { name = "dotnet-env"; @@ -21,15 +21,18 @@ mkShell { It's very likely that more than one sdk will be needed on a given project. Dotnet provides several different frameworks (E.g dotnetcore, aspnetcore, etc.) as well as many versions for a given framework. Normally, dotnet is able to fetch a framework and install it relative to the executable. However, this would mean writing to the nix store in nixpkgs, which is read-only. To support the many-sdk use case, one can compose an environment using `dotnetCorePackages.combinePackages`: ```nix -with import {}; +with import { }; mkShell { name = "dotnet-env"; packages = [ - (with dotnetCorePackages; combinePackages [ - sdk_8_0 - sdk_9_0 - ]) + ( + with dotnetCorePackages; + combinePackages [ + sdk_8_0 + sdk_9_0 + ] + ) ]; } ``` @@ -137,11 +140,19 @@ When packaging a new application, you need to fetch its dependencies. Create an Here is an example `default.nix`, using some of the previously discussed arguments: ```nix -{ lib, buildDotnetModule, dotnetCorePackages, ffmpeg }: +{ + lib, + buildDotnetModule, + dotnetCorePackages, + ffmpeg, +}: let - referencedProject = import ../../bar { /* ... */ }; -in buildDotnetModule rec { + referencedProject = import ../../bar { + # ... + }; +in +buildDotnetModule rec { pname = "someDotnetApplication"; version = "0.1"; @@ -156,7 +167,7 @@ in buildDotnetModule rec { dotnet-runtime = dotnetCorePackages.runtime_8_0; executables = [ "foo" ]; # This wraps "$out/lib/$pname/foo" to `$out/bin/foo`. - executables = []; # Don't install any executables. + executables = [ ]; # Don't install any executables. packNupkg = true; # This packs the project as "foo-0.1.nupkg" at `$out/share`. diff --git a/doc/languages-frameworks/emscripten.section.md b/doc/languages-frameworks/emscripten.section.md index d1ed62d0503f..ce0956c51b02 100644 --- a/doc/languages-frameworks/emscripten.section.md +++ b/doc/languages-frameworks/emscripten.section.md @@ -41,56 +41,58 @@ One advantage is that when `pkgs.zlib` is updated, it will automatically update (pkgs.zlib.override { stdenv = pkgs.emscriptenStdenv; }).overrideAttrs -(old: rec { - buildInputs = old.buildInputs ++ [ pkg-config ]; - # we need to reset this setting! - env = (old.env or { }) // { NIX_CFLAGS_COMPILE = ""; }; - configurePhase = '' - # FIXME: Some tests require writing at $HOME - HOME=$TMPDIR - runHook preConfigure + (old: rec { + buildInputs = old.buildInputs ++ [ pkg-config ]; + # we need to reset this setting! + env = (old.env or { }) // { + NIX_CFLAGS_COMPILE = ""; + }; + configurePhase = '' + # FIXME: Some tests require writing at $HOME + HOME=$TMPDIR + runHook preConfigure - #export EMCC_DEBUG=2 - emconfigure ./configure --prefix=$out --shared + #export EMCC_DEBUG=2 + emconfigure ./configure --prefix=$out --shared - runHook postConfigure - ''; - dontStrip = true; - outputs = [ "out" ]; - buildPhase = '' - emmake make - ''; - installPhase = '' - emmake make install - ''; - checkPhase = '' - echo "================= testing zlib using node =================" + runHook postConfigure + ''; + dontStrip = true; + outputs = [ "out" ]; + buildPhase = '' + emmake make + ''; + installPhase = '' + emmake make install + ''; + checkPhase = '' + echo "================= testing zlib using node =================" - echo "Compiling a custom test" - set -x - emcc -O2 -s EMULATE_FUNCTION_POINTER_CASTS=1 test/example.c -DZ_SOLO \ - libz.so.${old.version} -I . -o example.js + echo "Compiling a custom test" + set -x + emcc -O2 -s EMULATE_FUNCTION_POINTER_CASTS=1 test/example.c -DZ_SOLO \ + libz.so.${old.version} -I . -o example.js - echo "Using node to execute the test" - ${pkgs.nodejs}/bin/node ./example.js + echo "Using node to execute the test" + ${pkgs.nodejs}/bin/node ./example.js - set +x - if [ $? -ne 0 ]; then - echo "test failed for some reason" - exit 1; - else - echo "it seems to work! very good." - fi - echo "================= /testing zlib using node =================" - ''; + set +x + if [ $? -ne 0 ]; then + echo "test failed for some reason" + exit 1; + else + echo "it seems to work! very good." + fi + echo "================= /testing zlib using node =================" + ''; - postPatch = pkgs.lib.optionalString pkgs.stdenv.hostPlatform.isDarwin '' - substituteInPlace configure \ - --replace-fail '/usr/bin/libtool' 'ar' \ - --replace-fail 'AR="libtool"' 'AR="ar"' \ - --replace-fail 'ARFLAGS="-o"' 'ARFLAGS="-r"' - ''; -}) + postPatch = pkgs.lib.optionalString pkgs.stdenv.hostPlatform.isDarwin '' + substituteInPlace configure \ + --replace-fail '/usr/bin/libtool' 'ar' \ + --replace-fail 'AR="libtool"' 'AR="ar"' \ + --replace-fail 'ARFLAGS="-o"' 'ARFLAGS="-r"' + ''; + }) ``` :::{.example #usage-2-pkgs.buildemscriptenpackage} @@ -103,8 +105,21 @@ This `xmlmirror` example features an Emscripten package that is defined complete pkgs.buildEmscriptenPackage rec { name = "xmlmirror"; - buildInputs = [ pkg-config autoconf automake libtool gnumake libxml2 nodejs openjdk json_c ]; - nativeBuildInputs = [ pkg-config zlib ]; + buildInputs = [ + pkg-config + autoconf + automake + libtool + gnumake + libxml2 + nodejs + openjdk + json_c + ]; + nativeBuildInputs = [ + pkg-config + zlib + ]; src = pkgs.fetchgit { url = "https://gitlab.com/odfplugfest/xmlmirror.git"; @@ -129,7 +144,10 @@ pkgs.buildEmscriptenPackage rec { make -f Makefile.emEnv ''; - outputs = [ "out" "doc" ]; + outputs = [ + "out" + "doc" + ]; installPhase = '' mkdir -p $out/share diff --git a/doc/languages-frameworks/gnome.section.md b/doc/languages-frameworks/gnome.section.md index 8374d55ac2f7..03b030fb7be5 100644 --- a/doc/languages-frameworks/gnome.section.md +++ b/doc/languages-frameworks/gnome.section.md @@ -96,7 +96,12 @@ Given the requirements above, the package expression would become messy quickly: --prefix XDG_DATA_DIRS : "$out/share/gsettings-schemas/${name}" \ --prefix XDG_DATA_DIRS : "${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name}" \ --prefix XDG_DATA_DIRS : "${hicolor-icon-theme}/share" \ - --prefix GI_TYPELIB_PATH : "${lib.makeSearchPath "lib/girepository-1.0" [ pango json-glib ]}" + --prefix GI_TYPELIB_PATH : "${ + lib.makeSearchPath "lib/girepository-1.0" [ + pango + json-glib + ] + }" done ''; } diff --git a/doc/languages-frameworks/gradle.section.md b/doc/languages-frameworks/gradle.section.md index 762c8003a7a7..3d648ec0ae0b 100644 --- a/doc/languages-frameworks/gradle.section.md +++ b/doc/languages-frameworks/gradle.section.md @@ -21,7 +21,10 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-ciKotTHSEcITfQYKFZ6sY2LZnXGChBJy0+eno8B3YHY="; }; - nativeBuildInputs = [ gradle makeWrapper ]; + nativeBuildInputs = [ + gradle + makeWrapper + ]; # if the package has dependencies, mitmCache must be set mitmCache = gradle.fetchDeps { @@ -72,11 +75,12 @@ The first is to add the derivation arguments required for getting the package. Using the pdftk example above: ```nix -{ lib -, stdenv -, gradle -# ... -, pdftk +{ + lib, + stdenv, + gradle, + # ... + pdftk, }: stdenv.mkDerivation (finalAttrs: { diff --git a/doc/languages-frameworks/hare.section.md b/doc/languages-frameworks/hare.section.md index 0ae8abeba45c..7dfa42311480 100644 --- a/doc/languages-frameworks/hare.section.md +++ b/doc/languages-frameworks/hare.section.md @@ -25,7 +25,8 @@ The following attributes are accepted by `hareHook`: hareHook, lib, stdenv, -}: stdenv.mkDerivation { +}: +stdenv.mkDerivation { pname = ""; version = ""; src = ""; diff --git a/doc/languages-frameworks/haskell.section.md b/doc/languages-frameworks/haskell.section.md index 9ad32a3d20fb..6790813a617b 100644 --- a/doc/languages-frameworks/haskell.section.md +++ b/doc/languages-frameworks/haskell.section.md @@ -487,7 +487,7 @@ so: ```nix let - pkgs = import {}; + pkgs = import { }; inherit (pkgs) haskell; inherit (haskell.lib.compose) overrideCabal; @@ -511,7 +511,7 @@ let previousIntermediates = turtle-full-build-with-incremental-output.intermediates; }) turtle; in - turtle-incremental-build +turtle-incremental-build ``` ## Development environments {#haskell-development-environments} @@ -590,7 +590,9 @@ that: ```nix # Retrieve nixpkgs impurely from NIX_PATH for now, you can pin it instead, of course. -{ pkgs ? import {} }: +{ + pkgs ? import { }, +}: # use the nixpkgs default haskell package set pkgs.haskellPackages.callPackage ./my-project.nix { } @@ -654,7 +656,9 @@ Say our example above depends on `distribution-nixpkgs` and we have a project file set up for both, we can add the following `shell.nix` expression: ```nix -{ pkgs ? import {} }: +{ + pkgs ? import { }, +}: pkgs.haskellPackages.shellFor { packages = hpkgs: [ @@ -703,7 +707,12 @@ linked to work reliably. You can override the list of supported GHC versions with e.g. ```nix -pkgs.haskell-language-server.override { supportedGhcVersions = [ "90" "94" ]; } +pkgs.haskell-language-server.override { + supportedGhcVersions = [ + "90" + "94" + ]; +} ``` Where all strings `version` are allowed such that `haskell.packages.ghc${version}` is an existing package set. @@ -886,11 +895,9 @@ for this to work. derivation: ```nix - pkgs.haskell.lib.overrideCabal - (pkgs.haskell.lib.justStaticExecutables my-haskell-package) - (drv: { - disallowGhcReference = false; - }) + pkgs.haskell.lib.overrideCabal (pkgs.haskell.lib.justStaticExecutables my-haskell-package) (drv: { + disallowGhcReference = false; + }) ``` Then use `strings` to determine which libraries are responsible: @@ -906,14 +913,12 @@ for this to work. Finally, use `remove-references-to` to delete those store paths from the produced output: ```nix - pkgs.haskell.lib.overrideCabal - (pkgs.haskell.lib.justStaticExecutables my-haskell-package) - (drv: { - postInstall = '' - ${drv.postInstall or ""} - remove-references-to -t ${pkgs.haskellPackages.hs-opentelemetry-sdk} - ''; - }) + pkgs.haskell.lib.overrideCabal (pkgs.haskell.lib.justStaticExecutables my-haskell-package) (drv: { + postInstall = '' + ${drv.postInstall or ""} + remove-references-to -t ${pkgs.haskellPackages.hs-opentelemetry-sdk} + ''; + }) ``` [164630]: https://github.com/NixOS/nixpkgs/issues/164630 @@ -1122,12 +1127,20 @@ Haskell packages using [import from derivation][import-from-derivation]. ```nix # cabal get mtl-2.2.1 && cd mtl-2.2.1 && cabal2nix . -{ mkDerivation, base, lib, transformers }: +{ + mkDerivation, + base, + lib, + transformers, +}: mkDerivation { pname = "mtl"; version = "2.2.1"; src = ./.; - libraryHaskellDepends = [ base transformers ]; + libraryHaskellDepends = [ + base + transformers + ]; homepage = "http://github.com/ekmett/mtl"; description = "Monad classes, using functional dependencies"; license = lib.licenses.bsd3; @@ -1274,60 +1287,69 @@ in # recommended to only use such an overlay if you are enabling profiling on a # platform that doesn't by default, because compiling GHC from scratch is # quite expensive. - (final: prev: - let - inherit (final) lib; - in + ( + final: prev: + let + inherit (final) lib; + in - { - haskell = prev.haskell // { - compiler = prev.haskell.compiler // { - ${ghcName} = prev.haskell.compiler.${ghcName}.override { - # Unfortunately, the GHC setting is named differently for historical reasons - enableProfiledLibs = enableProfiling; - }; - }; - }; - }) - - (final: prev: - let - inherit (final) lib; - haskellLib = final.haskell.lib.compose; - in - - { - haskell = prev.haskell // { - packages = prev.haskell.packages // { - ${ghcName} = prev.haskell.packages.${ghcName}.override { - overrides = hfinal: hprev: { - mkDerivation = args: hprev.mkDerivation (args // { - # Since we are forcing our ideas upon mkDerivation, this change will - # affect every package in the package set. - enableLibraryProfiling = enableProfiling; - - # To actually use profiling on an executable, executable profiling - # needs to be enabled for the executable you want to profile. You - # can either do this globally or… - enableExecutableProfiling = enableProfiling; - }); - - # …only for the package that contains an executable you want to profile. - # That saves on unnecessary rebuilds for packages that you only depend - # on for their library, but also contain executables (e.g. pandoc). - my-executable = haskellLib.enableExecutableProfiling hprev.my-executable; - - # If you are disabling profiling to save on build time, but want to - # retain the ability to substitute from the binary cache. Drop the - # override for mkDerivation above and instead have an override like - # this for the specific packages you are building locally and want - # to make cheaper to build. - my-library = haskellLib.disableLibraryProfiling hprev.my-library; + { + haskell = prev.haskell // { + compiler = prev.haskell.compiler // { + ${ghcName} = prev.haskell.compiler.${ghcName}.override { + # Unfortunately, the GHC setting is named differently for historical reasons + enableProfiledLibs = enableProfiling; }; }; }; - }; - }) + } + ) + + ( + final: prev: + let + inherit (final) lib; + haskellLib = final.haskell.lib.compose; + in + + { + haskell = prev.haskell // { + packages = prev.haskell.packages // { + ${ghcName} = prev.haskell.packages.${ghcName}.override { + overrides = hfinal: hprev: { + mkDerivation = + args: + hprev.mkDerivation ( + args + // { + # Since we are forcing our ideas upon mkDerivation, this change will + # affect every package in the package set. + enableLibraryProfiling = enableProfiling; + + # To actually use profiling on an executable, executable profiling + # needs to be enabled for the executable you want to profile. You + # can either do this globally or… + enableExecutableProfiling = enableProfiling; + } + ); + + # …only for the package that contains an executable you want to profile. + # That saves on unnecessary rebuilds for packages that you only depend + # on for their library, but also contain executables (e.g. pandoc). + my-executable = haskellLib.enableExecutableProfiling hprev.my-executable; + + # If you are disabling profiling to save on build time, but want to + # retain the ability to substitute from the binary cache. Drop the + # override for mkDerivation above and instead have an override like + # this for the specific packages you are building locally and want + # to make cheaper to build. + my-library = haskellLib.disableLibraryProfiling hprev.my-library; + }; + }; + }; + }; + } + ) ] ``` diff --git a/doc/languages-frameworks/hy.section.md b/doc/languages-frameworks/hy.section.md index 49309e4819f5..9eaa7a39fa1e 100644 --- a/doc/languages-frameworks/hy.section.md +++ b/doc/languages-frameworks/hy.section.md @@ -22,10 +22,16 @@ $ nix-shell -p "hy.withPackages (ps: with ps; [ numpy matplotlib ])" Or if you want to extend your `configuration.nix`: ```nix -{ # ... +{ + # ... environment.systemPackages = with pkgs; [ - (hy.withPackages (py-packages: with py-packages; [ numpy matplotlib ])) + (hy.withPackages ( + py-packages: with py-packages; [ + numpy + matplotlib + ] + )) ]; } ``` diff --git a/doc/languages-frameworks/idris.section.md b/doc/languages-frameworks/idris.section.md index 0fa828825749..692a6b64d69d 100644 --- a/doc/languages-frameworks/idris.section.md +++ b/doc/languages-frameworks/idris.section.md @@ -12,7 +12,12 @@ This however only provides the `prelude` and `base` libraries. To install idris ```nix self: super: { - myIdris = with self.idrisPackages; with-packages [ contrib pruviloj ]; + myIdris = + with self.idrisPackages; + with-packages [ + contrib + pruviloj + ]; } ``` @@ -68,13 +73,14 @@ prelude As an example of how a Nix expression for an Idris package can be created, here is the one for `idrisPackages.yaml`: ```nix -{ lib -, build-idris-package -, fetchFromGitHub -, contrib -, lightyear +{ + lib, + build-idris-package, + fetchFromGitHub, + contrib, + lightyear, }: -build-idris-package { +build-idris-package { name = "yaml"; version = "2018-01-25"; @@ -84,7 +90,10 @@ build-idris-package { # different from its package name here. ipkgName = "Yaml"; # Idris dependencies to provide for the build - idrisDeps = [ contrib lightyear ]; + idrisDeps = [ + contrib + lightyear + ]; src = fetchFromGitHub { owner = "Heather"; @@ -111,10 +120,10 @@ $ nix-build -E '(import {}).idrisPackages.callPackage ./yaml.nix {}' Or it's possible to use ```nix -with import {}; +with import { }; { - yaml = idrisPackages.callPackage ./yaml.nix {}; + yaml = idrisPackages.callPackage ./yaml.nix { }; } ``` @@ -134,7 +143,11 @@ For example you could set ```nix build-idris-package { - idrisBuildOptions = [ "--log" "1" "--verbose" ]; + idrisBuildOptions = [ + "--log" + "1" + "--verbose" + ]; # ... } diff --git a/doc/languages-frameworks/idris2.section.md b/doc/languages-frameworks/idris2.section.md index 3ea9b4f988f7..6350f44c8c74 100644 --- a/doc/languages-frameworks/idris2.section.md +++ b/doc/languages-frameworks/idris2.section.md @@ -9,39 +9,50 @@ Importantly, `buildIdris` does not create a single derivation but rather an attr A simple example of a fully packaged library would be the [`LSP-lib`](https://github.com/idris-community/LSP-lib) found in the `idris-community` GitHub organization. ```nix { fetchFromGitHub, idris2Packages }: -let lspLibPkg = idris2Packages.buildIdris { - ipkgName = "lsp-lib"; - src = fetchFromGitHub { - owner = "idris-community"; - repo = "LSP-lib"; - rev = "main"; - hash = "sha256-EvSyMCVyiy9jDZMkXQmtwwMoLaem1GsKVFqSGNNHHmY="; +let + lspLibPkg = idris2Packages.buildIdris { + ipkgName = "lsp-lib"; + src = fetchFromGitHub { + owner = "idris-community"; + repo = "LSP-lib"; + rev = "main"; + hash = "sha256-EvSyMCVyiy9jDZMkXQmtwwMoLaem1GsKVFqSGNNHHmY="; + }; + idrisLibraries = [ ]; }; - idrisLibraries = [ ]; -}; -in lspLibPkg.library { withSource = true; } +in +lspLibPkg.library { withSource = true; } ``` The above results in a derivation with the installed library results (with sourcecode). A slightly more involved example of a fully packaged executable would be the [`idris2-lsp`](https://github.com/idris-community/idris2-lsp) which is an Idris2 language server that uses the `LSP-lib` found above. ```nix -{ callPackage, fetchFromGitHub, idris2Packages }: +{ + callPackage, + fetchFromGitHub, + idris2Packages, +}: # Assuming the previous example lives in `lsp-lib.nix`: -let lspLib = callPackage ./lsp-lib.nix { }; - inherit (idris2Packages) idris2Api; - lspPkg = idris2Packages.buildIdris { - ipkgName = "idris2-lsp"; - src = fetchFromGitHub { - owner = "idris-community"; - repo = "idris2-lsp"; - rev = "main"; - hash = "sha256-vQTzEltkx7uelDtXOHc6QRWZ4cSlhhm5ziOqWA+aujk="; - }; - idrisLibraries = [idris2Api lspLib]; +let + lspLib = callPackage ./lsp-lib.nix { }; + inherit (idris2Packages) idris2Api; + lspPkg = idris2Packages.buildIdris { + ipkgName = "idris2-lsp"; + src = fetchFromGitHub { + owner = "idris-community"; + repo = "idris2-lsp"; + rev = "main"; + hash = "sha256-vQTzEltkx7uelDtXOHc6QRWZ4cSlhhm5ziOqWA+aujk="; }; -in lspPkg.executable + idrisLibraries = [ + idris2Api + lspLib + ]; + }; +in +lspPkg.executable ``` The above uses the default value of `withSource = false` for the `idris2Api` but could be modified to include that library's source by passing `(idris2Api { withSource = true; })` to `idrisLibraries` instead. `idris2Api` in the above derivation comes built in with `idris2Packages`. This library exposes many of the otherwise internal APIs of the Idris2 compiler. diff --git a/doc/languages-frameworks/ios.section.md b/doc/languages-frameworks/ios.section.md index eb8e2ca55326..3823b097d7a2 100644 --- a/doc/languages-frameworks/ios.section.md +++ b/doc/languages-frameworks/ios.section.md @@ -29,7 +29,7 @@ Xcode. ```nix let - pkgs = import {}; + pkgs = import { }; xcodeenv = import ./xcodeenv { inherit (pkgs) stdenv; @@ -63,7 +63,7 @@ executing the `xcodeenv.buildApp {}` function: ```nix let - pkgs = import {}; + pkgs = import { }; xcodeenv = import ./xcodeenv { inherit (pkgs) stdenv; @@ -159,7 +159,7 @@ instances: ```nix let - pkgs = import {}; + pkgs = import { }; xcodeenv = import ./xcodeenv { inherit (pkgs) stdenv; @@ -193,7 +193,7 @@ app in the requested simulator instance: ```nix let - pkgs = import {}; + pkgs = import { }; xcodeenv = import ./xcodeenv { inherit (pkgs) stdenv; diff --git a/doc/languages-frameworks/java.section.md b/doc/languages-frameworks/java.section.md index 5208a6388a32..05203c378ae9 100644 --- a/doc/languages-frameworks/java.section.md +++ b/doc/languages-frameworks/java.section.md @@ -7,7 +7,9 @@ stdenv.mkDerivation { pname = "..."; version = "..."; - src = fetchurl { /* ... */ }; + src = fetchurl { + # ... + }; nativeBuildInputs = [ ant @@ -95,7 +97,7 @@ let something = (pkgs.something.override { jre = my_jre; }); other = (pkgs.other.override { jre = my_jre; }); in - <...> +<...> ``` You can also specify what JDK your JRE should be based on, for example @@ -122,7 +124,10 @@ OpenJDK. For instance, to use the GNU Java Compiler: ```nix { - nativeBuildInputs = [ gcj ant ]; + nativeBuildInputs = [ + gcj + ant + ]; } ``` diff --git a/doc/languages-frameworks/javascript.section.md b/doc/languages-frameworks/javascript.section.md index 655f5f9db435..440e8c62adaa 100644 --- a/doc/languages-frameworks/javascript.section.md +++ b/doc/languages-frameworks/javascript.section.md @@ -117,12 +117,19 @@ After you have identified the correct system, you need to override your package For example, `dat` requires `node-gyp-build`, so we override its expression in [pkgs/development/node-packages/overrides.nix](https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/node-packages/overrides.nix): ```nix - { - dat = prev.dat.override (oldAttrs: { - buildInputs = [ final.node-gyp-build pkgs.libtool pkgs.autoconf pkgs.automake ]; - meta = oldAttrs.meta // { broken = since "12"; }; - }); - } +{ + dat = prev.dat.override (oldAttrs: { + buildInputs = [ + final.node-gyp-build + pkgs.libtool + pkgs.autoconf + pkgs.automake + ]; + meta = oldAttrs.meta // { + broken = since "12"; + }; + }); +} ``` ### Adding and Updating Javascript packages in nixpkgs {#javascript-adding-or-updating-packages} @@ -185,7 +192,11 @@ It works by utilizing npm's cache functionality -- creating a reproducible cache Here's an example: ```nix -{ lib, buildNpmPackage, fetchFromGitHub }: +{ + lib, + buildNpmPackage, + fetchFromGitHub, +}: buildNpmPackage rec { pname = "flood"; @@ -323,7 +334,9 @@ buildNpmPackage { npmRoot = ./.; fetcherOpts = { # Pass 'curlOptsList' to 'pkgs.fetchurl' while fetching 'axios' - "node_modules/axios" = { curlOptsList = [ "--verbose" ]; }; + "node_modules/axios" = { + curlOptsList = [ "--verbose" ]; + }; }; }; @@ -403,7 +416,7 @@ When packaging an application that includes a `pnpm-lock.yaml`, you need to fetc stdenv, nodejs, # This is pinned as { pnpm = pnpm_9; } - pnpm + pnpm, }: stdenv.mkDerivation (finalAttrs: { @@ -491,12 +504,12 @@ For example: ```nix { -# ... -pnpmWorkspaces = [ "@astrojs/language-server" ]; -pnpmDeps = pnpm.fetchDeps { - inherit (finalAttrs) pnpmWorkspaces; - #... -}; + # ... + pnpmWorkspaces = [ "@astrojs/language-server" ]; + pnpmDeps = pnpm.fetchDeps { + inherit (finalAttrs) pnpmWorkspaces; + #... + }; } ``` @@ -507,13 +520,13 @@ Usually in such cases, you'd want to use `pnpm --filter= bu ```nix { -buildPhase = '' - runHook preBuild + buildPhase = '' + runHook preBuild - pnpm --filter=@astrojs/language-server build + pnpm --filter=@astrojs/language-server build - runHook postBuild -''; + runHook postBuild + ''; } ``` @@ -524,13 +537,13 @@ set `prePnpmInstall` to the right commands to run. For example: ```nix { -prePnpmInstall = '' - pnpm config set dedupe-peer-dependants false -''; -pnpmDeps = pnpm.fetchDeps { - inherit (finalAttrs) prePnpmInstall; - # ... -}; + prePnpmInstall = '' + pnpm config set dedupe-peer-dependants false + ''; + pnpmDeps = pnpm.fetchDeps { + inherit (finalAttrs) prePnpmInstall; + # ... + }; } ``` @@ -690,7 +703,11 @@ To fix this we will specify different versions of build inputs to use, as well a mkYarnPackage rec { pkgConfig = { node-sass = { - buildInputs = with final;[ python libsass pkg-config ]; + buildInputs = with final; [ + python + libsass + pkg-config + ]; postInstall = '' LIBSASS_EXT=auto yarn --offline run build rm build/config.gypi diff --git a/doc/languages-frameworks/julia.section.md b/doc/languages-frameworks/julia.section.md index 4e7d9d365a39..c0b7fd8d6618 100644 --- a/doc/languages-frameworks/julia.section.md +++ b/doc/languages-frameworks/julia.section.md @@ -19,7 +19,7 @@ This function accepts a list of strings representing Julia package names. For example, you can build a Julia environment with the `Plots` package as follows. ```nix -julia.withPackages ["Plots"] +julia.withPackages [ "Plots" ] ``` Arguments can be passed using `.override`. @@ -28,7 +28,8 @@ For example: ```nix (julia.withPackages.override { precompile = false; # Turn off precompilation -}) ["Plots"] +}) + [ "Plots" ] ``` Here's a nice way to run a Julia environment with a shell one-liner: diff --git a/doc/languages-frameworks/lisp.section.md b/doc/languages-frameworks/lisp.section.md index 73f20436c76f..6682137121ee 100644 --- a/doc/languages-frameworks/lisp.section.md +++ b/doc/languages-frameworks/lisp.section.md @@ -48,7 +48,8 @@ Also one can create a `pkgs.mkShell` environment in `shell.nix`/`flake.nix`: ```nix let sbcl' = sbcl.withPackages (ps: [ ps.alexandria ]); -in mkShell { +in +mkShell { packages = [ sbcl' ]; } ``` @@ -188,10 +189,13 @@ let hash = "sha256-1Hzxt65dZvgOFIljjjlSGgKYkj+YBLwJCACi5DZsKmQ="; }; }; - sbcl' = sbcl.withOverrides (self: super: { - inherit alexandria; - }); -in sbcl'.pkgs.alexandria + sbcl' = sbcl.withOverrides ( + self: super: { + inherit alexandria; + } + ); +in +sbcl'.pkgs.alexandria ``` ## Overriding package attributes {#lisp-overriding-package-attributes} @@ -296,6 +300,9 @@ This example wraps CLISP: wrapLisp { pkg = clisp; faslExt = "fas"; - flags = ["-E" "UTF8"]; + flags = [ + "-E" + "UTF8" + ]; } ``` diff --git a/doc/languages-frameworks/lua.section.md b/doc/languages-frameworks/lua.section.md index 87bf7ce885bc..84af997df860 100644 --- a/doc/languages-frameworks/lua.section.md +++ b/doc/languages-frameworks/lua.section.md @@ -27,9 +27,14 @@ Note that nixpkgs patches the non-luajit interpreters to avoid referring to Create a file, e.g. `build.nix`, with the following expression ```nix -with import {}; +with import { }; -lua5_2.withPackages (ps: with ps; [ busted luafilesystem ]) +lua5_2.withPackages ( + ps: with ps; [ + busted + luafilesystem + ] +) ``` and install it in your profile with @@ -46,11 +51,18 @@ If you prefer to, you could also add the environment as a package override to th using `config.nix`, ```nix -{ # ... +{ + # ... - packageOverrides = pkgs: with pkgs; { - myLuaEnv = lua5_2.withPackages (ps: with ps; [ busted luafilesystem ]); - }; + packageOverrides = + pkgs: with pkgs; { + myLuaEnv = lua5_2.withPackages ( + ps: with ps; [ + busted + luafilesystem + ] + ); + }; } ``` @@ -67,10 +79,16 @@ the `nixpkgs` channel was used. For the sake of completeness, here's another example how to install the environment system-wide. ```nix -{ # ... +{ + # ... environment.systemPackages = with pkgs; [ - (lua.withPackages(ps: with ps; [ busted luafilesystem ])) + (lua.withPackages ( + ps: with ps; [ + busted + luafilesystem + ] + )) ]; } ``` @@ -80,13 +98,12 @@ For the sake of completeness, here's another example how to install the environm Use the following overlay template: ```nix -final: prev: -{ +final: prev: { lua = prev.lua.override { packageOverrides = luaself: luaprev: { - luarocks-nix = luaprev.luarocks-nix.overrideAttrs(oa: { + luarocks-nix = luaprev.luarocks-nix.overrideAttrs (oa: { pname = "luarocks-nix"; src = /home/my_luarocks/repository; }); @@ -159,7 +176,11 @@ within a `toLuaModule` call, for instance ```nix { - mynewlib = toLuaModule ( stdenv.mkDerivation { /* ... */ }); + mynewlib = toLuaModule ( + stdenv.mkDerivation { + # ... + } + ); } ``` @@ -194,16 +215,23 @@ The following is an example: version = "34.0.4-1"; src = fetchurl { - url = "https://raw.githubusercontent.com/rocks-moonscript-org/moonrocks-mirror/master/luaposix-34.0.4-1.src.rock"; + url = "https://raw.githubusercontent.com/rocks-moonscript-org/moonrocks-mirror/master/luaposix-34.0.4-1.src.rock"; hash = "sha256-4mLJG8n4m6y4Fqd0meUDfsOb9RHSR0qa/KD5KCwrNXs="; }; disabled = (luaOlder "5.1") || (luaAtLeast "5.4"); - propagatedBuildInputs = [ bit32 lua std_normalize ]; + propagatedBuildInputs = [ + bit32 + lua + std_normalize + ]; meta = { homepage = "https://github.com/luaposix/luaposix/"; description = "Lua bindings for POSIX"; - maintainers = with lib.maintainers; [ vyp lblasc ]; + maintainers = with lib.maintainers; [ + vyp + lblasc + ]; license.fullName = "MIT/X11"; }; }; @@ -242,14 +270,14 @@ The `lua.withPackages` takes a function as an argument that is passed the set of Using the `withPackages` function, the previous example for the luafilesystem environment can be written like this: ```nix -lua.withPackages (ps: [ps.luafilesystem]) +lua.withPackages (ps: [ ps.luafilesystem ]) ``` `withPackages` passes the correct package set for the specific interpreter version as an argument to the function. In the above example, `ps` equals `luaPackages`. But you can also easily switch to using `lua5_1`: ```nix -lua5_1.withPackages (ps: [ps.lua]) +lua5_1.withPackages (ps: [ ps.lua ]) ``` Now, `ps` is set to `lua5_1.pkgs`, matching the version of the interpreter. diff --git a/doc/languages-frameworks/maven.section.md b/doc/languages-frameworks/maven.section.md index 548e2162484d..1689ad1580a7 100644 --- a/doc/languages-frameworks/maven.section.md +++ b/doc/languages-frameworks/maven.section.md @@ -9,7 +9,13 @@ The following provides a list of common patterns with how to package a Maven pro Consider the following package: ```nix -{ lib, fetchFromGitHub, jre, makeWrapper, maven }: +{ + lib, + fetchFromGitHub, + jre, + makeWrapper, + maven, +}: maven.buildMavenPackage rec { pname = "jd-cli"; @@ -246,7 +252,9 @@ This file is then given to the `buildMaven` function, and it returns 2 attribute Here is an [example](https://github.com/fzakaria/nixos-maven-example/blob/main/build-maven-repository.nix) of building the Maven repository ```nix -{ pkgs ? import { } }: +{ + pkgs ? import { }, +}: with pkgs; (buildMaven ./project-info.json).repo ``` @@ -283,7 +291,11 @@ Traditionally the Maven repository is at `~/.m2/repository`. We will override th ::: ```nix -{ lib, stdenv, maven }: +{ + lib, + stdenv, + maven, +}: stdenv.mkDerivation { name = "maven-repository"; buildInputs = [ maven ]; @@ -337,10 +349,16 @@ If your package uses _SNAPSHOT_ dependencies or _version ranges_; there is a str Regardless of which strategy is chosen above, the step to build the derivation is the same. ```nix -{ stdenv, maven, callPackage }: +{ + stdenv, + maven, + callPackage, +}: # pick a repository derivation, here we will use buildMaven -let repository = callPackage ./build-maven-repository.nix { }; -in stdenv.mkDerivation rec { +let + repository = callPackage ./build-maven-repository.nix { }; +in +stdenv.mkDerivation rec { pname = "maven-demo"; version = "1.0"; @@ -393,15 +411,21 @@ We will read the Maven repository and flatten it to a single list. This list wil We make sure to provide this classpath to the `makeWrapper`. ```nix -{ stdenv, maven, callPackage, makeWrapper, jre }: +{ + stdenv, + maven, + callPackage, + makeWrapper, + jre, +}: let repository = callPackage ./build-maven-repository.nix { }; -in stdenv.mkDerivation rec { +in +stdenv.mkDerivation rec { pname = "maven-demo"; version = "1.0"; - src = builtins.fetchTarball - "https://github.com/fzakaria/nixos-maven-example/archive/main.tar.gz"; + src = builtins.fetchTarball "https://github.com/fzakaria/nixos-maven-example/archive/main.tar.gz"; nativeBuildInputs = [ makeWrapper ]; buildInputs = [ maven ]; @@ -471,15 +495,22 @@ Main-Class: Main We will modify the derivation above to add a symlink to our repository so that it's accessible to our JAR during the `installPhase`. ```nix -{ stdenv, maven, callPackage, makeWrapper, jre }: +{ + stdenv, + maven, + callPackage, + makeWrapper, + jre, +}: # pick a repository derivation, here we will use buildMaven -let repository = callPackage ./build-maven-repository.nix { }; -in stdenv.mkDerivation rec { +let + repository = callPackage ./build-maven-repository.nix { }; +in +stdenv.mkDerivation rec { pname = "maven-demo"; version = "1.0"; - src = builtins.fetchTarball - "https://github.com/fzakaria/nixos-maven-example/archive/main.tar.gz"; + src = builtins.fetchTarball "https://github.com/fzakaria/nixos-maven-example/archive/main.tar.gz"; nativeBuildInputs = [ makeWrapper ]; buildInputs = [ maven ]; diff --git a/doc/languages-frameworks/neovim.section.md b/doc/languages-frameworks/neovim.section.md index 5e2cc00c43d6..71bc52b541dc 100644 --- a/doc/languages-frameworks/neovim.section.md +++ b/doc/languages-frameworks/neovim.section.md @@ -91,8 +91,8 @@ wrapNeovimUnstable neovim-unwrapped { You can explore the configuration with`nix repl` to discover these options and override them. For instance: ```nix -neovim.overrideAttrs(oldAttrs: { - autowrapRuntimeDeps = false; +neovim.overrideAttrs (oldAttrs: { + autowrapRuntimeDeps = false; }) ``` @@ -117,9 +117,9 @@ top-level while luarocks installs them in various subfolders by default. For instance: ```nix { -rtp-nvim = neovimUtils.buildNeovimPlugin { + rtp-nvim = neovimUtils.buildNeovimPlugin { luaAttr = luaPackages.rtp-nvim; -}; + }; } ``` To update these packages, you should use the lua updater rather than vim's. diff --git a/doc/languages-frameworks/nim.section.md b/doc/languages-frameworks/nim.section.md index f0196c9d116f..ef3ecbba7d74 100644 --- a/doc/languages-frameworks/nim.section.md +++ b/doc/languages-frameworks/nim.section.md @@ -7,7 +7,11 @@ Nim programs are built using a lockfile and either `buildNimPackage` or `buildNi The following example shows a Nim program that depends only on Nim libraries: ```nix -{ lib, buildNimPackage, fetchFromGitHub }: +{ + lib, + buildNimPackage, + fetchFromGitHub, +}: buildNimPackage (finalAttrs: { pname = "ttop"; @@ -91,7 +95,9 @@ The `buildNimPackage` and `buildNimSbom` functions generate flags and additional ```nix pkgs.nitter.overrideNimAttrs { # using a different source which has different dependencies from the standard package - src = pkgs.fetchFromGithub { /* … */ }; + src = pkgs.fetchFromGithub { + # … + }; # new lock file generated from the source lockFile = ./custom-lock.json; } @@ -104,21 +110,25 @@ The default overrides are maintained as the top-level `nimOverrides` attrset at For example, to propagate a dependency on SDL2 for lockfiles that select the Nim `sdl2` library, an overlay is added to the set in the `nim-overrides.nix` file: ```nix -{ lib -/* … */ -, SDL2 -/* … */ +{ + lib, + # … + SDL2, +# … }: { - /* … */ + # … sdl2 = lockAttrs: - { buildInputs ? [ ], ... }: + { + buildInputs ? [ ], + ... + }: { buildInputs = buildInputs ++ [ SDL2 ]; }; - /* … */ + # … } ``` @@ -132,22 +142,28 @@ The `nimOverrides` attrset makes it possible to modify overrides in a few differ Override a package internal to its definition: ```nix -{ lib, buildNimPackage, nimOverrides, libressl }: +{ + lib, + buildNimPackage, + nimOverrides, + libressl, +}: let buildNimPackage' = buildNimPackage.override { nimOverrides = nimOverrides.override { openssl = libressl; }; }; -in buildNimPackage' (finalAttrs: { +in +buildNimPackage' (finalAttrs: { pname = "foo"; # … }) - ``` Override a package externally: ```nix -{ pkgs }: { +{ pkgs }: +{ foo = pkgs.foo.override { buildNimPackage = pkgs.buildNimPackage.override { nimOverrides = pkgs.nimOverrides.override { openssl = libressl; }; diff --git a/doc/languages-frameworks/ocaml.section.md b/doc/languages-frameworks/ocaml.section.md index 7f2c2a63a00b..496583d40261 100644 --- a/doc/languages-frameworks/ocaml.section.md +++ b/doc/languages-frameworks/ocaml.section.md @@ -12,13 +12,18 @@ To open a shell able to build a typical OCaml project, put the dependencies in ` For example: ```nix let - pkgs = import {}; - # choose the ocaml version you want to use - ocamlPackages = pkgs.ocaml-ng.ocamlPackages_4_12; + pkgs = import { }; + # choose the ocaml version you want to use + ocamlPackages = pkgs.ocaml-ng.ocamlPackages_4_12; in pkgs.mkShell { # build tools - nativeBuildInputs = with ocamlPackages; [ ocaml findlib dune_2 ocaml-lsp ]; + nativeBuildInputs = with ocamlPackages; [ + ocaml + findlib + dune_2 + ocaml-lsp + ]; # dependencies buildInputs = with ocamlPackages; [ ocamlgraph ]; } @@ -58,7 +63,8 @@ Here is a simple package example. generates. ```nix -{ lib, +{ + lib, fetchFromGitHub, buildDunePackage, ocaml, @@ -66,7 +72,8 @@ Here is a simple package example. alcotest, result, bigstringaf, - ppx_let }: + ppx_let, +}: buildDunePackage rec { pname = "angstrom"; @@ -75,15 +82,21 @@ buildDunePackage rec { minimalOCamlVersion = "4.04"; src = fetchFromGitHub { - owner = "inhabitedtype"; - repo = pname; - rev = version; - hash = "sha256-MK8o+iPGANEhrrTc1Kz9LBilx2bDPQt7Pp5P2libucI="; + owner = "inhabitedtype"; + repo = pname; + rev = version; + hash = "sha256-MK8o+iPGANEhrrTc1Kz9LBilx2bDPQt7Pp5P2libucI="; }; - checkInputs = [ alcotest ppx_let ]; + checkInputs = [ + alcotest + ppx_let + ]; buildInputs = [ ocaml-syntax-shims ]; - propagatedBuildInputs = [ bigstringaf result ]; + propagatedBuildInputs = [ + bigstringaf + result + ]; doCheck = lib.versionAtLeast ocaml.version "4.05"; meta = { @@ -98,7 +111,11 @@ buildDunePackage rec { Here is a second example, this time using a source archive generated with `dune-release`. It is a good idea to use this archive when it is available as it will usually contain substituted variables such as a `%%VERSION%%` field. This library does not depend on any other OCaml library and no tests are run after building it. ```nix -{ lib, fetchurl, buildDunePackage }: +{ + lib, + fetchurl, + buildDunePackage, +}: buildDunePackage rec { pname = "wtf8"; diff --git a/doc/languages-frameworks/octave.section.md b/doc/languages-frameworks/octave.section.md index 4ad2cb0d5fbf..8bb75d73f62e 100644 --- a/doc/languages-frameworks/octave.section.md +++ b/doc/languages-frameworks/octave.section.md @@ -39,7 +39,9 @@ $ nix-shell -p 'octave.withPackages (ps: with ps; [ symbolic ])' This will also work in a `shell.nix` file. ```nix -{ pkgs ? import { }}: +{ + pkgs ? import { }, +}: pkgs.mkShell { nativeBuildInputs = with pkgs; [ diff --git a/doc/languages-frameworks/perl.section.md b/doc/languages-frameworks/perl.section.md index 843d46584cdd..3683ed515d0e 100644 --- a/doc/languages-frameworks/perl.section.md +++ b/doc/languages-frameworks/perl.section.md @@ -51,7 +51,10 @@ Note the use of `mirror://cpan/`, and the `pname` and `version` in the URL defin ```nix { foo = import ../path/to/foo.nix { - inherit stdenv fetchurl /* ... */; + inherit + stdenv + fetchurl # ... + ; inherit (perlPackages) ClassC3; }; } @@ -74,7 +77,11 @@ So what does `buildPerlPackage` do? It does the following: `buildPerlPackage` is built on top of `stdenv`, so everything can be customised in the usual way. For instance, the `BerkeleyDB` module has a `preConfigure` hook to generate a configuration file used by `Makefile.PL`: ```nix -{ buildPerlPackage, fetchurl, db }: +{ + buildPerlPackage, + fetchurl, + db, +}: buildPerlPackage rec { pname = "BerkeleyDB"; @@ -104,7 +111,10 @@ Dependencies on other Perl packages can be specified in the `buildInputs` and `p hash = "sha256-ASO9rV/FzJYZ0BH572Fxm2ZrFLMZLFATJng1NuU4FHc="; }; propagatedBuildInputs = [ - ClassC3 ClassInspector TestException MROCompat + ClassC3 + ClassInspector + TestException + MROCompat ]; }; } @@ -113,7 +123,13 @@ Dependencies on other Perl packages can be specified in the `buildInputs` and `p On Darwin, if a script has too many `-Idir` flags in its first line (its “shebang line”), it will not run. This can be worked around by calling the `shortenPerlShebang` function from the `postInstall` phase: ```nix -{ lib, stdenv, buildPerlPackage, fetchurl, shortenPerlShebang }: +{ + lib, + stdenv, + buildPerlPackage, + fetchurl, + shortenPerlShebang, +}: { ImageExifTool = buildPerlPackage { diff --git a/doc/languages-frameworks/php.section.md b/doc/languages-frameworks/php.section.md index 1bcb4ee727a5..688e17a725b5 100644 --- a/doc/languages-frameworks/php.section.md +++ b/doc/languages-frameworks/php.section.md @@ -45,24 +45,30 @@ extensions. For example, a PHP package with all default extensions and ImageMagick enabled: ```nix -php.withExtensions ({ enabled, all }: - enabled ++ [ all.imagick ]) +php.withExtensions ({ enabled, all }: enabled ++ [ all.imagick ]) ``` To exclude some, but not all, of the default extensions, you can filter the `enabled` list like this: ```nix -php.withExtensions ({ enabled, all }: - (lib.filter (e: e != php.extensions.opcache) enabled) - ++ [ all.imagick ]) +php.withExtensions ( + { enabled, all }: (lib.filter (e: e != php.extensions.opcache) enabled) ++ [ all.imagick ] +) ``` To build your list of extensions from the ground up, you can ignore `enabled`: ```nix -php.withExtensions ({ all, ... }: with all; [ imagick opcache ]) +php.withExtensions ( + { all, ... }: + with all; + [ + imagick + opcache + ] +) ``` `php.withExtensions` provides extensions by wrapping a minimal php @@ -82,7 +88,13 @@ and ImageMagick extensions enabled, and `memory_limit` set to `256M`: ```nix php.buildEnv { - extensions = { all, ... }: with all; [ imagick opcache ]; + extensions = + { all, ... }: + with all; + [ + imagick + opcache + ]; extraConfig = "memory_limit=256M"; } ``` @@ -94,8 +106,16 @@ follows: ```nix let - myPhp = php.withExtensions ({ all, ... }: with all; [ imagick opcache ]); -in { + myPhp = php.withExtensions ( + { all, ... }: + with all; + [ + imagick + opcache + ] + ); +in +{ services.phpfpm.pools."foo".phpPackage = myPhp; } ``` @@ -103,10 +123,17 @@ in { ```nix let myPhp = php.buildEnv { - extensions = { all, ... }: with all; [ imagick opcache ]; + extensions = + { all, ... }: + with all; + [ + imagick + opcache + ]; extraConfig = "memory_limit=256M"; }; -in { +in +{ services.phpfpm.pools."foo".phpPackage = myPhp; } ``` @@ -132,9 +159,14 @@ won't work with that project unless those extensions are loaded. Example of building `composer` with additional extensions: ```nix -(php.withExtensions ({ all, enabled }: - enabled ++ (with all; [ imagick redis ])) -).packages.composer +(php.withExtensions ( + { all, enabled }: + enabled + ++ (with all; [ + imagick + redis + ]) +)).packages.composer ``` ### Overriding PHP packages {#ssec-php-user-guide-overriding-packages} @@ -148,7 +180,7 @@ php.override { packageOverrides = final: prev: { extensions = prev.extensions // { mysqlnd = prev.extensions.mysqlnd.overrideAttrs (attrs: { - patches = attrs.patches or [] ++ [ + patches = attrs.patches or [ ] ++ [ # ... ]; }); @@ -235,9 +267,13 @@ php.buildComposerProject (finalAttrs: { # PHP version containing the `ast` extension enabled php = php.buildEnv { - extensions = ({ enabled, all }: enabled ++ (with all; [ - ast - ])); + extensions = ( + { enabled, all }: + enabled + ++ (with all; [ + ast + ]) + ); }; # The composer vendor hash @@ -259,38 +295,45 @@ Here's a working code example to build a PHP library using `mkDerivation` and separate functions and hooks: ```nix -{ stdenvNoCC, fetchFromGitHub, php }: +{ + stdenvNoCC, + fetchFromGitHub, + php, +}: -stdenvNoCC.mkDerivation (finalAttrs: -let - src = fetchFromGitHub { - owner = "git-owner"; - repo = "git-repo"; - rev = finalAttrs.version; - hash = "sha256-VcQRSss2dssfkJ+iUb5qT+FJ10GHiFDzySigcmuVI+8="; - }; -in { - inherit src; - pname = "php-app"; - version = "1.0.0"; +stdenvNoCC.mkDerivation ( + finalAttrs: + let + src = fetchFromGitHub { + owner = "git-owner"; + repo = "git-repo"; + rev = finalAttrs.version; + hash = "sha256-VcQRSss2dssfkJ+iUb5qT+FJ10GHiFDzySigcmuVI+8="; + }; + in + { + inherit src; + pname = "php-app"; + version = "1.0.0"; - buildInputs = [ php ]; + buildInputs = [ php ]; - nativeBuildInputs = [ - php.packages.composer - # This hook will use the attribute `composerRepository` - php.composerHooks.composerInstallHook - ]; + nativeBuildInputs = [ + php.packages.composer + # This hook will use the attribute `composerRepository` + php.composerHooks.composerInstallHook + ]; - composerRepository = php.mkComposerRepository { - inherit (finalAttrs) pname version src; - composerNoDev = true; - composerNoPlugins = true; - composerNoScripts = true; - # Specifying a custom composer.lock since it is not present in the sources. - composerLock = ./composer.lock; - # The composer vendor hash - vendorHash = "sha256-86s/F+/5cBAwBqZ2yaGRM5rTGLmou5//aLRK5SA0WiQ="; - }; -}) + composerRepository = php.mkComposerRepository { + inherit (finalAttrs) pname version src; + composerNoDev = true; + composerNoPlugins = true; + composerNoScripts = true; + # Specifying a custom composer.lock since it is not present in the sources. + composerLock = ./composer.lock; + # The composer vendor hash + vendorHash = "sha256-86s/F+/5cBAwBqZ2yaGRM5rTGLmou5//aLRK5SA0WiQ="; + }; + } +) ``` diff --git a/doc/languages-frameworks/pkg-config.section.md b/doc/languages-frameworks/pkg-config.section.md index 0b25396314cb..f788d5500c0d 100644 --- a/doc/languages-frameworks/pkg-config.section.md +++ b/doc/languages-frameworks/pkg-config.section.md @@ -17,9 +17,12 @@ A good example of all these things is miniz: { pkg-config, testers, ... }: stdenv.mkDerivation (finalAttrs: { - /* ... */ + # ... - nativeBuildInputs = [ pkg-config validatePkgConfig ]; + nativeBuildInputs = [ + pkg-config + validatePkgConfig + ]; passthru.tests.pkg-config = testers.hasPkgConfigModules { package = finalAttrs.finalPackage; @@ -27,7 +30,7 @@ stdenv.mkDerivation (finalAttrs: { }; meta = { - /* ... */ + # ... pkgConfigModules = [ "miniz" ]; }; }) diff --git a/doc/languages-frameworks/python.section.md b/doc/languages-frameworks/python.section.md index c38c14e763b0..119e19f71877 100644 --- a/doc/languages-frameworks/python.section.md +++ b/doc/languages-frameworks/python.section.md @@ -78,24 +78,25 @@ using setup hooks. The following is an example: ```nix -{ lib -, buildPythonPackage -, fetchPypi +{ + lib, + buildPythonPackage, + fetchPypi, -# build-system -, setuptools -, setuptools-scm + # build-system + setuptools, + setuptools-scm, -# dependencies -, attrs -, pluggy -, py -, setuptools -, six + # dependencies + attrs, + pluggy, + py, + setuptools, + six, -# tests -, hypothesis - }: + # tests + hypothesis, +}: buildPythonPackage rec { pname = "pytest"; @@ -134,7 +135,12 @@ buildPythonPackage rec { description = "Framework for writing tests"; homepage = "https://github.com/pytest-dev/pytest"; license = lib.licenses.mit; - maintainers = with lib.maintainers; [ domenkozar lovek323 madjar lsix ]; + maintainers = with lib.maintainers; [ + domenkozar + lovek323 + madjar + lsix + ]; }; } ``` @@ -231,23 +237,31 @@ override first the Python interpreter and pass `packageOverrides` which contains the overrides for packages in the package set. ```nix -with import {}; +with import { }; -(let - python = let - packageOverrides = self: super: { - pandas = super.pandas.overridePythonAttrs(old: rec { - version = "0.19.1"; - src = fetchPypi { - pname = "pandas"; - inherit version; - hash = "sha256-JQn+rtpy/OA2deLszSKEuxyttqBzcAil50H+JDHUdCE="; +( + let + python = + let + packageOverrides = self: super: { + pandas = super.pandas.overridePythonAttrs (old: rec { + version = "0.19.1"; + src = fetchPypi { + pname = "pandas"; + inherit version; + hash = "sha256-JQn+rtpy/OA2deLszSKEuxyttqBzcAil50H+JDHUdCE="; + }; + }); }; - }); - }; - in pkgs.python3.override {inherit packageOverrides; self = python;}; + in + pkgs.python3.override { + inherit packageOverrides; + self = python; + }; -in python.withPackages(ps: [ ps.blaze ])).env + in + python.withPackages (ps: [ ps.blaze ]) +).env ``` The next example shows a non trivial overriding of the `blas` implementation to @@ -258,12 +272,16 @@ be used through out all of the Python package set: python3MyBlas = pkgs.python3.override { packageOverrides = self: super: { # We need toPythonModule for the package set to evaluate this - blas = super.toPythonModule(super.pkgs.blas.override { - blasProvider = super.pkgs.mkl; - }); - lapack = super.toPythonModule(super.pkgs.lapack.override { - lapackProvider = super.pkgs.mkl; - }); + blas = super.toPythonModule ( + super.pkgs.blas.override { + blasProvider = super.pkgs.mkl; + } + ); + lapack = super.toPythonModule ( + super.pkgs.lapack.override { + lapackProvider = super.pkgs.mkl; + } + ); }; }; } @@ -290,9 +308,10 @@ called with `callPackage` and passed `python3` or `python3Packages` (possibly specifying an interpreter version), like this: ```nix -{ lib -, python3Packages -, fetchPypi +{ + lib, + python3Packages, + fetchPypi, }: python3Packages.buildPythonApplication rec { @@ -302,7 +321,7 @@ python3Packages.buildPythonApplication rec { src = fetchPypi { inherit pname version; - hash = "sha256-Pe229rT0aHwA98s+nTHQMEFKZPo/yw6sot8MivFDvAw="; + hash = "sha256-Pe229rT0aHwA98s+nTHQMEFKZPo/yw6sot8MivFDvAw="; }; build-system = with python3Packages; [ @@ -356,10 +375,12 @@ modifications. ```nix { - opencv = toPythonModule (pkgs.opencv.override { - enablePython = true; - pythonPackages = self; - }); + opencv = toPythonModule ( + pkgs.opencv.override { + enablePython = true; + pythonPackages = self; + } + ); } ``` @@ -394,8 +415,10 @@ The `build-system`'s provided will instead become runtime dependencies of the ed Note that overriding packages deeper in the dependency graph _can_ work, but it's not the primary use case and overriding existing packages can make others break in unexpected ways. -``` nix -{ pkgs ? import { } }: +```nix +{ + pkgs ? import { }, +}: let pyproject = pkgs.lib.importTOML ./pyproject.toml; @@ -418,9 +441,10 @@ let }; }; - pythonEnv = myPython.withPackages (ps: [ ps.my-editable ]); + pythonEnv = myPython.withPackages (ps: [ ps.my-editable ]); -in pkgs.mkShell { +in +pkgs.mkShell { packages = [ pythonEnv ]; } ``` @@ -432,7 +456,7 @@ This example shows how to create an environment that has the Pyramid Web Framewo Saving the following as `default.nix` ```nix -with import {}; +with import { }; python3.buildEnv.override { extraLibs = [ python3Packages.pyramid ]; @@ -453,7 +477,7 @@ packages installed. This is somewhat comparable to `virtualenv`. For example, running `nix-shell` with the following `shell.nix` ```nix -with import {}; +with import { }; (python3.buildEnv.override { extraLibs = with python3Packages; [ @@ -483,7 +507,7 @@ of the packages to be included in the environment. Using the [`withPackages`](#p example for the Pyramid Web Framework environment can be written like this: ```nix -with import {}; +with import { }; python.withPackages (ps: [ ps.pyramid ]) ``` @@ -493,7 +517,7 @@ version as an argument to the function. In the above example, `ps` equals `pythonPackages`. But you can also easily switch to using python3: ```nix -with import {}; +with import { }; python3.withPackages (ps: [ ps.pyramid ]) ``` @@ -505,12 +529,14 @@ supports the `env` attribute. The `shell.nix` file from the previous section can thus be also written like this: ```nix -with import {}; +with import { }; -(python3.withPackages (ps: with ps; [ - numpy - requests -])).env +(python3.withPackages ( + ps: with ps; [ + numpy + requests + ] +)).env ``` In contrast to [`python.buildEnv`](#python.buildenv-function), [`python.withPackages`](#python.withpackages-function) does not support the @@ -758,11 +784,13 @@ Say we want to have Python 3.12, `numpy` and `toolz`, like before, in an environment. We can add a `shell.nix` file describing our dependencies: ```nix -with import {}; -(python312.withPackages (ps: with ps; [ - numpy - toolz -])).env +with import { }; +(python312.withPackages ( + ps: with ps; [ + numpy + toolz + ] +)).env ``` And then at the command line, just typing `nix-shell` produces the same @@ -785,13 +813,14 @@ What's happening here? To combine this with `mkShell` you can: ```nix -with import {}; +with import { }; let pythonEnv = python312.withPackages (ps: [ ps.numpy ps.toolz ]); -in mkShell { +in +mkShell { packages = [ pythonEnv @@ -868,10 +897,16 @@ For the sake of completeness, here's how to install the environment system-wide on NixOS. ```nix -{ # ... +{ + # ... environment.systemPackages = with pkgs; [ - (python310.withPackages(ps: with ps; [ numpy toolz ])) + (python310.withPackages ( + ps: with ps; [ + numpy + toolz + ] + )) ]; } ``` @@ -891,10 +926,11 @@ building Python libraries is [`buildPythonPackage`](#buildpythonpackage-function `toolz` package. ```nix -{ lib -, buildPythonPackage -, fetchPypi -, setuptools +{ + lib, + buildPythonPackage, + fetchPypi, + setuptools, }: buildPythonPackage rec { @@ -952,9 +988,10 @@ The following expression creates a derivation for the `toolz` package, and adds it along with a `numpy` package to a Python environment. ```nix -with import {}; +with import { }; -( let +( + let my_toolz = python312.pkgs.buildPythonPackage rec { pname = "toolz"; version = "0.10.0"; @@ -979,10 +1016,13 @@ with import {}; }; }; - in python312.withPackages (ps: with ps; [ - numpy - my_toolz - ]) + in + python312.withPackages ( + ps: with ps; [ + numpy + my_toolz + ] + ) ).env ``` @@ -1014,18 +1054,21 @@ The following example shows which arguments are given to [`buildPythonPackage`]( order to build [`datashape`](https://github.com/blaze/datashape). ```nix -{ lib -, buildPythonPackage -, fetchPypi +{ + lib, + buildPythonPackage, + fetchPypi, -# build dependencies -, setuptools + # build dependencies + setuptools, -# dependencies -, numpy, multipledispatch, python-dateutil + # dependencies + numpy, + multipledispatch, + python-dateutil, -# tests -, pytestCheckHook + # tests + pytestCheckHook, }: buildPythonPackage rec { @@ -1072,12 +1115,13 @@ Python bindings to `libxml2` and `libxslt`. These libraries are only required when building the bindings and are therefore added as [`buildInputs`](#var-stdenv-buildInputs). ```nix -{ lib -, buildPythonPackage -, fetchPypi -, setuptools -, libxml2 -, libxslt +{ + lib, + buildPythonPackage, + fetchPypi, + setuptools, + libxml2, + libxslt, }: buildPythonPackage rec { @@ -1128,19 +1172,20 @@ The bindings don't expect to find each of them in a different folder, and therefore we have to set `LDFLAGS` and `CFLAGS`. ```nix -{ lib -, buildPythonPackage -, fetchPypi +{ + lib, + buildPythonPackage, + fetchPypi, -# build dependencies -, setuptools + # build dependencies + setuptools, -# dependencies -, fftw -, fftwFloat -, fftwLongDouble -, numpy -, scipy + # dependencies + fftw, + fftwFloat, + fftwLongDouble, + numpy, + scipy, }: buildPythonPackage rec { @@ -1182,7 +1227,10 @@ buildPythonPackage rec { changelog = "https://github.com/pyFFTW/pyFFTW/releases/tag/v${version}"; description = "Pythonic wrapper around FFTW, the FFT library, presenting a unified interface for all the supported transforms"; homepage = "http://hgomersall.github.com/pyFFTW"; - license = with lib.licenses; [ bsd2 bsd3 ]; + license = with lib.licenses; [ + bsd2 + bsd3 + ]; }; } ``` @@ -1360,17 +1408,20 @@ This is especially helpful to select tests or specify flags conditionally: ```nix { - disabledTests = [ - # touches network - "download" - "update" - ] ++ lib.optionals (pythonAtLeast "3.8") [ - # broken due to python3.8 async changes - "async" - ] ++ lib.optionals stdenv.buildPlatform.isDarwin [ - # can fail when building with other packages - "socket" - ]; + disabledTests = + [ + # touches network + "download" + "update" + ] + ++ lib.optionals (pythonAtLeast "3.8") [ + # broken due to python3.8 async changes + "async" + ] + ++ lib.optionals stdenv.buildPlatform.isDarwin [ + # can fail when building with other packages + "socket" + ]; } ``` @@ -1495,7 +1546,9 @@ automatically add `pythonRelaxDepsHook` if either `pythonRelaxDeps` or ]; unittestFlags = [ - "-s" "tests" "-v" + "-s" + "tests" + "-v" ]; } ``` @@ -1576,10 +1629,11 @@ Let's split the package definition from the environment definition. We first create a function that builds `toolz` in `~/path/to/toolz/release.nix` ```nix -{ lib -, buildPythonPackage -, fetchPypi -, setuptools +{ + lib, + buildPythonPackage, + fetchPypi, + setuptools, }: buildPythonPackage rec { @@ -1609,13 +1663,15 @@ It takes an argument [`buildPythonPackage`](#buildpythonpackage-function). We no `callPackage` in the definition of our environment ```nix -with import {}; +with import { }; -( let +( + let toolz = callPackage /path/to/toolz/release.nix { buildPythonPackage = python3Packages.buildPythonPackage; }; - in python3.withPackages (ps: [ + in + python3.withPackages (ps: [ ps.numpy toolz ]) @@ -1643,20 +1699,27 @@ We can override the interpreter and pass `packageOverrides`. In the following example we rename the `pandas` package and build it. ```nix -with import {}; +with import { }; -(let - python = let - packageOverrides = self: super: { - pandas = super.pandas.overridePythonAttrs(old: {name="foo";}); - }; - in pkgs.python310.override { - inherit packageOverrides; - }; +( + let + python = + let + packageOverrides = self: super: { + pandas = super.pandas.overridePythonAttrs (old: { + name = "foo"; + }); + }; + in + pkgs.python310.override { + inherit packageOverrides; + }; -in python.withPackages (ps: [ - ps.pandas -])).env + in + python.withPackages (ps: [ + ps.pandas + ]) +).env ``` Using `nix-build` on this expression will build an environment that contains the @@ -1670,17 +1733,20 @@ environment that uses it. All packages in the Python package set will now use the updated `scipy` version. ```nix -with import {}; +with import { }; -( let +( + let packageOverrides = self: super: { scipy = super.scipy_0_17; }; - in (pkgs.python310.override { + in + (pkgs.python310.override { inherit packageOverrides; - }).withPackages (ps: [ - ps.blaze - ]) + }).withPackages + (ps: [ + ps.blaze + ]) ).env ``` @@ -1692,15 +1758,22 @@ If you want the whole of Nixpkgs to use your modifications, then you can use ```nix let - pkgs = import {}; - newpkgs = import pkgs.path { overlays = [ (self: super: { - python310 = let - packageOverrides = python-self: python-super: { - numpy = python-super.numpy_1_18; - }; - in super.python310.override {inherit packageOverrides;}; - } ) ]; }; -in newpkgs.inkscape + pkgs = import { }; + newpkgs = import pkgs.path { + overlays = [ + (self: super: { + python310 = + let + packageOverrides = python-self: python-super: { + numpy = python-super.numpy_1_18; + }; + in + super.python310.override { inherit packageOverrides; }; + }) + ]; + }; +in +newpkgs.inkscape ``` ### `python setup.py bdist_wheel` cannot create .whl {#python-setup.py-bdist_wheel-cannot-create-.whl} @@ -1790,7 +1863,8 @@ with import { }; let pythonPackages = python3Packages; -in pkgs.mkShell rec { +in +pkgs.mkShell rec { name = "impurePythonEnv"; venvDir = "./.venv"; buildInputs = [ @@ -1845,7 +1919,8 @@ with import { }; let venvDir = "./.venv"; pythonPackages = python3Packages; -in pkgs.mkShell rec { +in +pkgs.mkShell rec { name = "impurePythonEnv"; buildInputs = [ pythonPackages.python @@ -1957,13 +2032,11 @@ The following overlay overrides the call to [`buildPythonPackage`](#buildpythonp ```nix final: prev: { pythonPackagesExtensions = prev.pythonPackagesExtensions ++ [ - ( - python-final: python-prev: { - foo = python-prev.foo.overridePythonAttrs (oldAttrs: { - # ... - }); - } - ) + (python-final: python-prev: { + foo = python-prev.foo.overridePythonAttrs (oldAttrs: { + # ... + }); + }) ]; } ``` @@ -1989,13 +2062,14 @@ interpreter of interest, e.g using ```nix let - pkgs = import ./. {}; + pkgs = import ./. { }; mypython = pkgs.python3.override { enableOptimizations = true; reproducibleBuild = false; self = mypython; }; -in mypython +in +mypython ``` ### How to add optional dependencies? {#python-optional-dependencies} diff --git a/doc/languages-frameworks/qt.section.md b/doc/languages-frameworks/qt.section.md index 9b3d1e054a62..cdbcb3aefb7c 100644 --- a/doc/languages-frameworks/qt.section.md +++ b/doc/languages-frameworks/qt.section.md @@ -64,14 +64,18 @@ and then create wrappers manually in `fixupPhase`, using `wrapQtApp`, which itse The `makeWrapper` arguments required for Qt are also exposed in the environment as `$qtWrapperArgs`. ```nix -{ stdenv, lib, wrapQtAppsHook }: +{ + stdenv, + lib, + wrapQtAppsHook, +}: stdenv.mkDerivation { # ... nativeBuildInputs = [ wrapQtAppsHook ]; dontWrapQtApps = true; preFixup = '' - wrapQtApp "$out/bin/myapp" --prefix PATH : /path/to/bin + wrapQtApp "$out/bin/myapp" --prefix PATH : /path/to/bin ''; } ``` diff --git a/doc/languages-frameworks/r.section.md b/doc/languages-frameworks/r.section.md index d25c5e848232..efbd170cd034 100644 --- a/doc/languages-frameworks/r.section.md +++ b/doc/languages-frameworks/r.section.md @@ -7,18 +7,22 @@ use by adding the following snippet to your $HOME/.config/nixpkgs/config.nix fil ```nix { - packageOverrides = super: let self = super.pkgs; in + packageOverrides = + super: + let + self = super.pkgs; + in { - rEnv = super.rWrapper.override { - packages = with self.rPackages; [ - devtools - ggplot2 - reshape2 - yaml - optparse - ]; - }; + rEnv = super.rWrapper.override { + packages = with self.rPackages; [ + devtools + ggplot2 + reshape2 + yaml + optparse + ]; + }; }; } ``` @@ -33,7 +37,7 @@ environment available for other contributors, you can create a `default.nix` file like so: ```nix -with import {}; +with import { }; { myProject = stdenv.mkDerivation { name = "myProject"; @@ -60,16 +64,20 @@ environment, see `rstudioWrapper`, which functions similarly to ```nix { - packageOverrides = super: let self = super.pkgs; in + packageOverrides = + super: + let + self = super.pkgs; + in { - rstudioEnv = super.rstudioWrapper.override { - packages = with self.rPackages; [ - dplyr - ggplot2 - reshape2 - ]; - }; + rstudioEnv = super.rstudioWrapper.override { + packages = with self.rPackages; [ + dplyr + ggplot2 + reshape2 + ]; + }; }; } ``` @@ -81,13 +89,17 @@ Alternatively, you can create a self-contained `shell.nix` without the need to modify any configuration files: ```nix -{ pkgs ? import {} +{ + pkgs ? import { }, }: pkgs.rstudioWrapper.override { - packages = with pkgs.rPackages; [ dplyr ggplot2 reshape2 ]; + packages = with pkgs.rPackages; [ + dplyr + ggplot2 + reshape2 + ]; } - ``` Executing `nix-shell` will then drop you into an environment equivalent to the diff --git a/doc/languages-frameworks/ruby.section.md b/doc/languages-frameworks/ruby.section.md index 41985e755188..d11078aacaf2 100644 --- a/doc/languages-frameworks/ruby.section.md +++ b/doc/languages-frameworks/ruby.section.md @@ -36,8 +36,13 @@ As explained [in the `nix-shell` section](https://nixos.org/manual/nix/stable/co Say we want to have Ruby, `nokogori`, and `pry`. Consider a `shell.nix` file with: ```nix -with import {}; -ruby.withPackages (ps: with ps; [ nokogiri pry ]) +with import { }; +ruby.withPackages ( + ps: with ps; [ + nokogiri + pry + ] +) ``` What's happening here? @@ -107,7 +112,13 @@ let name = "gems-for-some-project"; gemdir = ./.; }; -in mkShell { packages = [ gems gems.wrappedRuby ]; } +in +mkShell { + packages = [ + gems + gems.wrappedRuby + ]; +} ``` With this file in your directory, you can run `nix-shell` to build and use the gems. The important parts here are `bundlerEnv` and `wrappedRuby`. @@ -118,7 +129,12 @@ One common issue that you might have is that you have Ruby, but also `bundler` i ```nix # ... -mkShell { buildInputs = [ gems (lowPrio gems.wrappedRuby) ]; } +mkShell { + buildInputs = [ + gems + (lowPrio gems.wrappedRuby) + ]; +} ``` Sometimes a Gemfile references other files. Such as `.ruby-version` or vendored gems. When copying the Gemfile to the nix store we need to copy those files alongside. This can be done using `extraConfigPaths`. For example: @@ -148,41 +164,54 @@ Two places that allow this modification are the `ruby` derivation, or `bundlerEn Here's the `ruby` one: ```nix -{ pg_version ? "10", pkgs ? import { } }: +{ + pg_version ? "10", + pkgs ? import { }, +}: let myRuby = pkgs.ruby.override { defaultGemConfig = pkgs.defaultGemConfig // { pg = attrs: { - buildFlags = - [ "--with-pg-config=${pkgs."postgresql_${pg_version}".pg_config}/bin/pg_config" ]; + buildFlags = [ "--with-pg-config=${pkgs."postgresql_${pg_version}".pg_config}/bin/pg_config" ]; }; }; }; -in myRuby.withPackages (ps: with ps; [ pg ]) +in +myRuby.withPackages (ps: with ps; [ pg ]) ``` And an example with `bundlerEnv`: ```nix -{ pg_version ? "10", pkgs ? import { } }: +{ + pg_version ? "10", + pkgs ? import { }, +}: let gems = pkgs.bundlerEnv { name = "gems-for-some-project"; gemdir = ./.; gemConfig = pkgs.defaultGemConfig // { pg = attrs: { - buildFlags = - [ "--with-pg-config=${pkgs."postgresql_${pg_version}".pg_config}/bin/pg_config" ]; + buildFlags = [ "--with-pg-config=${pkgs."postgresql_${pg_version}".pg_config}/bin/pg_config" ]; }; }; }; -in mkShell { buildInputs = [ gems gems.wrappedRuby ]; } +in +mkShell { + buildInputs = [ + gems + gems.wrappedRuby + ]; +} ``` And finally via overlays: ```nix -{ pg_version ? "10" }: +{ + pg_version ? "10", +}: let pkgs = import { overlays = [ @@ -197,7 +226,8 @@ let }) ]; }; -in pkgs.ruby.withPackages (ps: with ps; [ pg ]) +in +pkgs.ruby.withPackages (ps: with ps; [ pg ]) ``` Then we can get whichever postgresql version we desire and the `pg` gem will always reference it correctly: @@ -278,7 +308,14 @@ Of course you could also make a custom `gemConfig` if you know exactly how to pa Here's another example: ```nix -{ lib, bundlerApp, makeWrapper, git, gnutar, gzip }: +{ + lib, + bundlerApp, + makeWrapper, + git, + gnutar, + gzip, +}: bundlerApp { pname = "r10k"; @@ -288,7 +325,13 @@ bundlerApp { nativeBuildInputs = [ makeWrapper ]; postBuild = '' - wrapProgram $out/bin/r10k --prefix PATH : ${lib.makeBinPath [ git gnutar gzip ]} + wrapProgram $out/bin/r10k --prefix PATH : ${ + lib.makeBinPath [ + git + gnutar + gzip + ] + } ''; } ``` diff --git a/doc/languages-frameworks/rust.section.md b/doc/languages-frameworks/rust.section.md index 34ac80cac998..20d8b4824620 100644 --- a/doc/languages-frameworks/rust.section.md +++ b/doc/languages-frameworks/rust.section.md @@ -22,7 +22,11 @@ or use [community maintained Rust toolchains](#using-community-maintained-rust-t Rust applications are packaged by using the `buildRustPackage` helper from `rustPlatform`: ```nix -{ lib, fetchFromGitHub, rustPlatform }: +{ + lib, + fetchFromGitHub, + rustPlatform, +}: rustPlatform.buildRustPackage rec { pname = "ripgrep"; @@ -151,11 +155,13 @@ rustPlatform.buildRustPackage { pname = "myproject"; version = "1.0.0"; - cargoLock = let - fixupLockFile = path: f (builtins.readFile path); - in { - lockFileContents = fixupLockFile ./Cargo.lock; - }; + cargoLock = + let + fixupLockFile = path: f (builtins.readFile path); + in + { + lockFileContents = fixupLockFile ./Cargo.lock; + }; # ... } @@ -234,7 +240,10 @@ rustPlatform.buildRustPackage rec { version = "1.0.0"; buildNoDefaultFeatures = true; - buildFeatures = [ "color" "net" ]; + buildFeatures = [ + "color" + "net" + ]; # disable network features in tests checkFeatures = [ "color" ]; @@ -283,7 +292,10 @@ where they are known to differ. But there are ways to customize the argument: import { crossSystem = (import ).systems.examples.armhf-embedded // { rust.rustcTarget = "thumb-crazy"; - rust.platform = { foo = ""; bar = ""; }; + rust.platform = { + foo = ""; + bar = ""; + }; }; } ``` @@ -310,7 +322,7 @@ so: ```nix rustPlatform.buildRustPackage { - /* ... */ + # ... checkType = "debug"; } ``` @@ -353,7 +365,7 @@ This can be achieved with `--skip` in `checkFlags`: ```nix rustPlatform.buildRustPackage { - /* ... */ + # ... checkFlags = [ # reason for disabling test "--skip=example::tests:example_test" @@ -370,7 +382,7 @@ adapted to be compatible with cargo-nextest. ```nix rustPlatform.buildRustPackage { - /* ... */ + # ... useNextest = true; } ``` @@ -382,7 +394,7 @@ sometimes it may be necessary to disable this so the tests run consecutively. ```nix rustPlatform.buildRustPackage { - /* ... */ + # ... dontUseCargoParallelTests = true; } ``` @@ -394,7 +406,7 @@ should be built in `debug` mode, it can be configured like so: ```nix rustPlatform.buildRustPackage { - /* ... */ + # ... buildType = "debug"; } ``` @@ -548,12 +560,13 @@ directory of the `tokenizers` project's source archive, we use `sourceRoot` to point the tooling to this directory: ```nix -{ fetchFromGitHub -, buildPythonPackage -, cargo -, rustPlatform -, rustc -, setuptools-rust +{ + fetchFromGitHub, + buildPythonPackage, + cargo, + rustPlatform, + rustc, + setuptools-rust, }: buildPythonPackage rec { @@ -568,7 +581,12 @@ buildPythonPackage rec { }; cargoDeps = rustPlatform.fetchCargoVendor { - inherit pname version src sourceRoot; + inherit + pname + version + src + sourceRoot + ; hash = "sha256-RO1m8wEd5Ic2M9q+zFHeCJWhCr4Sv3CEWd08mkxsBec="; }; @@ -593,12 +611,12 @@ following example, the crate is in `src/rust`, as specified in the path for `fetchCargoVendor`. ```nix - -{ buildPythonPackage -, fetchPypi -, rustPlatform -, setuptools-rust -, openssl +{ + buildPythonPackage, + fetchPypi, + rustPlatform, + setuptools-rust, + openssl, }: buildPythonPackage rec { @@ -632,10 +650,11 @@ builds the `retworkx` Python package. `fetchCargoVendor` and `maturinBuildHook` is used to perform the build. ```nix -{ lib -, buildPythonPackage -, rustPlatform -, fetchFromGitHub +{ + lib, + buildPythonPackage, + rustPlatform, + fetchFromGitHub, }: buildPythonPackage rec { @@ -655,7 +674,10 @@ buildPythonPackage rec { hash = "sha256-QsPCQhNZKYCAogQriQX6pBYQUDAIUsEdRX/63dAqTzg="; }; - nativeBuildInputs = with rustPlatform; [ cargoSetupHook maturinBuildHook ]; + nativeBuildInputs = with rustPlatform; [ + cargoSetupHook + maturinBuildHook + ]; # ... } @@ -666,20 +688,21 @@ buildPythonPackage rec { Some projects, especially GNOME applications, are built with the Meson Build System instead of calling Cargo directly. Using `rustPlatform.buildRustPackage` may successfully build the main program, but related files will be missing. Instead, you need to set up Cargo dependencies with `fetchCargoVendor` and `cargoSetupHook` and leave the rest to Meson. `rust` and `cargo` are still needed in `nativeBuildInputs` for Meson to use. ```nix -{ lib -, stdenv -, fetchFromGitLab -, meson -, ninja -, pkg-config -, rustPlatform -, rustc -, cargo -, wrapGAppsHook4 -, blueprint-compiler -, libadwaita -, libsecret -, tinysparql +{ + lib, + stdenv, + fetchFromGitLab, + meson, + ninja, + pkg-config, + rustPlatform, + rustc, + cargo, + wrapGAppsHook4, + blueprint-compiler, + libadwaita, + libsecret, + tinysparql, }: stdenv.mkDerivation rec { @@ -744,8 +767,8 @@ Starting from that file, one can add more overrides, to add features or build inputs by overriding the hello crate in a separate file. ```nix -with import {}; -((import ./hello.nix).hello {}).override { +with import { }; +((import ./hello.nix).hello { }).override { crateOverrides = defaultCrateOverrides // { hello = attrs: { buildInputs = [ openssl ]; }; }; @@ -764,15 +787,17 @@ the override above can be read, as in the following example, which patches the derivation: ```nix -with import {}; -((import ./hello.nix).hello {}).override { +with import { }; +((import ./hello.nix).hello { }).override { crateOverrides = defaultCrateOverrides // { - hello = attrs: lib.optionalAttrs (lib.versionAtLeast attrs.version "1.0") { - postPatch = '' - substituteInPlace lib/zoneinfo.rs \ - --replace-fail "/usr/share/zoneinfo" "${tzdata}/share/zoneinfo" - ''; - }; + hello = + attrs: + lib.optionalAttrs (lib.versionAtLeast attrs.version "1.0") { + postPatch = '' + substituteInPlace lib/zoneinfo.rs \ + --replace-fail "/usr/share/zoneinfo" "${tzdata}/share/zoneinfo" + ''; + }; }; } ``` @@ -785,10 +810,10 @@ dependencies. For instance, to override the build inputs for crate crate, we could do: ```nix -with import {}; -((import hello.nix).hello {}).override { +with import { }; +((import hello.nix).hello { }).override { crateOverrides = defaultCrateOverrides // { - libc = attrs: { buildInputs = []; }; + libc = attrs: { buildInputs = [ ]; }; }; } ``` @@ -801,27 +826,27 @@ general. A number of other parameters can be overridden: - The version of `rustc` used to compile the crate: ```nix - (hello {}).override { rust = pkgs.rust; } + (hello { }).override { rust = pkgs.rust; } ``` - Whether to build in release mode or debug mode (release mode by default): ```nix - (hello {}).override { release = false; } + (hello { }).override { release = false; } ``` - Whether to print the commands sent to `rustc` when building (equivalent to `--verbose` in cargo: ```nix - (hello {}).override { verbose = false; } + (hello { }).override { verbose = false; } ``` - Extra arguments to be passed to `rustc`: ```nix - (hello {}).override { extraRustcOpts = "-Z debuginfo=2"; } + (hello { }).override { extraRustcOpts = "-Z debuginfo=2"; } ``` - Phases, just like in any other derivation, can be specified using @@ -833,9 +858,9 @@ general. A number of other parameters can be overridden: before running the build script: ```nix - (hello {}).override { + (hello { }).override { preConfigure = '' - echo "pub const PATH=\"${hi.out}\";" >> src/path.rs" + echo "pub const PATH=\"${hi.out}\";" >> src/path.rs" ''; } ``` @@ -856,12 +881,13 @@ Using the example `hello` project above, we want to do the following: A typical `shell.nix` might look like: ```nix -with import {}; +with import { }; stdenv.mkDerivation { name = "rust-env"; nativeBuildInputs = [ - rustc cargo + rustc + cargo # Example Build-time Additional Dependencies pkg-config @@ -917,15 +943,13 @@ Here is a simple `shell.nix` that provides Rust nightly (default profile) using ```nix with import { }; let - fenix = callPackage - (fetchFromGitHub { - owner = "nix-community"; - repo = "fenix"; - # commit from: 2023-03-03 - rev = "e2ea04982b892263c4d939f1cc3bf60a9c4deaa1"; - hash = "sha256-AsOim1A8KKtMWIxG+lXh5Q4P2bhOZjoUhFWJ1EuZNNk="; - }) - { }; + fenix = callPackage (fetchFromGitHub { + owner = "nix-community"; + repo = "fenix"; + # commit from: 2023-03-03 + rev = "e2ea04982b892263c4d939f1cc3bf60a9c4deaa1"; + hash = "sha256-AsOim1A8KKtMWIxG+lXh5Q4P2bhOZjoUhFWJ1EuZNNk="; + }) { }; in mkShell { name = "rust-env"; @@ -964,8 +988,7 @@ You can also use Rust nightly to build rust packages using `makeRustPlatform`. The below snippet demonstrates invoking `buildRustPackage` with a Rust toolchain from oxalica's overlay: ```nix -with import -{ +with import { overlays = [ (import (fetchTarball "https://github.com/oxalica/rust-overlay/archive/master.tar.gz")) ]; @@ -996,8 +1019,11 @@ rustPlatform.buildRustPackage rec { meta = { description = "Fast line-oriented regex search tool, similar to ag and ack"; homepage = "https://github.com/BurntSushi/ripgrep"; - license = with lib.licenses; [ mit unlicense ]; - maintainers = with lib.maintainers; []; + license = with lib.licenses; [ + mit + unlicense + ]; + maintainers = with lib.maintainers; [ ]; }; } ``` @@ -1029,19 +1055,28 @@ with the path into which you have `git clone`d the `rustc` git repository: ```nix - (final: prev: /*lib.optionalAttrs prev.stdenv.targetPlatform.isAarch64*/ { - rust_1_72 = - lib.updateManyAttrsByPath [{ - path = [ "packages" "stable" ]; - update = old: old.overrideScope(final: prev: { - rustc-unwrapped = prev.rustc-unwrapped.overrideAttrs (_: { - src = lib.cleanSource /git/scratch/rust; - # do *not* put passthru.isReleaseTarball=true here - }); - }); - }] - prev.rust_1_72; - }) +( + final: prev: # lib.optionalAttrs prev.stdenv.targetPlatform.isAarch64 + { + rust_1_72 = lib.updateManyAttrsByPath [ + { + path = [ + "packages" + "stable" + ]; + update = + old: + old.overrideScope ( + final: prev: { + rustc-unwrapped = prev.rustc-unwrapped.overrideAttrs (_: { + src = lib.cleanSource /git/scratch/rust; + # do *not* put passthru.isReleaseTarball=true here + }); + } + ); + } + ] prev.rust_1_72; + }) ``` If the problem you're troubleshooting only manifests when diff --git a/doc/languages-frameworks/swift.section.md b/doc/languages-frameworks/swift.section.md index 88d98deeb2dd..50fbd511aca9 100644 --- a/doc/languages-frameworks/swift.section.md +++ b/doc/languages-frameworks/swift.section.md @@ -69,7 +69,13 @@ This produces some files in a directory `nix`, which will be part of your Nix expression. The next step is to write that expression: ```nix -{ stdenv, swift, swiftpm, swiftpm2nix, fetchFromGitHub }: +{ + stdenv, + swift, + swiftpm, + swiftpm2nix, + fetchFromGitHub, +}: let # Pass the generated files to the helper. @@ -90,7 +96,10 @@ stdenv.mkDerivation rec { # Including SwiftPM as a nativeBuildInput provides a buildPhase for you. # This by default performs a release build using SwiftPM, essentially: # swift build -c release - nativeBuildInputs = [ swift swiftpm ]; + nativeBuildInputs = [ + swift + swiftpm + ]; # The helper provides a configure snippet that will prepare all dependencies # in the correct place, where SwiftPM expects them. diff --git a/doc/languages-frameworks/texlive.section.md b/doc/languages-frameworks/texlive.section.md index a31a4357a22f..9256c9c38ce7 100644 --- a/doc/languages-frameworks/texlive.section.md +++ b/doc/languages-frameworks/texlive.section.md @@ -10,7 +10,13 @@ Release 23.11 ships with a new interface that will eventually replace `texlive.c - Packages cannot be used directly but must be assembled in an environment. To create or add packages to an environment, use ```nix - texliveSmall.withPackages (ps: with ps; [ collection-langkorean algorithms cm-super ]) + texliveSmall.withPackages ( + ps: with ps; [ + collection-langkorean + algorithms + cm-super + ] + ) ``` The function `withPackages` can be called multiple times to add more packages. @@ -18,12 +24,14 @@ Release 23.11 ships with a new interface that will eventually replace `texlive.c - `texlive.withPackages` uses the same logic as `buildEnv`. Only parts of a package are installed in an environment: its 'runtime' files (`tex` output), binaries (`out` output), and support files (`tlpkg` output). Moreover, man and info pages are assembled into separate `man` and `info` outputs. To add only the TeX files of a package, or its documentation (`texdoc` output), just specify the outputs: ```nix - texlive.withPackages (ps: with ps; [ - texdoc # recommended package to navigate the documentation - perlPackages.LaTeXML.tex # tex files of LaTeXML, omit binaries - cm-super - cm-super.texdoc # documentation of cm-super - ]) + texlive.withPackages ( + ps: with ps; [ + texdoc # recommended package to navigate the documentation + perlPackages.LaTeXML.tex # tex files of LaTeXML, omit binaries + cm-super + cm-super.texdoc # documentation of cm-super + ] + ) ``` - All packages distributed by TeX Live, which contains most of CTAN, are available and can be found under `texlive.pkgs`: @@ -50,7 +58,12 @@ Release 23.11 ships with a new interface that will eventually replace `texlive.c ```nix texlive.combine { - inherit (texlive) scheme-small collection-langkorean algorithms cm-super; + inherit (texlive) + scheme-small + collection-langkorean + algorithms + cm-super + ; } ``` @@ -61,8 +74,8 @@ Release 23.11 ships with a new interface that will eventually replace `texlive.c ```nix texlive.combine { # inherit (texlive) whatever-you-want; - pkgFilter = pkg: - pkg.tlType == "run" || pkg.tlType == "bin" || pkg.hasManpages || pkg.pname == "cm-super"; + pkgFilter = + pkg: pkg.tlType == "run" || pkg.tlType == "bin" || pkg.hasManpages || pkg.pname == "cm-super"; # elem tlType [ "run" "bin" "doc" "source" ] # there are also other attributes: version, name } @@ -114,14 +127,17 @@ When using `pkgFilter`, `texlive.combine` will assign `tlType` respectively `"bi Here is a (very verbose) example. See also the packages `auctex`, `eukleides`, `mftrace` for more examples. ```nix -with import {}; +with import { }; let foiltex = stdenvNoCC.mkDerivation { pname = "latex-foiltex"; version = "2.1.4b"; - outputs = [ "tex" "texdoc" ]; + outputs = [ + "tex" + "texdoc" + ]; passthru.tlDeps = with texlive; [ latex ]; srcs = [ @@ -146,7 +162,13 @@ let ''; nativeBuildInputs = [ - (texliveSmall.withPackages (ps: with ps; [ cm-super hypdoc latexmk ])) + (texliveSmall.withPackages ( + ps: with ps; [ + cm-super + hypdoc + latexmk + ] + )) # multiple-outputs.sh fails if $out is not defined (writeShellScript "force-tex-output.sh" '' out="''${tex-}" @@ -192,22 +214,24 @@ let latex_with_foiltex = texliveSmall.withPackages (_: [ foiltex ]); in - runCommand "test.pdf" { +runCommand "test.pdf" + { nativeBuildInputs = [ latex_with_foiltex ]; - } '' -cat >test.tex <test.tex < main.tex - env HOME=$(mktemp -d) lualatex -interaction=nonstopmode -output-format=pdf -output-directory=$out ./main.tex -'' +runCommandNoCC "lualatex-hello-world" + { + buildInputs = [ texliveFull ]; + } + '' + mkdir $out + echo '\documentclass{article} \begin{document} Hello world \end{document}' > main.tex + env HOME=$(mktemp -d) lualatex -interaction=nonstopmode -output-format=pdf -output-directory=$out ./main.tex + '' ``` Additionally, [the cache of a user can diverge from the nix store](https://github.com/NixOS/nixpkgs/issues/278718). diff --git a/doc/languages-frameworks/vim.section.md b/doc/languages-frameworks/vim.section.md index da139623a25c..f42995d94693 100644 --- a/doc/languages-frameworks/vim.section.md +++ b/doc/languages-frameworks/vim.section.md @@ -47,11 +47,17 @@ To store your plugins in Vim packages (the native Vim plugin manager, see `:help vim-full.customize { vimrcConfig.packages.myVimPackage = with pkgs.vimPlugins; { # loaded on launch - start = [ youcompleteme fugitive ]; + start = [ + youcompleteme + fugitive + ]; # manually loadable by calling `:packadd $plugin-name` # however, if a Vim plugin has a dependency that is not explicitly listed in # opt that dependency will always be added to start to avoid confusion. - opt = [ phpCompletion elm-vim ]; + opt = [ + phpCompletion + elm-vim + ]; # To automatically load a plugin when opening a filetype, add vimrc lines like: # autocmd FileType php :packadd phpCompletion }; @@ -63,18 +69,19 @@ The resulting package can be added to `packageOverrides` in `~/.nixpkgs/config.n ```nix { - packageOverrides = pkgs: with pkgs; { - myVim = vim-full.customize { - # `name` specifies the name of the executable and package - name = "vim-with-plugins"; - # add here code from the example section - }; - myNeovim = neovim.override { - configure = { - # add code from the example section here + packageOverrides = + pkgs: with pkgs; { + myVim = vim-full.customize { + # `name` specifies the name of the executable and package + name = "vim-with-plugins"; + # add here code from the example section + }; + myNeovim = neovim.override { + configure = { + # add code from the example section here + }; }; }; - }; } ``` @@ -100,20 +107,18 @@ let in { environment.systemPackages = [ - ( - pkgs.neovim.override { - configure = { - packages.myPlugins = with pkgs.vimPlugins; { + (pkgs.neovim.override { + configure = { + packages.myPlugins = with pkgs.vimPlugins; { start = [ vim-go # already packaged plugin easygrep # custom package ]; - opt = []; + opt = [ ]; }; # ... }; - } - ) + }) ]; } ``` @@ -129,7 +134,12 @@ plugins the following example can be used: vim-full.customize { vimrcConfig.packages.myVimPackage = with pkgs.vimPlugins; { # loaded on launch - plug.plugins = [ youcompleteme fugitive phpCompletion elm-vim ]; + plug.plugins = [ + youcompleteme + fugitive + phpCompletion + elm-vim + ]; }; } ``` @@ -147,8 +157,11 @@ Some plugins require overrides in order to function properly. Overrides are plac ```nix { - deoplete-fish = super.deoplete-fish.overrideAttrs(old: { - dependencies = with super; [ deoplete-nvim vim-fish ]; + deoplete-fish = super.deoplete-fish.overrideAttrs (old: { + dependencies = with super; [ + deoplete-nvim + vim-fish + ]; }); } ``` @@ -199,9 +212,7 @@ You can then reference the generated vim plugins via: ```nix { - myVimPlugins = pkgs.vimPlugins.extend ( - (pkgs.callPackage ./generated.nix {}) - ); + myVimPlugins = pkgs.vimPlugins.extend ((pkgs.callPackage ./generated.nix { })); } ``` diff --git a/doc/packages/cataclysm-dda.section.md b/doc/packages/cataclysm-dda.section.md index f401e9b9efa5..2e7d86f951b8 100644 --- a/doc/packages/cataclysm-dda.section.md +++ b/doc/packages/cataclysm-dda.section.md @@ -48,7 +48,7 @@ let # Unfortunately, this refers to the package before overriding and # parallel building is still disabled. - badExample = myCDDA.withMods (_: []); + badExample = myCDDA.withMods (_: [ ]); inherit (cataclysmDDA) attachPkgs pkgs wrapCDDA; @@ -66,7 +66,7 @@ in # badExample # parallel building disabled # goodExample1.withMods (_: []) # parallel building enabled -goodExample2.withMods (_: []) # parallel building enabled +goodExample2.withMods (_: [ ]) # parallel building enabled ``` ## Customizing with mods {#customizing-with-mods} @@ -75,9 +75,11 @@ To install Cataclysm DDA with mods of your choice, you can use `withMods` attribute: ```nix -cataclysm-dda.withMods (mods: with mods; [ - tileset.UndeadPeople -]) +cataclysm-dda.withMods ( + mods: with mods; [ + tileset.UndeadPeople + ] +) ``` All mods, soundpacks, and tilesets available in nixpkgs are found in @@ -88,42 +90,46 @@ in nixpkgs: ```nix let - customMods = self: super: lib.recursiveUpdate super { - # Modify existing mod - tileset.UndeadPeople = super.tileset.UndeadPeople.overrideAttrs (old: { - # If you like to apply a patch to the tileset for example - patches = [ ./path/to/your.patch ]; - }); + customMods = + self: super: + lib.recursiveUpdate super { + # Modify existing mod + tileset.UndeadPeople = super.tileset.UndeadPeople.overrideAttrs (old: { + # If you like to apply a patch to the tileset for example + patches = [ ./path/to/your.patch ]; + }); - # Add another mod - mod.Awesome = cataclysmDDA.buildMod { - modName = "Awesome"; - version = "0.x"; - src = fetchFromGitHub { - owner = "Someone"; - repo = "AwesomeMod"; - rev = "..."; - hash = "..."; + # Add another mod + mod.Awesome = cataclysmDDA.buildMod { + modName = "Awesome"; + version = "0.x"; + src = fetchFromGitHub { + owner = "Someone"; + repo = "AwesomeMod"; + rev = "..."; + hash = "..."; + }; + # Path to be installed in the unpacked source (default: ".") + modRoot = "contents/under/this/path/will/be/installed"; }; - # Path to be installed in the unpacked source (default: ".") - modRoot = "contents/under/this/path/will/be/installed"; - }; - # Add another soundpack - soundpack.Fantastic = cataclysmDDA.buildSoundPack { - # ditto - }; + # Add another soundpack + soundpack.Fantastic = cataclysmDDA.buildSoundPack { + # ditto + }; - # Add another tileset - tileset.SuperDuper = cataclysmDDA.buildTileSet { - # ditto + # Add another tileset + tileset.SuperDuper = cataclysmDDA.buildTileSet { + # ditto + }; }; - }; in -cataclysm-dda.withMods (mods: with mods.extend customMods; [ - tileset.UndeadPeople - mod.Awesome - soundpack.Fantastic - tileset.SuperDuper -]) +cataclysm-dda.withMods ( + mods: with mods.extend customMods; [ + tileset.UndeadPeople + mod.Awesome + soundpack.Fantastic + tileset.SuperDuper + ] +) ``` diff --git a/doc/packages/citrix.section.md b/doc/packages/citrix.section.md index bcf0924249bc..9b680759f461 100644 --- a/doc/packages/citrix.section.md +++ b/doc/packages/citrix.section.md @@ -28,5 +28,6 @@ let ./custom-cert-1.pem ./custom-cert-2.pem # ... ]; -in citrix_workspace.override { inherit extraCerts; } +in +citrix_workspace.override { inherit extraCerts; } ``` diff --git a/doc/packages/darwin-builder.section.md b/doc/packages/darwin-builder.section.md index 06358c790165..fb71a78d6eb3 100644 --- a/doc/packages/darwin-builder.section.md +++ b/doc/packages/darwin-builder.section.md @@ -89,58 +89,72 @@ $ sudo launchctl kickstart -k system/org.nixos.nix-daemon darwin.inputs.nixpkgs.follows = "nixpkgs"; }; - outputs = { self, darwin, nixpkgs, ... }@inputs: - let + outputs = + { + self, + darwin, + nixpkgs, + ... + }@inputs: + let - inherit (darwin.lib) darwinSystem; - system = "aarch64-darwin"; - pkgs = nixpkgs.legacyPackages."${system}"; - linuxSystem = builtins.replaceStrings [ "darwin" ] [ "linux" ] system; + inherit (darwin.lib) darwinSystem; + system = "aarch64-darwin"; + pkgs = nixpkgs.legacyPackages."${system}"; + linuxSystem = builtins.replaceStrings [ "darwin" ] [ "linux" ] system; - darwin-builder = nixpkgs.lib.nixosSystem { - system = linuxSystem; - modules = [ - "${nixpkgs}/nixos/modules/profiles/nix-builder-vm.nix" - { virtualisation = { - host.pkgs = pkgs; - darwin-builder.workingDirectory = "/var/lib/darwin-builder"; - darwin-builder.hostPort = 22; - }; - } - ]; - }; - in { - - darwinConfigurations = { - machine1 = darwinSystem { - inherit system; + darwin-builder = nixpkgs.lib.nixosSystem { + system = linuxSystem; modules = [ + "${nixpkgs}/nixos/modules/profiles/nix-builder-vm.nix" { - nix.distributedBuilds = true; - nix.buildMachines = [{ - hostName = "localhost"; - sshUser = "builder"; - sshKey = "/etc/nix/builder_ed25519"; - system = linuxSystem; - maxJobs = 4; - supportedFeatures = [ "kvm" "benchmark" "big-parallel" ]; - }]; - - launchd.daemons.darwin-builder = { - command = "${darwin-builder.config.system.build.macos-builder-installer}/bin/create-builder"; - serviceConfig = { - KeepAlive = true; - RunAtLoad = true; - StandardOutPath = "/var/log/darwin-builder.log"; - StandardErrorPath = "/var/log/darwin-builder.log"; - }; + virtualisation = { + host.pkgs = pkgs; + darwin-builder.workingDirectory = "/var/lib/darwin-builder"; + darwin-builder.hostPort = 22; }; } ]; }; - }; + in + { - }; + darwinConfigurations = { + machine1 = darwinSystem { + inherit system; + modules = [ + { + nix.distributedBuilds = true; + nix.buildMachines = [ + { + hostName = "localhost"; + sshUser = "builder"; + sshKey = "/etc/nix/builder_ed25519"; + system = linuxSystem; + maxJobs = 4; + supportedFeatures = [ + "kvm" + "benchmark" + "big-parallel" + ]; + } + ]; + + launchd.daemons.darwin-builder = { + command = "${darwin-builder.config.system.build.macos-builder-installer}/bin/create-builder"; + serviceConfig = { + KeepAlive = true; + RunAtLoad = true; + StandardOutPath = "/var/log/darwin-builder.log"; + StandardErrorPath = "/var/log/darwin-builder.log"; + }; + }; + } + ]; + }; + }; + + }; } ``` @@ -154,21 +168,21 @@ To do this, you just need to set the `virtualisation.darwin-builder.*` parameter in the example below and rebuild. ```nix - { - darwin-builder = nixpkgs.lib.nixosSystem { - system = linuxSystem; - modules = [ - "${nixpkgs}/nixos/modules/profiles/nix-builder-vm.nix" - { - virtualisation.host.pkgs = pkgs; - virtualisation.darwin-builder.diskSize = 5120; - virtualisation.darwin-builder.memorySize = 1024; - virtualisation.darwin-builder.hostPort = 33022; - virtualisation.darwin-builder.workingDirectory = "/var/lib/darwin-builder"; - } - ]; - }; - } +{ + darwin-builder = nixpkgs.lib.nixosSystem { + system = linuxSystem; + modules = [ + "${nixpkgs}/nixos/modules/profiles/nix-builder-vm.nix" + { + virtualisation.host.pkgs = pkgs; + virtualisation.darwin-builder.diskSize = 5120; + virtualisation.darwin-builder.memorySize = 1024; + virtualisation.darwin-builder.hostPort = 33022; + virtualisation.darwin-builder.workingDirectory = "/var/lib/darwin-builder"; + } + ]; + }; +} ``` You may make any other changes to your VM in this attribute set. For example, diff --git a/doc/packages/eclipse.section.md b/doc/packages/eclipse.section.md index acf34b57571a..be554de6520b 100644 --- a/doc/packages/eclipse.section.md +++ b/doc/packages/eclipse.section.md @@ -15,11 +15,13 @@ If you prefer to install plugins in a more declarative manner, then Nixpkgs also ```nix { packageOverrides = pkgs: { - myEclipse = with pkgs.eclipses; eclipseWithPlugins { - eclipse = eclipse-platform; - jvmArgs = [ "-Xmx2048m" ]; - plugins = [ plugins.color-theme ]; - }; + myEclipse = + with pkgs.eclipses; + eclipseWithPlugins { + eclipse = eclipse-platform; + jvmArgs = [ "-Xmx2048m" ]; + plugins = [ plugins.color-theme ]; + }; }; } ``` @@ -37,32 +39,34 @@ Expanding the previous example with two plugins using the above functions, we ha ```nix { packageOverrides = pkgs: { - myEclipse = with pkgs.eclipses; eclipseWithPlugins { - eclipse = eclipse-platform; - jvmArgs = [ "-Xmx2048m" ]; - plugins = [ - plugins.color-theme - (plugins.buildEclipsePlugin { - name = "myplugin1-1.0"; - srcFeature = fetchurl { - url = "http://…/features/myplugin1.jar"; - hash = "sha256-123…"; - }; - srcPlugin = fetchurl { - url = "http://…/plugins/myplugin1.jar"; - hash = "sha256-123…"; - }; - }) - (plugins.buildEclipseUpdateSite { - name = "myplugin2-1.0"; - src = fetchurl { - stripRoot = false; - url = "http://…/myplugin2.zip"; - hash = "sha256-123…"; - }; - }) - ]; - }; + myEclipse = + with pkgs.eclipses; + eclipseWithPlugins { + eclipse = eclipse-platform; + jvmArgs = [ "-Xmx2048m" ]; + plugins = [ + plugins.color-theme + (plugins.buildEclipsePlugin { + name = "myplugin1-1.0"; + srcFeature = fetchurl { + url = "http://…/features/myplugin1.jar"; + hash = "sha256-123…"; + }; + srcPlugin = fetchurl { + url = "http://…/plugins/myplugin1.jar"; + hash = "sha256-123…"; + }; + }) + (plugins.buildEclipseUpdateSite { + name = "myplugin2-1.0"; + src = fetchurl { + stripRoot = false; + url = "http://…/myplugin2.zip"; + hash = "sha256-123…"; + }; + }) + ]; + }; }; } ``` diff --git a/doc/packages/emacs.section.md b/doc/packages/emacs.section.md index 2ced251f3e46..7d02a9389099 100644 --- a/doc/packages/emacs.section.md +++ b/doc/packages/emacs.section.md @@ -6,17 +6,21 @@ The Emacs package comes with some extra helpers to make it easier to configure. ```nix { - packageOverrides = pkgs: with pkgs; { - myEmacs = emacs.pkgs.withPackages (epkgs: (with epkgs.melpaStablePackages; [ - company - counsel - flycheck - ivy - magit - projectile - use-package - ])); - }; + packageOverrides = + pkgs: with pkgs; { + myEmacs = emacs.pkgs.withPackages ( + epkgs: + (with epkgs.melpaStablePackages; [ + company + counsel + flycheck + ivy + magit + projectile + use-package + ]) + ); + }; } ``` @@ -24,76 +28,80 @@ You can install it like any other packages via `nix-env -iA myEmacs`. However, t ```nix { - packageOverrides = pkgs: with pkgs; rec { - myEmacsConfig = writeText "default.el" '' - (eval-when-compile - (require 'use-package)) + packageOverrides = + pkgs: with pkgs; rec { + myEmacsConfig = writeText "default.el" '' + (eval-when-compile + (require 'use-package)) - ;; load some packages + ;; load some packages - (use-package company - :bind ("" . company-complete) - :diminish company-mode - :commands (company-mode global-company-mode) - :defer 1 - :config - (global-company-mode)) + (use-package company + :bind ("" . company-complete) + :diminish company-mode + :commands (company-mode global-company-mode) + :defer 1 + :config + (global-company-mode)) - (use-package counsel - :commands (counsel-descbinds) - :bind (([remap execute-extended-command] . counsel-M-x) - ("C-x C-f" . counsel-find-file) - ("C-c g" . counsel-git) - ("C-c j" . counsel-git-grep) - ("C-c k" . counsel-ag) - ("C-x l" . counsel-locate) - ("M-y" . counsel-yank-pop))) + (use-package counsel + :commands (counsel-descbinds) + :bind (([remap execute-extended-command] . counsel-M-x) + ("C-x C-f" . counsel-find-file) + ("C-c g" . counsel-git) + ("C-c j" . counsel-git-grep) + ("C-c k" . counsel-ag) + ("C-x l" . counsel-locate) + ("M-y" . counsel-yank-pop))) - (use-package flycheck - :defer 2 - :config (global-flycheck-mode)) + (use-package flycheck + :defer 2 + :config (global-flycheck-mode)) - (use-package ivy - :defer 1 - :bind (("C-c C-r" . ivy-resume) - ("C-x C-b" . ivy-switch-buffer) - :map ivy-minibuffer-map - ("C-j" . ivy-call)) - :diminish ivy-mode - :commands ivy-mode - :config - (ivy-mode 1)) + (use-package ivy + :defer 1 + :bind (("C-c C-r" . ivy-resume) + ("C-x C-b" . ivy-switch-buffer) + :map ivy-minibuffer-map + ("C-j" . ivy-call)) + :diminish ivy-mode + :commands ivy-mode + :config + (ivy-mode 1)) - (use-package magit - :defer - :if (executable-find "git") - :bind (("C-x g" . magit-status) - ("C-x G" . magit-dispatch-popup)) - :init - (setq magit-completing-read-function 'ivy-completing-read)) + (use-package magit + :defer + :if (executable-find "git") + :bind (("C-x g" . magit-status) + ("C-x G" . magit-dispatch-popup)) + :init + (setq magit-completing-read-function 'ivy-completing-read)) - (use-package projectile - :commands projectile-mode - :bind-keymap ("C-c p" . projectile-command-map) - :defer 5 - :config - (projectile-global-mode)) - ''; + (use-package projectile + :commands projectile-mode + :bind-keymap ("C-c p" . projectile-command-map) + :defer 5 + :config + (projectile-global-mode)) + ''; - myEmacs = emacs.pkgs.withPackages (epkgs: (with epkgs.melpaStablePackages; [ - (runCommand "default.el" {} '' - mkdir -p $out/share/emacs/site-lisp - cp ${myEmacsConfig} $out/share/emacs/site-lisp/default.el - '') - company - counsel - flycheck - ivy - magit - projectile - use-package - ])); - }; + myEmacs = emacs.pkgs.withPackages ( + epkgs: + (with epkgs.melpaStablePackages; [ + (runCommand "default.el" { } '' + mkdir -p $out/share/emacs/site-lisp + cp ${myEmacsConfig} $out/share/emacs/site-lisp/default.el + '') + company + counsel + flycheck + ivy + magit + projectile + use-package + ]) + ); + }; } ``` @@ -108,11 +116,12 @@ let # ... }; in -((emacsPackagesFor emacs).overrideScope overrides).withPackages - (p: with p; [ +((emacsPackagesFor emacs).overrideScope overrides).withPackages ( + p: with p; [ # here both these package will use haskell-mode of our own choice ghc-mod dante - ]) + ] +) ``` } diff --git a/doc/packages/fish.section.md b/doc/packages/fish.section.md index 85b57acd1090..510d406b1ba1 100644 --- a/doc/packages/fish.section.md +++ b/doc/packages/fish.section.md @@ -42,9 +42,12 @@ way to test Fish plugins and scripts without having to alter the environment. ```nix wrapFish { - pluginPkgs = with fishPlugins; [ pure foreign-env ]; - completionDirs = []; - functionDirs = []; + pluginPkgs = with fishPlugins; [ + pure + foreign-env + ]; + completionDirs = [ ]; + functionDirs = [ ]; confDirs = [ "/path/to/some/fish/init/dir/" ]; } ``` diff --git a/doc/packages/ibus.section.md b/doc/packages/ibus.section.md index 0e379723da12..4f298db35943 100644 --- a/doc/packages/ibus.section.md +++ b/doc/packages/ibus.section.md @@ -9,7 +9,8 @@ IBus needs to be configured accordingly to activate `typing-booster`. The config On NixOS, you need to explicitly enable `ibus` with given engines before customizing your desktop to use `typing-booster`. This can be achieved using the `ibus` module: ```nix -{ pkgs, ... }: { +{ pkgs, ... }: +{ i18n.inputMethod = { enable = true; type = "ibus"; @@ -23,7 +24,12 @@ On NixOS, you need to explicitly enable `ibus` with given engines before customi The IBus engine is based on `hunspell` to support completion in many languages. By default, the dictionaries `de-de`, `en-us`, `fr-moderne` `es-es`, `it-it`, `sv-se` and `sv-fi` are in use. To add another dictionary, the package can be overridden like this: ```nix -ibus-engines.typing-booster.override { langs = [ "de-at" "en-gb" ]; } +ibus-engines.typing-booster.override { + langs = [ + "de-at" + "en-gb" + ]; +} ``` _Note: each language passed to `langs` must be an attribute name in `pkgs.hunspellDicts`._ @@ -35,7 +41,8 @@ The `ibus-engines.typing-booster` package contains a program named `emoji-picker On NixOS, it can be installed using the following expression: ```nix -{ pkgs, ... }: { +{ pkgs, ... }: +{ fonts.packages = with pkgs; [ noto-fonts-color-emoji ]; } ``` diff --git a/doc/packages/krita.section.md b/doc/packages/krita.section.md index ba427bd62ba1..f81068d73211 100644 --- a/doc/packages/krita.section.md +++ b/doc/packages/krita.section.md @@ -23,7 +23,7 @@ list of previous plugins via `pkgs.krita.binaryPlugins`: ```nix (pkgs.krita.override (old: { - binaryPlugins = old.binaryPlugins ++ [ your-plugin ]; + binaryPlugins = old.binaryPlugins ++ [ your-plugin ]; })) ``` diff --git a/doc/packages/python-tree-sitter.section.md b/doc/packages/python-tree-sitter.section.md index e314e4f18f15..6ccaa31a6283 100644 --- a/doc/packages/python-tree-sitter.section.md +++ b/doc/packages/python-tree-sitter.section.md @@ -7,16 +7,20 @@ Python bindings for Tree Sitter grammars are provided through the [py-tree-sitte For example, to experiment with the Rust grammar, you can create a shell environment with the following configuration: ```nix -{ pkgs ? {} }: +{ + pkgs ? { }, +}: pkgs.mkShell { name = "py-tree-sitter-dev-shell"; buildInputs = with pkgs; [ - (python3.withPackages (ps: with ps; [ - tree-sitter - tree-sitter-grammars.tree-sitter-rust - ])) + (python3.withPackages ( + ps: with ps; [ + tree-sitter + tree-sitter-grammars.tree-sitter-rust + ] + )) ]; } ``` diff --git a/doc/packages/urxvt.section.md b/doc/packages/urxvt.section.md index 1d40c92ed73f..e31f0756eb19 100644 --- a/doc/packages/urxvt.section.md +++ b/doc/packages/urxvt.section.md @@ -8,9 +8,15 @@ In `nixpkgs`, urxvt is provided by the package `rxvt-unicode`. It can be configu ```nix rxvt-unicode.override { - configure = { availablePlugins, ... }: { - plugins = with availablePlugins; [ perls resize-font vtwheel ]; - }; + configure = + { availablePlugins, ... }: + { + plugins = with availablePlugins; [ + perls + resize-font + vtwheel + ]; + }; } ``` @@ -20,9 +26,11 @@ In order to add plugins but also keep all default plugins installed, it is possi ```nix rxvt-unicode.override { - configure = { availablePlugins, ... }: { - plugins = (builtins.attrValues availablePlugins) ++ [ custom-plugin ]; - }; + configure = + { availablePlugins, ... }: + { + plugins = (builtins.attrValues availablePlugins) ++ [ custom-plugin ]; + }; } ``` @@ -40,9 +48,11 @@ In addition to `plugins` the options `extraDeps` and `perlDeps` can be used to i ```nix rxvt-unicode.override { - configure = { availablePlugins, ... }: { - pluginsDeps = [ xsel ]; - }; + configure = + { availablePlugins, ... }: + { + pluginsDeps = [ xsel ]; + }; } ``` @@ -50,9 +60,11 @@ rxvt-unicode.override { ```nix rxvt-unicode.override { - configure = { availablePlugins, ... }: { - perlDeps = with perlPackages; [ AnyEvent ]; - }; + configure = + { availablePlugins, ... }: + { + perlDeps = with perlPackages; [ AnyEvent ]; + }; } ``` diff --git a/doc/packages/weechat.section.md b/doc/packages/weechat.section.md index 295397f476b0..f175547de825 100644 --- a/doc/packages/weechat.section.md +++ b/doc/packages/weechat.section.md @@ -3,9 +3,16 @@ WeeChat can be configured to include your choice of plugins, reducing its closure size from the default configuration which includes all available plugins. To make use of this functionality, install an expression that overrides its configuration, such as: ```nix -weechat.override {configure = ({availablePlugins, ...}: { - plugins = with availablePlugins; [ python perl ]; - }); +weechat.override { + configure = ( + { availablePlugins, ... }: + { + plugins = with availablePlugins; [ + python + perl + ]; + } + ); } ``` @@ -16,10 +23,18 @@ The plugins currently available are `python`, `perl`, `ruby`, `guile`, `tcl` and The Python and Perl plugins allows the addition of extra libraries. For instance, the `inotify.py` script in `weechat-scripts` requires D-Bus or libnotify, and the `fish.py` script requires `pycrypto`. To use these scripts, use the plugin's `withPackages` attribute: ```nix -weechat.override { configure = {availablePlugins, ...}: { - plugins = with availablePlugins; [ - (python.withPackages (ps: with ps; [ pycrypto python-dbus ])) - ]; +weechat.override { + configure = + { availablePlugins, ... }: + { + plugins = with availablePlugins; [ + (python.withPackages ( + ps: with ps; [ + pycrypto + python-dbus + ] + )) + ]; }; } ``` @@ -27,23 +42,37 @@ weechat.override { configure = {availablePlugins, ...}: { In order to also keep all default plugins installed, it is possible to use the following method: ```nix -weechat.override { configure = { availablePlugins, ... }: { - plugins = builtins.attrValues (availablePlugins // { - python = availablePlugins.python.withPackages (ps: with ps; [ pycrypto python-dbus ]); - }); -}; } +weechat.override { + configure = + { availablePlugins, ... }: + { + plugins = builtins.attrValues ( + availablePlugins + // { + python = availablePlugins.python.withPackages ( + ps: with ps; [ + pycrypto + python-dbus + ] + ); + } + ); + }; +} ``` WeeChat allows to set defaults on startup using the `--run-command`. The `configure` method can be used to pass commands to the program: ```nix weechat.override { - configure = { availablePlugins, ... }: { - init = '' - /set foo bar - /server add libera irc.libera.chat - ''; - }; + configure = + { availablePlugins, ... }: + { + init = '' + /set foo bar + /server add libera irc.libera.chat + ''; + }; } ``` @@ -53,14 +82,18 @@ Additionally, it's possible to specify scripts to be loaded when starting `weech ```nix weechat.override { - configure = { availablePlugins, ... }: { - scripts = with pkgs.weechatScripts; [ - weechat-xmpp weechat-matrix-bridge wee-slack - ]; - init = '' - /set plugins.var.python.jabber.key "val" - ''; - }; + configure = + { availablePlugins, ... }: + { + scripts = with pkgs.weechatScripts; [ + weechat-xmpp + weechat-matrix-bridge + wee-slack + ]; + init = '' + /set plugins.var.python.jabber.key "val" + ''; + }; } ``` @@ -75,7 +108,10 @@ stdenv.mkDerivation { url = "https://scripts.tld/your-scripts.tar.gz"; hash = "..."; }; - passthru.scripts = [ "foo.py" "bar.lua" ]; + passthru.scripts = [ + "foo.py" + "bar.lua" + ]; installPhase = '' mkdir $out/share cp foo.py $out/share diff --git a/doc/stdenv/cross-compilation.chapter.md b/doc/stdenv/cross-compilation.chapter.md index b06a8ab93a70..e115d9d103ae 100644 --- a/doc/stdenv/cross-compilation.chapter.md +++ b/doc/stdenv/cross-compilation.chapter.md @@ -15,7 +15,13 @@ Nixpkgs follows the [conventions of GNU autoconf](https://gcc.gnu.org/onlinedocs In Nixpkgs, these three platforms are defined as attribute sets under the names `buildPlatform`, `hostPlatform`, and `targetPlatform`. They are always defined as attributes in the standard environment. That means one can access them like: ```nix -{ stdenv, fooDep, barDep, ... }: { +{ + stdenv, + fooDep, + barDep, + ... +}: +{ # ...stdenv.buildPlatform... } ``` @@ -169,11 +175,13 @@ e.g. ```nix { - nativeBuildInputs = [ - meson - ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [ - mesonEmulatorHook - ]; + nativeBuildInputs = + [ + meson + ] + ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [ + mesonEmulatorHook + ]; } ``` diff --git a/doc/stdenv/meta.chapter.md b/doc/stdenv/meta.chapter.md index ddd5eb45441a..2e29c75e7a99 100644 --- a/doc/stdenv/meta.chapter.md +++ b/doc/stdenv/meta.chapter.md @@ -145,7 +145,7 @@ The list of Nix platform types for which the [Hydra](https://github.com/nixos/hy ```nix { meta.platforms = lib.platforms.linux; - meta.hydraPlatforms = []; + meta.hydraPlatforms = [ ]; } ``` @@ -169,7 +169,12 @@ This means that `broken` can be used to express constraints, for example: ```nix { - meta.broken = lib.all (map (p: p.meta.broken) [ glibc musl ]); + meta.broken = lib.all ( + map (p: p.meta.broken) [ + glibc + musl + ] + ); } ``` diff --git a/doc/stdenv/multiple-output.chapter.md b/doc/stdenv/multiple-output.chapter.md index 09fdba01c44a..9140f5a952b7 100644 --- a/doc/stdenv/multiple-output.chapter.md +++ b/doc/stdenv/multiple-output.chapter.md @@ -31,7 +31,12 @@ In nixpkgs there is a framework supporting multiple-output derivations. It tries ```nix { - outputs = [ "bin" "dev" "out" "doc" ]; + outputs = [ + "bin" + "dev" + "out" + "doc" + ]; } ``` diff --git a/doc/stdenv/passthru.chapter.md b/doc/stdenv/passthru.chapter.md index 0c0b03fd0dc2..db40d4bbe054 100644 --- a/doc/stdenv/passthru.chapter.md +++ b/doc/stdenv/passthru.chapter.md @@ -18,7 +18,9 @@ Its value can be accessed as if it was set inside a derivation. let hello = stdenv.mkDerivation { pname = "hello"; - src = fetchGit { /* ... */ }; + src = fetchGit { + # ... + }; passthru = { foo = "bar"; diff --git a/doc/stdenv/stdenv.chapter.md b/doc/stdenv/stdenv.chapter.md index b3bbab57eed2..30d8f5da7e39 100644 --- a/doc/stdenv/stdenv.chapter.md +++ b/doc/stdenv/stdenv.chapter.md @@ -37,7 +37,11 @@ stdenv.mkDerivation { pname = "libfoo"; version = "1.2.3"; # ... - buildInputs = [libbar perl ncurses]; + buildInputs = [ + libbar + perl + ncurses + ]; } ``` @@ -217,7 +221,10 @@ stdenv.mkDerivation rec { hash = "sha256-viwrS9lnaU8sTGuzK/+L/PlMM/xRRtgVuK5pixVeDEw="; }; - nativeBuildInputs = [ makeWrapper pkg-config ]; + nativeBuildInputs = [ + makeWrapper + pkg-config + ]; buildInputs = [ libseccomp ]; postInstall = '' @@ -227,12 +234,22 @@ stdenv.mkDerivation rec { --replace-fail "cp " "cp --no-preserve=mode " wrapProgram $out/bin/solo5-virtio-mkimage \ - --prefix PATH : ${lib.makeBinPath [ dosfstools mtools parted syslinux ]} + --prefix PATH : ${ + lib.makeBinPath [ + dosfstools + mtools + parted + syslinux + ] + } ''; doCheck = true; - nativeCheckInputs = [ util-linux qemu ]; - checkPhase = '' [elided] ''; + nativeCheckInputs = [ + util-linux + qemu + ]; + checkPhase = ''[elided] ''; } ``` @@ -272,7 +289,7 @@ This can lead to conflicting dependencies that cannot easily be resolved. # A propagated dependency ```nix -with import {}; +with import { }; let bar = stdenv.mkDerivation { name = "bar"; @@ -442,8 +459,7 @@ If you pass a function to `mkDerivation`, it will receive as its argument the fi mkDerivation (finalAttrs: { pname = "hello"; withFeature = true; - configureFlags = - lib.optionals finalAttrs.withFeature ["--with-feature"]; + configureFlags = lib.optionals finalAttrs.withFeature [ "--with-feature" ]; }) ``` @@ -460,28 +476,32 @@ various bindings: ```nix # `pkg` is the _original_ definition (for illustration purposes) -let pkg = - mkDerivation (finalAttrs: { +let + pkg = mkDerivation (finalAttrs: { # ... # An example attribute - packages = []; + packages = [ ]; # `passthru.tests` is a commonly defined attribute. passthru.tests.simple = f finalAttrs.finalPackage; # An example of an attribute containing a function - passthru.appendPackages = packages': - finalAttrs.finalPackage.overrideAttrs (newSelf: super: { - packages = super.packages ++ packages'; - }); + passthru.appendPackages = + packages': + finalAttrs.finalPackage.overrideAttrs ( + newSelf: super: { + packages = super.packages ++ packages'; + } + ); # For illustration purposes; referenced as # `(pkg.overrideAttrs(x)).finalAttrs` etc in the text below. passthru.finalAttrs = finalAttrs; passthru.original = pkg; }); -in pkg +in +pkg ``` Unlike the `pkg` binding in the above example, the `finalAttrs` parameter always references the final attributes. For instance `(pkg.overrideAttrs(x)).finalAttrs.finalPackage` is identical to `pkg.overrideAttrs(x)`, whereas `(pkg.overrideAttrs(x)).original` is the same as the original `pkg`. @@ -955,7 +975,7 @@ To make GDB find debug information for the `socat` package and its dependencies, ```nix let pkgs = import ./. { - config = {}; + config = { }; overlays = [ (final: prev: { ncurses = prev.ncurses.overrideAttrs { separateDebugInfo = true; }; @@ -974,19 +994,19 @@ let ]; }; in - pkgs.mkShell { +pkgs.mkShell { - NIX_DEBUG_INFO_DIRS = "${pkgs.lib.getLib myDebugInfoDirs}/lib/debug"; + NIX_DEBUG_INFO_DIRS = "${pkgs.lib.getLib myDebugInfoDirs}/lib/debug"; - packages = [ - pkgs.gdb - pkgs.socat - ]; + packages = [ + pkgs.gdb + pkgs.socat + ]; - shellHook = '' - ${pkgs.lib.getBin pkgs.gdb}/bin/gdb ${pkgs.lib.getBin pkgs.socat}/bin/socat - ''; - } + shellHook = '' + ${pkgs.lib.getBin pkgs.gdb}/bin/gdb ${pkgs.lib.getBin pkgs.socat}/bin/socat + ''; +} ``` This setup works as follows: diff --git a/doc/using/configuration.chapter.md b/doc/using/configuration.chapter.md index cea9532d6a7b..850465377a54 100644 --- a/doc/using/configuration.chapter.md +++ b/doc/using/configuration.chapter.md @@ -99,10 +99,12 @@ There are several ways to tweak how Nix handles a package which has been marked ```nix { - allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ - "roon-server" - "vscode" - ]; + allowUnfreePredicate = + pkg: + builtins.elem (lib.getName pkg) [ + "roon-server" + "vscode" + ]; } ``` @@ -112,7 +114,10 @@ There are several ways to tweak how Nix handles a package which has been marked ```nix { - allowlistedLicenses = with lib.licenses; [ amd wtfpl ]; + allowlistedLicenses = with lib.licenses; [ + amd + wtfpl + ]; } ``` @@ -120,7 +125,10 @@ There are several ways to tweak how Nix handles a package which has been marked ```nix { - blocklistedLicenses = with lib.licenses; [ agpl3Only gpl3Only ]; + blocklistedLicenses = with lib.licenses; [ + agpl3Only + gpl3Only + ]; } ``` @@ -158,9 +166,11 @@ There are several ways to tweak how Nix handles a package which has been marked ```nix { - allowInsecurePredicate = pkg: builtins.elem (lib.getName pkg) [ - "ovftool" - ]; + allowInsecurePredicate = + pkg: + builtins.elem (lib.getName pkg) [ + "ovftool" + ]; } ``` @@ -173,7 +183,9 @@ You can define a function called `packageOverrides` in your local `~/.config/nix ```nix { packageOverrides = pkgs: rec { - foo = pkgs.foo.override { /* ... */ }; + foo = pkgs.foo.override { + # ... + }; }; } ``` @@ -197,23 +209,24 @@ Using `packageOverrides`, it is possible to manage packages declaratively. This ```nix { - packageOverrides = pkgs: with pkgs; { - myPackages = pkgs.buildEnv { - name = "my-packages"; - paths = [ - aspell - bc - coreutils - gdb - ffmpeg - nix - emscripten - jq - nox - silver-searcher - ]; + packageOverrides = + pkgs: with pkgs; { + myPackages = pkgs.buildEnv { + name = "my-packages"; + paths = [ + aspell + bc + coreutils + gdb + ffmpeg + nix + emscripten + jq + nox + silver-searcher + ]; + }; }; - }; } ``` @@ -221,24 +234,28 @@ To install it into our environment, you can just run `nix-env -iA nixpkgs.myPack ```nix { - packageOverrides = pkgs: with pkgs; { - myPackages = pkgs.buildEnv { - name = "my-packages"; - paths = [ - aspell - bc - coreutils - gdb - ffmpeg - nix - emscripten - jq - nox - silver-searcher - ]; - pathsToLink = [ "/share" "/bin" ]; + packageOverrides = + pkgs: with pkgs; { + myPackages = pkgs.buildEnv { + name = "my-packages"; + paths = [ + aspell + bc + coreutils + gdb + ffmpeg + nix + emscripten + jq + nox + silver-searcher + ]; + pathsToLink = [ + "/share" + "/bin" + ]; + }; }; - }; } ``` @@ -250,24 +267,32 @@ After building that new environment, look through `~/.nix-profile` to make sure ```nix { - packageOverrides = pkgs: with pkgs; { - myPackages = pkgs.buildEnv { - name = "my-packages"; - paths = [ - aspell - bc - coreutils - ffmpeg - nix - emscripten - jq - nox - silver-searcher - ]; - pathsToLink = [ "/share/man" "/share/doc" "/bin" ]; - extraOutputsToInstall = [ "man" "doc" ]; + packageOverrides = + pkgs: with pkgs; { + myPackages = pkgs.buildEnv { + name = "my-packages"; + paths = [ + aspell + bc + coreutils + ffmpeg + nix + emscripten + jq + nox + silver-searcher + ]; + pathsToLink = [ + "/share/man" + "/share/doc" + "/bin" + ]; + extraOutputsToInstall = [ + "man" + "doc" + ]; + }; }; - }; } ``` @@ -275,33 +300,42 @@ This provides us with some useful documentation for using our packages. However ```nix { - packageOverrides = pkgs: with pkgs; rec { - myProfile = writeText "my-profile" '' - export PATH=$HOME/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/sbin:/bin:/usr/sbin:/usr/bin - export MANPATH=$HOME/.nix-profile/share/man:/nix/var/nix/profiles/default/share/man:/usr/share/man - ''; - myPackages = pkgs.buildEnv { - name = "my-packages"; - paths = [ - (runCommand "profile" {} '' - mkdir -p $out/etc/profile.d - cp ${myProfile} $out/etc/profile.d/my-profile.sh - '') - aspell - bc - coreutils - ffmpeg - man - nix - emscripten - jq - nox - silver-searcher - ]; - pathsToLink = [ "/share/man" "/share/doc" "/bin" "/etc" ]; - extraOutputsToInstall = [ "man" "doc" ]; + packageOverrides = + pkgs: with pkgs; rec { + myProfile = writeText "my-profile" '' + export PATH=$HOME/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/sbin:/bin:/usr/sbin:/usr/bin + export MANPATH=$HOME/.nix-profile/share/man:/nix/var/nix/profiles/default/share/man:/usr/share/man + ''; + myPackages = pkgs.buildEnv { + name = "my-packages"; + paths = [ + (runCommand "profile" { } '' + mkdir -p $out/etc/profile.d + cp ${myProfile} $out/etc/profile.d/my-profile.sh + '') + aspell + bc + coreutils + ffmpeg + man + nix + emscripten + jq + nox + silver-searcher + ]; + pathsToLink = [ + "/share/man" + "/share/doc" + "/bin" + "/etc" + ]; + extraOutputsToInstall = [ + "man" + "doc" + ]; + }; }; - }; } ``` @@ -326,43 +360,54 @@ Configuring GNU info is a little bit trickier than man pages. To work correctly, ```nix { - packageOverrides = pkgs: with pkgs; rec { - myProfile = writeText "my-profile" '' - export PATH=$HOME/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/sbin:/bin:/usr/sbin:/usr/bin - export MANPATH=$HOME/.nix-profile/share/man:/nix/var/nix/profiles/default/share/man:/usr/share/man - export INFOPATH=$HOME/.nix-profile/share/info:/nix/var/nix/profiles/default/share/info:/usr/share/info - ''; - myPackages = pkgs.buildEnv { - name = "my-packages"; - paths = [ - (runCommand "profile" {} '' - mkdir -p $out/etc/profile.d - cp ${myProfile} $out/etc/profile.d/my-profile.sh - '') - aspell - bc - coreutils - ffmpeg - man - nix - emscripten - jq - nox - silver-searcher - texinfoInteractive - ]; - pathsToLink = [ "/share/man" "/share/doc" "/share/info" "/bin" "/etc" ]; - extraOutputsToInstall = [ "man" "doc" "info" ]; - postBuild = '' - if [ -x $out/bin/install-info -a -w $out/share/info ]; then - shopt -s nullglob - for i in $out/share/info/*.info $out/share/info/*.info.gz; do - $out/bin/install-info $i $out/share/info/dir - done - fi + packageOverrides = + pkgs: with pkgs; rec { + myProfile = writeText "my-profile" '' + export PATH=$HOME/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/sbin:/bin:/usr/sbin:/usr/bin + export MANPATH=$HOME/.nix-profile/share/man:/nix/var/nix/profiles/default/share/man:/usr/share/man + export INFOPATH=$HOME/.nix-profile/share/info:/nix/var/nix/profiles/default/share/info:/usr/share/info ''; + myPackages = pkgs.buildEnv { + name = "my-packages"; + paths = [ + (runCommand "profile" { } '' + mkdir -p $out/etc/profile.d + cp ${myProfile} $out/etc/profile.d/my-profile.sh + '') + aspell + bc + coreutils + ffmpeg + man + nix + emscripten + jq + nox + silver-searcher + texinfoInteractive + ]; + pathsToLink = [ + "/share/man" + "/share/doc" + "/share/info" + "/bin" + "/etc" + ]; + extraOutputsToInstall = [ + "man" + "doc" + "info" + ]; + postBuild = '' + if [ -x $out/bin/install-info -a -w $out/share/info ]; then + shopt -s nullglob + for i in $out/share/info/*.info $out/share/info/*.info.gz; do + $out/bin/install-info $i $out/share/info/dir + done + fi + ''; + }; }; - }; } ``` diff --git a/doc/using/overlays.chapter.md b/doc/using/overlays.chapter.md index 46200730f0b2..e1803786a9a7 100644 --- a/doc/using/overlays.chapter.md +++ b/doc/using/overlays.chapter.md @@ -136,7 +136,12 @@ self: super: For BLAS/LAPACK switching to work correctly, all packages must depend on `blas` or `lapack`. This ensures that only one BLAS/LAPACK library is used at one time. There are two versions of BLAS/LAPACK currently in the wild, `LP64` (integer size = 32 bits) and `ILP64` (integer size = 64 bits). The attributes `blas` and `lapack` are `LP64` by default. Their `ILP64` version are provided through the attributes `blas-ilp64` and `lapack-ilp64`. Some software needs special flags or patches to work with `ILP64`. You can check if `ILP64` is used in Nixpkgs with `blas.isILP64` and `lapack.isILP64`. Some software does NOT work with `ILP64`, and derivations need to specify an assertion to prevent this. You can prevent `ILP64` from being used with the following: ```nix -{ stdenv, blas, lapack, ... }: +{ + stdenv, + blas, + lapack, + ... +}: assert (!blas.isILP64) && (!lapack.isILP64); diff --git a/doc/using/overrides.chapter.md b/doc/using/overrides.chapter.md index 27a042963dd6..95190b44a500 100644 --- a/doc/using/overrides.chapter.md +++ b/doc/using/overrides.chapter.md @@ -13,27 +13,38 @@ It is used to override the arguments passed to a function. Example usages: ```nix -pkgs.foo.override { arg1 = val1; arg2 = val2; /* ... */ } +pkgs.foo.override { + arg1 = val1; + arg2 = val2; # ... +} ``` It's also possible to access the previous arguments. ```nix -pkgs.foo.override (previous: { arg1 = previous.arg1; /* ... */ }) +pkgs.foo.override (previous: { + arg1 = previous.arg1; # ... +}) ``` ```nix -import pkgs.path { overlays = [ (self: super: { - foo = super.foo.override { barSupport = true ; }; - })];} +import pkgs.path { + overlays = [ + (self: super: { + foo = super.foo.override { barSupport = true; }; + }) + ]; +} ``` ```nix { mypkg = pkgs.callPackage ./mypkg.nix { - mydep = pkgs.mydep.override { /* ... */ }; + mydep = pkgs.mydep.override { + # ... + }; }; } ``` @@ -55,9 +66,11 @@ Example usages: ```nix { - helloBar = pkgs.hello.overrideAttrs (finalAttrs: previousAttrs: { - pname = previousAttrs.pname + "-bar"; - }); + helloBar = pkgs.hello.overrideAttrs ( + finalAttrs: previousAttrs: { + pname = previousAttrs.pname + "-bar"; + } + ); } ``` @@ -107,7 +120,7 @@ Example usage: url = "ftp://alpha.gnu.org/gnu/sed/sed-4.2.2-pre.tar.bz2"; hash = "sha256-MxBJRcM2rYzQYwJ5XKxhXTQByvSg5jZc5cSHEZoB2IY="; }; - patches = []; + patches = [ ]; }); } ``` @@ -128,8 +141,15 @@ Example usage: ```nix { - f = { a, b }: { result = a+b; }; - c = lib.makeOverridable f { a = 1; b = 2; }; + f = + { a, b }: + { + result = a + b; + }; + c = lib.makeOverridable f { + a = 1; + b = 2; + }; } ```