Commit Graph

14 Commits

Author SHA1 Message Date
SandaruKasa
0a1bf9d0ab resholve.mkDerivation: propagate strictDeps & __structuredAttrs 2026-05-16 19:11:57 +03:00
Travis A. Everett
62e9404388 resholve: fix finalAttrs compatibility 2026-05-15 19:46:05 -05:00
Travis A. Everett
2662c1b538 resholve: 0.10.6 -> 0.10.7
Non-source changes:
- drops `bash -n` style syntax checking for writeScript(Bin) to avoid
  breaking cross builds
- add postResholve hook (supersedes unmerged pr #439997)
- track testing changes in resholve
2025-11-09 20:04:03 -06: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
Wolfgang Walther
5a0711127c treewide: run nixfmt 1.0.0 2025-07-24 13:55:40 +02:00
Travis A. Everett
8a1b029672 resholve: 0.10.5 -> 0.10.6
Also:
- use nixfmt style for examples in README.md
- drop passthru consumer test for ix removed in #397949
2025-06-22 08:58:20 -05:00
Silvan Mosberger
4f0dadbf38 treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build a08b3a4d19.tar.gz \
      --argstr baseRev b32a094368
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:26:33 +01:00
Thiago Kenji Okada
d00a5dad2a Merge pull request #210761 from abathur/resholve_track_missed_fix
resholve: track missed upstream Nix fix
2023-01-15 18:17:08 +00:00
Thiago Kenji Okada
03ab899a45 resholve-utils: set disallowedReferences for resholve.mkDerivation 2023-01-15 12:29:42 +00:00
Travis A. Everett
ba5e8f2835 resholve: track missed upstream Nix fix
Forgot to port this resholve Nix API fix in the course of #184292.

Same change as:
github.com/abathur/resholve/commit/b743d2eb12d82e35c567733a7a884174e3606641
2023-01-14 14:38:32 -06:00
Travis A. Everett
ff44e1f9dd resholve: use originalSrc for nixpkgs-update bot
Effort to fix automatic nixpkgs-update updates for resholved
packages in 9f6310d did help the bot get further, but it
then failed to find the source outputHash (the outer
derivation's source is the inner derivation; bot looks for
outer.src.outputHash; ours is at outer.src.src.outputHash).

This change uses `originalSrc` to indicate the source of the
inner derivation. Along with ryantm/nixpkgs-update#324, this
enables the bot to fall back on an attr that Nix/nixpkgs are
not directly depending on, supporting automatic updates for
packages built with `resholve.mkDerivation`.
2022-09-17 15:16:05 -05:00
Travis A. Everett
9f6310d611 resholve: fix mangled pname/meta integrations
Two items in resholve's mkDerivation are causing trouble for
some ecosystem tools:

1. I didn't pass through the original package's meta, which breaks the
   ability of at least nixos package search and r-ryantm to find the
   right source file (in the latter case breaking auto updates).

2. I was prepending "resholved-" to the pname, which at least nixos
   package search picks up as the package's name. Repology also tries
   to do this, but their current nix updater will prefer to get this
   data from the name. For now, this means changing to name will not
   stop repology from picking up the `resholved-<package>` names.

   Repology's code makes it clear that they *want* to use the pname/
   version, so I was inclined to settle with what I've got for now,
   but thiagokokada clarified that we aren't just waiting for nixpkgs
   fixes, but because Nix itself isn't exporting the pname/version in
   its JSON. See also:

   - https://github.com/repology/repology-updater/issues/854
   - https://github.com/repology/repology-updater/commit/9313110121df5

   For now, at least, I'll switch to appending "-unresholved" to the
   inner derivation's pname.
2022-09-13 09:20:21 -05:00
Travis A. Everett
09d441d21c resholve: 0.6.9 -> 0.8.0
Also track upstream .nix changes over same window.
2022-04-08 21:13:20 -04:00
Travis A. Everett
a649cbca09 resholvePackage: extract util functions
Extract argument-handling utility functions to prepare for adding
resholveScript* functions.

This tracks upstream work, but I broke it up a little more semantically here
in case it aids review. See:
6aab748205
2021-09-27 16:01:09 +09:00