From 6051ebe0ceead3b43f37511695269fb95c3dc4a9 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Tue, 25 Jul 2023 15:18:12 +0300 Subject: [PATCH 01/25] lammps: Add meta.mainProgram --- pkgs/applications/science/molecular-dynamics/lammps/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/applications/science/molecular-dynamics/lammps/default.nix b/pkgs/applications/science/molecular-dynamics/lammps/default.nix index a1c0f60ffa01..9e60985a33f1 100644 --- a/pkgs/applications/science/molecular-dynamics/lammps/default.nix +++ b/pkgs/applications/science/molecular-dynamics/lammps/default.nix @@ -106,5 +106,6 @@ stdenv.mkDerivation rec { # support. broken = (blas.isILP64 && lapack.isILP64); maintainers = [ maintainers.costrouc maintainers.doronbehar ]; + mainProgram = "lmp"; }; } From 10e7c631c862270dca61be057525a8193e7f1967 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Tue, 25 Jul 2023 15:18:26 +0300 Subject: [PATCH 02/25] lammps: Install vim and neovim files --- .../science/molecular-dynamics/lammps/default.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/science/molecular-dynamics/lammps/default.nix b/pkgs/applications/science/molecular-dynamics/lammps/default.nix index 9e60985a33f1..728062a46865 100644 --- a/pkgs/applications/science/molecular-dynamics/lammps/default.nix +++ b/pkgs/applications/science/molecular-dynamics/lammps/default.nix @@ -84,9 +84,14 @@ stdenv.mkDerivation rec { ] ++ extraBuildInputs ; - # For backwards compatibility postInstall = '' + # For backwards compatibility ln -s $out/bin/lmp $out/bin/lmp_serial + # Install vim and neovim plugin + install -Dm644 ../../tools/vim/lammps.vim $out/share/vim-plugins/lammps/syntax/lammps.vim + install -Dm644 ../../tools/vim/filetype.vim $out/share/vim-plugins/lammps/ftdetect/lammps.vim + mkdir -p $out/share/nvim + ln -s $out/share/vim-plugins/lammps $out/share/nvim/site ''; meta = with lib; { From eae54103cac6e381565c70b7ed8310f15b648c8b Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Thu, 27 Jul 2023 18:51:41 +0300 Subject: [PATCH 03/25] lammps: always enable cuda opengl runpath support --- .../science/molecular-dynamics/lammps/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/applications/science/molecular-dynamics/lammps/default.nix b/pkgs/applications/science/molecular-dynamics/lammps/default.nix index 728062a46865..5842efea44e8 100644 --- a/pkgs/applications/science/molecular-dynamics/lammps/default.nix +++ b/pkgs/applications/science/molecular-dynamics/lammps/default.nix @@ -7,6 +7,7 @@ , blas , lapack , cmake +, cudaPackages , pkg-config # Available list of packages can be found near here: # @@ -59,6 +60,9 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake pkg-config + # Although not always needed, it is needed if cmakeFlags include + # GPU_API=cuda, and it doesn't users that don't enable the GPU package. + cudaPackages.autoAddOpenGLRunpathHook ]; passthru = { From 6678a5ad5f04fbc7e95ed065254d9e3a03e71910 Mon Sep 17 00:00:00 2001 From: Michael Evans Date: Sun, 26 Feb 2023 12:45:35 +0200 Subject: [PATCH 04/25] confy: 0.6.5 -> 0.7.0 --- pkgs/applications/misc/confy/default.nix | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/pkgs/applications/misc/confy/default.nix b/pkgs/applications/misc/confy/default.nix index ec177c0aa725..24a21471b45b 100644 --- a/pkgs/applications/misc/confy/default.nix +++ b/pkgs/applications/misc/confy/default.nix @@ -1,11 +1,11 @@ -{ appstream-glib +{ blueprint-compiler , desktop-file-utils , fetchurl , gobject-introspection -, gtk3 +, gtk4 , lib +, libadwaita , libnotify -, libhandy , meson , ninja , pkg-config @@ -16,14 +16,15 @@ stdenv.mkDerivation rec { pname = "confy"; - version = "0.6.5"; + version = "0.7.0"; src = fetchurl { url = "https://git.sr.ht/~fabrixxm/confy/archive/${version}.tar.gz"; - sha256 = "sha256-zfuwOZBSGQzJUc36M6C5wSHarLbPFqayQVFo+WbVo7k="; + hash = "sha256-ZvIzgCMDfUW9g+qmY0ZIUoEF0PeVmINjOPwilmFzWDk="; }; nativeBuildInputs = [ + blueprint-compiler desktop-file-utils meson ninja @@ -33,8 +34,8 @@ stdenv.mkDerivation rec { buildInputs = [ gobject-introspection - gtk3 - libhandy + gtk4 + libadwaita libnotify (python3.withPackages (ps: with ps; [ icalendar @@ -43,8 +44,7 @@ stdenv.mkDerivation rec { ]; postPatch = '' - # Remove executable bits so that meson runs the script with our Python interpreter - chmod -x build-aux/meson/postinstall.py + patchShebangs build-aux/meson/postinstall.py ''; meta = with lib; { From 53e5d09b2d2050b2a4e5cf5fd2217bb466c8ed24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sun, 30 Jul 2023 22:16:30 -0700 Subject: [PATCH 05/25] bibtex-tidy: use buildNpmPackage --- pkgs/development/node-packages/aliases.nix | 1 + .../node-packages/node-packages.json | 1 - .../node-packages/node-packages.nix | 18 ------- .../tools/typesetting/bibtex-tidy/default.nix | 35 +++++++++++++ .../remove-google-font-loader.patch | 52 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 +- 6 files changed, 89 insertions(+), 20 deletions(-) create mode 100644 pkgs/tools/typesetting/bibtex-tidy/default.nix create mode 100644 pkgs/tools/typesetting/bibtex-tidy/remove-google-font-loader.patch diff --git a/pkgs/development/node-packages/aliases.nix b/pkgs/development/node-packages/aliases.nix index 7395090060cb..24b77f613154 100644 --- a/pkgs/development/node-packages/aliases.nix +++ b/pkgs/development/node-packages/aliases.nix @@ -43,6 +43,7 @@ mapAliases { "@githubnext/github-copilot-cli" = pkgs.github-copilot-cli; # Added 2023-05-02 "@google/clasp" = pkgs.google-clasp; # Added 2023-05-07 "@nestjs/cli" = pkgs.nest-cli; # Added 2023-05-06 + bibtex-tidy = pkgs.bibtex-tidy; # added 2023-07-30 bitwarden-cli = pkgs.bitwarden-cli; # added 2023-07-25 eslint_d = pkgs.eslint_d; # Added 2023-05-26 manta = pkgs.node-manta; # Added 2023-05-06 diff --git a/pkgs/development/node-packages/node-packages.json b/pkgs/development/node-packages/node-packages.json index 29494ae3755c..8d54b0e0baa3 100644 --- a/pkgs/development/node-packages/node-packages.json +++ b/pkgs/development/node-packages/node-packages.json @@ -39,7 +39,6 @@ , "awesome-lint" , "balanceofsatoshis" , "bash-language-server" -, "bibtex-tidy" , "bower" , "bower2nix" , "browserify" diff --git a/pkgs/development/node-packages/node-packages.nix b/pkgs/development/node-packages/node-packages.nix index 196e4bad11fb..8d40bb8b553f 100644 --- a/pkgs/development/node-packages/node-packages.nix +++ b/pkgs/development/node-packages/node-packages.nix @@ -94386,24 +94386,6 @@ in bypassCache = true; reconstructLock = true; }; - bibtex-tidy = nodeEnv.buildNodePackage { - name = "bibtex-tidy"; - packageName = "bibtex-tidy"; - version = "1.11.0"; - src = fetchurl { - url = "https://registry.npmjs.org/bibtex-tidy/-/bibtex-tidy-1.11.0.tgz"; - sha512 = "jbY7PxjYQlRQIWpqdCxEVtW0T9xTLecXxvGPFGMs3FlzKNTylTr5yutC2qWsFyfNQgMHvAzyCdqT5YIU9p/ZHg=="; - }; - buildInputs = globalBuildInputs; - meta = { - description = "Tidy bibtex files"; - homepage = "https://github.com/FlamingTempura/bibtex-tidy"; - license = "MIT"; - }; - production = true; - bypassCache = true; - reconstructLock = true; - }; bower = nodeEnv.buildNodePackage { name = "bower"; packageName = "bower"; diff --git a/pkgs/tools/typesetting/bibtex-tidy/default.nix b/pkgs/tools/typesetting/bibtex-tidy/default.nix new file mode 100644 index 000000000000..7aeaf13fb02a --- /dev/null +++ b/pkgs/tools/typesetting/bibtex-tidy/default.nix @@ -0,0 +1,35 @@ +{ lib +, buildNpmPackage +, fetchFromGitHub +}: + +buildNpmPackage rec { + pname = "bibtex-tidy"; + version = "1.11.0"; + + src = fetchFromGitHub { + owner = "FlamingTempura"; + repo = "bibtex-tidy"; + rev = "v${version}"; + hash = "sha256-VjQuMQr3OJgjgX6FdH/C4mehf8H7XjDZ9Rxs92hyQVo="; + }; + + patches = [ + # downloads Google fonts during `npm run build` + ./remove-google-font-loader.patch + ]; + + npmDepsHash = "sha256-u2lyG95F00S/bvsVwu0hIuUw2UZYQWFakCF31LIijSU="; + + env = { + PUPPETEER_SKIP_DOWNLOAD = true; + }; + + meta = { + changelog = "https://github.com/FlamingTempura/bibtex-tidy/blob/${src.rev}/CHANGELOG.md"; + description = "Cleaner and Formatter for BibTeX files"; + homepage = "https://github.com/FlamingTempura/bibtex-tidy"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ bertof ]; + }; +} diff --git a/pkgs/tools/typesetting/bibtex-tidy/remove-google-font-loader.patch b/pkgs/tools/typesetting/bibtex-tidy/remove-google-font-loader.patch new file mode 100644 index 000000000000..79c6850cf6cb --- /dev/null +++ b/pkgs/tools/typesetting/bibtex-tidy/remove-google-font-loader.patch @@ -0,0 +1,52 @@ +diff --git a/build.ts b/build.ts +index ae4e350..3498ae7 100644 +--- a/build.ts ++++ b/build.ts +@@ -312,7 +312,6 @@ async function buildWebBundle() { + target: ['esnext'], + plugins: [ + sveltePlugin({ preprocess: autoPreprocess() }), +- googleFontPlugin, + regexpuPlugin, + ], + }); +@@ -344,7 +343,6 @@ async function serveWeb() { + preprocess: autoPreprocess(), + compilerOptions: { enableSourcemap: true }, + }), +- googleFontPlugin, + ], + }); + const server = await ctx.serve({ servedir: WEB_PATH }); +@@ -375,31 +373,6 @@ const regexpuPlugin: Plugin = { + }, + }; + +-// Downloads google fonts and injects them as base64 urls into bundle css +-const googleFontPlugin: Plugin = { +- name: 'google-font-loader', +- setup(build) { +- build.onResolve({ filter: /^https?:\/\/fonts\./ }, (args) => ({ +- path: args.path, +- namespace: 'http-url', +- })); +- build.onLoad( +- { filter: /.*/, namespace: 'http-url' }, +- async (args): Promise => { +- const res = await fetch(args.path, { +- headers: { +- // ensures google responds with woff2 fonts +- 'User-Agent': 'Mozilla/5.0 Firefox/90.0', +- }, +- }); +- const contents = Buffer.from(await res.arrayBuffer()); +- const loader = args.path.endsWith('.woff2') ? 'dataurl' : 'css'; +- return { contents, loader }; +- } +- ); +- }, +-}; +- + /** + * swc converts js syntax to support older browsers. ESBuild can kinda do this + * but only for more recent browsers. swc is also far easier to configure than diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 780b655cd1fa..8343b97e6c0b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -340,7 +340,7 @@ with pkgs; beyond-identity = callPackage ../tools/security/beyond-identity { }; - bibtex-tidy = nodePackages.bibtex-tidy; + bibtex-tidy = callPackage ../tools/typesetting/bibtex-tidy { }; binbloom = callPackage ../tools/security/binbloom { }; From 0261a4fc378952310bf371c1ad9d6931c6596914 Mon Sep 17 00:00:00 2001 From: Phillip Seeber Date: Mon, 31 Jul 2023 12:33:37 +0200 Subject: [PATCH 06/25] cp2k: 2023.1 -> 2023.2 --- pkgs/applications/science/chemistry/cp2k/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/science/chemistry/cp2k/default.nix b/pkgs/applications/science/chemistry/cp2k/default.nix index a16797b955e5..5defaafa3cd0 100644 --- a/pkgs/applications/science/chemistry/cp2k/default.nix +++ b/pkgs/applications/science/chemistry/cp2k/default.nix @@ -11,13 +11,13 @@ let in stdenv.mkDerivation rec { pname = "cp2k"; - version = "2023.1"; + version = "2023.2"; src = fetchFromGitHub { owner = "cp2k"; repo = "cp2k"; rev = "v${version}"; - hash = "sha256-SG5Gz0cDiSfbSZ8m4K+eARMLU4iMk/xK3esN5yt05RE="; + hash = "sha256-1TJorIjajWFO7i9vqSBDTAIukBdyvxbr5dargt4QB8M="; fetchSubmodules = true; }; From 1027dd692c39c56e38e724f0cacf4d4237ea1b25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Mon, 31 Jul 2023 10:04:30 -0700 Subject: [PATCH 07/25] gtop: use buildNpmPackage --- pkgs/development/node-packages/aliases.nix | 1 + .../node-packages/node-packages.json | 1 - .../node-packages/node-packages.nix | 93 ------------------- pkgs/tools/system/gtop/default.nix | 27 ++++++ pkgs/top-level/all-packages.nix | 2 +- 5 files changed, 29 insertions(+), 95 deletions(-) create mode 100644 pkgs/tools/system/gtop/default.nix diff --git a/pkgs/development/node-packages/aliases.nix b/pkgs/development/node-packages/aliases.nix index 7395090060cb..f111305ce4b3 100644 --- a/pkgs/development/node-packages/aliases.nix +++ b/pkgs/development/node-packages/aliases.nix @@ -45,6 +45,7 @@ mapAliases { "@nestjs/cli" = pkgs.nest-cli; # Added 2023-05-06 bitwarden-cli = pkgs.bitwarden-cli; # added 2023-07-25 eslint_d = pkgs.eslint_d; # Added 2023-05-26 + gtop = pkgs.gtop; # added 2023-07-31 manta = pkgs.node-manta; # Added 2023-05-06 readability-cli = pkgs.readability-cli; # Added 2023-06-12 thelounge = pkgs.thelounge; # Added 2023-05-22 diff --git a/pkgs/development/node-packages/node-packages.json b/pkgs/development/node-packages/node-packages.json index 29494ae3755c..a694b6081806 100644 --- a/pkgs/development/node-packages/node-packages.json +++ b/pkgs/development/node-packages/node-packages.json @@ -164,7 +164,6 @@ , "makam" , "meshcommander" , "gqlint" -, "gtop" , "gulp" , "gulp-cli" , "he" diff --git a/pkgs/development/node-packages/node-packages.nix b/pkgs/development/node-packages/node-packages.nix index 196e4bad11fb..1b0c5a39644f 100644 --- a/pkgs/development/node-packages/node-packages.nix +++ b/pkgs/development/node-packages/node-packages.nix @@ -112858,99 +112858,6 @@ in bypassCache = true; reconstructLock = true; }; - gtop = nodeEnv.buildNodePackage { - name = "gtop"; - packageName = "gtop"; - version = "1.1.3"; - src = fetchurl { - url = "https://registry.npmjs.org/gtop/-/gtop-1.1.3.tgz"; - sha512 = "LkZYdWebxn7qeQApnDN7Q50rwCg4raayL4DIQNPdhIyNKwwm3rbKHeX4+K4cV0SKBen7jVkY4s1c7aIdxGsF8A=="; - }; - dependencies = [ - sources."@colors/colors-1.5.0" - sources."abbrev-1.1.1" - sources."ansi-escapes-6.2.0" - sources."ansi-regex-2.1.1" - sources."ansi-styles-2.2.1" - sources."ansi-term-0.0.2" - sources."ansicolors-0.3.2" - sources."blessed-0.1.81" - sources."blessed-contrib-4.11.0" - sources."bresenham-0.0.3" - sources."buffers-0.1.1" - sources."cardinal-2.1.1" - sources."chalk-1.1.3" - sources."charm-0.1.2" - sources."cli-table3-0.6.3" - sources."core-util-is-1.0.3" - sources."drawille-blessed-contrib-1.0.0" - sources."drawille-canvas-blessed-contrib-0.1.3" - sources."emoji-regex-8.0.0" - sources."escape-string-regexp-1.0.5" - sources."esprima-4.0.1" - (sources."event-stream-0.9.8" // { - dependencies = [ - sources."optimist-0.2.8" - ]; - }) - sources."gl-matrix-2.8.1" - sources."has-ansi-2.0.0" - sources."has-flag-4.0.0" - sources."here-0.0.2" - sources."inherits-2.0.4" - sources."is-fullwidth-code-point-3.0.0" - sources."isarray-0.0.1" - sources."lodash-4.17.21" - sources."map-canvas-0.1.5" - sources."marked-4.3.0" - (sources."marked-terminal-5.2.0" // { - dependencies = [ - sources."chalk-5.3.0" - ]; - }) - sources."memory-streams-0.1.3" - sources."memorystream-0.3.1" - sources."node-emoji-1.11.0" - sources."nopt-2.1.2" - sources."optimist-0.3.7" - sources."picture-tuber-1.0.2" - sources."png-js-0.1.1" - sources."readable-stream-1.0.34" - sources."redeyed-2.1.1" - sources."sax-1.2.4" - sources."sparkline-0.1.2" - (sources."string-width-4.2.3" // { - dependencies = [ - sources."ansi-regex-5.0.1" - sources."strip-ansi-6.0.1" - ]; - }) - sources."string_decoder-0.10.31" - sources."strip-ansi-3.0.1" - sources."supports-color-2.0.0" - (sources."supports-hyperlinks-2.3.0" // { - dependencies = [ - sources."supports-color-7.2.0" - ]; - }) - sources."systeminformation-5.18.7" - sources."term-canvas-0.0.5" - sources."type-fest-3.13.1" - sources."wordwrap-0.0.3" - sources."x256-0.0.2" - sources."xml2js-0.4.23" - sources."xmlbuilder-11.0.1" - ]; - buildInputs = globalBuildInputs; - meta = { - description = "graphic top"; - homepage = "https://github.com/aksakalli/gtop#readme"; - license = "MIT"; - }; - production = true; - bypassCache = true; - reconstructLock = true; - }; gulp = nodeEnv.buildNodePackage { name = "gulp"; packageName = "gulp"; diff --git a/pkgs/tools/system/gtop/default.nix b/pkgs/tools/system/gtop/default.nix new file mode 100644 index 000000000000..766719dfb347 --- /dev/null +++ b/pkgs/tools/system/gtop/default.nix @@ -0,0 +1,27 @@ +{ lib +, buildNpmPackage +, fetchFromGitHub +}: + +buildNpmPackage rec { + pname = "gtop"; + version = "1.1.3"; + + src = fetchFromGitHub { + owner = "aksakalli"; + repo = "gtop"; + rev = "v${version}"; + hash = "sha256-7jcfJOdy3PKT6+07iaZnjWnlPLk9BhPn8LApk23E8l4="; + }; + + npmDepsHash = "sha256-CUfoVkG74C7HpcO3T9HmwbxHsYAgW1vYBAgNvx2av0k="; + + dontNpmBuild = true; + + meta = { + description = "System monitoring dashboard for the terminal"; + homepage = "https://github.com/aksakalli/gtop"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ tfc ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 71f9777d9ac0..ec00513c9d09 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -27549,7 +27549,7 @@ with pkgs; gt = callPackage ../os-specific/linux/gt { }; - inherit (nodePackages) gtop; + gtop = callPackage ../tools/system/gtop { }; hd-idle = callPackage ../os-specific/linux/hd-idle { }; From ec1431a59ec3dda9098f61be00b2ab5be9a84360 Mon Sep 17 00:00:00 2001 From: figsoda Date: Mon, 31 Jul 2023 14:43:07 -0400 Subject: [PATCH 08/25] ruff: 0.0.280 -> 0.0.281 Diff: https://github.com/astral-sh/ruff/compare/v0.0.280...v0.0.281 Changelog: https://github.com/astral-sh/ruff/releases/tag/v0.0.281 --- pkgs/development/tools/ruff/Cargo.lock | 435 +++++++++++++++++------- pkgs/development/tools/ruff/default.nix | 5 +- 2 files changed, 309 insertions(+), 131 deletions(-) diff --git a/pkgs/development/tools/ruff/Cargo.lock b/pkgs/development/tools/ruff/Cargo.lock index 86899ddff470..f8f6a0b519ba 100644 --- a/pkgs/development/tools/ruff/Cargo.lock +++ b/pkgs/development/tools/ruff/Cargo.lock @@ -133,6 +133,15 @@ dependencies = [ "os_str_bytes", ] +[[package]] +name = "ascii-canvas" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8824ecca2e851cec16968d54a01dd372ef8f95b244fb84b84e70128be347c3c6" +dependencies = [ + "term", +] + [[package]] name = "assert_cmd" version = "2.0.11" @@ -169,6 +178,21 @@ dependencies = [ "serde", ] +[[package]] +name = "bit-set" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" +dependencies = [ + "bit-vec", +] + +[[package]] +name = "bit-vec" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" + [[package]] name = "bitflags" version = "1.3.2" @@ -609,6 +633,16 @@ dependencies = [ "dirs-sys 0.4.1", ] +[[package]] +name = "dirs-next" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" +dependencies = [ + "cfg-if", + "dirs-sys-next", +] + [[package]] name = "dirs-sys" version = "0.3.7" @@ -632,6 +666,17 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "dirs-sys-next" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" +dependencies = [ + "libc", + "redox_users", + "winapi", +] + [[package]] name = "doc-comment" version = "0.3.3" @@ -656,6 +701,15 @@ version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" +[[package]] +name = "ena" +version = "0.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c533630cf40e9caa44bd91aadc88a75d75a4c3a12b4cfde353cbed41daa1e1f1" +dependencies = [ + "log", +] + [[package]] name = "encode_unicode" version = "0.3.6" @@ -732,9 +786,15 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "fixedbitset" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" + [[package]] name = "flake8-to-ruff" -version = "0.0.280" +version = "0.0.281" dependencies = [ "anyhow", "clap", @@ -1099,6 +1159,28 @@ dependencies = [ "libc", ] +[[package]] +name = "lalrpop" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da4081d44f4611b66c6dd725e6de3169f9f63905421e8626fcb86b6a898998b8" +dependencies = [ + "ascii-canvas", + "bit-set", + "diff", + "ena", + "is-terminal", + "itertools", + "lalrpop-util", + "petgraph", + "regex", + "regex-syntax 0.7.3", + "string_cache", + "term", + "tiny-keccak", + "unicode-xid", +] + [[package]] name = "lalrpop-util" version = "0.20.0" @@ -1199,6 +1281,16 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09fc20d2ca12cb9f044c93e3bd6d32d523e6e2ec3db4f7b2939cd99026ecd3f0" +[[package]] +name = "lock_api" +version = "0.4.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" +dependencies = [ + "autocfg", + "scopeguard", +] + [[package]] name = "log" version = "0.4.19" @@ -1277,6 +1369,12 @@ version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "308d96db8debc727c3fd9744aac51751243420e46edf401010908da7f8d5e57c" +[[package]] +name = "new_debug_unreachable" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54" + [[package]] name = "nextest-workspace-hack" version = "0.1.0" @@ -1295,12 +1393,6 @@ dependencies = [ "static_assertions", ] -[[package]] -name = "nohash-hasher" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451" - [[package]] name = "nom" version = "7.1.3" @@ -1427,6 +1519,29 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" +[[package]] +name = "parking_lot" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall 0.3.5", + "smallvec", + "windows-targets 0.48.1", +] + [[package]] name = "paste" version = "1.0.13" @@ -1518,14 +1633,23 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" +[[package]] +name = "petgraph" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4dd7d28ee937e54fe3080c91faa1c3a46c06de6252988a7f4592ba2310ef22a4" +dependencies = [ + "fixedbitset", + "indexmap 1.9.3", +] + [[package]] name = "phf" version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" dependencies = [ - "phf_macros", - "phf_shared", + "phf_shared 0.11.2", ] [[package]] @@ -1535,7 +1659,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8d39688d359e6b34654d328e262234662d16cc0f60ec8dcbe5e718709342a5a" dependencies = [ "phf_generator", - "phf_shared", + "phf_shared 0.11.2", ] [[package]] @@ -1544,21 +1668,17 @@ version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0" dependencies = [ - "phf_shared", + "phf_shared 0.11.2", "rand", ] [[package]] -name = "phf_macros" -version = "0.11.2" +name = "phf_shared" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3444646e286606587e49f3bcf1679b8cef1dc2c5ecc29ddacaffc305180d464b" +checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096" dependencies = [ - "phf_generator", - "phf_shared", - "proc-macro2", - "quote", - "syn 2.0.23", + "siphasher", ] [[package]] @@ -1621,6 +1741,18 @@ version = "1.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "767eb9f07d4a5ebcb39bbf2d452058a93c011373abf6832e24194a1c3f004794" +[[package]] +name = "ppv-lite86" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" + +[[package]] +name = "precomputed-hash" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" + [[package]] name = "predicates" version = "3.0.3" @@ -1745,6 +1877,18 @@ version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ + "libc", + "rand_chacha", + "rand_core", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", "rand_core", ] @@ -1753,6 +1897,9 @@ name = "rand_core" version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom", +] [[package]] name = "rayon" @@ -1888,7 +2035,7 @@ dependencies = [ [[package]] name = "ruff" -version = "0.0.280" +version = "0.0.281" dependencies = [ "annotate-snippets 0.9.1", "anyhow", @@ -1909,14 +2056,12 @@ dependencies = [ "log", "memchr", "natord", - "nohash-hasher", "num-bigint", "num-traits", "once_cell", "path-absolutize", "pathdiff", "pep440_rs", - "phf", "pretty_assertions", "pyproject-toml", "quick-junit", @@ -1927,15 +2072,16 @@ dependencies = [ "ruff_index", "ruff_macros", "ruff_python_ast", + "ruff_python_codegen", + "ruff_python_index", + "ruff_python_literal", + "ruff_python_parser", "ruff_python_semantic", "ruff_python_stdlib", "ruff_python_trivia", - "ruff_rustpython", + "ruff_source_file", "ruff_text_size", - "ruff_textwrap", "rustc-hash", - "rustpython-format", - "rustpython-parser", "schemars", "semver", "serde", @@ -1966,7 +2112,7 @@ dependencies = [ "ruff", "ruff_python_ast", "ruff_python_formatter", - "rustpython-parser", + "ruff_python_parser", "serde", "serde_json", "tikv-jemallocator", @@ -1988,7 +2134,7 @@ dependencies = [ [[package]] name = "ruff_cli" -version = "0.0.280" +version = "0.0.281" dependencies = [ "annotate-snippets 0.9.1", "anyhow", @@ -2017,11 +2163,13 @@ dependencies = [ "ruff", "ruff_cache", "ruff_diagnostics", + "ruff_macros", "ruff_python_ast", "ruff_python_formatter", "ruff_python_stdlib", + "ruff_python_trivia", + "ruff_source_file", "ruff_text_size", - "ruff_textwrap", "rustc-hash", "serde", "serde_json", @@ -2055,11 +2203,13 @@ dependencies = [ "ruff_cli", "ruff_diagnostics", "ruff_formatter", + "ruff_python_ast", + "ruff_python_codegen", "ruff_python_formatter", + "ruff_python_literal", + "ruff_python_parser", "ruff_python_stdlib", - "ruff_textwrap", - "rustpython-format", - "rustpython-parser", + "ruff_python_trivia", "schemars", "serde", "serde_json", @@ -2110,7 +2260,7 @@ dependencies = [ "itertools", "proc-macro2", "quote", - "ruff_textwrap", + "ruff_python_trivia", "syn 2.0.23", ] @@ -2118,26 +2268,33 @@ dependencies = [ name = "ruff_python_ast" version = "0.0.0" dependencies = [ - "anyhow", "bitflags 2.3.3", "insta", "is-macro", - "itertools", - "log", "memchr", "num-bigint", "num-traits", "once_cell", + "ruff_python_parser", "ruff_python_trivia", + "ruff_source_file", "ruff_text_size", "rustc-hash", - "rustpython-ast", - "rustpython-literal", - "rustpython-parser", "serde", "smallvec", ] +[[package]] +name = "ruff_python_codegen" +version = "0.0.0" +dependencies = [ + "once_cell", + "ruff_python_ast", + "ruff_python_literal", + "ruff_python_parser", + "ruff_source_file", +] + [[package]] name = "ruff_python_formatter" version = "0.0.0" @@ -2152,10 +2309,12 @@ dependencies = [ "once_cell", "ruff_formatter", "ruff_python_ast", + "ruff_python_index", + "ruff_python_parser", "ruff_python_trivia", + "ruff_source_file", "ruff_text_size", "rustc-hash", - "rustpython-parser", "serde", "serde_json", "similar", @@ -2163,6 +2322,55 @@ dependencies = [ "thiserror", ] +[[package]] +name = "ruff_python_index" +version = "0.0.0" +dependencies = [ + "itertools", + "ruff_python_ast", + "ruff_python_parser", + "ruff_python_trivia", + "ruff_source_file", + "ruff_text_size", +] + +[[package]] +name = "ruff_python_literal" +version = "0.0.0" +dependencies = [ + "bitflags 2.3.3", + "hexf-parse", + "is-macro", + "itertools", + "lexical-parse-float", + "num-bigint", + "num-traits", + "rand", + "unic-ucd-category", +] + +[[package]] +name = "ruff_python_parser" +version = "0.0.0" +dependencies = [ + "anyhow", + "insta", + "is-macro", + "itertools", + "lalrpop", + "lalrpop-util", + "num-bigint", + "num-traits", + "ruff_python_ast", + "ruff_text_size", + "rustc-hash", + "static_assertions", + "tiny-keccak", + "unic-emoji-char", + "unic-ucd-ident", + "unicode_names2", +] + [[package]] name = "ruff_python_resolver" version = "0.0.0" @@ -2179,14 +2387,13 @@ version = "0.0.0" dependencies = [ "bitflags 2.3.3", "is-macro", - "nohash-hasher", "num-traits", "ruff_index", "ruff_python_ast", "ruff_python_stdlib", + "ruff_source_file", "ruff_text_size", "rustc-hash", - "rustpython-parser", "smallvec", ] @@ -2200,19 +2407,14 @@ version = "0.0.0" dependencies = [ "insta", "memchr", + "ruff_python_ast", + "ruff_python_parser", + "ruff_source_file", "ruff_text_size", "smallvec", "unic-ucd-ident", ] -[[package]] -name = "ruff_rustpython" -version = "0.0.0" -dependencies = [ - "anyhow", - "rustpython-parser", -] - [[package]] name = "ruff_shrinking" version = "0.1.0" @@ -2222,28 +2424,32 @@ dependencies = [ "fs-err", "regex", "ruff_python_ast", - "ruff_rustpython", - "rustpython-ast", + "ruff_python_parser", + "ruff_text_size", "shlex", "tracing", "tracing-subscriber", ] [[package]] -name = "ruff_text_size" +name = "ruff_source_file" version = "0.0.0" -source = "git+https://github.com/astral-sh/RustPython-Parser.git?rev=4d03b9b5b212fc869e4cfda151414438186a7779#4d03b9b5b212fc869e4cfda151414438186a7779" dependencies = [ - "schemars", + "insta", + "memchr", + "once_cell", + "ruff_text_size", "serde", ] [[package]] -name = "ruff_textwrap" +name = "ruff_text_size" version = "0.0.0" dependencies = [ - "ruff_python_trivia", - "ruff_text_size", + "schemars", + "serde", + "serde_test", + "static_assertions", ] [[package]] @@ -2257,9 +2463,11 @@ dependencies = [ "ruff", "ruff_diagnostics", "ruff_python_ast", + "ruff_python_codegen", "ruff_python_formatter", - "ruff_rustpython", - "rustpython-parser", + "ruff_python_index", + "ruff_python_parser", + "ruff_source_file", "serde", "serde-wasm-bindgen", "wasm-bindgen", @@ -2331,74 +2539,6 @@ dependencies = [ "untrusted", ] -[[package]] -name = "rustpython-ast" -version = "0.2.0" -source = "git+https://github.com/astral-sh/RustPython-Parser.git?rev=4d03b9b5b212fc869e4cfda151414438186a7779#4d03b9b5b212fc869e4cfda151414438186a7779" -dependencies = [ - "is-macro", - "num-bigint", - "rustpython-parser-core", - "static_assertions", -] - -[[package]] -name = "rustpython-format" -version = "0.2.0" -source = "git+https://github.com/astral-sh/RustPython-Parser.git?rev=4d03b9b5b212fc869e4cfda151414438186a7779#4d03b9b5b212fc869e4cfda151414438186a7779" -dependencies = [ - "bitflags 2.3.3", - "itertools", - "num-bigint", - "num-traits", - "rustpython-literal", -] - -[[package]] -name = "rustpython-literal" -version = "0.2.0" -source = "git+https://github.com/astral-sh/RustPython-Parser.git?rev=4d03b9b5b212fc869e4cfda151414438186a7779#4d03b9b5b212fc869e4cfda151414438186a7779" -dependencies = [ - "hexf-parse", - "is-macro", - "lexical-parse-float", - "num-traits", - "unic-ucd-category", -] - -[[package]] -name = "rustpython-parser" -version = "0.2.0" -source = "git+https://github.com/astral-sh/RustPython-Parser.git?rev=4d03b9b5b212fc869e4cfda151414438186a7779#4d03b9b5b212fc869e4cfda151414438186a7779" -dependencies = [ - "anyhow", - "is-macro", - "itertools", - "lalrpop-util", - "log", - "num-bigint", - "num-traits", - "phf", - "phf_codegen", - "rustc-hash", - "rustpython-ast", - "rustpython-parser-core", - "tiny-keccak", - "unic-emoji-char", - "unic-ucd-ident", - "unicode_names2", -] - -[[package]] -name = "rustpython-parser-core" -version = "0.2.0" -source = "git+https://github.com/astral-sh/RustPython-Parser.git?rev=4d03b9b5b212fc869e4cfda151414438186a7779#4d03b9b5b212fc869e4cfda151414438186a7779" -dependencies = [ - "is-macro", - "memchr", - "ruff_text_size", -] - [[package]] name = "rustversion" version = "1.0.13" @@ -2534,6 +2674,15 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_test" +version = "1.0.176" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a2f49ace1498612d14f7e0b8245519584db8299541dfe31a06374a828d620ab" +dependencies = [ + "serde", +] + [[package]] name = "serde_with" version = "3.0.0" @@ -2616,6 +2765,19 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" +[[package]] +name = "string_cache" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f91138e76242f575eb1d3b38b4f1362f10d3a43f47d182a5b359af488a02293b" +dependencies = [ + "new_debug_unreachable", + "once_cell", + "parking_lot", + "phf_shared 0.10.0", + "precomputed-hash", +] + [[package]] name = "strsim" version = "0.10.0" @@ -2689,6 +2851,17 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "term" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c59df8ac95d96ff9bede18eb7300b0fda5e5d8d90960e76f8e14ae765eedbf1f" +dependencies = [ + "dirs-next", + "rustversion", + "winapi", +] + [[package]] name = "termcolor" version = "1.2.0" @@ -3068,6 +3241,12 @@ version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" +[[package]] +name = "unicode-xid" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" + [[package]] name = "unicode_names2" version = "0.6.0" diff --git a/pkgs/development/tools/ruff/default.nix b/pkgs/development/tools/ruff/default.nix index 7b1582a55210..8144456b6c7d 100644 --- a/pkgs/development/tools/ruff/default.nix +++ b/pkgs/development/tools/ruff/default.nix @@ -10,20 +10,19 @@ rustPlatform.buildRustPackage rec { pname = "ruff"; - version = "0.0.280"; + version = "0.0.281"; src = fetchFromGitHub { owner = "astral-sh"; repo = pname; rev = "v${version}"; - hash = "sha256-Pp/yurRPUHqrCD3V93z5EGMYf4IyLFQOL9d2sNe3TKs="; + hash = "sha256-rIN2GaNrHO6s+6fMUN1a4H58ryoTr8EMjkX34YCCKaU="; }; cargoLock = { lockFile = ./Cargo.lock; outputHashes = { "libcst-0.1.0" = "sha256-FgQE8ofRXQs/zHh7AKscXu0deN3IG+Nk/h+a09Co5R8="; - "ruff_text_size-0.0.0" = "sha256-5BAsTsgvrP+77yZuA/QfEwVOmCj82ab8Y4D3NtY7E2Q="; "unicode_names2-0.6.0" = "sha256-eWg9+ISm/vztB0KIdjhq5il2ZnwGJQCleCYfznCI3Wg="; }; }; From 6948d36b2cb4b49a82a9ff5aa273d0b183312af8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabi=C3=A1n=20Heredia=20Montiel?= Date: Mon, 31 Jul 2023 16:56:34 -0600 Subject: [PATCH 09/25] linux: 5.10.187 -> 5.10.188 --- pkgs/os-specific/linux/kernel/linux-5.10.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/linux-5.10.nix b/pkgs/os-specific/linux/kernel/linux-5.10.nix index cf7390609895..a6baeaac8901 100644 --- a/pkgs/os-specific/linux/kernel/linux-5.10.nix +++ b/pkgs/os-specific/linux/kernel/linux-5.10.nix @@ -3,7 +3,7 @@ with lib; buildLinux (args // rec { - version = "5.10.187"; + version = "5.10.188"; # modDirVersion needs to be x.y.z, will automatically add .0 if needed modDirVersion = versions.pad 3 version; @@ -13,6 +13,6 @@ buildLinux (args // rec { src = fetchurl { url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz"; - sha256 = "1fwbz5xg3jxfzji9jlxqwf5rz9acgn4sm2inp3l017iy1chm957n"; + sha256 = "04k1mc23vqv3mr4m80rab1w7z1cwc0n1kcxzc5vfcfp26nmqnmf9"; }; } // (args.argsOverride or {})) From 19f617fa72cf3613f83623fd4287f99d3e2306be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabi=C3=A1n=20Heredia=20Montiel?= Date: Mon, 31 Jul 2023 16:56:45 -0600 Subject: [PATCH 10/25] linux: 5.15.122 -> 5.15.123 --- pkgs/os-specific/linux/kernel/linux-5.15.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/linux-5.15.nix b/pkgs/os-specific/linux/kernel/linux-5.15.nix index 8c66af32b442..c7117f88080d 100644 --- a/pkgs/os-specific/linux/kernel/linux-5.15.nix +++ b/pkgs/os-specific/linux/kernel/linux-5.15.nix @@ -3,7 +3,7 @@ with lib; buildLinux (args // rec { - version = "5.15.122"; + version = "5.15.123"; # modDirVersion needs to be x.y.z, will automatically add .0 if needed modDirVersion = versions.pad 3 version; @@ -13,6 +13,6 @@ buildLinux (args // rec { src = fetchurl { url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz"; - sha256 = "0b9ljdi9vgwzw4wa8gx1ia5fmb1pm8lnslx0q2l2kqhwrl0mhx9q"; + sha256 = "14xzk4rn7fwgdysnd763rbl25krvq40wk3y5cf8hasifl529brid"; }; } // (args.argsOverride or { })) From 09f94571ebd9561e9c30d4c75b3d253691fb937d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabi=C3=A1n=20Heredia=20Montiel?= Date: Mon, 31 Jul 2023 16:56:56 -0600 Subject: [PATCH 11/25] linux: 5.4.250 -> 5.4.251 --- pkgs/os-specific/linux/kernel/linux-5.4.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/linux-5.4.nix b/pkgs/os-specific/linux/kernel/linux-5.4.nix index daa4385b7614..5f3afdab8c2e 100644 --- a/pkgs/os-specific/linux/kernel/linux-5.4.nix +++ b/pkgs/os-specific/linux/kernel/linux-5.4.nix @@ -3,7 +3,7 @@ with lib; buildLinux (args // rec { - version = "5.4.250"; + version = "5.4.251"; # modDirVersion needs to be x.y.z, will automatically add .0 if needed modDirVersion = versions.pad 3 version; @@ -13,6 +13,6 @@ buildLinux (args // rec { src = fetchurl { url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz"; - sha256 = "1ywil04x3mw62n53pkrkxrhkg1xyi3g9ssvg6igbyqk0a9v8hnqg"; + sha256 = "1jhqnazgiyz1vvrhnq5byl3h1mxrr3555fpiz4byycc1sqz9bd5w"; }; } // (args.argsOverride or {})) From 3cbc1fc7bb267a6b4a8107d8f9dddce02322cb14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabi=C3=A1n=20Heredia=20Montiel?= Date: Mon, 31 Jul 2023 16:57:09 -0600 Subject: [PATCH 12/25] linux: 6.1.41 -> 6.1.42 --- pkgs/os-specific/linux/kernel/linux-6.1.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/linux-6.1.nix b/pkgs/os-specific/linux/kernel/linux-6.1.nix index 7fade741a748..51c7bac8f165 100644 --- a/pkgs/os-specific/linux/kernel/linux-6.1.nix +++ b/pkgs/os-specific/linux/kernel/linux-6.1.nix @@ -3,7 +3,7 @@ with lib; buildLinux (args // rec { - version = "6.1.41"; + version = "6.1.42"; # modDirVersion needs to be x.y.z, will automatically add .0 if needed modDirVersion = versions.pad 3 version; @@ -13,6 +13,6 @@ buildLinux (args // rec { src = fetchurl { url = "mirror://kernel/linux/kernel/v6.x/linux-${version}.tar.xz"; - sha256 = "1dqbawgcpwxszqqnf7a66db8xlldxnr4f3sqlq42l1gaiskhja1i"; + sha256 = "1lqy72yvsbcv7an1gr8sam6ym3788ss811xb3sw7d2qwaldjdy5a"; }; } // (args.argsOverride or { })) From 9dd903ca6306961590d565272b2b30c08136ee9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabi=C3=A1n=20Heredia=20Montiel?= Date: Mon, 31 Jul 2023 16:57:22 -0600 Subject: [PATCH 13/25] linux: 6.4.6 -> 6.4.7 --- pkgs/os-specific/linux/kernel/linux-6.4.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/linux-6.4.nix b/pkgs/os-specific/linux/kernel/linux-6.4.nix index aaa568ff2b32..ae38cdfa6607 100644 --- a/pkgs/os-specific/linux/kernel/linux-6.4.nix +++ b/pkgs/os-specific/linux/kernel/linux-6.4.nix @@ -3,7 +3,7 @@ with lib; buildLinux (args // rec { - version = "6.4.6"; + version = "6.4.7"; # modDirVersion needs to be x.y.z, will automatically add .0 if needed modDirVersion = versions.pad 3 version; @@ -13,6 +13,6 @@ buildLinux (args // rec { src = fetchurl { url = "mirror://kernel/linux/kernel/v6.x/linux-${version}.tar.xz"; - sha256 = "192ya79h3lw781ka22ibgbvdcx6maa74nyk0lqjsz2n4xybc9v71"; + sha256 = "1n57qijg0m27wcrqll8rb1hi1n0n8ca3bzsnbz05d9ya3nv3q56y"; }; } // (args.argsOverride or { })) From cc26897da9bb2bb5519b6832e2e9c743bfd7d831 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabi=C3=A1n=20Heredia=20Montiel?= Date: Mon, 31 Jul 2023 18:57:11 -0600 Subject: [PATCH 14/25] =?UTF-8?q?linux/hardened/patches/5.10:=205.10.187-h?= =?UTF-8?q?ardened1=20=E2=86=92=205.10.188-hardened1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/os-specific/linux/kernel/hardened/patches.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/hardened/patches.json b/pkgs/os-specific/linux/kernel/hardened/patches.json index c82577e5e7af..139a63bb1313 100644 --- a/pkgs/os-specific/linux/kernel/hardened/patches.json +++ b/pkgs/os-specific/linux/kernel/hardened/patches.json @@ -22,12 +22,12 @@ "5.10": { "patch": { "extra": "-hardened1", - "name": "linux-hardened-5.10.187-hardened1.patch", - "sha256": "17m8v9xs300cd4jblvqxgmpsi0i15r57sl8xfc0vnl3b0ikip1rk", - "url": "https://github.com/anthraxx/linux-hardened/releases/download/5.10.187-hardened1/linux-hardened-5.10.187-hardened1.patch" + "name": "linux-hardened-5.10.188-hardened1.patch", + "sha256": "10mnrnzg3b5iirvn9x241zxwlysrnv7i65hiil2h8f7lswwgb6ar", + "url": "https://github.com/anthraxx/linux-hardened/releases/download/5.10.188-hardened1/linux-hardened-5.10.188-hardened1.patch" }, - "sha256": "1fwbz5xg3jxfzji9jlxqwf5rz9acgn4sm2inp3l017iy1chm957n", - "version": "5.10.187" + "sha256": "04k1mc23vqv3mr4m80rab1w7z1cwc0n1kcxzc5vfcfp26nmqnmf9", + "version": "5.10.188" }, "5.15": { "patch": { From a05924dc861557e6e3cdf7714fb304de66faf6b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabi=C3=A1n=20Heredia=20Montiel?= Date: Mon, 31 Jul 2023 18:57:36 -0600 Subject: [PATCH 15/25] =?UTF-8?q?linux/hardened/patches/5.15:=205.15.122-h?= =?UTF-8?q?ardened1=20=E2=86=92=205.15.123-hardened1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/os-specific/linux/kernel/hardened/patches.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/hardened/patches.json b/pkgs/os-specific/linux/kernel/hardened/patches.json index 139a63bb1313..5c1220480380 100644 --- a/pkgs/os-specific/linux/kernel/hardened/patches.json +++ b/pkgs/os-specific/linux/kernel/hardened/patches.json @@ -32,12 +32,12 @@ "5.15": { "patch": { "extra": "-hardened1", - "name": "linux-hardened-5.15.122-hardened1.patch", - "sha256": "0845jjvs2wf81vp43f62gsbkdi1l96ajpv6n7pnc1bi02hqgb6az", - "url": "https://github.com/anthraxx/linux-hardened/releases/download/5.15.122-hardened1/linux-hardened-5.15.122-hardened1.patch" + "name": "linux-hardened-5.15.123-hardened1.patch", + "sha256": "0q942jcz22yq7lbhmbwpg12p75zb0ky36zp2waz30cixw7lmyx6b", + "url": "https://github.com/anthraxx/linux-hardened/releases/download/5.15.123-hardened1/linux-hardened-5.15.123-hardened1.patch" }, - "sha256": "0b9ljdi9vgwzw4wa8gx1ia5fmb1pm8lnslx0q2l2kqhwrl0mhx9q", - "version": "5.15.122" + "sha256": "14xzk4rn7fwgdysnd763rbl25krvq40wk3y5cf8hasifl529brid", + "version": "5.15.123" }, "5.4": { "patch": { From 643694ae27cb614f4fd9a2003f94c469d32679ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabi=C3=A1n=20Heredia=20Montiel?= Date: Mon, 31 Jul 2023 18:58:06 -0600 Subject: [PATCH 16/25] =?UTF-8?q?linux/hardened/patches/5.4:=205.4.250-har?= =?UTF-8?q?dened1=20=E2=86=92=205.4.251-hardened1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/os-specific/linux/kernel/hardened/patches.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/hardened/patches.json b/pkgs/os-specific/linux/kernel/hardened/patches.json index 5c1220480380..4d3448acb3b4 100644 --- a/pkgs/os-specific/linux/kernel/hardened/patches.json +++ b/pkgs/os-specific/linux/kernel/hardened/patches.json @@ -42,12 +42,12 @@ "5.4": { "patch": { "extra": "-hardened1", - "name": "linux-hardened-5.4.250-hardened1.patch", - "sha256": "0l4a0wwv2ipwic24igvy48b114p55bx6zjbsj8j1jja6xpn8psk5", - "url": "https://github.com/anthraxx/linux-hardened/releases/download/5.4.250-hardened1/linux-hardened-5.4.250-hardened1.patch" + "name": "linux-hardened-5.4.251-hardened1.patch", + "sha256": "148qyspyj4a6yrl45f358z64iqxf40zb71ccj5kvwbrn395xiwgs", + "url": "https://github.com/anthraxx/linux-hardened/releases/download/5.4.251-hardened1/linux-hardened-5.4.251-hardened1.patch" }, - "sha256": "1ywil04x3mw62n53pkrkxrhkg1xyi3g9ssvg6igbyqk0a9v8hnqg", - "version": "5.4.250" + "sha256": "1jhqnazgiyz1vvrhnq5byl3h1mxrr3555fpiz4byycc1sqz9bd5w", + "version": "5.4.251" }, "6.1": { "patch": { From fc86124473ed5fc124edb5bb6ad26535a58a895c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabi=C3=A1n=20Heredia=20Montiel?= Date: Mon, 31 Jul 2023 18:58:32 -0600 Subject: [PATCH 17/25] =?UTF-8?q?linux/hardened/patches/6.1:=206.1.41-hard?= =?UTF-8?q?ened1=20=E2=86=92=206.1.42-hardened1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/os-specific/linux/kernel/hardened/patches.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/hardened/patches.json b/pkgs/os-specific/linux/kernel/hardened/patches.json index 4d3448acb3b4..8f453cee4448 100644 --- a/pkgs/os-specific/linux/kernel/hardened/patches.json +++ b/pkgs/os-specific/linux/kernel/hardened/patches.json @@ -52,12 +52,12 @@ "6.1": { "patch": { "extra": "-hardened1", - "name": "linux-hardened-6.1.41-hardened1.patch", - "sha256": "084lwlynwsm76vnmp02q80vbv4bi993swz3vvwsj3na8160c1w2y", - "url": "https://github.com/anthraxx/linux-hardened/releases/download/6.1.41-hardened1/linux-hardened-6.1.41-hardened1.patch" + "name": "linux-hardened-6.1.42-hardened1.patch", + "sha256": "0v5ja4q8wq3gwds0m8bzrxhx6vagg97lvcxrw3glm1d5sv1v94l6", + "url": "https://github.com/anthraxx/linux-hardened/releases/download/6.1.42-hardened1/linux-hardened-6.1.42-hardened1.patch" }, - "sha256": "1dqbawgcpwxszqqnf7a66db8xlldxnr4f3sqlq42l1gaiskhja1i", - "version": "6.1.41" + "sha256": "1lqy72yvsbcv7an1gr8sam6ym3788ss811xb3sw7d2qwaldjdy5a", + "version": "6.1.42" }, "6.4": { "patch": { From 580cd965b80b924c69fb8e8cc13c9292cb0dc66f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabi=C3=A1n=20Heredia=20Montiel?= Date: Mon, 31 Jul 2023 18:58:54 -0600 Subject: [PATCH 18/25] =?UTF-8?q?linux/hardened/patches/6.4:=206.4.6-harde?= =?UTF-8?q?ned1=20=E2=86=92=206.4.7-hardened1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/os-specific/linux/kernel/hardened/patches.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/hardened/patches.json b/pkgs/os-specific/linux/kernel/hardened/patches.json index 8f453cee4448..01d761a6eeb0 100644 --- a/pkgs/os-specific/linux/kernel/hardened/patches.json +++ b/pkgs/os-specific/linux/kernel/hardened/patches.json @@ -62,11 +62,11 @@ "6.4": { "patch": { "extra": "-hardened1", - "name": "linux-hardened-6.4.6-hardened1.patch", - "sha256": "1364ilh3vfvajx2ahd1mkwv13lnbfzmg0cwa9apghqfzqdn1c77x", - "url": "https://github.com/anthraxx/linux-hardened/releases/download/6.4.6-hardened1/linux-hardened-6.4.6-hardened1.patch" + "name": "linux-hardened-6.4.7-hardened1.patch", + "sha256": "1kzkx0i3hkq25rywl8xsf5i8716ycjspblk1hrkaq6a02ci0697b", + "url": "https://github.com/anthraxx/linux-hardened/releases/download/6.4.7-hardened1/linux-hardened-6.4.7-hardened1.patch" }, - "sha256": "192ya79h3lw781ka22ibgbvdcx6maa74nyk0lqjsz2n4xybc9v71", - "version": "6.4.6" + "sha256": "1n57qijg0m27wcrqll8rb1hi1n0n8ca3bzsnbz05d9ya3nv3q56y", + "version": "6.4.7" } } From b0ba7d2406ef905c47656c0053e8c0453cab5397 Mon Sep 17 00:00:00 2001 From: Jonas Heinrich Date: Tue, 25 Jul 2023 12:15:34 +0200 Subject: [PATCH 19/25] nixos/tests/nextcloud: Fix broken webdav url Starting with Rclone v1.63, which is used in the Nextcloud tests for synchronization, the client relies on the correct WebDAV endpoint url, see https://github.com/rclone/rclone/issues/7103 --- nixos/tests/nextcloud/basic.nix | 6 +++--- nixos/tests/nextcloud/openssl-sse.nix | 2 +- .../with-declarative-redis-and-secrets.nix | 14 +++++++------- nixos/tests/nextcloud/with-mysql-and-memcached.nix | 2 +- .../tests/nextcloud/with-postgresql-and-redis.nix | 2 +- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/nixos/tests/nextcloud/basic.nix b/nixos/tests/nextcloud/basic.nix index e17f701c54b7..db5cee9f6584 100644 --- a/nixos/tests/nextcloud/basic.nix +++ b/nixos/tests/nextcloud/basic.nix @@ -14,12 +14,12 @@ in { client = { ... }: { services.davfs2.enable = true; system.activationScripts.davfs2-secrets = '' - echo "http://nextcloud/remote.php/webdav/ ${adminuser} ${adminpass}" > /tmp/davfs2-secrets + echo "http://nextcloud/remote.php/dav/files/${adminuser} ${adminuser} ${adminpass}" > /tmp/davfs2-secrets chmod 600 /tmp/davfs2-secrets ''; virtualisation.fileSystems = { "/mnt/dav" = { - device = "http://nextcloud/remote.php/webdav/"; + device = "http://nextcloud/remote.php/dav/files/${adminuser}"; fsType = "davfs"; options = let davfs2Conf = (pkgs.writeText "davfs2.conf" "secrets /tmp/davfs2-secrets"); @@ -70,7 +70,7 @@ in { withRcloneEnv = pkgs.writeScript "with-rclone-env" '' #!${pkgs.runtimeShell} export RCLONE_CONFIG_NEXTCLOUD_TYPE=webdav - export RCLONE_CONFIG_NEXTCLOUD_URL="http://nextcloud/remote.php/webdav/" + export RCLONE_CONFIG_NEXTCLOUD_URL="http://nextcloud/remote.php/dav/files/${adminuser}" export RCLONE_CONFIG_NEXTCLOUD_VENDOR="nextcloud" export RCLONE_CONFIG_NEXTCLOUD_USER="${adminuser}" export RCLONE_CONFIG_NEXTCLOUD_PASS="$(${pkgs.rclone}/bin/rclone obscure ${adminpass})" diff --git a/nixos/tests/nextcloud/openssl-sse.nix b/nixos/tests/nextcloud/openssl-sse.nix index 659a4311cddd..92beb869eb03 100644 --- a/nixos/tests/nextcloud/openssl-sse.nix +++ b/nixos/tests/nextcloud/openssl-sse.nix @@ -33,7 +33,7 @@ in { withRcloneEnv = host: pkgs.writeScript "with-rclone-env" '' #!${pkgs.runtimeShell} export RCLONE_CONFIG_NEXTCLOUD_TYPE=webdav - export RCLONE_CONFIG_NEXTCLOUD_URL="http://${host}/remote.php/webdav/" + export RCLONE_CONFIG_NEXTCLOUD_URL="http://${host}/remote.php/dav/files/${adminuser}" export RCLONE_CONFIG_NEXTCLOUD_VENDOR="nextcloud" export RCLONE_CONFIG_NEXTCLOUD_USER="${adminuser}" export RCLONE_CONFIG_NEXTCLOUD_PASS="$(${pkgs.rclone}/bin/rclone obscure ${adminpass})" diff --git a/nixos/tests/nextcloud/with-declarative-redis-and-secrets.nix b/nixos/tests/nextcloud/with-declarative-redis-and-secrets.nix index 915fa58ab145..e638f2e5b861 100644 --- a/nixos/tests/nextcloud/with-declarative-redis-and-secrets.nix +++ b/nixos/tests/nextcloud/with-declarative-redis-and-secrets.nix @@ -1,6 +1,6 @@ args@{ nextcloudVersion ? 27, ... }: (import ../make-test-python.nix ({ pkgs, ...}: let - username = "custom_admin_username"; + adminuser = "custom_admin_username"; # This will be used both for redis and postgresql pass = "hunter2"; # Don't do this at home, use a file outside of the nix store instead @@ -34,9 +34,9 @@ in { config = { dbtype = "pgsql"; dbname = "nextcloud"; - dbuser = username; + dbuser = adminuser; dbpassFile = passFile; - adminuser = username; + adminuser = adminuser; adminpassFile = passFile; }; secretFile = "/etc/nextcloud-secrets.json"; @@ -66,9 +66,9 @@ in { systemd.services.postgresql.postStart = pkgs.lib.mkAfter '' password=$(cat ${passFile}) ${config.services.postgresql.package}/bin/psql < Date: Thu, 29 Jun 2023 08:19:43 -0700 Subject: [PATCH 20/25] doc/maven: prefer maven.buildMavenPackage over mvn2nix Manually calling `mvn2nix` was the preferred way of building Java apps that use Maven, but `maven.buildMavenPackage` is now the preferred way. --- doc/languages-frameworks/maven.section.md | 129 +++++++++++++--------- 1 file changed, 76 insertions(+), 53 deletions(-) diff --git a/doc/languages-frameworks/maven.section.md b/doc/languages-frameworks/maven.section.md index 3b5e2e14ee64..d2947d4d4153 100644 --- a/doc/languages-frameworks/maven.section.md +++ b/doc/languages-frameworks/maven.section.md @@ -4,6 +4,57 @@ Maven is a well-known build tool for the Java ecosystem however it has some chal The following provides a list of common patterns with how to package a Maven project (or any JVM language that can export to Maven) as a Nix package. +## Building a package using `maven.buildMavenPackage` {#maven-buildmavenpackage} + +Consider the following package: + +```nix +{ lib, fetchFromGitHub, jre, makeWrapper, maven }: + +maven.buildMavenPackage rec { + pname = "jd-cli"; + version = "1.2.1"; + + src = fetchFromGitHub { + owner = "intoolswetrust"; + repo = pname; + rev = "${pname}-${version}"; + hash = "sha256-rRttA5H0A0c44loBzbKH7Waoted3IsOgxGCD2VM0U/Q="; + }; + + mvnHash = "sha256-kLpjMj05uC94/5vGMwMlFzLKNFOKeyNvq/vmB6pHTAo="; + + nativeBuildInputs = [ maven makeWrapper ]; + + installPhase = '' + mkdir -p $out/bin $out/share/jd-cli + install -Dm644 jd-cli/target/jd-cli.jar $out/share/jd-cli + + makeWrapper ${jre}/bin/java $out/bin/jd-cli \ + --add-flags "-jar $out/share/jd-cli/jd-cli.jar" + ''; + + meta = with lib; { + description = "Simple command line wrapper around JD Core Java Decompiler project"; + homepage = "https://github.com/intoolswetrust/jd-cli"; + license = licenses.gpl3; + platforms = platforms.unix; + maintainers = with maintainers; [ majiir ]; + }; +}: +``` + +This package calls `maven.buildMavenPackage` to do its work. The primary difference from `stenv.mkDerivation` is the `mvnHash` variable, which is a hash of all of the Maven dependencies. + +::: {.tip} +After setting `maven.buildMavenPackage`, we then do standard Java `.jar` installation by saving the `.jar` to `$out/share/java` and then making a wrapper which allows executing that file; see [](#sec-language-java) for additional generic information about packaging Java applications. +::: + +## Manually using `mvn2nix` {#maven-mvn2nix} +::: {.warning} +This way is no longer recommended; see [](#maven-buildmavenpackage) for the simpler and preferred way. +::: + For the purposes of this example let's consider a very basic Maven project with the following `pom.xml` with a single dependency on [emoji-java](https://github.com/vdurmont/emoji-java). ```xml @@ -41,14 +92,11 @@ public class Main { } ``` -You find this demo project at https://github.com/fzakaria/nixos-maven-example +You find this demo project at [https://github.com/fzakaria/nixos-maven-example](https://github.com/fzakaria/nixos-maven-example). -## Solving for dependencies {#solving-for-dependencies} - -### buildMaven with NixOS/mvn2nix-maven-plugin {#buildmaven-with-nixosmvn2nix-maven-plugin} - -> ⚠️ Although `buildMaven` is the "blessed" way within nixpkgs, as of 2020, it hasn't seen much activity in quite a while. +### Solving for dependencies {#solving-for-dependencies} +#### buildMaven with NixOS/mvn2nix-maven-plugin {#buildmaven-with-nixosmvn2nix-maven-plugin} `buildMaven` is an alternative method that tries to follow similar patterns of other programming languages by generating a lock file. It relies on the maven plugin [mvn2nix-maven-plugin](https://github.com/NixOS/mvn2nix-maven-plugin). First you generate a `project-info.json` file using the maven plugin. @@ -105,9 +153,10 @@ The benefit over the _double invocation_ as we will see below, is that the _/nix │   ├── avalon-framework-4.1.3.jar -> /nix/store/iv5fp3955w3nq28ff9xfz86wvxbiw6n9-avalon-framework-4.1.3.jar ``` -### Double Invocation {#double-invocation} - -> ⚠️ This pattern is the simplest but may cause unnecessary rebuilds due to the output hash changing. +#### Double Invocation {#double-invocation} +::: {.note} +This pattern is the simplest but may cause unnecessary rebuilds due to the output hash changing. +::: The double invocation is a _simple_ way to get around the problem that `nix-build` may be sandboxed and have no Internet connectivity. @@ -115,7 +164,9 @@ It treats the entire Maven repository as a single source to be downloaded, relyi The first step will be to build the Maven project as a fixed-output derivation in order to collect the Maven repository -- below is an [example](https://github.com/fzakaria/nixos-maven-example/blob/main/double-invocation-repository.nix). -> Traditionally the Maven repository is at `~/.m2/repository`. We will override this to be the `$out` directory. +::: {.note} +Traditionally the Maven repository is at `~/.m2/repository`. We will override this to be the `$out` directory. +::: ```nix { lib, stdenv, maven }: @@ -147,7 +198,9 @@ stdenv.mkDerivation { The build will fail, and tell you the expected `outputHash` to place. When you've set the hash, the build will return with a `/nix/store` entry whose contents are the full Maven repository. -> Some additional files are deleted that would cause the output hash to change potentially on subsequent runs. +::: {.warning} +Some additional files are deleted that would cause the output hash to change potentially on subsequent runs. +::: ```bash ❯ tree $(nix-build --no-out-link double-invocation-repository.nix) | head @@ -165,40 +218,7 @@ The build will fail, and tell you the expected `outputHash` to place. When you'v If your package uses _SNAPSHOT_ dependencies or _version ranges_; there is a strong likelihood that over-time your output hash will change since the resolved dependencies may change. Hence this method is less recommended then using `buildMaven`. -#### Stable Maven plugins {#stable-maven-plugins} - -Maven defines default versions for its core plugins, e.g. `maven-compiler-plugin`. -If your project does not override these versions, an upgrade of Maven will change the version of the used plugins. -This changes the output of the first invocation and the plugins required by the second invocation. -However, since a hash is given for the output of the first invocation, the second invocation will simply fail -because the requested plugins are missing. -This will prevent automatic upgrades of Maven: the manual fix for this is to change the hash of the first invocation. - -To make sure that your package does not add manual effort when upgrading Maven, explicitly define versions for all -plugins. You can check if this is the case by adding the following plugin to your (parent) POM: - -```xml - - org.apache.maven.plugins - maven-enforcer-plugin - 3.3.0 - - - enforce-plugin-versions - - enforce - - - - - - - - - -``` - -## Building a JAR {#building-a-jar} +### Building a JAR {#building-a-jar} Regardless of which strategy is chosen above, the step to build the derivation is the same. @@ -224,7 +244,9 @@ in stdenv.mkDerivation rec { } ``` -> We place the library in `$out/share/java` since JDK package has a _stdenv setup hook_ that adds any JARs in the `share/java` directories of the build inputs to the CLASSPATH environment. +::: {.tip} +We place the library in `$out/share/java` since JDK package has a _stdenv setup hook_ that adds any JARs in the `share/java` directories of the build inputs to the CLASSPATH environment. +::: ```bash ❯ tree $(nix-build --no-out-link build-jar.nix) @@ -236,7 +258,7 @@ in stdenv.mkDerivation rec { 2 directories, 1 file ``` -## Runnable JAR {#runnable-jar} +### Runnable JAR {#runnable-jar} The previous example builds a `jar` file but that's not a file one can run. @@ -248,9 +270,9 @@ We will use the same repository we built above (either _double invocation_ or _b The following two methods are more suited to Nix then building an [UberJar](https://imagej.net/Uber-JAR) which may be the more traditional approach. -### CLASSPATH {#classpath} +#### CLASSPATH {#classpath} -> This is ideal if you are providing a derivation for _nixpkgs_ and don't want to patch the project's `pom.xml`. +This method is ideal if you are providing a derivation for _nixpkgs_ and don't want to patch the project's `pom.xml`. We will read the Maven repository and flatten it to a single list. This list will then be concatenated with the _CLASSPATH_ separator to create the full classpath. @@ -288,9 +310,9 @@ in stdenv.mkDerivation rec { } ``` -### MANIFEST file via Maven Plugin {#manifest-file-via-maven-plugin} +#### MANIFEST file via Maven Plugin {#manifest-file-via-maven-plugin} -> This is ideal if you are the project owner and want to change your `pom.xml` to set the CLASSPATH within it. +This method is ideal if you are the project owner and want to change your `pom.xml` to set the CLASSPATH within it. Augment the `pom.xml` to create a JAR with the following manifest: @@ -366,8 +388,9 @@ in stdenv.mkDerivation rec { ''; } ``` - -> Our script produces a dependency on `jre` rather than `jdk` to restrict the runtime closure necessary to run the application. +::: {.note} +Our script produces a dependency on `jre` rather than `jdk` to restrict the runtime closure necessary to run the application. +::: This will give you an executable shell-script that launches your JAR with all the dependencies available. From 3788d28081ade320eafb7ed7e80beb10eceac8f4 Mon Sep 17 00:00:00 2001 From: etienne-k <2804556+etienne-k@users.noreply.github.com> Date: Tue, 1 Aug 2023 12:10:34 +0200 Subject: [PATCH 21/25] bun: 0.7.0 -> 0.7.1 --- pkgs/development/web/bun/default.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/development/web/bun/default.nix b/pkgs/development/web/bun/default.nix index 86d5e3e9961e..6eacf78e56ab 100644 --- a/pkgs/development/web/bun/default.nix +++ b/pkgs/development/web/bun/default.nix @@ -11,7 +11,7 @@ }: stdenvNoCC.mkDerivation rec { - version = "0.7.0"; + version = "0.7.1"; pname = "bun"; src = passthru.sources.${stdenvNoCC.hostPlatform.system} or (throw "Unsupported system: ${stdenvNoCC.hostPlatform.system}"); @@ -32,19 +32,19 @@ stdenvNoCC.mkDerivation rec { sources = { "aarch64-darwin" = fetchurl { url = "https://github.com/oven-sh/bun/releases/download/bun-v${version}/bun-darwin-aarch64.zip"; - hash = "sha256-5PcDK1rSHu9WucCuxBclnEzB9DkbQNwzYnq0Moto9aw="; + hash = "sha256-5AC1jd2rTVZ+Rfn7B1uvps9NVVAByMlo0mjhM8Wc6jI="; }; "aarch64-linux" = fetchurl { url = "https://github.com/oven-sh/bun/releases/download/bun-v${version}/bun-linux-aarch64.zip"; - hash = "sha256-9Kwqa3V/LMjuZSS00uPNkHAnWvBo/33kgzmwa903T80="; + hash = "sha256-DM1HVlbqPCOkT05IAVciP1c5g7PIZPmjHmlbWD8DmoU="; }; "x86_64-darwin" = fetchurl { url = "https://github.com/oven-sh/bun/releases/download/bun-v${version}/bun-darwin-x64.zip"; - hash = "sha256-aH5ldcHKk3VzJ13qoHt9qt/TYZvg35jZG8NQ3GGnE9I="; + hash = "sha256-UjInXqkdfigrmIJycee4Nxjv+LhYGLjP+Z/B8WnAfmI="; }; "x86_64-linux" = fetchurl { url = "https://github.com/oven-sh/bun/releases/download/bun-v${version}/bun-linux-x64.zip"; - hash = "sha256-cczuQoE6LV9NPaHx14Z6va4QsXb3cUYL799SGzKTIYA="; + hash = "sha256-l5lSbJwsPHejcgCXvTDPjvzSP6s/OBgOS44g2xTxfYo="; }; }; updateScript = writeShellScript "update-bun" '' From fdd97a473861a849a9319b20dfa12d26ffc6ba88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=B0=D0=BC=D1=98=D0=B0=D0=BD=20=D0=93=D0=B5=D0=BE?= =?UTF-8?q?=D1=80=D0=B3=D0=B8=D0=B5=D0=B2=D1=81=D0=BA=D0=B8?= Date: Tue, 1 Aug 2023 13:53:02 +0200 Subject: [PATCH 22/25] matrix-appservice-irc: add package.json to package - seems that package.json is still required in the package root, so add it - also add `strictDeps = true` to mkDerivation (this removed bash as a direct dependency) --- pkgs/servers/matrix-synapse/matrix-appservice-irc/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/servers/matrix-synapse/matrix-appservice-irc/default.nix b/pkgs/servers/matrix-synapse/matrix-appservice-irc/default.nix index a00104215453..753118528bdd 100644 --- a/pkgs/servers/matrix-synapse/matrix-appservice-irc/default.nix +++ b/pkgs/servers/matrix-synapse/matrix-appservice-irc/default.nix @@ -31,6 +31,8 @@ in stdenv.mkDerivation { inherit pname version src yarnOfflineCache; + strictDeps = true; + nativeBuildInputs = [ prefetch-yarn-deps nodejs-slim @@ -62,6 +64,7 @@ stdenv.mkDerivation { runHook preInstall mkdir $out + cp package.json $out cp app.js config.schema.yml $out cp -r bin lib public $out From 419974c6bebc2f5f70d6f8423ac5e5ba209736e0 Mon Sep 17 00:00:00 2001 From: zendo Date: Tue, 1 Aug 2023 20:27:01 +0800 Subject: [PATCH 23/25] iotas: 0.1.14 -> 0.2.2 --- pkgs/applications/office/iotas/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/office/iotas/default.nix b/pkgs/applications/office/iotas/default.nix index c5c3afb5c5d1..4c9c53afd22e 100644 --- a/pkgs/applications/office/iotas/default.nix +++ b/pkgs/applications/office/iotas/default.nix @@ -19,7 +19,7 @@ python3.pkgs.buildPythonApplication rec { pname = "iotas"; - version = "0.1.14"; + version = "0.2.2"; format = "other"; src = fetchFromGitLab { @@ -27,7 +27,7 @@ python3.pkgs.buildPythonApplication rec { owner = "cheywood"; repo = pname; rev = version; - hash = "sha256-IvKjvsHJdoFmDvsM1/kFPikYbBLUEQ57DKr1T+Jyw7w="; + hash = "sha256-oThsyTsNM3283e4FViISdFzmeQnU7qXHh4xEJWA2fkc="; }; nativeBuildInputs = [ @@ -56,11 +56,11 @@ python3.pkgs.buildPythonApplication rec { requests markdown-it-py linkify-it-py + mdit-py-plugins ]; # prevent double wrapping dontWrapGApps = true; - preFixup = '' makeWrapperArgs+=("''${gappsWrapperArgs[@]}") ''; From 3bf9e658814b7f97cc733d8c712b0b0ecfc91a04 Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Tue, 1 Aug 2023 16:00:52 +0200 Subject: [PATCH 24/25] doc/maven: add stable-maven-plugins back --- doc/languages-frameworks/maven.section.md | 38 ++++++++++++++++++++--- 1 file changed, 34 insertions(+), 4 deletions(-) diff --git a/doc/languages-frameworks/maven.section.md b/doc/languages-frameworks/maven.section.md index d2947d4d4153..7e287a097c7e 100644 --- a/doc/languages-frameworks/maven.section.md +++ b/doc/languages-frameworks/maven.section.md @@ -24,7 +24,7 @@ maven.buildMavenPackage rec { mvnHash = "sha256-kLpjMj05uC94/5vGMwMlFzLKNFOKeyNvq/vmB6pHTAo="; - nativeBuildInputs = [ maven makeWrapper ]; + nativeBuildInputs = [ makeWrapper ]; installPhase = '' mkdir -p $out/bin $out/share/jd-cli @@ -37,19 +37,49 @@ maven.buildMavenPackage rec { meta = with lib; { description = "Simple command line wrapper around JD Core Java Decompiler project"; homepage = "https://github.com/intoolswetrust/jd-cli"; - license = licenses.gpl3; - platforms = platforms.unix; + license = licenses.gpl3Plus; maintainers = with maintainers; [ majiir ]; }; }: ``` -This package calls `maven.buildMavenPackage` to do its work. The primary difference from `stenv.mkDerivation` is the `mvnHash` variable, which is a hash of all of the Maven dependencies. +This package calls `maven.buildMavenPackage` to do its work. The primary difference from `stdenv.mkDerivation` is the `mvnHash` variable, which is a hash of all of the Maven dependencies. ::: {.tip} After setting `maven.buildMavenPackage`, we then do standard Java `.jar` installation by saving the `.jar` to `$out/share/java` and then making a wrapper which allows executing that file; see [](#sec-language-java) for additional generic information about packaging Java applications. ::: +### Stable Maven plugins {#stable-maven-plugins} + +Maven defines default versions for its core plugins, e.g. `maven-compiler-plugin`. If your project does not override these versions, an upgrade of Maven will change the version of the used plugins, and therefore the derivation and hash. + +When `maven` is upgraded, `mvnHash` for the derivation must be updated as well: otherwise, the project will simply be built on the derivation of old plugins, and fail because the requested plugins are missing. + +This clearly prevents automatic upgrades of Maven: a manual effort must be made throughout nixpkgs by any maintainer wishing to push the upgrades. + +To make sure that your package does not add extra manual effort when upgrading Maven, explicitly define versions for all plugins. You can check if this is the case by adding the following plugin to your (parent) POM: + +```xml + + org.apache.maven.plugins + maven-enforcer-plugin + 3.3.0 + + + enforce-plugin-versions + + enforce + + + + + + + + + +``` + ## Manually using `mvn2nix` {#maven-mvn2nix} ::: {.warning} This way is no longer recommended; see [](#maven-buildmavenpackage) for the simpler and preferred way. From c89298b854db23e4716e2d825717a02a46f55a48 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Tue, 1 Aug 2023 17:50:10 +0300 Subject: [PATCH 25/25] confy: use fetchzip, for consistent hashes --- pkgs/applications/misc/confy/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/misc/confy/default.nix b/pkgs/applications/misc/confy/default.nix index 24a21471b45b..5762864fb528 100644 --- a/pkgs/applications/misc/confy/default.nix +++ b/pkgs/applications/misc/confy/default.nix @@ -1,6 +1,6 @@ { blueprint-compiler , desktop-file-utils -, fetchurl +, fetchzip , gobject-introspection , gtk4 , lib @@ -18,9 +18,9 @@ stdenv.mkDerivation rec { pname = "confy"; version = "0.7.0"; - src = fetchurl { + src = fetchzip { url = "https://git.sr.ht/~fabrixxm/confy/archive/${version}.tar.gz"; - hash = "sha256-ZvIzgCMDfUW9g+qmY0ZIUoEF0PeVmINjOPwilmFzWDk="; + hash = "sha256-q8WASTNbiBuKb2tPQBmUL9ji60PRAPnYOTYxnUn0MAw="; }; nativeBuildInputs = [