Project import generated by Copybara.

GitOrigin-RevId: 24eb3f87fc610f18de7076aee7c5a84ac5591e3e
This commit is contained in:
Default email 2020-11-30 09:33:03 +01:00
parent dc5e8637d3
commit cf3f6e7a7d
801 changed files with 12993 additions and 15311 deletions

View file

@ -60,7 +60,7 @@ channels](https://nixos.org/nix/manual/#sec-channels).
Nixpkgs is among the most active projects on GitHub. While thousands
of open issues and pull requests might seem a lot at first, it helps
consider it in the context of the scope of the project. Nixpkgs
describes how to build over 40,000 pieces of software and implements a
describes how to build tens of thousands of pieces of software and implements a
Linux distribution. The [GitHub Insights](https://github.com/NixOS/nixpkgs/pulse)
page gives a sense of the project activity.

View file

@ -11,7 +11,7 @@
<xi:include href="elm.xml" />
<xi:include href="emacs.xml" />
<xi:include href="ibus.xml" />
<xi:include href="kakoune.xml" />
<xi:include href="kakoune.section.xml" />
<xi:include href="linux.xml" />
<xi:include href="locales.xml" />
<xi:include href="nginx.xml" />

View file

@ -0,0 +1,9 @@
# Kakoune {#sec-kakoune}
Kakoune can be built to autoload plugins:
```nix
(kakoune.override {
plugins = with pkgs.kakounePlugins; [ parinfer-rust ];
})
```

View file

@ -1,12 +0,0 @@
<section xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xml:id="sec-kakoune">
<title>Kakoune</title>
<para>
Kakoune can be built to autoload plugins:
<programlisting>(kakoune.override {
plugins = with pkgs.kakounePlugins; [ parinfer-rust ];
})</programlisting>
</para>
</section>

View file

@ -0,0 +1,84 @@
# BEAM Languages (Erlang, Elixir & LFE) {#sec-beam}
## Introduction {#beam-introduction}
In this document and related Nix expressions, we use the term, *BEAM*, to describe the environment. BEAM is the name of the Erlang Virtual Machine and, as far as we're concerned, from a packaging perspective, all languages that run on the BEAM are interchangeable. That which varies, like the build system, is transparent to users of any given BEAM package, so we make no distinction.
## Structure {#beam-structure}
All BEAM-related expressions are available via the top-level `beam` attribute, which includes:
- `interpreters`: a set of compilers running on the BEAM, including multiple Erlang/OTP versions (`beam.interpreters.erlangR19`, etc), Elixir (`beam.interpreters.elixir`) and LFE (`beam.interpreters.lfe`).
- `packages`: a set of package builders (Mix and rebar3), each compiled with a specific Erlang/OTP version, e.g. `beam.packages.erlangR19`.
The default Erlang compiler, defined by `beam.interpreters.erlang`, is aliased as `erlang`. The default BEAM package set is defined by `beam.packages.erlang` and aliased at the top level as `beamPackages`.
To create a package builder built with a custom Erlang version, use the lambda, `beam.packagesWith`, which accepts an Erlang/OTP derivation and produces a package builder similar to `beam.packages.erlang`.
Many Erlang/OTP distributions available in `beam.interpreters` have versions with ODBC and/or Java enabled or without wx (no observer support). For example, there's `beam.interpreters.erlangR22_odbc_javac`, which corresponds to `beam.interpreters.erlangR22` and `beam.interpreters.erlangR22_nox`, which corresponds to `beam.interpreters.erlangR22`.
## Build Tools {#build-tools}
### Rebar3 {#build-tools-rebar3}
We provide a version of Rebar3, under `rebar3`. We also provide a helper to fetch Rebar3 dependencies from a lockfile under `fetchRebar3Deps`.
### Mix & Erlang.mk {#build-tools-other}
Both Mix and Erlang.mk work exactly as expected. There is a bootstrap process that needs to be run for both, however, which is supported by the `buildMix` and `buildErlangMk` derivations, respectively.
## How to Install BEAM Packages {#how-to-install-beam-packages}
BEAM builders are not registered at the top level, simply because they are not relevant to the vast majority of Nix users. To install any of those builders into your profile, refer to them by their attribute path `beamPackages.rebar3`:
```ShellSession
$ nix-env -f "<nixpkgs>" -iA beamPackages.rebar3
```
## Packaging BEAM Applications {#packaging-beam-applications}
### Erlang Applications {#packaging-erlang-applications}
#### Rebar3 Packages {#rebar3-packages}
The Nix function, `buildRebar3`, defined in `beam.packages.erlang.buildRebar3` and aliased at the top level, can be used to build a derivation that understands how to build a Rebar3 project.
If a package needs to compile native code via Rebar3's port compilation mechanism, add `compilePort = true;` to the derivation.
#### Erlang.mk Packages {#erlang-mk-packages}
Erlang.mk functions similarly to Rebar3, except we use `buildErlangMk` instead of `buildRebar3`.
#### Mix Packages {#mix-packages}
Mix functions similarly to Rebar3, except we use `buildMix` instead of `buildRebar3`.
Alternatively, we can use `buildHex` as a shortcut:
## How to Develop {#how-to-develop}
### Creating a Shell {#creating-a-shell}
Usually, we need to create a `shell.nix` file and do our development inside of the environment specified therein. Just install your version of erlang and other interpreter, and then user your normal build tools. As an example with elixir:
```nix
{ pkgs ? import "<nixpkgs"> {} }:
with pkgs;
let
elixir = beam.packages.erlangR22.elixir_1_9;
in
mkShell {
buildInputs = [ elixir ];
ERL_INCLUDE_PATH="${erlang}/lib/erlang/usr/include";
}
```
#### Building in a Shell (for Mix Projects) {#building-in-a-shell}
Using a `shell.nix` as described (see <xref linkend="creating-a-shell"/>) should just work.

View file

@ -1,159 +0,0 @@
<section xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xml:id="sec-beam">
<title>BEAM Languages (Erlang, Elixir &amp; LFE)</title>
<section xml:id="beam-introduction">
<title>Introduction</title>
<para>
In this document and related Nix expressions, we use the term, <emphasis>BEAM</emphasis>, to describe the environment. BEAM is the name of the Erlang Virtual Machine and, as far as we're concerned, from a packaging perspective, all languages that run on the BEAM are interchangeable. That which varies, like the build system, is transparent to users of any given BEAM package, so we make no distinction.
</para>
</section>
<section xml:id="beam-structure">
<title>Structure</title>
<para>
All BEAM-related expressions are available via the top-level <literal>beam</literal> attribute, which includes:
</para>
<itemizedlist>
<listitem>
<para>
<literal>interpreters</literal>: a set of compilers running on the BEAM, including multiple Erlang/OTP versions (<literal>beam.interpreters.erlangR19</literal>, etc), Elixir (<literal>beam.interpreters.elixir</literal>) and LFE (<literal>beam.interpreters.lfe</literal>).
</para>
</listitem>
<listitem>
<para>
<literal>packages</literal>: a set of package builders (Mix and rebar3), each compiled with a specific Erlang/OTP version, e.g. <literal>beam.packages.erlangR19</literal>.
</para>
</listitem>
</itemizedlist>
<para>
The default Erlang compiler, defined by <literal>beam.interpreters.erlang</literal>, is aliased as <literal>erlang</literal>. The default BEAM package set is defined by <literal>beam.packages.erlang</literal> and aliased at the top level as <literal>beamPackages</literal>.
</para>
<para>
To create a package builder built with a custom Erlang version, use the lambda, <literal>beam.packagesWith</literal>, which accepts an Erlang/OTP derivation and produces a package builder similar to <literal>beam.packages.erlang</literal>.
</para>
<para>
Many Erlang/OTP distributions available in <literal>beam.interpreters</literal> have versions with ODBC and/or Java enabled or without wx (no observer support). For example, there's <literal>beam.interpreters.erlangR22_odbc_javac</literal>, which corresponds to <literal>beam.interpreters.erlangR22</literal> and <literal>beam.interpreters.erlangR22_nox</literal>, which corresponds to <literal>beam.interpreters.erlangR22</literal>.
</para>
</section>
<section xml:id="build-tools">
<title>Build Tools</title>
<section xml:id="build-tools-rebar3">
<title>Rebar3</title>
<para>
We provide a version of Rebar3, under <literal>rebar3</literal>. We also provide a helper to fetch Rebar3 dependencies from a lockfile under <literal>fetchRebar3Deps</literal>.
</para>
</section>
<section xml:id="build-tools-other">
<title>Mix &amp; Erlang.mk</title>
<para>
Both Mix and Erlang.mk work exactly as expected. There is a bootstrap process that needs to be run for both, however, which is supported by the <literal>buildMix</literal> and <literal>buildErlangMk</literal> derivations, respectively.
</para>
</section>
</section>
<section xml:id="how-to-install-beam-packages">
<title>How to Install BEAM Packages</title>
<para>
BEAM builders are not registered at the top level, simply because they are not relevant to the vast majority of Nix users.
To install any of those builders into your profile, refer to them by their attribute path <literal>beamPackages.rebar3</literal>:
</para>
<screen>
<prompt>$ </prompt>nix-env -f &quot;&lt;nixpkgs&gt;&quot; -iA beamPackages.rebar3
</screen>
</section>
<section xml:id="packaging-beam-applications">
<title>Packaging BEAM Applications</title>
<section xml:id="packaging-erlang-applications">
<title>Erlang Applications</title>
<section xml:id="rebar3-packages">
<title>Rebar3 Packages</title>
<para>
The Nix function, <literal>buildRebar3</literal>, defined in <literal>beam.packages.erlang.buildRebar3</literal> and aliased at the top level, can be used to build a derivation that understands how to build a Rebar3 project.
</para>
<para>
If a package needs to compile native code via Rebar3's port compilation mechanism, add <literal>compilePort = true;</literal> to the derivation.
</para>
</section>
<section xml:id="erlang-mk-packages">
<title>Erlang.mk Packages</title>
<para>
Erlang.mk functions similarly to Rebar3, except we use <literal>buildErlangMk</literal> instead of <literal>buildRebar3</literal>.
</para>
</section>
<section xml:id="mix-packages">
<title>Mix Packages</title>
<para>
Mix functions similarly to Rebar3, except we use <literal>buildMix</literal> instead of <literal>buildRebar3</literal>.
</para>
<para>
Alternatively, we can use <literal>buildHex</literal> as a shortcut:
</para>
</section>
</section>
</section>
<section xml:id="how-to-develop">
<title>How to Develop</title>
<section xml:id="creating-a-shell">
<title>Creating a Shell</title>
<para>
Usually, we need to create a <literal>shell.nix</literal> file and do our development inside of the environment specified therein. Just install your version of erlang and other interpreter, and then user your normal build tools.
As an example with elixir:
</para>
<programlisting>
{ pkgs ? import &quot;&lt;nixpkgs&quot;&gt; {} }:
with pkgs;
let
elixir = beam.packages.erlangR22.elixir_1_9;
in
mkShell {
buildInputs = [ elixir ];
ERL_INCLUDE_PATH="${erlang}/lib/erlang/usr/include";
}
</programlisting>
<section xml:id="building-in-a-shell">
<title>Building in a Shell (for Mix Projects)</title>
<para>
Using a <literal>shell.nix</literal> as described (see <xref
linkend="creating-a-shell"/>) should just work.
</para>
</section>
</section>
</section>
</section>

View file

@ -0,0 +1,140 @@
# Go {#sec-language-go}
## Go modules {#ssec-language-go}
The function `buildGoModule` builds Go programs managed with Go modules. It builds a [Go Modules](https://github.com/golang/go/wiki/Modules) through a two phase build:
- An intermediate fetcher derivation. This derivation will be used to fetch all of the dependencies of the Go module.
- A final derivation will use the output of the intermediate derivation to build the binaries and produce the final output.
### Example for `buildGoModule` {#ex-buildGoModule}
In the following is an example expression using `buildGoModule`, the following arguments are of special significance to the function:
- `vendorSha256`: is the hash of the output of the intermediate fetcher derivation. `vendorSha256` can also take `null` as an input. When `null` is used as a value, rather than fetching the dependencies and vendoring them, we use the vendoring included within the source repo. If you'd like to not have to update this field on dependency changes, run `go mod vendor` in your source repo and set `vendorSha256 = null;`
- `runVend`: runs the vend command to generate the vendor directory. This is useful if your code depends on c code and go mod tidy does not include the needed sources to build.
```nix
pet = buildGoModule rec {
pname = "pet";
version = "0.3.4";
src = fetchFromGitHub {
owner = "knqyf263";
repo = "pet";
rev = "v${version}";
sha256 = "0m2fzpqxk7hrbxsgqplkg7h2p7gv6s1miymv3gvw0cz039skag0s";
};
vendorSha256 = "1879j77k96684wi554rkjxydrj8g3hpp0kvxz03sd8dmwr3lh83j";
runVend = true;
meta = with lib; {
description = "Simple command-line snippet manager, written in Go";
homepage = "https://github.com/knqyf263/pet";
license = licenses.mit;
maintainers = with maintainers; [ kalbasit ];
platforms = platforms.linux ++ platforms.darwin;
};
}
```
## `buildGoPackage` (legacy) {#ssec-go-legacy}
The function `buildGoPackage` builds legacy Go programs, not supporting Go modules.
### Example for `buildGoPackage`
In the following is an example expression using buildGoPackage, the following arguments are of special significance to the function:
- `goPackagePath` specifies the package's canonical Go import path.
- `goDeps` is where the Go dependencies of a Go program are listed as a list of package source identified by Go import path. It could be imported as a separate `deps.nix` file for readability. The dependency data structure is described below.
```nix
deis = buildGoPackage rec {
pname = "deis";
version = "1.13.0";
goPackagePath = "github.com/deis/deis";
src = fetchFromGitHub {
owner = "deis";
repo = "deis";
rev = "v${version}";
sha256 = "1qv9lxqx7m18029lj8cw3k7jngvxs4iciwrypdy0gd2nnghc68sw";
};
goDeps = ./deps.nix;
}
```
The `goDeps` attribute can be imported from a separate `nix` file that defines which Go libraries are needed and should be included in `GOPATH` for `buildPhase`:
```nix
# deps.nix
[ # goDeps is a list of Go dependencies.
{
# goPackagePath specifies Go package import path.
goPackagePath = "gopkg.in/yaml.v2";
fetch = {
# `fetch type` that needs to be used to get package source.
# If `git` is used there should be `url`, `rev` and `sha256` defined next to it.
type = "git";
url = "https://gopkg.in/yaml.v2";
rev = "a83829b6f1293c91addabc89d0571c246397bbf4";
sha256 = "1m4dsmk90sbi17571h6pld44zxz7jc4lrnl4f27dpd1l8g5xvjhh";
};
}
{
goPackagePath = "github.com/docopt/docopt-go";
fetch = {
type = "git";
url = "https://github.com/docopt/docopt-go";
rev = "784ddc588536785e7299f7272f39101f7faccc3f";
sha256 = "0wwz48jl9fvl1iknvn9dqr4gfy1qs03gxaikrxxp9gry6773v3sj";
};
}
]
```
To extract dependency information from a Go package in automated way use [go2nix](https://github.com/kamilchm/go2nix). It can produce complete derivation and `goDeps` file for Go programs.
You may use Go packages installed into the active Nix profiles by adding the following to your ~/.bashrc:
```bash
for p in $NIX_PROFILES; do
GOPATH="$p/share/go:$GOPATH"
done
```
## Attributes used by the builders {#ssec-go-common-attributes}
Both `buildGoModule` and `buildGoPackage` can be tweaked to behave slightly differently, if the following attributes are used:
### `buildFlagsArray` and `buildFlags`: {#ex-goBuildFlags-noarray}
These attributes set build flags supported by `go build`. We recommend using `buildFlagsArray`. The most common use case of these attributes is to make the resulting executable aware of its own version. For example:
```nix
buildFlagsArray = [
# Note: single quotes are not needed.
"-ldflags=-X main.Version=${version} -X main.Commit=${version}"
];
```
```nix
buildFlagsArray = ''
-ldflags=
-X main.Version=${version}
-X main.Commit=${version}
'';
```
### `deleteVendor` {#var-go-deleteVendor}
Removes the pre-existing vendor directory. This should only be used if the dependencies included in the vendor folder are broken or incomplete.
### `subPackages` {#var-go-subPackages}
Limits the builder from building child packages that have not been listed. If <varname>subPackages</varname> is not specified, all child packages will be built.

View file

@ -1,248 +0,0 @@
<section xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xml:id="sec-language-go">
<title>Go</title>
<section xml:id="ssec-go-modules">
<title>Go modules</title>
<para>
The function <varname> buildGoModule </varname> builds Go programs managed with Go modules. It builds a <link xlink:href="https://github.com/golang/go/wiki/Modules">Go modules</link> through a two phase build:
<itemizedlist>
<listitem>
<para>
An intermediate fetcher derivation. This derivation will be used to fetch all of the dependencies of the Go module.
</para>
</listitem>
<listitem>
<para>
A final derivation will use the output of the intermediate derivation to build the binaries and produce the final output.
</para>
</listitem>
</itemizedlist>
</para>
<example xml:id='ex-buildGoModule'>
<title>buildGoModule</title>
<programlisting>
pet = buildGoModule rec {
pname = "pet";
version = "0.3.4";
src = fetchFromGitHub {
owner = "knqyf263";
repo = "pet";
rev = "v${version}";
sha256 = "0m2fzpqxk7hrbxsgqplkg7h2p7gv6s1miymv3gvw0cz039skag0s";
};
vendorSha256 = "1879j77k96684wi554rkjxydrj8g3hpp0kvxz03sd8dmwr3lh83j"; <co xml:id='ex-buildGoModule-1' />
runVend = true; <co xml:id='ex-buildGoModule-2' />
meta = with lib; {
description = "Simple command-line snippet manager, written in Go";
homepage = "https://github.com/knqyf263/pet";
license = licenses.mit;
maintainers = with maintainers; [ kalbasit ];
platforms = platforms.linux ++ platforms.darwin;
};
}
</programlisting>
</example>
<para>
<xref linkend='ex-buildGoModule'/> is an example expression using buildGoModule, the following arguments are of special significance to the function:
<calloutlist>
<callout arearefs='ex-buildGoModule-1'>
<para>
<varname>vendorSha256</varname> is the hash of the output of the intermediate fetcher derivation.
</para>
</callout>
<callout arearefs='ex-buildGoModule-2'>
<para>
<varname>runVend</varname> runs the vend command to generate the vendor directory. This is useful if your code depends on c code and go mod tidy does not include the needed sources to build.
</para>
</callout>
</calloutlist>
</para>
<para>
<varname>vendorSha256</varname> can also take <varname>null</varname> as an input. When `null` is used as a value, rather than fetching the dependencies and vendoring them, we use the vendoring included within the source repo. If you'd like to not have to update this field on dependency changes, run `go mod vendor` in your source repo and set 'vendorSha256 = null;'
</para>
</section>
<section xml:id="ssec-go-legacy">
<title>Go legacy</title>
<para>
The function <varname> buildGoPackage </varname> builds legacy Go programs, not supporting Go modules.
</para>
<example xml:id='ex-buildGoPackage'>
<title>buildGoPackage</title>
<programlisting>
deis = buildGoPackage rec {
pname = "deis";
version = "1.13.0";
goPackagePath = "github.com/deis/deis"; <co xml:id='ex-buildGoPackage-1' />
src = fetchFromGitHub {
owner = "deis";
repo = "deis";
rev = "v${version}";
sha256 = "1qv9lxqx7m18029lj8cw3k7jngvxs4iciwrypdy0gd2nnghc68sw";
};
goDeps = ./deps.nix; <co xml:id='ex-buildGoPackage-2' />
}
</programlisting>
</example>
<para>
<xref linkend='ex-buildGoPackage'/> is an example expression using buildGoPackage, the following arguments are of special significance to the function:
<calloutlist>
<callout arearefs='ex-buildGoPackage-1'>
<para>
<varname>goPackagePath</varname> specifies the package's canonical Go import path.
</para>
</callout>
<callout arearefs='ex-buildGoPackage-2'>
<para>
<varname>goDeps</varname> is where the Go dependencies of a Go program are listed as a list of package source identified by Go import path. It could be imported as a separate <varname>deps.nix</varname> file for readability. The dependency data structure is described below.
</para>
</callout>
</calloutlist>
</para>
<para>
The <varname>goDeps</varname> attribute can be imported from a separate <varname>nix</varname> file that defines which Go libraries are needed and should be included in <varname>GOPATH</varname> for <varname>buildPhase</varname>.
</para>
<example xml:id='ex-goDeps'>
<title>deps.nix</title>
<programlisting>
[ <co xml:id='ex-goDeps-1' />
{
goPackagePath = "gopkg.in/yaml.v2"; <co xml:id='ex-goDeps-2' />
fetch = {
type = "git"; <co xml:id='ex-goDeps-3' />
url = "https://gopkg.in/yaml.v2";
rev = "a83829b6f1293c91addabc89d0571c246397bbf4";
sha256 = "1m4dsmk90sbi17571h6pld44zxz7jc4lrnl4f27dpd1l8g5xvjhh";
};
}
{
goPackagePath = "github.com/docopt/docopt-go";
fetch = {
type = "git";
url = "https://github.com/docopt/docopt-go";
rev = "784ddc588536785e7299f7272f39101f7faccc3f";
sha256 = "0wwz48jl9fvl1iknvn9dqr4gfy1qs03gxaikrxxp9gry6773v3sj";
};
}
]
</programlisting>
</example>
<para>
<calloutlist>
<callout arearefs='ex-goDeps-1'>
<para>
<varname>goDeps</varname> is a list of Go dependencies.
</para>
</callout>
<callout arearefs='ex-goDeps-2'>
<para>
<varname>goPackagePath</varname> specifies Go package import path.
</para>
</callout>
<callout arearefs='ex-goDeps-3'>
<para>
<varname>fetch type</varname> that needs to be used to get package source. If <varname>git</varname> is used there should be <varname>url</varname>, <varname>rev</varname> and <varname>sha256</varname> defined next to it.
</para>
</callout>
</calloutlist>
</para>
<para>
To extract dependency information from a Go package in automated way use <link xlink:href="https://github.com/kamilchm/go2nix">go2nix</link>. It can produce complete derivation and <varname>goDeps</varname> file for Go programs.
</para>
<para>
You may use Go packages installed into the active Nix profiles by adding the following to your ~/.bashrc:
<screen>
for p in $NIX_PROFILES; do
GOPATH="$p/share/go:$GOPATH"
done
</screen>
</para>
</section>
<section xml:id="ssec-go-common-attributes">
<title>Attributes used by the builders</title>
<para>
Both <link xlink:href="#ssec-go-modules"><varname>buildGoModule</varname></link> and <link xlink:href="#ssec-go-modules"><varname>buildGoPackage</varname></link> can be tweaked to behave slightly differently, if the following attributes are used:
</para>
<variablelist>
<varlistentry xml:id="var-go-buildFlagsArray">
<term>
<varname>buildFlagsArray</varname> and <varname>buildFlags</varname>
</term>
<listitem>
<para>
These attributes set build flags supported by <varname>go build</varname>. We recommend using <varname>buildFlagsArray</varname>. The most common use case of these attributes is to make the resulting executable aware of its own version. For example:
</para>
<example xml:id='ex-goBuildFlags-nospaces'>
<title>buildFlagsArray</title>
<programlisting>
buildFlagsArray = [
"-ldflags=-X main.Version=${version} -X main.Commit=${version}" <co xml:id='ex-goBuildFlags-1' />
];
</programlisting>
</example>
<calloutlist>
<callout arearefs='ex-goBuildFlags-1'>
<para>
Note: single quotes are not needed.
</para>
</callout>
</calloutlist>
<example xml:id='ex-goBuildFlags-noarray'>
<title>buildFlagsArray</title>
<programlisting>
buildFlagsArray = ''
-ldflags=
-X main.Version=${version}
-X main.Commit=${version}
'';
</programlisting>
</example>
</listitem>
</varlistentry>
<varlistentry xml:id="var-go-deleteVendor">
<term>
<varname>deleteVendor</varname>
</term>
<listitem>
<para>
Removes the pre-existing vendor directory. This should only be used if the dependencies included in the vendor folder are broken or incomplete.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="var-go-subPackages">
<term>
<varname>subPackages</varname>
</term>
<listitem>
<para>
Limits the builder from building child packages that have not been listed. If <varname>subPackages</varname> is not specified, all child packages will be built.
</para>
</listitem>
</varlistentry>
</variablelist>
</section>
</section>

View file

@ -7,13 +7,13 @@
</para>
<xi:include href="agda.section.xml" />
<xi:include href="android.section.xml" />
<xi:include href="beam.xml" />
<xi:include href="beam.section.xml" />
<xi:include href="bower.xml" />
<xi:include href="coq.xml" />
<xi:include href="crystal.section.xml" />
<xi:include href="emscripten.section.xml" />
<xi:include href="gnome.xml" />
<xi:include href="go.xml" />
<xi:include href="go.section.xml" />
<xi:include href="haskell.section.xml" />
<xi:include href="idris.section.xml" />
<xi:include href="ios.section.xml" />
@ -25,9 +25,9 @@
<xi:include href="perl.xml" />
<xi:include href="php.section.xml" />
<xi:include href="python.section.xml" />
<xi:include href="qt.xml" />
<xi:include href="qt.section.xml" />
<xi:include href="r.section.xml" />
<xi:include href="ruby.xml" />
<xi:include href="ruby.section.xml" />
<xi:include href="rust.section.xml" />
<xi:include href="texlive.xml" />
<xi:include href="titanium.section.xml" />

View file

@ -153,7 +153,7 @@ The dot product of [1 2] and [3 4] is: 11
But if we maintain the script ourselves, and if there are more dependencies, it
may be nice to encode those dependencies in source to make the script re-usable
without that bit of knowledge. That can be done by using `nix-shell` as a
[shebang](https://en.wikipedia.org/wiki/Shebang_(Unix), like so:
[shebang](https://en.wikipedia.org/wiki/Shebang_(Unix)), like so:
```python
#!/usr/bin/env nix-shell

View file

@ -0,0 +1,124 @@
# Qt {#sec-language-qt}
This section describes the differences between Nix expressions for Qt libraries and applications and Nix expressions for other C++ software. Some knowledge of the latter is assumed.
There are primarily two problems which the Qt infrastructure is designed to address: ensuring consistent versioning of all dependencies and finding dependencies at runtime.
## Nix expression for a Qt package (default.nix) {#qt-default-nix}
```{=docbook}
<programlisting>
{ mkDerivation, lib, qtbase }: <co xml:id='qt-default-nix-co-1' />
mkDerivation { <co xml:id='qt-default-nix-co-2' />
pname = "myapp";
version = "1.0";
buildInputs = [ qtbase ]; <co xml:id='qt-default-nix-co-3' />
}
</programlisting>
<calloutlist>
<callout arearefs='qt-default-nix-co-1'>
<para>
Import <literal>mkDerivation</literal> and Qt (such as <literal>qtbase</literal> modules directly. <emphasis>Do not</emphasis> import Qt package sets; the Qt versions of dependencies may not be coherent, causing build and runtime failures.
</para>
</callout>
<callout arearefs='qt-default-nix-co-2'>
<para>
Use <literal>mkDerivation</literal> instead of <literal>stdenv.mkDerivation</literal>. <literal>mkDerivation</literal> is a wrapper around <literal>stdenv.mkDerivation</literal> which applies some Qt-specific settings. This deriver accepts the same arguments as <literal>stdenv.mkDerivation</literal>; refer to <xref linkend='chap-stdenv' /> for details.
</para>
<para>
To use another deriver instead of <literal>stdenv.mkDerivation</literal>, use <literal>mkDerivationWith</literal>:
<programlisting>
mkDerivationWith myDeriver {
# ...
}
</programlisting>
If you cannot use <literal>mkDerivationWith</literal>, please refer to <xref linkend='qt-runtime-dependencies' />.
</para>
</callout>
<callout arearefs='qt-default-nix-co-3'>
<para>
<literal>mkDerivation</literal> accepts the same arguments as <literal>stdenv.mkDerivation</literal>, such as <literal>buildInputs</literal>.
</para>
</callout>
</calloutlist>
```
## Locating runtime dependencies {#qt-runtime-dependencies}
Qt applications need to be wrapped to find runtime dependencies. If you cannot use `mkDerivation` or `mkDerivationWith` above, include `wrapQtAppsHook` in `nativeBuildInputs`:
```nix
stdenv.mkDerivation {
# ...
nativeBuildInputs = [ wrapQtAppsHook ];
}
```
Entries added to `qtWrapperArgs` are used to modify the wrappers created by `wrapQtAppsHook`. The entries are passed as arguments to [wrapProgram executable makeWrapperArgs](#fun-wrapProgram).
```nix
mkDerivation {
# ...
qtWrapperArgs = [ ''--prefix PATH : /path/to/bin'' ];
}
```
Set `dontWrapQtApps` to stop applications from being wrapped automatically. It is required to wrap applications manually with `wrapQtApp`, using the syntax of [wrapProgram executable makeWrapperArgs](#fun-wrapProgram):
```nix
mkDerivation {
# ...
dontWrapQtApps = true;
preFixup = ''
wrapQtApp "$out/bin/myapp" --prefix PATH : /path/to/bin
'';
}
```
> Note: `wrapQtAppsHook` ignores files that are non-ELF executables. This means that scripts won't be automatically wrapped so you'll need to manually wrap them as previously mentioned. An example of when you'd always need to do this is with Python applications that use PyQT.
Libraries are built with every available version of Qt. Use the `meta.broken` attribute to disable the package for unsupported Qt versions:
```nix
mkDerivation {
# ...
# Disable this library with Qt &lt; 5.9.0
meta.broken = builtins.compareVersions qtbase.version "5.9.0" &lt; 0;
}
```
## Adding a library to Nixpkgs
Add a Qt library to all-packages.nix by adding it to the collection inside `mkLibsForQt5`. This ensures that the library is built with every available version of Qt as needed.
### Example Adding a Qt library to all-packages.nix {#qt-library-all-packages-nix}
```
{
# ...
mkLibsForQt5 = self: with self; {
# ...
mylib = callPackage ../path/to/mylib {};
};
# ...
}
```
## Adding an application to Nixpkgs
Add a Qt application to *all-packages.nix* using `libsForQt5.callPackage` instead of the usual `callPackage`. The former ensures that all dependencies are built with the same version of Qt.
### Example Adding a QT application to all-packages.nix {#qt-application-all-packages-nix}
```nix
{
# ...
myapp = libsForQt5.callPackage ../path/to/myapp/ {};
# ...
}
```

View file

@ -1,149 +0,0 @@
<section xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xml:id="sec-language-qt">
<title>Qt</title>
<para>
This section describes the differences between Nix expressions for Qt libraries and applications and Nix expressions for other C++ software. Some knowledge of the latter is assumed. There are primarily two problems which the Qt infrastructure is designed to address: ensuring consistent versioning of all dependencies and finding dependencies at runtime.
</para>
<example xml:id='qt-default-nix'>
<title>Nix expression for a Qt package (<filename>default.nix</filename>)</title>
<programlisting>
{ mkDerivation, lib, qtbase }: <co xml:id='qt-default-nix-co-1' />
mkDerivation { <co xml:id='qt-default-nix-co-2' />
pname = "myapp";
version = "1.0";
buildInputs = [ qtbase ]; <co xml:id='qt-default-nix-co-3' />
}
</programlisting>
</example>
<calloutlist>
<callout arearefs='qt-default-nix-co-1'>
<para>
Import <literal>mkDerivation</literal> and Qt (such as <literal>qtbase</literal> modules directly. <emphasis>Do not</emphasis> import Qt package sets; the Qt versions of dependencies may not be coherent, causing build and runtime failures.
</para>
</callout>
<callout arearefs='qt-default-nix-co-2'>
<para>
Use <literal>mkDerivation</literal> instead of <literal>stdenv.mkDerivation</literal>. <literal>mkDerivation</literal> is a wrapper around <literal>stdenv.mkDerivation</literal> which applies some Qt-specific settings. This deriver accepts the same arguments as <literal>stdenv.mkDerivation</literal>; refer to <xref linkend='chap-stdenv' /> for details.
</para>
<para>
To use another deriver instead of <literal>stdenv.mkDerivation</literal>, use <literal>mkDerivationWith</literal>:
<programlisting>
mkDerivationWith myDeriver {
# ...
}
</programlisting>
If you cannot use <literal>mkDerivationWith</literal>, please refer to <xref linkend='qt-runtime-dependencies' />.
</para>
</callout>
<callout arearefs='qt-default-nix-co-3'>
<para>
<literal>mkDerivation</literal> accepts the same arguments as <literal>stdenv.mkDerivation</literal>, such as <literal>buildInputs</literal>.
</para>
</callout>
</calloutlist>
<formalpara xml:id='qt-runtime-dependencies'>
<title>Locating runtime dependencies</title>
<para>
Qt applications need to be wrapped to find runtime dependencies. If you cannot use <literal>mkDerivation</literal> or <literal>mkDerivationWith</literal> above, include <literal>wrapQtAppsHook</literal> in <literal>nativeBuildInputs</literal>:
<programlisting>
stdenv.mkDerivation {
# ...
nativeBuildInputs = [ wrapQtAppsHook ];
}
</programlisting>
</para>
</formalpara>
<para>
Entries added to <literal>qtWrapperArgs</literal> are used to modify the wrappers created by <literal>wrapQtAppsHook</literal>. The entries are passed as arguments to <xref linkend='fun-wrapProgram' />.
<programlisting>
mkDerivation {
# ...
qtWrapperArgs = [ ''--prefix PATH : /path/to/bin'' ];
}
</programlisting>
</para>
<para>
Set <literal>dontWrapQtApps</literal> to stop applications from being wrapped automatically. It is required to wrap applications manually with <literal>wrapQtApp</literal>, using the syntax of <xref linkend='fun-wrapProgram' />:
<programlisting>
mkDerivation {
# ...
dontWrapQtApps = true;
preFixup = ''
wrapQtApp "$out/bin/myapp" --prefix PATH : /path/to/bin
'';
}
</programlisting>
</para>
<note>
<para>
<literal>wrapQtAppsHook</literal> ignores files that are non-ELF executables. This means that scripts won't be automatically wrapped so you'll need to manually wrap them as previously mentioned. An example of when you'd always need to do this is with Python applications that use PyQT.
</para>
</note>
<para>
Libraries are built with every available version of Qt. Use the <literal>meta.broken</literal> attribute to disable the package for unsupported Qt versions:
<programlisting>
mkDerivation {
# ...
# Disable this library with Qt &lt; 5.9.0
meta.broken = builtins.compareVersions qtbase.version "5.9.0" &lt; 0;
}
</programlisting>
</para>
<formalpara>
<title>Adding a library to Nixpkgs</title>
<para>
Add a Qt library to <filename>all-packages.nix</filename> by adding it to the collection inside <literal>mkLibsForQt5</literal>. This ensures that the library is built with every available version of Qt as needed.
<example xml:id='qt-library-all-packages-nix'>
<title>Adding a Qt library to <filename>all-packages.nix</filename></title>
<programlisting>
{
# ...
mkLibsForQt5 = self: with self; {
# ...
mylib = callPackage ../path/to/mylib {};
};
# ...
}
</programlisting>
</example>
</para>
</formalpara>
<formalpara>
<title>Adding an application to Nixpkgs</title>
<para>
Add a Qt application to <filename>all-packages.nix</filename> using <literal>libsForQt5.callPackage</literal> instead of the usual <literal>callPackage</literal>. The former ensures that all dependencies are built with the same version of Qt.
<example xml:id='qt-application-all-packages-nix'>
<title>Adding a Qt application to <filename>all-packages.nix</filename></title>
<programlisting>
{
# ...
myapp = libsForQt5.callPackage ../path/to/myapp/ {};
# ...
}
</programlisting>
</example>
</para>
</formalpara>
</section>

View file

@ -1,74 +1,38 @@
---
title: Ruby
author: Michael Fellinger
date: 2019-05-23
---
# Ruby {#sec-language-ruby}
# Ruby
## Using Ruby
## User Guide
Several versions of Ruby interpreters are available on Nix, as well as over 250 gems and many applications written in Ruby. The attribute `ruby` refers to the default Ruby interpreter, which is currently MRI 2.6. It's also possible to refer to specific versions, e.g. `ruby_2_y`, `jruby`, or `mruby`.
### Using Ruby
In the Nixpkgs tree, Ruby packages can be found throughout, depending on what they do, and are called from the main package set. Ruby gems, however are separate sets, and there's one default set for each interpreter (currently MRI only).
#### Overview
There are two main approaches for using Ruby with gems. One is to use a specifically locked `Gemfile` for an application that has very strict dependencies. The other is to depend on the common gems, which we'll explain further down, and rely on them being updated regularly.
Several versions of Ruby interpreters are available on Nix, as well as over 250 gems and many applications written in Ruby.
The attribute `ruby` refers to the default Ruby interpreter, which is currently
MRI 2.5. It's also possible to refer to specific versions, e.g. `ruby_2_6`, `jruby`, or `mruby`.
The interpreters have common attributes, namely `gems`, and `withPackages`. So you can refer to `ruby.gems.nokogiri`, or `ruby_2_6.gems.nokogiri` to get the Nokogiri gem already compiled and ready to use.
In the nixpkgs tree, Ruby packages can be found throughout, depending on what
they do, and are called from the main package set. Ruby gems, however are
separate sets, and there's one default set for each interpreter (currently MRI
only).
Since not all gems have executables like `nokogiri`, it's usually more convenient to use the `withPackages` function like this: `ruby.withPackages (p: with p; [ nokogiri ])`. This will also make sure that the Ruby in your environment will be able to find the gem and it can be used in your Ruby code (for example via `ruby` or `irb` executables) via `require "nokogiri"` as usual.
There are two main approaches for using Ruby with gems.
One is to use a specifically locked `Gemfile` for an application that has very strict dependencies.
The other is to depend on the common gems, which we'll explain further down, and
rely on them being updated regularly.
### Temporary Ruby environment with `nix-shell`
The interpreters have common attributes, namely `gems`, and `withPackages`. So
you can refer to `ruby.gems.nokogiri`, or `ruby_2_5.gems.nokogiri` to get the
Nokogiri gem already compiled and ready to use.
Rather than having a single Ruby environment shared by all Ruby development projects on a system, Nix allows you to create separate environments per project. `nix-shell` gives you the possibility to temporarily load another environment akin to a combined `chruby` or `rvm` and `bundle exec`.
Since not all gems have executables like `nokogiri`, it's usually more
convenient to use the `withPackages` function like this:
`ruby.withPackages (p: with p; [ nokogiri ])`. This will also make sure that the
Ruby in your environment will be able to find the gem and it can be used in your
Ruby code (for example via `ruby` or `irb` executables) via `require "nokogiri"`
as usual.
There are two methods for loading a shell with Ruby packages. The first and recommended method is to create an environment with `ruby.withPackages` and load that.
#### Temporary Ruby environment with `nix-shell`
Rather than having a single Ruby environment shared by all Ruby
development projects on a system, Nix allows you to create separate
environments per project. `nix-shell` gives you the possibility to
temporarily load another environment akin to a combined `chruby` or
`rvm` and `bundle exec`.
There are two methods for loading a shell with Ruby packages. The first and
recommended method is to create an environment with `ruby.withPackages` and load
that.
```shell
nix-shell -p "ruby.withPackages (ps: with ps; [ nokogiri pry ])"
```ShellSession
$ nix-shell -p "ruby.withPackages (ps: with ps; [ nokogiri pry ])"
```
The other method, which is not recommended, is to create an environment and list
all the packages directly.
The other method, which is not recommended, is to create an environment and list all the packages directly.
```shell
nix-shell -p ruby.gems.nokogiri ruby.gems.pry
```ShellSession
$ nix-shell -p ruby.gems.nokogiri ruby.gems.pry
```
Again, it's possible to launch the interpreter from the shell. The Ruby
interpreter has the attribute `gems` which contains all Ruby gems for that
specific interpreter.
Again, it's possible to launch the interpreter from the shell. The Ruby interpreter has the attribute `gems` which contains all Ruby gems for that specific interpreter.
##### Load environment from `.nix` expression
#### Load Ruby environment from `.nix` expression
As explained in the Nix manual, `nix-shell` can also load an expression from a
`.nix` file. Say we want to have Ruby 2.5, `nokogori`, and `pry`. Consider a
`shell.nix` file with:
As explained in the Nix manual, `nix-shell` can also load an expression from a `.nix` file. Say we want to have Ruby 2.6, `nokogori`, and `pry`. Consider a `shell.nix` file with:
```nix
with import <nixpkgs> {};
@ -77,43 +41,33 @@ ruby.withPackages (ps: with ps; [ nokogiri pry ])
What's happening here?
1. We begin with importing the Nix Packages collections. `import <nixpkgs>`
imports the `<nixpkgs>` function, `{}` calls it and the `with` statement
brings all attributes of `nixpkgs` in the local scope. These attributes form
the main package set.
1. We begin with importing the Nix Packages collections. `import <nixpkgs>` imports the `<nixpkgs>` function, `{}` calls it and the `with` statement brings all attributes of `nixpkgs` in the local scope. These attributes form the main package set.
2. Then we create a Ruby environment with the `withPackages` function.
3. The `withPackages` function expects us to provide a function as an argument
that takes the set of all ruby gems and returns a list of packages to include
in the environment. Here, we select the packages `nokogiri` and `pry` from
the package set.
3. The `withPackages` function expects us to provide a function as an argument that takes the set of all ruby gems and returns a list of packages to include in the environment. Here, we select the packages `nokogiri` and `pry` from the package set.
##### Execute command with `--run`
#### Execute command with `--run`
A convenient flag for `nix-shell` is `--run`. It executes a command in the
`nix-shell`. We can e.g. directly open a `pry` REPL:
A convenient flag for `nix-shell` is `--run`. It executes a command in the `nix-shell`. We can e.g. directly open a `pry` REPL:
```shell
nix-shell -p "ruby.withPackages (ps: with ps; [ nokogiri pry ])" --run "pry"
```ShellSession
$ nix-shell -p "ruby.withPackages (ps: with ps; [ nokogiri pry ])" --run "pry"
```
Or immediately require `nokogiri` in pry:
```shell
nix-shell -p "ruby.withPackages (ps: with ps; [ nokogiri pry ])" --run "pry -rnokogiri"
```ShellSession
$ nix-shell -p "ruby.withPackages (ps: with ps; [ nokogiri pry ])" --run "pry -rnokogiri"
```
Or run a script using this environment:
```shell
nix-shell -p "ruby.withPackages (ps: with ps; [ nokogiri pry ])" --run "ruby example.rb"
```ShellSession
$ nix-shell -p "ruby.withPackages (ps: with ps; [ nokogiri pry ])" --run "ruby example.rb"
```
##### Using `nix-shell` as shebang
#### Using `nix-shell` as shebang
In fact, for the last case, there is a more convenient method. You can add a
[shebang](https://en.wikipedia.org/wiki/Shebang_(Unix)) to your script
specifying which dependencies `nix-shell` needs. With the following shebang, you
can just execute `./example.rb`, and it will run with all dependencies.
In fact, for the last case, there is a more convenient method. You can add a [shebang](<https://en.wikipedia.org/wiki/Shebang_(Unix)>) to your script specifying which dependencies `nix-shell` needs. With the following shebang, you can just execute `./example.rb`, and it will run with all dependencies.
```ruby
#! /usr/bin/env nix-shell
@ -126,35 +80,24 @@ body = RestClient.get('http://example.com').body
puts Nokogiri::HTML(body).at('h1').text
```
### Developing with Ruby
## Developing with Ruby
#### Using an existing Gemfile
### Using an existing Gemfile
In most cases, you'll already have a `Gemfile.lock` listing all your dependencies.
This can be used to generate a `gemset.nix` which is used to fetch the gems and
combine them into a single environment.
The reason why you need to have a separate file for this, is that Nix requires
you to have a checksum for each input to your build.
Since the `Gemfile.lock` that `bundler` generates doesn't provide us with
checksums, we have to first download each gem, calculate its SHA256, and store
it in this separate file.
In most cases, you'll already have a `Gemfile.lock` listing all your dependencies. This can be used to generate a `gemset.nix` which is used to fetch the gems and combine them into a single environment. The reason why you need to have a separate file for this, is that Nix requires you to have a checksum for each input to your build. Since the `Gemfile.lock` that `bundler` generates doesn't provide us with checksums, we have to first download each gem, calculate its SHA256, and store it in this separate file.
So the steps from having just a `Gemfile` to a `gemset.nix` are:
```shell
bundle lock
bundix
```ShellSession
$ bundle lock
$ bundix
```
If you already have a `Gemfile.lock`, you can simply run `bundix` and it will
work the same.
If you already have a `Gemfile.lock`, you can simply run `bundix` and it will work the same.
To update the gems in your `Gemfile.lock`, you may use the `bundix -l` flag,
which will create a new `Gemfile.lock` in case the `Gemfile` has a more recent
time of modification.
To update the gems in your `Gemfile.lock`, you may use the `bundix -l` flag, which will create a new `Gemfile.lock` in case the `Gemfile` has a more recent time of modification.
Once the `gemset.nix` is generated, it can be used in a
`bundlerEnv` derivation. Here is an example you could use for your `shell.nix`:
Once the `gemset.nix` is generated, it can be used in a `bundlerEnv` derivation. Here is an example you could use for your `shell.nix`:
```nix
# ...
@ -166,41 +109,26 @@ let
in mkShell { buildInputs = [ gems gems.wrappedRuby ]; }
```
With this file in your directory, you can run `nix-shell` to build and use the gems.
The important parts here are `bundlerEnv` and `wrappedRuby`.
With this file in your directory, you can run `nix-shell` to build and use the gems. The important parts here are `bundlerEnv` and `wrappedRuby`.
The `bundlerEnv` is a wrapper over all the gems in your gemset. This means that
all the `/lib` and `/bin` directories will be available, and the executables of
all gems (even of indirect dependencies) will end up in your `$PATH`.
The `wrappedRuby` provides you with all executables that come with Ruby itself,
but wrapped so they can easily find the gems in your gemset.
The `bundlerEnv` is a wrapper over all the gems in your gemset. This means that all the `/lib` and `/bin` directories will be available, and the executables of all gems (even of indirect dependencies) will end up in your `$PATH`. The `wrappedRuby` provides you with all executables that come with Ruby itself, but wrapped so they can easily find the gems in your gemset.
One common issue that you might have is that you have Ruby 2.6, but also
`bundler` in your gemset. That leads to a conflict for `/bin/bundle` and
`/bin/bundler`. You can resolve this by wrapping either your Ruby or your gems
in a `lowPrio` call. So in order to give the `bundler` from your gemset
priority, it would be used like this:
One common issue that you might have is that you have Ruby 2.6, but also `bundler` in your gemset. That leads to a conflict for `/bin/bundle` and `/bin/bundler`. You can resolve this by wrapping either your Ruby or your gems in a `lowPrio` call. So in order to give the `bundler` from your gemset priority, it would be used like this:
```nix
# ...
mkShell { buildInputs = [ gems (lowPrio gems.wrappedRuby) ]; }
```
### Gem-specific configurations and workarounds
#### Gem-specific configurations and workarounds
In some cases, especially if the gem has native extensions, you might need to modify the way the gem is built.
In some cases, especially if the gem has native extensions, you might need to
modify the way the gem is built.
This is done via a common configuration file that includes all of the workarounds for each gem.
This is done via a common configuration file that includes all of the
workarounds for each gem.
This file lives at `/pkgs/development/ruby-modules/gem-config/default.nix`, since it already contains a lot of entries, it should be pretty easy to add the modifications you need for your needs.
This file lives at `/pkgs/development/ruby-modules/gem-config/default.nix`,
since it already contains a lot of entries, it should be pretty easy to add the
modifications you need for your needs.
In the meanwhile, or if the modification is for a private gem, you can also add
the configuration to only your own environment.
In the meanwhile, or if the modification is for a private gem, you can also add the configuration to only your own environment.
Two places that allow this modification are the `ruby` derivation, or `bundlerEnv`.
@ -261,10 +189,9 @@ let
in pkgs.ruby.withPackages (ps: with ps; [ pg ])
```
Then we can get whichever postgresql version we desire and the `pg` gem will
always reference it correctly:
Then we can get whichever postgresql version we desire and the `pg` gem will always reference it correctly:
```shell
```ShellSession
$ nix-shell --argstr pg_version 9_4 --run 'ruby -rpg -e "puts PG.library_version"'
90421
@ -272,24 +199,15 @@ $ nix-shell --run 'ruby -rpg -e "puts PG.library_version"'
100007
```
Of course for this use-case one could also use overlays since the configuration
for `pg` depends on the `postgresql` alias, but for demonstration purposes this
has to suffice.
Of course for this use-case one could also use overlays since the configuration for `pg` depends on the `postgresql` alias, but for demonstration purposes this has to suffice.
#### Adding a gem to the default gemset
### Adding a gem to the default gemset
Now that you know how to get a working Ruby environment with Nix, it's time to
go forward and start actually developing with Ruby.
We will first have a look at how Ruby gems are packaged on Nix. Then, we will
look at how you can use development mode with your code.
Now that you know how to get a working Ruby environment with Nix, it's time to go forward and start actually developing with Ruby. We will first have a look at how Ruby gems are packaged on Nix. Then, we will look at how you can use development mode with your code.
All gems in the standard set are automatically generated from a single
`Gemfile`. The dependency resolution is done with `bundler` and makes it more
likely that all gems are compatible to each other.
All gems in the standard set are automatically generated from a single `Gemfile`. The dependency resolution is done with `bundler` and makes it more likely that all gems are compatible to each other.
In order to add a new gem to nixpkgs, you can put it into the
`/pkgs/development/ruby-modules/with-packages/Gemfile` and run
`./maintainers/scripts/update-ruby-packages`.
In order to add a new gem to nixpkgs, you can put it into the `/pkgs/development/ruby-modules/with-packages/Gemfile` and run `./maintainers/scripts/update-ruby-packages`.
To test that it works, you can then try using the gem with:
@ -297,16 +215,11 @@ To test that it works, you can then try using the gem with:
NIX_PATH=nixpkgs=$PWD nix-shell -p "ruby.withPackages (ps: with ps; [ name-of-your-gem ])"
```
#### Packaging applications
### Packaging applications
A common task is to add a ruby executable to nixpkgs, popular examples would be
`chef`, `jekyll`, or `sass`. A good way to do that is to use the `bundlerApp`
function, that allows you to make a package that only exposes the listed
executables, otherwise the package may cause conflicts through common paths like
`bin/rake` or `bin/bundler` that aren't meant to be used.
A common task is to add a ruby executable to nixpkgs, popular examples would be `chef`, `jekyll`, or `sass`. A good way to do that is to use the `bundlerApp` function, that allows you to make a package that only exposes the listed executables, otherwise the package may cause conflicts through common paths like `bin/rake` or `bin/bundler` that aren't meant to be used.
The absolute easiest way to do that is to write a
`Gemfile` along these lines:
The absolute easiest way to do that is to write a `Gemfile` along these lines:
```ruby
source 'https://rubygems.org' do
@ -314,10 +227,7 @@ source 'https://rubygems.org' do
end
```
If you want to package a specific version, you can use the standard Gemfile
syntax for that, e.g. `gem 'mdl', '0.5.0'`, but if you want the latest stable
version anyway, it's easier to update by simply running the `bundle lock` and
`bundix` steps again.
If you want to package a specific version, you can use the standard Gemfile syntax for that, e.g. `gem 'mdl', '0.5.0'`, but if you want the latest stable version anyway, it's easier to update by simply running the `bundle lock` and `bundix` steps again.
Now you can also also make a `default.nix` that looks like this:
@ -331,20 +241,15 @@ bundlerApp {
}
```
All that's left to do is to generate the corresponding `Gemfile.lock` and
`gemset.nix` as described above in the `Using an existing Gemfile` section.
All that's left to do is to generate the corresponding `Gemfile.lock` and `gemset.nix` as described above in the `Using an existing Gemfile` section.
##### Packaging executables that require wrapping
#### Packaging executables that require wrapping
Sometimes your app will depend on other executables at runtime, and tries to
find it through the `PATH` environment variable.
Sometimes your app will depend on other executables at runtime, and tries to find it through the `PATH` environment variable.
In this case, you can provide a `postBuild` hook to `bundlerApp` that wraps the
gem in another script that prefixes the `PATH`.
In this case, you can provide a `postBuild` hook to `bundlerApp` that wraps the gem in another script that prefixes the `PATH`.
Of course you could also make a custom `gemConfig` if you know exactly how to
patch it, but it's usually much easier to maintain with a simple wrapper so the
patch doesn't have to be adjusted for each version.
Of course you could also make a custom `gemConfig` if you know exactly how to patch it, but it's usually much easier to maintain with a simple wrapper so the patch doesn't have to be adjusted for each version.
Here's another example:

View file

@ -1,107 +0,0 @@
<section xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xml:id="sec-language-ruby">
<title>Ruby</title>
<para>
There currently is support to bundle applications that are packaged as Ruby gems. The utility "bundix" allows you to write a <filename>Gemfile</filename>, let bundler create a <filename>Gemfile.lock</filename>, and then convert this into a nix expression that contains all Gem dependencies automatically.
</para>
<para>
For example, to package sensu, we did:
</para>
<screen>
<prompt>$ </prompt>cd pkgs/servers/monitoring
<prompt>$ </prompt>mkdir sensu
<prompt>$ </prompt>cd sensu
<prompt>$ </prompt>cat > Gemfile
source 'https://rubygems.org'
gem 'sensu'
<prompt>$ </prompt>$(nix-build '&lt;nixpkgs>' -A bundix --no-out-link)/bin/bundix --magic
<prompt>$ </prompt>cat > default.nix
{ lib, bundlerEnv, ruby }:
bundlerEnv rec {
name = "sensu-${version}";
version = (import gemset).sensu.version;
inherit ruby;
# expects Gemfile, Gemfile.lock and gemset.nix in the same directory
gemdir = ./.;
meta = with lib; {
description = "A monitoring framework that aims to be simple, malleable, and scalable";
homepage = "http://sensuapp.org/";
license = with licenses; mit;
maintainers = with maintainers; [ theuni ];
platforms = platforms.unix;
};
}
</screen>
<para>
Please check in the <filename>Gemfile</filename>, <filename>Gemfile.lock</filename> and the <filename>gemset.nix</filename> so future updates can be run easily.
</para>
<para>
Updating Ruby packages can then be done like this:
</para>
<screen>
<prompt>$ </prompt>cd pkgs/servers/monitoring/sensu
<prompt>$ </prompt>nix-shell -p bundler --run 'bundle lock --update'
<prompt>$ </prompt>nix-shell -p bundix --run 'bundix'
</screen>
<para>
For tools written in Ruby - i.e. where the desire is to install a package and then execute e.g. <command>rake</command> at the command line, there is an alternative builder called <literal>bundlerApp</literal>. Set up the <filename>gemset.nix</filename> the same way, and then, for example:
</para>
<programlisting>
<![CDATA[{ lib, bundlerApp }:
bundlerApp {
pname = "corundum";
gemdir = ./.;
exes = [ "corundum-skel" ];
meta = with lib; {
description = "Tool and libraries for maintaining Ruby gems.";
homepage = "https://github.com/nyarly/corundum";
license = licenses.mit;
maintainers = [ maintainers.nyarly ];
platforms = platforms.unix;
};
}]]>
</programlisting>
<para>
The chief advantage of <literal>bundlerApp</literal> over <literal>bundlerEnv</literal> is the executables introduced in the environment are precisely those selected in the <literal>exes</literal> list, as opposed to <literal>bundlerEnv</literal> which adds all the executables made available by gems in the gemset, which can mean e.g. <command>rspec</command> or <command>rake</command> in unpredictable versions available from various packages.
</para>
<para>
Resulting derivations for both builders also have two helpful attributes, <literal>env</literal> and <literal>wrappedRuby</literal>. The first one allows one to quickly drop into <command>nix-shell</command> with the specified environment present. E.g. <command>nix-shell -A sensu.env</command> would give you an environment with Ruby preset so it has all the libraries necessary for <literal>sensu</literal> in its paths. The second one can be used to make derivations from custom Ruby scripts which have <filename>Gemfile</filename>s with their dependencies specified. It is a derivation with <command>ruby</command> wrapped so it can find all the needed dependencies. For example, to make a derivation <literal>my-script</literal> for a <filename>my-script.rb</filename> (which should be placed in <filename>bin</filename>) you should run <command>bundix</command> as specified above and then use <literal>bundlerEnv</literal> like this:
</para>
<programlisting>
<![CDATA[let env = bundlerEnv {
name = "my-script-env";
inherit ruby;
gemfile = ./Gemfile;
lockfile = ./Gemfile.lock;
gemset = ./gemset.nix;
};
in stdenv.mkDerivation {
name = "my-script";
buildInputs = [ env.wrappedRuby ];
script = ./my-script.rb;
buildCommand = ''
install -D -m755 $script $out/bin/my-script
patchShebangs $out/bin/my-script
'';
}]]>
</programlisting>
</section>

View file

@ -63,9 +63,52 @@ The fetcher will verify that the `Cargo.lock` file is in sync with the `src`
attribute, and fail the build if not. It will also will compress the vendor
directory into a tar.gz archive.
### Building a crate for a different target
### Cross compilation
To build your crate with a different cargo `--target` simply specify the `target` attribute:
By default, Rust packages are compiled for the host platform, just like any
other package is. The `--target` passed to rust tools is computed from this.
By default, it takes the `stdenv.hostPlatform.config` and replaces components
where they are known to differ. But there are ways to customize the argument:
- To choose a different target by name, define
`stdenv.hostPlatform.rustc.config` as that name (a string), and that
name will be used instead.
For example:
```nix
import <nixpkgs> {
crossSystem = (import <nixpkgs/lib>).systems.examples.armhf-embedded // {
rustc.config = "thumbv7em-none-eabi";
};
}
```
will result in:
```shell
--target thumbv7em-none-eabi
```
- To pass a completely custom target, define
`stdenv.hostPlatform.rustc.config` with its name, and
`stdenv.hostPlatform.rustc.platform` with the value. The value will be
serialized to JSON in a file called
`${stdenv.hostPlatform.rustc.config}.json`, and the path of that file
will be used instead.
For example:
```nix
import <nixpkgs> {
crossSystem = (import <nixpkgs/lib>).systems.examples.armhf-embedded // {
rustc.config = "thumb-crazy";
rustc.platform = { foo = ""; bar = ""; };
};
}
will result in:
```shell
--target /nix/store/asdfasdfsadf-thumb-crazy.json # contains {"foo":"","bar":""}
```
Finally, as an ad-hoc escape hatch, a computed target (string or JSON file
path) can be passed directly to `buildRustPackage`:
```nix
pkgs.rustPlatform.buildRustPackage {
@ -74,6 +117,15 @@ pkgs.rustPlatform.buildRustPackage {
}
```
This is useful to avoid rebuilding Rust tools, since they are actually target
agnostic and don't need to be rebuilt. But in the future, we should always
build the Rust tools and standard library crates separately so there is no
reason not to take the `stdenv.hostPlatform.rustc`-modifying approach, and the
ad-hoc escape hatch to `buildRustPackage` can be removed.
Note that currently custom targets aren't compiled with `std`, so `cargo test`
will fail. This can be ignored by adding `doCheck = false;` to your derivation.
### Running package tests
When using `buildRustPackage`, the `checkPhase` is enabled by default and runs
@ -524,12 +576,13 @@ For example, you might want to add `latest.rustChannels.stable.rust` to the list
Imperatively, the latest stable version can be installed with the following command:
$ nix-env -Ai nixos.latest.rustChannels.stable.rust
$ nix-env -Ai nixpkgs.latest.rustChannels.stable.rust
Or using the attribute with nix-shell:
$ nix-shell -p nixos.latest.rustChannels.stable.rust
$ nix-shell -p nixpkgs.latest.rustChannels.stable.rust
Substitute the `nixpkgs` prefix with `nixos` on NixOS.
To install the beta or nightly channel, "stable" should be substituted by
"nightly" or "beta", or
use the function provided by this overlay to pull a version based on a

View file

@ -169,6 +169,9 @@
}
</programlisting>
</para>
<para>
Note that <literal>whitelistedLicenses</literal> only applies to unfree licenses unless <literal>allowUnfree</literal> is enabled. It is not a generic whitelist for all types of licenses. <literal>blacklistedLicenses</literal> applies to all licenses.
</para>
</listitem>
</itemizedlist>

View file

@ -392,6 +392,11 @@ lib.mapAttrs (n: v: v // { shortName = n; }) {
fullName = "Historic Permission Notice and Disclaimer";
};
hpndSellVariant = spdx {
fullName = "Historical Permission Notice and Disclaimer - sell variant";
spdxId = "HPND-sell-variant";
};
# Intel's license, seems free
iasl = {
fullName = "iASL";

View file

@ -1152,9 +1152,9 @@
githubId = 50839;
name = "Brian Jones";
};
boothead = {
commandodev = {
email = "ben@perurbis.com";
github = "boothead";
github = "commandodev";
githubId = 87764;
name = "Ben Ford";
};
@ -1755,6 +1755,12 @@
githubId = 1740337;
name = "Chris Ostrouchov";
};
confus = {
email = "con-f-use@gmx.net";
github = "con-f-use";
githubId = 11145016;
name = "J.C.";
};
contrun = {
email = "uuuuuu@protonmail.com";
github = "contrun";
@ -2895,6 +2901,12 @@
githubId = 541748;
name = "Felipe Espinoza";
};
fehnomenal = {
email = "fehnomenal@fehn.systems";
github = "fehnomenal";
githubId = 9959940;
name = "Andreas Fehn";
};
felschr = {
email = "dev@felschr.com";
github = "felschr";
@ -4137,6 +4149,12 @@
githubId = 60272884;
name = "Jonathan Jeppener-Haltenhoff";
};
joelancaster = {
email = "joe.a.lancas@gmail.com";
github = "joelancaster";
githubId = 16760945;
name = "Joe Lancaster";
};
joelburget = {
email = "joelburget@gmail.com";
github = "joelburget";
@ -4801,12 +4819,6 @@
fingerprint = "5A9A 1C9B 2369 8049 3B48 CF5B 81A1 5409 4816 2372";
}];
};
kylewlacy = {
email = "kylelacy+nix@pm.me";
github = "kylewlacy";
githubId = 1362179;
name = "Kyle Lacy";
};
laikq = {
email = "gwen@quasebarth.de";
github = "laikq";
@ -5509,7 +5521,7 @@
name = "Marius Bakke";
};
mbaillie = {
email = "martin@baillie.email";
email = "martin@baillie.id";
github = "martinbaillie";
githubId = 613740;
name = "Martin Baillie";
@ -6135,6 +6147,12 @@
githubId = 5139265;
name = "James Wood";
};
mudrii = {
email = "mudreac@gmail.com";
github = "mudrii";
githubId = 220262;
name = "Ion Mudreac";
};
muflax = {
email = "mail@muflax.com";
github = "muflax";
@ -6959,6 +6977,18 @@
githubId = 138074;
name = "Pedro Pombeiro";
};
poscat = {
email = "poscat@mail.poscat.moe";
github = "poscat0x04";
githubId = 53291983;
name = "Poscat Tarski";
keys = [
{
longkeyid = "rsa4096/2D2595A00D08ACE0";
fingerprint = "48AD DE10 F27B AFB4 7BB0 CCAF 2D25 95A0 0D08 ACE0";
}
];
};
pradeepchhetri = {
email = "pradeep.chhetri89@gmail.com";
github = "pradeepchhetri";
@ -6975,6 +7005,12 @@
fingerprint = "240B 57DE 4271 2480 7CE3 EAC8 4F74 D536 1C4C A31E";
}];
};
preisschild = {
email = "florian@florianstroeger.com";
github = "Preisschild";
githubId = 11898437;
name = "Florian Ströger";
};
priegger = {
email = "philipp@riegger.name";
github = "priegger";
@ -9041,6 +9077,12 @@
githubId = 619015;
name = "Svintsov Dmitry";
};
urbas = {
email = "matej.urbas@gmail.com";
github = "urbas";
githubId = 771193;
name = "Matej Urbas";
};
uri-canva = {
email = "uri@canva.com";
github = "uri-canva";

View file

@ -35,7 +35,7 @@ GetOptions("package|p=s" => \$filter,
) or exit 1;
# Evaluate Nixpkgs into an XML representation.
my $xml = `nix-env -f '$path' -qa '$filter' --xml --meta --drv-path`;
my $xml = `nix-env -f '$path' --arg overlays '[]' -qa '$filter' --xml --meta --drv-path`;
die "$0: evaluation of $path failed\n" if $? != 0;
my $info = XMLin($xml, KeyAttr => { 'item' => '+attrPath', 'meta' => 'name' }, ForceArray => 1, SuppressEmpty => '' ) or die "cannot parse XML output";

View file

@ -9,3 +9,4 @@ curl https://repology.org/api/v1/repository/nix_unstable/problems \
| jq -r '.[] | select(.type == "homepage_permanent_https_redirect") | .data | "s@\(.url)@\(.target)@"' \
| sort | uniq | tee script.sed
find -name '*.nix' | xargs -P4 -- sed -f script.sed -i
rm script.sed

View file

@ -147,6 +147,7 @@
./programs/npm.nix
./programs/oblogout.nix
./programs/plotinus.nix
./programs/proxychains.nix
./programs/qt5ct.nix
./programs/screen.nix
./programs/sedutil.nix

View file

@ -0,0 +1,165 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.programs.proxychains;
configFile = ''
${cfg.chain.type}_chain
${optionalString (cfg.chain.type == "random")
"chain_len = ${builtins.toString cfg.chain.length}"}
${optionalString cfg.proxyDNS "proxy_dns"}
${optionalString cfg.quietMode "quiet_mode"}
remote_dns_subnet ${builtins.toString cfg.remoteDNSSubnet}
tcp_read_time_out ${builtins.toString cfg.tcpReadTimeOut}
tcp_connect_time_out ${builtins.toString cfg.tcpConnectTimeOut}
localnet ${cfg.localnet}
[ProxyList]
${builtins.concatStringsSep "\n"
(lib.mapAttrsToList (k: v: "${v.type} ${v.host} ${builtins.toString v.port}")
(lib.filterAttrs (k: v: v.enable) cfg.proxies))}
'';
proxyOptions = {
options = {
enable = mkEnableOption "this proxy";
type = mkOption {
type = types.enum [ "http" "socks4" "socks5" ];
description = "Proxy type.";
};
host = mkOption {
type = types.str;
description = "Proxy host or IP address.";
};
port = mkOption {
type = types.port;
description = "Proxy port";
};
};
};
in {
###### interface
options = {
programs.proxychains = {
enable = mkEnableOption "installing proxychains configuration";
chain = {
type = mkOption {
type = types.enum [ "dynamic" "strict" "random" ];
default = "strict";
description = ''
<literal>dynamic</literal> - Each connection will be done via chained proxies
all proxies chained in the order as they appear in the list
at least one proxy must be online to play in chain
(dead proxies are skipped)
otherwise <literal>EINTR</literal> is returned to the app.
<literal>strict</literal> - Each connection will be done via chained proxies
all proxies chained in the order as they appear in the list
all proxies must be online to play in chain
otherwise <literal>EINTR</literal> is returned to the app.
<literal>random</literal> - Each connection will be done via random proxy
(or proxy chain, see <option>programs.proxychains.chain.length</option>) from the list.
'';
};
length = mkOption {
type = types.nullOr types.int;
default = null;
description = ''
Chain length for random chain.
'';
};
};
proxyDNS = mkOption {
type = types.bool;
default = true;
description = "Proxy DNS requests - no leak for DNS data.";
};
quietMode = mkEnableOption "Quiet mode (no output from the library).";
remoteDNSSubnet = mkOption {
type = types.enum [ 10 127 224 ];
default = 224;
description = ''
Set the class A subnet number to use for the internal remote DNS mapping, uses the reserved 224.x.x.x range by default.
'';
};
tcpReadTimeOut = mkOption {
type = types.int;
default = 15000;
description = "Connection read time-out in milliseconds.";
};
tcpConnectTimeOut = mkOption {
type = types.int;
default = 8000;
description = "Connection time-out in milliseconds.";
};
localnet = mkOption {
type = types.str;
default = "127.0.0.0/255.0.0.0";
description = "By default enable localnet for loopback address ranges.";
};
proxies = mkOption {
type = types.attrsOf (types.submodule proxyOptions);
description = ''
Proxies to be used by proxychains.
'';
example = literalExample ''
{ myproxy =
{ type = "socks4";
host = "127.0.0.1";
port = 1337;
};
}
'';
};
};
};
###### implementation
meta.maintainers = with maintainers; [ sorki ];
config = mkIf cfg.enable {
assertions = singleton {
assertion = cfg.chain.type != "random" && cfg.chain.length == null;
message = ''
Option `programs.proxychains.chain.length`
only makes sense with `programs.proxychains.chain.type` = "random".
'';
};
programs.proxychains.proxies = mkIf config.services.tor.client.enable
{
torproxy = mkDefault {
enable = true;
type = "socks4";
host = "127.0.0.1";
port = 9050;
};
};
environment.etc."proxychains.conf".text = configFile;
environment.systemPackages = [ pkgs.proxychains ];
};
}

View file

@ -17,10 +17,6 @@ let
mkdir -p "$out/lib"
ln -s "${pkgs.pipewire.jack}/lib" "$out/lib/pipewire"
'';
pulse-libs = pkgs.runCommand "pulse-libs" {} ''
mkdir -p "$out/lib"
ln -s "${pkgs.pipewire.pulse}/lib" "$out/lib/pipewire"
'';
in {
meta = {
@ -50,7 +46,7 @@ in {
};
pulse = {
enable = mkEnableOption "PulseAudio emulation";
enable = mkEnableOption "PulseAudio server emulation";
};
};
};
@ -61,23 +57,24 @@ in {
assertions = [
{
assertion = cfg.pulse.enable -> !config.hardware.pulseaudio.enable;
message = "PipeWire based PulseAudio emulation doesn't use the PulseAudio service";
message = "PipeWire based PulseAudio server emulation replaces PulseAudio";
}
{
assertion = cfg.jack.enable -> !config.services.jack.jackd.enable;
message = "PIpeWire based JACK emulation doesn't use the JACK service";
message = "PipeWire based JACK emulation doesn't use the JACK service";
}
];
environment.systemPackages = [ pkgs.pipewire ]
++ lib.optional cfg.jack.enable jack-libs
++ lib.optional cfg.pulse.enable pulse-libs;
++ lib.optional cfg.jack.enable jack-libs;
systemd.packages = [ pkgs.pipewire ];
systemd.packages = [ pkgs.pipewire ]
++ lib.optional cfg.pulse.enable pkgs.pipewire.pulse;
# PipeWire depends on DBUS but doesn't list it. Without this booting
# into a terminal results in the service crashing with an error.
systemd.user.sockets.pipewire.wantedBy = lib.mkIf cfg.socketActivation [ "sockets.target" ];
systemd.user.sockets.pipewire-pulse.wantedBy = lib.mkIf (cfg.socketActivation && cfg.pulse.enable) ["sockets.target"];
systemd.user.services.pipewire.bindsTo = [ "dbus.service" ];
services.udev.packages = [ pkgs.pipewire ];
@ -100,6 +97,6 @@ in {
source = "${pkgs.pipewire}/share/alsa/alsa.conf.d/50-pipewire.conf";
};
environment.sessionVariables.LD_LIBRARY_PATH =
lib.optional (cfg.jack.enable || cfg.pulse.enable) "/run/current-system/sw/lib/pipewire";
lib.optional cfg.jack.enable "/run/current-system/sw/lib/pipewire";
};
}

View file

@ -49,8 +49,13 @@ in
default = 34197;
description = ''
The port to which the service should bind.
This option will also open up the UDP port in the firewall configuration.
'';
};
openFirewall = mkOption {
type = types.bool;
default = false;
description = ''
Whether to automatically open the specified UDP port in the firewall.
'';
};
saveName = mkOption {
@ -237,6 +242,6 @@ in
};
};
networking.firewall.allowedUDPPorts = [ cfg.port ];
networking.firewall.allowedUDPPorts = if cfg.openFirewall then [ cfg.port ] else [];
};
}

View file

@ -34,6 +34,14 @@ in
defaultText = "pkgs.disnix";
};
enableProfilePath = mkEnableOption "exposing the Disnix profiles in the system's PATH";
profiles = mkOption {
type = types.listOf types.string;
default = [ "default" ];
example = [ "default" ];
description = "Names of the Disnix profiles to expose in the system's PATH";
};
};
};
@ -44,6 +52,7 @@ in
dysnomia.enable = true;
environment.systemPackages = [ pkgs.disnix ] ++ optional cfg.useWebServiceInterface pkgs.DisnixWebService;
environment.variables.PATH = lib.optionals cfg.enableProfilePath (map (profileName: "/nix/var/nix/profiles/disnix/${profileName}/bin" ) cfg.profiles);
services.dbus.enable = true;
services.dbus.packages = [ pkgs.disnix ];
@ -68,7 +77,8 @@ in
++ optional config.services.postgresql.enable "postgresql.service"
++ optional config.services.tomcat.enable "tomcat.service"
++ optional config.services.svnserve.enable "svnserve.service"
++ optional config.services.mongodb.enable "mongodb.service";
++ optional config.services.mongodb.enable "mongodb.service"
++ optional config.services.influxdb.enable "influxdb.service";
restartIfChanged = false;

View file

@ -66,6 +66,19 @@ let
) (builtins.attrNames cfg.components)}
'';
};
dysnomiaFlags = {
enableApacheWebApplication = config.services.httpd.enable;
enableAxis2WebService = config.services.tomcat.axis2.enable;
enableDockerContainer = config.virtualisation.docker.enable;
enableEjabberdDump = config.services.ejabberd.enable;
enableMySQLDatabase = config.services.mysql.enable;
enablePostgreSQLDatabase = config.services.postgresql.enable;
enableTomcatWebApplication = config.services.tomcat.enable;
enableMongoDatabase = config.services.mongodb.enable;
enableSubversionRepository = config.services.svnserve.enable;
enableInfluxDatabase = config.services.influxdb.enable;
};
in
{
options = {
@ -117,6 +130,12 @@ in
description = "A list of paths containing additional modules that are added to the search folders";
default = [];
};
enableLegacyModules = mkOption {
type = types.bool;
default = true;
description = "Whether to enable Dysnomia legacy process and wrapper modules";
};
};
};
@ -142,34 +161,48 @@ in
environment.systemPackages = [ cfg.package ];
dysnomia.package = pkgs.dysnomia.override (origArgs: {
enableApacheWebApplication = config.services.httpd.enable;
enableAxis2WebService = config.services.tomcat.axis2.enable;
enableEjabberdDump = config.services.ejabberd.enable;
enableMySQLDatabase = config.services.mysql.enable;
enablePostgreSQLDatabase = config.services.postgresql.enable;
enableSubversionRepository = config.services.svnserve.enable;
enableTomcatWebApplication = config.services.tomcat.enable;
enableMongoDatabase = config.services.mongodb.enable;
enableInfluxDatabase = config.services.influxdb.enable;
dysnomia.package = pkgs.dysnomia.override (origArgs: dysnomiaFlags // lib.optionalAttrs (cfg.enableLegacyModules) {
enableLegacy = builtins.trace ''
WARNING: Dysnomia has been configured to use the legacy 'process' and 'wrapper'
modules for compatibility reasons! If you rely on these modules, consider
migrating to better alternatives.
More information: https://raw.githubusercontent.com/svanderburg/dysnomia/f65a9a84827bcc4024d6b16527098b33b02e4054/README-legacy.md
If you have migrated already or don't rely on these Dysnomia modules, you can
disable legacy mode with the following NixOS configuration option:
dysnomia.enableLegacyModules = false;
In a future version of Dysnomia (and NixOS) the legacy option will go away!
'' true;
});
dysnomia.properties = {
hostname = config.networking.hostName;
inherit (config.nixpkgs.localSystem) system;
supportedTypes = (import "${pkgs.stdenv.mkDerivation {
name = "supportedtypes";
buildCommand = ''
( echo -n "[ "
cd ${cfg.package}/libexec/dysnomia
for i in *
do
echo -n "\"$i\" "
done
echo -n " ]") > $out
'';
}}");
supportedTypes = [
"echo"
"fileset"
"process"
"wrapper"
# These are not base modules, but they are still enabled because they work with technology that are always enabled in NixOS
"systemd-unit"
"sysvinit-script"
"nixos-configuration"
]
++ optional (dysnomiaFlags.enableApacheWebApplication) "apache-webapplication"
++ optional (dysnomiaFlags.enableAxis2WebService) "axis2-webservice"
++ optional (dysnomiaFlags.enableDockerContainer) "docker-container"
++ optional (dysnomiaFlags.enableEjabberdDump) "ejabberd-dump"
++ optional (dysnomiaFlags.enableInfluxDatabase) "influx-database"
++ optional (dysnomiaFlags.enableMySQLDatabase) "mysql-database"
++ optional (dysnomiaFlags.enablePostgreSQLDatabase) "postgresql-database"
++ optional (dysnomiaFlags.enableTomcatWebApplication) "tomcat-webapplication"
++ optional (dysnomiaFlags.enableMongoDatabase) "mongo-database"
++ optional (dysnomiaFlags.enableSubversionRepository) "subversion-repository";
};
dysnomia.containers = lib.recursiveUpdate ({
@ -185,9 +218,9 @@ in
}; }
// lib.optionalAttrs (config.services.mysql.enable) { mysql-database = {
mysqlPort = config.services.mysql.port;
mysqlSocket = "/run/mysqld/mysqld.sock";
} // lib.optionalAttrs cfg.enableAuthentication {
mysqlUsername = "root";
mysqlPassword = builtins.readFile (config.services.mysql.rootPassword);
};
}
// lib.optionalAttrs (config.services.postgresql.enable) { postgresql-database = {
@ -199,6 +232,13 @@ in
tomcatPort = 8080;
}; }
// lib.optionalAttrs (config.services.mongodb.enable) { mongo-database = {}; }
// lib.optionalAttrs (config.services.influxdb.enable) {
influx-database = {
influxdbUsername = config.services.influxdb.user;
influxdbDataDir = "${config.services.influxdb.dataDir}/data";
influxdbMetaDir = "${config.services.influxdb.dataDir}/meta";
};
}
// lib.optionalAttrs (config.services.svnserve.enable) { subversion-repository = {
svnBaseDir = config.services.svnserve.svnBaseDir;
}; }) cfg.extraContainerProperties;

View file

@ -757,7 +757,7 @@ in {
systemd.services.gitaly = {
after = [ "network.target" "gitlab.service" ];
requires = [ "gitlab.service" ];
bindsTo = [ "gitlab.service" ];
wantedBy = [ "multi-user.target" ];
path = with pkgs; [
openssh

View file

@ -25,7 +25,6 @@ let
HTTP_ADDR = ${cfg.httpAddress}
HTTP_PORT = ${toString cfg.httpPort}
ROOT_URL = ${cfg.rootUrl}
STATIC_ROOT_PATH = ${cfg.staticRootPath}
[session]
COOKIE_NAME = session
@ -179,13 +178,6 @@ in
'';
};
staticRootPath = mkOption {
type = types.str;
default = "${pkgs.gogs.data}";
example = "/var/lib/gogs/data";
description = "Upper level of template and static files path.";
};
extraConfig = mkOption {
type = types.str;
default = "";

View file

@ -245,7 +245,11 @@ in {
Group = "hass";
Restart = "on-failure";
ProtectSystem = "strict";
ReadWritePaths = "${cfg.configDir}";
ReadWritePaths = let
cfgPath = [ "config" "homeassistant" "allowlist_external_dirs" ];
value = attrByPath cfgPath [] cfg;
allowPaths = if isList value then value else singleton value;
in [ "${cfg.configDir}" ] ++ allowPaths;
KillSignal = "SIGINT";
PrivateTmp = true;
RemoveIPC = true;

View file

@ -21,6 +21,7 @@ in {
default = {
appservice = rec {
database = "sqlite:///${dataDir}/mautrix-telegram.db";
database_opts = {};
hostname = "0.0.0.0";
port = 8080;
address = "http://localhost:${toString port}";
@ -29,6 +30,8 @@ in {
bridge = {
permissions."*" = "relaybot";
relaybot.whitelist = [ ];
double_puppet_server_map = {};
login_shared_secret_map = {};
};
logging = {

View file

@ -232,6 +232,16 @@ in
Restart = "on-failure";
ExecStart = "${pkgs.mosquitto}/bin/mosquitto -c ${mosquittoConf}";
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
ProtectSystem = "strict";
ProtectHome = true;
PrivateDevices = true;
PrivateTmp = true;
ReadWritePaths = "${cfg.dataDir}";
ProtectControlGroups = true;
ProtectKernelModules = true;
ProtectKernelTunables = true;
NoNewPrivileges = true;
};
preStart = ''
rm -f ${cfg.dataDir}/passwd

View file

@ -5,7 +5,7 @@ with lib;
let
cfg = config.services.xserver.windowManager.exwm;
loadScript = pkgs.writeText "emacs-exwm-load" ''
(require 'exwm)
${cfg.loadScript}
${optionalString cfg.enableDefaultConfig ''
(require 'exwm-config)
(exwm-config-default)
@ -19,6 +19,18 @@ in
options = {
services.xserver.windowManager.exwm = {
enable = mkEnableOption "exwm";
loadScript = mkOption {
default = "(require 'exwm)";
example = literalExample ''
(require 'exwm)
(exwm-enable)
'';
description = ''
Emacs lisp code to be run after loading the user's init
file. If enableDefaultConfig is true, this will be run
before loading the default config.
'';
};
enableDefaultConfig = mkOption {
default = true;
type = lib.types.bool;

View file

@ -159,9 +159,14 @@ in
boot.initrd.extraUtilsCommandsTest = ''
# sshd requires a host key to check config, so we pass in the test's
tmpkey="$(mktemp initrd-ssh-testkey.XXXXXXXXXX)"
cp "${../../../tests/initrd-network-ssh/ssh_host_ed25519_key}" "$tmpkey"
# keys from Nix store are world-readable, which sshd doesn't like
chmod 600 "$tmpkey"
echo -n ${escapeShellArg sshdConfig} |
$out/bin/sshd -t -f /dev/stdin \
-h ${../../../tests/initrd-network-ssh/ssh_host_ed25519_key}
-h "$tmpkey"
rm "$tmpkey"
'';
boot.initrd.network.postCommands = ''

View file

@ -219,6 +219,9 @@ done
@preDeviceCommands@
echo "running udev..."
ln -sfn /proc/self/fd /dev/fd
ln -sfn /proc/self/fd/0 /dev/stdin
ln -sfn /proc/self/fd/1 /dev/stdout
ln -sfn /proc/self/fd/2 /dev/stderr
mkdir -p /etc/systemd
ln -sfn @linkUnits@ /etc/systemd/network
mkdir -p /etc/udev

View file

@ -109,9 +109,8 @@ in {
'';
}];
system.autoUpgrade.flags = [ "--no-build-output" ]
++ (if cfg.flake == null then
(if cfg.channel == null then
system.autoUpgrade.flags = (if cfg.flake == null then
[ "--no-build-output" ] ++ (if cfg.channel == null then
[ "--upgrade" ]
else [
"-I"

View file

@ -28,7 +28,9 @@ in
atd = handleTest ./atd.nix {};
avahi = handleTest ./avahi.nix {};
avahi-with-resolved = handleTest ./avahi.nix { networkd = true; };
awscli = handleTest ./awscli.nix { };
babeld = handleTest ./babeld.nix {};
bat = handleTest ./bat.nix {};
bazarr = handleTest ./bazarr.nix {};
bcachefs = handleTestOn ["x86_64-linux"] ./bcachefs.nix {}; # linux-4.18.2018.10.12 is unsupported on aarch64
beanstalkd = handleTest ./beanstalkd.nix {};
@ -170,6 +172,7 @@ in
jenkins = handleTest ./jenkins.nix {};
jirafeau = handleTest ./jirafeau.nix {};
jitsi-meet = handleTest ./jitsi-meet.nix {};
jq = handleTest ./jq.nix {};
k3s = handleTest ./k3s.nix {};
kafka = handleTest ./kafka.nix {};
keepalived = handleTest ./keepalived.nix {};
@ -193,6 +196,7 @@ in
limesurvey = handleTest ./limesurvey.nix {};
login = handleTest ./login.nix {};
loki = handleTest ./loki.nix {};
lsd = handleTest ./lsd.nix {};
lxd = handleTest ./lxd.nix {};
lxd-nftables = handleTest ./lxd-nftables.nix {};
#logstash = handleTest ./logstash.nix {};
@ -207,6 +211,8 @@ in
mediawiki = handleTest ./mediawiki.nix {};
memcached = handleTest ./memcached.nix {};
metabase = handleTest ./metabase.nix {};
minecraft = handleTest ./minecraft.nix {};
minecraft-server = handleTest ./minecraft-server.nix {};
miniflux = handleTest ./miniflux.nix {};
minio = handleTest ./minio.nix {};
minidlna = handleTest ./minidlna.nix {};

View file

@ -0,0 +1,17 @@
import ./make-test-python.nix ({ pkgs, ...} : {
name = "awscli";
meta = with pkgs.stdenv.lib.maintainers; {
maintainers = [ nequissimus ];
};
machine = { pkgs, ... }:
{
environment.systemPackages = [ pkgs.awscli ];
};
testScript =
''
assert "${pkgs.python3Packages.botocore.version}" in machine.succeed("aws --version")
assert "${pkgs.awscli.version}" in machine.succeed("aws --version")
'';
})

12
third_party/nixpkgs/nixos/tests/bat.nix vendored Normal file
View file

@ -0,0 +1,12 @@
import ./make-test-python.nix ({ pkgs, ... }: {
name = "bat";
meta = with pkgs.stdenv.lib.maintainers; { maintainers = [ nequissimus ]; };
machine = { pkgs, ... }: { environment.systemPackages = [ pkgs.bat ]; };
testScript = ''
machine.succeed("echo 'Foobar\n\n\n42' > /tmp/foo")
assert "Foobar" in machine.succeed("bat -p /tmp/foo")
assert "42" in machine.succeed("bat -p /tmp/foo -r 4:4")
'';
})

10
third_party/nixpkgs/nixos/tests/jq.nix vendored Normal file
View file

@ -0,0 +1,10 @@
import ./make-test-python.nix ({ pkgs, ... }: {
name = "jq";
meta = with pkgs.stdenv.lib.maintainers; { maintainers = [ nequissimus ]; };
nodes.jq = { pkgs, ... }: { environment.systemPackages = [ pkgs.jq ]; };
testScript = ''
assert "world" in jq.succeed('echo \'{"values":["hello","world"]}\'| jq \'.values[1]\''')
'';
})

12
third_party/nixpkgs/nixos/tests/lsd.nix vendored Normal file
View file

@ -0,0 +1,12 @@
import ./make-test-python.nix ({ pkgs, ... }: {
name = "lsd";
meta = with pkgs.stdenv.lib.maintainers; { maintainers = [ nequissimus ]; };
nodes.lsd = { pkgs, ... }: { environment.systemPackages = [ pkgs.lsd ]; };
testScript = ''
lsd.succeed('echo "abc" > /tmp/foo')
assert "4 B /tmp/foo" in lsd.succeed('lsd --classic --blocks "size,name" /tmp/foo')
assert "lsd ${pkgs.lsd.version}" in lsd.succeed("lsd --version")
'';
})

View file

@ -0,0 +1,37 @@
let
seed = "2151901553968352745";
rcon-pass = "foobar";
rcon-port = 43000;
in import ./make-test-python.nix ({ pkgs, ... }: {
name = "minecraft-server";
meta = with pkgs.stdenv.lib.maintainers; { maintainers = [ nequissimus ]; };
nodes.server = { ... }: {
environment.systemPackages = [ pkgs.mcrcon ];
nixpkgs.config.allowUnfree = true;
services.minecraft-server = {
declarative = true;
enable = true;
eula = true;
serverProperties = {
enable-rcon = true;
level-seed = seed;
online-mode = false;
"rcon.password" = rcon-pass;
"rcon.port" = rcon-port;
};
};
virtualisation.memorySize = 2048;
};
testScript = ''
server.wait_for_unit("minecraft-server")
server.wait_for_open_port(${toString rcon-port})
assert "${seed}" in server.succeed(
"mcrcon -H localhost -P ${toString rcon-port} -p '${rcon-pass}' -c 'seed'"
)
'';
})

View file

@ -0,0 +1,28 @@
import ./make-test-python.nix ({ pkgs, lib, ... }: {
name = "minecraft";
meta = with lib.maintainers; { maintainers = [ nequissimus ]; };
nodes.client = { nodes, ... }:
let user = nodes.client.config.users.users.alice;
in {
imports = [ ./common/user-account.nix ./common/x11.nix ];
environment.systemPackages = [ pkgs.minecraft ];
nixpkgs.config.allowUnfree = true;
test-support.displayManager.auto.user = user.name;
};
enableOCR = true;
testScript = { nodes, ... }:
let user = nodes.client.config.users.users.alice;
in ''
client.wait_for_x()
client.execute("su - alice -c minecraft-launcher &")
client.wait_for_text("CONTINUE WITHOUT LOGIN")
client.sleep(10)
client.screenshot("launcher")
'';
})

View file

@ -499,8 +499,8 @@ let
list, targetList
)
with subtest("Test MTU and MAC Address are configured"):
assert "mtu 1342" in machine.succeed("ip link show dev tap0")
assert "mtu 1343" in machine.succeed("ip link show dev tun0")
machine.wait_until_succeeds("ip link show dev tap0 | grep 'mtu 1342'")
machine.wait_until_succeeds("ip link show dev tun0 | grep 'mtu 1343'")
assert "02:de:ad:be:ef:01" in machine.succeed("ip link show dev tap0")
'' # network-addresses-* only exist in scripted networking
+ optionalString (!networkd) ''

View file

@ -1,13 +1,13 @@
{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, curl, libnotify, gdk-pixbuf }:
stdenv.mkDerivation {
version = "2018-10-11";
version = "2020-07-23";
pname = "cmusfm-unstable";
src = fetchFromGitHub {
owner = "Arkq";
repo = "cmusfm";
rev = "ad2fd0aad3f4f1a25add1b8c2f179e8859885873";
sha256 = "0wpwdwgyrp64nvwc6shy0n387p31j6aw6cnmfi9x2y1jhl5hbv6b";
rev = "73df3e64d8aa3b5053b639615b8f81d512420e52";
sha256 = "1p9i65v8hda9bsps4hm9m2b7aw9ivk4ncllg8svyp455gn5v8xx6";
};
# building
configureFlags = [ "--enable-libnotify" ];

View file

@ -0,0 +1,34 @@
{ stdenv, fetchFromGitHub, autoreconfHook, boost, flac, id3lib, pkg-config
, taglib, zlib }:
stdenv.mkDerivation rec {
pname = "dsf2flac";
version = "unstable-2018-01-02";
src = fetchFromGitHub {
owner = "hank";
repo = pname;
rev = "b0cf5aa6ddc60df9bbfeed25548e443c99f5cb16";
sha256 = "15j5f82v7lgs0fkgyyynl82cb1rsxyr9vw3bpzra63nacbi9g8lc";
};
buildInputs = [ boost flac id3lib taglib zlib ];
nativeBuildInputs = [ autoreconfHook pkg-config ];
enableParallelBuilding = true;
preConfigure = ''
export LIBS="$LIBS -lz"
'';
configureFlags = [ "--with-boost-libdir=${boost.out}/lib" ];
meta = with stdenv.lib; {
description = "A DSD to FLAC transcoding tool";
homepage = "https://github.com/hank/dsf2flac";
license = licenses.gpl2;
maintainers = with maintainers; [ dmrauh ];
platforms = with platforms; linux;
};
}

View file

@ -17,7 +17,7 @@ let
};
meta = with stdenv.lib; {
homepage = "http://faust.grame.fr/";
homepage = "https://faust.grame.fr/";
downloadPage = "https://sourceforge.net/projects/faudiostream/files/";
license = licenses.gpl2;
platforms = platforms.linux;

View file

@ -31,7 +31,7 @@ let
};
meta = with stdenv.lib; {
homepage = "http://faust.grame.fr/";
homepage = "https://faust.grame.fr/";
downloadPage = "https://github.com/grame-cncm/faust/";
license = licenses.gpl2;
platforms = platforms.linux;

View file

@ -37,7 +37,7 @@ stdenv.mkDerivation rec {
together the convenience of a standalone interpreted language with the
efficiency of a compiled language. It's ideal for fast prototyping.
'';
homepage = "http://faust.grame.fr/";
homepage = "https://faust.grame.fr/";
license = licenses.gpl3;
};
}

View file

@ -32,7 +32,9 @@ stdenv.mkDerivation rec {
homepage = "https://16-bits.org/ft2.php";
license = licenses.bsd3;
maintainers = with maintainers; [ fgaz ];
platforms = platforms.all;
# From HOW-TO-COMPILE.txt:
# > This code is NOT big-endian compatible
platforms = platforms.littleEndian;
};
}

View file

@ -1,6 +1,7 @@
{ stdenv
, fetchurl
, unzip
, copyDesktopItems
, makeDesktopItem
, imagemagick
, SDL
@ -37,7 +38,7 @@ in stdenv.mkDerivation rec {
};
sourceRoot = (if isStereo then "gt2stereo/trunk" else "goattrk2") + "/src";
nativeBuildInputs = [ unzip imagemagick ];
nativeBuildInputs = [ copyDesktopItems unzip imagemagick ];
buildInputs = [ SDL ];
# PREFIX gets treated as BINDIR.
@ -51,11 +52,16 @@ in stdenv.mkDerivation rec {
# Other files get installed during the build phase.
installPhase = ''
runHook preInstall
convert goattrk2.bmp goattracker.png
install -Dm644 goattracker.png $out/share/icons/hicolor/32x32/apps/goattracker.png
${desktopItem.buildCommand}
runHook postInstall
'';
desktopItems = [ desktopItem ];
meta = {
description = "A crossplatform music editor for creating Commodore 64 music. Uses reSID library by Dag Lem and supports alternatively HardSID & CatWeasel devices"
+ optionalString isStereo " - Stereo version";
@ -66,4 +72,3 @@ in stdenv.mkDerivation rec {
platforms = platforms.all;
};
}

View file

@ -13,8 +13,7 @@ with pythonPackages; buildPythonApplication rec {
sha256 = "0bdzgh2k1ppgcvqiasxwp3w89q44s4jgwjidlips3ixx1bzm822v";
};
buildInputs = with pythonPackages; [ feedparser ];
propagatedBuildInputs = buildInputs;
propagatedBuildInputs = [ setuptools feedparser ];
meta = with stdenv.lib; {
homepage = "https://github.com/manolomartinez/greg";

View file

@ -1,14 +1,15 @@
{ mkDerivation, stdenv, fetchFromGitHub, alsaLib, pkgconfig, qtbase, qtscript, qmake
{ mkDerivation, lib, fetchFromGitHub, alsaLib, pkgconfig, qtbase, qtscript, qmake
}:
mkDerivation {
mkDerivation rec {
pname = "iannix";
version = "2016-01-31";
version = "0.9.20-b";
src = fetchFromGitHub {
owner = "iannix";
repo = "IanniX";
rev = "f84becdcbe154b20a53aa2622068cb8f6fda0755";
sha256 = "184ydb9f1303v332k5k3f1ki7cb6nkxhh6ij0yn72v7dp7figrgj";
rev = "v${version}";
sha256 = "6jjgMvD2VkR3ztU5LguqhtNd+4/ZqRy5pVW5xQ6K20Q=";
};
nativeBuildInputs = [ pkgconfig qmake ];
@ -20,11 +21,11 @@ mkDerivation {
enableParallelBuilding = true;
meta = {
description = "Graphical open-source sequencer,";
meta = with lib; {
description = "Graphical open-source sequencer";
homepage = "https://www.iannix.org/";
license = stdenv.lib.licenses.lgpl3;
platforms = stdenv.lib.platforms.linux;
maintainers = [ stdenv.lib.maintainers.nico202 ];
license = licenses.lgpl3;
platforms = platforms.linux;
maintainers = with maintainers; [ freezeboy ];
};
}

View file

@ -3,12 +3,12 @@
mkDerivation rec {
pname = "jamulus";
version = "3.6.0";
version = "3.6.1";
src = fetchFromGitHub {
owner = "corrados";
repo = "jamulus";
rev = "r${stdenv.lib.replaceStrings [ "." ] [ "_" ] version}";
sha256 = "06x9b2kjsgk8kddhif0x59nwzhnwjmq40x3w5nrphqaimqlrhlcf";
sha256 = "11rwgd2car7ziqa0vancb363m4ca94pj480jfxywd6d81139jl15";
};
nativeBuildInputs = [ pkg-config qmake ];

View file

@ -1,27 +0,0 @@
From c3865405ca707e3284a81709577d85ce2b3db72c Mon Sep 17 00:00:00 2001
From: Francesco Gazzetta <fgaz@fgaz.me>
Date: Wed, 19 Aug 2020 15:06:58 +0200
Subject: [PATCH 2/2] Set the initial directory to the current directory
otherwise the user has to navigate from the nix store, which makes the program
crash due to its size
---
sources/Adapters/DEB/System/DEBSystem.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sources/Adapters/DEB/System/DEBSystem.cpp b/sources/Adapters/DEB/System/DEBSystem.cpp
index 6e86693..65d2cdd 100644
--- a/sources/Adapters/DEB/System/DEBSystem.cpp
+++ b/sources/Adapters/DEB/System/DEBSystem.cpp
@@ -54,7 +54,7 @@ void DEBSystem::Boot(int argc,char **argv) {
}
Path::SetAlias("bin",dirname(buff)) ;
- Path::SetAlias("root","bin:..") ;
+ Path::SetAlias("root",".") ;
#ifdef _DEBUG
Trace::GetInstance()->SetLogger(*(new StdOutLogger()));
--
2.25.4

View file

@ -7,13 +7,13 @@
stdenv.mkDerivation rec {
pname = "littlegptracker";
version = "unstable-2019-04-14";
version = "unstable-2020-11-26";
src = fetchFromGitHub {
owner = "Mdashdotdashn";
repo = "littlegptracker";
rev = "0ed729b46739e3df5e111c6fa4d548fde2d3b891";
sha256 = "1pc6lg2qp6xh7ahs5d5pb63ms4h2dz7ryp3c7mci4g37gbwbsj5b";
rev = "4aca8cd765e1ad586da62decd019e66cb64b45b8";
sha256 = "0f2ip8z5wxk8fvlw47mczsbcrzh4nh1hgw1fwf5gjrqnzm8v111x";
};
buildInputs = [
@ -26,9 +26,6 @@ stdenv.mkDerivation rec {
# Remove outdated (pre-64bit) checks that would fail on modern platforms
# (see description in patch file)
./0001-Remove-coherency-checks.patch
# Set starting directory to cwd, default is in /nix/store and causes a crash
# (see description in patch file)
./0002-Set-the-initial-directory-to-the-current-directory.patch
];
preBuild = "cd projects";

View file

@ -2,13 +2,13 @@
pythonPackages.buildPythonApplication rec {
pname = "mopidy-musicbox-webclient";
version = "2.4.0";
version = "3.1.0";
src = fetchFromGitHub {
owner = "pimusicbox";
repo = "mopidy-musicbox-webclient";
rev = "v${version}";
sha256 = "0784s32pap9rbki3f0f7swaf6946sdv4xzidns13jmw9ilifk5z4";
sha256 = "1lzarazq67gciyn6r8cdms0f7j0ayyfwhpf28z93ydb280mfrrb9";
};
propagatedBuildInputs = [ mopidy ];
@ -18,6 +18,7 @@ pythonPackages.buildPythonApplication rec {
meta = with stdenv.lib; {
description = "Mopidy extension for playing music from SoundCloud";
license = licenses.mit;
broken = stdenv.isDarwin;
maintainers = [ maintainers.spwhitt ];
};
}

View file

@ -30,7 +30,7 @@ stdenv.mkDerivation rec {
];
meta = with stdenv.lib; {
homepage = "https://www.muse-sequencer.org/";
homepage = "https://muse-sequencer.github.io/";
description = "MIDI/Audio sequencer with recording and editing capabilities";
longDescription = ''
MusE is a MIDI/Audio sequencer with recording and editing capabilities

View file

@ -11,11 +11,11 @@
stdenv.mkDerivation rec {
pname = "ocenaudio";
version = "3.9.5";
version = "3.9.6";
src = fetchurl {
url = "https://www.ocenaudio.com/downloads/index.php/ocenaudio_debian9_64.deb?version=${version}";
sha256 = "13hvdfydlgp2qf49ddhdzghz5jkyx1rhnsj8sf8khfxf9k8phkjd";
sha256 = "07r49133kk99ya4grwby3admy892mkk9cfxz3wh0v81aznhpw4jg";
};

View file

@ -8,13 +8,13 @@
stdenv.mkDerivation rec {
pname = "pt2-clone";
version = "1.24";
version = "1.25_fix";
src = fetchFromGitHub {
owner = "8bitbubsy";
repo = "pt2-clone";
rev = "v${version}";
sha256 = "0lw18943dqgydgl4byk440j016m486s82k6hhqjn3w75108b7w1r";
sha256 = "1slv8qjxsj67z6984nl67g53mq0sdls2cbikvfjmgmad1wkh98ma";
};
nativeBuildInputs = [ cmake ];
@ -29,7 +29,9 @@ stdenv.mkDerivation rec {
homepage = "https://16-bits.org/pt2.php";
license = licenses.bsd3;
maintainers = with maintainers; [ fgaz ];
platforms = platforms.all;
# From HOW-TO-COMPILE.txt:
# > This code is NOT big-endian compatible
platforms = platforms.littleEndian;
};
}

View file

@ -4,11 +4,11 @@
with stdenv.lib;
stdenv.mkDerivation rec {
pname = "clightning";
version = "0.9.1";
version = "0.9.2";
src = fetchurl {
url = "https://github.com/ElementsProject/lightning/releases/download/v${version}/clightning-v${version}.zip";
sha256 = "4923e2fa001cfc2403d1bed368710499d5def322e6384b8eea2bd39d3351a417";
sha256 = "022fw6rbn0chg0432h9q05w8qnys0hd9hf1qm2qlnnmamxw4dyfy";
};
enableParallelBuilding = true;

View file

@ -4,11 +4,11 @@ cups, vivaldi-ffmpeg-codecs, libpulseaudio, at-spi2-core }:
stdenv.mkDerivation rec {
pname = "exodus";
version = "20.11.10";
version = "20.11.21";
src = fetchurl {
url = "https://downloads.exodus.io/releases/${pname}-linux-x64-${version}.zip";
sha256 = "1a7qrh5mdkqpz5cpk5jdq0s2cfrvn7ja76r5cmhs70ba1xnzd8rq";
sha256 = "1q6sh2jhngvihkxjprkcd1php6r7m6qkxsijx8d3azzlgj9nbf2n";
};
sourceRoot = ".";

View file

@ -2,12 +2,12 @@
let
pname = "ledger-live-desktop";
version = "2.16.0";
version = "2.17.1";
name = "${pname}-${version}";
src = fetchurl {
url = "https://github.com/LedgerHQ/${pname}/releases/download/v${version}/${pname}-${version}-linux-x86_64.AppImage";
sha256 = "16z2cy41vxbrvjblj09in6669pks1p9y3rgx8b7afjwf102ba9yi";
sha256 = "1r0cl4jfgg0b3zr46bh9dhhg2qgsh3xj99w3ryyjdxydfvychvz8";
};
appimageContents = appimageTools.extractType2 {
@ -30,8 +30,7 @@ in appimageTools.wrapType2 rec {
description = "Wallet app for Ledger Nano S and Ledger Blue";
homepage = "https://www.ledger.com/live";
license = licenses.mit;
maintainers = with maintainers; [ thedavidmeister nyanloutre RaghavSood ];
maintainers = with maintainers; [ thedavidmeister nyanloutre RaghavSood th0rgal ];
platforms = [ "x86_64-linux" ];
};
}

View file

@ -2,13 +2,13 @@
buildGoModule rec {
pname = "turbo-geth";
version = "2020.11.03";
version = "2020.11.04";
src = fetchFromGitHub {
owner = "ledgerwatch";
repo = pname;
rev = "v${version}";
sha256 = "0fhfrk0k8w1mx4kf81kyirdpa91fm4g5pnvhr9cybrvygc4yx1f7";
sha256 = "1iidj7cvpazk2v419l6k7h67rkx0mni3fcxfjpwrp0815fy1c2ri";
};
vendorSha256 = "16vawkky612zf45d8dhipjmhrprmi28z9wdcnjy07x3bxdyfbhfr";

View file

@ -355,9 +355,6 @@ rec {
url = "https://download.jboss.org/drools/release/${version}/droolsjbpm-tools-distribution-${version}.zip";
sha512 = "2qzc1iszqfrfnw8xip78n3kp6hlwrvrr708vlmdk7nv525xhs0ssjaxriqdhcr0s6jripmmazxivv3763rnk2bfkh31hmbnckpx4r3m";
extraPostFetch = ''
# work around https://github.com/NixOS/nixpkgs/issues/38649
chmod go-w $out;
# update site is a couple levels deep, alongside some other irrelevant stuff
cd $out;
find . -type f -not -path ./binaries/org.drools.updatesite/\* -exec rm {} \;

View file

@ -39,7 +39,7 @@ stdenv.mkDerivation {
configureFlags = [ "--ioctl=termios" ];
meta = {
homepage = "http://elvis.vi-editor.org/";
homepage = "http://elvis.the-little-red-haired-girl.org/";
description = "A vi clone for Unix and other operating systems";
license = stdenv.lib.licenses.free;
};

View file

@ -1,11 +1,12 @@
{ stdenv, fetchurl }:
stdenv.mkDerivation {
name = "prolog-mode-1.25";
pname = "prolog-mode";
version = "1.28";
src = fetchurl {
url = "http://bruda.ca/_media/emacs/prolog.el";
sha256 = "0hfd2dr3xc5qxgvc08nkb2l5a05hfldahdc6ymi9vd8798cc46yh";
sha256 = "oCMzks4xuor8Il8Ll8PXh1zIvMl5qN0RCFJ9yKiHOHU=";
};
buildCommand = ''
@ -17,8 +18,5 @@ stdenv.mkDerivation {
homepage = "http://bruda.ca/emacs/prolog_mode_for_emacs/";
description = "Prolog mode for Emacs";
license = stdenv.lib.licenses.gpl2Plus;
# Has wrong sha256
broken = true;
};
}

View file

@ -2,13 +2,13 @@
buildGoModule rec {
pname = "glow";
version = "1.2.0";
version = "1.2.1";
src = fetchFromGitHub {
owner = "charmbracelet";
repo = "glow";
rev = "v${version}";
sha256 = "0gwzf2p67s0nsb7my5njcz4znlfl62s9gg7x9ywbk9jzsr9avkhv";
sha256 = "1jf9d8zwhvg9pc5g29lwz2r0lc59h1smwb5mjswxlvljpgbj7jwh";
};
vendorSha256 = "1p50qr7hbc8vyifa23z7xr43b4fpmwdzg7hqs503c124kpbpk45z";

View file

@ -90,7 +90,7 @@ let
It allows you to quickly migrate and refactor relational databases,
construct efficient, statically checked SQL queries and much more.
'';
maintainers = with maintainers; [ loskutov ];
maintainers = with maintainers; [ ];
platforms = platforms.linux;
};
});
@ -268,12 +268,12 @@ in
clion = buildClion rec {
name = "clion-${version}";
version = "2020.2.4"; /* updated by script */
version = "2020.2.5"; /* updated by script */
description = "C/C++ IDE. New. Intelligent. Cross-platform";
license = stdenv.lib.licenses.unfree;
src = fetchurl {
url = "https://download.jetbrains.com/cpp/CLion-${version}.tar.gz";
sha256 = "0xkra8l3ga8qsmzbvfisn99lxm5wxa8c4d4jzljjwn8855bs20a3"; /* updated by script */
sha256 = "0j7gxh8wqshn2i1f22bl9099sx8a4092qwkp4fwny4649rbkfyrz"; /* updated by script */
};
wmClass = "jetbrains-clion";
update-channel = "CLion RELEASE"; # channel's id as in http://www.jetbrains.com/updates/updates.xml
@ -281,12 +281,12 @@ in
datagrip = buildDataGrip rec {
name = "datagrip-${version}";
version = "2020.2.3"; /* updated by script */
version = "2020.3"; /* updated by script */
description = "Your Swiss Army Knife for Databases and SQL";
license = stdenv.lib.licenses.unfree;
src = fetchurl {
url = "https://download.jetbrains.com/datagrip/${name}.tar.gz";
sha256 = "0iv1zmdpbqk8f4cjd6dhgj9mrvxli4dg83jzkhv566sy8wrrx7kb"; /* updated by script */
sha256 = "1j0mlsiqh80mspi2x9mi0h5hxhg5gw6395hyl9w33q8dxm95mx2d"; /* updated by script */
};
wmClass = "jetbrains-datagrip";
update-channel = "DataGrip RELEASE";
@ -307,12 +307,12 @@ in
idea-community = buildIdea rec {
name = "idea-community-${version}";
version = "2020.2.3"; /* updated by script */
version = "2020.2.4"; /* updated by script */
description = "Integrated Development Environment (IDE) by Jetbrains, community edition";
license = stdenv.lib.licenses.asl20;
src = fetchurl {
url = "https://download.jetbrains.com/idea/ideaIC-${version}.tar.gz";
sha256 = "092swkz7l1p3asrna6fxj6j324sh7pdbgzrlapdwka8kq9y40ajz"; /* updated by script */
sha256 = "1rlw01aq6ci46xv4d4877k30309jjws29kwhriy98xf804msyzyb"; /* updated by script */
};
wmClass = "jetbrains-idea-ce";
update-channel = "IntelliJ IDEA RELEASE";
@ -320,12 +320,12 @@ in
idea-ultimate = buildIdea rec {
name = "idea-ultimate-${version}";
version = "2020.2.3"; /* updated by script */
version = "2020.2.4"; /* updated by script */
description = "Integrated Development Environment (IDE) by Jetbrains, requires paid license";
license = stdenv.lib.licenses.unfree;
src = fetchurl {
url = "https://download.jetbrains.com/idea/ideaIU-${version}-no-jbr.tar.gz";
sha256 = "1416ikna169d2hx77yd0bb8hpxkpnf27jgyq5yrgla1w6h1fp1p0"; /* updated by script */
sha256 = "05qr8jiasqxmkgi9v52g7hgpdf7pkkjcp42bbkh1f4zgvq81p5py"; /* updated by script */
};
wmClass = "jetbrains-idea";
update-channel = "IntelliJ IDEA RELEASE";
@ -346,12 +346,12 @@ in
phpstorm = buildPhpStorm rec {
name = "phpstorm-${version}";
version = "2020.2.3"; /* updated by script */
version = "2020.2.4"; /* updated by script */
description = "Professional IDE for Web and PHP developers";
license = stdenv.lib.licenses.unfree;
src = fetchurl {
url = "https://download.jetbrains.com/webide/PhpStorm-${version}.tar.gz";
sha256 = "0bdxmxml6337cdpb2amhdqlvxicng50cgzlnmiw0wqnmwj5ihpih"; /* updated by script */
sha256 = "111dr1a6695msh13cd484yk671jnh2ps6q1k2dl0kmryk9dqnvhd"; /* updated by script */
};
wmClass = "jetbrains-phpstorm";
update-channel = "PhpStorm RELEASE";
@ -359,12 +359,12 @@ in
pycharm-community = buildPycharm rec {
name = "pycharm-community-${version}";
version = "2020.2.3"; /* updated by script */
version = "2020.2.4"; /* updated by script */
description = "PyCharm Community Edition";
license = stdenv.lib.licenses.asl20;
src = fetchurl {
url = "https://download.jetbrains.com/python/${name}.tar.gz";
sha256 = "0wqhcag32fxqxg6aml2a3d0rpds0d48rgbcl7cp0ah8xj6x72047"; /* updated by script */
sha256 = "196hhb4n52a50w50awx01ksyl5dkrbdmnz8sb9di5ihni7043p97"; /* updated by script */
};
wmClass = "jetbrains-pycharm-ce";
update-channel = "PyCharm RELEASE";
@ -372,12 +372,12 @@ in
pycharm-professional = buildPycharm rec {
name = "pycharm-professional-${version}";
version = "2020.2.3"; /* updated by script */
version = "2020.2.4"; /* updated by script */
description = "PyCharm Professional Edition";
license = stdenv.lib.licenses.unfree;
src = fetchurl {
url = "https://download.jetbrains.com/python/${name}.tar.gz";
sha256 = "0g7bki4bzi3a1w3rlwik2w0ma10xb4g450qxm4fr4fp8dy2xaysc"; /* updated by script */
sha256 = "0dwd9gvi8n3igza95pil3mf7azxn131830rvfzdvnvrzj9yb2q8l"; /* updated by script */
};
wmClass = "jetbrains-pycharm";
update-channel = "PyCharm RELEASE";
@ -398,12 +398,12 @@ in
ruby-mine = buildRubyMine rec {
name = "ruby-mine-${version}";
version = "2020.2.3"; /* updated by script */
version = "2020.2.4"; /* updated by script */
description = "The Most Intelligent Ruby and Rails IDE";
license = stdenv.lib.licenses.unfree;
src = fetchurl {
url = "https://download.jetbrains.com/ruby/RubyMine-${version}.tar.gz";
sha256 = "03f1z7xhz90j9l8xp3il115yvb15kda0i6ba5ndhby7nf52vnphk"; /* updated by script */
sha256 = "0bpkl8phc16yjm7qjfbg42rm7sbfwbrjva7w0qiwiw9ibwvs90id"; /* updated by script */
};
wmClass = "jetbrains-rubymine";
update-channel = "RubyMine RELEASE";
@ -411,12 +411,12 @@ in
webstorm = buildWebStorm rec {
name = "webstorm-${version}";
version = "2020.2.3"; /* updated by script */
version = "2020.2.4"; /* updated by script */
description = "Professional IDE for Web and JavaScript development";
license = stdenv.lib.licenses.unfree;
src = fetchurl {
url = "https://download.jetbrains.com/webstorm/WebStorm-${version}.tar.gz";
sha256 = "1c60k38ai63s4779fs55vaiswfc6bi7ki6p96hrmmkrnpzgsipg5"; /* updated by script */
sha256 = "0l97nk9psb8g0sxm148fcz0x2v9mwqblffigrz2rmac3gd275s7f"; /* updated by script */
};
wmClass = "jetbrains-webstorm";
update-channel = "WebStorm RELEASE";

View file

@ -17,7 +17,7 @@ stdenv.mkDerivation {
'';
meta = with stdenv.lib; {
description = "Ease navigation between opened buffers in Kakoune";
description = "Case convention conversion for Kakoune";
homepage = "https://gitlab.com/FlyingWombat/case.kak";
license = licenses.unlicense;
maintainers = with maintainers; [ eraserhd ];

View file

@ -1,12 +1,12 @@
{ stdenv, fetchFromGitHub }:
stdenv.mkDerivation {
name = "kak-auto-pairs";
version = "2019-07-27";
version = "2020-07-14";
src = fetchFromGitHub {
owner = "alexherbo2";
repo = "auto-pairs.kak";
rev = "886449b1a04d43e5deb2f0ef4b1aead6084c7a5f";
sha256 = "0knfhdvslzw1f1r1k16733yhkczrg3yijjz6n2qwira84iv3239j";
rev = "5b4b3b723c34c8b7f40cee60868204974349bf9f";
sha256 = "1wgrv03f1lkzflbbaz8n23glij5rvfxf8pcqysd668mbx1hcrk9i";
};
installPhase = ''

View file

@ -6,13 +6,13 @@
mkDerivation rec {
pname = "sigil";
version = "1.4.0";
version = "1.4.2";
src = fetchFromGitHub {
repo = "Sigil";
owner = "Sigil-Ebook";
rev = version;
sha256 = "1vywybnx2zy75mkx647fhq4xvh5k64b33w69hdjw2v7jz27h4sab";
sha256 = "1vn444ax5af1gbhkm9lz46jc7zi4grf16cb4wqyb6hvgj2gbl0iw";
};
pythonPath = with python3Packages; [ lxml ];

View file

@ -3,13 +3,13 @@
mkDerivation rec {
pname = "qmapshack";
version = "1.15.0";
version = "1.15.1";
src = fetchFromGitHub {
owner = "Maproom";
repo = pname;
rev = "V_${version}";
sha256 = "157bssrbwcc1w58b0v60jb3wrjf2ig4z6z6crjnpvflkqj5p8vwy";
sha256 = "1q8qczp9bgk3dzdswb1x64fcn3xg339s0yx31nablb518hcb8jkr";
};
nativeBuildInputs = [ cmake ];
@ -22,8 +22,6 @@ mkDerivation rec {
"-DLIBQUAZIP_LIBRARY=${quazip}/lib/libquazip.so"
];
enableParallelBuilding = true;
patches = [
"${src}/FindPROJ4.patch"
"${src}/FindQuaZip5.patch"
@ -36,7 +34,7 @@ mkDerivation rec {
meta = with lib; {
homepage = "https://github.com/Maproom/qmapshack";
description = "Consumer grade GIS software";
license = licenses.gpl3;
license = licenses.gpl3Plus;
maintainers = with maintainers; [ dotlambda sikmir ];
platforms = with platforms; linux;
};

View file

@ -1,18 +1,18 @@
{ stdenv, rustPlatform, fetchFromGitHub, Security }:
rustPlatform.buildRustPackage rec {
pname = "whitebox_tools";
version = "1.3.0";
version = "1.4.0";
src = fetchFromGitHub {
owner = "jblindsay";
repo = "whitebox-tools";
rev = "v${version}";
sha256 = "0c9jmfjz6ys65y65zlllv9xvaaavr9jpqc1dc217iywhj07j8k2v";
rev = version;
sha256 = "0s5byn8qyi1bm59j9vhwqaygw5cxipc7wbd3flh7n24nx0s8pr8c";
};
buildInputs = stdenv.lib.optional stdenv.isDarwin Security;
cargoSha256 = "05w2jimmygg7dc93i8bpjpjc5yj5xfpfkjnbbgw2sq4kh06r5ii4";
cargoSha256 = "09rz8f1xyc64qjbj6pgw8jxr2a7chghmdc6sfkbv7hdvx6vg4wvk";
meta = with stdenv.lib; {
description = "An advanced geospatial data analysis platform";

View file

@ -2,7 +2,6 @@
, lib
, fetchFromGitLab
, qmake
, qtbase
, qtcharts
, qtsvg
, marble
@ -12,18 +11,17 @@
mkDerivation rec {
pname = "zombietrackergps";
version = "1.01";
version = "1.03";
src = fetchFromGitLab {
owner = "ldutils-projects";
repo = pname;
rev = "v_${version}";
sha256 = "0h354ydbahy8rpkmzh5ym5bddbl6irjzklpcg6nbkv6apry84d48";
sha256 = "1rmdy6kijmcxamm4mqmz8638xqisijlnpv8mimgxywpf90h9rrwq";
};
buildInputs = [
ldutils
qtbase
qtcharts
qtsvg
marble.dev
@ -49,7 +47,8 @@ mkDerivation rec {
meta = with lib; {
description = "GPS track manager for Qt using KDE Marble maps";
homepage = "https://gitlab.com/ldutils-projects/zombietrackergps";
homepage = "https://www.zombietrackergps.net/ztgps/";
changelog = "https://www.zombietrackergps.net/ztgps/history.html";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ sohalt ];
platforms = platforms.linux;

View file

@ -5,11 +5,11 @@
stdenv.mkDerivation rec {
pname = "avocode";
version = "4.7.0";
version = "4.10.3";
src = fetchurl {
url = "https://media.avocode.com/download/avocode-app/${version}/avocode-${version}-linux.zip";
sha256 = "0kn0422k4vi2qifasnkd0cjf5l6z0rmkqv6l46ygxk3qyykjnqcm";
sha256 = "1ngyd3sfnhf8hpi015pgbms5bspc30lzrpfpw3jp992i4mzcjq0z";
};
libPath = stdenv.lib.makeLibraryPath (with xorg; [

View file

@ -1,7 +0,0 @@
set -e
source $stdenv/setup
unzip $src
mkdir $out
mv batik-* $out/batik

View file

@ -1,25 +1,23 @@
{stdenv, fetchurl, unzip}:
{stdenv, fetchurl}:
stdenv.mkDerivation rec {
pname = "batik";
version = "1.13";
stdenv.mkDerivation {
name = "batik-1.6";
builder = ./builder.sh;
src = fetchurl {
url = "http://tarballs.nixos.org/batik-1.6.zip";
sha256 = "0cf15dspmzcnfda8w5lbsdx28m4v2rpq1dv5zx0r0n99ihqd1sh6";
url = "mirror://apache/xmlgraphics/batik/binaries/batik-bin-${version}.tar.gz";
sha256 = "16sq90nbs6psgm3xz30sbs6r5dnpd3qzsvr1xvnp4yipwjcmhmkw";
};
buildInputs = [unzip];
meta = with stdenv.lib; {
description = "Java based toolkit for handling SVG";
homepage = "https://xmlgraphics.apache.org/batik";
license = licenses.asl20;
platforms = platforms.unix;
knownVulnerabilities = [
# vulnerabilities as of 16th October 2018 from https://xmlgraphics.apache.org/security.html:
"CVE-2018-8013"
"CVE-2017-5662"
"CVE-2015-0250"
];
};
installPhase = ''
mkdir $out
cp -r * $out/
'';
}

View file

@ -21,13 +21,13 @@
stdenv.mkDerivation rec {
pname = "fondo";
version = "1.3.9";
version = "1.3.10";
src = fetchFromGitHub {
owner = "calo001";
repo = pname;
rev = version;
sha256 = "1gyi80j2c38j62miv8a8nsx1pad169sa4fx0b85m2yv0x7fz492w";
sha256 = "0yrbcngmwhn5gl5if9w2cx8shh33zk5fd6iqwnapsq8y0lzq6ppr";
};
nativeBuildInputs = [

View file

@ -5,11 +5,11 @@
stdenv.mkDerivation rec {
pname = "geeqie";
version = "1.4";
version = "1.5.1";
src = fetchurl {
url = "http://geeqie.org/${pname}-${version}.tar.xz";
sha256 = "0ciygvcxb78pqg59r6p061mkbpvkgv2rv3r79j3kgv3kalb3ln2w";
sha256 = "02m1vqaasin249xx792cdj11xyag8lnanwzxd108y7y34g9xam28";
};
patches = [
@ -19,12 +19,6 @@ stdenv.mkDerivation rec {
url = "https://src.fedoraproject.org/rpms/geeqie/raw/132fb04a1a5e74ddb333d2474f7edb9a39dc8d27/f/geeqie-1.4-goodbye-changelog.patch";
sha256 = "00a35dds44kjjdqsbbfk0x9y82jspvsbpm2makcm1ivzlhjjgszn";
})
# Fixes build with exiv2 0.27.1
(fetchpatch {
name = "geeqie-exiv2-0.27.patch";
url = "https://git.archlinux.org/svntogit/packages.git/plain/trunk/geeqie-exiv2-0.27.patch?h=packages/geeqie&id=dee28a8b3e9039b9cd6927b5a93ef2a07cd8271d";
sha256 = "05skpbyp8pcq92psgijyccc8liwfy2cpwprw6m186pf454yb5y9p";
})
];
preConfigure = "./autogen.sh";
@ -32,6 +26,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ pkgconfig autoconf automake gettext intltool
wrapGAppsHook
];
buildInputs = [
gtk3 lcms2 exiv2 libchamplain clutter-gtk ffmpegthumbnailer fbida
];
@ -63,7 +58,7 @@ stdenv.mkDerivation rec {
homepage = "http://geeqie.sourceforge.net";
maintainers = with maintainers; [ jfrankenau pSub ];
maintainers = with maintainers; [ jfrankenau pSub markus1189 ];
platforms = platforms.gnu ++ platforms.linux;
};
}

View file

@ -6,7 +6,7 @@
stdenv.mkDerivation rec {
pname = "lightburn";
version = "0.9.18";
version = "0.9.19";
nativeBuildInputs = [
p7zip
@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
src = fetchurl {
url = "https://github.com/LightBurnSoftware/deployment/releases/download/${version}/LightBurn-Linux64-v${version}.7z";
sha256 = "0inl6zmc1726gmj85jbvq3ra4zphd2ikhrnqphgy2b0c72yh4pf7";
sha256 = "0j3ydivd666fphmgi3ar48xabgi2dcky7p2fyfl7ghxjplflqs9q";
};
buildInputs = [

View file

@ -0,0 +1,99 @@
{ stdenv
, lib
, fetchFromGitHub
, python3
, wrapGAppsHook
, gobject-introspection
, gtk3
, gdk-pixbuf
# Recommended Dependencies:
, unrarSupport ? false
, unrar
, p7zip
, lhasa
, mupdf
}:
python3.pkgs.buildPythonApplication rec {
pname = "mcomix3";
version = "unstable-2020-11-23";
# fetch from github because no official release on pypi/github and no build system
src = fetchFromGitHub {
repo = "${pname}";
owner = "multiSnow";
rev = "cdcb27533dc7ee2ebf7b0a8ab5ba10e61c0b8ff8";
sha256 = "0q9xgl60ryf7qmy5vgzgfry4rvw5j9rb4d1ilxmpjmvm7dd3fm2k";
};
buildInputs = [ gobject-introspection gtk3 gdk-pixbuf ];
nativeBuildInputs = [ wrapGAppsHook ];
propagatedBuildInputs = (with python3.pkgs; [ pillow pygobject3 pycairo ]);
format = "other";
# Correct wrapper behavior, see https://github.com/NixOS/nixpkgs/issues/56943
# until https://github.com/NixOS/nixpkgs/pull/102613
strictDeps = false;
preInstall = ''
libdir=$out/lib/${python3.libPrefix}/site-packages
mkdir -p $out/share/{icons/hicolor,man/man1,applications,metainfo,thumbnailers}
mkdir -p $out/bin $libdir
'';
installPhase = ''
runHook preInstall
${python3.executable} installer.py --srcdir=mcomix --target=$libdir
mv $libdir/mcomix/mcomixstarter.py $out/bin/${pname}
mv $libdir/mcomix/comicthumb.py $out/bin/comicthumb
mv $libdir/mcomix/mcomix/* $libdir/mcomix
runHook postInstall
'';
postInstall = ''
rmdir $libdir/mcomix/mcomix
cp man/* $out/share/man/man1/
cp -r mime/icons/* $out/share/icons/hicolor/
cp mime/*.desktop $out/share/applications/
cp mime/*.appdata.xml $out/share/metainfo/
cp mime/*.thumbnailer $out/share/thumbnailers/
for folder in $out/share/icons/hicolor/*; do
mkdir $folder/{apps,mimetypes}
mv $folder/*.png $folder/mimetypes
cp $folder/mimetypes/application-x-cbt.png $folder/mimetypes/application-x-cbr.png
cp $folder/mimetypes/application-x-cbt.png $folder/mimetypes/application-x-cbz.png
done
'';
# to prevent double wrapping
dontWrapGApps = true;
preFixup = ''
makeWrapperArgs+=(
"''${gappsWrapperArgs[@]}"
"--prefix" "PATH" ":" "${lib.makeBinPath ([ p7zip lhasa mupdf ] ++ lib.optional (unrarSupport) unrar)}"
)
'';
# real pytests seem to be broken upstream
checkPhase = ''
$out/bin/comicthumb --help > /dev/null
$out/bin/${pname} --help > /dev/null
'';
meta = with stdenv.lib; {
description = "Comic book reader and image viewer; python3 fork of mcomix";
longDescription = ''
User-friendly, customizable image viewer, specifically designed to handle
comic books and manga supporting a variety of container formats
(including CBR, CBZ, CB7, CBT, LHA and PDF)
'';
homepage = "https://github.com/multiSnow/mcomix3";
changelog = "https://github.com/multiSnow/mcomix3/blob/gtk3/ChangeLog";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ confus ];
platforms = platforms.all;
};
}

View file

@ -0,0 +1,13 @@
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 9b48beea..078ba20d 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -603,7 +603,7 @@ ENDIF(APPLE)
#
# photoflow executable
#
-add_executable(photoflow main.cc ${RESOURCE_OBJECT})
+add_executable(photoflow main.cc version.cc ${RESOURCE_OBJECT})
IF(APPLE)
set_target_properties(photoflow PROPERTIES LINK_FLAGS " -framework ApplicationServices ")
ENDIF(APPLE)

View file

@ -1,42 +1,75 @@
{ stdenv, fetchFromGitHub, gettext, glib, libxml2, pkgconfig, swig, automake, gobject-introspection, cmake, ninja, libtiff, libjpeg, fftw, exiv2, lensfun, gtkmm2, libraw, lcms2, libexif, vips, expat, pcre, pugixml }:
{ automake
, cmake
, exiv2
, expat
, fetchFromGitHub
, fftw
, fftwFloat
, gettext
, glib
, gobject-introspection
, gtkmm2
, lcms2
, lensfun
, libexif
, libiptcdata
, libjpeg
, libraw
, libtiff
, libxml2
, ninja
, openexr
, pcre
, pkgconfig
, pugixml
, stdenv
, swig
, vips
}:
stdenv.mkDerivation {
name = "photoflow-unstable-2018-08-28";
stdenv.mkDerivation rec {
pname = "photoflow";
version = "2020-08-28";
src = fetchFromGitHub {
owner = "aferrero2707";
repo = "PhotoFlow";
rev = "df03f2538ddd232e693c307db4ab63eb5bdfea38";
sha256 = "08ybhv08h24y4li8wb4m89xgrz1szlwpksf6vjharp8cznn4y4x9";
repo = pname;
rev = "8472024fb91175791e0eb23c434c5b58ecd250eb";
sha256 = "1bq4733hbh15nwpixpyhqfn3bwkg38amdj2xc0my0pii8l9ln793";
};
patches = [ ./CMakeLists.patch ];
nativeBuildInputs = [
automake
cmake
gettext
glib
gobject-introspection
libxml2
ninja
pkgconfig
swig
automake
gobject-introspection
cmake
ninja
];
buildInputs = [
libtiff
libjpeg
fftw
exiv2
lensfun
expat
fftw
fftwFloat
gtkmm2 # Could be build with gtk3 but proper UI theme is missing and therefore not very usable with gtk3
# See: https://discuss.pixls.us/t/help-needed-for-gtk3-theme/5803
libraw
lcms2
lensfun
libexif
vips
expat
libiptcdata
libjpeg
libraw
libtiff
openexr
pcre
pugixml
vips
];
cmakeFlags = [
@ -51,6 +84,7 @@ stdenv.mkDerivation {
license = licenses.gpl3Plus;
maintainers = [ maintainers.MtP ];
platforms = platforms.linux;
broken = true;
# sse3 is not supported on aarch64
badPlatforms = [ "aarch64-linux" ];
};
}

View file

@ -0,0 +1,28 @@
{ stdenv, fetchsvn, xorg }:
stdenv.mkDerivation {
pname = "xlife";
version = "6.7.5";
src = fetchsvn {
url = "https://svn.code.sf.net/p/xlife-cal/xlife/trunk";
rev = "365";
sha256 = "1gadlcp32s179kd7ypxr8cymd6s060p6z4c2vnx94i8bmiw3nn8h";
};
nativeBuildInputs = with xorg; [ imake gccmakedep ];
buildInputs = [ xorg.libX11 ];
hardeningDisable = [ "format" ];
installPhase = ''
install -Dm755 xlife -t $out/bin
install -Dm755 lifeconv -t $out/bin
'';
meta = with stdenv.lib; {
homepage = "http://litwr2.atspace.eu/xlife.php";
description = "Conway's Game of Life and other cellular automata, for X";
license = licenses.hpndSellVariant;
maintainers = with maintainers; [ djanatyn ];
};
}

View file

@ -35,6 +35,5 @@ stdenv.mkDerivation rec {
description = "A powerful desktop application that can be used to quickly and effectively generate high-quality diagrams";
platforms = jre.meta.platforms;
maintainers = with maintainers; [ abbradar ];
broken = !("gtk3" ? jre);
};
}

View file

@ -1,6 +1,6 @@
{
mkDerivation, lib, kdepimTeam,
extra-cmake-modules, shared-mime-info,
extra-cmake-modules, shared-mime-info, qtbase,
boost, kcompletion, kconfigwidgets, kcrash, kdbusaddons, kdesignerplugin,
ki18n, kiconthemes, kio, kitemmodels, kwindowsystem, mysql, qttools,
}:
@ -10,6 +10,7 @@ mkDerivation {
meta = {
license = [ lib.licenses.lgpl21 ];
maintainers = kdepimTeam;
broken = lib.versionOlder qtbase.version "5.13";
};
patches = [
./0001-akonadi-paths.patch

View file

@ -8,6 +8,7 @@ mkDerivation {
meta = {
license = with lib.licenses; [ lgpl21 ];
maintainers = [ lib.maintainers.bkchr ];
broken = lib.versionOlder qtbase.version "5.13";
};
nativeBuildInputs = [ extra-cmake-modules shared-mime-info ];
buildInputs = [ qtbase karchive ];

View file

@ -1,24 +1,26 @@
diff a/build_files/cmake/platform/platform_apple.cmake b/build_files/cmake/platform/platform_apple.cmake
--- a/build_files/cmake/platform/platform_apple.cmake
+++ b/build_files/cmake/platform/platform_apple.cmake
@@ -35,7 +35,6 @@ else()
@@ -80,7 +80,6 @@ else()
message(STATUS "Using pre-compiled LIBDIR: ${LIBDIR}")
endif()
if(NOT EXISTS "${LIBDIR}/")
- message(FATAL_ERROR "Mac OSX requires pre-compiled libs at: '${LIBDIR}'")
endif()
if(WITH_OPENAL)
@@ -86,7 +85,7 @@ endif()
if(WITH_CODEC_SNDFILE)
set(LIBSNDFILE ${LIBDIR}/sndfile)
set(LIBSNDFILE_INCLUDE_DIRS ${LIBSNDFILE}/include)
- set(LIBSNDFILE_LIBRARIES sndfile FLAC ogg vorbis vorbisenc)
+ set(LIBSNDFILE_LIBRARIES sndfile)
set(LIBSNDFILE_LIBPATH ${LIBSNDFILE}/lib ${LIBDIR}/ffmpeg/lib) # TODO, deprecate
endif()
# -------------------------------------------------------------------------
@@ -112,10 +111,6 @@ if(WITH_CODEC_SNDFILE)
find_library(_sndfile_VORBIS_LIBRARY NAMES vorbis HINTS ${LIBDIR}/ffmpeg/lib)
find_library(_sndfile_VORBISENC_LIBRARY NAMES vorbisenc HINTS ${LIBDIR}/ffmpeg/lib)
list(APPEND LIBSNDFILE_LIBRARIES
- ${_sndfile_FLAC_LIBRARY}
- ${_sndfile_OGG_LIBRARY}
- ${_sndfile_VORBIS_LIBRARY}
- ${_sndfile_VORBISENC_LIBRARY}
)
@@ -97,7 +96,7 @@ if(WITH_PYTHON)
print_found_status("SndFile libraries" "${LIBSNDFILE_LIBRARIES}")
@@ -132,7 +127,7 @@ if(WITH_PYTHON)
# normally cached but not since we include them with blender
set(PYTHON_INCLUDE_DIR "${LIBDIR}/python/include/python${PYTHON_VERSION}m")
set(PYTHON_EXECUTABLE "${LIBDIR}/python/bin/python${PYTHON_VERSION}m")
@ -27,40 +29,18 @@ diff a/build_files/cmake/platform/platform_apple.cmake b/build_files/cmake/platf
set(PYTHON_LIBPATH "${LIBDIR}/python/lib/python${PYTHON_VERSION}")
# set(PYTHON_LINKFLAGS "-u _PyMac_Error") # won't build with this enabled
else()
@@ -162,10 +161,7 @@ if(WITH_CODEC_FFMPEG)
set(FFMPEG_INCLUDE_DIRS ${FFMPEG}/include)
set(FFMPEG_LIBRARIES
@@ -173,9 +168,7 @@ endif()
if(WITH_CODEC_FFMPEG)
set(FFMPEG_FIND_COMPONENTS
avcodec avdevice avformat avutil
- mp3lame swscale x264 xvidcore
- theora theoradec theoraenc
- vorbis vorbisenc vorbisfile ogg opus
- vpx swresample)
+ swscale swresample)
set(FFMPEG_LIBPATH ${FFMPEG}/lib)
- mp3lame ogg opus swresample swscale
- theora theoradec theoraenc vorbis vorbisenc
- vorbisfile vpx x264 xvidcore)
+ swresample swscale)
find_package(FFmpeg)
endif()
@@ -206,14 +202,14 @@ if(WITH_OPENCOLLADA)
set(OPENCOLLADA ${LIBDIR}/opencollada)
set(OPENCOLLADA_INCLUDE_DIRS
- ${LIBDIR}/opencollada/include/COLLADAStreamWriter
- ${LIBDIR}/opencollada/include/COLLADABaseUtils
- ${LIBDIR}/opencollada/include/COLLADAFramework
- ${LIBDIR}/opencollada/include/COLLADASaxFrameworkLoader
- ${LIBDIR}/opencollada/include/GeneratedSaxParser
+ ${LIBDIR}/opencollada/include/opencollada/COLLADAStreamWriter
+ ${LIBDIR}/opencollada/include/opencollada/COLLADABaseUtils
+ ${LIBDIR}/opencollada/include/opencollada/COLLADAFramework
+ ${LIBDIR}/opencollada/include/opencollada/COLLADASaxFrameworkLoader
+ ${LIBDIR}/opencollada/include/opencollada/GeneratedSaxParser
)
- set(OPENCOLLADA_LIBPATH ${OPENCOLLADA}/lib)
+ set(OPENCOLLADA_LIBPATH ${OPENCOLLADA}/lib/opencollada)
set(OPENCOLLADA_LIBRARIES
OpenCOLLADASaxFrameworkLoader
-lOpenCOLLADAFramework
@@ -277,14 +273,13 @@ if(WITH_BOOST)
@@ -266,7 +259,6 @@ if(WITH_BOOST)
endif()
if(WITH_INTERNATIONAL OR WITH_CODEC_FFMPEG)
@ -68,25 +48,8 @@ diff a/build_files/cmake/platform/platform_apple.cmake b/build_files/cmake/platf
endif()
if(WITH_OPENIMAGEIO)
set(OPENIMAGEIO ${LIBDIR}/openimageio)
set(OPENIMAGEIO_INCLUDE_DIRS ${OPENIMAGEIO}/include)
set(OPENIMAGEIO_LIBRARIES
- ${OPENIMAGEIO}/lib/libOpenImageIO.a
+ ${OPENIMAGEIO}/lib/libOpenImageIO.dylib
${PNG_LIBRARIES}
${JPEG_LIBRARIES}
${TIFF_LIBRARY}
@@ -307,7 +302,7 @@ endif()
if(WITH_OPENCOLORIO)
set(OPENCOLORIO ${LIBDIR}/opencolorio)
set(OPENCOLORIO_INCLUDE_DIRS ${OPENCOLORIO}/include)
- set(OPENCOLORIO_LIBRARIES OpenColorIO tinyxml yaml-cpp)
+ set(OPENCOLORIO_LIBRARIES OpenColorIO)
set(OPENCOLORIO_LIBPATH ${OPENCOLORIO}/lib)
endif()
@@ -443,7 +438,7 @@ else()
set(CMAKE_CXX_FLAGS_RELEASE "-mdynamic-no-pic -fno-strict-aliasing")
@@ -439,7 +431,7 @@ else()
set(CMAKE_CXX_FLAGS_RELEASE "-O2 -mdynamic-no-pic")
endif()
-if(${XCODE_VERSION} VERSION_EQUAL 5 OR ${XCODE_VERSION} VERSION_GREATER 5)

View file

@ -1,4 +1,4 @@
{ config, stdenv, lib, fetchurl, boost, cmake, ffmpeg_3, gettext, glew
{ config, stdenv, lib, fetchurl, boost, cmake, ffmpeg, gettext, glew
, ilmbase, libXi, libX11, libXext, libXrender
, libjpeg, libpng, libsamplerate, libsndfile
, libtiff, libGLU, libGL, openal, opencolorio, openexr, openimagedenoise, openimageio2, openjpeg, python3Packages
@ -8,8 +8,8 @@
, cudaSupport ? config.cudaSupport or false, cudatoolkit
, colladaSupport ? true, opencollada
, makeWrapper
, pugixml, SDL, Cocoa, CoreGraphics, ForceFeedback, OpenAL, OpenGL
, embree
, pugixml, llvmPackages, SDL, Cocoa, CoreGraphics, ForceFeedback, OpenAL, OpenGL
, embree, gmp
}:
with lib;
@ -18,18 +18,18 @@ let python = python3Packages.python; in
stdenv.mkDerivation rec {
pname = "blender";
version = "2.90.1";
version = "2.91.0";
src = fetchurl {
url = "https://download.blender.org/source/${pname}-${version}.tar.xz";
sha256 = "169xcmm1zkvab14qdxggqc758xdkqs7r7imwi6yx2fl2djacr3g7";
sha256 = "0x396lgmk0dq9115yrc36s8zwxzmjr490sr5n2y6w27y17yllyjm";
};
patches = lib.optional stdenv.isDarwin ./darwin.patch;
nativeBuildInputs = [ cmake ] ++ optional cudaSupport addOpenGLRunpath;
buildInputs =
[ boost ffmpeg_3 gettext glew ilmbase
[ boost ffmpeg gettext glew ilmbase
freetype libjpeg libpng libsamplerate libsndfile libtiff
opencolorio openexr openimagedenoise openimageio2 openjpeg python zlib fftw jemalloc
alembic
@ -37,6 +37,7 @@ stdenv.mkDerivation rec {
tbb
makeWrapper
embree
gmp
]
++ (if (!stdenv.isDarwin) then [
libXi libX11 libXext libXrender
@ -46,7 +47,7 @@ stdenv.mkDerivation rec {
openvdb
]
else [
pugixml SDL Cocoa CoreGraphics ForceFeedback OpenAL OpenGL
pugixml llvmPackages.openmp SDL Cocoa CoreGraphics ForceFeedback OpenAL OpenGL
])
++ optional jackaudioSupport libjack2
++ optional cudaSupport cudatoolkit
@ -60,7 +61,9 @@ stdenv.mkDerivation rec {
: > build_files/cmake/platform/platform_apple_xcode.cmake
substituteInPlace source/creator/CMakeLists.txt \
--replace '${"$"}{LIBDIR}/python' \
'${python}'
'${python}' \
--replace '${"$"}{LIBDIR}/openmp' \
'${llvmPackages.openmp}'
substituteInPlace build_files/cmake/platform/platform_apple.cmake \
--replace 'set(PYTHON_VERSION 3.7)' \
'set(PYTHON_VERSION ${python.pythonVersion})' \
@ -71,15 +74,7 @@ stdenv.mkDerivation rec {
--replace '${"$"}{LIBDIR}/opencollada' \
'${opencollada}' \
--replace '${"$"}{PYTHON_LIBPATH}/site-packages/numpy' \
'${python3Packages.numpy}/${python.sitePackages}/numpy' \
--replace 'set(OPENJPEG_INCLUDE_DIRS ' \
'set(OPENJPEG_INCLUDE_DIRS "'$(echo ${openjpeg.dev}/include/openjpeg-*)'") #' \
--replace 'set(OPENJPEG_LIBRARIES ' \
'set(OPENJPEG_LIBRARIES "${openjpeg}/lib/libopenjp2.dylib") #' \
--replace 'set(OPENIMAGEIO ' \
'set(OPENIMAGEIO "${openimageio2.out}") #' \
--replace 'set(OPENEXR_INCLUDE_DIRS ' \
'set(OPENEXR_INCLUDE_DIRS "${openexr.dev}/include/OpenEXR") #'
'${python3Packages.numpy}/${python.sitePackages}/numpy'
'' else ''
substituteInPlace extern/clew/src/clew.c --replace '"libOpenCL.so"' '"${ocl-icd}/lib/libOpenCL.so"'
'');

View file

@ -2,16 +2,16 @@
buildGoModule rec {
pname = "charm";
version = "0.8.4";
version = "0.8.5";
src = fetchFromGitHub {
owner = "charmbracelet";
repo = "charm";
rev = "v${version}";
sha256 = "0wsh83kchqakvx7kgs2s31rzsvnfr47jk6pbmqzjv1kqmnlhc3rh";
sha256 = "0cgl5dpyzc4lciij9q9yghppiclrdnrl1jsbizfgh2an3s18ab8k";
};
vendorSha256 = "1lg4bbdzgnw50v6m6p7clibwm8m82kdr1jizgbmhfmzy15d5sfll";
vendorSha256 = "1spzawnk2fslc1m14dp8lx4vpnxwz7xgm1hxbpz4bqlqz1hfd6ax";
doCheck = false;

View file

@ -3,13 +3,13 @@
buildGoModule rec {
pname = "cheat";
version = "4.1.1";
version = "4.2.0";
src = fetchFromGitHub {
owner = "cheat";
repo = "cheat";
rev = version;
sha256 = "0mraraby0s213ay2ahqsdvnyg76awbqllrkkx17mrx9z3ykba62d";
sha256 = "sha256-Q/frWu82gB15LEzwYCbJr7k0yZ+AXBvcPWxoevSpeqU=";
};
subPackages = [ "cmd/cheat" ];

View file

@ -1,6 +1,6 @@
{ fetchFromGitHub, fetchpatch, stdenv
, autoreconfHook, intltool, pkgconfig
, gtk3, xdotool, which, wrapGAppsHook }:
, gtk3, libayatana-appindicator, xdotool, which, wrapGAppsHook }:
stdenv.mkDerivation rec {
pname = "clipit";
@ -18,8 +18,8 @@ stdenv.mkDerivation rec {
'';
nativeBuildInputs = [ pkgconfig wrapGAppsHook autoreconfHook intltool ];
configureFlags = [ "--with-gtk3" ];
buildInputs = [ gtk3 ];
configureFlags = [ "--with-gtk3" "--enable-appindicator=yes" ];
buildInputs = [ gtk3 libayatana-appindicator ];
gappsWrapperArgs = [
"--prefix" "PATH" ":" "${stdenv.lib.makeBinPath [ xdotool which ]}"

View file

@ -34,6 +34,7 @@ stdenv.mkDerivation rec {
description = "A map editor for the classic DOOM games, and a few related games such as Heretic and Hexen";
license = licenses.gpl2;
platforms = platforms.all;
broken = stdenv.isDarwin;
maintainers = with maintainers; [ neonfuz ];
};
}

View file

@ -1,7 +1,7 @@
{ stdenv, fetchurl, openssl }:
let
version = "6.4.13";
version = "6.4.14";
in
stdenv.mkDerivation {
pname = "fetchmail";
@ -9,7 +9,7 @@ stdenv.mkDerivation {
src = fetchurl {
url = "mirror://sourceforge/fetchmail/fetchmail-${version}.tar.xz";
sha256 = "1qablzgwx3a516vdhckx3pv716x9r7nyfyr6fbncif861c3cya3x";
sha256 = "1jxxb3qyrh7118fwqa3bhirjh97j2w8r71s8vcb6vp3w1wwhfis2";
};
buildInputs = [ openssl ];

View file

@ -1,27 +1,28 @@
{ lib, python3Packages }:
{ lib, buildPythonApplication, fetchPypi, requests, pytestCheckHook }:
python3Packages.buildPythonApplication rec {
buildPythonApplication rec {
pname = "gallery_dl";
version = "1.15.2";
version = "1.15.4";
src = python3Packages.fetchPypi {
src = fetchPypi {
inherit pname version;
sha256 = "0f2d1ixg0ir7ispxxggv378dc0m55k9y19075swf893maxf07f35";
sha256 = "0byn1ggrb9yg9d29205q312v95jy66qp4z384kys8cmrd3mky111";
};
propagatedBuildInputs = with python3Packages; [ requests ];
propagatedBuildInputs = [ requests ];
checkInputs = with python3Packages; [ pytestCheckHook ];
checkInputs = [ pytestCheckHook ];
pytestFlagsArray = [
# requires network access
"--ignore=test/test_results.py"
"--ignore=test/test_downloader.py"
];
meta = {
meta = with lib; {
description = "Command-line program to download image-galleries and -collections from several image hosting sites";
homepage = "https://github.com/mikf/gallery-dl";
license = lib.licenses.gpl2;
maintainers = with lib.maintainers; [ dawidsowa ];
license = licenses.gpl2;
maintainers = with maintainers; [ dawidsowa ];
platforms = platforms.unix;
};
}

View file

@ -5,7 +5,7 @@
, gettext
, fetchFromGitLab
, python3
, libhandy
, libhandy_0
, libpwquality
, wrapGAppsHook
, gtk3
@ -44,7 +44,7 @@ python3.pkgs.buildPythonApplication rec {
gtk3
glib
gdk-pixbuf
libhandy
libhandy_0
];
propagatedBuildInputs = with python3.pkgs; [

View file

@ -1,14 +1,13 @@
GEM
remote: https://rubygems.org/
specs:
backports (3.18.1)
concurrent-ruby (1.1.7)
crass (1.0.6)
execjs (2.7.0)
ffi (1.13.1)
gemojione (4.3.3)
json
github-markup (3.0.4)
github-markup (3.0.5)
gollum (5.1.1)
gemojione (~> 4.1)
gollum-lib (~> 5.0)
@ -25,7 +24,7 @@ GEM
therubyrhino (~> 2.1.0)
uglifier (~> 3.2)
useragent (~> 0.16.2)
gollum-lib (5.0.5)
gollum-lib (5.0.6)
gemojione (~> 4.1)
github-markup (~> 3.0)
gollum-rugged_adapter (~> 1.0)
@ -42,12 +41,12 @@ GEM
rexml
kramdown-parser-gfm (1.0.1)
kramdown (~> 2.0)
loofah (2.6.0)
loofah (2.8.0)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
mime-types (3.3.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2020.0512)
mime-types-data (3.2020.1104)
mini_portile2 (2.4.0)
multi_json (1.15.0)
mustache (0.99.8)
@ -58,13 +57,13 @@ GEM
octicons (8.5.0)
nokogiri (>= 1.6.3.1)
rack (2.2.3)
rack-protection (2.0.8.1)
rack-protection (2.1.0)
rack
rb-fsevent (0.10.4)
rb-inotify (0.10.1)
ffi (~> 1.0)
rexml (3.2.4)
rouge (3.22.0)
rouge (3.25.0)
rss (0.2.9)
rexml
ruby2_keywords (0.0.2)
@ -74,22 +73,21 @@ GEM
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
sinatra (2.0.8.1)
sinatra (2.1.0)
mustermann (~> 1.0)
rack (~> 2.0)
rack-protection (= 2.0.8.1)
rack (~> 2.2)
rack-protection (= 2.1.0)
tilt (~> 2.0)
sinatra-contrib (2.0.8.1)
backports (>= 2.8.2)
sinatra-contrib (2.1.0)
multi_json
mustermann (~> 1.0)
rack-protection (= 2.0.8.1)
sinatra (= 2.0.8.1)
rack-protection (= 2.1.0)
sinatra (= 2.1.0)
tilt (~> 2.0)
sprockets (3.7.2)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-helpers (1.3.0)
sprockets-helpers (1.4.0)
sprockets (>= 2.2)
therubyrhino (2.1.2)
therubyrhino_jar (>= 1.7.4, < 1.7.9)

View file

@ -1,14 +1,4 @@
{
backports = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "0qagwshq7zyjgm6k53hbrf4gfrwn6qz5d6rrc83cl59q37v68zsc";
type = "gem";
};
version = "3.18.1";
};
concurrent-ruby = {
groups = ["default"];
platforms = [];
@ -65,10 +55,10 @@
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "14991x92v8s60hfqv7162jfmdqa20fifn2bz0km3k5cgi01pf9rs";
sha256 = "0rlq9hnvhhndqskl087xwabbvfbfnrvx8ac79iin35wmzpyagl96";
type = "gem";
};
version = "3.0.4";
version = "3.0.5";
};
gollum = {
dependencies = ["gemojione" "gollum-lib" "kramdown" "kramdown-parser-gfm" "mustache" "octicons" "rss" "sass" "sinatra" "sinatra-contrib" "sprockets" "sprockets-helpers" "therubyrhino" "uglifier" "useragent"];
@ -87,10 +77,10 @@
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "18f3g5px9zznyh6ppqlnjdp1ia8awgrix9lhbfh64rpgxg0b9xlr";
sha256 = "02mc1w4hn9kjrgvg0r46x1bd0h8hq7lqs432dgjfn2dw36kchja4";
type = "gem";
};
version = "5.0.5";
version = "5.0.6";
};
gollum-rugged_adapter = {
dependencies = ["mime-types" "rugged"];
@ -141,10 +131,10 @@
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1s9hq8bpn6g5vqr3nzyirn3agn7x8agan6151zvq5vmkf6rvmyb2";
sha256 = "0ndimir6k3kfrh8qrb7ir1j836l4r3qlwyclwjh88b86clblhszh";
type = "gem";
};
version = "2.6.0";
version = "2.8.0";
};
mime-types = {
dependencies = ["mime-types-data"];
@ -162,10 +152,10 @@
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1z75svngyhsglx0y2f9rnil2j08f9ab54b3l95bpgz67zq2if753";
sha256 = "0ipjyfwn9nlvpcl8knq3jk4g5f12cflwdbaiqxcq1s7vwfwfxcag";
type = "gem";
};
version = "3.2020.0512";
version = "3.2020.1104";
};
mini_portile2 = {
groups = ["default"];
@ -246,10 +236,10 @@
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1zyj97bfr1shfgwk4ddmdbw0mdkm4qdyh9s1hl0k7accf3kxx1yi";
sha256 = "159a4j4kragqh0z0z8vrpilpmaisnlz3n7kgiyf16bxkwlb3qlhz";
type = "gem";
};
version = "2.0.8.1";
version = "2.1.0";
};
rb-fsevent = {
groups = ["default"];
@ -287,10 +277,10 @@
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1wcz7i009wdbymlfsamagqi18m6ih8j60bii0k18f21g70r72i0m";
sha256 = "0yvcv901lrh5rfnk1h4h56hf2m6n9pd6w8n96vag74aakgz3gaxn";
type = "gem";
};
version = "3.22.0";
version = "3.25.0";
};
rss = {
dependencies = ["rexml"];
@ -351,21 +341,21 @@
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "0riy3hwjab1mr73jcqx3brmbmwspnw3d193j06a5f0fy1w35z15q";
sha256 = "0dd53rzpkxgs697pycbhhgc9vcnxra4ly4xar8ni6aiydx2f88zk";
type = "gem";
};
version = "2.0.8.1";
version = "2.1.0";
};
sinatra-contrib = {
dependencies = ["backports" "multi_json" "mustermann" "rack-protection" "sinatra" "tilt"];
dependencies = ["multi_json" "mustermann" "rack-protection" "sinatra" "tilt"];
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1mmrfm4pqh98f3irjpkvfpazhcx6q42bnx6bbms9dqvmck3mid28";
sha256 = "1rl1iiafz51yzjd0vchl2lni7lmwppjql6cn1fnfxbma707qlcja";
type = "gem";
};
version = "2.0.8.1";
version = "2.1.0";
};
sprockets = {
dependencies = ["concurrent-ruby" "rack"];
@ -384,10 +374,10 @@
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "14iq8v16l31bfq7pikfmgcv5x6pkc5lbdmwwg6zlzcy1bibcliar";
sha256 = "0513ma356g05lsskhsb363263177h6ccmp475il0p69y18his2ij";
type = "gem";
};
version = "1.3.0";
version = "1.4.0";
};
therubyrhino = {
dependencies = ["therubyrhino_jar"];

View file

@ -1,5 +1,5 @@
{ fetchFromGitHub, stdenv, fetchpatch, pkgconfig, exiv2, libxml2, gtk3
, libxslt, docbook_xsl, docbook_xml_dtd_42, desktop-file-utils }:
, libxslt, docbook_xsl, docbook_xml_dtd_42, desktop-file-utils, wrapGAppsHook }:
stdenv.mkDerivation rec {
pname = "gpscorrelate";
@ -18,6 +18,7 @@ stdenv.mkDerivation rec {
docbook_xsl
libxslt
pkgconfig
wrapGAppsHook
];
buildInputs = [

View file

@ -2,13 +2,13 @@
mkDerivation rec {
pname = "gpxsee";
version = "7.36";
version = "7.37";
src = fetchFromGitHub {
owner = "tumic0";
repo = "GPXSee";
rev = version;
sha256 = "18vsw6hw6kn5wmr4iarhx1v8q455j60fhf0hq69jkfyarl56b99j";
sha256 = "0fpb43smh0kwic5pdxs46c0hkqj8g084h72pa024x1my6w12y9b8";
};
patches = (substituteAll {

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