Commit Graph

9 Commits

Author SHA1 Message Date
Ben Siraphob
e03c068af5 treewide: makeWrapper buildInputs to nativeBuildInputs 2021-02-19 20:09:16 +07:00
Pavol Rusnak
90f7338112
treewide: stdenv.lib -> lib 2021-01-24 01:49:49 +01:00
Milan Pässler
b74be134db common-updater-scripts: add mark-broken script 2020-04-16 03:01:26 +02:00
José Romildo Malaquias
827a6619eb common-updater-scripts: add scripts to help update packages
- updateScript:
  A nix expression that can be used in passThrough to update a package

- list-git-tags:
  A shell script to list available tags in a git repository

- list-archive-two-level-versions:

  A shell script to list available versions in a web site in two
  levels: there is a page listing the available major.minor versions,
  and for each of them there is another page listings the patch level
  versions major.minor.patch.

  It is suitable for Xfce packages for instance.

How the updater works:

1. collect the available versions from the source repository (using a
script given as argument)

2. print the collected versions (for debugging)

3. (optionally) apply some transformation to the collected versions to
make them compatible with the versions used in nixpkgs (for instance,
tags in the Xfce git repository may be prefixed with the package name,
and the prefix need to be removed)

4. sort the available versions in decreasing order

5. choose the first version that pass validation:
   - check if the version may be a development version

   - if the version IS unstable, skip it and give a warning about
   skipping a development version (for debugging)

   - if the version COULD BE unstable, take it and give a warning
   about taking a potential development version (for debugging)

   - if the version IS stable, take it

6. update the package version and checksum in its nix expression

7. print the git commands for adding the modified files and for
committing the changes
2020-04-15 09:45:25 -03:00
Jan Tojnar
65543d1031
common-updater-scripts: clean up
Fix issues reported by shellcheck and few other style issues.

Though we need to ignore $systemArg complaints because Nix does not support passing --system as a single argument.
2020-02-04 06:25:37 +01:00
worldofpeace
3f4a353737 treewide: use dontUnpack 2019-07-01 04:23:51 -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
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