Merge branch 'staging-next' into staging
This commit is contained in:
commit
d471c5d1f3
|
@ -132,11 +132,11 @@ buildImage {
|
||||||
<para>
|
<para>
|
||||||
By default <function>buildImage</function> will use a static date of one second past the UNIX Epoch. This allows <function>buildImage</function> to produce binary reproducible images. When listing images with <command>docker images</command>, the newly created images will be listed like this:
|
By default <function>buildImage</function> will use a static date of one second past the UNIX Epoch. This allows <function>buildImage</function> to produce binary reproducible images. When listing images with <command>docker images</command>, the newly created images will be listed like this:
|
||||||
</para>
|
</para>
|
||||||
<screen><![CDATA[
|
<screen>
|
||||||
$ docker images
|
<prompt>$ </prompt>docker images
|
||||||
REPOSITORY TAG IMAGE ID CREATED SIZE
|
REPOSITORY TAG IMAGE ID CREATED SIZE
|
||||||
hello latest 08c791c7846e 48 years ago 25.2MB
|
hello latest 08c791c7846e 48 years ago 25.2MB
|
||||||
]]></screen>
|
</screen>
|
||||||
<para>
|
<para>
|
||||||
You can break binary reproducibility but have a sorted, meaningful <literal>CREATED</literal> column by setting <literal>created</literal> to <literal>now</literal>.
|
You can break binary reproducibility but have a sorted, meaningful <literal>CREATED</literal> column by setting <literal>created</literal> to <literal>now</literal>.
|
||||||
</para>
|
</para>
|
||||||
|
@ -152,11 +152,11 @@ pkgs.dockerTools.buildImage {
|
||||||
]]></programlisting>
|
]]></programlisting>
|
||||||
<para>
|
<para>
|
||||||
and now the Docker CLI will display a reasonable date and sort the images as expected:
|
and now the Docker CLI will display a reasonable date and sort the images as expected:
|
||||||
<screen><![CDATA[
|
<screen>
|
||||||
$ docker images
|
<prompt>$ </prompt>docker images
|
||||||
REPOSITORY TAG IMAGE ID CREATED SIZE
|
REPOSITORY TAG IMAGE ID CREATED SIZE
|
||||||
hello latest de2bf4786de6 About a minute ago 25.2MB
|
hello latest de2bf4786de6 About a minute ago 25.2MB
|
||||||
]]></screen>
|
</screen>
|
||||||
however, the produced images will not be binary reproducible.
|
however, the produced images will not be binary reproducible.
|
||||||
</para>
|
</para>
|
||||||
</example>
|
</example>
|
||||||
|
|
|
@ -38,8 +38,7 @@ buildContainer {
|
||||||
|
|
||||||
readonly = false; <co xml:id='ex-ociTools-buildContainer-3' />
|
readonly = false; <co xml:id='ex-ociTools-buildContainer-3' />
|
||||||
}
|
}
|
||||||
|
</programlisting>
|
||||||
</programlisting>
|
|
||||||
<calloutlist>
|
<calloutlist>
|
||||||
<callout arearefs='ex-ociTools-buildContainer-1'>
|
<callout arearefs='ex-ociTools-buildContainer-1'>
|
||||||
<para>
|
<para>
|
||||||
|
|
|
@ -22,10 +22,10 @@
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
In order to set this up, you first have to <link xlink:href="https://its.uiowa.edu/support/article/102186">download the <literal>.cr</literal> file from the Netscaler Gateway</link>. After that you can configure the <command>selfservice</command> like this:
|
In order to set this up, you first have to <link xlink:href="https://its.uiowa.edu/support/article/102186">download the <literal>.cr</literal> file from the Netscaler Gateway</link>. After that you can configure the <command>selfservice</command> like this:
|
||||||
<screen>
|
<screen>
|
||||||
<prompt>$ </prompt>storebrowse -C ~/Downloads/receiverconfig.cr
|
<prompt>$ </prompt>storebrowse -C ~/Downloads/receiverconfig.cr
|
||||||
<prompt>$ </prompt>selfservice
|
<prompt>$ </prompt>selfservice
|
||||||
</screen>
|
</screen>
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|
|
@ -18,10 +18,13 @@
|
||||||
includes all available plugins. To make use of this functionality, use an
|
includes all available plugins. To make use of this functionality, use an
|
||||||
overlay or directly install an expression that overrides its configuration,
|
overlay or directly install an expression that overrides its configuration,
|
||||||
such as
|
such as
|
||||||
<programlisting>rxvt-unicode.override { configure = { availablePlugins, ... }: {
|
<programlisting>
|
||||||
|
rxvt-unicode.override {
|
||||||
|
configure = { availablePlugins, ... }: {
|
||||||
plugins = with availablePlugins; [ perls resize-font vtwheel ];
|
plugins = with availablePlugins; [ perls resize-font vtwheel ];
|
||||||
}
|
};
|
||||||
}</programlisting>
|
}
|
||||||
|
</programlisting>
|
||||||
If the <literal>configure</literal> function returns an attrset without the
|
If the <literal>configure</literal> function returns an attrset without the
|
||||||
<literal>plugins</literal> attribute, <literal>availablePlugins</literal>
|
<literal>plugins</literal> attribute, <literal>availablePlugins</literal>
|
||||||
will be used automatically.
|
will be used automatically.
|
||||||
|
@ -30,18 +33,22 @@
|
||||||
<para>
|
<para>
|
||||||
In order to add plugins but also keep all default plugins installed, it is
|
In order to add plugins but also keep all default plugins installed, it is
|
||||||
possible to use the following method:
|
possible to use the following method:
|
||||||
<programlisting>rxvt-unicode.override { configure = { availablePlugins, ... }: {
|
<programlisting>
|
||||||
plugins = (builtins.attrValues availablePlugins) ++ [ custom-plugin ];
|
rxvt-unicode.override {
|
||||||
};
|
configure = { availablePlugins, ... }: {
|
||||||
}</programlisting>
|
plugins = (builtins.attrValues availablePlugins) ++ [ custom-plugin ];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
</programlisting>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
To get a list of all the plugins available, open the Nix REPL and run
|
To get a list of all the plugins available, open the Nix REPL and run
|
||||||
<programlisting>$ nix repl
|
<screen>
|
||||||
|
<prompt>$ </prompt>nix repl
|
||||||
:l <nixpkgs>
|
:l <nixpkgs>
|
||||||
map (p: p.name) pkgs.rxvt-unicode.plugins
|
map (p: p.name) pkgs.rxvt-unicode.plugins
|
||||||
</programlisting>
|
</screen>
|
||||||
Alternatively, if your shell is bash or zsh and have completion enabled,
|
Alternatively, if your shell is bash or zsh and have completion enabled,
|
||||||
simply type <literal>nixpkgs.rxvt-unicode.plugins.<tab></literal>.
|
simply type <literal>nixpkgs.rxvt-unicode.plugins.<tab></literal>.
|
||||||
</para>
|
</para>
|
||||||
|
@ -53,18 +60,24 @@ map (p: p.name) pkgs.rxvt-unicode.plugins
|
||||||
<literal>extraDeps</literal> can be used, for example, to provide
|
<literal>extraDeps</literal> can be used, for example, to provide
|
||||||
<literal>xsel</literal> (a clipboard manager) to the clipboard plugin,
|
<literal>xsel</literal> (a clipboard manager) to the clipboard plugin,
|
||||||
without installing it globally:
|
without installing it globally:
|
||||||
<programlisting>rxvt-unicode.override { configure = { availablePlugins, ... }: {
|
<programlisting>
|
||||||
pluginsDeps = [ xsel ];
|
rxvt-unicode.override {
|
||||||
}
|
configure = { availablePlugins, ... }: {
|
||||||
}</programlisting>
|
pluginsDeps = [ xsel ];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
</programlisting>
|
||||||
|
|
||||||
<literal>perlDeps</literal> is a handy way to provide Perl packages to
|
<literal>perlDeps</literal> is a handy way to provide Perl packages to
|
||||||
your custom plugins (in <literal>$HOME/.urxvt/ext</literal>). For example,
|
your custom plugins (in <literal>$HOME/.urxvt/ext</literal>). For example,
|
||||||
if you need <literal>AnyEvent</literal> you can do:
|
if you need <literal>AnyEvent</literal> you can do:
|
||||||
<programlisting>rxvt-unicode.override { configure = { availablePlugins, ... }: {
|
<programlisting>
|
||||||
perlDeps = with perlPackages; [ AnyEvent ];
|
rxvt-unicode.override {
|
||||||
}
|
configure = { availablePlugins, ... }: {
|
||||||
}</programlisting>
|
perlDeps = with perlPackages; [ AnyEvent ];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
</programlisting>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
@ -90,7 +103,8 @@ map (p: p.name) pkgs.rxvt-unicode.plugins
|
||||||
<para>
|
<para>
|
||||||
If the plugin is itself a perl package that needs to be imported from
|
If the plugin is itself a perl package that needs to be imported from
|
||||||
other plugins or scripts, add the following passthrough:
|
other plugins or scripts, add the following passthrough:
|
||||||
<programlisting>passthru.perlPackages = [ "self" ];
|
<programlisting>
|
||||||
|
passthru.perlPackages = [ "self" ];
|
||||||
</programlisting>
|
</programlisting>
|
||||||
This will make the urxvt wrapper pick up the dependency and set up the perl
|
This will make the urxvt wrapper pick up the dependency and set up the perl
|
||||||
path accordingly.
|
path accordingly.
|
||||||
|
|
|
@ -209,12 +209,12 @@ Additional information.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
(fetchpatch {
|
(fetchpatch {
|
||||||
name = "CVE-2019-11068.patch";
|
name = "CVE-2019-11068.patch";
|
||||||
url = "https://gitlab.gnome.org/GNOME/libxslt/commit/e03553605b45c88f0b4b2980adfbbb8f6fca2fd6.patch";
|
url = "https://gitlab.gnome.org/GNOME/libxslt/commit/e03553605b45c88f0b4b2980adfbbb8f6fca2fd6.patch";
|
||||||
sha256 = "0pkpb4837km15zgg6h57bncp66d5lwrlvkr73h0lanywq7zrwhj8";
|
sha256 = "0pkpb4837km15zgg6h57bncp66d5lwrlvkr73h0lanywq7zrwhj8";
|
||||||
})
|
})
|
||||||
</programlisting>
|
</programlisting>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
If a security fix applies to both master and a stable release then, similar to regular changes, they are preferably delivered via master first and cherry-picked to the release branch.
|
If a security fix applies to both master and a stable release then, similar to regular changes, they are preferably delivered via master first and cherry-picked to the release branch.
|
||||||
|
|
|
@ -72,9 +72,9 @@
|
||||||
To install any of those builders into your profile, refer to them by their attribute path <literal>beamPackages.rebar3</literal>:
|
To install any of those builders into your profile, refer to them by their attribute path <literal>beamPackages.rebar3</literal>:
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<screen>
|
<screen>
|
||||||
<prompt>$ </prompt>nix-env -f "<nixpkgs>" -iA beamPackages.rebar3
|
<prompt>$ </prompt>nix-env -f "<nixpkgs>" -iA beamPackages.rebar3
|
||||||
</screen>
|
</screen>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section xml:id="packaging-beam-applications">
|
<section xml:id="packaging-beam-applications">
|
||||||
|
|
|
@ -38,11 +38,7 @@ pet = buildGoModule rec {
|
||||||
|
|
||||||
vendorSha256 = "1879j77k96684wi554rkjxydrj8g3hpp0kvxz03sd8dmwr3lh83j"; <co xml:id='ex-buildGoModule-1' />
|
vendorSha256 = "1879j77k96684wi554rkjxydrj8g3hpp0kvxz03sd8dmwr3lh83j"; <co xml:id='ex-buildGoModule-1' />
|
||||||
|
|
||||||
subPackages = [ "." ]; <co xml:id='ex-buildGoModule-2' />
|
runVend = true; <co xml:id='ex-buildGoModule-2' />
|
||||||
|
|
||||||
deleteVendor = true; <co xml:id='ex-buildGoModule-3' />
|
|
||||||
|
|
||||||
runVend = true; <co xml:id='ex-buildGoModule-4' />
|
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Simple command-line snippet manager, written in Go";
|
description = "Simple command-line snippet manager, written in Go";
|
||||||
|
@ -64,16 +60,6 @@ pet = buildGoModule rec {
|
||||||
</para>
|
</para>
|
||||||
</callout>
|
</callout>
|
||||||
<callout arearefs='ex-buildGoModule-2'>
|
<callout arearefs='ex-buildGoModule-2'>
|
||||||
<para>
|
|
||||||
<varname>subPackages</varname> 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>
|
|
||||||
</callout>
|
|
||||||
<callout arearefs='ex-buildGoModule-3'>
|
|
||||||
<para>
|
|
||||||
<varname>deleteVendor</varname> removes the pre-existing vendor directory and fetches the dependencies. This should only be used if the dependencies included in the vendor folder are broken or incomplete.
|
|
||||||
</para>
|
|
||||||
</callout>
|
|
||||||
<callout arearefs='ex-buildGoModule-4'>
|
|
||||||
<para>
|
<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.
|
<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>
|
</para>
|
||||||
|
@ -82,12 +68,7 @@ pet = buildGoModule rec {
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<varname>vendorSha256</varname> can also take <varname>null</varname> as an input.
|
<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;'
|
||||||
|
|
||||||
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>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
@ -106,7 +87,6 @@ deis = buildGoPackage rec {
|
||||||
version = "1.13.0";
|
version = "1.13.0";
|
||||||
|
|
||||||
goPackagePath = "github.com/deis/deis"; <co xml:id='ex-buildGoPackage-1' />
|
goPackagePath = "github.com/deis/deis"; <co xml:id='ex-buildGoPackage-1' />
|
||||||
subPackages = [ "client" ]; <co xml:id='ex-buildGoPackage-2' />
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "deis";
|
owner = "deis";
|
||||||
|
@ -115,11 +95,7 @@ deis = buildGoPackage rec {
|
||||||
sha256 = "1qv9lxqx7m18029lj8cw3k7jngvxs4iciwrypdy0gd2nnghc68sw";
|
sha256 = "1qv9lxqx7m18029lj8cw3k7jngvxs4iciwrypdy0gd2nnghc68sw";
|
||||||
};
|
};
|
||||||
|
|
||||||
goDeps = ./deps.nix; <co xml:id='ex-buildGoPackage-3' />
|
goDeps = ./deps.nix; <co xml:id='ex-buildGoPackage-2' />
|
||||||
|
|
||||||
deleteVendor = true; <co xml:id='ex-buildGoPackage-4' />
|
|
||||||
|
|
||||||
buildFlags = [ "--tags" "release" ]; <co xml:id='ex-buildGoPackage-5' />
|
|
||||||
}
|
}
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</example>
|
</example>
|
||||||
|
@ -133,28 +109,10 @@ deis = buildGoPackage rec {
|
||||||
</para>
|
</para>
|
||||||
</callout>
|
</callout>
|
||||||
<callout arearefs='ex-buildGoPackage-2'>
|
<callout arearefs='ex-buildGoPackage-2'>
|
||||||
<para>
|
|
||||||
<varname>subPackages</varname> 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>
|
|
||||||
<para>
|
|
||||||
In this example only <literal>github.com/deis/deis/client</literal> will be built.
|
|
||||||
</para>
|
|
||||||
</callout>
|
|
||||||
<callout arearefs='ex-buildGoPackage-3'>
|
|
||||||
<para>
|
<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.
|
<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>
|
</para>
|
||||||
</callout>
|
</callout>
|
||||||
<callout arearefs='ex-buildGoPackage-4'>
|
|
||||||
<para>
|
|
||||||
<varname>deleteVendor</varname> removes the pre-existing vendor directory. This should only be used if the dependencies included in the vendor folder are broken or incomplete.
|
|
||||||
</para>
|
|
||||||
</callout>
|
|
||||||
<callout arearefs='ex-buildGoPackage-5'>
|
|
||||||
<para>
|
|
||||||
<varname>buildFlags</varname> is a list of flags passed to the go build command.
|
|
||||||
</para>
|
|
||||||
</callout>
|
|
||||||
</calloutlist>
|
</calloutlist>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
@ -221,4 +179,70 @@ done
|
||||||
</screen>
|
</screen>
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</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>
|
</section>
|
||||||
|
|
|
@ -8,28 +8,28 @@
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
When executing a Perl script, it is possible you get an error such as <literal>./myscript.pl: bad interpreter: /usr/bin/perl: no such file or directory</literal>. This happens when the script expects Perl to be installed at <filename>/usr/bin/perl</filename>, which is not the case when using Perl from nixpkgs. You can fix the script by changing the first line to:
|
When executing a Perl script, it is possible you get an error such as <literal>./myscript.pl: bad interpreter: /usr/bin/perl: no such file or directory</literal>. This happens when the script expects Perl to be installed at <filename>/usr/bin/perl</filename>, which is not the case when using Perl from nixpkgs. You can fix the script by changing the first line to:
|
||||||
<programlisting>
|
<programlisting>
|
||||||
#!/usr/bin/env perl
|
#!/usr/bin/env perl
|
||||||
</programlisting>
|
</programlisting>
|
||||||
to take the Perl installation from the <literal>PATH</literal> environment variable, or invoke Perl directly with:
|
to take the Perl installation from the <literal>PATH</literal> environment variable, or invoke Perl directly with:
|
||||||
<screen>
|
<screen>
|
||||||
<prompt>$ </prompt>perl ./myscript.pl
|
<prompt>$ </prompt>perl ./myscript.pl
|
||||||
</screen>
|
</screen>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
When the script is using a Perl library that is not installed globally, you might get an error such as <literal>Can't locate DB_File.pm in @INC (you may need to install the DB_File module)</literal>. In that case, you can use <command>nix-shell</command> to start an ad-hoc shell with that library installed, for instance:
|
When the script is using a Perl library that is not installed globally, you might get an error such as <literal>Can't locate DB_File.pm in @INC (you may need to install the DB_File module)</literal>. In that case, you can use <command>nix-shell</command> to start an ad-hoc shell with that library installed, for instance:
|
||||||
<screen>
|
<screen>
|
||||||
<prompt>$ </prompt>nix-shell -p perl perlPackages.DBFile --run ./myscript.pl
|
<prompt>$ </prompt>nix-shell -p perl perlPackages.DBFile --run ./myscript.pl
|
||||||
</screen>
|
</screen>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
If you are always using the script in places where <command>nix-shell</command> is available, you can embed the <command>nix-shell</command> invocation in the shebang like this:
|
If you are always using the script in places where <command>nix-shell</command> is available, you can embed the <command>nix-shell</command> invocation in the shebang like this:
|
||||||
<programlisting>
|
<programlisting>
|
||||||
#!/usr/bin/env nix-shell
|
#!/usr/bin/env nix-shell
|
||||||
#! nix-shell -i perl -p perl perlPackages.DBFile
|
#! nix-shell -i perl -p perl perlPackages.DBFile
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
@ -44,30 +44,30 @@
|
||||||
<para>
|
<para>
|
||||||
Perl packages from CPAN are defined in <link
|
Perl packages from CPAN are defined in <link
|
||||||
xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/top-level/perl-packages.nix"><filename>pkgs/top-level/perl-packages.nix</filename></link>, rather than <filename>pkgs/all-packages.nix</filename>. Most Perl packages are so straight-forward to build that they are defined here directly, rather than having a separate function for each package called from <filename>perl-packages.nix</filename>. However, more complicated packages should be put in a separate file, typically in <filename>pkgs/development/perl-modules</filename>. Here is an example of the former:
|
xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/top-level/perl-packages.nix"><filename>pkgs/top-level/perl-packages.nix</filename></link>, rather than <filename>pkgs/all-packages.nix</filename>. Most Perl packages are so straight-forward to build that they are defined here directly, rather than having a separate function for each package called from <filename>perl-packages.nix</filename>. However, more complicated packages should be put in a separate file, typically in <filename>pkgs/development/perl-modules</filename>. Here is an example of the former:
|
||||||
<programlisting>
|
<programlisting>
|
||||||
ClassC3 = buildPerlPackage rec {
|
ClassC3 = buildPerlPackage rec {
|
||||||
name = "Class-C3-0.21";
|
name = "Class-C3-0.21";
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "mirror://cpan/authors/id/F/FL/FLORA/${name}.tar.gz";
|
url = "mirror://cpan/authors/id/F/FL/FLORA/${name}.tar.gz";
|
||||||
sha256 = "1bl8z095y4js66pwxnm7s853pi9czala4sqc743fdlnk27kq94gz";
|
sha256 = "1bl8z095y4js66pwxnm7s853pi9czala4sqc743fdlnk27kq94gz";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
</programlisting>
|
</programlisting>
|
||||||
Note the use of <literal>mirror://cpan/</literal>, and the <literal>${name}</literal> in the URL definition to ensure that the name attribute is consistent with the source that we’re actually downloading. Perl packages are made available in <filename>all-packages.nix</filename> through the variable <varname>perlPackages</varname>. For instance, if you have a package that needs <varname>ClassC3</varname>, you would typically write
|
Note the use of <literal>mirror://cpan/</literal>, and the <literal>${name}</literal> in the URL definition to ensure that the name attribute is consistent with the source that we’re actually downloading. Perl packages are made available in <filename>all-packages.nix</filename> through the variable <varname>perlPackages</varname>. For instance, if you have a package that needs <varname>ClassC3</varname>, you would typically write
|
||||||
<programlisting>
|
<programlisting>
|
||||||
foo = import ../path/to/foo.nix {
|
foo = import ../path/to/foo.nix {
|
||||||
inherit stdenv fetchurl ...;
|
inherit stdenv fetchurl ...;
|
||||||
inherit (perlPackages) ClassC3;
|
inherit (perlPackages) ClassC3;
|
||||||
};
|
};
|
||||||
</programlisting>
|
</programlisting>
|
||||||
in <filename>all-packages.nix</filename>. You can test building a Perl package as follows:
|
in <filename>all-packages.nix</filename>. You can test building a Perl package as follows:
|
||||||
<screen>
|
<screen>
|
||||||
<prompt>$ </prompt>nix-build -A perlPackages.ClassC3
|
<prompt>$ </prompt>nix-build -A perlPackages.ClassC3
|
||||||
</screen>
|
</screen>
|
||||||
<varname>buildPerlPackage</varname> adds <literal>perl-</literal> to the start of the name attribute, so the package above is actually called <literal>perl-Class-C3-0.21</literal>. So to install it, you can say:
|
<varname>buildPerlPackage</varname> adds <literal>perl-</literal> to the start of the name attribute, so the package above is actually called <literal>perl-Class-C3-0.21</literal>. So to install it, you can say:
|
||||||
<screen>
|
<screen>
|
||||||
<prompt>$ </prompt>nix-env -i perl-Class-C3
|
<prompt>$ </prompt>nix-env -i perl-Class-C3
|
||||||
</screen>
|
</screen>
|
||||||
(Of course you can also install using the attribute name: <literal>nix-env -i -A perlPackages.ClassC3</literal>.)
|
(Of course you can also install using the attribute name: <literal>nix-env -i -A perlPackages.ClassC3</literal>.)
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
@ -94,61 +94,61 @@
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<varname>buildPerlPackage</varname> is built on top of <varname>stdenv</varname>, so everything can be customised in the usual way. For instance, the <literal>BerkeleyDB</literal> module has a <varname>preConfigure</varname> hook to generate a configuration file used by <filename>Makefile.PL</filename>:
|
<varname>buildPerlPackage</varname> is built on top of <varname>stdenv</varname>, so everything can be customised in the usual way. For instance, the <literal>BerkeleyDB</literal> module has a <varname>preConfigure</varname> hook to generate a configuration file used by <filename>Makefile.PL</filename>:
|
||||||
<programlisting>
|
<programlisting>
|
||||||
{ buildPerlPackage, fetchurl, db }:
|
{ buildPerlPackage, fetchurl, db }:
|
||||||
|
|
||||||
buildPerlPackage rec {
|
buildPerlPackage rec {
|
||||||
name = "BerkeleyDB-0.36";
|
name = "BerkeleyDB-0.36";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "mirror://cpan/authors/id/P/PM/PMQS/${name}.tar.gz";
|
url = "mirror://cpan/authors/id/P/PM/PMQS/${name}.tar.gz";
|
||||||
sha256 = "07xf50riarb60l1h6m2dqmql8q5dij619712fsgw7ach04d8g3z1";
|
sha256 = "07xf50riarb60l1h6m2dqmql8q5dij619712fsgw7ach04d8g3z1";
|
||||||
};
|
};
|
||||||
|
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
echo "LIB = ${db.out}/lib" > config.in
|
echo "LIB = ${db.out}/lib" > config.in
|
||||||
echo "INCLUDE = ${db.dev}/include" >> config.in
|
echo "INCLUDE = ${db.dev}/include" >> config.in
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Dependencies on other Perl packages can be specified in the <varname>buildInputs</varname> and <varname>propagatedBuildInputs</varname> attributes. If something is exclusively a build-time dependency, use <varname>buildInputs</varname>; if it’s (also) a runtime dependency, use <varname>propagatedBuildInputs</varname>. For instance, this builds a Perl module that has runtime dependencies on a bunch of other modules:
|
Dependencies on other Perl packages can be specified in the <varname>buildInputs</varname> and <varname>propagatedBuildInputs</varname> attributes. If something is exclusively a build-time dependency, use <varname>buildInputs</varname>; if it’s (also) a runtime dependency, use <varname>propagatedBuildInputs</varname>. For instance, this builds a Perl module that has runtime dependencies on a bunch of other modules:
|
||||||
<programlisting>
|
<programlisting>
|
||||||
ClassC3Componentised = buildPerlPackage rec {
|
ClassC3Componentised = buildPerlPackage rec {
|
||||||
name = "Class-C3-Componentised-1.0004";
|
name = "Class-C3-Componentised-1.0004";
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "mirror://cpan/authors/id/A/AS/ASH/${name}.tar.gz";
|
url = "mirror://cpan/authors/id/A/AS/ASH/${name}.tar.gz";
|
||||||
sha256 = "0xql73jkcdbq4q9m0b0rnca6nrlvf5hyzy8is0crdk65bynvs8q1";
|
sha256 = "0xql73jkcdbq4q9m0b0rnca6nrlvf5hyzy8is0crdk65bynvs8q1";
|
||||||
};
|
};
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
ClassC3 ClassInspector TestException MROCompat
|
ClassC3 ClassInspector TestException MROCompat
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
On Darwin, if a script has too many <literal>-I<replaceable>dir</replaceable></literal> flags in its first line (its “shebang line”), it will not run. This can be worked around by calling the <literal>shortenPerlShebang</literal> function from the <literal>postInstall</literal> phase:
|
On Darwin, if a script has too many <literal>-I<replaceable>dir</replaceable></literal> flags in its first line (its “shebang line”), it will not run. This can be worked around by calling the <literal>shortenPerlShebang</literal> function from the <literal>postInstall</literal> phase:
|
||||||
<programlisting>
|
<programlisting>
|
||||||
{ stdenv, buildPerlPackage, fetchurl, shortenPerlShebang }:
|
{ stdenv, buildPerlPackage, fetchurl, shortenPerlShebang }:
|
||||||
|
|
||||||
ImageExifTool = buildPerlPackage {
|
ImageExifTool = buildPerlPackage {
|
||||||
pname = "Image-ExifTool";
|
pname = "Image-ExifTool";
|
||||||
version = "11.50";
|
version = "11.50";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://www.sno.phy.queensu.ca/~phil/exiftool/Image-ExifTool-11.50.tar.gz";
|
url = "https://www.sno.phy.queensu.ca/~phil/exiftool/Image-ExifTool-11.50.tar.gz";
|
||||||
sha256 = "0d8v48y94z8maxkmw1rv7v9m0jg2dc8xbp581njb6yhr7abwqdv3";
|
sha256 = "0d8v48y94z8maxkmw1rv7v9m0jg2dc8xbp581njb6yhr7abwqdv3";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = stdenv.lib.optional stdenv.isDarwin shortenPerlShebang;
|
buildInputs = stdenv.lib.optional stdenv.isDarwin shortenPerlShebang;
|
||||||
postInstall = stdenv.lib.optional stdenv.isDarwin ''
|
postInstall = stdenv.lib.optional stdenv.isDarwin ''
|
||||||
shortenPerlShebang $out/bin/exiftool
|
shortenPerlShebang $out/bin/exiftool
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
</programlisting>
|
</programlisting>
|
||||||
This will remove the <literal>-I</literal> flags from the shebang line, rewrite them in the <literal>use lib</literal> form, and put them on the next line instead. This function can be given any number of Perl scripts as arguments; it will modify them in-place.
|
This will remove the <literal>-I</literal> flags from the shebang line, rewrite them in the <literal>use lib</literal> form, and put them on the next line instead. This function can be given any number of Perl scripts as arguments; it will modify them in-place.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
@ -159,27 +159,27 @@
|
||||||
Nix expressions for Perl packages can be generated (almost) automatically from CPAN. This is done by the program <command>nix-generate-from-cpan</command>, which can be installed as follows:
|
Nix expressions for Perl packages can be generated (almost) automatically from CPAN. This is done by the program <command>nix-generate-from-cpan</command>, which can be installed as follows:
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<screen>
|
<screen>
|
||||||
<prompt>$ </prompt>nix-env -i nix-generate-from-cpan
|
<prompt>$ </prompt>nix-env -i nix-generate-from-cpan
|
||||||
</screen>
|
</screen>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
This program takes a Perl module name, looks it up on CPAN, fetches and unpacks the corresponding package, and prints a Nix expression on standard output. For example:
|
This program takes a Perl module name, looks it up on CPAN, fetches and unpacks the corresponding package, and prints a Nix expression on standard output. For example:
|
||||||
<screen>
|
<screen>
|
||||||
<prompt>$ </prompt>nix-generate-from-cpan XML::Simple
|
<prompt>$ </prompt>nix-generate-from-cpan XML::Simple
|
||||||
XMLSimple = buildPerlPackage rec {
|
XMLSimple = buildPerlPackage rec {
|
||||||
name = "XML-Simple-2.22";
|
name = "XML-Simple-2.22";
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "mirror://cpan/authors/id/G/GR/GRANTM/${name}.tar.gz";
|
url = "mirror://cpan/authors/id/G/GR/GRANTM/${name}.tar.gz";
|
||||||
sha256 = "b9450ef22ea9644ae5d6ada086dc4300fa105be050a2030ebd4efd28c198eb49";
|
sha256 = "b9450ef22ea9644ae5d6ada086dc4300fa105be050a2030ebd4efd28c198eb49";
|
||||||
};
|
};
|
||||||
propagatedBuildInputs = [ XMLNamespaceSupport XMLSAX XMLSAXExpat ];
|
propagatedBuildInputs = [ XMLNamespaceSupport XMLSAX XMLSAXExpat ];
|
||||||
meta = {
|
meta = {
|
||||||
description = "An API for simple XML files";
|
description = "An API for simple XML files";
|
||||||
license = with stdenv.lib.licenses; [ artistic1 gpl1Plus ];
|
license = with stdenv.lib.licenses; [ artistic1 gpl1Plus ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
</screen>
|
</screen>
|
||||||
The output can be pasted into <filename>pkgs/top-level/perl-packages.nix</filename> or wherever else you need it.
|
The output can be pasted into <filename>pkgs/top-level/perl-packages.nix</filename> or wherever else you need it.
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -18,7 +18,7 @@ mkDerivation { <co xml:id='qt-default-nix-co-2' />
|
||||||
|
|
||||||
buildInputs = [ qtbase ]; <co xml:id='qt-default-nix-co-3' />
|
buildInputs = [ qtbase ]; <co xml:id='qt-default-nix-co-3' />
|
||||||
}
|
}
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</example>
|
</example>
|
||||||
|
|
||||||
<calloutlist>
|
<calloutlist>
|
||||||
|
|
|
@ -12,14 +12,14 @@
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<screen>
|
<screen>
|
||||||
<![CDATA[$ cd pkgs/servers/monitoring
|
<prompt>$ </prompt>cd pkgs/servers/monitoring
|
||||||
$ mkdir sensu
|
<prompt>$ </prompt>mkdir sensu
|
||||||
$ cd sensu
|
<prompt>$ </prompt>cd sensu
|
||||||
$ cat > Gemfile
|
<prompt>$ </prompt>cat > Gemfile
|
||||||
source 'https://rubygems.org'
|
source 'https://rubygems.org'
|
||||||
gem 'sensu'
|
gem 'sensu'
|
||||||
$ $(nix-build '<nixpkgs>' -A bundix --no-out-link)/bin/bundix --magic
|
<prompt>$ </prompt>$(nix-build '<nixpkgs>' -A bundix --no-out-link)/bin/bundix --magic
|
||||||
$ cat > default.nix
|
<prompt>$ </prompt>cat > default.nix
|
||||||
{ lib, bundlerEnv, ruby }:
|
{ lib, bundlerEnv, ruby }:
|
||||||
|
|
||||||
bundlerEnv rec {
|
bundlerEnv rec {
|
||||||
|
@ -37,7 +37,7 @@ bundlerEnv rec {
|
||||||
maintainers = with maintainers; [ theuni ];
|
maintainers = with maintainers; [ theuni ];
|
||||||
platforms = platforms.unix;
|
platforms = platforms.unix;
|
||||||
};
|
};
|
||||||
}]]>
|
}
|
||||||
</screen>
|
</screen>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
|
@ -49,17 +49,16 @@ bundlerEnv rec {
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<screen>
|
<screen>
|
||||||
<![CDATA[$ cd pkgs/servers/monitoring/sensu
|
<prompt>$ </prompt>cd pkgs/servers/monitoring/sensu
|
||||||
$ nix-shell -p bundler --run 'bundle lock --update'
|
<prompt>$ </prompt>nix-shell -p bundler --run 'bundle lock --update'
|
||||||
$ nix-shell -p bundix --run 'bundix'
|
<prompt>$ </prompt>nix-shell -p bundix --run 'bundix'
|
||||||
]]>
|
|
||||||
</screen>
|
</screen>
|
||||||
|
|
||||||
<para>
|
<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:
|
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>
|
</para>
|
||||||
|
|
||||||
<screen>
|
<programlisting>
|
||||||
<![CDATA[{ lib, bundlerApp }:
|
<![CDATA[{ lib, bundlerApp }:
|
||||||
|
|
||||||
bundlerApp {
|
bundlerApp {
|
||||||
|
@ -75,7 +74,7 @@ bundlerApp {
|
||||||
platforms = platforms.unix;
|
platforms = platforms.unix;
|
||||||
};
|
};
|
||||||
}]]>
|
}]]>
|
||||||
</screen>
|
</programlisting>
|
||||||
|
|
||||||
<para>
|
<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.
|
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.
|
||||||
|
|
|
@ -44,11 +44,11 @@ texlive.combine {
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
You can list packages e.g. by <command>nix repl</command>.
|
You can list packages e.g. by <command>nix repl</command>.
|
||||||
<programlisting><![CDATA[
|
<programlisting>
|
||||||
$ nix repl
|
<prompt>$ </prompt>nix repl
|
||||||
nix-repl> :l <nixpkgs>
|
<prompt>nix-repl> </prompt>:l <nixpkgs>
|
||||||
nix-repl> texlive.collection-<TAB>
|
<prompt>nix-repl> </prompt>texlive.collection-<keycap function="tab" />
|
||||||
]]></programlisting>
|
</programlisting>
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
<listitem>
|
<listitem>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<book xmlns="http://docbook.org/ns/docbook"
|
<book xmlns="http://docbook.org/ns/docbook"
|
||||||
xmlns:xi="http://www.w3.org/2001/XInclude">
|
xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||||
<info>
|
<info>
|
||||||
<title>Nixpkgs Users and Contributors Guide</title>
|
<title>Nixpkgs Manual</title>
|
||||||
<subtitle>Version <xi:include href=".version" parse="text" />
|
<subtitle>Version <xi:include href=".version" parse="text" />
|
||||||
</subtitle>
|
</subtitle>
|
||||||
</info>
|
</info>
|
||||||
|
|
|
@ -67,7 +67,7 @@
|
||||||
<para>
|
<para>
|
||||||
<command>nix-env</command> silenty disregards the outputs selected by the user, and instead installs the outputs from <varname>meta.outputsToInstall</varname>. For example,
|
<command>nix-env</command> silenty disregards the outputs selected by the user, and instead installs the outputs from <varname>meta.outputsToInstall</varname>. For example,
|
||||||
</para>
|
</para>
|
||||||
<programlisting>$ nix-env -iA nixpkgs.coreutils.info</programlisting>
|
<screen><prompt>$ </prompt>nix-env -iA nixpkgs.coreutils.info</screen>
|
||||||
<para>
|
<para>
|
||||||
installs the <literal>"out"</literal> output (<varname>coreutils.meta.outputsToInstall</varname> is <literal>[ "out" ]</literal>) instead of the requested <literal>"info"</literal>.
|
installs the <literal>"out"</literal> output (<varname>coreutils.meta.outputsToInstall</varname> is <literal>[ "out" ]</literal>) instead of the requested <literal>"info"</literal>.
|
||||||
</para>
|
</para>
|
||||||
|
|
|
@ -66,7 +66,7 @@
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
For allowing the build of a broken package once, you can use an environment variable for a single invocation of the nix tools:
|
For allowing the build of a broken package once, you can use an environment variable for a single invocation of the nix tools:
|
||||||
<programlisting>$ export NIXPKGS_ALLOW_BROKEN=1</programlisting>
|
<screen><prompt>$ </prompt>export NIXPKGS_ALLOW_BROKEN=1</screen>
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
<listitem>
|
<listitem>
|
||||||
|
@ -92,7 +92,7 @@
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
For allowing the build of an unsupported package once, you can use an environment variable for a single invocation of the nix tools:
|
For allowing the build of an unsupported package once, you can use an environment variable for a single invocation of the nix tools:
|
||||||
<programlisting>$ export NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM=1</programlisting>
|
<screen><prompt>$ </prompt>export NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM=1</screen>
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
<listitem>
|
<listitem>
|
||||||
|
@ -122,7 +122,7 @@
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
To temporarily allow all unfree packages, you can use an environment variable for a single invocation of the nix tools:
|
To temporarily allow all unfree packages, you can use an environment variable for a single invocation of the nix tools:
|
||||||
<programlisting>$ export NIXPKGS_ALLOW_UNFREE=1</programlisting>
|
<screen><prompt>$ </prompt>export NIXPKGS_ALLOW_UNFREE=1</screen>
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
<listitem>
|
<listitem>
|
||||||
|
@ -187,7 +187,7 @@
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
To temporarily allow all insecure packages, you can use an environment variable for a single invocation of the nix tools:
|
To temporarily allow all insecure packages, you can use an environment variable for a single invocation of the nix tools:
|
||||||
<programlisting>$ export NIXPKGS_ALLOW_INSECURE=1</programlisting>
|
<screen><prompt>$ </prompt>export NIXPKGS_ALLOW_INSECURE=1</screen>
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
<listitem>
|
<listitem>
|
||||||
|
|
|
@ -240,7 +240,7 @@ self: super:
|
||||||
lapackProvider = self.mkl;
|
lapackProvider = self.mkl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</programlisting>
|
</programlisting>
|
||||||
<para>
|
<para>
|
||||||
This overlay uses Intel’s MKL library for both BLAS and LAPACK
|
This overlay uses Intel’s MKL library for both BLAS and LAPACK
|
||||||
interfaces. Note that the same can be accomplished at runtime
|
interfaces. Note that the same can be accomplished at runtime
|
||||||
|
@ -248,9 +248,9 @@ self: super:
|
||||||
<literal>libblas.so.3</literal> and
|
<literal>libblas.so.3</literal> and
|
||||||
<literal>liblapack.so.3</literal>. For instance:
|
<literal>liblapack.so.3</literal>. For instance:
|
||||||
</para>
|
</para>
|
||||||
<programlisting>
|
<screen>
|
||||||
$ LD_LIBRARY_PATH=$(nix-build -A mkl)/lib:$LD_LIBRARY_PATH nix-shell -p octave --run octave
|
<prompt>$ </prompt>LD_LIBRARY_PATH=$(nix-build -A mkl)/lib:$LD_LIBRARY_PATH nix-shell -p octave --run octave
|
||||||
</programlisting>
|
</screen>
|
||||||
<para>
|
<para>
|
||||||
Intel MKL requires an <literal>openmp</literal> implementation
|
Intel MKL requires an <literal>openmp</literal> implementation
|
||||||
when running with multiple processors. By default,
|
when running with multiple processors. By default,
|
||||||
|
@ -288,7 +288,7 @@ assert (!blas.isILP64) && (!lapack.isILP64);
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
...
|
...
|
||||||
}
|
}
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
</chapter>
|
</chapter>
|
||||||
|
|
|
@ -117,7 +117,7 @@ rec {
|
||||||
if config._module.check && config._module.freeformType == null && merged.unmatchedDefns != [] then
|
if config._module.check && config._module.freeformType == null && merged.unmatchedDefns != [] then
|
||||||
let
|
let
|
||||||
firstDef = head merged.unmatchedDefns;
|
firstDef = head merged.unmatchedDefns;
|
||||||
baseMsg = "The option `${showOption (prefix ++ firstDef.prefix)}' defined in `${firstDef.file}' does not exist.";
|
baseMsg = "The option `${showOption (prefix ++ firstDef.prefix)}' does not exist. Definition values:${showDefs [ firstDef ]}";
|
||||||
in
|
in
|
||||||
if attrNames options == [ "_module" ]
|
if attrNames options == [ "_module" ]
|
||||||
then throw ''
|
then throw ''
|
||||||
|
@ -449,7 +449,13 @@ rec {
|
||||||
# Handle properties, check types, and merge everything together.
|
# Handle properties, check types, and merge everything together.
|
||||||
res =
|
res =
|
||||||
if opt.readOnly or false && length defs' > 1 then
|
if opt.readOnly or false && length defs' > 1 then
|
||||||
throw "The option `${showOption loc}' is read-only, but it's set multiple times."
|
let
|
||||||
|
# For a better error message, evaluate all readOnly definitions as
|
||||||
|
# if they were the only definition.
|
||||||
|
separateDefs = map (def: def // {
|
||||||
|
value = (mergeDefinitions loc opt.type [ def ]).mergedValue;
|
||||||
|
}) defs';
|
||||||
|
in throw "The option `${showOption loc}' is read-only, but it's set multiple times. Definition values:${showDefs separateDefs}"
|
||||||
else
|
else
|
||||||
mergeDefinitions loc opt.type defs';
|
mergeDefinitions loc opt.type defs';
|
||||||
|
|
||||||
|
@ -497,8 +503,8 @@ rec {
|
||||||
mergedValue =
|
mergedValue =
|
||||||
if isDefined then
|
if isDefined then
|
||||||
if all (def: type.check def.value) defsFinal then type.merge loc defsFinal
|
if all (def: type.check def.value) defsFinal then type.merge loc defsFinal
|
||||||
else let firstInvalid = findFirst (def: ! type.check def.value) null defsFinal;
|
else let allInvalid = filter (def: ! type.check def.value) defsFinal;
|
||||||
in throw "The option value `${showOption loc}' in `${firstInvalid.file}' is not of type `${type.description}'."
|
in throw "A definition for option `${showOption loc}' is not of type `${type.description}'. Definition values:${showDefs allInvalid}"
|
||||||
else
|
else
|
||||||
# (nixos-option detects this specific error message and gives it special
|
# (nixos-option detects this specific error message and gives it special
|
||||||
# handling. If changed here, please change it there too.)
|
# handling. If changed here, please change it there too.)
|
||||||
|
|
|
@ -96,12 +96,12 @@ rec {
|
||||||
else if all isBool list then foldl' lib.or false list
|
else if all isBool list then foldl' lib.or false list
|
||||||
else if all isString list then lib.concatStrings list
|
else if all isString list then lib.concatStrings list
|
||||||
else if all isInt list && all (x: x == head list) list then head list
|
else if all isInt list && all (x: x == head list) list then head list
|
||||||
else throw "Cannot merge definitions of `${showOption loc}' given in ${showFiles (getFiles defs)}.";
|
else throw "Cannot merge definitions of `${showOption loc}'. Definition values:${showDefs defs}";
|
||||||
|
|
||||||
mergeOneOption = loc: defs:
|
mergeOneOption = loc: defs:
|
||||||
if defs == [] then abort "This case should never happen."
|
if defs == [] then abort "This case should never happen."
|
||||||
else if length defs != 1 then
|
else if length defs != 1 then
|
||||||
throw "The unique option `${showOption loc}' is defined multiple times, in:\n - ${concatStringsSep "\n - " (getFiles defs)}."
|
throw "The unique option `${showOption loc}' is defined multiple times. Definition values:${showDefs defs}"
|
||||||
else (head defs).value;
|
else (head defs).value;
|
||||||
|
|
||||||
/* "Merge" option definitions by checking that they all have the same value. */
|
/* "Merge" option definitions by checking that they all have the same value. */
|
||||||
|
@ -111,11 +111,11 @@ rec {
|
||||||
# This also makes it work for functions, because the foldl' below would try
|
# This also makes it work for functions, because the foldl' below would try
|
||||||
# to compare the first element with itself, which is false for functions
|
# to compare the first element with itself, which is false for functions
|
||||||
else if length defs == 1 then (elemAt defs 0).value
|
else if length defs == 1 then (elemAt defs 0).value
|
||||||
else foldl' (val: def:
|
else (foldl' (first: def:
|
||||||
if def.value != val then
|
if def.value != first.value then
|
||||||
throw "The option `${showOption loc}' has conflicting definitions, in ${showFiles (getFiles defs)}."
|
throw "The option `${showOption loc}' has conflicting definition values:${showDefs [ first def ]}"
|
||||||
else
|
else
|
||||||
val) (head defs).value defs;
|
first) (head defs) defs).value;
|
||||||
|
|
||||||
/* Extracts values of all "value" keys of the given list.
|
/* Extracts values of all "value" keys of the given list.
|
||||||
|
|
||||||
|
@ -213,6 +213,24 @@ rec {
|
||||||
else escaped;
|
else escaped;
|
||||||
in (concatStringsSep ".") (map escapeOptionPart parts);
|
in (concatStringsSep ".") (map escapeOptionPart parts);
|
||||||
showFiles = files: concatStringsSep " and " (map (f: "`${f}'") files);
|
showFiles = files: concatStringsSep " and " (map (f: "`${f}'") files);
|
||||||
|
|
||||||
|
showDefs = defs: concatMapStrings (def:
|
||||||
|
let
|
||||||
|
# Pretty print the value for display, if successful
|
||||||
|
prettyEval = builtins.tryEval (lib.generators.toPretty {} def.value);
|
||||||
|
# Split it into its lines
|
||||||
|
lines = filter (v: ! isList v) (builtins.split "\n" prettyEval.value);
|
||||||
|
# Only display the first 5 lines, and indent them for better visibility
|
||||||
|
value = concatStringsSep "\n " (take 5 lines ++ optional (length lines > 5) "...");
|
||||||
|
result =
|
||||||
|
# Don't print any value if evaluating the value strictly fails
|
||||||
|
if ! prettyEval.success then ""
|
||||||
|
# Put it on a new line if it consists of multiple
|
||||||
|
else if length lines > 1 then ":\n " + value
|
||||||
|
else ": " + value;
|
||||||
|
in "\n- In `${def.file}'${result}"
|
||||||
|
) defs;
|
||||||
|
|
||||||
unknownModule = "<unknown-file>";
|
unknownModule = "<unknown-file>";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,7 +49,7 @@ checkConfigError() {
|
||||||
reportFailure "$@"
|
reportFailure "$@"
|
||||||
return 1
|
return 1
|
||||||
else
|
else
|
||||||
if echo "$err" | grep --silent "$errorContains" ; then
|
if echo "$err" | grep -zP --silent "$errorContains" ; then
|
||||||
pass=$((pass + 1))
|
pass=$((pass + 1))
|
||||||
return 0;
|
return 0;
|
||||||
else
|
else
|
||||||
|
@ -62,17 +62,17 @@ checkConfigError() {
|
||||||
|
|
||||||
# Check boolean option.
|
# Check boolean option.
|
||||||
checkConfigOutput "false" config.enable ./declare-enable.nix
|
checkConfigOutput "false" config.enable ./declare-enable.nix
|
||||||
checkConfigError 'The option .* defined in .* does not exist.' config.enable ./define-enable.nix
|
checkConfigError 'The option .* does not exist. Definition values:\n- In .*: true' config.enable ./define-enable.nix
|
||||||
|
|
||||||
# Check integer types.
|
# Check integer types.
|
||||||
# unsigned
|
# unsigned
|
||||||
checkConfigOutput "42" config.value ./declare-int-unsigned-value.nix ./define-value-int-positive.nix
|
checkConfigOutput "42" config.value ./declare-int-unsigned-value.nix ./define-value-int-positive.nix
|
||||||
checkConfigError 'The option value .* in .* is not of type.*unsigned integer.*' config.value ./declare-int-unsigned-value.nix ./define-value-int-negative.nix
|
checkConfigError 'A definition for option .* is not of type.*unsigned integer.*. Definition values:\n- In .*: -23' config.value ./declare-int-unsigned-value.nix ./define-value-int-negative.nix
|
||||||
# positive
|
# positive
|
||||||
checkConfigError 'The option value .* in .* is not of type.*positive integer.*' config.value ./declare-int-positive-value.nix ./define-value-int-zero.nix
|
checkConfigError 'A definition for option .* is not of type.*positive integer.*. Definition values:\n- In .*: 0' config.value ./declare-int-positive-value.nix ./define-value-int-zero.nix
|
||||||
# between
|
# between
|
||||||
checkConfigOutput "42" config.value ./declare-int-between-value.nix ./define-value-int-positive.nix
|
checkConfigOutput "42" config.value ./declare-int-between-value.nix ./define-value-int-positive.nix
|
||||||
checkConfigError 'The option value .* in .* is not of type.*between.*-21 and 43.*inclusive.*' config.value ./declare-int-between-value.nix ./define-value-int-negative.nix
|
checkConfigError 'A definition for option .* is not of type.*between.*-21 and 43.*inclusive.*. Definition values:\n- In .*: -23' config.value ./declare-int-between-value.nix ./define-value-int-negative.nix
|
||||||
|
|
||||||
# Check either types
|
# Check either types
|
||||||
# types.either
|
# types.either
|
||||||
|
@ -125,7 +125,7 @@ checkConfigOutput 'true' "$@" ./define-enable.nix ./define-attrsOfSub-foo-enable
|
||||||
set -- config.enable ./define-enable.nix ./declare-enable.nix
|
set -- config.enable ./define-enable.nix ./declare-enable.nix
|
||||||
checkConfigOutput "true" "$@"
|
checkConfigOutput "true" "$@"
|
||||||
checkConfigOutput "false" "$@" ./disable-define-enable.nix
|
checkConfigOutput "false" "$@" ./disable-define-enable.nix
|
||||||
checkConfigError "The option .*enable.* defined in .* does not exist" "$@" ./disable-declare-enable.nix
|
checkConfigError "The option .*enable.* does not exist. Definition values:\n- In .*: true" "$@" ./disable-declare-enable.nix
|
||||||
checkConfigError "attribute .*enable.* in selection path .*config.enable.* not found" "$@" ./disable-define-enable.nix ./disable-declare-enable.nix
|
checkConfigError "attribute .*enable.* in selection path .*config.enable.* not found" "$@" ./disable-define-enable.nix ./disable-declare-enable.nix
|
||||||
checkConfigError "attribute .*enable.* in selection path .*config.enable.* not found" "$@" ./disable-enable-modules.nix
|
checkConfigError "attribute .*enable.* in selection path .*config.enable.* not found" "$@" ./disable-enable-modules.nix
|
||||||
|
|
||||||
|
@ -142,17 +142,17 @@ checkConfigError 'infinite recursion encountered' "$@"
|
||||||
|
|
||||||
# Check _module.check.
|
# Check _module.check.
|
||||||
set -- config.enable ./declare-enable.nix ./define-enable.nix ./define-attrsOfSub-foo.nix
|
set -- config.enable ./declare-enable.nix ./define-enable.nix ./define-attrsOfSub-foo.nix
|
||||||
checkConfigError 'The option .* defined in .* does not exist.' "$@"
|
checkConfigError 'The option .* does not exist. Definition values:\n- In .*' "$@"
|
||||||
checkConfigOutput "true" "$@" ./define-module-check.nix
|
checkConfigOutput "true" "$@" ./define-module-check.nix
|
||||||
|
|
||||||
# Check coerced value.
|
# Check coerced value.
|
||||||
checkConfigOutput "\"42\"" config.value ./declare-coerced-value.nix
|
checkConfigOutput "\"42\"" config.value ./declare-coerced-value.nix
|
||||||
checkConfigOutput "\"24\"" config.value ./declare-coerced-value.nix ./define-value-string.nix
|
checkConfigOutput "\"24\"" config.value ./declare-coerced-value.nix ./define-value-string.nix
|
||||||
checkConfigError 'The option value .* in .* is not.*string or signed integer convertible to it' config.value ./declare-coerced-value.nix ./define-value-list.nix
|
checkConfigError 'A definition for option .* is not.*string or signed integer convertible to it.*. Definition values:\n- In .*: \[ \]' config.value ./declare-coerced-value.nix ./define-value-list.nix
|
||||||
|
|
||||||
# Check coerced value with unsound coercion
|
# Check coerced value with unsound coercion
|
||||||
checkConfigOutput "12" config.value ./declare-coerced-value-unsound.nix
|
checkConfigOutput "12" config.value ./declare-coerced-value-unsound.nix
|
||||||
checkConfigError 'The option value .* in .* is not.*8 bit signed integer.* or string convertible to it' config.value ./declare-coerced-value-unsound.nix ./define-value-string-bigint.nix
|
checkConfigError 'A definition for option .* is not of type .*. Definition values:\n- In .*: "1000"' config.value ./declare-coerced-value-unsound.nix ./define-value-string-bigint.nix
|
||||||
checkConfigError 'unrecognised JSON value' config.value ./declare-coerced-value-unsound.nix ./define-value-string-arbitrary.nix
|
checkConfigError 'unrecognised JSON value' config.value ./declare-coerced-value-unsound.nix ./define-value-string-arbitrary.nix
|
||||||
|
|
||||||
# Check mkAliasOptionModule.
|
# Check mkAliasOptionModule.
|
||||||
|
@ -183,7 +183,7 @@ checkConfigOutput "true" config.submodule.enable ./declare-submoduleWith-path.ni
|
||||||
checkConfigOutput "true" config.enable ./disable-recursive/main.nix
|
checkConfigOutput "true" config.enable ./disable-recursive/main.nix
|
||||||
checkConfigOutput "true" config.enable ./disable-recursive/{main.nix,disable-foo.nix}
|
checkConfigOutput "true" config.enable ./disable-recursive/{main.nix,disable-foo.nix}
|
||||||
checkConfigOutput "true" config.enable ./disable-recursive/{main.nix,disable-bar.nix}
|
checkConfigOutput "true" config.enable ./disable-recursive/{main.nix,disable-bar.nix}
|
||||||
checkConfigError 'The option .* defined in .* does not exist' config.enable ./disable-recursive/{main.nix,disable-foo.nix,disable-bar.nix}
|
checkConfigError 'The option .* does not exist. Definition values:\n- In .*: true' config.enable ./disable-recursive/{main.nix,disable-foo.nix,disable-bar.nix}
|
||||||
|
|
||||||
# Check that imports can depend on derivations
|
# Check that imports can depend on derivations
|
||||||
checkConfigOutput "true" config.enable ./import-from-store.nix
|
checkConfigOutput "true" config.enable ./import-from-store.nix
|
||||||
|
@ -207,7 +207,7 @@ checkConfigOutput "empty" config.value.foo ./declare-lazyAttrsOf.nix ./attrsOf-c
|
||||||
|
|
||||||
|
|
||||||
# Even with multiple assignments, a type error should be thrown if any of them aren't valid
|
# Even with multiple assignments, a type error should be thrown if any of them aren't valid
|
||||||
checkConfigError 'The option value .* in .* is not of type .*' \
|
checkConfigError 'A definition for option .* is not of type .*' \
|
||||||
config.value ./declare-int-unsigned-value.nix ./define-value-list.nix ./define-value-int-positive.nix
|
config.value ./declare-int-unsigned-value.nix ./define-value-list.nix ./define-value-int-positive.nix
|
||||||
|
|
||||||
## Freeform modules
|
## Freeform modules
|
||||||
|
@ -216,7 +216,7 @@ checkConfigOutput 24 config.value ./freeform-attrsOf.nix ./define-value-string.n
|
||||||
# No freeform assigments shouldn't make it error
|
# No freeform assigments shouldn't make it error
|
||||||
checkConfigOutput '{ }' config ./freeform-attrsOf.nix
|
checkConfigOutput '{ }' config ./freeform-attrsOf.nix
|
||||||
# but only if the type matches
|
# but only if the type matches
|
||||||
checkConfigError 'The option value .* in .* is not of type .*' config.value ./freeform-attrsOf.nix ./define-value-list.nix
|
checkConfigError 'A definition for option .* is not of type .*' config.value ./freeform-attrsOf.nix ./define-value-list.nix
|
||||||
# and properties should be applied
|
# and properties should be applied
|
||||||
checkConfigOutput yes config.value ./freeform-attrsOf.nix ./define-value-string-properties.nix
|
checkConfigOutput yes config.value ./freeform-attrsOf.nix ./define-value-string-properties.nix
|
||||||
# Options should still be declarable, and be able to have a type that doesn't match the freeform type
|
# Options should still be declarable, and be able to have a type that doesn't match the freeform type
|
||||||
|
@ -251,7 +251,7 @@ checkConfigOutput / config.value.path ./types-anything/equal-atoms.nix
|
||||||
checkConfigOutput null config.value.null ./types-anything/equal-atoms.nix
|
checkConfigOutput null config.value.null ./types-anything/equal-atoms.nix
|
||||||
checkConfigOutput 0.1 config.value.float ./types-anything/equal-atoms.nix
|
checkConfigOutput 0.1 config.value.float ./types-anything/equal-atoms.nix
|
||||||
# Functions can't be merged together
|
# Functions can't be merged together
|
||||||
checkConfigError "The option .* has conflicting definitions" config.value.multiple-lambdas ./types-anything/functions.nix
|
checkConfigError "The option .* has conflicting definition values" config.value.multiple-lambdas ./types-anything/functions.nix
|
||||||
checkConfigOutput '<LAMBDA>' config.value.single-lambda ./types-anything/functions.nix
|
checkConfigOutput '<LAMBDA>' config.value.single-lambda ./types-anything/functions.nix
|
||||||
# Check that all mk* modifiers are applied
|
# Check that all mk* modifiers are applied
|
||||||
checkConfigError 'attribute .* not found' config.value.mkiffalse ./types-anything/mk-mods.nix
|
checkConfigError 'attribute .* not found' config.value.mkiffalse ./types-anything/mk-mods.nix
|
||||||
|
|
|
@ -299,16 +299,14 @@ rec {
|
||||||
check = isList;
|
check = isList;
|
||||||
merge = loc: defs:
|
merge = loc: defs:
|
||||||
map (x: x.value) (filter (x: x ? value) (concatLists (imap1 (n: def:
|
map (x: x.value) (filter (x: x ? value) (concatLists (imap1 (n: def:
|
||||||
if isList def.value then
|
imap1 (m: def':
|
||||||
imap1 (m: def':
|
(mergeDefinitions
|
||||||
(mergeDefinitions
|
(loc ++ ["[definition ${toString n}-entry ${toString m}]"])
|
||||||
(loc ++ ["[definition ${toString n}-entry ${toString m}]"])
|
elemType
|
||||||
elemType
|
[{ inherit (def) file; value = def'; }]
|
||||||
[{ inherit (def) file; value = def'; }]
|
).optionalValue
|
||||||
).optionalValue
|
) def.value
|
||||||
) def.value
|
) defs)));
|
||||||
else
|
|
||||||
throw "The option value `${showOption loc}` in `${def.file}` is not a list.") defs)));
|
|
||||||
emptyValue = { value = {}; };
|
emptyValue = { value = {}; };
|
||||||
getSubOptions = prefix: elemType.getSubOptions (prefix ++ ["*"]);
|
getSubOptions = prefix: elemType.getSubOptions (prefix ++ ["*"]);
|
||||||
getSubModules = elemType.getSubModules;
|
getSubModules = elemType.getSubModules;
|
||||||
|
|
|
@ -3149,6 +3149,12 @@
|
||||||
githubId = 3217744;
|
githubId = 3217744;
|
||||||
name = "Peter Ferenczy";
|
name = "Peter Ferenczy";
|
||||||
};
|
};
|
||||||
|
ghuntley = {
|
||||||
|
email = "ghuntley@ghuntley.com";
|
||||||
|
github = "ghuntley";
|
||||||
|
githubId = 127353;
|
||||||
|
name = "Geoffrey Huntley";
|
||||||
|
};
|
||||||
gila = {
|
gila = {
|
||||||
email = "jeffry.molanus@gmail.com";
|
email = "jeffry.molanus@gmail.com";
|
||||||
github = "gila";
|
github = "gila";
|
||||||
|
@ -3739,6 +3745,12 @@
|
||||||
githubId = 5283991;
|
githubId = 5283991;
|
||||||
name = "Jake Waksbaum";
|
name = "Jake Waksbaum";
|
||||||
};
|
};
|
||||||
|
jamiemagee = {
|
||||||
|
email = "jamie.magee@gmail.com";
|
||||||
|
github = "JamieMagee";
|
||||||
|
githubId = 1358764;
|
||||||
|
name = "Jamie Magee";
|
||||||
|
};
|
||||||
jammerful = {
|
jammerful = {
|
||||||
email = "jammerful@gmail.com";
|
email = "jammerful@gmail.com";
|
||||||
github = "jammerful";
|
github = "jammerful";
|
||||||
|
|
|
@ -14,18 +14,18 @@
|
||||||
<para>
|
<para>
|
||||||
You create a container with identifier <literal>foo</literal> as follows:
|
You create a container with identifier <literal>foo</literal> as follows:
|
||||||
<screen>
|
<screen>
|
||||||
# nixos-container create foo
|
<prompt># </prompt>nixos-container create <replaceable>foo</replaceable>
|
||||||
</screen>
|
</screen>
|
||||||
This creates the container’s root directory in
|
This creates the container’s root directory in
|
||||||
<filename>/var/lib/containers/foo</filename> and a small configuration file
|
<filename>/var/lib/containers/<replaceable>foo</replaceable></filename> and a small configuration file
|
||||||
in <filename>/etc/containers/foo.conf</filename>. It also builds the
|
in <filename>/etc/containers/<replaceable>foo</replaceable>.conf</filename>. It also builds the
|
||||||
container’s initial system configuration and stores it in
|
container’s initial system configuration and stores it in
|
||||||
<filename>/nix/var/nix/profiles/per-container/foo/system</filename>. You can
|
<filename>/nix/var/nix/profiles/per-container/<replaceable>foo</replaceable>/system</filename>. You can
|
||||||
modify the initial configuration of the container on the command line. For
|
modify the initial configuration of the container on the command line. For
|
||||||
instance, to create a container that has <command>sshd</command> running,
|
instance, to create a container that has <command>sshd</command> running,
|
||||||
with the given public key for <literal>root</literal>:
|
with the given public key for <literal>root</literal>:
|
||||||
<screen>
|
<screen>
|
||||||
# nixos-container create foo --config '
|
<prompt># </prompt>nixos-container create <replaceable>foo</replaceable> --config '
|
||||||
<xref linkend="opt-services.openssh.enable"/> = true;
|
<xref linkend="opt-services.openssh.enable"/> = true;
|
||||||
<link linkend="opt-users.users._name_.openssh.authorizedKeys.keys">users.users.root.openssh.authorizedKeys.keys</link> = ["ssh-dss AAAAB3N…"];
|
<link linkend="opt-users.users._name_.openssh.authorizedKeys.keys">users.users.root.openssh.authorizedKeys.keys</link> = ["ssh-dss AAAAB3N…"];
|
||||||
'
|
'
|
||||||
|
@ -34,7 +34,7 @@
|
||||||
as container IP. This behavior can be altered by setting <literal>--host-address</literal> and
|
as container IP. This behavior can be altered by setting <literal>--host-address</literal> and
|
||||||
<literal>--local-address</literal>:
|
<literal>--local-address</literal>:
|
||||||
<screen>
|
<screen>
|
||||||
# nixos-container create test --config-file test-container.nix \
|
<prompt># </prompt>nixos-container create test --config-file test-container.nix \
|
||||||
--local-address 10.235.1.2 --host-address 10.235.1.1
|
--local-address 10.235.1.2 --host-address 10.235.1.1
|
||||||
</screen>
|
</screen>
|
||||||
</para>
|
</para>
|
||||||
|
@ -42,7 +42,7 @@
|
||||||
<para>
|
<para>
|
||||||
Creating a container does not start it. To start the container, run:
|
Creating a container does not start it. To start the container, run:
|
||||||
<screen>
|
<screen>
|
||||||
# nixos-container start foo
|
<prompt># </prompt>nixos-container start <replaceable>foo</replaceable>
|
||||||
</screen>
|
</screen>
|
||||||
This command will return as soon as the container has booted and has reached
|
This command will return as soon as the container has booted and has reached
|
||||||
<literal>multi-user.target</literal>. On the host, the container runs within
|
<literal>multi-user.target</literal>. On the host, the container runs within
|
||||||
|
@ -51,7 +51,7 @@
|
||||||
Thus, if something went wrong, you can get status info using
|
Thus, if something went wrong, you can get status info using
|
||||||
<command>systemctl</command>:
|
<command>systemctl</command>:
|
||||||
<screen>
|
<screen>
|
||||||
# systemctl status container@foo
|
<prompt># </prompt>systemctl status container@<replaceable>foo</replaceable>
|
||||||
</screen>
|
</screen>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
@ -59,22 +59,22 @@
|
||||||
If the container has started successfully, you can log in as root using the
|
If the container has started successfully, you can log in as root using the
|
||||||
<command>root-login</command> operation:
|
<command>root-login</command> operation:
|
||||||
<screen>
|
<screen>
|
||||||
# nixos-container root-login foo
|
<prompt># </prompt>nixos-container root-login <replaceable>foo</replaceable>
|
||||||
[root@foo:~]#
|
<prompt>[root@foo:~]#</prompt>
|
||||||
</screen>
|
</screen>
|
||||||
Note that only root on the host can do this (since there is no
|
Note that only root on the host can do this (since there is no
|
||||||
authentication). You can also get a regular login prompt using the
|
authentication). You can also get a regular login prompt using the
|
||||||
<command>login</command> operation, which is available to all users on the
|
<command>login</command> operation, which is available to all users on the
|
||||||
host:
|
host:
|
||||||
<screen>
|
<screen>
|
||||||
# nixos-container login foo
|
<prompt># </prompt>nixos-container login <replaceable>foo</replaceable>
|
||||||
foo login: alice
|
foo login: alice
|
||||||
Password: ***
|
Password: ***
|
||||||
</screen>
|
</screen>
|
||||||
With <command>nixos-container run</command>, you can execute arbitrary
|
With <command>nixos-container run</command>, you can execute arbitrary
|
||||||
commands in the container:
|
commands in the container:
|
||||||
<screen>
|
<screen>
|
||||||
# nixos-container run foo -- uname -a
|
<prompt># </prompt>nixos-container run <replaceable>foo</replaceable> -- uname -a
|
||||||
Linux foo 3.4.82 #1-NixOS SMP Thu Mar 20 14:44:05 UTC 2014 x86_64 GNU/Linux
|
Linux foo 3.4.82 #1-NixOS SMP Thu Mar 20 14:44:05 UTC 2014 x86_64 GNU/Linux
|
||||||
</screen>
|
</screen>
|
||||||
</para>
|
</para>
|
||||||
|
@ -85,18 +85,18 @@ Linux foo 3.4.82 #1-NixOS SMP Thu Mar 20 14:44:05 UTC 2014 x86_64 GNU/Linux
|
||||||
<literal>/var/lib/container/<replaceable>name</replaceable>/etc/nixos/configuration.nix</literal>,
|
<literal>/var/lib/container/<replaceable>name</replaceable>/etc/nixos/configuration.nix</literal>,
|
||||||
and run
|
and run
|
||||||
<screen>
|
<screen>
|
||||||
# nixos-container update foo
|
<prompt># </prompt>nixos-container update <replaceable>foo</replaceable>
|
||||||
</screen>
|
</screen>
|
||||||
This will build and activate the new configuration. You can also specify a
|
This will build and activate the new configuration. You can also specify a
|
||||||
new configuration on the command line:
|
new configuration on the command line:
|
||||||
<screen>
|
<screen>
|
||||||
# nixos-container update foo --config '
|
<prompt># </prompt>nixos-container update <replaceable>foo</replaceable> --config '
|
||||||
<xref linkend="opt-services.httpd.enable"/> = true;
|
<xref linkend="opt-services.httpd.enable"/> = true;
|
||||||
<xref linkend="opt-services.httpd.adminAddr"/> = "foo@example.org";
|
<xref linkend="opt-services.httpd.adminAddr"/> = "foo@example.org";
|
||||||
<xref linkend="opt-networking.firewall.allowedTCPPorts"/> = [ 80 ];
|
<xref linkend="opt-networking.firewall.allowedTCPPorts"/> = [ 80 ];
|
||||||
'
|
'
|
||||||
|
|
||||||
# curl http://$(nixos-container show-ip foo)/
|
<prompt># </prompt>curl http://$(nixos-container show-ip <replaceable>foo</replaceable>)/
|
||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">…
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">…
|
||||||
</screen>
|
</screen>
|
||||||
However, note that this will overwrite the container’s
|
However, note that this will overwrite the container’s
|
||||||
|
@ -117,7 +117,7 @@ Linux foo 3.4.82 #1-NixOS SMP Thu Mar 20 14:44:05 UTC 2014 x86_64 GNU/Linux
|
||||||
by using <command>systemctl</command> on the container’s service unit. To
|
by using <command>systemctl</command> on the container’s service unit. To
|
||||||
destroy a container, including its file system, do
|
destroy a container, including its file system, do
|
||||||
<screen>
|
<screen>
|
||||||
# nixos-container destroy foo
|
<prompt># </prompt>nixos-container destroy <replaceable>foo</replaceable>
|
||||||
</screen>
|
</screen>
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
<para>
|
<para>
|
||||||
You can enter rescue mode by running:
|
You can enter rescue mode by running:
|
||||||
<screen>
|
<screen>
|
||||||
# systemctl rescue</screen>
|
<prompt># </prompt>systemctl rescue</screen>
|
||||||
This will eventually give you a single-user root shell. Systemd will stop
|
This will eventually give you a single-user root shell. Systemd will stop
|
||||||
(almost) all system services. To get out of maintenance mode, just exit from
|
(almost) all system services. To get out of maintenance mode, just exit from
|
||||||
the rescue shell.
|
the rescue shell.
|
||||||
|
|
|
@ -16,12 +16,12 @@
|
||||||
disable the use of the binary cache by adding <option>--option
|
disable the use of the binary cache by adding <option>--option
|
||||||
use-binary-caches false</option>, e.g.
|
use-binary-caches false</option>, e.g.
|
||||||
<screen>
|
<screen>
|
||||||
# nixos-rebuild switch --option use-binary-caches false
|
<prompt># </prompt>nixos-rebuild switch --option use-binary-caches false
|
||||||
</screen>
|
</screen>
|
||||||
If you have an alternative binary cache at your disposal, you can use it
|
If you have an alternative binary cache at your disposal, you can use it
|
||||||
instead:
|
instead:
|
||||||
<screen>
|
<screen>
|
||||||
# nixos-rebuild switch --option binary-caches http://my-cache.example.org/
|
<prompt># </prompt>nixos-rebuild switch --option binary-caches <replaceable>http://my-cache.example.org/</replaceable>
|
||||||
</screen>
|
</screen>
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -7,20 +7,20 @@
|
||||||
<para>
|
<para>
|
||||||
The system can be shut down (and automatically powered off) by doing:
|
The system can be shut down (and automatically powered off) by doing:
|
||||||
<screen>
|
<screen>
|
||||||
# shutdown
|
<prompt># </prompt>shutdown
|
||||||
</screen>
|
</screen>
|
||||||
This is equivalent to running <command>systemctl poweroff</command>.
|
This is equivalent to running <command>systemctl poweroff</command>.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
To reboot the system, run
|
To reboot the system, run
|
||||||
<screen>
|
<screen>
|
||||||
# reboot
|
<prompt># </prompt>reboot
|
||||||
</screen>
|
</screen>
|
||||||
which is equivalent to <command>systemctl reboot</command>. Alternatively,
|
which is equivalent to <command>systemctl reboot</command>. Alternatively,
|
||||||
you can quickly reboot the system using <literal>kexec</literal>, which
|
you can quickly reboot the system using <literal>kexec</literal>, which
|
||||||
bypasses the BIOS by directly loading the new kernel into memory:
|
bypasses the BIOS by directly loading the new kernel into memory:
|
||||||
<screen>
|
<screen>
|
||||||
# systemctl kexec
|
<prompt># </prompt>systemctl kexec
|
||||||
</screen>
|
</screen>
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
|
|
|
@ -20,16 +20,16 @@
|
||||||
has booted, you can make the selected configuration the default for
|
has booted, you can make the selected configuration the default for
|
||||||
subsequent boots:
|
subsequent boots:
|
||||||
<screen>
|
<screen>
|
||||||
# /run/current-system/bin/switch-to-configuration boot</screen>
|
<prompt># </prompt>/run/current-system/bin/switch-to-configuration boot</screen>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Second, you can switch to the previous configuration in a running system:
|
Second, you can switch to the previous configuration in a running system:
|
||||||
<screen>
|
<screen>
|
||||||
# nixos-rebuild switch --rollback</screen>
|
<prompt># </prompt>nixos-rebuild switch --rollback</screen>
|
||||||
This is equivalent to running:
|
This is equivalent to running:
|
||||||
<screen>
|
<screen>
|
||||||
# /nix/var/nix/profiles/system-<replaceable>N</replaceable>-link/bin/switch-to-configuration switch</screen>
|
<prompt># </prompt>/nix/var/nix/profiles/system-<replaceable>N</replaceable>-link/bin/switch-to-configuration switch</screen>
|
||||||
where <replaceable>N</replaceable> is the number of the NixOS system
|
where <replaceable>N</replaceable> is the number of the NixOS system
|
||||||
configuration. To get a list of the available configurations, do:
|
configuration. To get a list of the available configurations, do:
|
||||||
<screen>
|
<screen>
|
||||||
|
|
|
@ -58,9 +58,9 @@ Jan 07 15:55:57 hagbard systemd[1]: Started PostgreSQL Server.
|
||||||
<para>
|
<para>
|
||||||
Units can be stopped, started or restarted:
|
Units can be stopped, started or restarted:
|
||||||
<screen>
|
<screen>
|
||||||
# systemctl stop postgresql.service
|
<prompt># </prompt>systemctl stop postgresql.service
|
||||||
# systemctl start postgresql.service
|
<prompt># </prompt>systemctl start postgresql.service
|
||||||
# systemctl restart postgresql.service
|
<prompt># </prompt>systemctl restart postgresql.service
|
||||||
</screen>
|
</screen>
|
||||||
These operations are synchronous: they wait until the service has finished
|
These operations are synchronous: they wait until the service has finished
|
||||||
starting or stopping (or has failed). Starting a unit will cause the
|
starting or stopping (or has failed). Starting a unit will cause the
|
||||||
|
|
|
@ -39,7 +39,7 @@ c3 - root (0)
|
||||||
can terminate a session in a way that ensures that all the session’s
|
can terminate a session in a way that ensures that all the session’s
|
||||||
processes are gone:
|
processes are gone:
|
||||||
<screen>
|
<screen>
|
||||||
# loginctl terminate-session c3
|
<prompt># </prompt>loginctl terminate-session c3
|
||||||
</screen>
|
</screen>
|
||||||
</para>
|
</para>
|
||||||
</chapter>
|
</chapter>
|
||||||
|
|
|
@ -25,7 +25,7 @@ xlink:href="https://nixos.org/nixpkgs/manual">Nixpkgs
|
||||||
and you run <command>nixos-rebuild</command>, specifying your own Nixpkgs
|
and you run <command>nixos-rebuild</command>, specifying your own Nixpkgs
|
||||||
tree:
|
tree:
|
||||||
<screen>
|
<screen>
|
||||||
# nixos-rebuild switch -I nixpkgs=/path/to/my/nixpkgs</screen>
|
<prompt># </prompt>nixos-rebuild switch -I nixpkgs=/path/to/my/nixpkgs</screen>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
|
|
|
@ -126,13 +126,13 @@ nixpkgs.config.packageOverrides = pkgs:
|
||||||
<literal>mellanox</literal> drivers.
|
<literal>mellanox</literal> drivers.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<screen><![CDATA[
|
<screen>
|
||||||
$ nix-build '<nixpkgs>' -A linuxPackages.kernel.dev
|
<prompt>$ </prompt>nix-build '<nixpkgs>' -A linuxPackages.kernel.dev
|
||||||
$ nix-shell '<nixpkgs>' -A linuxPackages.kernel
|
<prompt>$ </prompt>nix-shell '<nixpkgs>' -A linuxPackages.kernel
|
||||||
$ unpackPhase
|
<prompt>$ </prompt>unpackPhase
|
||||||
$ cd linux-*
|
<prompt>$ </prompt>cd linux-*
|
||||||
$ make -C $dev/lib/modules/*/build M=$(pwd)/drivers/net/ethernet/mellanox modules
|
<prompt>$ </prompt>make -C $dev/lib/modules/*/build M=$(pwd)/drivers/net/ethernet/mellanox modules
|
||||||
# insmod ./drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.ko
|
<prompt># </prompt>insmod ./drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.ko
|
||||||
]]></screen>
|
</screen>
|
||||||
</section>
|
</section>
|
||||||
</chapter>
|
</chapter>
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
you create an encrypted Ext4 file system on the device
|
you create an encrypted Ext4 file system on the device
|
||||||
<filename>/dev/disk/by-uuid/3f6b0024-3a44-4fde-a43a-767b872abe5d</filename>:
|
<filename>/dev/disk/by-uuid/3f6b0024-3a44-4fde-a43a-767b872abe5d</filename>:
|
||||||
<screen>
|
<screen>
|
||||||
# cryptsetup luksFormat /dev/disk/by-uuid/3f6b0024-3a44-4fde-a43a-767b872abe5d
|
<prompt># </prompt>cryptsetup luksFormat <replaceable>/dev/disk/by-uuid/3f6b0024-3a44-4fde-a43a-767b872abe5d</replaceable>
|
||||||
|
|
||||||
WARNING!
|
WARNING!
|
||||||
========
|
========
|
||||||
|
@ -21,17 +21,17 @@ Are you sure? (Type uppercase yes): YES
|
||||||
Enter LUKS passphrase: ***
|
Enter LUKS passphrase: ***
|
||||||
Verify passphrase: ***
|
Verify passphrase: ***
|
||||||
|
|
||||||
# cryptsetup luksOpen /dev/disk/by-uuid/3f6b0024-3a44-4fde-a43a-767b872abe5d crypted
|
<prompt># </prompt>cryptsetup luksOpen <replaceable>/dev/disk/by-uuid/3f6b0024-3a44-4fde-a43a-767b872abe5d</replaceable> <replaceable>crypted</replaceable>
|
||||||
Enter passphrase for /dev/disk/by-uuid/3f6b0024-3a44-4fde-a43a-767b872abe5d: ***
|
Enter passphrase for /dev/disk/by-uuid/3f6b0024-3a44-4fde-a43a-767b872abe5d: ***
|
||||||
|
|
||||||
# mkfs.ext4 /dev/mapper/crypted
|
<prompt># </prompt>mkfs.ext4 /dev/mapper/<replaceable>crypted</replaceable>
|
||||||
</screen>
|
</screen>
|
||||||
To ensure that this file system is automatically mounted at boot time as
|
To ensure that this file system is automatically mounted at boot time as
|
||||||
<filename>/</filename>, add the following to
|
<filename>/</filename>, add the following to
|
||||||
<filename>configuration.nix</filename>:
|
<filename>configuration.nix</filename>:
|
||||||
<programlisting>
|
<programlisting>
|
||||||
<link linkend="opt-boot.initrd.luks.devices._name_.device">boot.initrd.luks.devices.crypted.device</link> = "/dev/disk/by-uuid/3f6b0024-3a44-4fde-a43a-767b872abe5d";
|
<link linkend="opt-boot.initrd.luks.devices._name_.device">boot.initrd.luks.devices.crypted.device</link> = "<replaceable>/dev/disk/by-uuid/3f6b0024-3a44-4fde-a43a-767b872abe5d</replaceable>";
|
||||||
<xref linkend="opt-fileSystems"/>."/".device = "/dev/mapper/crypted";
|
<xref linkend="opt-fileSystems"/>."/".device = "/dev/mapper/<replaceable>crypted</replaceable>";
|
||||||
</programlisting>
|
</programlisting>
|
||||||
Should grub be used as bootloader, and <filename>/boot</filename> is located
|
Should grub be used as bootloader, and <filename>/boot</filename> is located
|
||||||
on an encrypted partition, it is necessary to add the following grub option:
|
on an encrypted partition, it is necessary to add the following grub option:
|
||||||
|
@ -45,11 +45,11 @@ Enter passphrase for /dev/disk/by-uuid/3f6b0024-3a44-4fde-a43a-767b872abe5d: ***
|
||||||
and add it as a new key to our existing device <filename>/dev/sda2</filename>:
|
and add it as a new key to our existing device <filename>/dev/sda2</filename>:
|
||||||
|
|
||||||
<screen>
|
<screen>
|
||||||
# export FIDO2_LABEL="/dev/sda2 @ $HOSTNAME"
|
<prompt># </prompt>export FIDO2_LABEL="<replaceable>/dev/sda2</replaceable> @ $HOSTNAME"
|
||||||
# fido2luks credential "$FIDO2_LABEL"
|
<prompt># </prompt>fido2luks credential "$FIDO2_LABEL"
|
||||||
f1d00200108b9d6e849a8b388da457688e3dd653b4e53770012d8f28e5d3b269865038c346802f36f3da7278b13ad6a3bb6a1452e24ebeeaa24ba40eef559b1b287d2a2f80b7
|
f1d00200108b9d6e849a8b388da457688e3dd653b4e53770012d8f28e5d3b269865038c346802f36f3da7278b13ad6a3bb6a1452e24ebeeaa24ba40eef559b1b287d2a2f80b7
|
||||||
|
|
||||||
# fido2luks -i add-key /dev/sda2 f1d00200108b9d6e849a8b388da457688e3dd653b4e53770012d8f28e5d3b269865038c346802f36f3da7278b13ad6a3bb6a1452e24ebeeaa24ba40eef559b1b287d2a2f80b7
|
<prompt># </prompt>fido2luks -i add-key <replaceable>/dev/sda2</replaceable> <replaceable>f1d00200108b9d6e849a8b388da457688e3dd653b4e53770012d8f28e5d3b269865038c346802f36f3da7278b13ad6a3bb6a1452e24ebeeaa24ba40eef559b1b287d2a2f80b7</replaceable>
|
||||||
Password:
|
Password:
|
||||||
Password (again):
|
Password (again):
|
||||||
Old password:
|
Old password:
|
||||||
|
@ -60,13 +60,13 @@ Added to key to device /dev/sda2, slot: 2
|
||||||
To ensure that this file system is decrypted using the FIDO2 compatible key, add the following to <filename>configuration.nix</filename>:
|
To ensure that this file system is decrypted using the FIDO2 compatible key, add the following to <filename>configuration.nix</filename>:
|
||||||
<programlisting>
|
<programlisting>
|
||||||
<link linkend="opt-boot.initrd.luks.fido2Support">boot.initrd.luks.fido2Support</link> = true;
|
<link linkend="opt-boot.initrd.luks.fido2Support">boot.initrd.luks.fido2Support</link> = true;
|
||||||
<link linkend="opt-boot.initrd.luks.devices._name_.fido2.credential">boot.initrd.luks.devices."/dev/sda2".fido2.credential</link> = "f1d00200108b9d6e849a8b388da457688e3dd653b4e53770012d8f28e5d3b269865038c346802f36f3da7278b13ad6a3bb6a1452e24ebeeaa24ba40eef559b1b287d2a2f80b7";
|
<link linkend="opt-boot.initrd.luks.devices._name_.fido2.credential">boot.initrd.luks.devices."<replaceable>/dev/sda2</replaceable>".fido2.credential</link> = "<replaceable>f1d00200108b9d6e849a8b388da457688e3dd653b4e53770012d8f28e5d3b269865038c346802f36f3da7278b13ad6a3bb6a1452e24ebeeaa24ba40eef559b1b287d2a2f80b7</replaceable>";
|
||||||
</programlisting>
|
</programlisting>
|
||||||
|
|
||||||
You can also use the FIDO2 passwordless setup, but for security reasons, you might want to enable it only when your device is PIN protected, such as <link xlink:href="https://trezor.io/">Trezor</link>.
|
You can also use the FIDO2 passwordless setup, but for security reasons, you might want to enable it only when your device is PIN protected, such as <link xlink:href="https://trezor.io/">Trezor</link>.
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
<link linkend="opt-boot.initrd.luks.devices._name_.fido2.passwordLess">boot.initrd.luks.devices."/dev/sda2".fido2.passwordLess</link> = true;
|
<link linkend="opt-boot.initrd.luks.devices._name_.fido2.passwordLess">boot.initrd.luks.devices."<replaceable>/dev/sda2</replaceable>".fido2.passwordLess</link> = true;
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -62,24 +62,24 @@ uid = 1000;
|
||||||
<command>useradd</command>, <command>groupmod</command> and so on. For
|
<command>useradd</command>, <command>groupmod</command> and so on. For
|
||||||
instance, to create a user account named <literal>alice</literal>:
|
instance, to create a user account named <literal>alice</literal>:
|
||||||
<screen>
|
<screen>
|
||||||
# useradd -m alice</screen>
|
<prompt># </prompt>useradd -m <replaceable>alice</replaceable></screen>
|
||||||
To make all nix tools available to this new user use `su - USER` which opens
|
To make all nix tools available to this new user use `su - USER` which opens
|
||||||
a login shell (==shell that loads the profile) for given user. This will
|
a login shell (==shell that loads the profile) for given user. This will
|
||||||
create the ~/.nix-defexpr symlink. So run:
|
create the ~/.nix-defexpr symlink. So run:
|
||||||
<screen>
|
<screen>
|
||||||
# su - alice -c "true"</screen>
|
<prompt># </prompt>su - <replaceable>alice</replaceable> -c "true"</screen>
|
||||||
The flag <option>-m</option> causes the creation of a home directory for the
|
The flag <option>-m</option> causes the creation of a home directory for the
|
||||||
new user, which is generally what you want. The user does not have an initial
|
new user, which is generally what you want. The user does not have an initial
|
||||||
password and therefore cannot log in. A password can be set using the
|
password and therefore cannot log in. A password can be set using the
|
||||||
<command>passwd</command> utility:
|
<command>passwd</command> utility:
|
||||||
<screen>
|
<screen>
|
||||||
# passwd alice
|
<prompt># </prompt>passwd <replaceable>alice</replaceable>
|
||||||
Enter new UNIX password: ***
|
Enter new UNIX password: ***
|
||||||
Retype new UNIX password: ***
|
Retype new UNIX password: ***
|
||||||
</screen>
|
</screen>
|
||||||
A user can be deleted using <command>userdel</command>:
|
A user can be deleted using <command>userdel</command>:
|
||||||
<screen>
|
<screen>
|
||||||
# userdel -r alice</screen>
|
<prompt># </prompt>userdel -r <replaceable>alice</replaceable></screen>
|
||||||
The flag <option>-r</option> deletes the user’s home directory. Accounts
|
The flag <option>-r</option> deletes the user’s home directory. Accounts
|
||||||
can be modified using <command>usermod</command>. Unix groups can be managed
|
can be modified using <command>usermod</command>. Unix groups can be managed
|
||||||
using <command>groupadd</command>, <command>groupmod</command> and
|
using <command>groupadd</command>, <command>groupmod</command> and
|
||||||
|
|
|
@ -58,7 +58,7 @@
|
||||||
</programlisting>
|
</programlisting>
|
||||||
The X server can then be started manually:
|
The X server can then be started manually:
|
||||||
<screen>
|
<screen>
|
||||||
# systemctl start display-manager.service
|
<prompt># </prompt>systemctl start display-manager.service
|
||||||
</screen>
|
</screen>
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
linkend="ch-configuration"/>. Changes to a module documentation
|
linkend="ch-configuration"/>. Changes to a module documentation
|
||||||
have to be checked to not break building the NixOS manual:
|
have to be checked to not break building the NixOS manual:
|
||||||
</para>
|
</para>
|
||||||
<programlisting>$ nix-build nixos/release.nix -A manual</programlisting>
|
<screen><prompt>$ </prompt>nix-build nixos/release.nix -A manual</screen>
|
||||||
</callout>
|
</callout>
|
||||||
</calloutlist>
|
</calloutlist>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -24,8 +24,8 @@
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<screen>
|
<screen>
|
||||||
$ cd /path/to/nixpkgs/nixos/doc/manual
|
<prompt>$ </prompt>cd /path/to/nixpkgs/nixos/doc/manual
|
||||||
$ make
|
<prompt>$ </prompt>make
|
||||||
</screen>
|
</screen>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
|
|
|
@ -27,13 +27,13 @@ networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||||
Setup the proxy environment variables in the shell where you are running
|
Setup the proxy environment variables in the shell where you are running
|
||||||
<literal>nixos-install</literal>.
|
<literal>nixos-install</literal>.
|
||||||
</para>
|
</para>
|
||||||
<programlisting>
|
<screen>
|
||||||
# proxy_url="http://user:password@proxy:port/"
|
<prompt># </prompt>proxy_url="http://user:password@proxy:port/"
|
||||||
# export http_proxy="$proxy_url"
|
<prompt># </prompt>export http_proxy="$proxy_url"
|
||||||
# export HTTP_PROXY="$proxy_url"
|
<prompt># </prompt>export HTTP_PROXY="$proxy_url"
|
||||||
# export https_proxy="$proxy_url"
|
<prompt># </prompt>export https_proxy="$proxy_url"
|
||||||
# export HTTPS_PROXY="$proxy_url"
|
<prompt># </prompt>export HTTPS_PROXY="$proxy_url"
|
||||||
</programlisting>
|
</screen>
|
||||||
</listitem>
|
</listitem>
|
||||||
</orderedlist>
|
</orderedlist>
|
||||||
|
|
||||||
|
|
|
@ -325,14 +325,14 @@ sudo /nix/var/nix/profiles/system/bin/switch-to-configuration boot
|
||||||
to boot on a USB rescue disk and do something along these lines:
|
to boot on a USB rescue disk and do something along these lines:
|
||||||
</para>
|
</para>
|
||||||
<screen>
|
<screen>
|
||||||
# mkdir root
|
<prompt># </prompt>mkdir root
|
||||||
# mount /dev/sdaX root
|
<prompt># </prompt>mount /dev/sdaX root
|
||||||
# mkdir root/nixos-root
|
<prompt># </prompt>mkdir root/nixos-root
|
||||||
# mv -v root/* root/nixos-root/
|
<prompt># </prompt>mv -v root/* root/nixos-root/
|
||||||
# mv -v root/nixos-root/old-root/* root/
|
<prompt># </prompt>mv -v root/nixos-root/old-root/* root/
|
||||||
# mv -v root/boot.bak root/boot # We had renamed this by hand earlier
|
<prompt># </prompt>mv -v root/boot.bak root/boot # We had renamed this by hand earlier
|
||||||
# umount root
|
<prompt># </prompt>umount root
|
||||||
# reboot</screen>
|
<prompt># </prompt>reboot</screen>
|
||||||
<para>
|
<para>
|
||||||
This may work as is or you might also need to reinstall the boot loader
|
This may work as is or you might also need to reinstall the boot loader
|
||||||
</para>
|
</para>
|
||||||
|
|
|
@ -67,32 +67,32 @@
|
||||||
<literal>nixos-20.03</literal> channel. To see which NixOS channel you’re
|
<literal>nixos-20.03</literal> channel. To see which NixOS channel you’re
|
||||||
subscribed to, run the following as root:
|
subscribed to, run the following as root:
|
||||||
<screen>
|
<screen>
|
||||||
# nix-channel --list | grep nixos
|
<prompt># </prompt>nix-channel --list | grep nixos
|
||||||
nixos https://nixos.org/channels/nixos-unstable
|
nixos https://nixos.org/channels/nixos-unstable
|
||||||
</screen>
|
</screen>
|
||||||
To switch to a different NixOS channel, do
|
To switch to a different NixOS channel, do
|
||||||
<screen>
|
<screen>
|
||||||
# nix-channel --add https://nixos.org/channels/<replaceable>channel-name</replaceable> nixos
|
<prompt># </prompt>nix-channel --add https://nixos.org/channels/<replaceable>channel-name</replaceable> nixos
|
||||||
</screen>
|
</screen>
|
||||||
(Be sure to include the <literal>nixos</literal> parameter at the end.) For
|
(Be sure to include the <literal>nixos</literal> parameter at the end.) For
|
||||||
instance, to use the NixOS 20.03 stable channel:
|
instance, to use the NixOS 20.03 stable channel:
|
||||||
<screen>
|
<screen>
|
||||||
# nix-channel --add https://nixos.org/channels/nixos-20.03 nixos
|
<prompt># </prompt>nix-channel --add https://nixos.org/channels/nixos-20.03 nixos
|
||||||
</screen>
|
</screen>
|
||||||
If you have a server, you may want to use the “small” channel instead:
|
If you have a server, you may want to use the “small” channel instead:
|
||||||
<screen>
|
<screen>
|
||||||
# nix-channel --add https://nixos.org/channels/nixos-20.03-small nixos
|
<prompt># </prompt>nix-channel --add https://nixos.org/channels/nixos-20.03-small nixos
|
||||||
</screen>
|
</screen>
|
||||||
And if you want to live on the bleeding edge:
|
And if you want to live on the bleeding edge:
|
||||||
<screen>
|
<screen>
|
||||||
# nix-channel --add https://nixos.org/channels/nixos-unstable nixos
|
<prompt># </prompt>nix-channel --add https://nixos.org/channels/nixos-unstable nixos
|
||||||
</screen>
|
</screen>
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
You can then upgrade NixOS to the latest version in your chosen channel by
|
You can then upgrade NixOS to the latest version in your chosen channel by
|
||||||
running
|
running
|
||||||
<screen>
|
<screen>
|
||||||
# nixos-rebuild switch --upgrade
|
<prompt># </prompt>nixos-rebuild switch --upgrade
|
||||||
</screen>
|
</screen>
|
||||||
which is equivalent to the more verbose <literal>nix-channel --update nixos;
|
which is equivalent to the more verbose <literal>nix-channel --update nixos;
|
||||||
nixos-rebuild switch</literal>.
|
nixos-rebuild switch</literal>.
|
||||||
|
|
|
@ -136,13 +136,13 @@
|
||||||
<filename>/mnt</filename>:
|
<filename>/mnt</filename>:
|
||||||
</para>
|
</para>
|
||||||
<screen>
|
<screen>
|
||||||
# nixos-enter --root /mnt
|
<prompt># </prompt>nixos-enter --root /mnt
|
||||||
</screen>
|
</screen>
|
||||||
<para>
|
<para>
|
||||||
Run a shell command:
|
Run a shell command:
|
||||||
</para>
|
</para>
|
||||||
<screen>
|
<screen>
|
||||||
# nixos-enter -c 'ls -l /; cat /proc/mounts'
|
<prompt># </prompt>nixos-enter -c 'ls -l /; cat /proc/mounts'
|
||||||
</screen>
|
</screen>
|
||||||
<para>
|
<para>
|
||||||
Run a non-shell command:
|
Run a non-shell command:
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
<para>
|
<para>
|
||||||
This command shows the version of the currently active NixOS configuration.
|
This command shows the version of the currently active NixOS configuration.
|
||||||
For example:
|
For example:
|
||||||
<screen>$ nixos-version
|
<screen><prompt>$ </prompt>nixos-version
|
||||||
16.03.1011.6317da4 (Emu)
|
16.03.1011.6317da4 (Emu)
|
||||||
</screen>
|
</screen>
|
||||||
The version consists of the following elements:
|
The version consists of the following elements:
|
||||||
|
@ -111,7 +111,7 @@
|
||||||
<para>
|
<para>
|
||||||
Show the full SHA1 hash of the Git commit from which this configuration
|
Show the full SHA1 hash of the Git commit from which this configuration
|
||||||
was built, e.g.
|
was built, e.g.
|
||||||
<screen>$ nixos-version --hash
|
<screen><prompt>$ </prompt>nixos-version --hash
|
||||||
6317da40006f6bc2480c6781999c52d88dde2acf
|
6317da40006f6bc2480c6781999c52d88dde2acf
|
||||||
</screen>
|
</screen>
|
||||||
</para>
|
</para>
|
||||||
|
|
|
@ -2,6 +2,11 @@ pkgs: with pkgs.lib;
|
||||||
|
|
||||||
rec {
|
rec {
|
||||||
|
|
||||||
|
# Copy configuration files to avoid having the entire sources in the system closure
|
||||||
|
copyFile = filePath: pkgs.runCommandNoCC (builtins.unsafeDiscardStringContext (builtins.baseNameOf filePath)) {} ''
|
||||||
|
cp ${filePath} $out
|
||||||
|
'';
|
||||||
|
|
||||||
# Check whenever fileSystem is needed for boot. NOTE: Make sure
|
# Check whenever fileSystem is needed for boot. NOTE: Make sure
|
||||||
# pathsNeededForBoot is closed under the parent relationship, i.e. if /a/b/c
|
# pathsNeededForBoot is closed under the parent relationship, i.e. if /a/b/c
|
||||||
# is in the list, put /a and /a/b in as well.
|
# is in the list, put /a and /a/b in as well.
|
||||||
|
|
56
nixos/modules/hardware/system-76.nix
Normal file
56
nixos/modules/hardware/system-76.nix
Normal file
|
@ -0,0 +1,56 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
inherit (lib) mkOption mkEnableOption types mkIf mkMerge optional versionOlder;
|
||||||
|
cfg = config.hardware.system76;
|
||||||
|
|
||||||
|
kpkgs = config.boot.kernelPackages;
|
||||||
|
modules = [ "system76" "system76-io" ] ++ (optional (versionOlder kpkgs.kernel.version "5.5") "system76-acpi");
|
||||||
|
modulePackages = map (m: kpkgs.${m}) modules;
|
||||||
|
moduleConfig = mkIf cfg.kernel-modules.enable {
|
||||||
|
boot.extraModulePackages = modulePackages;
|
||||||
|
|
||||||
|
boot.kernelModules = modules;
|
||||||
|
|
||||||
|
services.udev.packages = modulePackages;
|
||||||
|
};
|
||||||
|
|
||||||
|
firmware-pkg = pkgs.system76-firmware;
|
||||||
|
firmwareConfig = mkIf cfg.firmware-daemon.enable {
|
||||||
|
services.dbus.packages = [ firmware-pkg ];
|
||||||
|
|
||||||
|
systemd.services.system76-firmware-daemon = {
|
||||||
|
description = "The System76 Firmware Daemon";
|
||||||
|
|
||||||
|
serviceConfig = {
|
||||||
|
ExecStart = "${firmware-pkg}/bin/system76-firmware-daemon";
|
||||||
|
|
||||||
|
Restart = "on-failure";
|
||||||
|
};
|
||||||
|
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
in {
|
||||||
|
options = {
|
||||||
|
hardware.system76 = {
|
||||||
|
enableAll = mkEnableOption "all recommended configuration for system76 systems";
|
||||||
|
|
||||||
|
firmware-daemon.enable = mkOption {
|
||||||
|
default = cfg.enableAll;
|
||||||
|
example = true;
|
||||||
|
description = "Whether to enable the system76 firmware daemon";
|
||||||
|
type = types.bool;
|
||||||
|
};
|
||||||
|
|
||||||
|
kernel-modules.enable = mkOption {
|
||||||
|
default = cfg.enableAll;
|
||||||
|
example = true;
|
||||||
|
description = "Whether to make the system76 out-of-tree kernel modules available";
|
||||||
|
type = types.bool;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkMerge [ moduleConfig firmwareConfig ];
|
||||||
|
}
|
|
@ -16,6 +16,8 @@ let
|
||||||
kernelPackages.nvidia_x11
|
kernelPackages.nvidia_x11
|
||||||
else if elem "nvidiaBeta" drivers then
|
else if elem "nvidiaBeta" drivers then
|
||||||
kernelPackages.nvidia_x11_beta
|
kernelPackages.nvidia_x11_beta
|
||||||
|
else if elem "nvidiaVulkanBeta" drivers then
|
||||||
|
kernelPackages.nvidia_x11_vulkan_beta
|
||||||
else if elem "nvidiaLegacy304" drivers then
|
else if elem "nvidiaLegacy304" drivers then
|
||||||
kernelPackages.nvidia_x11_legacy304
|
kernelPackages.nvidia_x11_legacy304
|
||||||
else if elem "nvidiaLegacy340" drivers then
|
else if elem "nvidiaLegacy340" drivers then
|
||||||
|
|
|
@ -60,6 +60,7 @@
|
||||||
./hardware/printers.nix
|
./hardware/printers.nix
|
||||||
./hardware/raid/hpsa.nix
|
./hardware/raid/hpsa.nix
|
||||||
./hardware/steam-hardware.nix
|
./hardware/steam-hardware.nix
|
||||||
|
./hardware/system-76.nix
|
||||||
./hardware/tuxedo-keyboard.nix
|
./hardware/tuxedo-keyboard.nix
|
||||||
./hardware/usb-wwan.nix
|
./hardware/usb-wwan.nix
|
||||||
./hardware/onlykey.nix
|
./hardware/onlykey.nix
|
||||||
|
|
|
@ -69,10 +69,10 @@
|
||||||
access this single repository. You need the output of the generate pub file.
|
access this single repository. You need the output of the generate pub file.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
<programlisting>
|
<screen>
|
||||||
# sudo ssh-keygen -N '' -t ed25519 -f /run/keys/id_ed25519_my_borg_repo
|
<prompt># </prompt>sudo ssh-keygen -N '' -t ed25519 -f /run/keys/id_ed25519_my_borg_repo
|
||||||
# cat /run/keys/id_ed25519_my_borg_repo
|
<prompt># </prompt>cat /run/keys/id_ed25519_my_borg_repo
|
||||||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAID78zmOyA+5uPG4Ot0hfAy+sLDPU1L4AiIoRYEIVbbQ/ root@nixos</programlisting>
|
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAID78zmOyA+5uPG4Ot0hfAy+sLDPU1L4AiIoRYEIVbbQ/ root@nixos</screen>
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
Add the following snippet to your NixOS configuration:
|
Add the following snippet to your NixOS configuration:
|
||||||
|
|
|
@ -877,6 +877,37 @@ in
|
||||||
description = "Configure the SAML integration.";
|
description = "Configure the SAML integration.";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
environmentFile = mkOption {
|
||||||
|
type = with types; nullOr path;
|
||||||
|
default = null;
|
||||||
|
example = "/var/lib/codimd/codimd.env";
|
||||||
|
description = ''
|
||||||
|
Environment file as defined in <citerefentry>
|
||||||
|
<refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum>
|
||||||
|
</citerefentry>.
|
||||||
|
|
||||||
|
Secrets may be passed to the service without adding them to the world-readable
|
||||||
|
Nix store, by specifying placeholder variables as the option value in Nix and
|
||||||
|
setting these variables accordingly in the environment file.
|
||||||
|
|
||||||
|
<programlisting>
|
||||||
|
# snippet of CodiMD-related config
|
||||||
|
services.codimd.configuration.dbURL = "postgres://codimd:\''${DB_PASSWORD}@db-host:5432/codimddb";
|
||||||
|
services.codimd.configuration.minio.secretKey = "$MINIO_SECRET_KEY";
|
||||||
|
</programlisting>
|
||||||
|
|
||||||
|
<programlisting>
|
||||||
|
# content of the environment file
|
||||||
|
DB_PASSWORD=verysecretdbpassword
|
||||||
|
MINIO_SECRET_KEY=verysecretminiokey
|
||||||
|
</programlisting>
|
||||||
|
|
||||||
|
Note that this file needs to be available on the host on which
|
||||||
|
<literal>CodiMD</literal> is running.
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
@ -900,11 +931,17 @@ in
|
||||||
description = "CodiMD Service";
|
description = "CodiMD Service";
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
after = [ "networking.target" ];
|
after = [ "networking.target" ];
|
||||||
|
preStart = ''
|
||||||
|
${pkgs.envsubst}/bin/envsubst \
|
||||||
|
-o ${cfg.workDir}/config.json \
|
||||||
|
-i ${prettyJSON cfg.configuration}
|
||||||
|
'';
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
WorkingDirectory = cfg.workDir;
|
WorkingDirectory = cfg.workDir;
|
||||||
ExecStart = "${pkgs.codimd}/bin/codimd";
|
ExecStart = "${pkgs.codimd}/bin/codimd";
|
||||||
|
EnvironmentFile = mkIf (cfg.environmentFile != null) [ cfg.environmentFile ];
|
||||||
Environment = [
|
Environment = [
|
||||||
"CMD_CONFIG_FILE=${prettyJSON cfg.configuration}"
|
"CMD_CONFIG_FILE=${cfg.workDir}/config.json"
|
||||||
"NODE_ENV=production"
|
"NODE_ENV=production"
|
||||||
];
|
];
|
||||||
Restart = "always";
|
Restart = "always";
|
||||||
|
|
|
@ -159,9 +159,9 @@ in
|
||||||
To switch to a specialised configuration
|
To switch to a specialised configuration
|
||||||
(e.g. <literal>fewJobsManyCores</literal>) at runtime, run:
|
(e.g. <literal>fewJobsManyCores</literal>) at runtime, run:
|
||||||
|
|
||||||
<programlisting>
|
<screen>
|
||||||
# sudo /run/current-system/specialisation/fewJobsManyCores/bin/switch-to-configuration test
|
<prompt># </prompt>sudo /run/current-system/specialisation/fewJobsManyCores/bin/switch-to-configuration test
|
||||||
</programlisting>
|
</screen>
|
||||||
'';
|
'';
|
||||||
type = types.attrsOf (types.submodule (
|
type = types.attrsOf (types.submodule (
|
||||||
{ ... }: {
|
{ ... }: {
|
||||||
|
|
|
@ -218,6 +218,7 @@ done
|
||||||
# Create device nodes in /dev.
|
# Create device nodes in /dev.
|
||||||
@preDeviceCommands@
|
@preDeviceCommands@
|
||||||
echo "running udev..."
|
echo "running udev..."
|
||||||
|
ln -sfn /proc/self/fd /dev/fd
|
||||||
mkdir -p /etc/systemd
|
mkdir -p /etc/systemd
|
||||||
ln -sfn @linkUnits@ /etc/systemd/network
|
ln -sfn @linkUnits@ /etc/systemd/network
|
||||||
mkdir -p /etc/udev
|
mkdir -p /etc/udev
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, utils, ... }:
|
||||||
let
|
let
|
||||||
cfg = config.virtualisation.containers;
|
cfg = config.virtualisation.containers;
|
||||||
|
|
||||||
|
@ -13,10 +13,6 @@ let
|
||||||
json2toml "$valuePath" "$out"
|
json2toml "$valuePath" "$out"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# Copy configuration files to avoid having the entire sources in the system closure
|
|
||||||
copyFile = filePath: pkgs.runCommandNoCC (builtins.unsafeDiscardStringContext (builtins.baseNameOf filePath)) {} ''
|
|
||||||
cp ${filePath} $out
|
|
||||||
'';
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
meta = {
|
meta = {
|
||||||
|
@ -136,7 +132,7 @@ in
|
||||||
|
|
||||||
environment.etc."containers/policy.json".source =
|
environment.etc."containers/policy.json".source =
|
||||||
if cfg.policy != {} then pkgs.writeText "policy.json" (builtins.toJSON cfg.policy)
|
if cfg.policy != {} then pkgs.writeText "policy.json" (builtins.toJSON cfg.policy)
|
||||||
else copyFile "${pkgs.skopeo.src}/default-policy.json";
|
else utils.copyFile "${pkgs.skopeo.src}/default-policy.json";
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,16 +1,11 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, utils, ... }:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.virtualisation.cri-o;
|
cfg = config.virtualisation.cri-o;
|
||||||
|
|
||||||
crioPackage = (pkgs.cri-o.override { inherit (cfg) extraPackages; });
|
crioPackage = (pkgs.cri-o.override { inherit (cfg) extraPackages; });
|
||||||
|
|
||||||
# Copy configuration files to avoid having the entire sources in the system closure
|
|
||||||
copyFile = filePath: pkgs.runCommandNoCC (builtins.unsafeDiscardStringContext (builtins.baseNameOf filePath)) {} ''
|
|
||||||
cp ${filePath} $out
|
|
||||||
'';
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
@ -78,12 +73,19 @@ in
|
||||||
The final CRI-O package (including extra packages).
|
The final CRI-O package (including extra packages).
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
networkDir = mkOption {
|
||||||
|
type = types.nullOr types.path;
|
||||||
|
default = null;
|
||||||
|
description = "Override the network_dir option.";
|
||||||
|
internal = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
environment.systemPackages = [ cfg.package pkgs.cri-tools ];
|
environment.systemPackages = [ cfg.package pkgs.cri-tools ];
|
||||||
|
|
||||||
environment.etc."crictl.yaml".source = copyFile "${pkgs.cri-o-unwrapped.src}/crictl.yaml";
|
environment.etc."crictl.yaml".source = utils.copyFile "${pkgs.cri-o-unwrapped.src}/crictl.yaml";
|
||||||
|
|
||||||
environment.etc."crio/crio.conf.d/00-default.conf".text = ''
|
environment.etc."crio/crio.conf.d/00-default.conf".text = ''
|
||||||
[crio]
|
[crio]
|
||||||
|
@ -95,6 +97,7 @@ in
|
||||||
|
|
||||||
[crio.network]
|
[crio.network]
|
||||||
plugin_dirs = ["${pkgs.cni-plugins}/bin/"]
|
plugin_dirs = ["${pkgs.cni-plugins}/bin/"]
|
||||||
|
${optionalString (cfg.networkDir != null) ''network_dir = "${cfg.networkDir}"''}
|
||||||
|
|
||||||
[crio.runtime]
|
[crio.runtime]
|
||||||
cgroup_manager = "systemd"
|
cgroup_manager = "systemd"
|
||||||
|
@ -109,8 +112,8 @@ in
|
||||||
''}
|
''}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
environment.etc."cni/net.d/10-crio-bridge.conf".source = copyFile "${pkgs.cri-o-unwrapped.src}/contrib/cni/10-crio-bridge.conf";
|
environment.etc."cni/net.d/10-crio-bridge.conf".source = utils.copyFile "${pkgs.cri-o-unwrapped.src}/contrib/cni/10-crio-bridge.conf";
|
||||||
environment.etc."cni/net.d/99-loopback.conf".source = copyFile "${pkgs.cri-o-unwrapped.src}/contrib/cni/99-loopback.conf";
|
environment.etc."cni/net.d/99-loopback.conf".source = utils.copyFile "${pkgs.cri-o-unwrapped.src}/contrib/cni/99-loopback.conf";
|
||||||
|
|
||||||
# Enable common /etc/containers configuration
|
# Enable common /etc/containers configuration
|
||||||
virtualisation.containers.enable = true;
|
virtualisation.containers.enable = true;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, utils, ... }:
|
||||||
let
|
let
|
||||||
cfg = config.virtualisation.podman;
|
cfg = config.virtualisation.podman;
|
||||||
|
|
||||||
|
@ -21,11 +21,6 @@ let
|
||||||
done
|
done
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# Copy configuration files to avoid having the entire sources in the system closure
|
|
||||||
copyFile = filePath: pkgs.runCommandNoCC (builtins.unsafeDiscardStringContext (builtins.baseNameOf filePath)) {} ''
|
|
||||||
cp ${filePath} $out
|
|
||||||
'';
|
|
||||||
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
@ -88,7 +83,7 @@ in
|
||||||
environment.systemPackages = [ cfg.package ]
|
environment.systemPackages = [ cfg.package ]
|
||||||
++ lib.optional cfg.dockerCompat dockerCompat;
|
++ lib.optional cfg.dockerCompat dockerCompat;
|
||||||
|
|
||||||
environment.etc."cni/net.d/87-podman-bridge.conflist".source = copyFile "${pkgs.podman-unwrapped.src}/cni/87-podman-bridge.conflist";
|
environment.etc."cni/net.d/87-podman-bridge.conflist".source = utils.copyFile "${pkgs.podman-unwrapped.src}/cni/87-podman-bridge.conflist";
|
||||||
|
|
||||||
# Enable common /etc/containers configuration
|
# Enable common /etc/containers configuration
|
||||||
virtualisation.containers.enable = true;
|
virtualisation.containers.enable = true;
|
||||||
|
|
|
@ -21,7 +21,15 @@ import ./make-test-python.nix ({ pkgs, lib, ... }:
|
||||||
services = {
|
services = {
|
||||||
codimd = {
|
codimd = {
|
||||||
enable = true;
|
enable = true;
|
||||||
configuration.dbURL = "postgres://codimd:snakeoilpassword@localhost:5432/codimddb";
|
configuration.dbURL = "postgres://codimd:\${DB_PASSWORD}@localhost:5432/codimddb";
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Do not use pkgs.writeText for secrets as
|
||||||
|
* they will end up in the world-readable Nix store.
|
||||||
|
*/
|
||||||
|
environmentFile = pkgs.writeText "codimd-env" ''
|
||||||
|
DB_PASSWORD=snakeoilpassword
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
postgresql = {
|
postgresql = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -27,12 +27,13 @@ in
|
||||||
start_all()
|
start_all()
|
||||||
machine.wait_for_unit("magneticod")
|
machine.wait_for_unit("magneticod")
|
||||||
machine.wait_for_unit("magneticow")
|
machine.wait_for_unit("magneticow")
|
||||||
|
machine.wait_for_open_port(${toString port})
|
||||||
machine.succeed(
|
machine.succeed(
|
||||||
"${pkgs.curl}/bin/curl "
|
"${pkgs.curl}/bin/curl --fail "
|
||||||
+ "-u user:password http://localhost:${toString port}"
|
+ "-u user:password http://localhost:${toString port}"
|
||||||
)
|
)
|
||||||
assert "Unauthorised." in machine.succeed(
|
machine.fail(
|
||||||
"${pkgs.curl}/bin/curl "
|
"${pkgs.curl}/bin/curl --fail "
|
||||||
+ "-u user:wrongpwd http://localhost:${toString port}"
|
+ "-u user:wrongpwd http://localhost:${toString port}"
|
||||||
)
|
)
|
||||||
machine.shutdown()
|
machine.shutdown()
|
||||||
|
|
|
@ -2,11 +2,11 @@
|
||||||
|
|
||||||
mkDerivation rec {
|
mkDerivation rec {
|
||||||
pname = "drumkv1";
|
pname = "drumkv1";
|
||||||
version = "0.9.15";
|
version = "0.9.16";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "mirror://sourceforge/drumkv1/${pname}-${version}.tar.gz";
|
url = "mirror://sourceforge/drumkv1/${pname}-${version}.tar.gz";
|
||||||
sha256 = "108jk8p1sbm99plipf98ssij6dxaip1lmznibg8y2c4x0v2la6ab";
|
sha256 = "1r55575w9r0ifysw9mgxjvv0fszvx8ykjgim3zczf3mb5s9ngavv";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ libjack2 alsaLib libsndfile liblo lv2 qt5.qtbase qt5.qttools ];
|
buildInputs = [ libjack2 alsaLib libsndfile liblo lv2 qt5.qtbase qt5.qttools ];
|
||||||
|
|
|
@ -2,13 +2,13 @@
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "fdkaac";
|
pname = "fdkaac";
|
||||||
version = "1.0.0";
|
version = "1.0.1";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "nu774";
|
owner = "nu774";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = version;
|
rev = "v${version}";
|
||||||
sha256 = "16iwqmwagnb929byz8kj79pmmr0anbyv26drbavhppmxhk7rrpgh";
|
sha256 = "02mzx4bird2q5chzpavfc9pg259hwfvq6px85xarm59vmj9nryb6";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ autoreconfHook ];
|
nativeBuildInputs = [ autoreconfHook ];
|
||||||
|
|
|
@ -3,12 +3,12 @@
|
||||||
|
|
||||||
mkDerivation rec {
|
mkDerivation rec {
|
||||||
pname = "jamulus";
|
pname = "jamulus";
|
||||||
version = "3.5.9";
|
version = "3.5.10";
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "corrados";
|
owner = "corrados";
|
||||||
repo = "jamulus";
|
repo = "jamulus";
|
||||||
rev = "r${stdenv.lib.replaceStrings [ "." ] [ "_" ] version}";
|
rev = "r${stdenv.lib.replaceStrings [ "." ] [ "_" ] version}";
|
||||||
sha256 = "0h2m1sahi8cg15k6wa9m2d38va2cs3nvi0q8rpr9vak8g8d3p460";
|
sha256 = "0bw2v40csjmlkvkhr3dh0g1a7mfqrs1xkqjsii61yfzy2ckbsi82";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ pkg-config qmake ];
|
nativeBuildInputs = [ pkg-config qmake ];
|
||||||
|
|
|
@ -0,0 +1,52 @@
|
||||||
|
From 2e1e9b3ffce9d1069fca0b27b8011f85c7547c3b Mon Sep 17 00:00:00 2001
|
||||||
|
From: Francesco Gazzetta <fgaz@fgaz.me>
|
||||||
|
Date: Wed, 19 Aug 2020 15:06:19 +0200
|
||||||
|
Subject: [PATCH 1/2] Remove coherency checks >:)
|
||||||
|
|
||||||
|
As far as I can see, they are just to make sure that the types can fit
|
||||||
|
in the word length, but this check was written when 64 bits weren't a
|
||||||
|
possibility and didn't take that into account,
|
||||||
|
so although the types do fit, the checks fail.
|
||||||
|
Indeed, the program seems to work well on 64 bits.
|
||||||
|
More info here:
|
||||||
|
https://github.com/Mdashdotdashn/LittleGPTracker/issues/4
|
||||||
|
---
|
||||||
|
sources/Externals/Soundfont/DATATYPE.H | 22 ----------------------
|
||||||
|
1 file changed, 22 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/sources/Externals/Soundfont/DATATYPE.H b/sources/Externals/Soundfont/DATATYPE.H
|
||||||
|
index 762a724..f6b031f 100644
|
||||||
|
--- a/sources/Externals/Soundfont/DATATYPE.H
|
||||||
|
+++ b/sources/Externals/Soundfont/DATATYPE.H
|
||||||
|
@@ -123,28 +123,6 @@ typedef short SHORT; /* 16 bit signed value was: INT */
|
||||||
|
********************************************************************/
|
||||||
|
typedef unsigned short EMUSTAT;
|
||||||
|
|
||||||
|
-/********************************************************************
|
||||||
|
-* Compare <limits.h> values with SoundFont Enabler limits. Fail compile
|
||||||
|
-* if discrepency. If compile fails due to one of these errors, then
|
||||||
|
-* the SoundFont enabler will not work with your system or the state of your
|
||||||
|
-* development environment.
|
||||||
|
-********************************************************************/
|
||||||
|
-#if (SCHAR_MAX != CHAR_MAXVAL) || (UCHAR_MAX != BYTE_MAXVAL)
|
||||||
|
- #error <datatype.h>: char is out of range!
|
||||||
|
-#endif
|
||||||
|
-
|
||||||
|
-#if (SHRT_MAX != SHRT_MAXVAL)
|
||||||
|
- #error <datatype.h>: short is out of range!
|
||||||
|
-#endif
|
||||||
|
-
|
||||||
|
-#if (LONG_MAX != LONG_MAXVAL)
|
||||||
|
- #error <datatype.h>: long is out of range!
|
||||||
|
-#endif
|
||||||
|
-
|
||||||
|
-#if (ULONG_MAX != DWORD_MAXVAL)
|
||||||
|
- #error <datatype.h>: unsigned long is out of range!
|
||||||
|
-#endif
|
||||||
|
-
|
||||||
|
#ifdef __BYTE_COHERENT
|
||||||
|
|
||||||
|
/********************************************************************
|
||||||
|
--
|
||||||
|
2.25.4
|
||||||
|
|
|
@ -0,0 +1,27 @@
|
||||||
|
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
|
||||||
|
|
72
pkgs/applications/audio/littlegptracker/default.nix
Normal file
72
pkgs/applications/audio/littlegptracker/default.nix
Normal file
|
@ -0,0 +1,72 @@
|
||||||
|
{ stdenv
|
||||||
|
, fetchFromGitHub
|
||||||
|
, SDL
|
||||||
|
, jack2
|
||||||
|
, Foundation
|
||||||
|
}:
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
pname = "littlegptracker";
|
||||||
|
version = "unstable-2019-04-14";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "Mdashdotdashn";
|
||||||
|
repo = "littlegptracker";
|
||||||
|
rev = "0ed729b46739e3df5e111c6fa4d548fde2d3b891";
|
||||||
|
sha256 = "1pc6lg2qp6xh7ahs5d5pb63ms4h2dz7ryp3c7mci4g37gbwbsj5b";
|
||||||
|
};
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
|
SDL
|
||||||
|
]
|
||||||
|
++ stdenv.lib.optional stdenv.isDarwin Foundation
|
||||||
|
++ stdenv.lib.optional stdenv.isLinux jack2;
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
# 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";
|
||||||
|
|
||||||
|
makeFlags = [ "CXX=${stdenv.cc.targetPrefix}c++" ]
|
||||||
|
++ stdenv.lib.optionals stdenv.isLinux [ "PLATFORM=DEB" ]
|
||||||
|
++ stdenv.lib.optionals stdenv.isDarwin [ "PLATFORM=OSX" ];
|
||||||
|
|
||||||
|
NIX_CFLAGS_COMPILE = [ "-fpermissive" ] ++
|
||||||
|
stdenv.lib.optional stdenv.hostPlatform.isAarch64 "-Wno-error=narrowing";
|
||||||
|
|
||||||
|
NIX_LDFLAGS = stdenv.lib.optional stdenv.isDarwin "-framework Foundation";
|
||||||
|
|
||||||
|
installPhase = let extension = if stdenv.isDarwin then "app" else "deb-exe";
|
||||||
|
in "install -Dm555 lgpt.${extension} $out/bin/lgpt";
|
||||||
|
|
||||||
|
meta = with stdenv.lib; {
|
||||||
|
description = "A music tracker similar to lsdj optimised to run on portable game consoles";
|
||||||
|
longDescription = ''
|
||||||
|
LittleGPTracker (a.k.a 'The piggy', 'lgpt') is a music tracker optimised
|
||||||
|
to run on portable game consoles. It is currently running on Game Park's
|
||||||
|
GP2x & Caanoo, PSP, Dingoo, Windows, Mac OSX (intel/ppc) & Linux (Debian).
|
||||||
|
|
||||||
|
It implements the user interface of littlesounddj, a very famous tracker
|
||||||
|
for the Gameboy platform that has been tried and tested by many users over
|
||||||
|
the years, leading to a little complex but yet extremely efficent way of
|
||||||
|
working.
|
||||||
|
|
||||||
|
Piggy currently supports 8 monophonic 16Bit/44.1Khz stereo sample playback
|
||||||
|
channels. Additionally, the program can drive MIDI instruments (with the
|
||||||
|
gp32 and gp2x a custom MIDI interface is required).
|
||||||
|
'';
|
||||||
|
homepage = "http://www.littlegptracker.com/";
|
||||||
|
downloadPage = "http://www.littlegptracker.com/download.php";
|
||||||
|
license = licenses.bsd3;
|
||||||
|
maintainers = with maintainers; [ fgaz ];
|
||||||
|
platforms = platforms.all;
|
||||||
|
# https://github.com/NixOS/nixpkgs/pull/91766#issuecomment-688751821
|
||||||
|
broken = stdenv.isDarwin;
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,5 +1,9 @@
|
||||||
{ stdenv
|
{ stdenv
|
||||||
, fetchurl, alsaLib
|
, fetchurl
|
||||||
|
, makeWrapper
|
||||||
|
|
||||||
|
, alsaLib
|
||||||
|
, perl
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
|
@ -10,12 +14,30 @@ stdenv.mkDerivation rec {
|
||||||
sha256 = "0vkcfdx0mqq6lmpczsmpa2jsb0s6dryx3i7gvr32i3w9b9w9ij9h";
|
sha256 = "0vkcfdx0mqq6lmpczsmpa2jsb0s6dryx3i7gvr32i3w9b9w9ij9h";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = stdenv.lib.optional (!stdenv.isDarwin) alsaLib;
|
outputs = [ "out" "conplay" ];
|
||||||
|
|
||||||
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
|
|
||||||
|
buildInputs = [ perl ] ++ stdenv.lib.optional (!stdenv.isDarwin) alsaLib;
|
||||||
|
|
||||||
configureFlags = stdenv.lib.optional
|
configureFlags = stdenv.lib.optional
|
||||||
(stdenv.hostPlatform ? mpg123)
|
(stdenv.hostPlatform ? mpg123)
|
||||||
"--with-cpu=${stdenv.hostPlatform.mpg123.cpu}";
|
"--with-cpu=${stdenv.hostPlatform.mpg123.cpu}";
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
mkdir -p $conplay/bin
|
||||||
|
mv scripts/conplay $conplay/bin/
|
||||||
|
'';
|
||||||
|
|
||||||
|
preFixup = ''
|
||||||
|
patchShebangs $conplay/bin/conplay
|
||||||
|
'';
|
||||||
|
|
||||||
|
postFixup = ''
|
||||||
|
wrapProgram $conplay/bin/conplay \
|
||||||
|
--prefix PATH : $out/bin
|
||||||
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "Fast console MPEG Audio Player and decoder library";
|
description = "Fast console MPEG Audio Player and decoder library";
|
||||||
homepage = "http://mpg123.org";
|
homepage = "http://mpg123.org";
|
||||||
|
|
|
@ -12,13 +12,13 @@ let
|
||||||
;
|
;
|
||||||
in pythonPackages.buildPythonApplication rec {
|
in pythonPackages.buildPythonApplication rec {
|
||||||
pname = "picard";
|
pname = "picard";
|
||||||
version = "2.4.2";
|
version = "2.4.4";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "metabrainz";
|
owner = "metabrainz";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = "release-${version}";
|
rev = "release-${version}";
|
||||||
sha256 = "0sbccsisk9w0gnblvhg7wk1c5ydppldjbvaa0zhl3yrid5a363ah";
|
sha256 = "0iw2v37j70881v0a2rjp2miq97nscq04x1ysk1dqmi1b9hi0y17q";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ gettext qt5.wrapQtAppsHook qt5.qtbase ]
|
nativeBuildInputs = [ gettext qt5.wrapQtAppsHook qt5.qtbase ]
|
||||||
|
|
|
@ -770,13 +770,13 @@ in [
|
||||||
})
|
})
|
||||||
(fetchNuGet {
|
(fetchNuGet {
|
||||||
name = "Microsoft.AspNetCore.App.Runtime.linux-x64";
|
name = "Microsoft.AspNetCore.App.Runtime.linux-x64";
|
||||||
version = "3.1.2";
|
version = "3.1.8";
|
||||||
sha256 = "19wfh9yg4n2khbl7pvf6ngx95m5p8lw4l9y935pv7nh4xgwk02p9";
|
sha256 = "140zr3nwkmf6xc52gq4iz6ycyh95fxy0jpgn637pkd9z423z8135";
|
||||||
})
|
})
|
||||||
(fetchNuGet {
|
(fetchNuGet {
|
||||||
name = "Microsoft.NETCore.App.Runtime.linux-x64";
|
name = "Microsoft.NETCore.App.Runtime.linux-x64";
|
||||||
version = "3.1.2";
|
version = "3.1.8";
|
||||||
sha256 = "0a332ia5pabnz7mdfc99a5hlc7drnwzlc7cj9b5c3an6dq636p66";
|
sha256 = "1bv9n9wzsqf9g8h6z10p61xkcx8ad4nnip83qv8yyfvhr4kdmbsa";
|
||||||
})
|
})
|
||||||
(fetchNuGet {
|
(fetchNuGet {
|
||||||
name = "Microsoft.CSharp";
|
name = "Microsoft.CSharp";
|
||||||
|
|
|
@ -11,8 +11,8 @@ let
|
||||||
archive_fmt = if system == "x86_64-darwin" then "zip" else "tar.gz";
|
archive_fmt = if system == "x86_64-darwin" then "zip" else "tar.gz";
|
||||||
|
|
||||||
sha256 = {
|
sha256 = {
|
||||||
x86_64-linux = "1i4vq8a81jgshn9iqkj8rp0yqihq2bjim27c8sh4vl9d6a8a6vcr";
|
x86_64-linux = "1kgvwcwkdvywsiyg86srfzcq6jcas6hyi9ds4qvndsnd64j0fgkn";
|
||||||
x86_64-darwin = "090xj8pq3fdn7dcfrzvgvx906k6gs2xm04xkymz8vpm3a4rq1svn";
|
x86_64-darwin = "03jci05psxkknpjrrgjpdxsii2xyf5cfpkhrp5nnfafb5acfvs1x";
|
||||||
}.${system};
|
}.${system};
|
||||||
in
|
in
|
||||||
callPackage ./generic.nix rec {
|
callPackage ./generic.nix rec {
|
||||||
|
@ -21,7 +21,7 @@ in
|
||||||
|
|
||||||
# Please backport all compatible updates to the stable release.
|
# Please backport all compatible updates to the stable release.
|
||||||
# This is important for the extension ecosystem.
|
# This is important for the extension ecosystem.
|
||||||
version = "1.48.2";
|
version = "1.49.1";
|
||||||
pname = "vscode";
|
pname = "vscode";
|
||||||
|
|
||||||
executableName = "code" + lib.optionalString isInsiders "-insiders";
|
executableName = "code" + lib.optionalString isInsiders "-insiders";
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "1password";
|
pname = "1password";
|
||||||
version = "1.1.1";
|
version = "1.7.0";
|
||||||
src =
|
src =
|
||||||
if stdenv.isLinux then fetchzip {
|
if stdenv.isLinux then fetchzip {
|
||||||
url = {
|
url = {
|
||||||
|
@ -10,13 +10,13 @@ stdenv.mkDerivation rec {
|
||||||
"x86_64-linux" = "https://cache.agilebits.com/dist/1P/op/pkg/v${version}/op_linux_amd64_v${version}.zip";
|
"x86_64-linux" = "https://cache.agilebits.com/dist/1P/op/pkg/v${version}/op_linux_amd64_v${version}.zip";
|
||||||
}.${stdenv.hostPlatform.system};
|
}.${stdenv.hostPlatform.system};
|
||||||
sha256 = {
|
sha256 = {
|
||||||
"i686-linux" = "1andl3ripkcg4jhwdkd4b39c9aaxqpx9wzq21pysn6rlyy4hfcb0";
|
"i686-linux" = "0fvi9pfcm6pfy628q2lg62bkikrgsisynrk3kkjisb9ldcyjgabw";
|
||||||
"x86_64-linux" = "0qj5v8psqyp0sra0pvzkwjpm28kx3bgg36y37wklb6zl2ngpxm5g";
|
"x86_64-linux" = "1iskhls8g8w2zhk79gprz4vzrmm7r7fq87gwgd4xmj5md4nkzran";
|
||||||
}.${stdenv.hostPlatform.system};
|
}.${stdenv.hostPlatform.system};
|
||||||
stripRoot = false;
|
stripRoot = false;
|
||||||
} else fetchurl {
|
} else fetchurl {
|
||||||
url = "https://cache.agilebits.com/dist/1P/op/pkg/v${version}/op_darwin_amd64_v${version}.pkg";
|
url = "https://cache.agilebits.com/dist/1P/op/pkg/v${version}/op_darwin_amd64_v${version}.pkg";
|
||||||
sha256 = "16inwxkrky4xwlr7vara1l8kapdgjg3kfq1l94i5855782hn4ppm";
|
sha256 = "0x6s26zgjryzmcg9qxmv5s2vml06q96yqbapasjfxqc3l205lnnn";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = stdenv.lib.optionals stdenv.isDarwin [ xar cpio ];
|
buildInputs = stdenv.lib.optionals stdenv.isDarwin [ xar cpio ];
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{ stdenv, fetchurl, openssl }:
|
{ stdenv, fetchurl, openssl }:
|
||||||
|
|
||||||
let
|
let
|
||||||
version = "6.4.8";
|
version = "6.4.12";
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
pname = "fetchmail";
|
pname = "fetchmail";
|
||||||
|
@ -9,7 +9,7 @@ stdenv.mkDerivation {
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "mirror://sourceforge/fetchmail/fetchmail-${version}.tar.xz";
|
url = "mirror://sourceforge/fetchmail/fetchmail-${version}.tar.xz";
|
||||||
sha256 = "1g893dr3982vrqzxybmflnqfmd1q6yipd9krvxn0avhlrrp97k96";
|
sha256 = "11s83af63gs9nnrjb66yq58xriyvi8hzj4ykxp3kws5z3nby111b";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ openssl ];
|
buildInputs = [ openssl ];
|
||||||
|
|
|
@ -2,13 +2,13 @@
|
||||||
|
|
||||||
buildGoModule rec {
|
buildGoModule rec {
|
||||||
pname = "go-jira";
|
pname = "go-jira";
|
||||||
version = "1.0.23";
|
version = "1.0.24";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
owner = "go-jira";
|
owner = "go-jira";
|
||||||
repo = "jira";
|
repo = "jira";
|
||||||
sha256 = "0qk5ifjxkqisvgv066rw8xj2zszc9mhc0by4338xjd7ng10jkk7b";
|
sha256 = "1qpimh39hsg75mb32hlvxmd7jj5b0cmhdkqz3dizfcnidllr3grd";
|
||||||
};
|
};
|
||||||
|
|
||||||
vendorSha256 = "18jwxnkv94lsxfv57ga519knxm077cc8chp5c992ipk58a04nv18";
|
vendorSha256 = "18jwxnkv94lsxfv57ga519knxm077cc8chp5c992ipk58a04nv18";
|
||||||
|
|
|
@ -2,11 +2,11 @@
|
||||||
, curl, cdparanoia, libid3tag, ncurses, libtool }:
|
, curl, cdparanoia, libid3tag, ncurses, libtool }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "grip-4.1.1";
|
name = "grip-4.2.0";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "mirror://sourceforge/grip/${name}.tar.gz";
|
url = "mirror://sourceforge/grip/${name}.tar.gz";
|
||||||
sha256 = "1sbjgawb7qrinixybwi0adk7mpdfb565gkffp5gxxsw8fqd068fs";
|
sha256 = "1si5kidwg0i2jg0brzyvjrzw24v3km2hdgd4kda1adzq81a3p1cs";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ pkgconfig ];
|
nativeBuildInputs = [ pkgconfig ];
|
||||||
|
|
|
@ -1,41 +1,48 @@
|
||||||
{ stdenv, fetchurl, pythonPackages }:
|
{ stdenv, fetchurl, pythonPackages, installShellFiles }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
version = "2.4.1";
|
version = "2.4.1";
|
||||||
pname = "weather";
|
pname = "weather";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "http://fungi.yuggoth.org/weather/src/${pname}-${version}.tar.xz";
|
url = "http://fungi.yuggoth.org/weather/src/${pname}-${version}.tar.xz";
|
||||||
sha256 = "0nf680dl7a2vlgavdhj6ljq8a7lkhvr6zghkpzad53vmilxsndys";
|
sha256 = "0nf680dl7a2vlgavdhj6ljq8a7lkhvr6zghkpzad53vmilxsndys";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ pythonPackages.wrapPython ];
|
nativeBuildInputs = [
|
||||||
|
installShellFiles
|
||||||
|
pythonPackages.wrapPython
|
||||||
|
];
|
||||||
|
|
||||||
buildInputs = [ pythonPackages.python ];
|
dontConfigure = true;
|
||||||
|
dontBuild = true;
|
||||||
|
|
||||||
phases = [ "unpackPhase" "installPhase" ];
|
# Upstream doesn't provide a setup.py or alike, so we follow:
|
||||||
|
# http://fungi.yuggoth.org/weather/doc/install.rst#id3
|
||||||
|
installPhase = ''
|
||||||
|
site_packages=$out/${pythonPackages.python.sitePackages}
|
||||||
|
install -Dt $out/bin -m 755 weather
|
||||||
|
install -Dt $site_packages weather.py
|
||||||
|
install -Dt $out/share/weather-util \
|
||||||
|
airports overrides.{conf,log} places slist stations \
|
||||||
|
zctas zlist zones
|
||||||
|
install -Dt $out/etc weatherrc
|
||||||
|
|
||||||
installPhase = ''
|
sed -i \
|
||||||
site_packages=$out/${pythonPackages.python.sitePackages}
|
-e "s|/etc|$out/etc|g" \
|
||||||
mkdir -p $out/{share/{man,weather-util},bin,etc} $site_packages
|
-e "s|else: default_setpath = \".:~/.weather|&:$out/share/weather-util|" \
|
||||||
cp weather $out/bin/
|
$site_packages/weather.py
|
||||||
cp weather.py $site_packages/
|
|
||||||
chmod +x $out/bin/weather
|
|
||||||
cp airports overrides.{conf,log} places slist stations zctas zlist zones $out/share/weather-util/
|
|
||||||
cp weatherrc $out/etc
|
|
||||||
cp weather.1 weatherrc.5 $out/share/man/
|
|
||||||
sed -i \
|
|
||||||
-e "s|/etc|$out/etc|g" \
|
|
||||||
-e "s|else: default_setpath = \".:~/.weather|&:$out/share/weather-util|" \
|
|
||||||
$site_packages/weather.py
|
|
||||||
wrapPythonPrograms
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
wrapPythonPrograms
|
||||||
homepage = "http://fungi.yuggoth.org/weather";
|
|
||||||
description = "Quick access to current weather conditions and forecasts";
|
installManPage weather.1 weatherrc.5
|
||||||
license = licenses.isc;
|
'';
|
||||||
maintainers = [ maintainers.matthiasbeyer ];
|
|
||||||
platforms = platforms.linux ++ platforms.darwin;
|
meta = with stdenv.lib; {
|
||||||
};
|
homepage = "http://fungi.yuggoth.org/weather";
|
||||||
|
description = "Quick access to current weather conditions and forecasts";
|
||||||
|
license = licenses.isc;
|
||||||
|
maintainers = [ maintainers.matthiasbeyer ];
|
||||||
|
platforms = platforms.unix;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,17 +1,17 @@
|
||||||
{
|
{
|
||||||
"stable": {
|
"stable": {
|
||||||
"version": "85.0.4183.102",
|
"version": "85.0.4183.121",
|
||||||
"sha256": "032yh1mfwins7a62zw8kwwq8xw1n52a0a93lqz7qlyjaf9sd8s4a",
|
"sha256": "0a1xn39kmvyfpal6pgnylpy30z0322p3v7sx6vxi0r2naiz58670",
|
||||||
"sha256bin64": "1i8xaxxnmg80vsia8hxnq58qi9k5nnbrl80d6d23g9lb7dbc9cpm"
|
"sha256bin64": "08vqf1v91703aik47344bl409rsl4myar9bsd2lsvzqncncwsaca"
|
||||||
},
|
},
|
||||||
"beta": {
|
"beta": {
|
||||||
"version": "86.0.4240.30",
|
"version": "86.0.4240.42",
|
||||||
"sha256": "1isj0zngb72k1hhn3h0s8mccg1cdmppz1mjmg19f2h306farzmzl",
|
"sha256": "06cfhiym9xmz2q86v6b6xcicrrp2pmr7karavylzz4fqvwd2v6fa",
|
||||||
"sha256bin64": "10d8im2adqqnkd6265gngv6xlm5qsz6r13z6cbbchsss0ssr8fxa"
|
"sha256bin64": "1z5zmdc2i31iimps7p5z43vv4qi83c8ljb7x68zc1rvf8x62p7xj"
|
||||||
},
|
},
|
||||||
"dev": {
|
"dev": {
|
||||||
"version": "87.0.4252.0",
|
"version": "87.0.4263.3",
|
||||||
"sha256": "1lxlsdni63zh79hxvpwgmnfn67kgfzhz3yg9bkxghqchqykkz92y",
|
"sha256": "1ybfrlm4417lpbg5qcwhq5p6nnxrw68wzyy5zvb1sg1ma8s9hhkk",
|
||||||
"sha256bin64": "130hf7b35wcxpw05ddbqq89x10c0kays1vb9qg6xhq3zx2mk6ijw"
|
"sha256bin64": "1f7a272kalglmdwmrrzb4iw3crvvpv3mhxca5jh75qpldn4gby6m"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -138,6 +138,8 @@ stdenv.mkDerivation ({
|
||||||
"-I${nss.dev}/include/nss"
|
"-I${nss.dev}/include/nss"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
MACH_USE_SYSTEM_PYTHON = "1";
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
rm -rf obj-x86_64-pc-linux-gnu
|
rm -rf obj-x86_64-pc-linux-gnu
|
||||||
|
|
||||||
|
|
|
@ -7,10 +7,10 @@ in
|
||||||
rec {
|
rec {
|
||||||
firefox = common rec {
|
firefox = common rec {
|
||||||
pname = "firefox";
|
pname = "firefox";
|
||||||
ffversion = "80.0.1";
|
ffversion = "81.0";
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "mirror://mozilla/firefox/releases/${ffversion}/source/firefox-${ffversion}.source.tar.xz";
|
url = "mirror://mozilla/firefox/releases/${ffversion}/source/firefox-${ffversion}.source.tar.xz";
|
||||||
sha512 = "081sf41r7ickjij3kfrdq29a0d6wz7qv8950kx116kakh8qxgjy8ahk2mfwlcp6digrl4mimi8rl7ns1wjngsmrjh4lvqzh1xglx9cp";
|
sha512 = "1dnxn754vb99mccqrj3wr3pg2scjy42rvs5xc6bw022gh6n8kgipx9pbkapwfivkglynxmmbw1k11ak34zhr1g6p31m3550ad6azq19";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
|
@ -36,10 +36,10 @@ rec {
|
||||||
|
|
||||||
firefox-esr-78 = common rec {
|
firefox-esr-78 = common rec {
|
||||||
pname = "firefox-esr";
|
pname = "firefox-esr";
|
||||||
ffversion = "78.2.0esr";
|
ffversion = "78.3.0esr";
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "mirror://mozilla/firefox/releases/${ffversion}/source/firefox-${ffversion}.source.tar.xz";
|
url = "mirror://mozilla/firefox/releases/${ffversion}/source/firefox-${ffversion}.source.tar.xz";
|
||||||
sha512 = "1dnvr9nyvnv5dkpnjnadff38lf9r7g37gk401c1i22d661ib5xj0gm2rnz1rjyrkvzrnr6p9f7liy3i41varja00g0x1racccj1my9q";
|
sha512 = "3rg4rjmigir2wsvzdl5dkh74hahjv36yvd04rhq0rszw6xz9wyig64nxhkrpf416z6iy3y1qavk7x9j6j02sc2f545pd6cx8abjgqc9";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
|
|
|
@ -91,19 +91,19 @@ let
|
||||||
fteLibPath = makeLibraryPath [ stdenv.cc.cc gmp ];
|
fteLibPath = makeLibraryPath [ stdenv.cc.cc gmp ];
|
||||||
|
|
||||||
# Upstream source
|
# Upstream source
|
||||||
version = "9.5.4";
|
version = "10.0";
|
||||||
|
|
||||||
lang = "en-US";
|
lang = "en-US";
|
||||||
|
|
||||||
srcs = {
|
srcs = {
|
||||||
x86_64-linux = fetchurl {
|
x86_64-linux = fetchurl {
|
||||||
url = "https://dist.torproject.org/torbrowser/${version}/tor-browser-linux64-${version}_${lang}.tar.xz";
|
url = "https://dist.torproject.org/torbrowser/${version}/tor-browser-linux64-${version}_${lang}.tar.xz";
|
||||||
sha256 = "sha256-XW2B2wTgqMU2w9XhPJNcUjGLrHykQIngMcG/fFTWb04=";
|
sha256 = "1l2rfknffnh6hsi16dzps1wav5s723vyk57fzv9y5vjmbcbf7l2l";
|
||||||
};
|
};
|
||||||
|
|
||||||
i686-linux = fetchurl {
|
i686-linux = fetchurl {
|
||||||
url = "https://dist.torproject.org/torbrowser/${version}/tor-browser-linux32-${version}_${lang}.tar.xz";
|
url = "https://dist.torproject.org/torbrowser/${version}/tor-browser-linux32-${version}_${lang}.tar.xz";
|
||||||
sha256 = "sha256-EyDyAxB5Og1Cn04tuBF9ob8BxqULy2Ur07BuDxZlmqQ=";
|
sha256 = "0x80w02ckb6mznrm1gjdpkxk9yf2rdcl16ljjglivq358a309cl2";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
|
|
|
@ -18,11 +18,11 @@ let
|
||||||
vivaldiName = if isSnapshot then "vivaldi-snapshot" else "vivaldi";
|
vivaldiName = if isSnapshot then "vivaldi-snapshot" else "vivaldi";
|
||||||
in stdenv.mkDerivation rec {
|
in stdenv.mkDerivation rec {
|
||||||
pname = "vivaldi";
|
pname = "vivaldi";
|
||||||
version = "3.3.2022.39-1";
|
version = "3.3.2022.47-1";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://downloads.vivaldi.com/${branch}/vivaldi-${branch}_${version}_amd64.deb";
|
url = "https://downloads.vivaldi.com/${branch}/vivaldi-${branch}_${version}_amd64.deb";
|
||||||
sha256 = "1d49556l067zilndm1381n1y22076qgww4n6nkscwchik2mj79sy";
|
sha256 = "0lraliqb5r8akh8lfmw2sy90s58sbghcpc598nlz2d89f91yq7vz";
|
||||||
};
|
};
|
||||||
|
|
||||||
unpackPhase = ''
|
unpackPhase = ''
|
||||||
|
|
|
@ -11,11 +11,11 @@
|
||||||
|
|
||||||
mkDerivation rec {
|
mkDerivation rec {
|
||||||
pname = "datovka";
|
pname = "datovka";
|
||||||
version = "4.15.1";
|
version = "4.15.2";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://secure.nic.cz/files/datove_schranky/${version}/${pname}-${version}.tar.xz";
|
url = "https://secure.nic.cz/files/datove_schranky/${version}/${pname}-${version}.tar.xz";
|
||||||
sha256 = "0ab1s1r6zrqxcfjnij5ar352kzyrl1m92c04nqk6hahpzzma2p3r";
|
sha256 = "0vna3vaivi6w7nlkwpqhwmyly0s1d5y2yg51br2f918pjhp2cp7q";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ libisds qmake qtbase qtsvg libxml2 ];
|
buildInputs = [ libisds qmake qtbase qtsvg libxml2 ];
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{ callPackage, libsForQt5 }:
|
{ callPackage, libsForQt5 }:
|
||||||
|
|
||||||
let
|
let
|
||||||
stableVersion = "2.2.13";
|
stableVersion = "2.2.14";
|
||||||
previewVersion = stableVersion;
|
previewVersion = stableVersion;
|
||||||
addVersion = args:
|
addVersion = args:
|
||||||
let version = if args.stable then stableVersion else previewVersion;
|
let version = if args.stable then stableVersion else previewVersion;
|
||||||
|
@ -26,8 +26,8 @@ let
|
||||||
};
|
};
|
||||||
mkGui = args: libsForQt5.callPackage (import ./gui.nix (addVersion args // extraArgs)) { };
|
mkGui = args: libsForQt5.callPackage (import ./gui.nix (addVersion args // extraArgs)) { };
|
||||||
mkServer = args: callPackage (import ./server.nix (addVersion args // extraArgs)) { };
|
mkServer = args: callPackage (import ./server.nix (addVersion args // extraArgs)) { };
|
||||||
guiSrcHash = "1vhch8hgbzdfmgpxlzgdasv6lxgl7rs96n5v4mn2pcccvfmbqj66";
|
guiSrcHash = "0y0dkyky2vw8ixm8nx4qhsj5b6hk0lv2cayrj4879icmp8zc4dy3";
|
||||||
serverSrcHash = "1vlnhlcnjh0kd623zxjjgkvln0rn5zr43zn00vkvbzwc9cgm2jxz";
|
serverSrcHash = "1vpsvvisw0sivlbjwawskkyiavl092qxaqxi13khkimz5fk0d3rc";
|
||||||
in {
|
in {
|
||||||
guiStable = mkGui {
|
guiStable = mkGui {
|
||||||
stable = true;
|
stable = true;
|
||||||
|
|
|
@ -15,11 +15,11 @@ assert pulseaudioSupport -> libpulseaudio != null;
|
||||||
let
|
let
|
||||||
inherit (stdenv.lib) concatStringsSep makeBinPath optional;
|
inherit (stdenv.lib) concatStringsSep makeBinPath optional;
|
||||||
|
|
||||||
version = "5.2.458699.0906";
|
version = "5.3.465578.0920";
|
||||||
srcs = {
|
srcs = {
|
||||||
x86_64-linux = fetchurl {
|
x86_64-linux = fetchurl {
|
||||||
url = "https://zoom.us/client/${version}/zoom_x86_64.tar.xz";
|
url = "https://zoom.us/client/${version}/zoom_x86_64.tar.xz";
|
||||||
sha256 = "0cwai5v2m99cvw1dnysl88fi97dwm6rq7xv3y0ydgg3499n8cjpf";
|
sha256 = "0gqpisbzyx2xic0drvyqfbd2x2a5qcizl355qkwwibq3v24mx7kp";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -2,19 +2,20 @@
|
||||||
|
|
||||||
buildGoModule rec {
|
buildGoModule rec {
|
||||||
pname = "ipfs";
|
pname = "ipfs";
|
||||||
version = "0.6.0";
|
version = "0.7.0";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
|
|
||||||
# go-ipfs makes changes to it's source tarball that don't match the git source.
|
# go-ipfs makes changes to it's source tarball that don't match the git source.
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://github.com/ipfs/go-ipfs/releases/download/${rev}/go-ipfs-source.tar.gz";
|
url = "https://github.com/ipfs/go-ipfs/releases/download/${rev}/go-ipfs-source.tar.gz";
|
||||||
sha256 = "14bgq2j2bjjy0pspy2lsj5dm3w9rmfha0l8kyq5ig86yhc4nzn80";
|
sha256 = "1fkzwm4qxxpmbjammk6s5qcyjxivfa0ydqz4mpz1w756c4jq0jf3";
|
||||||
};
|
};
|
||||||
|
|
||||||
# tarball contains multiple files/directories
|
# tarball contains multiple files/directories
|
||||||
postUnpack = ''
|
postUnpack = ''
|
||||||
mkdir ipfs-src
|
mkdir ipfs-src
|
||||||
mv * ipfs-src || true
|
shopt -s extglob
|
||||||
|
mv !(ipfs-src) ipfs-src || true
|
||||||
cd ipfs-src
|
cd ipfs-src
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -27,9 +28,9 @@ buildGoModule rec {
|
||||||
vendorSha256 = null;
|
vendorSha256 = null;
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
install -D misc/systemd/ipfs.service $out/etc/systemd/system/ipfs.service
|
install --mode=444 -D misc/systemd/ipfs.service $out/etc/systemd/system/ipfs.service
|
||||||
install -D misc/systemd/ipfs-api.socket $out/etc/systemd/system/ipfs-api.socket
|
install --mode=444 -D misc/systemd/ipfs-api.socket $out/etc/systemd/system/ipfs-api.socket
|
||||||
install -D misc/systemd/ipfs-gateway.socket $out/etc/systemd/system/ipfs-gateway.socket
|
install --mode=444 -D misc/systemd/ipfs-gateway.socket $out/etc/systemd/system/ipfs-gateway.socket
|
||||||
substituteInPlace $out/etc/systemd/system/ipfs.service \
|
substituteInPlace $out/etc/systemd/system/ipfs.service \
|
||||||
--replace /usr/bin/ipfs $out/bin/ipfs
|
--replace /usr/bin/ipfs $out/bin/ipfs
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -10,11 +10,11 @@ assert !withPython;
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "kismet";
|
pname = "kismet";
|
||||||
version = "2020-04-R2";
|
version = "2020-09-R2";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://www.kismetwireless.net/code/${pname}-${version}.tar.xz";
|
url = "https://www.kismetwireless.net/code/${pname}-${version}.tar.xz";
|
||||||
sha256 = "0hxmaln0y6bk9m1rshr4swmg0sqy3ic693vfk8haj7f5gnph96cm";
|
sha256 = "1n6y6sgqf50bng8n0mhs2r1w0ak14mv654sqay72a78wh2s7ywzg";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ pkgconfig ];
|
nativeBuildInputs = [ pkgconfig ];
|
||||||
|
|
|
@ -15,13 +15,13 @@
|
||||||
|
|
||||||
python3Packages.buildPythonApplication rec {
|
python3Packages.buildPythonApplication rec {
|
||||||
pname = "gtg";
|
pname = "gtg";
|
||||||
version = "unstable-2020-08-02";
|
version = "unstable-2020-09-16";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "getting-things-gnome";
|
owner = "getting-things-gnome";
|
||||||
repo = "gtg";
|
repo = "gtg";
|
||||||
rev = "6623731f301c1b9c7b727e009f4a6462ad381c68";
|
rev = "1be991c6d7f7b2e4b8ac16f82e8a07f9dce4272f";
|
||||||
sha256 = "14gxgg4nl0ki3dn913041jpyfhxsj90fkd55z6mmpyklhr8mwss1";
|
sha256 = "1f5acpjwnp08c78dds7xm22qjzcfnx2qs121yvm3rswkh27s4n23";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -2,10 +2,10 @@
|
||||||
, libsoup, gnome3 }:
|
, libsoup, gnome3 }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "homebank-5.4.2";
|
name = "homebank-5.4.3";
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "http://homebank.free.fr/public/${name}.tar.gz";
|
url = "http://homebank.free.fr/public/${name}.tar.gz";
|
||||||
sha256 = "0bkjvd819kw9cwmr3macggbg8yil3yc8v2za8pjrl6g746s89kn6";
|
sha256 = "02wd569viwy6ncy0144z9nxr3zmpl4shkqhz7zzwyky4gknxf8lj";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ pkgconfig wrapGAppsHook ];
|
nativeBuildInputs = [ pkgconfig wrapGAppsHook ];
|
||||||
|
|
|
@ -11,8 +11,15 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
buildInputs = [ zlib ];
|
buildInputs = [ zlib ];
|
||||||
|
|
||||||
|
# it's unclear which headers are intended to be part of the public interface
|
||||||
|
# so we may find ourselves having to add more here over time
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
install -vD bwa $out/bin/bwa
|
install -vD -t $out/bin bwa
|
||||||
|
install -vD -t $out/lib libbwa.a
|
||||||
|
install -vD -t $out/include bntseq.h
|
||||||
|
install -vD -t $out/include bwa.h
|
||||||
|
install -vD -t $out/include bwamem.h
|
||||||
|
install -vD -t $out/include bwt.h
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
|
|
38
pkgs/applications/science/biology/obitools/obitools3.nix
Normal file
38
pkgs/applications/science/biology/obitools/obitools3.nix
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
{ stdenv, fetchurl, python3Packages, cmake, python3 }:
|
||||||
|
|
||||||
|
let
|
||||||
|
pythonPackages = python3Packages;
|
||||||
|
in
|
||||||
|
|
||||||
|
pythonPackages.buildPythonApplication rec {
|
||||||
|
pname = "obitools3";
|
||||||
|
version = "3.0.0-beta14";
|
||||||
|
|
||||||
|
src = fetchurl {
|
||||||
|
url = "https://git.metabarcoding.org/obitools/${pname}/repository/v${version}/archive.tar.gz";
|
||||||
|
sha256 = "17krklxfvxl6baf2m394gm1a88y0lg0bwqx20cf5q39zyw04z442";
|
||||||
|
};
|
||||||
|
|
||||||
|
preBuild = ''
|
||||||
|
substituteInPlace src/CMakeLists.txt --replace \$'{PYTHONLIB}' "$out/lib/${python3.libPrefix}/site-packages";
|
||||||
|
export NIX_CFLAGS_COMPILE="-L $out/lib/${python3.libPrefix}/site-packages $NIX_CFLAGS_COMPILE"
|
||||||
|
'';
|
||||||
|
|
||||||
|
disabled = !pythonPackages.isPy3k;
|
||||||
|
|
||||||
|
nativeBuildInputs = [ pythonPackages.cython cmake ];
|
||||||
|
|
||||||
|
dontConfigure = true;
|
||||||
|
|
||||||
|
doCheck = true;
|
||||||
|
|
||||||
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
|
meta = with stdenv.lib ; {
|
||||||
|
description = "Management of analyses and data in DNA metabarcoding";
|
||||||
|
homepage = "https://git.metabarcoding.org/obitools/obitools3";
|
||||||
|
license = licenses.cecill20;
|
||||||
|
maintainers = [ maintainers.bzizou ];
|
||||||
|
platforms = platforms.all;
|
||||||
|
};
|
||||||
|
}
|
|
@ -2,13 +2,13 @@
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "octopus";
|
pname = "octopus";
|
||||||
version = "0.6.3-beta";
|
version = "0.7.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "luntergroup";
|
owner = "luntergroup";
|
||||||
repo = "octopus";
|
repo = "octopus";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "042fycg8ppld7iajpzq2d8h8wr0nw43zbl57y125sfihryvr373n";
|
sha256 = "0y3g0xc3x3adbcmds6hh60023pfv1qrz6ak7jd88fg9vxi9bdrfb";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake pkg-config ];
|
nativeBuildInputs = [ cmake pkg-config ];
|
||||||
|
|
|
@ -5,13 +5,13 @@
|
||||||
|
|
||||||
python3Packages.buildPythonApplication rec {
|
python3Packages.buildPythonApplication rec {
|
||||||
pname = "truvari";
|
pname = "truvari";
|
||||||
version = "1.3.4";
|
version = "2.0.2";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "spiralgenetics";
|
owner = "spiralgenetics";
|
||||||
repo = "truvari";
|
repo = "truvari";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "1bph7v48s7pyfagz8a2fzl5fycjliqzn5lcbv3m2bp2ih1f1gd1v";
|
sha256 = "0lp1wnldjv92k4ncga1h0icb0dpjsrx427vggg40x04a7kp9lwx0";
|
||||||
};
|
};
|
||||||
|
|
||||||
propagatedBuildInputs = with python3Packages; [
|
propagatedBuildInputs = with python3Packages; [
|
||||||
|
@ -21,15 +21,16 @@ python3Packages.buildPythonApplication rec {
|
||||||
pysam
|
pysam
|
||||||
pyfaidx
|
pyfaidx
|
||||||
intervaltree
|
intervaltree
|
||||||
|
pytabix
|
||||||
|
acebinf
|
||||||
|
bwapy
|
||||||
|
joblib
|
||||||
|
pandas
|
||||||
];
|
];
|
||||||
|
|
||||||
prePatch = ''
|
# no tests
|
||||||
substituteInPlace ./setup.py \
|
doCheck = false;
|
||||||
--replace '"progressbar2==3.41.0",' '"progressbar2",' \
|
pythonImportsCheck = [ "truvari" ];
|
||||||
--replace '"pysam==0.15.2",' '"pysam",' \
|
|
||||||
--replace '"pyfaidx==0.5.5.2",' '"pyfaidx",' \
|
|
||||||
--replace '"intervaltree==3.0.2",' '"intervaltree",'
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Structural variant comparison tool for VCFs";
|
description = "Structural variant comparison tool for VCFs";
|
||||||
|
|
|
@ -17,14 +17,14 @@ let
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
version = "14.31.2";
|
version = "14.31.3";
|
||||||
pname = "jmol";
|
pname = "jmol";
|
||||||
|
|
||||||
src = let
|
src = let
|
||||||
baseVersion = "${lib.versions.major version}.${lib.versions.minor version}";
|
baseVersion = "${lib.versions.major version}.${lib.versions.minor version}";
|
||||||
in fetchurl {
|
in fetchurl {
|
||||||
url = "mirror://sourceforge/jmol/Jmol/Version%20${baseVersion}/Jmol%20${version}/Jmol-${version}-binary.tar.gz";
|
url = "mirror://sourceforge/jmol/Jmol/Version%20${baseVersion}/Jmol%20${version}/Jmol-${version}-binary.tar.gz";
|
||||||
sha256 = "0p2cbzxhw1s4l76kbriag3r4dkpsfvrnydryyikgkbdwnq479hm2";
|
sha256 = "067051wp9kgkgcy3mvqwxhim0h1qfcf4jk8vrbzd3y9pwmjismzy";
|
||||||
};
|
};
|
||||||
|
|
||||||
patchPhase = ''
|
patchPhase = ''
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
diff --git a/avy/CMakeLists.txt b/avy/CMakeLists.txt
|
|
||||||
index 5913076..b0453b5 100644
|
|
||||||
--- a/avy/CMakeLists.txt
|
|
||||||
+++ b/avy/CMakeLists.txt
|
|
||||||
@@ -23,7 +23,6 @@ if (CUSTOM_BOOST_ROOT)
|
|
||||||
set (Boost_NO_SYSTEM_PATHS "ON")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
-set (Boost_USE_STATIC_LIBS ON)
|
|
||||||
find_package (Boost 1.46.1 REQUIRED program_options)
|
|
||||||
IF (Boost_FOUND)
|
|
||||||
include_directories (${Boost_INCLUDE_DIRS})
|
|
|
@ -1,13 +1,13 @@
|
||||||
{ stdenv, fetchgit, cmake, zlib, boost }:
|
{ stdenv, fetchgit, cmake, zlib, boost }:
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation rec {
|
||||||
pname = "avy";
|
pname = "avy";
|
||||||
version = "2017.10.16";
|
version = "2019.05.01"; # date of cav19 tag
|
||||||
|
|
||||||
src = fetchgit {
|
src = fetchgit {
|
||||||
url = "https://bitbucket.org/arieg/extavy";
|
url = "https://bitbucket.org/arieg/extavy";
|
||||||
rev = "c75c83379c38d6ea1046d0caee95aef77283ffe3";
|
rev = "cav19";
|
||||||
sha256 = "0zcycnypg4q5g710bnkjpycaawmibc092vmyhgfbixkgq9fb5lfh";
|
sha256 = "0qdzy9srxp5f38x4dbb3prnr9il6cy0kz80avrvd7fxqzy7wdlwy";
|
||||||
fetchSubmodules = true;
|
fetchSubmodules = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -31,10 +31,6 @@ stdenv.mkDerivation {
|
||||||
patch -p1 -d glucose -i ${./glucose-fenv.patch}
|
patch -p1 -d glucose -i ${./glucose-fenv.patch}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
patches =
|
|
||||||
[ ./0001-no-static-boost-libs.patch
|
|
||||||
];
|
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
cp avy/src/{avy,avybmc} $out/bin/
|
cp avy/src/{avy,avybmc} $out/bin/
|
||||||
|
|
|
@ -13,16 +13,21 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
patches = [ ./cvc3-2.4.1-gccv6-fix.patch ];
|
patches = [ ./cvc3-2.4.1-gccv6-fix.patch ];
|
||||||
|
|
||||||
preConfigure = ''
|
postPatch = ''
|
||||||
sed -e "s@ /bin/bash@bash@g" -i Makefile.std
|
sed -e "s@ /bin/bash@bash@g" -i Makefile.std
|
||||||
find . -exec sed -e "s@/usr/bin/perl@${perl}/bin/perl@g" -i '{}' ';'
|
find . -exec sed -e "s@/usr/bin/perl@${perl}/bin/perl@g" -i '{}' ';'
|
||||||
|
|
||||||
|
# bison 3.7 workaround
|
||||||
|
for f in parsePL parseLisp parsesmtlib parsesmtlib2 ; do
|
||||||
|
ln -s ../parser/''${f}_defs.h src/include/''${f}.hpp
|
||||||
|
done
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "A prover for satisfiability modulo theory (SMT)";
|
description = "A prover for satisfiability modulo theory (SMT)";
|
||||||
maintainers = with maintainers;
|
maintainers = with maintainers;
|
||||||
[ raskin ];
|
[ raskin ];
|
||||||
platforms = platforms.linux;
|
platforms = platforms.unix;
|
||||||
license = licenses.free;
|
license = licenses.free;
|
||||||
homepage = "http://www.cs.nyu.edu/acsys/cvc3/index.html";
|
homepage = "http://www.cs.nyu.edu/acsys/cvc3/index.html";
|
||||||
};
|
};
|
||||||
|
|
|
@ -3,11 +3,11 @@
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
pname = "why3";
|
pname = "why3";
|
||||||
version = "1.3.1";
|
version = "1.3.3";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://gforge.inria.fr/frs/download.php/file/38291/why3-1.3.1.tar.gz";
|
url = "https://gforge.inria.fr/frs/download.php/file/38367/why3-1.3.3.tar.gz";
|
||||||
sha256 = "16zcrc60zz2j3gd3ww93z2z9x2jkxb3kr57y8i5rcgmacy7mw3bv";
|
sha256 = "1n0a2nn1gnk0zg339lh698g4wpk7m8m1vyi2yvifd5adqvk4milw";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = with ocamlPackages; [
|
buildInputs = with ocamlPackages; [
|
||||||
|
|
|
@ -1,23 +1,73 @@
|
||||||
{ callPackage, stdenv, fetchFromGitHub, ...}:
|
{ callPackage, stdenv, fetchFromGitHub, git, zsh, ...}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "gitstatus";
|
pname = "gitstatus";
|
||||||
version = "1.2.2";
|
version = "1.3.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "romkatv";
|
owner = "romkatv";
|
||||||
repo = "gitstatus";
|
repo = "gitstatus";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "1kspz2fhryyjhn6gqf029rv0386a1ga08sf6g0l6smivw628k71l";
|
sha256 = "0zan1sa8c24hpqwj66y9srd4n15f4nk64fc5jrd4smgfgn22wph8";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ (callPackage ./romkatv_libgit2.nix {}) ];
|
buildInputs = [ (callPackage ./romkatv_libgit2.nix {}) ];
|
||||||
patchPhase = ''
|
patchPhase = ''
|
||||||
sed -i "1i GITSTATUS_DAEMON=$out/bin/gitstatusd" gitstatus.plugin.zsh
|
sed -i '1i GITSTATUS_AUTO_INSTALL=''${GITSTATUS_AUTO_INSTALL-0}' gitstatus.plugin.zsh
|
||||||
|
sed -i "1a GITSTATUS_DAEMON=$out/bin/gitstatusd" install
|
||||||
'';
|
'';
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
install -Dm755 usrbin/gitstatusd $out/bin/gitstatusd
|
install -Dm755 usrbin/gitstatusd $out/bin/gitstatusd
|
||||||
install -Dm444 gitstatus.plugin.zsh $out
|
install -Dm444 gitstatus.plugin.zsh $out
|
||||||
|
install -Dm555 install $out
|
||||||
|
install -Dm444 build.info $out
|
||||||
|
'';
|
||||||
|
# Don't install the "install" and "build.info" files, which the end user
|
||||||
|
# should not need to worry about.
|
||||||
|
pathsToLink = [
|
||||||
|
"/bin/gitstatusd"
|
||||||
|
"/gitstatus.plugin.zsh"
|
||||||
|
];
|
||||||
|
|
||||||
|
# The install check sets up an empty Git repository and a minimal zshrc that
|
||||||
|
# invokes gitstatus.plugin.zsh. It runs zsh against this zshrc and verifies
|
||||||
|
# that the script was sourced successfully and that the "gitstatus_query"
|
||||||
|
# command ran successfully. This tests the binary itself and the zsh
|
||||||
|
# integration.
|
||||||
|
installCheckInputs = [ git zsh ];
|
||||||
|
doInstallCheck = true;
|
||||||
|
installCheckPhase = ''
|
||||||
|
TEMP=$(mktemp -d)
|
||||||
|
cd "$TEMP"
|
||||||
|
|
||||||
|
git init
|
||||||
|
|
||||||
|
echo '
|
||||||
|
GITSTATUS_LOG_LEVEL=DEBUG
|
||||||
|
. $out/gitstatus.plugin.zsh || exit 1
|
||||||
|
|
||||||
|
gitstatus_stop NIX_TEST && gitstatus_start NIX_TEST
|
||||||
|
gitstatus_query NIX_TEST
|
||||||
|
if [[ $? -ne 0 ]]; then
|
||||||
|
print -- "Something went wrong with gitstatus"
|
||||||
|
exit 1
|
||||||
|
elif [[ $VCS_STATUS_RESULT != "ok-sync" ]]; then
|
||||||
|
print -- "Not in a Git repo"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
print -- "OK"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
' > .zshrc
|
||||||
|
|
||||||
|
# If we try to run zsh like "zsh -i -c true" or "zsh -i > output" then job
|
||||||
|
# control will be disabled in the shell and the gitstatus plugin script
|
||||||
|
# will fail when it tries to set the MONITOR option. As a workaround, we
|
||||||
|
# run zsh as a full-fledged independent process and then wait for it to
|
||||||
|
# exit. (The "exit" statements in the zshrc ensure that zsh will exit
|
||||||
|
# almost immediately after starting.)
|
||||||
|
ZDOTDIR=. zsh -i &
|
||||||
|
wait $!
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
|
|
|
@ -9,13 +9,13 @@
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "obs-v4l2sink";
|
pname = "obs-v4l2sink";
|
||||||
version = "0.1.0";
|
version = "0.1.0-12-g1ec3c8a";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "CatxFish";
|
owner = "CatxFish";
|
||||||
repo = "obs-v4l2sink";
|
repo = "obs-v4l2sink";
|
||||||
rev = version;
|
rev = version;
|
||||||
sha256 = "0l4lavaywih5lzwgxcbnvdrxhpvkrmh56li06s3aryikngxwsk3z";
|
sha256 = "03ah91cm1qz26k90mfx51l0d598i9bcmw39lkikjs1msm4c9dfxx";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake ];
|
nativeBuildInputs = [ cmake ];
|
||||||
|
|
39
pkgs/applications/video/vcs/default.nix
Normal file
39
pkgs/applications/video/vcs/default.nix
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
{ stdenv, fetchurl, makeWrapper
|
||||||
|
, coreutils, ffmpeg, gawk, gnugrep, gnused, imagemagick, mplayer, utillinux
|
||||||
|
, dejavu_fonts
|
||||||
|
}:
|
||||||
|
with stdenv.lib;
|
||||||
|
let
|
||||||
|
version = "1.13.4";
|
||||||
|
runtimeDeps = [ coreutils ffmpeg gawk gnugrep gnused imagemagick mplayer utillinux ];
|
||||||
|
in
|
||||||
|
stdenv.mkDerivation {
|
||||||
|
pname = "vcs";
|
||||||
|
inherit version;
|
||||||
|
src = fetchurl {
|
||||||
|
url = "http://p.outlyer.net/files/vcs/vcs-${version}.bash";
|
||||||
|
sha256 = "0nhwcpffp3skz24kdfg4445i6j37ks6a0qsbpfd3dbi4vnpa60a0";
|
||||||
|
};
|
||||||
|
|
||||||
|
unpackCmd = "mkdir src; cp $curSrc src/vcs";
|
||||||
|
patches = [ ./fonts.patch ];
|
||||||
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
|
doBuild = false;
|
||||||
|
|
||||||
|
inherit dejavu_fonts;
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out/bin
|
||||||
|
mv vcs $out/bin/vcs
|
||||||
|
substituteAllInPlace $out/bin/vcs
|
||||||
|
chmod +x $out/bin/vcs
|
||||||
|
wrapProgram $out/bin/vcs --argv0 vcs --set PATH "${makeBinPath runtimeDeps}"
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "Generates contact sheets from video files";
|
||||||
|
homepage = "http://p.outlyer.net/vcs";
|
||||||
|
license = licenses.cc-by-nc-sa-30;
|
||||||
|
maintainers = with maintainers; [ elitak ];
|
||||||
|
platforms = with platforms; unix;
|
||||||
|
};
|
||||||
|
}
|
23
pkgs/applications/video/vcs/fonts.patch
Normal file
23
pkgs/applications/video/vcs/fonts.patch
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
--- a/vcs 2020-04-04 14:37:53.531095977 -0700
|
||||||
|
+++ b/vcs 2020-04-04 14:40:46.459407878 -0700
|
||||||
|
@@ -3669,18 +3669,8 @@
|
||||||
|
[[ ( -z $USR_FONT_TITLE ) && ( $FONT_TITLE != 'DejaVu-Sans-Book' ) ]] && return
|
||||||
|
[[ ( -z $USR_FONT_TSTAMPS ) && ( $FONT_TSTAMPS != 'DejaVu-Sans-Book' ) ]] && return
|
||||||
|
[[ ( -z $USR_FONT_SIGN ) && ( $FONT_SIGN != 'DejaVu-Sans-Book' ) ]] && return
|
||||||
|
- # Try to locate DejaVu Sans
|
||||||
|
- local dvs=''
|
||||||
|
- if [[ -d /usr/local/share/fonts ]]; then
|
||||||
|
- dvs=$(find /usr/local/share/fonts/ -type f -iname 'dejavusans.ttf')
|
||||||
|
- fi
|
||||||
|
- if [[ ( -z $dvs ) && ( -d /usr/share/fonts ) ]]; then
|
||||||
|
- dvs=$(find /usr/share/fonts/ -type f -iname 'dejavusans.ttf')
|
||||||
|
- fi
|
||||||
|
- if [[ -z $dvs ]]; then
|
||||||
|
- warn "Unable to locate DejaVu Sans font. Falling back to helvetica."
|
||||||
|
- dvs=helvetica
|
||||||
|
- fi
|
||||||
|
+ # Use DejaVu Sans, by default
|
||||||
|
+ local dvs='@dejavu_fonts@/share/fonts/truetype/DejaVuSans.ttf'
|
||||||
|
[[ -z $USR_FONT_HEADING ]] && FONT_HEADING="$dvs"
|
||||||
|
[[ -z $USR_FONT_TITLE ]] && FONT_TITLE="$dvs"
|
||||||
|
[[ -z $USR_FONT_TSTAMPS ]] && FONT_TSTAMPS="$dvs"
|
|
@ -25,6 +25,7 @@ let
|
||||||
"test_pid.py"
|
"test_pid.py"
|
||||||
"test_pid_file.py"
|
"test_pid_file.py"
|
||||||
"test_preserve_fds.py"
|
"test_preserve_fds.py"
|
||||||
|
"test_resources"
|
||||||
"test_start.py"
|
"test_start.py"
|
||||||
"test_uid_gid.py"
|
"test_uid_gid.py"
|
||||||
"test_update.py"
|
"test_update.py"
|
||||||
|
@ -34,13 +35,13 @@ let
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "crun";
|
pname = "crun";
|
||||||
version = "0.14.1";
|
version = "0.15";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "containers";
|
owner = "containers";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = version;
|
rev = version;
|
||||||
sha256 = "0r77ksdrpxskf79m898a7ai8wxw9fmmsf2lg8fw3ychnk74l8jvh";
|
sha256 = "0cqzk2lm1w0g2v6qhiliq565cf4p7hzh839jb01p3i5cr9kx11kc";
|
||||||
fetchSubmodules = true;
|
fetchSubmodules = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -16,13 +16,13 @@
|
||||||
|
|
||||||
buildGoModule rec {
|
buildGoModule rec {
|
||||||
pname = "podman";
|
pname = "podman";
|
||||||
version = "2.0.6";
|
version = "2.1.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "containers";
|
owner = "containers";
|
||||||
repo = "podman";
|
repo = "podman";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "1kl8cfsqwfbjl14mbp58wrxfm90y2w58x6138zq0sn4jzwwpy1a4";
|
sha256 = "033pdkrmdsk33n1mglpcpl3g9i62raw47wpab752qhbmpy1c49lr";
|
||||||
};
|
};
|
||||||
|
|
||||||
vendorSha256 = null;
|
vendorSha256 = null;
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
, target ? null
|
, target ? null
|
||||||
, cargoVendorDir ? null
|
, cargoVendorDir ? null
|
||||||
, checkType ? buildType
|
, checkType ? buildType
|
||||||
|
, depsExtraArgs ? {}
|
||||||
# Needed to `pushd`/`popd` into a subdir of a tarball if this subdir
|
# Needed to `pushd`/`popd` into a subdir of a tarball if this subdir
|
||||||
# contains a Cargo.toml, but isn't part of a workspace (which is e.g. the
|
# contains a Cargo.toml, but isn't part of a workspace (which is e.g. the
|
||||||
# case for `rustfmt`/etc from the `rust-sources).
|
# case for `rustfmt`/etc from the `rust-sources).
|
||||||
|
@ -43,11 +43,11 @@ assert buildType == "release" || buildType == "debug";
|
||||||
let
|
let
|
||||||
|
|
||||||
cargoDeps = if cargoVendorDir == null
|
cargoDeps = if cargoVendorDir == null
|
||||||
then fetchCargoTarball {
|
then fetchCargoTarball ({
|
||||||
inherit name src srcs sourceRoot unpackPhase cargoUpdateHook;
|
inherit name src srcs sourceRoot unpackPhase cargoUpdateHook;
|
||||||
patches = cargoPatches;
|
patches = cargoPatches;
|
||||||
sha256 = cargoSha256;
|
sha256 = cargoSha256;
|
||||||
}
|
} // depsExtraArgs)
|
||||||
else null;
|
else null;
|
||||||
|
|
||||||
# If we have a cargoSha256 fixed-output derivation, validate it at build time
|
# If we have a cargoSha256 fixed-output derivation, validate it at build time
|
||||||
|
@ -83,7 +83,7 @@ let
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
stdenv.mkDerivation (args // {
|
stdenv.mkDerivation ((removeAttrs args ["depsExtraArgs"]) // {
|
||||||
inherit cargoDeps;
|
inherit cargoDeps;
|
||||||
|
|
||||||
patchRegistryDeps = ./patch-registry-deps;
|
patchRegistryDeps = ./patch-registry-deps;
|
||||||
|
|
|
@ -1,32 +1,44 @@
|
||||||
{ lib, fetchzip }:
|
{ stdenv, fetchzip }:
|
||||||
|
|
||||||
let
|
stdenv.mkDerivation rec {
|
||||||
version = "2.3";
|
pname = "comic-neue";
|
||||||
in fetchzip rec {
|
version = "2.5";
|
||||||
name = "comic-neue-${version}";
|
|
||||||
|
|
||||||
url = "http://comicneue.com/${name}.zip";
|
src = fetchzip {
|
||||||
|
url = "http://comicneue.com/${pname}-${version}.zip";
|
||||||
|
sha256 = "1kc0yyha6cc584vcl9z1cq1z6prgkxk93g75mr8gapfdrj25dp3q";
|
||||||
|
stripRoot = false; # because it comes with a __MACOSX directory
|
||||||
|
};
|
||||||
|
|
||||||
postFetch = ''
|
phases = [ "unpackPhase" "installPhase" ];
|
||||||
mkdir -vp $out/share/{doc,fonts}
|
|
||||||
unzip -j $downloadedFile OTF/\*.otf -d $out/share/fonts/opentype
|
installPhase = ''
|
||||||
unzip -j $downloadedFile Web/\*.ttf -d $out/share/fonts/truetype
|
mkdir -pv $out/share/{doc/${pname}-${version},fonts/{opentype,truetype,EOT,WOFF,WOFF2}}
|
||||||
unzip -j $downloadedFile Web/\*.eot -d $out/share/fonts/EOT
|
cp -v ${pname}-${version}/{FONTLOG,OFL-FAQ,OFL}.txt $out/share/doc/
|
||||||
unzip -j $downloadedFile Web/\*.woff -d $out/share/fonts/WOFF
|
cp -v ${pname}-${version}/OTF/ComicNeue-Angular/*.otf $out/share/fonts/opentype
|
||||||
unzip -j $downloadedFile Web/\*.woff2 -d $out/share/fonts/WOFF2
|
cp -v ${pname}-${version}/OTF/ComicNeue/*.otf $out/share/fonts/opentype
|
||||||
unzip -j $downloadedFile \*.pdf FONTLOG.txt OFL-FAQ.txt SIL-License.txt -d $out/share/doc/${name}
|
cp -v ${pname}-${version}/TTF/ComicNeue-Angular/*.ttf $out/share/fonts/truetype
|
||||||
|
cp -v ${pname}-${version}/TTF/ComicNeue/*.ttf $out/share/fonts/truetype
|
||||||
|
cp -v ${pname}-${version}/WebFonts/eot/ComicNeue-Angular/*.eot $out/share/fonts/EOT
|
||||||
|
cp -v ${pname}-${version}/WebFonts/eot/ComicNeue/*.eot $out/share/fonts/EOT
|
||||||
|
cp -v ${pname}-${version}/WebFonts/woff/ComicNeue-Angular/*.woff $out/share/fonts/WOFF
|
||||||
|
cp -v ${pname}-${version}/WebFonts/woff/ComicNeue/*.woff $out/share/fonts/WOFF
|
||||||
|
cp -v ${pname}-${version}/WebFonts/woff2/ComicNeue/*.woff2 $out/share/fonts/WOFF2
|
||||||
|
|
||||||
|
# Quick fix for conflicting names in upstream
|
||||||
|
for i in ${pname}-${version}/WebFonts/woff2/ComicNeue-Angular/*.woff2; do
|
||||||
|
cp -v $i $out/share/fonts/WOFF2/`basename $i|sed -e 's|ComicNeue|ComicNeue-Angular|'`
|
||||||
|
done
|
||||||
'';
|
'';
|
||||||
|
|
||||||
sha256 = "1gs4vhys0m3qsw06qaxzyi81f06w5v66kbyl64yw3pq2rb656779";
|
meta = with stdenv.lib; {
|
||||||
|
|
||||||
meta = with lib; {
|
|
||||||
homepage = "http://comicneue.com/";
|
homepage = "http://comicneue.com/";
|
||||||
description = "A casual type face: Make your lemonade stand look like a fortune 500 company";
|
description = "A casual type face: Make your lemonade stand look like a fortune 500 company";
|
||||||
longDescription = ''
|
longDescription = ''
|
||||||
It is inspired by Comic Sans but more regular. The font was
|
ComicNeue is inspired by Comic Sans but more regular. It was
|
||||||
designed by Craig Rozynski. It is available in two variants:
|
designed by Craig Rozynski. It is available in two variants:
|
||||||
Comic Neue and Comic Neue Angular. The former having round and
|
Comic Neue and Comic Neue Angular. The former having round and
|
||||||
the latter angular terminals. Both variants come in Light,
|
the latter angular terminals. Both variants come in Light,
|
||||||
Regular, and Bold weights with Oblique variants.
|
Regular, and Bold weights with Oblique variants.
|
||||||
'';
|
'';
|
||||||
license = licenses.ofl;
|
license = licenses.ofl;
|
||||||
|
|
|
@ -13,7 +13,6 @@ stdenv.mkDerivation {
|
||||||
buildInputs = [ chez chez-srfi ];
|
buildInputs = [ chez chez-srfi ];
|
||||||
|
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
export CHEZSCHEMELIBDIRS=${chez-srfi}/lib/csv-site
|
|
||||||
make PREFIX=$out CHEZ=${chez}/bin/scheme
|
make PREFIX=$out CHEZ=${chez}/bin/scheme
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,6 @@ stdenv.mkDerivation {
|
||||||
buildInputs = [ chez chez-srfi chez-mit ];
|
buildInputs = [ chez chez-srfi chez-mit ];
|
||||||
|
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
export CHEZSCHEMELIBDIRS=${chez-srfi}/lib/csv-site:${chez-mit}/lib/csv-site
|
|
||||||
make PREFIX=$out CHEZ=${chez}/bin/scheme
|
make PREFIX=$out CHEZ=${chez}/bin/scheme
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|
|
@ -65,6 +65,8 @@ stdenv.mkDerivation rec {
|
||||||
rm -rf $out/lib/csv${version}/examples
|
rm -rf $out/lib/csv${version}/examples
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
setupHook = ./setup-hook.sh;
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "A powerful and incredibly fast R6RS Scheme compiler";
|
description = "A powerful and incredibly fast R6RS Scheme compiler";
|
||||||
homepage = "https://cisco.github.io/ChezScheme/";
|
homepage = "https://cisco.github.io/ChezScheme/";
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue