summary refs log tree commit diff
path: root/doc/old/update-upstream-data.txt
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2013-10-01 10:53:02 +0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2013-10-01 10:53:21 +0200
commit1ca98d7c09e0ad8f574d5cd2a2e7618e59ed3afe (patch)
treec529aa5542859004603521d2722aa56a0c488fa2 /doc/old/update-upstream-data.txt
parent34ea77c220129e3935d352ad7c333928d2e8feff (diff)
downloadnixlib-1ca98d7c09e0ad8f574d5cd2a2e7618e59ed3afe.tar
nixlib-1ca98d7c09e0ad8f574d5cd2a2e7618e59ed3afe.tar.gz
nixlib-1ca98d7c09e0ad8f574d5cd2a2e7618e59ed3afe.tar.bz2
nixlib-1ca98d7c09e0ad8f574d5cd2a2e7618e59ed3afe.tar.lz
nixlib-1ca98d7c09e0ad8f574d5cd2a2e7618e59ed3afe.tar.xz
nixlib-1ca98d7c09e0ad8f574d5cd2a2e7618e59ed3afe.tar.zst
nixlib-1ca98d7c09e0ad8f574d5cd2a2e7618e59ed3afe.zip
Move some old docs
Diffstat (limited to 'doc/old/update-upstream-data.txt')
-rw-r--r--doc/old/update-upstream-data.txt14
1 files changed, 14 insertions, 0 deletions
diff --git a/doc/old/update-upstream-data.txt b/doc/old/update-upstream-data.txt
new file mode 100644
index 000000000000..2abce3b40552
--- /dev/null
+++ b/doc/old/update-upstream-data.txt
@@ -0,0 +1,14 @@
+Semi-automatic source information updating using "update-upstream-data.sh" script and "src-{,info-}for-*.nix"
+
+1. Recognizing when a pre-existing package uses this mechanism.
+
+Packages using this automatical update mechanism have src-info-for-default.nix and src-for-default.nix next to default.nix. src-info-for-default.nix describes getting the freshest source from upstream web site; src-for-default.nix is a generated file with the current data about used source. Both files define a simple attrSet. 
+
+src-info-for-default.nix (for a file grabbed via http) contains at least downloadPage attribute - it is the page we need to look at to find out the latest version. It also contains baseName that is used for automatical generation of package name containing version. It can contain extra data for trickier cases.
+
+src-for-default.nix will contain advertisedUrl (raw URL chosen on the site; its change prompts regeneration of source data), url for fetchurl, hash, version retrieved from the download URL and suggested package name.
+
+2. Updating a package
+
+nixpkgs/pkgs/build-support/upstream-updater directory contains some scripts. The worker script is called update-upstream-data.sh. This script requires main expression name (e.g. default.nix). It can optionally accpet a second parameter, URL which will be used instead of getting one by parsing the downloadPage (version extraction, mirror URL creation etc. will still be run). After running the script, check src-for-default.nix (or replace default.nix with expression name, if there are seceral expressions in the directory) for new version information.
+