Merge remote-tracking branch 'nixpkgs/staging-next' into staging
Conflicts: pkgs/development/compilers/ocaml/4.12.nix pkgs/development/python-modules/oci/default.nix pkgs/tools/admin/bubblewrap/default.nix
This commit is contained in:
commit
d7e181ff83
353 changed files with 10123 additions and 4870 deletions
5
.github/workflows/basic-eval.yml
vendored
5
.github/workflows/basic-eval.yml
vendored
|
@ -16,5 +16,10 @@ jobs:
|
|||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: cachix/install-nix-action@v16
|
||||
- uses: cachix/cachix-action@v10
|
||||
with:
|
||||
# This cache is for the nixpkgs repo checks and should not be trusted or used elsewhere.
|
||||
name: nixpkgs-ci
|
||||
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
|
||||
# explicit list of supportedSystems is needed until aarch64-darwin becomes part of the trunk jobset
|
||||
- run: nix-build pkgs/top-level/release.nix -A tarball.nixpkgs-basic-release-checks --arg supportedSystems '[ "aarch64-darwin" "aarch64-linux" "x86_64-linux" "x86_64-darwin" ]'
|
||||
|
|
2
.github/workflows/manual-nixos.yml
vendored
2
.github/workflows/manual-nixos.yml
vendored
|
@ -24,7 +24,7 @@ jobs:
|
|||
extra_nix_config: sandbox = true
|
||||
- uses: cachix/cachix-action@v10
|
||||
with:
|
||||
# This cache is for the nixos/nixpkgs manual builds and should not be trusted or used elsewhere.
|
||||
# This cache is for the nixpkgs repo checks and should not be trusted or used elsewhere.
|
||||
name: nixpkgs-ci
|
||||
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
|
||||
- name: Building NixOS manual
|
||||
|
|
2
.github/workflows/manual-nixpkgs.yml
vendored
2
.github/workflows/manual-nixpkgs.yml
vendored
|
@ -24,7 +24,7 @@ jobs:
|
|||
extra_nix_config: sandbox = true
|
||||
- uses: cachix/cachix-action@v10
|
||||
with:
|
||||
# This cache is for the nixos/nixpkgs manual builds and should not be trusted or used elsewhere.
|
||||
# This cache is for the nixpkgs repo checks and should not be trusted or used elsewhere.
|
||||
name: nixpkgs-ci
|
||||
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
|
||||
- name: Building Nixpkgs manual
|
||||
|
|
|
@ -1474,7 +1474,7 @@ lib.attrsets.zipAttrsWith
|
|||
<section xml:id="function-library-lib.attrsets.zipAttrs">
|
||||
<title><function>lib.attrsets.zipAttrs</function></title>
|
||||
|
||||
<subtitle><literal>zipAttrsWith :: [ AttrSet ] -> AttrSet</literal>
|
||||
<subtitle><literal>zipAttrs :: [ AttrSet ] -> AttrSet</literal>
|
||||
</subtitle>
|
||||
|
||||
<xi:include href="./locations.xml" xpointer="lib.attrsets.zipAttrs" />
|
||||
|
|
|
@ -38,8 +38,8 @@ Here is a simple package example.
|
|||
|
||||
- It uses the `fetchFromGitHub` fetcher to get its source.
|
||||
|
||||
- `useDune2 = true` ensures that the latest version of Dune is used for the
|
||||
build (this may become the default value in a future release).
|
||||
- `useDune2 = true` ensures that Dune version 2 is used for the
|
||||
build (this is the default; set to `false` to use Dune version 1).
|
||||
|
||||
- It sets the optional `doCheck` attribute such that tests will be run with
|
||||
`dune runtest -p angstrom` after the build (`dune build -p angstrom`) is
|
||||
|
|
|
@ -1688,6 +1688,12 @@
|
|||
githubId = 355401;
|
||||
name = "Brian Hicks";
|
||||
};
|
||||
brianmcgee = {
|
||||
name = "Brian McGee";
|
||||
email = "brian@41north.dev";
|
||||
github = "brianmcgee";
|
||||
githubId = 1173648;
|
||||
};
|
||||
Br1ght0ne = {
|
||||
email = "brightone@protonmail.com";
|
||||
github = "Br1ght0ne";
|
||||
|
@ -5631,6 +5637,12 @@
|
|||
github = "jduan";
|
||||
githubId = 452450;
|
||||
};
|
||||
jdupak = {
|
||||
name = "Jakub Dupak";
|
||||
email = "dev@jakubdupak.com";
|
||||
github = "jdupak";
|
||||
githubId = 22683640;
|
||||
};
|
||||
jecaro = {
|
||||
email = "jeancharles.quillet@gmail.com";
|
||||
github = "jecaro";
|
||||
|
@ -7223,6 +7235,12 @@
|
|||
githubId = 1267527;
|
||||
name = "Daniel Firth";
|
||||
};
|
||||
lodi = {
|
||||
email = "anthony.lodi@gmail.com";
|
||||
github = "lodi";
|
||||
githubId = 918448;
|
||||
name = "Anthony Lodi";
|
||||
};
|
||||
lopsided98 = {
|
||||
email = "benwolsieffer@gmail.com";
|
||||
github = "lopsided98";
|
||||
|
|
|
@ -17,7 +17,8 @@ checks:
|
|||
them and comparing their contents. If they are different but only
|
||||
`X-Reload-Triggers` in the `[Unit]` section is changed, **reload** the unit.
|
||||
The NixOS module system allows setting these triggers with the option
|
||||
[systemd.services.\<name\>.reloadTriggers](#opt-systemd.services). If the
|
||||
[systemd.services.\<name\>.reloadTriggers](#opt-systemd.services). There are
|
||||
some additional keys in the `[Unit]` section that are ignored as well. If the
|
||||
unit files differ in any way, the following actions are performed:
|
||||
|
||||
- `.path` and `.slice` units are ignored. There is no need to restart them
|
||||
|
@ -33,6 +34,9 @@ checks:
|
|||
- The rest of the units (mostly `.service` units) are then **reload**ed if
|
||||
`X-ReloadIfChanged` in the `[Service]` section is set to `true` (exposed
|
||||
via [systemd.services.\<name\>.reloadIfChanged](#opt-systemd.services)).
|
||||
A little exception is done for units that were deactivated in the meantime,
|
||||
for example because they require a unit that got stopped before. These
|
||||
are **start**ed instead of reloaded.
|
||||
|
||||
- If the reload flag is not set, some more flags decide if the unit is
|
||||
skipped. These flags are `X-RestartIfChanged` in the `[Service]` section
|
||||
|
|
|
@ -90,6 +90,17 @@ modules: `systemd.services` (the set of all systemd services) and
|
|||
`systemd.timers` (the list of commands to be executed periodically by
|
||||
`systemd`).
|
||||
|
||||
Care must be taken when writing systemd services using `Exec*` directives. By
|
||||
default systemd performs substitution on `%<char>` specifiers in these
|
||||
directives, expands environment variables from `$FOO` and `${FOO}`, splits
|
||||
arguments on whitespace, and splits commands on `;`. All of these must be escaped
|
||||
to avoid unexpected substitution or splitting when interpolating into an `Exec*`
|
||||
directive, e.g. when using an `extraArgs` option to pass additional arguments to
|
||||
the service. The functions `utils.escapeSystemdExecArg` and
|
||||
`utils.escapeSystemdExecArgs` are provided for this, see [Example: Escaping in
|
||||
Exec directives](#exec-escaping-example) for an example. When using these
|
||||
functions system environment substitution should *not* be disabled explicitly.
|
||||
|
||||
::: {#locate-example .example}
|
||||
::: {.title}
|
||||
**Example: NixOS Module for the "locate" Service**
|
||||
|
@ -153,6 +164,37 @@ in {
|
|||
```
|
||||
:::
|
||||
|
||||
::: {#exec-escaping-example .example}
|
||||
::: {.title}
|
||||
**Example: Escaping in Exec directives**
|
||||
:::
|
||||
```nix
|
||||
{ config, lib, pkgs, utils, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.services.echo;
|
||||
echoAll = pkgs.writeScript "echo-all" ''
|
||||
#! ${pkgs.runtimeShell}
|
||||
for s in "$@"; do
|
||||
printf '%s\n' "$s"
|
||||
done
|
||||
'';
|
||||
args = [ "a%Nything" "lang=\${LANG}" ";" "/bin/sh -c date" ];
|
||||
in {
|
||||
systemd.services.echo =
|
||||
{ description = "Echo to the journal";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
serviceConfig.Type = "oneshot";
|
||||
serviceConfig.ExecStart = ''
|
||||
${echoAll} ${utils.escapeSystemdExecArgs args}
|
||||
'';
|
||||
};
|
||||
}
|
||||
```
|
||||
:::
|
||||
|
||||
```{=docbook}
|
||||
<xi:include href="option-declarations.section.xml" />
|
||||
<xi:include href="option-types.section.xml" />
|
||||
|
|
|
@ -38,8 +38,9 @@
|
|||
<emphasis role="strong">reload</emphasis> the unit. The NixOS
|
||||
module system allows setting these triggers with the option
|
||||
<link linkend="opt-systemd.services">systemd.services.<name>.reloadTriggers</link>.
|
||||
If the unit files differ in any way, the following actions are
|
||||
performed:
|
||||
There are some additional keys in the <literal>[Unit]</literal>
|
||||
section that are ignored as well. If the unit files differ in
|
||||
any way, the following actions are performed:
|
||||
</para>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
|
@ -71,6 +72,11 @@
|
|||
<literal>[Service]</literal> section is set to
|
||||
<literal>true</literal> (exposed via
|
||||
<link linkend="opt-systemd.services">systemd.services.<name>.reloadIfChanged</link>).
|
||||
A little exception is done for units that were deactivated
|
||||
in the meantime, for example because they require a unit
|
||||
that got stopped before. These are
|
||||
<emphasis role="strong">start</emphasis>ed instead of
|
||||
reloaded.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
|
|
|
@ -122,6 +122,25 @@
|
|||
services) and <literal>systemd.timers</literal> (the list of
|
||||
commands to be executed periodically by <literal>systemd</literal>).
|
||||
</para>
|
||||
<para>
|
||||
Care must be taken when writing systemd services using
|
||||
<literal>Exec*</literal> directives. By default systemd performs
|
||||
substitution on <literal>%<char></literal> specifiers in these
|
||||
directives, expands environment variables from
|
||||
<literal>$FOO</literal> and <literal>${FOO}</literal>, splits
|
||||
arguments on whitespace, and splits commands on
|
||||
<literal>;</literal>. All of these must be escaped to avoid
|
||||
unexpected substitution or splitting when interpolating into an
|
||||
<literal>Exec*</literal> directive, e.g. when using an
|
||||
<literal>extraArgs</literal> option to pass additional arguments to
|
||||
the service. The functions
|
||||
<literal>utils.escapeSystemdExecArg</literal> and
|
||||
<literal>utils.escapeSystemdExecArgs</literal> are provided for
|
||||
this, see <link linkend="exec-escaping-example">Example: Escaping in
|
||||
Exec directives</link> for an example. When using these functions
|
||||
system environment substitution should <emphasis>not</emphasis> be
|
||||
disabled explicitly.
|
||||
</para>
|
||||
<anchor xml:id="locate-example" />
|
||||
<para>
|
||||
<emphasis role="strong">Example: NixOS Module for the
|
||||
|
@ -183,6 +202,36 @@ in {
|
|||
};
|
||||
};
|
||||
}
|
||||
</programlisting>
|
||||
<anchor xml:id="exec-escaping-example" />
|
||||
<para>
|
||||
<emphasis role="strong">Example: Escaping in Exec
|
||||
directives</emphasis>
|
||||
</para>
|
||||
<programlisting language="bash">
|
||||
{ config, lib, pkgs, utils, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.services.echo;
|
||||
echoAll = pkgs.writeScript "echo-all" ''
|
||||
#! ${pkgs.runtimeShell}
|
||||
for s in "$@"; do
|
||||
printf '%s\n' "$s"
|
||||
done
|
||||
'';
|
||||
args = [ "a%Nything" "lang=\${LANG}" ";" "/bin/sh -c date" ];
|
||||
in {
|
||||
systemd.services.echo =
|
||||
{ description = "Echo to the journal";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
serviceConfig.Type = "oneshot";
|
||||
serviceConfig.ExecStart = ''
|
||||
${echoAll} ${utils.escapeSystemdExecArgs args}
|
||||
'';
|
||||
};
|
||||
}
|
||||
</programlisting>
|
||||
<xi:include href="option-declarations.section.xml" />
|
||||
<xi:include href="option-types.section.xml" />
|
||||
|
|
|
@ -35,7 +35,17 @@
|
|||
This means, <literal>ip[6]tables</literal>,
|
||||
<literal>arptables</literal> and <literal>ebtables</literal>
|
||||
commands will actually show rules from some specific tables in
|
||||
the <literal>nf_tables</literal> kernel subsystem.
|
||||
the <literal>nf_tables</literal> kernel subsystem. In case
|
||||
you’re migrating from an older release without rebooting,
|
||||
there might be cases where you end up with iptable rules
|
||||
configured both in the legacy <literal>iptables</literal>
|
||||
kernel backend, as well as in the <literal>nf_tables</literal>
|
||||
backend. This can lead to confusing firewall behaviour. An
|
||||
<literal>iptables-save</literal> after switching will complain
|
||||
about <quote>iptables-legacy tables present</quote>. It’s
|
||||
probably best to reboot after the upgrade, or manually
|
||||
removing all legacy iptables rules (via the
|
||||
<literal>iptables-legacy</literal> package).
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
|
|
|
@ -254,6 +254,17 @@
|
|||
<link linkend="opt-services.prosody-filer.enable">services.prosody-filer</link>.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<link xlink:href="https://github.com/rfjakob/systembus-notify">systembus-notify</link>,
|
||||
allow system level notifications to reach the users. Available
|
||||
as
|
||||
<link xlink:href="opt-services.systembus-notify.enable">services.systembus-notify</link>.
|
||||
Please keep in mind that this service should only be enabled
|
||||
on machines with fully trusted users, as any local user is
|
||||
able to DoS user sessions by spamming notifications.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<link xlink:href="https://github.com/audreyt/ethercalc">ethercalc</link>,
|
||||
|
@ -837,6 +848,58 @@
|
|||
include serif fonts.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<literal>pkgs.epgstation</literal> has been upgraded from v1
|
||||
to v2, resulting in incompatible changes in the database
|
||||
scheme and configuration format.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Some top-level settings under
|
||||
<link linkend="opt-services.epgstation.enable">services.epgstation</link>
|
||||
is now deprecated because it was redudant due to the same
|
||||
options being present in
|
||||
<link linkend="opt-services.epgstation.settings">services.epgstation.settings</link>.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
The option <literal>services.epgstation.basicAuth</literal>
|
||||
was removed because basic authentication support was dropped
|
||||
by upstream.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
The option
|
||||
<link linkend="opt-services.epgstation.database.passwordFile">services.epgstation.database.passwordFile</link>
|
||||
no longer has a default value. Make sure to set this option
|
||||
explicitly before upgrading. Change the database password if
|
||||
necessary.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
The
|
||||
<link linkend="opt-services.epgstation.settings">services.epgstation.settings</link>
|
||||
option now expects options for <literal>config.yml</literal>
|
||||
in EPGStation v2.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Existing data for the
|
||||
<link linkend="opt-services.epgstation.enable">services.epgstation</link>
|
||||
module would have to be backed up prior to the upgrade. To
|
||||
back up exising data to
|
||||
<literal>/tmp/epgstation.bak</literal>, run
|
||||
<literal>sudo -u epgstation epgstation run backup /tmp/epgstation.bak</literal>.
|
||||
To import that data after to the upgrade, run
|
||||
<literal>sudo -u epgstation epgstation run v1migrate /tmp/epgstation.bak</literal>
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<literal>switch-to-configuration</literal> (the script that is
|
||||
|
@ -1333,6 +1396,16 @@
|
|||
warning.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
The <literal>pomerium-cli</literal> command has been moved out
|
||||
of the <literal>pomerium</literal> package into the
|
||||
<literal>pomerium-cli</literal> package, following upstream’s
|
||||
repository split. If you are using the
|
||||
<literal>pomerium-cli</literal> command, you should now
|
||||
install the <literal>pomerium-cli</literal> package.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
The option
|
||||
|
|
|
@ -13,6 +13,13 @@ In addition to numerous new and upgraded packages, this release has the followin
|
|||
[Fedora](https://fedoraproject.org/wiki/Changes/iptables-nft-default).
|
||||
This means, `ip[6]tables`, `arptables` and `ebtables` commands will actually
|
||||
show rules from some specific tables in the `nf_tables` kernel subsystem.
|
||||
In case you're migrating from an older release without rebooting, there might
|
||||
be cases where you end up with iptable rules configured both in the legacy
|
||||
`iptables` kernel backend, as well as in the `nf_tables` backend.
|
||||
This can lead to confusing firewall behaviour. An `iptables-save` after
|
||||
switching will complain about "iptables-legacy tables present".
|
||||
It's probably best to reboot after the upgrade, or manually removing all
|
||||
legacy iptables rules (via the `iptables-legacy` package).
|
||||
|
||||
- systemd got an `nftables` backend, and configures (networkd) rules in their
|
||||
own `io.systemd.*` tables. Check `nft list ruleset` to see these rules, not
|
||||
|
|
|
@ -74,6 +74,8 @@ In addition to numerous new and upgraded packages, this release has the followin
|
|||
|
||||
- [prosody-filer](https://github.com/ThomasLeister/prosody-filer), a server for handling XMPP HTTP Upload requests. Available at [services.prosody-filer](#opt-services.prosody-filer.enable).
|
||||
|
||||
- [systembus-notify](https://github.com/rfjakob/systembus-notify), allow system level notifications to reach the users. Available as [services.systembus-notify](opt-services.systembus-notify.enable). Please keep in mind that this service should only be enabled on machines with fully trusted users, as any local user is able to DoS user sessions by spamming notifications.
|
||||
|
||||
- [ethercalc](https://github.com/audreyt/ethercalc), an online collaborative
|
||||
spreadsheet. Available as [services.ethercalc](options.html#opt-services.ethercalc.enable).
|
||||
|
||||
|
@ -325,6 +327,30 @@ In addition to numerous new and upgraded packages, this release has the followin
|
|||
`pkgs.noto-fonts-cjk` is currently an alias of `pkgs.noto-fonts-cjk-sans` and
|
||||
doesn't include serif fonts.
|
||||
|
||||
- `pkgs.epgstation` has been upgraded from v1 to v2, resulting in incompatible
|
||||
changes in the database scheme and configuration format.
|
||||
|
||||
- Some top-level settings under [services.epgstation](#opt-services.epgstation.enable)
|
||||
is now deprecated because it was redudant due to the same options being
|
||||
present in [services.epgstation.settings](#opt-services.epgstation.settings).
|
||||
|
||||
- The option `services.epgstation.basicAuth` was removed because basic
|
||||
authentication support was dropped by upstream.
|
||||
|
||||
- The option [services.epgstation.database.passwordFile](#opt-services.epgstation.database.passwordFile)
|
||||
no longer has a default value. Make sure to set this option explicitly before
|
||||
upgrading. Change the database password if necessary.
|
||||
|
||||
- The [services.epgstation.settings](#opt-services.epgstation.settings)
|
||||
option now expects options for `config.yml` in EPGStation v2.
|
||||
|
||||
- Existing data for the [services.epgstation](#opt-services.epgstation.enable)
|
||||
module would have to be backed up prior to the upgrade. To back up exising
|
||||
data to `/tmp/epgstation.bak`, run
|
||||
`sudo -u epgstation epgstation run backup /tmp/epgstation.bak`.
|
||||
To import that data after to the upgrade, run
|
||||
`sudo -u epgstation epgstation run v1migrate /tmp/epgstation.bak`
|
||||
|
||||
- `switch-to-configuration` (the script that is run when running `nixos-rebuild switch` for example) has been reworked
|
||||
* The interface that allows activation scripts to restart units has been streamlined. Restarting and reloading is now done by a single file `/run/nixos/activation-restart-list` that honors `restartIfChanged` and `reloadIfChanged` of the units.
|
||||
* Preferring to reload instead of restarting can still be achieved using `/run/nixos/activation-reload-list`.
|
||||
|
@ -483,6 +509,11 @@ In addition to numerous new and upgraded packages, this release has the followin
|
|||
Reason is that the old name has been deprecated upstream.
|
||||
Using the old option name will still work, but produce a warning.
|
||||
|
||||
- The `pomerium-cli` command has been moved out of the `pomerium` package into
|
||||
the `pomerium-cli` package, following upstream's repository split. If you are
|
||||
using the `pomerium-cli` command, you should now install the `pomerium-cli`
|
||||
package.
|
||||
|
||||
- The option
|
||||
[services.networking.networkmanager.enableFccUnlock](#opt-networking.networkmanager.enableFccUnlock)
|
||||
was added to support FCC unlock procedures. Since release 1.18.4, the ModemManager
|
||||
|
|
|
@ -45,6 +45,26 @@ rec {
|
|||
replaceChars ["/" "-" " "] ["-" "\\x2d" "\\x20"]
|
||||
(removePrefix "/" s);
|
||||
|
||||
# Quotes an argument for use in Exec* service lines.
|
||||
# systemd accepts "-quoted strings with escape sequences, toJSON produces
|
||||
# a subset of these.
|
||||
# Additionally we escape % to disallow expansion of % specifiers. Any lone ;
|
||||
# in the input will be turned it ";" and thus lose its special meaning.
|
||||
# Every $ is escaped to $$, this makes it unnecessary to disable environment
|
||||
# substitution for the directive.
|
||||
escapeSystemdExecArg = arg:
|
||||
let
|
||||
s = if builtins.isPath arg then "${arg}"
|
||||
else if builtins.isString arg then arg
|
||||
else if builtins.isInt arg || builtins.isFloat arg then toString arg
|
||||
else throw "escapeSystemdExecArg only allows strings, paths and numbers";
|
||||
in
|
||||
replaceChars [ "%" "$" ] [ "%%" "$$" ] (builtins.toJSON s);
|
||||
|
||||
# Quotes a list of arguments into a single string for use in a Exec*
|
||||
# line.
|
||||
escapeSystemdExecArgs = concatMapStringsSep " " escapeSystemdExecArg;
|
||||
|
||||
# Returns a system path for a given shell package
|
||||
toShellPath = shell:
|
||||
if types.shellPackage.check shell then
|
||||
|
|
|
@ -987,6 +987,7 @@
|
|||
./services/system/nscd.nix
|
||||
./services/system/saslauthd.nix
|
||||
./services/system/self-deploy.nix
|
||||
./services/system/systembus-notify.nix
|
||||
./services/system/uptimed.nix
|
||||
./services/torrent/deluge.nix
|
||||
./services/torrent/flexget.nix
|
||||
|
|
|
@ -1,8 +1,12 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.programs.captive-browser;
|
||||
|
||||
inherit (lib)
|
||||
concatStringsSep escapeShellArgs optionalString
|
||||
literalExpression mkEnableOption mkIf mkOption mkOptionDefault types;
|
||||
|
||||
browserDefault = chromium: concatStringsSep " " [
|
||||
''env XDG_CONFIG_HOME="$PREV_CONFIG_HOME"''
|
||||
''${chromium}/bin/chromium''
|
||||
|
@ -15,6 +19,15 @@ let
|
|||
''-no-default-browser-check''
|
||||
''http://cache.nixos.org/''
|
||||
];
|
||||
|
||||
desktopItem = pkgs.makeDesktopItem {
|
||||
name = "captive-browser";
|
||||
desktopName = "Captive Portal Browser";
|
||||
exec = "/run/wrappers/bin/captive-browser";
|
||||
icon = "nix-snowflake";
|
||||
categories = [ "Network" ];
|
||||
};
|
||||
|
||||
in
|
||||
{
|
||||
###### interface
|
||||
|
@ -84,6 +97,11 @@ in
|
|||
###### implementation
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = [
|
||||
(pkgs.runCommandNoCC "captive-browser-desktop-item" { } ''
|
||||
install -Dm444 -t $out/share/applications ${desktopItem}/share/applications/*.desktop
|
||||
'')
|
||||
];
|
||||
|
||||
programs.captive-browser.dhcp-dns =
|
||||
let
|
||||
|
|
|
@ -1,50 +1,46 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
inherit (lib) mkEnableOption mkIf mkOption optionalString types;
|
||||
|
||||
dataDir = "/var/lib/squeezelite";
|
||||
cfg = config.services.squeezelite;
|
||||
pkg = if cfg.pulseAudio then pkgs.squeezelite-pulse else pkgs.squeezelite;
|
||||
bin = "${pkg}/bin/${pkg.pname}";
|
||||
|
||||
in {
|
||||
in
|
||||
{
|
||||
|
||||
###### interface
|
||||
|
||||
options = {
|
||||
options.services.squeezelite = {
|
||||
enable = mkEnableOption "Squeezelite, a software Squeezebox emulator";
|
||||
|
||||
services.squeezelite= {
|
||||
|
||||
enable = mkEnableOption "Squeezelite, a software Squeezebox emulator";
|
||||
|
||||
extraArguments = mkOption {
|
||||
default = "";
|
||||
type = types.str;
|
||||
description = ''
|
||||
Additional command line arguments to pass to Squeezelite.
|
||||
'';
|
||||
};
|
||||
pulseAudio = mkEnableOption "pulseaudio support";
|
||||
|
||||
extraArguments = mkOption {
|
||||
default = "";
|
||||
type = types.str;
|
||||
description = ''
|
||||
Additional command line arguments to pass to Squeezelite.
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
###### implementation
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
systemd.services.squeezelite= {
|
||||
systemd.services.squeezelite = {
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "network.target" "sound.target" ];
|
||||
description = "Software Squeezebox emulator";
|
||||
serviceConfig = {
|
||||
DynamicUser = true;
|
||||
ExecStart = "${pkgs.squeezelite}/bin/squeezelite -N ${dataDir}/player-name ${cfg.extraArguments}";
|
||||
ExecStart = "${bin} -N ${dataDir}/player-name ${cfg.extraArguments}";
|
||||
StateDirectory = builtins.baseNameOf dataDir;
|
||||
SupplementaryGroups = "audio";
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -70,7 +70,8 @@ in
|
|||
LockPersonality = true;
|
||||
|
||||
PrivateTmp = true;
|
||||
PrivateDevices = true;
|
||||
# Disabled to allow Jellyfin to access hw accel devices endpoints
|
||||
# PrivateDevices = true;
|
||||
PrivateUsers = true;
|
||||
|
||||
# Disabled as it does not allow Jellyfin to interface with CUDA devices
|
||||
|
|
|
@ -29,6 +29,7 @@ let
|
|||
"blackbox"
|
||||
"buildkite-agent"
|
||||
"collectd"
|
||||
"dmarc"
|
||||
"dnsmasq"
|
||||
"domain"
|
||||
"dovecot"
|
||||
|
|
117
nixos/modules/services/monitoring/prometheus/exporters/dmarc.nix
Normal file
117
nixos/modules/services/monitoring/prometheus/exporters/dmarc.nix
Normal file
|
@ -0,0 +1,117 @@
|
|||
{ config, lib, pkgs, options }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.services.prometheus.exporters.dmarc;
|
||||
|
||||
json = builtins.toJSON {
|
||||
inherit (cfg) folders port;
|
||||
listen_addr = cfg.listenAddress;
|
||||
storage_path = "$STATE_DIRECTORY";
|
||||
imap = (builtins.removeAttrs cfg.imap [ "passwordFile" ]) // { password = "$IMAP_PASSWORD"; use_ssl = true; };
|
||||
poll_interval_seconds = cfg.pollIntervalSeconds;
|
||||
deduplication_max_seconds = cfg.deduplicationMaxSeconds;
|
||||
logging = {
|
||||
version = 1;
|
||||
disable_existing_loggers = false;
|
||||
};
|
||||
};
|
||||
in {
|
||||
port = 9797;
|
||||
extraOpts = {
|
||||
imap = {
|
||||
host = mkOption {
|
||||
type = types.str;
|
||||
default = "localhost";
|
||||
description = ''
|
||||
Hostname of IMAP server to connect to.
|
||||
'';
|
||||
};
|
||||
port = mkOption {
|
||||
type = types.port;
|
||||
default = 993;
|
||||
description = ''
|
||||
Port of the IMAP server to connect to.
|
||||
'';
|
||||
};
|
||||
username = mkOption {
|
||||
type = types.str;
|
||||
example = "postmaster@example.org";
|
||||
description = ''
|
||||
Login username for the IMAP connection.
|
||||
'';
|
||||
};
|
||||
passwordFile = mkOption {
|
||||
type = types.str;
|
||||
example = "/run/secrets/dovecot_pw";
|
||||
description = ''
|
||||
File containing the login password for the IMAP connection.
|
||||
'';
|
||||
};
|
||||
};
|
||||
folders = {
|
||||
inbox = mkOption {
|
||||
type = types.str;
|
||||
default = "INBOX";
|
||||
description = ''
|
||||
IMAP mailbox that is checked for incoming DMARC aggregate reports
|
||||
'';
|
||||
};
|
||||
done = mkOption {
|
||||
type = types.str;
|
||||
default = "Archive";
|
||||
description = ''
|
||||
IMAP mailbox that successfully processed reports are moved to.
|
||||
'';
|
||||
};
|
||||
error = mkOption {
|
||||
type = types.str;
|
||||
default = "Invalid";
|
||||
description = ''
|
||||
IMAP mailbox that emails are moved to that could not be processed.
|
||||
'';
|
||||
};
|
||||
};
|
||||
pollIntervalSeconds = mkOption {
|
||||
type = types.ints.unsigned;
|
||||
default = 60;
|
||||
description = ''
|
||||
How often to poll the IMAP server in seconds.
|
||||
'';
|
||||
};
|
||||
deduplicationMaxSeconds = mkOption {
|
||||
type = types.ints.unsigned;
|
||||
default = 604800;
|
||||
defaultText = "7 days (in seconds)";
|
||||
description = ''
|
||||
How long individual report IDs will be remembered to avoid
|
||||
counting double delivered reports twice.
|
||||
'';
|
||||
};
|
||||
debug = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Whether to declare enable <literal>--debug</literal>.
|
||||
'';
|
||||
};
|
||||
};
|
||||
serviceOpts = {
|
||||
path = with pkgs; [ envsubst coreutils ];
|
||||
serviceConfig = {
|
||||
StateDirectory = "prometheus-dmarc-exporter";
|
||||
WorkingDirectory = "/var/lib/prometheus-dmarc-exporter";
|
||||
ExecStart = "${pkgs.writeShellScript "setup-cfg" ''
|
||||
export IMAP_PASSWORD="$(<${cfg.imap.passwordFile})"
|
||||
envsubst \
|
||||
-i ${pkgs.writeText "dmarc-exporter.json.template" json} \
|
||||
-o ''${STATE_DIRECTORY}/dmarc-exporter.json
|
||||
|
||||
exec ${pkgs.prometheus-dmarc-exporter}/bin/prometheus-dmarc-exporter \
|
||||
--configuration /var/lib/prometheus-dmarc-exporter/dmarc-exporter.json \
|
||||
${optionalString cfg.debug "--debug"}
|
||||
''}";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -76,7 +76,7 @@ in
|
|||
|
||||
script = ''
|
||||
${pkgs.su}/bin/su -s ${pkgs.runtimeShell} ${user} \
|
||||
-c 'HOME="${cfg.dataDir}" ${pkgs.amuleDaemon}/bin/amuled'
|
||||
-c 'HOME="${cfg.dataDir}" ${pkgs.amule-daemon}/bin/amuled'
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,81 +1,73 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
ecfg = config.services.earlyoom;
|
||||
cfg = config.services.earlyoom;
|
||||
|
||||
inherit (lib)
|
||||
mkDefault mkEnableOption mkIf mkOption types
|
||||
mkRemovedOptionModule
|
||||
concatStringsSep optional;
|
||||
|
||||
in
|
||||
{
|
||||
options = {
|
||||
services.earlyoom = {
|
||||
options.services.earlyoom = {
|
||||
enable = mkEnableOption "Early out of memory killing";
|
||||
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Enable early out of memory killing.
|
||||
'';
|
||||
};
|
||||
freeMemThreshold = mkOption {
|
||||
type = types.ints.between 1 100;
|
||||
default = 10;
|
||||
description = ''
|
||||
Minimum of availabe memory (in percent).
|
||||
If the free memory falls below this threshold and the analog is true for
|
||||
<option>services.earlyoom.freeSwapThreshold</option>
|
||||
the killing begins.
|
||||
'';
|
||||
};
|
||||
|
||||
freeMemThreshold = mkOption {
|
||||
type = types.int;
|
||||
default = 10;
|
||||
description = ''
|
||||
Minimum of availabe memory (in percent).
|
||||
If the free memory falls below this threshold and the analog is true for
|
||||
<option>services.earlyoom.freeSwapThreshold</option>
|
||||
the killing begins.
|
||||
'';
|
||||
};
|
||||
freeSwapThreshold = mkOption {
|
||||
type = types.ints.between 1 100;
|
||||
default = 10;
|
||||
description = ''
|
||||
Minimum of availabe swap space (in percent).
|
||||
If the available swap space falls below this threshold and the analog
|
||||
is true for <option>services.earlyoom.freeMemThreshold</option>
|
||||
the killing begins.
|
||||
'';
|
||||
};
|
||||
|
||||
freeSwapThreshold = mkOption {
|
||||
type = types.int;
|
||||
default = 10;
|
||||
description = ''
|
||||
Minimum of availabe swap space (in percent).
|
||||
If the available swap space falls below this threshold and the analog
|
||||
is true for <option>services.earlyoom.freeMemThreshold</option>
|
||||
the killing begins.
|
||||
'';
|
||||
};
|
||||
# TODO: remove or warn after 1.7 (https://github.com/rfjakob/earlyoom/commit/7ebc4554)
|
||||
ignoreOOMScoreAdjust = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Ignore oom_score_adjust values of processes.
|
||||
'';
|
||||
};
|
||||
|
||||
# TODO: remove or warn after 1.7 (https://github.com/rfjakob/earlyoom/commit/7ebc4554)
|
||||
ignoreOOMScoreAdjust = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Ignore oom_score_adjust values of processes.
|
||||
'';
|
||||
};
|
||||
enableDebugInfo = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Enable debugging messages.
|
||||
'';
|
||||
};
|
||||
|
||||
enableDebugInfo = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Enable debugging messages.
|
||||
'';
|
||||
};
|
||||
enableNotifications = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Send notifications about killed processes via the system d-bus.
|
||||
|
||||
notificationsCommand = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
description = ''
|
||||
This option is deprecated and ignored by earlyoom since 1.6.
|
||||
Use <option>services.earlyoom.enableNotifications</option> instead.
|
||||
'';
|
||||
};
|
||||
WARNING: enabling this option (while convenient) should *not* be done on a
|
||||
machine where you do not trust the other users as it allows any other
|
||||
local user to DoS your session by spamming notifications.
|
||||
|
||||
enableNotifications = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Send notifications about killed processes via the system d-bus.
|
||||
To actually see the notifications in your GUI session, you need to have
|
||||
<literal>systembus-notify</literal> running as your user.
|
||||
To actually see the notifications in your GUI session, you need to have
|
||||
<literal>systembus-notify</literal> running as your user which this
|
||||
option handles.
|
||||
|
||||
See <link xlink:href="https://github.com/rfjakob/earlyoom#notifications">README</link> for details.
|
||||
'';
|
||||
};
|
||||
See <link xlink:href="https://github.com/rfjakob/earlyoom#notifications">README</link> for details.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -83,37 +75,30 @@ in
|
|||
(mkRemovedOptionModule [ "services" "earlyoom" "useKernelOOMKiller" ] ''
|
||||
This option is deprecated and ignored by earlyoom since 1.2.
|
||||
'')
|
||||
(mkRemovedOptionModule [ "services" "earlyoom" "notificationsCommand" ] ''
|
||||
This option is deprecated and ignored by earlyoom since 1.6.
|
||||
'')
|
||||
];
|
||||
|
||||
config = mkIf ecfg.enable {
|
||||
assertions = [
|
||||
{ assertion = ecfg.freeMemThreshold > 0 && ecfg.freeMemThreshold <= 100;
|
||||
message = "Needs to be a positive percentage"; }
|
||||
{ assertion = ecfg.freeSwapThreshold > 0 && ecfg.freeSwapThreshold <= 100;
|
||||
message = "Needs to be a positive percentage"; }
|
||||
];
|
||||
|
||||
# TODO: reimplement this option as -N after 1.7 (https://github.com/rfjakob/earlyoom/commit/afe03606)
|
||||
warnings = optional (ecfg.notificationsCommand != null)
|
||||
"`services.earlyoom.notificationsCommand` is deprecated and ignored by earlyoom since 1.6.";
|
||||
config = mkIf cfg.enable {
|
||||
services.systembus-notify.enable = mkDefault cfg.enableNotifications;
|
||||
|
||||
systemd.services.earlyoom = {
|
||||
description = "Early OOM Daemon for Linux";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
path = optional ecfg.enableNotifications pkgs.dbus;
|
||||
path = optional cfg.enableNotifications pkgs.dbus;
|
||||
serviceConfig = {
|
||||
StandardOutput = "null";
|
||||
StandardError = "journal";
|
||||
ExecStart = concatStringsSep " " ([
|
||||
"${pkgs.earlyoom}/bin/earlyoom"
|
||||
"-m ${toString ecfg.freeMemThreshold}"
|
||||
"-s ${toString ecfg.freeSwapThreshold}"
|
||||
] ++ optional ecfg.ignoreOOMScoreAdjust "-i"
|
||||
++ optional ecfg.enableDebugInfo "-d"
|
||||
++ optional ecfg.enableNotifications "-n");
|
||||
"-m ${toString cfg.freeMemThreshold}"
|
||||
"-s ${toString cfg.freeSwapThreshold}"
|
||||
]
|
||||
++ optional cfg.ignoreOOMScoreAdjust "-i"
|
||||
++ optional cfg.enableDebugInfo "-d"
|
||||
++ optional cfg.enableNotifications "-n"
|
||||
);
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = optional ecfg.enableNotifications pkgs.systembus-notify;
|
||||
};
|
||||
}
|
||||
|
|
27
nixos/modules/services/system/systembus-notify.nix
Normal file
27
nixos/modules/services/system/systembus-notify.nix
Normal file
|
@ -0,0 +1,27 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
cfg = config.services.systembus-notify;
|
||||
|
||||
inherit (lib) mkEnableOption mkIf;
|
||||
|
||||
in
|
||||
{
|
||||
options.services.systembus-notify = {
|
||||
enable = mkEnableOption ''
|
||||
System bus notification support
|
||||
|
||||
WARNING: enabling this option (while convenient) should *not* be done on a
|
||||
machine where you do not trust the other users as it allows any other
|
||||
local user to DoS your session by spamming notifications.
|
||||
'';
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
systemd = {
|
||||
packages = with pkgs; [ systembus-notify ];
|
||||
|
||||
user.services.systembus-notify.wantedBy = [ "graphical-session.target" ];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,30 +1,40 @@
|
|||
{ config, lib, options, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.services.epgstation;
|
||||
opt = options.services.epgstation;
|
||||
|
||||
description = "EPGStation: DVR system for Mirakurun-managed TV tuners";
|
||||
|
||||
username = config.users.users.epgstation.name;
|
||||
groupname = config.users.users.epgstation.group;
|
||||
mirakurun = {
|
||||
sock = config.services.mirakurun.unixSocket;
|
||||
option = options.services.mirakurun.unixSocket;
|
||||
};
|
||||
|
||||
settingsFmt = pkgs.formats.json {};
|
||||
settingsTemplate = settingsFmt.generate "config.json" cfg.settings;
|
||||
yaml = pkgs.formats.yaml { };
|
||||
settingsTemplate = yaml.generate "config.yml" cfg.settings;
|
||||
preStartScript = pkgs.writeScript "epgstation-prestart" ''
|
||||
#!${pkgs.runtimeShell}
|
||||
|
||||
PASSWORD="$(head -n1 "${cfg.basicAuth.passwordFile}")"
|
||||
DB_PASSWORD="$(head -n1 "${cfg.database.passwordFile}")"
|
||||
DB_PASSWORD_FILE=${lib.escapeShellArg cfg.database.passwordFile}
|
||||
|
||||
if [[ ! -f "$DB_PASSWORD_FILE" ]]; then
|
||||
printf "[FATAL] File containing the DB password was not found in '%s'. Double check the NixOS option '%s'." \
|
||||
"$DB_PASSWORD_FILE" ${lib.escapeShellArg opt.database.passwordFile} >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
DB_PASSWORD="$(head -n1 ${lib.escapeShellArg cfg.database.passwordFile})"
|
||||
|
||||
# setup configuration
|
||||
touch /etc/epgstation/config.json
|
||||
chmod 640 /etc/epgstation/config.json
|
||||
touch /etc/epgstation/config.yml
|
||||
chmod 640 /etc/epgstation/config.yml
|
||||
sed \
|
||||
-e "s,@password@,$PASSWORD,g" \
|
||||
-e "s,@dbPassword@,$DB_PASSWORD,g" \
|
||||
${settingsTemplate} > /etc/epgstation/config.json
|
||||
chown "${username}:${groupname}" /etc/epgstation/config.json
|
||||
${settingsTemplate} > /etc/epgstation/config.yml
|
||||
chown "${username}:${groupname}" /etc/epgstation/config.yml
|
||||
|
||||
# NOTE: Use password authentication, since mysqljs does not yet support auth_socket
|
||||
if [ ! -e /var/lib/epgstation/db-created ]; then
|
||||
|
@ -35,7 +45,7 @@ let
|
|||
'';
|
||||
|
||||
streamingConfig = lib.importJSON ./streaming.json;
|
||||
logConfig = {
|
||||
logConfig = yaml.generate "logConfig.yml" {
|
||||
appenders.stdout.type = "stdout";
|
||||
categories = {
|
||||
default = { appenders = [ "stdout" ]; level = "info"; };
|
||||
|
@ -45,53 +55,51 @@ let
|
|||
};
|
||||
};
|
||||
|
||||
defaultPassword = "INSECURE_GO_CHECK_CONFIGURATION_NIX\n";
|
||||
# Deprecate top level options that are redundant.
|
||||
deprecateTopLevelOption = config:
|
||||
lib.mkRenamedOptionModule
|
||||
([ "services" "epgstation" ] ++ config)
|
||||
([ "services" "epgstation" "settings" ] ++ config);
|
||||
|
||||
removeOption = config: instruction:
|
||||
lib.mkRemovedOptionModule
|
||||
([ "services" "epgstation" ] ++ config)
|
||||
instruction;
|
||||
in
|
||||
{
|
||||
options.services.epgstation = {
|
||||
enable = mkEnableOption "EPGStation: DTV Software in Japan";
|
||||
meta.maintainers = with lib.maintainers; [ midchildan ];
|
||||
|
||||
usePreconfiguredStreaming = mkOption {
|
||||
type = types.bool;
|
||||
imports = [
|
||||
(deprecateTopLevelOption [ "port" ])
|
||||
(deprecateTopLevelOption [ "socketioPort" ])
|
||||
(deprecateTopLevelOption [ "clientSocketioPort" ])
|
||||
(removeOption [ "basicAuth" ]
|
||||
"Use a TLS-terminated reverse proxy with authentication instead.")
|
||||
];
|
||||
|
||||
options.services.epgstation = {
|
||||
enable = lib.mkEnableOption description;
|
||||
|
||||
package = lib.mkOption {
|
||||
default = pkgs.epgstation;
|
||||
type = lib.types.package;
|
||||
defaultText = lib.literalExpression "pkgs.epgstation";
|
||||
description = "epgstation package to use";
|
||||
};
|
||||
|
||||
usePreconfiguredStreaming = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
description = ''
|
||||
Use preconfigured default streaming options.
|
||||
|
||||
Upstream defaults:
|
||||
<link xlink:href="https://github.com/l3tnun/EPGStation/blob/master/config/config.sample.json"/>
|
||||
<link xlink:href="https://github.com/l3tnun/EPGStation/blob/master/config/config.yml.template"/>
|
||||
'';
|
||||
};
|
||||
|
||||
port = mkOption {
|
||||
type = types.port;
|
||||
default = 20772;
|
||||
description = ''
|
||||
HTTP port for EPGStation to listen on.
|
||||
'';
|
||||
};
|
||||
|
||||
socketioPort = mkOption {
|
||||
type = types.port;
|
||||
default = cfg.port + 1;
|
||||
defaultText = literalExpression "config.${opt.port} + 1";
|
||||
description = ''
|
||||
Socket.io port for EPGStation to listen on.
|
||||
'';
|
||||
};
|
||||
|
||||
clientSocketioPort = mkOption {
|
||||
type = types.port;
|
||||
default = cfg.socketioPort;
|
||||
defaultText = literalExpression "config.${opt.socketioPort}";
|
||||
description = ''
|
||||
Socket.io port that the web client is going to connect to. This may be
|
||||
different from <option>socketioPort</option> if EPGStation is hidden
|
||||
behind a reverse proxy.
|
||||
'';
|
||||
};
|
||||
|
||||
openFirewall = mkOption {
|
||||
type = types.bool;
|
||||
openFirewall = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Open ports in the firewall for the EPGStation web interface.
|
||||
|
@ -106,50 +114,17 @@ in
|
|||
'';
|
||||
};
|
||||
|
||||
basicAuth = {
|
||||
user = mkOption {
|
||||
type = with types; nullOr str;
|
||||
default = null;
|
||||
example = "epgstation";
|
||||
description = ''
|
||||
Basic auth username for EPGStation. If <literal>null</literal>, basic
|
||||
auth will be disabled.
|
||||
|
||||
<warning>
|
||||
<para>
|
||||
Basic authentication has known weaknesses, the most critical being
|
||||
that it sends passwords over the network in clear text. Use this
|
||||
feature to control access to EPGStation within your family and
|
||||
friends, but don't rely on it for security.
|
||||
</para>
|
||||
</warning>
|
||||
'';
|
||||
};
|
||||
|
||||
passwordFile = mkOption {
|
||||
type = types.path;
|
||||
default = pkgs.writeText "epgstation-password" defaultPassword;
|
||||
defaultText = literalDocBook ''a file containing <literal>${defaultPassword}</literal>'';
|
||||
example = "/run/keys/epgstation-password";
|
||||
description = ''
|
||||
A file containing the password for <option>basicAuth.user</option>.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
database = {
|
||||
name = mkOption {
|
||||
type = types.str;
|
||||
database = {
|
||||
name = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "epgstation";
|
||||
description = ''
|
||||
Name of the MySQL database that holds EPGStation's data.
|
||||
'';
|
||||
};
|
||||
|
||||
passwordFile = mkOption {
|
||||
type = types.path;
|
||||
default = pkgs.writeText "epgstation-db-password" defaultPassword;
|
||||
defaultText = literalDocBook ''a file containing <literal>${defaultPassword}</literal>'';
|
||||
passwordFile = lib.mkOption {
|
||||
type = lib.types.path;
|
||||
example = "/run/keys/epgstation-db-password";
|
||||
description = ''
|
||||
A file containing the password for the database named
|
||||
|
@ -158,69 +133,106 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
settings = mkOption {
|
||||
# The defaults for some options come from the upstream template
|
||||
# configuration, which is the one that users would get if they follow the
|
||||
# upstream instructions. This is, in some cases, different from the
|
||||
# application defaults. Some options like encodeProcessNum and
|
||||
# concurrentEncodeNum doesn't have an optimal default value that works for
|
||||
# all hardware setups and/or performance requirements. For those kind of
|
||||
# options, the application default wouldn't always result in the expected
|
||||
# out-of-the-box behavior because it's the responsibility of the user to
|
||||
# configure them according to their needs. In these cases, the value in the
|
||||
# upstream template configuration should serve as a "good enough" default.
|
||||
settings = lib.mkOption {
|
||||
description = ''
|
||||
Options to add to config.json.
|
||||
Options to add to config.yml.
|
||||
|
||||
Documentation:
|
||||
<link xlink:href="https://github.com/l3tnun/EPGStation/blob/master/doc/conf-manual.md"/>
|
||||
'';
|
||||
|
||||
default = {};
|
||||
default = { };
|
||||
example = {
|
||||
recPriority = 20;
|
||||
conflictPriority = 10;
|
||||
};
|
||||
|
||||
type = types.submodule {
|
||||
freeformType = settingsFmt.type;
|
||||
type = lib.types.submodule {
|
||||
freeformType = yaml.type;
|
||||
|
||||
options.readOnlyOnce = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = "Don't reload configuration files at runtime.";
|
||||
options.port = lib.mkOption {
|
||||
type = lib.types.port;
|
||||
default = 20772;
|
||||
description = ''
|
||||
HTTP port for EPGStation to listen on.
|
||||
'';
|
||||
};
|
||||
|
||||
options.mirakurunPath = mkOption (let
|
||||
sockPath = config.services.mirakurun.unixSocket;
|
||||
in {
|
||||
type = types.str;
|
||||
default = "http+unix://${replaceStrings ["/"] ["%2F"] sockPath}";
|
||||
defaultText = literalExpression ''
|
||||
"http+unix://''${replaceStrings ["/"] ["%2F"] config.${options.services.mirakurun.unixSocket}}"
|
||||
options.socketioPort = lib.mkOption {
|
||||
type = lib.types.port;
|
||||
default = cfg.settings.port + 1;
|
||||
defaultText = lib.literalExpression "config.${opt.settings}.port + 1";
|
||||
description = ''
|
||||
Socket.io port for EPGStation to listen on. It is valid to share
|
||||
ports with <option>${opt.settings}.port</option>.
|
||||
'';
|
||||
};
|
||||
|
||||
options.clientSocketioPort = lib.mkOption {
|
||||
type = lib.types.port;
|
||||
default = cfg.settings.socketioPort;
|
||||
defaultText = lib.literalExpression "config.${opt.settings}.socketioPort";
|
||||
description = ''
|
||||
Socket.io port that the web client is going to connect to. This may
|
||||
be different from <option>${opt.settings}.socketioPort</option> if
|
||||
EPGStation is hidden behind a reverse proxy.
|
||||
'';
|
||||
};
|
||||
|
||||
options.mirakurunPath = with mirakurun; lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "http+unix://${lib.replaceStrings ["/"] ["%2F"] sock}";
|
||||
defaultText = lib.literalExpression ''
|
||||
"http+unix://''${lib.replaceStrings ["/"] ["%2F"] config.${option}}"
|
||||
'';
|
||||
example = "http://localhost:40772";
|
||||
description = "URL to connect to Mirakurun.";
|
||||
});
|
||||
};
|
||||
|
||||
options.encode = mkOption {
|
||||
type = with types; listOf attrs;
|
||||
options.encodeProcessNum = lib.mkOption {
|
||||
type = lib.types.ints.positive;
|
||||
default = 4;
|
||||
description = ''
|
||||
The maximum number of processes that EPGStation would allow to run
|
||||
at the same time for encoding or streaming videos.
|
||||
'';
|
||||
};
|
||||
|
||||
options.concurrentEncodeNum = lib.mkOption {
|
||||
type = lib.types.ints.positive;
|
||||
default = 1;
|
||||
description = ''
|
||||
The maximum number of encoding jobs that EPGStation would run at the
|
||||
same time.
|
||||
'';
|
||||
};
|
||||
|
||||
options.encode = lib.mkOption {
|
||||
type = with lib.types; listOf attrs;
|
||||
description = "Encoding presets for recorded videos.";
|
||||
default = [
|
||||
{
|
||||
name = "H264";
|
||||
cmd = "${pkgs.epgstation}/libexec/enc.sh main";
|
||||
name = "H.264";
|
||||
cmd = "%NODE% ${cfg.package}/libexec/enc.js";
|
||||
suffix = ".mp4";
|
||||
default = true;
|
||||
}
|
||||
{
|
||||
name = "H264-sub";
|
||||
cmd = "${pkgs.epgstation}/libexec/enc.sh sub";
|
||||
suffix = "-sub.mp4";
|
||||
}
|
||||
];
|
||||
defaultText = literalExpression ''
|
||||
defaultText = lib.literalExpression ''
|
||||
[
|
||||
{
|
||||
name = "H264";
|
||||
cmd = "''${pkgs.epgstation}/libexec/enc.sh main";
|
||||
name = "H.264";
|
||||
cmd = "%NODE% config.${opt.package}/libexec/enc.js";
|
||||
suffix = ".mp4";
|
||||
default = true;
|
||||
}
|
||||
{
|
||||
name = "H264-sub";
|
||||
cmd = "''${pkgs.epgstation}/libexec/enc.sh sub";
|
||||
suffix = "-sub.mp4";
|
||||
}
|
||||
]
|
||||
'';
|
||||
|
@ -229,14 +241,25 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
config = lib.mkIf cfg.enable {
|
||||
assertions = [
|
||||
{
|
||||
assertion = !(lib.hasAttr "readOnlyOnce" cfg.settings);
|
||||
message = ''
|
||||
The option config.${opt.settings}.readOnlyOnce can no longer be used
|
||||
since it's been removed. No replacements are available.
|
||||
'';
|
||||
}
|
||||
];
|
||||
|
||||
environment.etc = {
|
||||
"epgstation/operatorLogConfig.json".text = builtins.toJSON logConfig;
|
||||
"epgstation/serviceLogConfig.json".text = builtins.toJSON logConfig;
|
||||
"epgstation/epgUpdaterLogConfig.yml".source = logConfig;
|
||||
"epgstation/operatorLogConfig.yml".source = logConfig;
|
||||
"epgstation/serviceLogConfig.yml".source = logConfig;
|
||||
};
|
||||
|
||||
networking.firewall = mkIf cfg.openFirewall {
|
||||
allowedTCPPorts = with cfg; [ port socketioPort ];
|
||||
networking.firewall = lib.mkIf cfg.openFirewall {
|
||||
allowedTCPPorts = with cfg.settings; [ port socketioPort ];
|
||||
};
|
||||
|
||||
users.users.epgstation = {
|
||||
|
@ -245,13 +268,13 @@ in
|
|||
isSystemUser = true;
|
||||
};
|
||||
|
||||
users.groups.epgstation = {};
|
||||
users.groups.epgstation = { };
|
||||
|
||||
services.mirakurun.enable = mkDefault true;
|
||||
services.mirakurun.enable = lib.mkDefault true;
|
||||
|
||||
services.mysql = {
|
||||
enable = mkDefault true;
|
||||
package = mkDefault pkgs.mariadb;
|
||||
enable = lib.mkDefault true;
|
||||
package = lib.mkDefault pkgs.mariadb;
|
||||
ensureDatabases = [ cfg.database.name ];
|
||||
# FIXME: enable once mysqljs supports auth_socket
|
||||
# ensureUsers = [ {
|
||||
|
@ -260,39 +283,28 @@ in
|
|||
# } ];
|
||||
};
|
||||
|
||||
services.epgstation.settings = let
|
||||
defaultSettings = {
|
||||
serverPort = cfg.port;
|
||||
socketioPort = cfg.socketioPort;
|
||||
clientSocketioPort = cfg.clientSocketioPort;
|
||||
services.epgstation.settings =
|
||||
let
|
||||
defaultSettings = {
|
||||
dbtype = lib.mkDefault "mysql";
|
||||
mysql = {
|
||||
socketPath = lib.mkDefault "/run/mysqld/mysqld.sock";
|
||||
user = username;
|
||||
password = lib.mkDefault "@dbPassword@";
|
||||
database = cfg.database.name;
|
||||
};
|
||||
|
||||
dbType = mkDefault "mysql";
|
||||
mysql = {
|
||||
user = username;
|
||||
database = cfg.database.name;
|
||||
socketPath = mkDefault "/run/mysqld/mysqld.sock";
|
||||
password = mkDefault "@dbPassword@";
|
||||
connectTimeout = mkDefault 1000;
|
||||
connectionLimit = mkDefault 10;
|
||||
ffmpeg = lib.mkDefault "${pkgs.ffmpeg-full}/bin/ffmpeg";
|
||||
ffprobe = lib.mkDefault "${pkgs.ffmpeg-full}/bin/ffprobe";
|
||||
|
||||
# for disambiguation with TypeScript files
|
||||
recordedFileExtension = lib.mkDefault ".m2ts";
|
||||
};
|
||||
|
||||
basicAuth = mkIf (cfg.basicAuth.user != null) {
|
||||
user = mkDefault cfg.basicAuth.user;
|
||||
password = mkDefault "@password@";
|
||||
};
|
||||
|
||||
ffmpeg = mkDefault "${pkgs.ffmpeg-full}/bin/ffmpeg";
|
||||
ffprobe = mkDefault "${pkgs.ffmpeg-full}/bin/ffprobe";
|
||||
|
||||
fileExtension = mkDefault ".m2ts";
|
||||
maxEncode = mkDefault 2;
|
||||
maxStreaming = mkDefault 2;
|
||||
};
|
||||
in
|
||||
mkMerge [
|
||||
defaultSettings
|
||||
(mkIf cfg.usePreconfiguredStreaming streamingConfig)
|
||||
];
|
||||
in
|
||||
lib.mkMerge [
|
||||
defaultSettings
|
||||
(lib.mkIf cfg.usePreconfiguredStreaming streamingConfig)
|
||||
];
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
"d '/var/lib/epgstation/streamfiles' - ${username} ${groupname} - -"
|
||||
|
@ -301,15 +313,15 @@ in
|
|||
];
|
||||
|
||||
systemd.services.epgstation = {
|
||||
description = pkgs.epgstation.meta.description;
|
||||
inherit description;
|
||||
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [
|
||||
"network.target"
|
||||
] ++ optional config.services.mirakurun.enable "mirakurun.service"
|
||||
++ optional config.services.mysql.enable "mysql.service";
|
||||
after = [ "network.target" ]
|
||||
++ lib.optional config.services.mirakurun.enable "mirakurun.service"
|
||||
++ lib.optional config.services.mysql.enable "mysql.service";
|
||||
|
||||
serviceConfig = {
|
||||
ExecStart = "${pkgs.epgstation}/bin/epgstation start";
|
||||
ExecStart = "${cfg.package}/bin/epgstation start";
|
||||
ExecStartPre = "+${preStartScript}";
|
||||
User = username;
|
||||
Group = groupname;
|
||||
|
|
|
@ -1,119 +1,140 @@
|
|||
{
|
||||
"liveHLS": [
|
||||
{
|
||||
"name": "720p",
|
||||
"cmd": "%FFMPEG% -re -dual_mono_mode main -i pipe:0 -sn -threads 0 -map 0 -ignore_unknown -max_muxing_queue_size 1024 -f hls -hls_time 3 -hls_list_size 17 -hls_allow_cache 1 -hls_segment_filename %streamFileDir%/stream%streamNum%-%09d.ts -c:a aac -ar 48000 -b:a 192k -ac 2 -c:v libx264 -vf yadif,scale=-2:720 -b:v 3000k -preset veryfast -flags +loop-global_header %OUTPUT%"
|
||||
"urlscheme": {
|
||||
"m2ts": {
|
||||
"ios": "vlc-x-callback://x-callback-url/stream?url=PROTOCOL://ADDRESS",
|
||||
"android": "intent://ADDRESS#Intent;package=org.videolan.vlc;type=video;scheme=PROTOCOL;end"
|
||||
},
|
||||
{
|
||||
"name": "480p",
|
||||
"cmd": "%FFMPEG% -re -dual_mono_mode main -i pipe:0 -sn -threads 0 -map 0 -ignore_unknown -max_muxing_queue_size 1024 -f hls -hls_time 3 -hls_list_size 17 -hls_allow_cache 1 -hls_segment_filename %streamFileDir%/stream%streamNum%-%09d.ts -c:a aac -ar 48000 -b:a 128k -ac 2 -c:v libx264 -vf yadif,scale=-2:480 -b:v 1500k -preset veryfast -flags +loop-global_header %OUTPUT%"
|
||||
"video": {
|
||||
"ios": "infuse://x-callback-url/play?url=PROTOCOL://ADDRESS",
|
||||
"android": "intent://ADDRESS#Intent;package=com.mxtech.videoplayer.ad;type=video;scheme=PROTOCOL;end"
|
||||
},
|
||||
{
|
||||
"name": "180p",
|
||||
"cmd": "%FFMPEG% -re -dual_mono_mode main -i pipe:0 -sn -threads 0 -map 0 -ignore_unknown -max_muxing_queue_size 1024 -f hls -hls_time 3 -hls_list_size 17 -hls_allow_cache 1 -hls_segment_filename %streamFileDir%/stream%streamNum%-%09d.ts -c:a aac -ar 48000 -b:a 48k -ac 2 -c:v libx264 -vf yadif,scale=-2:180 -b:v 100k -preset veryfast -maxrate 110k -bufsize 1000k -flags +loop-global_header %OUTPUT%"
|
||||
"download": {
|
||||
"ios": "vlc-x-callback://x-callback-url/download?url=PROTOCOL://ADDRESS&filename=FILENAME"
|
||||
}
|
||||
],
|
||||
"liveMP4": [
|
||||
{
|
||||
"name": "720p",
|
||||
"cmd": "%FFMPEG% -re -dual_mono_mode main -i pipe:0 -sn -threads 0 -c:a aac -ar 48000 -b:a 192k -ac 2 -c:v libx264 -vf yadif,scale=-2:720 -b:v 3000k -profile:v baseline -preset veryfast -tune fastdecode,zerolatency -movflags frag_keyframe+empty_moov+faststart+default_base_moof -y -f mp4 pipe:1"
|
||||
},
|
||||
{
|
||||
"name": "480p",
|
||||
"cmd": "%FFMPEG% -re -dual_mono_mode main -i pipe:0 -sn -threads 0 -c:a aac -ar 48000 -b:a 128k -ac 2 -c:v libx264 -vf yadif,scale=-2:480 -b:v 1500k -profile:v baseline -preset veryfast -tune fastdecode,zerolatency -movflags frag_keyframe+empty_moov+faststart+default_base_moof -y -f mp4 pipe:1"
|
||||
}
|
||||
],
|
||||
"liveWebM": [
|
||||
{
|
||||
"name": "720p",
|
||||
"cmd": "%FFMPEG% -re -dual_mono_mode main -i pipe:0 -sn -threads 3 -c:a libvorbis -ar 48000 -b:a 192k -ac 2 -c:v libvpx-vp9 -vf yadif,scale=-2:720 -b:v 3000k -deadline realtime -speed 4 -cpu-used -8 -y -f webm pipe:1"
|
||||
},
|
||||
{
|
||||
"name": "480p",
|
||||
"cmd": "%FFMPEG% -re -dual_mono_mode main -i pipe:0 -sn -threads 2 -c:a libvorbis -ar 48000 -b:a 128k -ac 2 -c:v libvpx-vp9 -vf yadif,scale=-2:480 -b:v 1500k -deadline realtime -speed 4 -cpu-used -8 -y -f webm pipe:1"
|
||||
}
|
||||
],
|
||||
"mpegTsStreaming": [
|
||||
{
|
||||
"name": "720p",
|
||||
"cmd": "%FFMPEG% -re -dual_mono_mode main -i pipe:0 -sn -threads 0 -c:a aac -ar 48000 -b:a 192k -ac 2 -c:v libx264 -vf yadif,scale=-2:720 -b:v 3000k -preset veryfast -y -f mpegts pipe:1"
|
||||
},
|
||||
{
|
||||
"name": "480p",
|
||||
"cmd": "%FFMPEG% -re -dual_mono_mode main -i pipe:0 -sn -threads 0 -c:a aac -ar 48000 -b:a 128k -ac 2 -c:v libx264 -vf yadif,scale=-2:480 -b:v 1500k -preset veryfast -y -f mpegts pipe:1"
|
||||
},
|
||||
{
|
||||
"name": "Original"
|
||||
}
|
||||
],
|
||||
"mpegTsViewer": {
|
||||
"ios": "vlc-x-callback://x-callback-url/stream?url=http://ADDRESS",
|
||||
"android": "intent://ADDRESS#Intent;package=com.mxtech.videoplayer.ad;type=video;scheme=http;end"
|
||||
},
|
||||
"recordedDownloader": {
|
||||
"ios": "vlc-x-callback://x-callback-url/download?url=http://ADDRESS&filename=FILENAME",
|
||||
"android": "intent://ADDRESS#Intent;package=com.dv.adm;type=video;scheme=http;end"
|
||||
},
|
||||
"recordedStreaming": {
|
||||
"webm": [
|
||||
{
|
||||
"name": "720p",
|
||||
"cmd": "%FFMPEG% -dual_mono_mode main %RE% -i pipe:0 -sn -threads 3 -c:a libvorbis -ar 48000 -ac 2 -c:v libvpx-vp9 -vf yadif,scale=-2:720 %VB% %VBUFFER% %AB% %ABUFFER% -deadline realtime -speed 4 -cpu-used -8 -y -f webm pipe:1",
|
||||
"vb": "3000k",
|
||||
"ab": "192k"
|
||||
},
|
||||
{
|
||||
"name": "360p",
|
||||
"cmd": "%FFMPEG% -dual_mono_mode main %RE% -i pipe:0 -sn -threads 2 -c:a libvorbis -ar 48000 -ac 2 -c:v libvpx-vp9 -vf yadif,scale=-2:360 %VB% %VBUFFER% %AB% %ABUFFER% -deadline realtime -speed 4 -cpu-used -8 -y -f webm pipe:1",
|
||||
"vb": "1500k",
|
||||
"ab": "128k"
|
||||
"stream": {
|
||||
"live": {
|
||||
"ts": {
|
||||
"m2ts": [
|
||||
{
|
||||
"name": "720p",
|
||||
"cmd": "%FFMPEG% -re -dual_mono_mode main -i pipe:0 -sn -threads 0 -c:a aac -ar 48000 -b:a 192k -ac 2 -c:v libx264 -vf yadif,scale=-2:720 -b:v 3000k -preset veryfast -y -f mpegts pipe:1"
|
||||
},
|
||||
{
|
||||
"name": "480p",
|
||||
"cmd": "%FFMPEG% -re -dual_mono_mode main -i pipe:0 -sn -threads 0 -c:a aac -ar 48000 -b:a 128k -ac 2 -c:v libx264 -vf yadif,scale=-2:480 -b:v 1500k -preset veryfast -y -f mpegts pipe:1"
|
||||
},
|
||||
{
|
||||
"name": "無変換"
|
||||
}
|
||||
],
|
||||
"m2tsll": [
|
||||
{
|
||||
"name": "720p",
|
||||
"cmd": "%FFMPEG% -dual_mono_mode main -f mpegts -analyzeduration 500000 -i pipe:0 -map 0 -c:s copy -c:d copy -ignore_unknown -fflags nobuffer -flags low_delay -max_delay 250000 -max_interleave_delta 1 -threads 0 -c:a aac -ar 48000 -b:a 192k -ac 2 -c:v libx264 -flags +cgop -vf yadif,scale=-2:720 -b:v 3000k -preset veryfast -y -f mpegts pipe:1"
|
||||
},
|
||||
{
|
||||
"name": "480p",
|
||||
"cmd": "%FFMPEG% -dual_mono_mode main -f mpegts -analyzeduration 500000 -i pipe:0 -map 0 -c:s copy -c:d copy -ignore_unknown -fflags nobuffer -flags low_delay -max_delay 250000 -max_interleave_delta 1 -threads 0 -c:a aac -ar 48000 -b:a 128k -ac 2 -c:v libx264 -flags +cgop -vf yadif,scale=-2:480 -b:v 1500k -preset veryfast -y -f mpegts pipe:1"
|
||||
}
|
||||
],
|
||||
"webm": [
|
||||
{
|
||||
"name": "720p",
|
||||
"cmd": "%FFMPEG% -re -dual_mono_mode main -i pipe:0 -sn -threads 3 -c:a libvorbis -ar 48000 -b:a 192k -ac 2 -c:v libvpx-vp9 -vf yadif,scale=-2:720 -b:v 3000k -deadline realtime -speed 4 -cpu-used -8 -y -f webm pipe:1"
|
||||
},
|
||||
{
|
||||
"name": "480p",
|
||||
"cmd": "%FFMPEG% -re -dual_mono_mode main -i pipe:0 -sn -threads 2 -c:a libvorbis -ar 48000 -b:a 128k -ac 2 -c:v libvpx-vp9 -vf yadif,scale=-2:480 -b:v 1500k -deadline realtime -speed 4 -cpu-used -8 -y -f webm pipe:1"
|
||||
}
|
||||
],
|
||||
"mp4": [
|
||||
{
|
||||
"name": "720p",
|
||||
"cmd": "%FFMPEG% -re -dual_mono_mode main -i pipe:0 -sn -threads 0 -c:a aac -ar 48000 -b:a 192k -ac 2 -c:v libx264 -vf yadif,scale=-2:720 -b:v 3000k -profile:v baseline -preset veryfast -tune fastdecode,zerolatency -movflags frag_keyframe+empty_moov+faststart+default_base_moof -y -f mp4 pipe:1"
|
||||
},
|
||||
{
|
||||
"name": "480p",
|
||||
"cmd": "%FFMPEG% -re -dual_mono_mode main -i pipe:0 -sn -threads 0 -c:a aac -ar 48000 -b:a 128k -ac 2 -c:v libx264 -vf yadif,scale=-2:480 -b:v 1500k -profile:v baseline -preset veryfast -tune fastdecode,zerolatency -movflags frag_keyframe+empty_moov+faststart+default_base_moof -y -f mp4 pipe:1"
|
||||
}
|
||||
],
|
||||
"hls": [
|
||||
{
|
||||
"name": "720p",
|
||||
"cmd": "%FFMPEG% -re -dual_mono_mode main -i pipe:0 -sn -map 0 -threads 0 -ignore_unknown -max_muxing_queue_size 1024 -f hls -hls_time 3 -hls_list_size 17 -hls_allow_cache 1 -hls_segment_filename %streamFileDir%/stream%streamNum%-%09d.ts -hls_flags delete_segments -c:a aac -ar 48000 -b:a 192k -ac 2 -c:v libx264 -vf yadif,scale=-2:720 -b:v 3000k -preset veryfast -flags +loop-global_header %OUTPUT%"
|
||||
},
|
||||
{
|
||||
"name": "480p",
|
||||
"cmd": "%FFMPEG% -re -dual_mono_mode main -i pipe:0 -sn -map 0 -threads 0 -ignore_unknown -max_muxing_queue_size 1024 -f hls -hls_time 3 -hls_list_size 17 -hls_allow_cache 1 -hls_segment_filename %streamFileDir%/stream%streamNum%-%09d.ts -hls_flags delete_segments -c:a aac -ar 48000 -b:a 128k -ac 2 -c:v libx264 -vf yadif,scale=-2:480 -b:v 1500k -preset veryfast -flags +loop-global_header %OUTPUT%"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"mp4": [
|
||||
{
|
||||
"name": "720p",
|
||||
"cmd": "%FFMPEG% -dual_mono_mode main %RE% -i pipe:0 -sn -threads 0 -c:a aac -ar 48000 -ac 2 -c:v libx264 -vf yadif,scale=-2:720 %VB% %VBUFFER% %AB% %ABUFFER% -profile:v baseline -preset veryfast -tune fastdecode,zerolatency -movflags frag_keyframe+empty_moov+faststart+default_base_moof -y -f mp4 pipe:1",
|
||||
"vb": "3000k",
|
||||
"ab": "192k"
|
||||
},
|
||||
{
|
||||
"name": "360p",
|
||||
"cmd": "%FFMPEG% -dual_mono_mode main %RE% -i pipe:0 -sn -threads 0 -c:a aac -ar 48000 -ac 2 -c:v libx264 -vf yadif,scale=-2:360 %VB% %VBUFFER% %AB% %ABUFFER% -profile:v baseline -preset veryfast -tune fastdecode,zerolatency -movflags frag_keyframe+empty_moov+faststart+default_base_moof -y -f mp4 pipe:1",
|
||||
"vb": "1500k",
|
||||
"ab": "128k"
|
||||
}
|
||||
],
|
||||
"mpegTs": [
|
||||
{
|
||||
"name": "720p (H.264)",
|
||||
"cmd": "%FFMPEG% -dual_mono_mode main %RE% -i pipe:0 -sn -threads 0 -c:a aac -ar 48000 -ac 2 -c:v libx264 -vf yadif,scale=-2:720 %VB% %VBUFFER% %AB% %ABUFFER% -profile:v baseline -preset veryfast -tune fastdecode,zerolatency -y -f mpegts pipe:1",
|
||||
"vb": "3000k",
|
||||
"ab": "192k"
|
||||
},
|
||||
{
|
||||
"name": "360p (H.264)",
|
||||
"cmd": "%FFMPEG% -dual_mono_mode main %RE% -i pipe:0 -sn -threads 0 -c:a aac -ar 48000 -ac 2 -c:v libx264 -vf yadif,scale=-2:360 %VB% %VBUFFER% %AB% %ABUFFER% -profile:v baseline -preset veryfast -tune fastdecode,zerolatency -y -f mpegts pipe:1",
|
||||
"vb": "1500k",
|
||||
"ab": "128k"
|
||||
}
|
||||
]
|
||||
},
|
||||
"recordedHLS": [
|
||||
{
|
||||
"name": "720p",
|
||||
"cmd": "%FFMPEG% -dual_mono_mode main -i %INPUT% -sn -threads 0 -map 0 -ignore_unknown -max_muxing_queue_size 1024 -f hls -hls_time 3 -hls_list_size 0 -hls_allow_cache 1 -hls_segment_filename %streamFileDir%/stream%streamNum%-%09d.ts -c:a aac -ar 48000 -b:a 192k -ac 2 -c:v libx264 -vf yadif,scale=-2:720 -b:v 3000k -preset veryfast -flags +loop-global_header %OUTPUT%"
|
||||
},
|
||||
{
|
||||
"name": "480p",
|
||||
"cmd": "%FFMPEG% -dual_mono_mode main -i %INPUT% -sn -threads 0 -map 0 -ignore_unknown -max_muxing_queue_size 1024 -f hls -hls_time 3 -hls_list_size 0 -hls_allow_cache 1 -hls_segment_filename %streamFileDir%/stream%streamNum%-%09d.ts -c:a aac -ar 48000 -b:a 128k -ac 2 -c:v libx264 -vf yadif,scale=-2:480 -b:v 1500k -preset veryfast -flags +loop-global_header %OUTPUT%"
|
||||
},
|
||||
{
|
||||
"name": "480p(h265)",
|
||||
"cmd": "%FFMPEG% -dual_mono_mode main -i %INPUT% -sn -map 0 -ignore_unknown -max_muxing_queue_size 1024 -f hls -hls_time 3 -hls_list_size 0 -hls_allow_cache 1 -hls_segment_type fmp4 -hls_fmp4_init_filename stream%streamNum%-init.mp4 -hls_segment_filename stream%streamNum%-%09d.m4s -c:a aac -ar 48000 -b:a 128k -ac 2 -c:v libx265 -vf yadif,scale=-2:480 -b:v 350k -preset veryfast -tag:v hvc1 %OUTPUT%"
|
||||
"recorded": {
|
||||
"ts": {
|
||||
"webm": [
|
||||
{
|
||||
"name": "720p",
|
||||
"cmd": "%FFMPEG% -dual_mono_mode main -i pipe:0 -sn -threads 3 -c:a libvorbis -ar 48000 -b:a 192k -ac 2 -c:v libvpx-vp9 -vf yadif,scale=-2:720 -b:v 3000k -deadline realtime -speed 4 -cpu-used -8 -y -f webm pipe:1"
|
||||
},
|
||||
{
|
||||
"name": "480p",
|
||||
"cmd": "%FFMPEG% -dual_mono_mode main -i pipe:0 -sn -threads 3 -c:a libvorbis -ar 48000 -b:a 128k -ac 2 -c:v libvpx-vp9 -vf yadif,scale=-2:480 -b:v 1500k -deadline realtime -speed 4 -cpu-used -8 -y -f webm pipe:1"
|
||||
}
|
||||
],
|
||||
"mp4": [
|
||||
{
|
||||
"name": "720p",
|
||||
"cmd": "%FFMPEG% -dual_mono_mode main -i pipe:0 -sn -threads 0 -c:a aac -ar 48000 -b:a 192k -ac 2 -c:v libx264 -vf yadif,scale=-2:720 -b:v 3000k -profile:v baseline -preset veryfast -tune fastdecode,zerolatency -movflags frag_keyframe+empty_moov+faststart+default_base_moof -y -f mp4 pipe:1"
|
||||
},
|
||||
{
|
||||
"name": "480p",
|
||||
"cmd": "%FFMPEG% -dual_mono_mode main -i pipe:0 -sn -threads 0 -c:a aac -ar 48000 -b:a 128k -ac 2 -c:v libx264 -vf yadif,scale=-2:480 -b:v 1500k -profile:v baseline -preset veryfast -tune fastdecode,zerolatency -movflags frag_keyframe+empty_moov+faststart+default_base_moof -y -f mp4 pipe:1"
|
||||
}
|
||||
],
|
||||
"hls": [
|
||||
{
|
||||
"name": "720p",
|
||||
"cmd": "%FFMPEG% -dual_mono_mode main -i pipe:0 -sn -map 0 -threads 0 -ignore_unknown -max_muxing_queue_size 1024 -f hls -hls_time 3 -hls_list_size 0 -hls_allow_cache 1 -hls_segment_filename %streamFileDir%/stream%streamNum%-%09d.ts -hls_flags delete_segments -c:a aac -ar 48000 -b:a 192k -ac 2 -c:v libx264 -vf yadif,scale=-2:720 -b:v 3000k -preset veryfast -flags +loop-global_header %OUTPUT%"
|
||||
},
|
||||
{
|
||||
"name": "480p",
|
||||
"cmd": "%FFMPEG% -dual_mono_mode main -i pipe:0 -sn -map 0 -threads 0 -ignore_unknown -max_muxing_queue_size 1024 -f hls -hls_time 3 -hls_list_size 0 -hls_allow_cache 1 -hls_segment_filename %streamFileDir%/stream%streamNum%-%09d.ts -hls_flags delete_segments -c:a aac -ar 48000 -b:a 128k -ac 2 -c:v libx264 -vf yadif,scale=-2:480 -b:v 1500k -preset veryfast -flags +loop-global_header %OUTPUT%"
|
||||
}
|
||||
]
|
||||
},
|
||||
"encoded": {
|
||||
"webm": [
|
||||
{
|
||||
"name": "720p",
|
||||
"cmd": "%FFMPEG% -dual_mono_mode main -ss %SS% -i %INPUT% -sn -threads 3 -c:a libvorbis -ar 48000 -b:a 192k -ac 2 -c:v libvpx-vp9 -vf scale=-2:720 -b:v 3000k -deadline realtime -speed 4 -cpu-used -8 -y -f webm pipe:1"
|
||||
},
|
||||
{
|
||||
"name": "480p",
|
||||
"cmd": "%FFMPEG% -dual_mono_mode main -ss %SS% -i %INPUT% -sn -threads 3 -c:a libvorbis -ar 48000 -b:a 128k -ac 2 -c:v libvpx-vp9 -vf scale=-2:480 -b:v 1500k -deadline realtime -speed 4 -cpu-used -8 -y -f webm pipe:1"
|
||||
}
|
||||
],
|
||||
"mp4": [
|
||||
{
|
||||
"name": "720p",
|
||||
"cmd": "%FFMPEG% -dual_mono_mode main -ss %SS% -i %INPUT% -sn -threads 0 -c:a aac -ar 48000 -b:a 192k -ac 2 -c:v libx264 -vf scale=-2:720 -b:v 3000k -profile:v baseline -preset veryfast -tune fastdecode,zerolatency -movflags frag_keyframe+empty_moov+faststart+default_base_moof -y -f mp4 pipe:1"
|
||||
},
|
||||
{
|
||||
"name": "480p",
|
||||
"cmd": "%FFMPEG% -dual_mono_mode main -ss %SS% -i %INPUT% -sn -threads 0 -c:a aac -ar 48000 -b:a 128k -ac 2 -c:v libx264 -vf scale=-2:480 -b:v 1500k -profile:v baseline -preset veryfast -tune fastdecode,zerolatency -movflags frag_keyframe+empty_moov+faststart+default_base_moof -y -f mp4 pipe:1"
|
||||
}
|
||||
],
|
||||
"hls": [
|
||||
{
|
||||
"name": "720p",
|
||||
"cmd": "%FFMPEG% -dual_mono_mode main -ss %SS% -i %INPUT% -sn -threads 0 -ignore_unknown -max_muxing_queue_size 1024 -f hls -hls_time 3 -hls_list_size 0 -hls_allow_cache 1 -hls_segment_filename %streamFileDir%/stream%streamNum%-%09d.ts -hls_flags delete_segments -c:a aac -ar 48000 -b:a 192k -ac 2 -c:v libx264 -vf scale=-2:720 -b:v 3000k -preset veryfast -flags +loop-global_header %OUTPUT%"
|
||||
},
|
||||
{
|
||||
"name": "480p",
|
||||
"cmd": "%FFMPEG% -dual_mono_mode main -ss %SS% -i %INPUT% -sn -threads 0 -ignore_unknown -max_muxing_queue_size 1024 -f hls -hls_time 3 -hls_list_size 0 -hls_allow_cache 1 -hls_segment_filename %streamFileDir%/stream%streamNum%-%09d.ts -hls_flags delete_segments -c:a aac -ar 48000 -b:a 128k -ac 2 -c:v libx264 -vf scale=-2:480 -b:v 3000k -preset veryfast -flags +loop-global_header %OUTPUT%"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"recordedViewer": {
|
||||
"ios": "infuse://x-callback-url/play?url=http://ADDRESS",
|
||||
"android": "intent://ADDRESS#Intent;package=com.mxtech.videoplayer.ad;type=video;scheme=http;end"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -69,11 +69,16 @@ in
|
|||
CERTIFICATE_KEY_FILE = "key.pem";
|
||||
};
|
||||
startLimitIntervalSec = 60;
|
||||
script = ''
|
||||
if [[ -v CREDENTIALS_DIRECTORY ]]; then
|
||||
cd "$CREDENTIALS_DIRECTORY"
|
||||
fi
|
||||
exec "${pkgs.pomerium}/bin/pomerium" -config "${cfgFile}"
|
||||
'';
|
||||
|
||||
serviceConfig = {
|
||||
DynamicUser = true;
|
||||
StateDirectory = [ "pomerium" ];
|
||||
ExecStart = "${pkgs.pomerium}/bin/pomerium -config ${cfgFile}";
|
||||
|
||||
PrivateUsers = false; # breaks CAP_NET_BIND_SERVICE
|
||||
MemoryDenyWriteExecute = false; # breaks LuaJIT
|
||||
|
@ -99,7 +104,6 @@ in
|
|||
AmbientCapabilities = [ "CAP_NET_BIND_SERVICE" ];
|
||||
CapabilityBoundingSet = [ "CAP_NET_BIND_SERVICE" ];
|
||||
|
||||
WorkingDirectory = mkIf (cfg.useACMEHost != null) "$CREDENTIALS_DIRECTORY";
|
||||
LoadCredential = optionals (cfg.useACMEHost != null) [
|
||||
"fullchain.pem:/var/lib/acme/${cfg.useACMEHost}/fullchain.pem"
|
||||
"key.pem:/var/lib/acme/${cfg.useACMEHost}/key.pem"
|
||||
|
@ -124,7 +128,7 @@ in
|
|||
Type = "oneshot";
|
||||
TimeoutSec = 60;
|
||||
ExecCondition = "/run/current-system/systemd/bin/systemctl -q is-active pomerium.service";
|
||||
ExecStart = "/run/current-system/systemd/bin/systemctl restart pomerium.service";
|
||||
ExecStart = "/run/current-system/systemd/bin/systemctl --no-block restart pomerium.service";
|
||||
};
|
||||
};
|
||||
});
|
||||
|
|
|
@ -23,8 +23,8 @@ in
|
|||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.tomcat85;
|
||||
defaultText = literalExpression "pkgs.tomcat85";
|
||||
default = pkgs.tomcat9;
|
||||
defaultText = literalExpression "pkgs.tomcat9";
|
||||
example = lib.literalExpression "pkgs.tomcat9";
|
||||
description = ''
|
||||
Which tomcat package to use.
|
||||
|
@ -127,7 +127,7 @@ in
|
|||
webapps = mkOption {
|
||||
type = types.listOf types.path;
|
||||
default = [ tomcat.webapps ];
|
||||
defaultText = literalExpression "[ pkgs.tomcat85.webapps ]";
|
||||
defaultText = literalExpression "[ config.services.tomcat.package.webapps ]";
|
||||
description = "List containing WAR files or directories with WAR files which are web applications to be deployed on Tomcat";
|
||||
};
|
||||
|
||||
|
@ -201,6 +201,7 @@ in
|
|||
{ uid = config.ids.uids.tomcat;
|
||||
description = "Tomcat user";
|
||||
home = "/homeless-shelter";
|
||||
group = "tomcat";
|
||||
extraGroups = cfg.extraGroups;
|
||||
};
|
||||
|
||||
|
|
|
@ -227,6 +227,7 @@ in
|
|||
# Settings from elementary-default-settings
|
||||
environment.etc."gtk-3.0/settings.ini".source = "${pkgs.pantheon.elementary-default-settings}/etc/gtk-3.0/settings.ini";
|
||||
|
||||
xdg.portal.enable = true;
|
||||
xdg.portal.extraPortals = with pkgs.pantheon; [
|
||||
elementary-files
|
||||
elementary-settings-daemon
|
||||
|
|
262
nixos/modules/system/activation/switch-to-configuration.pl
Normal file → Executable file
262
nixos/modules/system/activation/switch-to-configuration.pl
Normal file → Executable file
|
@ -10,6 +10,8 @@ use Net::DBus;
|
|||
use Sys::Syslog qw(:standard :macros);
|
||||
use Cwd 'abs_path';
|
||||
|
||||
## no critic(CodeLayout::ProhibitParensWithBuiltins)
|
||||
|
||||
my $out = "@out@";
|
||||
|
||||
my $curSystemd = abs_path("/run/current-system/sw/bin");
|
||||
|
@ -36,13 +38,13 @@ my $dryReloadByActivationFile = "/run/nixos/dry-activation-reload-list";
|
|||
|
||||
make_path("/run/nixos", { mode => oct(755) });
|
||||
|
||||
my $action = shift @ARGV;
|
||||
my $action = shift(@ARGV);
|
||||
|
||||
if ("@localeArchive@" ne "") {
|
||||
$ENV{LOCALE_ARCHIVE} = "@localeArchive@";
|
||||
}
|
||||
|
||||
if (!defined $action || ($action ne "switch" && $action ne "boot" && $action ne "test" && $action ne "dry-activate")) {
|
||||
if (!defined($action) || ($action ne "switch" && $action ne "boot" && $action ne "test" && $action ne "dry-activate")) {
|
||||
print STDERR <<EOF;
|
||||
Usage: $0 [switch|boot|test]
|
||||
|
||||
|
@ -51,27 +53,30 @@ boot: make the configuration the boot default
|
|||
test: activate the configuration, but don\'t make it the boot default
|
||||
dry-activate: show what would be done if this configuration were activated
|
||||
EOF
|
||||
exit 1;
|
||||
exit(1);
|
||||
}
|
||||
|
||||
$ENV{NIXOS_ACTION} = $action;
|
||||
|
||||
# This is a NixOS installation if it has /etc/NIXOS or a proper
|
||||
# /etc/os-release.
|
||||
die "This is not a NixOS installation!\n" unless
|
||||
die("This is not a NixOS installation!\n") unless
|
||||
-f "/etc/NIXOS" || (read_file("/etc/os-release", err_mode => 'quiet') // "") =~ /ID="?nixos"?/s;
|
||||
|
||||
openlog("nixos", "", LOG_USER);
|
||||
|
||||
# Install or update the bootloader.
|
||||
if ($action eq "switch" || $action eq "boot") {
|
||||
system("@installBootLoader@ $out") == 0 or exit 1;
|
||||
chomp(my $installBootLoader = <<'EOFBOOTLOADER');
|
||||
@installBootLoader@
|
||||
EOFBOOTLOADER
|
||||
system("$installBootLoader $out") == 0 or exit 1;
|
||||
}
|
||||
|
||||
# Just in case the new configuration hangs the system, do a sync now.
|
||||
system("@coreutils@/bin/sync", "-f", "/nix/store") unless ($ENV{"NIXOS_NO_SYNC"} // "") eq "1";
|
||||
|
||||
exit 0 if $action eq "boot";
|
||||
exit(0) if $action eq "boot";
|
||||
|
||||
# Check if we can activate the new configuration.
|
||||
my $oldVersion = read_file("/run/current-system/init-interface-version", err_mode => 'quiet') // "";
|
||||
|
@ -83,7 +88,7 @@ Warning: the new NixOS configuration has an ‘init’ that is
|
|||
incompatible with the current configuration. The new configuration
|
||||
won\'t take effect until you reboot the system.
|
||||
EOF
|
||||
exit 100;
|
||||
exit(100);
|
||||
}
|
||||
|
||||
# Ignore SIGHUP so that we're not killed if we're running on (say)
|
||||
|
@ -104,14 +109,27 @@ sub getActiveUnits {
|
|||
return $res;
|
||||
}
|
||||
|
||||
# Returns whether a systemd unit is active
|
||||
sub unit_is_active {
|
||||
my ($unit_name) = @_;
|
||||
|
||||
my $mgr = Net::DBus->system->get_service('org.freedesktop.systemd1')->get_object('/org/freedesktop/systemd1');
|
||||
my $units = $mgr->ListUnitsByNames([$unit_name]);
|
||||
if (scalar(@{$units}) == 0) {
|
||||
return 0;
|
||||
}
|
||||
my $active_state = $units->[0]->[3]; ## no critic (ValuesAndExpressions::ProhibitMagicNumbers)
|
||||
return $active_state eq 'active' || $active_state eq 'activating';
|
||||
}
|
||||
|
||||
sub parseFstab {
|
||||
my ($filename) = @_;
|
||||
my ($fss, $swaps);
|
||||
foreach my $line (read_file($filename, err_mode => 'quiet')) {
|
||||
chomp $line;
|
||||
chomp($line);
|
||||
$line =~ s/^\s*#.*//;
|
||||
next if $line =~ /^\s*$/;
|
||||
my @xs = split / /, $line;
|
||||
my @xs = split(/ /, $line);
|
||||
if ($xs[2] eq "swap") {
|
||||
$swaps->{$xs[0]} = { options => $xs[3] // "" };
|
||||
} else {
|
||||
|
@ -133,17 +151,16 @@ sub parseFstab {
|
|||
sub parseSystemdIni {
|
||||
my ($unitContents, $path) = @_;
|
||||
# Tie the ini file to a hash for easier access
|
||||
my %fileContents;
|
||||
tie %fileContents, "Config::IniFiles", (-file => $path, -allowempty => 1, -allowcontinue => 1);
|
||||
tie(my %fileContents, 'Config::IniFiles', (-file => $path, -allowempty => 1, -allowcontinue => 1)); ## no critic(Miscellanea::ProhibitTies)
|
||||
|
||||
# Copy over all sections
|
||||
foreach my $sectionName (keys %fileContents) {
|
||||
foreach my $sectionName (keys(%fileContents)) {
|
||||
if ($sectionName eq "Install") {
|
||||
# Skip the [Install] section because it has no relevant keys for us
|
||||
next;
|
||||
}
|
||||
# Copy over all keys
|
||||
foreach my $iniKey (keys %{$fileContents{$sectionName}}) {
|
||||
foreach my $iniKey (keys(%{$fileContents{$sectionName}})) {
|
||||
# Ensure the value is an array so it's easier to work with
|
||||
my $iniValue = $fileContents{$sectionName}{$iniKey};
|
||||
my @iniValues;
|
||||
|
@ -181,7 +198,7 @@ sub parse_unit {
|
|||
# Replace \ with \\ so glob() still works with units that have a \ in them
|
||||
# Valid characters in unit names are ASCII letters, digits, ":", "-", "_", ".", and "\"
|
||||
$unit_path =~ s/\\/\\\\/gmsx;
|
||||
foreach (glob "${unit_path}{,.d/*.conf}") {
|
||||
foreach (glob("${unit_path}{,.d/*.conf}")) {
|
||||
parseSystemdIni(\%unit_data, "$_")
|
||||
}
|
||||
return %unit_data;
|
||||
|
@ -194,7 +211,7 @@ sub parseSystemdBool {
|
|||
|
||||
my @values = @{$unitConfig->{$sectionName}{$boolName} // []};
|
||||
# Return default if value is not set
|
||||
if (scalar @values lt 1 || not defined $values[-1]) {
|
||||
if (scalar(@values) lt 1 || not defined($values[-1])) {
|
||||
return $default;
|
||||
}
|
||||
# If value is defined multiple times, use the last definition
|
||||
|
@ -211,7 +228,7 @@ sub recordUnit {
|
|||
# The opposite of recordUnit, removes a unit name from a file
|
||||
sub unrecord_unit {
|
||||
my ($fn, $unit) = @_;
|
||||
edit_file { s/^$unit\n//msx } $fn if $action ne "dry-activate";
|
||||
edit_file(sub { s/^$unit\n//msx }, $fn) if $action ne "dry-activate";
|
||||
}
|
||||
|
||||
# Compare the contents of two unit files and return whether the unit
|
||||
|
@ -226,6 +243,16 @@ sub unrecord_unit {
|
|||
sub compare_units {
|
||||
my ($old_unit, $new_unit) = @_;
|
||||
my $ret = 0;
|
||||
# Keys to ignore in the [Unit] section
|
||||
my %unit_section_ignores = map { $_ => 1 } qw(
|
||||
X-Reload-Triggers
|
||||
Description Documentation
|
||||
OnFailure OnSuccess OnFailureJobMode
|
||||
IgnoreOnIsolate StopWhenUnneeded
|
||||
RefuseManualStart RefuseManualStop
|
||||
AllowIsolate CollectMode
|
||||
SourcePath
|
||||
);
|
||||
|
||||
my $comp_array = sub {
|
||||
my ($a, $b) = @_;
|
||||
|
@ -233,11 +260,23 @@ sub compare_units {
|
|||
};
|
||||
|
||||
# Comparison hash for the sections
|
||||
my %section_cmp = map { $_ => 1 } keys %{$new_unit};
|
||||
my %section_cmp = map { $_ => 1 } keys(%{$new_unit});
|
||||
# Iterate over the sections
|
||||
foreach my $section_name (keys %{$old_unit}) {
|
||||
foreach my $section_name (keys(%{$old_unit})) {
|
||||
# Missing section in the new unit?
|
||||
if (not exists $section_cmp{$section_name}) {
|
||||
if (not exists($section_cmp{$section_name})) {
|
||||
# If the [Unit] section was removed, make sure that only keys
|
||||
# were in it that are ignored
|
||||
if ($section_name eq 'Unit') {
|
||||
foreach my $ini_key (keys(%{$old_unit->{'Unit'}})) {
|
||||
if (not defined($unit_section_ignores{$ini_key})) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
next; # check the next section
|
||||
} else {
|
||||
return 1;
|
||||
}
|
||||
if ($section_name eq 'Unit' and %{$old_unit->{'Unit'}} == 1 and defined(%{$old_unit->{'Unit'}}{'X-Reload-Triggers'})) {
|
||||
# If a new [Unit] section was removed that only contained X-Reload-Triggers,
|
||||
# do nothing.
|
||||
|
@ -248,15 +287,15 @@ sub compare_units {
|
|||
}
|
||||
delete $section_cmp{$section_name};
|
||||
# Comparison hash for the section contents
|
||||
my %ini_cmp = map { $_ => 1 } keys %{$new_unit->{$section_name}};
|
||||
my %ini_cmp = map { $_ => 1 } keys(%{$new_unit->{$section_name}});
|
||||
# Iterate over the keys of the section
|
||||
foreach my $ini_key (keys %{$old_unit->{$section_name}}) {
|
||||
foreach my $ini_key (keys(%{$old_unit->{$section_name}})) {
|
||||
delete $ini_cmp{$ini_key};
|
||||
my @old_value = @{$old_unit->{$section_name}{$ini_key}};
|
||||
# If the key is missing in the new unit, they are different...
|
||||
if (not $new_unit->{$section_name}{$ini_key}) {
|
||||
# ... unless the key that is now missing was the reload trigger
|
||||
if ($section_name eq 'Unit' and $ini_key eq 'X-Reload-Triggers') {
|
||||
# ... unless the key that is now missing is one of the ignored keys
|
||||
if ($section_name eq 'Unit' and defined($unit_section_ignores{$ini_key})) {
|
||||
next;
|
||||
}
|
||||
return 1;
|
||||
|
@ -264,19 +303,30 @@ sub compare_units {
|
|||
my @new_value = @{$new_unit->{$section_name}{$ini_key}};
|
||||
# If the contents are different, the units are different
|
||||
if (not $comp_array->(\@old_value, \@new_value)) {
|
||||
# Check if only the reload triggers changed
|
||||
if ($section_name eq 'Unit' and $ini_key eq 'X-Reload-Triggers') {
|
||||
$ret = 2;
|
||||
} else {
|
||||
return 1;
|
||||
# Check if only the reload triggers changed or one of the ignored keys
|
||||
if ($section_name eq 'Unit') {
|
||||
if ($ini_key eq 'X-Reload-Triggers') {
|
||||
$ret = 2;
|
||||
next;
|
||||
} elsif (defined($unit_section_ignores{$ini_key})) {
|
||||
next;
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
# A key was introduced that was missing in the old unit
|
||||
if (%ini_cmp) {
|
||||
if ($section_name eq 'Unit' and %ini_cmp == 1 and defined($ini_cmp{'X-Reload-Triggers'})) {
|
||||
# If the newly introduced key was the reload triggers, reload the unit
|
||||
$ret = 2;
|
||||
if ($section_name eq 'Unit') {
|
||||
foreach my $ini_key (keys(%ini_cmp)) {
|
||||
if ($ini_key eq 'X-Reload-Triggers') {
|
||||
$ret = 2;
|
||||
} elsif (defined($unit_section_ignores{$ini_key})) {
|
||||
next;
|
||||
} else {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
return 1;
|
||||
}
|
||||
|
@ -284,10 +334,14 @@ sub compare_units {
|
|||
}
|
||||
# A section was introduced that was missing in the old unit
|
||||
if (%section_cmp) {
|
||||
if (%section_cmp == 1 and defined($section_cmp{'Unit'}) and %{$new_unit->{'Unit'}} == 1 and defined(%{$new_unit->{'Unit'}}{'X-Reload-Triggers'})) {
|
||||
# If a new [Unit] section was introduced that only contains X-Reload-Triggers,
|
||||
# reload instead of restarting
|
||||
$ret = 2;
|
||||
if (%section_cmp == 1 and defined($section_cmp{'Unit'})) {
|
||||
foreach my $ini_key (keys(%{$new_unit->{'Unit'}})) {
|
||||
if (not defined($unit_section_ignores{$ini_key})) {
|
||||
return 1;
|
||||
} elsif ($ini_key eq 'X-Reload-Triggers') {
|
||||
$ret = 2;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
return 1;
|
||||
}
|
||||
|
@ -343,11 +397,11 @@ sub handleModifiedUnit {
|
|||
my $socket_activated = 0;
|
||||
if ($unit =~ /\.service$/) {
|
||||
my @sockets = split(/ /, join(" ", @{$unitInfo{Service}{Sockets} // []}));
|
||||
if (scalar @sockets == 0) {
|
||||
if (scalar(@sockets) == 0) {
|
||||
@sockets = ("$baseName.socket");
|
||||
}
|
||||
foreach my $socket (@sockets) {
|
||||
if (defined $activePrev->{$socket}) {
|
||||
if (defined($activePrev->{$socket})) {
|
||||
# We can now be sure this is a socket-activate unit
|
||||
|
||||
$unitsToStop->{$socket} = 1;
|
||||
|
@ -355,7 +409,11 @@ sub handleModifiedUnit {
|
|||
# exist in new configuration:
|
||||
if (-e "$out/etc/systemd/system/$socket") {
|
||||
$unitsToStart->{$socket} = 1;
|
||||
recordUnit($startListFile, $socket);
|
||||
if ($unitsToStart eq $unitsToRestart) {
|
||||
recordUnit($restartListFile, $socket);
|
||||
} else {
|
||||
recordUnit($startListFile, $socket);
|
||||
}
|
||||
$socket_activated = 1;
|
||||
}
|
||||
# Remove from units to reload so we don't restart and reload
|
||||
|
@ -373,7 +431,11 @@ sub handleModifiedUnit {
|
|||
# service gets restarted if we're interrupted.
|
||||
if (!$socket_activated) {
|
||||
$unitsToStart->{$unit} = 1;
|
||||
recordUnit($startListFile, $unit);
|
||||
if ($unitsToStart eq $unitsToRestart) {
|
||||
recordUnit($restartListFile, $unit);
|
||||
} else {
|
||||
recordUnit($startListFile, $unit);
|
||||
}
|
||||
}
|
||||
|
||||
$unitsToStop->{$unit} = 1;
|
||||
|
@ -401,8 +463,8 @@ $unitsToRestart{$_} = 1 foreach
|
|||
$unitsToReload{$_} = 1 foreach
|
||||
split('\n', read_file($reloadListFile, err_mode => 'quiet') // "");
|
||||
|
||||
my $activePrev = getActiveUnits;
|
||||
while (my ($unit, $state) = each %{$activePrev}) {
|
||||
my $activePrev = getActiveUnits();
|
||||
while (my ($unit, $state) = each(%{$activePrev})) {
|
||||
my $baseUnit = $unit;
|
||||
|
||||
my $prevUnitFile = "/etc/systemd/system/$baseUnit";
|
||||
|
@ -462,9 +524,9 @@ while (my ($unit, $state) = each %{$activePrev}) {
|
|||
my %old_unit_info = parse_unit($prevUnitFile);
|
||||
my %new_unit_info = parse_unit($newUnitFile);
|
||||
my $diff = compare_units(\%old_unit_info, \%new_unit_info);
|
||||
if ($diff eq 1) {
|
||||
if ($diff == 1) {
|
||||
handleModifiedUnit($unit, $baseName, $newUnitFile, \%new_unit_info, $activePrev, \%unitsToStop, \%unitsToStart, \%unitsToReload, \%unitsToRestart, \%unitsToSkip);
|
||||
} elsif ($diff eq 2 and not $unitsToRestart{$unit}) {
|
||||
} elsif ($diff == 2 and not $unitsToRestart{$unit}) {
|
||||
$unitsToReload{$unit} = 1;
|
||||
recordUnit($reloadListFile, $unit);
|
||||
}
|
||||
|
@ -475,11 +537,11 @@ while (my ($unit, $state) = each %{$activePrev}) {
|
|||
sub pathToUnitName {
|
||||
my ($path) = @_;
|
||||
# Use current version of systemctl binary before daemon is reexeced.
|
||||
open my $cmd, "-|", "$curSystemd/systemd-escape", "--suffix=mount", "-p", $path
|
||||
open(my $cmd, "-|", "$curSystemd/systemd-escape", "--suffix=mount", "-p", $path)
|
||||
or die "Unable to escape $path!\n";
|
||||
my $escaped = join "", <$cmd>;
|
||||
chomp $escaped;
|
||||
close $cmd or die;
|
||||
my $escaped = join("", <$cmd>);
|
||||
chomp($escaped);
|
||||
close($cmd) or die('Unable to close systemd-escape pipe');
|
||||
return $escaped;
|
||||
}
|
||||
|
||||
|
@ -488,13 +550,13 @@ sub pathToUnitName {
|
|||
# automatically by starting local-fs.target. FIXME: might be nicer if
|
||||
# we generated units for all mounts; then we could unify this with the
|
||||
# unit checking code above.
|
||||
my ($prevFss, $prevSwaps) = parseFstab "/etc/fstab";
|
||||
my ($newFss, $newSwaps) = parseFstab "$out/etc/fstab";
|
||||
foreach my $mountPoint (keys %$prevFss) {
|
||||
my ($prevFss, $prevSwaps) = parseFstab("/etc/fstab");
|
||||
my ($newFss, $newSwaps) = parseFstab("$out/etc/fstab");
|
||||
foreach my $mountPoint (keys(%$prevFss)) {
|
||||
my $prev = $prevFss->{$mountPoint};
|
||||
my $new = $newFss->{$mountPoint};
|
||||
my $unit = pathToUnitName($mountPoint);
|
||||
if (!defined $new) {
|
||||
if (!defined($new)) {
|
||||
# Filesystem entry disappeared, so unmount it.
|
||||
$unitsToStop{$unit} = 1;
|
||||
} elsif ($prev->{fsType} ne $new->{fsType} || $prev->{device} ne $new->{device}) {
|
||||
|
@ -510,10 +572,10 @@ foreach my $mountPoint (keys %$prevFss) {
|
|||
}
|
||||
|
||||
# Also handles swap devices.
|
||||
foreach my $device (keys %$prevSwaps) {
|
||||
foreach my $device (keys(%$prevSwaps)) {
|
||||
my $prev = $prevSwaps->{$device};
|
||||
my $new = $newSwaps->{$device};
|
||||
if (!defined $new) {
|
||||
if (!defined($new)) {
|
||||
# Swap entry disappeared, so turn it off. Can't use
|
||||
# "systemctl stop" here because systemd has lots of alias
|
||||
# units that prevent a stop from actually calling
|
||||
|
@ -544,8 +606,8 @@ if ($prevSystemdSystemConfig ne $newSystemdSystemConfig) {
|
|||
sub filterUnits {
|
||||
my ($units) = @_;
|
||||
my @res;
|
||||
foreach my $unit (sort(keys %{$units})) {
|
||||
push @res, $unit if !defined $unitsToFilter{$unit};
|
||||
foreach my $unit (sort(keys(%{$units}))) {
|
||||
push(@res, $unit) if !defined($unitsToFilter{$unit});
|
||||
}
|
||||
return @res;
|
||||
}
|
||||
|
@ -556,9 +618,9 @@ my @unitsToStopFiltered = filterUnits(\%unitsToStop);
|
|||
# Show dry-run actions.
|
||||
if ($action eq "dry-activate") {
|
||||
print STDERR "would stop the following units: ", join(", ", @unitsToStopFiltered), "\n"
|
||||
if scalar @unitsToStopFiltered > 0;
|
||||
print STDERR "would NOT stop the following changed units: ", join(", ", sort(keys %unitsToSkip)), "\n"
|
||||
if scalar(keys %unitsToSkip) > 0;
|
||||
if scalar(@unitsToStopFiltered) > 0;
|
||||
print STDERR "would NOT stop the following changed units: ", join(", ", sort(keys(%unitsToSkip))), "\n"
|
||||
if scalar(keys(%unitsToSkip)) > 0;
|
||||
|
||||
print STDERR "would activate the configuration...\n";
|
||||
system("$out/dry-activate", "$out");
|
||||
|
@ -579,7 +641,7 @@ if ($action eq "dry-activate") {
|
|||
$baseName =~ s/\.[a-z]*$//;
|
||||
|
||||
# Start units if they were not active previously
|
||||
if (not defined $activePrev->{$unit}) {
|
||||
if (not defined($activePrev->{$unit})) {
|
||||
$unitsToStart{$unit} = 1;
|
||||
next;
|
||||
}
|
||||
|
@ -599,28 +661,28 @@ if ($action eq "dry-activate") {
|
|||
unlink($dryReloadByActivationFile);
|
||||
|
||||
print STDERR "would restart systemd\n" if $restartSystemd;
|
||||
print STDERR "would reload the following units: ", join(", ", sort(keys %unitsToReload)), "\n"
|
||||
if scalar(keys %unitsToReload) > 0;
|
||||
print STDERR "would restart the following units: ", join(", ", sort(keys %unitsToRestart)), "\n"
|
||||
if scalar(keys %unitsToRestart) > 0;
|
||||
print STDERR "would reload the following units: ", join(", ", sort(keys(%unitsToReload))), "\n"
|
||||
if scalar(keys(%unitsToReload)) > 0;
|
||||
print STDERR "would restart the following units: ", join(", ", sort(keys(%unitsToRestart))), "\n"
|
||||
if scalar(keys(%unitsToRestart)) > 0;
|
||||
my @unitsToStartFiltered = filterUnits(\%unitsToStart);
|
||||
print STDERR "would start the following units: ", join(", ", @unitsToStartFiltered), "\n"
|
||||
if scalar @unitsToStartFiltered;
|
||||
if scalar(@unitsToStartFiltered);
|
||||
exit 0;
|
||||
}
|
||||
|
||||
|
||||
syslog(LOG_NOTICE, "switching to system configuration $out");
|
||||
|
||||
if (scalar (keys %unitsToStop) > 0) {
|
||||
if (scalar(keys(%unitsToStop)) > 0) {
|
||||
print STDERR "stopping the following units: ", join(", ", @unitsToStopFiltered), "\n"
|
||||
if scalar @unitsToStopFiltered;
|
||||
if scalar(@unitsToStopFiltered);
|
||||
# Use current version of systemctl binary before daemon is reexeced.
|
||||
system("$curSystemd/systemctl", "stop", "--", sort(keys %unitsToStop));
|
||||
system("$curSystemd/systemctl", "stop", "--", sort(keys(%unitsToStop)));
|
||||
}
|
||||
|
||||
print STDERR "NOT restarting the following changed units: ", join(", ", sort(keys %unitsToSkip)), "\n"
|
||||
if scalar(keys %unitsToSkip) > 0;
|
||||
print STDERR "NOT restarting the following changed units: ", join(", ", sort(keys(%unitsToSkip))), "\n"
|
||||
if scalar(keys(%unitsToSkip)) > 0;
|
||||
|
||||
# Activate the new configuration (i.e., update /etc, make accounts,
|
||||
# and so on).
|
||||
|
@ -644,7 +706,7 @@ foreach (split('\n', read_file($restartByActivationFile, err_mode => 'quiet') //
|
|||
$baseName =~ s/\.[a-z]*$//;
|
||||
|
||||
# Start units if they were not active previously
|
||||
if (not defined $activePrev->{$unit}) {
|
||||
if (not defined($activePrev->{$unit})) {
|
||||
$unitsToStart{$unit} = 1;
|
||||
recordUnit($startListFile, $unit);
|
||||
next;
|
||||
|
@ -681,7 +743,7 @@ system("@systemd@/bin/systemctl", "reset-failed");
|
|||
system("@systemd@/bin/systemctl", "daemon-reload") == 0 or $res = 3;
|
||||
|
||||
# Reload user units
|
||||
open my $listActiveUsers, '-|', '@systemd@/bin/loginctl', 'list-users', '--no-legend';
|
||||
open(my $listActiveUsers, '-|', '@systemd@/bin/loginctl', 'list-users', '--no-legend');
|
||||
while (my $f = <$listActiveUsers>) {
|
||||
next unless $f =~ /^\s*(?<uid>\d+)\s+(?<user>\S+)/;
|
||||
my ($uid, $name) = ($+{uid}, $+{user});
|
||||
|
@ -693,25 +755,43 @@ while (my $f = <$listActiveUsers>) {
|
|||
"@systemd@/bin/systemctl --user start nixos-activation.service");
|
||||
}
|
||||
|
||||
close $listActiveUsers;
|
||||
close($listActiveUsers);
|
||||
|
||||
# Set the new tmpfiles
|
||||
print STDERR "setting up tmpfiles\n";
|
||||
system("@systemd@/bin/systemd-tmpfiles", "--create", "--remove", "--exclude-prefix=/dev") == 0 or $res = 3;
|
||||
|
||||
# Before reloading we need to ensure that the units are still active. They may have been
|
||||
# deactivated because one of their requirements got stopped. If they are inactive
|
||||
# but should have been reloaded, the user probably expects them to be started.
|
||||
if (scalar(keys(%unitsToReload)) > 0) {
|
||||
for my $unit (keys(%unitsToReload)) {
|
||||
if (!unit_is_active($unit)) {
|
||||
# Figure out if we need to start the unit
|
||||
my %unit_info = parse_unit("$out/etc/systemd/system/$unit");
|
||||
if (!(parseSystemdBool(\%unit_info, 'Unit', 'RefuseManualStart', 0) || parseSystemdBool(\%unit_info, 'Unit', 'X-OnlyManualStart', 0))) {
|
||||
$unitsToStart{$unit} = 1;
|
||||
recordUnit($startListFile, $unit);
|
||||
}
|
||||
# Don't reload the unit, reloading would fail
|
||||
delete %unitsToReload{$unit};
|
||||
unrecord_unit($reloadListFile, $unit);
|
||||
}
|
||||
}
|
||||
}
|
||||
# Reload units that need it. This includes remounting changed mount
|
||||
# units.
|
||||
if (scalar(keys %unitsToReload) > 0) {
|
||||
print STDERR "reloading the following units: ", join(", ", sort(keys %unitsToReload)), "\n";
|
||||
system("@systemd@/bin/systemctl", "reload", "--", sort(keys %unitsToReload)) == 0 or $res = 4;
|
||||
if (scalar(keys(%unitsToReload)) > 0) {
|
||||
print STDERR "reloading the following units: ", join(", ", sort(keys(%unitsToReload))), "\n";
|
||||
system("@systemd@/bin/systemctl", "reload", "--", sort(keys(%unitsToReload))) == 0 or $res = 4;
|
||||
unlink($reloadListFile);
|
||||
}
|
||||
|
||||
# Restart changed services (those that have to be restarted rather
|
||||
# than stopped and started).
|
||||
if (scalar(keys %unitsToRestart) > 0) {
|
||||
print STDERR "restarting the following units: ", join(", ", sort(keys %unitsToRestart)), "\n";
|
||||
system("@systemd@/bin/systemctl", "restart", "--", sort(keys %unitsToRestart)) == 0 or $res = 4;
|
||||
if (scalar(keys(%unitsToRestart)) > 0) {
|
||||
print STDERR "restarting the following units: ", join(", ", sort(keys(%unitsToRestart))), "\n";
|
||||
system("@systemd@/bin/systemctl", "restart", "--", sort(keys(%unitsToRestart))) == 0 or $res = 4;
|
||||
unlink($restartListFile);
|
||||
}
|
||||
|
||||
|
@ -723,17 +803,17 @@ if (scalar(keys %unitsToRestart) > 0) {
|
|||
# systemd.
|
||||
my @unitsToStartFiltered = filterUnits(\%unitsToStart);
|
||||
print STDERR "starting the following units: ", join(", ", @unitsToStartFiltered), "\n"
|
||||
if scalar @unitsToStartFiltered;
|
||||
system("@systemd@/bin/systemctl", "start", "--", sort(keys %unitsToStart)) == 0 or $res = 4;
|
||||
if scalar(@unitsToStartFiltered);
|
||||
system("@systemd@/bin/systemctl", "start", "--", sort(keys(%unitsToStart))) == 0 or $res = 4;
|
||||
unlink($startListFile);
|
||||
|
||||
|
||||
# Print failed and new units.
|
||||
my (@failed, @new);
|
||||
my $activeNew = getActiveUnits;
|
||||
while (my ($unit, $state) = each %{$activeNew}) {
|
||||
my $activeNew = getActiveUnits();
|
||||
while (my ($unit, $state) = each(%{$activeNew})) {
|
||||
if ($state->{state} eq "failed") {
|
||||
push @failed, $unit;
|
||||
push(@failed, $unit);
|
||||
next;
|
||||
}
|
||||
|
||||
|
@ -743,7 +823,7 @@ while (my ($unit, $state) = each %{$activeNew}) {
|
|||
chomp($main_status);
|
||||
|
||||
if ($main_status ne "0") {
|
||||
push @failed, $unit;
|
||||
push(@failed, $unit);
|
||||
next;
|
||||
}
|
||||
}
|
||||
|
@ -751,19 +831,19 @@ while (my ($unit, $state) = each %{$activeNew}) {
|
|||
# Ignore scopes since they are not managed by this script but rather
|
||||
# created and managed by third-party services via the systemd dbus API.
|
||||
# This only lists units that are not failed (including ones that are in auto-restart but have not failed previously)
|
||||
if ($state->{state} ne "failed" && !defined $activePrev->{$unit} && $unit !~ /\.scope$/msx) {
|
||||
push @new, $unit;
|
||||
if ($state->{state} ne "failed" && !defined($activePrev->{$unit}) && $unit !~ /\.scope$/msx) {
|
||||
push(@new, $unit);
|
||||
}
|
||||
}
|
||||
|
||||
if (scalar @new > 0) {
|
||||
if (scalar(@new) > 0) {
|
||||
print STDERR "the following new units were started: ", join(", ", sort(@new)), "\n"
|
||||
}
|
||||
|
||||
if (scalar @failed > 0) {
|
||||
my @failed_sorted = sort @failed;
|
||||
if (scalar(@failed) > 0) {
|
||||
my @failed_sorted = sort(@failed);
|
||||
print STDERR "warning: the following units failed: ", join(", ", @failed_sorted), "\n\n";
|
||||
system "@systemd@/bin/systemctl status --no-pager --full '" . join("' '", @failed_sorted) . "' >&2";
|
||||
system("@systemd@/bin/systemctl status --no-pager --full '" . join("' '", @failed_sorted) . "' >&2");
|
||||
$res = 4;
|
||||
}
|
||||
|
||||
|
@ -773,4 +853,4 @@ if ($res == 0) {
|
|||
syslog(LOG_ERR, "switching to system configuration $out failed (status $res)");
|
||||
}
|
||||
|
||||
exit $res;
|
||||
exit($res);
|
||||
|
|
|
@ -15,9 +15,12 @@ import re
|
|||
import datetime
|
||||
import glob
|
||||
import os.path
|
||||
from typing import Tuple, List, Optional
|
||||
from typing import NamedTuple, List, Optional
|
||||
|
||||
SystemIdentifier = Tuple[Optional[str], int, Optional[str]]
|
||||
class SystemIdentifier(NamedTuple):
|
||||
profile: Optional[str]
|
||||
generation: int
|
||||
specialisation: Optional[str]
|
||||
|
||||
|
||||
def copy_if_not_exists(source: str, dest: str) -> None:
|
||||
|
@ -151,7 +154,14 @@ def get_generations(profile: Optional[str] = None) -> List[SystemIdentifier]:
|
|||
gen_lines.pop()
|
||||
|
||||
configurationLimit = @configurationLimit@
|
||||
configurations: List[SystemIdentifier] = [ (profile, int(line.split()[0]), None) for line in gen_lines ]
|
||||
configurations = [
|
||||
SystemIdentifier(
|
||||
profile=profile,
|
||||
generation=int(line.split()[0]),
|
||||
specialisation=None
|
||||
)
|
||||
for line in gen_lines
|
||||
]
|
||||
return configurations[-configurationLimit:]
|
||||
|
||||
|
||||
|
@ -160,7 +170,7 @@ def get_specialisations(profile: Optional[str], generation: int, _: Optional[str
|
|||
system_dir(profile, generation, None), "specialisation")
|
||||
if not os.path.exists(specialisations_dir):
|
||||
return []
|
||||
return [(profile, generation, spec) for spec in os.listdir(specialisations_dir)]
|
||||
return [SystemIdentifier(profile, generation, spec) for spec in os.listdir(specialisations_dir)]
|
||||
|
||||
|
||||
def remove_old_entries(gens: List[SystemIdentifier]) -> None:
|
||||
|
@ -271,7 +281,8 @@ def main() -> None:
|
|||
if os.readlink(system_dir(*gen)) == args.default_config:
|
||||
write_loader_conf(*gen)
|
||||
except OSError as e:
|
||||
print("ignoring generation '{}' in the list of boot entries because of the following error:\n{}".format(*gen, e), file=sys.stderr)
|
||||
profile = f"profile '{gen.profile}'" if gen.profile else "default profile"
|
||||
print("ignoring {} in the list of boot entries because of the following error:\n{}".format(profile, e), file=sys.stderr)
|
||||
|
||||
for root, _, files in os.walk('@efiSysMountPoint@/efi/nixos/.extra-files', topdown=False):
|
||||
relative_root = root.removeprefix("@efiSysMountPoint@/efi/nixos/.extra-files").removeprefix("/")
|
||||
|
|
|
@ -22,11 +22,13 @@ let
|
|||
type = with types; nullOr package;
|
||||
default = null;
|
||||
description = ''
|
||||
Path to an image file to load instead of pulling from a registry.
|
||||
If defined, do not pull from registry.
|
||||
Path to an image file to load before running the image. This can
|
||||
be used to bypass pulling the image from the registry.
|
||||
|
||||
You still need to set the <literal>image</literal> attribute, as it
|
||||
will be used as the image name for docker to start a container.
|
||||
The <literal>image</literal> attribute must match the name and
|
||||
tag of the image contained in this file, as they will be used to
|
||||
run the container with that image. If they do not match, the
|
||||
image will be pulled from the registry as usual.
|
||||
'';
|
||||
example = literalExpression "pkgs.dockerTools.buildImage {...};";
|
||||
};
|
||||
|
|
|
@ -503,6 +503,7 @@ in
|
|||
systemd-boot = handleTest ./systemd-boot.nix {};
|
||||
systemd-confinement = handleTest ./systemd-confinement.nix {};
|
||||
systemd-cryptenroll = handleTest ./systemd-cryptenroll.nix {};
|
||||
systemd-escaping = handleTest ./systemd-escaping.nix {};
|
||||
systemd-journal = handleTest ./systemd-journal.nix {};
|
||||
systemd-machinectl = handleTest ./systemd-machinectl.nix {};
|
||||
systemd-networkd = handleTest ./systemd-networkd.nix {};
|
||||
|
@ -524,6 +525,7 @@ in
|
|||
tinc = handleTest ./tinc {};
|
||||
tinydns = handleTest ./tinydns.nix {};
|
||||
tinywl = handleTest ./tinywl.nix {};
|
||||
tomcat = handleTest ./tomcat.nix {};
|
||||
tor = handleTest ./tor.nix {};
|
||||
# traefik test relies on docker-containers
|
||||
traefik = handleTestOn ["x86_64-linux"] ./traefik.nix {};
|
||||
|
|
0
nixos/tests/empty-file
Normal file
0
nixos/tests/empty-file
Normal file
|
@ -64,6 +64,11 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
simpleServiceDifferentDescription.configuration = {
|
||||
imports = [ simpleService.configuration ];
|
||||
systemd.services.test.description = "Test unit";
|
||||
};
|
||||
|
||||
simpleServiceModified.configuration = {
|
||||
imports = [ simpleService.configuration ];
|
||||
systemd.services.test.serviceConfig.X-Test = true;
|
||||
|
@ -203,6 +208,39 @@ in {
|
|||
systemd.services."escaped\\x2ddash".serviceConfig.X-Test = "test";
|
||||
};
|
||||
|
||||
unitWithRequirement.configuration = {
|
||||
systemd.services.required-service = {
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
RemainAfterExit = true;
|
||||
ExecStart = "${pkgs.coreutils}/bin/true";
|
||||
ExecReload = "${pkgs.coreutils}/bin/true";
|
||||
};
|
||||
};
|
||||
systemd.services.test-service = {
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
requires = [ "required-service.service" ];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
RemainAfterExit = true;
|
||||
ExecStart = "${pkgs.coreutils}/bin/true";
|
||||
ExecReload = "${pkgs.coreutils}/bin/true";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
unitWithRequirementModified.configuration = {
|
||||
imports = [ unitWithRequirement.configuration ];
|
||||
systemd.services.required-service.serviceConfig.X-Test = "test";
|
||||
systemd.services.test-service.reloadTriggers = [ "test" ];
|
||||
};
|
||||
|
||||
unitWithRequirementModifiedNostart.configuration = {
|
||||
imports = [ unitWithRequirement.configuration ];
|
||||
systemd.services.test-service.unitConfig.RefuseManualStart = true;
|
||||
};
|
||||
|
||||
restart-and-reload-by-activation-script.configuration = {
|
||||
systemd.services = rec {
|
||||
simple-service = {
|
||||
|
@ -350,6 +388,31 @@ in {
|
|||
systemd.timers.test-timer.timerConfig.OnCalendar = lib.mkForce "Fri 2012-11-23 16:00:00";
|
||||
};
|
||||
|
||||
hybridSleepModified.configuration = {
|
||||
systemd.targets.hybrid-sleep.unitConfig.X-Test = true;
|
||||
};
|
||||
|
||||
target.configuration = {
|
||||
systemd.targets.test-target.wantedBy = [ "multi-user.target" ];
|
||||
# We use this service to figure out whether the target was modified.
|
||||
# This is the only way because targets are filtered and therefore not
|
||||
# printed when they are started/stopped.
|
||||
systemd.services.test-service = {
|
||||
bindsTo = [ "test-target.target" ];
|
||||
serviceConfig.ExecStart = "${pkgs.coreutils}/bin/sleep infinity";
|
||||
};
|
||||
};
|
||||
|
||||
targetModified.configuration = {
|
||||
imports = [ target.configuration ];
|
||||
systemd.targets.test-target.unitConfig.X-Test = true;
|
||||
};
|
||||
|
||||
targetModifiedStopOnReconfig.configuration = {
|
||||
imports = [ target.configuration ];
|
||||
systemd.targets.test-target.unitConfig.X-StopOnReconfiguration = true;
|
||||
};
|
||||
|
||||
path.configuration = {
|
||||
systemd.paths.test-watch = {
|
||||
wantedBy = [ "paths.target" ];
|
||||
|
@ -472,6 +535,15 @@ in {
|
|||
assert_lacks(out, "\nstarting the following units:")
|
||||
assert_lacks(out, "the following new units were started:")
|
||||
|
||||
# Only changing the description does nothing
|
||||
out = switch_to_specialisation("${machine}", "simpleServiceDifferentDescription")
|
||||
assert_lacks(out, "stopping the following units:")
|
||||
assert_lacks(out, "NOT restarting the following changed units:")
|
||||
assert_lacks(out, "reloading the following units:")
|
||||
assert_lacks(out, "\nrestarting the following units:")
|
||||
assert_lacks(out, "\nstarting the following units:")
|
||||
assert_lacks(out, "the following new units were started:")
|
||||
|
||||
# Restart the simple service
|
||||
out = switch_to_specialisation("${machine}", "simpleServiceModified")
|
||||
assert_contains(out, "stopping the following units: test.service\n")
|
||||
|
@ -535,6 +607,32 @@ in {
|
|||
assert_contains(out, "\nstarting the following units: escaped\\x2ddash.service\n")
|
||||
assert_lacks(out, "the following new units were started:")
|
||||
|
||||
# Ensure units that require changed units are properly reloaded
|
||||
out = switch_to_specialisation("${machine}", "unitWithRequirement")
|
||||
assert_contains(out, "stopping the following units: escaped\\x2ddash.service\n")
|
||||
assert_lacks(out, "NOT restarting the following changed units:")
|
||||
assert_lacks(out, "reloading the following units:")
|
||||
assert_lacks(out, "\nrestarting the following units:")
|
||||
assert_lacks(out, "\nstarting the following units:")
|
||||
assert_contains(out, "the following new units were started: required-service.service, test-service.service\n")
|
||||
|
||||
out = switch_to_specialisation("${machine}", "unitWithRequirementModified")
|
||||
assert_contains(out, "stopping the following units: required-service.service\n")
|
||||
assert_lacks(out, "NOT restarting the following changed units:")
|
||||
assert_lacks(out, "reloading the following units:")
|
||||
assert_lacks(out, "\nrestarting the following units:")
|
||||
assert_contains(out, "\nstarting the following units: required-service.service, test-service.service\n")
|
||||
assert_lacks(out, "the following new units were started:")
|
||||
|
||||
# Unless the unit asks to be not restarted
|
||||
out = switch_to_specialisation("${machine}", "unitWithRequirementModifiedNostart")
|
||||
assert_contains(out, "stopping the following units: required-service.service\n")
|
||||
assert_lacks(out, "NOT restarting the following changed units:")
|
||||
assert_lacks(out, "reloading the following units:")
|
||||
assert_lacks(out, "\nrestarting the following units:")
|
||||
assert_contains(out, "\nstarting the following units: required-service.service\n")
|
||||
assert_lacks(out, "the following new units were started:")
|
||||
|
||||
with subtest("failing units"):
|
||||
# Let the simple service fail
|
||||
switch_to_specialisation("${machine}", "simpleServiceModified")
|
||||
|
@ -821,6 +919,55 @@ in {
|
|||
out = machine.succeed("systemctl show test-timer.timer")
|
||||
assert_contains(out, "OnCalendar=Fri 2012-11-23 16:00:00")
|
||||
|
||||
with subtest("targets"):
|
||||
# Modifying some special targets like hybrid-sleep.target does nothing
|
||||
out = switch_to_specialisation("${machine}", "hybridSleepModified")
|
||||
assert_contains(out, "stopping the following units: test-timer.timer\n")
|
||||
assert_lacks(out, "NOT restarting the following changed units:")
|
||||
assert_lacks(out, "reloading the following units:")
|
||||
assert_lacks(out, "\nrestarting the following units:")
|
||||
assert_lacks(out, "\nstarting the following units:")
|
||||
assert_lacks(out, "the following new units were started:")
|
||||
|
||||
# Adding a new target starts it
|
||||
out = switch_to_specialisation("${machine}", "target")
|
||||
assert_lacks(out, "stopping the following units:")
|
||||
assert_lacks(out, "NOT restarting the following changed units:")
|
||||
assert_lacks(out, "reloading the following units:")
|
||||
assert_lacks(out, "\nrestarting the following units:")
|
||||
assert_lacks(out, "\nstarting the following units:")
|
||||
assert_contains(out, "the following new units were started: test-target.target\n")
|
||||
|
||||
# Changing a target doesn't print anything because the unit is filtered
|
||||
machine.systemctl("start test-service.service")
|
||||
out = switch_to_specialisation("${machine}", "targetModified")
|
||||
assert_lacks(out, "stopping the following units:")
|
||||
assert_lacks(out, "NOT restarting the following changed units:")
|
||||
assert_lacks(out, "reloading the following units:")
|
||||
assert_lacks(out, "\nrestarting the following units:")
|
||||
assert_lacks(out, "\nstarting the following units:")
|
||||
assert_lacks(out, "the following new units were started:")
|
||||
machine.succeed("systemctl is-active test-service.service") # target was not restarted
|
||||
|
||||
# With X-StopOnReconfiguration, the target gets stopped and started
|
||||
out = switch_to_specialisation("${machine}", "targetModifiedStopOnReconfig")
|
||||
assert_lacks(out, "stopping the following units:")
|
||||
assert_lacks(out, "NOT restarting the following changed units:")
|
||||
assert_lacks(out, "reloading the following units:")
|
||||
assert_lacks(out, "\nrestarting the following units:")
|
||||
assert_lacks(out, "\nstarting the following units:")
|
||||
assert_lacks(out, "the following new units were started:")
|
||||
machine.fail("systemctl is-active test-service.servce") # target was restarted
|
||||
|
||||
# Remove the target by switching to the old specialisation
|
||||
out = switch_to_specialisation("${machine}", "timerModified")
|
||||
assert_contains(out, "stopping the following units: test-target.target\n")
|
||||
assert_lacks(out, "NOT restarting the following changed units:")
|
||||
assert_lacks(out, "reloading the following units:")
|
||||
assert_lacks(out, "\nrestarting the following units:")
|
||||
assert_lacks(out, "\nstarting the following units:")
|
||||
assert_contains(out, "the following new units were started: test-timer.timer\n")
|
||||
|
||||
with subtest("paths"):
|
||||
out = switch_to_specialisation("${machine}", "path")
|
||||
assert_contains(out, "stopping the following units: test-timer.timer\n")
|
||||
|
|
45
nixos/tests/systemd-escaping.nix
Normal file
45
nixos/tests/systemd-escaping.nix
Normal file
|
@ -0,0 +1,45 @@
|
|||
import ./make-test-python.nix ({ pkgs, ... }:
|
||||
|
||||
let
|
||||
echoAll = pkgs.writeScript "echo-all" ''
|
||||
#! ${pkgs.runtimeShell}
|
||||
for s in "$@"; do
|
||||
printf '%s\n' "$s"
|
||||
done
|
||||
'';
|
||||
# deliberately using a local empty file instead of pkgs.emptyFile to have
|
||||
# a non-store path in the test
|
||||
args = [ "a%Nything" "lang=\${LANG}" ";" "/bin/sh -c date" ./empty-file 4.2 23 ];
|
||||
in
|
||||
{
|
||||
name = "systemd-escaping";
|
||||
|
||||
machine = { pkgs, lib, utils, ... }: {
|
||||
systemd.services.echo =
|
||||
assert !(builtins.tryEval (utils.escapeSystemdExecArgs [ [] ])).success;
|
||||
assert !(builtins.tryEval (utils.escapeSystemdExecArgs [ {} ])).success;
|
||||
assert !(builtins.tryEval (utils.escapeSystemdExecArgs [ null ])).success;
|
||||
assert !(builtins.tryEval (utils.escapeSystemdExecArgs [ false ])).success;
|
||||
assert !(builtins.tryEval (utils.escapeSystemdExecArgs [ (_:_) ])).success;
|
||||
{ description = "Echo to the journal";
|
||||
serviceConfig.Type = "oneshot";
|
||||
serviceConfig.ExecStart = ''
|
||||
${echoAll} ${utils.escapeSystemdExecArgs args}
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
machine.wait_for_unit("multi-user.target")
|
||||
machine.succeed("systemctl start echo.service")
|
||||
# skip the first 'Starting <service> ...' line
|
||||
logs = machine.succeed("journalctl -u echo.service -o cat").splitlines()[1:]
|
||||
assert "a%Nything" == logs[0]
|
||||
assert "lang=''${LANG}" == logs[1]
|
||||
assert ";" == logs[2]
|
||||
assert "/bin/sh -c date" == logs[3]
|
||||
assert "/nix/store/ij3gw72f4n5z4dz6nnzl1731p9kmjbwr-empty-file" == logs[4]
|
||||
assert "4.2" in logs[5] # toString produces extra fractional digits!
|
||||
assert "23" == logs[6]
|
||||
'';
|
||||
})
|
21
nixos/tests/tomcat.nix
Normal file
21
nixos/tests/tomcat.nix
Normal file
|
@ -0,0 +1,21 @@
|
|||
import ./make-test-python.nix ({ pkgs, ... }:
|
||||
|
||||
{
|
||||
name = "tomcat";
|
||||
|
||||
machine = { pkgs, ... }: {
|
||||
services.tomcat.enable = true;
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
machine.wait_for_unit("tomcat.service")
|
||||
machine.wait_for_open_port(8080)
|
||||
machine.wait_for_file("/var/tomcat/webapps/examples");
|
||||
machine.succeed(
|
||||
"curl --fail http://localhost:8080/examples/servlets/servlet/HelloWorldExample | grep 'Hello World!'"
|
||||
)
|
||||
machine.succeed(
|
||||
"curl --fail http://localhost:8080/examples/jsp/jsp2/simpletag/hello.jsp | grep 'Hello, world!'"
|
||||
)
|
||||
'';
|
||||
})
|
|
@ -6,11 +6,11 @@
|
|||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "bitwig-studio";
|
||||
version = "4.1.6";
|
||||
version = "4.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://downloads.bitwig.com/stable/${version}/${pname}-${version}.deb";
|
||||
sha256 = "sha256-Q4YYdMUd/T8tGGcakhoLdHvWsHwOq7LgIb77sr2OWuQ=";
|
||||
sha256 = "sha256-hIIEVj5sM/NdhBiwerFvyIXqj0R8EvcxwM6UZ0CE428=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ dpkg makeWrapper wrapGAppsHook ];
|
||||
|
|
|
@ -35,13 +35,13 @@
|
|||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "easyeffects";
|
||||
version = "6.2.3";
|
||||
version = "6.2.4";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "wwmm";
|
||||
repo = "easyeffects";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-A1UanrAbmZFGCmDNIr1h+v5RVMsIl4qgM/veBirudQM=";
|
||||
sha256 = "sha256-g/qN1Tafh71HdPLHW43Zva9MK6G+qxSnb1aRisuwdBw=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
|
33
pkgs/applications/audio/jellycli/default.nix
Normal file
33
pkgs/applications/audio/jellycli/default.nix
Normal file
|
@ -0,0 +1,33 @@
|
|||
{ lib, fetchFromGitHub, buildGoModule, alsa-lib }:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "jellycli";
|
||||
version = "0.9.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "tryffel";
|
||||
repo = "jellycli";
|
||||
rev = "v${version}";
|
||||
sha256 = "1awzcxnf175a794rhzbmqxxjss77mfa1yrr0wgdxaivrlkibxjys";
|
||||
};
|
||||
|
||||
vendorSha256 = "02fwsnrhj09m0aa199plpqlsjrwpmrk4c80fszzm07s5vmjqvnfy";
|
||||
|
||||
patches = [
|
||||
# Fixes log file path for tests.
|
||||
./fix-test-dir.patch
|
||||
];
|
||||
|
||||
buildInputs = [ alsa-lib ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Jellyfin terminal client";
|
||||
longDescription = ''
|
||||
Terminal music player, works with Jellyfin (>= 10.6) , Emby (>= 4.4), and
|
||||
Subsonic comptabile servers (API >= 1.16), e.g., Navidrome.
|
||||
'';
|
||||
homepage = "https://github.com/tryffel/jellycli";
|
||||
license = licenses.gpl3Plus;
|
||||
maintainers = with maintainers; [ oxzi ];
|
||||
};
|
||||
}
|
13
pkgs/applications/audio/jellycli/fix-test-dir.patch
Normal file
13
pkgs/applications/audio/jellycli/fix-test-dir.patch
Normal file
|
@ -0,0 +1,13 @@
|
|||
diff --git a/config/config_test.go b/config/config_test.go
|
||||
index 9f63a7e..7e790b8 100644
|
||||
--- a/config/config_test.go
|
||||
+++ b/config/config_test.go
|
||||
@@ -110,7 +110,7 @@ func TestInitEmptyConfig(t *testing.T) {
|
||||
Subsonic: Subsonic{},
|
||||
Player: Player{
|
||||
Server: "jellyfin",
|
||||
- LogFile: "/tmp/jellycli.log",
|
||||
+ LogFile: "/build/jellycli.log",
|
||||
LogLevel: "info",
|
||||
AudioBufferingMs: 150,
|
||||
HttpBufferingS: 5,
|
|
@ -1,39 +1,50 @@
|
|||
{ lib, stdenv, fetchFromGitHub
|
||||
, alsa-lib, flac, libmad, libvorbis, mpg123
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, alsa-lib
|
||||
, flac
|
||||
, libmad
|
||||
, libpulseaudio
|
||||
, libvorbis
|
||||
, mpg123
|
||||
, audioBackend ? "alsa"
|
||||
, dsdSupport ? true
|
||||
, faad2Support ? true, faad2
|
||||
, ffmpegSupport ? true, ffmpeg
|
||||
, opusSupport ? true, opusfile
|
||||
, resampleSupport ? true, soxr
|
||||
, sslSupport ? true, openssl
|
||||
, faad2Support ? true
|
||||
, faad2
|
||||
, ffmpegSupport ? true
|
||||
, ffmpeg
|
||||
, opusSupport ? true
|
||||
, opusfile
|
||||
, resampleSupport ? true
|
||||
, soxr
|
||||
, sslSupport ? true
|
||||
, openssl
|
||||
}:
|
||||
|
||||
let
|
||||
concatStringsSep = lib.concatStringsSep;
|
||||
optional = lib.optional;
|
||||
opts = [ "-DLINKALL" ]
|
||||
++ optional dsdSupport "-DDSD"
|
||||
++ optional (!faad2Support) "-DNO_FAAD"
|
||||
++ optional ffmpegSupport "-DFFMPEG"
|
||||
++ optional opusSupport "-DOPUS"
|
||||
++ optional resampleSupport "-DRESAMPLE"
|
||||
++ optional sslSupport "-DUSE_SSL";
|
||||
inherit (lib) optional optionalString;
|
||||
|
||||
in stdenv.mkDerivation {
|
||||
pname = "squeezelite";
|
||||
pulseSupport = audioBackend == "pulse";
|
||||
|
||||
binName = "squeezelite${optionalString pulseSupport "-pulse"}";
|
||||
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
# the nixos module uses the pname as the binary name
|
||||
pname = binName;
|
||||
# versions are specified in `squeezelite.h`
|
||||
# see https://github.com/ralph-irving/squeezelite/issues/29
|
||||
version = "1.9.6.1196";
|
||||
version = "1.9.9.1401";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ralph-irving";
|
||||
repo = "squeezelite";
|
||||
rev = "2b508464dce2cbdb2a3089c58df2a6fbc36328c0";
|
||||
sha256 = "024ypr1da2r079k3hgiifzd3d3wcfprhbl5zdm40zm0c7frzmr8i";
|
||||
owner = "ralph-irving";
|
||||
repo = "squeezelite";
|
||||
rev = "894df3ea80f66a27a9ae5fab918acf62a6798b8b";
|
||||
hash = "sha256-LIi+9vb0+56AGvVrLx4gQaUkUNjIi6PmqrLViLT1DSU=";
|
||||
};
|
||||
|
||||
buildInputs = [ alsa-lib flac libmad libvorbis mpg123 ]
|
||||
buildInputs = [ flac libmad libvorbis mpg123 ]
|
||||
++ lib.singleton (if pulseSupport then libpulseaudio else alsa-lib)
|
||||
++ optional faad2Support faad2
|
||||
++ optional ffmpegSupport ffmpeg
|
||||
++ optional opusSupport opusfile
|
||||
|
@ -47,15 +58,22 @@ in stdenv.mkDerivation {
|
|||
--replace "<opusfile.h>" "<opus/opusfile.h>"
|
||||
'';
|
||||
|
||||
preBuild = ''
|
||||
export OPTS="${concatStringsSep " " opts}"
|
||||
'';
|
||||
EXECUTABLE = binName;
|
||||
|
||||
OPTS = [ "-DLINKALL" ]
|
||||
++ optional dsdSupport "-DDSD"
|
||||
++ optional (!faad2Support) "-DNO_FAAD"
|
||||
++ optional ffmpegSupport "-DFFMPEG"
|
||||
++ optional opusSupport "-DOPUS"
|
||||
++ optional pulseSupport "-DPULSEAUDIO"
|
||||
++ optional resampleSupport "-DRESAMPLE"
|
||||
++ optional sslSupport "-DUSE_SSL";
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
install -Dm755 -t $out/bin squeezelite
|
||||
install -Dm644 -t $out/share/doc/squeezelite *.txt *.md
|
||||
install -Dm555 -t $out/bin ${binName}
|
||||
install -Dm444 -t $out/share/doc/squeezelite *.txt *.md
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
@ -63,7 +81,7 @@ in stdenv.mkDerivation {
|
|||
meta = with lib; {
|
||||
description = "Lightweight headless squeezebox client emulator";
|
||||
homepage = "https://github.com/ralph-irving/squeezelite";
|
||||
license = with licenses; [ gpl3 ] ++ optional dsdSupport bsd2;
|
||||
license = with licenses; [ gpl3Plus ] ++ optional dsdSupport bsd2;
|
||||
maintainers = with maintainers; [ samdoshi ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
|
|
37
pkgs/applications/editors/jetbrains/darwin.nix
Normal file
37
pkgs/applications/editors/jetbrains/darwin.nix
Normal file
|
@ -0,0 +1,37 @@
|
|||
{ lib
|
||||
, stdenvNoCC
|
||||
, undmg
|
||||
, ...
|
||||
}:
|
||||
|
||||
{ meta
|
||||
, name
|
||||
, product
|
||||
, productShort ? product
|
||||
, src
|
||||
, version
|
||||
, ...
|
||||
}:
|
||||
|
||||
let
|
||||
loname = lib.toLower productShort;
|
||||
in
|
||||
stdenvNoCC.mkDerivation {
|
||||
inherit meta src version;
|
||||
desktopName = product;
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
APP_DIR="$out/Applications/${product}.app"
|
||||
mkdir -p "$APP_DIR"
|
||||
cp -Tr "${product}.app" "$APP_DIR"
|
||||
mkdir -p "$out/bin"
|
||||
cat << EOF > "$out/bin/${loname}"
|
||||
open -na '$APP_DIR' --args "\$@"
|
||||
EOF
|
||||
chmod +x "$out/bin/${loname}"
|
||||
runHook postInstall
|
||||
'';
|
||||
nativeBuildInputs = [ undmg ];
|
||||
pname = lib.concatStringsSep "-" (lib.init (lib.splitString "-" name));
|
||||
sourceRoot = ".";
|
||||
}
|
|
@ -10,7 +10,18 @@
|
|||
with lib;
|
||||
|
||||
let
|
||||
mkJetBrainsProduct = callPackage ./common.nix { inherit vmopts; };
|
||||
platforms = lib.platforms.linux ++ [ "x86_64-darwin" "aarch64-darwin" ];
|
||||
ideaPlatforms = [ "x86_64-darwin" "i686-darwin" "i686-linux" "x86_64-linux" "aarch64-darwin" ];
|
||||
|
||||
inherit (stdenv.hostPlatform) system;
|
||||
|
||||
versions = builtins.fromJSON (readFile (./versions.json));
|
||||
versionKey = if stdenv.isLinux then "linux" else system;
|
||||
products = versions.${versionKey} or (throw "Unsupported system: ${system}");
|
||||
|
||||
package = if stdenv.isDarwin then ./darwin.nix else ./linux.nix;
|
||||
mkJetBrainsProduct = callPackage package { inherit vmopts; };
|
||||
|
||||
# Sorted alphabetically
|
||||
|
||||
buildClion = { name, version, src, license, description, wmClass, ... }:
|
||||
|
@ -19,13 +30,12 @@ let
|
|||
product = "CLion";
|
||||
meta = with lib; {
|
||||
homepage = "https://www.jetbrains.com/clion/";
|
||||
inherit description license;
|
||||
inherit description license platforms;
|
||||
longDescription = ''
|
||||
Enhancing productivity for every C and C++
|
||||
developer on Linux, macOS and Windows.
|
||||
'';
|
||||
maintainers = with maintainers; [ edwtjo mic92 ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}).overrideAttrs (attrs: {
|
||||
nativeBuildInputs = (attrs.nativeBuildInputs or []) ++ optionals (stdenv.isLinux) [
|
||||
|
@ -58,14 +68,13 @@ let
|
|||
product = "DataGrip";
|
||||
meta = with lib; {
|
||||
homepage = "https://www.jetbrains.com/datagrip/";
|
||||
inherit description license;
|
||||
inherit description license platforms;
|
||||
longDescription = ''
|
||||
DataGrip is a new IDE from JetBrains built for database admins.
|
||||
It allows you to quickly migrate and refactor relational databases,
|
||||
construct efficient, statically checked SQL queries and much more.
|
||||
'';
|
||||
maintainers = with maintainers; [ ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
});
|
||||
|
||||
|
@ -75,7 +84,7 @@ let
|
|||
product = "Goland";
|
||||
meta = with lib; {
|
||||
homepage = "https://www.jetbrains.com/go/";
|
||||
inherit description license;
|
||||
inherit description license platforms;
|
||||
longDescription = ''
|
||||
Goland is the codename for a new commercial IDE by JetBrains
|
||||
aimed at providing an ergonomic environment for Go development.
|
||||
|
@ -83,10 +92,9 @@ let
|
|||
and tool integrations specific for the Go language
|
||||
'';
|
||||
maintainers = [ maintainers.miltador ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}).overrideAttrs (attrs: {
|
||||
postFixup = (attrs.postFixup or "") + ''
|
||||
postFixup = (attrs.postFixup or "") + lib.optionalString stdenv.isLinux ''
|
||||
interp="$(cat $NIX_CC/nix-support/dynamic-linker)"
|
||||
patchelf --set-interpreter $interp $out/goland*/plugins/go/lib/dlv/linux/dlv
|
||||
|
||||
|
@ -98,10 +106,10 @@ let
|
|||
'';
|
||||
});
|
||||
|
||||
buildIdea = { name, version, src, license, description, wmClass, ... }:
|
||||
buildIdea = { name, version, src, license, description, wmClass, product, ... }:
|
||||
(mkJetBrainsProduct {
|
||||
inherit name version src wmClass jdk;
|
||||
product = "IDEA";
|
||||
inherit name version src wmClass jdk product;
|
||||
productShort = "IDEA";
|
||||
extraLdPath = [ zlib ];
|
||||
extraWrapperArgs = [
|
||||
''--set M2_HOME "${maven}/maven"''
|
||||
|
@ -116,18 +124,18 @@ let
|
|||
with JUnit, TestNG, popular SCMs, Ant & Maven. Also known
|
||||
as IntelliJ.
|
||||
'';
|
||||
maintainers = with maintainers; [ edwtjo gytis-ivaskevicius ];
|
||||
platforms = [ "x86_64-darwin" "i686-darwin" "i686-linux" "x86_64-linux" ];
|
||||
maintainers = with maintainers; [ edwtjo gytis-ivaskevicius steinybot ];
|
||||
platforms = ideaPlatforms;
|
||||
};
|
||||
});
|
||||
|
||||
buildMps = { name, version, src, license, description, wmClass, ... }:
|
||||
buildMps = { name, version, src, license, description, wmClass, product, ... }:
|
||||
(mkJetBrainsProduct rec {
|
||||
inherit name version src wmClass jdk;
|
||||
product = "MPS";
|
||||
inherit name version src wmClass jdk product;
|
||||
productShort = "MPS";
|
||||
meta = with lib; {
|
||||
homepage = "https://www.jetbrains.com/mps/";
|
||||
inherit license description;
|
||||
inherit license description platforms;
|
||||
longDescription = ''
|
||||
A metaprogramming system which uses projectional editing
|
||||
which allows users to overcome the limits of language
|
||||
|
@ -135,7 +143,6 @@ let
|
|||
diagrams.
|
||||
'';
|
||||
maintainers = with maintainers; [ rasendubi ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
});
|
||||
|
||||
|
@ -145,24 +152,23 @@ let
|
|||
product = "PhpStorm";
|
||||
meta = with lib; {
|
||||
homepage = "https://www.jetbrains.com/phpstorm/";
|
||||
inherit description license;
|
||||
inherit description license platforms;
|
||||
longDescription = ''
|
||||
PhpStorm provides an editor for PHP, HTML and JavaScript
|
||||
with on-the-fly code analysis, error prevention and
|
||||
automated refactorings for PHP and JavaScript code.
|
||||
'';
|
||||
maintainers = with maintainers; [ schristo ma27 ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
});
|
||||
|
||||
buildPycharm = { name, version, src, license, description, wmClass, ... }:
|
||||
buildPycharm = { name, version, src, license, description, wmClass, product, ... }:
|
||||
(mkJetBrainsProduct {
|
||||
inherit name version src wmClass jdk;
|
||||
product = "PyCharm";
|
||||
inherit name version src wmClass jdk product;
|
||||
productShort = "PyCharm";
|
||||
meta = with lib; {
|
||||
homepage = "https://www.jetbrains.com/pycharm/";
|
||||
inherit description license;
|
||||
inherit description license platforms;
|
||||
longDescription = ''
|
||||
Python IDE with complete set of tools for productive
|
||||
development with Python programming language. In addition, the
|
||||
|
@ -177,11 +183,8 @@ let
|
|||
and productive development!
|
||||
'';
|
||||
maintainers = with maintainers; [ ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}).override {
|
||||
propagatedUserEnvPkgs = [ python3 ];
|
||||
};
|
||||
});
|
||||
|
||||
buildRider = { name, version, src, license, description, wmClass, ... }:
|
||||
(mkJetBrainsProduct {
|
||||
|
@ -189,7 +192,7 @@ let
|
|||
product = "Rider";
|
||||
meta = with lib; {
|
||||
homepage = "https://www.jetbrains.com/rider/";
|
||||
inherit description license;
|
||||
inherit description license platforms;
|
||||
longDescription = ''
|
||||
JetBrains Rider is a new .NET IDE based on the IntelliJ
|
||||
platform and ReSharper. Rider supports .NET Core,
|
||||
|
@ -199,7 +202,6 @@ let
|
|||
ASP.NET Core web applications.
|
||||
'';
|
||||
maintainers = [ maintainers.miltador ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}).overrideAttrs (attrs: {
|
||||
postPatch = lib.optionalString (!stdenv.isDarwin) (attrs.postPatch + ''
|
||||
|
@ -215,10 +217,9 @@ let
|
|||
product = "RubyMine";
|
||||
meta = with lib; {
|
||||
homepage = "https://www.jetbrains.com/ruby/";
|
||||
inherit description license;
|
||||
inherit description license platforms;
|
||||
longDescription = description;
|
||||
maintainers = with maintainers; [ edwtjo ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
});
|
||||
|
||||
|
@ -228,14 +229,13 @@ let
|
|||
product = "WebStorm";
|
||||
meta = with lib; {
|
||||
homepage = "https://www.jetbrains.com/webstorm/";
|
||||
inherit description license;
|
||||
inherit description license platforms;
|
||||
longDescription = ''
|
||||
WebStorm provides an editor for HTML, JavaScript (incl. Node.js),
|
||||
and CSS with on-the-fly code analysis, error prevention and
|
||||
automated refactorings for JavaScript code.
|
||||
'';
|
||||
maintainers = with maintainers; [ abaldeau ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}).overrideAttrs (attrs: {
|
||||
postPatch = (attrs.postPatch or "") + optionalString (stdenv.isLinux) ''
|
||||
|
@ -244,6 +244,7 @@ let
|
|||
rm -r jbr
|
||||
'';
|
||||
});
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
|
@ -251,12 +252,12 @@ in
|
|||
|
||||
clion = buildClion rec {
|
||||
name = "clion-${version}";
|
||||
version = "2021.3.3"; /* updated by script */
|
||||
version = products.clion.version;
|
||||
description = "C/C++ IDE. New. Intelligent. Cross-platform";
|
||||
license = lib.licenses.unfree;
|
||||
src = fetchurl {
|
||||
url = "https://download.jetbrains.com/cpp/CLion-${version}.tar.gz";
|
||||
sha256 = "03gil00srq3jljc13iyb7v1yc6l6yhdhqm9d1ld2j2pympl6p61m"; /* updated by script */
|
||||
url = products.clion.url;
|
||||
sha256 = products.clion.sha256;
|
||||
};
|
||||
wmClass = "jetbrains-clion";
|
||||
update-channel = "CLion RELEASE"; # channel's id as in http://www.jetbrains.com/updates/updates.xml
|
||||
|
@ -264,12 +265,12 @@ in
|
|||
|
||||
datagrip = buildDataGrip rec {
|
||||
name = "datagrip-${version}";
|
||||
version = "2021.3.4"; /* updated by script */
|
||||
version = products.datagrip.version;
|
||||
description = "Your Swiss Army Knife for Databases and SQL";
|
||||
license = lib.licenses.unfree;
|
||||
src = fetchurl {
|
||||
url = "https://download.jetbrains.com/datagrip/${name}.tar.gz";
|
||||
sha256 = "09dkxj5vn99gkgc1yd18w7gqkw2vzci0z9q2fcih0zn7lvqp0im3"; /* updated by script */
|
||||
url = products.datagrip.url;
|
||||
sha256 = products.datagrip.sha256;
|
||||
};
|
||||
wmClass = "jetbrains-datagrip";
|
||||
update-channel = "DataGrip RELEASE";
|
||||
|
@ -277,12 +278,12 @@ in
|
|||
|
||||
goland = buildGoland rec {
|
||||
name = "goland-${version}";
|
||||
version = "2021.3.3"; /* updated by script */
|
||||
version = products.goland.version;
|
||||
description = "Up and Coming Go IDE";
|
||||
license = lib.licenses.unfree;
|
||||
src = fetchurl {
|
||||
url = "https://download.jetbrains.com/go/${name}.tar.gz";
|
||||
sha256 = "18z4mvxhds5fgdwcfywc4pj8s9ifvsknhradgzmxsvji0fbp0awx"; /* updated by script */
|
||||
url = products.goland.url;
|
||||
sha256 = products.goland.sha256;
|
||||
};
|
||||
wmClass = "jetbrains-goland";
|
||||
update-channel = "GoLand RELEASE";
|
||||
|
@ -290,12 +291,13 @@ in
|
|||
|
||||
idea-community = buildIdea rec {
|
||||
name = "idea-community-${version}";
|
||||
version = "2021.3.2"; /* updated by script */
|
||||
product = "IntelliJ IDEA CE";
|
||||
version = products.idea-community.version;
|
||||
description = "Integrated Development Environment (IDE) by Jetbrains, community edition";
|
||||
license = lib.licenses.asl20;
|
||||
src = fetchurl {
|
||||
url = "https://download.jetbrains.com/idea/ideaIC-${version}.tar.gz";
|
||||
sha256 = "1j889b2r950bl9wiqq1z8v8s2qicidfcdar300cy666i8rc25qlr"; /* updated by script */
|
||||
url = products.idea-community.url;
|
||||
sha256 = products.idea-community.sha256;
|
||||
};
|
||||
wmClass = "jetbrains-idea-ce";
|
||||
update-channel = "IntelliJ IDEA RELEASE";
|
||||
|
@ -303,12 +305,13 @@ in
|
|||
|
||||
idea-ultimate = buildIdea rec {
|
||||
name = "idea-ultimate-${version}";
|
||||
version = "2021.3.2"; /* updated by script */
|
||||
product = "IntelliJ IDEA";
|
||||
version = products.idea-ultimate.version;
|
||||
description = "Integrated Development Environment (IDE) by Jetbrains, requires paid license";
|
||||
license = lib.licenses.unfree;
|
||||
src = fetchurl {
|
||||
url = "https://download.jetbrains.com/idea/ideaIU-${version}-no-jbr.tar.gz";
|
||||
sha256 = "0w36qnqgkvw6j1ks09h515237bhqfaixrimzg2r494ic98amvkps"; /* updated by script */
|
||||
url = products.idea-ultimate.url;
|
||||
sha256 = products.idea-ultimate.sha256;
|
||||
};
|
||||
wmClass = "jetbrains-idea";
|
||||
update-channel = "IntelliJ IDEA RELEASE";
|
||||
|
@ -316,13 +319,13 @@ in
|
|||
|
||||
mps = buildMps rec {
|
||||
name = "mps-${version}";
|
||||
version = "2021.3"; /* updated by script */
|
||||
versionMajorMinor = "2021.3"; /* updated by script */
|
||||
product = "MPS ${products.mps.version-major-minor}";
|
||||
version = products.mps.version;
|
||||
description = "Create your own domain-specific language";
|
||||
license = lib.licenses.asl20;
|
||||
src = fetchurl {
|
||||
url = "https://download.jetbrains.com/mps/${versionMajorMinor}/MPS-${version}.tar.gz";
|
||||
sha256 = "0zw5xqdlhjfg0smfjl8xy7drf9spiwqbmqq8z22x4zb61lpvdbp9"; /* updated by script */
|
||||
url = products.mps.url;
|
||||
sha256 = products.mps.sha256;
|
||||
};
|
||||
wmClass = "jetbrains-mps";
|
||||
update-channel = "MPS RELEASE";
|
||||
|
@ -330,12 +333,12 @@ in
|
|||
|
||||
phpstorm = buildPhpStorm rec {
|
||||
name = "phpstorm-${version}";
|
||||
version = "2021.3.2"; /* updated by script */
|
||||
version = products.phpstorm.version;
|
||||
description = "Professional IDE for Web and PHP developers";
|
||||
license = lib.licenses.unfree;
|
||||
src = fetchurl {
|
||||
url = "https://download.jetbrains.com/webide/PhpStorm-${version}.tar.gz";
|
||||
sha256 = "1qi0zq3gzcfnikky37g2dqgmzm7r1883k6asris8nph389qk86vn"; /* updated by script */
|
||||
url = products.phpstorm.url;
|
||||
sha256 = products.phpstorm.sha256;
|
||||
};
|
||||
wmClass = "jetbrains-phpstorm";
|
||||
update-channel = "PhpStorm RELEASE";
|
||||
|
@ -343,12 +346,13 @@ in
|
|||
|
||||
pycharm-community = buildPycharm rec {
|
||||
name = "pycharm-community-${version}";
|
||||
version = "2021.3.2"; /* updated by script */
|
||||
product = "PyCharm CE";
|
||||
version = products.pycharm-community.version;
|
||||
description = "PyCharm Community Edition";
|
||||
license = lib.licenses.asl20;
|
||||
src = fetchurl {
|
||||
url = "https://download.jetbrains.com/python/${name}.tar.gz";
|
||||
sha256 = "1s36basydp7cxgbgdapjhkslx0x9vv3639xhm84ny76hf7s03bpi"; /* updated by script */
|
||||
url = products.pycharm-community.url;
|
||||
sha256 = products.pycharm-community.sha256;
|
||||
};
|
||||
wmClass = "jetbrains-pycharm-ce";
|
||||
update-channel = "PyCharm RELEASE";
|
||||
|
@ -356,12 +360,13 @@ in
|
|||
|
||||
pycharm-professional = buildPycharm rec {
|
||||
name = "pycharm-professional-${version}";
|
||||
version = "2021.3.2"; /* updated by script */
|
||||
product = "PyCharm";
|
||||
version = products.pycharm-professional.version;
|
||||
description = "PyCharm Professional Edition";
|
||||
license = lib.licenses.unfree;
|
||||
src = fetchurl {
|
||||
url = "https://download.jetbrains.com/python/${name}.tar.gz";
|
||||
sha256 = "0rwykngqgby05mh47kls8wzi68gfka2z04k6kdmsxwn1hhx5gnbb"; /* updated by script */
|
||||
url = products.pycharm-professional.url;
|
||||
sha256 = products.pycharm-professional.sha256;
|
||||
};
|
||||
wmClass = "jetbrains-pycharm";
|
||||
update-channel = "PyCharm RELEASE";
|
||||
|
@ -369,12 +374,12 @@ in
|
|||
|
||||
rider = buildRider rec {
|
||||
name = "rider-${version}";
|
||||
version = "2021.3.3"; /* updated by script */
|
||||
version = products.rider.version;
|
||||
description = "A cross-platform .NET IDE based on the IntelliJ platform and ReSharper";
|
||||
license = lib.licenses.unfree;
|
||||
src = fetchurl {
|
||||
url = "https://download.jetbrains.com/rider/JetBrains.Rider-${version}.tar.gz";
|
||||
sha256 = "13q6hk5l3fqmz818z5wj014jd5iglpdcpi8zlpgaim1jg5fpvi8x"; /* updated by script */
|
||||
url = products.rider.url;
|
||||
sha256 = products.rider.sha256;
|
||||
};
|
||||
wmClass = "jetbrains-rider";
|
||||
update-channel = "Rider RELEASE";
|
||||
|
@ -382,12 +387,12 @@ in
|
|||
|
||||
ruby-mine = buildRubyMine rec {
|
||||
name = "ruby-mine-${version}";
|
||||
version = "2021.3.2"; /* updated by script */
|
||||
version = products.ruby-mine.version;
|
||||
description = "The Most Intelligent Ruby and Rails IDE";
|
||||
license = lib.licenses.unfree;
|
||||
src = fetchurl {
|
||||
url = "https://download.jetbrains.com/ruby/RubyMine-${version}.tar.gz";
|
||||
sha256 = "18ny40zl9hgkynkc5yyy2xqngl9diifh2gqrfnz7rfq14kp10xb9"; /* updated by script */
|
||||
url = products.ruby-mine.url;
|
||||
sha256 = products.ruby-mine.sha256;
|
||||
};
|
||||
wmClass = "jetbrains-rubymine";
|
||||
update-channel = "RubyMine RELEASE";
|
||||
|
@ -395,12 +400,12 @@ in
|
|||
|
||||
webstorm = buildWebStorm rec {
|
||||
name = "webstorm-${version}";
|
||||
version = "2021.3.2"; /* updated by script */
|
||||
version = products.webstorm.version;
|
||||
description = "Professional IDE for Web and JavaScript development";
|
||||
license = lib.licenses.unfree;
|
||||
src = fetchurl {
|
||||
url = "https://download.jetbrains.com/webstorm/WebStorm-${version}.tar.gz";
|
||||
sha256 = "0q2hn48499hv7licpl84ly0bhiizya8a69dl2vjvgscj3cdkr98q"; /* updated by script */
|
||||
url = products.webstorm.url;
|
||||
sha256 = products.webstorm.sha256;
|
||||
};
|
||||
wmClass = "jetbrains-webstorm";
|
||||
update-channel = "WebStorm RELEASE";
|
||||
|
|
|
@ -3,17 +3,15 @@
|
|||
, vmopts ? null
|
||||
}:
|
||||
|
||||
{ name, product, version, src, wmClass, jdk, meta, extraLdPath ? [], extraWrapperArgs ? [] }@args:
|
||||
{ name, product, productShort ? product, version, src, wmClass, jdk, meta, extraLdPath ? [], extraWrapperArgs ? [] }@args:
|
||||
|
||||
with lib;
|
||||
|
||||
let loName = toLower product;
|
||||
hiName = toUpper product;
|
||||
let loName = toLower productShort;
|
||||
hiName = toUpper productShort;
|
||||
mainProgram = concatStringsSep "-" (init (splitString "-" name));
|
||||
vmoptsName = loName
|
||||
+ ( if (with stdenv.hostPlatform; (is32bit || isDarwin))
|
||||
then ""
|
||||
else "64" )
|
||||
+ lib.optionalString stdenv.hostPlatform.is64bit "64"
|
||||
+ ".vmoptions";
|
||||
in
|
||||
|
||||
|
@ -36,7 +34,7 @@ with stdenv; lib.makeOverridable mkDerivation (rec {
|
|||
|
||||
nativeBuildInputs = [ makeWrapper patchelf unzip ];
|
||||
|
||||
postPatch = lib.optionalString (!stdenv.isDarwin) ''
|
||||
postPatch = ''
|
||||
get_file_size() {
|
||||
local fname="$1"
|
||||
echo $(ls -l $fname | cut -d ' ' -f5)
|
||||
|
@ -73,7 +71,7 @@ with stdenv; lib.makeOverridable mkDerivation (rec {
|
|||
item=${desktopItem}
|
||||
|
||||
makeWrapper "$out/$name/bin/${loName}.sh" "$out/bin/${mainProgram}" \
|
||||
--prefix PATH : "$out/libexec/${name}:${lib.optionalString (stdenv.isDarwin) "${jdk}/jdk/Contents/Home/bin:"}${lib.makeBinPath [ jdk coreutils gnugrep which git ]}" \
|
||||
--prefix PATH : "$out/libexec/${name}:${lib.makeBinPath [ jdk coreutils gnugrep which git ]}" \
|
||||
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath ([
|
||||
# Some internals want libstdc++.so.6
|
||||
stdenv.cc.cc.lib libsecret e2fsprogs
|
|
@ -1,101 +0,0 @@
|
|||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i perl -p perl perlPackages.LWPProtocolHttps perlPackages.FileSlurp
|
||||
|
||||
use strict;
|
||||
use List::Util qw(reduce);
|
||||
use File::Slurp;
|
||||
use LWP::Simple;
|
||||
|
||||
my $only_free = grep { $_ eq "--only-free" } @ARGV;
|
||||
|
||||
sub semantic_less {
|
||||
my ($a, $b) = @_;
|
||||
$a =~ s/\b(\d+)\b/sprintf("%010s", $1)/eg;
|
||||
$b =~ s/\b(\d+)\b/sprintf("%010s", $1)/eg;
|
||||
return $a lt $b;
|
||||
}
|
||||
|
||||
sub get_latest_versions {
|
||||
my @channels = get("https://www.jetbrains.com/updates/updates.xml") =~ /(<channel .+?<\/channel>)/gs;
|
||||
my %h = {};
|
||||
for my $ch (@channels) {
|
||||
my ($id) = $ch =~ /^<channel id="[^"]+" name="([^"]+)"/;
|
||||
my @builds = $ch =~ /(<build .+?<\/build>)/gs;
|
||||
my $latest_build = reduce {
|
||||
my ($aversion) = $a =~ /^<build [^>]*version="([^"]+)"/; die "no version in $a" unless $aversion;
|
||||
my ($bversion) = $b =~ /^<build [^>]*version="([^"]+)"/; die "no version in $b" unless $bversion;
|
||||
semantic_less($aversion, $bversion) ? $b : $a;
|
||||
} @builds;
|
||||
next unless $latest_build;
|
||||
|
||||
# version as in download url
|
||||
my ($version) = $latest_build =~ /^<build [^>]*version="([^"]+)"/;
|
||||
my ($fullNumber) = $latest_build =~ /^<build [^>]*fullNumber="([^"]+)"/;
|
||||
my $latest_version_full1 = "$version-$fullNumber";
|
||||
$latest_version_full1 =~ s/\s*EAP//;
|
||||
|
||||
my ($latest_version) = $latest_build =~ /^<build [^>]*version="([^"]+)"/;
|
||||
($latest_version) = $latest_build =~ /^<build [^>]*fullNumber="([^"]+)"/ if $latest_version =~ / /;
|
||||
|
||||
$h{$id} = $latest_version;
|
||||
$h{"full1_" . $id} = $latest_version_full1;
|
||||
}
|
||||
return %h;
|
||||
}
|
||||
|
||||
my %latest_versions = get_latest_versions();
|
||||
# for my $ch (sort keys %latest_versions) {
|
||||
# print("$ch $latest_versions{$ch}\n");
|
||||
# }
|
||||
|
||||
sub update_nix_block {
|
||||
my ($block) = @_;
|
||||
my ($channel) = $block =~ /update-channel\s*=\s*"([^"]+)"/;
|
||||
if ($channel) {
|
||||
if ($latest_versions{$channel}) {
|
||||
my ($version) = $block =~ /version\s*=\s*"([^"]+)"/;
|
||||
die "no version in $block" unless $version;
|
||||
if ($version eq $latest_versions{$channel}) {
|
||||
print("$channel is up to date at $version\n");
|
||||
} elsif ($only_free && $block =~ /licenses\.unfree/) {
|
||||
print("$channel is unfree, skipping\n");
|
||||
} else {
|
||||
my $version_string = $latest_versions{$channel};
|
||||
my $versionMajorMinor = $version_string =~ s/^([0-9]+[.][0-9]+).*/$1/r;
|
||||
|
||||
print("updating $channel: $version -> $version_string\n");
|
||||
my ($url) = $block =~ /url\s*=\s*"([^"]+)"/;
|
||||
# try to interpret some nix
|
||||
my ($name) = $block =~ /name\s*=\s*"([^"]+)"/;
|
||||
$name =~ s/\$\{version\}/$version_string/;
|
||||
# Some url pattern contain variables more than once
|
||||
$url =~ s/\$\{name\}/$name/g;
|
||||
$url =~ s/\$\{version\}/$version_string/g;
|
||||
$url =~ s/\$\{versionMajorMinor\}/$versionMajorMinor/g;
|
||||
die "$url still has some interpolation" if $url =~ /\$/;
|
||||
my ($sha256) = get("$url.sha256") =~ /^([0-9a-f]{64})/;
|
||||
unless ( $sha256 ) {
|
||||
my $full_version = $latest_versions{"full1_" . $channel};
|
||||
$url =~ s/$version_string/$full_version/;
|
||||
($sha256) = get("$url.sha256") =~ /^([0-9a-f]{64})/;
|
||||
$version_string = $full_version;
|
||||
}
|
||||
die "invalid sha256 in $url.sha256" unless $sha256;
|
||||
my ($sha256Base32) = readpipe("nix-hash --type sha256 --to-base32 $sha256");
|
||||
chomp $sha256Base32;
|
||||
print "Jetbrains published SHA256: $sha256\n";
|
||||
print "Conversion into base32 yields: $sha256Base32\n";
|
||||
$block =~ s#version\s*=\s*"([^"]+)".+$#version = "$version_string"; /* updated by script */#m;
|
||||
$block =~ s#versionMajorMinor\s*=\s*"([^"]+)".+$#versionMajorMinor = "$versionMajorMinor"; /* updated by script */#m;
|
||||
$block =~ s#sha256\s*=\s*"([^"]+)".+$#sha256 = "$sha256Base32"; /* updated by script */#m;
|
||||
}
|
||||
} else {
|
||||
warn "unknown update-channel $channel";
|
||||
}
|
||||
}
|
||||
return $block;
|
||||
}
|
||||
|
||||
my $nix = read_file 'default.nix';
|
||||
$nix =~ s/(= build\w+ rec \{.+?\n \};\n)/update_nix_block($1)/gse;
|
||||
write_file 'default.nix', $nix;
|
97
pkgs/applications/editors/jetbrains/update.py
Executable file
97
pkgs/applications/editors/jetbrains/update.py
Executable file
|
@ -0,0 +1,97 @@
|
|||
#! /usr/bin/env nix-shell
|
||||
#! nix-shell -i python3 -p python3 python3.pkgs.packaging python3.pkgs.requests python3.pkgs.xmltodict
|
||||
import hashlib
|
||||
import json
|
||||
import pathlib
|
||||
import logging
|
||||
import requests
|
||||
import sys
|
||||
import xmltodict
|
||||
from packaging import version
|
||||
|
||||
updates_url = "https://www.jetbrains.com/updates/updates.xml"
|
||||
versions_file_path = pathlib.Path(__file__).parent.joinpath("versions.json").resolve()
|
||||
|
||||
logging.basicConfig(stream=sys.stdout, level=logging.DEBUG)
|
||||
|
||||
|
||||
def one_or_more(x):
|
||||
return x if isinstance(x, list) else [x]
|
||||
|
||||
|
||||
def download_channels():
|
||||
logging.info("Checking for updates from %s", updates_url)
|
||||
updates_response = requests.get(updates_url)
|
||||
updates_response.raise_for_status()
|
||||
root = xmltodict.parse(updates_response.text)
|
||||
products = root["products"]["product"]
|
||||
return {
|
||||
channel["@name"]: channel
|
||||
for product in products
|
||||
for channel in one_or_more(product["channel"])
|
||||
}
|
||||
|
||||
|
||||
def build_version(build):
|
||||
return version.parse(build["@version"])
|
||||
|
||||
|
||||
def latest_build(channel):
|
||||
builds = one_or_more(channel["build"])
|
||||
latest = max(builds, key=build_version)
|
||||
return latest
|
||||
|
||||
|
||||
def download_sha256(url):
|
||||
download_response = requests.get(url)
|
||||
download_response.raise_for_status()
|
||||
h = hashlib.sha256()
|
||||
h.update(download_response.content)
|
||||
return h.hexdigest()
|
||||
|
||||
|
||||
channels = download_channels()
|
||||
|
||||
|
||||
def update_product(name, product):
|
||||
update_channel = product["update-channel"]
|
||||
logging.info("Updating %s", name)
|
||||
channel = channels.get(update_channel)
|
||||
if channel is None:
|
||||
logging.error("Failed to find channel %s.", update_channel)
|
||||
logging.error("Check that the update-channel in %s matches the name in %s", versions_file_path, updates_url)
|
||||
else:
|
||||
try:
|
||||
build = latest_build(channel)
|
||||
version = build["@version"]
|
||||
parsed_version = build_version(build)
|
||||
version_major_minor = f"{parsed_version.major}.{parsed_version.minor}"
|
||||
download_url = product["url-template"].format(version = version, versionMajorMinor = version_major_minor)
|
||||
product["url"] = download_url
|
||||
product["version-major-minor"] = version_major_minor
|
||||
if "sha256" not in product or product.get("version") != version:
|
||||
logging.info("Found a newer version %s.", version)
|
||||
product["version"] = version
|
||||
product["sha256"] = download_sha256(download_url)
|
||||
else:
|
||||
logging.info("Already at the latest version %s.", version)
|
||||
except Exception as e:
|
||||
logging.exception("Update failed:", exc_info=e)
|
||||
logging.warning("Skipping %s due to the above error.", name)
|
||||
logging.warning("It may be out-of-date. Fix the error and rerun.")
|
||||
|
||||
|
||||
def update_products(products):
|
||||
for name, product in products.items():
|
||||
update_product(name, product)
|
||||
|
||||
|
||||
with open(versions_file_path, "r") as versions_file:
|
||||
versions = json.load(versions_file)
|
||||
|
||||
for products in versions.values():
|
||||
update_products(products)
|
||||
|
||||
with open(versions_file_path, "w") as versions_file:
|
||||
json.dump(versions, versions_file, indent=2)
|
||||
versions_file.write("\n")
|
296
pkgs/applications/editors/jetbrains/versions.json
Normal file
296
pkgs/applications/editors/jetbrains/versions.json
Normal file
|
@ -0,0 +1,296 @@
|
|||
{
|
||||
"linux": {
|
||||
"clion": {
|
||||
"update-channel": "CLion RELEASE",
|
||||
"url-template": "https://download.jetbrains.com/cpp/CLion-{version}.tar.gz",
|
||||
"version": "2021.3.3",
|
||||
"sha256": "35986be8adfe0a291a0d2d550c1bf4861ae6c33ecbc71198a472e0ac01a0f10d",
|
||||
"url": "https://download.jetbrains.com/cpp/CLion-2021.3.3.tar.gz",
|
||||
"version-major-minor": "2021.3"
|
||||
},
|
||||
"datagrip": {
|
||||
"update-channel": "DataGrip RELEASE",
|
||||
"url-template": "https://download.jetbrains.com/datagrip/datagrip-{version}.tar.gz",
|
||||
"version": "2021.3.4",
|
||||
"sha256": "a34670f1a6c77e00237302a70f22fb5bf089dfe128341fd89b2f25bb8becb325",
|
||||
"url": "https://download.jetbrains.com/datagrip/datagrip-2021.3.4.tar.gz",
|
||||
"version-major-minor": "2021.3"
|
||||
},
|
||||
"goland": {
|
||||
"update-channel": "GoLand RELEASE",
|
||||
"url-template": "https://download.jetbrains.com/go/goland-{version}.tar.gz",
|
||||
"version": "2021.3.3",
|
||||
"sha256": "9d2b709703516eddeb7f4d6568a7de2e268de4258c7bc7787baee806fbaee4a3",
|
||||
"url": "https://download.jetbrains.com/go/goland-2021.3.3.tar.gz",
|
||||
"version-major-minor": "2021.3"
|
||||
},
|
||||
"idea-community": {
|
||||
"update-channel": "IntelliJ IDEA RELEASE",
|
||||
"url-template": "https://download.jetbrains.com/idea/ideaIC-{version}.tar.gz",
|
||||
"version": "2021.3.2",
|
||||
"sha256": "99e2225846d118e3190023abc65c8b2c62a1d1463f601c79a20b9494c54a08c9",
|
||||
"url": "https://download.jetbrains.com/idea/ideaIC-2021.3.2.tar.gz",
|
||||
"version-major-minor": "2021.3"
|
||||
},
|
||||
"idea-ultimate": {
|
||||
"update-channel": "IntelliJ IDEA RELEASE",
|
||||
"url-template": "https://download.jetbrains.com/idea/ideaIU-{version}-no-jbr.tar.gz",
|
||||
"version": "2021.3.2",
|
||||
"sha256": "face5d154a2c9244b278bfc6dca37218ae3344090526a0679086eff9b0c56670",
|
||||
"url": "https://download.jetbrains.com/idea/ideaIU-2021.3.2-no-jbr.tar.gz",
|
||||
"version-major-minor": "2021.3"
|
||||
},
|
||||
"mps": {
|
||||
"update-channel": "MPS RELEASE",
|
||||
"url-template": "https://download.jetbrains.com/mps/{versionMajorMinor}/MPS-{version}.tar.gz",
|
||||
"version": "2021.3",
|
||||
"sha256": "e9aeb62f0d667dd285f808e3ba308f572797dbf11d51e9aa06cf49481bee857f",
|
||||
"url": "https://download.jetbrains.com/mps/2021.3/MPS-2021.3.tar.gz",
|
||||
"version-major-minor": "2021.3"
|
||||
},
|
||||
"phpstorm": {
|
||||
"update-channel": "PhpStorm RELEASE",
|
||||
"url-template": "https://download.jetbrains.com/webide/PhpStorm-{version}.tar.gz",
|
||||
"version": "2021.3.2",
|
||||
"sha256": "761b347142035e8b74cc5a9939100af9d45f1f6ee29de1e78cd6b1ff06fe20e2",
|
||||
"url": "https://download.jetbrains.com/webide/PhpStorm-2021.3.2.tar.gz",
|
||||
"version-major-minor": "2021.3"
|
||||
},
|
||||
"pycharm-community": {
|
||||
"update-channel": "PyCharm RELEASE",
|
||||
"url-template": "https://download.jetbrains.com/python/pycharm-community-{version}.tar.gz",
|
||||
"version": "2021.3.2",
|
||||
"sha256": "f1ae01f471d01c6f09aab0a761c6dea9834ef584f2aaf6d6ebecdce6b55a66e8",
|
||||
"url": "https://download.jetbrains.com/python/pycharm-community-2021.3.2.tar.gz",
|
||||
"version-major-minor": "2021.3"
|
||||
},
|
||||
"pycharm-professional": {
|
||||
"update-channel": "PyCharm RELEASE",
|
||||
"url-template": "https://download.jetbrains.com/python/pycharm-professional-{version}.tar.gz",
|
||||
"version": "2021.3.2",
|
||||
"sha256": "6bd9573a84c1f2ae6b9b6612f0859aee21133f479ace43602dc0af879f9d9e67",
|
||||
"url": "https://download.jetbrains.com/python/pycharm-professional-2021.3.2.tar.gz",
|
||||
"version-major-minor": "2021.3"
|
||||
},
|
||||
"rider": {
|
||||
"update-channel": "Rider RELEASE",
|
||||
"url-template": "https://download.jetbrains.com/rider/JetBrains.Rider-{version}.tar.gz",
|
||||
"version": "2021.3.3",
|
||||
"sha256": "1dc57d5d7932d4a8dea51fc5cbdaa52f9626490092978f02fa15bb41cb84068f",
|
||||
"url": "https://download.jetbrains.com/rider/JetBrains.Rider-2021.3.3.tar.gz",
|
||||
"version-major-minor": "2021.3"
|
||||
},
|
||||
"ruby-mine": {
|
||||
"update-channel": "RubyMine RELEASE",
|
||||
"url-template": "https://download.jetbrains.com/ruby/RubyMine-{version}.tar.gz",
|
||||
"version": "2021.3.2",
|
||||
"sha256": "697510ee2401bb7cbe75193f015d8c2dd1677117defbc2a6f5f3c1443f20dea2",
|
||||
"url": "https://download.jetbrains.com/ruby/RubyMine-2021.3.2.tar.gz",
|
||||
"version-major-minor": "2021.3"
|
||||
},
|
||||
"webstorm": {
|
||||
"update-channel": "WebStorm RELEASE",
|
||||
"url-template": "https://download.jetbrains.com/webstorm/WebStorm-{version}.tar.gz",
|
||||
"version": "2021.3.2",
|
||||
"sha256": "18a53c1b1b92e9b7e516b425a390f23f46b880a704d1cb223d1ba64410b15060",
|
||||
"url": "https://download.jetbrains.com/webstorm/WebStorm-2021.3.2.tar.gz",
|
||||
"version-major-minor": "2021.3"
|
||||
}
|
||||
},
|
||||
"x86_64-darwin": {
|
||||
"clion": {
|
||||
"update-channel": "CLion RELEASE",
|
||||
"url-template": "https://download.jetbrains.com/cpp/CLion-{version}.dmg",
|
||||
"version": "2021.3.3",
|
||||
"sha256": "342a4d8549ae4623a5edfa7f9737887cf0a25c1a61bb414b54b742b1c5a1a84d",
|
||||
"url": "https://download.jetbrains.com/cpp/CLion-2021.3.3.dmg",
|
||||
"version-major-minor": "2021.3"
|
||||
},
|
||||
"datagrip": {
|
||||
"update-channel": "DataGrip RELEASE",
|
||||
"url-template": "https://download.jetbrains.com/datagrip/datagrip-{version}.dmg",
|
||||
"version": "2021.3.4",
|
||||
"sha256": "27e709d2ced66d37a615d8c56885828e49a08962708e28df1a20f324c626bf52",
|
||||
"url": "https://download.jetbrains.com/datagrip/datagrip-2021.3.4.dmg",
|
||||
"version-major-minor": "2021.3"
|
||||
},
|
||||
"goland": {
|
||||
"update-channel": "GoLand RELEASE",
|
||||
"url-template": "https://download.jetbrains.com/go/goland-{version}.dmg",
|
||||
"version": "2021.3.3",
|
||||
"sha256": "4b245b6fe0cf588adbf36e68f12397d5fd311b0b6d49f17ba374ebaa10d207c9",
|
||||
"url": "https://download.jetbrains.com/go/goland-2021.3.3.dmg",
|
||||
"version-major-minor": "2021.3"
|
||||
},
|
||||
"idea-community": {
|
||||
"update-channel": "IntelliJ IDEA RELEASE",
|
||||
"url-template": "https://download.jetbrains.com/idea/ideaIC-{version}.dmg",
|
||||
"version": "2021.3.2",
|
||||
"sha256": "20d8cee2bbedaeb0ea388f795e13d08eca5b59e59d4e980ac2d8bc07c9fed3e9",
|
||||
"url": "https://download.jetbrains.com/idea/ideaIC-2021.3.2.dmg",
|
||||
"version-major-minor": "2021.3"
|
||||
},
|
||||
"idea-ultimate": {
|
||||
"update-channel": "IntelliJ IDEA RELEASE",
|
||||
"url-template": "https://download.jetbrains.com/idea/ideaIU-{version}.dmg",
|
||||
"version": "2021.3.2",
|
||||
"sha256": "9f574562b866e6ccc3d2f9b4c245c45844d1d0fd54be3dbdcc893d40ba1cf54a",
|
||||
"url": "https://download.jetbrains.com/idea/ideaIU-2021.3.2.dmg",
|
||||
"version-major-minor": "2021.3"
|
||||
},
|
||||
"mps": {
|
||||
"update-channel": "MPS RELEASE",
|
||||
"url-template": "https://download.jetbrains.com/mps/{versionMajorMinor}/MPS-{version}-macos.dmg",
|
||||
"version": "2021.3",
|
||||
"sha256": "2c5517518fec31ac960e4309fa848ad831f9048ef15df1b362e12aa8f41d9dbd",
|
||||
"url": "https://download.jetbrains.com/mps/2021.3/MPS-2021.3-macos.dmg",
|
||||
"version-major-minor": "2021.3"
|
||||
},
|
||||
"phpstorm": {
|
||||
"update-channel": "PhpStorm RELEASE",
|
||||
"url-template": "https://download.jetbrains.com/webide/PhpStorm-{version}.dmg",
|
||||
"version": "2021.3.2",
|
||||
"sha256": "596a9d5fdc30d5fba65ddd482da90f9d555fed748b930587562022bfe7df4e14",
|
||||
"url": "https://download.jetbrains.com/webide/PhpStorm-2021.3.2.dmg",
|
||||
"version-major-minor": "2021.3"
|
||||
},
|
||||
"pycharm-community": {
|
||||
"update-channel": "PyCharm RELEASE",
|
||||
"url-template": "https://download.jetbrains.com/python/pycharm-community-{version}.dmg",
|
||||
"version": "2021.3.2",
|
||||
"sha256": "b8f41f5dddeda0ed5f5c81ba57d2560ccc6e227987882fb6bf305b5d1d8c6909",
|
||||
"url": "https://download.jetbrains.com/python/pycharm-community-2021.3.2.dmg",
|
||||
"version-major-minor": "2021.3"
|
||||
},
|
||||
"pycharm-professional": {
|
||||
"update-channel": "PyCharm RELEASE",
|
||||
"url-template": "https://download.jetbrains.com/python/pycharm-professional-{version}.dmg",
|
||||
"version": "2021.3.2",
|
||||
"sha256": "188b998660e7cfb7ac1364c818c008a5608ab2aeb17c6cc19d1d9dda547d3775",
|
||||
"url": "https://download.jetbrains.com/python/pycharm-professional-2021.3.2.dmg",
|
||||
"version-major-minor": "2021.3"
|
||||
},
|
||||
"rider": {
|
||||
"update-channel": "Rider RELEASE",
|
||||
"url-template": "https://download.jetbrains.com/rider/JetBrains.Rider-{version}.dmg",
|
||||
"version": "2021.3.3",
|
||||
"sha256": "41a0939cb6258a0fb303268c5a466a663cf3588af14bcbb351be4c3a1d158094",
|
||||
"url": "https://download.jetbrains.com/rider/JetBrains.Rider-2021.3.3.dmg",
|
||||
"version-major-minor": "2021.3"
|
||||
},
|
||||
"ruby-mine": {
|
||||
"update-channel": "RubyMine RELEASE",
|
||||
"url-template": "https://download.jetbrains.com/ruby/RubyMine-{version}.dmg",
|
||||
"version": "2021.3.2",
|
||||
"sha256": "ba27c14b21d66ca96a64ceb7dc5d9f0952254a5f405b3201f51d2ad3cc749a96",
|
||||
"url": "https://download.jetbrains.com/ruby/RubyMine-2021.3.2.dmg",
|
||||
"version-major-minor": "2021.3"
|
||||
},
|
||||
"webstorm": {
|
||||
"update-channel": "WebStorm RELEASE",
|
||||
"url-template": "https://download.jetbrains.com/webstorm/WebStorm-{version}.dmg",
|
||||
"version": "2021.3.2",
|
||||
"sha256": "932d4920f831d1ceae68a474444c37d986277d8d3288d3aab93dd43d99336a36",
|
||||
"url": "https://download.jetbrains.com/webstorm/WebStorm-2021.3.2.dmg",
|
||||
"version-major-minor": "2021.3"
|
||||
}
|
||||
},
|
||||
"aarch64-darwin": {
|
||||
"clion": {
|
||||
"update-channel": "CLion RELEASE",
|
||||
"url-template": "https://download.jetbrains.com/cpp/CLion-{version}-aarch64.dmg",
|
||||
"version": "2021.3.3",
|
||||
"sha256": "fbf651fa4a5925fe729be30ca8a6fa3be84dc4d7827dbcf74f4d28c52b903cc2",
|
||||
"url": "https://download.jetbrains.com/cpp/CLion-2021.3.3-aarch64.dmg",
|
||||
"version-major-minor": "2021.3"
|
||||
},
|
||||
"datagrip": {
|
||||
"update-channel": "DataGrip RELEASE",
|
||||
"url-template": "https://download.jetbrains.com/datagrip/datagrip-{version}-aarch64.dmg",
|
||||
"version": "2021.3.4",
|
||||
"sha256": "7a77ba9fce56c781ae6a4fc65eaab4bcc10780b6bd679b04d74146719e42890a",
|
||||
"url": "https://download.jetbrains.com/datagrip/datagrip-2021.3.4-aarch64.dmg",
|
||||
"version-major-minor": "2021.3"
|
||||
},
|
||||
"goland": {
|
||||
"update-channel": "GoLand RELEASE",
|
||||
"url-template": "https://download.jetbrains.com/go/goland-{version}-aarch64.dmg",
|
||||
"version": "2021.3.3",
|
||||
"sha256": "54397d48e20fb534206e13f84b35868b1eaea13175176487b1239b23db4e13db",
|
||||
"url": "https://download.jetbrains.com/go/goland-2021.3.3-aarch64.dmg",
|
||||
"version-major-minor": "2021.3"
|
||||
},
|
||||
"idea-community": {
|
||||
"update-channel": "IntelliJ IDEA RELEASE",
|
||||
"url-template": "https://download.jetbrains.com/idea/ideaIC-{version}-aarch64.dmg",
|
||||
"version": "2021.3.2",
|
||||
"sha256": "79e540fb0cd480837b3a954e4802f4f252073955393e8927c9c1b28c37112d51",
|
||||
"url": "https://download.jetbrains.com/idea/ideaIC-2021.3.2-aarch64.dmg",
|
||||
"version-major-minor": "2021.3"
|
||||
},
|
||||
"idea-ultimate": {
|
||||
"update-channel": "IntelliJ IDEA RELEASE",
|
||||
"url-template": "https://download.jetbrains.com/idea/ideaIU-{version}-aarch64.dmg",
|
||||
"version": "2021.3.2",
|
||||
"sha256": "511c6aed9c5cd4c7665a9bac9ba94582977013244cbe88b820eb5464fce91a1c",
|
||||
"url": "https://download.jetbrains.com/idea/ideaIU-2021.3.2-aarch64.dmg",
|
||||
"version-major-minor": "2021.3"
|
||||
},
|
||||
"mps": {
|
||||
"update-channel": "MPS RELEASE",
|
||||
"url-template": "https://download.jetbrains.com/mps/{versionMajorMinor}/MPS-{version}-macos-aarch64.dmg",
|
||||
"version": "2021.3",
|
||||
"url": "https://download.jetbrains.com/mps/2021.3/MPS-2021.3-macos-aarch64.dmg",
|
||||
"sha256": "3ace6d45db718dffd80bf126a76735fb65099de292112a01cc078aa61c475a70",
|
||||
"version-major-minor": "2021.3"
|
||||
},
|
||||
"phpstorm": {
|
||||
"update-channel": "PhpStorm RELEASE",
|
||||
"url-template": "https://download.jetbrains.com/webide/PhpStorm-{version}-aarch64.dmg",
|
||||
"version": "2021.3.2",
|
||||
"sha256": "ba15c3f843c85141a9adaec1c4611224a853bd98649148751e34ac304591a314",
|
||||
"url": "https://download.jetbrains.com/webide/PhpStorm-2021.3.2-aarch64.dmg",
|
||||
"version-major-minor": "2021.3"
|
||||
},
|
||||
"pycharm-community": {
|
||||
"update-channel": "PyCharm RELEASE",
|
||||
"url-template": "https://download.jetbrains.com/python/pycharm-community-{version}-aarch64.dmg",
|
||||
"version": "2021.3.2",
|
||||
"sha256": "407bf395cfb6d61f1c0861c7679b197238780e82a019e10162b8cd7130edb15a",
|
||||
"url": "https://download.jetbrains.com/python/pycharm-community-2021.3.2-aarch64.dmg",
|
||||
"version-major-minor": "2021.3"
|
||||
},
|
||||
"pycharm-professional": {
|
||||
"update-channel": "PyCharm RELEASE",
|
||||
"url-template": "https://download.jetbrains.com/python/pycharm-professional-{version}-aarch64.dmg",
|
||||
"version": "2021.3.2",
|
||||
"sha256": "12fa34d1e60a555bac230acea9cd46c7adfe9ca42ff3e458c79d33e5b88eb8db",
|
||||
"url": "https://download.jetbrains.com/python/pycharm-professional-2021.3.2-aarch64.dmg",
|
||||
"version-major-minor": "2021.3"
|
||||
},
|
||||
"rider": {
|
||||
"update-channel": "Rider RELEASE",
|
||||
"url-template": "https://download.jetbrains.com/rider/JetBrains.Rider-{version}-aarch64.dmg",
|
||||
"version": "2021.3.3",
|
||||
"sha256": "65603860d1fd3134c5659f5a06de7cac17f3183a01056b79cfe72242b99adb37",
|
||||
"url": "https://download.jetbrains.com/rider/JetBrains.Rider-2021.3.3-aarch64.dmg",
|
||||
"version-major-minor": "2021.3"
|
||||
},
|
||||
"ruby-mine": {
|
||||
"update-channel": "RubyMine RELEASE",
|
||||
"url-template": "https://download.jetbrains.com/ruby/RubyMine-{version}-aarch64.dmg",
|
||||
"version": "2021.3.2",
|
||||
"sha256": "33773222b2fa14300de5ed12ca96c3442b933f66cef67cebc9610e5cef51c75e",
|
||||
"url": "https://download.jetbrains.com/ruby/RubyMine-2021.3.2-aarch64.dmg",
|
||||
"version-major-minor": "2021.3"
|
||||
},
|
||||
"webstorm": {
|
||||
"update-channel": "WebStorm RELEASE",
|
||||
"url-template": "https://download.jetbrains.com/webstorm/WebStorm-{version}-aarch64.dmg",
|
||||
"version": "2021.3.2",
|
||||
"sha256": "f4788ec0c55123b1f4e14934792f65bf8040e2a2ee673e985b50b8feded60408",
|
||||
"url": "https://download.jetbrains.com/webstorm/WebStorm-2021.3.2-aarch64.dmg",
|
||||
"version-major-minor": "2021.3"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -6,13 +6,13 @@
|
|||
|
||||
mkDerivation rec {
|
||||
pname = "sigil";
|
||||
version = "1.9.1";
|
||||
version = "1.9.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
repo = "Sigil";
|
||||
owner = "Sigil-Ebook";
|
||||
rev = version;
|
||||
sha256 = "sha256-PsHliyJu61QFTFZUgDtxguu18GBVTOGMW6pPYjHhvG0=";
|
||||
sha256 = "sha256-LfP3qUzoHuYSpkTz1queVGTWOP9v9kbgbgvvtiMK6Eo=";
|
||||
};
|
||||
|
||||
pythonPath = with python3Packages; [ lxml ];
|
||||
|
|
|
@ -14,17 +14,17 @@ let
|
|||
archive_fmt = if stdenv.isDarwin then "zip" else "tar.gz";
|
||||
|
||||
sha256 = {
|
||||
x86_64-linux = "09hqcym8dj4d8r5ibdzypdmjxdw4ix24zq688vnb4kfas2jbb3hi";
|
||||
x86_64-darwin = "1wij82gl1wqrprrfn9cfih19wr4h3bn2xapr1l2l0mkansrzsvg5";
|
||||
aarch64-linux = "09x93i190lmxb3ygzjcmb7ag3dz7ixf07yk7zqc7ljrnn5f0b6ag";
|
||||
aarch64-darwin = "1k7glnqy0vjx55chjpwbgwipcvzb0vx0wmvqis865pvzmr0d06a0";
|
||||
armv7l-linux = "0vkivg1f61k8vkr0j9dm7fw2klh45xxnp07pill1gmrwxafm5bra";
|
||||
x86_64-linux = "0x8vc6gj83mn767wi285k0hxhlh5gh1lcvq63na89vglja4ipna4";
|
||||
x86_64-darwin = "1x47xfq0fgd10wq6aa8gq55aqrl1ir1f6v1mm6324yny16pf20k2";
|
||||
aarch64-linux = "1ibg2qvpnwfwwzgby2xva9xz138b13x9q8vf1xf6plazv0arla1l";
|
||||
aarch64-darwin = "100834mqix7b46frlqf0jz4qs673lavxm8sizfjm7c9y0xxy4ld3";
|
||||
armv7l-linux = "100yfkzvnjccp1g3p353jr2vicvkjc0skiwmmzgad6i8j1m9js62";
|
||||
}.${system};
|
||||
in
|
||||
callPackage ./generic.nix rec {
|
||||
# Please backport all compatible updates to the stable release.
|
||||
# This is important for the extension ecosystem.
|
||||
version = "1.65.1";
|
||||
version = "1.65.2";
|
||||
pname = "vscode";
|
||||
|
||||
executableName = "code" + lib.optionalString isInsiders "-insiders";
|
||||
|
|
|
@ -13,10 +13,10 @@ let
|
|||
archive_fmt = if system == "x86_64-darwin" then "zip" else "tar.gz";
|
||||
|
||||
sha256 = {
|
||||
x86_64-linux = "09zpc8c2il6x88h65kbm6z8vfnx0byzpcqqy9a1za5ilqr3dhk43";
|
||||
x86_64-darwin = "09m2ij0phf5ni5m110z2bnmd9z50lz1qsh7w7cfawycjhwsl602z";
|
||||
aarch64-linux = "1nsdn9mc4ahrz392w2z071sfxc5jmwhamlaid2qy899cc7sk8nqr";
|
||||
armv7l-linux = "1ii6li6l09ccxf0gyjy3f5752kr4a8pga5w0a0ndgfa73mhlamin";
|
||||
x86_64-linux = "1sh2f7hwhilwmlgy11kl0s2n3phpcir15wyl2fkyhsr2kdj4jz9r";
|
||||
x86_64-darwin = "1s04d91f08982wi8hb4dw0j57d6zqrdgns16ihrgsvahrzksgq4b";
|
||||
aarch64-linux = "1a97lk1qz2lz0lk5lpja32zy07iwdbskp6baf429iz7fz232rshm";
|
||||
armv7l-linux = "0vjqxqcr7fq3ncx1nl6ny7qcqm4vlsn33c074hhcg5292blg2a0p";
|
||||
}.${system};
|
||||
|
||||
sourceRoot = {
|
||||
|
@ -31,7 +31,7 @@ in
|
|||
|
||||
# Please backport all compatible updates to the stable release.
|
||||
# This is important for the extension ecosystem.
|
||||
version = "1.65.1";
|
||||
version = "1.65.2";
|
||||
pname = "vscodium";
|
||||
|
||||
executableName = "codium";
|
||||
|
|
|
@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
|
|||
sha256 = "sha256-csWowcRSgF5M74yv787MLSXOGXrkxnODCCgC5a3Nd7Y=";
|
||||
};
|
||||
|
||||
makeFlags = [ "KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" "INSTALL_MOD_PATH=$(out)" ];
|
||||
makeFlags = kernel.makeFlags ++ [ "KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" "INSTALL_MOD_PATH=$(out)" ];
|
||||
nativeBuildInputs = kernel.moduleBuildDependencies;
|
||||
|
||||
meta = with lib; {
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "fceux";
|
||||
version = "2.6.2";
|
||||
version = "2.6.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "TASEmulators";
|
||||
repo = pname;
|
||||
rev = "${pname}-${version}";
|
||||
sha256 = "sha256-yQX58m/sMW/8Jr5cm2SrVXTiF7qyZOgOZg1v0qEyiLw=";
|
||||
sha256 = "sha256-jNR9AB8s2S9ehYsompkV2GOLsaXIQzldeQ1WRCxdDG0=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake pkg-config wrapQtAppsHook ];
|
||||
|
|
|
@ -9,10 +9,10 @@
|
|||
|
||||
let
|
||||
# Keep these separate so the update script can regex them
|
||||
rpcs3GitVersion = "13222-8c2fd5095";
|
||||
rpcs3Version = "0.0.20-13222-8c2fd5095";
|
||||
rpcs3Revision = "8c2fd50957be3af05c04a9bb782dce8505fb6400";
|
||||
rpcs3Sha256 = "1cf62vpqdc9i4masgv9zz24h7zdc7gcymx6n1hbh7wp5gg1dw4qi";
|
||||
rpcs3GitVersion = "13327-6c096b72b";
|
||||
rpcs3Version = "0.0.21-13327-6c096b72b";
|
||||
rpcs3Revision = "6c096b72b5294758067a002f981563bbd618d30d";
|
||||
rpcs3Sha256 = "0xmdhjskqbv02jvl43bvw0clsgh9gnahl50fr3q8lmpwpy13ldr4";
|
||||
|
||||
ittapi = fetchFromGitHub {
|
||||
owner = "intel";
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "lightburn";
|
||||
version = "1.1.01";
|
||||
version = "1.1.03";
|
||||
|
||||
nativeBuildInputs = [
|
||||
p7zip
|
||||
|
@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
|
|||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/LightBurnSoftware/deployment/releases/download/${version}/LightBurn-Linux64-v${version}.7z";
|
||||
sha256 = "sha256-HgyqpZTf9GTsbDi1+e20YNoFIPYtTHQd8KC626G0038=";
|
||||
sha256 = "sha256-X7hAkzVqIABpyFokiYaMGZqSda69cKhKghFDWDEVOow=";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
|
|
|
@ -11,13 +11,13 @@
|
|||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "nsxiv";
|
||||
version = "28";
|
||||
version = "29";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "nsxiv";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
hash = "sha256-12RmEAzZdeanrRtnan96loXT7qSjIMjcWf296XmNE+A=";
|
||||
hash = "sha256-JUF2cF6QeAXk6G76uMu3reaMgxp2RcqHDbamkNufwqE=";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
}:
|
||||
|
||||
let
|
||||
version = "5.9.1";
|
||||
version = "5.10.0";
|
||||
|
||||
docFiles = [
|
||||
(fetchurl {
|
||||
|
@ -35,7 +35,7 @@ in mkDerivation rec {
|
|||
owner = "paraview";
|
||||
repo = "paraview";
|
||||
rev = "v${version}";
|
||||
sha256 = "0pzic95br0vr785jnpxqmfxcljw3wk7bhm2xy0jfmwm1dh2b7xac";
|
||||
sha256 = "0ipx6zq44hpic7gvv0s2jvjncak6vlmrz5sp9ypc15b15bna0gs2";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
|
|
|
@ -2,16 +2,16 @@
|
|||
|
||||
buildGoModule rec {
|
||||
pname = "charm";
|
||||
version = "0.10.2";
|
||||
version = "0.10.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "charmbracelet";
|
||||
repo = "charm";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-kyfyRq/5QWMoiMooEpLv7UkehGxFlrfGEq9jA3OHiIs=";
|
||||
sha256 = "sha256-7WdSIpmpN8Zz2k5PveYZoCueQo5sLxLLZvZdzxRlkaE=";
|
||||
};
|
||||
|
||||
vendorSha256 = "sha256-LB5fwySDOH+kOYYdGdtLAvETmI6fFP2QT6l2eAS3Ijg=";
|
||||
vendorSha256 = "sha256-5cqZxh2uvmJV7DtAGzQwt//heF3kF9mjyB0KAs8nWZY=";
|
||||
|
||||
doCheck = false;
|
||||
|
||||
|
|
|
@ -34,8 +34,8 @@ let
|
|||
qonlinetranslator = fetchFromGitHub {
|
||||
owner = "crow-translate";
|
||||
repo = "QOnlineTranslator";
|
||||
rev = "1.5.2";
|
||||
sha256 = "sha256-iGi25aKwff2hNNx6o4kHZV8gVbEQcMgpTTvop3CoLjM=";
|
||||
rev = "1.5.3";
|
||||
sha256 = "sha256-L8y4vazbWD5SC7itxQOjEcX10w0laewxTOGz+Yd+kVM=";
|
||||
};
|
||||
circleflags = fetchFromGitHub {
|
||||
owner = "HatScripts";
|
||||
|
@ -52,13 +52,13 @@ let
|
|||
in
|
||||
mkDerivation rec {
|
||||
pname = "crow-translate";
|
||||
version = "2.9.1";
|
||||
version = "2.9.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "crow-translate";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "sha256-7Zb6PZO8eLeGPEZD37ja+LZydIQdsgy5gMAMtlS4k5Y=";
|
||||
sha256 = "sha256-cxfBdoqGVmtCaXyw6QzXj2V44wKyVal/uqsddwIdvjw=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
|
|
|
@ -46,7 +46,7 @@ index c92e745..f265f03 100644
|
|||
|
||||
FetchContent_Declare(QOnlineTranslator
|
||||
- GIT_REPOSITORY https://github.com/crow-translate/QOnlineTranslator
|
||||
- GIT_TAG 1.5.2
|
||||
- GIT_TAG 1.5.3
|
||||
+ SOURCE_DIR @qonlinetranslator@
|
||||
)
|
||||
|
||||
|
|
|
@ -5,16 +5,16 @@
|
|||
|
||||
buildGoModule rec {
|
||||
pname = "dasel";
|
||||
version = "1.22.1";
|
||||
version = "1.23.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "TomWright";
|
||||
repo = "dasel";
|
||||
rev = "v${version}";
|
||||
sha256 = "091s3hyz9p892garanm9zmkbsn6hn3bnnrz7h3dqsyi58806d5yr";
|
||||
sha256 = "sha256-MUF57begai6yMYLPC5dnyO9S39uHogB+Ie3qDA46Cn8=";
|
||||
};
|
||||
|
||||
vendorSha256 = "1y0k03lg9dh3bpi10xzv03h7gq7h0hgggs304p78p3jkr8pmkqss";
|
||||
vendorSha256 = "sha256-NP+Is7Dxz4LGzx5vpv8pJOJhodAYHia1JXYfhJD54as=";
|
||||
|
||||
ldflags = [
|
||||
"-s" "-w" "-X github.com/tomwright/dasel/internal.Version=${version}"
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
|
||||
stdenvNoCC.mkDerivation rec {
|
||||
pname = "fluidd";
|
||||
version = "1.16.2";
|
||||
version = "1.17.1";
|
||||
|
||||
src = fetchurl {
|
||||
name = "fluidd-v${version}.zip";
|
||||
url = "https://github.com/cadriel/fluidd/releases/download/v${version}/fluidd.zip";
|
||||
sha256 = "1qwj25xvvxvm1fxx216nn2gp7js4d682mm3l4s7ns90fc5ygvc8i";
|
||||
sha256 = "sha256-F4hAFLsZmRg/zeTHo9eYoT0BasorynGaSzNSbKr2/JE=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ unzip ];
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
, curl, writeShellScript, common-updater-scripts }:
|
||||
|
||||
let
|
||||
url = "https://hubstaff-production.s3.amazonaws.com/downloads/HubstaffClient/Builds/Release/1.6.4-6681f81d/Hubstaff-1.6.4-6681f81d.sh";
|
||||
version = "1.6.4-6681f81d";
|
||||
sha256 = "1j0rzyqm9zm2w44zwxq61fy19m27ghlv11mbfl7yzh2ccmxljxjm";
|
||||
url = "https://hubstaff-production.s3.amazonaws.com/downloads/HubstaffClient/Builds/Release/1.6.5-31be26f1/Hubstaff-1.6.5-31be26f1.sh";
|
||||
version = "1.6.5-31be26f1";
|
||||
sha256 = "1z1binnqppyxavmjg0l1cvy64ylzy2v454sws2x1am2qhhbnycjm";
|
||||
|
||||
rpath = lib.makeLibraryPath
|
||||
[ libX11 zlib libSM libICE libXext freetype libXrender fontconfig libXft
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{ lib, stdenv, fetchurl, appimageTools, makeWrapper, electron }:
|
||||
{ lib, stdenv, fetchurl, appimageTools, makeWrapper, autoPatchelfHook, electron, curl, expat, gcc, openssl, zlib }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "logseq";
|
||||
version = "0.6.1";
|
||||
version = "0.6.3";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/logseq/logseq/releases/download/${version}/logseq-linux-x64-${version}.AppImage";
|
||||
sha256 = "ccLqOKH10hmROnxlnNxuD5/AqAcFIILIoW/9yZLEep0=";
|
||||
sha256 = "o3tBHk7bauNczz6lPS3lV0mpYEaBa0lh/mAJKJM2eWU=";
|
||||
name = "${pname}-${version}.AppImage";
|
||||
};
|
||||
|
||||
|
@ -19,7 +19,8 @@ stdenv.mkDerivation rec {
|
|||
dontConfigure = true;
|
||||
dontBuild = true;
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
nativeBuildInputs = [ makeWrapper autoPatchelfHook ];
|
||||
buildInputs = [ stdenv.cc.cc curl expat openssl zlib ];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
|
|
@ -18,13 +18,13 @@
|
|||
|
||||
mkDerivation rec {
|
||||
pname = "mediaelch";
|
||||
version = "2.8.14";
|
||||
version = "2.8.16";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Komet";
|
||||
repo = "MediaElch";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-yHThX5Xs+8SijNKgmg+4Mawbwi3zHA/DJQoIBy0Wchs=";
|
||||
sha256 = "sha256-83bHfIRVAC+3RkCYmV+TBjjQxaFMHfVyxt5Jq44dzeI=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
python3.pkgs.buildPythonApplication rec {
|
||||
pname = "metadata-cleaner";
|
||||
version = "2.1.4";
|
||||
version = "2.1.5";
|
||||
|
||||
format = "other";
|
||||
|
||||
|
@ -26,7 +26,7 @@ python3.pkgs.buildPythonApplication rec {
|
|||
owner = "rmnvgr";
|
||||
repo = "metadata-cleaner";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-46J0iLXzZX5tww4CK8WhrADql023rauO0fpW7Asn5ZY=";
|
||||
hash = "sha256-G7Azeh8+OQILoYEmlIeacoDzN0NRt5NTGavYM9CH8WA=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
|
|
@ -13,11 +13,11 @@ let
|
|||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "splitter";
|
||||
version = "645";
|
||||
version = "647";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://www.mkgmap.org.uk/download/splitter-r${version}-src.tar.gz";
|
||||
sha256 = "Y9feRNDjmwUbSOwxfMIaYIycCvOBMihq5LkuKbALVDY=";
|
||||
sha256 = "j9TJ+9WuItueztWjYoD9s9x8wfsga2QCIY5X2+s3Z1c=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
|
|
|
@ -15,13 +15,13 @@
|
|||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "otpclient";
|
||||
version = "2.4.8";
|
||||
version = "2.4.9.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "paolostivanin";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-2exqMYcxg0UxlH+ZANQv2MFii9dZ6nizB4vxGR9cAwk=";
|
||||
sha256 = "sha256-QcdPyuwbGK12Kul+gGTfRGmXfghr0qugpBEcrgATOT4=";
|
||||
};
|
||||
|
||||
buildInputs = [ gtk3 jansson libgcrypt libzip libpng libcotp zbar ];
|
||||
|
|
|
@ -1,5 +1,30 @@
|
|||
{ lib, stdenv, fetchFromGitHub, systemd }:
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, formats
|
||||
, systemd
|
||||
}:
|
||||
|
||||
let
|
||||
ini = formats.ini { };
|
||||
|
||||
unit = ini.generate "systembus-notify.service" {
|
||||
Unit = {
|
||||
Description = "system bus notification daemon";
|
||||
};
|
||||
|
||||
Service = {
|
||||
Type = "exec";
|
||||
ExecStart = "@out@/bin/systembus-notify";
|
||||
PrivateTmp = true;
|
||||
ProtectHome = true;
|
||||
ProtectSystem = "strict";
|
||||
Restart = "on-failure";
|
||||
Slice = "background.slice";
|
||||
};
|
||||
};
|
||||
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "systembus-notify";
|
||||
version = "1.1";
|
||||
|
@ -8,23 +33,32 @@ stdenv.mkDerivation rec {
|
|||
owner = "rfjakob";
|
||||
repo = "systembus-notify";
|
||||
rev = "v${version}";
|
||||
sha256 = "1pdn45rfpwhrf20hs87qmk2j8sr7ab8161f81019wnypnb1q2fsv";
|
||||
sha256 = "sha256-WzuBw7LXW54CCMgFE9BSJ2skxaz4IA2BcBny63Ihtt0=";
|
||||
};
|
||||
|
||||
buildInputs = [ systemd ];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
install -Dm755 systembus-notify -t $out/bin
|
||||
install -Dm644 systembus-notify.desktop -t $out/etc/xdg/autostart
|
||||
|
||||
install -Dm555 -t $out/bin systembus-notify
|
||||
install -Dm444 -t $out/share/systembus-notify systembus-notify.desktop
|
||||
|
||||
install -d $out/lib/systemd/user
|
||||
substitute ${unit} $out/lib/systemd/user/${unit.name} \
|
||||
--subst-var out
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
# requires a running dbus instance
|
||||
doCheck = false;
|
||||
|
||||
meta = with lib; {
|
||||
description = "System bus notification daemon";
|
||||
homepage = "https://github.com/rfjakob/systembus-notify";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ peterhoeg ];
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -30,13 +30,13 @@
|
|||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "waybar";
|
||||
version = "0.9.10";
|
||||
version = "0.9.12";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Alexays";
|
||||
repo = "Waybar";
|
||||
rev = version;
|
||||
sha256 = "sha256-KiRtU32h3AvThDWnCw55LnqbWVAZLXY/7fU1HxLMjLo=";
|
||||
sha256 = "sha256-NQ/d+eXmc+GRxl5zby97S4U/YQnsRWGpwNZZL0Sqby8=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
|
|
@ -19,9 +19,9 @@
|
|||
}
|
||||
},
|
||||
"beta": {
|
||||
"version": "100.0.4896.20",
|
||||
"sha256": "0g16xzimp39vk5b27bj12rh14520wihj4m4mwxf387rv0yp03cnr",
|
||||
"sha256bin64": "1qkz32xvgbnd7xck0hm2mcrgdawn6xilldjgfckaaavvj4zinnk9",
|
||||
"version": "100.0.4896.30",
|
||||
"sha256": "06zfx9f6wv4j4fz7ss8pjlxfcsrwrvwqkmdk5bin7slxg4sq31fl",
|
||||
"sha256bin64": "06s2p81grqrxl3p9ksy9q7s3s42ijmcw316nb51f7zx4ijk5hzya",
|
||||
"deps": {
|
||||
"gn": {
|
||||
"version": "2022-01-21",
|
||||
|
@ -32,9 +32,9 @@
|
|||
}
|
||||
},
|
||||
"dev": {
|
||||
"version": "101.0.4919.0",
|
||||
"sha256": "01dp3pkpf2m6r6vfyqgcg99xcii0qi3qm0g69r3nnj2hrs7ziqv2",
|
||||
"sha256bin64": "1x7bfcnhrbakcbdyp1sc79jx6qysnnyj1by6qnl7gyffh8xyb95g",
|
||||
"version": "101.0.4929.5",
|
||||
"sha256": "0330vs0np23x390lfnc5gzmbnkdak590rzqpa7abpfx1gzj1rd3s",
|
||||
"sha256bin64": "0670z86sz2wxpfxda32cirara7yg87g67cymh8ik3w99g5q7cb1d",
|
||||
"deps": {
|
||||
"gn": {
|
||||
"version": "2022-03-01",
|
||||
|
|
|
@ -15,7 +15,9 @@
|
|||
, rust-cbindgen, nodejs, nasm, fetchpatch
|
||||
, gnum4
|
||||
, gtk3, wrapGAppsHook
|
||||
, pkgsCross
|
||||
, debugBuild ? false
|
||||
, runCommand
|
||||
|
||||
### optionals
|
||||
|
||||
|
@ -121,6 +123,15 @@ let
|
|||
})
|
||||
else stdenv;
|
||||
|
||||
# Compile the wasm32 sysroot to build the RLBox Sandbox
|
||||
# https://hacks.mozilla.org/2021/12/webassembly-and-back-again-fine-grained-sandboxing-in-firefox-95/
|
||||
# We only link c++ libs here, our compiler wrapper can find wasi libc and crt itself.
|
||||
wasiSysRoot = runCommand "wasi-sysroot" {} ''
|
||||
mkdir -p $out/lib/wasm32-wasi
|
||||
for lib in ${pkgsCross.wasi32.llvmPackages.libcxx}/lib/* ${pkgsCross.wasi32.llvmPackages.libcxxabi}/lib/*; do
|
||||
ln -s $lib $out/lib/wasm32-wasi
|
||||
done
|
||||
'';
|
||||
in
|
||||
|
||||
buildStdenv.mkDerivation ({
|
||||
|
@ -213,7 +224,11 @@ buildStdenv.mkDerivation ({
|
|||
configureScript="$(realpath ./mach) configure"
|
||||
export MOZBUILD_STATE_PATH=$(pwd)/mozbuild
|
||||
|
||||
'' + (lib.optionalString googleAPISupport ''
|
||||
'' + (lib.optionalString (lib.versionAtLeast version "95.0") ''
|
||||
# RBox WASM Sandboxing
|
||||
export WASM_CC=${pkgsCross.wasi32.stdenv.cc}/bin/${pkgsCross.wasi32.stdenv.cc.targetPrefix}cc
|
||||
export WASM_CXX=${pkgsCross.wasi32.stdenv.cc}/bin/${pkgsCross.wasi32.stdenv.cc.targetPrefix}c++
|
||||
'') + (lib.optionalString googleAPISupport ''
|
||||
# Google API key used by Chromium and Firefox.
|
||||
# Note: These are for NixOS/nixpkgs use ONLY. For your own distribution,
|
||||
# please get your own set of keys.
|
||||
|
@ -258,6 +273,7 @@ buildStdenv.mkDerivation ({
|
|||
++ lib.optional ltoSupport "--enable-lto=cross" # Cross-language LTO.
|
||||
++ lib.optional (ltoSupport && (buildStdenv.isAarch32 || buildStdenv.isi686 || buildStdenv.isx86_64)) "--disable-elf-hack"
|
||||
++ lib.optional (ltoSupport && !buildStdenv.isDarwin) "--enable-linker=lld"
|
||||
++ lib.optional (lib.versionAtLeast version "95") "--with-wasi-sysroot=${wasiSysRoot}"
|
||||
|
||||
++ flag alsaSupport "alsa"
|
||||
++ flag pulseaudioSupport "pulseaudio"
|
||||
|
@ -277,7 +293,6 @@ buildStdenv.mkDerivation ({
|
|||
++ lib.optionals enableDebugSymbols [ "--disable-strip" "--disable-install-strip" ]
|
||||
|
||||
++ lib.optional enableOfficialBranding "--enable-official-branding"
|
||||
++ lib.optional (lib.versionAtLeast version "95") "--without-wasm-sandboxed-libraries"
|
||||
++ extraConfigureFlags;
|
||||
|
||||
postConfigure = ''
|
||||
|
@ -356,6 +371,7 @@ buildStdenv.mkDerivation ({
|
|||
inherit applicationName;
|
||||
inherit tests;
|
||||
inherit gtk3;
|
||||
inherit wasiSysRoot;
|
||||
} // extraPassthru;
|
||||
|
||||
hardeningDisable = [ "format" ]; # -Werror=format-security
|
||||
|
|
|
@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
|
|||
|
||||
inherit patches;
|
||||
|
||||
installFlags = [ "PREFIX=$(out)" ];
|
||||
makeFlags = [ "PREFIX=$(out)" ];
|
||||
|
||||
# Add run-time dependencies to PATH. Append them to PATH so the user can
|
||||
# override the dependencies with their own PATH.
|
||||
|
|
|
@ -2,15 +2,15 @@
|
|||
|
||||
buildGoModule rec {
|
||||
pname = "cloudfoundry-cli";
|
||||
version = "8.0.0";
|
||||
version = "8.3.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "cloudfoundry";
|
||||
repo = "cli";
|
||||
rev = "v${version}";
|
||||
sha256 = "00cwnfylra0msbb423ad21if98s6smzccsyidqsl4r2mrlkhahwm";
|
||||
sha256 = "sha256-tC9U0yvuMEwO4mzWyUC+v+/H0EzgwTu02waTQrx19Bs=";
|
||||
};
|
||||
vendorSha256 = "0fcgyyd11xfhn8i11bqnaw3h51bj1y8s37b4d8wzv31dr8zswqsc";
|
||||
vendorSha256 = "sha256-aXq92SI4cgJrmo67SEfg8YKPEpO2UW2fcYnKq9TmAQg=";
|
||||
|
||||
subPackages = [ "." ];
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ WORKDIR=$(mktemp -d)
|
|||
trap "rm -rf ${WORKDIR}" EXIT
|
||||
|
||||
NIXPKGS_ROOT="$(git rev-parse --show-toplevel)"/
|
||||
NIXPKGS_K3S_FOLDER=${NIXPKGS_ROOT}$(dirname "${BASH_SOURCE[0]}")/
|
||||
NIXPKGS_K3S_FOLDER=$(cd $(dirname ${BASH_SOURCE[0]}); pwd -P)/
|
||||
cd ${NIXPKGS_K3S_FOLDER}
|
||||
|
||||
LATEST_TAG_RAWFILE=${WORKDIR}/latest_tag.json
|
||||
|
|
25
pkgs/applications/networking/cluster/kubemqctl/default.nix
Normal file
25
pkgs/applications/networking/cluster/kubemqctl/default.nix
Normal file
|
@ -0,0 +1,25 @@
|
|||
{ lib, buildGoModule, fetchFromGitHub }:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "kubemqctl";
|
||||
version = "3.5.1";
|
||||
src = fetchFromGitHub {
|
||||
owner = "kubemq-io";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "0daqvd1y6b87xvnpdl2k0sa91zdmp48r0pgp6dvnb2l44ml8a4z0";
|
||||
};
|
||||
|
||||
ldflags = [ "-w" "-s" "-X main.version=${version}" ];
|
||||
|
||||
doCheck = false; # TODO tests are failing
|
||||
|
||||
vendorSha256 = "1agn6i7cnsb5igvvbjzlaa5fgssr5h7h25y440q44bk16jxk6s74";
|
||||
|
||||
meta = {
|
||||
homepage = "https://github.com/kubemq-io/kubemqctl";
|
||||
description = "Kubemqctl is a command line interface (CLI) for Kubemq Kubernetes Message Broker.";
|
||||
license = lib.licenses.asl20;
|
||||
maintainers = with lib.maintainers; [ brianmcgee ];
|
||||
};
|
||||
}
|
|
@ -40,10 +40,10 @@
|
|||
"owner": "aliyun",
|
||||
"provider-source-address": "registry.terraform.io/aliyun/alicloud",
|
||||
"repo": "terraform-provider-alicloud",
|
||||
"rev": "v1.159.0",
|
||||
"sha256": "0vfpmagxrlv6fqaq008lhygxd49br06d0bi1w6dsazfszw3ihj02",
|
||||
"vendorSha256": "05vkn52s0x6kcyxxs0p7w6z1nclmvvla7rjv1ippzw7fgn2s19m0",
|
||||
"version": "1.159.0"
|
||||
"rev": "v1.160.0",
|
||||
"sha256": "sha256-ijSOvBS8bcFKX0qa2Cl/xqDdwduamVdCWzgTCWao1Sg=",
|
||||
"vendorSha256": "sha256-oKaghX3u8H9vDFvmo+jelTIbvuHnAt27Z9N0oEWxcxc=",
|
||||
"version": "1.160.0"
|
||||
},
|
||||
"ansible": {
|
||||
"owner": "nbering",
|
||||
|
@ -94,28 +94,28 @@
|
|||
"owner": "hashicorp",
|
||||
"provider-source-address": "registry.terraform.io/hashicorp/aws",
|
||||
"repo": "terraform-provider-aws",
|
||||
"rev": "v4.4.0",
|
||||
"sha256": "082bllsihmc4jndi1hrv1chcrdm755vphlgpajg22s1ajmylqgm5",
|
||||
"vendorSha256": "0j6ghjr2mhi7nixkk8v9vwm6sr78h0wnj1lxs19lkrpnvy6jc31i",
|
||||
"version": "4.4.0"
|
||||
"rev": "v4.5.0",
|
||||
"sha256": "sha256-L1LRuinU3YrqywRGpmUqGQgjZ1JuYhECjCN6ysYPzco=",
|
||||
"vendorSha256": "sha256-3akEup/M7Zc5MPf2XA+324PxQiHegIwzR05JNSjYanw=",
|
||||
"version": "4.5.0"
|
||||
},
|
||||
"azuread": {
|
||||
"owner": "hashicorp",
|
||||
"provider-source-address": "registry.terraform.io/hashicorp/azuread",
|
||||
"repo": "terraform-provider-azuread",
|
||||
"rev": "v2.18.0",
|
||||
"sha256": "06l4w9g4p48gnb9c9mmnydvpyr89f8rijpf103ndsg6ack6k4mg2",
|
||||
"rev": "v2.19.1",
|
||||
"sha256": "sha256-n5jDlcy5rwCcrqoL3ut+HThDLQ8hPj2mZ15d7hhALFw=",
|
||||
"vendorSha256": null,
|
||||
"version": "2.18.0"
|
||||
"version": "2.19.1"
|
||||
},
|
||||
"azurerm": {
|
||||
"owner": "hashicorp",
|
||||
"provider-source-address": "registry.terraform.io/hashicorp/azurerm",
|
||||
"repo": "terraform-provider-azurerm",
|
||||
"rev": "v2.98.0",
|
||||
"sha256": "0cfdw70q1kh6f50gsc94mh1xi7s4z47wfsmskp1ahx7av7wpz1p6",
|
||||
"rev": "v2.99.0",
|
||||
"sha256": "sha256-HXLr22UVciRvW1iaa46sy37ivG41hKqhrQtCXpnl8ss=",
|
||||
"vendorSha256": null,
|
||||
"version": "2.98.0"
|
||||
"version": "2.99.0"
|
||||
},
|
||||
"azurestack": {
|
||||
"owner": "hashicorp",
|
||||
|
@ -148,10 +148,10 @@
|
|||
"owner": "DrFaust92",
|
||||
"provider-source-address": "registry.terraform.io/DrFaust92/bitbucket",
|
||||
"repo": "terraform-provider-bitbucket",
|
||||
"rev": "v2.4.1",
|
||||
"sha256": "07y0biab2g6plkyp8scqf7b12alijnxq2zqqr05lbm6wgrc22kvk",
|
||||
"vendorSha256": null,
|
||||
"version": "2.4.1"
|
||||
"rev": "v2.8.0",
|
||||
"sha256": "sha256-W+mAud3DpBViLeFwXLWIwZ1+TOco8FWZnVrIbHUwgIU=",
|
||||
"vendorSha256": "sha256-hSMVLDZXC9QMpcgREjEUjhxArtotrIrIyfdNIZw8uM4=",
|
||||
"version": "2.8.0"
|
||||
},
|
||||
"brightbox": {
|
||||
"owner": "brightbox",
|
||||
|
@ -166,10 +166,10 @@
|
|||
"owner": "checkly",
|
||||
"provider-source-address": "registry.terraform.io/checkly/checkly",
|
||||
"repo": "terraform-provider-checkly",
|
||||
"rev": "v1.4.2",
|
||||
"sha256": "1wd9834d3yi2y35yrcrgxmzijrb2ymz11gqmva9m1hd10i0aqj9f",
|
||||
"vendorSha256": "0pjxrdpsn99g6hjp0flrk7czjb05ibnsjcggrvvpwzrbj55rqzgd",
|
||||
"version": "1.4.2"
|
||||
"rev": "v1.4.3",
|
||||
"sha256": "sha256-5VF1cAFgdm2TR4wvuNlycpgQuVdHesFYnTv34MeauxY=",
|
||||
"vendorSha256": "sha256-7X2cS5Erf373zu8xqe2KBSz52ZmZOnAlNC8lq2/LXV4=",
|
||||
"version": "1.4.3"
|
||||
},
|
||||
"checkpoint": {
|
||||
"deleteVendor": true,
|
||||
|
@ -194,10 +194,10 @@
|
|||
"owner": "cloudflare",
|
||||
"provider-source-address": "registry.terraform.io/cloudflare/cloudflare",
|
||||
"repo": "terraform-provider-cloudflare",
|
||||
"rev": "v3.9.1",
|
||||
"sha256": "02kyjf2mizvxv1a2fkw2wsk0gmilj83sj3qv1d7g0wxxkxx00nd2",
|
||||
"vendorSha256": "167jafxr4g43y9gvqjq5z7vd9cyf15d69wbrdvqsfzj8sszqfq5l",
|
||||
"version": "3.9.1"
|
||||
"rev": "v3.10.1",
|
||||
"sha256": "sha256-2Ulavo82Y8dEOXtgpbgCwuCTOhAEoOFbgL4bK5HXQlY=",
|
||||
"vendorSha256": "sha256-CgK1/Ddau3glxmzb7Y6o1RZbMV8dwA84F6n2OzuyZrU=",
|
||||
"version": "3.10.1"
|
||||
},
|
||||
"cloudfoundry": {
|
||||
"owner": "cloudfoundry-community",
|
||||
|
@ -257,10 +257,10 @@
|
|||
"owner": "DataDog",
|
||||
"provider-source-address": "registry.terraform.io/DataDog/datadog",
|
||||
"repo": "terraform-provider-datadog",
|
||||
"rev": "v3.8.1",
|
||||
"sha256": "0mvl80dsqzab1r3p5n446737dadzfbsyfbdy2w2xvmz4fgx6aklh",
|
||||
"vendorSha256": "0p8czqb4hn5z9bfgsfajdpx46hwil0ax75j8xljlh1ccvpp2rvyz",
|
||||
"version": "3.8.1"
|
||||
"rev": "v3.9.0",
|
||||
"sha256": "sha256-CncMqWIa1JiHkIkNAgIQl4fcKZVKZGD4BZSjuv5cw18=",
|
||||
"vendorSha256": "sha256-U1gVP4o1mj21NW9z8jyV5KhuJNJRYAV1Qvg1fV1zGO4=",
|
||||
"version": "3.9.0"
|
||||
},
|
||||
"dhall": {
|
||||
"owner": "awakesecurity",
|
||||
|
@ -275,10 +275,10 @@
|
|||
"owner": "digitalocean",
|
||||
"provider-source-address": "registry.terraform.io/digitalocean/digitalocean",
|
||||
"repo": "terraform-provider-digitalocean",
|
||||
"rev": "v2.17.1",
|
||||
"sha256": "0dfw4sjmsfzrs28gf5k4vqjs6phwa6w3pwi7fpbngnw6l2r4m6h9",
|
||||
"rev": "v2.18.0",
|
||||
"sha256": "sha256-MuJpBLOB8AeAlNhQC+rwT6mkZriU4+XgAqQY33xjFck=",
|
||||
"vendorSha256": null,
|
||||
"version": "2.17.1"
|
||||
"version": "2.18.0"
|
||||
},
|
||||
"dme": {
|
||||
"owner": "DNSMadeEasy",
|
||||
|
@ -329,19 +329,19 @@
|
|||
"owner": "phillbaker",
|
||||
"provider-source-address": "registry.terraform.io/phillbaker/elasticsearch",
|
||||
"repo": "terraform-provider-elasticsearch",
|
||||
"rev": "v2.0.0-beta.4",
|
||||
"sha256": "0ypw916sziy8dhvbv96f7d4as08ps18xxx8h6ip69mk74vf029sm",
|
||||
"vendorSha256": "1w92k895ikrqm9n1hf36wlh9nq278vifl3r14v0rxa8g9awizfdr",
|
||||
"version": "2.0.0-beta.4"
|
||||
"rev": "v2.0.0",
|
||||
"sha256": "sha256-wl8pRAB97JObpZvi2rdyDZP5itKcOnm6Gsbku1+5oqQ=",
|
||||
"vendorSha256": "sha256-OCXTZg0JkaxJDEgoF2Qs4BcMSiYkQpLmehWdCpEmTzk=",
|
||||
"version": "2.0.0"
|
||||
},
|
||||
"exoscale": {
|
||||
"owner": "exoscale",
|
||||
"provider-source-address": "registry.terraform.io/exoscale/exoscale",
|
||||
"repo": "terraform-provider-exoscale",
|
||||
"rev": "v0.32.0",
|
||||
"sha256": "1jnpbw50cqzkxr1xgxxnkg0fp65mz84v9fqxpv4j29djgvi94w2m",
|
||||
"rev": "v0.33.0",
|
||||
"sha256": "sha256-mih0Bo6fcNgpyeCQ+GWSPyTrPlGzmBXkEO43TOVWMds=",
|
||||
"vendorSha256": null,
|
||||
"version": "0.32.0"
|
||||
"version": "0.33.0"
|
||||
},
|
||||
"external": {
|
||||
"owner": "hashicorp",
|
||||
|
@ -356,10 +356,10 @@
|
|||
"owner": "fastly",
|
||||
"provider-source-address": "registry.terraform.io/fastly/fastly",
|
||||
"repo": "terraform-provider-fastly",
|
||||
"rev": "v1.1.1",
|
||||
"sha256": "1n7lwvfp4y0k1rh13jz94im367h6mxmvglik2nddq58pmxwns2lz",
|
||||
"rev": "v1.1.2",
|
||||
"sha256": "sha256-CxyVW9uE9mK+ZF8fyjAsrFKY82xAyGn9k1jOFqTaAhA=",
|
||||
"vendorSha256": null,
|
||||
"version": "1.1.1"
|
||||
"version": "1.1.2"
|
||||
},
|
||||
"flexibleengine": {
|
||||
"owner": "FlexibleEngineCloud",
|
||||
|
@ -392,39 +392,39 @@
|
|||
"owner": "integrations",
|
||||
"provider-source-address": "registry.terraform.io/integrations/github",
|
||||
"repo": "terraform-provider-github",
|
||||
"rev": "v4.20.1",
|
||||
"sha256": "1kqi41g1lw2phar7gy35rf92qb5s32p7q780d9wrmyimriwhlh4j",
|
||||
"rev": "v4.21.0",
|
||||
"sha256": "sha256-ayL22zlfZkGL/ycyQX384g7CjFHDgK8k010kg1fI4h4=",
|
||||
"vendorSha256": null,
|
||||
"version": "4.20.1"
|
||||
"version": "4.21.0"
|
||||
},
|
||||
"gitlab": {
|
||||
"owner": "gitlabhq",
|
||||
"provider-source-address": "registry.terraform.io/gitlabhq/gitlab",
|
||||
"repo": "terraform-provider-gitlab",
|
||||
"rev": "v3.11.1",
|
||||
"sha256": "19l2m1d8jn5c8kd39fhw34f805ckad36vs4a2xalpb3whj89sfwy",
|
||||
"vendorSha256": "0flvda6jrq5ff8lk0405bxs90rwpaw3aci85bfd9k258sp3ign9s",
|
||||
"version": "3.11.1"
|
||||
"rev": "v3.12.0",
|
||||
"sha256": "sha256-6CrM2Pt4yB0ZaXvcgUPreIhJrUhXCNt/xt+fExzGJqc=",
|
||||
"vendorSha256": "sha256-78/7+t75xFjLt1JfoVpHVPlM7q5BX+NI/I9ugfjdv+g=",
|
||||
"version": "3.12.0"
|
||||
},
|
||||
"google": {
|
||||
"owner": "hashicorp",
|
||||
"provider-source-address": "registry.terraform.io/hashicorp/google",
|
||||
"proxyVendor": true,
|
||||
"repo": "terraform-provider-google",
|
||||
"rev": "v4.12.0",
|
||||
"sha256": "0yrzzg7b1dqfsz6wpqh869qwdwbi747hr5xwcjycl8mz4ajlwzsz",
|
||||
"vendorSha256": "1rfhcapahzss8frpnyag53r5s7iqwq7ndqjv30bmhzw3ilwgdfdr",
|
||||
"version": "4.12.0"
|
||||
"rev": "v4.13.0",
|
||||
"sha256": "sha256-QSHlnvsWmkdUE7dd6HqzYtyYC+XDW69dIp/h7u1jD9g=",
|
||||
"vendorSha256": "sha256-1tiFBc03RyIAtnu/NqhU3RowM8JhuLNS+blfyjXBcW0=",
|
||||
"version": "4.13.0"
|
||||
},
|
||||
"google-beta": {
|
||||
"owner": "hashicorp",
|
||||
"provider-source-address": "registry.terraform.io/hashicorp/google-beta",
|
||||
"proxyVendor": true,
|
||||
"repo": "terraform-provider-google-beta",
|
||||
"rev": "v4.12.0",
|
||||
"sha256": "0dbhzch3vixl8lpdd39p1crx997kdg25scliha7nj2g7a8cli73y",
|
||||
"vendorSha256": "1rfhcapahzss8frpnyag53r5s7iqwq7ndqjv30bmhzw3ilwgdfdr",
|
||||
"version": "4.12.0"
|
||||
"rev": "v4.13.0",
|
||||
"sha256": "sha256-jjYUijzUgIiSC9eL6rbgtuBSh6bbHLjeifN+GIndrVs=",
|
||||
"vendorSha256": "sha256-1tiFBc03RyIAtnu/NqhU3RowM8JhuLNS+blfyjXBcW0=",
|
||||
"version": "4.13.0"
|
||||
},
|
||||
"grafana": {
|
||||
"owner": "grafana",
|
||||
|
@ -511,10 +511,10 @@
|
|||
"owner": "IBM-Cloud",
|
||||
"provider-source-address": "registry.terraform.io/IBM-Cloud/ibm",
|
||||
"repo": "terraform-provider-ibm",
|
||||
"rev": "v1.39.1",
|
||||
"sha256": "1f7zhczsz9w4lk2fzcbk1w1pjwnmbgn7lk8nsyk5azkspbf4hjzv",
|
||||
"vendorSha256": "1dhm99h7srnfwscdqy2zaj3wjdb0v1ybb7arv60522xvhsdnb99r",
|
||||
"version": "1.39.1"
|
||||
"rev": "v1.39.2",
|
||||
"sha256": "sha256-9r0tt0N3m/IYq/9oepQ4DcB78ds8pb1up1TyjFYzX1U=",
|
||||
"vendorSha256": "sha256-8qgm1zDdwKNE/bs1n5cpY/DUD3SKtFmnvEgwtKorASk=",
|
||||
"version": "1.39.2"
|
||||
},
|
||||
"icinga2": {
|
||||
"owner": "Icinga",
|
||||
|
@ -565,10 +565,10 @@
|
|||
"owner": "kingsoftcloud",
|
||||
"provider-source-address": "registry.terraform.io/kingsoftcloud/ksyun",
|
||||
"repo": "terraform-provider-ksyun",
|
||||
"rev": "v1.3.41",
|
||||
"sha256": "0p8fl7dkp2nfw73ij769svm83cpvi1rw3aykf0qx33n9si78m892",
|
||||
"vendorSha256": "1pm4kld23mvgs14z54fpfdvnj0alm8frkkmf0851hi58nazc54dq",
|
||||
"version": "1.3.41"
|
||||
"rev": "v1.3.42",
|
||||
"sha256": "sha256-wj4o2XSz8ylZJdseIi/TadlhOwFWZ6nfDOUezbeGYw4=",
|
||||
"vendorSha256": "sha256-nbAEaRFtFtB4ftLgnCv3MmkjFFbcNkCuxZc+G8/ObPE=",
|
||||
"version": "1.3.42"
|
||||
},
|
||||
"kubectl": {
|
||||
"owner": "gavinbunney",
|
||||
|
@ -610,10 +610,10 @@
|
|||
"owner": "linode",
|
||||
"provider-source-address": "registry.terraform.io/linode/linode",
|
||||
"repo": "terraform-provider-linode",
|
||||
"rev": "v1.25.2",
|
||||
"sha256": "18w9x80zary64873d1r824g28l5dhkda1qq0lr895afwh8g11dfp",
|
||||
"vendorSha256": "0c882yafydhdhnp5awb8llzbmiljfdbamqlx740347ywpliy0ga2",
|
||||
"version": "1.25.2"
|
||||
"rev": "v1.26.1",
|
||||
"sha256": "sha256-bd0raIIh/VmTlSVYnNd98fpppRKnO46g8FI5OwZPjMg=",
|
||||
"vendorSha256": "sha256-SCTWvTgJ0QYh2DEbTI9coa3Fp4fBHusytF+JFzAq2XA=",
|
||||
"version": "1.26.1"
|
||||
},
|
||||
"linuxbox": {
|
||||
"owner": "numtide",
|
||||
|
@ -628,10 +628,10 @@
|
|||
"owner": "hashicorp",
|
||||
"provider-source-address": "registry.terraform.io/hashicorp/local",
|
||||
"repo": "terraform-provider-local",
|
||||
"rev": "v2.1.0",
|
||||
"sha256": "0lv1mvy4pkx0sc49xny4j0h30m64lvr3rnmqk85i5p0xhyn77gf2",
|
||||
"vendorSha256": null,
|
||||
"version": "2.1.0"
|
||||
"rev": "v2.2.2",
|
||||
"sha256": "sha256-JpTdRi9EagrnhYnlq6sl6+t4SE6i7T7YrGTsYCDync8=",
|
||||
"vendorSha256": "sha256-Ha/MGbXwwhbVxaHbkU2xBhyNcDxLivk7vYQjfVzWOcY=",
|
||||
"version": "2.2.2"
|
||||
},
|
||||
"logicmonitor": {
|
||||
"deleteVendor": true,
|
||||
|
@ -719,10 +719,10 @@
|
|||
"owner": "newrelic",
|
||||
"provider-source-address": "registry.terraform.io/newrelic/newrelic",
|
||||
"repo": "terraform-provider-newrelic",
|
||||
"rev": "v2.39.0",
|
||||
"sha256": "03raj9a0qxvss03ab78pdqwbkc4hc95khzi7lg1a156vxfnibdr2",
|
||||
"vendorSha256": "0sch3wdgy6mx8a983miwi5ihky2j4mzvcg8wilwlp7nsgrfv6ghc",
|
||||
"version": "2.39.0"
|
||||
"rev": "v2.39.2",
|
||||
"sha256": "sha256-NfszsBliZAjY52kPWB7yhOEYZB2V4yOp6IDffF7EG6k=",
|
||||
"vendorSha256": "sha256-DD6zXX7anks5jRw9tn8lUvgJY4k81oGSQr0a/xofkGk=",
|
||||
"version": "2.39.2"
|
||||
},
|
||||
"nomad": {
|
||||
"owner": "hashicorp",
|
||||
|
@ -771,22 +771,22 @@
|
|||
"version": "1.3.0"
|
||||
},
|
||||
"oci": {
|
||||
"owner": "terraform-providers",
|
||||
"owner": "oracle",
|
||||
"provider-source-address": "registry.terraform.io/hashicorp/oci",
|
||||
"repo": "terraform-provider-oci",
|
||||
"rev": "v4.66.0",
|
||||
"sha256": "0iyh87ckv18f3krlhklj07shv5jwskp6fd70fq3zzfdl07jyy429",
|
||||
"rev": "v4.67.0",
|
||||
"sha256": "sha256-kgnyGLF6UbWRbrjXDkh7y11jx4JO3hFo7/qdJzwX0rU=",
|
||||
"vendorSha256": null,
|
||||
"version": "4.66.0"
|
||||
"version": "4.67.0"
|
||||
},
|
||||
"okta": {
|
||||
"owner": "okta",
|
||||
"provider-source-address": "registry.terraform.io/okta/okta",
|
||||
"repo": "terraform-provider-okta",
|
||||
"rev": "v3.22.0",
|
||||
"sha256": "1fsxdljpyb9qxc32jgi1yrwrs8rb8iz7ld11a0sm65qhh5yvl5jh",
|
||||
"vendorSha256": "0l0di6cmm41z7i4d498xxc8wcrbg6r9w4vcdksqhz92s1gqs3f4z",
|
||||
"version": "3.22.0"
|
||||
"rev": "v3.22.1",
|
||||
"sha256": "sha256-G1KJJSxJmzFlIUWOs+7htcgp61oWCu+ryCKaIHzxhzw=",
|
||||
"vendorSha256": "sha256-n7ih8QtapA+xno1twlM2b2XGEesdJdJIPD+QWpmJDVA=",
|
||||
"version": "3.22.1"
|
||||
},
|
||||
"oktaasa": {
|
||||
"owner": "oktadeveloper",
|
||||
|
@ -811,10 +811,10 @@
|
|||
"owner": "OpenNebula",
|
||||
"provider-source-address": "registry.terraform.io/OpenNebula/opennebula",
|
||||
"repo": "terraform-provider-opennebula",
|
||||
"rev": "v0.4.1",
|
||||
"sha256": "13z14p8zkrmffai5pdiwi33xsznan015nl9b9cfyxi1is4m5i41m",
|
||||
"vendorSha256": "0qyzavig8wnnjzm63pny5azywqyrnjm978yg5y0sr6zw8wghjd15",
|
||||
"version": "0.4.1"
|
||||
"rev": "v0.4.2",
|
||||
"sha256": "sha256-h2trcyXJcdWQyonjdDLkJkcawE4AoFYnzLZtKPotMY0=",
|
||||
"vendorSha256": "sha256-JTQJH0f8m6yBL8+jk6q02WPuvyre3mHql9Zy9OJW32M=",
|
||||
"version": "0.4.2"
|
||||
},
|
||||
"openstack": {
|
||||
"owner": "terraform-provider-openstack",
|
||||
|
@ -829,10 +829,10 @@
|
|||
"owner": "opentelekomcloud",
|
||||
"provider-source-address": "registry.terraform.io/opentelekomcloud/opentelekomcloud",
|
||||
"repo": "terraform-provider-opentelekomcloud",
|
||||
"rev": "v1.27.6",
|
||||
"sha256": "1vq2h4ldvskw874fdnjqh1np5z09dh3q3lrqjmfand8ksrzacjjm",
|
||||
"vendorSha256": "0bkya9ckh82bacaksqbb6010fwclz9wh1b5k1s9z9d0d6bgvf60m",
|
||||
"version": "1.27.6"
|
||||
"rev": "v1.27.7",
|
||||
"sha256": "sha256-8y++zfxRam4sZvGWajyGiPv/5G8K7D4+ReNU7DBlqe8=",
|
||||
"vendorSha256": "sha256-OqN+QGclKYo4jjQi0HJ/80zVTPkcOQyl4n6i2BpDZQE=",
|
||||
"version": "1.27.7"
|
||||
},
|
||||
"opsgenie": {
|
||||
"owner": "opsgenie",
|
||||
|
@ -991,10 +991,10 @@
|
|||
"owner": "splunk-terraform",
|
||||
"provider-source-address": "registry.terraform.io/splunk-terraform/signalfx",
|
||||
"repo": "terraform-provider-signalfx",
|
||||
"rev": "v6.9.0",
|
||||
"sha256": "08p33mjshi3m36yxhlvlsghnqmw2pnihglxm2p9iapi0zg3wxqbq",
|
||||
"vendorSha256": "0hw7gz08k27kswbn42kab730f8gj2sjksmkc662hb9nbq8ykazbd",
|
||||
"version": "6.9.0"
|
||||
"rev": "v6.10.0",
|
||||
"sha256": "sha256-ZfNxab95ZDz68fEPfYd+w0E/fS/FPBVIs4kHTBhG858=",
|
||||
"vendorSha256": "sha256-bX01PcLLpgWFMWxWPaUW8iEHxllqCmIX1/OIicB/h0M=",
|
||||
"version": "6.10.0"
|
||||
},
|
||||
"skytap": {
|
||||
"owner": "skytap",
|
||||
|
@ -1027,10 +1027,10 @@
|
|||
"owner": "spotinst",
|
||||
"provider-source-address": "registry.terraform.io/spotinst/spotinst",
|
||||
"repo": "terraform-provider-spotinst",
|
||||
"rev": "v1.68.0",
|
||||
"sha256": "0llyy4rskspw4cy8jdbk175rli9s53mabj4b9yarm7apg17ai399",
|
||||
"vendorSha256": "0j0airkc1p0y9w1w40fbwxmymf8rbal2ycrkp31x1c06f8s4lhzm",
|
||||
"version": "1.68.0"
|
||||
"rev": "v1.69.0",
|
||||
"sha256": "sha256-pTQvqjh52B9w383yLvhNjDujSgQI1k8WpA1vpcY7RKI=",
|
||||
"vendorSha256": "sha256-X7K0eHbmGBYnJ5ovnD/y6O9r7TTHgK7f7s9w4R5ThBU=",
|
||||
"version": "1.69.0"
|
||||
},
|
||||
"stackpath": {
|
||||
"owner": "stackpath",
|
||||
|
@ -1045,10 +1045,10 @@
|
|||
"owner": "StatusCakeDev",
|
||||
"provider-source-address": "registry.terraform.io/StatusCakeDev/statuscake",
|
||||
"repo": "terraform-provider-statuscake",
|
||||
"rev": "v1.0.1",
|
||||
"sha256": "16pwsna1bkrdppxn2vjgbx552vsg4f2igykcb26mw3vp6n9piwfl",
|
||||
"vendorSha256": null,
|
||||
"version": "1.0.1"
|
||||
"rev": "v2.0.0-pre",
|
||||
"sha256": "sha256-S9VJRGREoRJPIb9gv822Y/8ZRa0x7WoPjU7BxLlRpOM=",
|
||||
"vendorSha256": "sha256-wKrbjxRCDk8GFAR0OFz4w9UnkIXH9EO/S+p2RKNLJaM=",
|
||||
"version": "2.0.0-pre"
|
||||
},
|
||||
"sumologic": {
|
||||
"owner": "SumoLogic",
|
||||
|
@ -1072,10 +1072,10 @@
|
|||
"owner": "tencentcloudstack",
|
||||
"provider-source-address": "registry.terraform.io/tencentcloudstack/tencentcloud",
|
||||
"repo": "terraform-provider-tencentcloud",
|
||||
"rev": "v1.63.0",
|
||||
"sha256": "1d5mzmr5r01gqf519r7f3mfcm1w7hryansymwazjbwy2rxpsn958",
|
||||
"rev": "v1.65.0",
|
||||
"sha256": "sha256-NpKZ4KbEDxCYmG2E4F/bHEUmK6invkcIaNkXDZjhmDI=",
|
||||
"vendorSha256": null,
|
||||
"version": "1.63.0"
|
||||
"version": "1.65.0"
|
||||
},
|
||||
"tfe": {
|
||||
"owner": "hashicorp",
|
||||
|
@ -1200,10 +1200,10 @@
|
|||
"owner": "hashicorp",
|
||||
"provider-source-address": "registry.terraform.io/hashicorp/vsphere",
|
||||
"repo": "terraform-provider-vsphere",
|
||||
"rev": "v2.1.0",
|
||||
"sha256": "193qprm7psx0gshv5q7idm05k78rpi2vpdg5pgs7bq1wpzlaqrpa",
|
||||
"rev": "v2.1.1",
|
||||
"sha256": "sha256-Xu5BMmOHEX+ctPu8374BDGsRC5hnvzji5oI69ptIi3Y=",
|
||||
"vendorSha256": null,
|
||||
"version": "2.1.0"
|
||||
"version": "2.1.1"
|
||||
},
|
||||
"vultr": {
|
||||
"owner": "vultr",
|
||||
|
@ -1218,10 +1218,10 @@
|
|||
"owner": "vmware",
|
||||
"provider-source-address": "registry.terraform.io/vmware/wavefront",
|
||||
"repo": "terraform-provider-wavefront",
|
||||
"rev": "v3.0.0",
|
||||
"sha256": "1awi74b7ny021krck0vp1gv6v93a4h0rgdl5xib82lf5pxnx4wgn",
|
||||
"vendorSha256": "0gbwj4cqywip22irkx9hyghy6zx9dirm6gd3i70nclchvkg9dm1x",
|
||||
"version": "3.0.0"
|
||||
"rev": "v3.0.1",
|
||||
"sha256": "sha256-6SQjYaN0yhcHdmM+vGvIDPHKxN34ns3Yz+CMTEo13s0=",
|
||||
"vendorSha256": "sha256-PdSW3tyQUWbBiaM9U3NsqX/j4fMw9ZmjEDdyjxmRfD0=",
|
||||
"version": "3.0.1"
|
||||
},
|
||||
"yandex": {
|
||||
"owner": "yandex-cloud",
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
# Update all providers which have specified provider source address
|
||||
set -euo pipefail
|
||||
|
||||
providers=$(
|
||||
readarray -t providers < <(
|
||||
jq -r 'to_entries
|
||||
| map_values(.value + { alias: .key })
|
||||
| .[]
|
||||
|
@ -13,10 +13,13 @@ providers=$(
|
|||
| .alias' providers.json
|
||||
)
|
||||
|
||||
echo "Will update providers:"
|
||||
echo "${providers}"
|
||||
cat <<EOF
|
||||
Will update ${#providers[@]} providers:
|
||||
|
||||
for provider in ${providers}; do
|
||||
echo "Updating ${provider}"
|
||||
${providers[*]}
|
||||
|
||||
EOF
|
||||
|
||||
for provider in "${providers[@]}"; do
|
||||
./update-provider "$@" "${provider}"
|
||||
done
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#!/usr/bin/env nix-shell
|
||||
#! nix-shell -I nixpkgs=../../../../.. -i bash -p coreutils curl jq moreutils nix nix-prefetch
|
||||
#! nix-shell -I nixpkgs=../../../../.. -i bash -p coreutils curl git jq moreutils nix nix-prefetch
|
||||
# shellcheck shell=bash
|
||||
# vim: ft=sh
|
||||
#
|
||||
|
@ -75,45 +75,46 @@ if [[ -z ${provider} ]]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
provider_name=$(basename "${provider}")
|
||||
|
||||
# Usage: read_attr <key>
|
||||
read_attr() {
|
||||
jq -r ".\"${provider_name}\".\"$1\"" providers.json
|
||||
jq -r ".\"${provider}\".\"$1\"" providers.json
|
||||
}
|
||||
|
||||
# Usage: update_attr <key> <value>
|
||||
update_attr() {
|
||||
if [[ $2 == "null" ]]; then
|
||||
jq -S ".\"${provider_name}\".\"$1\" = null" providers.json | sponge providers.json
|
||||
jq -S ".\"${provider}\".\"$1\" = null" providers.json | sponge providers.json
|
||||
else
|
||||
jq -S ".\"${provider_name}\".\"$1\" = \"$2\"" providers.json | sponge providers.json
|
||||
jq -S ".\"${provider}\".\"$1\" = \"$2\"" providers.json | sponge providers.json
|
||||
fi
|
||||
}
|
||||
|
||||
prefetch_github() {
|
||||
# of a given owner, repo and rev, fetch the tarball and return the output of
|
||||
# `nix-prefetch-url`
|
||||
local owner=$1
|
||||
local repo=$2
|
||||
local rev=$3
|
||||
nix-prefetch-url --unpack "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"
|
||||
repo_root=$(git rev-parse --show-toplevel)
|
||||
|
||||
generate_hash() {
|
||||
nix-prefetch -I nixpkgs="${repo_root}" \
|
||||
"{ sha256 }: (import ${repo_root} {}).terraform-providers.${provider}.$1.overrideAttrs (_: { $2 = sha256; })"
|
||||
}
|
||||
|
||||
old_source_address="$(read_attr provider-source-address)"
|
||||
old_vendor_sha256=$(read_attr vendorSha256)
|
||||
old_version=$(read_attr version)
|
||||
echo_provider() {
|
||||
echo "== terraform-providers.${provider}: $* =="
|
||||
}
|
||||
|
||||
if [[ ${provider} =~ ^[^/]+/[^/]+$ ]]; then
|
||||
echo_provider "init"
|
||||
source_address=registry.terraform.io/${provider}
|
||||
provider=$(basename "${provider}")
|
||||
update_attr "provider-source-address" "${source_address}"
|
||||
update_attr version "0"
|
||||
# create empty stings so nix-prefetch works
|
||||
update_attr sha256 ""
|
||||
update_attr vendorSha256 ""
|
||||
else
|
||||
source_address=${old_source_address}
|
||||
source_address="$(read_attr provider-source-address)"
|
||||
fi
|
||||
if [[ ${source_address} == "null" ]]; then
|
||||
echo "Could not find the source address for provider: ${provider}"
|
||||
exit 1
|
||||
fi
|
||||
update_attr "provider-source-address" "${source_address}"
|
||||
|
||||
old_vendor_sha256=$(read_attr vendorSha256)
|
||||
old_version=$(read_attr version)
|
||||
|
||||
# The provider source address (used inside Terraform `required_providers` block) is
|
||||
# used to compute the registry API endpoint
|
||||
|
@ -125,8 +126,10 @@ registry_response=$(curl -s https://"${source_address/\///v1/providers/}")
|
|||
|
||||
version="$(jq -r '.version' <<<"${registry_response}")"
|
||||
if [[ ${old_version} == "${version}" && ${force} != 1 && -z ${vendorSha256} && ${old_vendor_sha256} != "${vendorSha256}" ]]; then
|
||||
echo "${provider_name} is already at version ${version}"
|
||||
echo_provider "already at version ${version}"
|
||||
exit
|
||||
else
|
||||
echo_provider "updating from ${old_version} to ${version}"
|
||||
fi
|
||||
update_attr version "${version}"
|
||||
|
||||
|
@ -138,28 +141,23 @@ repo="$(echo "${provider_source_url}" | cut -d '/' -f 5)"
|
|||
update_attr repo "${repo}"
|
||||
rev="$(jq -r '.tag' <<<"${registry_response}")"
|
||||
update_attr rev "${rev}"
|
||||
sha256=$(prefetch_github "${org}" "${repo}" "${rev}")
|
||||
echo_provider "calculating sha256"
|
||||
sha256=$(generate_hash src outputHash)
|
||||
update_attr sha256 "${sha256}"
|
||||
|
||||
if [[ -z ${vendorSha256} ]]; then
|
||||
if [[ ${old_vendor_sha256} == null ]]; then
|
||||
vendorSha256=null
|
||||
elif [[ -n ${old_vendor_sha256} ]]; then
|
||||
echo "=== Calculating vendorSha256 ==="
|
||||
vendorSha256=$(nix-prefetch -I nixpkgs=../../../../.. "{ sha256 }: (import ../../../../.. {}).terraform-providers.${provider_name}.go-modules.overrideAttrs (_: { vendorSha256 = sha256; })")
|
||||
# Deal with nix unstable
|
||||
if [[ ${vendorSha256} == sha256-* ]]; then
|
||||
vendorSha256=$(nix --extra-experimental-features nix-command hash to-base32 "${vendorSha256}")
|
||||
fi
|
||||
else
|
||||
echo_provider "calculating vendorSha256"
|
||||
vendorSha256=$(generate_hash go-modules vendorSha256)
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -n ${vendorSha256} ]]; then
|
||||
update_attr vendorSha256 "${vendorSha256}"
|
||||
fi
|
||||
update_attr vendorSha256 "${vendorSha256}"
|
||||
|
||||
# Check that the provider builds
|
||||
if [[ ${build} == 1 ]]; then
|
||||
echo "=== Building terraform-providers.${provider_name} ==="
|
||||
nix-build --no-out-link ../../../../.. -A "terraform-providers.${provider_name}"
|
||||
echo_provider "building"
|
||||
nix-build --no-out-link "${repo_root}" -A "terraform-providers.${provider}"
|
||||
fi
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
|
||||
buildGoModule rec {
|
||||
pname = "vcluster";
|
||||
version = "0.5.3";
|
||||
version = "0.6.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "loft-sh";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-+rLDRVfB6wZ1wYoLE2wwRxzS6GmI6KYtOKdXZd+LnnU=";
|
||||
sha256 = "sha256-kY12bsZyDb36KE2dWx6RVYlKTbJh+XFQcBpFXoCLgEM=";
|
||||
};
|
||||
|
||||
vendorSha256 = null;
|
||||
|
|
|
@ -5,14 +5,14 @@
|
|||
|
||||
python3Packages.buildPythonApplication rec {
|
||||
pname = "flexget";
|
||||
version = "3.3.2";
|
||||
version = "3.3.3";
|
||||
|
||||
# Fetch from GitHub in order to use `requirements.in`
|
||||
src = fetchFromGitHub {
|
||||
owner = "flexget";
|
||||
repo = "flexget";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-Z2JYFnE9g2bWaR+Ghxg3zJUD0Ja8/od52jkOVWEqeVE=";
|
||||
hash = "sha256-a76x4Klad3lct2M9RxSroUYKmEX7lPqDN+dFvfjavo8=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
|
|
|
@ -4,11 +4,11 @@ let
|
|||
configOverrides = writeText "cinny-config-overrides.json" (builtins.toJSON conf);
|
||||
in stdenv.mkDerivation rec {
|
||||
pname = "cinny";
|
||||
version = "1.7.0";
|
||||
version = "1.8.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/ajbura/cinny/releases/download/v${version}/cinny-v${version}.tar.gz";
|
||||
sha256 = "0133dbzxy0n0i6bn2p3lx33kpabnf9kzs9mv4xws30hbns25q99k";
|
||||
sha256 = "0pbapzl3pfx87ns4vp7088kkhl34c0ihbq90r3d0iz6sa16mcs79";
|
||||
};
|
||||
|
||||
installPhase = ''
|
||||
|
|
|
@ -28,13 +28,13 @@
|
|||
|
||||
mkDerivation rec {
|
||||
pname = "qtox";
|
||||
version = "1.17.5";
|
||||
version = "1.17.6";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "qTox";
|
||||
repo = "qTox";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-H3qFEw/TkzOxEXtZs0k89wWMnhrOkF7VapUKtCUhGns=";
|
||||
sha256 = "sha256-naKWoodSMw0AEtACvkASFmw9t0H0d2pcqOW79NNTYF0=";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
|
|
|
@ -24,7 +24,7 @@ let
|
|||
|
||||
in stdenv.mkDerivation rec {
|
||||
pname = "signal-desktop";
|
||||
version = "5.34.0"; # Please backport all updates to the stable channel.
|
||||
version = "5.35.0"; # Please backport all updates to the stable channel.
|
||||
# All releases have a limited lifetime and "expire" 90 days after the release.
|
||||
# When releases "expire" the application becomes unusable until an update is
|
||||
# applied. The expiration date for the current release can be extracted with:
|
||||
|
@ -34,7 +34,7 @@ in stdenv.mkDerivation rec {
|
|||
|
||||
src = fetchurl {
|
||||
url = "https://updates.signal.org/desktop/apt/pool/main/s/signal-desktop/signal-desktop_${version}_amd64.deb";
|
||||
sha256 = "sha256-uU4WJtd9qwrjHgsK0oDg/pCf/5lfNhoMDEd/lHUnLwk=";
|
||||
sha256 = "sha256-2KF2OLq6/vHElgloxn+kgQisJC+HAkpOBfsKfEPW35c=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
@ -147,7 +147,7 @@ in stdenv.mkDerivation rec {
|
|||
homepage = "https://signal.org/";
|
||||
changelog = "https://github.com/signalapp/Signal-Desktop/releases/tag/v${version}";
|
||||
license = lib.licenses.agpl3Only;
|
||||
maintainers = with lib.maintainers; [ ixmatus primeos equirosa ];
|
||||
maintainers = with lib.maintainers; [ mic92 equirosa ];
|
||||
platforms = [ "x86_64-linux" ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -5,18 +5,18 @@
|
|||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "kirc";
|
||||
version = "0.2.9";
|
||||
version = "0.3.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "mcpcpc";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
hash = "sha256-KRCVjz59SHjk86VgfGxYKk/Ti3o77dV7fdRu9mB3FSo=";
|
||||
hash = "sha256-bLBrkbW/Iv1v9z5NOiMAA/dH5/9FlqusRV5rSqjdlPw=";
|
||||
};
|
||||
|
||||
dontConfigure = true;
|
||||
|
||||
makeFlags = [ "PREFIX=${placeholder "out"}" ];
|
||||
installFlags = [ "PREFIX=$(out)" ];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "http://kirc.io/";
|
||||
|
|
|
@ -2,16 +2,16 @@
|
|||
|
||||
buildGoModule rec {
|
||||
pname = "juju";
|
||||
version = "2.9.11";
|
||||
version = "2.9.25";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "juju";
|
||||
repo = "juju";
|
||||
rev = "juju-${version}";
|
||||
sha256 = "sha256-KcvlnEfDzwhFzwaWLYuRGa8nh6MkjqZ+u+qJSJZl13U=";
|
||||
sha256 = "sha256-h4w12dmGEviV2N0BWXQKt1eUVxdbgwRKLQghnd6bLFI=";
|
||||
};
|
||||
|
||||
vendorSha256 = "sha256-0KGeMJDv1BdqM1/uMk+mKpK+Nejz9PiCAfRy96pu3OQ=";
|
||||
vendorSha256 = "sha256-AATK4tDg2eW8Bt8gU88tIk6I+qp5ZeUtXzD74/59c7w=";
|
||||
|
||||
# Disable tests because it attempts to use a mongodb instance
|
||||
doCheck = false;
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
|
||||
buildGoModule rec {
|
||||
pname = "nextdns";
|
||||
version = "1.37.7";
|
||||
version = "1.37.10";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "nextdns";
|
||||
repo = "nextdns";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-L5PeT4Y2oWM1WUJaBK9xgrpfkpvKM1+sA29A3AiDE38=";
|
||||
sha256 = "sha256-iwxgDBIuTClikvXF+3mCjFKKV0upN+K+aL85ewYkMXo=";
|
||||
};
|
||||
|
||||
vendorSha256 = "sha256-6hWD05lXteqL7egj9tiRVHlevKM33i+a+zBUZs7PF7I=";
|
||||
|
|
|
@ -7,11 +7,11 @@
|
|||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "gnunet";
|
||||
version = "0.15.3";
|
||||
version = "0.16.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnu/gnunet/${pname}-${version}.tar.gz";
|
||||
sha256 = "sha256-1iZpqPQeB46qIgznejL08/gB4wmTV66McFSY/nOITsU=";
|
||||
sha256 = "sha256-0y2m8T/xzYZwUlcZ6g956fdtLef2Bphg4Kd/xpo2AGg=";
|
||||
};
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ lib, stdenv, fetchFromGitLab, cmake, ninja, pkg-config, wrapGAppsHook
|
||||
, glib, gtk3, gettext, libxkbfile, libX11
|
||||
, freerdp, libssh, libgcrypt, gnutls
|
||||
, freerdp, libssh, libgcrypt, gnutls, vte
|
||||
, pcre2, libdbusmenu-gtk3, libappindicator-gtk3
|
||||
, libvncserver, libpthreadstubs, libXdmcp, libxkbcommon
|
||||
, libsecret, libsoup, spice-protocol, spice-gtk, libepoxy, at-spi2-core
|
||||
|
@ -8,6 +8,7 @@
|
|||
# The themes here are soft dependencies; only icons are missing without them.
|
||||
, gnome
|
||||
, withLibsecret ? true
|
||||
, withVte ? true
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
@ -33,10 +34,11 @@ stdenv.mkDerivation rec {
|
|||
libsoup spice-protocol spice-gtk libepoxy at-spi2-core
|
||||
openssl gnome.adwaita-icon-theme json-glib libsodium webkitgtk
|
||||
harfbuzz
|
||||
] ++ optionals withLibsecret [ libsecret ];
|
||||
] ++ optionals withLibsecret [ libsecret ]
|
||||
++ optionals withVte [ vte ];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DWITH_VTE=OFF"
|
||||
"-DWITH_VTE=${if withVte then "ON" else "OFF"}"
|
||||
"-DWITH_TELEPATHY=OFF"
|
||||
"-DWITH_AVAHI=OFF"
|
||||
"-DWITH_LIBSECRET=${if withLibsecret then "ON" else "OFF"}"
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
, autoconf
|
||||
, automake
|
||||
, fetchFromGitHub
|
||||
, fetchpatch
|
||||
, libpcap
|
||||
, ncurses
|
||||
, openssl
|
||||
|
@ -12,25 +11,15 @@
|
|||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "sngrep";
|
||||
version = "1.4.9";
|
||||
version = "1.4.10";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "irontec";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-92wPRDFSoIOYFv3XKdsuYH8j3D8kXyg++q6VpIIMGDg=";
|
||||
sha256 = "sha256-P618QLk85W0oPisAGiRfpCgHCddKutUkGjwdfgsV4Es=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Pull fix pending upstream inclusion for ncurses-6.3 support:
|
||||
# https://github.com/irontec/sngrep/pull/382
|
||||
(fetchpatch {
|
||||
name = "ncurses-6.3.patch";
|
||||
url = "https://github.com/irontec/sngrep/commit/d09e1c323dbd7fc899e8985899baec568f045601.patch";
|
||||
sha256 = "sha256-nY5i3WQh/oKboEAh4wvxF5Imf2BHYEKdFj+WF1M3SSA=";
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoconf
|
||||
automake
|
||||
|
|
|
@ -14,13 +14,13 @@
|
|||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "onedrive";
|
||||
version = "2.4.15";
|
||||
version = "2.4.16";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "abraunegg";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-nYko7htg16Sp/Fs+KuPflrpHn8WShM0OKozhr9BFH5U=";
|
||||
sha256 = "sha256-GoufEcCu/Cg2Fu0RcjTi4te/7+gZfQRTj+AtK0YnF5I=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ autoreconfHook ldc installShellFiles pkg-config ];
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
{ lib, stdenv, fetchFromGitHub, cmake, wrapQtAppsHook, qtbase }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "QtRVSim";
|
||||
version = "0.9.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "cvut";
|
||||
repo = "qtrvsim";
|
||||
rev = "refs/tags/v${version}";
|
||||
sha256 = "AOksVS0drIBnK4RCxZw40yVxf4E8GjG9kU0rIZsY9gA=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake wrapQtAppsHook ];
|
||||
|
||||
buildInputs = [ qtbase ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "RISC-V CPU simulator for education purposes";
|
||||
longDescription = ''
|
||||
RISC-V CPU simulator for education purposes with pipeline and cache visualization.
|
||||
Developed at FEE CTU for computer architecture classes.
|
||||
'';
|
||||
homepage = "https://github.com/cvut/qtrvsim";
|
||||
license = licenses.gpl3Plus;
|
||||
platforms = platforms.linux ++ platforms.darwin;
|
||||
maintainers = with maintainers; [ jdupak ];
|
||||
mainProgram = "qtrvsim_gui";
|
||||
};
|
||||
}
|
34
pkgs/applications/science/electronics/gaw/default.nix
Normal file
34
pkgs/applications/science/electronics/gaw/default.nix
Normal file
|
@ -0,0 +1,34 @@
|
|||
{ stdenv
|
||||
, fetchurl
|
||||
, lib
|
||||
, gtk3
|
||||
, pkg-config
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "gaw";
|
||||
version = "20200922";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://download.tuxfamily.org/gaw/download/gaw3-${version}.tar.gz";
|
||||
sha256 = "0qmap11v470a1yj4ypfvdq6wkfni77ijqpknka8b4fndi62sl4wa";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
|
||||
buildInputs = [ gtk3 ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Gtk Analog Wave viewer";
|
||||
longDescription = ''
|
||||
Gaw is a software tool for displaying analog waveforms from
|
||||
sampled datas, for example from the output of simulators or
|
||||
input from sound cards. Data can be imported to gaw using files,
|
||||
direct tcp/ip connection or directly from the sound card.
|
||||
'';
|
||||
homepage = "http://gaw.tuxfamily.org";
|
||||
license = licenses.gpl2Plus;
|
||||
maintainers = with maintainers; [ fbeffa ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
46
pkgs/applications/science/electronics/xschem/default.nix
Normal file
46
pkgs/applications/science/electronics/xschem/default.nix
Normal file
|
@ -0,0 +1,46 @@
|
|||
{ stdenv
|
||||
, fetchFromGitHub
|
||||
, lib
|
||||
, bison
|
||||
, cairo
|
||||
, flex
|
||||
, libX11
|
||||
, libXpm
|
||||
, pkg-config
|
||||
, tcl
|
||||
, tk
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "xschem";
|
||||
version = "3.0.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "StefanSchippers";
|
||||
repo = "xschem";
|
||||
rev = version;
|
||||
sha256 = "sha256-C57jo8tAbiqQAgf4Xp2lpFGOr6F1knPpFcYxPiqSM4k=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ bison flex pkg-config ];
|
||||
|
||||
buildInputs = [ cairo libX11 libXpm tcl tk ];
|
||||
|
||||
hardeningDisable = [ "format" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Schematic capture and netlisting EDA tool";
|
||||
longDescription = ''
|
||||
Xschem is a schematic capture program, it allows creation of
|
||||
hierarchical representation of circuits with a top down approach.
|
||||
By focusing on interfaces, hierarchy and instance properties a
|
||||
complex system can be described in terms of simpler building
|
||||
blocks. A VHDL or Verilog or Spice netlist can be generated from
|
||||
the drawn schematic, allowing the simulation of the circuit.
|
||||
'';
|
||||
homepage = "https://xschem.sourceforge.io/stefan/";
|
||||
license = licenses.gpl2Plus;
|
||||
maintainers = with maintainers; [ fbeffa ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "lean";
|
||||
version = "3.39.2";
|
||||
version = "3.41.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "leanprover-community";
|
||||
|
@ -11,8 +11,8 @@ stdenv.mkDerivation rec {
|
|||
# from. this is then used to check whether an olean file should be
|
||||
# rebuilt. don't use a tag as rev because this will get replaced into
|
||||
# src/githash.h.in in preConfigure.
|
||||
rev = "402f41cdedbd46a368fb7807bebe83550d887631";
|
||||
sha256 = "0jddakr07ixspw19xblpj1882vxxaljg3fflhn4myvigwzkav334";
|
||||
rev = "154ac72f4ff674bc4486ac611f926a3d6b999f9f";
|
||||
sha256 = "0mpxlfjq460x1vi3v6qzgjv74asg0qlhykd51pj347795x5b1hf1";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
|
|
@ -6,13 +6,13 @@
|
|||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "opensmt";
|
||||
version = "2.2.0";
|
||||
version = "2.3.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "usi-verification-and-security";
|
||||
repo = "opensmt";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-6VkBGDzqG3mplpvFh5DIR0I1I2/J0Pi7xYk/yVn04Kg=";
|
||||
sha256 = "sha256-5Gw9+J+3LHNUNbcHxsQR/ivWndL2P7yBt/Q35fBMg58=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake bison flex ];
|
||||
|
|
|
@ -0,0 +1,81 @@
|
|||
diff --git a/src/sage/interfaces/tachyon.py b/src/sage/interfaces/tachyon.py
|
||||
index 3f1dcdb538..b6fa8d1fbd 100644
|
||||
--- a/src/sage/interfaces/tachyon.py
|
||||
+++ b/src/sage/interfaces/tachyon.py
|
||||
@@ -261,13 +261,13 @@ written in the sequence they are listed in the examples in this section.
|
||||
The {\bf PROJECTION} keyword must be followed by one of the supported
|
||||
camera projection mode identifiers {\bf PERSPECTIVE}, {\bf PERSPECTIVE_DOF},
|
||||
{\bf ORTHOGRAPHIC}, or {\bf FISHEYE}. The {\bf FISHEYE} projection mode
|
||||
-requires two extra parameters {\bf FOCALLENGTH} and {\bf APERTURE}
|
||||
+requires two extra parameters {\bf FOCALDIST} and {\bf APERTURE}
|
||||
which precede the regular camera options.
|
||||
|
||||
\begin{verbatim}
|
||||
Camera
|
||||
projection perspective_dof
|
||||
- focallength 0.75
|
||||
+ focaldist 0.75
|
||||
aperture 0.02
|
||||
Zoom 0.666667
|
||||
Aspectratio 1.000000
|
||||
diff --git a/src/sage/plot/plot3d/tachyon.py b/src/sage/plot/plot3d/tachyon.py
|
||||
index 08caf38d67..3e827411ce 100644
|
||||
--- a/src/sage/plot/plot3d/tachyon.py
|
||||
+++ b/src/sage/plot/plot3d/tachyon.py
|
||||
@@ -92,7 +92,7 @@ angle, right angle)::
|
||||
Finally there is the ``projection='perspective_dof'`` option. ::
|
||||
|
||||
sage: T = Tachyon(xres=800, antialiasing=4, raydepth=10,
|
||||
- ....: projection='perspective_dof', focallength='1.0', aperture='.0025')
|
||||
+ ....: projection='perspective_dof', focaldist='1.0', aperture='.0025')
|
||||
sage: T.light((0,5,7), 1.0, (1,1,1))
|
||||
sage: T.texture('t1', opacity=1, specular=.3)
|
||||
sage: T.texture('t2', opacity=1, specular=.3, color=(0,0,1))
|
||||
@@ -186,7 +186,7 @@ class Tachyon(WithEqualityById, SageObject):
|
||||
or ``'fisheye'``.
|
||||
- ``frustum`` - (default ''), otherwise list of four numbers. Only
|
||||
used with projection='fisheye'.
|
||||
- - ``focallength`` - (default ''), otherwise a number. Only used
|
||||
+ - ``focaldist`` - (default ''), otherwise a number. Only used
|
||||
with projection='perspective_dof'.
|
||||
- ``aperture`` - (default ''), otherwise a number. Only used
|
||||
with projection='perspective_dof'.
|
||||
@@ -331,7 +331,7 @@ class Tachyon(WithEqualityById, SageObject):
|
||||
Use of the ``projection='perspective_dof'`` option. This may not be
|
||||
implemented correctly. ::
|
||||
|
||||
- sage: T = Tachyon(xres=800,antialiasing=4, raydepth=10, projection='perspective_dof', focallength='1.0', aperture='.0025')
|
||||
+ sage: T = Tachyon(xres=800,antialiasing=4, raydepth=10, projection='perspective_dof', focaldist='1.0', aperture='.0025')
|
||||
sage: T.light((0,5,7), 1.0, (1,1,1))
|
||||
sage: T.texture('t1', opacity=1, specular=.3)
|
||||
sage: T.texture('t2', opacity=1, specular=.3, color=(0,0,1))
|
||||
@@ -365,7 +365,7 @@ class Tachyon(WithEqualityById, SageObject):
|
||||
look_at=[0, 0, 0],
|
||||
viewdir=None,
|
||||
projection='PERSPECTIVE',
|
||||
- focallength='',
|
||||
+ focaldist='',
|
||||
aperture='',
|
||||
frustum=''):
|
||||
r"""
|
||||
@@ -391,7 +391,7 @@ class Tachyon(WithEqualityById, SageObject):
|
||||
self._camera_position = (-3, 0, 0) # default value
|
||||
self._updir = updir
|
||||
self._projection = projection
|
||||
- self._focallength = focallength
|
||||
+ self._focaldist = focaldist
|
||||
self._aperture = aperture
|
||||
self._frustum = frustum
|
||||
self._objects = []
|
||||
@@ -624,9 +624,9 @@ class Tachyon(WithEqualityById, SageObject):
|
||||
camera_out = r"""
|
||||
camera
|
||||
projection %s""" % (tostr(self._projection))
|
||||
- if self._focallength != '':
|
||||
+ if self._focaldist != '':
|
||||
camera_out = camera_out + r"""
|
||||
- focallength %s""" % (float(self._focallength))
|
||||
+ focaldist %s""" % (float(self._focaldist))
|
||||
if self._aperture != '':
|
||||
camera_out = camera_out + r"""
|
||||
aperture %s""" % (float(self._aperture))
|
|
@ -153,6 +153,9 @@ stdenv.mkDerivation rec {
|
|||
rev = "97d7958bed441cf2ccc714d88f83d3a8426bc085";
|
||||
sha256 = "sha256-y1STE0oxswnijGCsBw8eHWWqpmT1XMznIfA0vvX9pFA=";
|
||||
})
|
||||
|
||||
# adapted from https://trac.sagemath.org/ticket/23712#comment:22
|
||||
./patches/tachyon-renamed-focallength.patch
|
||||
];
|
||||
|
||||
patches = nixPatches ++ bugfixPatches ++ packageUpgradePatches;
|
||||
|
|
|
@ -6,13 +6,13 @@
|
|||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "roxterm";
|
||||
version = "3.11.1";
|
||||
version = "3.12.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "realh";
|
||||
repo = "roxterm";
|
||||
rev = version;
|
||||
sha256 = "1n7588bl83sp51jwjq97f526c7fkh0kq90idw3nayb4zmi530irx";
|
||||
sha256 = "sha256-jVcf/nrEq8dM8rw40ZhXGJjt3DQLroCePtIAdAsVIfs=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake pkg-config wrapGAppsHook libxslt ];
|
||||
|
|
|
@ -4,13 +4,13 @@
|
|||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "git-repo";
|
||||
version = "2.21";
|
||||
version = "2.22";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "android";
|
||||
repo = "tools_repo";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-nl/NFbyL0MWgvpwaqkCOkKuSquFTQRKZ7Ski5qYRL9w=";
|
||||
sha256 = "sha256-oVwvoZdjD6V3CHECZOYBSYVtCX1XwW5fynyCn7Oj+Bc=";
|
||||
};
|
||||
|
||||
# Fix 'NameError: name 'ssl' is not defined'
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue