Commit Graph

237 Commits

Author SHA1 Message Date
Ben Siraphob
f82dc8ebe9 pkgs/development: fix typos
Assisted-by: Claude Code (claude-opus-5)
2026-08-02 15:56:57 -07:00
Peder Bergebakken Sundt
953d17c5cc gradle: reduce keytool noise (#472580) 2026-07-31 23:39:56 +00:00
Emily
fdb820602b treewide: drop simple x86_64-darwin mentions
To reproduce:

    $ nix run nixpkgs/3b32825de172d0bc85664f495edb096b10862524#ast-grep \
        -- scan --update-all --inline-rules '
          id: nix-x86_64-darwin
          language: nix
          rule:
            any:
              - pattern: "\"x86_64-darwin\""
                kind: list_expression > string_expression
              - pattern:
                  context: "{ \"x86_64-darwin\" = $EXPR; }"
                  selector: binding
              - pattern:
                  context: "{ x86_64-darwin = $EXPR; }"
                  selector: binding
          fix:
            template: ""
        ' pkgs
    $ nix run nixpkgs/3b32825de172d0bc85664f495edb096b10862524#ast-grep \
        -- scan --update-all --inline-rules '
          id: json-first-x86_64-darwin
          language: json
          rule:
            kind: object > pair:nth-child(1)
            has:
              pattern: "\"x86_64-darwin\""
              field: key
          fix:
            template: ""
            expandEnd: { regex: "," }
        ' pkgs
    $ nix run nixpkgs/3b32825de172d0bc85664f495edb096b10862524#ast-grep \
        -- scan --update-all --inline-rules '
          id: json-x86_64-darwin
          language: json
          rule:
            kind: object > pair
            has:
              pattern: "\"x86_64-darwin\""
              field: key
          fix:
            template: ""
            expandStart: { regex: "," }
        ' pkgs
    $ git restore pkgs/by-name/om/omnix/package.nix
    $ git diff --name-only -z \
        | nix shell nixpkgs/3b32825de172d0bc85664f495edb096b10862524#gnused \
            -c xargs -0 sed -i '/^$/N; /^\n\? \+$/d'
    $ treefmt
2026-07-15 03:58:16 +01:00
Nick Novitski
8491821091 gradle: setup hook respects java override
Before this commit, an expression like `pkgs.gradle_8.override { java = pkgs.openjdk17; }` would produce a
gradle package which uses jdk 17, but has a setup hook which uses jdk 21.
2026-07-13 16:45:56 -07:00
dotlambda
c957f4127e gradle_9: 9.4.1 -> 9.5.1 (#526567) 2026-06-26 06:11:15 +00:00
Robert Schütz
29638dde9c gradle_9: use jdk25 2026-06-24 16:26:53 +02:00
Robert Schütz
40525b5262 gradle_9: 9.4.1 -> 9.5.1
Changelog: https://docs.gradle.org/9.5.1/release-notes.html
2026-06-24 16:26:53 +02:00
Adam Thompson-Sharpe
1edaf9905e gradle: fix update script with structuredAttrs 2026-06-18 08:53:59 -04:00
Sigmanificient
0bbc8dffae treewide: set meta.license on hooks 2026-05-25 13:48:20 +02:00
Arne Keller
665bb4f5b6 gradle: fix usage of update-deps script without bwrap (#418576) 2026-04-16 09:09:10 +00:00
Mio
755334ed61 gradle: workaround for multiple console arguments error 2026-04-11 15:32:40 +10:00
Stanisław Pitucha
224c3007c2 gradle: Check that mitmCache.updateScript is run from a valid location (#486373) 2026-03-31 11:20:58 +00:00
R. Ryantm
028ee25368 gradle_9-unwrapped: 9.4.0 -> 9.4.1 2026-03-31 00:51:13 +00:00
Benedikt Ritter
773ee7e880 gradle: configure updateScript per major version
Previously the regex for updating Gradle matched any major version,
resulting in version bumps like #504857 where gradle_8 was updated to
9.4.1.
After this change, the version regexp is tagged to a specific major
version. That way gradle_8 is only updated to versions that start with
'8'. At the same time version updates are enabled for gradle_9 if they
start with '9'.
Last but not least, `nix-update-script` is now called with
`--use-github-releases` because without it the updater defaults to using
GitHub's releases Atom feed, and just returns the most recent releases,
causing the gradle_8 update to fail because no matching release version
could be found.
2026-03-30 10:03:28 +02:00
Arne Keller
4ba429d9d1 gradle: handle missing release version in dependencies (#471661) 2026-03-09 12:12:41 +00:00
superherointj
1466545bdb gradle_9: 9.3.1 -> 9.4.0
https://github.com/gradle/gradle/releases/tag/v9.4.0
2026-03-08 21:24:38 -03:00
Marc Jakobi
96e5bca012 gradle: handle missing release version in dependencies 2026-03-06 10:34:50 +01:00
Tony Wasserka
2b5643491d gradle: Check that mitmCache.updateScript is run from a valid location 2026-02-09 18:46:38 +01:00
Benedikt Ritter
c3605dfe79 gradle_9: 9.3.0 -> 9.3.1 2026-02-02 21:41:18 +01:00
nixpkgs-ci[bot]
380f8ffc67 Merge master into staging-nixos 2026-01-26 06:09:34 +00:00
Michael Daniels
006ecdbdeb treewide: fix typos (#479869) 2026-01-24 21:36:44 +00:00
Benedikt Ritter
f15b4314be gradle_8: 8.14.3 -> 8.14.4 2026-01-23 19:46:12 +01:00
FliegendeWurst
8280c62e69 gradle_9: 9.2.1 -> 9.3.0
https://docs.gradle.org/9.3.0/release-notes.html
2026-01-18 20:34:45 +01:00
Ben Siraphob
c7e10647ea treewide: fix typos 2026-01-13 14:45:11 -05:00
Tobias M
b3d1604ae1 gradle: reduce keytool noise
keytool is very chatty when prompting about whether the accept the newly
generated certificate. Instead of passing a y via stdin, simply use the
-noprompt flag to indicate we're running non-interactively.
In practice, this declutters Gradle build logs.
2025-12-19 15:43:14 +01:00
Henry
a33d3dba02 gradle_9: 9.1.0 -> 9.2.1 2025-12-13 23:14:48 -06:00
Ihar Hrachyshka
567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00
Morgan Jones
dd421437ce gradle: check GRADLE_OPTS in tests
We can replace the org.gradle.native.dir environment variable with
GRADLE_OPTS and -D which seems like the "nice" way to do the same thing
now.
2025-12-03 14:45:15 -08:00
Morgan Jones
ca3ac86ee4 gradle: use official Gradle wrapper
Not using the official Gradle wrapper causes papercuts like GRADLE_OPTS
and JAVA_HOME not working or misbehaving. Use the default wrapper script
and allow override of JAVA_HOME so we preserve the default Gradle wrapper
behavior.

Move the Gradle jars and bin to $out/libexec while we're at it so we
don't have to make any modifications to the wrapper ourselves
except for patching the shebang on install.

Tested with `gradle_{7,8,9}.tests` and a `nixpkgs-review rev HEAD`
to check reverse dependencies.

Fixes: #72220
Fixes: #402297
Fixes: #453296
2025-12-03 14:24:57 -08:00
Morgan Jones
2788f37f64 gradle: expose gradle-packages.mkGradle and gradle-packages.wrapGradle
Users may want to use a completely custom version of Gradle. Add
mkGradle and wrapGradle as non-toplevel APIs for this.
2025-11-02 15:14:11 -08:00
Morgan Jones
38fff9c039 gradle: pass through wrapper override arguments to unwrapped Gradle
Comments on #436358 and #402297 indicated a desire to have a more
controllable Gradle wrapper derivation. We were previously hiding the
Gradle being wrapped in the closure of wrapGradle, forcing us to expose
wrapGradle and use makeOverridable. Simply use callPackage to make it
easier for consumers to override things without us needing to expose gradleGen.
2025-11-02 13:44:30 -08:00
Wolfgang Walther
cdb2f931c3 gradle_7: fix meta eval
Currently `gradle_7.meta` does not evaluate, because evaluation is
forced in the wrapper adding the updateScript. We can move the update
script to `gradle_8-unwrapped`, for which we don't need to do this
check.
2025-11-02 22:07:21 +01:00
Tomodachi94
c689bfd9b2 gradle_7: mark as insecure
I do not think that #358845 will be finished by the
planned release date for 25.11, so let's mark is as
insecure to make it explicit that Gradle 7 is unsupported.
2025-10-14 11:36:03 -07:00
NAHO
c8d4dabc43 pkgs: remove optional builtins prefixes from prelude functions
Remove optional builtins prefixes from prelude functions by running:

    builtins=(
      abort
      baseNameOf
      break
      derivation
      derivationStrict
      dirOf
      false
      fetchGit
      fetchMercurial
      fetchTarball
      fetchTree
      fromTOML
      import
      isNull
      map
      null
      placeholder
      removeAttrs
      scopedImport
      throw
      toString
      true
    )

    fd \
      --type file \
      . \
      pkgs \
      --exec-batch sed --in-place --regexp-extended "
        s/\<builtins\.($(
          printf '%s\n' "${builtins[@]}" |
            paste --delimiter '|' --serial -
        ))\>/\1/g
      "

    nix fmt
2025-10-04 19:02:37 +02:00
Sean Gilligan
4224c1dd5c gradle: remove dependency on EOL jdk23, use jdk11 for test
A passthru test of the javaToolchains configuration property was 
using jdk23.

There is a requirement that the JDK version for the
test NOT be "the default for any of the gradle versions", so jdk11
is a good choice for the replacement since jdk17 and jdk21 are
currently used and jdk25 will be used in the future.
2025-09-29 15:49:59 -07:00
Sean Gilligan
208925957e gradle_9: 9.0.0 -> 9.1.0
Gradle 9.1.0 adds Java 25 compatibility
2025-09-18 13:42:41 -07:00
Morgan Jones
0996bd37f3 gradle: unwrapped shouldn't have unwrapped passthru 2025-09-01 17:32:45 -07:00
Morgan Jones
f537468f19 gradle{,_7,_8,_9}{,-unwrapped}: clean up wrapping
Eliminate duplicate function calls and make the API cleaner.

$ nix-instantiate --eval -A gradle.updateScript
[ <CODE> "--url=https://github.com/gradle/gradle" "--version-regex=^v(\\d+\\.\\d+(?:\\.[1-9]\\d?)?)(\\.0)?$" ]
$ nix-instantiate --eval -A gradle_7.updateScript
error: attribute 'updateScript' in selection path 'gradle_7.updateScript' not found
$ nix-instantiate --eval -A gradle_9.updateScript
error: attribute 'updateScript' in selection path 'gradle_9.updateScript' not found
2025-09-01 17:28:34 -07:00
Morgan Jones
cfcc505fcc gradle{,_7,_8,_9}{,-unwrapped}: remove callPackage from all-packages.nix
Since we now have a more strict nixpkgs-vet, deal with all the Gradle
callPackage (including for unwrapped versions) in the package set,
instead of continuing to fight against CI. See #421047 for context.

Should retain complete compatibility with previous nixpkgs versions,
particularly check that there were no messups in the review.
2025-09-01 17:03:31 -07:00
Ben Siraphob
2f77d9aa7c pkgs: fix README typos 2025-08-27 11:46:28 -07:00
transcaffeine
0de77985b7 gradle_9: init at 9.0.0
Release notes: https://github.com/gradle/gradle/releases/tag/v9.0.0
2025-08-02 15:38:29 +02:00
Wolfgang Walther
5a0711127c treewide: run nixfmt 1.0.0 2025-07-24 13:55:40 +02:00
Paul Meyer
db99a95bbd gradle_7: 7.6.5 -> 7.6.6 (#422443) 2025-07-15 17:09:11 +02:00
transcaffeine
a70581ef62 gradle_8: 8.14.2 -> 8.14.3
Release notes: https://github.com/gradle/gradle/releases/tag/v8.14.3
Full changelog: https://github.com/gradle/gradle/compare/v8.14.2...v8.14.3
2025-07-04 17:12:04 +02:00
transcaffeine
85dec7df93 gradle_7: 7.6.5 -> 7.6.6
Release notes: https://github.com/gradle/gradle/releases/tag/v7.6.6
Full changelog: https://github.com/gradle/gradle/compare/v7.6.5...v7.6.6
2025-07-04 17:08:45 +02:00
Paul Liétar
ce96bc54ec gradle: fix usage of update-deps script without bwrap
The gradle build hook exposes an update-deps script that can,
supposedly, run without bwrap if the USE_BWRAP environment is set to 0.

Unfortunately the test on the variable was checking if it had an
non-empty value (using -n), but just above the variable is given a
default value in cases when it is empty. This meant the variable could
never be empty and therefore bwrap is always used (assuming the Nix
parameter useBwrap is true).

By changing the test into an inequality check against zero, we can
disable bwrap by setting `USE_BWRAP=0`. Any other value will leave bwrap
enabled.

Unfortunately the lack of boolean values in bash make it non-obvious
what the best representation and test for this should be. We could also
check for equality against 1 for example, or some more complicated test
that handles the string "false" as well. Using 0 as the false value
seems common place enough in scripts though.

The conversion of `useBwrap` to a string needs to be adjusted, as
`builtins.toString` actually returns an empty string for a false value.
2025-06-21 03:29:31 +01:00
Leona Maroni
35a4459e15 gradle_7: 7.6.4 -> 7.6.5 (#414705) 2025-06-20 09:32:44 +02:00
transcaffeine
29cac6e933 gradle_7: 7.6.4 -> 7.6.5
Release notes: https://docs.gradle.org/7.6.5/release-notes.html
Full changelog: https://github.com/gradle/gradle/compare/v7.6.4...v7.6.5
2025-06-07 11:56:37 +02:00
transcaffeine
62b549a605 gradle_8: 8.14.1 -> 8.14.2
Release notes: https://github.com/gradle/gradle/releases/tag/v8.14.2
Full changelog: https://github.com/gradle/gradle/compare/v8.14.1...v8.14.2
2025-06-07 11:49:25 +02:00
R. Ryantm
afda1127d5 gradle: 8.14 -> 8.14.1 2025-05-24 07:53:35 +00:00