···192193If set to `true`, the package is marked as "broken", meaning that it won’t show up in `nix-env -qa`, and cannot be built or installed. Such packages should be removed from Nixpkgs eventually unless they are fixed.
194195-### `updateWalker` {#var-meta-updateWalker}
196-197-If set to `true`, the package is tested to be updated correctly by the `update-walker.sh` script without additional settings. Such packages have `meta.version` set and their homepage (or the page specified by `meta.downloadPage`) contains a direct link to the package tarball.
198-199## Licenses {#sec-meta-license}
200201The `meta.license` attribute should preferably contain a value from `lib.licenses` defined in [`nixpkgs/lib/licenses.nix`](https://github.com/NixOS/nixpkgs/blob/master/lib/licenses.nix), or in-place license description of the same format if the license is unlikely to be useful in another expression.
···192193If set to `true`, the package is marked as "broken", meaning that it won’t show up in `nix-env -qa`, and cannot be built or installed. Such packages should be removed from Nixpkgs eventually unless they are fixed.
1940000195## Licenses {#sec-meta-license}
196197The `meta.license` attribute should preferably contain a value from `lib.licenses` defined in [`nixpkgs/lib/licenses.nix`](https://github.com/NixOS/nixpkgs/blob/master/lib/licenses.nix), or in-place license description of the same format if the license is unlikely to be useful in another expression.
···1-Next to file.nix we get src-for-file.nix
2-src-for-file.nix should evaluate to a flat attribute set with
3-string values.
4-It is supposed to be imported in the main expression.
5-In the ideal world it can export url, hash, version.
6-7-src-for-file.nix generation is directed by
8-src-info-for-file.nix.
9-10-Attributes:
11-12-src-info-for-file.nix:
13-14-downloadPage
15-rev (for repos)
16-baseName (default = unnamed-package)
17-sourceRegexp (default = '.*[.]tar[.].*')
18-choiceCommand (default = 'head -1')
19-versionExtractorSedScript (default = 's/.*-([0-9.]+)[.].*/\1/')
20-versionReferenceCreator (default = 's/-([0-9.]+)[.]/-${version}./')
21-mirrorSedScript (default = none)
22-23-src-for-file.nix:
24-25-advertisedUrl (its match is the check for update presence)
26-url
27-hash
28-version
29-name
···1-{
2- a=1;
3- b="text";
4- c=''
5- text
6- '';
7- d=''
8- Multi-line text with special characters -
9- like \ (backslash) and ''${} (dollar +
10- curly braces) and $ (dollar) and ' (quote)
11- and " (double quote).
12- '';
13-}
···1-update-walker is an imperative semiautomated update helper.
2-3-It runs the X.upstream file to find the freshest version of the package in
4-the specified upstream source and updates the corresponding X.nix file.
5-6-7-8-The simplest available commands:
9-10-url: set the upstream source list URL equal to $1; the default is
11-meta.downloadPage with meta.homepage fallback
12-13-dl_url_re: set the regular expression used to select download links to $1; the
14-default is meta.downloadURLRegexp or '[.]tar[.]([^./])+\$' if it is not set
15-16-target: specify target expression; default is to replace .upstream extension
17-with .nix extension
18-19-name: specify the derivation name; default is the basename of the dirname
20-of the .upstream file
21-22-attribute_name: specify the attribute name to evaluate for getting the current
23-version from meta.version; default is to use the derivation name
24-25-minimize_overwrite: set config options that mean that only version= and
26-sha256= have to be replaced; the default is to regenerate a full upstream
27-description block with url, name, version, hash etc.
28-29-30-31-A lot of packages can be updated in a pseudo-declarative style using only
32-the commands from the previous paragraph.
33-34-Some packages do not need any non-default settings, in these case just setting
35-meta.updateWalker to true is enough, you can run update-walker directly on the
36-.nix file afterwards. In this case minimize_overwrite it implied unless
37-meta.fullRegenerate is set.
38-39-40-41-The packages that require more fine-grained control than the described options
42-allow, you need to take into account the default control flow of the tool.
43-44-First, the definitions from update-walker script and additional definitions
45-from update-walker-service-specific.sh are loaded. Then the config is executed
46-as a shell script. Some of the commands it can use do remember whether they
47-have been used. Afterwards the following steps happen:
48-49-attribute_name is set to name unless it has been already set
50-51-meta.version is read from the NixPkgs package called attribute_name
52-53-download URL regexp is set to default unless it has been already set in the
54-updater script
55-56-the download page URL gets set to default value unless it has been set
57-previously
58-59-if the action of getting the download page and choosing the freshest link by
60-version has not yet been taken, it happens
61-62-if the version has not yet been extracted from the URL, it gets extracted
63-64-target nix expression to update gets set to the default value unless it has
65-been set explicitly
66-67-if the URL version is fresher than the packaged version, the new file gets
68-downloaded and its hash is calculated
69-70-do_overwrite function is called; the default calculates a big upstream data
71-block and puts it after the '# Generated upstream information' marker (the
72-marker can be changed by the command marker)
73-74-75-76-If the update needs some special logic, it is put into the updater script and
77-the corresponding steps are skipped because the needed action has already been
78-performed.
79-80-For example:
81-82-minimize_overwrite is exactly the same as
83-84-do_overwrite() { do_overwrite_just_version; }
85-86-redefinition. You can do a more complex do_overwrite redifinition, if needed.
87-It can probably use ensure_hash to download the source and calculate the hash
88-and set_var_value.
89-90-set_var_value alters the $3-th instance of assigning the $1 name in the
91-expression to the value $2. $3 defaults to 1. It can modify $4 instead of the
92-current target, it can put the value without quotes if $5 is 1.
93-94-95-96-Typical steps include:
97-98-ensure_choice: download current URL and find the freshest version link on the
99-page, it is now the new URL
100-101-ensure_hash: download current URL and calculate the source package hash
102-103-ensure_version: extract version from the URL
104-105-SF_redirect: replace the current URL with a SourceForge.net mirror:// URL
106-107-SF_version_dir: assume SourceForge.net layout and choose the freshest
108-version-named subdirectory in the file catalog; you can optionally specify $1
109-as a directory name regexp (digits and periods will be required after it)
110-111-SF_version_tarball: assume SourceForge.net layout and choose the freshest
112-tarball download link
113-114-version: apply replacement of $1 with $2 (extended regexp format) to extract
115-the version from URL
116-117-version_link: choose the freshest versioned link, $1 is the regexp of
118-acceptable links
···8 sha256 = "1y0gikds2nr8jk8smhrl617njk23ymmpxyjb2j1xbj0k82xspv78";
9 };
1011- passthru = {
12- updateScript = ''
13- #!${runtimeShell}
14- cd ${toString ./.}
15- ${toString path}/pkgs/build-support/upstream-updater/update-walker.sh default.nix
16- '';
17- };
18-19- meta = {
20 description = "File open routines to safely open a file when in the presence of an attack";
21- license = lib.licenses.asl20 ;
22- maintainers = [lib.maintainers.raskin];
23- platforms = lib.platforms.all;
24 homepage = "https://research.cs.wisc.edu/mist/safefile/";
25- updateWalker = true;
26 };
27}
···8 sha256 = "1y0gikds2nr8jk8smhrl617njk23ymmpxyjb2j1xbj0k82xspv78";
9 };
1011+ meta = with lib; {
0000000012 description = "File open routines to safely open a file when in the presence of an attack";
13+ license = licenses.asl20;
14+ maintainers = with maintainers; [ raskin ];
15+ platforms = platforms.all;
16 homepage = "https://research.cs.wisc.edu/mist/safefile/";
017 };
18}
···73 description = "XML Security Library in C based on libxml2";
74 license = lib.licenses.mit;
75 platforms = with lib.platforms; linux ++ darwin;
76- updateWalker = true;
77 };
78}
79)
···73 description = "XML Security Library in C based on libxml2";
74 license = lib.licenses.mit;
75 platforms = with lib.platforms; linux ++ darwin;
076 };
77}
78)