Commit Graph

17 Commits

Author SHA1 Message Date
Tim Steinbach
c2c4cc683f
common-updater: Fix syntax
Missing space before closing ] in if statement caused syntax errors
2019-05-06 08:49:11 -04:00
Jan Tojnar
a8293a0848
common-updater-scripts: fix fallback version detection
parseDrvName returns a set containing version attribute, not our customizable key.
2019-05-03 04:34:45 +02:00
Tim Steinbach
cce486838b
update-source-version: Fixes, add --ignore-same-hash
--ignore-same-hash allows ignoring if the same has is used.
This gives the ability to run update-source-version multiple times to
change multiple keys.

Fix version-key, which was not being used to determine the oldVersion
variable.

If $attr.src.drvAttrs.urls is not found, look for
$attr.src.drvAttrs.url since it is being used like that in fetchgit
2019-04-06 19:47:08 -04:00
Jan Tojnar
0105058698
common-updater-scripts: Add file and system flags
You can now optionally invoke update-source-versions with:

* --system flag changing the host platform, to be passed dirrectly to Nix commands.
  This is useful for binary packages which have different sources for each platform.
* --file flag allowing to change the file to be modified. This is useful for packages
  that offer multiple variants, listed in a different file than the derivation itself;
  e.g. packages.nix of Sublime Text 3.
* --version-key, which is now a keyword flag instead of a positional argument.
2019-03-02 23:03:04 +01:00
Will Dietz
8611d2e632 common-update-scripts: fixup for current/latest nix hash output
Courtesy of @jtojnar, thanks!

See https://github.com/NixOS/nixpkgs/issues/54962#issuecomment-459429698
2019-02-11 17:54:35 -06:00
taku0
4bb9af228e common-updater, firefox: fix updater for firefox 2018-11-16 23:04:54 +09:00
taku0
186de9ca9e common-updater: support updating source URL 2018-03-16 23:17:07 +09:00
Tuomas Tynkkynen
9c852aa3de update-source-version: Fix regex metacharacter
In sed variety of regexes, '\|' must be used in place of '|'.
2018-02-17 22:34:12 +02:00
Jan Tojnar
7934a0e5c5 common-update-scripts: fix compatibility with Nix unstable 2018-02-17 11:38:15 +02:00
Tuomas Tynkkynen
5ffbed75be update-source-version: Name part of name can contain dashes 2017-12-26 20:02:01 +02:00
Tuomas Tynkkynen
022b0c9abc update-source-version: Don't require whitespace around equals sign 2017-12-26 20:02:01 +02:00
Tuomas Tynkkynen
ce421a7283 update-source-version: More robust scanning for the output hash 2017-12-26 20:02:01 +02:00
Tuomas Tynkkynen
47acd09fdb update-source-version: Less strict regex for name = ... lines 2017-12-26 20:02:01 +02:00
Tuomas Tynkkynen
0101944621 update-source-version: Check for sources not dependent on ${version} 2017-12-26 20:02:01 +02:00
Tuomas Tynkkynen
e3b0c03507 update-source-version: Escape plus sign if it occurs in version 2017-12-26 20:02:00 +02:00
taku0
7868cb8ad4 common-updater-script: fix error handling
diffutils is required for cmp command
2017-05-19 17:14:43 +03:00
Tuomas Tynkkynen
b53c53b1b4 maintainers: Add script to patch version/sha256 in .nix files
Adds a script to help automatically upgrading packages: this one can
patch name/version attributes like:
    version = "50.1.0";
    name = "bc-1.06";
... to the given version, and updates the sha256 hash to match.

Usage is:

update-source-version <attr> <new-version> [<new-source-hash>]

where:
    - attr is the attribute path of the package
    - new-version is the version string to be patched in
    - new-source-hash is the optional sha256/etc. hash of the source.
      If not given, the script will automatically calculate it.

This is added to a subdirectory where other useful scripts can be added
in the future, like figuring out the newest version from a git repo or
GitHub releases etc.
2017-02-19 16:51:17 +02:00