Project import generated by Copybara.
GitOrigin-RevId: e9158eca70ae59e73fae23be5d13d3fa0cfc78b4
This commit is contained in:
parent
78efc47b99
commit
b55a4ee46f
304 changed files with 4066 additions and 2913 deletions
22
third_party/nixpkgs/doc/Makefile
vendored
22
third_party/nixpkgs/doc/Makefile
vendored
|
@ -39,6 +39,7 @@ out/html/index.html: doc-support/result manual-full.xml style.css highlightjs
|
||||||
mkdir -p out/html/highlightjs/
|
mkdir -p out/html/highlightjs/
|
||||||
cp -r highlightjs out/html/
|
cp -r highlightjs out/html/
|
||||||
|
|
||||||
|
cp -r media out/html/
|
||||||
cp ./overrides.css out/html/
|
cp ./overrides.css out/html/
|
||||||
cp ./style.css out/html/style.css
|
cp ./style.css out/html/style.css
|
||||||
|
|
||||||
|
@ -53,6 +54,7 @@ out/epub/manual.epub: manual-full.xml
|
||||||
doc-support/result/epub.xsl \
|
doc-support/result/epub.xsl \
|
||||||
./manual-full.xml
|
./manual-full.xml
|
||||||
|
|
||||||
|
cp -r media out/epub/scratch/OEBPS
|
||||||
cp ./overrides.css out/epub/scratch/OEBPS
|
cp ./overrides.css out/epub/scratch/OEBPS
|
||||||
cp ./style.css out/epub/scratch/OEBPS
|
cp ./style.css out/epub/scratch/OEBPS
|
||||||
mkdir -p out/epub/scratch/OEBPS/images/callouts/
|
mkdir -p out/epub/scratch/OEBPS/images/callouts/
|
||||||
|
@ -87,24 +89,16 @@ functions/library/generated: doc-support/result
|
||||||
ln -rfs ./doc-support/result/function-docs functions/library/generated
|
ln -rfs ./doc-support/result/function-docs functions/library/generated
|
||||||
|
|
||||||
%.section.xml: %.section.md
|
%.section.xml: %.section.md
|
||||||
pandoc $^ -w docbook \
|
pandoc $^ -t docbook \
|
||||||
|
--extract-media=media \
|
||||||
|
--lua-filter=$(PANDOC_LUA_FILTERS_DIR)/diagram-generator.lua \
|
||||||
-f markdown+smart \
|
-f markdown+smart \
|
||||||
| sed -e 's|<ulink url=|<link xlink:href=|' \
|
|
||||||
-e 's|</ulink>|</link>|' \
|
|
||||||
-e 's|<sect. id=|<section xml:id=|' \
|
|
||||||
-e 's|</sect[0-9]>|</section>|' \
|
|
||||||
-e '1s| id=| xml:id=|' \
|
|
||||||
-e '1s|\(<[^ ]* \)|\1xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" |' \
|
|
||||||
| cat > $@
|
| cat > $@
|
||||||
|
|
||||||
%.chapter.xml: %.chapter.md
|
%.chapter.xml: %.chapter.md
|
||||||
pandoc $^ -w docbook \
|
pandoc $^ -t docbook \
|
||||||
--top-level-division=chapter \
|
--top-level-division=chapter \
|
||||||
|
--extract-media=media \
|
||||||
|
--lua-filter=$(PANDOC_LUA_FILTERS_DIR)/diagram-generator.lua \
|
||||||
-f markdown+smart \
|
-f markdown+smart \
|
||||||
| sed -e 's|<ulink url=|<link xlink:href=|' \
|
|
||||||
-e 's|</ulink>|</link>|' \
|
|
||||||
-e 's|<sect. id=|<section xml:id=|' \
|
|
||||||
-e 's|</sect[0-9]>|</section>|' \
|
|
||||||
-e '1s| id=| xml:id=|' \
|
|
||||||
-e '1s|\(<[^ ]* \)|\1|' \
|
|
||||||
| cat > $@
|
| cat > $@
|
||||||
|
|
217
third_party/nixpkgs/doc/contributing/submitting-changes.chapter.md
vendored
Normal file
217
third_party/nixpkgs/doc/contributing/submitting-changes.chapter.md
vendored
Normal file
|
@ -0,0 +1,217 @@
|
||||||
|
# Submitting changes {#chap-submitting-changes}
|
||||||
|
|
||||||
|
## Making patches {#submitting-changes-making-patches}
|
||||||
|
|
||||||
|
- Read [Manual (How to write packages for Nix)](https://nixos.org/nixpkgs/manual/).
|
||||||
|
|
||||||
|
- Fork [the Nixpkgs repository](https://github.com/nixos/nixpkgs/) on GitHub.
|
||||||
|
|
||||||
|
- Create a branch for your future fix.
|
||||||
|
|
||||||
|
- You can make branch from a commit of your local `nixos-version`. That will help you to avoid additional local compilations. Because you will receive packages from binary cache. For example
|
||||||
|
|
||||||
|
```ShellSession
|
||||||
|
$ nixos-version --hash
|
||||||
|
0998212
|
||||||
|
$ git checkout 0998212
|
||||||
|
$ git checkout -b 'fix/pkg-name-update'
|
||||||
|
```
|
||||||
|
|
||||||
|
- Please avoid working directly on the `master` branch.
|
||||||
|
|
||||||
|
- Make commits of logical units.
|
||||||
|
|
||||||
|
- If you removed pkgs or made some major NixOS changes, write about it in the release notes for the next stable release. For example `nixos/doc/manual/release-notes/rl-2003.xml`.
|
||||||
|
|
||||||
|
- Check for unnecessary whitespace with `git diff --check` before committing.
|
||||||
|
|
||||||
|
- Format the commit in a following way:
|
||||||
|
|
||||||
|
```
|
||||||
|
(pkg-name | nixos/<module>): (from -> to | init at version | refactor | etc)
|
||||||
|
Additional information.
|
||||||
|
```
|
||||||
|
|
||||||
|
- Examples:
|
||||||
|
- `nginx: init at 2.0.1`
|
||||||
|
- `firefox: 54.0.1 -> 55.0`
|
||||||
|
- `nixos/hydra: add bazBaz option`
|
||||||
|
- `nixos/nginx: refactor config generation`
|
||||||
|
|
||||||
|
- Test your changes. If you work with
|
||||||
|
|
||||||
|
- nixpkgs:
|
||||||
|
|
||||||
|
- update pkg
|
||||||
|
- `nix-env -i pkg-name -f <path to your local nixpkgs folder>`
|
||||||
|
- add pkg
|
||||||
|
- Make sure it’s in `pkgs/top-level/all-packages.nix`
|
||||||
|
- `nix-env -i pkg-name -f <path to your local nixpkgs folder>`
|
||||||
|
- _If you don’t want to install pkg in you profile_.
|
||||||
|
- `nix-build -A pkg-attribute-name <path to your local nixpkgs folder>/default.nix` and check results in the folder `result`. It will appear in the same directory where you did `nix-build`.
|
||||||
|
- If you did `nix-env -i pkg-name` you can do `nix-env -e pkg-name` to uninstall it from your system.
|
||||||
|
|
||||||
|
- NixOS and its modules:
|
||||||
|
- You can add new module to your NixOS configuration file (usually it’s `/etc/nixos/configuration.nix`). And do `sudo nixos-rebuild test -I nixpkgs=<path to your local nixpkgs folder> --fast`.
|
||||||
|
|
||||||
|
- If you have commits `pkg-name: oh, forgot to insert whitespace`: squash commits in this case. Use `git rebase -i`.
|
||||||
|
|
||||||
|
- [Rebase](https://git-scm.com/book/en/v2/Git-Branching-Rebasing) your branch against current `master`.
|
||||||
|
|
||||||
|
## Submitting changes {#submitting-changes-submitting-changes}
|
||||||
|
|
||||||
|
- Push your changes to your fork of nixpkgs.
|
||||||
|
- Create the pull request
|
||||||
|
- Follow [the contribution guidelines](https://github.com/NixOS/nixpkgs/blob/master/.github/CONTRIBUTING.md#submitting-changes).
|
||||||
|
|
||||||
|
## Submitting security fixes {#submitting-changes-submitting-security-fixes}
|
||||||
|
|
||||||
|
Security fixes are submitted in the same way as other changes and thus the same guidelines apply.
|
||||||
|
|
||||||
|
If the security fix comes in the form of a patch and a CVE is available, then the name of the patch should be the CVE identifier, so e.g. `CVE-2019-13636.patch` in the case of a patch that is included in the Nixpkgs tree. If a patch is fetched the name needs to be set as well, e.g.:
|
||||||
|
|
||||||
|
```nix
|
||||||
|
(fetchpatch {
|
||||||
|
name = "CVE-2019-11068.patch";
|
||||||
|
url = "https://gitlab.gnome.org/GNOME/libxslt/commit/e03553605b45c88f0b4b2980adfbbb8f6fca2fd6.patch";
|
||||||
|
sha256 = "0pkpb4837km15zgg6h57bncp66d5lwrlvkr73h0lanywq7zrwhj8";
|
||||||
|
})
|
||||||
|
```
|
||||||
|
|
||||||
|
If a security fix applies to both master and a stable release then, similar to regular changes, they are preferably delivered via master first and cherry-picked to the release branch.
|
||||||
|
|
||||||
|
Critical security fixes may by-pass the staging branches and be delivered directly to release branches such as `master` and `release-*`.
|
||||||
|
|
||||||
|
## Pull Request Template {#submitting-changes-pull-request-template}
|
||||||
|
|
||||||
|
The pull request template helps determine what steps have been made for a contribution so far, and will help guide maintainers on the status of a change. The motivation section of the PR should include any extra details the title does not address and link any existing issues related to the pull request.
|
||||||
|
|
||||||
|
When a PR is created, it will be pre-populated with some checkboxes detailed below:
|
||||||
|
|
||||||
|
### Tested using sandboxing {#submitting-changes-tested-with-sandbox}
|
||||||
|
|
||||||
|
When sandbox builds are enabled, Nix will setup an isolated environment for each build process. It is used to remove further hidden dependencies set by the build environment to improve reproducibility. This includes access to the network during the build outside of `fetch*` functions and files outside the Nix store. Depending on the operating system access to other resources are blocked as well (ex. inter process communication is isolated on Linux); see [sandbox](https://nixos.org/nix/manual/#conf-sandbox) in Nix manual for details.
|
||||||
|
|
||||||
|
Sandboxing is not enabled by default in Nix due to a small performance hit on each build. In pull requests for [nixpkgs](https://github.com/NixOS/nixpkgs/) people are asked to test builds with sandboxing enabled (see `Tested using sandboxing` in the pull request template) because in<https://nixos.org/hydra/> sandboxing is also used.
|
||||||
|
|
||||||
|
Depending if you use NixOS or other platforms you can use one of the following methods to enable sandboxing **before** building the package:
|
||||||
|
|
||||||
|
- **Globally enable sandboxing on NixOS**: add the following to `configuration.nix`
|
||||||
|
|
||||||
|
```nix
|
||||||
|
nix.useSandbox = true;
|
||||||
|
```
|
||||||
|
|
||||||
|
- **Globally enable sandboxing on non-NixOS platforms**: add the following to: `/etc/nix/nix.conf`
|
||||||
|
|
||||||
|
```ini
|
||||||
|
sandbox = true
|
||||||
|
```
|
||||||
|
|
||||||
|
### Built on platform(s) {#submitting-changes-platform-diversity}
|
||||||
|
|
||||||
|
Many Nix packages are designed to run on multiple platforms. As such, it’s important to let the maintainer know which platforms your changes have been tested on. It’s not always practical to test a change on all platforms, and is not required for a pull request to be merged. Only check the systems you tested the build on in this section.
|
||||||
|
|
||||||
|
### Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests) {#submitting-changes-nixos-tests}
|
||||||
|
|
||||||
|
Packages with automated tests are much more likely to be merged in a timely fashion because it doesn’t require as much manual testing by the maintainer to verify the functionality of the package. If there are existing tests for the package, they should be run to verify your changes do not break the tests. Tests only apply to packages with NixOS modules defined and can only be run on Linux. For more details on writing and running tests, see the [section in the NixOS manual](https://nixos.org/nixos/manual/index.html#sec-nixos-tests).
|
||||||
|
|
||||||
|
### Tested compilation of all pkgs that depend on this change using `nixpkgs-review` {#submitting-changes-tested-compilation}
|
||||||
|
|
||||||
|
If you are updating a package’s version, you can use nixpkgs-review to make sure all packages that depend on the updated package still compile correctly. The `nixpkgs-review` utility can look for and build all dependencies either based on uncommited changes with the `wip` option or specifying a github pull request number.
|
||||||
|
|
||||||
|
review changes from pull request number 12345:
|
||||||
|
|
||||||
|
```ShellSession
|
||||||
|
nix run nixpkgs.nixpkgs-review -c nixpkgs-review pr 12345
|
||||||
|
```
|
||||||
|
|
||||||
|
review uncommitted changes:
|
||||||
|
|
||||||
|
```ShellSession
|
||||||
|
nix run nixpkgs.nixpkgs-review -c nixpkgs-review wip
|
||||||
|
```
|
||||||
|
|
||||||
|
review changes from last commit:
|
||||||
|
|
||||||
|
```ShellSession
|
||||||
|
nix run nixpkgs.nixpkgs-review -c nixpkgs-review rev HEAD
|
||||||
|
```
|
||||||
|
|
||||||
|
### Tested execution of all binary files (usually in `./result/bin/`) {#submitting-changes-tested-execution}
|
||||||
|
|
||||||
|
It’s important to test any executables generated by a build when you change or create a package in nixpkgs. This can be done by looking in `./result/bin` and running any files in there, or at a minimum, the main executable for the package. For example, if you make a change to texlive, you probably would only check the binaries associated with the change you made rather than testing all of them.
|
||||||
|
|
||||||
|
### Meets Nixpkgs contribution standards {#submitting-changes-contribution-standards}
|
||||||
|
|
||||||
|
The last checkbox is fits [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/.github/CONTRIBUTING.md). The contributing document has detailed information on standards the Nix community has for commit messages, reviews, licensing of contributions you make to the project, etc\... Everyone should read and understand the standards the community has for contributing before submitting a pull request.
|
||||||
|
|
||||||
|
## Hotfixing pull requests {#submitting-changes-hotfixing-pull-requests}
|
||||||
|
|
||||||
|
- Make the appropriate changes in you branch.
|
||||||
|
- Don’t create additional commits, do
|
||||||
|
- `git rebase -i`
|
||||||
|
- `git push --force` to your branch.
|
||||||
|
|
||||||
|
## Commit policy {#submitting-changes-commit-policy}
|
||||||
|
|
||||||
|
- Commits must be sufficiently tested before being merged, both for the master and staging branches.
|
||||||
|
- Hydra builds for master and staging should not be used as testing platform, it’s a build farm for changes that have been already tested.
|
||||||
|
- When changing the bootloader installation process, extra care must be taken. Grub installations cannot be rolled back, hence changes may break people’s installations forever. For any non-trivial change to the bootloader please file a PR asking for review, especially from \@edolstra.
|
||||||
|
|
||||||
|
```{.graphviz caption="Staging workflow"}
|
||||||
|
digraph {
|
||||||
|
"small changes" [shape=none]
|
||||||
|
"mass-rebuilds and other large changes" [shape=none]
|
||||||
|
"critical security fixes" [shape=none]
|
||||||
|
"broken staging-next fixes" [shape=none]
|
||||||
|
|
||||||
|
"small changes" -> master
|
||||||
|
"mass-rebuilds and other large changes" -> staging
|
||||||
|
"critical security fixes" -> master
|
||||||
|
"broken staging-next fixes" -> "staging-next"
|
||||||
|
|
||||||
|
"staging-next" -> master [color="#E85EB0"] [label="stabilization ends"] [fontcolor="#E85EB0"]
|
||||||
|
"staging" -> "staging-next" [color="#E85EB0"] [label="stabilization starts"] [fontcolor="#E85EB0"]
|
||||||
|
|
||||||
|
master -> "staging-next" -> staging [color="#5F5EE8"] [label="every six hours/any time"] [fontcolor="#5F5EE8"]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Master branch {#submitting-changes-master-branch}
|
||||||
|
|
||||||
|
The `master` branch is the main development branch. It should only see non-breaking commits that do not cause mass rebuilds.
|
||||||
|
|
||||||
|
### Staging branch {#submitting-changes-staging-branch}
|
||||||
|
|
||||||
|
The `staging` branch is a development branch where mass-rebuilds go. It should only see non-breaking mass-rebuild commits. That means it is not to be used for testing, and changes must have been well tested already. If the branch is already in a broken state, please refrain from adding extra new breakages.
|
||||||
|
|
||||||
|
### Staging-next branch {#submitting-changes-staging-next-branch}
|
||||||
|
|
||||||
|
The `staging-next` branch is for stabilizing mass-rebuilds submitted to the `staging` branch prior to merging them into `master`. Mass-rebuilds should go via the `staging` branch. It should only see non-breaking commits that are fixing issues blocking it from being merged into the `master ` branch.
|
||||||
|
|
||||||
|
If the branch is already in a broken state, please refrain from adding extra new breakages. Stabilize it for a few days and then merge into master.
|
||||||
|
|
||||||
|
### Stable release branches {#submitting-changes-stable-release-branches}
|
||||||
|
|
||||||
|
For cherry-picking a commit to a stable release branch (“backporting”), use `git cherry-pick -x <original commit>` so that the original commit id is included in the commit.
|
||||||
|
|
||||||
|
Add a reason for the backport by using `git cherry-pick -xe <original commit>` instead when it is not obvious from the original commit message. It is not needed when it's a minor version update that includes security and bug fixes but don't add new features or when the commit fixes an otherwise broken package.
|
||||||
|
|
||||||
|
Here is an example of a cherry-picked commit message with good reason description:
|
||||||
|
|
||||||
|
```
|
||||||
|
zfs: Keep trying root import until it works
|
||||||
|
|
||||||
|
Works around #11003.
|
||||||
|
|
||||||
|
(cherry picked from commit 98b213a11041af39b39473906b595290e2a4e2f9)
|
||||||
|
|
||||||
|
Reason: several people cannot boot with ZFS on NVMe
|
||||||
|
```
|
||||||
|
|
||||||
|
Other examples of reasons are:
|
||||||
|
|
||||||
|
- Previously the build would fail due to, e.g., `getaddrinfo` not being defined
|
||||||
|
- The previous download links were all broken
|
||||||
|
- Crash when starting on some X11 systems
|
|
@ -1,455 +0,0 @@
|
||||||
<chapter xmlns="http://docbook.org/ns/docbook"
|
|
||||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
||||||
xml:id="chap-submitting-changes">
|
|
||||||
<title>Submitting changes</title>
|
|
||||||
<section xml:id="submitting-changes-making-patches">
|
|
||||||
<title>Making patches</title>
|
|
||||||
|
|
||||||
<itemizedlist>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Read <link xlink:href="https://nixos.org/nixpkgs/manual/">Manual (How to write packages for Nix)</link>.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Fork <link xlink:href="https://github.com/nixos/nixpkgs/">the Nixpkgs repository</link> on GitHub.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Create a branch for your future fix.
|
|
||||||
<itemizedlist>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
You can make branch from a commit of your local <command>nixos-version</command>. That will help you to avoid additional local compilations. Because you will receive packages from binary cache. For example
|
|
||||||
<screen>
|
|
||||||
<prompt>$ </prompt>nixos-version --hash
|
|
||||||
0998212
|
|
||||||
<prompt>$ </prompt>git checkout 0998212
|
|
||||||
<prompt>$ </prompt>git checkout -b 'fix/pkg-name-update'
|
|
||||||
</screen>
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Please avoid working directly on the <command>master</command> branch.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</itemizedlist>
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Make commits of logical units.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
If you removed pkgs or made some major NixOS changes, write about it in the release notes for the next stable release. For example <command>nixos/doc/manual/release-notes/rl-2003.xml</command>.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Check for unnecessary whitespace with <command>git diff --check</command> before committing.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Format the commit in a following way:
|
|
||||||
</para>
|
|
||||||
<programlisting>
|
|
||||||
(pkg-name | nixos/<module>): (from -> to | init at version | refactor | etc)
|
|
||||||
Additional information.
|
|
||||||
</programlisting>
|
|
||||||
<itemizedlist>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Examples:
|
|
||||||
<itemizedlist>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
<command>nginx: init at 2.0.1</command>
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
<command>firefox: 54.0.1 -> 55.0</command>
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
<command>nixos/hydra: add bazBaz option</command>
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
<command>nixos/nginx: refactor config generation</command>
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</itemizedlist>
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</itemizedlist>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Test your changes. If you work with
|
|
||||||
<itemizedlist>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
nixpkgs:
|
|
||||||
<itemizedlist>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
update pkg ->
|
|
||||||
<itemizedlist>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
<command>nix-env -i pkg-name -f <path to your local nixpkgs folder></command>
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</itemizedlist>
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
add pkg ->
|
|
||||||
<itemizedlist>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Make sure it's in <command>pkgs/top-level/all-packages.nix</command>
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
<command>nix-env -i pkg-name -f <path to your local nixpkgs folder></command>
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</itemizedlist>
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
<emphasis>If you don't want to install pkg in you profile</emphasis>.
|
|
||||||
<itemizedlist>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
<command>nix-build -A pkg-attribute-name <path to your local nixpkgs folder>/default.nix</command> and check results in the folder <command>result</command>. It will appear in the same directory where you did <command>nix-build</command>.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</itemizedlist>
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
If you did <command>nix-env -i pkg-name</command> you can do <command>nix-env -e pkg-name</command> to uninstall it from your system.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</itemizedlist>
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
NixOS and its modules:
|
|
||||||
<itemizedlist>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
You can add new module to your NixOS configuration file (usually it's <command>/etc/nixos/configuration.nix</command>). And do <command>sudo nixos-rebuild test -I nixpkgs=<path to your local nixpkgs folder> --fast</command>.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</itemizedlist>
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</itemizedlist>
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
If you have commits <command>pkg-name: oh, forgot to insert whitespace</command>: squash commits in this case. Use <command>git rebase -i</command>.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
<link xlink:href="https://git-scm.com/book/en/v2/Git-Branching-Rebasing">Rebase</link> your branch against current <command>master</command>.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</itemizedlist>
|
|
||||||
</section>
|
|
||||||
<section xml:id="submitting-changes-submitting-changes">
|
|
||||||
<title>Submitting changes</title>
|
|
||||||
|
|
||||||
<itemizedlist>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Push your changes to your fork of nixpkgs.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Create the pull request
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Follow <link xlink:href="https://github.com/NixOS/nixpkgs/blob/master/.github/CONTRIBUTING.md#submitting-changes">the contribution guidelines</link>.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</itemizedlist>
|
|
||||||
</section>
|
|
||||||
<section xml:id="submitting-changes-submitting-security-fixes">
|
|
||||||
<title>Submitting security fixes</title>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
Security fixes are submitted in the same way as other changes and thus the same guidelines apply.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
If the security fix comes in the form of a patch and a CVE is available, then the name of the patch should be the CVE identifier, so e.g. <literal>CVE-2019-13636.patch</literal> in the case of a patch that is included in the Nixpkgs tree. If a patch is fetched the name needs to be set as well, e.g.:
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<programlisting>
|
|
||||||
(fetchpatch {
|
|
||||||
name = "CVE-2019-11068.patch";
|
|
||||||
url = "https://gitlab.gnome.org/GNOME/libxslt/commit/e03553605b45c88f0b4b2980adfbbb8f6fca2fd6.patch";
|
|
||||||
sha256 = "0pkpb4837km15zgg6h57bncp66d5lwrlvkr73h0lanywq7zrwhj8";
|
|
||||||
})
|
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
If a security fix applies to both master and a stable release then, similar to regular changes, they are preferably delivered via master first and cherry-picked to the release branch.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
Critical security fixes may by-pass the staging branches and be delivered directly to release branches such as <literal>master</literal> and <literal>release-*</literal>.
|
|
||||||
</para>
|
|
||||||
</section>
|
|
||||||
<section xml:id="submitting-changes-pull-request-template">
|
|
||||||
<title>Pull Request Template</title>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
The pull request template helps determine what steps have been made for a contribution so far, and will help guide maintainers on the status of a change. The motivation section of the PR should include any extra details the title does not address and link any existing issues related to the pull request.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
When a PR is created, it will be pre-populated with some checkboxes detailed below:
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<section xml:id="submitting-changes-tested-with-sandbox">
|
|
||||||
<title>Tested using sandboxing</title>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
When sandbox builds are enabled, Nix will setup an isolated environment for each build process. It is used to remove further hidden dependencies set by the build environment to improve reproducibility. This includes access to the network during the build outside of <function>fetch*</function> functions and files outside the Nix store. Depending on the operating system access to other resources are blocked as well (ex. inter process communication is isolated on Linux); see <link
|
|
||||||
xlink:href="https://nixos.org/nix/manual/#conf-sandbox">sandbox</link> in Nix manual for details.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
Sandboxing is not enabled by default in Nix due to a small performance hit on each build. In pull requests for <link
|
|
||||||
xlink:href="https://github.com/NixOS/nixpkgs/">nixpkgs</link> people are asked to test builds with sandboxing enabled (see <literal>Tested using sandboxing</literal> in the pull request template) because in<link
|
|
||||||
xlink:href="https://nixos.org/hydra/">https://nixos.org/hydra/</link> sandboxing is also used.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
Depending if you use NixOS or other platforms you can use one of the following methods to enable sandboxing <emphasis role="bold">before</emphasis> building the package:
|
|
||||||
<itemizedlist>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
<emphasis role="bold">Globally enable sandboxing on NixOS</emphasis>: add the following to <filename>configuration.nix</filename>
|
|
||||||
<screen>nix.useSandbox = true;</screen>
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
<emphasis role="bold">Globally enable sandboxing on non-NixOS platforms</emphasis>: add the following to: <filename>/etc/nix/nix.conf</filename>
|
|
||||||
<screen>sandbox = true</screen>
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</itemizedlist>
|
|
||||||
</para>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section xml:id="submitting-changes-platform-diversity">
|
|
||||||
<title>Built on platform(s)</title>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
Many Nix packages are designed to run on multiple platforms. As such, it's important to let the maintainer know which platforms your changes have been tested on. It's not always practical to test a change on all platforms, and is not required for a pull request to be merged. Only check the systems you tested the build on in this section.
|
|
||||||
</para>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section xml:id="submitting-changes-nixos-tests">
|
|
||||||
<title>Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)</title>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
Packages with automated tests are much more likely to be merged in a timely fashion because it doesn't require as much manual testing by the maintainer to verify the functionality of the package. If there are existing tests for the package, they should be run to verify your changes do not break the tests. Tests only apply to packages with NixOS modules defined and can only be run on Linux. For more details on writing and running tests, see the <link
|
|
||||||
xlink:href="https://nixos.org/nixos/manual/index.html#sec-nixos-tests">section in the NixOS manual</link>.
|
|
||||||
</para>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section xml:id="submitting-changes-tested-compilation">
|
|
||||||
<title>Tested compilation of all pkgs that depend on this change using <command>nixpkgs-review</command></title>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
If you are updating a package's version, you can use nixpkgs-review to make sure all packages that depend on the updated package still compile correctly. The <command>nixpkgs-review</command> utility can look for and build all dependencies either based on uncommited changes with the <literal>wip</literal> option or specifying a github pull request number.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
review changes from pull request number 12345:
|
|
||||||
<screen>nix run nixpkgs.nixpkgs-review -c nixpkgs-review pr 12345</screen>
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
review uncommitted changes:
|
|
||||||
<screen>nix run nixpkgs.nixpkgs-review -c nixpkgs-review wip</screen>
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
review changes from last commit:
|
|
||||||
<screen>nix run nixpkgs.nixpkgs-review -c nixpkgs-review rev HEAD</screen>
|
|
||||||
</para>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section xml:id="submitting-changes-tested-execution">
|
|
||||||
<title>Tested execution of all binary files (usually in <filename>./result/bin/</filename>)</title>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
It's important to test any executables generated by a build when you change or create a package in nixpkgs. This can be done by looking in <filename>./result/bin</filename> and running any files in there, or at a minimum, the main executable for the package. For example, if you make a change to <package>texlive</package>, you probably would only check the binaries associated with the change you made rather than testing all of them.
|
|
||||||
</para>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section xml:id="submitting-changes-contribution-standards">
|
|
||||||
<title>Meets Nixpkgs contribution standards</title>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
The last checkbox is fits <link
|
|
||||||
xlink:href="https://github.com/NixOS/nixpkgs/blob/master/.github/CONTRIBUTING.md">CONTRIBUTING.md</link>. The contributing document has detailed information on standards the Nix community has for commit messages, reviews, licensing of contributions you make to the project, etc... Everyone should read and understand the standards the community has for contributing before submitting a pull request.
|
|
||||||
</para>
|
|
||||||
</section>
|
|
||||||
</section>
|
|
||||||
<section xml:id="submitting-changes-hotfixing-pull-requests">
|
|
||||||
<title>Hotfixing pull requests</title>
|
|
||||||
|
|
||||||
<itemizedlist>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Make the appropriate changes in you branch.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Don't create additional commits, do
|
|
||||||
<itemizedlist>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
<command>git rebase -i</command>
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
<command>git push --force</command> to your branch.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</itemizedlist>
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</itemizedlist>
|
|
||||||
</section>
|
|
||||||
<section xml:id="submitting-changes-commit-policy">
|
|
||||||
<title>Commit policy</title>
|
|
||||||
|
|
||||||
<itemizedlist>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Commits must be sufficiently tested before being merged, both for the master and staging branches.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Hydra builds for master and staging should not be used as testing platform, it's a build farm for changes that have been already tested.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
When changing the bootloader installation process, extra care must be taken. Grub installations cannot be rolled back, hence changes may break people's installations forever. For any non-trivial change to the bootloader please file a PR asking for review, especially from @edolstra.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</itemizedlist>
|
|
||||||
|
|
||||||
<section xml:id="submitting-changes-master-branch">
|
|
||||||
<title>Master branch</title>
|
|
||||||
<para>
|
|
||||||
The <literal>master</literal> branch is the main development branch.
|
|
||||||
It should only see non-breaking commits that do not cause mass rebuilds.
|
|
||||||
</para>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section xml:id="submitting-changes-staging-branch">
|
|
||||||
<title>Staging branch</title>
|
|
||||||
<para>
|
|
||||||
The <literal>staging</literal> branch is a development branch where mass-rebuilds go.
|
|
||||||
It should only see non-breaking mass-rebuild commits.
|
|
||||||
That means it is not to be used for testing, and changes must have been well tested already.
|
|
||||||
If the branch is already in a broken state, please refrain from adding extra new breakages.
|
|
||||||
</para>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section xml:id="submitting-changes-staging-next-branch">
|
|
||||||
<title>Staging-next branch</title>
|
|
||||||
<para>
|
|
||||||
The <literal>staging-next</literal> branch is for stabilizing mass-rebuilds submitted to the <literal>staging</literal> branch prior to merging them into <literal>master</literal>.
|
|
||||||
Mass-rebuilds should go via the <literal>staging</literal> branch.
|
|
||||||
It should only see non-breaking commits that are fixing issues blocking it from being merged into the <literal>master </literal> branch.
|
|
||||||
</para>
|
|
||||||
<para>
|
|
||||||
If the branch is already in a broken state, please refrain from adding extra new breakages. Stabilize it for a few days and then merge into master.
|
|
||||||
</para>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section xml:id="submitting-changes-stable-release-branches">
|
|
||||||
<title>Stable release branches</title>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
For cherry-picking a commit to a stable release branch (<quote>backporting</quote>), use <literal>git cherry-pick -x <original commit></literal> so that the original commit id is included in the commit.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
Add a reason for the backport by using <literal>git cherry-pick -xe <original commit></literal> instead when it is not obvious from the original commit message. It is not needed when it’s a minor version update that includes security and bug fixes but don’t add new features or when the commit fixes an otherwise broken package.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
Here is an example of a cherry-picked commit message with good reason description:
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<screen>
|
|
||||||
zfs: Keep trying root import until it works
|
|
||||||
|
|
||||||
Works around #11003.
|
|
||||||
|
|
||||||
(cherry picked from commit 98b213a11041af39b39473906b595290e2a4e2f9)
|
|
||||||
|
|
||||||
Reason: several people cannot boot with ZFS on NVMe
|
|
||||||
</screen>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
Other examples of reasons are:
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<itemizedlist spacing="compact">
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Previously the build would fail due to, e.g., <literal>getaddrinfo</literal> not being defined
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
The previous download links were all broken
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Crash when starting on some X11 systems
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</itemizedlist>
|
|
||||||
</section>
|
|
||||||
</section>
|
|
||||||
</chapter>
|
|
14
third_party/nixpkgs/doc/default.nix
vendored
14
third_party/nixpkgs/doc/default.nix
vendored
|
@ -5,10 +5,22 @@ let
|
||||||
in pkgs.stdenv.mkDerivation {
|
in pkgs.stdenv.mkDerivation {
|
||||||
name = "nixpkgs-manual";
|
name = "nixpkgs-manual";
|
||||||
|
|
||||||
buildInputs = with pkgs; [ pandoc libxml2 libxslt zip jing xmlformat ];
|
nativeBuildInputs = with pkgs; [
|
||||||
|
pandoc
|
||||||
|
graphviz
|
||||||
|
libxml2
|
||||||
|
libxslt
|
||||||
|
zip
|
||||||
|
jing
|
||||||
|
xmlformat
|
||||||
|
];
|
||||||
|
|
||||||
src = ./.;
|
src = ./.;
|
||||||
|
|
||||||
|
makeFlags = [
|
||||||
|
"PANDOC_LUA_FILTERS_DIR=${pkgs.pandoc-lua-filters}/share/pandoc/filters"
|
||||||
|
];
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
ln -s ${doc-support} ./doc-support/result
|
ln -s ${doc-support} ./doc-support/result
|
||||||
'';
|
'';
|
||||||
|
|
158
third_party/nixpkgs/doc/languages-frameworks/bower.section.md
vendored
Normal file
158
third_party/nixpkgs/doc/languages-frameworks/bower.section.md
vendored
Normal file
|
@ -0,0 +1,158 @@
|
||||||
|
# Bower {#sec-bower}
|
||||||
|
|
||||||
|
[Bower](https://bower.io) is a package manager for web site front-end components. Bower packages (comprising of build artefacts and sometimes sources) are stored in `git` repositories, typically on Github. The package registry is run by the Bower team with package metadata coming from the `bower.json` file within each package.
|
||||||
|
|
||||||
|
The end result of running Bower is a `bower_components` directory which can be included in the web app's build process.
|
||||||
|
|
||||||
|
Bower can be run interactively, by installing `nodePackages.bower`. More interestingly, the Bower components can be declared in a Nix derivation, with the help of `nodePackages.bower2nix`.
|
||||||
|
|
||||||
|
## bower2nix usage {#ssec-bower2nix-usage}
|
||||||
|
|
||||||
|
Suppose you have a `bower.json` with the following contents:
|
||||||
|
|
||||||
|
### Example bower.json {#ex-bowerJson}
|
||||||
|
|
||||||
|
```json
|
||||||
|
"name": "my-web-app",
|
||||||
|
"dependencies": {
|
||||||
|
"angular": "~1.5.0",
|
||||||
|
"bootstrap": "~3.3.6"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Running `bower2nix` will produce something like the following output:
|
||||||
|
|
||||||
|
```nix
|
||||||
|
{ fetchbower, buildEnv }:
|
||||||
|
buildEnv { name = "bower-env"; ignoreCollisions = true; paths = [
|
||||||
|
(fetchbower "angular" "1.5.3" "~1.5.0" "1749xb0firxdra4rzadm4q9x90v6pzkbd7xmcyjk6qfza09ykk9y")
|
||||||
|
(fetchbower "bootstrap" "3.3.6" "~3.3.6" "1vvqlpbfcy0k5pncfjaiskj3y6scwifxygfqnw393sjfxiviwmbv")
|
||||||
|
(fetchbower "jquery" "2.2.2" "1.9.1 - 2" "10sp5h98sqwk90y4k6hbdviwqzvzwqf47r3r51pakch5ii2y7js1")
|
||||||
|
];
|
||||||
|
```
|
||||||
|
|
||||||
|
Using the `bower2nix` command line arguments, the output can be redirected to a file. A name like `bower-packages.nix` would be fine.
|
||||||
|
|
||||||
|
The resulting derivation is a union of all the downloaded Bower packages (and their dependencies). To use it, they still need to be linked together by Bower, which is where `buildBowerComponents` is useful.
|
||||||
|
|
||||||
|
## buildBowerComponents function {#ssec-build-bower-components}
|
||||||
|
|
||||||
|
The function is implemented in [pkgs/development/bower-modules/generic/default.nix](https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/bower-modules/generic/default.nix).
|
||||||
|
|
||||||
|
### Example buildBowerComponents {#ex-buildBowerComponents}
|
||||||
|
|
||||||
|
```{=docbook}
|
||||||
|
<programlisting language="nix">
|
||||||
|
bowerComponents = buildBowerComponents {
|
||||||
|
name = "my-web-app";
|
||||||
|
generated = ./bower-packages.nix; <co xml:id="ex-buildBowerComponents-1" />
|
||||||
|
src = myWebApp; <co xml:id="ex-buildBowerComponents-2" />
|
||||||
|
};
|
||||||
|
</programlisting>
|
||||||
|
```
|
||||||
|
|
||||||
|
In ["buildBowerComponents" example](#ex-buildBowerComponents) the following arguments are of special significance to the function:
|
||||||
|
|
||||||
|
```{=docbook}
|
||||||
|
<calloutlist>
|
||||||
|
<callout arearefs="ex-buildBowerComponents-1">
|
||||||
|
<para>
|
||||||
|
<varname>generated</varname> specifies the file which was created by <command>bower2nix</command>.
|
||||||
|
</para>
|
||||||
|
</callout>
|
||||||
|
<callout arearefs="ex-buildBowerComponents-2">
|
||||||
|
<para>
|
||||||
|
<varname>src</varname> is your project's sources. It needs to contain a <filename>bower.json</filename> file.
|
||||||
|
</para>
|
||||||
|
</callout>
|
||||||
|
</calloutlist>
|
||||||
|
```
|
||||||
|
|
||||||
|
`buildBowerComponents` will run Bower to link together the output of `bower2nix`, resulting in a `bower_components` directory which can be used.
|
||||||
|
|
||||||
|
Here is an example of a web frontend build process using `gulp`. You might use `grunt`, or anything else.
|
||||||
|
|
||||||
|
### Example build script (gulpfile.js) {#ex-bowerGulpFile}
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
var gulp = require('gulp');
|
||||||
|
|
||||||
|
gulp.task('default', [], function () {
|
||||||
|
gulp.start('build');
|
||||||
|
});
|
||||||
|
|
||||||
|
gulp.task('build', [], function () {
|
||||||
|
console.log("Just a dummy gulp build");
|
||||||
|
gulp
|
||||||
|
.src(["./bower_components/**/*"])
|
||||||
|
.pipe(gulp.dest("./gulpdist/"));
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
|
### Example Full example — default.nix {#ex-buildBowerComponentsDefaultNix}
|
||||||
|
|
||||||
|
```{=docbook}
|
||||||
|
<programlisting language="nix">
|
||||||
|
{ myWebApp ? { outPath = ./.; name = "myWebApp"; }
|
||||||
|
, pkgs ? import <nixpkgs> {}
|
||||||
|
}:
|
||||||
|
|
||||||
|
pkgs.stdenv.mkDerivation {
|
||||||
|
name = "my-web-app-frontend";
|
||||||
|
src = myWebApp;
|
||||||
|
|
||||||
|
buildInputs = [ pkgs.nodePackages.gulp ];
|
||||||
|
|
||||||
|
bowerComponents = pkgs.buildBowerComponents { <co xml:id="ex-buildBowerComponentsDefault-1" />
|
||||||
|
name = "my-web-app";
|
||||||
|
generated = ./bower-packages.nix;
|
||||||
|
src = myWebApp;
|
||||||
|
};
|
||||||
|
|
||||||
|
buildPhase = ''
|
||||||
|
cp --reflink=auto --no-preserve=mode -R $bowerComponents/bower_components . <co xml:id="ex-buildBowerComponentsDefault-2" />
|
||||||
|
export HOME=$PWD <co xml:id="ex-buildBowerComponentsDefault-3" />
|
||||||
|
${pkgs.nodePackages.gulp}/bin/gulp build <co xml:id="ex-buildBowerComponentsDefault-4" />
|
||||||
|
'';
|
||||||
|
|
||||||
|
installPhase = "mv gulpdist $out";
|
||||||
|
}
|
||||||
|
</programlisting>
|
||||||
|
```
|
||||||
|
|
||||||
|
A few notes about [Full example — `default.nix`](#ex-buildBowerComponentsDefaultNix):
|
||||||
|
|
||||||
|
```{=docbook}
|
||||||
|
<calloutlist>
|
||||||
|
<callout arearefs="ex-buildBowerComponentsDefault-1">
|
||||||
|
<para>
|
||||||
|
The result of <varname>buildBowerComponents</varname> is an input to the frontend build.
|
||||||
|
</para>
|
||||||
|
</callout>
|
||||||
|
<callout arearefs="ex-buildBowerComponentsDefault-2">
|
||||||
|
<para>
|
||||||
|
Whether to symlink or copy the <filename>bower_components</filename> directory depends on the build tool in use. In this case a copy is used to avoid <command>gulp</command> silliness with permissions.
|
||||||
|
</para>
|
||||||
|
</callout>
|
||||||
|
<callout arearefs="ex-buildBowerComponentsDefault-3">
|
||||||
|
<para>
|
||||||
|
<command>gulp</command> requires <varname>HOME</varname> to refer to a writeable directory.
|
||||||
|
</para>
|
||||||
|
</callout>
|
||||||
|
<callout arearefs="ex-buildBowerComponentsDefault-4">
|
||||||
|
<para>
|
||||||
|
The actual build command. Other tools could be used.
|
||||||
|
</para>
|
||||||
|
</callout>
|
||||||
|
</calloutlist>
|
||||||
|
```
|
||||||
|
|
||||||
|
## Troubleshooting {#ssec-bower2nix-troubleshooting}
|
||||||
|
|
||||||
|
### ENOCACHE errors from buildBowerComponents
|
||||||
|
|
||||||
|
This means that Bower was looking for a package version which doesn't exist in the generated `bower-packages.nix`.
|
||||||
|
|
||||||
|
If `bower.json` has been updated, then run `bower2nix` again.
|
||||||
|
|
||||||
|
It could also be a bug in `bower2nix` or `fetchbower`. If possible, try reformulating the version specification in `bower.json`.
|
|
@ -1,196 +0,0 @@
|
||||||
<section xmlns="http://docbook.org/ns/docbook"
|
|
||||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
||||||
xml:id="sec-bower">
|
|
||||||
<title>Bower</title>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
<link xlink:href="http://bower.io">Bower</link> is a package manager for web site front-end components. Bower packages (comprising of build artefacts and sometimes sources) are stored in <command>git</command> repositories, typically on Github. The package registry is run by the Bower team with package metadata coming from the <filename>bower.json</filename> file within each package.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
The end result of running Bower is a <filename>bower_components</filename> directory which can be included in the web app's build process.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
Bower can be run interactively, by installing <varname>nodePackages.bower</varname>. More interestingly, the Bower components can be declared in a Nix derivation, with the help of <varname>nodePackages.bower2nix</varname>.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<section xml:id="ssec-bower2nix-usage">
|
|
||||||
<title><command>bower2nix</command> usage</title>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
Suppose you have a <filename>bower.json</filename> with the following contents:
|
|
||||||
<example xml:id="ex-bowerJson">
|
|
||||||
<title><filename>bower.json</filename></title>
|
|
||||||
<programlisting language="json">
|
|
||||||
<![CDATA[{
|
|
||||||
"name": "my-web-app",
|
|
||||||
"dependencies": {
|
|
||||||
"angular": "~1.5.0",
|
|
||||||
"bootstrap": "~3.3.6"
|
|
||||||
}
|
|
||||||
}]]>
|
|
||||||
</programlisting>
|
|
||||||
</example>
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
Running <command>bower2nix</command> will produce something like the following output:
|
|
||||||
<programlisting language="nix">
|
|
||||||
<![CDATA[{ fetchbower, buildEnv }:
|
|
||||||
buildEnv { name = "bower-env"; ignoreCollisions = true; paths = [
|
|
||||||
(fetchbower "angular" "1.5.3" "~1.5.0" "1749xb0firxdra4rzadm4q9x90v6pzkbd7xmcyjk6qfza09ykk9y")
|
|
||||||
(fetchbower "bootstrap" "3.3.6" "~3.3.6" "1vvqlpbfcy0k5pncfjaiskj3y6scwifxygfqnw393sjfxiviwmbv")
|
|
||||||
(fetchbower "jquery" "2.2.2" "1.9.1 - 2" "10sp5h98sqwk90y4k6hbdviwqzvzwqf47r3r51pakch5ii2y7js1")
|
|
||||||
]; }]]>
|
|
||||||
</programlisting>
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
Using the <command>bower2nix</command> command line arguments, the output can be redirected to a file. A name like <filename>bower-packages.nix</filename> would be fine.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
The resulting derivation is a union of all the downloaded Bower packages (and their dependencies). To use it, they still need to be linked together by Bower, which is where <varname>buildBowerComponents</varname> is useful.
|
|
||||||
</para>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section xml:id="ssec-build-bower-components">
|
|
||||||
<title><varname>buildBowerComponents</varname> function</title>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
The function is implemented in <link xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/bower-modules/generic/default.nix"> <filename>pkgs/development/bower-modules/generic/default.nix</filename></link>. Example usage:
|
|
||||||
<example xml:id="ex-buildBowerComponents">
|
|
||||||
<title>buildBowerComponents</title>
|
|
||||||
<programlisting language="nix">
|
|
||||||
bowerComponents = buildBowerComponents {
|
|
||||||
name = "my-web-app";
|
|
||||||
generated = ./bower-packages.nix; <co xml:id="ex-buildBowerComponents-1" />
|
|
||||||
src = myWebApp; <co xml:id="ex-buildBowerComponents-2" />
|
|
||||||
};
|
|
||||||
</programlisting>
|
|
||||||
</example>
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
In <xref linkend="ex-buildBowerComponents" />, the following arguments are of special significance to the function:
|
|
||||||
<calloutlist>
|
|
||||||
<callout arearefs="ex-buildBowerComponents-1">
|
|
||||||
<para>
|
|
||||||
<varname>generated</varname> specifies the file which was created by <command>bower2nix</command>.
|
|
||||||
</para>
|
|
||||||
</callout>
|
|
||||||
<callout arearefs="ex-buildBowerComponents-2">
|
|
||||||
<para>
|
|
||||||
<varname>src</varname> is your project's sources. It needs to contain a <filename>bower.json</filename> file.
|
|
||||||
</para>
|
|
||||||
</callout>
|
|
||||||
</calloutlist>
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
<varname>buildBowerComponents</varname> will run Bower to link together the output of <command>bower2nix</command>, resulting in a <filename>bower_components</filename> directory which can be used.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
Here is an example of a web frontend build process using <command>gulp</command>. You might use <command>grunt</command>, or anything else.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<example xml:id="ex-bowerGulpFile">
|
|
||||||
<title>Example build script (<filename>gulpfile.js</filename>)</title>
|
|
||||||
<programlisting language="javascript">
|
|
||||||
<![CDATA[var gulp = require('gulp');
|
|
||||||
|
|
||||||
gulp.task('default', [], function () {
|
|
||||||
gulp.start('build');
|
|
||||||
});
|
|
||||||
|
|
||||||
gulp.task('build', [], function () {
|
|
||||||
console.log("Just a dummy gulp build");
|
|
||||||
gulp
|
|
||||||
.src(["./bower_components/**/*"])
|
|
||||||
.pipe(gulp.dest("./gulpdist/"));
|
|
||||||
});]]>
|
|
||||||
</programlisting>
|
|
||||||
</example>
|
|
||||||
|
|
||||||
<example xml:id="ex-buildBowerComponentsDefaultNix">
|
|
||||||
<title>Full example — <filename>default.nix</filename></title>
|
|
||||||
<programlisting language="nix">
|
|
||||||
{ myWebApp ? { outPath = ./.; name = "myWebApp"; }
|
|
||||||
, pkgs ? import <nixpkgs> {}
|
|
||||||
}:
|
|
||||||
|
|
||||||
pkgs.stdenv.mkDerivation {
|
|
||||||
name = "my-web-app-frontend";
|
|
||||||
src = myWebApp;
|
|
||||||
|
|
||||||
buildInputs = [ pkgs.nodePackages.gulp ];
|
|
||||||
|
|
||||||
bowerComponents = pkgs.buildBowerComponents { <co xml:id="ex-buildBowerComponentsDefault-1" />
|
|
||||||
name = "my-web-app";
|
|
||||||
generated = ./bower-packages.nix;
|
|
||||||
src = myWebApp;
|
|
||||||
};
|
|
||||||
|
|
||||||
buildPhase = ''
|
|
||||||
cp --reflink=auto --no-preserve=mode -R $bowerComponents/bower_components . <co xml:id="ex-buildBowerComponentsDefault-2" />
|
|
||||||
export HOME=$PWD <co xml:id="ex-buildBowerComponentsDefault-3" />
|
|
||||||
${pkgs.nodePackages.gulp}/bin/gulp build <co xml:id="ex-buildBowerComponentsDefault-4" />
|
|
||||||
'';
|
|
||||||
|
|
||||||
installPhase = "mv gulpdist $out";
|
|
||||||
}
|
|
||||||
</programlisting>
|
|
||||||
</example>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
A few notes about <xref linkend="ex-buildBowerComponentsDefaultNix" />:
|
|
||||||
<calloutlist>
|
|
||||||
<callout arearefs="ex-buildBowerComponentsDefault-1">
|
|
||||||
<para>
|
|
||||||
The result of <varname>buildBowerComponents</varname> is an input to the frontend build.
|
|
||||||
</para>
|
|
||||||
</callout>
|
|
||||||
<callout arearefs="ex-buildBowerComponentsDefault-2">
|
|
||||||
<para>
|
|
||||||
Whether to symlink or copy the <filename>bower_components</filename> directory depends on the build tool in use. In this case a copy is used to avoid <command>gulp</command> silliness with permissions.
|
|
||||||
</para>
|
|
||||||
</callout>
|
|
||||||
<callout arearefs="ex-buildBowerComponentsDefault-3">
|
|
||||||
<para>
|
|
||||||
<command>gulp</command> requires <varname>HOME</varname> to refer to a writeable directory.
|
|
||||||
</para>
|
|
||||||
</callout>
|
|
||||||
<callout arearefs="ex-buildBowerComponentsDefault-4">
|
|
||||||
<para>
|
|
||||||
The actual build command. Other tools could be used.
|
|
||||||
</para>
|
|
||||||
</callout>
|
|
||||||
</calloutlist>
|
|
||||||
</para>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section xml:id="ssec-bower2nix-troubleshooting">
|
|
||||||
<title>Troubleshooting</title>
|
|
||||||
|
|
||||||
<variablelist>
|
|
||||||
<varlistentry>
|
|
||||||
<term>
|
|
||||||
<literal>ENOCACHE</literal> errors from <varname>buildBowerComponents</varname>
|
|
||||||
</term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
This means that Bower was looking for a package version which doesn't exist in the generated <filename>bower-packages.nix</filename>.
|
|
||||||
</para>
|
|
||||||
<para>
|
|
||||||
If <filename>bower.json</filename> has been updated, then run <command>bower2nix</command> again.
|
|
||||||
</para>
|
|
||||||
<para>
|
|
||||||
It could also be a bug in <command>bower2nix</command> or <command>fetchbower</command>. If possible, try reformulating the version specification in <filename>bower.json</filename>.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
</variablelist>
|
|
||||||
</section>
|
|
||||||
</section>
|
|
186
third_party/nixpkgs/doc/languages-frameworks/gnome.section.md
vendored
Normal file
186
third_party/nixpkgs/doc/languages-frameworks/gnome.section.md
vendored
Normal file
|
@ -0,0 +1,186 @@
|
||||||
|
# GNOME {#sec-language-gnome}
|
||||||
|
|
||||||
|
## Packaging GNOME applications {#ssec-gnome-packaging}
|
||||||
|
|
||||||
|
Programs in the GNOME universe are written in various languages but they all use GObject-based libraries like GLib, GTK or GStreamer. These libraries are often modular, relying on looking into certain directories to find their modules. However, due to Nix’s specific file system organization, this will fail without our intervention. Fortunately, the libraries usually allow overriding the directories through environment variables, either natively or thanks to a patch in nixpkgs. [Wrapping](#fun-wrapProgram) the executables to ensure correct paths are available to the application constitutes a significant part of packaging a modern desktop application. In this section, we will describe various modules needed by such applications, environment variables needed to make the modules load, and finally a script that will do the work for us.
|
||||||
|
|
||||||
|
### Settings {#ssec-gnome-settings}
|
||||||
|
|
||||||
|
[GSettings](https://developer.gnome.org/gio/stable/GSettings.html) API is often used for storing settings. GSettings schemas are required, to know the type and other metadata of the stored values. GLib looks for `glib-2.0/schemas/gschemas.compiled` files inside the directories of `XDG_DATA_DIRS`.
|
||||||
|
|
||||||
|
On Linux, GSettings API is implemented using [dconf](https://wiki.gnome.org/Projects/dconf) backend. You will need to add `dconf` GIO module to `GIO_EXTRA_MODULES` variable, otherwise the `memory` backend will be used and the saved settings will not be persistent.
|
||||||
|
|
||||||
|
Last you will need the dconf database D-Bus service itself. You can enable it using `programs.dconf.enable`.
|
||||||
|
|
||||||
|
Some applications will also require `gsettings-desktop-schemas` for things like reading proxy configuration or user interface customization. This dependency is often not mentioned by upstream, you should grep for `org.gnome.desktop` and `org.gnome.system` to see if the schemas are needed.
|
||||||
|
|
||||||
|
### GdkPixbuf loaders {#ssec-gnome-gdk-pixbuf-loaders}
|
||||||
|
|
||||||
|
GTK applications typically use [GdkPixbuf](https://developer.gnome.org/gdk-pixbuf/stable/) to load images. But `gdk-pixbuf` package only supports basic bitmap formats like JPEG, PNG or TIFF, requiring to use third-party loader modules for other formats. This is especially painful since GTK itself includes SVG icons, which cannot be rendered without a loader provided by `librsvg`.
|
||||||
|
|
||||||
|
Unlike other libraries mentioned in this section, GdkPixbuf only supports a single value in its controlling environment variable `GDK_PIXBUF_MODULE_FILE`. It is supposed to point to a cache file containing information about the available loaders. Each loader package will contain a `lib/gdk-pixbuf-2.0/2.10.0/loaders.cache` file describing the default loaders in `gdk-pixbuf` package plus the loader contained in the package itself. If you want to use multiple third-party loaders, you will need to create your own cache file manually. Fortunately, this is pretty rare as [not many loaders exist](https://gitlab.gnome.org/federico/gdk-pixbuf-survey/blob/master/src/modules.md).
|
||||||
|
|
||||||
|
`gdk-pixbuf` contains [a setup hook](#ssec-gnome-hooks-gdk-pixbuf) that sets `GDK_PIXBUF_MODULE_FILE` from dependencies but as mentioned in further section, it is pretty limited. Loaders should propagate this setup hook.
|
||||||
|
|
||||||
|
### Icons {#ssec-gnome-icons}
|
||||||
|
|
||||||
|
When an application uses icons, an icon theme should be available in `XDG_DATA_DIRS` during runtime. The package for the default, icon-less [hicolor-icon-theme](https://www.freedesktop.org/wiki/Software/icon-theme/) (should be propagated by every icon theme) contains [a setup hook](#ssec-gnome-hooks-hicolor-icon-theme) that will pick up icon themes from `buildInputs` and pass it to our wrapper. Unfortunately, relying on that would mean every user has to download the theme included in the package expression no matter their preference. For that reason, we leave the installation of icon theme on the user. If you use one of the desktop environments, you probably already have an icon theme installed.
|
||||||
|
|
||||||
|
To avoid costly file system access when locating icons, GTK, [as well as Qt](https://woboq.com/blog/qicon-reads-gtk-icon-cache-in-qt57.html), can rely on `icon-theme.cache` files from the themes' top-level directories. These files are generated using `gtk-update-icon-cache`, which is expected to be run whenever an icon is added or removed to an icon theme (typically an application icon into `hicolor` theme) and some programs do indeed run this after icon installation. However, since packages are installed into their own prefix by Nix, this would lead to conflicts. For that reason, `gtk3` provides a [setup hook](#ssec-gnome-hooks-gtk-drop-icon-theme-cache) that will clean the file from installation. Since most applications only ship their own icon that will be loaded on start-up, it should not affect them too much. On the other hand, icon themes are much larger and more widely used so we need to cache them. Because we recommend installing icon themes globally, we will generate the cache files from all packages in a profile using a NixOS module. You can enable the cache generation using `gtk.iconCache.enable` option if your desktop environment does not already do that.
|
||||||
|
|
||||||
|
### Packaging icon themes {#ssec-icon-theme-packaging}
|
||||||
|
|
||||||
|
Icon themes may inherit from other icon themes. The inheritance is specified using the `Inherits` key in the `index.theme` file distributed with the icon theme. According to the [icon theme specification](https://specifications.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html), icons not provided by the theme are looked for in its parent icon themes. Therefore the parent themes should be installed as dependencies for a more complete experience regarding the icon sets used.
|
||||||
|
|
||||||
|
The package `hicolor-icon-theme` provides a setup hook which makes symbolic links for the parent themes into the directory `share/icons` of the current theme directory in the nix store, making sure they can be found at runtime. For that to work the packages providing parent icon themes should be listed as propagated build dependencies, together with `hicolor-icon-theme`.
|
||||||
|
|
||||||
|
Also make sure that `icon-theme.cache` is installed for each theme provided by the package, and set `dontDropIconThemeCache` to `true` so that the cache file is not removed by the `gtk3` setup hook.
|
||||||
|
|
||||||
|
### GTK Themes {#ssec-gnome-themes}
|
||||||
|
|
||||||
|
Previously, a GTK theme needed to be in `XDG_DATA_DIRS`. This is no longer necessary for most programs since GTK incorporated Adwaita theme. Some programs (for example, those designed for [elementary HIG](https://elementary.io/docs/human-interface-guidelines#human-interface-guidelines)) might require a special theme like `pantheon.elementary-gtk-theme`.
|
||||||
|
|
||||||
|
### GObject introspection typelibs {#ssec-gnome-typelibs}
|
||||||
|
|
||||||
|
[GObject introspection](https://wiki.gnome.org/Projects/GObjectIntrospection) allows applications to use C libraries in other languages easily. It does this through `typelib` files searched in `GI_TYPELIB_PATH`.
|
||||||
|
|
||||||
|
### Various plug-ins {#ssec-gnome-plugins}
|
||||||
|
|
||||||
|
If your application uses [GStreamer](https://gstreamer.freedesktop.org/) or [Grilo](https://wiki.gnome.org/Projects/Grilo), you should set `GST_PLUGIN_SYSTEM_PATH_1_0` and `GRL_PLUGIN_PATH`, respectively.
|
||||||
|
|
||||||
|
## Onto `wrapGAppsHook` {#ssec-gnome-hooks}
|
||||||
|
|
||||||
|
Given the requirements above, the package expression would become messy quickly:
|
||||||
|
|
||||||
|
```nix
|
||||||
|
preFixup = ''
|
||||||
|
for f in $(find $out/bin/ $out/libexec/ -type f -executable); do
|
||||||
|
wrapProgram "$f" \
|
||||||
|
--prefix GIO_EXTRA_MODULES : "${getLib dconf}/lib/gio/modules" \
|
||||||
|
--prefix XDG_DATA_DIRS : "$out/share" \
|
||||||
|
--prefix XDG_DATA_DIRS : "$out/share/gsettings-schemas/${name}" \
|
||||||
|
--prefix XDG_DATA_DIRS : "${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name}" \
|
||||||
|
--prefix XDG_DATA_DIRS : "${hicolor-icon-theme}/share" \
|
||||||
|
--prefix GI_TYPELIB_PATH : "${lib.makeSearchPath "lib/girepository-1.0" [ pango json-glib ]}"
|
||||||
|
done
|
||||||
|
'';
|
||||||
|
```
|
||||||
|
|
||||||
|
Fortunately, there is [`wrapGAppsHook`]{#ssec-gnome-hooks-wrapgappshook}. It works in conjunction with other setup hooks that populate environment variables, and it will then wrap all executables in `bin` and `libexec` directories using said variables.
|
||||||
|
|
||||||
|
For convenience, it also adds `dconf.lib` for a GIO module implementing a GSettings backend using `dconf`, `gtk3` for GSettings schemas, and `librsvg` for GdkPixbuf loader to the closure. In case you are packaging a program without a graphical interface, you might want to use [`wrapGAppsNoGuiHook`]{#ssec-gnome-hooks-wrapgappsnoguihook}, which runs the same script as `wrapGAppsHook` but does not bring `gtk3` and `librsvg` into the closure.
|
||||||
|
|
||||||
|
- `wrapGAppsHook` itself will add the package’s `share` directory to `XDG_DATA_DIRS`.
|
||||||
|
|
||||||
|
- []{#ssec-gnome-hooks-glib} `glib` setup hook will populate `GSETTINGS_SCHEMAS_PATH` and then `wrapGAppsHook` will prepend it to `XDG_DATA_DIRS`.
|
||||||
|
|
||||||
|
- []{#ssec-gnome-hooks-gdk-pixbuf} `gdk-pixbuf` setup hook will populate `GDK_PIXBUF_MODULE_FILE` with the path to biggest `loaders.cache` file from the dependencies containing [GdkPixbuf loaders](ssec-gnome-gdk-pixbuf-loaders). This works fine when there are only two packages containing loaders (`gdk-pixbuf` and e.g. `librsvg`) – it will choose the second one, reasonably expecting that it will be bigger since it describes extra loader in addition to the default ones. But when there are more than two loader packages, this logic will break. One possible solution would be constructing a custom cache file for each package containing a program like `services/x11/gdk-pixbuf.nix` NixOS module does. `wrapGAppsHook` copies the `GDK_PIXBUF_MODULE_FILE` environment variable into the produced wrapper.
|
||||||
|
|
||||||
|
- []{#ssec-gnome-hooks-gtk-drop-icon-theme-cache} One of `gtk3`’s setup hooks will remove `icon-theme.cache` files from package’s icon theme directories to avoid conflicts. Icon theme packages should prevent this with `dontDropIconThemeCache = true;`.
|
||||||
|
|
||||||
|
- []{#ssec-gnome-hooks-dconf} `dconf.lib` is a dependency of `wrapGAppsHook`, which then also adds it to the `GIO_EXTRA_MODULES` variable.
|
||||||
|
|
||||||
|
- []{#ssec-gnome-hooks-hicolor-icon-theme} `hicolor-icon-theme`’s setup hook will add icon themes to `XDG_ICON_DIRS` which is prepended to `XDG_DATA_DIRS` by `wrapGAppsHook`.
|
||||||
|
|
||||||
|
- []{#ssec-gnome-hooks-gobject-introspection} `gobject-introspection` setup hook populates `GI_TYPELIB_PATH` variable with `lib/girepository-1.0` directories of dependencies, which is then added to wrapper by `wrapGAppsHook`. It also adds `share` directories of dependencies to `XDG_DATA_DIRS`, which is intended to promote GIR files but it also [pollutes the closures](https://github.com/NixOS/nixpkgs/issues/32790) of packages using `wrapGAppsHook`.
|
||||||
|
|
||||||
|
::: warning
|
||||||
|
The setup hook [currently](https://github.com/NixOS/nixpkgs/issues/56943) does not work in expressions with `strictDeps` enabled, like Python packages. In those cases, you will need to disable it with `strictDeps = false;`.
|
||||||
|
:::
|
||||||
|
|
||||||
|
- []{#ssec-gnome-hooks-gst-grl-plugins} Setup hooks of `gst_all_1.gstreamer` and `gnome3.grilo` will populate the `GST_PLUGIN_SYSTEM_PATH_1_0` and `GRL_PLUGIN_PATH` variables, respectively, which will then be added to the wrapper by `wrapGAppsHook`.
|
||||||
|
|
||||||
|
You can also pass additional arguments to `makeWrapper` using `gappsWrapperArgs` in `preFixup` hook:
|
||||||
|
|
||||||
|
```nix
|
||||||
|
preFixup = ''
|
||||||
|
gappsWrapperArgs+=(
|
||||||
|
# Thumbnailers
|
||||||
|
--prefix XDG_DATA_DIRS : "${gdk-pixbuf}/share"
|
||||||
|
--prefix XDG_DATA_DIRS : "${librsvg}/share"
|
||||||
|
--prefix XDG_DATA_DIRS : "${shared-mime-info}/share"
|
||||||
|
)
|
||||||
|
'';
|
||||||
|
```
|
||||||
|
|
||||||
|
## Updating GNOME packages {#ssec-gnome-updating}
|
||||||
|
|
||||||
|
Most GNOME package offer [`updateScript`](#var-passthru-updateScript), it is therefore possible to update to latest source tarball by running `nix-shell maintainers/scripts/update.nix --argstr package gnome3.nautilus` or even en masse with `nix-shell maintainers/scripts/update.nix --argstr path gnome3`. Read the package’s `NEWS` file to see what changed.
|
||||||
|
|
||||||
|
## Frequently encountered issues {#ssec-gnome-common-issues}
|
||||||
|
|
||||||
|
#### `GLib-GIO-ERROR **: 06:04:50.903: No GSettings schemas are installed on the system` {#ssec-gnome-common-issues-no-schemas}
|
||||||
|
|
||||||
|
There are no schemas available in `XDG_DATA_DIRS`. Temporarily add a random package containing schemas like `gsettings-desktop-schemas` to `buildInputs`. [`glib`](#ssec-gnome-hooks-glib) and [`wrapGAppsHook`](#ssec-gnome-hooks-wrapgappshook) setup hooks will take care of making the schemas available to application and you will see the actual missing schemas with the [next error](#ssec-gnome-common-issues-missing-schema). Or you can try looking through the source code for the actual schemas used.
|
||||||
|
|
||||||
|
#### `GLib-GIO-ERROR **: 06:04:50.903: Settings schema ‘org.gnome.foo’ is not installed` {#ssec-gnome-common-issues-missing-schema}
|
||||||
|
|
||||||
|
Package is missing some GSettings schemas. You can find out the package containing the schema with `nix-locate org.gnome.foo.gschema.xml` and let the hooks handle the wrapping as [above](#ssec-gnome-common-issues-no-schemas).
|
||||||
|
|
||||||
|
#### When using `wrapGAppsHook` with special derivers you can end up with double wrapped binaries. {#ssec-gnome-common-issues-double-wrapped}
|
||||||
|
|
||||||
|
This is because derivers like `python.pkgs.buildPythonApplication` or `qt5.mkDerivation` have setup-hooks automatically added that produce wrappers with makeWrapper. The simplest way to workaround that is to disable the `wrapGAppsHook` automatic wrapping with `dontWrapGApps = true;` and pass the arguments it intended to pass to makeWrapper to another.
|
||||||
|
|
||||||
|
In the case of a Python application it could look like:
|
||||||
|
|
||||||
|
```nix
|
||||||
|
python3.pkgs.buildPythonApplication {
|
||||||
|
pname = "gnome-music";
|
||||||
|
version = "3.32.2";
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
wrapGAppsHook
|
||||||
|
gobject-introspection
|
||||||
|
...
|
||||||
|
];
|
||||||
|
|
||||||
|
dontWrapGApps = true;
|
||||||
|
|
||||||
|
# Arguments to be passed to `makeWrapper`, only used by buildPython*
|
||||||
|
preFixup = ''
|
||||||
|
makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
And for a QT app like:
|
||||||
|
|
||||||
|
```nix
|
||||||
|
mkDerivation {
|
||||||
|
pname = "calibre";
|
||||||
|
version = "3.47.0";
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
wrapGAppsHook
|
||||||
|
qmake
|
||||||
|
...
|
||||||
|
];
|
||||||
|
|
||||||
|
dontWrapGApps = true;
|
||||||
|
|
||||||
|
# Arguments to be passed to `makeWrapper`, only used by qt5’s mkDerivation
|
||||||
|
preFixup = ''
|
||||||
|
qtWrapperArgs+=("''${gappsWrapperArgs[@]}")
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
#### I am packaging a project that cannot be wrapped, like a library or GNOME Shell extension. {#ssec-gnome-common-issues-unwrappable-package}
|
||||||
|
|
||||||
|
You can rely on applications depending on the library setting the necessary environment variables but that is often easy to miss. Instead we recommend to patch the paths in the source code whenever possible. Here are some examples:
|
||||||
|
|
||||||
|
- []{#ssec-gnome-common-issues-unwrappable-package-gnome-shell-ext} [Replacing a `GI_TYPELIB_PATH` in GNOME Shell extension](https://github.com/NixOS/nixpkgs/blob/7bb8f05f12ca3cff9da72b56caa2f7472d5732bc/pkgs/desktops/gnome-3/core/gnome-shell-extensions/default.nix#L21-L24) – we are using `substituteAll` to include the path to a typelib into a patch.
|
||||||
|
|
||||||
|
- []{#ssec-gnome-common-issues-unwrappable-package-gsettings} The following examples are hardcoding GSettings schema paths. To get the schema paths we use the functions
|
||||||
|
|
||||||
|
* `glib.getSchemaPath` Takes a nix package attribute as an argument.
|
||||||
|
|
||||||
|
* `glib.makeSchemaPath` Takes a package output like `$out` and a derivation name. You should use this if the schemas you need to hardcode are in the same derivation.
|
||||||
|
|
||||||
|
[]{#ssec-gnome-common-issues-unwrappable-package-gsettings-vala} [Hard-coding GSettings schema path in Vala plug-in (dynamically loaded library)](https://github.com/NixOS/nixpkgs/blob/7bb8f05f12ca3cff9da72b56caa2f7472d5732bc/pkgs/desktops/pantheon/apps/elementary-files/default.nix#L78-L86) – here, `substituteAll` cannot be used since the schema comes from the same package preventing us from pass its path to the function, probably due to a [Nix bug](https://github.com/NixOS/nix/issues/1846).
|
||||||
|
|
||||||
|
[]{#ssec-gnome-common-issues-unwrappable-package-gsettings-c} [Hard-coding GSettings schema path in C library](https://github.com/NixOS/nixpkgs/blob/29c120c065d03b000224872251bed93932d42412/pkgs/development/libraries/glib-networking/default.nix#L31-L34) – nothing special other than using [Coccinelle patch](https://github.com/NixOS/nixpkgs/pull/67957#issuecomment-527717467) to generate the patch itself.
|
||||||
|
|
||||||
|
#### I need to wrap a binary outside `bin` and `libexec` directories. {#ssec-gnome-common-issues-weird-location}
|
||||||
|
|
||||||
|
You can manually trigger the wrapping with `wrapGApp` in `preFixup` phase. It takes a path to a program as a first argument; the remaining arguments are passed directly to [`wrapProgram`](#fun-wrapProgram) function.
|
|
@ -1,327 +0,0 @@
|
||||||
<section xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="sec-language-gnome">
|
|
||||||
<title>GNOME</title>
|
|
||||||
|
|
||||||
<section xml:id="ssec-gnome-packaging">
|
|
||||||
<title>Packaging GNOME applications</title>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
Programs in the GNOME universe are written in various languages but they all use GObject-based libraries like GLib, GTK or GStreamer. These libraries are often modular, relying on looking into certain directories to find their modules. However, due to Nix’s specific file system organization, this will fail without our intervention. Fortunately, the libraries usually allow overriding the directories through environment variables, either natively or thanks to a patch in nixpkgs. <link xlink:href="#fun-wrapProgram">Wrapping</link> the executables to ensure correct paths are available to the application constitutes a significant part of packaging a modern desktop application. In this section, we will describe various modules needed by such applications, environment variables needed to make the modules load, and finally a script that will do the work for us.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<section xml:id="ssec-gnome-settings">
|
|
||||||
<title>Settings</title>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
<link xlink:href="https://developer.gnome.org/gio/stable/GSettings.html">GSettings</link> API is often used for storing settings. GSettings schemas are required, to know the type and other metadata of the stored values. GLib looks for <filename>glib-2.0/schemas/gschemas.compiled</filename> files inside the directories of <envar>XDG_DATA_DIRS</envar>.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
On Linux, GSettings API is implemented using <link xlink:href="https://wiki.gnome.org/Projects/dconf">dconf</link> backend. You will need to add <literal>dconf</literal> GIO module to <envar>GIO_EXTRA_MODULES</envar> variable, otherwise the <literal>memory</literal> backend will be used and the saved settings will not be persistent.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
Last you will need the dconf database D-Bus service itself. You can enable it using <option>programs.dconf.enable</option>.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
Some applications will also require <package>gsettings-desktop-schemas</package> for things like reading proxy configuration or user interface customization. This dependency is often not mentioned by upstream, you should grep for <literal>org.gnome.desktop</literal> and <literal>org.gnome.system</literal> to see if the schemas are needed.
|
|
||||||
</para>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section xml:id="ssec-gnome-gdk-pixbuf-loaders">
|
|
||||||
<title>GdkPixbuf loaders</title>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
GTK applications typically use <link xlink:href="https://developer.gnome.org/gdk-pixbuf/stable/">GdkPixbuf</link> to load images. But <package>gdk-pixbuf</package> package only supports basic bitmap formats like JPEG, PNG or TIFF, requiring to use third-party loader modules for other formats. This is especially painful since GTK itself includes SVG icons, which cannot be rendered without a loader provided by <package>librsvg</package>.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
Unlike other libraries mentioned in this section, GdkPixbuf only supports a single value in its controlling environment variable <envar>GDK_PIXBUF_MODULE_FILE</envar>. It is supposed to point to a cache file containing information about the available loaders. Each loader package will contain a <filename>lib/gdk-pixbuf-2.0/2.10.0/loaders.cache</filename> file describing the default loaders in <package>gdk-pixbuf</package> package plus the loader contained in the package itself. If you want to use multiple third-party loaders, you will need to create your own cache file manually. Fortunately, this is pretty rare as <link xlink:href="https://gitlab.gnome.org/federico/gdk-pixbuf-survey/blob/master/src/modules.md">not many loaders exist</link>.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
<package>gdk-pixbuf</package> contains <link linkend="ssec-gnome-hooks-gdk-pixbuf">a setup hook</link> that sets <envar>GDK_PIXBUF_MODULE_FILE</envar> from dependencies but as mentioned in further section, it is pretty limited. Loaders should propagate this setup hook.
|
|
||||||
</para>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section xml:id="ssec-gnome-icons">
|
|
||||||
<title>Icons</title>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
When an application uses icons, an icon theme should be available in <envar>XDG_DATA_DIRS</envar> during runtime. The package for the default, icon-less <link xlink:href="https://www.freedesktop.org/wiki/Software/icon-theme/">hicolor-icon-theme</link> (should be propagated by every icon theme) contains <link linkend="ssec-gnome-hooks-hicolor-icon-theme">a setup hook</link> that will pick up icon themes from <literal>buildInputs</literal> and pass it to our wrapper. Unfortunately, relying on that would mean every user has to download the theme included in the package expression no matter their preference. For that reason, we leave the installation of icon theme on the user. If you use one of the desktop environments, you probably already have an icon theme installed.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
To avoid costly file system access when locating icons, GTK, <link xlink:href="https://woboq.com/blog/qicon-reads-gtk-icon-cache-in-qt57.html">as well as Qt</link>, can rely on <filename>icon-theme.cache</filename> files from the themes’ top-level directories. These files are generated using <command>gtk-update-icon-cache</command>, which is expected to be run whenever an icon is added or removed to an icon theme (typically an application icon into <literal>hicolor</literal> theme) and some programs do indeed run this after icon installation. However, since packages are installed into their own prefix by Nix, this would lead to conflicts. For that reason, <package>gtk3</package> provides a <link xlink:href="#ssec-gnome-hooks-gtk-drop-icon-theme-cache">setup hook</link> that will clean the file from installation. Since most applications only ship their own icon that will be loaded on start-up, it should not affect them too much. On the other hand, icon themes are much larger and more widely used so we need to cache them. Because we recommend installing icon themes globally, we will generate the cache files from all packages in a profile using a NixOS module. You can enable the cache generation using <option>gtk.iconCache.enable</option> option if your desktop environment does not already do that.
|
|
||||||
</para>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section xml:id="ssec-icon-theme-packaging">
|
|
||||||
<title>Packaging icon themes</title>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
Icon themes may inherit from other icon themes. The inheritance is specified using the <literal>Inherits</literal> key in the <filename>index.theme</filename> file distributed with the icon theme. According to the <link xlink:href="https://specifications.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html">icon theme specification</link>, icons not provided by the theme are looked for in its parent icon themes. Therefore the parent themes should be installed as dependencies for a more complete experience regarding the icon sets used.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
The package <package>hicolor-icon-theme</package> provides a setup hook which makes symbolic links for the parent themes into the directory <filename>share/icons</filename> of the current theme directory in the nix store, making sure they can be found at runtime. For that to work the packages providing parent icon themes should be listed as propagated build dependencies, together with <package>hicolor-icon-theme</package>.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
Also make sure that <filename>icon-theme.cache</filename> is installed for each theme provided by the package, and set <code>dontDropIconThemeCache</code> to <code>true</code> so that the cache file is not removed by the <package>gtk3</package> setup hook.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section xml:id="ssec-gnome-themes">
|
|
||||||
<title>GTK Themes</title>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
Previously, a GTK theme needed to be in <envar>XDG_DATA_DIRS</envar>. This is no longer necessary for most programs since GTK incorporated Adwaita theme. Some programs (for example, those designed for <link xlink:href="https://elementary.io/docs/human-interface-guidelines#human-interface-guidelines">elementary HIG</link>) might require a special theme like <package>pantheon.elementary-gtk-theme</package>.
|
|
||||||
</para>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section xml:id="ssec-gnome-typelibs">
|
|
||||||
<title>GObject introspection typelibs</title>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
<link xlink:href="https://wiki.gnome.org/Projects/GObjectIntrospection">GObject introspection</link> allows applications to use C libraries in other languages easily. It does this through <literal>typelib</literal> files searched in <envar>GI_TYPELIB_PATH</envar>.
|
|
||||||
</para>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section xml:id="ssec-gnome-plugins">
|
|
||||||
<title>Various plug-ins</title>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
If your application uses <link xlink:href="https://gstreamer.freedesktop.org/">GStreamer</link> or <link xlink:href="https://wiki.gnome.org/Projects/Grilo">Grilo</link>, you should set <envar>GST_PLUGIN_SYSTEM_PATH_1_0</envar> and <envar>GRL_PLUGIN_PATH</envar>, respectively.
|
|
||||||
</para>
|
|
||||||
</section>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section xml:id="ssec-gnome-hooks">
|
|
||||||
<title>Onto <package>wrapGAppsHook</package></title>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
Given the requirements above, the package expression would become messy quickly:
|
|
||||||
<programlisting>
|
|
||||||
preFixup = ''
|
|
||||||
for f in $(find $out/bin/ $out/libexec/ -type f -executable); do
|
|
||||||
wrapProgram "$f" \
|
|
||||||
--prefix GIO_EXTRA_MODULES : "${getLib dconf}/lib/gio/modules" \
|
|
||||||
--prefix XDG_DATA_DIRS : "$out/share" \
|
|
||||||
--prefix XDG_DATA_DIRS : "$out/share/gsettings-schemas/${name}" \
|
|
||||||
--prefix XDG_DATA_DIRS : "${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name}" \
|
|
||||||
--prefix XDG_DATA_DIRS : "${hicolor-icon-theme}/share" \
|
|
||||||
--prefix GI_TYPELIB_PATH : "${lib.makeSearchPath "lib/girepository-1.0" [ pango json-glib ]}"
|
|
||||||
done
|
|
||||||
'';
|
|
||||||
</programlisting>
|
|
||||||
</para>
|
|
||||||
<para>
|
|
||||||
Fortunately, there is <package xml:id="ssec-gnome-hooks-wrapgappshook">wrapGAppsHook</package>. It works in conjunction with other setup hooks that populate environment variables, and it will then wrap all executables in <filename>bin</filename> and <filename>libexec</filename> directories using said variables.
|
|
||||||
</para>
|
|
||||||
<para>
|
|
||||||
For convenience, it also adds <package>dconf.lib</package> for a GIO module implementing a GSettings backend using <package>dconf</package>, <package>gtk3</package> for GSettings schemas, and <package>librsvg</package> for GdkPixbuf loader to the closure. In case you are packaging a program without a graphical interface, you might want to use <package xml:id="ssec-gnome-hooks-wrapgappsnoguihook">wrapGAppsNoGuiHook</package>, which runs the same script as <package>wrapGAppsHook</package> but does not bring <package>gtk3</package> and <package>librsvg</package> into the closure.
|
|
||||||
</para>
|
|
||||||
<para>
|
|
||||||
<itemizedlist>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
<package>wrapGAppsHook</package> itself will add the package’s <filename>share</filename> directory to <envar>XDG_DATA_DIRS</envar>.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
<listitem xml:id="ssec-gnome-hooks-glib">
|
|
||||||
<para>
|
|
||||||
<package>glib</package> setup hook will populate <envar>GSETTINGS_SCHEMAS_PATH</envar> and then <package>wrapGAppsHook</package> will prepend it to <envar>XDG_DATA_DIRS</envar>.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
<listitem xml:id="ssec-gnome-hooks-gdk-pixbuf">
|
|
||||||
<para>
|
|
||||||
<package>gdk-pixbuf</package> setup hook will populate <envar>GDK_PIXBUF_MODULE_FILE</envar> with the path to biggest <filename>loaders.cache</filename> file from the dependencies containing <link xlink:href="ssec-gnome-gdk-pixbuf-loaders">GdkPixbuf loaders</link>. This works fine when there are only two packages containing loaders (<package>gdk-pixbuf</package> and e.g. <package>librsvg</package>) – it will choose the second one, reasonably expecting that it will be bigger since it describes extra loader in addition to the default ones. But when there are more than two loader packages, this logic will break. One possible solution would be constructing a custom cache file for each package containing a program like <filename>services/x11/gdk-pixbuf.nix</filename> NixOS module does. <package>wrapGAppsHook</package> copies the <envar>GDK_PIXBUF_MODULE_FILE</envar> environment variable into the produced wrapper.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
<listitem xml:id="ssec-gnome-hooks-gtk-drop-icon-theme-cache">
|
|
||||||
<para>
|
|
||||||
One of <package>gtk3</package>’s setup hooks will remove <filename>icon-theme.cache</filename> files from package’s icon theme directories to avoid conflicts. Icon theme packages should prevent this with <code>dontDropIconThemeCache = true;</code>.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
<listitem xml:id="ssec-gnome-hooks-dconf">
|
|
||||||
<para>
|
|
||||||
<package>dconf.lib</package> is a dependency of <package>wrapGAppsHook</package>, which then also adds it to the <envar>GIO_EXTRA_MODULES</envar> variable.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
<listitem xml:id="ssec-gnome-hooks-hicolor-icon-theme">
|
|
||||||
<para>
|
|
||||||
<package>hicolor-icon-theme</package>’s setup hook will add icon themes to <envar>XDG_ICON_DIRS</envar> which is prepended to <envar>XDG_DATA_DIRS</envar> by <package>wrapGAppsHook</package>.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
<listitem xml:id="ssec-gnome-hooks-gobject-introspection">
|
|
||||||
<para>
|
|
||||||
<package>gobject-introspection</package> setup hook populates <envar>GI_TYPELIB_PATH</envar> variable with <filename>lib/girepository-1.0</filename> directories of dependencies, which is then added to wrapper by <package>wrapGAppsHook</package>. It also adds <filename>share</filename> directories of dependencies to <envar>XDG_DATA_DIRS</envar>, which is intended to promote GIR files but it also <link xlink:href="https://github.com/NixOS/nixpkgs/issues/32790">pollutes the closures</link> of packages using <package>wrapGAppsHook</package>.
|
|
||||||
</para>
|
|
||||||
<warning>
|
|
||||||
<para>
|
|
||||||
The setup hook <link xlink:href="https://github.com/NixOS/nixpkgs/issues/56943">currently</link> does not work in expressions with <literal>strictDeps</literal> enabled, like Python packages. In those cases, you will need to disable it with <code>strictDeps = false;</code>.
|
|
||||||
</para>
|
|
||||||
</warning>
|
|
||||||
</listitem>
|
|
||||||
<listitem xml:id="ssec-gnome-hooks-gst-grl-plugins">
|
|
||||||
<para>
|
|
||||||
Setup hooks of <package>gst_all_1.gstreamer</package> and <package>gnome3.grilo</package> will populate the <envar>GST_PLUGIN_SYSTEM_PATH_1_0</envar> and <envar>GRL_PLUGIN_PATH</envar> variables, respectively, which will then be added to the wrapper by <literal>wrapGAppsHook</literal>.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</itemizedlist>
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
You can also pass additional arguments to <literal>makeWrapper</literal> using <literal>gappsWrapperArgs</literal> in <literal>preFixup</literal> hook:
|
|
||||||
<programlisting>
|
|
||||||
preFixup = ''
|
|
||||||
gappsWrapperArgs+=(
|
|
||||||
# Thumbnailers
|
|
||||||
--prefix XDG_DATA_DIRS : "${gdk-pixbuf}/share"
|
|
||||||
--prefix XDG_DATA_DIRS : "${librsvg}/share"
|
|
||||||
--prefix XDG_DATA_DIRS : "${shared-mime-info}/share"
|
|
||||||
)
|
|
||||||
'';
|
|
||||||
</programlisting>
|
|
||||||
</para>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section xml:id="ssec-gnome-updating">
|
|
||||||
<title>Updating GNOME packages</title>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
Most GNOME package offer <link linkend="var-passthru-updateScript"><literal>updateScript</literal></link>, it is therefore possible to update to latest source tarball by running <command>nix-shell maintainers/scripts/update.nix --argstr package gnome3.nautilus</command> or even en masse with <command>nix-shell maintainers/scripts/update.nix --argstr path gnome3</command>. Read the package’s <filename>NEWS</filename> file to see what changed.
|
|
||||||
</para>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section xml:id="ssec-gnome-common-issues">
|
|
||||||
<title>Frequently encountered issues</title>
|
|
||||||
|
|
||||||
<variablelist>
|
|
||||||
<varlistentry xml:id="ssec-gnome-common-issues-no-schemas">
|
|
||||||
<term>
|
|
||||||
<computeroutput>GLib-GIO-ERROR **: <replaceable>06:04:50.903</replaceable>: No GSettings schemas are installed on the system</computeroutput>
|
|
||||||
</term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
There are no schemas available in <envar>XDG_DATA_DIRS</envar>. Temporarily add a random package containing schemas like <package>gsettings-desktop-schemas</package> to <literal>buildInputs</literal>. <link linkend="ssec-gnome-hooks-glib"><package>glib</package></link> and <link linkend="ssec-gnome-hooks-wrapgappshook"><package>wrapGAppsHook</package></link> setup hooks will take care of making the schemas available to application and you will see the actual missing schemas with the <link linkend="ssec-gnome-common-issues-missing-schema">next error</link>. Or you can try looking through the source code for the actual schemas used.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
<varlistentry xml:id="ssec-gnome-common-issues-missing-schema">
|
|
||||||
<term>
|
|
||||||
<computeroutput>GLib-GIO-ERROR **: <replaceable>06:04:50.903</replaceable>: Settings schema ‘<replaceable>org.gnome.foo</replaceable>’ is not installed</computeroutput>
|
|
||||||
</term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Package is missing some GSettings schemas. You can find out the package containing the schema with <command>nix-locate <replaceable>org.gnome.foo</replaceable>.gschema.xml</command> and let the hooks handle the wrapping as <link linkend="ssec-gnome-common-issues-no-schemas">above</link>.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
<varlistentry xml:id="ssec-gnome-common-issues-double-wrapped">
|
|
||||||
<term>
|
|
||||||
When using <package>wrapGAppsHook</package> with special derivers you can end up with double wrapped binaries.
|
|
||||||
</term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
This is because derivers like <function>python.pkgs.buildPythonApplication</function> or <function>qt5.mkDerivation</function> have setup-hooks automatically added that produce wrappers with <package>makeWrapper</package>. The simplest way to workaround that is to disable the <package>wrapGAppsHook</package> automatic wrapping with <code>dontWrapGApps = true;</code> and pass the arguments it intended to pass to <package>makeWrapper</package> to another.
|
|
||||||
</para>
|
|
||||||
<para>
|
|
||||||
In the case of a Python application it could look like:
|
|
||||||
<programlisting>
|
|
||||||
python3.pkgs.buildPythonApplication {
|
|
||||||
pname = "gnome-music";
|
|
||||||
version = "3.32.2";
|
|
||||||
|
|
||||||
nativeBuildInputs = [
|
|
||||||
wrapGAppsHook
|
|
||||||
gobject-introspection
|
|
||||||
...
|
|
||||||
];
|
|
||||||
|
|
||||||
dontWrapGApps = true;
|
|
||||||
|
|
||||||
# Arguments to be passed to `makeWrapper`, only used by buildPython*
|
|
||||||
preFixup = ''
|
|
||||||
makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
</programlisting>
|
|
||||||
And for a QT app like:
|
|
||||||
<programlisting>
|
|
||||||
mkDerivation {
|
|
||||||
pname = "calibre";
|
|
||||||
version = "3.47.0";
|
|
||||||
|
|
||||||
nativeBuildInputs = [
|
|
||||||
wrapGAppsHook
|
|
||||||
qmake
|
|
||||||
...
|
|
||||||
];
|
|
||||||
|
|
||||||
dontWrapGApps = true;
|
|
||||||
|
|
||||||
# Arguments to be passed to `makeWrapper`, only used by qt5’s mkDerivation
|
|
||||||
preFixup = ''
|
|
||||||
qtWrapperArgs+=("''${gappsWrapperArgs[@]}")
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
</programlisting>
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
<varlistentry xml:id="ssec-gnome-common-issues-unwrappable-package">
|
|
||||||
<term>
|
|
||||||
I am packaging a project that cannot be wrapped, like a library or GNOME Shell extension.
|
|
||||||
</term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
You can rely on applications depending on the library setting the necessary environment variables but that is often easy to miss. Instead we recommend to patch the paths in the source code whenever possible. Here are some examples:
|
|
||||||
<itemizedlist>
|
|
||||||
<listitem xml:id="ssec-gnome-common-issues-unwrappable-package-gnome-shell-ext">
|
|
||||||
<para>
|
|
||||||
<link xlink:href="https://github.com/NixOS/nixpkgs/blob/7bb8f05f12ca3cff9da72b56caa2f7472d5732bc/pkgs/desktops/gnome-3/core/gnome-shell-extensions/default.nix#L21-L24">Replacing a <envar>GI_TYPELIB_PATH</envar> in GNOME Shell extension</link> – we are using <function>substituteAll</function> to include the path to a typelib into a patch.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
<listitem xml:id="ssec-gnome-common-issues-unwrappable-package-gsettings">
|
|
||||||
<para>
|
|
||||||
The following examples are hardcoding GSettings schema paths. To get the schema paths we use the functions
|
|
||||||
<itemizedlist>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
<function>glib.getSchemaPath</function> Takes a nix package attribute as an argument.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
<function>glib.makeSchemaPath</function> Takes a package output like <literal>$out</literal> and a derivation name. You should use this if the schemas you need to hardcode are in the same derivation.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</itemizedlist>
|
|
||||||
</para>
|
|
||||||
<para xml:id="ssec-gnome-common-issues-unwrappable-package-gsettings-vala">
|
|
||||||
<link xlink:href="https://github.com/NixOS/nixpkgs/blob/7bb8f05f12ca3cff9da72b56caa2f7472d5732bc/pkgs/desktops/pantheon/apps/elementary-files/default.nix#L78-L86">Hard-coding GSettings schema path in Vala plug-in (dynamically loaded library)</link> – here, <function>substituteAll</function> cannot be used since the schema comes from the same package preventing us from pass its path to the function, probably due to a <link xlink:href="https://github.com/NixOS/nix/issues/1846">Nix bug</link>.
|
|
||||||
</para>
|
|
||||||
<para xml:id="ssec-gnome-common-issues-unwrappable-package-gsettings-c">
|
|
||||||
<link xlink:href="https://github.com/NixOS/nixpkgs/blob/29c120c065d03b000224872251bed93932d42412/pkgs/development/libraries/glib-networking/default.nix#L31-L34">Hard-coding GSettings schema path in C library</link> – nothing special other than using <link xlink:href="https://github.com/NixOS/nixpkgs/pull/67957#issuecomment-527717467">Coccinelle patch</link> to generate the patch itself.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</itemizedlist>
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
<varlistentry xml:id="ssec-gnome-common-issues-weird-location">
|
|
||||||
<term>
|
|
||||||
I need to wrap a binary outside <filename>bin</filename> and <filename>libexec</filename> directories.
|
|
||||||
</term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
You can manually trigger the wrapping with <function>wrapGApp</function> in <literal>preFixup</literal> phase. It takes a path to a program as a first argument; the remaining arguments are passed directly to <function xlink:href="#fun-wrapProgram">wrapProgram</function> function.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
</variablelist>
|
|
||||||
</section>
|
|
||||||
</section>
|
|
|
@ -8,11 +8,11 @@
|
||||||
<xi:include href="agda.section.xml" />
|
<xi:include href="agda.section.xml" />
|
||||||
<xi:include href="android.section.xml" />
|
<xi:include href="android.section.xml" />
|
||||||
<xi:include href="beam.section.xml" />
|
<xi:include href="beam.section.xml" />
|
||||||
<xi:include href="bower.xml" />
|
<xi:include href="bower.section.xml" />
|
||||||
<xi:include href="coq.section.xml" />
|
<xi:include href="coq.section.xml" />
|
||||||
<xi:include href="crystal.section.xml" />
|
<xi:include href="crystal.section.xml" />
|
||||||
<xi:include href="emscripten.section.xml" />
|
<xi:include href="emscripten.section.xml" />
|
||||||
<xi:include href="gnome.xml" />
|
<xi:include href="gnome.section.xml" />
|
||||||
<xi:include href="go.section.xml" />
|
<xi:include href="go.section.xml" />
|
||||||
<xi:include href="haskell.section.xml" />
|
<xi:include href="haskell.section.xml" />
|
||||||
<xi:include href="idris.section.xml" />
|
<xi:include href="idris.section.xml" />
|
||||||
|
@ -22,7 +22,7 @@
|
||||||
<xi:include href="maven.section.xml" />
|
<xi:include href="maven.section.xml" />
|
||||||
<xi:include href="node.section.xml" />
|
<xi:include href="node.section.xml" />
|
||||||
<xi:include href="ocaml.section.xml" />
|
<xi:include href="ocaml.section.xml" />
|
||||||
<xi:include href="perl.xml" />
|
<xi:include href="perl.section.xml" />
|
||||||
<xi:include href="php.section.xml" />
|
<xi:include href="php.section.xml" />
|
||||||
<xi:include href="python.section.xml" />
|
<xi:include href="python.section.xml" />
|
||||||
<xi:include href="qt.section.xml" />
|
<xi:include href="qt.section.xml" />
|
||||||
|
|
163
third_party/nixpkgs/doc/languages-frameworks/perl.section.md
vendored
Normal file
163
third_party/nixpkgs/doc/languages-frameworks/perl.section.md
vendored
Normal file
|
@ -0,0 +1,163 @@
|
||||||
|
# Perl {#sec-language-perl}
|
||||||
|
|
||||||
|
## Running perl programs on the shell {#ssec-perl-running}
|
||||||
|
|
||||||
|
When executing a Perl script, it is possible you get an error such as `./myscript.pl: bad interpreter: /usr/bin/perl: no such file or directory`. This happens when the script expects Perl to be installed at `/usr/bin/perl`, which is not the case when using Perl from nixpkgs. You can fix the script by changing the first line to:
|
||||||
|
|
||||||
|
```perl
|
||||||
|
#!/usr/bin/env perl
|
||||||
|
```
|
||||||
|
|
||||||
|
to take the Perl installation from the `PATH` environment variable, or invoke Perl directly with:
|
||||||
|
|
||||||
|
```ShellSession
|
||||||
|
$ perl ./myscript.pl
|
||||||
|
```
|
||||||
|
|
||||||
|
When the script is using a Perl library that is not installed globally, you might get an error such as `Can't locate DB_File.pm in @INC (you may need to install the DB_File module)`. In that case, you can use `nix-shell` to start an ad-hoc shell with that library installed, for instance:
|
||||||
|
|
||||||
|
```ShellSession
|
||||||
|
$ nix-shell -p perl perlPackages.DBFile --run ./myscript.pl
|
||||||
|
```
|
||||||
|
|
||||||
|
If you are always using the script in places where `nix-shell` is available, you can embed the `nix-shell` invocation in the shebang like this:
|
||||||
|
|
||||||
|
```perl
|
||||||
|
#!/usr/bin/env nix-shell
|
||||||
|
#! nix-shell -i perl -p perl perlPackages.DBFile
|
||||||
|
```
|
||||||
|
|
||||||
|
## Packaging Perl programs {#ssec-perl-packaging}
|
||||||
|
|
||||||
|
Nixpkgs provides a function `buildPerlPackage`, a generic package builder function for any Perl package that has a standard `Makefile.PL`. It’s implemented in [pkgs/development/perl-modules/generic](https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/perl-modules/generic).
|
||||||
|
|
||||||
|
Perl packages from CPAN are defined in [pkgs/top-level/perl-packages.nix](https://github.com/NixOS/nixpkgs/blob/master/pkgs/top-level/perl-packages.nix) rather than `pkgs/all-packages.nix`. Most Perl packages are so straight-forward to build that they are defined here directly, rather than having a separate function for each package called from `perl-packages.nix`. However, more complicated packages should be put in a separate file, typically in `pkgs/development/perl-modules`. Here is an example of the former:
|
||||||
|
|
||||||
|
```nix
|
||||||
|
ClassC3 = buildPerlPackage rec {
|
||||||
|
name = "Class-C3-0.21";
|
||||||
|
src = fetchurl {
|
||||||
|
url = "mirror://cpan/authors/id/F/FL/FLORA/${name}.tar.gz";
|
||||||
|
sha256 = "1bl8z095y4js66pwxnm7s853pi9czala4sqc743fdlnk27kq94gz";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
Note the use of `mirror://cpan/`, and the `${name}` in the URL definition to ensure that the name attribute is consistent with the source that we’re actually downloading. Perl packages are made available in `all-packages.nix` through the variable `perlPackages`. For instance, if you have a package that needs `ClassC3`, you would typically write
|
||||||
|
|
||||||
|
```nix
|
||||||
|
foo = import ../path/to/foo.nix {
|
||||||
|
inherit stdenv fetchurl ...;
|
||||||
|
inherit (perlPackages) ClassC3;
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
in `all-packages.nix`. You can test building a Perl package as follows:
|
||||||
|
|
||||||
|
```ShellSession
|
||||||
|
$ nix-build -A perlPackages.ClassC3
|
||||||
|
```
|
||||||
|
|
||||||
|
`buildPerlPackage` adds `perl-` to the start of the name attribute, so the package above is actually called `perl-Class-C3-0.21`. So to install it, you can say:
|
||||||
|
|
||||||
|
```ShellSession
|
||||||
|
$ nix-env -i perl-Class-C3
|
||||||
|
```
|
||||||
|
|
||||||
|
(Of course you can also install using the attribute name: `nix-env -i -A perlPackages.ClassC3`.)
|
||||||
|
|
||||||
|
So what does `buildPerlPackage` do? It does the following:
|
||||||
|
|
||||||
|
1. In the configure phase, it calls `perl Makefile.PL` to generate a Makefile. You can set the variable `makeMakerFlags` to pass flags to `Makefile.PL`
|
||||||
|
2. It adds the contents of the `PERL5LIB` environment variable to `#! .../bin/perl` line of Perl scripts as `-Idir` flags. This ensures that a script can find its dependencies. (This can cause this shebang line to become too long for Darwin to handle; see the note below.)
|
||||||
|
3. In the fixup phase, it writes the propagated build inputs (`propagatedBuildInputs`) to the file `$out/nix-support/propagated-user-env-packages`. `nix-env` recursively installs all packages listed in this file when you install a package that has it. This ensures that a Perl package can find its dependencies.
|
||||||
|
|
||||||
|
`buildPerlPackage` is built on top of `stdenv`, so everything can be customised in the usual way. For instance, the `BerkeleyDB` module has a `preConfigure` hook to generate a configuration file used by `Makefile.PL`:
|
||||||
|
|
||||||
|
```nix
|
||||||
|
{ buildPerlPackage, fetchurl, db }:
|
||||||
|
|
||||||
|
buildPerlPackage rec {
|
||||||
|
name = "BerkeleyDB-0.36";
|
||||||
|
|
||||||
|
src = fetchurl {
|
||||||
|
url = "mirror://cpan/authors/id/P/PM/PMQS/${name}.tar.gz";
|
||||||
|
sha256 = "07xf50riarb60l1h6m2dqmql8q5dij619712fsgw7ach04d8g3z1";
|
||||||
|
};
|
||||||
|
|
||||||
|
preConfigure = ''
|
||||||
|
echo "LIB = ${db.out}/lib" > config.in
|
||||||
|
echo "INCLUDE = ${db.dev}/include" >> config.in
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Dependencies on other Perl packages can be specified in the `buildInputs` and `propagatedBuildInputs` attributes. If something is exclusively a build-time dependency, use `buildInputs`; if it’s (also) a runtime dependency, use `propagatedBuildInputs`. For instance, this builds a Perl module that has runtime dependencies on a bunch of other modules:
|
||||||
|
|
||||||
|
```nix
|
||||||
|
ClassC3Componentised = buildPerlPackage rec {
|
||||||
|
name = "Class-C3-Componentised-1.0004";
|
||||||
|
src = fetchurl {
|
||||||
|
url = "mirror://cpan/authors/id/A/AS/ASH/${name}.tar.gz";
|
||||||
|
sha256 = "0xql73jkcdbq4q9m0b0rnca6nrlvf5hyzy8is0crdk65bynvs8q1";
|
||||||
|
};
|
||||||
|
propagatedBuildInputs = [
|
||||||
|
ClassC3 ClassInspector TestException MROCompat
|
||||||
|
];
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
On Darwin, if a script has too many `-Idir` flags in its first line (its “shebang line”), it will not run. This can be worked around by calling the `shortenPerlShebang` function from the `postInstall` phase:
|
||||||
|
|
||||||
|
```nix
|
||||||
|
{ stdenv, buildPerlPackage, fetchurl, shortenPerlShebang }:
|
||||||
|
|
||||||
|
ImageExifTool = buildPerlPackage {
|
||||||
|
pname = "Image-ExifTool";
|
||||||
|
version = "11.50";
|
||||||
|
|
||||||
|
src = fetchurl {
|
||||||
|
url = "https://www.sno.phy.queensu.ca/~phil/exiftool/Image-ExifTool-11.50.tar.gz";
|
||||||
|
sha256 = "0d8v48y94z8maxkmw1rv7v9m0jg2dc8xbp581njb6yhr7abwqdv3";
|
||||||
|
};
|
||||||
|
|
||||||
|
buildInputs = stdenv.lib.optional stdenv.isDarwin shortenPerlShebang;
|
||||||
|
postInstall = stdenv.lib.optional stdenv.isDarwin ''
|
||||||
|
shortenPerlShebang $out/bin/exiftool
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
This will remove the `-I` flags from the shebang line, rewrite them in the `use lib` form, and put them on the next line instead. This function can be given any number of Perl scripts as arguments; it will modify them in-place.
|
||||||
|
|
||||||
|
### Generation from CPAN {#ssec-generation-from-CPAN}
|
||||||
|
|
||||||
|
Nix expressions for Perl packages can be generated (almost) automatically from CPAN. This is done by the program `nix-generate-from-cpan`, which can be installed as follows:
|
||||||
|
|
||||||
|
```ShellSession
|
||||||
|
$ nix-env -i nix-generate-from-cpan
|
||||||
|
```
|
||||||
|
|
||||||
|
This program takes a Perl module name, looks it up on CPAN, fetches and unpacks the corresponding package, and prints a Nix expression on standard output. For example:
|
||||||
|
|
||||||
|
```ShellSession
|
||||||
|
$ nix-generate-from-cpan XML::Simple
|
||||||
|
XMLSimple = buildPerlPackage rec {
|
||||||
|
name = "XML-Simple-2.22";
|
||||||
|
src = fetchurl {
|
||||||
|
url = "mirror://cpan/authors/id/G/GR/GRANTM/${name}.tar.gz";
|
||||||
|
sha256 = "b9450ef22ea9644ae5d6ada086dc4300fa105be050a2030ebd4efd28c198eb49";
|
||||||
|
};
|
||||||
|
propagatedBuildInputs = [ XMLNamespaceSupport XMLSAX XMLSAXExpat ];
|
||||||
|
meta = {
|
||||||
|
description = "An API for simple XML files";
|
||||||
|
license = with stdenv.lib.licenses; [ artistic1 gpl1Plus ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
The output can be pasted into `pkgs/top-level/perl-packages.nix` or wherever else you need it.
|
||||||
|
|
||||||
|
### Cross-compiling modules {#ssec-perl-cross-compilation}
|
||||||
|
|
||||||
|
Nixpkgs has experimental support for cross-compiling Perl modules. In many cases, it will just work out of the box, even for modules with native extensions. Sometimes, however, the Makefile.PL for a module may (indirectly) import a native module. In that case, you will need to make a stub for that module that will satisfy the Makefile.PL and install it into `lib/perl5/site_perl/cross_perl/${perl.version}`. See the `postInstall` for `DBI` for an example.
|
|
@ -1,195 +0,0 @@
|
||||||
<section xmlns="http://docbook.org/ns/docbook"
|
|
||||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
||||||
xml:id="sec-language-perl">
|
|
||||||
<title>Perl</title>
|
|
||||||
|
|
||||||
<section xml:id="ssec-perl-running">
|
|
||||||
<title>Running perl programs on the shell</title>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
When executing a Perl script, it is possible you get an error such as <literal>./myscript.pl: bad interpreter: /usr/bin/perl: no such file or directory</literal>. This happens when the script expects Perl to be installed at <filename>/usr/bin/perl</filename>, which is not the case when using Perl from nixpkgs. You can fix the script by changing the first line to:
|
|
||||||
<programlisting>
|
|
||||||
#!/usr/bin/env perl
|
|
||||||
</programlisting>
|
|
||||||
to take the Perl installation from the <literal>PATH</literal> environment variable, or invoke Perl directly with:
|
|
||||||
<screen>
|
|
||||||
<prompt>$ </prompt>perl ./myscript.pl
|
|
||||||
</screen>
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
When the script is using a Perl library that is not installed globally, you might get an error such as <literal>Can't locate DB_File.pm in @INC (you may need to install the DB_File module)</literal>. In that case, you can use <command>nix-shell</command> to start an ad-hoc shell with that library installed, for instance:
|
|
||||||
<screen>
|
|
||||||
<prompt>$ </prompt>nix-shell -p perl perlPackages.DBFile --run ./myscript.pl
|
|
||||||
</screen>
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
If you are always using the script in places where <command>nix-shell</command> is available, you can embed the <command>nix-shell</command> invocation in the shebang like this:
|
|
||||||
<programlisting>
|
|
||||||
#!/usr/bin/env nix-shell
|
|
||||||
#! nix-shell -i perl -p perl perlPackages.DBFile
|
|
||||||
</programlisting>
|
|
||||||
</para>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section xml:id="ssec-perl-packaging">
|
|
||||||
<title>Packaging Perl programs</title>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
Nixpkgs provides a function <varname>buildPerlPackage</varname>, a generic package builder function for any Perl package that has a standard <varname>Makefile.PL</varname>. It’s implemented in <link
|
|
||||||
xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/perl-modules/generic"><filename>pkgs/development/perl-modules/generic</filename></link>.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
Perl packages from CPAN are defined in <link
|
|
||||||
xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/top-level/perl-packages.nix"><filename>pkgs/top-level/perl-packages.nix</filename></link>, rather than <filename>pkgs/all-packages.nix</filename>. Most Perl packages are so straight-forward to build that they are defined here directly, rather than having a separate function for each package called from <filename>perl-packages.nix</filename>. However, more complicated packages should be put in a separate file, typically in <filename>pkgs/development/perl-modules</filename>. Here is an example of the former:
|
|
||||||
<programlisting>
|
|
||||||
ClassC3 = buildPerlPackage rec {
|
|
||||||
name = "Class-C3-0.21";
|
|
||||||
src = fetchurl {
|
|
||||||
url = "mirror://cpan/authors/id/F/FL/FLORA/${name}.tar.gz";
|
|
||||||
sha256 = "1bl8z095y4js66pwxnm7s853pi9czala4sqc743fdlnk27kq94gz";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
</programlisting>
|
|
||||||
Note the use of <literal>mirror://cpan/</literal>, and the <literal>${name}</literal> in the URL definition to ensure that the name attribute is consistent with the source that we’re actually downloading. Perl packages are made available in <filename>all-packages.nix</filename> through the variable <varname>perlPackages</varname>. For instance, if you have a package that needs <varname>ClassC3</varname>, you would typically write
|
|
||||||
<programlisting>
|
|
||||||
foo = import ../path/to/foo.nix {
|
|
||||||
inherit stdenv fetchurl ...;
|
|
||||||
inherit (perlPackages) ClassC3;
|
|
||||||
};
|
|
||||||
</programlisting>
|
|
||||||
in <filename>all-packages.nix</filename>. You can test building a Perl package as follows:
|
|
||||||
<screen>
|
|
||||||
<prompt>$ </prompt>nix-build -A perlPackages.ClassC3
|
|
||||||
</screen>
|
|
||||||
<varname>buildPerlPackage</varname> adds <literal>perl-</literal> to the start of the name attribute, so the package above is actually called <literal>perl-Class-C3-0.21</literal>. So to install it, you can say:
|
|
||||||
<screen>
|
|
||||||
<prompt>$ </prompt>nix-env -i perl-Class-C3
|
|
||||||
</screen>
|
|
||||||
(Of course you can also install using the attribute name: <literal>nix-env -i -A perlPackages.ClassC3</literal>.)
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
So what does <varname>buildPerlPackage</varname> do? It does the following:
|
|
||||||
<orderedlist>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
In the configure phase, it calls <literal>perl Makefile.PL</literal> to generate a Makefile. You can set the variable <varname>makeMakerFlags</varname> to pass flags to <filename>Makefile.PL</filename>
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
It adds the contents of the <envar>PERL5LIB</envar> environment variable to <literal>#! .../bin/perl</literal> line of Perl scripts as <literal>-I<replaceable>dir</replaceable></literal> flags. This ensures that a script can find its dependencies. (This can cause this shebang line to become too long for Darwin to handle; see the note below.)
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
In the fixup phase, it writes the propagated build inputs (<varname>propagatedBuildInputs</varname>) to the file <filename>$out/nix-support/propagated-user-env-packages</filename>. <command>nix-env</command> recursively installs all packages listed in this file when you install a package that has it. This ensures that a Perl package can find its dependencies.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</orderedlist>
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
<varname>buildPerlPackage</varname> is built on top of <varname>stdenv</varname>, so everything can be customised in the usual way. For instance, the <literal>BerkeleyDB</literal> module has a <varname>preConfigure</varname> hook to generate a configuration file used by <filename>Makefile.PL</filename>:
|
|
||||||
<programlisting>
|
|
||||||
{ buildPerlPackage, fetchurl, db }:
|
|
||||||
|
|
||||||
buildPerlPackage rec {
|
|
||||||
name = "BerkeleyDB-0.36";
|
|
||||||
|
|
||||||
src = fetchurl {
|
|
||||||
url = "mirror://cpan/authors/id/P/PM/PMQS/${name}.tar.gz";
|
|
||||||
sha256 = "07xf50riarb60l1h6m2dqmql8q5dij619712fsgw7ach04d8g3z1";
|
|
||||||
};
|
|
||||||
|
|
||||||
preConfigure = ''
|
|
||||||
echo "LIB = ${db.out}/lib" > config.in
|
|
||||||
echo "INCLUDE = ${db.dev}/include" >> config.in
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
</programlisting>
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
Dependencies on other Perl packages can be specified in the <varname>buildInputs</varname> and <varname>propagatedBuildInputs</varname> attributes. If something is exclusively a build-time dependency, use <varname>buildInputs</varname>; if it’s (also) a runtime dependency, use <varname>propagatedBuildInputs</varname>. For instance, this builds a Perl module that has runtime dependencies on a bunch of other modules:
|
|
||||||
<programlisting>
|
|
||||||
ClassC3Componentised = buildPerlPackage rec {
|
|
||||||
name = "Class-C3-Componentised-1.0004";
|
|
||||||
src = fetchurl {
|
|
||||||
url = "mirror://cpan/authors/id/A/AS/ASH/${name}.tar.gz";
|
|
||||||
sha256 = "0xql73jkcdbq4q9m0b0rnca6nrlvf5hyzy8is0crdk65bynvs8q1";
|
|
||||||
};
|
|
||||||
propagatedBuildInputs = [
|
|
||||||
ClassC3 ClassInspector TestException MROCompat
|
|
||||||
];
|
|
||||||
};
|
|
||||||
</programlisting>
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
On Darwin, if a script has too many <literal>-I<replaceable>dir</replaceable></literal> flags in its first line (its “shebang line”), it will not run. This can be worked around by calling the <literal>shortenPerlShebang</literal> function from the <literal>postInstall</literal> phase:
|
|
||||||
<programlisting>
|
|
||||||
{ stdenv, buildPerlPackage, fetchurl, shortenPerlShebang }:
|
|
||||||
|
|
||||||
ImageExifTool = buildPerlPackage {
|
|
||||||
pname = "Image-ExifTool";
|
|
||||||
version = "11.50";
|
|
||||||
|
|
||||||
src = fetchurl {
|
|
||||||
url = "https://www.sno.phy.queensu.ca/~phil/exiftool/Image-ExifTool-11.50.tar.gz";
|
|
||||||
sha256 = "0d8v48y94z8maxkmw1rv7v9m0jg2dc8xbp581njb6yhr7abwqdv3";
|
|
||||||
};
|
|
||||||
|
|
||||||
buildInputs = stdenv.lib.optional stdenv.isDarwin shortenPerlShebang;
|
|
||||||
postInstall = stdenv.lib.optional stdenv.isDarwin ''
|
|
||||||
shortenPerlShebang $out/bin/exiftool
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
</programlisting>
|
|
||||||
This will remove the <literal>-I</literal> flags from the shebang line, rewrite them in the <literal>use lib</literal> form, and put them on the next line instead. This function can be given any number of Perl scripts as arguments; it will modify them in-place.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<section xml:id="ssec-generation-from-CPAN">
|
|
||||||
<title>Generation from CPAN</title>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
Nix expressions for Perl packages can be generated (almost) automatically from CPAN. This is done by the program <command>nix-generate-from-cpan</command>, which can be installed as follows:
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<screen>
|
|
||||||
<prompt>$ </prompt>nix-env -i nix-generate-from-cpan
|
|
||||||
</screen>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
This program takes a Perl module name, looks it up on CPAN, fetches and unpacks the corresponding package, and prints a Nix expression on standard output. For example:
|
|
||||||
<screen>
|
|
||||||
<prompt>$ </prompt>nix-generate-from-cpan XML::Simple
|
|
||||||
XMLSimple = buildPerlPackage rec {
|
|
||||||
name = "XML-Simple-2.22";
|
|
||||||
src = fetchurl {
|
|
||||||
url = "mirror://cpan/authors/id/G/GR/GRANTM/${name}.tar.gz";
|
|
||||||
sha256 = "b9450ef22ea9644ae5d6ada086dc4300fa105be050a2030ebd4efd28c198eb49";
|
|
||||||
};
|
|
||||||
propagatedBuildInputs = [ XMLNamespaceSupport XMLSAX XMLSAXExpat ];
|
|
||||||
meta = {
|
|
||||||
description = "An API for simple XML files";
|
|
||||||
license = with stdenv.lib.licenses; [ artistic1 gpl1Plus ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
</screen>
|
|
||||||
The output can be pasted into <filename>pkgs/top-level/perl-packages.nix</filename> or wherever else you need it.
|
|
||||||
</para>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section xml:id="ssec-perl-cross-compilation">
|
|
||||||
<title>Cross-compiling modules</title>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
Nixpkgs has experimental support for cross-compiling Perl modules. In many cases, it will just work out of the box, even for modules with native extensions. Sometimes, however, the Makefile.PL for a module may (indirectly) import a native module. In that case, you will need to make a stub for that module that will satisfy the Makefile.PL and install it into <filename>lib/perl5/site_perl/cross_perl/${perl.version}</filename>. See the <varname>postInstall</varname> for <varname>DBI</varname> for an example.
|
|
||||||
</para>
|
|
||||||
</section>
|
|
||||||
</section>
|
|
||||||
</section>
|
|
2
third_party/nixpkgs/doc/manual.xml
vendored
2
third_party/nixpkgs/doc/manual.xml
vendored
|
@ -34,7 +34,7 @@
|
||||||
<title>Contributing to Nixpkgs</title>
|
<title>Contributing to Nixpkgs</title>
|
||||||
<xi:include href="contributing/quick-start.xml" />
|
<xi:include href="contributing/quick-start.xml" />
|
||||||
<xi:include href="contributing/coding-conventions.xml" />
|
<xi:include href="contributing/coding-conventions.xml" />
|
||||||
<xi:include href="contributing/submitting-changes.xml" />
|
<xi:include href="contributing/submitting-changes.chapter.xml" />
|
||||||
<xi:include href="contributing/reviewing-contributions.xml" />
|
<xi:include href="contributing/reviewing-contributions.xml" />
|
||||||
<xi:include href="contributing/contributing-to-documentation.xml" />
|
<xi:include href="contributing/contributing-to-documentation.xml" />
|
||||||
</part>
|
</part>
|
||||||
|
|
2
third_party/nixpkgs/doc/stdenv/stdenv.xml
vendored
2
third_party/nixpkgs/doc/stdenv/stdenv.xml
vendored
|
@ -1989,7 +1989,7 @@ addEnvHooks "$hostOffset" myBashFunction
|
||||||
</term>
|
</term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Exports <envar>GDK_PIXBUF_MODULE_FILE</envar> environment variable to the builder. Add librsvg package to <varname>buildInputs</varname> to get svg support. See also <xref linkend="ssec-gnome-hooks-gdk-pixbuf" />.
|
Exports <envar>GDK_PIXBUF_MODULE_FILE</envar> environment variable to the builder. Add librsvg package to <varname>buildInputs</varname> to get svg support. See also the <link linkend="ssec-gnome-hooks-gdk-pixbuf">setup hook description in GNOME platform docs</link>.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
5
third_party/nixpkgs/lib/licenses.nix
vendored
5
third_party/nixpkgs/lib/licenses.nix
vendored
|
@ -18,6 +18,11 @@ lib.mapAttrs (n: v: v // { shortName = n; }) {
|
||||||
fullName = "Abstyles License";
|
fullName = "Abstyles License";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
afl20 = spdx {
|
||||||
|
spdxId = "AFL-2.0";
|
||||||
|
fullName = "Academic Free License v2.0";
|
||||||
|
};
|
||||||
|
|
||||||
afl21 = spdx {
|
afl21 = spdx {
|
||||||
spdxId = "AFL-2.1";
|
spdxId = "AFL-2.1";
|
||||||
fullName = "Academic Free License v2.1";
|
fullName = "Academic Free License v2.1";
|
||||||
|
|
|
@ -64,6 +64,12 @@
|
||||||
githubId = 791309;
|
githubId = 791309;
|
||||||
name = "Jan Hrnko";
|
name = "Jan Hrnko";
|
||||||
};
|
};
|
||||||
|
_3699n = {
|
||||||
|
email = "nicholas@nvk.pm";
|
||||||
|
github = "3699n";
|
||||||
|
githubId = 7414843;
|
||||||
|
name = "Nicholas von Klitzing";
|
||||||
|
};
|
||||||
a1russell = {
|
a1russell = {
|
||||||
email = "adamlr6+pub@gmail.com";
|
email = "adamlr6+pub@gmail.com";
|
||||||
github = "a1russell";
|
github = "a1russell";
|
||||||
|
@ -378,6 +384,12 @@
|
||||||
githubId = 2822871;
|
githubId = 2822871;
|
||||||
name = "Alistair Bill";
|
name = "Alistair Bill";
|
||||||
};
|
};
|
||||||
|
alirezameskin = {
|
||||||
|
email = "alireza.meskin@gmail.com";
|
||||||
|
github = "alirezameskin";
|
||||||
|
githubId = 36147;
|
||||||
|
name = "Alireza Meskin";
|
||||||
|
};
|
||||||
alkeryn = {
|
alkeryn = {
|
||||||
email = "plbraundev@gmail.com";
|
email = "plbraundev@gmail.com";
|
||||||
github = "Alkeryn";
|
github = "Alkeryn";
|
||||||
|
@ -6529,12 +6541,6 @@
|
||||||
githubId = 3359345;
|
githubId = 3359345;
|
||||||
name = "obadz";
|
name = "obadz";
|
||||||
};
|
};
|
||||||
ocharles = {
|
|
||||||
email = "ollie@ocharles.org.uk";
|
|
||||||
github = "ocharles";
|
|
||||||
githubId = 20878;
|
|
||||||
name = "Oliver Charles";
|
|
||||||
};
|
|
||||||
odi = {
|
odi = {
|
||||||
email = "oliver.dunkl@gmail.com";
|
email = "oliver.dunkl@gmail.com";
|
||||||
github = "odi";
|
github = "odi";
|
||||||
|
@ -7409,6 +7415,12 @@
|
||||||
githubId = 165283;
|
githubId = 165283;
|
||||||
name = "Alexey Kutepov";
|
name = "Alexey Kutepov";
|
||||||
};
|
};
|
||||||
|
rgrunbla = {
|
||||||
|
email = "remy@grunblatt.org";
|
||||||
|
github = "rgrunbla";
|
||||||
|
githubId = 42433779;
|
||||||
|
name = "Rémy Grünblatt";
|
||||||
|
};
|
||||||
rht = {
|
rht = {
|
||||||
email = "rhtbot@protonmail.com";
|
email = "rhtbot@protonmail.com";
|
||||||
github = "rht";
|
github = "rht";
|
||||||
|
@ -7503,6 +7515,12 @@
|
||||||
githubId = 13752145;
|
githubId = 13752145;
|
||||||
name = "Richard Lupton";
|
name = "Richard Lupton";
|
||||||
};
|
};
|
||||||
|
rmcgibbo = {
|
||||||
|
email = "rmcgibbo@gmail.com";
|
||||||
|
github = "rmcgibbo";
|
||||||
|
githubId = 641278;
|
||||||
|
name = "Robert T. McGibbon";
|
||||||
|
};
|
||||||
rnhmjoj = {
|
rnhmjoj = {
|
||||||
email = "rnhmjoj@inventati.org";
|
email = "rnhmjoj@inventati.org";
|
||||||
github = "rnhmjoj";
|
github = "rnhmjoj";
|
||||||
|
@ -7749,6 +7767,12 @@
|
||||||
github = "s1341";
|
github = "s1341";
|
||||||
githubId = 5682183;
|
githubId = 5682183;
|
||||||
};
|
};
|
||||||
|
samb96 = {
|
||||||
|
email = "samb96@gmail.com";
|
||||||
|
github = "samb96";
|
||||||
|
githubId = 819426;
|
||||||
|
name = "Sam Bickley";
|
||||||
|
};
|
||||||
samdoshi = {
|
samdoshi = {
|
||||||
email = "sam@metal-fish.co.uk";
|
email = "sam@metal-fish.co.uk";
|
||||||
github = "samdoshi";
|
github = "samdoshi";
|
||||||
|
@ -9452,6 +9476,16 @@
|
||||||
githubId = 19174984;
|
githubId = 19174984;
|
||||||
name = "Alex Whitt";
|
name = "Alex Whitt";
|
||||||
};
|
};
|
||||||
|
wildsebastian = {
|
||||||
|
name = "Sebastian Wild";
|
||||||
|
email = "sebastian@wild-siena.com";
|
||||||
|
github = "wildsebastian";
|
||||||
|
githubId = 1215623;
|
||||||
|
keys = [{
|
||||||
|
longkeyid = "rsa4096/0x366A2940479A06FC";
|
||||||
|
fingerprint = "DA03 D6C6 3F58 E796 AD26 E99B 366A 2940 479A 06FC";
|
||||||
|
}];
|
||||||
|
};
|
||||||
willibutz = {
|
willibutz = {
|
||||||
email = "willibutz@posteo.de";
|
email = "willibutz@posteo.de";
|
||||||
github = "willibutz";
|
github = "willibutz";
|
||||||
|
|
|
@ -39,7 +39,7 @@ in {
|
||||||
--no-daemon \
|
--no-daemon \
|
||||||
${optionalString cfg.debug "--loglevel=debug"} \
|
${optionalString cfg.debug "--loglevel=debug"} \
|
||||||
${optionalString (cfg.configFile != null) "--config-file ${cfg.configFile}"} \
|
${optionalString (cfg.configFile != null) "--config-file ${cfg.configFile}"} \
|
||||||
--dbus-enable
|
--dbus-enable \
|
||||||
--adaptive
|
--adaptive
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
|
@ -195,7 +195,7 @@ in
|
||||||
RuntimeDirectory = "unbound";
|
RuntimeDirectory = "unbound";
|
||||||
ConfigurationDirectory = "unbound";
|
ConfigurationDirectory = "unbound";
|
||||||
StateDirectory = "unbound";
|
StateDirectory = "unbound";
|
||||||
RestrictAddressFamilies = [ "AF_INET" "AF_INET6" "AF_UNIX" ];
|
RestrictAddressFamilies = [ "AF_INET" "AF_INET6" "AF_NETLINK" "AF_UNIX" ];
|
||||||
RestrictRealtime = true;
|
RestrictRealtime = true;
|
||||||
SystemCallArchitectures = "native";
|
SystemCallArchitectures = "native";
|
||||||
SystemCallFilter = [
|
SystemCallFilter = [
|
||||||
|
|
|
@ -103,6 +103,7 @@ in
|
||||||
ergo = handleTest ./ergo.nix {};
|
ergo = handleTest ./ergo.nix {};
|
||||||
etcd = handleTestOn ["x86_64-linux"] ./etcd.nix {};
|
etcd = handleTestOn ["x86_64-linux"] ./etcd.nix {};
|
||||||
etcd-cluster = handleTestOn ["x86_64-linux"] ./etcd-cluster.nix {};
|
etcd-cluster = handleTestOn ["x86_64-linux"] ./etcd-cluster.nix {};
|
||||||
|
etesync-dav = handleTest ./etesync-dav.nix {};
|
||||||
fancontrol = handleTest ./fancontrol.nix {};
|
fancontrol = handleTest ./fancontrol.nix {};
|
||||||
fcitx = handleTest ./fcitx {};
|
fcitx = handleTest ./fcitx {};
|
||||||
ferm = handleTest ./ferm.nix {};
|
ferm = handleTest ./ferm.nix {};
|
||||||
|
|
21
third_party/nixpkgs/nixos/tests/etesync-dav.nix
vendored
Normal file
21
third_party/nixpkgs/nixos/tests/etesync-dav.nix
vendored
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
import ./make-test-python.nix ({ pkgs, ... }: {
|
||||||
|
|
||||||
|
name = "etesync-dav";
|
||||||
|
meta = with pkgs.stdenv.lib.maintainers; {
|
||||||
|
maintainers = [ _3699n ];
|
||||||
|
};
|
||||||
|
|
||||||
|
machine = { config, pkgs, ... }: {
|
||||||
|
environment.systemPackages = [ pkgs.curl pkgs.etesync-dav ];
|
||||||
|
};
|
||||||
|
|
||||||
|
testScript =
|
||||||
|
''
|
||||||
|
machine.wait_for_unit("multi-user.target")
|
||||||
|
machine.succeed("etesync-dav --version")
|
||||||
|
machine.execute("etesync-dav &")
|
||||||
|
machine.wait_for_open_port(37358)
|
||||||
|
with subtest("Check that the web interface is accessible"):
|
||||||
|
assert "Add User" in machine.succeed("curl -s http://localhost:37358/.web/add/")
|
||||||
|
'';
|
||||||
|
})
|
6
third_party/nixpkgs/nixos/tests/podman.nix
vendored
6
third_party/nixpkgs/nixos/tests/podman.nix
vendored
|
@ -61,12 +61,6 @@ import ./make-test-python.nix (
|
||||||
podman.succeed("podman stop sleeping")
|
podman.succeed("podman stop sleeping")
|
||||||
podman.succeed("podman rm sleeping")
|
podman.succeed("podman rm sleeping")
|
||||||
|
|
||||||
|
|
||||||
podman.succeed(
|
|
||||||
"mkdir -p /tmp/podman-run-1000/libpod && chown alice -R /tmp/podman-run-1000"
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
with subtest("Run container rootless with crun"):
|
with subtest("Run container rootless with crun"):
|
||||||
podman.succeed(su_cmd("tar cv --files-from /dev/null | podman import - scratchimg"))
|
podman.succeed(su_cmd("tar cv --files-from /dev/null | podman import - scratchimg"))
|
||||||
podman.succeed(
|
podman.succeed(
|
||||||
|
|
|
@ -1,55 +1,77 @@
|
||||||
{ stdenv, fetchFromGitHub, alsaLib, fftwSinglePrec, freetype, libjack2
|
{ stdenv
|
||||||
, pkgconfig, ladspa-sdk, premake3
|
, alsaLib
|
||||||
, libX11, libXcomposite, libXcursor, libXext, libXinerama, libXrender
|
, fetchFromGitHub
|
||||||
|
, freetype
|
||||||
|
, libGL
|
||||||
|
, libX11
|
||||||
|
, libXcursor
|
||||||
|
, libXext
|
||||||
|
, libXrender
|
||||||
|
, meson
|
||||||
|
, ninja
|
||||||
|
, pkg-config
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
stdenv.mkDerivation rec {
|
||||||
premakeos = if stdenv.hostPlatform.isDarwin then "osx"
|
|
||||||
else if stdenv.hostPlatform.isWindows then "mingw"
|
|
||||||
else "linux";
|
|
||||||
in stdenv.mkDerivation rec {
|
|
||||||
pname = "distrho-ports";
|
pname = "distrho-ports";
|
||||||
version = "unstable-2019-10-09";
|
version = "2020-07-14";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "DISTRHO";
|
owner = "DISTRHO";
|
||||||
repo = "DISTRHO-Ports";
|
repo = "DISTRHO-Ports";
|
||||||
rev = "7e62235e809e59770d0d91d2c48c3f50ce7c027a";
|
rev = version;
|
||||||
sha256 = "10hpsjcmk0cgcsic9r1wxyja9x6q9wb8w8254dlrnzyswl54r1f8";
|
sha256 = "03ji41i6dpknws1vjwfxnl8c8bgisv2ng8xa4vqy2473k7wgdw4v";
|
||||||
};
|
};
|
||||||
|
|
||||||
configurePhase = ''
|
nativeBuildInputs = [ pkg-config meson ninja ];
|
||||||
runHook preConfigure
|
|
||||||
|
|
||||||
sh ./scripts/premake-update.sh ${premakeos}
|
|
||||||
|
|
||||||
runHook postConfigure
|
|
||||||
'';
|
|
||||||
|
|
||||||
postPatch = ''
|
|
||||||
sed -e "s#@./scripts#sh scripts#" -i Makefile
|
|
||||||
'';
|
|
||||||
|
|
||||||
nativeBuildInputs = [ pkgconfig premake3 ];
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
alsaLib fftwSinglePrec freetype libjack2
|
alsaLib
|
||||||
libX11 libXcomposite libXcursor libXext
|
freetype
|
||||||
libXinerama libXrender ladspa-sdk
|
libGL
|
||||||
|
libX11
|
||||||
|
libXcursor
|
||||||
|
libXext
|
||||||
|
libXrender
|
||||||
];
|
];
|
||||||
|
|
||||||
makeFlags = [ "PREFIX=$(out)" ];
|
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
homepage = "http://distrho.sourceforge.net";
|
homepage = "http://distrho.sourceforge.net/ports";
|
||||||
description = "A collection of cross-platform audio effects and plugins";
|
description = "Linux audio plugins and LV2 ports";
|
||||||
longDescription = ''
|
longDescription = ''
|
||||||
Includes:
|
Includes:
|
||||||
Dexed drowaudio-distortion drowaudio-distortionshaper drowaudio-flanger
|
arctican-function
|
||||||
drowaudio-reverb drowaudio-tremolo drumsynth EasySSP eqinox HiReSam
|
arctican-pilgrim
|
||||||
JuceDemoPlugin KlangFalter LUFSMeter LUFSMeterMulti Luftikus Obxd
|
dexed
|
||||||
PitchedDelay ReFine StereoSourceSeparation TAL-Dub-3 TAL-Filter
|
drowaudio-distortion
|
||||||
TAL-Filter-2 TAL-NoiseMaker TAL-Reverb TAL-Reverb-2 TAL-Reverb-3
|
drowaudio-distortionshaper
|
||||||
TAL-Vocoder-2 TheFunction ThePilgrim Vex Wolpertinger
|
drowaudio-flanger
|
||||||
|
drowaudio-reverb
|
||||||
|
drowaudio-tremolo
|
||||||
|
drumsynth
|
||||||
|
easySSP
|
||||||
|
eqinox
|
||||||
|
HiReSam
|
||||||
|
juce-opl
|
||||||
|
klangfalter
|
||||||
|
LUFSMeter
|
||||||
|
LUFSMeter-Multi
|
||||||
|
luftikus
|
||||||
|
obxd
|
||||||
|
pitchedDelay
|
||||||
|
refine
|
||||||
|
stereosourceseparation
|
||||||
|
tal-dub-3
|
||||||
|
tal-filter
|
||||||
|
tal-filter-2
|
||||||
|
tal-noisemaker
|
||||||
|
tal-reverb
|
||||||
|
tal-reverb-2
|
||||||
|
tal-reverb-3
|
||||||
|
tal-vocoder-2
|
||||||
|
temper
|
||||||
|
vex
|
||||||
|
wolpertinger
|
||||||
'';
|
'';
|
||||||
license = with licenses; [ gpl2 gpl3 gpl2Plus lgpl3 mit ];
|
license = with licenses; [ gpl2 gpl3 gpl2Plus lgpl3 mit ];
|
||||||
maintainers = [ maintainers.goibhniu ];
|
maintainers = [ maintainers.goibhniu ];
|
||||||
|
|
|
@ -55,6 +55,7 @@ rustPlatform.buildRustPackage rec {
|
||||||
gst_all_1.gstreamer
|
gst_all_1.gstreamer
|
||||||
gst_all_1.gst-plugins-base
|
gst_all_1.gst-plugins-base
|
||||||
gst_all_1.gst-plugins-bad
|
gst_all_1.gst-plugins-bad
|
||||||
|
gst_all_1.gst-plugins-good
|
||||||
];
|
];
|
||||||
|
|
||||||
# use Meson/Ninja phases
|
# use Meson/Ninja phases
|
||||||
|
|
28
third_party/nixpkgs/pkgs/applications/audio/melmatcheq.lv2/default.nix
vendored
Normal file
28
third_party/nixpkgs/pkgs/applications/audio/melmatcheq.lv2/default.nix
vendored
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
{ stdenv, fetchFromGitHub, xorg, xorgproto, cairo, lv2, pkg-config }:
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
pname = "MelMatchEQ.lv2";
|
||||||
|
version = "0.1";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "brummer10";
|
||||||
|
repo = pname;
|
||||||
|
rev = "v${version}";
|
||||||
|
sha256 = "1s805jgb9msxfq9047s7pxrngizb00w8sm4z94iii80ba65rd20x";
|
||||||
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = [ pkg-config ];
|
||||||
|
buildInputs = [
|
||||||
|
xorg.libX11 xorgproto cairo lv2
|
||||||
|
];
|
||||||
|
|
||||||
|
installFlags = [ "INSTALL_DIR=$(out)/lib/lv2" ];
|
||||||
|
|
||||||
|
meta = with stdenv.lib; {
|
||||||
|
homepage = "https://github.com/brummer10/MelMatchEQ.lv2";
|
||||||
|
description = "a profiling EQ using a 26 step Mel Frequency Band";
|
||||||
|
maintainers = with maintainers; [ magnetophon ];
|
||||||
|
license = licenses.gpl2Plus;
|
||||||
|
platforms = platforms.linux;
|
||||||
|
};
|
||||||
|
}
|
|
@ -3,13 +3,13 @@
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "MIDIVisualizer";
|
pname = "MIDIVisualizer";
|
||||||
version = "5.2";
|
version = "6.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "kosua20";
|
owner = "kosua20";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "19z8m6clirz8kwfjp0z1j69fjfna8ar7hkgqnlm3lrc84gyx2rpf";
|
sha256 = "052zpabkbkqzqzf8r6mdq9p6arn9mr1ywx6x3y9rqxj6sfprxd65";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake pkg-config makeWrapper];
|
nativeBuildInputs = [ cmake pkg-config makeWrapper];
|
||||||
|
|
|
@ -21,6 +21,7 @@ mkDerivation rec {
|
||||||
];
|
];
|
||||||
|
|
||||||
cmakeFlags = [
|
cmakeFlags = [
|
||||||
|
"-DMUSESCORE_BUILD_CONFIG=release"
|
||||||
"-DUSE_SYSTEM_FREETYPE=ON"
|
"-DUSE_SYSTEM_FREETYPE=ON"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -17,13 +17,13 @@
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "musikcube";
|
pname = "musikcube";
|
||||||
version = "0.95.0";
|
version = "0.96.1";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "clangen";
|
owner = "clangen";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = version;
|
rev = version;
|
||||||
sha256 = "16ksr4yjkg88bpij1i49dzi07ffhqq8b36r090y4fq5czrc420rc";
|
sha256 = "0gpyr25q6g9b8f9hi6jx3p4ijl7xrrjc78vw1fyjd59a7690d7kr";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
|
|
|
@ -12,13 +12,13 @@
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "mympd";
|
pname = "mympd";
|
||||||
version = "6.8.1";
|
version = "6.8.3";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "jcorporation";
|
owner = "jcorporation";
|
||||||
repo = "myMPD";
|
repo = "myMPD";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "dIGg2mLxN6XBDH3GFXtF7nB9a/zf/qMlPCvIulFRXn8=";
|
sha256 = "1a3jrqslxk2a9h5gj6kch108lg9z0i5zwr0j9yd5viyfhr3ka4cq";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
, libsamplerate
|
, libsamplerate
|
||||||
, libsndfile
|
, libsndfile
|
||||||
, libebur128
|
, libebur128
|
||||||
|
, rnnoise
|
||||||
, boost
|
, boost
|
||||||
, dbus
|
, dbus
|
||||||
, fftwFloat
|
, fftwFloat
|
||||||
|
@ -44,13 +45,13 @@ let
|
||||||
];
|
];
|
||||||
in stdenv.mkDerivation rec {
|
in stdenv.mkDerivation rec {
|
||||||
pname = "pulseeffects";
|
pname = "pulseeffects";
|
||||||
version = "4.8.2";
|
version = "4.8.3";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "wwmm";
|
owner = "wwmm";
|
||||||
repo = "pulseeffects";
|
repo = "pulseeffects";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "19h47mrxjm6x83pqcxfsshf48kd1babfk0kwdy1c7fjri7kj0g0s";
|
sha256 = "0k5p5y3im7xnf0ikaghh56nfhirkdwf95c8fr17wasgdpw2m86i2";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
|
@ -79,6 +80,7 @@ in stdenv.mkDerivation rec {
|
||||||
libebur128
|
libebur128
|
||||||
libsamplerate
|
libsamplerate
|
||||||
libsndfile
|
libsndfile
|
||||||
|
rnnoise
|
||||||
boost
|
boost
|
||||||
dbus
|
dbus
|
||||||
fftwFloat
|
fftwFloat
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{ stdenv, fetchurl, python3, wrapGAppsHook, gettext, libsoup, gnome3, gtk3, gdk-pixbuf,
|
{ stdenv, fetchurl, python3, wrapGAppsHook, gettext, libsoup, gnome3, gtk3, gdk-pixbuf, librsvg,
|
||||||
tag ? "", xvfb_run, dbus, glibcLocales, glib, glib-networking, gobject-introspection,
|
tag ? "", xvfb_run, dbus, glibcLocales, glib, glib-networking, gobject-introspection, hicolor-icon-theme,
|
||||||
gst_all_1, withGstPlugins ? true,
|
gst_all_1, withGstPlugins ? true,
|
||||||
xineBackend ? false, xineLib,
|
xineBackend ? false, xineLib,
|
||||||
withDbusPython ? false, withPyInotify ? false, withMusicBrainzNgs ? false, withPahoMqtt ? false,
|
withDbusPython ? false, withPyInotify ? false, withMusicBrainzNgs ? false, withPahoMqtt ? false,
|
||||||
|
@ -9,16 +9,18 @@
|
||||||
let optionals = stdenv.lib.optionals; in
|
let optionals = stdenv.lib.optionals; in
|
||||||
python3.pkgs.buildPythonApplication rec {
|
python3.pkgs.buildPythonApplication rec {
|
||||||
pname = "quodlibet${tag}";
|
pname = "quodlibet${tag}";
|
||||||
version = "4.2.1";
|
version = "4.3.0";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://github.com/quodlibet/quodlibet/releases/download/release-${version}/quodlibet-${version}.tar.gz";
|
url = "https://github.com/quodlibet/quodlibet/releases/download/release-${version}/quodlibet-${version}.tar.gz";
|
||||||
sha256 = "0b1rvr4hqs2bjmhayms7vxxkn3d92k9v7p1269rjhf11hpk122l7";
|
sha256 = "1q17ckblfa4fcs7wsjwsq1dj7360ymrdyjkyqmj864wzlqkw1rd2";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
patches = [ ./quodlibet-feedparser6.patch ];
|
||||||
|
|
||||||
nativeBuildInputs = [ wrapGAppsHook gettext ];
|
nativeBuildInputs = [ wrapGAppsHook gettext ];
|
||||||
|
|
||||||
checkInputs = [ gdk-pixbuf ] ++ (with python3.pkgs; [ pytest pytest_xdist polib xvfb_run dbus.daemon glibcLocales ]);
|
checkInputs = [ gdk-pixbuf hicolor-icon-theme ] ++ (with python3.pkgs; [ pytest pytest_xdist polib xvfb_run dbus.daemon glibcLocales ]);
|
||||||
|
|
||||||
buildInputs = [ gnome3.adwaita-icon-theme libsoup glib glib-networking gtk3 webkitgtk gdk-pixbuf keybinder3 gtksourceview libmodplug libappindicator-gtk3 kakasi gobject-introspection ]
|
buildInputs = [ gnome3.adwaita-icon-theme libsoup glib glib-networking gtk3 webkitgtk gdk-pixbuf keybinder3 gtksourceview libmodplug libappindicator-gtk3 kakasi gobject-introspection ]
|
||||||
++ (if xineBackend then [ xineLib ] else with gst_all_1;
|
++ (if xineBackend then [ xineLib ] else with gst_all_1;
|
||||||
|
@ -36,6 +38,10 @@ python3.pkgs.buildPythonApplication rec {
|
||||||
pytestFlags = stdenv.lib.optionals (xineBackend || !withGstPlugins) [
|
pytestFlags = stdenv.lib.optionals (xineBackend || !withGstPlugins) [
|
||||||
"--ignore=tests/plugin/test_replaygain.py"
|
"--ignore=tests/plugin/test_replaygain.py"
|
||||||
] ++ [
|
] ++ [
|
||||||
|
# requires networking
|
||||||
|
"--ignore=tests/test_browsers_iradio.py"
|
||||||
|
# the default theme doesn't have the required icons
|
||||||
|
"--ignore=tests/plugin/test_trayicon.py"
|
||||||
# upstream does actually not enforce source code linting
|
# upstream does actually not enforce source code linting
|
||||||
"--ignore=tests/quality"
|
"--ignore=tests/quality"
|
||||||
# build failure on Arch Linux
|
# build failure on Arch Linux
|
||||||
|
@ -45,7 +51,13 @@ python3.pkgs.buildPythonApplication rec {
|
||||||
|
|
||||||
checkPhase = ''
|
checkPhase = ''
|
||||||
runHook preCheck
|
runHook preCheck
|
||||||
|
# newer gettext spews some warnings which fail the tests
|
||||||
|
substituteInPlace tests/test_po.py --replace "strict=True" "strict=False"
|
||||||
|
# otherwise tests can't find the app icons; instead of creating index.theme from scratch
|
||||||
|
# I re-used the one from hicolor-icon-theme which seems to work
|
||||||
|
cp "${hicolor-icon-theme}/share/icons/hicolor/index.theme" quodlibet/images/hicolor
|
||||||
env XDG_DATA_DIRS="$out/share:${gtk3}/share/gsettings-schemas/${gtk3.name}:$XDG_ICON_DIRS:$XDG_DATA_DIRS" \
|
env XDG_DATA_DIRS="$out/share:${gtk3}/share/gsettings-schemas/${gtk3.name}:$XDG_ICON_DIRS:$XDG_DATA_DIRS" \
|
||||||
|
GDK_PIXBUF_MODULE_FILE=${librsvg}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache \
|
||||||
HOME=$(mktemp -d) \
|
HOME=$(mktemp -d) \
|
||||||
xvfb-run -s '-screen 0 800x600x24' dbus-run-session \
|
xvfb-run -s '-screen 0 800x600x24' dbus-run-session \
|
||||||
--config-file=${dbus.daemon}/share/dbus-1/session.conf \
|
--config-file=${dbus.daemon}/share/dbus-1/session.conf \
|
||||||
|
@ -73,7 +85,7 @@ python3.pkgs.buildPythonApplication rec {
|
||||||
& internet radio, and all major audio formats.
|
& internet radio, and all major audio formats.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
maintainers = with maintainers; [ coroa sauyon ];
|
maintainers = with maintainers; [ coroa pbogdan ];
|
||||||
homepage = "https://quodlibet.readthedocs.io/en/latest/";
|
homepage = "https://quodlibet.readthedocs.io/en/latest/";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
12
third_party/nixpkgs/pkgs/applications/audio/quodlibet/quodlibet-feedparser6.patch
vendored
Normal file
12
third_party/nixpkgs/pkgs/applications/audio/quodlibet/quodlibet-feedparser6.patch
vendored
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
Support feedparser 6, based on https://github.com/quodlibet/quodlibet/pull/3464
|
||||||
|
|
||||||
|
--- a/quodlibet/browsers/audiofeeds.py
|
||||||
|
+++ b/quodlibet/browsers/audiofeeds.py
|
||||||
|
@@ -137,7 +137,4 @@ class Feed(list):
|
||||||
|
def parse(self):
|
||||||
|
try:
|
||||||
|
- if not self._check_feed():
|
||||||
|
- return False
|
||||||
|
-
|
||||||
|
doc = feedparser.parse(self.uri)
|
||||||
|
except Exception as e:
|
|
@ -140,6 +140,6 @@ stdenv.mkDerivation rec {
|
||||||
description = "A cross-desktop display manager";
|
description = "A cross-desktop display manager";
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
license = licenses.gpl3;
|
license = licenses.gpl3;
|
||||||
maintainers = with maintainers; [ ocharles worldofpeace ];
|
maintainers = with maintainers; [ worldofpeace ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -67,6 +67,6 @@ stdenv.mkDerivation rec {
|
||||||
homepage = "https://launchpad.net/lightdm-gtk-greeter";
|
homepage = "https://launchpad.net/lightdm-gtk-greeter";
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
license = licenses.gpl3;
|
license = licenses.gpl3;
|
||||||
maintainers = with maintainers; [ ocharles ];
|
maintainers = with maintainers; [ ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,13 +2,13 @@
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "mg";
|
pname = "mg";
|
||||||
version = "6.7";
|
version = "6.8.1";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "ibara";
|
owner = "ibara";
|
||||||
repo = "mg";
|
repo = "mg";
|
||||||
rev = "mg-6.7";
|
rev = "mg-6.8.1";
|
||||||
sha256 = "15adwibq6xrfxbrxzk765g9250iyfn4wbcxd7kcsabiwn6apm0ai";
|
sha256 = "0fyqyi5sag13jx8bc22bvkgybddvsr0wdili9ikxnpnqg2w84fx7";
|
||||||
};
|
};
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
version = "12.1";
|
version = "12.2";
|
||||||
desktopItem = makeDesktopItem {
|
desktopItem = makeDesktopItem {
|
||||||
name = "netbeans";
|
name = "netbeans";
|
||||||
exec = "netbeans";
|
exec = "netbeans";
|
||||||
|
@ -19,7 +19,7 @@ stdenv.mkDerivation {
|
||||||
inherit version;
|
inherit version;
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "mirror://apache/netbeans/netbeans/${version}/netbeans-${version}-bin.zip";
|
url = "mirror://apache/netbeans/netbeans/${version}/netbeans-${version}-bin.zip";
|
||||||
sha512 = "ad4bb5b191c784ed144b0b4831a8b95e0707c362917833c279d3f6fad11d7b3fb1f004f30121a941b694fc2ce323974b15072aa31cb5449111bc5d33d0d77103";
|
sha512 = "b25cda9830e8fe1d05687b08cc5fa9bcac7e8e6d12776998a4da7e483b3be0d04493345e56be7e6198fa8f86428d57d4459bfa7372c2e3f918f4a1101d0a31a7";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildCommand = ''
|
buildCommand = ''
|
||||||
|
@ -27,6 +27,8 @@ stdenv.mkDerivation {
|
||||||
unzip $src
|
unzip $src
|
||||||
patchShebangs .
|
patchShebangs .
|
||||||
|
|
||||||
|
rm netbeans/bin/*.exe
|
||||||
|
|
||||||
# Copy to installation directory and create a wrapper capable of starting
|
# Copy to installation directory and create a wrapper capable of starting
|
||||||
# it.
|
# it.
|
||||||
mkdir -pv $out/bin
|
mkdir -pv $out/bin
|
||||||
|
|
|
@ -5,13 +5,13 @@
|
||||||
|
|
||||||
buildPythonApplication rec {
|
buildPythonApplication rec {
|
||||||
pname = "rednotebook";
|
pname = "rednotebook";
|
||||||
version = "2.20";
|
version = "2.21";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "jendrikseipp";
|
owner = "jendrikseipp";
|
||||||
repo = "rednotebook";
|
repo = "rednotebook";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "1n0zwrzrjh6sg8vmb95mgscsqrylhgm51zsirblqmpvs392jxrk3";
|
sha256 = "07zm4q9h583sg82ayhn9d0ra3wbsfaqrl5sfw6a1kwhyxxkwp8ad";
|
||||||
};
|
};
|
||||||
|
|
||||||
# We have not packaged tests.
|
# We have not packaged tests.
|
||||||
|
|
55
third_party/nixpkgs/pkgs/applications/editors/spacevim/default.nix
vendored
Normal file
55
third_party/nixpkgs/pkgs/applications/editors/spacevim/default.nix
vendored
Normal file
|
@ -0,0 +1,55 @@
|
||||||
|
{ ripgrep, gitAndTools, fzf, makeWrapper, vim_configurable, vimPlugins, fetchFromGitHub, writeTextDir
|
||||||
|
, stdenv, runCommandNoCC, remarshal, formats, spacevim_config ? import ./init.nix }:
|
||||||
|
with stdenv;
|
||||||
|
let
|
||||||
|
format = formats.toml {};
|
||||||
|
vim-customized = vim_configurable.customize {
|
||||||
|
name = "vim";
|
||||||
|
# Not clear at the moment how to import plugins such that
|
||||||
|
# SpaceVim finds them and does not auto download them to
|
||||||
|
# ~/.cache/vimfiles/repos
|
||||||
|
vimrcConfig.packages.myVimPackage = with vimPlugins; { start = [ ]; };
|
||||||
|
};
|
||||||
|
spacevimdir = format.generate "init.toml" spacevim_config;
|
||||||
|
in mkDerivation rec {
|
||||||
|
pname = "spacevim";
|
||||||
|
version = "1.5.0";
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "SpaceVim";
|
||||||
|
repo = "SpaceVim";
|
||||||
|
rev = "v${version}";
|
||||||
|
sha256 = "1xw4l262x7wzs1m65bddwqf3qx4254ykddsw3c3p844pb3mzqhh7";
|
||||||
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = [ makeWrapper vim-customized];
|
||||||
|
buildInputs = [ vim-customized ];
|
||||||
|
|
||||||
|
buildPhase = ''
|
||||||
|
# generate the helptags
|
||||||
|
vim -u NONE -c "helptags $(pwd)/doc" -c q
|
||||||
|
'';
|
||||||
|
|
||||||
|
patches = [ ./helptags.patch ];
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out/bin
|
||||||
|
|
||||||
|
cp -r $(pwd) $out/SpaceVim
|
||||||
|
|
||||||
|
# trailing slash very important for SPACEVIMDIR
|
||||||
|
makeWrapper "${vim-customized}/bin/vim" "$out/bin/spacevim" \
|
||||||
|
--add-flags "-u $out/SpaceVim/vimrc" --set SPACEVIMDIR "${spacevimdir}/" \
|
||||||
|
--prefix PATH : ${lib.makeBinPath [ fzf gitAndTools.git ripgrep]}
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with stdenv.lib; {
|
||||||
|
description = "Modern Vim distribution";
|
||||||
|
longDescription = ''
|
||||||
|
SpaceVim is a distribution of the Vim editor that’s inspired by spacemacs.
|
||||||
|
'';
|
||||||
|
homepage = "https://spacevim.org/";
|
||||||
|
license = licenses.gpl3Plus;
|
||||||
|
maintainers = [ maintainers.fzakaria ];
|
||||||
|
platforms = platforms.all;
|
||||||
|
};
|
||||||
|
}
|
18
third_party/nixpkgs/pkgs/applications/editors/spacevim/helptags.patch
vendored
Normal file
18
third_party/nixpkgs/pkgs/applications/editors/spacevim/helptags.patch
vendored
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
diff --git a/autoload/SpaceVim.vim b/autoload/SpaceVim.vim
|
||||||
|
index 16688680..fcafd6f7 100644
|
||||||
|
--- a/autoload/SpaceVim.vim
|
||||||
|
+++ b/autoload/SpaceVim.vim
|
||||||
|
@@ -1255,13 +1255,6 @@ function! SpaceVim#end() abort
|
||||||
|
let &helplang = 'jp'
|
||||||
|
endif
|
||||||
|
""
|
||||||
|
- " generate tags for SpaceVim
|
||||||
|
- let help = fnamemodify(g:_spacevim_root_dir, ':p:h') . '/doc'
|
||||||
|
- try
|
||||||
|
- exe 'helptags ' . help
|
||||||
|
- catch
|
||||||
|
- call SpaceVim#logger#warn('Failed to generate helptags for SpaceVim')
|
||||||
|
- endtry
|
||||||
|
|
||||||
|
""
|
||||||
|
" set language
|
46
third_party/nixpkgs/pkgs/applications/editors/spacevim/init.nix
vendored
Normal file
46
third_party/nixpkgs/pkgs/applications/editors/spacevim/init.nix
vendored
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
# The Nix expression is a 1:1 mapping of the spacevim toml config which you can find on their website: spacevim.org/quick-start-guide/#configuration
|
||||||
|
|
||||||
|
{
|
||||||
|
custom_plugins = [{
|
||||||
|
merged = false;
|
||||||
|
name = "lilydjwg/colorizer";
|
||||||
|
}];
|
||||||
|
layers = [
|
||||||
|
{ name = "default"; }
|
||||||
|
{
|
||||||
|
enable = true;
|
||||||
|
name = "colorscheme";
|
||||||
|
}
|
||||||
|
{ name = "fzf"; }
|
||||||
|
{
|
||||||
|
default_height = 30;
|
||||||
|
default_position = "top";
|
||||||
|
name = "shell";
|
||||||
|
}
|
||||||
|
{ name = "edit"; }
|
||||||
|
{ name = "VersionControl"; }
|
||||||
|
{ name = "git"; }
|
||||||
|
{
|
||||||
|
auto-completion-return-key-behavior = "complete";
|
||||||
|
auto-completion-tab-key-behavior = "cycle";
|
||||||
|
autocomplete_method = "coc";
|
||||||
|
name = "autocomplete";
|
||||||
|
}
|
||||||
|
{ name = "lang#ruby"; }
|
||||||
|
{ name = "lang#nix"; }
|
||||||
|
{ name = "lang#java"; }
|
||||||
|
{ name = "lang#kotlin"; }
|
||||||
|
{ name = "lang#sh"; }
|
||||||
|
{ name = "lang#html"; }
|
||||||
|
];
|
||||||
|
options = {
|
||||||
|
buffer_index_type = 4;
|
||||||
|
colorscheme = "gruvbox";
|
||||||
|
colorscheme_bg = "dark";
|
||||||
|
enable_guicolors = true;
|
||||||
|
enable_statusline_mode = true;
|
||||||
|
enable_tabline_filetype_icon = true;
|
||||||
|
statusline_separator = "fire";
|
||||||
|
timeoutlen = 500;
|
||||||
|
};
|
||||||
|
}
|
|
@ -2,22 +2,22 @@
|
||||||
, fetchurl, runtimeShell }:
|
, fetchurl, runtimeShell }:
|
||||||
|
|
||||||
let
|
let
|
||||||
version = "3.3.3";
|
version = "3.5.11";
|
||||||
pname = "standardnotes";
|
pname = "standardnotes";
|
||||||
name = "${pname}-${version}";
|
name = "${pname}-${version}";
|
||||||
|
|
||||||
plat = {
|
plat = {
|
||||||
i386-linux = "-i386";
|
i386-linux = "-i386";
|
||||||
x86_64-linux = "";
|
x86_64-linux = "x86_64";
|
||||||
}.${stdenv.hostPlatform.system};
|
}.${stdenv.hostPlatform.system};
|
||||||
|
|
||||||
sha256 = {
|
sha256 = {
|
||||||
i386-linux = "2ccdf23588b09d645811e562d4fd7e02ac0e367bf2b34e373d8470d48544036d";
|
i386-linux = "009fnnd7ysxkyykkbmhvr0vn13b21j1j5mzwdvqdkhm9v3c9rbgj";
|
||||||
x86_64-linux = "6366d0a37cbf2cf51008a666e40bada763dd1539173de01e093bcbe4146a6bd8";
|
x86_64-linux = "1fij00d03ky57jlnhf9n2iqvfa4dgmkgawrxd773gg03hdsk7xcf";
|
||||||
}.${stdenv.hostPlatform.system};
|
}.${stdenv.hostPlatform.system};
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://github.com/standardnotes/desktop/releases/download/v${version}/standard-notes-${version}${plat}.AppImage";
|
url = "https://github.com/standardnotes/desktop/releases/download/v${version}/standard-notes-${version}-linux-${plat}.AppImage";
|
||||||
inherit sha256;
|
inherit sha256;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -4,13 +4,13 @@ with python3.pkgs;
|
||||||
|
|
||||||
buildPythonApplication rec {
|
buildPythonApplication rec {
|
||||||
pname = "thonny";
|
pname = "thonny";
|
||||||
version = "3.3.0";
|
version = "3.3.1";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = pname;
|
owner = pname;
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "1k1iy01az65w463j6id7iyrbinjbjd220i100mrnxyn569dxmf34";
|
sha256 = "0nk4kx6apmnd6fyd9zw77yprjzgjf7micvcws2i2sci0d9fff34c";
|
||||||
};
|
};
|
||||||
|
|
||||||
propagatedBuildInputs = with python3.pkgs; [
|
propagatedBuildInputs = with python3.pkgs; [
|
||||||
|
|
|
@ -14,8 +14,8 @@ let
|
||||||
else throw "ImageMagick is not supported on this platform.";
|
else throw "ImageMagick is not supported on this platform.";
|
||||||
|
|
||||||
cfg = {
|
cfg = {
|
||||||
version = "7.0.10-35";
|
version = "7.0.10-46";
|
||||||
sha256 = "0hcqvn3n3ip2fia48d1nb1m4r5ir00vbaa62xqni30kglh3n2sfh";
|
sha256 = "019l1qv8ds8hvyjwi1g21293a7v28bxf8ycnvr9828kpdhf4jxaa";
|
||||||
patches = [];
|
patches = [];
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
|
|
|
@ -7,11 +7,11 @@ with stdenv.lib;
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "feh";
|
pname = "feh";
|
||||||
version = "3.6";
|
version = "3.6.1";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://feh.finalrewind.org/${pname}-${version}.tar.bz2";
|
url = "https://feh.finalrewind.org/${pname}-${version}.tar.bz2";
|
||||||
sha256 = "1n6gbyzlc3kx2cq9wfz7azn7mrjmcc9pq436k1n4mrh0lik5sxw7";
|
sha256 = "1a0ygdpyvpcsr0hdi9ai7ycbkgvacq8dpd8cacbppsds5k2xw7lv";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = [ "out" "man" "doc" ];
|
outputs = [ "out" "man" "doc" ];
|
||||||
|
|
|
@ -21,13 +21,13 @@
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "fondo";
|
pname = "fondo";
|
||||||
version = "1.4.0";
|
version = "1.5.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "calo001";
|
owner = "calo001";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = version;
|
rev = version;
|
||||||
sha256 = "0cdcn4qmdryk2x327f1z3pq8pg4cb0q1jr779gh8s6nqajyk8nqm";
|
sha256 = "1zmrpk0b5z6m956j923njn6dpqdm2p8653a325hgjjjq0sgwbhj2";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
|
|
|
@ -9,13 +9,13 @@ let
|
||||||
pythonPackages = python3Packages;
|
pythonPackages = python3Packages;
|
||||||
in mkDerivation rec {
|
in mkDerivation rec {
|
||||||
pname = "freecad-unstable";
|
pname = "freecad-unstable";
|
||||||
version = "2020-10-17";
|
version = "2020-12-08";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "FreeCAD";
|
owner = "FreeCAD";
|
||||||
repo = "FreeCAD";
|
repo = "FreeCAD";
|
||||||
rev = "f3bdaaa55a6c03b297924c40819d23e4603fa55b";
|
rev = "daea30341ea2d5eaf2bfb65614128a5fa2abc8b7";
|
||||||
sha256 = "1q1iy4i9k65v8z7h8a6r4bf5ycn124jp26xwp0xwbar4gnkx2jiq";
|
sha256 = "1fza64lygqq35v7kzgqmiq5dvl5rpgkhlzv06f9dszdz44hznina";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "goxel";
|
pname = "goxel";
|
||||||
version = "0.10.6";
|
version = "0.10.7";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "guillaumechereau";
|
owner = "guillaumechereau";
|
||||||
repo = "goxel";
|
repo = "goxel";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "1wmxy5wfk1xrqgz0y0zcr4vkddylqc70cv4vzk117x6whjnldsm3";
|
sha256 = "1v6m6nhl1if8ik5bmblhq46bip6y2qz18a04s8a9awb4yh9ls039";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [ ./disable-imgui_ini.patch ];
|
patches = [ ./disable-imgui_ini.patch ];
|
||||||
|
|
22
third_party/nixpkgs/pkgs/applications/graphics/img-cat/default.nix
vendored
Normal file
22
third_party/nixpkgs/pkgs/applications/graphics/img-cat/default.nix
vendored
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
{ lib, buildGoModule, fetchFromGitHub }:
|
||||||
|
|
||||||
|
buildGoModule rec {
|
||||||
|
pname = "imgcat";
|
||||||
|
version = "1.2.0";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "trashhalo";
|
||||||
|
repo = "imgcat";
|
||||||
|
rev = "v${version}";
|
||||||
|
sha256 = "0x7a1izsbrbfph7wa9ny9r4a8lp6z15qpb6jf8wsxshiwnkjyrig";
|
||||||
|
};
|
||||||
|
|
||||||
|
vendorSha256 = "191gi4c5jk8p9xvbm1cdhk5yi8q2cp2jvjq1sgxqw1ad0lppwhg2";
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "A tool to output images as RGB ANSI graphics on the terminal";
|
||||||
|
homepage = "https://github.com/trashhalo/imgcat";
|
||||||
|
license = licenses.mit;
|
||||||
|
maintainers = with maintainers; [ penguwin ];
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,23 +1,22 @@
|
||||||
{ stdenv
|
{ stdenv
|
||||||
, buildGoPackage
|
|
||||||
, unstableGitUpdater
|
, unstableGitUpdater
|
||||||
|
, buildGoModule
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildGoPackage rec {
|
buildGoModule {
|
||||||
pname = "meme";
|
pname = "meme";
|
||||||
version = "unstable-2017-09-10";
|
version = "unstable-2020-05-28";
|
||||||
|
|
||||||
owner = "nomad-software";
|
|
||||||
repo = "meme";
|
|
||||||
goPackagePath = "github.com/${owner}/${repo}";
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
inherit owner repo;
|
owner = "nomad-software";
|
||||||
rev = "a6521f2eecb0aac22937b0013747ed9cb40b81ea";
|
repo = "meme";
|
||||||
sha256 = "1gbsv1d58ck6mj89q31s5b0ppw51ab76yqgz39jgwqnkidvzdfly";
|
rev = "33a8b7d0de6996294a0464a605dacc17b26a6b02";
|
||||||
|
sha256 = "05h8d6pjszhr49xqg02nw94hm95kb7w1i7nw8jxi582fxxm2qbnm";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
vendorSha256 = null;
|
||||||
|
|
||||||
passthru.updateScript = unstableGitUpdater { };
|
passthru.updateScript = unstableGitUpdater { };
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
|
|
|
@ -4,7 +4,7 @@ let
|
||||||
# To obtain the version you will need to run the following command:
|
# To obtain the version you will need to run the following command:
|
||||||
#
|
#
|
||||||
# dpkg-deb -I ${odafileconverter.src} | grep Version
|
# dpkg-deb -I ${odafileconverter.src} | grep Version
|
||||||
version = "21.7.0.0";
|
version = "21.11.0.0";
|
||||||
rpath = "$ORIGIN:${lib.makeLibraryPath [ stdenv.cc.cc qtbase ]}";
|
rpath = "$ORIGIN:${lib.makeLibraryPath [ stdenv.cc.cc qtbase ]}";
|
||||||
|
|
||||||
in mkDerivation {
|
in mkDerivation {
|
||||||
|
@ -14,8 +14,8 @@ in mkDerivation {
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
# NB: this URL is not stable (i.e. the underlying file and the corresponding version will change over time)
|
# NB: this URL is not stable (i.e. the underlying file and the corresponding version will change over time)
|
||||||
url = "https://download.opendesign.com/guestfiles/ODAFileConverter/ODAFileConverter_QT5_lnxX64_7.2dll.deb";
|
url = "http://web.archive.org/web/20201206221727if_/https://download.opendesign.com/guestfiles/Demo/ODAFileConverter_QT5_lnxX64_7.2dll_21.11.deb";
|
||||||
sha256 = "0sa21nnwzqb6g7gl0z43smqgcd9h3xipj3cq2cl7ybfh3cvcxfi9";
|
sha256 = "10027a3ab18efd04ca75aa699ff550eca3bdfe6f7084460d3c00001bffb50070";
|
||||||
};
|
};
|
||||||
|
|
||||||
unpackPhase = ''
|
unpackPhase = ''
|
||||||
|
|
|
@ -99,7 +99,7 @@ mkDerivation rec {
|
||||||
sip
|
sip
|
||||||
# the following are distributed with calibre, but we use upstream instead
|
# the following are distributed with calibre, but we use upstream instead
|
||||||
odfpy
|
odfpy
|
||||||
]
|
] ++ lib.optional (unrarSupport) unrardll
|
||||||
);
|
);
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
|
|
|
@ -2,31 +2,22 @@
|
||||||
|
|
||||||
python3Packages.buildPythonApplication rec {
|
python3Packages.buildPythonApplication rec {
|
||||||
pname = "etesync-dav";
|
pname = "etesync-dav";
|
||||||
version = "0.20.0";
|
version = "0.30.6";
|
||||||
|
|
||||||
src = python3Packages.fetchPypi {
|
src = python3Packages.fetchPypi {
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
sha256 = "1q8h89hqi4kxphn1g5nbcia0haz5k57is9rycwaabm55mj9s9fah";
|
sha256 = "0cjz4p3a750fwvrxbzwda0sidw7nscahvppdshbsx49i6qrczpbg";
|
||||||
};
|
};
|
||||||
|
|
||||||
postPatch = ''
|
|
||||||
substituteInPlace setup.py --replace "Radicale==" "Radicale>="
|
|
||||||
'';
|
|
||||||
|
|
||||||
propagatedBuildInputs = with python3Packages; [
|
propagatedBuildInputs = with python3Packages; [
|
||||||
|
etebase
|
||||||
etesync
|
etesync
|
||||||
flask
|
flask
|
||||||
flask_wtf
|
flask_wtf
|
||||||
radicale3
|
radicale3
|
||||||
];
|
];
|
||||||
|
|
||||||
checkInputs = with python3Packages; [
|
doCheck = false;
|
||||||
pytest
|
|
||||||
];
|
|
||||||
|
|
||||||
checkPhase = ''
|
|
||||||
pytest
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
homepage = "https://www.etesync.com/";
|
homepage = "https://www.etesync.com/";
|
||||||
|
|
|
@ -20,7 +20,7 @@ stdenv.mkDerivation {
|
||||||
meta = {
|
meta = {
|
||||||
homepage = "http://www.andreas-diesner.de/garminplugin";
|
homepage = "http://www.andreas-diesner.de/garminplugin";
|
||||||
license = stdenv.lib.licenses.gpl3;
|
license = stdenv.lib.licenses.gpl3;
|
||||||
maintainers = [ stdenv.lib.maintainers.ocharles ];
|
maintainers = [ ];
|
||||||
platforms = stdenv.lib.platforms.linux;
|
platforms = stdenv.lib.platforms.linux;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -72,7 +72,7 @@ in mkDerivation rec {
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "Performance software for cyclists, runners and triathletes";
|
description = "Performance software for cyclists, runners and triathletes";
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
maintainers = [ maintainers.ocharles ];
|
maintainers = [ ];
|
||||||
license = licenses.gpl3;
|
license = licenses.gpl3;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,13 +25,30 @@ let
|
||||||
[
|
[
|
||||||
# the following dependencies are non trivial to update since later versions introduce backwards incompatible
|
# the following dependencies are non trivial to update since later versions introduce backwards incompatible
|
||||||
# changes that might affect plugins, or due to other observed problems
|
# changes that might affect plugins, or due to other observed problems
|
||||||
(mkOverride "markupsafe" "1.1.1" "29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b")
|
(mkOverride "flask-babel" "1.0.0" "0gmb165vkwv5v7dxsxa2i3zhafns0fh938m2zdcrv4d8z5l099yn")
|
||||||
(mkOverride "rsa" "4.0" "1a836406405730121ae9823e19c6e806c62bbad73f890574fff50efa4122c487")
|
(mkOverride "rsa" "4.0" "1a836406405730121ae9823e19c6e806c62bbad73f890574fff50efa4122c487")
|
||||||
(mkOverride "markdown" "3.1.1" "2e50876bcdd74517e7b71f3e7a76102050edec255b3983403f1a63e7c8a41e7a")
|
(mkOverride "markdown" "3.1.1" "2e50876bcdd74517e7b71f3e7a76102050edec255b3983403f1a63e7c8a41e7a")
|
||||||
(mkOverride "tornado" "5.1.1" "4e5158d97583502a7e2739951553cbd88a72076f152b4b11b64b9a10c4c49409")
|
(mkOverride "tornado" "5.1.1" "4e5158d97583502a7e2739951553cbd88a72076f152b4b11b64b9a10c4c49409")
|
||||||
(mkOverride "unidecode" "0.04.21" "280a6ab88e1f2eb5af79edff450021a0d3f0448952847cd79677e55e58bad051")
|
(mkOverride "unidecode" "0.04.21" "280a6ab88e1f2eb5af79edff450021a0d3f0448952847cd79677e55e58bad051")
|
||||||
(mkOverride "sarge" "0.1.5.post0" "1c1ll7pys9vra5cfi8jxlgrgaql6c27l6inpy15aprgqhc4ck36s")
|
(mkOverride "sarge" "0.1.5.post0" "1c1ll7pys9vra5cfi8jxlgrgaql6c27l6inpy15aprgqhc4ck36s")
|
||||||
|
|
||||||
|
# Octoprint needs zeroconf >=0.24 <0.25. While this should be done in
|
||||||
|
# the mkOverride aboves, this package also has broken tests, so we need
|
||||||
|
# a proper override.
|
||||||
|
(
|
||||||
|
self: super: {
|
||||||
|
zeroconf = super.zeroconf.overrideAttrs (oldAttrs: rec {
|
||||||
|
version = "0.24.5";
|
||||||
|
src = oldAttrs.src.override {
|
||||||
|
inherit version;
|
||||||
|
sha256 = "0jpgd0rk91si93857mjrizan5gc42kj1q4fi4160qgk68la88fl9";
|
||||||
|
};
|
||||||
|
buildInputs = [ self.nose ];
|
||||||
|
checkPhase = "nosetests";
|
||||||
|
});
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
# Built-in dependency
|
# Built-in dependency
|
||||||
(
|
(
|
||||||
self: super: {
|
self: super: {
|
||||||
|
@ -55,13 +72,13 @@ let
|
||||||
self: super: {
|
self: super: {
|
||||||
octoprint-firmwarecheck = self.buildPythonPackage rec {
|
octoprint-firmwarecheck = self.buildPythonPackage rec {
|
||||||
pname = "OctoPrint-FirmwareCheck";
|
pname = "OctoPrint-FirmwareCheck";
|
||||||
version = "2020.06.22";
|
version = "2020.09.23";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "OctoPrint";
|
owner = "OctoPrint";
|
||||||
repo = "OctoPrint-FirmwareCheck";
|
repo = "OctoPrint-FirmwareCheck";
|
||||||
rev = version;
|
rev = version;
|
||||||
sha256 = "19y7hrgg9z8hl7cwqkvg8nc8bk0wwrsfvjd1wawy33wn60psqv1h";
|
sha256 = "1l1ajhnsc39prgk59mp93h90dgl9gh660cci00z5b5gj2h6dv1d1";
|
||||||
};
|
};
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
};
|
};
|
||||||
|
@ -72,53 +89,54 @@ let
|
||||||
self: super: {
|
self: super: {
|
||||||
octoprint = self.buildPythonPackage rec {
|
octoprint = self.buildPythonPackage rec {
|
||||||
pname = "OctoPrint";
|
pname = "OctoPrint";
|
||||||
version = "1.4.2";
|
version = "1.5.1";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "OctoPrint";
|
owner = "OctoPrint";
|
||||||
repo = "OctoPrint";
|
repo = "OctoPrint";
|
||||||
rev = version;
|
rev = version;
|
||||||
sha256 = "1bblrjwkccy1ifw7lf55g3k9lq1sqzwd49vj8bfzj2w07a7qda62";
|
sha256 = "04x58cjivslsrld341ip11c50d50p2q01090nsyji0j255v986j9";
|
||||||
};
|
};
|
||||||
|
|
||||||
propagatedBuildInputs = with super; [
|
propagatedBuildInputs = with super; [
|
||||||
octoprint-firmwarecheck
|
blinker
|
||||||
octoprint-filecheck
|
cachelib
|
||||||
markupsafe
|
click
|
||||||
tornado
|
emoji
|
||||||
markdown
|
feedparser
|
||||||
rsa
|
filetype
|
||||||
regex
|
|
||||||
flask
|
flask
|
||||||
jinja2
|
|
||||||
flask_login
|
|
||||||
flask-babel
|
flask-babel
|
||||||
flask_assets
|
flask_assets
|
||||||
werkzeug
|
flask_login
|
||||||
itsdangerous
|
|
||||||
cachelib
|
|
||||||
pyyaml
|
|
||||||
pyserial
|
|
||||||
netaddr
|
|
||||||
watchdog
|
|
||||||
sarge
|
|
||||||
netifaces
|
|
||||||
pylru
|
|
||||||
pkginfo
|
|
||||||
requests
|
|
||||||
semantic-version
|
|
||||||
psutil
|
|
||||||
click
|
|
||||||
feedparser
|
|
||||||
future
|
|
||||||
websocket_client
|
|
||||||
wrapt
|
|
||||||
emoji
|
|
||||||
frozendict
|
frozendict
|
||||||
|
future
|
||||||
|
itsdangerous
|
||||||
|
jinja2
|
||||||
|
markdown
|
||||||
|
markupsafe
|
||||||
|
netaddr
|
||||||
|
netifaces
|
||||||
|
octoprint-filecheck
|
||||||
|
octoprint-firmwarecheck
|
||||||
|
pkginfo
|
||||||
|
psutil
|
||||||
|
pylru
|
||||||
|
pyserial
|
||||||
|
pyyaml
|
||||||
|
regex
|
||||||
|
requests
|
||||||
|
rsa
|
||||||
|
sarge
|
||||||
|
semantic-version
|
||||||
sentry-sdk
|
sentry-sdk
|
||||||
filetype
|
tornado
|
||||||
unidecode
|
unidecode
|
||||||
blinker
|
watchdog
|
||||||
|
websocket_client
|
||||||
|
werkzeug
|
||||||
|
wrapt
|
||||||
|
zeroconf
|
||||||
] ++ lib.optionals stdenv.isDarwin [ py.pkgs.appdirs ];
|
] ++ lib.optionals stdenv.isDarwin [ py.pkgs.appdirs ];
|
||||||
|
|
||||||
checkInputs = with super; [ pytestCheckHook mock ddt ];
|
checkInputs = with super; [ pytestCheckHook mock ddt ];
|
||||||
|
|
|
@ -1,35 +1,30 @@
|
||||||
{ mkDerivation, lib, fetchFromGitHub, qmake, libusb1, hidapi, pkg-config, fetchpatch }:
|
{ lib, mkDerivation, fetchFromGitLab, qmake, libusb1, hidapi, pkg-config }:
|
||||||
|
|
||||||
mkDerivation rec {
|
mkDerivation rec {
|
||||||
pname = "openrgb";
|
pname = "openrgb";
|
||||||
version = "0.4";
|
version = "0.5";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitLab {
|
||||||
owner = "CalcProgrammer1";
|
owner = "CalcProgrammer1";
|
||||||
repo = "OpenRGB";
|
repo = "OpenRGB";
|
||||||
rev = "release_${version}";
|
rev = "release_${version}";
|
||||||
sha256 = "sha256-tHrRG2Zx7NYqn+WPiRpAlWA/QmxuAYidENanTkC1XVw";
|
sha256 = "001x2ycfmlb9s21sp91aw5gxizcn6kzm8x7bvkps4b1iq0ap5fzv";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ qmake pkg-config ];
|
nativeBuildInputs = [ qmake pkg-config ];
|
||||||
buildInputs = [ libusb1 hidapi ];
|
buildInputs = [ libusb1 hidapi ];
|
||||||
|
|
||||||
patches = [
|
|
||||||
# Make build SOURCE_DATE_EPOCH aware, merged in master
|
|
||||||
(fetchpatch {
|
|
||||||
url = "https://gitlab.com/CalcProgrammer1/OpenRGB/-/commit/f1b7b8ba900db58a1119d8d3e21c1c79de5666aa.patch";
|
|
||||||
sha256 = "17m1hn1kjxfcmd4p3zjhmr5ar9ng0zfbllq78qxrfcq1a0xrkybx";
|
|
||||||
})
|
|
||||||
];
|
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
cp OpenRGB $out/bin
|
cp openrgb $out/bin
|
||||||
|
|
||||||
|
mkdir -p $out/etc/udev/rules.d
|
||||||
|
cp 60-openrgb.rules $out/etc/udev/rules.d
|
||||||
'';
|
'';
|
||||||
|
|
||||||
doInstallCheck = true;
|
doInstallCheck = true;
|
||||||
installCheckPhase = ''
|
installCheckPhase = ''
|
||||||
$out/bin/OpenRGB --help > /dev/null
|
HOME=$TMPDIR $out/bin/openrgb --help > /dev/null
|
||||||
'';
|
'';
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
|
@ -3,7 +3,9 @@
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, lib
|
, lib
|
||||||
, libGLU
|
, libGLU
|
||||||
|
, makeDesktopItem
|
||||||
, qtbase
|
, qtbase
|
||||||
|
, wrapQtAppsHook
|
||||||
}:
|
}:
|
||||||
|
|
||||||
mkDerivation rec {
|
mkDerivation rec {
|
||||||
|
@ -17,9 +19,24 @@ mkDerivation rec {
|
||||||
sha256 = "0r20mbzd16zv1aiadjqdy7z6sp09rr6lgfxhvir4ll3cpakkynr4";
|
sha256 = "0r20mbzd16zv1aiadjqdy7z6sp09rr6lgfxhvir4ll3cpakkynr4";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake ];
|
nativeBuildInputs = [ cmake wrapQtAppsHook ];
|
||||||
buildInputs = [ libGLU qtbase ];
|
buildInputs = [ libGLU qtbase ];
|
||||||
|
|
||||||
|
desktopItem = makeDesktopItem {
|
||||||
|
name = pname;
|
||||||
|
exec = pname;
|
||||||
|
icon = pname;
|
||||||
|
desktopName = "Ideamaker";
|
||||||
|
genericName = meta.description;
|
||||||
|
categories = "Utility;Engineering;";
|
||||||
|
};
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
mkdir -p $out/share/pixmaps
|
||||||
|
ln -s ${desktopItem}/share/applications $out/share/
|
||||||
|
cp $src/gui/img/plater.png $out/share/pixmaps/${pname}.png
|
||||||
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "3D-printer parts placer and plate generator";
|
description = "3D-printer parts placer and plate generator";
|
||||||
homepage = "https://github.com/Rhoban/Plater";
|
homepage = "https://github.com/Rhoban/Plater";
|
||||||
|
|
|
@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
createFindlibDestdir = true;
|
createFindlibDestdir = true;
|
||||||
|
|
||||||
patches = [ ./install.patch ];
|
patches = [ ./install.patch ./uri.patch ];
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "XML documents and web site compiler";
|
description = "XML documents and web site compiler";
|
||||||
|
|
13
third_party/nixpkgs/pkgs/applications/misc/stog/uri.patch
vendored
Normal file
13
third_party/nixpkgs/pkgs/applications/misc/stog/uri.patch
vendored
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
diff --git a/src/stog_url.ml b/src/stog_url.ml
|
||||||
|
index 5d30a43f..c67bfc36 100644
|
||||||
|
--- a/src/stog_url.ml
|
||||||
|
+++ b/src/stog_url.ml
|
||||||
|
@@ -40,7 +40,7 @@ let of_string s =
|
||||||
|
with _ ->
|
||||||
|
failwith (Printf.sprintf "Malformed URL %S" s)
|
||||||
|
;;
|
||||||
|
-let to_string = Uri.to_string ;;
|
||||||
|
+let to_string u = Uri.to_string u;;
|
||||||
|
|
||||||
|
let path url =
|
||||||
|
let l =
|
|
@ -1,28 +0,0 @@
|
||||||
From 0d677475b710b9bb61d4b3ac5435c36b47d3a155 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Peter Simons <simons@cryp.to>
|
|
||||||
Date: Wed, 8 Feb 2017 11:28:42 +0100
|
|
||||||
Subject: [PATCH] bash-completion: quote pattern argument to grep
|
|
||||||
|
|
||||||
Without the quotes, bash might expand that pattern based on the contents of the
|
|
||||||
current working directory or -- if nullglob is set -- the argument disappears
|
|
||||||
outright if no directory entry matches.
|
|
||||||
---
|
|
||||||
scripts/bash/task.sh | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/scripts/bash/task.sh b/scripts/bash/task.sh
|
|
||||||
index e0c7fb03..d15ed3eb 100644
|
|
||||||
--- a/scripts/bash/task.sh
|
|
||||||
+++ b/scripts/bash/task.sh
|
|
||||||
@@ -72,7 +72,7 @@ _task_offer_contexts() {
|
|
||||||
COMPREPLY=( $(compgen -W "$($taskcommand _context) define delete list none show" -- $cur) )
|
|
||||||
}
|
|
||||||
|
|
||||||
-_task_context_alias=$($taskcommand show | grep alias.*context | cut -d' ' -f1 | cut -d. -f2)
|
|
||||||
+_task_context_alias=$($taskcommand show | grep "alias.*context" | cut -d' ' -f1 | cut -d. -f2)
|
|
||||||
|
|
||||||
_task()
|
|
||||||
{
|
|
||||||
--
|
|
||||||
2.11.1
|
|
||||||
|
|
|
@ -1,16 +1,17 @@
|
||||||
{ stdenv, fetchurl, cmake, libuuid, gnutls }:
|
{ stdenv, fetchFromGitHub, cmake, libuuid, gnutls }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "taskwarrior";
|
pname = "taskwarrior";
|
||||||
version = "2.5.1";
|
version = "2.5.2";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchFromGitHub {
|
||||||
url = "https://taskwarrior.org/download/task-${version}.tar.gz";
|
owner = "GothenburgBitFactory";
|
||||||
sha256 = "059a9yc58wcicc6xxsjh1ph7k2yrag0spsahp1wqmsq6h7jwwyyq";
|
repo = "taskwarrior";
|
||||||
|
rev = "v${version}";
|
||||||
|
sha256 = "0jv5b56v75qhdqbrfsddfwizmbizcsv3mn8gp92nckwlx9hrk5id";
|
||||||
|
fetchSubmodules = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [ ./0001-bash-completion-quote-pattern-argument-to-grep.patch ];
|
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake libuuid gnutls ];
|
nativeBuildInputs = [ cmake libuuid gnutls ];
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
|
|
|
@ -15,13 +15,13 @@
|
||||||
}:
|
}:
|
||||||
buildPythonApplication rec {
|
buildPythonApplication rec {
|
||||||
pname = "visidata";
|
pname = "visidata";
|
||||||
version = "2.0.1";
|
version = "2.1";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "saulpw";
|
owner = "saulpw";
|
||||||
repo = "visidata";
|
repo = "visidata";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "sha256-AkGU9p00y+psBS/fL2YLyQYRSMOp1aPs21E9bpN9z0M=";
|
sha256 = "1psb3ycrb7k00b5blg9zr52bzdxs1mkdc7rpjn4m9kh09yfs3sx4";
|
||||||
};
|
};
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
|
|
25
third_party/nixpkgs/pkgs/applications/misc/zktree/default.nix
vendored
Normal file
25
third_party/nixpkgs/pkgs/applications/misc/zktree/default.nix
vendored
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
{ lib
|
||||||
|
, fetchFromGitHub
|
||||||
|
, rustPlatform
|
||||||
|
}:
|
||||||
|
|
||||||
|
rustPlatform.buildRustPackage rec {
|
||||||
|
pname = "zktree";
|
||||||
|
version = "0.0.1";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "alirezameskin";
|
||||||
|
repo = "zktree";
|
||||||
|
rev = version;
|
||||||
|
sha256 = "11w86k1w5zryiq6bqr98pjhffd3l76377yz53qx0n76vc5374fk9";
|
||||||
|
};
|
||||||
|
|
||||||
|
cargoSha256 = "1d35jrxvhf7m04s1kh0yrfhy9j9i6qzwbw2mwapgsrcsr5vhxasn";
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "A small tool to display Znodes in Zookeeper in tree structure.";
|
||||||
|
homepage = "https://github.com/alirezameskin/zktree";
|
||||||
|
license = licenses.unlicense;
|
||||||
|
maintainers = with lib.maintainers; [ alirezameskin ];
|
||||||
|
};
|
||||||
|
}
|
|
@ -44,11 +44,11 @@ let
|
||||||
|
|
||||||
flash = stdenv.mkDerivation rec {
|
flash = stdenv.mkDerivation rec {
|
||||||
pname = "flashplayer-ppapi";
|
pname = "flashplayer-ppapi";
|
||||||
version = "32.0.0.445";
|
version = "32.0.0.453";
|
||||||
|
|
||||||
src = fetchzip {
|
src = fetchzip {
|
||||||
url = "https://fpdownload.adobe.com/pub/flashplayer/pdc/${version}/flash_player_ppapi_linux.x86_64.tar.gz";
|
url = "https://fpdownload.adobe.com/pub/flashplayer/pdc/${version}/flash_player_ppapi_linux.x86_64.tar.gz";
|
||||||
sha256 = "1r9vd210d2qp501q40pjx60mzah08rg0f8jk5rpp52ddajwggalv";
|
sha256 = "1d0hxn6snvx15clhcwncw40z0mf5p1pw68wrp7w1l3jkkw4brsgj";
|
||||||
stripRoot = false;
|
stripRoot = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
},
|
},
|
||||||
"chromedriver": {
|
"chromedriver": {
|
||||||
"version": "87.0.4280.88",
|
"version": "87.0.4280.88",
|
||||||
"sha256_linux": "141mr2jiy3nslwd3s43m4i6plkv9wv5fgi78cn7mz0ac9x6fpcgx",
|
"sha256_linux": "11plh2hs2zpa14ymlbnj92pa58krl28yw4c0s55wk8qsxvzvl02m",
|
||||||
"sha256_darwin": "048hsqp6575r980m769lzznvxypmfcwn89f1d3ik751ymzmb5r78"
|
"sha256_darwin": "048hsqp6575r980m769lzznvxypmfcwn89f1d3ik751ymzmb5r78"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -74,7 +74,7 @@ let
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "flashplayer";
|
pname = "flashplayer";
|
||||||
version = "32.0.0.445";
|
version = "32.0.0.453";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url =
|
url =
|
||||||
|
@ -85,14 +85,14 @@ stdenv.mkDerivation rec {
|
||||||
sha256 =
|
sha256 =
|
||||||
if debug then
|
if debug then
|
||||||
if arch == "x86_64" then
|
if arch == "x86_64" then
|
||||||
"0jn1g8k8fkikhi0xlcsx5a43lxrj6ynwbxn55b17wacsqw20b9ii"
|
"0jjzx7jpaz2a4p5x5535v8286pakhfymrq6zi16skv4cfixc0q99"
|
||||||
else
|
else
|
||||||
"104af8sy0qq45agg3lpjwn1cp8lhpcjiim6gqn4cymcfp8d7ngg0"
|
"1ikgxl33g503bm7v1209bmwppx0j40dnlm01hddx5i2qzv7dwh2v"
|
||||||
else
|
else
|
||||||
if arch == "x86_64" then
|
if arch == "x86_64" then
|
||||||
"1dd52nhnl3f1d7r82gq28scna5qr39gpfqkgrhzd6cxd2vnhnhjn"
|
"0dryf849xjr767zlpvg8wsy4fh4dl8gbca4l7a1yc47lgq1ffzsq"
|
||||||
else
|
else
|
||||||
"09ayb637cyf5x06xmhvad2znss7ak7r4n8z3wq7qmn0pmjdsa5a3";
|
"1y0xawsm9qsk0js6p6n5g5yy24kh2kn1kbmsla59g204l6xwsla1";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ unzip ];
|
nativeBuildInputs = [ unzip ];
|
||||||
|
|
|
@ -50,7 +50,7 @@
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
pname = "flashplayer-standalone";
|
pname = "flashplayer-standalone";
|
||||||
version = "32.0.0.445";
|
version = "32.0.0.453";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url =
|
url =
|
||||||
|
@ -60,9 +60,9 @@ stdenv.mkDerivation {
|
||||||
"https://fpdownload.macromedia.com/pub/flashplayer/updaters/32/flash_player_sa_linux.x86_64.tar.gz";
|
"https://fpdownload.macromedia.com/pub/flashplayer/updaters/32/flash_player_sa_linux.x86_64.tar.gz";
|
||||||
sha256 =
|
sha256 =
|
||||||
if debug then
|
if debug then
|
||||||
"0iqmdd222mjsf3rdbcm4z974i5q9y4i5agnhn039k0hpydi4zdcr"
|
"1qnmr8y9rzb8f9j4pn0cr7nxrdfn1pqkwfrzq8rf3nw9np4lxyfv"
|
||||||
else
|
else
|
||||||
"07vz17zhwh31phccpbmwgfa3fdb2f7bnc3sf66ipsw1xcqgncpsx";
|
"0s0xcbha72y0wybnmalgsx7nv3b9jcwv7p3rakj6ij9l1wf73b7g";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ unzip ];
|
nativeBuildInputs = [ unzip ];
|
||||||
|
|
|
@ -44,11 +44,11 @@ let
|
||||||
|
|
||||||
flash = stdenv.mkDerivation rec {
|
flash = stdenv.mkDerivation rec {
|
||||||
pname = "flashplayer-ppapi";
|
pname = "flashplayer-ppapi";
|
||||||
version = "32.0.0.445";
|
version = "32.0.0.453";
|
||||||
|
|
||||||
src = fetchzip {
|
src = fetchzip {
|
||||||
url = "https://fpdownload.adobe.com/pub/flashplayer/pdc/${version}/flash_player_ppapi_linux.x86_64.tar.gz";
|
url = "https://fpdownload.adobe.com/pub/flashplayer/pdc/${version}/flash_player_ppapi_linux.x86_64.tar.gz";
|
||||||
sha256 = "1r9vd210d2qp501q40pjx60mzah08rg0f8jk5rpp52ddajwggalv";
|
sha256 = "1d0hxn6snvx15clhcwncw40z0mf5p1pw68wrp7w1l3jkkw4brsgj";
|
||||||
stripRoot = false;
|
stripRoot = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
|
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
|
||||||
|
|
||||||
let
|
let
|
||||||
k3sVersion = "1.19.3-k3s3";
|
k3sVersion = "1.19.4-k3s1";
|
||||||
in
|
in
|
||||||
buildGoModule rec {
|
buildGoModule rec {
|
||||||
pname = "kube3d";
|
pname = "kube3d";
|
||||||
version = "3.3.0";
|
version = "3.4.0";
|
||||||
|
|
||||||
excludedPackages = "tools";
|
excludedPackages = "tools";
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ buildGoModule rec {
|
||||||
owner = "rancher";
|
owner = "rancher";
|
||||||
repo = "k3d";
|
repo = "k3d";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "1pq5x4fyn98f01mzfjv335gx29c61zd85qc5vhx9rk27hi825ima";
|
sha256 = "1fisbzv786n841pagy7zbanll7k1g5ib805j9azs2s30cfhvi08b";
|
||||||
};
|
};
|
||||||
|
|
||||||
vendorSha256 = null;
|
vendorSha256 = null;
|
||||||
|
|
|
@ -1,27 +1,24 @@
|
||||||
{ stdenv, kubernetes }:
|
{ stdenv, kubernetes, installShellFiles }:
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "kubectl-${kubernetes.version}";
|
name = "kubectl-${kubernetes.version}";
|
||||||
|
|
||||||
# kubectl is currently part of the main distribution but will eventially be
|
# kubectl is currently part of the main distribution but will eventially be
|
||||||
# split out (see homepage)
|
# split out (see homepage)
|
||||||
src = kubernetes;
|
dontUnpack = true;
|
||||||
|
|
||||||
|
nativeBuildInputs = [ installShellFiles ];
|
||||||
|
|
||||||
outputs = [ "out" "man" ];
|
outputs = [ "out" "man" ];
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p \
|
install -D ${kubernetes}/bin/kubectl -t $out/bin
|
||||||
"$out/bin" \
|
|
||||||
"$out/share/bash-completion/completions" \
|
|
||||||
"$out/share/zsh/site-functions" \
|
|
||||||
"$man/share/man/man1"
|
|
||||||
|
|
||||||
cp bin/kubectl $out/bin/kubectl
|
installManPage "${kubernetes.man}/share/man/man1"/kubectl*
|
||||||
|
|
||||||
cp "${kubernetes.man}/share/man/man1"/kubectl* "$man/share/man/man1"
|
installShellCompletion --cmd kubectl \
|
||||||
|
--bash <($out/bin/kubectl completion bash) \
|
||||||
$out/bin/kubectl completion bash > $out/share/bash-completion/completions/kubectl
|
--zsh <($out/bin/kubectl completion zsh)
|
||||||
$out/bin/kubectl completion zsh > $out/share/zsh/site-functions/_kubectl
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = kubernetes.meta // {
|
meta = kubernetes.meta // {
|
||||||
|
|
|
@ -1,7 +1,14 @@
|
||||||
{ stdenv, lib, fetchFromGitHub, removeReferencesTo, which, go, go-bindata, makeWrapper, rsync
|
{ stdenv
|
||||||
|
, lib
|
||||||
|
, fetchFromGitHub
|
||||||
|
, removeReferencesTo
|
||||||
|
, which
|
||||||
|
, go
|
||||||
|
, makeWrapper
|
||||||
|
, rsync
|
||||||
|
, installShellFiles
|
||||||
|
|
||||||
, components ? [
|
, components ? [
|
||||||
"cmd/kubeadm"
|
|
||||||
"cmd/kubectl"
|
|
||||||
"cmd/kubelet"
|
"cmd/kubelet"
|
||||||
"cmd/kube-apiserver"
|
"cmd/kube-apiserver"
|
||||||
"cmd/kube-controller-manager"
|
"cmd/kube-controller-manager"
|
||||||
|
@ -11,8 +18,6 @@
|
||||||
]
|
]
|
||||||
}:
|
}:
|
||||||
|
|
||||||
with lib;
|
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "kubernetes";
|
pname = "kubernetes";
|
||||||
version = "1.19.4";
|
version = "1.19.4";
|
||||||
|
@ -24,9 +29,9 @@ stdenv.mkDerivation rec {
|
||||||
sha256 = "05gisihrklkzsdsrrmvmqlfwfdx73jbwd5668n5wa5hp432qyvwi";
|
sha256 = "05gisihrklkzsdsrrmvmqlfwfdx73jbwd5668n5wa5hp432qyvwi";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ removeReferencesTo makeWrapper which go rsync go-bindata ];
|
nativeBuildInputs = [ removeReferencesTo makeWrapper which go rsync installShellFiles ];
|
||||||
|
|
||||||
outputs = ["out" "man" "pause"];
|
outputs = [ "out" "man" "pause" ];
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
# go env breaks the sandbox
|
# go env breaks the sandbox
|
||||||
|
@ -41,7 +46,10 @@ stdenv.mkDerivation rec {
|
||||||
patchShebangs ./hack
|
patchShebangs ./hack
|
||||||
'';
|
'';
|
||||||
|
|
||||||
WHAT=concatStringsSep " " components;
|
WHAT = lib.concatStringsSep " " ([
|
||||||
|
"cmd/kubeadm"
|
||||||
|
"cmd/kubectl"
|
||||||
|
] ++ components);
|
||||||
|
|
||||||
postBuild = ''
|
postBuild = ''
|
||||||
./hack/update-generated-docs.sh
|
./hack/update-generated-docs.sh
|
||||||
|
@ -49,11 +57,12 @@ stdenv.mkDerivation rec {
|
||||||
'';
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p "$out/bin" "$out/share/bash-completion/completions" "$out/share/zsh/site-functions" "$man/share/man" "$pause/bin"
|
for p in $WHAT; do
|
||||||
|
install -D _output/local/go/bin/''${p##*/} -t $out/bin
|
||||||
|
done
|
||||||
|
|
||||||
cp _output/local/go/bin/* "$out/bin/"
|
install -D build/pause/pause -t $pause/bin
|
||||||
cp build/pause/pause "$pause/bin/pause"
|
installManPage docs/man/man1/*.[1-9]
|
||||||
cp -R docs/man/man1 "$man/share/man"
|
|
||||||
|
|
||||||
cp cluster/addons/addon-manager/kube-addons.sh $out/bin/kube-addons
|
cp cluster/addons/addon-manager/kube-addons.sh $out/bin/kube-addons
|
||||||
patchShebangs $out/bin/kube-addons
|
patchShebangs $out/bin/kube-addons
|
||||||
|
@ -61,19 +70,22 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
cp ${./mk-docker-opts.sh} $out/bin/mk-docker-opts.sh
|
cp ${./mk-docker-opts.sh} $out/bin/mk-docker-opts.sh
|
||||||
|
|
||||||
$out/bin/kubectl completion bash > $out/share/bash-completion/completions/kubectl
|
for tool in kubeadm kubectl; do
|
||||||
$out/bin/kubectl completion zsh > $out/share/zsh/site-functions/_kubectl
|
installShellCompletion --cmd $tool \
|
||||||
|
--bash <($out/bin/$tool completion bash) \
|
||||||
|
--zsh <($out/bin/$tool completion zsh)
|
||||||
|
done
|
||||||
'';
|
'';
|
||||||
|
|
||||||
preFixup = ''
|
preFixup = ''
|
||||||
find $out/bin $pause/bin -type f -exec remove-references-to -t ${go} '{}' +
|
find $out/bin $pause/bin -type f -exec remove-references-to -t ${go} '{}' +
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = with lib; {
|
||||||
description = "Production-Grade Container Scheduling and Management";
|
description = "Production-Grade Container Scheduling and Management";
|
||||||
license = licenses.asl20;
|
license = licenses.asl20;
|
||||||
homepage = "https://kubernetes.io";
|
homepage = "https://kubernetes.io";
|
||||||
maintainers = with maintainers; [johanot offline saschagrunert];
|
maintainers = with maintainers; [ johanot offline saschagrunert ];
|
||||||
platforms = platforms.unix;
|
platforms = platforms.unix;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,16 +2,16 @@
|
||||||
|
|
||||||
buildGoModule rec {
|
buildGoModule rec {
|
||||||
pname = "starboard-octant-plugin";
|
pname = "starboard-octant-plugin";
|
||||||
version = "0.6.0";
|
version = "0.7.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "aquasecurity";
|
owner = "aquasecurity";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "1rgfk8l3yz7xwghr06vcgpi6zzjynxxvyg2r78fgp7wpw7bh3rmd";
|
sha256 = "140m7mnpqhfbp2qqpr3jjsc770xdph98mm5zpgwzg0jwgpsrcxsm";
|
||||||
};
|
};
|
||||||
|
|
||||||
vendorSha256 = "1f6x66zgrmm7x661d0d0qqharrpyb2bsi10swlgx68y5yz285296";
|
vendorSha256 = "0aphx2rpnvzmfyfs11hf8j5b7s5lgw4kcq4jpdrkjwx7zhl6qx2g";
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Octant plugin for viewing Starboard security information";
|
description = "Octant plugin for viewing Starboard security information";
|
||||||
|
|
|
@ -2,13 +2,13 @@
|
||||||
|
|
||||||
buildGoModule rec {
|
buildGoModule rec {
|
||||||
pname = "starboard";
|
pname = "starboard";
|
||||||
version = "0.7.0";
|
version = "0.7.1";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "aquasecurity";
|
owner = "aquasecurity";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "1xj0fa52973h7cg3scxn85lav98q6fz82dwd5cls3p39ghnhzn5l";
|
sha256 = "0p0c459xih580ix3279fr45mm3q9w887rs7w1yrikh09xpcisdfr";
|
||||||
};
|
};
|
||||||
|
|
||||||
vendorSha256 = "07cz4p8k927ash5ncw1r56bcn592imgywbyzkvhnn50pap91m0q0";
|
vendorSha256 = "07cz4p8k927ash5ncw1r56bcn592imgywbyzkvhnn50pap91m0q0";
|
||||||
|
|
|
@ -2,16 +2,16 @@
|
||||||
|
|
||||||
buildGoModule rec {
|
buildGoModule rec {
|
||||||
pname = "dnscontrol";
|
pname = "dnscontrol";
|
||||||
version = "3.4.2";
|
version = "3.5.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "StackExchange";
|
owner = "StackExchange";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "0bvvh68k2xjmmwafwdsijf3yb4ff9wbsl2ibad627l1y4js5615z";
|
sha256 = "0bnsd1kx0ji2s3w1v7sskc3x82avaqjn2arnax55bmh1yjma6z8p";
|
||||||
};
|
};
|
||||||
|
|
||||||
vendorSha256 = "05nwfxqgkpbv5i0365wpsnnaq528a7srycd1dsdlssz1cy7i0d31";
|
vendorSha256 = "0ppcrp6jp23ycn70mcgi5bsa0hr20hk7044ldw304krawy2vjgz8";
|
||||||
|
|
||||||
subPackages = [ "." ];
|
subPackages = [ "." ];
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ pythonPackages, fetchurl, lib, nixosTests }:
|
{ pythonPackages, fetchurl, fetchpatch, lib, nixosTests }:
|
||||||
|
|
||||||
with pythonPackages;
|
with pythonPackages;
|
||||||
|
|
||||||
|
@ -14,6 +14,19 @@ buildPythonApplication rec {
|
||||||
sha256 = "12w6x80wsw6xm17fxyymnl45aavsagg932zw621wcjz154vjghjr";
|
sha256 = "12w6x80wsw6xm17fxyymnl45aavsagg932zw621wcjz154vjghjr";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
(fetchpatch {
|
||||||
|
name = "rss2email-feedparser6.patch";
|
||||||
|
url = "https://github.com/rss2email/rss2email/pull/149/commits/338343c92f956c31ff5249ef4bcf7aeea81f687e.patch";
|
||||||
|
sha256 = "0h8b3g9332vdrkqbh6lp00k97asrhmlxi13zghrgc78ia13czy3z";
|
||||||
|
})
|
||||||
|
(fetchpatch {
|
||||||
|
name = "rss2email-feedparser6-test.patch";
|
||||||
|
url = "https://github.com/rss2email/rss2email/pull/149/commits/8c99651eced3f29f05ba2c0ca02abb8bb9a18967.patch";
|
||||||
|
sha256 = "1scljak6xyqxlilg3j39v4qm9a9jks1bnvnrh62hyf3g53yw2xlg";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
outputs = [ "out" "man" "doc" ];
|
outputs = [ "out" "man" "doc" ];
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
|
|
|
@ -1,28 +0,0 @@
|
||||||
{stdenv, fetchurl, which, tcl, tk, xlibsWrapper, libpng, libjpeg, makeWrapper}:
|
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
|
||||||
name = "amsn-0.98.9";
|
|
||||||
src = fetchurl {
|
|
||||||
url = "mirror://sourceforge/amsn/amsn-0.98.9-src.tar.gz";
|
|
||||||
sha256 = "0b8ir7spxnsz8f7kvr9f1k91nsy8cb65q6jv2l55b04fl20x4z7r";
|
|
||||||
};
|
|
||||||
|
|
||||||
configureFlags = [
|
|
||||||
"--with-tcl=${tcl}/lib"
|
|
||||||
"--with-tk=${tk}/lib"
|
|
||||||
"--enable-static"
|
|
||||||
];
|
|
||||||
|
|
||||||
buildInputs = [which tcl tk xlibsWrapper libpng libjpeg makeWrapper];
|
|
||||||
|
|
||||||
postInstall = ''
|
|
||||||
wrapProgram $out/bin/amsn --prefix PATH : ${tk}/bin
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = {
|
|
||||||
description = "Instant messaging (MSN Messenger clone)";
|
|
||||||
homepage = "http://amsn-project.net";
|
|
||||||
platforms = stdenv.lib.platforms.linux;
|
|
||||||
license = stdenv.lib.licenses.gpl2;
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -31,6 +31,7 @@
|
||||||
, mbedtls
|
, mbedtls
|
||||||
, mediastreamer
|
, mediastreamer
|
||||||
, mediastreamer-openh264
|
, mediastreamer-openh264
|
||||||
|
, minizip2
|
||||||
, mkDerivation
|
, mkDerivation
|
||||||
, openldap
|
, openldap
|
||||||
, ortp
|
, ortp
|
||||||
|
@ -47,81 +48,30 @@
|
||||||
, stdenv
|
, stdenv
|
||||||
, udev
|
, udev
|
||||||
, zlib
|
, zlib
|
||||||
# For Minizip 2.2.7:
|
|
||||||
, fetchFromGitHub
|
|
||||||
, libbsd
|
|
||||||
}:
|
}:
|
||||||
let
|
|
||||||
# Linphone Desktop requires Minizip 2.2.7. Nixpkgs contains a very old version
|
|
||||||
# from the time when it was part of zlib. The most recent release of Minizip
|
|
||||||
# is currently 2.9.2 but Linphone Desktop didn't work with that. So, even if
|
|
||||||
# we added most recent Minizip version to nixpkgs, probably Minizip 2.2.7 is
|
|
||||||
# only needed here and we shouldn't add this semi-old version to
|
|
||||||
# all-packages.nix. Therefore, just define it here locally.
|
|
||||||
minizip2 = stdenv.mkDerivation rec {
|
|
||||||
pname = "minizip";
|
|
||||||
version = "2.2.7";
|
|
||||||
|
|
||||||
disabled = stdenv.isAarch32;
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
|
||||||
owner = "nmoinvaz";
|
|
||||||
repo = pname;
|
|
||||||
rev = version;
|
|
||||||
sha256 = "1a88v1gjlflsd17mlrgxh420rpa38q0d17yh9q8j1zzqfrd1azch";
|
|
||||||
};
|
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake pkgconfig ];
|
|
||||||
|
|
||||||
cmakeFlags = [
|
|
||||||
"-DBUILD_SHARED_LIBS=YES"
|
|
||||||
];
|
|
||||||
|
|
||||||
buildInputs = [
|
|
||||||
zlib
|
|
||||||
libbsd # required in 2.2.7 but not in 2.9.2?
|
|
||||||
];
|
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
|
||||||
description = "Compression library implementing the deflate compression method found in gzip and PKZIP";
|
|
||||||
homepage = "https://github.com/nmoinvaz/minizip";
|
|
||||||
license = licenses.zlib;
|
|
||||||
platforms = platforms.unix;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
in
|
|
||||||
mkDerivation rec {
|
mkDerivation rec {
|
||||||
pname = "linphone-desktop";
|
pname = "linphone-desktop";
|
||||||
# Latest release is 4.1.1 old and doesn't build with the latest releases of
|
version = "4.2.4";
|
||||||
# some of the dependencies so let's use the latest commit.
|
|
||||||
version = "unstable-2020-03-06";
|
|
||||||
|
|
||||||
src = fetchFromGitLab {
|
src = fetchFromGitLab {
|
||||||
domain = "gitlab.linphone.org";
|
domain = "gitlab.linphone.org";
|
||||||
owner = "public";
|
owner = "public";
|
||||||
group = "BC";
|
group = "BC";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = "971997e162558d37051f89c9c34bbc240135f704";
|
rev = version;
|
||||||
sha256 = "02ji4r8bpcm2kyisn9d3054m026l33g2574i1ag1cmb2dz2p8i1c";
|
sha256 = "1gq4l9p21rbrcksa7fbkzn9fzbbynqmn6ni6lhnvzk359sb1xvbz";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Without this patch, the build fails with:
|
|
||||||
#
|
|
||||||
# No rule to make target
|
|
||||||
# 'minizip_OUTPUT/nix/store/...linphone-desktop.../lib/libminizip.so',
|
|
||||||
#
|
|
||||||
# So, the makefile tries to use a full absolute path to the library but does
|
|
||||||
# it incorrectly. As we have installed Minizip properly, it's sufficient to
|
|
||||||
# just use "minizip" and the library is found automatically. If this patched
|
|
||||||
# target_link_libraries line was removed entirely, the build would fail at the
|
|
||||||
# very end when linking minizip.
|
|
||||||
patches = [
|
patches = [
|
||||||
./fix_minizip_linking.patch
|
./do-not-build-linphone-sdk.patch
|
||||||
|
./remove-bc_compute_full_version-usage.patch
|
||||||
];
|
];
|
||||||
|
|
||||||
# See: https://gitlab.linphone.org/BC/public/linphone-desktop/issues/21
|
# See: https://gitlab.linphone.org/BC/public/linphone-desktop/issues/21
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
substituteInPlace src/app/AppController.cpp \
|
echo "project(linphoneqt VERSION ${version})" >linphone-app/linphoneqt_version.cmake
|
||||||
|
substituteInPlace linphone-app/src/app/AppController.cpp \
|
||||||
--replace "LINPHONE_QT_GIT_VERSION" "\"${version}\""
|
--replace "LINPHONE_QT_GIT_VERSION" "\"${version}\""
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -214,18 +164,18 @@ mkDerivation rec {
|
||||||
# those just need to be copied manually below.
|
# those just need to be copied manually below.
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
cp linphone $out/bin/
|
cp linphone-app/linphone $out/bin/
|
||||||
wrapProgram $out/bin/linphone \
|
wrapProgram $out/bin/linphone \
|
||||||
--set MEDIASTREAMER_PLUGINS_DIR \
|
--set MEDIASTREAMER_PLUGINS_DIR \
|
||||||
${mediastreamer-openh264}/lib/mediastreamer/plugins
|
${mediastreamer-openh264}/lib/mediastreamer/plugins
|
||||||
mkdir -p $out/share/applications
|
mkdir -p $out/share/applications
|
||||||
sed -i "s@/build/.*/OUTPUT/bin@$out/bin@" linphone.desktop
|
cp linphone-app/linphone.desktop $out/share/applications/
|
||||||
cp linphone.desktop $out/share/applications/
|
cp -r ../linphone-app/assets/icons $out/share/
|
||||||
cp -r ../assets/icons $out/share/
|
|
||||||
mkdir -p $out/share/belr/grammars
|
mkdir -p $out/share/belr/grammars
|
||||||
ln -s ${liblinphone}/share/belr/grammars/* $out/share/belr/grammars/
|
ln -s ${liblinphone}/share/belr/grammars/* $out/share/belr/grammars/
|
||||||
mkdir -p $out/share/linphone
|
mkdir -p $out/share/linphone
|
||||||
ln -s ${liblinphone}/share/linphone/* $out/share/linphone/
|
ln -s ${liblinphone}/share/linphone/* $out/share/linphone/
|
||||||
|
mkdir $out/lib # prevent warning
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
|
|
@ -0,0 +1,118 @@
|
||||||
|
From 08b8b1811a1ad079fa713d19a8cc6bf2dc782bb7 Mon Sep 17 00:00:00 2001
|
||||||
|
From: David P <megver83@parabola.nu>
|
||||||
|
Date: Thu, 26 Nov 2020 15:56:30 -0300
|
||||||
|
Subject: [PATCH 1/2] do not build linphone-sdk
|
||||||
|
|
||||||
|
Signed-off-by: David P <megver83@parabola.nu>
|
||||||
|
---
|
||||||
|
CMakeLists.txt | 61 +------------------
|
||||||
|
.../cmake_builder/additional_steps.cmake | 9 ---
|
||||||
|
2 files changed, 3 insertions(+), 67 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||||
|
index f7eb05f2..5921ee5b 100644
|
||||||
|
--- a/CMakeLists.txt
|
||||||
|
+++ b/CMakeLists.txt
|
||||||
|
@@ -118,7 +118,6 @@ list(APPEND APP_OPTIONS "-DENABLE_RELATIVE_PREFIX=${ENABLE_RELATIVE_PREFIX}")
|
||||||
|
|
||||||
|
list(APPEND APP_OPTIONS "-DLINPHONE_OUTPUT_DIR=${LINPHONE_OUTPUT_DIR}")
|
||||||
|
|
||||||
|
-include(ExternalProject)
|
||||||
|
set(PROJECT_BUILD_COMMAND "")
|
||||||
|
if(CMAKE_BUILD_PARALLEL_LEVEL)
|
||||||
|
list(APPEND APP_OPTIONS "-DCMAKE_BUILD_PARALLEL_LEVEL=${CMAKE_BUILD_PARALLEL_LEVEL}")
|
||||||
|
@@ -136,29 +135,8 @@ if(UNIX AND NOT APPLE)
|
||||||
|
set(CMAKE_INSTALL_RPATH "$ORIGIN:$ORIGIN/lib64:$ORIGIN/../lib64:$ORIGIN/lib:$ORIGIN/../lib:${LINPHONE_OUTPUT_DIR}/${CMAKE_INSTALL_LIBDIR}")
|
||||||
|
list(APPEND APP_OPTIONS "-DCMAKE_INSTALL_RPATH=${CMAKE_INSTALL_RPATH}")
|
||||||
|
endif()
|
||||||
|
-ExternalProject_Add(sdk PREFIX "${CMAKE_BINARY_DIR}/sdk"
|
||||||
|
- SOURCE_DIR "${CMAKE_SOURCE_DIR}/linphone-sdk"
|
||||||
|
- INSTALL_DIR "${LINPHONE_OUTPUT_DIR}"
|
||||||
|
- STAMP_DIR "${SDK_BUILD_DIR}/stamp"
|
||||||
|
- BINARY_DIR "${SDK_BUILD_DIR}"
|
||||||
|
- STEP_TARGETS build
|
||||||
|
- BUILD_COMMAND ${CMAKE_COMMAND} --build <BINARY_DIR> --config $<CONFIG> ${PROJECT_BUILD_COMMAND}
|
||||||
|
- INSTALL_COMMAND ${CMAKE_COMMAND} -E echo "Install step is already done at build time."
|
||||||
|
- LIST_SEPARATOR | # Use the alternate list separator
|
||||||
|
- CMAKE_ARGS ${APP_OPTIONS} ${USER_ARGS} -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR> -DCMAKE_PREFIX_PATH=${PREFIX_PATH}
|
||||||
|
- #BUILD_ALWAYS NO #${DO_BUILD}
|
||||||
|
-)
|
||||||
|
-ExternalProject_Add_Step(sdk force_build
|
||||||
|
- COMMENT "Forcing build for 'desktop'"
|
||||||
|
- DEPENDEES configure
|
||||||
|
- DEPENDERS build
|
||||||
|
- ALWAYS 1
|
||||||
|
-)
|
||||||
|
include(FindPkgConfig)
|
||||||
|
|
||||||
|
-set(APP_DEPENDS sdk)
|
||||||
|
-
|
||||||
|
-
|
||||||
|
find_package(Qt5 5.12 COMPONENTS Core REQUIRED)
|
||||||
|
|
||||||
|
if ( NOT Qt5_FOUND )
|
||||||
|
@@ -173,39 +151,6 @@ find_package(Mediastreamer2 CONFIG QUIET)
|
||||||
|
find_package(ortp CONFIG QUIET)
|
||||||
|
|
||||||
|
|
||||||
|
-if(NOT (LinphoneCxx_FOUND) OR NOT (Linphone_FOUND) OR NOT (bctoolbox_FOUND) OR NOT (belcard_FOUND) OR NOT (Mediastreamer2_FOUND) OR NOT (ortp_FOUND) OR FORCE_APP_EXTERNAL_PROJECTS)
|
||||||
|
- message("Projects are set as External projects. You can start building them by using for example : cmake --build . --target install")
|
||||||
|
- ExternalProject_Add(linphone-qt PREFIX "${CMAKE_BINARY_DIR}/linphone-app"
|
||||||
|
- SOURCE_DIR "${CMAKE_SOURCE_DIR}/linphone-app"
|
||||||
|
- INSTALL_DIR "${APPLICATION_OUTPUT_DIR}"
|
||||||
|
- BINARY_DIR "${CMAKE_BINARY_DIR}/linphone-app"
|
||||||
|
- DEPENDS ${APP_DEPENDS}
|
||||||
|
- BUILD_COMMAND ${CMAKE_COMMAND} --build <BINARY_DIR> --config $<CONFIG> ${PROJECT_BUILD_COMMAND}
|
||||||
|
- INSTALL_COMMAND ${CMAKE_COMMAND} -E echo "Install step will not be done by external project"
|
||||||
|
- LIST_SEPARATOR | # Use the alternate list separator
|
||||||
|
- CMAKE_ARGS ${APP_OPTIONS} ${USER_ARGS} -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR> -DCMAKE_PREFIX_PATH=${PREFIX_PATH}
|
||||||
|
- # ${APP_OPTIONS}
|
||||||
|
- BUILD_ALWAYS ON
|
||||||
|
- )
|
||||||
|
- install(CODE "message(STATUS Running install)")
|
||||||
|
- set(AUTO_REGENERATION auto_regeneration)
|
||||||
|
- add_custom_target(${AUTO_REGENERATION} ALL
|
||||||
|
- COMMAND ${CMAKE_COMMAND} ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
|
- DEPENDS linphone-qt)
|
||||||
|
-else()
|
||||||
|
- message("Adding Linphone Desktop in an IDE-friendly state")
|
||||||
|
- set(CMAKE_INSTALL_PREFIX "${APPLICATION_OUTPUT_DIR}")
|
||||||
|
- add_subdirectory(${CMAKE_SOURCE_DIR}/linphone-app)
|
||||||
|
- add_dependencies(app-library ${APP_DEPENDS})
|
||||||
|
-endif()
|
||||||
|
-ExternalProject_Add(linphone-qt-only PREFIX "${CMAKE_BINARY_DIR}/linphone-app"
|
||||||
|
- SOURCE_DIR "${CMAKE_SOURCE_DIR}/linphone-app"
|
||||||
|
- INSTALL_DIR "${APPLICATION_OUTPUT_DIR}"
|
||||||
|
- BINARY_DIR "${CMAKE_BINARY_DIR}/linphone-app"
|
||||||
|
- BUILD_COMMAND ${CMAKE_COMMAND} --build <BINARY_DIR> --config $<CONFIG> ${PROJECT_BUILD_COMMAND}
|
||||||
|
-# INSTALL_COMMAND ${CMAKE_COMMAND} -E echo "Install step is already done at build time."
|
||||||
|
- LIST_SEPARATOR | # Use the alternate list separator
|
||||||
|
- CMAKE_ARGS ${APP_OPTIONS} ${USER_ARGS} -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR> -DCMAKE_PREFIX_PATH=${PREFIX_PATH}
|
||||||
|
- EXCLUDE_FROM_ALL ON
|
||||||
|
- BUILD_ALWAYS ON
|
||||||
|
-)
|
||||||
|
+message("Adding Linphone Desktop in an IDE-friendly state")
|
||||||
|
+set(CMAKE_INSTALL_PREFIX "${APPLICATION_OUTPUT_DIR}")
|
||||||
|
+add_subdirectory(${CMAKE_SOURCE_DIR}/linphone-app)
|
||||||
|
diff --git a/linphone-app/cmake_builder/additional_steps.cmake b/linphone-app/cmake_builder/additional_steps.cmake
|
||||||
|
index 7f7fd573..a69a04e8 100644
|
||||||
|
--- a/linphone-app/cmake_builder/additional_steps.cmake
|
||||||
|
+++ b/linphone-app/cmake_builder/additional_steps.cmake
|
||||||
|
@@ -54,14 +54,5 @@ if (ENABLE_PACKAGING)
|
||||||
|
linphone_builder_apply_flags()
|
||||||
|
linphone_builder_set_ep_directories(linphone_package)
|
||||||
|
linphone_builder_expand_external_project_vars()
|
||||||
|
- ExternalProject_Add(TARGET_linphone_package
|
||||||
|
- DEPENDS TARGET_linphone_builder
|
||||||
|
- TMP_DIR ${ep_tmp}
|
||||||
|
- BINARY_DIR ${ep_build}
|
||||||
|
- SOURCE_DIR "${CMAKE_CURRENT_LIST_DIR}/linphone_package"
|
||||||
|
- DOWNLOAD_COMMAND ""
|
||||||
|
- CMAKE_GENERATOR ${CMAKE_GENERATOR}
|
||||||
|
- CMAKE_ARGS ${LINPHONE_BUILDER_EP_ARGS} -DCMAKE_INSTALL_PREFIX=${LINPHONE_BUILDER_WORK_DIR}/PACKAGE -DTOOLS_DIR=${CMAKE_BINARY_DIR}/programs -DLINPHONE_OUTPUT_DIR=${CMAKE_INSTALL_PREFIX} -DLINPHONE_DESKTOP_DIR=${CMAKE_CURRENT_LIST_DIR}/.. -DLINPHONE_SOURCE_DIR=${EP_linphone_SOURCE_DIR} ${ENABLE_VARIABLES} -DLINPHONE_BUILDER_SIGNING_IDENTITY=${LINPHONE_BUILDER_SIGNING_IDENTITY}
|
||||||
|
- )
|
||||||
|
endif ()
|
||||||
|
endif ()
|
||||||
|
--
|
||||||
|
2.29.2
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
||||||
index 3ee77441..18ea5c27 100644
|
|
||||||
--- a/CMakeLists.txt
|
|
||||||
+++ b/CMakeLists.txt
|
|
||||||
@@ -517,7 +517,7 @@ else()
|
|
||||||
target_link_libraries(${TARGET_NAME} "${MINIZIP_OUTPUT_DIR}/${CMAKE_INSTALL_LIBDIR}/libminizip.dylib")
|
|
||||||
execute_process(COMMAND install_name_tool -id "@executable_path/../Frameworks/libminizip.dylib" "${MINIZIP_OUTPUT_DIR}/${CMAKE_INSTALL_LIBDIR}/libminizip.dylib")
|
|
||||||
elseif(NOT WIN32)
|
|
||||||
- target_link_libraries(${TARGET_NAME} "${MINIZIP_OUTPUT_DIR}/${CMAKE_INSTALL_LIBDIR}/libminizip.so")
|
|
||||||
+ target_link_libraries(${TARGET_NAME} "minizip")
|
|
||||||
endif()
|
|
||||||
endif()#If (LinphoneCxx_FOUND AND Minizip_FOUND)
|
|
||||||
endif()#If (LinphoneCxx_FOUND)
|
|
|
@ -0,0 +1,74 @@
|
||||||
|
From 6fc23da651d54979e73776fcda38614e290d65dc Mon Sep 17 00:00:00 2001
|
||||||
|
From: David P <megver83@parabola.nu>
|
||||||
|
Date: Fri, 23 Oct 2020 16:44:17 -0300
|
||||||
|
Subject: [PATCH 2/2] remove bc_compute_full_version usage
|
||||||
|
|
||||||
|
---
|
||||||
|
linphone-app/CMakeLists.txt | 11 +----------
|
||||||
|
linphone-app/build/CMakeLists.txt | 5 -----
|
||||||
|
.../cmake_builder/linphone_package/CMakeLists.txt | 10 +---------
|
||||||
|
3 files changed, 2 insertions(+), 24 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/linphone-app/CMakeLists.txt b/linphone-app/CMakeLists.txt
|
||||||
|
index 3bc9420a..27b418ee 100644
|
||||||
|
--- a/linphone-app/CMakeLists.txt
|
||||||
|
+++ b/linphone-app/CMakeLists.txt
|
||||||
|
@@ -21,17 +21,8 @@
|
||||||
|
################################################################################
|
||||||
|
cmake_minimum_required(VERSION 3.1)
|
||||||
|
|
||||||
|
+include(linphoneqt_version.cmake)
|
||||||
|
find_package(bctoolbox CONFIG)
|
||||||
|
-set(FULL_VERSION )
|
||||||
|
-bc_compute_full_version(FULL_VERSION)
|
||||||
|
-set(version_major )
|
||||||
|
-set(version_minor )
|
||||||
|
-set(version_patch )
|
||||||
|
-set(identifiers )
|
||||||
|
-set(metadata )
|
||||||
|
-bc_parse_full_version("${FULL_VERSION}" version_major version_minor version_patch identifiers metadata)
|
||||||
|
-
|
||||||
|
-project(linphoneqt VERSION "${version_major}.${version_minor}.${version_patch}")
|
||||||
|
|
||||||
|
if(ENABLE_BUILD_VERBOSE)
|
||||||
|
#message("CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH}")
|
||||||
|
diff --git a/linphone-app/build/CMakeLists.txt b/linphone-app/build/CMakeLists.txt
|
||||||
|
index 8ef03faa..97d94bd6 100644
|
||||||
|
--- a/linphone-app/build/CMakeLists.txt
|
||||||
|
+++ b/linphone-app/build/CMakeLists.txt
|
||||||
|
@@ -46,11 +46,6 @@ set(CPACK_SOURCE_IGNORE_FILES
|
||||||
|
"libmng.spec"
|
||||||
|
)
|
||||||
|
|
||||||
|
-bc_compute_full_version(PROJECT_VERSION_BUILD)
|
||||||
|
-if(PROJECT_VERSION_BUILD)
|
||||||
|
- set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${PROJECT_VERSION_BUILD}")
|
||||||
|
-endif()
|
||||||
|
-
|
||||||
|
message("-- Package file name is ${CPACK_PACKAGE_FILE_NAME}")
|
||||||
|
|
||||||
|
set(CPACK_SOURCE_PACKAGE_FILE_NAME ${CPACK_PACKAGE_FILE_NAME})
|
||||||
|
diff --git a/linphone-app/cmake_builder/linphone_package/CMakeLists.txt b/linphone-app/cmake_builder/linphone_package/CMakeLists.txt
|
||||||
|
index baea03cf..08ffc1b5 100644
|
||||||
|
--- a/linphone-app/cmake_builder/linphone_package/CMakeLists.txt
|
||||||
|
+++ b/linphone-app/cmake_builder/linphone_package/CMakeLists.txt
|
||||||
|
@@ -38,15 +38,7 @@ set(LINPHONE_QML_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../ui")
|
||||||
|
# ==============================================================================
|
||||||
|
# Build package version.
|
||||||
|
# ==============================================================================
|
||||||
|
-bc_compute_full_version(APP_PROJECT_VERSION)
|
||||||
|
-if (GIT_EXECUTABLE AND NOT(APP_PROJECT_VERSION))
|
||||||
|
- execute_process(
|
||||||
|
- COMMAND ${GIT_EXECUTABLE} describe --always
|
||||||
|
- OUTPUT_VARIABLE APP_PROJECT_VERSION
|
||||||
|
- OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
|
- WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/../.."
|
||||||
|
- )
|
||||||
|
-elseif (NOT(APP_PROJECT_VERSION))
|
||||||
|
+if (NOT(APP_PROJECT_VERSION))
|
||||||
|
set(APP_PROJECT_VERSION "0.0.0")
|
||||||
|
endif ()
|
||||||
|
string(REGEX REPLACE "([0-9.]+)-?.*" "\\1" LINPHONE_VERSION "${APP_PROJECT_VERSION}")
|
||||||
|
--
|
||||||
|
2.29.2
|
||||||
|
|
|
@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
|
||||||
description = "Synchronize maildirs and notmuch databases";
|
description = "Synchronize maildirs and notmuch databases";
|
||||||
homepage = "http://www.muchsync.org/";
|
homepage = "http://www.muchsync.org/";
|
||||||
platforms = stdenv.lib.platforms.unix;
|
platforms = stdenv.lib.platforms.unix;
|
||||||
maintainers = with stdenv.lib.maintainers; [ ocharles ];
|
maintainers = with stdenv.lib.maintainers; [];
|
||||||
license = stdenv.lib.licenses.gpl2Plus;
|
license = stdenv.lib.licenses.gpl2Plus;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,6 +11,11 @@ stdenv.mkDerivation {
|
||||||
|
|
||||||
buildInputs = [ libowfat zlib ];
|
buildInputs = [ libowfat zlib ];
|
||||||
|
|
||||||
|
makeFlags = [
|
||||||
|
"LIBOWFAT_HEADERS=${libowfat}/include/libowfat"
|
||||||
|
"LIBOWFAT_LIBRARY=${libowfat}/lib"
|
||||||
|
];
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
runHook preInstall
|
runHook preInstall
|
||||||
install -D opentracker $out/bin/opentracker
|
install -D opentracker $out/bin/opentracker
|
||||||
|
|
87
third_party/nixpkgs/pkgs/applications/networking/remote/nice-dcv-client/default.nix
vendored
Normal file
87
third_party/nixpkgs/pkgs/applications/networking/remote/nice-dcv-client/default.nix
vendored
Normal file
|
@ -0,0 +1,87 @@
|
||||||
|
{ stdenv
|
||||||
|
, fetchurl
|
||||||
|
, glib
|
||||||
|
, libX11
|
||||||
|
, gst_all_1
|
||||||
|
, sqlite
|
||||||
|
, epoxy
|
||||||
|
, pango
|
||||||
|
, cairo
|
||||||
|
, gdk-pixbuf
|
||||||
|
, e2fsprogs
|
||||||
|
, libkrb5
|
||||||
|
, libva
|
||||||
|
, openssl
|
||||||
|
, pcsclite
|
||||||
|
, gtk3
|
||||||
|
, libselinux
|
||||||
|
, libxml2
|
||||||
|
, python3Packages
|
||||||
|
, cpio
|
||||||
|
, autoPatchelfHook
|
||||||
|
}:
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
pname = "nice-dcv-client";
|
||||||
|
version = "2020.2.1737-1";
|
||||||
|
|
||||||
|
src =
|
||||||
|
fetchurl {
|
||||||
|
url = "https://d1uj6qtbmh3dt5.cloudfront.net/2020.2/Clients/nice-dcv-viewer-${version}.el8.x86_64.rpm";
|
||||||
|
sha256 = "sha256-SUpfHd/Btc07cfjc3zx5I5BiNatr/c4E2/mfJuU4R1E=";
|
||||||
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = [ autoPatchelfHook python3Packages.rpm ];
|
||||||
|
unpackPhase = ''
|
||||||
|
rpm2cpio $src | ${cpio}/bin/cpio -idm
|
||||||
|
'';
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
|
libselinux
|
||||||
|
libkrb5
|
||||||
|
libxml2
|
||||||
|
libva
|
||||||
|
e2fsprogs
|
||||||
|
libX11
|
||||||
|
openssl
|
||||||
|
pcsclite
|
||||||
|
gtk3
|
||||||
|
cairo
|
||||||
|
epoxy
|
||||||
|
pango
|
||||||
|
gdk-pixbuf
|
||||||
|
gst_all_1.gstreamer
|
||||||
|
gst_all_1.gst-plugins-base
|
||||||
|
];
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out/bin/
|
||||||
|
mkdir -p $out/lib64/
|
||||||
|
|
||||||
|
mv usr/bin/dcvviewer $out/bin/dcvviewer
|
||||||
|
mv usr/lib64/* $out/lib64/
|
||||||
|
|
||||||
|
mkdir -p $out/libexec/dcvviewer
|
||||||
|
mv usr/libexec/dcvviewer/dcvviewer $out/libexec/dcvviewer/dcvviewer
|
||||||
|
patchelf \
|
||||||
|
--set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
|
||||||
|
$out/libexec/dcvviewer/dcvviewer
|
||||||
|
|
||||||
|
# Fix the wrapper script to have the right basedir.
|
||||||
|
sed -i "s#basedir=/usr#basedir=$out#" $out/bin/dcvviewer
|
||||||
|
|
||||||
|
mv usr/share $out/
|
||||||
|
${glib.dev}/bin/glib-compile-schemas $out/share/glib-2.0/schemas
|
||||||
|
|
||||||
|
# broken symlink, seems to give a warning message if i don't delete it
|
||||||
|
rm $out/lib64/dcvviewer/gio/modules/libdconfsettings.so
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with stdenv.lib; {
|
||||||
|
description = "High-performance remote display protocol";
|
||||||
|
homepage = "https://aws.amazon.com/hpc/dcv/";
|
||||||
|
license = licenses.unfree;
|
||||||
|
platforms = platforms.linux;
|
||||||
|
maintainers = with maintainers; [ rmcgibbo ];
|
||||||
|
};
|
||||||
|
}
|
|
@ -2,13 +2,13 @@
|
||||||
|
|
||||||
buildGoModule rec {
|
buildGoModule rec {
|
||||||
pname = "seaweedfs";
|
pname = "seaweedfs";
|
||||||
version = "2.13";
|
version = "2.14";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "chrislusf";
|
owner = "chrislusf";
|
||||||
repo = "seaweedfs";
|
repo = "seaweedfs";
|
||||||
rev = version;
|
rev = version;
|
||||||
sha256 = "0w41p2fm26ml5dvdg2cnxcw0xzsbjq26chpa3bkn1adpazlpivp4";
|
sha256 = "1sfchh5qiylxxmph0hgjfaj80mv5pnrm1s34g5lx0vj64jxr5nzb";
|
||||||
};
|
};
|
||||||
|
|
||||||
vendorSha256 = "0g344dj325d35i0myrzhg5chspqnly40qp910ml6zrmp7iszc1mw";
|
vendorSha256 = "0g344dj325d35i0myrzhg5chspqnly40qp910ml6zrmp7iszc1mw";
|
||||||
|
|
|
@ -2,11 +2,11 @@
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "clingo";
|
pname = "clingo";
|
||||||
version = "5.4.0";
|
version = "5.4.1";
|
||||||
|
|
||||||
src = fetchzip {
|
src = fetchzip {
|
||||||
url = "https://github.com/potassco/clingo/archive/v${version}.tar.gz";
|
url = "https://github.com/potassco/clingo/archive/v${version}.tar.gz";
|
||||||
sha256 = "0gfqlgwg3qx042w6hdc9qpmr50n4vci3p0ddk28f3kqacf6q9q7m";
|
sha256 = "1f0q5f71s696ywxcjlfz7z134m1h7i39j9sfdv8hlw2w3g5nppc3";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake ];
|
nativeBuildInputs = [ cmake ];
|
||||||
|
|
|
@ -1,26 +1,44 @@
|
||||||
{ stdenv
|
{ stdenv
|
||||||
, fetchurl
|
, fetchurl
|
||||||
, cmake
|
, cmake
|
||||||
, singlePrec ? true
|
, hwloc
|
||||||
, mpiEnabled ? false
|
|
||||||
, fftw
|
, fftw
|
||||||
, openmpi
|
, openmpi
|
||||||
, perl
|
, perl
|
||||||
|
, singlePrec ? true
|
||||||
|
, mpiEnabled ? false
|
||||||
|
, cpuAcceleration ? null
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
let
|
||||||
name = "gromacs-2020.4";
|
# Select reasonable defaults for all major platforms
|
||||||
|
# The possible values are defined in CMakeLists.txt:
|
||||||
|
# AUTO None SSE2 SSE4.1 AVX_128_FMA AVX_256 AVX2_256
|
||||||
|
# AVX2_128 AVX_512 AVX_512_KNL MIC ARM_NEON ARM_NEON_ASIMD
|
||||||
|
SIMD = x: if (cpuAcceleration != null) then x else
|
||||||
|
if stdenv.hostPlatform.system == "i686-linux" then "SSE2" else
|
||||||
|
if stdenv.hostPlatform.system == "x86_64-linux" then "SSE4.1" else
|
||||||
|
if stdenv.hostPlatform.system == "x86_64-darwin" then "SSE4.1" else
|
||||||
|
if stdenv.hostPlatform.system == "aarch64-linux" then "ARM_NEON" else
|
||||||
|
"None";
|
||||||
|
|
||||||
|
in stdenv.mkDerivation rec {
|
||||||
|
pname = "gromacs";
|
||||||
|
version = "2020.4";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "ftp://ftp.gromacs.org/pub/gromacs/gromacs-2020.4.tar.gz";
|
url = "ftp://ftp.gromacs.org/pub/gromacs/gromacs-${version}.tar.gz";
|
||||||
sha256 = "1rplvgna60nqyb8nspaz3bfkwb044kv3zxdaa5whql5m441nj6am";
|
sha256 = "1rplvgna60nqyb8nspaz3bfkwb044kv3zxdaa5whql5m441nj6am";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake ];
|
nativeBuildInputs = [ cmake ];
|
||||||
buildInputs = [ fftw perl ]
|
buildInputs = [ fftw perl hwloc ]
|
||||||
++ (stdenv.lib.optionals mpiEnabled [ openmpi ]);
|
++ (stdenv.lib.optionals mpiEnabled [ openmpi ]);
|
||||||
|
|
||||||
cmakeFlags = (
|
cmakeFlags = [
|
||||||
|
"-DGMX_SIMD:STRING=${SIMD cpuAcceleration}"
|
||||||
|
"-DGMX_OPENMP:BOOL=TRUE"
|
||||||
|
] ++ (
|
||||||
if singlePrec then [
|
if singlePrec then [
|
||||||
"-DGMX_DOUBLE=OFF"
|
"-DGMX_DOUBLE=OFF"
|
||||||
] else [
|
] else [
|
||||||
|
@ -30,8 +48,6 @@ stdenv.mkDerivation {
|
||||||
) ++ (
|
) ++ (
|
||||||
if mpiEnabled then [
|
if mpiEnabled then [
|
||||||
"-DGMX_MPI:BOOL=TRUE"
|
"-DGMX_MPI:BOOL=TRUE"
|
||||||
"-DGMX_CPU_ACCELERATION:STRING=SSE4.1"
|
|
||||||
"-DGMX_OPENMP:BOOL=TRUE"
|
|
||||||
"-DGMX_THREAD_MPI:BOOL=FALSE"
|
"-DGMX_THREAD_MPI:BOOL=FALSE"
|
||||||
] else [
|
] else [
|
||||||
"-DGMX_MPI:BOOL=FALSE"
|
"-DGMX_MPI:BOOL=FALSE"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{ stdenv
|
{ stdenv
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, python3
|
, python3
|
||||||
, gettext
|
, glibcLocales
|
||||||
, gobject-introspection
|
, gobject-introspection
|
||||||
, wrapGAppsHook
|
, wrapGAppsHook
|
||||||
, gtk3
|
, gtk3
|
||||||
|
@ -31,13 +31,13 @@ python3.pkgs.buildPythonApplication rec {
|
||||||
strictDeps = false;
|
strictDeps = false;
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
gettext
|
|
||||||
gobject-introspection
|
gobject-introspection
|
||||||
wrapGAppsHook
|
wrapGAppsHook
|
||||||
python3.pkgs.pip
|
python3.pkgs.pip
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
|
glibcLocales
|
||||||
gtk3
|
gtk3
|
||||||
keybinder3
|
keybinder3
|
||||||
libnotify
|
libnotify
|
||||||
|
@ -46,6 +46,8 @@ python3.pkgs.buildPythonApplication rec {
|
||||||
vte
|
vte
|
||||||
];
|
];
|
||||||
|
|
||||||
|
makeWrapperArgs = [ "--set LOCALE_ARCHIVE ${glibcLocales}/lib/locale/locale-archive" ];
|
||||||
|
|
||||||
propagatedBuildInputs = with python3.pkgs; [
|
propagatedBuildInputs = with python3.pkgs; [
|
||||||
dbus-python
|
dbus-python
|
||||||
pbr
|
pbr
|
||||||
|
|
|
@ -16,13 +16,13 @@
|
||||||
|
|
||||||
buildGoModule rec {
|
buildGoModule rec {
|
||||||
pname = "podman";
|
pname = "podman";
|
||||||
version = "2.2.0";
|
version = "2.2.1";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "containers";
|
owner = "containers";
|
||||||
repo = "podman";
|
repo = "podman";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "13na6ms0dapcmfb4pg8z3sds9nprr1lyyjs0v2izqifcyb1r1c00";
|
sha256 = "166ch73pqx76ppfkhfg3zqxr71jf5pk5asl5bb5rwhyzf7f057q5";
|
||||||
};
|
};
|
||||||
|
|
||||||
vendorSha256 = null;
|
vendorSha256 = null;
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
{ stdenv
|
{ stdenv
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, libX11
|
, libX11
|
||||||
|
, libXext
|
||||||
, libXft
|
, libXft
|
||||||
, libXinerama
|
, libXinerama
|
||||||
, fontconfig
|
, fontconfig
|
||||||
|
@ -20,6 +21,7 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
buildInputs =[
|
buildInputs =[
|
||||||
libX11
|
libX11
|
||||||
|
libXext
|
||||||
libXft
|
libXft
|
||||||
libXinerama
|
libXinerama
|
||||||
fontconfig
|
fontconfig
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
, sha1 ? ""
|
, sha1 ? ""
|
||||||
, sha256 ? ""
|
, sha256 ? ""
|
||||||
, sha512 ? ""
|
, sha512 ? ""
|
||||||
|
, hash ? ""
|
||||||
}:
|
}:
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
|
|
||||||
|
@ -30,7 +31,7 @@ stdenv.mkDerivation rec {
|
||||||
'';
|
'';
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = url;
|
url = url;
|
||||||
inherit md5 sha1 sha256 sha512;
|
inherit md5 sha1 sha256 sha512 hash;
|
||||||
};
|
};
|
||||||
nativeBuildInputs = [ coreutils unzip zip jq ];
|
nativeBuildInputs = [ coreutils unzip zip jq ];
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,10 +9,10 @@
|
||||||
# "sourceforge", "gnu", etc.
|
# "sourceforge", "gnu", etc.
|
||||||
|
|
||||||
luarocks = [
|
luarocks = [
|
||||||
"https://luarocks.org"
|
"https://luarocks.org/"
|
||||||
"https://raw.githubusercontent.com/rocks-moonscript-org/moonrocks-mirror/master/"
|
"https://raw.githubusercontent.com/rocks-moonscript-org/moonrocks-mirror/master/"
|
||||||
"http://luafr.org/moonrocks"
|
"http://luafr.org/moonrocks/"
|
||||||
"http://luarocks.logiceditor.com/rocks"
|
"http://luarocks.logiceditor.com/rocks/"
|
||||||
];
|
];
|
||||||
|
|
||||||
# SourceForge.
|
# SourceForge.
|
||||||
|
|
|
@ -20,14 +20,13 @@ let
|
||||||
in rec {
|
in rec {
|
||||||
# [["good/relative/source/file" true] ["bad.tmpfile" false]] -> root -> path
|
# [["good/relative/source/file" true] ["bad.tmpfile" false]] -> root -> path
|
||||||
filterPattern = patterns: root:
|
filterPattern = patterns: root:
|
||||||
(name: _type:
|
let
|
||||||
let
|
filters = map (pair: relPath: if match (head pair) relPath == null then true else last pair) patterns;
|
||||||
relPath = lib.removePrefix ((toString root) + "/") name;
|
in
|
||||||
matches = pair: (match (head pair) relPath) != null;
|
name: _type:
|
||||||
matched = map (pair: [(matches pair) (last pair)]) patterns;
|
let
|
||||||
in
|
relPath = lib.removePrefix ((toString root) + "/") name;
|
||||||
last (last ([[true true]] ++ (filter head matched)))
|
in foldl' (acc: f: if acc == true then f relPath else acc) true filters;
|
||||||
);
|
|
||||||
|
|
||||||
# string -> [[regex bool]]
|
# string -> [[regex bool]]
|
||||||
gitignoreToPatterns = gitignore:
|
gitignoreToPatterns = gitignore:
|
||||||
|
@ -91,7 +90,9 @@ in rec {
|
||||||
(filter (l: !isList l && !isComment l)
|
(filter (l: !isList l && !isComment l)
|
||||||
(split "\n" gitignore));
|
(split "\n" gitignore));
|
||||||
|
|
||||||
gitignoreFilter = ign: root: filterPattern (gitignoreToPatterns ign) root;
|
gitignoreFilter = ign: let
|
||||||
|
patterns = gitignoreToPatterns ign;
|
||||||
|
in root: filterPattern patterns root;
|
||||||
|
|
||||||
# string|[string|file] (→ [string|file] → [string]) -> string
|
# string|[string|file] (→ [string|file] → [string]) -> string
|
||||||
gitignoreCompileIgnore = file_str_patterns: root:
|
gitignoreCompileIgnore = file_str_patterns: root:
|
||||||
|
@ -100,9 +101,10 @@ in rec {
|
||||||
str_patterns = map (onPath readFile) (lib.toList file_str_patterns);
|
str_patterns = map (onPath readFile) (lib.toList file_str_patterns);
|
||||||
in concatStringsSep "\n" str_patterns;
|
in concatStringsSep "\n" str_patterns;
|
||||||
|
|
||||||
gitignoreFilterPure = filter: patterns: root: name: type:
|
gitignoreFilterPure = filter: patterns: root: let
|
||||||
gitignoreFilter (gitignoreCompileIgnore patterns root) root name type
|
compiledFilter = gitignoreCompileIgnore patterns root;
|
||||||
&& filter name type;
|
filterFn = gitignoreFilter compiledFilter;
|
||||||
|
in name: type: filterFn root name type && filter name type;
|
||||||
|
|
||||||
# This is a very hacky way of programming this!
|
# This is a very hacky way of programming this!
|
||||||
# A better way would be to reuse existing filtering by making multiple gitignore functions per each root.
|
# A better way would be to reuse existing filtering by making multiple gitignore functions per each root.
|
||||||
|
|
|
@ -10,7 +10,7 @@ let
|
||||||
(builtins.attrNames (builtins.removeAttrs variantHashes [ "iosevka" ]));
|
(builtins.attrNames (builtins.removeAttrs variantHashes [ "iosevka" ]));
|
||||||
in stdenv.mkDerivation rec {
|
in stdenv.mkDerivation rec {
|
||||||
pname = "${name}-bin";
|
pname = "${name}-bin";
|
||||||
version = "4.0.0";
|
version = "4.0.2";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://github.com/be5invis/Iosevka/releases/download/v${version}/ttc-${name}-${version}.zip";
|
url = "https://github.com/be5invis/Iosevka/releases/download/v${version}/ttc-${name}-${version}.zip";
|
||||||
|
|
|
@ -1,24 +1,24 @@
|
||||||
# This file was autogenerated. DO NOT EDIT!
|
# This file was autogenerated. DO NOT EDIT!
|
||||||
{
|
{
|
||||||
iosevka = "05wlap8r7kfg5zyj8gf7i1cypgs6lwpkh51g4cyj01zjkkv9g7k8";
|
iosevka = "1p85mrgz63h4q09xy9gchf93fpzwxjnmr5acrfdp9ybrqzpv6gza";
|
||||||
iosevka-aile = "18qa6q1djjr34aj340ab47ajkkcq4wfv7m36f303kabgwfif247r";
|
iosevka-aile = "01kaawf0slhgj21shlvnlq5has4iz0prq89c4xg3k3dhnxdyfkaz";
|
||||||
iosevka-curly = "138hl95n3c2cfblzgh8adi1aljwn1xljjbffd0nrb12hipmgddql";
|
iosevka-curly = "1rbmnxwkihfah5y9vi1zz2qvdx2f3a5lrkgwn46wcxmn0y3hk0ii";
|
||||||
iosevka-curly-slab = "0x18zzphri1fx4lql51n8bam0pq2xb61p1gx50km3wlvkrbmbj23";
|
iosevka-curly-slab = "0svvqs8ybimaq7rad1vh1b6jxkszaan407zm7j66576pf3djkg2f";
|
||||||
iosevka-etoile = "0byv8x3nqjka4ivpa8h6hq2k18cjnf69qmcc06dy4ym45a34qqsw";
|
iosevka-etoile = "1aiwrjk5590l7hwiis448bwfjhz5shbc3cq74lbvk56130nv0d96";
|
||||||
iosevka-slab = "0a2h1g69r9nmp5cskgciywsiq07rxn0cskhvwbwaq64rsqbr1l58";
|
iosevka-slab = "0rsx8sr2f446jax5dk42r19kgpja8cvb8d0hwfv1aqqs3xp7k4zr";
|
||||||
iosevka-sparkle = "13kwdgziylicwkl9s9v9bx9zbbrsrys6n7gx2jzgkdlsj8wkd73i";
|
iosevka-sparkle = "0nfg9ibzz1dqr4bw5gnslvx7b7zdd8mfvjyriwkvpkxycwsaa60k";
|
||||||
iosevka-ss01 = "0achcgfcya6sl15wknlyyghpz3d7q62wa0fikl74wr5xyl7h7f1f";
|
iosevka-ss01 = "044y1drbdv5xcxxg9vgxms95b97zi6bgy4im2mvhhxphx6sa8zdr";
|
||||||
iosevka-ss02 = "09gsawl61acykpd2429g1mz0l7i4gl0j1fl0lzc1giy6kbvrkggb";
|
iosevka-ss02 = "0ndp38fsswz5fcdvh3577q4pxmfss7czyvsnswyka5rz2q40dyrd";
|
||||||
iosevka-ss03 = "07fdxmlpqv6z5hbly8l344x96m80jbz8rq5h9qkfz63xlq0376sj";
|
iosevka-ss03 = "1ypdlsirkgcnakbgd585jqxiafsjdrwmgdd5h9ppf4giaiclsv5w";
|
||||||
iosevka-ss04 = "0q3v6spylhaxsf6spv6q5kh87mxbkh9x04s3h1g3rjv6gdlxi9n4";
|
iosevka-ss04 = "0l7xbv7mcdsqw50lb7ldrwrswc0gb02l19ccv073xinpf3lh1d91";
|
||||||
iosevka-ss05 = "1zzdx4d6zrc1qbhsp0bfg91v63h1y943pylfxns09bzk9wjppvba";
|
iosevka-ss05 = "0qd2dvfrv9wjynaqbhzr2bsrbsgp4db5s32jmxnf3y92qinr91sc";
|
||||||
iosevka-ss06 = "1a3ar8xhn9rf5isxvwqvifczl20ddgs4dw9ypjflmdbyhr3n0yw5";
|
iosevka-ss06 = "0vkvs772lmzcqyg7wrjqjjkk7ij0rrqbr2i8y63f3hsgwm9g6chw";
|
||||||
iosevka-ss07 = "01x33sx5d54mdph7csnk6mhkhyc879rwp9spxwyrajghzd0ql8w6";
|
iosevka-ss07 = "1s0dpxfzy5sk82cv5ipp1c5813rl98izbzr06w44ss1bma3zr5af";
|
||||||
iosevka-ss08 = "0a1kmyr5q2w7qky0ya0gaqmg0lhdafyag8c8idacl7gnra944hi0";
|
iosevka-ss08 = "12fhw8fw264pybavpdpqywaqvrinap6bp9gspsd788im1fqzm5mw";
|
||||||
iosevka-ss09 = "0m7cm8c3795a8kfy19d9wjmii6ycimcclg5pn9g91kg49q8y9gi2";
|
iosevka-ss09 = "1h2i82h9lj3lncc0im8v53jk31jpiaxxydwlrrks9sii56705ddf";
|
||||||
iosevka-ss10 = "1gfdjz6yifbyb9gl19q3q69as3fnmih17ghhrzzhc7qll68r6k6z";
|
iosevka-ss10 = "0km8yj5p1g03ykpx1v2zrflw6ixbk31ps6qknacc06n6xxmlqj09";
|
||||||
iosevka-ss11 = "119ivw6kcqvzbj46xv8avpg56w3nqdkhhl176gj3bpk1jbjip1wh";
|
iosevka-ss11 = "0kcgp4pbqrlcggv2774zygiw2klx9340sxxk708y4yjd9ha6gznn";
|
||||||
iosevka-ss12 = "1vx8rc328whsjjj87fa29kpp9ibk6x52r1brjp37cywjd5ix6l78";
|
iosevka-ss12 = "0fbp9lxc6qw8ahgvyjf52qy5p4c5qyqcyfbqy3qlaj0iasprp9fi";
|
||||||
iosevka-ss13 = "1gmmm2jlvrl6pzcsc2bhy3qvmzmsns8hlc52ddrwdbw0wi28zhs3";
|
iosevka-ss13 = "1jpgvhsxzshdx6ww4zyznzybc5q1ss8l07v9011grmxil7lr0hya";
|
||||||
iosevka-ss14 = "0mwg2bvkpxzpsdhky9k6fn81061pk0f23whj1hj4mn191xpw41fy";
|
iosevka-ss14 = "1ssz9m3b7ls34y8rgi185xzx8avzkzjs9jkn79ir240gmi77s161";
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ stdenv
|
{ stdenvNoCC
|
||||||
, coreutils
|
, coreutils
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
@ -7,10 +7,10 @@
|
||||||
, patches ? [ ]
|
, patches ? [ ]
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenvNoCC.mkDerivation {
|
||||||
inherit patches src version;
|
inherit patches src version;
|
||||||
|
|
||||||
pname = "fedora${stdenv.lib.versions.major version}-backgrounds";
|
pname = "fedora${stdenvNoCC.lib.versions.major version}-backgrounds";
|
||||||
|
|
||||||
dontBuild = true;
|
dontBuild = true;
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ stdenv.mkDerivation {
|
||||||
"DESTDIR=$(out)"
|
"DESTDIR=$(out)"
|
||||||
];
|
];
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenvNoCC.lib; {
|
||||||
homepage = "https://github.com/fedoradesign/backgrounds";
|
homepage = "https://github.com/fedoradesign/backgrounds";
|
||||||
description = "A set of default and supplemental wallpapers for Fedora";
|
description = "A set of default and supplemental wallpapers for Fedora";
|
||||||
license = licenses.cc-by-sa-40;
|
license = licenses.cc-by-sa-40;
|
||||||
|
|
|
@ -65,13 +65,13 @@ let
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "gnome-shell";
|
pname = "gnome-shell";
|
||||||
version = "3.38.1";
|
version = "3.38.2";
|
||||||
|
|
||||||
outputs = [ "out" "devdoc" ];
|
outputs = [ "out" "devdoc" ];
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "mirror://gnome/sources/gnome-shell/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
|
url = "mirror://gnome/sources/gnome-shell/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
|
||||||
sha256 = "1d0br74gxwnqbh102yjkszkc6fc4yd6p5lcs6bxcpi33chly72dp";
|
sha256 = "05fm7kxyvws2lbb156wfa2wf4xmkxr49rrjxg0yaxf68v000yq2k";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
|
|
|
@ -42,13 +42,13 @@
|
||||||
|
|
||||||
let self = stdenv.mkDerivation rec {
|
let self = stdenv.mkDerivation rec {
|
||||||
pname = "mutter";
|
pname = "mutter";
|
||||||
version = "3.38.1";
|
version = "3.38.2";
|
||||||
|
|
||||||
outputs = [ "out" "dev" "man" ];
|
outputs = [ "out" "dev" "man" ];
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "mirror://gnome/sources/mutter/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
|
url = "mirror://gnome/sources/mutter/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
|
||||||
sha256 = "0cvs47h7xhalkh8xcchllaws212ml3d23aj0pmfq0qyzkw65f8g9";
|
sha256 = "03a612m0c7v6y72bs3ghmpyk49177fzq6gdy1jrz4608vnalx5yr";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
{ stdenv, fetchFromGitHub, glib, gettext, bash, gnome3 }:
|
{ stdenv, fetchFromGitHub, glib, gettext, bash, gnome3 }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "gnome-shell-extension-caffeine-unstable";
|
pname = "gnome-shell-extension-caffeine";
|
||||||
version = "2020-03-13";
|
version = "37";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "eonpatapon";
|
owner = "eonpatapon";
|
||||||
repo = "gnome-shell-extension-caffeine";
|
repo = "gnome-shell-extension-caffeine";
|
||||||
rev = "f25fa5cd586271f080c2304d0ad1273b55e864f5";
|
rev = "v${version}";
|
||||||
sha256 = "12a76g1ydw677pjnj00r3vw31k4xybc63ynqzx3s4g0wi6lipng7";
|
sha256 = "1mpa0fbpmv3pblb20dxj8iykn4ayvx89qffpcs67bzlq597zsbkb";
|
||||||
};
|
};
|
||||||
|
|
||||||
uuid = "caffeine@patapon.info";
|
uuid = "caffeine@patapon.info";
|
||||||
|
|
|
@ -3,11 +3,11 @@
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "gnome-chess";
|
pname = "gnome-chess";
|
||||||
version = "3.38.0";
|
version = "3.38.1";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "mirror://gnome/sources/gnome-chess/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
|
url = "mirror://gnome/sources/gnome-chess/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
|
||||||
sha256 = "10y248xdjx9b0izxii9fjyvkra65jxfx66ivwznmn0cadda9gdqg";
|
sha256 = "1bpmi5p5vvjdq2rlm5x9k4gpci8jbrjvdxr1q62h5znzq0vz0w0l";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ meson ninja vala pkgconfig gettext itstool libxml2 python3 wrapGAppsHook gobject-introspection ];
|
nativeBuildInputs = [ meson ninja vala pkgconfig gettext itstool libxml2 python3 wrapGAppsHook gobject-introspection ];
|
||||||
|
|
|
@ -1,36 +1,52 @@
|
||||||
{ stdenv, lib, fetchFromGitHub, fetchpatch, makeWrapper
|
{ stdenv, fetchFromGitHub, fetchpatch, makeWrapper
|
||||||
, coq, ocamlPackages, coq2html
|
, coqPackages, ocamlPackages, coq2html
|
||||||
, tools ? stdenv.cc
|
, tools ? stdenv.cc
|
||||||
|
, version ? "3.8"
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
ocaml-pkgs = with ocamlPackages; [ ocaml findlib menhir ];
|
ocaml-pkgs = with ocamlPackages; [ ocaml findlib menhir ];
|
||||||
ccomp-platform = if stdenv.isDarwin then "x86_64-macosx" else "x86_64-linux";
|
ccomp-platform = if stdenv.isDarwin then "x86_64-macosx" else "x86_64-linux";
|
||||||
|
inherit (coqPackages) coq flocq;
|
||||||
|
inherit (stdenv.lib) optional optionalString;
|
||||||
in
|
in
|
||||||
|
|
||||||
|
let param = {
|
||||||
|
"3.7" = {
|
||||||
|
sha256 = "1h4zhk9rrqki193nxs9vjvya7nl9yxjcf07hfqb6g77riy1vd2jr";
|
||||||
|
patches = [
|
||||||
|
(fetchpatch {
|
||||||
|
url = "https://github.com/AbsInt/CompCert/commit/0a2db0269809539ccc66f8ec73637c37fbd23580.patch";
|
||||||
|
sha256 = "0n8qrba70x8f422jdvq9ddgsx6avf2dkg892g4ldh3jiiidyhspy";
|
||||||
|
})
|
||||||
|
(fetchpatch {
|
||||||
|
url = "https://github.com/AbsInt/CompCert/commit/5e29f8b5ba9582ecf2a1d0baeaef195873640607.patch";
|
||||||
|
sha256 = "184nfdgxrkci880lkaj5pgnify3plka7xfgqrgv16275sqppc5hc";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
};
|
||||||
|
"3.8" = {
|
||||||
|
sha256 = "1gzlyxvw64ca12qql3wnq3bidcx9ygsklv9grjma3ib4hvg7vnr7";
|
||||||
|
useExternalFlocq = true;
|
||||||
|
};
|
||||||
|
}."${version}"; in
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "compcert";
|
pname = "compcert";
|
||||||
version = "3.7";
|
inherit version;
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "AbsInt";
|
owner = "AbsInt";
|
||||||
repo = "CompCert";
|
repo = "CompCert";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "1h4zhk9rrqki193nxs9vjvya7nl9yxjcf07hfqb6g77riy1vd2jr";
|
inherit (param) sha256;
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [
|
patches = param.patches or [];
|
||||||
(fetchpatch {
|
|
||||||
url = "https://github.com/AbsInt/CompCert/commit/0a2db0269809539ccc66f8ec73637c37fbd23580.patch";
|
|
||||||
sha256 = "0n8qrba70x8f422jdvq9ddgsx6avf2dkg892g4ldh3jiiidyhspy";
|
|
||||||
})
|
|
||||||
(fetchpatch {
|
|
||||||
url = "https://github.com/AbsInt/CompCert/commit/5e29f8b5ba9582ecf2a1d0baeaef195873640607.patch";
|
|
||||||
sha256 = "184nfdgxrkci880lkaj5pgnify3plka7xfgqrgv16275sqppc5hc";
|
|
||||||
})
|
|
||||||
];
|
|
||||||
|
|
||||||
nativeBuildInputs = [ makeWrapper ];
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
buildInputs = ocaml-pkgs ++ [ coq coq2html ];
|
buildInputs = ocaml-pkgs ++ [ coq coq2html ];
|
||||||
|
propagatedBuildInputs = optional (param.useExternalFlocq or false) flocq;
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
|
@ -43,6 +59,7 @@ stdenv.mkDerivation rec {
|
||||||
-prefix $out \
|
-prefix $out \
|
||||||
-coqdevdir $lib/lib/coq/${coq.coq-version}/user-contrib/compcert/ \
|
-coqdevdir $lib/lib/coq/${coq.coq-version}/user-contrib/compcert/ \
|
||||||
-toolprefix ${tools}/bin/ \
|
-toolprefix ${tools}/bin/ \
|
||||||
|
${optionalString (param.useExternalFlocq or false) "-use-external-Flocq"} \
|
||||||
${ccomp-platform}
|
${ccomp-platform}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -68,7 +85,7 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "Formally verified C compiler";
|
description = "Formally verified C compiler";
|
||||||
homepage = "http://compcert.inria.fr";
|
homepage = "https://compcert.org";
|
||||||
license = licenses.inria-compcert;
|
license = licenses.inria-compcert;
|
||||||
platforms = [ "x86_64-linux" "x86_64-darwin" ];
|
platforms = [ "x86_64-linux" "x86_64-darwin" ];
|
||||||
maintainers = with maintainers; [ thoughtpolice jwiegley vbgl ];
|
maintainers = with maintainers; [ thoughtpolice jwiegley vbgl ];
|
||||||
|
|
|
@ -4,10 +4,10 @@
|
||||||
, pcre, readline, boehmgc, sqlite, nim-unwrapped, nimble-unwrapped }:
|
, pcre, readline, boehmgc, sqlite, nim-unwrapped, nimble-unwrapped }:
|
||||||
|
|
||||||
let
|
let
|
||||||
version = "1.4.0";
|
version = "1.4.2";
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://nim-lang.org/download/nim-${version}.tar.xz";
|
url = "https://nim-lang.org/download/nim-${version}.tar.xz";
|
||||||
sha256 = "0gf2lqkqzai6mg7mf4y04gdy1ddiavans09i8aisa88ssfza5ywx";
|
sha256 = "0q8i56343b69f1bh48a8vxkqman9i2kscyj0lf017n3xfy1pb903";
|
||||||
};
|
};
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import ./generic.nix {
|
import ./generic.nix {
|
||||||
major_version = "4";
|
major_version = "4";
|
||||||
minor_version = "12";
|
minor_version = "12";
|
||||||
patch_version = "0-alpha1";
|
patch_version = "0-alpha2";
|
||||||
src = fetchTarball {
|
src = fetchTarball {
|
||||||
url = "http://caml.inria.fr/pub/distrib/ocaml-4.12/ocaml-4.12.0~alpha1.tar.xz";
|
url = "http://caml.inria.fr/pub/distrib/ocaml-4.12/ocaml-4.12.0~alpha2.tar.xz";
|
||||||
sha256 = "1p9nnj7l43b697b6bm767znbf1h0s2lyc1qb8izr1vfpsmnm11ws";
|
sha256 = "148vgjcfajjvrvh0q9kb2y7fszqd02cikb5wyznz7kjxka6xxyn9";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue