Merge origin/master into haskell-updates.

This commit is contained in:
Peter Simons 2021-03-17 21:19:22 +01:00
commit 1fab990d47
675 changed files with 13534 additions and 11133 deletions

View File

@ -18,7 +18,7 @@ stdenv.mkDerivation {
The main difference between `fetchurl` and `fetchzip` is in how they store the contents. `fetchurl` will store the unaltered contents of the URL within the Nix store. `fetchzip` on the other hand will decompress the archive for you, making files and directories directly accessible in the future. `fetchzip` can only be used with archives. Despite the name, `fetchzip` is not limited to .zip files and can also be used with any tarball.
`fetchpatch` works very similarly to `fetchurl` with the same arguments expected. It expects patch files as a source and and performs normalization on them before computing the checksum. For example it will remove comments or other unstable parts that are sometimes added by version control systems and can change over time.
`fetchpatch` works very similarly to `fetchurl` with the same arguments expected. It expects patch files as a source and performs normalization on them before computing the checksum. For example it will remove comments or other unstable parts that are sometimes added by version control systems and can change over time.
Other fetcher functions allow you to add source code directly from a VCS such as subversion or git. These are mostly straightforward nambes based on the name of the command used with the VCS system. Because they give you a working repository, they act most like `fetchzip`.

View File

@ -16,7 +16,7 @@
</para>
<para>
The <parameter>base</parameter> should not be be specified, as <function>makeSnap</function> will force set it.
The <parameter>base</parameter> should not be specified, as <function>makeSnap</function> will force set it.
</para>
<para>

View File

@ -7,7 +7,7 @@
<section xml:id="function-library-lib.attrsets.attrByPath">
<title><function>lib.attrset.attrByPath</function></title>
<subtitle><literal>attrByPath :: [String] -> Any -> AttrSet</literal>
<subtitle><literal>attrByPath :: [String] -> Any -> AttrSet -> Any</literal>
</subtitle>
<xi:include href="./locations.xml" xpointer="lib.attrsets.attrByPath" />

View File

@ -80,7 +80,7 @@ Most of the function arguments have reasonable default settings.
You can specify license names:
* `extraLicenses` is a list of of license names.
* `extraLicenses` is a list of license names.
You can get these names from repo.json or `querypackages.sh licenses`. The SDK
license (`android-sdk-license`) is accepted for you if you set accept_license
to true. If you are doing something like working with preview SDKs, you will

View File

@ -64,7 +64,7 @@ $ dotnet --info
The `dotnetCorePackages.sdk_X_Y` is preferred over the old dotnet-sdk as both major and minor version are very important for a dotnet environment. If a given minor version isn't present (or was changed), then this will likely break your ability to build a project.
## dotnetCorePackages.sdk vs vs dotnetCorePackages.net vs dotnetCorePackages.netcore vs dotnetCorePackages.aspnetcore
## dotnetCorePackages.sdk vs dotnetCorePackages.net vs dotnetCorePackages.netcore vs dotnetCorePackages.aspnetcore
The `dotnetCorePackages.sdk` contains both a runtime and the full sdk of a given version. The `net`, `netcore` and `aspnetcore` packages are meant to serve as minimal runtimes to deploy alongside already built applications. For runtime versions >= .NET 5 `net` is used while `netcore` is used for older .NET Core runtime version.

View File

@ -50,7 +50,7 @@ and install it in your profile with
```shell
nix-env -iA nixpkgs.myLuaEnv
```
The environment is is installed by referring to the attribute, and considering
The environment is installed by referring to the attribute, and considering
the `nixpkgs` channel was used.
#### Lua environment defined in `/etc/nixos/configuration.nix`
@ -129,7 +129,7 @@ the whitelist maintainers/scripts/luarocks-packages.csv and updated by running m
[luarocks2nix](https://github.com/nix-community/luarocks) is a tool capable of generating nix derivations from both rockspec and src.rock (and favors the src.rock).
The automation only goes so far though and some packages need to be customized.
These customizations go in `pkgs/development/lua-modules/overrides.nix`.
For instance if the rockspec defines `external_dependencies`, these need to be manually added in in its rockspec file then it won't work.
For instance if the rockspec defines `external_dependencies`, these need to be manually added in its rockspec file then it won't work.
You can try converting luarocks packages to nix packages with the command `nix-shell -p luarocks-nix` and then `luarocks nix PKG_NAME`.
Nix rely on luarocks to install lua packages, basically it runs:

View File

@ -334,7 +334,7 @@ Above, we were mostly just focused on use cases and what to do to get started
creating working Python environments in nix.
Now that you know the basics to be up and running, it is time to take a step
back and take a deeper look at at how Python packages are packaged on Nix. Then,
back and take a deeper look at how Python packages are packaged on Nix. Then,
we will look at how you can use development mode with your code.
#### Python library packages in Nixpkgs
@ -918,7 +918,7 @@ because their behaviour is different:
* `nativeBuildInputs ? []`: Build-time only dependencies. Typically executables
as well as the items listed in `setup_requires`.
* `buildInputs ? []`: Build and/or run-time dependencies that need to be be
* `buildInputs ? []`: Build and/or run-time dependencies that need to be
compiled for the host machine. Typically non-Python libraries which are being
linked.
* `checkInputs ? []`: Dependencies needed for running the `checkPhase`. These

View File

@ -229,7 +229,7 @@ end
If you want to package a specific version, you can use the standard Gemfile syntax for that, e.g. `gem 'mdl', '0.5.0'`, but if you want the latest stable version anyway, it's easier to update by simply running the `bundle lock` and `bundix` steps again.
Now you can also also make a `default.nix` that looks like this:
Now you can also make a `default.nix` that looks like this:
```nix
{ bundlerApp }:

View File

@ -737,7 +737,7 @@ with import "${src.out}/rust-overlay.nix" pkgs pkgs;
stdenv.mkDerivation {
name = "rust-env";
buildInputs = [
# Note: to use use stable, just replace `nightly` with `stable`
# Note: to use stable, just replace `nightly` with `stable`
latest.rustChannels.nightly.rust
# Add some extra dependencies from `pkgs`

View File

@ -15,9 +15,9 @@
</part>
<part>
<title>Standard environment</title>
<xi:include href="stdenv/stdenv.xml" />
<xi:include href="stdenv/meta.xml" />
<xi:include href="stdenv/multiple-output.xml" />
<xi:include href="stdenv/stdenv.chapter.xml" />
<xi:include href="stdenv/meta.chapter.xml" />
<xi:include href="stdenv/multiple-output.chapter.xml" />
<xi:include href="stdenv/cross-compilation.chapter.xml" />
<xi:include href="stdenv/platform-notes.chapter.xml" />
</part>

194
doc/stdenv/meta.chapter.md Normal file
View File

@ -0,0 +1,194 @@
# Meta-attributes {#chap-meta}
Nix packages can declare *meta-attributes* that contain information about a package such as a description, its homepage, its license, and so on. For instance, the GNU Hello package has a `meta` declaration like this:
```nix
meta = with lib; {
description = "A program that produces a familiar, friendly greeting";
longDescription = ''
GNU Hello is a program that prints "Hello, world!" when you run it.
It is fully customizable.
'';
homepage = "https://www.gnu.org/software/hello/manual/";
license = licenses.gpl3Plus;
maintainers = [ maintainers.eelco ];
platforms = platforms.all;
};
```
Meta-attributes are not passed to the builder of the package. Thus, a change to a meta-attribute doesnt trigger a recompilation of the package. The value of a meta-attribute must be a string.
The meta-attributes of a package can be queried from the command-line using `nix-env`:
```ShellSession
$ nix-env -qa hello --json
{
"hello": {
"meta": {
"description": "A program that produces a familiar, friendly greeting",
"homepage": "https://www.gnu.org/software/hello/manual/",
"license": {
"fullName": "GNU General Public License version 3 or later",
"shortName": "GPLv3+",
"url": "http://www.fsf.org/licensing/licenses/gpl.html"
},
"longDescription": "GNU Hello is a program that prints \"Hello, world!\" when you run it.\nIt is fully customizable.\n",
"maintainers": [
"Ludovic Court\u00e8s <ludo@gnu.org>"
],
"platforms": [
"i686-linux",
"x86_64-linux",
"armv5tel-linux",
"armv7l-linux",
"mips32-linux",
"x86_64-darwin",
"i686-cygwin",
"i686-freebsd",
"x86_64-freebsd",
"i686-openbsd",
"x86_64-openbsd"
],
"position": "/home/user/dev/nixpkgs/pkgs/applications/misc/hello/default.nix:14"
},
"name": "hello-2.9",
"system": "x86_64-linux"
}
}
```
`nix-env` knows about the `description` field specifically:
```ShellSession
$ nix-env -qa hello --description
hello-2.3 A program that produces a familiar, friendly greeting
```
## Standard meta-attributes {#sec-standard-meta-attributes}
It is expected that each meta-attribute is one of the following:
### `description` {#var-meta-description}
A short (one-line) description of the package. This is shown by `nix-env -q --description` and also on the Nixpkgs release pages.
Dont include a period at the end. Dont include newline characters. Capitalise the first character. For brevity, dont repeat the name of package --- just describe what it does.
Wrong: `"libpng is a library that allows you to decode PNG images."`
Right: `"A library for decoding PNG images"`
### `longDescription` {#var-meta-longDescription}
An arbitrarily long description of the package.
### `branch` {#var-meta-branch}
Release branch. Used to specify that a package is not going to receive updates that are not in this branch; for example, Linux kernel 3.0 is supposed to be updated to 3.0.X, not 3.1.
### `homepage` {#var-meta-homepage}
The packages homepage. Example: `https://www.gnu.org/software/hello/manual/`
### `downloadPage` {#var-meta-downloadPage}
The page where a link to the current version can be found. Example: `https://ftp.gnu.org/gnu/hello/`
### `changelog` {#var-meta-changelog}
A link or a list of links to the location of Changelog for a package. A link may use expansion to refer to the correct changelog version. Example: `"https://git.savannah.gnu.org/cgit/hello.git/plain/NEWS?h=v${version}"`
### `license` {#var-meta-license}
The license, or licenses, for the package. One from the attribute set defined in [`nixpkgs/lib/licenses.nix`](https://github.com/NixOS/nixpkgs/blob/master/lib/licenses.nix). At this moment using both a list of licenses and a single license is valid. If the license field is in the form of a list representation, then it means that parts of the package are licensed differently. Each license should preferably be referenced by their attribute. The non-list attribute value can also be a space delimited string representation of the contained attribute `shortNames` or `spdxIds`. The following are all valid examples:
- Single license referenced by attribute (preferred) `lib.licenses.gpl3Only`.
- Single license referenced by its attribute shortName (frowned upon) `"gpl3Only"`.
- Single license referenced by its attribute spdxId (frowned upon) `"GPL-3.0-only"`.
- Multiple licenses referenced by attribute (preferred) `with lib.licenses; [ asl20 free ofl ]`.
- Multiple licenses referenced as a space delimited string of attribute shortNames (frowned upon) `"asl20 free ofl"`.
For details, see [Licenses](#sec-meta-license).
### `maintainers` {#var-meta-maintainers}
A list of the maintainers of this Nix expression. Maintainers are defined in [`nixpkgs/maintainers/maintainer-list.nix`](https://github.com/NixOS/nixpkgs/blob/master/maintainers/maintainer-list.nix). There is no restriction to becoming a maintainer, just add yourself to that list in a separate commit titled “maintainers: add alice”, and reference maintainers with `maintainers = with lib.maintainers; [ alice bob ]`.
### `priority` {#var-meta-priority}
The *priority* of the package, used by `nix-env` to resolve file name conflicts between packages. See the Nix manual page for `nix-env` for details. Example: `"10"` (a low-priority package).
### `platforms` {#var-meta-platforms}
The list of Nix platform types on which the package is supported. Hydra builds packages according to the platform specified. If no platform is specified, the package does not have prebuilt binaries. An example is:
```nix
meta.platforms = lib.platforms.linux;
```
Attribute Set `lib.platforms` defines [various common lists](https://github.com/NixOS/nixpkgs/blob/master/lib/systems/doubles.nix) of platforms types.
### `tests` {#var-meta-tests}
::: warning
This attribute is special in that it is not actually under the `meta` attribute set but rather under the `passthru` attribute set. This is due to how `meta` attributes work, and the fact that they are supposed to contain only metadata, not derivations.
:::
An attribute set with as values tests. A test is a derivation, which builds successfully when the test passes, and fails to build otherwise. A derivation that is a test needs to have `meta.timeout` defined.
The NixOS tests are available as `nixosTests` in parameters of derivations. For instance, the OpenSMTPD derivation includes lines similar to:
```nix
{ /* ... */, nixosTests }:
{
# ...
passthru.tests = {
basic-functionality-and-dovecot-integration = nixosTests.opensmtpd;
};
}
```
### `timeout` {#var-meta-timeout}
A timeout (in seconds) for building the derivation. If the derivation takes longer than this time to build, it can fail due to breaking the timeout. However, all computers do not have the same computing power, hence some builders may decide to apply a multiplicative factor to this value. When filling this value in, try to keep it approximately consistent with other values already present in `nixpkgs`.
### `hydraPlatforms` {#var-meta-hydraPlatforms}
The list of Nix platform types for which the Hydra instance at `hydra.nixos.org` will build the package. (Hydra is the Nix-based continuous build system.) It defaults to the value of `meta.platforms`. Thus, the only reason to set `meta.hydraPlatforms` is if you want `hydra.nixos.org` to build the package on a subset of `meta.platforms`, or not at all, e.g.
```nix
meta.platforms = lib.platforms.linux;
meta.hydraPlatforms = [];
```
### `broken` {#var-meta-broken}
If set to `true`, the package is marked as "broken", meaning that it wont show up in `nix-env -qa`, and cannot be built or installed. Such packages should be removed from Nixpkgs eventually unless they are fixed.
### `updateWalker` {#var-meta-updateWalker}
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.
## Licenses {#sec-meta-license}
The `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.
Although its typically better to indicate the specific license, a few generic options are available:
### `lib.licenses.free`, `"free"`
Catch-all for free software licenses not listed above.
### `lib.licenses.unfreeRedistributable`, `"unfree-redistributable"`
Unfree package that can be redistributed in binary form. That is, its legal to redistribute the *output* of the derivation. This means that the package can be included in the Nixpkgs channel.
Sometimes proprietary software can only be redistributed unmodified. Make sure the builder doesnt actually modify the original binaries; otherwise were breaking the license. For instance, the NVIDIA X11 drivers can be redistributed unmodified, but our builder applies `patchelf` to make them work. Thus, its license is `"unfree"` and it cannot be included in the Nixpkgs channel.
### `lib.licenses.unfree`, `"unfree"`
Unfree package that cannot be redistributed. You can build it yourself, but you cannot redistribute the output of the derivation. Thus it cannot be included in the Nixpkgs channel.
### `lib.licenses.unfreeRedistributableFirmware`, `"unfree-redistributable-firmware"`
This package supplies unfree, redistributable firmware. This is a separate value from `unfree-redistributable` because not everybody cares whether firmware is free.

View File

@ -1,349 +0,0 @@
<chapter xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xml:id="chap-meta">
<title>Meta-attributes</title>
<para>
Nix packages can declare <emphasis>meta-attributes</emphasis> that contain information about a package such as a description, its homepage, its license, and so on. For instance, the GNU Hello package has a <varname>meta</varname> declaration like this:
<programlisting>
meta = with lib; {
description = "A program that produces a familiar, friendly greeting";
longDescription = ''
GNU Hello is a program that prints "Hello, world!" when you run it.
It is fully customizable.
'';
homepage = "https://www.gnu.org/software/hello/manual/";
license = licenses.gpl3Plus;
maintainers = [ maintainers.eelco ];
platforms = platforms.all;
};
</programlisting>
</para>
<para>
Meta-attributes are not passed to the builder of the package. Thus, a change to a meta-attribute doesnt trigger a recompilation of the package. The value of a meta-attribute must be a string.
</para>
<para>
The meta-attributes of a package can be queried from the command-line using <command>nix-env</command>:
<screen>
<prompt>$ </prompt>nix-env -qa hello --json
{
"hello": {
"meta": {
"description": "A program that produces a familiar, friendly greeting",
"homepage": "https://www.gnu.org/software/hello/manual/",
"license": {
"fullName": "GNU General Public License version 3 or later",
"shortName": "GPLv3+",
"url": "http://www.fsf.org/licensing/licenses/gpl.html"
},
"longDescription": "GNU Hello is a program that prints \"Hello, world!\" when you run it.\nIt is fully customizable.\n",
"maintainers": [
"Ludovic Court\u00e8s &lt;ludo@gnu.org>"
],
"platforms": [
"i686-linux",
"x86_64-linux",
"armv5tel-linux",
"armv7l-linux",
"mips32-linux",
"x86_64-darwin",
"i686-cygwin",
"i686-freebsd",
"x86_64-freebsd",
"i686-openbsd",
"x86_64-openbsd"
],
"position": "/home/user/dev/nixpkgs/pkgs/applications/misc/hello/default.nix:14"
},
"name": "hello-2.9",
"system": "x86_64-linux"
}
}
</screen>
<command>nix-env</command> knows about the <varname>description</varname> field specifically:
<screen>
<prompt>$ </prompt>nix-env -qa hello --description
hello-2.3 A program that produces a familiar, friendly greeting
</screen>
</para>
<section xml:id="sec-standard-meta-attributes">
<title>Standard meta-attributes</title>
<para>
It is expected that each meta-attribute is one of the following:
</para>
<variablelist>
<varlistentry xml:id="var-meta-description">
<term>
<varname>description</varname>
</term>
<listitem>
<para>
A short (one-line) description of the package. This is shown by <command>nix-env -q --description</command> and also on the Nixpkgs release pages.
</para>
<para>
Dont include a period at the end. Dont include newline characters. Capitalise the first character. For brevity, dont repeat the name of package — just describe what it does.
</para>
<para>
Wrong: <literal>"libpng is a library that allows you to decode PNG images."</literal>
</para>
<para>
Right: <literal>"A library for decoding PNG images"</literal>
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="var-meta-longDescription">
<term>
<varname>longDescription</varname>
</term>
<listitem>
<para>
An arbitrarily long description of the package.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="var-meta-branch">
<term>
<varname>branch</varname>
</term>
<listitem>
<para>
Release branch. Used to specify that a package is not going to receive updates that are not in this branch; for example, Linux kernel 3.0 is supposed to be updated to 3.0.X, not 3.1.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="var-meta-homepage">
<term>
<varname>homepage</varname>
</term>
<listitem>
<para>
The packages homepage. Example: <literal>https://www.gnu.org/software/hello/manual/</literal>
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="var-meta-downloadPage">
<term>
<varname>downloadPage</varname>
</term>
<listitem>
<para>
The page where a link to the current version can be found. Example: <literal>https://ftp.gnu.org/gnu/hello/</literal>
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="var-meta-changelog">
<term>
<varname>changelog</varname>
</term>
<listitem>
<para>
A link or a list of links to the location of Changelog for a package. A link may use expansion to refer to the correct changelog version. Example: <literal>"https://git.savannah.gnu.org/cgit/hello.git/plain/NEWS?h=v${version}"</literal>
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="var-meta-license">
<term>
<varname>license</varname>
</term>
<listitem>
<para>
The license, or licenses, for the package. One from the attribute set defined in <link
xlink:href="https://github.com/NixOS/nixpkgs/blob/master/lib/licenses.nix"> <filename>nixpkgs/lib/licenses.nix</filename></link>. At this moment using both a list of licenses and a single license is valid. If the license field is in the form of a list representation, then it means that parts of the package are licensed differently. Each license should preferably be referenced by their attribute. The non-list attribute value can also be a space delimited string representation of the contained attribute shortNames or spdxIds. The following are all valid examples:
<itemizedlist>
<listitem>
<para>
Single license referenced by attribute (preferred) <literal>lib.licenses.gpl3Only</literal>.
</para>
</listitem>
<listitem>
<para>
Single license referenced by its attribute shortName (frowned upon) <literal>"gpl3Only"</literal>.
</para>
</listitem>
<listitem>
<para>
Single license referenced by its attribute spdxId (frowned upon) <literal>"GPL-3.0-only"</literal>.
</para>
</listitem>
<listitem>
<para>
Multiple licenses referenced by attribute (preferred) <literal>with lib.licenses; [ asl20 free ofl ]</literal>.
</para>
</listitem>
<listitem>
<para>
Multiple licenses referenced as a space delimited string of attribute shortNames (frowned upon) <literal>"asl20 free ofl"</literal>.
</para>
</listitem>
</itemizedlist>
For details, see <xref linkend='sec-meta-license'/>.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="var-meta-maintainers">
<term>
<varname>maintainers</varname>
</term>
<listitem>
<para>
A list of the maintainers of this Nix expression. Maintainers are defined in <link xlink:href="https://github.com/NixOS/nixpkgs/blob/master/maintainers/maintainer-list.nix"><filename>nixpkgs/maintainers/maintainer-list.nix</filename></link>. There is no restriction to becoming a maintainer, just add yourself to that list in a separate commit titled 'maintainers: add alice', and reference maintainers with <literal>maintainers = with lib.maintainers; [ alice bob ]</literal>.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="var-meta-priority">
<term>
<varname>priority</varname>
</term>
<listitem>
<para>
The <emphasis>priority</emphasis> of the package, used by <command>nix-env</command> to resolve file name conflicts between packages. See the Nix manual page for <command>nix-env</command> for details. Example: <literal>"10"</literal> (a low-priority package).
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="var-meta-platforms">
<term>
<varname>platforms</varname>
</term>
<listitem>
<para>
The list of Nix platform types on which the package is supported. Hydra builds packages according to the platform specified. If no platform is specified, the package does not have prebuilt binaries. An example is:
<programlisting>
meta.platforms = lib.platforms.linux;
</programlisting>
Attribute Set <varname>lib.platforms</varname> defines <link xlink:href="https://github.com/NixOS/nixpkgs/blob/master/lib/systems/doubles.nix"> various common lists</link> of platforms types.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="var-meta-tests">
<term>
<varname>tests</varname>
</term>
<listitem>
<warning>
<para>
This attribute is special in that it is not actually under the <literal>meta</literal> attribute set but rather under the <literal>passthru</literal> attribute set. This is due to how <literal>meta</literal> attributes work, and the fact that they are supposed to contain only metadata, not derivations.
</para>
</warning>
<para>
An attribute set with as values tests. A test is a derivation, which builds successfully when the test passes, and fails to build otherwise. A derivation that is a test needs to have <literal>meta.timeout</literal> defined.
</para>
<para>
The NixOS tests are available as <literal>nixosTests</literal> in parameters of derivations. For instance, the OpenSMTPD derivation includes lines similar to:
<programlisting>
{ /* ... */, nixosTests }:
{
# ...
passthru.tests = {
basic-functionality-and-dovecot-integration = nixosTests.opensmtpd;
};
}
</programlisting>
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="var-meta-timeout">
<term>
<varname>timeout</varname>
</term>
<listitem>
<para>
A timeout (in seconds) for building the derivation. If the derivation takes longer than this time to build, it can fail due to breaking the timeout. However, all computers do not have the same computing power, hence some builders may decide to apply a multiplicative factor to this value. When filling this value in, try to keep it approximately consistent with other values already present in <literal>nixpkgs</literal>.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="var-meta-hydraPlatforms">
<term>
<varname>hydraPlatforms</varname>
</term>
<listitem>
<para>
The list of Nix platform types for which the Hydra instance at <literal>hydra.nixos.org</literal> will build the package. (Hydra is the Nix-based continuous build system.) It defaults to the value of <varname>meta.platforms</varname>. Thus, the only reason to set <varname>meta.hydraPlatforms</varname> is if you want <literal>hydra.nixos.org</literal> to build the package on a subset of <varname>meta.platforms</varname>, or not at all, e.g.
<programlisting>
meta.platforms = lib.platforms.linux;
meta.hydraPlatforms = [];
</programlisting>
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="var-meta-broken">
<term>
<varname>broken</varname>
</term>
<listitem>
<para>
If set to <literal>true</literal>, the package is marked as “broken”, meaning that it wont show up in <literal>nix-env -qa</literal>, and cannot be built or installed. Such packages should be removed from Nixpkgs eventually unless they are fixed.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="var-meta-updateWalker">
<term>
<varname>updateWalker</varname>
</term>
<listitem>
<para>
If set to <literal>true</literal>, the package is tested to be updated correctly by the <literal>update-walker.sh</literal> script without additional settings. Such packages have <varname>meta.version</varname> set and their homepage (or the page specified by <varname>meta.downloadPage</varname>) contains a direct link to the package tarball.
</para>
</listitem>
</varlistentry>
</variablelist>
</section>
<section xml:id="sec-meta-license">
<title>Licenses</title>
<para>
The <varname>meta.license</varname> attribute should preferrably contain a value from <varname>lib.licenses</varname> defined in <link xlink:href="https://github.com/NixOS/nixpkgs/blob/master/lib/licenses.nix"> <filename>nixpkgs/lib/licenses.nix</filename></link>, or in-place license description of the same format if the license is unlikely to be useful in another expression.
</para>
<para>
Although it's typically better to indicate the specific license, a few generic options are available:
<variablelist>
<varlistentry>
<term>
<varname>lib.licenses.free</varname>, <varname>"free"</varname>
</term>
<listitem>
<para>
Catch-all for free software licenses not listed above.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<varname>lib.licenses.unfreeRedistributable</varname>, <varname>"unfree-redistributable"</varname>
</term>
<listitem>
<para>
Unfree package that can be redistributed in binary form. That is, its legal to redistribute the <emphasis>output</emphasis> of the derivation. This means that the package can be included in the Nixpkgs channel.
</para>
<para>
Sometimes proprietary software can only be redistributed unmodified. Make sure the builder doesnt actually modify the original binaries; otherwise were breaking the license. For instance, the NVIDIA X11 drivers can be redistributed unmodified, but our builder applies <command>patchelf</command> to make them work. Thus, its license is <varname>"unfree"</varname> and it cannot be included in the Nixpkgs channel.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<varname>lib.licenses.unfree</varname>, <varname>"unfree"</varname>
</term>
<listitem>
<para>
Unfree package that cannot be redistributed. You can build it yourself, but you cannot redistribute the output of the derivation. Thus it cannot be included in the Nixpkgs channel.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<varname>lib.licenses.unfreeRedistributableFirmware</varname>, <varname>"unfree-redistributable-firmware"</varname>
</term>
<listitem>
<para>
This package supplies unfree, redistributable firmware. This is a separate value from <varname>unfree-redistributable</varname> because not everybody cares whether firmware is free.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</section>
</chapter>

View File

@ -0,0 +1,128 @@
# Multiple-output packages {#chap-multiple-output}
## Introduction {#sec-multiple-outputs-introduction}
The Nix language allows a derivation to produce multiple outputs, which is similar to what is utilized by other Linux distribution packaging systems. The outputs reside in separate Nix store paths, so they can be mostly handled independently of each other, including passing to build inputs, garbage collection or binary substitution. The exception is that building from source always produces all the outputs.
The main motivation is to save disk space by reducing runtime closure sizes; consequently also sizes of substituted binaries get reduced. Splitting can be used to have more granular runtime dependencies, for example the typical reduction is to split away development-only files, as those are typically not needed during runtime. As a result, closure sizes of many packages can get reduced to a half or even much less.
::: note
The reduction effects could be instead achieved by building the parts in completely separate derivations. That would often additionally reduce build-time closures, but it tends to be much harder to write such derivations, as build systems typically assume all parts are being built at once. This compromise approach of single source package producing multiple binary packages is also utilized often by rpm and deb.
:::
A number of attributes can be used to work with a derivation with multiple outputs. The attribute `outputs` is a list of strings, which are the names of the outputs. For each of these names, an identically named attribute is created, corresponding to that output. The attribute `meta.outputsToInstall` is used to determine the default set of outputs to install when using the derivation name unqualified.
## Installing a split package {#sec-multiple-outputs-installing}
When installing a package with multiple outputs, the packages `meta.outputsToInstall` attribute determines which outputs are actually installed. `meta.outputsToInstall` is a list whose [default installs binaries and the associated man pages](https://github.com/NixOS/nixpkgs/blob/f1680774340d5443a1409c3421ced84ac1163ba9/pkgs/stdenv/generic/make-derivation.nix#L310-L320). The following sections describe ways to install different outputs.
### Selecting outputs to install via NixOS {#sec-multiple-outputs-installing-nixos}
NixOS provides two ways to select the outputs to install for packages listed in `environment.systemPackages`:
- The configuration option `environment.extraOutputsToInstall` is appended to each packages `meta.outputsToInstall` attribute to determine the outputs to install. It can for example be used to install `info` documentation or debug symbols for all packages.
- The outputs can be listed as packages in `environment.systemPackages`. For example, the `"out"` and `"info"` outputs for the `coreutils` package can be installed by including `coreutils` and `coreutils.info` in `environment.systemPackages`.
### Selecting outputs to install via `nix-env` {#sec-multiple-outputs-installing-nix-env}
`nix-env` lacks an easy way to select the outputs to install. When installing a package, `nix-env` always installs the outputs listed in `meta.outputsToInstall`, even when the user explicitly selects an output.
::: warning
`nix-env` silenty disregards the outputs selected by the user, and instead installs the outputs from `meta.outputsToInstall`. For example,
```ShellSession
$ nix-env -iA nixpkgs.coreutils.info
```
installs the `"out"` output (`coreutils.meta.outputsToInstall` is `[ "out" ]`) instead of the requested `"info"`.
:::
The only recourse to select an output with `nix-env` is to override the packages `meta.outputsToInstall`, using the functions described in <xref linkend="chap-overrides" />. For example, the following overlay adds the `"info"` output for the `coreutils` package:
```nix
self: super:
{
coreutils = super.coreutils.overrideAttrs (oldAttrs: {
meta = oldAttrs.meta // { outputsToInstall = oldAttrs.meta.outputsToInstall or [ "out" ] ++ [ "info" ]; };
});
}
```
## Using a split package {#sec-multiple-outputs-using-split-packages}
In the Nix language the individual outputs can be reached explicitly as attributes, e.g. `coreutils.info`, but the typical case is just using packages as build inputs.
When a multiple-output derivation gets into a build input of another derivation, the `dev` output is added if it exists, otherwise the first output is added. In addition to that, `propagatedBuildOutputs` of that package which by default contain `$outputBin` and `$outputLib` are also added. (See <xref linkend="multiple-output-file-type-groups" />.)
In some cases it may be desirable to combine different outputs under a single store path. A function `symlinkJoin` can be used to do this. (Note that it may negate some closure size benefits of using a multiple-output package.)
## Writing a split derivation {#sec-multiple-outputs-}
Here you find how to write a derivation that produces multiple outputs.
In nixpkgs there is a framework supporting multiple-output derivations. It tries to cover most cases by default behavior. You can find the source separated in `<nixpkgs/pkgs/build-support/setup-hooks/multiple-outputs.sh>`; its relatively well-readable. The whole machinery is triggered by defining the `outputs` attribute to contain the list of desired output names (strings).
```nix
outputs = [ "bin" "dev" "out" "doc" ];
```
Often such a single line is enough. For each output an equally named environment variable is passed to the builder and contains the path in nix store for that output. Typically you also want to have the main `out` output, as it catches any files that didnt get elsewhere.
::: note
There is a special handling of the `debug` output, described at <xref linkend="stdenv-separateDebugInfo" />.
:::
### “Binaries first” {#multiple-output-file-binaries-first-convention}
A commonly adopted convention in `nixpkgs` is that executables provided by the package are contained within its first output. This convention allows the dependent packages to reference the executables provided by packages in a uniform manner. For instance, provided with the knowledge that the `perl` package contains a `perl` executable it can be referenced as `${pkgs.perl}/bin/perl` within a Nix derivation that needs to execute a Perl script.
The `glibc` package is a deliberate single exception to the “binaries first” convention. The `glibc` has `libs` as its first output allowing the libraries provided by `glibc` to be referenced directly (e.g. `${stdenv.glibc}/lib/ld-linux-x86-64.so.2`). The executables provided by `glibc` can be accessed via its `bin` attribute (e.g. `${stdenv.glibc.bin}/bin/ldd`).
The reason for why `glibc` deviates from the convention is because referencing a library provided by `glibc` is a very common operation among Nix packages. For instance, third-party executables packaged by Nix are typically patched and relinked with the relevant version of `glibc` libraries from Nix packages (please see the documentation on [patchelf](https://github.com/NixOS/patchelf/blob/master/README) for more details).
### File type groups {#multiple-output-file-type-groups}
The support code currently recognizes some particular kinds of outputs and either instructs the build system of the package to put files into their desired outputs or it moves the files during the fixup phase. Each group of file types has an `outputFoo` variable specifying the output name where they should go. If that variable isnt defined by the derivation writer, it is guessed a default output name is defined, falling back to other possibilities if the output isnt defined.
#### ` $outputDev`
is for development-only files. These include C(++) headers (`include/`), pkg-config (`lib/pkgconfig/`), cmake (`lib/cmake/`) and aclocal files (`share/aclocal/`). They go to `dev` or `out` by default.
#### ` $outputBin`
is meant for user-facing binaries, typically residing in `bin/`. They go to `bin` or `out` by default.
#### ` $outputLib`
is meant for libraries, typically residing in `lib/` and `libexec/`. They go to `lib` or `out` by default.
#### ` $outputDoc`
is for user documentation, typically residing in `share/doc/`. It goes to `doc` or `out` by default.
#### ` $outputDevdoc`
is for _developer_ documentation. Currently we count gtk-doc and devhelp books, typically residing in `share/gtk-doc/` and `share/devhelp/`, in there. It goes to `devdoc` or is removed (!) by default. This is because e.g. gtk-doc tends to be rather large and completely unused by nixpkgs users.
#### ` $outputMan`
is for man pages (except for section 3), typically residing in `share/man/man[0-9]/`. They go to `man` or `$outputBin` by default.
#### ` $outputDevman`
is for section 3 man pages, typically residing in `share/man/man[0-9]/`. They go to `devman` or `$outputMan` by default.
#### ` $outputInfo`
is for info pages, typically residing in `share/info/`. They go to `info` or `$outputBin` by default.
### Common caveats {#sec-multiple-outputs-caveats}
- Some configure scripts dont like some of the parameters passed by default by the framework, e.g. `--docdir=/foo/bar`. You can disable this by setting `setOutputFlags = false;`.
- The outputs of a single derivation can retain references to each other, but note that circular references are not allowed. (And each strongly-connected component would act as a single output anyway.)
- Most of split packages contain their core functionality in libraries. These libraries tend to refer to various kind of data that typically gets into `out`, e.g. locale strings, so there is often no advantage in separating the libraries into `lib`, as keeping them in `out` is easier.
- Some packages have hidden assumptions on install paths, which complicates splitting.

View File

@ -1,261 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE chapter [
<!ENTITY ndash "&#x2013;"> <!-- @vcunat likes to use this one ;-) -->
]>
<chapter xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xml:id="chap-multiple-output">
<title>Multiple-output packages</title>
<section xml:id="sec-multiple-outputs-introduction">
<title>Introduction</title>
<para>
The Nix language allows a derivation to produce multiple outputs, which is similar to what is utilized by other Linux distribution packaging systems. The outputs reside in separate Nix store paths, so they can be mostly handled independently of each other, including passing to build inputs, garbage collection or binary substitution. The exception is that building from source always produces all the outputs.
</para>
<para>
The main motivation is to save disk space by reducing runtime closure sizes; consequently also sizes of substituted binaries get reduced. Splitting can be used to have more granular runtime dependencies, for example the typical reduction is to split away development-only files, as those are typically not needed during runtime. As a result, closure sizes of many packages can get reduced to a half or even much less.
</para>
<note>
<para>
The reduction effects could be instead achieved by building the parts in completely separate derivations. That would often additionally reduce build-time closures, but it tends to be much harder to write such derivations, as build systems typically assume all parts are being built at once. This compromise approach of single source package producing multiple binary packages is also utilized often by rpm and deb.
</para>
</note>
<para>
A number of attributes can be used to work with a derivation with multiple outputs. The attribute <varname>outputs</varname> is a list of strings, which are the names of the outputs. For each of these names, an identically named attribute is created, corresponding to that output. The attribute <varname>meta.outputsToInstall</varname> is used to determine the default set of outputs to install when using the derivation name unqualified.
</para>
</section>
<section xml:id="sec-multiple-outputs-installing">
<title>Installing a split package</title>
<para>
When installing a package with multiple outputs, the package's <varname>meta.outputsToInstall</varname> attribute determines which outputs are actually installed. <varname>meta.outputsToInstall</varname> is a list whose <link xlink:href="https://github.com/NixOS/nixpkgs/blob/f1680774340d5443a1409c3421ced84ac1163ba9/pkgs/stdenv/generic/make-derivation.nix#L310-L320">default installs binaries and the associated man pages</link>. The following sections describe ways to install different outputs.
</para>
<section xml:id="sec-multiple-outputs-installing-nixos">
<title>Selecting outputs to install via NixOS</title>
<para>
NixOS provides two ways to select the outputs to install for packages listed in <varname>environment.systemPackages</varname>:
</para>
<itemizedlist>
<listitem>
<para>
The configuration option <varname>environment.extraOutputsToInstall</varname> is appended to each package's <varname>meta.outputsToInstall</varname> attribute to determine the outputs to install. It can for example be used to install <literal>info</literal> documentation or debug symbols for all packages.
</para>
</listitem>
<listitem>
<para>
The outputs can be listed as packages in <varname>environment.systemPackages</varname>. For example, the <literal>"out"</literal> and <literal>"info"</literal> outputs for the <varname>coreutils</varname> package can be installed by including <varname>coreutils</varname> and <varname>coreutils.info</varname> in <varname>environment.systemPackages</varname>.
</para>
</listitem>
</itemizedlist>
</section>
<section xml:id="sec-multiple-outputs-installing-nix-env">
<title>Selecting outputs to install via <command>nix-env</command></title>
<para>
<command>nix-env</command> lacks an easy way to select the outputs to install. When installing a package, <command>nix-env</command> always installs the outputs listed in <varname>meta.outputsToInstall</varname>, even when the user explicitly selects an output.
</para>
<warning>
<para>
<command>nix-env</command> silenty disregards the outputs selected by the user, and instead installs the outputs from <varname>meta.outputsToInstall</varname>. For example,
</para>
<screen><prompt>$ </prompt>nix-env -iA nixpkgs.coreutils.info</screen>
<para>
installs the <literal>"out"</literal> output (<varname>coreutils.meta.outputsToInstall</varname> is <literal>[ "out" ]</literal>) instead of the requested <literal>"info"</literal>.
</para>
</warning>
<para>
The only recourse to select an output with <command>nix-env</command> is to override the package's <varname>meta.outputsToInstall</varname>, using the functions described in <xref linkend="chap-overrides" />. For example, the following overlay adds the <literal>"info"</literal> output for the <varname>coreutils</varname> package:
</para>
<programlisting>self: super:
{
coreutils = super.coreutils.overrideAttrs (oldAttrs: {
meta = oldAttrs.meta // { outputsToInstall = oldAttrs.meta.outputsToInstall or [ "out" ] ++ [ "info" ]; };
});
}
</programlisting>
</section>
</section>
<section xml:id="sec-multiple-outputs-using-split-packages">
<title>Using a split package</title>
<para>
In the Nix language the individual outputs can be reached explicitly as attributes, e.g. <varname>coreutils.info</varname>, but the typical case is just using packages as build inputs.
</para>
<para>
When a multiple-output derivation gets into a build input of another derivation, the <varname>dev</varname> output is added if it exists, otherwise the first output is added. In addition to that, <varname>propagatedBuildOutputs</varname> of that package which by default contain <varname>$outputBin</varname> and <varname>$outputLib</varname> are also added. (See <xref linkend="multiple-output-file-type-groups" />.)
</para>
<para>
In some cases it may be desirable to combine different outputs under a single store path. A function <literal>symlinkJoin</literal> can be used to do this. (Note that it may negate some closure size benefits of using a multiple-output package.)
</para>
</section>
<section xml:id="sec-multiple-outputs-">
<title>Writing a split derivation</title>
<para>
Here you find how to write a derivation that produces multiple outputs.
</para>
<para>
In nixpkgs there is a framework supporting multiple-output derivations. It tries to cover most cases by default behavior. You can find the source separated in &lt;<filename>nixpkgs/pkgs/build-support/setup-hooks/multiple-outputs.sh</filename>&gt;; it's relatively well-readable. The whole machinery is triggered by defining the <varname>outputs</varname> attribute to contain the list of desired output names (strings).
</para>
<programlisting>outputs = [ "bin" "dev" "out" "doc" ];</programlisting>
<para>
Often such a single line is enough. For each output an equally named environment variable is passed to the builder and contains the path in nix store for that output. Typically you also want to have the main <varname>out</varname> output, as it catches any files that didn't get elsewhere.
</para>
<note>
<para>
There is a special handling of the <varname>debug</varname> output, described at <xref linkend="stdenv-separateDebugInfo" />.
</para>
</note>
<section xml:id="multiple-output-file-binaries-first-convention">
<title><quote>Binaries first</quote></title>
<para>
A commonly adopted convention in <literal>nixpkgs</literal> is that executables provided by the package are contained within its first output. This convention allows the dependent packages to reference the executables provided by packages in a uniform manner. For instance, provided with the knowledge that the <literal>perl</literal> package contains a <literal>perl</literal> executable it can be referenced as <literal>${pkgs.perl}/bin/perl</literal> within a Nix derivation that needs to execute a Perl script.
</para>
<para>
The <literal>glibc</literal> package is a deliberate single exception to the <quote>binaries first</quote> convention. The <literal>glibc</literal> has <literal>libs</literal> as its first output allowing the libraries provided by <literal>glibc</literal> to be referenced directly (e.g. <literal>${stdenv.glibc}/lib/ld-linux-x86-64.so.2</literal>). The executables provided by <literal>glibc</literal> can be accessed via its <literal>bin</literal> attribute (e.g. <literal>${stdenv.glibc.bin}/bin/ldd</literal>).
</para>
<para>
The reason for why <literal>glibc</literal> deviates from the convention is because referencing a library provided by <literal>glibc</literal> is a very common operation among Nix packages. For instance, third-party executables packaged by Nix are typically patched and relinked with the relevant version of <literal>glibc</literal> libraries from Nix packages (please see the documentation on <link xlink:href="https://github.com/NixOS/patchelf/blob/master/README">patchelf</link> for more details).
</para>
</section>
<section xml:id="multiple-output-file-type-groups">
<title>File type groups</title>
<para>
The support code currently recognizes some particular kinds of outputs and either instructs the build system of the package to put files into their desired outputs or it moves the files during the fixup phase. Each group of file types has an <varname>outputFoo</varname> variable specifying the output name where they should go. If that variable isn't defined by the derivation writer, it is guessed &ndash; a default output name is defined, falling back to other possibilities if the output isn't defined.
</para>
<variablelist>
<varlistentry>
<term>
<varname> $outputDev</varname>
</term>
<listitem>
<para>
is for development-only files. These include C(++) headers (<filename>include/</filename>), pkg-config (<filename>lib/pkgconfig/</filename>), cmake (<filename>lib/cmake/</filename>) and aclocal files (<varname>share/aclocal/</varname>). They go to <varname>dev</varname> or <varname>out</varname> by default.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<varname> $outputBin</varname>
</term>
<listitem>
<para>
is meant for user-facing binaries, typically residing in <filename>bin/</filename>. They go to <varname>bin</varname> or <varname>out</varname> by default.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<varname> $outputLib</varname>
</term>
<listitem>
<para>
is meant for libraries, typically residing in <filename>lib/</filename> and <filename>libexec/</filename>. They go to <varname>lib</varname> or <varname>out</varname> by default.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<varname> $outputDoc</varname>
</term>
<listitem>
<para>
is for user documentation, typically residing in <filename>share/doc/</filename>. It goes to <varname>doc</varname> or <varname>out</varname> by default.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<varname> $outputDevdoc</varname>
</term>
<listitem>
<para>
is for <emphasis>developer</emphasis> documentation. Currently we count gtk-doc and devhelp books, typically residing in <filename>share/gtk-doc/</filename> and <filename>share/devhelp/</filename>, in there. It goes to <varname>devdoc</varname> or is removed (!) by default. This is because e.g. gtk-doc tends to be rather large and completely unused by nixpkgs users.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<varname> $outputMan</varname>
</term>
<listitem>
<para>
is for man pages (except for section 3), typically residing in <filename>share/man/man[0-9]/</filename>. They go to <varname>man</varname> or <varname>$outputBin</varname> by default.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<varname> $outputDevman</varname>
</term>
<listitem>
<para>
is for section 3 man pages, typically residing in <filename>share/man/man3/</filename>. They go to <varname>devman</varname> or <varname>$outputMan</varname> by default.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<varname> $outputInfo</varname>
</term>
<listitem>
<para>
is for info pages, typically residing in <filename>share/info/</filename>. They go to <varname>info</varname> or <varname>$outputBin</varname> by default.
</para>
</listitem>
</varlistentry>
</variablelist>
</section>
<section xml:id="sec-multiple-outputs-caveats">
<title>Common caveats</title>
<itemizedlist>
<listitem>
<para>
Some configure scripts don't like some of the parameters passed by default by the framework, e.g. <literal>--docdir=/foo/bar</literal>. You can disable this by setting <literal>setOutputFlags = false;</literal>.
</para>
</listitem>
<listitem>
<para>
The outputs of a single derivation can retain references to each other, but note that circular references are not allowed. (And each strongly-connected component would act as a single output anyway.)
</para>
</listitem>
<listitem>
<para>
Most of split packages contain their core functionality in libraries. These libraries tend to refer to various kind of data that typically gets into <varname>out</varname>, e.g. locale strings, so there is often no advantage in separating the libraries into <varname>lib</varname>, as keeping them in <varname>out</varname> is easier.
</para>
</listitem>
<listitem>
<para>
Some packages have hidden assumptions on install paths, which complicates splitting.
</para>
</listitem>
</itemizedlist>
</section>
</section>
<!--Writing a split derivation-->
</chapter>

1215
doc/stdenv/stdenv.chapter.md Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -230,7 +230,7 @@ self: super:
</para>
<para>
For BLAS/LAPACK switching to work correctly, all packages must depend on <literal>blas</literal> or <literal>lapack</literal>. This ensures that only one BLAS/LAPACK library is used at one time. There are two versions versions of BLAS/LAPACK currently in the wild, <literal>LP64</literal> (integer size = 32 bits) and <literal>ILP64</literal> (integer size = 64 bits). Some software needs special flags or patches to work with <literal>ILP64</literal>. You can check if <literal>ILP64</literal> is used in Nixpkgs with <varname>blas.isILP64</varname> and <varname>lapack.isILP64</varname>. Some software does NOT work with <literal>ILP64</literal>, and derivations need to specify an assertion to prevent this. You can prevent <literal>ILP64</literal> from being used with the following:
For BLAS/LAPACK switching to work correctly, all packages must depend on <literal>blas</literal> or <literal>lapack</literal>. This ensures that only one BLAS/LAPACK library is used at one time. There are two versions of BLAS/LAPACK currently in the wild, <literal>LP64</literal> (integer size = 32 bits) and <literal>ILP64</literal> (integer size = 64 bits). Some software needs special flags or patches to work with <literal>ILP64</literal>. You can check if <literal>ILP64</literal> is used in Nixpkgs with <varname>blas.isILP64</varname> and <varname>lapack.isILP64</varname>. Some software does NOT work with <literal>ILP64</literal>, and derivations need to specify an assertion to prevent this. You can prevent <literal>ILP64</literal> from being used with the following:
</para>
<programlisting>

View File

@ -3615,6 +3615,12 @@
githubId = 343415;
name = "Greg Roodt";
};
gtrunsec = {
email = "gtrunsec@hardenedlinux.org";
github = "GTrunSec";
githubId = 21156405;
name = "GuangTao Zhang";
};
guibou = {
email = "guillaum.bouchard@gmail.com";
github = "guibou";
@ -6981,6 +6987,12 @@
githubId = 3359345;
name = "obadz";
};
obsidian-systems-maintainence = {
name = "Obsidian Systems Maintenance";
email = "maintainer@obsidian.systems";
github = "obsidian-systems-maintenance";
githubId = 80847921;
};
odi = {
email = "oliver.dunkl@gmail.com";
github = "odi";

View File

@ -0,0 +1,526 @@
# Used by pkgs/misc/vim-plugins/update.py and pkgs/applications/editors/kakoune/plugins/update.py
# format:
# $ nix run nixpkgs.python3Packages.black -c black update.py
# type-check:
# $ nix run nixpkgs.python3Packages.mypy -c mypy update.py
# linted:
# $ nix run nixpkgs.python3Packages.flake8 -c flake8 --ignore E501,E265 update.py
import argparse
import functools
import http
import json
import os
import subprocess
import sys
import time
import traceback
import urllib.error
import urllib.parse
import urllib.request
import xml.etree.ElementTree as ET
from datetime import datetime
from functools import wraps
from multiprocessing.dummy import Pool
from pathlib import Path
from typing import Dict, List, Optional, Tuple, Union, Any, Callable
from urllib.parse import urljoin, urlparse
from tempfile import NamedTemporaryFile
import git
ATOM_ENTRY = "{http://www.w3.org/2005/Atom}entry" # " vim gets confused here
ATOM_LINK = "{http://www.w3.org/2005/Atom}link" # "
ATOM_UPDATED = "{http://www.w3.org/2005/Atom}updated" # "
def retry(ExceptionToCheck: Any, tries: int = 4, delay: float = 3, backoff: float = 2):
"""Retry calling the decorated function using an exponential backoff.
http://www.saltycrane.com/blog/2009/11/trying-out-retry-decorator-python/
original from: http://wiki.python.org/moin/PythonDecoratorLibrary#Retry
(BSD licensed)
:param ExceptionToCheck: the exception on which to retry
:param tries: number of times to try (not retry) before giving up
:param delay: initial delay between retries in seconds
:param backoff: backoff multiplier e.g. value of 2 will double the delay
each retry
"""
def deco_retry(f: Callable) -> Callable:
@wraps(f)
def f_retry(*args: Any, **kwargs: Any) -> Any:
mtries, mdelay = tries, delay
while mtries > 1:
try:
return f(*args, **kwargs)
except ExceptionToCheck as e:
print(f"{str(e)}, Retrying in {mdelay} seconds...")
time.sleep(mdelay)
mtries -= 1
mdelay *= backoff
return f(*args, **kwargs)
return f_retry # true decorator
return deco_retry
def make_request(url: str) -> urllib.request.Request:
token = os.getenv("GITHUB_API_TOKEN")
headers = {}
if token is not None:
headers["Authorization"] = f"token {token}"
return urllib.request.Request(url, headers=headers)
class Repo:
def __init__(
self, owner: str, name: str, branch: str, alias: Optional[str]
) -> None:
self.owner = owner
self.name = name
self.branch = branch
self.alias = alias
self.redirect: Dict[str, str] = {}
def url(self, path: str) -> str:
return urljoin(f"https://github.com/{self.owner}/{self.name}/", path)
def __repr__(self) -> str:
return f"Repo({self.owner}, {self.name})"
@retry(urllib.error.URLError, tries=4, delay=3, backoff=2)
def has_submodules(self) -> bool:
try:
req = make_request(self.url(f"blob/{self.branch}/.gitmodules"))
urllib.request.urlopen(req, timeout=10).close()
except urllib.error.HTTPError as e:
if e.code == 404:
return False
else:
raise
return True
@retry(urllib.error.URLError, tries=4, delay=3, backoff=2)
def latest_commit(self) -> Tuple[str, datetime]:
commit_url = self.url(f"commits/{self.branch}.atom")
commit_req = make_request(commit_url)
with urllib.request.urlopen(commit_req, timeout=10) as req:
self.check_for_redirect(commit_url, req)
xml = req.read()
root = ET.fromstring(xml)
latest_entry = root.find(ATOM_ENTRY)
assert latest_entry is not None, f"No commits found in repository {self}"
commit_link = latest_entry.find(ATOM_LINK)
assert commit_link is not None, f"No link tag found feed entry {xml}"
url = urlparse(commit_link.get("href"))
updated_tag = latest_entry.find(ATOM_UPDATED)
assert (
updated_tag is not None and updated_tag.text is not None
), f"No updated tag found feed entry {xml}"
updated = datetime.strptime(updated_tag.text, "%Y-%m-%dT%H:%M:%SZ")
return Path(str(url.path)).name, updated
def check_for_redirect(self, url: str, req: http.client.HTTPResponse):
response_url = req.geturl()
if url != response_url:
new_owner, new_name = (
urllib.parse.urlsplit(response_url).path.strip("/").split("/")[:2]
)
end_line = "\n" if self.alias is None else f" as {self.alias}\n"
plugin_line = "{owner}/{name}" + end_line
old_plugin = plugin_line.format(owner=self.owner, name=self.name)
new_plugin = plugin_line.format(owner=new_owner, name=new_name)
self.redirect[old_plugin] = new_plugin
def prefetch_git(self, ref: str) -> str:
data = subprocess.check_output(
["nix-prefetch-git", "--fetch-submodules", self.url(""), ref]
)
return json.loads(data)["sha256"]
def prefetch_github(self, ref: str) -> str:
data = subprocess.check_output(
["nix-prefetch-url", "--unpack", self.url(f"archive/{ref}.tar.gz")]
)
return data.strip().decode("utf-8")
class Plugin:
def __init__(
self,
name: str,
commit: str,
has_submodules: bool,
sha256: str,
date: Optional[datetime] = None,
) -> None:
self.name = name
self.commit = commit
self.has_submodules = has_submodules
self.sha256 = sha256
self.date = date
@property
def normalized_name(self) -> str:
return self.name.replace(".", "-")
@property
def version(self) -> str:
assert self.date is not None
return self.date.strftime("%Y-%m-%d")
def as_json(self) -> Dict[str, str]:
copy = self.__dict__.copy()
del copy["date"]
return copy
class Editor:
"""The configuration of the update script."""
def __init__(
self,
name: str,
root: Path,
get_plugins: str,
generate_nix: Callable[[List[Tuple[str, str, Plugin]], str], None],
default_in: Optional[Path] = None,
default_out: Optional[Path] = None,
deprecated: Optional[Path] = None,
cache_file: Optional[str] = None,
):
self.name = name
self.root = root
self.get_plugins = get_plugins
self.generate_nix = generate_nix
self.default_in = default_in or root.joinpath(f"{name}-plugin-names")
self.default_out = default_out or root.joinpath("generated.nix")
self.deprecated = deprecated or root.joinpath("deprecated.json")
self.cache_file = cache_file or f"{name}-plugin-cache.json"
class CleanEnvironment(object):
def __enter__(self) -> None:
self.old_environ = os.environ.copy()
local_pkgs = str(Path(__file__).parent.parent.parent)
os.environ["NIX_PATH"] = f"localpkgs={local_pkgs}"
self.empty_config = NamedTemporaryFile()
self.empty_config.write(b"{}")
self.empty_config.flush()
os.environ["NIXPKGS_CONFIG"] = self.empty_config.name
def __exit__(self, exc_type: Any, exc_value: Any, traceback: Any) -> None:
os.environ.update(self.old_environ)
self.empty_config.close()
def get_current_plugins(editor: Editor) -> List[Plugin]:
with CleanEnvironment():
out = subprocess.check_output(["nix", "eval", "--json", editor.get_plugins])
data = json.loads(out)
plugins = []
for name, attr in data.items():
p = Plugin(name, attr["rev"], attr["submodules"], attr["sha256"])
plugins.append(p)
return plugins
def prefetch_plugin(
user: str,
repo_name: str,
branch: str,
alias: Optional[str],
cache: "Optional[Cache]" = None,
) -> Tuple[Plugin, Dict[str, str]]:
repo = Repo(user, repo_name, branch, alias)
commit, date = repo.latest_commit()
has_submodules = repo.has_submodules()
cached_plugin = cache[commit] if cache else None
if cached_plugin is not None:
cached_plugin.name = alias or repo_name
cached_plugin.date = date
return cached_plugin, repo.redirect
print(f"prefetch {user}/{repo_name}")
if has_submodules:
sha256 = repo.prefetch_git(commit)
else:
sha256 = repo.prefetch_github(commit)
return (
Plugin(alias or repo_name, commit, has_submodules, sha256, date=date),
repo.redirect,
)
def fetch_plugin_from_pluginline(plugin_line: str) -> Plugin:
plugin, _ = prefetch_plugin(*parse_plugin_line(plugin_line))
return plugin
def print_download_error(plugin: str, ex: Exception):
print(f"{plugin}: {ex}", file=sys.stderr)
ex_traceback = ex.__traceback__
tb_lines = [
line.rstrip("\n")
for line in traceback.format_exception(ex.__class__, ex, ex_traceback)
]
print("\n".join(tb_lines))
def check_results(
results: List[Tuple[str, str, Union[Exception, Plugin], Dict[str, str]]]
) -> Tuple[List[Tuple[str, str, Plugin]], Dict[str, str]]:
failures: List[Tuple[str, Exception]] = []
plugins = []
redirects: Dict[str, str] = {}
for (owner, name, result, redirect) in results:
if isinstance(result, Exception):
failures.append((name, result))
else:
plugins.append((owner, name, result))
redirects.update(redirect)
print(f"{len(results) - len(failures)} plugins were checked", end="")
if len(failures) == 0:
print()
return plugins, redirects
else:
print(f", {len(failures)} plugin(s) could not be downloaded:\n")
for (plugin, exception) in failures:
print_download_error(plugin, exception)
sys.exit(1)
def parse_plugin_line(line: str) -> Tuple[str, str, str, Optional[str]]:
branch = "master"
alias = None
name, repo = line.split("/")
if " as " in repo:
repo, alias = repo.split(" as ")
alias = alias.strip()
if "@" in repo:
repo, branch = repo.split("@")
return (name.strip(), repo.strip(), branch.strip(), alias)
def load_plugin_spec(plugin_file: str) -> List[Tuple[str, str, str, Optional[str]]]:
plugins = []
with open(plugin_file) as f:
for line in f:
plugin = parse_plugin_line(line)
if not plugin[0]:
msg = f"Invalid repository {line}, must be in the format owner/repo[ as alias]"
print(msg, file=sys.stderr)
sys.exit(1)
plugins.append(plugin)
return plugins
def get_cache_path(cache_file_name: str) -> Optional[Path]:
xdg_cache = os.environ.get("XDG_CACHE_HOME", None)
if xdg_cache is None:
home = os.environ.get("HOME", None)
if home is None:
return None
xdg_cache = str(Path(home, ".cache"))
return Path(xdg_cache, cache_file_name)
class Cache:
def __init__(self, initial_plugins: List[Plugin], cache_file_name: str) -> None:
self.cache_file = get_cache_path(cache_file_name)
downloads = {}
for plugin in initial_plugins:
downloads[plugin.commit] = plugin
downloads.update(self.load())
self.downloads = downloads
def load(self) -> Dict[str, Plugin]:
if self.cache_file is None or not self.cache_file.exists():
return {}
downloads: Dict[str, Plugin] = {}
with open(self.cache_file) as f:
data = json.load(f)
for attr in data.values():
p = Plugin(
attr["name"], attr["commit"], attr["has_submodules"], attr["sha256"]
)
downloads[attr["commit"]] = p
return downloads
def store(self) -> None:
if self.cache_file is None:
return
os.makedirs(self.cache_file.parent, exist_ok=True)
with open(self.cache_file, "w+") as f:
data = {}
for name, attr in self.downloads.items():
data[name] = attr.as_json()
json.dump(data, f, indent=4, sort_keys=True)
def __getitem__(self, key: str) -> Optional[Plugin]:
return self.downloads.get(key, None)
def __setitem__(self, key: str, value: Plugin) -> None:
self.downloads[key] = value
def prefetch(
args: Tuple[str, str, str, Optional[str]], cache: Cache
) -> Tuple[str, str, Union[Exception, Plugin], dict]:
assert len(args) == 4
owner, repo, branch, alias = args
try:
plugin, redirect = prefetch_plugin(owner, repo, branch, alias, cache)
cache[plugin.commit] = plugin
return (owner, repo, plugin, redirect)
except Exception as e:
return (owner, repo, e, {})
def rewrite_input(
input_file: Path,
deprecated: Path,
redirects: Dict[str, str] = None,
append: Tuple = (),
):
with open(input_file, "r") as f:
lines = f.readlines()
lines.extend(append)
if redirects:
lines = [redirects.get(line, line) for line in lines]
cur_date_iso = datetime.now().strftime("%Y-%m-%d")
with open(deprecated, "r") as f:
deprecations = json.load(f)
for old, new in redirects.items():
old_plugin = fetch_plugin_from_pluginline(old)
new_plugin = fetch_plugin_from_pluginline(new)
if old_plugin.normalized_name != new_plugin.normalized_name:
deprecations[old_plugin.normalized_name] = {
"new": new_plugin.normalized_name,
"date": cur_date_iso,
}
with open(deprecated, "w") as f:
json.dump(deprecations, f, indent=4, sort_keys=True)
lines = sorted(lines, key=str.casefold)
with open(input_file, "w") as f:
f.writelines(lines)
def parse_args(editor: Editor):
parser = argparse.ArgumentParser(
description=(
f"Updates nix derivations for {editor.name} plugins"
f"By default from {editor.default_in} to {editor.default_out}"
)
)
parser.add_argument(
"--add",
dest="add_plugins",
default=[],
action="append",
help=f"Plugin to add to {editor.name}Plugins from Github in the form owner/repo",
)
parser.add_argument(
"--input-names",
"-i",
dest="input_file",
default=editor.default_in,
help="A list of plugins in the form owner/repo",
)
parser.add_argument(
"--out",
"-o",
dest="outfile",
default=editor.default_out,
help="Filename to save generated nix code",
)
parser.add_argument(
"--proc",
"-p",
dest="proc",
type=int,
default=30,
help="Number of concurrent processes to spawn.",
)
return parser.parse_args()
def commit(repo: git.Repo, message: str, files: List[Path]) -> None:
repo.index.add([str(f.resolve()) for f in files])
if repo.index.diff("HEAD"):
print(f'committing to nixpkgs "{message}"')
repo.index.commit(message)
else:
print("no changes in working tree to commit")
def get_update(input_file: str, outfile: str, proc: int, editor: Editor):
cache: Cache = Cache(get_current_plugins(editor), editor.cache_file)
_prefetch = functools.partial(prefetch, cache=cache)
def update() -> dict:
plugin_names = load_plugin_spec(input_file)
try:
pool = Pool(processes=proc)
results = pool.map(_prefetch, plugin_names)
finally:
cache.store()
plugins, redirects = check_results(results)
editor.generate_nix(plugins, outfile)
return redirects
return update
def update_plugins(editor: Editor):
"""The main entry function of this module. All input arguments are grouped in the `Editor`."""
args = parse_args(editor)
nixpkgs_repo = git.Repo(editor.root, search_parent_directories=True)
update = get_update(args.input_file, args.outfile, args.proc, editor)
redirects = update()
rewrite_input(args.input_file, editor.deprecated, redirects)
commit(nixpkgs_repo, f"{editor.name}Plugins: update", [args.outfile])
if redirects:
update()
commit(
nixpkgs_repo,
f"{editor.name}Plugins: resolve github repository redirects",
[args.outfile, args.input_file, editor.deprecated],
)
for plugin_line in args.add_plugins:
rewrite_input(args.input_file, editor.deprecated, append=(plugin_line + "\n",))
update()
plugin = fetch_plugin_from_pluginline(plugin_line)
commit(
nixpkgs_repo,
"{editor}Plugins.{name}: init at {version}".format(
editor=editor.name, name=plugin.normalized_name, version=plugin.version
),
[args.outfile, args.input_file],
)

View File

@ -374,7 +374,7 @@
You may want to look at the options starting with
<option><link linkend="opt-boot.loader.efi.canTouchEfiVariables">boot.loader.efi</link></option>
and
<option><link linkend="opt-boot.loader.systemd-boot.enable">boot.loader.systemd</link></option>
<option><link linkend="opt-boot.loader.systemd-boot.enable">boot.loader.systemd-boot</link></option>
as well.
</para>
</listitem>

View File

@ -29,14 +29,24 @@
<listitem>
<para>
<link xlink:href="https://www.gnuradio.org/">GNURadio</link> 3.8 was
<link xlink:href="https://github.com/NixOS/nixpkgs/issues/82263">finnally</link>
<link xlink:href="https://github.com/NixOS/nixpkgs/issues/82263">finally</link>
packaged, along with a rewrite to the Nix expressions, allowing users to
override the features upstream supports selecting to compile or not to.
Additionally, the attribute <code>gnuradio</code> and <code>gnuradio3_7</code>
now point to an externally wrapped by default derivations, that allow you to
also add `extraPythonPackages` to the Python interpreter used by GNURadio.
Missing environmental variables needed for operational GUI were also added
(<link xlink:href="https://github.com/NixOS/nixpkgs/issues/75478">#7547</link>).
(<link xlink:href="https://github.com/NixOS/nixpkgs/issues/75478">#75478</link>).
</para>
</listitem>
<listitem>
<para>
<link xlink:href="https://www.gnuradio.org/">GNURadio</link> has a
<code>pkgs</code> attribute set, and there's a <code>gnuradio.callPackage</code>
function that extends <code>pkgs</code> with a <code>mkDerivation</code>, and a
<code>mkDerivationWith</code>, like Qt5. Now all <code>gnuradio.pkgs</code> are
defined with <code>gnuradio.callPackage</code> and some packages that depend
on gnuradio are defined with this as well.
</para>
</listitem>
<listitem>
@ -57,6 +67,13 @@
for the motivation).
</para>
</listitem>
<listitem>
<para>
<link xlink:href="https://kodi.tv/">Kodi</link> has been updated to version 19.0 "Matrix". See
the <link xlink:href="https://kodi.tv/article/kodi-190-matrix-release">announcement</link> for
further details.
</para>
</listitem>
</itemizedlist>
</section>
@ -577,6 +594,37 @@ self: super:
for your Kafka version.
</para>
</listitem>
<listitem>
<para>
The <package>kodi</package> package has been modified to allow concise addon management. Consider
the following configuration from previous releases of NixOS to install <package>kodi</package>,
including the <package>kodiPackages.inputstream-adaptive</package> and <package>kodiPackages.vfs-sftp</package>
addons:
<programlisting>
environment.systemPackages = [
pkgs.kodi
];
nixpkgs.config.kodi = {
enableInputStreamAdaptive = true;
enableVFSSFTP = true;
};
</programlisting>
All Kodi <literal>config</literal> flags have been removed, and as a result the above configuration
should now be written as:
<programlisting>
environment.systemPackages = [
(pkgs.kodi.withPackages (p: with p; [
inputstream-adaptive
vfs-sftp
]))
];
</programlisting>
</para>
</listitem>
</itemizedlist>
</section>

View File

@ -98,7 +98,7 @@ in
See "Multiple-output packages" chapter in the nixpkgs manual for more info.
'';
# which is at ../../../doc/multiple-output.xml
# which is at ../../../doc/multiple-output.chapter.md
};
man.enable = mkOption {

View File

@ -47,9 +47,9 @@ in
doc = mkOption {
type = docFile;
internal = true;
example = "./meta.xml";
example = "./meta.chapter.xml";
description = ''
Documentation prologe for the set of options of each module. This
Documentation prologue for the set of options of each module. This
option should be defined at most once per module.
'';
};

View File

@ -638,6 +638,7 @@
./services/networking/coredns.nix
./services/networking/corerad.nix
./services/networking/coturn.nix
./services/networking/croc.nix
./services/networking/dante.nix
./services/networking/ddclient.nix
./services/networking/dhcpcd.nix

View File

@ -90,7 +90,7 @@ in {
rxvt-unicode # For backward compatibility (old default terminal)
];
defaultText = literalExample ''
with pkgs; [ swaylock swayidle xwayland rxvt-unicode dmenu ];
with pkgs; [ swaylock swayidle rxvt-unicode alacritty dmenu ];
'';
example = literalExample ''
with pkgs; [

View File

@ -276,9 +276,9 @@ in
${concatMapStrings (img: ''
echo "Seeding container image: ${img}"
${if (lib.hasSuffix "gz" img) then
''${pkgs.gzip}/bin/zcat "${img}" | ${pkgs.containerd}/bin/ctr -n k8s.io image import -''
''${pkgs.gzip}/bin/zcat "${img}" | ${pkgs.containerd}/bin/ctr -n k8s.io image import --all-platforms -''
else
''${pkgs.coreutils}/bin/cat "${img}" | ${pkgs.containerd}/bin/ctr -n k8s.io image import -''
''${pkgs.coreutils}/bin/cat "${img}" | ${pkgs.containerd}/bin/ctr -n k8s.io image import --all-platforms -''
}
'') cfg.seedDockerImages}

View File

@ -36,6 +36,7 @@ let
only_admins_can_pause_the_game = true;
autosave_only_on_server = true;
admins = [];
non_blocking_saving = cfg.nonBlockingSaving;
} // cfg.extraSettings;
serverSettingsFile = pkgs.writeText "server-settings.json" (builtins.toJSON (filterAttrsRecursive (n: v: v != null) serverSettings));
modDir = pkgs.factorio-utils.mkModDirDrv cfg.mods;
@ -193,6 +194,15 @@ in
Autosave interval in minutes.
'';
};
nonBlockingSaving = mkOption {
type = types.bool;
default = false;
description = ''
Highly experimental feature, enable only at your own risk of losing your saves.
On UNIX systems, server will fork itself to create an autosave.
Autosaving on connected Windows clients will be disabled regardless of autosave_only_on_server option.
'';
};
};
};

View File

@ -6,8 +6,9 @@ let
dataDir = "/var/lib/mautrix-telegram";
registrationFile = "${dataDir}/telegram-registration.yaml";
cfg = config.services.mautrix-telegram;
# TODO: switch to configGen.json once RFC42 is implemented
settingsFile = pkgs.writeText "mautrix-telegram-settings.json" (builtins.toJSON cfg.settings);
settingsFormat = pkgs.formats.json {};
settingsFileUnsubstituted = settingsFormat.generate "mautrix-telegram-config-unsubstituted.json" cfg.settings;
settingsFile = "${dataDir}/config.json";
in {
options = {
@ -15,9 +16,8 @@ in {
enable = mkEnableOption "Mautrix-Telegram, a Matrix-Telegram hybrid puppeting/relaybot bridge";
settings = mkOption rec {
# TODO: switch to types.config.json as prescribed by RFC42 once it's implemented
type = types.attrs;
apply = recursiveUpdate default;
inherit (settingsFormat) type;
default = {
appservice = rec {
database = "sqlite:///${dataDir}/mautrix-telegram.db";
@ -124,6 +124,16 @@ in {
after = [ "network-online.target" ] ++ cfg.serviceDependencies;
preStart = ''
# Not all secrets can be passed as environment variable (yet)
# https://github.com/tulir/mautrix-telegram/issues/584
[ -f ${settingsFile} ] && rm -f ${settingsFile}
old_umask=$(umask)
umask 0277
${pkgs.envsubst}/bin/envsubst \
-o ${settingsFile} \
-i ${settingsFileUnsubstituted}
umask $old_umask
# generate the appservice's registration file if absent
if [ ! -f '${registrationFile}' ]; then
${pkgs.mautrix-telegram}/bin/mautrix-telegram \
@ -159,6 +169,8 @@ in {
--config='${settingsFile}'
'';
};
restartTriggers = [ settingsFileUnsubstituted ];
};
};

View File

@ -31,6 +31,7 @@ let
"dovecot"
"fritzbox"
"json"
"jitsi"
"keylight"
"knot"
"lnd"
@ -130,7 +131,7 @@ let
inherit name port;
} // extraOpts);
} ({ config, ... }: mkIf config.openFirewall {
firewallFilter = mkOptionDefault "-p tcp -m tcp --dport ${toString config.port}";
firewallFilter = mkDefault "-p tcp -m tcp --dport ${toString config.port}";
})];
internal = true;
default = {};

View File

@ -0,0 +1,40 @@
{ config, lib, pkgs, options }:
with lib;
let
cfg = config.services.prometheus.exporters.jitsi;
in
{
port = 9700;
extraOpts = {
url = mkOption {
type = types.str;
default = "http://localhost:8080/colibri/stats";
description = ''
Jitsi Videobridge metrics URL to monitor.
This is usually /colibri/stats on port 8080 of the jitsi videobridge host.
'';
};
interval = mkOption {
type = types.str;
default = "30s";
example = "1min";
description = ''
How often to scrape new data
'';
};
};
serviceOpts = {
serviceConfig = {
ExecStart = ''
${pkgs.prometheus-jitsi-exporter}/bin/jitsiexporter \
-url ${escapeShellArg cfg.url} \
-host ${cfg.listenAddress} \
-port ${toString cfg.port} \
-interval ${toString cfg.interval} \
${concatStringsSep " \\\n " cfg.extraFlags}
'';
};
};
}

View File

@ -30,12 +30,49 @@ in
Whether to run the exporter as the local 'postgres' super user.
'';
};
# TODO perhaps LoadCredential would be more appropriate
environmentFile = mkOption {
type = types.nullOr types.path;
default = null;
example = "/root/prometheus-postgres-exporter.env";
description = ''
Environment file as defined in <citerefentry>
<refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum>
</citerefentry>.
Secrets may be passed to the service without adding them to the
world-readable Nix store, by specifying placeholder variables as
the option value in Nix and setting these variables accordingly in the
environment file.
Environment variables from this file will be interpolated into the
config file using envsubst with this syntax:
<literal>$ENVIRONMENT ''${VARIABLE}</literal>
The main use is to set the DATA_SOURCE_NAME that contains the
postgres password
note that contents from this file will override dataSourceName
if you have set it from nix.
<programlisting>
# Content of the environment file
DATA_SOURCE_NAME=postgresql://username:password@localhost:5432/postgres?sslmode=disable
</programlisting>
Note that this file needs to be available on the host on which
this exporter is running.
'';
};
};
serviceOpts = {
environment.DATA_SOURCE_NAME = cfg.dataSourceName;
serviceConfig = {
DynamicUser = false;
User = mkIf cfg.runAsLocalSuperUser (mkForce "postgres");
EnvironmentFile = mkIf (cfg.environmentFile != null) [ cfg.environmentFile ];
ExecStart = ''
${pkgs.prometheus-postgres-exporter}/bin/postgres_exporter \
--web.listen-address ${cfg.listenAddress}:${toString cfg.port} \

View File

@ -0,0 +1,88 @@
{ config, lib, pkgs, ... }:
let
inherit (lib) types;
cfg = config.services.croc;
rootDir = "/run/croc";
in
{
options.services.croc = {
enable = lib.mkEnableOption "croc relay";
ports = lib.mkOption {
type = with types; listOf port;
default = [9009 9010 9011 9012 9013];
description = "Ports of the relay.";
};
pass = lib.mkOption {
type = with types; either path str;
default = "pass123";
description = "Password or passwordfile for the relay.";
};
openFirewall = lib.mkEnableOption "opening of the peer port(s) in the firewall";
debug = lib.mkEnableOption "debug logs";
};
config = lib.mkIf cfg.enable {
systemd.services.croc = {
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
ExecStart = "${pkgs.croc}/bin/croc --pass '${cfg.pass}' ${lib.optionalString cfg.debug "--debug"} relay --ports ${lib.concatMapStringsSep "," toString cfg.ports}";
# The following options are only for optimizing:
# systemd-analyze security croc
AmbientCapabilities = "";
CapabilityBoundingSet = "";
DynamicUser = true;
# ProtectClock= adds DeviceAllow=char-rtc r
DeviceAllow = "";
LockPersonality = true;
MemoryDenyWriteExecute = true;
MountAPIVFS = true;
NoNewPrivileges = true;
PrivateDevices = true;
PrivateMounts = true;
PrivateNetwork = lib.mkDefault false;
PrivateTmp = true;
PrivateUsers = true;
ProcSubset = "pid";
ProtectClock = true;
ProtectControlGroups = true;
ProtectHome = true;
ProtectHostname = true;
ProtectKernelLogs = true;
ProtectKernelModules = true;
ProtectKernelTunables = true;
ProtectProc = "noaccess";
ProtectSystem = "strict";
RemoveIPC = true;
RestrictAddressFamilies = [ "AF_INET" "AF_INET6" ];
RestrictNamespaces = true;
RestrictRealtime = true;
RestrictSUIDSGID = true;
RootDirectory = rootDir;
# Avoid mounting rootDir in the own rootDir of ExecStart='s mount namespace.
InaccessiblePaths = [ "-+${rootDir}" ];
BindReadOnlyPaths = [
builtins.storeDir
] ++ lib.optional (types.path.check cfg.pass) cfg.pass;
# This is for BindReadOnlyPaths=
# to allow traversal of directories they create in RootDirectory=.
UMask = "0066";
# Create rootDir in the host's mount namespace.
RuntimeDirectory = [(baseNameOf rootDir)];
RuntimeDirectoryMode = "700";
SystemCallFilter = [
"@system-service"
"~@aio" "~@chown" "~@keyring" "~@memlock"
"~@privileged" "~@resources" "~@setuid"
"~@sync" "~@timer"
];
SystemCallArchitectures = "native";
SystemCallErrorNumber = "EPERM";
};
};
networking.firewall.allowedTCPPorts = lib.mkIf cfg.openFirewall cfg.ports;
};
meta.maintainers = with lib.maintainers; [ hax404 julm ];
}

View File

@ -104,7 +104,7 @@ let
ignoreCollisions = true;
};
filterGutenprint = pkgs: filter (pkg: pkg.meta.isGutenprint or false == true) pkgs;
filterGutenprint = filter (pkg: pkg.meta.isGutenprint or false == true);
containsGutenprint = pkgs: length (filterGutenprint pkgs) > 0;
getGutenprint = pkgs: head (filterGutenprint pkgs);

View File

@ -14,17 +14,16 @@ let
ADMIN_PASSWORD=password
'';
pgsu = "${pkgs.sudo}/bin/sudo -u ${config.services.postgresql.superUser}";
pgbin = "${config.services.postgresql.package}/bin";
preStart = pkgs.writeScript "miniflux-pre-start" ''
#!${pkgs.runtimeShell}
db_exists() {
[ "$(${pgsu} ${pgbin}/psql -Atc "select 1 from pg_database where datname='$1'")" == "1" ]
[ "$(${pgbin}/psql -Atc "select 1 from pg_database where datname='$1'")" == "1" ]
}
if ! db_exists "${dbName}"; then
${pgsu} ${pgbin}/psql postgres -c "CREATE ROLE ${dbUser} WITH LOGIN NOCREATEDB NOCREATEROLE ENCRYPTED PASSWORD '${dbPassword}'"
${pgsu} ${pgbin}/createdb --owner "${dbUser}" "${dbName}"
${pgsu} ${pgbin}/psql "${dbName}" -c "CREATE EXTENSION IF NOT EXISTS hstore"
${pgbin}/psql postgres -c "CREATE ROLE ${dbUser} WITH LOGIN NOCREATEDB NOCREATEROLE ENCRYPTED PASSWORD '${dbPassword}'"
${pgbin}/createdb --owner "${dbUser}" "${dbName}"
${pgbin}/psql "${dbName}" -c "CREATE EXTENSION IF NOT EXISTS hstore"
fi
'';
in
@ -73,15 +72,26 @@ in
services.postgresql.enable = true;
systemd.services.miniflux-dbsetup = {
description = "Miniflux database setup";
wantedBy = [ "multi-user.target" ];
requires = [ "postgresql.service" ];
after = [ "network.target" "postgresql.service" ];
serviceConfig = {
Type = "oneshot";
User = config.services.postgresql.superUser;
ExecStart = preStart;
};
};
systemd.services.miniflux = {
description = "Miniflux service";
wantedBy = [ "multi-user.target" ];
requires = [ "postgresql.service" ];
after = [ "network.target" "postgresql.service" ];
after = [ "network.target" "postgresql.service" "miniflux-dbsetup.service" ];
serviceConfig = {
ExecStart = "${pkgs.miniflux}/bin/miniflux";
ExecStartPre = "+${preStart}";
DynamicUser = true;
RuntimeDirectory = "miniflux";
RuntimeDirectoryMode = "0700";

View File

@ -804,7 +804,7 @@ in
ProtectControlGroups = true;
RestrictAddressFamilies = [ "AF_UNIX" "AF_INET" "AF_INET6" ];
LockPersonality = true;
MemoryDenyWriteExecute = !(builtins.any (mod: (mod.allowMemoryWriteExecute or false)) cfg.package.modules);
MemoryDenyWriteExecute = !(builtins.any (mod: (mod.allowMemoryWriteExecute or false)) (optionals (cfg.package ? modules) cfg.package.modules));
RestrictRealtime = true;
RestrictSUIDSGID = true;
PrivateMounts = true;

View File

@ -182,7 +182,18 @@ in rec {
# upstream unit.
for i in ${toString (mapAttrsToList (n: v: v.unit) units)}; do
fn=$(basename $i/*)
if [ -e $out/$fn ]; then
case $fn in
# if file name is a template specialization, use the template's name
*@?*.service)
# remove @foo.service and replace it with @.service
ofn="''${fn%@*.service}@.service"
;;
*)
ofn="$fn"
esac
if [ -e $out/$ofn ]; then
if [ "$(readlink -f $i/$fn)" = /dev/null ]; then
ln -sfn /dev/null $out/$fn
else

View File

@ -84,6 +84,7 @@ in
couchdb = handleTest ./couchdb.nix {};
cri-o = handleTestOn ["x86_64-linux"] ./cri-o.nix {};
custom-ca = handleTest ./custom-ca.nix {};
croc = handleTest ./croc.nix {};
deluge = handleTest ./deluge.nix {};
dhparams = handleTest ./dhparams.nix {};
dnscrypt-proxy2 = handleTestOn ["x86_64-linux"] ./dnscrypt-proxy2.nix {};

51
nixos/tests/croc.nix Normal file
View File

@ -0,0 +1,51 @@
import ./make-test-python.nix ({ pkgs, ... }:
let
client = { pkgs, ... }: {
environment.systemPackages = [ pkgs.croc ];
};
pass = pkgs.writeText "pass" "PassRelay";
in {
name = "croc";
meta = with pkgs.stdenv.lib.maintainers; {
maintainers = [ hax404 julm ];
};
nodes = {
relay = {
services.croc = {
enable = true;
pass = pass;
openFirewall = true;
};
};
sender = client;
receiver = client;
};
testScript = ''
start_all()
# wait until relay is up
relay.wait_for_unit("croc")
relay.wait_for_open_port(9009)
relay.wait_for_open_port(9010)
relay.wait_for_open_port(9011)
relay.wait_for_open_port(9012)
relay.wait_for_open_port(9013)
# generate testfiles and send them
sender.wait_for_unit("multi-user.target")
sender.execute("echo Hello World > testfile01.txt")
sender.execute("echo Hello Earth > testfile02.txt")
sender.execute(
"croc --pass ${pass} --relay relay send --code topSecret testfile01.txt testfile02.txt &"
)
# receive the testfiles and check them
receiver.succeed(
"croc --pass ${pass} --yes --relay relay topSecret"
)
assert "Hello World" in receiver.succeed("cat testfile01.txt")
assert "Hello Earth" in receiver.succeed("cat testfile02.txt")
'';
})

View File

@ -20,6 +20,13 @@ with lib;
services.miniflux.enable = true;
};
withoutSudo =
{ ... }:
{
services.miniflux.enable = true;
security.sudo.enable = false;
};
customized =
{ ... }:
{
@ -46,6 +53,13 @@ with lib;
"curl 'http://localhost:${toString defaultPort}/v1/me' -u '${defaultUsername}:${defaultPassword}' -H Content-Type:application/json | grep -q '\"is_admin\":true'"
)
withoutSudo.wait_for_unit("miniflux.service")
withoutSudo.wait_for_open_port(${toString defaultPort})
withoutSudo.succeed("curl --fail 'http://localhost:${toString defaultPort}/healthcheck' | grep -q OK")
withoutSudo.succeed(
"curl 'http://localhost:${toString defaultPort}/v1/me' -u '${defaultUsername}:${defaultPassword}' -H Content-Type:application/json | grep -q '\"is_admin\":true'"
)
customized.wait_for_unit("miniflux.service")
customized.wait_for_open_port(${toString port})
customized.succeed("curl --fail 'http://localhost:${toString port}/healthcheck' | grep -q OK")

View File

@ -233,6 +233,29 @@ let
'';
};
jitsi = {
exporterConfig = {
enable = true;
};
metricProvider = {
systemd.services.prometheus-jitsi-exporter.after = [ "jitsi-videobridge2.service" ];
services.jitsi-videobridge = {
enable = true;
apis = [ "colibri" "rest" ];
};
};
exporterTest = ''
wait_for_unit("jitsi-videobridge2.service")
wait_for_open_port(8080)
wait_for_unit("prometheus-jitsi-exporter.service")
wait_for_open_port(9700)
wait_until_succeeds(
'journalctl -eu prometheus-jitsi-exporter.service -o cat | grep -q "key=participants"'
)
succeed("curl -sSf 'localhost:9700/metrics' | grep -q 'jitsi_participants 0'")
'';
};
json = {
exporterConfig = {
enable = true;

View File

@ -17,6 +17,6 @@ in
''
machine.wait_for_unit("multi-user.target")
output = machine.succeed("spike -m64 $(which pk) $(which hello)")
assert output == "Hello, world!\n"
assert "Hello, world!" in output
'';
})

View File

@ -0,0 +1,41 @@
import ./make-test-python.nix {
name = "systemd-template-override";
machine = { pkgs, lib, ... }: let
touchTmp = pkgs.writeTextFile {
name = "touch-tmp@.service";
text = ''
[Service]
Type=oneshot
ExecStart=${pkgs.coreutils}/bin/touch /tmp/%I
'';
destination = "/etc/systemd/system/touch-tmp@.service";
};
in {
systemd.packages = [ touchTmp ];
systemd.services."touch-tmp@forbidden" = {
serviceConfig.ExecStart = [ "" ''
${pkgs.coreutils}/bin/true
''];
};
systemd.services."touch-tmp@intercept" = {
serviceConfig.ExecStart = [ "" ''
${pkgs.coreutils}/bin/touch /tmp/renamed
''];
};
};
testScript = ''
machine.wait_for_unit("default.target")
machine.succeed("systemctl start touch-tmp@normal")
machine.succeed("systemctl start touch-tmp@forbbidden")
machine.succeed("systemctl start touch-tmp@intercept")
machine.succeed("[ -e /tmp/normal ]")
machine.succeed("[ ! -e /tmp/forbidden ]")
machine.succeed("[ -e /tmp/renamed ]")
'';
}

View File

@ -1,4 +1,5 @@
{ lib
{ stdenv
, lib
, fetchFromGitLab
, cairo
, dbus
@ -7,17 +8,17 @@
, glib
, gtk3
, libhandy_0
, libsass
, meson
, ninja
, pango
, pkg-config
, python3
, rustc
, rustPlatform
, wrapGAppsHook
}:
rustPlatform.buildRustPackage rec {
stdenv.mkDerivation rec {
pname = "contrast";
version = "0.0.3";
@ -30,7 +31,11 @@ rustPlatform.buildRustPackage rec {
sha256 = "0kk3mv7a6y258109xvgicmsi0lw0rcs00gfyivl5hdz7qh47iccy";
};
cargoSha256 = "0vi8nv4hkhsgqgz36xacwkk5cxirg6li44nbmk3x7vx7c64hzybq";
cargoDeps = rustPlatform.fetchCargoTarball {
inherit src;
name = "${pname}-${version}";
hash = "sha256-ePkPiWGn79PHrMsSEql5OXZW5uRMdTP+w0/DCcm2KG4=";
};
nativeBuildInputs = [
desktop-file-utils
@ -39,6 +44,9 @@ rustPlatform.buildRustPackage rec {
ninja
pkg-config
python3
rustPlatform.rust.cargo
rustPlatform.cargoSetupHook
rustPlatform.rust.rustc
wrapGAppsHook
glib # for glib-compile-resources
];
@ -49,6 +57,7 @@ rustPlatform.buildRustPackage rec {
glib
gtk3
libhandy_0
libsass
pango
];
@ -56,12 +65,6 @@ rustPlatform.buildRustPackage rec {
patchShebangs build-aux/meson_post_install.py
'';
# Don't use buildRustPackage phases, only use it for rust deps setup
configurePhase = null;
buildPhase = null;
checkPhase = null;
installPhase = null;
meta = with lib; {
description = "Checks whether the contrast between two colors meet the WCAG requirements";
homepage = "https://gitlab.gnome.org/World/design/contrast";

View File

@ -0,0 +1,70 @@
{ lib
, stdenv
, fetchFromGitLab
, meson
, ninja
, pkg-config
, gnome3
, glib
, gtk3
, wayland
, wayland-protocols
, libxml2
, libxkbcommon
, rustPlatform
, feedbackd
, wrapGAppsHook
}:
stdenv.mkDerivation rec {
pname = "squeekboard";
version = "unstable-2021-03-09";
src = fetchFromGitLab {
domain = "source.puri.sm";
owner = "Librem5";
repo = pname;
rev = "bffd212e102bf71a94c599aac0359a8d30d19008";
sha256 = "1j10zhyb8wyrcbryfj6f3drn9b0l9x0l7hnhy2imnjbfbnwwm4w7";
};
cargoDeps = rustPlatform.fetchCargoTarball {
inherit src;
cargoUpdateHook = ''
cat Cargo.toml.in Cargo.deps > Cargo.toml
'';
name = "${pname}-${version}";
sha256 = "1qaqiaxqc4x2x5bd31na4c49vbjwrmz5clmgli7733dv55rxxias";
};
nativeBuildInputs = [
meson
ninja
pkg-config
glib
wayland
wrapGAppsHook
] ++ (with rustPlatform; [
cargoSetupHook
rust.cargo
rust.rustc
]);
buildInputs = [
gtk3
gnome3.gnome-desktop
wayland
wayland-protocols
libxml2
libxkbcommon
feedbackd
];
meta = with lib; {
description = "A virtual keyboard supporting Wayland";
homepage = "https://source.puri.sm/Librem5/squeekboard";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ artturin ];
platforms = platforms.linux;
};
}

View File

@ -1,4 +1,4 @@
{ mkDerivation, fetchgit, lib
{ mkDerivation, fetchurl, lib
, extra-cmake-modules, kdoctools
, qca-qt5, qjson, qtquickcontrols2, qtscript, qtwebengine
, karchive, kcmutils, kconfig, kdnssd, kguiaddons, kinit, kirigami2, knewstuff, knotifyconfig, ktexteditor, kwindowsystem
@ -7,17 +7,12 @@
}:
mkDerivation rec {
pname = "amarok-unstable";
version = "2020-06-12";
pname = "amarok";
version = "2.9.71";
src = fetchgit {
# master has the Qt5 version as of April 2018 but a formal release has not
# yet been made so change this back to the proper upstream when such a
# release is out
url = "https://invent.kde.org/multimedia/amarok.git";
# url = "mirror://kde/stable/${pname}/${version}/src/${name}.tar.xz";
rev = "fece39b0e81db310b6a6e08f93d83b0d498cd02b";
sha256 = "12casnq6w5yp2jlvnr466pjpkn0vriry8jzfq2qkjl564y0vhy9x";
src = fetchurl {
url = "mirror://kde/unstable/${pname}/${version}/${pname}-${version}.tar.xz";
sha256 = "0kz8wixjmy4yxq2gk11ybswryxb6alfymd3bzcar9xinscllhh3a";
};
nativeBuildInputs = [ extra-cmake-modules kdoctools ];
@ -35,7 +30,7 @@ mkDerivation rec {
meta = with lib; {
homepage = "https://amarok.kde.org";
description = "A powerful music player with an intuitive interface";
license = licenses.gpl2;
license = licenses.gpl2Plus;
maintainers = with maintainers; [ peterhoeg ];
};
}

View File

@ -1,12 +1,12 @@
{ appimageTools, lib, fetchurl }:
let
pname = "apple-music-electron";
version = "1.5.2";
version = "1.5.5";
name = "Apple.Music-${version}";
src = fetchurl {
url = "https://github.com/iiFir3z/Apple-Music-Electron/releases/download/${version}/${name}.AppImage";
sha256 = "1jl0wgwy6ajmfkzygwb7cm9m49nkhp3x6vd8kwmh6ccs3jy4ayp5";
url = "https://github.com/cryptofyre/Apple-Music-Electron/releases/download/v${version}/${name}.AppImage";
sha256 = "1gb6j3nvam9fcpsgiv56jccg9a4y14vzsyw11h3hckaigy90knpx";
};
appimageContents = appimageTools.extract { inherit name src; };

View File

@ -11,14 +11,14 @@
stdenv.mkDerivation rec {
pname = "callaudiod";
version = "0.0.4";
version = "0.1.0";
src = fetchFromGitLab {
domain = "gitlab.com";
owner = "mobian1";
repo = pname;
rev = version;
sha256 = "07k7xp5a9c4d4lq7amaj6cg6b3gsd77x9wvf7nzcf4vpaph4yiyj";
sha256 = "087589z45xvldn2m1g79y0xbwzylwkjmfk83s5xjixyq0wqmfppd";
};
nativeBuildInputs = [

View File

@ -1,11 +1,10 @@
{ lib
{ stdenv
, lib
, rustPlatform
, fetchFromGitLab
, meson
, ninja
, gettext
, cargo
, rustc
, python3
, pkg-config
, glib
@ -18,9 +17,9 @@
, wrapGAppsHook
}:
rustPlatform.buildRustPackage rec {
version = "0.4.8";
stdenv.mkDerivation rec {
pname = "gnome-podcasts";
version = "0.4.8";
src = fetchFromGitLab {
domain = "gitlab.gnome.org";
@ -30,16 +29,21 @@ rustPlatform.buildRustPackage rec {
sha256 = "0y2332zjq7vf1v38wzwz98fs19vpzy9kl7y0xbdzqr303l59hjb1";
};
cargoSha256 = "1jbii9k4bkrivdk1ffr6556q1sgk9j4jbzwnn8vbxmksyl1x328q";
cargoDeps = rustPlatform.fetchCargoTarball {
inherit src;
name = "${pname}-${version}";
hash = "sha256-GInRA/V61r42spb/JYlM8+mATSkmOxdm2zHPRWaKcck=";
};
nativeBuildInputs = [
meson
ninja
pkg-config
gettext
cargo
rustc
python3
rustPlatform.rust.cargo
rustPlatform.cargoSetupHook
rustPlatform.rust.rustc
wrapGAppsHook
glib
];
@ -57,12 +61,6 @@ rustPlatform.buildRustPackage rec {
gst_all_1.gst-plugins-good
];
# use Meson/Ninja phases
configurePhase = null;
buildPhase = null;
checkPhase = null;
installPhase = null;
# tests require network
doCheck = false;
@ -74,7 +72,7 @@ rustPlatform.buildRustPackage rec {
meta = with lib; {
description = "Listen to your favorite podcasts";
homepage = "https://wiki.gnome.org/Apps/Podcasts";
license = licenses.gpl3;
license = licenses.gpl3Plus;
maintainers = teams.gnome.members;
platforms = platforms.unix;
};

View File

@ -3,13 +3,13 @@
stdenv.mkDerivation rec {
pname = "MIDIVisualizer";
version = "6.2";
version = "6.3";
src = fetchFromGitHub {
owner = "kosua20";
repo = pname;
rev = "v${version}";
sha256 = "sha256-t7DRPV0FSg6v81GzHLK2O++sfjr2aFT+xg3+wFd0UFg=";
sha256 = "sha256-U/YmxHD6e13I++aW+z1Y5xtZ+MN0KUJLSskrF4+UgTE=";
};
nativeBuildInputs = [ cmake pkg-config makeWrapper];

View File

@ -8,13 +8,13 @@
mkDerivation rec {
pname = "musescore";
version = "3.6.1";
version = "3.6.2";
src = fetchFromGitHub {
owner = "musescore";
repo = "MuseScore";
rev = "v${version}";
sha256 = "sha256-21ZI5rsc05ZWEyM0LeFr+212YViLYveZZBvVpskh8iA=";
sha256 = "sha256-GBGAD/qdOhoNfDzI+O0EiKgeb86GFJxpci35T6tZ+2s=";
};
patches = [

View File

@ -2,13 +2,13 @@
let
pname = "plexamp";
version = "3.4.3";
version = "3.4.4";
name = "${pname}-${version}";
src = fetchurl {
url = "https://plexamp.plex.tv/plexamp.plex.tv/desktop/Plexamp-${version}.AppImage";
name="${pname}-${version}.AppImage";
sha256 = "1rzhrc5yr5f6bxydgmcjwrg85vkbkn6lqj72512lyhq5gg7zmm1w";
sha256 = "1iz6qi12ljafb49l73rba5rwi5sdbd8ck5h2r6jiy260lgr2iiyk";
};
appimageContents = appimageTools.extractType2 {
@ -32,7 +32,7 @@ in appimageTools.wrapType2 {
meta = with lib; {
description = "A beautiful Plex music player for audiophiles, curators, and hipsters";
homepage = "https://plexamp.com/";
changelog = "https://forums.plex.tv/t/plexamp-release-notes/221280/25";
changelog = "https://forums.plex.tv/t/plexamp-release-notes/221280/26";
license = licenses.unfree;
maintainers = with maintainers; [ killercup synthetica ];
platforms = [ "x86_64-linux" ];

View File

@ -13,13 +13,13 @@
mkDerivation rec {
pname = "projectm";
version = "3.1.11";
version = "3.1.12";
src = fetchFromGitHub {
owner = "projectM-visualizer";
repo = "projectM";
rev = "v${version}";
sha256 = "sha256-0aIaT+pzwPjI1nSo6C5SrHBXcrxIpSi6TFV2mgK5GvU=";
sha256 = "sha256-oEfOx93JyR94II5NkUCvMwqxuV7ktpOHZ8PNMLCiqDw=";
};
nativeBuildInputs = [

View File

@ -29,11 +29,11 @@
# handle that.
mkDerivation rec {
name = "qmmp-1.4.2";
name = "qmmp-1.4.4";
src = fetchurl {
url = "http://qmmp.ylsoftware.com/files/${name}.tar.bz2";
sha256 = "1kvzw0n90crg3dgy8834qrjv0zb3ia5cny7virax9ax73y653jfa";
sha256 = "sha256-sZRZVhCf2ceETuV4AULA0kVkuIMn3C+aYdKThqvPnVQ=";
};
nativeBuildInputs = [ cmake pkg-config ];

View File

@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
}
else
releasePath
else throw "Platform is not supported by Renoise";
else throw "Platform is not supported. Use instalation native to your platform https://www.renoise.com/";
buildInputs = [ alsaLib libjack2 libX11 libXcursor libXext libXrandr ];
@ -47,6 +47,16 @@ stdenv.mkDerivation rec {
mkdir $out/bin
ln -s $out/renoise $out/bin/renoise
# Desktop item
mkdir -p $out/share/applications
cp -r Installer/renoise.desktop $out/share/applications/renoise.desktop
# Desktop item icons
mkdir -p $out/share/icons/hicolor/{48x48,64x64,128x128}/apps
cp Installer/renoise-48.png $out/share/icons/hicolor/48x48/apps/renoise.png
cp Installer/renoise-64.png $out/share/icons/hicolor/64x64/apps/renoise.png
cp Installer/renoise-128.png $out/share/icons/hicolor/128x128/apps/renoise.png
'';
postFixup = ''
@ -61,6 +71,9 @@ stdenv.mkDerivation rec {
--set-rpath $out/lib \
$path
done
substituteInPlace $out/share/applications/renoise.desktop \
--replace Exec=renoise Exec=$out/bin/renoise
'';
meta = {

View File

@ -3,12 +3,12 @@
, liblo, libsamplerate, libsndfile, lirc ? null, lrdf, qtbase }:
stdenv.mkDerivation (rec {
version = "20.06";
version = "20.12";
pname = "rosegarden";
src = fetchurl {
url = "mirror://sourceforge/rosegarden/${pname}-${version}.tar.bz2";
sha256 = "1i9x9rkqwwdrk77xl5ra8i48cjirbc7fbisnj0nnclccwaq0wk6r";
sha256 = "sha256-iGaEr8WFipV4I00fhFGI2xMBFPf784IIxNXs2hUTHFs=";
};
patchPhase = ''

View File

@ -1,10 +1,11 @@
{ lib
{ stdenv
, lib
, fetchFromGitLab
, cargo
, dbus
, desktop-file-utils
, gdk-pixbuf
, gettext
, gitMinimal
, glib
, gst_all_1
, gtk3
@ -14,13 +15,12 @@
, openssl
, pkg-config
, python3
, rustc
, rustPlatform
, sqlite
, wrapGAppsHook
}:
rustPlatform.buildRustPackage rec {
stdenv.mkDerivation rec {
pname = "shortwave";
version = "1.1.1";
@ -32,18 +32,24 @@ rustPlatform.buildRustPackage rec {
sha256 = "1vlhp2ss06j41simjrrjg38alp85jddhqyvccy6bhfzm0gzynwld";
};
cargoSha256 = "181699rlpr5dszc18wg0kbss3gfskxaz9lpxpgsc4yfb6ip89qnk";
cargoDeps = rustPlatform.fetchCargoTarball {
inherit src;
name = "${pname}-${version}";
hash = "sha256-0+KEbjTLecL0u/3S9FWf2r2h9ZrgcRTY163kS3NKJqA=";
};
nativeBuildInputs = [
cargo
desktop-file-utils
gettext
gitMinimal
glib # for glib-compile-schemas
meson
ninja
pkg-config
python3
rustc
rustPlatform.rust.cargo
rustPlatform.cargoSetupHook
rustPlatform.rust.rustc
wrapGAppsHook
];
@ -62,12 +68,6 @@ rustPlatform.buildRustPackage rec {
gst-plugins-bad
]);
# Don't use buildRustPackage phases, only use it for rust deps setup
configurePhase = null;
buildPhase = null;
checkPhase = null;
installPhase = null;
postPatch = ''
patchShebangs build-aux/meson/postinstall.py
'';

View File

@ -35,13 +35,13 @@
mkDerivation rec {
pname = "strawberry";
version = "0.8.5";
version = "0.9.1";
src = fetchFromGitHub {
owner = "jonaski";
repo = pname;
rev = version;
sha256 = "sha256-+ZQ80J94Teqt4Gy6fw/pS7FwILK/TPehtJDy72Bdy1E=";
sha256 = "sha256-1aXHMvjLK5WiE0mut/a3ynuMfNHgPbUzAZdmaVJBDXQ=";
};
buildInputs = [

View File

@ -0,0 +1,13 @@
diff --git a/src/borg/utils.rs b/src/borg/utils.rs
index 4e30913..30d7d6f 100644
--- a/src/borg/utils.rs
+++ b/src/borg/utils.rs
@@ -223,7 +223,7 @@ impl BorgCall {
}
pub fn cmd(&self) -> Command {
- let mut cmd = Command::new("borg");
+ let mut cmd = Command::new("@borg@");
cmd.args(self.args())
.stderr(Stdio::piped())

View File

@ -0,0 +1,77 @@
{ lib
, stdenv
, fetchFromGitLab
, rustPlatform
, substituteAll
, desktop-file-utils
, meson
, ninja
, pkg-config
, python3
, wrapGAppsHook
, borgbackup
, dbus
, gdk-pixbuf
, glib
, gtk3
, libhandy
}:
stdenv.mkDerivation rec {
pname = "pika-backup";
version = "0.2.1";
src = fetchFromGitLab {
domain = "gitlab.gnome.org";
owner = "World";
repo = "pika-backup";
rev = "v${version}";
sha256 = "0fm6vwpw0pa98v2yn8p3818rrlv9lk3pmgnal1b2kh52im5ll7m8";
};
cargoDeps = rustPlatform.fetchCargoTarball {
inherit src;
name = "${pname}-${version}";
sha256 = "1f5s6a0wjrs2spsicirhbvb5xlz9iflwsaqchij9k02hfcsr308y";
};
patches = [
(substituteAll {
src = ./borg-path.patch;
borg = "${borgbackup}/bin/borg";
})
];
postPatch = ''
patchShebangs build-aux
'';
nativeBuildInputs = [
desktop-file-utils
meson
ninja
pkg-config
python3
wrapGAppsHook
] ++ (with rustPlatform; [
cargoSetupHook
rust.cargo
rust.rustc
]);
buildInputs = [
dbus
gdk-pixbuf
glib
gtk3
libhandy
];
meta = with lib; {
description = "Simple backups based on borg";
homepage = "https://wiki.gnome.org/Apps/PikaBackup";
changelog = "https://gitlab.gnome.org/World/pika-backup/-/blob/v${version}/CHANGELOG.md";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ dotlambda ];
};
}

View File

@ -2,12 +2,12 @@
let
pname = "ledger-live-desktop";
version = "2.23.0";
version = "2.24.0";
name = "${pname}-${version}";
src = fetchurl {
url = "https://github.com/LedgerHQ/${pname}/releases/download/v${version}/${pname}-${version}-linux-x86_64.AppImage";
sha256 = "0id9zbpfq3knv8qwkhplbl9pwrvdkn212pafwh4vpjbbp4yimhq5";
sha256 = "1xdqj825vwh3kg35v7568zr1jhvldb4wcazzgzcaawkr4qzfdb2n";
};
appimageContents = appimageTools.extractType2 {

View File

@ -1,23 +1,25 @@
{ rust, rustPlatform, stdenv, lib, fetchFromGitHub, autoreconfHook, makeWrapper
, cargo, pkg-config
, bash, curl, coreutils, boost17x, db62, libsodium, libevent, utf8cpp, util-linux
, fetchpatch, cargo, pkg-config, curl, coreutils, boost174, db62, hexdump
, libsodium, libevent, utf8cpp, util-linux, withWallet ? true, withDaemon ? true
, withUtils ? true
}:
rustPlatform.buildRustPackage rec {
rustPlatform.buildRustPackage.override { stdenv = stdenv; } rec {
pname = "zcash";
version = "4.1.1";
version = "4.3.0";
src = fetchFromGitHub {
owner = "zcash";
repo = "zcash";
rev = "v${version}";
sha256 = "185zrw276g545np0niw5hlhlppkjbf5a1r4rwhnbaimdjdii2dil";
sha256 = "00pn1jw8j90y7i8nc92b51znz4gczphvdzbkbcjx63cf6vk7v4ks";
};
cargoSha256 = "0qxr6asf8zsya0f1ri39z2cnfpjk96hgwjchz2c7j87vibbvg6dc";
cargoSha256 = "1rl9sjbvpfrv1mlyb04vw1935qx0kz9cs177xl7izdva1ixk9blr";
nativeBuildInputs = [ autoreconfHook cargo makeWrapper pkg-config ];
buildInputs = [ bash boost17x db62 libevent libsodium utf8cpp ];
nativeBuildInputs = [ autoreconfHook cargo hexdump makeWrapper pkg-config ];
buildInputs = [ boost174 libevent libsodium utf8cpp ]
++ lib.optional withWallet db62;
# Use the stdenv default phases (./configure; make) instead of the
# ones from buildRustPackage.
@ -26,6 +28,14 @@ rustPlatform.buildRustPackage rec {
checkPhase = "checkPhase";
installPhase = "installPhase";
patches = [
# See https://github.com/zcash/zcash/pull/5015
(fetchpatch {
url = "https://github.com/zcash/zcash/commit/a0ac27ec6ed434a233c7ad2468258f6e6e7e9688.patch";
sha256 = "0pmx1spql9p8vvpjgw7qf3qy46f4mh9ni16bq4ss1xz1z9zgjc4k";
})
];
postPatch = ''
# Have to do this here instead of in preConfigure because
# cargoDepsCopy gets unset after postPatch.
@ -34,10 +44,12 @@ rustPlatform.buildRustPackage rec {
configureFlags = [
"--disable-tests"
"--with-boost-libdir=${lib.getLib boost17x}/lib"
"--with-boost-libdir=${lib.getLib boost174}/lib"
"CXXFLAGS=-I${lib.getDev utf8cpp}/include/utf8cpp"
"RUST_TARGET=${rust.toRustTargetSpec stdenv.hostPlatform}"
];
] ++ lib.optional (!withWallet) "--disable-wallet"
++ lib.optional (!withDaemon) "--without-daemon"
++ lib.optional (!withUtils) "--without-utils";
enableParallelBuilding = true;

View File

@ -2,13 +2,13 @@
stdenv.mkDerivation rec {
pname = "lightdm-mini-greeter";
version = "0.5.0";
version = "0.5.1";
src = fetchFromGitHub {
owner = "prikhi";
repo = "lightdm-mini-greeter";
rev = version;
sha256 = "sha256-cVOnd3k+9hFQjROiwPpxZcCxD2NiH1eclJHF88eV6BM=";
sha256 = "sha256-Pm7ExfusFIPktX2C4UE07qgOVhcWhVxnaD3QARpmu7Y=";
};
nativeBuildInputs = [ autoreconfHook pkg-config wrapGAppsHook ];

View File

@ -636,16 +636,16 @@
license = lib.licenses.free;
};
}) {};
counsel = callPackage ({ elpaBuild, emacs, fetchurl, lib, swiper }:
counsel = callPackage ({ elpaBuild, emacs, fetchurl, ivy, lib, swiper }:
elpaBuild {
pname = "counsel";
ename = "counsel";
version = "0.13.1";
version = "0.13.4";
src = fetchurl {
url = "https://elpa.gnu.org/packages/counsel-0.13.1.tar";
sha256 = "0m4dmhj33cxaapn9lf7bj1r680gi2wd7cw9xlssjklzvic29a6db";
url = "https://elpa.gnu.org/packages/counsel-0.13.4.tar";
sha256 = "094zfapfn1l8wjf3djkipk0d9nks0g77sbk107pfsbr3skkzh031";
};
packageRequires = [ emacs swiper ];
packageRequires = [ emacs ivy swiper ];
meta = {
homepage = "https://elpa.gnu.org/packages/counsel.html";
license = lib.licenses.free;
@ -1295,10 +1295,10 @@
elpaBuild {
pname = "flymake";
ename = "flymake";
version = "1.0.9";
version = "1.1.1";
src = fetchurl {
url = "https://elpa.gnu.org/packages/flymake-1.0.9.el";
sha256 = "0xm1crhjcs14iqkf481igbf40wj2ib3hjzinw1gn8w1n0462ymp6";
url = "https://elpa.gnu.org/packages/flymake-1.1.1.tar";
sha256 = "0lk2v34b59b24j3hsmi8d0v7fgpwcipv7ka9i88cdgjmjjmzgz5q";
};
packageRequires = [ eldoc emacs ];
meta = {
@ -1714,10 +1714,10 @@
elpaBuild {
pname = "ivy";
ename = "ivy";
version = "0.13.1";
version = "0.13.4";
src = fetchurl {
url = "https://elpa.gnu.org/packages/ivy-0.13.1.tar";
sha256 = "0n0ixhdykbdpis4krkqq6zncbby28p34742q96n0l91w0p19slcx";
url = "https://elpa.gnu.org/packages/ivy-0.13.4.tar";
sha256 = "0qpza1c45mr8fcpnm32cck4v22fnzz1yb7kww05rzgq1k9iivx5v";
};
packageRequires = [ emacs ];
meta = {
@ -1725,6 +1725,21 @@
license = lib.licenses.free;
};
}) {};
ivy-avy = callPackage ({ avy, elpaBuild, emacs, fetchurl, ivy, lib }:
elpaBuild {
pname = "ivy-avy";
ename = "ivy-avy";
version = "0.13.4";
src = fetchurl {
url = "https://elpa.gnu.org/packages/ivy-avy-0.13.4.tar";
sha256 = "1q5caxm4rnh4jy5n88dhkdbx1afsshmfki5dl8xsqbdb3y0zq7yi";
};
packageRequires = [ avy emacs ivy ];
meta = {
homepage = "https://elpa.gnu.org/packages/ivy-avy.html";
license = lib.licenses.free;
};
}) {};
ivy-explorer = callPackage ({ elpaBuild, emacs, fetchurl, ivy, lib }:
elpaBuild {
pname = "ivy-explorer";
@ -1740,6 +1755,21 @@
license = lib.licenses.free;
};
}) {};
ivy-hydra = callPackage ({ elpaBuild, emacs, fetchurl, hydra, ivy, lib }:
elpaBuild {
pname = "ivy-hydra";
ename = "ivy-hydra";
version = "0.13.5";
src = fetchurl {
url = "https://elpa.gnu.org/packages/ivy-hydra-0.13.5.tar";
sha256 = "06rln9bnq5hli5rqlm47fb68b8llpqrmzwqqv4rn7mx3854i9a5x";
};
packageRequires = [ emacs hydra ivy ];
meta = {
homepage = "https://elpa.gnu.org/packages/ivy-hydra.html";
license = lib.licenses.free;
};
}) {};
ivy-posframe = callPackage ({ elpaBuild
, emacs
, fetchurl
@ -2019,10 +2049,10 @@
elpaBuild {
pname = "map";
ename = "map";
version = "2.1";
version = "3.0";
src = fetchurl {
url = "https://elpa.gnu.org/packages/map-2.1.el";
sha256 = "0ydz5w1n4vwhhzxxj003s7jv8n1wjijwfryk5z93bwhnr0cak0i0";
url = "https://elpa.gnu.org/packages/map-3.0.tar";
sha256 = "00wf8lgh1b1i5l838y6di8194rf5gf5djklkhmxj1nlikz66j2ls";
};
packageRequires = [ emacs ];
meta = {
@ -2384,6 +2414,21 @@
license = lib.licenses.free;
};
}) {};
ob-haxe = callPackage ({ elpaBuild, fetchurl, lib }:
elpaBuild {
pname = "ob-haxe";
ename = "ob-haxe";
version = "1.0";
src = fetchurl {
url = "https://elpa.gnu.org/packages/ob-haxe-1.0.tar";
sha256 = "1x19b3aappv4d3mvpf01r505l1sfndbzbpr5sbid411g9g9k3rwr";
};
packageRequires = [];
meta = {
homepage = "https://elpa.gnu.org/packages/ob-haxe.html";
license = lib.licenses.free;
};
}) {};
objed = callPackage ({ cl-lib ? null, elpaBuild, emacs, fetchurl, lib }:
elpaBuild {
pname = "objed";
@ -2613,10 +2658,10 @@
elpaBuild {
pname = "phps-mode";
ename = "phps-mode";
version = "0.4.1";
version = "0.4.2";
src = fetchurl {
url = "https://elpa.gnu.org/packages/phps-mode-0.4.1.tar";
sha256 = "11d1gsvvj26h9d7a28v87b022vbi3syzngn1x9v1d2g55iv01x38";
url = "https://elpa.gnu.org/packages/phps-mode-0.4.2.tar";
sha256 = "0ngh54jdh56563crgvf0r4gd6zfvhbkxs9prp12930gav8mdm3sh";
};
packageRequires = [ emacs ];
meta = {
@ -2658,10 +2703,10 @@
elpaBuild {
pname = "posframe";
ename = "posframe";
version = "0.8.5";
version = "0.8.8";
src = fetchurl {
url = "https://elpa.gnu.org/packages/posframe-0.8.5.tar";
sha256 = "0rls0rsj9clx4wd0gbdi5jzwyslparlf7phib649637gq6gs90ds";
url = "https://elpa.gnu.org/packages/posframe-0.8.8.tar";
sha256 = "1ij6brzcxv9viz37qafcinlfx5l20w8x8s6786r1rsda5n1xsmvd";
};
packageRequires = [ emacs ];
meta = {
@ -2673,10 +2718,10 @@
elpaBuild {
pname = "project";
ename = "project";
version = "0.5.3";
version = "0.5.4";
src = fetchurl {
url = "https://elpa.gnu.org/packages/project-0.5.3.el";
sha256 = "0cpf69m41h8gfcqnq72h11925zdk35b7hw7bfy83xm83xwp12rxx";
url = "https://elpa.gnu.org/packages/project-0.5.4.tar";
sha256 = "0arjvhzzcf8b80w94yvpgfdlhsjwf5jk1r7vcai5a4dg3bi9cxyb";
};
packageRequires = [ emacs xref ];
meta = {
@ -2718,10 +2763,10 @@
elpaBuild {
pname = "pyim";
ename = "pyim";
version = "3.2";
version = "3.5";
src = fetchurl {
url = "https://elpa.gnu.org/packages/pyim-3.2.tar";
sha256 = "1rr9mq334dqf7mx1ii7910zkigw7chl63iws4sw0qsn014kjlb0a";
url = "https://elpa.gnu.org/packages/pyim-3.5.tar";
sha256 = "0593ds3zbmpd6235b8v33f3cb3sn8cwr6arb6zbf1ba97nawjxqs";
};
packageRequires = [ async emacs xr ];
meta = {
@ -2729,6 +2774,21 @@
license = lib.licenses.free;
};
}) {};
pyim-basedict = callPackage ({ elpaBuild, fetchurl, lib }:
elpaBuild {
pname = "pyim-basedict";
ename = "pyim-basedict";
version = "0.5.0";
src = fetchurl {
url = "https://elpa.gnu.org/packages/pyim-basedict-0.5.0.tar";
sha256 = "0h946wsnbbii32kl2kpv0k1kq118ymvpd5q1mphfsf126dz9sv78";
};
packageRequires = [];
meta = {
homepage = "https://elpa.gnu.org/packages/pyim-basedict.html";
license = lib.licenses.free;
};
}) {};
python = callPackage ({ cl-lib ? null, elpaBuild, emacs, fetchurl, lib }:
elpaBuild {
pname = "python";
@ -3073,10 +3133,10 @@
elpaBuild {
pname = "rt-liberation";
ename = "rt-liberation";
version = "2.2";
version = "2.3";
src = fetchurl {
url = "https://elpa.gnu.org/packages/rt-liberation-2.2.tar";
sha256 = "01nkkrgygq5p5s0pfxpcn794jr6ln65ad809v9mvzz7972xw625s";
url = "https://elpa.gnu.org/packages/rt-liberation-2.3.tar";
sha256 = "0sqq5zfzx9dir6d6zvg7vj5v629b508bbxsp7j0sp21rr4fw9nn0";
};
packageRequires = [];
meta = {
@ -3469,10 +3529,10 @@
elpaBuild {
pname = "swiper";
ename = "swiper";
version = "0.13.1";
version = "0.13.4";
src = fetchurl {
url = "https://elpa.gnu.org/packages/swiper-0.13.1.tar";
sha256 = "0k39pa89y0bfvdfqg3nc5pjq5mwxwimc4ma3z28vaf14zd38x9m1";
url = "https://elpa.gnu.org/packages/swiper-0.13.4.tar";
sha256 = "197pq2cvvskib87aky907wv2am55vilr7y5dabmmm07a8vr9py0v";
};
packageRequires = [ emacs ivy ];
meta = {
@ -3799,10 +3859,10 @@
elpaBuild {
pname = "verilog-mode";
ename = "verilog-mode";
version = "2020.6.27.14326051";
version = "2021.2.2.263931197";
src = fetchurl {
url = "https://elpa.gnu.org/packages/verilog-mode-2020.6.27.14326051.el";
sha256 = "194gn8cj01jb9xcl0qq3gq6mzxfdyn459ysb35fnib7pcnafm188";
url = "https://elpa.gnu.org/packages/verilog-mode-2021.2.2.263931197.tar";
sha256 = "0rizadyzrsprc3mw3h2ag4760wapx5gxzsr11rgrllwzzqwin1ks";
};
packageRequires = [];
meta = {

View File

@ -4,10 +4,10 @@
elpaBuild {
pname = "org";
ename = "org";
version = "20210301";
version = "20210308";
src = fetchurl {
url = "https://orgmode.org/elpa/org-20210301.tar";
sha256 = "0930km35lvbw89ifrqmcv96fjmp4fi12yv3spn51q27sfsmzqsrj";
url = "https://orgmode.org/elpa/org-20210308.tar";
sha256 = "1i5zga615inn5s547329g6paqbzcbhyj9hxv14c0c1m9bhra5bjs";
};
packageRequires = [];
meta = {
@ -19,10 +19,10 @@
elpaBuild {
pname = "org-plus-contrib";
ename = "org-plus-contrib";
version = "20210301";
version = "20210308";
src = fetchurl {
url = "https://orgmode.org/elpa/org-plus-contrib-20210301.tar";
sha256 = "11mwar5x848iwc1cdssr3vyx0amji840x6f0dmjpigngpcnj02m8";
url = "https://orgmode.org/elpa/org-plus-contrib-20210308.tar";
sha256 = "1agbxhjkkmf4p8p8mwc6sv77ij22dr5fyhkpsnljvzkidiarfldf";
};
packageRequires = [];
meta = {

View File

@ -2,16 +2,16 @@
buildGoModule rec {
pname = "glow";
version = "1.3.0";
version = "1.4.0";
src = fetchFromGitHub {
owner = "charmbracelet";
repo = "glow";
rev = "v${version}";
sha256 = "1y5cdqmyc2z2qk74l0r2c4mnw0jfibrf2ry7qcnmh96nhalq9m7j";
sha256 = "13ip29yxjc2fhsk12m6hj6mswrgc9a4m8gf0hiffd1nh5313mqxi";
};
vendorSha256 = "11x6hshbqg1a39a1hwpfivgrhyk7ykw2aqylira3dqv039b1f639";
vendorSha256 = "0i49b1yq9x5n59k29yacxyif928r0w7hl6azfvr5k3rssg0y4l7f";
doCheck = false;

View File

@ -337,7 +337,7 @@ in
name = "mps-${version}";
version = "2020.3.1"; /* updated by script */
description = "Create your own domain-specific language";
license = lib.licenses.unfree;
license = lib.licenses.asl20;
src = fetchurl {
url = "https://download.jetbrains.com/mps/2020.3/MPS-${version}.tar.gz";
sha256 = "0qvl724mm53rxfhafl6561rhpwppcadmwr9sh0hpsfgsprh2xznv"; /* updated by script */

View File

@ -1,5 +1,5 @@
#!/usr/bin/env nix-shell
#!nix-shell -i perl -p perl perlPackages.LWPProtocolhttps perlPackages.FileSlurp
#!nix-shell -i perl -p perl perlPackages.LWPProtocolHttps perlPackages.FileSlurp
use strict;
use List::Util qw(reduce);

View File

@ -0,0 +1,46 @@
# Deprecated aliases - for backward compatibility
lib: overriden:
with overriden;
let
# Removing recurseForDerivation prevents derivations of aliased attribute
# set to appear while listing all the packages available.
removeRecurseForDerivations = alias: with lib;
if alias.recurseForDerivations or false then
removeAttrs alias ["recurseForDerivations"]
else alias;
# Disabling distribution prevents top-level aliases for non-recursed package
# sets from building on Hydra.
removeDistribute = alias: with lib;
if isDerivation alias then
dontDistribute alias
else alias;
# Make sure that we are not shadowing something from
# all-packages.nix.
checkInPkgs = n: alias: if builtins.hasAttr n overriden
then throw "Alias ${n} is still in kakounePlugins"
else alias;
mapAliases = aliases:
lib.mapAttrs (n: alias: removeDistribute
(removeRecurseForDerivations
(checkInPkgs n alias)))
aliases;
deprecations = lib.mapAttrs (old: info:
throw "${old} was renamed to ${info.new} on ${info.date}. Please update to ${info.new}."
) (builtins.fromJSON (builtins.readFile ./deprecated.json));
in
mapAliases ({
kak-auto-pairs = auto-pairs-kak; # backwards compat, added 2021-01-04
kak-buffers = kakoune-buffers; # backwards compat, added 2021-01-04
kak-fzf = fzf-kak; # backwards compat, added 2021-01-04
kak-powerline = powerline-kak; # backwards compat, added 2021-01-04
kak-prelude = prelude-kak; # backwards compat, added 2021-01-04
kak-vertical-selection = kakoune-vertical-selection; # backwards compat, added 2021-01-04
} // deprecations)

View File

@ -0,0 +1,33 @@
{ lib, stdenv, rtpPath ? "share/kak/autoload/plugins" }:
rec {
buildKakounePlugin = attrs@{
name ? "${attrs.pname}-${attrs.version}",
namePrefix ? "kakplugin-",
src,
unpackPhase ? "",
configurePhase ? "",
buildPhase ? "",
preInstall ? "",
postInstall ? "",
path ? lib.getName name,
...
}:
stdenv.mkDerivation ((builtins.removeAttrs attrs [ "namePrefix" "path" ]) // {
name = namePrefix + name;
installPhase = ''
runHook preInstall
target=$out/${rtpPath}/${path}
mkdir -p $out/${rtpPath}
cp -r . $target
runHook postInstall
'';
});
buildKakounePluginFrom2Nix = attrs: buildKakounePlugin ({
buildPhase = ":";
configurePhase = ":";
} // attrs);
}

View File

@ -1,27 +0,0 @@
{ lib, stdenv, fetchFromGitLab }:
stdenv.mkDerivation {
name = "case.kak";
version = "unstable-2020-04-06";
src = fetchFromGitLab {
owner = "FlyingWombat";
repo = "case.kak";
rev = "6f1511820aa3abfa118e0f856118adc8113e2185";
sha256 = "002njrlwgakqgp74wivbppr9qyn57dn4n5bxkr6k6nglk9qndwdp";
};
installPhase = ''
mkdir -p $out/share/kak/autoload/plugins
cp -r rc/case.kak $out/share/kak/autoload/plugins
'';
meta = with lib; {
description = "Case convention conversion for Kakoune";
homepage = "https://gitlab.com/FlyingWombat/case.kak";
license = licenses.unlicense;
maintainers = with maintainers; [ eraserhd ];
platform = platforms.all;
};
}

View File

@ -1,17 +1,25 @@
{ pkgs, parinfer-rust, rep, kak-lsp }:
{ callPackage, config, kakouneUtils, lib }:
{
inherit parinfer-rust rep kak-lsp;
let
case-kak = pkgs.callPackage ./case.kak.nix { };
kak-ansi = pkgs.callPackage ./kak-ansi.nix { };
kak-auto-pairs = pkgs.callPackage ./kak-auto-pairs.nix { };
kak-buffers = pkgs.callPackage ./kak-buffers.nix { };
kak-fzf = pkgs.callPackage ./kak-fzf.nix { };
kak-plumb = pkgs.callPackage ./kak-plumb.nix { };
kak-powerline = pkgs.callPackage ./kak-powerline.nix { };
kak-prelude = pkgs.callPackage ./kak-prelude.nix { };
kak-vertical-selection = pkgs.callPackage ./kak-vertical-selection.nix { };
openscad-kak = pkgs.callPackage ./openscad.kak.nix { };
quickscope-kak = pkgs.callPackage ./quickscope.kak.nix { };
}
inherit (kakouneUtils.override {}) buildKakounePluginFrom2Nix;
plugins = callPackage ./generated.nix {
inherit buildKakounePluginFrom2Nix overrides;
};
# TL;DR
# * Add your plugin to ./kakoune-plugin-names
# * run ./update.py
#
# If additional modifications to the build process are required,
# add to ./overrides.nix.
overrides = callPackage ./overrides.nix {
inherit buildKakounePluginFrom2Nix;
};
aliases = lib.optionalAttrs (config.allowAliases or true) (import ./aliases.nix lib plugins);
in
plugins // aliases

View File

@ -0,0 +1 @@
{}

View File

@ -0,0 +1,211 @@
# This file has been generated by ./pkgs/applications/editors/kakoune/plugins/update.py. Do not edit!
{ lib, buildKakounePluginFrom2Nix, fetchFromGitHub, overrides ? (self: super: {}) }:
let
packages = ( self:
{
active-window-kak = buildKakounePluginFrom2Nix {
pname = "active-window-kak";
version = "2020-05-13";
src = fetchFromGitHub {
owner = "greenfork";
repo = "active-window.kak";
rev = "988db69cfbb88bd741d089bb43b0be551693e7c1";
sha256 = "1fv1cp9q212gamf9z2papl5xcl2w31fpcmbgdzbxcxdl1pvfsqp8";
};
meta.homepage = "https://github.com/greenfork/active-window.kak/";
};
auto-pairs-kak = buildKakounePluginFrom2Nix {
pname = "auto-pairs-kak";
version = "2020-10-04";
src = fetchFromGitHub {
owner = "alexherbo2";
repo = "auto-pairs.kak";
rev = "fd735ec149ef0d9ca5f628a95b1e52858b5afbdc";
sha256 = "07795kv9njlnp6mckwv141ny2ns6wyf5r0dfjaxh9ngd105zgif1";
};
meta.homepage = "https://github.com/alexherbo2/auto-pairs.kak/";
};
connect-kak = buildKakounePluginFrom2Nix {
pname = "connect-kak";
version = "2021-02-13";
src = fetchFromGitHub {
owner = "alexherbo2";
repo = "connect.kak";
rev = "0858c0e50c6ca6d214fb088f052385a242548e83";
sha256 = "1w4pwybg3v916hcyc49gz0blygv54ivv81x8fxp44ck0sy98idr3";
};
meta.homepage = "https://github.com/alexherbo2/connect.kak/";
};
fzf-kak = buildKakounePluginFrom2Nix {
pname = "fzf-kak";
version = "2021-01-27";
src = fetchFromGitHub {
owner = "andreyorst";
repo = "fzf.kak";
rev = "e10de405e2a98e910d0808059200d206ba80f865";
sha256 = "1hbsm1k8k0cgv7gxqicvnl22n2lb1plhkanniggk694gll22lq68";
};
meta.homepage = "https://github.com/andreyorst/fzf.kak/";
};
kakoune-buffer-switcher = buildKakounePluginFrom2Nix {
pname = "kakoune-buffer-switcher";
version = "2020-12-27";
src = fetchFromGitHub {
owner = "occivink";
repo = "kakoune-buffer-switcher";
rev = "6a27c45db87a23070c34fab36d2f8d812cd002a6";
sha256 = "1rmwy317908v8p54806m721bpzm8sgygb9abri34537ka6r05y5j";
};
meta.homepage = "https://github.com/occivink/kakoune-buffer-switcher/";
};
kakoune-buffers = buildKakounePluginFrom2Nix {
pname = "kakoune-buffers";
version = "2020-06-11";
src = fetchFromGitHub {
owner = "Delapouite";
repo = "kakoune-buffers";
rev = "67959fbad727ba8470fe8cd6361169560f4fb532";
sha256 = "09prhzz4yzf6ryw0npd1gpcfp77681vgawpp1ilfvbf25xgbbz33";
};
meta.homepage = "https://github.com/Delapouite/kakoune-buffers/";
};
kakoune-easymotion = buildKakounePluginFrom2Nix {
pname = "kakoune-easymotion";
version = "2020-03-09";
src = fetchFromGitHub {
owner = "danr";
repo = "kakoune-easymotion";
rev = "0ca75450023a149efc70e8e383e459b571355c70";
sha256 = "15czvl0qj2k767pysr6xk2v31mkhvcbmv76xs2a8yrslchms70b5";
};
meta.homepage = "https://github.com/danr/kakoune-easymotion/";
};
kakoune-extra-filetypes = buildKakounePluginFrom2Nix {
pname = "kakoune-extra-filetypes";
version = "2021-01-15";
src = fetchFromGitHub {
owner = "kakoune-editor";
repo = "kakoune-extra-filetypes";
rev = "c6f8aaccd8c9cd6b487964c8943416e21fbe7c18";
sha256 = "1vkff8xbycfgxv8x09cvc79qcg5fdzn2x77mbmifmkq236khrwrg";
};
meta.homepage = "https://github.com/kakoune-editor/kakoune-extra-filetypes/";
};
kakoune-rainbow = buildKakounePluginFrom2Nix {
pname = "kakoune-rainbow";
version = "2020-09-01";
src = fetchFromGitHub {
owner = "listentolist";
repo = "kakoune-rainbow";
rev = "d09103e8d268cf4621215bf162a0244c9482be3c";
sha256 = "1i3id7xw0j4z1a14mscr68ckpgvcwsjpl86lr864wy7w7qcmblx6";
};
meta.homepage = "https://github.com/listentolist/kakoune-rainbow/";
};
kakoune-registers = buildKakounePluginFrom2Nix {
pname = "kakoune-registers";
version = "2020-06-19";
src = fetchFromGitHub {
owner = "Delapouite";
repo = "kakoune-registers";
rev = "9531947baecd83c1d4c3bea0adf10f4462f1e120";
sha256 = "08v9ndghh7wvr8rsrqm05gksk9ai5vnwvw9gwqasbppb48cv4a8c";
};
meta.homepage = "https://github.com/Delapouite/kakoune-registers/";
};
kakoune-vertical-selection = buildKakounePluginFrom2Nix {
pname = "kakoune-vertical-selection";
version = "2019-04-11";
src = fetchFromGitHub {
owner = "occivink";
repo = "kakoune-vertical-selection";
rev = "c420f8b867ce47375fac303886e31623669a42b7";
sha256 = "13jdyd2j45wvgqvxdzw9zww14ly93bqjb6700zzxj7mkbiff6wsb";
};
meta.homepage = "https://github.com/occivink/kakoune-vertical-selection/";
};
openscad-kak = buildKakounePluginFrom2Nix {
pname = "openscad-kak";
version = "2020-12-10";
src = fetchFromGitHub {
owner = "mayjs";
repo = "openscad.kak";
rev = "ba51bbdcd96ccf94bb9239bef1481b6f37125849";
sha256 = "15dybd6dnnwla6mj8sw83nwd62para1syxzifznl6rz6kp8vqjjj";
};
meta.homepage = "https://github.com/mayjs/openscad.kak/";
};
powerline-kak = buildKakounePluginFrom2Nix {
pname = "powerline-kak";
version = "2021-02-15";
src = fetchFromGitHub {
owner = "jdugan6240";
repo = "powerline.kak";
rev = "322a760daa099d519ff50d14c29b27f3e2af00d1";
sha256 = "0mb8f8p6g75p05ifp45i0gbq2mib8c8giz7r1xfd0yrwspp4aksc";
};
meta.homepage = "https://github.com/jdugan6240/powerline.kak/";
};
prelude-kak = buildKakounePluginFrom2Nix {
pname = "prelude-kak";
version = "2020-09-06";
src = fetchFromGitHub {
owner = "alexherbo2";
repo = "prelude.kak";
rev = "f1e0f4d5cb62a36924e3f8ba6824d6aed8c19d23";
sha256 = "1pncr8azqvl2z9yvzhc68p1s9fld8cvak8yz88zgrp5ypx2cxl8c";
};
meta.homepage = "https://github.com/alexherbo2/prelude.kak/";
};
replace-mode-kak = buildKakounePluginFrom2Nix {
pname = "replace-mode-kak";
version = "2020-10-07";
src = fetchFromGitHub {
owner = "alexherbo2";
repo = "replace-mode.kak";
rev = "5f4c73cdbaf5aeb964ee35ad4b9081b233af90c0";
sha256 = "1cmylx99bm7jwfb4hclb69sdc4n8f29ssyy2byjiw53ni9rnc8q0";
};
meta.homepage = "https://github.com/alexherbo2/replace-mode.kak/";
};
sleuth-kak = buildKakounePluginFrom2Nix {
pname = "sleuth-kak";
version = "2020-11-06";
src = fetchFromGitHub {
owner = "alexherbo2";
repo = "sleuth.kak";
rev = "911db8bd208ad0d289b8fa15a2ac665ff39bd6bd";
sha256 = "0g41c0038fpmihqva71xl4vfbmvsp13i47gp6fnmaikajpynzc51";
};
meta.homepage = "https://github.com/alexherbo2/sleuth.kak/";
};
tabs-kak = buildKakounePluginFrom2Nix {
pname = "tabs-kak";
version = "2021-02-16";
src = fetchFromGitHub {
owner = "enricozb";
repo = "tabs.kak";
rev = "1aaa8cd89e404cbbd76d44ff8089de0951612fbf";
sha256 = "0dfz6j6yxl65jbh4xvpiy2abr2sdjyalynzhl28y7l1gzqv4ni3j";
};
meta.homepage = "https://github.com/enricozb/tabs.kak/";
};
});
in lib.fix' (lib.extends overrides packages)

View File

@ -1,32 +0,0 @@
{ lib, stdenv, fetchFromGitHub }:
stdenv.mkDerivation rec {
name = "kak-ansi";
version = "0.2.1";
src = fetchFromGitHub {
owner = "eraserhd";
repo = "kak-ansi";
rev = "v${version}";
sha256 = "0ddjih8hfyf6s4g7y46p1355kklaw1ydzzh61141i0r45wyb2d0d";
};
installPhase = ''
mkdir -p $out/bin $out/share/kak/autoload/plugins/
cp kak-ansi-filter $out/bin/
# Hard-code path of filter and don't try to build when Kakoune boots
sed '
/^declare-option.* ansi_filter /i\
declare-option -hidden str ansi_filter %{'"$out"'/bin/kak-ansi-filter}
/^declare-option.* ansi_filter /,/^}/d
' rc/ansi.kak >$out/share/kak/autoload/plugins/ansi.kak
'';
meta = with lib; {
description = "Kakoune support for rendering ANSI code";
homepage = "https://github.com/eraserhd/kak-ansi";
license = licenses.unlicense;
maintainers = with maintainers; [ eraserhd ];
platforms = platforms.all;
};
}

View File

@ -1,24 +0,0 @@
{ lib, stdenv, fetchFromGitHub }:
stdenv.mkDerivation {
name = "kak-auto-pairs";
version = "2020-07-14";
src = fetchFromGitHub {
owner = "alexherbo2";
repo = "auto-pairs.kak";
rev = "5b4b3b723c34c8b7f40cee60868204974349bf9f";
sha256 = "1wgrv03f1lkzflbbaz8n23glij5rvfxf8pcqysd668mbx1hcrk9i";
};
installPhase = ''
mkdir -p $out/share/kak/autoload/plugins
cp -r rc $out/share/kak/autoload/plugins/auto-pairs
'';
meta = with lib;
{ description = "Kakoune extension to enable automatic closing of pairs";
homepage = "https://github.com/alexherbo2/auto-pairs.kak";
license = licenses.unlicense;
maintainers = with maintainers; [ nrdxp ];
platform = platforms.all;
};
}

View File

@ -1,24 +0,0 @@
{ stdenv, fetchFromGitHub, lib }:
stdenv.mkDerivation {
name = "kak-buffers";
version = "2019-04-03";
src = fetchFromGitHub {
owner = "Delapouite";
repo = "kakoune-buffers";
rev = "3b35b23ac2be661a37c085d34dd04d066450f757";
sha256 = "0f3g0v1sjinii3ig9753jjj35v2km4h9bcfw9xgzwz8b10d75bax";
};
installPhase = ''
mkdir -p $out/share/kak/autoload/plugins
cp -r buffers.kak $out/share/kak/autoload/plugins
'';
meta = with lib;
{ description = "Ease navigation between opened buffers in Kakoune";
homepage = "https://github.com/Delapouite/kakoune-buffers";
license = licenses.mit;
maintainers = with maintainers; [ nrdxp ];
platform = platforms.all;
};
}

View File

@ -1,39 +0,0 @@
{ lib, stdenv, fetchFromGitHub, fzf }:
assert lib.asserts.assertOneOf "fzf" fzf.pname [ "fzf" "skim" ];
stdenv.mkDerivation {
name = "kak-fzf";
version = "2020-07-26";
src = fetchFromGitHub {
owner = "andreyorst";
repo = "fzf.kak";
rev = "f23daa698ad95493fbd675ae153e3cac13ef34e9";
hash = "sha256-BfXHTJ371ThOizMI/4BAbdJoaltGSP586hz4HqX1KWA=";
};
configurePhase = ''
if [[ -x "${fzf}/bin/fzf" ]]; then
fzfImpl='${fzf}/bin/fzf'
else
fzfImpl='${fzf}/bin/sk'
fi
substituteInPlace rc/fzf.kak \
--replace \'fzf\' \'"$fzfImpl"\'
'';
installPhase = ''
mkdir -p $out/share/kak/autoload/plugins
cp -r rc $out/share/kak/autoload/plugins/fzf
'';
meta = with lib;
{ description = "Kakoune plugin that brings integration with fzf";
homepage = "https://github.com/andreyorst/fzf.kak";
license = licenses.mit;
maintainers = with maintainers; [ nrdxp ];
platform = platforms.all;
};
}

View File

@ -1,31 +0,0 @@
{ lib, stdenv, fetchFromGitHub, kakoune-unwrapped, plan9port, ... }:
stdenv.mkDerivation rec {
pname = "kak-plumb";
version = "0.1.1";
src = fetchFromGitHub {
owner = "eraserhd";
repo = "kak-plumb";
rev = "v${version}";
sha256 = "1rz6pr786slnf1a78m3sj09axr4d2lb5rg7sfa4mfg1zcjh06ps6";
};
installPhase = ''
mkdir -p $out/bin $out/share/kak/autoload/plugins/
substitute rc/plumb.kak $out/share/kak/autoload/plugins/plumb.kak \
--replace '9 plumb' '${plan9port}/bin/9 plumb'
substitute edit-client $out/bin/edit-client \
--replace '9 9p' '${plan9port}/bin/9 9p' \
--replace 'kak -p' '${kakoune-unwrapped}/bin/kak -p'
chmod +x $out/bin/edit-client
'';
meta = with lib; {
description = "Kakoune integration with the Plan 9 plumber";
homepage = "https://github.com/eraserhd/kak-plumb";
license = licenses.unlicense;
maintainers = with maintainers; [ eraserhd ];
platforms = platforms.all;
};
}

View File

@ -1,29 +0,0 @@
{ stdenv, git, fetchFromGitHub, lib }:
stdenv.mkDerivation {
name = "kak-powerline";
version = "2020-08-22";
src = fetchFromGitHub {
owner = "jdugan6240";
repo = "powerline.kak";
rev = "d641b2cd8024f872bcda23f9256e7aff36da02ae";
sha256 = "65948f5ef3ab2f46f6d186ad752665c251d887631d439949decc2654a67958a4";
};
configurePhase = ''
substituteInPlace rc/modules/git.kak \
--replace \'git\' \'${git}/bin/git\'
'';
installPhase = ''
mkdir -p $out/share/kak/autoload/plugins
cp -r rc $out/share/kak/autoload/plugins/powerline
'';
meta = with lib;
{ description = "Kakoune modeline, but with passion";
homepage = "https://github.com/jdugan6240/powerline.kak";
license = licenses.mit;
maintainers = with maintainers; [ nrdxp ];
platform = platforms.all;
};
}

View File

@ -1,25 +0,0 @@
{ lib, stdenv, fetchFromGitHub }:
stdenv.mkDerivation {
name = "kak-prelude";
version = "2020-06-09";
src = fetchFromGitHub {
owner = "alexherbo2";
repo = "prelude.kak";
rev = "f1e0f4d5cb62a36924e3f8ba6824d6aed8c19d23";
sha256 = "1pncr8azqvl2z9yvzhc68p1s9fld8cvak8yz88zgrp5ypx2cxl8c";
};
installPhase = ''
mkdir -p $out/share/kak/autoload/plugins
cp -r rc $out/share/kak/autoload/plugins/prelude
'';
meta = with lib;
{ description = "Prelude of shell blocks for Kakoune.";
homepage = "https://github.com/alexherbo2/prelude.kak";
license = licenses.unlicense;
maintainers = with maintainers; [ buffet ];
platform = platforms.all;
};
}

View File

@ -1,24 +0,0 @@
{ stdenv, fetchFromGitHub, lib }:
stdenv.mkDerivation {
name = "kak-vertical-selection";
version = "2019-04-11";
src = fetchFromGitHub {
owner = "occivink";
repo = "kakoune-vertical-selection";
rev = "c420f8b867ce47375fac303886e31623669a42b7";
sha256 = "13jdyd2j45wvgqvxdzw9zww14ly93bqjb6700zzxj7mkbiff6wsb";
};
installPhase = ''
mkdir -p $out/share/kak/autoload/plugins
cp -r vertical-selection.kak $out/share/kak/autoload/plugins
'';
meta = with lib;
{ description = "Select up and down lines that match the same pattern in Kakoune";
homepage = "https://github.com/occivink/kakoune-vertical-selection";
license = licenses.unlicense;
maintainers = with maintainers; [ nrdxp ];
platform = platforms.all;
};
}

View File

@ -0,0 +1,17 @@
alexherbo2/auto-pairs.kak
alexherbo2/connect.kak
alexherbo2/prelude.kak
alexherbo2/replace-mode.kak
alexherbo2/sleuth.kak
andreyorst/fzf.kak
danr/kakoune-easymotion
Delapouite/kakoune-buffers
Delapouite/kakoune-registers
enricozb/tabs.kak@main
greenfork/active-window.kak
jdugan6240/powerline.kak
kakoune-editor/kakoune-extra-filetypes
listentolist/kakoune-rainbow
mayjs/openscad.kak
occivink/kakoune-buffer-switcher
occivink/kakoune-vertical-selection

View File

@ -0,0 +1,4 @@
{ lib, stdenv }:
{
inherit (import ./build-kakoune-plugin.nix { inherit lib stdenv; }) buildKakounePlugin buildKakounePluginFrom2Nix;
}

View File

@ -1,25 +0,0 @@
{ lib, stdenv, fetchFromGitHub }:
stdenv.mkDerivation {
pname = "openscad.kak";
version = "unstable-2019-11-08";
src = fetchFromGitHub {
owner = "mayjs";
repo = "openscad.kak";
rev = "d9143d5e7834e3356b49720664d5647cab9db7cc";
sha256 = "0j4dqhrn56z77hdalfdxagwz8h6nwr8s9i4w0bs2644k72lsm2ix";
};
installPhase = ''
install -Dm644 rc/openscad.kak -t $out/share/kak/autoload/plugins/
'';
meta = with lib; {
description = "Syntax highlighting for OpenSCAD files";
homepage = "https://github.com/mayjs/openscad.kak";
license = licenses.unlicense;
maintainers = with maintainers; [ eraserhd ];
platforms = platforms.all;
};
}

View File

@ -0,0 +1,161 @@
{ lib, stdenv, fetchFromGitHub, fetchFromGitLab, fetchgit
, buildKakounePluginFrom2Nix
, kak-lsp, parinfer-rust, rep
, fzf, git, guile, kakoune-unwrapped, lua5_3, plan9port
}:
self: super: {
inherit kak-lsp parinfer-rust rep;
case-kak = buildKakounePluginFrom2Nix {
pname = "case-kak";
version = "2020-04-06";
src = fetchFromGitLab {
owner = "FlyingWombat";
repo = "case.kak";
rev = "6f1511820aa3abfa118e0f856118adc8113e2185";
sha256 = "002njrlwgakqgp74wivbppr9qyn57dn4n5bxkr6k6nglk9qndwdp";
};
meta.homepage = "https://gitlab.com/FlyingWombat/case.kak";
};
fzf-kak = super.fzf-kak.overrideAttrs(oldAttrs: rec {
preFixup = ''
if [[ -x "${fzf}/bin/fzf" ]]; then
fzfImpl='${fzf}/bin/fzf'
else
fzfImpl='${fzf}/bin/sk'
fi
substituteInPlace $out/share/kak/autoload/plugins/fzf-kak/rc/fzf.kak \
--replace \'fzf\' \'"$fzfImpl"\'
'';
});
kak-ansi = stdenv.mkDerivation rec {
pname = "kak-ansi";
version = "0.2.1";
src = fetchFromGitHub {
owner = "eraserhd";
repo = "kak-ansi";
rev = "v${version}";
sha256 = "0ddjih8hfyf6s4g7y46p1355kklaw1ydzzh61141i0r45wyb2d0d";
};
installPhase = ''
mkdir -p $out/bin $out/share/kak/autoload/plugins/
cp kak-ansi-filter $out/bin/
# Hard-code path of filter and don't try to build when Kakoune boots
sed '
/^declare-option.* ansi_filter /i\
declare-option -hidden str ansi_filter %{'"$out"'/bin/kak-ansi-filter}
/^declare-option.* ansi_filter /,/^}/d
' rc/ansi.kak >$out/share/kak/autoload/plugins/ansi.kak
'';
meta = with lib; {
description = "Kakoune support for rendering ANSI code";
homepage = "https://github.com/eraserhd/kak-ansi";
license = licenses.unlicense;
maintainers = with maintainers; [ eraserhd ];
platforms = platforms.all;
};
};
kak-plumb = stdenv.mkDerivation rec {
pname = "kak-plumb";
version = "0.1.1";
src = fetchFromGitHub {
owner = "eraserhd";
repo = "kak-plumb";
rev = "v${version}";
sha256 = "1rz6pr786slnf1a78m3sj09axr4d2lb5rg7sfa4mfg1zcjh06ps6";
};
installPhase = ''
mkdir -p $out/bin $out/share/kak/autoload/plugins/
substitute rc/plumb.kak $out/share/kak/autoload/plugins/plumb.kak \
--replace '9 plumb' '${plan9port}/bin/9 plumb'
substitute edit-client $out/bin/edit-client \
--replace '9 9p' '${plan9port}/bin/9 9p' \
--replace 'kak -p' '${kakoune-unwrapped}/bin/kak -p'
chmod +x $out/bin/edit-client
'';
meta = with lib; {
description = "Kakoune integration with the Plan 9 plumber";
homepage = "https://github.com/eraserhd/kak-plumb";
license = licenses.unlicense;
maintainers = with maintainers; [ eraserhd ];
platforms = platforms.all;
};
};
kakoune-rainbow = super.kakoune-rainbow.overrideAttrs(oldAttrs: rec {
preFixup = ''
mkdir -p $out/bin
mv $out/share/kak/autoload/plugins/kakoune-rainbow/bin/kak-rainbow.scm $out/bin
substituteInPlace $out/bin/kak-rainbow.scm \
--replace '/usr/bin/env -S guile' '${guile}/bin/guile'
substituteInPlace $out/share/kak/autoload/plugins/kakoune-rainbow/rainbow.kak \
--replace '%sh{dirname "$kak_source"}' "'$out'"
'';
});
kakoune-state-save = buildKakounePluginFrom2Nix {
pname = "kakoune-state-save";
version = "2020-02-09";
src = fetchFromGitLab {
owner = "Screwtapello";
repo = "kakoune-state-save";
rev = "ab7c0c765326a4a80af78857469ee8c80814c52a";
sha256 = "AAOCG0TY3G188NnkkwMCSbkkNe487F4gwiFWwG9Yo+A=";
};
meta = with lib; {
description = "Help Kakoune save and restore state between sessions";
homepage = "https://gitlab.com/Screwtapello/kakoune-state-save";
license = licenses.mit;
maintainers = with maintainers; [ Flakebi ];
platforms = platforms.all;
};
};
powerline-kak = super.powerline-kak.overrideAttrs(oldAttrs: rec {
preFixup = ''
substituteInPlace $out/share/kak/autoload/plugins/powerline-kak/rc/modules/git.kak \
--replace ' git ' ' ${git}/bin/git '
'';
});
quickscope-kak = buildKakounePluginFrom2Nix rec {
pname = "quickscope-kak";
version = "1.0.0";
src = fetchgit {
url = "https://git.sr.ht/~voroskoi/quickscope.kak";
rev = "v${version}";
sha256 = "0y1g3zpa2ql8l9rl5i2w84bka8a09kig9nq9zdchaff5pw660mcx";
};
buildInputs = [ lua5_3 ];
installPhase = ''
mkdir -p $out/share/kak/autoload/plugins/
cp quickscope.* $out/share/kak/autoload/plugins/
# substituteInPlace does not like the pipe
sed -e 's,[|] *lua,|${lua5_3}/bin/lua,' quickscope.kak >$out/share/kak/autoload/plugins/quickscope.kak
'';
meta = with lib; {
description = "Highlight f and t jump positions";
homepage = "https://sr.ht/~voroskoi/quickscope.kak/";
license = licenses.unlicense;
maintainers = with maintainers; [ eraserhd ];
platforms = platforms.all;
};
};
}

View File

@ -1,29 +0,0 @@
{ lib, stdenv, fetchgit, lua5_3 }:
stdenv.mkDerivation rec {
pname = "quickscope-kak";
version = "1.0.0";
src = fetchgit {
url = "https://git.sr.ht/~voroskoi/quickscope.kak";
rev = "v${version}";
sha256 = "0y1g3zpa2ql8l9rl5i2w84bka8a09kig9nq9zdchaff5pw660mcx";
};
buildInputs = [ lua5_3 ];
installPhase = ''
mkdir -p $out/share/kak/autoload/plugins/
cp quickscope.* $out/share/kak/autoload/plugins/
# substituteInPlace does not like the pipe
sed -e 's,[|] *lua,|${lua5_3}/bin/lua,' quickscope.kak >$out/share/kak/autoload/plugins/quickscope.kak
'';
meta = with lib; {
description = "Highlight f and t jump positions";
homepage = "https://sr.ht/~voroskoi/quickscope.kak/";
license = licenses.unlicense;
maintainers = with maintainers; [ eraserhd ];
platforms = platforms.all;
};
}

View File

@ -0,0 +1,91 @@
#!/usr/bin/env nix-shell
#!nix-shell -p nix-prefetch-git -p python3 -p python3Packages.GitPython nix -i python3
# format:
# $ nix run nixpkgs.python3Packages.black -c black update.py
# type-check:
# $ nix run nixpkgs.python3Packages.mypy -c mypy update.py
# linted:
# $ nix run nixpkgs.python3Packages.flake8 -c flake8 --ignore E501,E265,E402 update.py
import inspect
import os
import sys
from typing import List, Tuple
from pathlib import Path
# Import plugin update library from maintainers/scripts/pluginupdate.py
ROOT = Path(os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))))
sys.path.insert(
0, os.path.join(ROOT.parent.parent.parent.parent.parent, "maintainers", "scripts")
)
import pluginupdate
GET_PLUGINS = f"""(with import <localpkgs> {{}};
let
inherit (kakouneUtils.override {{}}) buildKakounePluginFrom2Nix;
generated = callPackage {ROOT}/generated.nix {{
inherit buildKakounePluginFrom2Nix;
}};
hasChecksum = value: lib.isAttrs value && lib.hasAttrByPath ["src" "outputHash"] value;
getChecksum = name: value:
if hasChecksum value then {{
submodules = value.src.fetchSubmodules or false;
sha256 = value.src.outputHash;
rev = value.src.rev;
}} else null;
checksums = lib.mapAttrs getChecksum generated;
in lib.filterAttrs (n: v: v != null) checksums)"""
HEADER = "# This file has been generated by ./pkgs/applications/editors/kakoune/plugins/update.py. Do not edit!"
def generate_nix(plugins: List[Tuple[str, str, pluginupdate.Plugin]], outfile: str):
sorted_plugins = sorted(plugins, key=lambda v: v[2].name.lower())
with open(outfile, "w+") as f:
f.write(HEADER)
f.write(
"""
{ lib, buildKakounePluginFrom2Nix, fetchFromGitHub, overrides ? (self: super: {}) }:
let
packages = ( self:
{"""
)
for owner, repo, plugin in sorted_plugins:
if plugin.has_submodules:
submodule_attr = "\n fetchSubmodules = true;"
else:
submodule_attr = ""
f.write(
f"""
{plugin.normalized_name} = buildKakounePluginFrom2Nix {{
pname = "{plugin.normalized_name}";
version = "{plugin.version}";
src = fetchFromGitHub {{
owner = "{owner}";
repo = "{repo}";
rev = "{plugin.commit}";
sha256 = "{plugin.sha256}";{submodule_attr}
}};
meta.homepage = "https://github.com/{owner}/{repo}/";
}};
"""
)
f.write(
"""
});
in lib.fix' (lib.extends overrides packages)
"""
)
print(f"updated {outfile}")
def main():
editor = pluginupdate.Editor("kakoune", ROOT, GET_PLUGINS, generate_nix)
pluginupdate.update_plugins(editor)
if __name__ == "__main__":
main()

View File

@ -1,27 +1,19 @@
{ mkDerivation, lib, fetchFromGitHub, fetchpatch, cmake, pkg-config
{ mkDerivation, lib, fetchFromGitHub, cmake, pkg-config
, qtscript, poppler, hunspell
, withLua ? true, lua
, withPython ? true, python3 }:
mkDerivation rec {
pname = "texworks";
version = "0.6.5";
version = "0.6.6";
src = fetchFromGitHub {
owner = "TeXworks";
repo = "texworks";
rev = "release-${version}";
sha256 = "1lw1p4iyzxypvjhnav11g6rwf6gx7kyzwy2iprvv8zzpqcdkjp2z";
sha256 = "0l8jl1b8lpas7yz6m0qc2nikyn54lx2ljzmjjz3zgxgd6l502006";
};
patches = [
(fetchpatch {
name = "fix-compilation-with-qt-5.15.patch";
url = "https://github.com/TeXworks/texworks/commit/a5352a3a94e3685125650b65e6197de060326cc2.patch";
sha256 = "0pf7h1m11x0s039bxknm7rxdp9b4g8ch86y38jlyy56c74mw97i6";
})
];
nativeBuildInputs = [ cmake pkg-config ];
buildInputs = [ qtscript poppler hunspell ]
++ lib.optional withLua lua

View File

@ -17,11 +17,11 @@ let
in
stdenv.mkDerivation rec {
pname = "typora";
version = "0.9.95";
version = "0.9.98";
src = fetchurl {
url = "https://www.typora.io/linux/typora_${version}_amd64.deb";
sha256 = "0kgzk7z707vlbjrvykrnw2h6wscmc3h5hxycyz1z1j2cz26fns4p";
sha256 = "sha256-JiqjxT8ZGttrcJrcQmBoGPnRuuYWZ9u2083RxZoLMus=";
};
nativeBuildInputs = [

View File

@ -1,5 +1,5 @@
{ stdenv, lib, makeDesktopItem
, unzip, libsecret, libXScrnSaver, wrapGAppsHook
, unzip, libsecret, libXScrnSaver, libxshmfence, wrapGAppsHook
, gtk2, atomEnv, at-spi2-atk, autoPatchelfHook
, systemd, fontconfig, libdbusmenu
@ -63,7 +63,7 @@ in
buildInputs = (if stdenv.isDarwin
then [ unzip ]
else [ gtk2 at-spi2-atk wrapGAppsHook ] ++ atomEnv.packages)
++ [ libsecret libXScrnSaver ];
++ [ libsecret libXScrnSaver libxshmfence ];
runtimeDependencies = lib.optional (stdenv.isLinux) [ (lib.getLib systemd) fontconfig.lib libdbusmenu ];

View File

@ -16,13 +16,13 @@ in
stdenv.mkDerivation rec {
pname = "imagemagick";
version = "6.9.12-1";
version = "6.9.12-3";
src = fetchFromGitHub {
owner = "ImageMagick";
repo = "ImageMagick6";
rev = version;
sha256 = "1s1zr0fqnm9jl1ni07if2klvf2lfg26dgxdbspksq5xdhsxxn841";
sha256 = "sha256-h9c0N9AcFVpNYpKl+95q1RVJWuacN4N4kbAJIKJp8Jc=";
};
outputs = [ "out" "dev" "doc" ]; # bin/ isn't really big
@ -81,6 +81,7 @@ stdenv.mkDerivation rec {
changelog = "https://legacy.imagemagick.org/script/changelog.php";
description = "A software suite to create, edit, compose, or convert bitmap images";
platforms = platforms.linux ++ platforms.darwin;
maintainers = with maintainers; [ erictapen ];
license = licenses.asl20;
};
}

View File

@ -21,13 +21,13 @@
stdenv.mkDerivation rec {
pname = "fondo";
version = "1.5.1";
version = "1.5.2";
src = fetchFromGitHub {
owner = "calo001";
repo = pname;
rev = version;
sha256 = "sha256-eGHgZm9Q6JnY6OQNAyrFvRsuyuFnruMJNckOCCiO4Ug=";
sha256 = "sha256-EATZRmYSGUzWYaPqFT4mLTGGvwUp+Mn93yMF2JsPaYo=";
};
nativeBuildInputs = [

View File

@ -1,48 +1,113 @@
{ lib, mkDerivation, fetchFromGitHub, fetchpatch, cmake, ninja, coin3d,
xercesc, ode, eigen, qtbase, qttools, qtwebengine, qtxmlpatterns, wrapQtAppsHook,
opencascade-occt, gts, hdf5, vtk, medfile, zlib, python3Packages, swig,
gfortran, libXmu, soqt, libf2c, libGLU, makeWrapper, pkg-config, mpi,
spaceNavSupport ? true, libspnav, qtx11extras }:
{ lib
, mkDerivation
, fetchFromGitHub
, fetchpatch
, cmake
, ninja
, GitPython
, boost
, coin3d
, eigen
, gfortran
, gts
, hdf5
, libGLU
, libXmu
, libf2c
, libspnav
, matplotlib
, medfile
, mpi
, ode
, opencascade-occt
, pivy
, pkg-config
, pycollada
, pyside2
, pyside2-tools
, python
, pyyaml
, qtbase
, qttools
, qtwebengine
, qtx11extras
, qtxmlpatterns
, scipy
, shiboken2
, soqt
, spaceNavSupport ? true
, swig
, vtk
, wrapQtAppsHook
, xercesc
, zlib
}:
let
pythonPackages = python3Packages;
in mkDerivation rec {
pname = "freecad-unstable";
version = "2020-12-08";
mkDerivation rec {
pname = "freecad";
version = "0.19.1";
src = fetchFromGitHub {
owner = "FreeCAD";
repo = "FreeCAD";
rev = "daea30341ea2d5eaf2bfb65614128a5fa2abc8b7";
sha256 = "1fza64lygqq35v7kzgqmiq5dvl5rpgkhlzv06f9dszdz44hznina";
rev = version;
hash = "sha256-itIrO+/mKXOPNs+2POKT8u4YZuqx/QAwVBWrHgKP1qQ=";
};
nativeBuildInputs = [
cmake
ninja
pkg-config
pythonPackages.pyside2-tools
pyside2-tools
wrapQtAppsHook
];
buildInputs = [
coin3d xercesc ode eigen opencascade-occt gts
zlib swig gfortran soqt libf2c makeWrapper mpi vtk hdf5 medfile
libGLU libXmu qtbase qttools qtwebengine qtxmlpatterns
] ++ (with pythonPackages; [
matplotlib pycollada shiboken2 pyside2 pyside2-tools pivy python boost
GitPython # for addon manager
scipy pyyaml # (at least for) PyrateWorkbench
]) ++ lib.optionals spaceNavSupport [ libspnav qtx11extras ];
boost
coin3d
eigen
gfortran
gts
hdf5
libGLU
libXmu
libf2c
matplotlib
medfile
mpi
ode
opencascade-occt
pivy
pycollada
pyside2
pyside2-tools
python
pyyaml # (at least for) PyrateWorkbench
qtbase
qttools
qtwebengine
qtxmlpatterns
scipy
shiboken2
soqt
swig
vtk
xercesc
zlib
] ++ lib.optionals spaceNavSupport [
libspnav
qtx11extras
];
cmakeFlags = [
"-DBUILD_QT5=ON"
"-DSHIBOKEN_INCLUDE_DIR=${pythonPackages.shiboken2}/include"
"-DSHIBOKEN_INCLUDE_DIR=${shiboken2}/include"
"-DSHIBOKEN_LIBRARY=Shiboken2::libshiboken"
("-DPYSIDE_INCLUDE_DIR=${pythonPackages.pyside2}/include"
+ ";${pythonPackages.pyside2}/include/PySide2/QtCore"
+ ";${pythonPackages.pyside2}/include/PySide2/QtWidgets"
+ ";${pythonPackages.pyside2}/include/PySide2/QtGui"
("-DPYSIDE_INCLUDE_DIR=${pyside2}/include"
+ ";${pyside2}/include/PySide2/QtCore"
+ ";${pyside2}/include/PySide2/QtWidgets"
+ ";${pyside2}/include/PySide2/QtGui"
)
"-DPYSIDE_LIBRARY=PySide2::pyside2"
];
@ -68,10 +133,26 @@ in mkDerivation rec {
'';
meta = with lib; {
description = "General purpose Open Source 3D CAD/MCAD/CAx/CAE/PLM modeler";
homepage = "https://www.freecadweb.org/";
description = "General purpose Open Source 3D CAD/MCAD/CAx/CAE/PLM modeler";
longDescription = ''
FreeCAD is an open-source parametric 3D modeler made primarily to design
real-life objects of any size. Parametric modeling allows you to easily
modify your design by going back into your model history and changing its
parameters.
FreeCAD allows you to sketch geometry constrained 2D shapes and use them
as a base to build other objects. It contains many components to adjust
dimensions or extract design details from 3D models to create high quality
production ready drawings.
FreeCAD is designed to fit a wide range of uses including product design,
mechanical engineering and architecture. Whether you are a hobbyist, a
programmer, an experienced CAD user, a student or a teacher, you will feel
right at home with FreeCAD.
'';
license = licenses.lgpl2Plus;
maintainers = with maintainers; [ viric gebner ];
maintainers = with maintainers; [ viric gebner AndersonTorres ];
platforms = platforms.linux;
};
}

View File

@ -1,31 +1,53 @@
{ lib
, mkDerivation
, fetchFromGitHub
, fetchurl
, qmake
, qttools
, zlib
}:
/*
To use aditional parts libraries
set the variable LEOCAD_LIB=/path/to/libs/ or use option -l /path/to/libs/
*/
{ lib, stdenv, fetchFromGitHub, qt4, qmake4Hook, zlib }:
let
parts = fetchurl {
url = "https://web.archive.org/web/20190715142541/https://www.ldraw.org/library/updates/complete.zip";
sha256 = "sha256-PW3XCbFwRaNkx4EgCnl2rXH7QgmpNgjTi17kZ5bladA=";
};
stdenv.mkDerivation rec {
in
mkDerivation rec {
pname = "leocad";
version = "19.07.1";
version = "21.03";
src = fetchFromGitHub {
owner = "leozide";
repo = "leocad";
rev = "v${version}";
sha256 = "02kv1m18g6s4dady9jv4sjivfkrp192bmdw2a3d9lzlp60zks0p2";
sha256 = "sha256-69Ocfk5dBXwcRqAZWEP9Xg41o/tAQo76dIOk9oYhCUE=";
};
nativeBuildInputs = [ qmake4Hook ];
buildInputs = [ qt4 zlib ];
postPatch = ''
export qmakeFlags="$qmakeFlags INSTALL_PREFIX=$out"
'';
nativeBuildInputs = [ qmake qttools ];
buildInputs = [ zlib ];
qmakeFlags = [
"INSTALL_PREFIX=${placeholder "out"}"
"DISABLE_UPDATE_CHECK=1"
];
qtWrapperArgs = [
"--set-default LEOCAD_LIB ${parts}"
];
meta = with lib; {
description = "CAD program for creating virtual LEGO models";
homepage = "https://www.leocad.org/";
license = licenses.gpl2;
license = licenses.gpl2Only;
maintainers = with maintainers; [ peterhoeg ];
platforms = platforms.linux;
};
}

View File

@ -3,13 +3,13 @@
mkDerivation rec {
pname = "photoflare";
version = "1.6.6";
version = "1.6.7";
src = fetchFromGitHub {
owner = "PhotoFlare";
repo = "photoflare";
rev = "v${version}";
sha256 = "07lrlxagv1bljj607s8m0zsbzx9jrvi18bnxahnm7r4i5car5x2d";
sha256 = "sha256-Gx3YP29NrNHp0p05a1O4Xb9kqkA6pQLTJZ3/wOx+BWY=";
};
nativeBuildInputs = [ qmake qttools ];
@ -19,13 +19,11 @@ mkDerivation rec {
NIX_CFLAGS_COMPILE = "-I${graphicsmagick}/include/GraphicsMagick";
enableParallelBuilding = true;
meta = with lib; {
description = "A cross-platform image editor with a powerful features and a very friendly graphical user interface";
homepage = "https://photoflare.io";
maintainers = [ maintainers.omgbebebe ];
license = licenses.gpl3;
license = licenses.gpl3Plus;
platforms = platforms.linux;
};
}

View File

@ -13,14 +13,14 @@ let
pythonPackages = python3Packages;
in
mkDerivation rec {
version = "1.11";
version = "1.12";
pname = "renderdoc";
src = fetchFromGitHub {
owner = "baldurk";
repo = "renderdoc";
rev = "v${version}";
sha256 = "01r4fq03fpyhwvn47wx3dw29vcadcd0qml00h36q38cq3pi9x42j";
sha256 = "4k0WsTsz4WwPZC8Dj85l2ntJOZkLgmBBOJcX9Bb4U7I=";
};
buildInputs = [

View File

@ -2,12 +2,12 @@
, pango, fribidi, harfbuzz, pcre, pkg-config
, ncursesSupport ? true, ncurses ? null
, waylandSupport ? true, wayland ? null, wayland-protocols ? null
, x11Support ? true, xlibs ? null, xorg ? null
, x11Support ? true, xorg ? null
}:
assert ncursesSupport -> ncurses != null;
assert waylandSupport -> ! lib.elem null [wayland wayland-protocols];
assert x11Support -> xlibs != null && xorg != null;
assert x11Support -> xorg != null;
stdenv.mkDerivation rec {
pname = "bemenu";
@ -38,7 +38,7 @@ stdenv.mkDerivation rec {
] ++ optional ncursesSupport ncurses
++ optionals waylandSupport [ wayland wayland-protocols ]
++ optionals x11Support [
xlibs.libX11 xlibs.libXinerama xlibs.libXft
xorg.libX11 xorg.libXinerama xorg.libXft
xorg.libXdmcp xorg.libpthreadstubs xorg.libxcb
];

View File

@ -1,5 +1,5 @@
{ lib
, fetchgit
, fetchFromSourcehut
, python3
, glib
, gobject-introspection
@ -18,8 +18,9 @@ python3.pkgs.buildPythonApplication rec {
version = "0.3";
format = "other";
src = fetchgit {
url = "https://git.sr.ht/~craftyguy/caerbannog";
src = fetchFromSourcehut {
owner = "~craftyguy";
repo = "caerbannog";
rev = version;
sha256 = "0wqkb9zcllxm3fdsr5lphknkzy8r1cr80f84q200hbi99qql1dxh";
};

View File

@ -26,11 +26,11 @@
mkDerivation rec {
pname = "calibre";
version = "5.12.0";
version = "5.13.0";
src = fetchurl {
url = "https://download.calibre-ebook.com/${version}/${pname}-${version}.tar.xz";
sha256 = "sha256-N3/y1kSWyM36LpwbimftJ67h4zfk2j9hcvUi/pQL3YU=";
sha256 = "sha256-GDFAZxZmkio7e7kVjhYqhNdhXIlUPJF0iMWVl0uWVCM=";
};
patches = [

Some files were not shown because too many files have changed in this diff Show More