about summary refs log tree commit diff
path: root/pkgs/common-updater/scripts.nix
diff options
context:
space:
mode:
authorJosé Romildo Malaquias <malaquias@gmail.com>2020-04-13 17:57:30 -0300
committerJosé Romildo Malaquias <malaquias@gmail.com>2020-04-15 09:45:25 -0300
commit827a6619eb7732b9b9e823fd8f120d2c78394f33 (patch)
treeb07fd730115da18c1d32089e66f7c205ecda11d1 /pkgs/common-updater/scripts.nix
parenta772bc6eaefbcf2fa387105703c3c6b763c3695c (diff)
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
Diffstat (limited to 'pkgs/common-updater/scripts.nix')
-rw-r--r--pkgs/common-updater/scripts.nix4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkgs/common-updater/scripts.nix b/pkgs/common-updater/scripts.nix
index ec897914b6bdd..655924e5f28a1 100644
--- a/pkgs/common-updater/scripts.nix
+++ b/pkgs/common-updater/scripts.nix
@@ -1,4 +1,4 @@
-{ stdenv, makeWrapper, coreutils, gnused, gnugrep, diffutils, nix }:
+{ stdenv, makeWrapper, coreutils, gnused, gnugrep, diffutils, nix, git }:
 
 stdenv.mkDerivation {
   name = "common-updater-scripts";
@@ -12,7 +12,7 @@ stdenv.mkDerivation {
     cp ${./scripts}/* $out/bin
 
     for f in $out/bin/*; do
-      wrapProgram $f --prefix PATH : ${stdenv.lib.makeBinPath [ coreutils gnused gnugrep nix diffutils ]}
+      wrapProgram $f --prefix PATH : ${stdenv.lib.makeBinPath [ coreutils gnused gnugrep nix diffutils git ]}
     done
   '';
 }