Merge master into haskell-updates
This commit is contained in:
commit
6182623035
|
@ -1474,7 +1474,7 @@ lib.attrsets.zipAttrsWith
|
||||||
<section xml:id="function-library-lib.attrsets.zipAttrs">
|
<section xml:id="function-library-lib.attrsets.zipAttrs">
|
||||||
<title><function>lib.attrsets.zipAttrs</function></title>
|
<title><function>lib.attrsets.zipAttrs</function></title>
|
||||||
|
|
||||||
<subtitle><literal>zipAttrsWith :: [ AttrSet ] -> AttrSet</literal>
|
<subtitle><literal>zipAttrs :: [ AttrSet ] -> AttrSet</literal>
|
||||||
</subtitle>
|
</subtitle>
|
||||||
|
|
||||||
<xi:include href="./locations.xml" xpointer="lib.attrsets.zipAttrs" />
|
<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.
|
- It uses the `fetchFromGitHub` fetcher to get its source.
|
||||||
|
|
||||||
- `useDune2 = true` ensures that the latest version of Dune is used for the
|
- `useDune2 = true` ensures that Dune version 2 is used for the
|
||||||
build (this may become the default value in a future release).
|
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
|
- 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
|
`dune runtest -p angstrom` after the build (`dune build -p angstrom`) is
|
||||||
|
|
|
@ -5631,6 +5631,12 @@
|
||||||
github = "jduan";
|
github = "jduan";
|
||||||
githubId = 452450;
|
githubId = 452450;
|
||||||
};
|
};
|
||||||
|
jdupak = {
|
||||||
|
name = "Jakub Dupak";
|
||||||
|
email = "dev@jakubdupak.com";
|
||||||
|
github = "jdupak";
|
||||||
|
githubId = 22683640;
|
||||||
|
};
|
||||||
jecaro = {
|
jecaro = {
|
||||||
email = "jeancharles.quillet@gmail.com";
|
email = "jeancharles.quillet@gmail.com";
|
||||||
github = "jecaro";
|
github = "jecaro";
|
||||||
|
|
|
@ -17,7 +17,8 @@ checks:
|
||||||
them and comparing their contents. If they are different but only
|
them and comparing their contents. If they are different but only
|
||||||
`X-Reload-Triggers` in the `[Unit]` section is changed, **reload** the unit.
|
`X-Reload-Triggers` in the `[Unit]` section is changed, **reload** the unit.
|
||||||
The NixOS module system allows setting these triggers with the option
|
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:
|
unit files differ in any way, the following actions are performed:
|
||||||
|
|
||||||
- `.path` and `.slice` units are ignored. There is no need to restart them
|
- `.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
|
- The rest of the units (mostly `.service` units) are then **reload**ed if
|
||||||
`X-ReloadIfChanged` in the `[Service]` section is set to `true` (exposed
|
`X-ReloadIfChanged` in the `[Service]` section is set to `true` (exposed
|
||||||
via [systemd.services.\<name\>.reloadIfChanged](#opt-systemd.services)).
|
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
|
- 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
|
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.timers` (the list of commands to be executed periodically by
|
||||||
`systemd`).
|
`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}
|
::: {#locate-example .example}
|
||||||
::: {.title}
|
::: {.title}
|
||||||
**Example: NixOS Module for the "locate" Service**
|
**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}
|
```{=docbook}
|
||||||
<xi:include href="option-declarations.section.xml" />
|
<xi:include href="option-declarations.section.xml" />
|
||||||
<xi:include href="option-types.section.xml" />
|
<xi:include href="option-types.section.xml" />
|
||||||
|
|
|
@ -38,8 +38,9 @@
|
||||||
<emphasis role="strong">reload</emphasis> the unit. The NixOS
|
<emphasis role="strong">reload</emphasis> the unit. The NixOS
|
||||||
module system allows setting these triggers with the option
|
module system allows setting these triggers with the option
|
||||||
<link linkend="opt-systemd.services">systemd.services.<name>.reloadTriggers</link>.
|
<link linkend="opt-systemd.services">systemd.services.<name>.reloadTriggers</link>.
|
||||||
If the unit files differ in any way, the following actions are
|
There are some additional keys in the <literal>[Unit]</literal>
|
||||||
performed:
|
section that are ignored as well. If the unit files differ in
|
||||||
|
any way, the following actions are performed:
|
||||||
</para>
|
</para>
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem>
|
<listitem>
|
||||||
|
@ -71,6 +72,11 @@
|
||||||
<literal>[Service]</literal> section is set to
|
<literal>[Service]</literal> section is set to
|
||||||
<literal>true</literal> (exposed via
|
<literal>true</literal> (exposed via
|
||||||
<link linkend="opt-systemd.services">systemd.services.<name>.reloadIfChanged</link>).
|
<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>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
<listitem>
|
<listitem>
|
||||||
|
|
|
@ -122,6 +122,25 @@
|
||||||
services) and <literal>systemd.timers</literal> (the list of
|
services) and <literal>systemd.timers</literal> (the list of
|
||||||
commands to be executed periodically by <literal>systemd</literal>).
|
commands to be executed periodically by <literal>systemd</literal>).
|
||||||
</para>
|
</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" />
|
<anchor xml:id="locate-example" />
|
||||||
<para>
|
<para>
|
||||||
<emphasis role="strong">Example: NixOS Module for the
|
<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>
|
</programlisting>
|
||||||
<xi:include href="option-declarations.section.xml" />
|
<xi:include href="option-declarations.section.xml" />
|
||||||
<xi:include href="option-types.section.xml" />
|
<xi:include href="option-types.section.xml" />
|
||||||
|
|
|
@ -249,6 +249,17 @@
|
||||||
<link linkend="opt-services.prosody-filer.enable">services.prosody-filer</link>.
|
<link linkend="opt-services.prosody-filer.enable">services.prosody-filer</link>.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</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>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
<link xlink:href="https://github.com/audreyt/ethercalc">ethercalc</link>,
|
<link xlink:href="https://github.com/audreyt/ethercalc">ethercalc</link>,
|
||||||
|
@ -1374,6 +1385,16 @@
|
||||||
warning.
|
warning.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</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>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
The option
|
The option
|
||||||
|
|
|
@ -72,6 +72,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).
|
- [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
|
- [ethercalc](https://github.com/audreyt/ethercalc), an online collaborative
|
||||||
spreadsheet. Available as [services.ethercalc](options.html#opt-services.ethercalc.enable).
|
spreadsheet. Available as [services.ethercalc](options.html#opt-services.ethercalc.enable).
|
||||||
|
|
||||||
|
@ -503,6 +505,11 @@ In addition to numerous new and upgraded packages, this release has the followin
|
||||||
Reason is that the old name has been deprecated upstream.
|
Reason is that the old name has been deprecated upstream.
|
||||||
Using the old option name will still work, but produce a warning.
|
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
|
- The option
|
||||||
[services.networking.networkmanager.enableFccUnlock](#opt-networking.networkmanager.enableFccUnlock)
|
[services.networking.networkmanager.enableFccUnlock](#opt-networking.networkmanager.enableFccUnlock)
|
||||||
was added to support FCC unlock procedures. Since release 1.18.4, the ModemManager
|
was added to support FCC unlock procedures. Since release 1.18.4, the ModemManager
|
||||||
|
|
|
@ -45,6 +45,26 @@ rec {
|
||||||
replaceChars ["/" "-" " "] ["-" "\\x2d" "\\x20"]
|
replaceChars ["/" "-" " "] ["-" "\\x2d" "\\x20"]
|
||||||
(removePrefix "/" s);
|
(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
|
# Returns a system path for a given shell package
|
||||||
toShellPath = shell:
|
toShellPath = shell:
|
||||||
if types.shellPackage.check shell then
|
if types.shellPackage.check shell then
|
||||||
|
|
|
@ -987,6 +987,7 @@
|
||||||
./services/system/nscd.nix
|
./services/system/nscd.nix
|
||||||
./services/system/saslauthd.nix
|
./services/system/saslauthd.nix
|
||||||
./services/system/self-deploy.nix
|
./services/system/self-deploy.nix
|
||||||
|
./services/system/systembus-notify.nix
|
||||||
./services/system/uptimed.nix
|
./services/system/uptimed.nix
|
||||||
./services/torrent/deluge.nix
|
./services/torrent/deluge.nix
|
||||||
./services/torrent/flexget.nix
|
./services/torrent/flexget.nix
|
||||||
|
|
|
@ -1,8 +1,12 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
with lib;
|
|
||||||
let
|
let
|
||||||
cfg = config.programs.captive-browser;
|
cfg = config.programs.captive-browser;
|
||||||
|
|
||||||
|
inherit (lib)
|
||||||
|
concatStringsSep escapeShellArgs optionalString
|
||||||
|
literalExpression mkEnableOption mkIf mkOption mkOptionDefault types;
|
||||||
|
|
||||||
browserDefault = chromium: concatStringsSep " " [
|
browserDefault = chromium: concatStringsSep " " [
|
||||||
''env XDG_CONFIG_HOME="$PREV_CONFIG_HOME"''
|
''env XDG_CONFIG_HOME="$PREV_CONFIG_HOME"''
|
||||||
''${chromium}/bin/chromium''
|
''${chromium}/bin/chromium''
|
||||||
|
@ -15,6 +19,15 @@ let
|
||||||
''-no-default-browser-check''
|
''-no-default-browser-check''
|
||||||
''http://cache.nixos.org/''
|
''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
|
in
|
||||||
{
|
{
|
||||||
###### interface
|
###### interface
|
||||||
|
@ -84,6 +97,11 @@ in
|
||||||
###### implementation
|
###### implementation
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
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 =
|
programs.captive-browser.dhcp-dns =
|
||||||
let
|
let
|
||||||
|
|
|
@ -1,50 +1,46 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
with lib;
|
|
||||||
|
|
||||||
let
|
let
|
||||||
|
inherit (lib) mkEnableOption mkIf mkOption optionalString types;
|
||||||
|
|
||||||
dataDir = "/var/lib/squeezelite";
|
dataDir = "/var/lib/squeezelite";
|
||||||
cfg = config.services.squeezelite;
|
cfg = config.services.squeezelite;
|
||||||
|
pkg = if cfg.pulseAudio then pkgs.squeezelite-pulse else pkgs.squeezelite;
|
||||||
|
bin = "${pkg}/bin/${pkg.pname}";
|
||||||
|
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
|
|
||||||
###### interface
|
###### interface
|
||||||
|
|
||||||
options = {
|
options.services.squeezelite = {
|
||||||
|
enable = mkEnableOption "Squeezelite, a software Squeezebox emulator";
|
||||||
|
|
||||||
services.squeezelite= {
|
pulseAudio = mkEnableOption "pulseaudio support";
|
||||||
|
|
||||||
enable = mkEnableOption "Squeezelite, a software Squeezebox emulator";
|
|
||||||
|
|
||||||
extraArguments = mkOption {
|
|
||||||
default = "";
|
|
||||||
type = types.str;
|
|
||||||
description = ''
|
|
||||||
Additional command line arguments to pass to Squeezelite.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
|
extraArguments = mkOption {
|
||||||
|
default = "";
|
||||||
|
type = types.str;
|
||||||
|
description = ''
|
||||||
|
Additional command line arguments to pass to Squeezelite.
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
###### implementation
|
###### implementation
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
systemd.services.squeezelite = {
|
||||||
systemd.services.squeezelite= {
|
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
after = [ "network.target" "sound.target" ];
|
after = [ "network.target" "sound.target" ];
|
||||||
description = "Software Squeezebox emulator";
|
description = "Software Squeezebox emulator";
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
DynamicUser = true;
|
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;
|
StateDirectory = builtins.baseNameOf dataDir;
|
||||||
SupplementaryGroups = "audio";
|
SupplementaryGroups = "audio";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -70,7 +70,8 @@ in
|
||||||
LockPersonality = true;
|
LockPersonality = true;
|
||||||
|
|
||||||
PrivateTmp = true;
|
PrivateTmp = true;
|
||||||
PrivateDevices = true;
|
# Disabled to allow Jellyfin to access hw accel devices endpoints
|
||||||
|
# PrivateDevices = true;
|
||||||
PrivateUsers = true;
|
PrivateUsers = true;
|
||||||
|
|
||||||
# Disabled as it does not allow Jellyfin to interface with CUDA devices
|
# Disabled as it does not allow Jellyfin to interface with CUDA devices
|
||||||
|
|
|
@ -1,81 +1,73 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
with lib;
|
|
||||||
|
|
||||||
let
|
let
|
||||||
ecfg = config.services.earlyoom;
|
cfg = config.services.earlyoom;
|
||||||
|
|
||||||
|
inherit (lib)
|
||||||
|
mkDefault mkEnableOption mkIf mkOption types
|
||||||
|
mkRemovedOptionModule
|
||||||
|
concatStringsSep optional;
|
||||||
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options = {
|
options.services.earlyoom = {
|
||||||
services.earlyoom = {
|
enable = mkEnableOption "Early out of memory killing";
|
||||||
|
|
||||||
enable = mkOption {
|
freeMemThreshold = mkOption {
|
||||||
type = types.bool;
|
type = types.ints.between 1 100;
|
||||||
default = false;
|
default = 10;
|
||||||
description = ''
|
description = ''
|
||||||
Enable early out of memory killing.
|
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 {
|
freeSwapThreshold = mkOption {
|
||||||
type = types.int;
|
type = types.ints.between 1 100;
|
||||||
default = 10;
|
default = 10;
|
||||||
description = ''
|
description = ''
|
||||||
Minimum of availabe memory (in percent).
|
Minimum of availabe swap space (in percent).
|
||||||
If the free memory falls below this threshold and the analog is true for
|
If the available swap space falls below this threshold and the analog
|
||||||
<option>services.earlyoom.freeSwapThreshold</option>
|
is true for <option>services.earlyoom.freeMemThreshold</option>
|
||||||
the killing begins.
|
the killing begins.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
freeSwapThreshold = mkOption {
|
# TODO: remove or warn after 1.7 (https://github.com/rfjakob/earlyoom/commit/7ebc4554)
|
||||||
type = types.int;
|
ignoreOOMScoreAdjust = mkOption {
|
||||||
default = 10;
|
type = types.bool;
|
||||||
description = ''
|
default = false;
|
||||||
Minimum of availabe swap space (in percent).
|
description = ''
|
||||||
If the available swap space falls below this threshold and the analog
|
Ignore oom_score_adjust values of processes.
|
||||||
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)
|
enableDebugInfo = mkOption {
|
||||||
ignoreOOMScoreAdjust = mkOption {
|
type = types.bool;
|
||||||
type = types.bool;
|
default = false;
|
||||||
default = false;
|
description = ''
|
||||||
description = ''
|
Enable debugging messages.
|
||||||
Ignore oom_score_adjust values of processes.
|
'';
|
||||||
'';
|
};
|
||||||
};
|
|
||||||
|
|
||||||
enableDebugInfo = mkOption {
|
enableNotifications = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
description = ''
|
description = ''
|
||||||
Enable debugging messages.
|
Send notifications about killed processes via the system d-bus.
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
notificationsCommand = mkOption {
|
WARNING: enabling this option (while convenient) should *not* be done on a
|
||||||
type = types.nullOr types.str;
|
machine where you do not trust the other users as it allows any other
|
||||||
default = null;
|
local user to DoS your session by spamming notifications.
|
||||||
description = ''
|
|
||||||
This option is deprecated and ignored by earlyoom since 1.6.
|
|
||||||
Use <option>services.earlyoom.enableNotifications</option> instead.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
enableNotifications = mkOption {
|
To actually see the notifications in your GUI session, you need to have
|
||||||
type = types.bool;
|
<literal>systembus-notify</literal> running as your user which this
|
||||||
default = false;
|
option handles.
|
||||||
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.
|
|
||||||
|
|
||||||
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" ] ''
|
(mkRemovedOptionModule [ "services" "earlyoom" "useKernelOOMKiller" ] ''
|
||||||
This option is deprecated and ignored by earlyoom since 1.2.
|
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 {
|
config = mkIf cfg.enable {
|
||||||
assertions = [
|
services.systembus-notify.enable = mkDefault cfg.enableNotifications;
|
||||||
{ 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.";
|
|
||||||
|
|
||||||
systemd.services.earlyoom = {
|
systemd.services.earlyoom = {
|
||||||
description = "Early OOM Daemon for Linux";
|
description = "Early OOM Daemon for Linux";
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
path = optional ecfg.enableNotifications pkgs.dbus;
|
path = optional cfg.enableNotifications pkgs.dbus;
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
StandardOutput = "null";
|
|
||||||
StandardError = "journal";
|
StandardError = "journal";
|
||||||
ExecStart = concatStringsSep " " ([
|
ExecStart = concatStringsSep " " ([
|
||||||
"${pkgs.earlyoom}/bin/earlyoom"
|
"${pkgs.earlyoom}/bin/earlyoom"
|
||||||
"-m ${toString ecfg.freeMemThreshold}"
|
"-m ${toString cfg.freeMemThreshold}"
|
||||||
"-s ${toString ecfg.freeSwapThreshold}"
|
"-s ${toString cfg.freeSwapThreshold}"
|
||||||
] ++ optional ecfg.ignoreOOMScoreAdjust "-i"
|
]
|
||||||
++ optional ecfg.enableDebugInfo "-d"
|
++ optional cfg.ignoreOOMScoreAdjust "-i"
|
||||||
++ optional ecfg.enableNotifications "-n");
|
++ 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" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -69,11 +69,16 @@ in
|
||||||
CERTIFICATE_KEY_FILE = "key.pem";
|
CERTIFICATE_KEY_FILE = "key.pem";
|
||||||
};
|
};
|
||||||
startLimitIntervalSec = 60;
|
startLimitIntervalSec = 60;
|
||||||
|
script = ''
|
||||||
|
if [[ -v CREDENTIALS_DIRECTORY ]]; then
|
||||||
|
cd "$CREDENTIALS_DIRECTORY"
|
||||||
|
fi
|
||||||
|
exec "${pkgs.pomerium}/bin/pomerium" -config "${cfgFile}"
|
||||||
|
'';
|
||||||
|
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
DynamicUser = true;
|
DynamicUser = true;
|
||||||
StateDirectory = [ "pomerium" ];
|
StateDirectory = [ "pomerium" ];
|
||||||
ExecStart = "${pkgs.pomerium}/bin/pomerium -config ${cfgFile}";
|
|
||||||
|
|
||||||
PrivateUsers = false; # breaks CAP_NET_BIND_SERVICE
|
PrivateUsers = false; # breaks CAP_NET_BIND_SERVICE
|
||||||
MemoryDenyWriteExecute = false; # breaks LuaJIT
|
MemoryDenyWriteExecute = false; # breaks LuaJIT
|
||||||
|
@ -99,7 +104,6 @@ in
|
||||||
AmbientCapabilities = [ "CAP_NET_BIND_SERVICE" ];
|
AmbientCapabilities = [ "CAP_NET_BIND_SERVICE" ];
|
||||||
CapabilityBoundingSet = [ "CAP_NET_BIND_SERVICE" ];
|
CapabilityBoundingSet = [ "CAP_NET_BIND_SERVICE" ];
|
||||||
|
|
||||||
WorkingDirectory = mkIf (cfg.useACMEHost != null) "$CREDENTIALS_DIRECTORY";
|
|
||||||
LoadCredential = optionals (cfg.useACMEHost != null) [
|
LoadCredential = optionals (cfg.useACMEHost != null) [
|
||||||
"fullchain.pem:/var/lib/acme/${cfg.useACMEHost}/fullchain.pem"
|
"fullchain.pem:/var/lib/acme/${cfg.useACMEHost}/fullchain.pem"
|
||||||
"key.pem:/var/lib/acme/${cfg.useACMEHost}/key.pem"
|
"key.pem:/var/lib/acme/${cfg.useACMEHost}/key.pem"
|
||||||
|
@ -124,7 +128,7 @@ in
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
TimeoutSec = 60;
|
TimeoutSec = 60;
|
||||||
ExecCondition = "/run/current-system/systemd/bin/systemctl -q is-active pomerium.service";
|
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 {
|
package = mkOption {
|
||||||
type = types.package;
|
type = types.package;
|
||||||
default = pkgs.tomcat85;
|
default = pkgs.tomcat9;
|
||||||
defaultText = literalExpression "pkgs.tomcat85";
|
defaultText = literalExpression "pkgs.tomcat9";
|
||||||
example = lib.literalExpression "pkgs.tomcat9";
|
example = lib.literalExpression "pkgs.tomcat9";
|
||||||
description = ''
|
description = ''
|
||||||
Which tomcat package to use.
|
Which tomcat package to use.
|
||||||
|
@ -127,7 +127,7 @@ in
|
||||||
webapps = mkOption {
|
webapps = mkOption {
|
||||||
type = types.listOf types.path;
|
type = types.listOf types.path;
|
||||||
default = [ tomcat.webapps ];
|
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";
|
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;
|
{ uid = config.ids.uids.tomcat;
|
||||||
description = "Tomcat user";
|
description = "Tomcat user";
|
||||||
home = "/homeless-shelter";
|
home = "/homeless-shelter";
|
||||||
|
group = "tomcat";
|
||||||
extraGroups = cfg.extraGroups;
|
extraGroups = cfg.extraGroups;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,8 @@ use Net::DBus;
|
||||||
use Sys::Syslog qw(:standard :macros);
|
use Sys::Syslog qw(:standard :macros);
|
||||||
use Cwd 'abs_path';
|
use Cwd 'abs_path';
|
||||||
|
|
||||||
|
## no critic(CodeLayout::ProhibitParensWithBuiltins)
|
||||||
|
|
||||||
my $out = "@out@";
|
my $out = "@out@";
|
||||||
|
|
||||||
my $curSystemd = abs_path("/run/current-system/sw/bin");
|
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) });
|
make_path("/run/nixos", { mode => oct(755) });
|
||||||
|
|
||||||
my $action = shift @ARGV;
|
my $action = shift(@ARGV);
|
||||||
|
|
||||||
if ("@localeArchive@" ne "") {
|
if ("@localeArchive@" ne "") {
|
||||||
$ENV{LOCALE_ARCHIVE} = "@localeArchive@";
|
$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;
|
print STDERR <<EOF;
|
||||||
Usage: $0 [switch|boot|test]
|
Usage: $0 [switch|boot|test]
|
||||||
|
|
||||||
|
@ -51,27 +53,27 @@ boot: make the configuration the boot default
|
||||||
test: activate the configuration, but don\'t make it 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
|
dry-activate: show what would be done if this configuration were activated
|
||||||
EOF
|
EOF
|
||||||
exit 1;
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
$ENV{NIXOS_ACTION} = $action;
|
$ENV{NIXOS_ACTION} = $action;
|
||||||
|
|
||||||
# This is a NixOS installation if it has /etc/NIXOS or a proper
|
# This is a NixOS installation if it has /etc/NIXOS or a proper
|
||||||
# /etc/os-release.
|
# /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;
|
-f "/etc/NIXOS" || (read_file("/etc/os-release", err_mode => 'quiet') // "") =~ /ID="?nixos"?/s;
|
||||||
|
|
||||||
openlog("nixos", "", LOG_USER);
|
openlog("nixos", "", LOG_USER);
|
||||||
|
|
||||||
# Install or update the bootloader.
|
# Install or update the bootloader.
|
||||||
if ($action eq "switch" || $action eq "boot") {
|
if ($action eq "switch" || $action eq "boot") {
|
||||||
system("@installBootLoader@ $out") == 0 or exit 1;
|
system('@installBootLoader@', $out) == 0 or exit 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Just in case the new configuration hangs the system, do a sync now.
|
# 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";
|
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.
|
# Check if we can activate the new configuration.
|
||||||
my $oldVersion = read_file("/run/current-system/init-interface-version", err_mode => 'quiet') // "";
|
my $oldVersion = read_file("/run/current-system/init-interface-version", err_mode => 'quiet') // "";
|
||||||
|
@ -83,7 +85,7 @@ Warning: the new NixOS configuration has an ‘init’ that is
|
||||||
incompatible with the current configuration. The new configuration
|
incompatible with the current configuration. The new configuration
|
||||||
won\'t take effect until you reboot the system.
|
won\'t take effect until you reboot the system.
|
||||||
EOF
|
EOF
|
||||||
exit 100;
|
exit(100);
|
||||||
}
|
}
|
||||||
|
|
||||||
# Ignore SIGHUP so that we're not killed if we're running on (say)
|
# Ignore SIGHUP so that we're not killed if we're running on (say)
|
||||||
|
@ -104,14 +106,27 @@ sub getActiveUnits {
|
||||||
return $res;
|
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 {
|
sub parseFstab {
|
||||||
my ($filename) = @_;
|
my ($filename) = @_;
|
||||||
my ($fss, $swaps);
|
my ($fss, $swaps);
|
||||||
foreach my $line (read_file($filename, err_mode => 'quiet')) {
|
foreach my $line (read_file($filename, err_mode => 'quiet')) {
|
||||||
chomp $line;
|
chomp($line);
|
||||||
$line =~ s/^\s*#.*//;
|
$line =~ s/^\s*#.*//;
|
||||||
next if $line =~ /^\s*$/;
|
next if $line =~ /^\s*$/;
|
||||||
my @xs = split / /, $line;
|
my @xs = split(/ /, $line);
|
||||||
if ($xs[2] eq "swap") {
|
if ($xs[2] eq "swap") {
|
||||||
$swaps->{$xs[0]} = { options => $xs[3] // "" };
|
$swaps->{$xs[0]} = { options => $xs[3] // "" };
|
||||||
} else {
|
} else {
|
||||||
|
@ -133,17 +148,16 @@ sub parseFstab {
|
||||||
sub parseSystemdIni {
|
sub parseSystemdIni {
|
||||||
my ($unitContents, $path) = @_;
|
my ($unitContents, $path) = @_;
|
||||||
# Tie the ini file to a hash for easier access
|
# Tie the ini file to a hash for easier access
|
||||||
my %fileContents;
|
tie(my %fileContents, 'Config::IniFiles', (-file => $path, -allowempty => 1, -allowcontinue => 1)); ## no critic(Miscellanea::ProhibitTies)
|
||||||
tie %fileContents, "Config::IniFiles", (-file => $path, -allowempty => 1, -allowcontinue => 1);
|
|
||||||
|
|
||||||
# Copy over all sections
|
# Copy over all sections
|
||||||
foreach my $sectionName (keys %fileContents) {
|
foreach my $sectionName (keys(%fileContents)) {
|
||||||
if ($sectionName eq "Install") {
|
if ($sectionName eq "Install") {
|
||||||
# Skip the [Install] section because it has no relevant keys for us
|
# Skip the [Install] section because it has no relevant keys for us
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
# Copy over all keys
|
# 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
|
# Ensure the value is an array so it's easier to work with
|
||||||
my $iniValue = $fileContents{$sectionName}{$iniKey};
|
my $iniValue = $fileContents{$sectionName}{$iniKey};
|
||||||
my @iniValues;
|
my @iniValues;
|
||||||
|
@ -181,7 +195,7 @@ sub parse_unit {
|
||||||
# Replace \ with \\ so glob() still works with units that have a \ in them
|
# Replace \ with \\ so glob() still works with units that have a \ in them
|
||||||
# Valid characters in unit names are ASCII letters, digits, ":", "-", "_", ".", and "\"
|
# Valid characters in unit names are ASCII letters, digits, ":", "-", "_", ".", and "\"
|
||||||
$unit_path =~ s/\\/\\\\/gmsx;
|
$unit_path =~ s/\\/\\\\/gmsx;
|
||||||
foreach (glob "${unit_path}{,.d/*.conf}") {
|
foreach (glob("${unit_path}{,.d/*.conf}")) {
|
||||||
parseSystemdIni(\%unit_data, "$_")
|
parseSystemdIni(\%unit_data, "$_")
|
||||||
}
|
}
|
||||||
return %unit_data;
|
return %unit_data;
|
||||||
|
@ -194,7 +208,7 @@ sub parseSystemdBool {
|
||||||
|
|
||||||
my @values = @{$unitConfig->{$sectionName}{$boolName} // []};
|
my @values = @{$unitConfig->{$sectionName}{$boolName} // []};
|
||||||
# Return default if value is not set
|
# 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;
|
return $default;
|
||||||
}
|
}
|
||||||
# If value is defined multiple times, use the last definition
|
# If value is defined multiple times, use the last definition
|
||||||
|
@ -211,7 +225,7 @@ sub recordUnit {
|
||||||
# The opposite of recordUnit, removes a unit name from a file
|
# The opposite of recordUnit, removes a unit name from a file
|
||||||
sub unrecord_unit {
|
sub unrecord_unit {
|
||||||
my ($fn, $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
|
# Compare the contents of two unit files and return whether the unit
|
||||||
|
@ -226,6 +240,16 @@ sub unrecord_unit {
|
||||||
sub compare_units {
|
sub compare_units {
|
||||||
my ($old_unit, $new_unit) = @_;
|
my ($old_unit, $new_unit) = @_;
|
||||||
my $ret = 0;
|
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 $comp_array = sub {
|
||||||
my ($a, $b) = @_;
|
my ($a, $b) = @_;
|
||||||
|
@ -233,11 +257,23 @@ sub compare_units {
|
||||||
};
|
};
|
||||||
|
|
||||||
# Comparison hash for the sections
|
# 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
|
# Iterate over the sections
|
||||||
foreach my $section_name (keys %{$old_unit}) {
|
foreach my $section_name (keys(%{$old_unit})) {
|
||||||
# Missing section in the new 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 ($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,
|
# If a new [Unit] section was removed that only contained X-Reload-Triggers,
|
||||||
# do nothing.
|
# do nothing.
|
||||||
|
@ -248,15 +284,15 @@ sub compare_units {
|
||||||
}
|
}
|
||||||
delete $section_cmp{$section_name};
|
delete $section_cmp{$section_name};
|
||||||
# Comparison hash for the section contents
|
# 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
|
# 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};
|
delete $ini_cmp{$ini_key};
|
||||||
my @old_value = @{$old_unit->{$section_name}{$ini_key}};
|
my @old_value = @{$old_unit->{$section_name}{$ini_key}};
|
||||||
# If the key is missing in the new unit, they are different...
|
# If the key is missing in the new unit, they are different...
|
||||||
if (not $new_unit->{$section_name}{$ini_key}) {
|
if (not $new_unit->{$section_name}{$ini_key}) {
|
||||||
# ... unless the key that is now missing was the reload trigger
|
# ... unless the key that is now missing is one of the ignored keys
|
||||||
if ($section_name eq 'Unit' and $ini_key eq 'X-Reload-Triggers') {
|
if ($section_name eq 'Unit' and defined($unit_section_ignores{$ini_key})) {
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -264,19 +300,30 @@ sub compare_units {
|
||||||
my @new_value = @{$new_unit->{$section_name}{$ini_key}};
|
my @new_value = @{$new_unit->{$section_name}{$ini_key}};
|
||||||
# If the contents are different, the units are different
|
# If the contents are different, the units are different
|
||||||
if (not $comp_array->(\@old_value, \@new_value)) {
|
if (not $comp_array->(\@old_value, \@new_value)) {
|
||||||
# Check if only the reload triggers changed
|
# Check if only the reload triggers changed or one of the ignored keys
|
||||||
if ($section_name eq 'Unit' and $ini_key eq 'X-Reload-Triggers') {
|
if ($section_name eq 'Unit') {
|
||||||
$ret = 2;
|
if ($ini_key eq 'X-Reload-Triggers') {
|
||||||
} else {
|
$ret = 2;
|
||||||
return 1;
|
next;
|
||||||
|
} elsif (defined($unit_section_ignores{$ini_key})) {
|
||||||
|
next;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
# A key was introduced that was missing in the old unit
|
# A key was introduced that was missing in the old unit
|
||||||
if (%ini_cmp) {
|
if (%ini_cmp) {
|
||||||
if ($section_name eq 'Unit' and %ini_cmp == 1 and defined($ini_cmp{'X-Reload-Triggers'})) {
|
if ($section_name eq 'Unit') {
|
||||||
# If the newly introduced key was the reload triggers, reload the unit
|
foreach my $ini_key (keys(%ini_cmp)) {
|
||||||
$ret = 2;
|
if ($ini_key eq 'X-Reload-Triggers') {
|
||||||
|
$ret = 2;
|
||||||
|
} elsif (defined($unit_section_ignores{$ini_key})) {
|
||||||
|
next;
|
||||||
|
} else {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -284,10 +331,14 @@ sub compare_units {
|
||||||
}
|
}
|
||||||
# A section was introduced that was missing in the old unit
|
# A section was introduced that was missing in the old unit
|
||||||
if (%section_cmp) {
|
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 (%section_cmp == 1 and defined($section_cmp{'Unit'})) {
|
||||||
# If a new [Unit] section was introduced that only contains X-Reload-Triggers,
|
foreach my $ini_key (keys(%{$new_unit->{'Unit'}})) {
|
||||||
# reload instead of restarting
|
if (not defined($unit_section_ignores{$ini_key})) {
|
||||||
$ret = 2;
|
return 1;
|
||||||
|
} elsif ($ini_key eq 'X-Reload-Triggers') {
|
||||||
|
$ret = 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -343,11 +394,11 @@ sub handleModifiedUnit {
|
||||||
my $socket_activated = 0;
|
my $socket_activated = 0;
|
||||||
if ($unit =~ /\.service$/) {
|
if ($unit =~ /\.service$/) {
|
||||||
my @sockets = split(/ /, join(" ", @{$unitInfo{Service}{Sockets} // []}));
|
my @sockets = split(/ /, join(" ", @{$unitInfo{Service}{Sockets} // []}));
|
||||||
if (scalar @sockets == 0) {
|
if (scalar(@sockets) == 0) {
|
||||||
@sockets = ("$baseName.socket");
|
@sockets = ("$baseName.socket");
|
||||||
}
|
}
|
||||||
foreach my $socket (@sockets) {
|
foreach my $socket (@sockets) {
|
||||||
if (defined $activePrev->{$socket}) {
|
if (defined($activePrev->{$socket})) {
|
||||||
# We can now be sure this is a socket-activate unit
|
# We can now be sure this is a socket-activate unit
|
||||||
|
|
||||||
$unitsToStop->{$socket} = 1;
|
$unitsToStop->{$socket} = 1;
|
||||||
|
@ -355,7 +406,11 @@ sub handleModifiedUnit {
|
||||||
# exist in new configuration:
|
# exist in new configuration:
|
||||||
if (-e "$out/etc/systemd/system/$socket") {
|
if (-e "$out/etc/systemd/system/$socket") {
|
||||||
$unitsToStart->{$socket} = 1;
|
$unitsToStart->{$socket} = 1;
|
||||||
recordUnit($startListFile, $socket);
|
if ($unitsToStart eq $unitsToRestart) {
|
||||||
|
recordUnit($restartListFile, $socket);
|
||||||
|
} else {
|
||||||
|
recordUnit($startListFile, $socket);
|
||||||
|
}
|
||||||
$socket_activated = 1;
|
$socket_activated = 1;
|
||||||
}
|
}
|
||||||
# Remove from units to reload so we don't restart and reload
|
# Remove from units to reload so we don't restart and reload
|
||||||
|
@ -373,7 +428,11 @@ sub handleModifiedUnit {
|
||||||
# service gets restarted if we're interrupted.
|
# service gets restarted if we're interrupted.
|
||||||
if (!$socket_activated) {
|
if (!$socket_activated) {
|
||||||
$unitsToStart->{$unit} = 1;
|
$unitsToStart->{$unit} = 1;
|
||||||
recordUnit($startListFile, $unit);
|
if ($unitsToStart eq $unitsToRestart) {
|
||||||
|
recordUnit($restartListFile, $unit);
|
||||||
|
} else {
|
||||||
|
recordUnit($startListFile, $unit);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$unitsToStop->{$unit} = 1;
|
$unitsToStop->{$unit} = 1;
|
||||||
|
@ -401,8 +460,8 @@ $unitsToRestart{$_} = 1 foreach
|
||||||
$unitsToReload{$_} = 1 foreach
|
$unitsToReload{$_} = 1 foreach
|
||||||
split('\n', read_file($reloadListFile, err_mode => 'quiet') // "");
|
split('\n', read_file($reloadListFile, err_mode => 'quiet') // "");
|
||||||
|
|
||||||
my $activePrev = getActiveUnits;
|
my $activePrev = getActiveUnits();
|
||||||
while (my ($unit, $state) = each %{$activePrev}) {
|
while (my ($unit, $state) = each(%{$activePrev})) {
|
||||||
my $baseUnit = $unit;
|
my $baseUnit = $unit;
|
||||||
|
|
||||||
my $prevUnitFile = "/etc/systemd/system/$baseUnit";
|
my $prevUnitFile = "/etc/systemd/system/$baseUnit";
|
||||||
|
@ -462,9 +521,9 @@ while (my ($unit, $state) = each %{$activePrev}) {
|
||||||
my %old_unit_info = parse_unit($prevUnitFile);
|
my %old_unit_info = parse_unit($prevUnitFile);
|
||||||
my %new_unit_info = parse_unit($newUnitFile);
|
my %new_unit_info = parse_unit($newUnitFile);
|
||||||
my $diff = compare_units(\%old_unit_info, \%new_unit_info);
|
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);
|
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;
|
$unitsToReload{$unit} = 1;
|
||||||
recordUnit($reloadListFile, $unit);
|
recordUnit($reloadListFile, $unit);
|
||||||
}
|
}
|
||||||
|
@ -475,11 +534,11 @@ while (my ($unit, $state) = each %{$activePrev}) {
|
||||||
sub pathToUnitName {
|
sub pathToUnitName {
|
||||||
my ($path) = @_;
|
my ($path) = @_;
|
||||||
# Use current version of systemctl binary before daemon is reexeced.
|
# 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";
|
or die "Unable to escape $path!\n";
|
||||||
my $escaped = join "", <$cmd>;
|
my $escaped = join("", <$cmd>);
|
||||||
chomp $escaped;
|
chomp($escaped);
|
||||||
close $cmd or die;
|
close($cmd) or die('Unable to close systemd-escape pipe');
|
||||||
return $escaped;
|
return $escaped;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -488,13 +547,13 @@ sub pathToUnitName {
|
||||||
# automatically by starting local-fs.target. FIXME: might be nicer if
|
# automatically by starting local-fs.target. FIXME: might be nicer if
|
||||||
# we generated units for all mounts; then we could unify this with the
|
# we generated units for all mounts; then we could unify this with the
|
||||||
# unit checking code above.
|
# unit checking code above.
|
||||||
my ($prevFss, $prevSwaps) = parseFstab "/etc/fstab";
|
my ($prevFss, $prevSwaps) = parseFstab("/etc/fstab");
|
||||||
my ($newFss, $newSwaps) = parseFstab "$out/etc/fstab";
|
my ($newFss, $newSwaps) = parseFstab("$out/etc/fstab");
|
||||||
foreach my $mountPoint (keys %$prevFss) {
|
foreach my $mountPoint (keys(%$prevFss)) {
|
||||||
my $prev = $prevFss->{$mountPoint};
|
my $prev = $prevFss->{$mountPoint};
|
||||||
my $new = $newFss->{$mountPoint};
|
my $new = $newFss->{$mountPoint};
|
||||||
my $unit = pathToUnitName($mountPoint);
|
my $unit = pathToUnitName($mountPoint);
|
||||||
if (!defined $new) {
|
if (!defined($new)) {
|
||||||
# Filesystem entry disappeared, so unmount it.
|
# Filesystem entry disappeared, so unmount it.
|
||||||
$unitsToStop{$unit} = 1;
|
$unitsToStop{$unit} = 1;
|
||||||
} elsif ($prev->{fsType} ne $new->{fsType} || $prev->{device} ne $new->{device}) {
|
} elsif ($prev->{fsType} ne $new->{fsType} || $prev->{device} ne $new->{device}) {
|
||||||
|
@ -510,10 +569,10 @@ foreach my $mountPoint (keys %$prevFss) {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Also handles swap devices.
|
# Also handles swap devices.
|
||||||
foreach my $device (keys %$prevSwaps) {
|
foreach my $device (keys(%$prevSwaps)) {
|
||||||
my $prev = $prevSwaps->{$device};
|
my $prev = $prevSwaps->{$device};
|
||||||
my $new = $newSwaps->{$device};
|
my $new = $newSwaps->{$device};
|
||||||
if (!defined $new) {
|
if (!defined($new)) {
|
||||||
# Swap entry disappeared, so turn it off. Can't use
|
# Swap entry disappeared, so turn it off. Can't use
|
||||||
# "systemctl stop" here because systemd has lots of alias
|
# "systemctl stop" here because systemd has lots of alias
|
||||||
# units that prevent a stop from actually calling
|
# units that prevent a stop from actually calling
|
||||||
|
@ -544,8 +603,8 @@ if ($prevSystemdSystemConfig ne $newSystemdSystemConfig) {
|
||||||
sub filterUnits {
|
sub filterUnits {
|
||||||
my ($units) = @_;
|
my ($units) = @_;
|
||||||
my @res;
|
my @res;
|
||||||
foreach my $unit (sort(keys %{$units})) {
|
foreach my $unit (sort(keys(%{$units}))) {
|
||||||
push @res, $unit if !defined $unitsToFilter{$unit};
|
push(@res, $unit) if !defined($unitsToFilter{$unit});
|
||||||
}
|
}
|
||||||
return @res;
|
return @res;
|
||||||
}
|
}
|
||||||
|
@ -556,9 +615,9 @@ my @unitsToStopFiltered = filterUnits(\%unitsToStop);
|
||||||
# Show dry-run actions.
|
# Show dry-run actions.
|
||||||
if ($action eq "dry-activate") {
|
if ($action eq "dry-activate") {
|
||||||
print STDERR "would stop the following units: ", join(", ", @unitsToStopFiltered), "\n"
|
print STDERR "would stop the following units: ", join(", ", @unitsToStopFiltered), "\n"
|
||||||
if scalar @unitsToStopFiltered > 0;
|
if scalar(@unitsToStopFiltered) > 0;
|
||||||
print STDERR "would NOT stop the following changed units: ", join(", ", sort(keys %unitsToSkip)), "\n"
|
print STDERR "would NOT stop the following changed units: ", join(", ", sort(keys(%unitsToSkip))), "\n"
|
||||||
if scalar(keys %unitsToSkip) > 0;
|
if scalar(keys(%unitsToSkip)) > 0;
|
||||||
|
|
||||||
print STDERR "would activate the configuration...\n";
|
print STDERR "would activate the configuration...\n";
|
||||||
system("$out/dry-activate", "$out");
|
system("$out/dry-activate", "$out");
|
||||||
|
@ -579,7 +638,7 @@ if ($action eq "dry-activate") {
|
||||||
$baseName =~ s/\.[a-z]*$//;
|
$baseName =~ s/\.[a-z]*$//;
|
||||||
|
|
||||||
# Start units if they were not active previously
|
# Start units if they were not active previously
|
||||||
if (not defined $activePrev->{$unit}) {
|
if (not defined($activePrev->{$unit})) {
|
||||||
$unitsToStart{$unit} = 1;
|
$unitsToStart{$unit} = 1;
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
|
@ -599,28 +658,28 @@ if ($action eq "dry-activate") {
|
||||||
unlink($dryReloadByActivationFile);
|
unlink($dryReloadByActivationFile);
|
||||||
|
|
||||||
print STDERR "would restart systemd\n" if $restartSystemd;
|
print STDERR "would restart systemd\n" if $restartSystemd;
|
||||||
print STDERR "would reload the following units: ", join(", ", sort(keys %unitsToReload)), "\n"
|
print STDERR "would reload the following units: ", join(", ", sort(keys(%unitsToReload))), "\n"
|
||||||
if scalar(keys %unitsToReload) > 0;
|
if scalar(keys(%unitsToReload)) > 0;
|
||||||
print STDERR "would restart the following units: ", join(", ", sort(keys %unitsToRestart)), "\n"
|
print STDERR "would restart the following units: ", join(", ", sort(keys(%unitsToRestart))), "\n"
|
||||||
if scalar(keys %unitsToRestart) > 0;
|
if scalar(keys(%unitsToRestart)) > 0;
|
||||||
my @unitsToStartFiltered = filterUnits(\%unitsToStart);
|
my @unitsToStartFiltered = filterUnits(\%unitsToStart);
|
||||||
print STDERR "would start the following units: ", join(", ", @unitsToStartFiltered), "\n"
|
print STDERR "would start the following units: ", join(", ", @unitsToStartFiltered), "\n"
|
||||||
if scalar @unitsToStartFiltered;
|
if scalar(@unitsToStartFiltered);
|
||||||
exit 0;
|
exit 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
syslog(LOG_NOTICE, "switching to system configuration $out");
|
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"
|
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.
|
# 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"
|
print STDERR "NOT restarting the following changed units: ", join(", ", sort(keys(%unitsToSkip))), "\n"
|
||||||
if scalar(keys %unitsToSkip) > 0;
|
if scalar(keys(%unitsToSkip)) > 0;
|
||||||
|
|
||||||
# Activate the new configuration (i.e., update /etc, make accounts,
|
# Activate the new configuration (i.e., update /etc, make accounts,
|
||||||
# and so on).
|
# and so on).
|
||||||
|
@ -644,7 +703,7 @@ foreach (split('\n', read_file($restartByActivationFile, err_mode => 'quiet') //
|
||||||
$baseName =~ s/\.[a-z]*$//;
|
$baseName =~ s/\.[a-z]*$//;
|
||||||
|
|
||||||
# Start units if they were not active previously
|
# Start units if they were not active previously
|
||||||
if (not defined $activePrev->{$unit}) {
|
if (not defined($activePrev->{$unit})) {
|
||||||
$unitsToStart{$unit} = 1;
|
$unitsToStart{$unit} = 1;
|
||||||
recordUnit($startListFile, $unit);
|
recordUnit($startListFile, $unit);
|
||||||
next;
|
next;
|
||||||
|
@ -681,7 +740,7 @@ system("@systemd@/bin/systemctl", "reset-failed");
|
||||||
system("@systemd@/bin/systemctl", "daemon-reload") == 0 or $res = 3;
|
system("@systemd@/bin/systemctl", "daemon-reload") == 0 or $res = 3;
|
||||||
|
|
||||||
# Reload user units
|
# 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>) {
|
while (my $f = <$listActiveUsers>) {
|
||||||
next unless $f =~ /^\s*(?<uid>\d+)\s+(?<user>\S+)/;
|
next unless $f =~ /^\s*(?<uid>\d+)\s+(?<user>\S+)/;
|
||||||
my ($uid, $name) = ($+{uid}, $+{user});
|
my ($uid, $name) = ($+{uid}, $+{user});
|
||||||
|
@ -693,25 +752,43 @@ while (my $f = <$listActiveUsers>) {
|
||||||
"@systemd@/bin/systemctl --user start nixos-activation.service");
|
"@systemd@/bin/systemctl --user start nixos-activation.service");
|
||||||
}
|
}
|
||||||
|
|
||||||
close $listActiveUsers;
|
close($listActiveUsers);
|
||||||
|
|
||||||
# Set the new tmpfiles
|
# Set the new tmpfiles
|
||||||
print STDERR "setting up tmpfiles\n";
|
print STDERR "setting up tmpfiles\n";
|
||||||
system("@systemd@/bin/systemd-tmpfiles", "--create", "--remove", "--exclude-prefix=/dev") == 0 or $res = 3;
|
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
|
# Reload units that need it. This includes remounting changed mount
|
||||||
# units.
|
# units.
|
||||||
if (scalar(keys %unitsToReload) > 0) {
|
if (scalar(keys(%unitsToReload)) > 0) {
|
||||||
print STDERR "reloading the following units: ", join(", ", sort(keys %unitsToReload)), "\n";
|
print STDERR "reloading the following units: ", join(", ", sort(keys(%unitsToReload))), "\n";
|
||||||
system("@systemd@/bin/systemctl", "reload", "--", sort(keys %unitsToReload)) == 0 or $res = 4;
|
system("@systemd@/bin/systemctl", "reload", "--", sort(keys(%unitsToReload))) == 0 or $res = 4;
|
||||||
unlink($reloadListFile);
|
unlink($reloadListFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
# Restart changed services (those that have to be restarted rather
|
# Restart changed services (those that have to be restarted rather
|
||||||
# than stopped and started).
|
# than stopped and started).
|
||||||
if (scalar(keys %unitsToRestart) > 0) {
|
if (scalar(keys(%unitsToRestart)) > 0) {
|
||||||
print STDERR "restarting the following units: ", join(", ", sort(keys %unitsToRestart)), "\n";
|
print STDERR "restarting the following units: ", join(", ", sort(keys(%unitsToRestart))), "\n";
|
||||||
system("@systemd@/bin/systemctl", "restart", "--", sort(keys %unitsToRestart)) == 0 or $res = 4;
|
system("@systemd@/bin/systemctl", "restart", "--", sort(keys(%unitsToRestart))) == 0 or $res = 4;
|
||||||
unlink($restartListFile);
|
unlink($restartListFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -723,17 +800,17 @@ if (scalar(keys %unitsToRestart) > 0) {
|
||||||
# systemd.
|
# systemd.
|
||||||
my @unitsToStartFiltered = filterUnits(\%unitsToStart);
|
my @unitsToStartFiltered = filterUnits(\%unitsToStart);
|
||||||
print STDERR "starting the following units: ", join(", ", @unitsToStartFiltered), "\n"
|
print STDERR "starting the following units: ", join(", ", @unitsToStartFiltered), "\n"
|
||||||
if scalar @unitsToStartFiltered;
|
if scalar(@unitsToStartFiltered);
|
||||||
system("@systemd@/bin/systemctl", "start", "--", sort(keys %unitsToStart)) == 0 or $res = 4;
|
system("@systemd@/bin/systemctl", "start", "--", sort(keys(%unitsToStart))) == 0 or $res = 4;
|
||||||
unlink($startListFile);
|
unlink($startListFile);
|
||||||
|
|
||||||
|
|
||||||
# Print failed and new units.
|
# Print failed and new units.
|
||||||
my (@failed, @new);
|
my (@failed, @new);
|
||||||
my $activeNew = getActiveUnits;
|
my $activeNew = getActiveUnits();
|
||||||
while (my ($unit, $state) = each %{$activeNew}) {
|
while (my ($unit, $state) = each(%{$activeNew})) {
|
||||||
if ($state->{state} eq "failed") {
|
if ($state->{state} eq "failed") {
|
||||||
push @failed, $unit;
|
push(@failed, $unit);
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -743,7 +820,7 @@ while (my ($unit, $state) = each %{$activeNew}) {
|
||||||
chomp($main_status);
|
chomp($main_status);
|
||||||
|
|
||||||
if ($main_status ne "0") {
|
if ($main_status ne "0") {
|
||||||
push @failed, $unit;
|
push(@failed, $unit);
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -751,19 +828,19 @@ while (my ($unit, $state) = each %{$activeNew}) {
|
||||||
# Ignore scopes since they are not managed by this script but rather
|
# Ignore scopes since they are not managed by this script but rather
|
||||||
# created and managed by third-party services via the systemd dbus API.
|
# 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)
|
# 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) {
|
if ($state->{state} ne "failed" && !defined($activePrev->{$unit}) && $unit !~ /\.scope$/msx) {
|
||||||
push @new, $unit;
|
push(@new, $unit);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (scalar @new > 0) {
|
if (scalar(@new) > 0) {
|
||||||
print STDERR "the following new units were started: ", join(", ", sort(@new)), "\n"
|
print STDERR "the following new units were started: ", join(", ", sort(@new)), "\n"
|
||||||
}
|
}
|
||||||
|
|
||||||
if (scalar @failed > 0) {
|
if (scalar(@failed) > 0) {
|
||||||
my @failed_sorted = sort @failed;
|
my @failed_sorted = sort(@failed);
|
||||||
print STDERR "warning: the following units failed: ", join(", ", @failed_sorted), "\n\n";
|
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;
|
$res = 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -773,4 +850,4 @@ if ($res == 0) {
|
||||||
syslog(LOG_ERR, "switching to system configuration $out failed (status $res)");
|
syslog(LOG_ERR, "switching to system configuration $out failed (status $res)");
|
||||||
}
|
}
|
||||||
|
|
||||||
exit $res;
|
exit($res);
|
||||||
|
|
|
@ -15,9 +15,12 @@ import re
|
||||||
import datetime
|
import datetime
|
||||||
import glob
|
import glob
|
||||||
import os.path
|
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:
|
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()
|
gen_lines.pop()
|
||||||
|
|
||||||
configurationLimit = @configurationLimit@
|
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:]
|
return configurations[-configurationLimit:]
|
||||||
|
|
||||||
|
|
||||||
|
@ -160,7 +170,7 @@ def get_specialisations(profile: Optional[str], generation: int, _: Optional[str
|
||||||
system_dir(profile, generation, None), "specialisation")
|
system_dir(profile, generation, None), "specialisation")
|
||||||
if not os.path.exists(specialisations_dir):
|
if not os.path.exists(specialisations_dir):
|
||||||
return []
|
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:
|
def remove_old_entries(gens: List[SystemIdentifier]) -> None:
|
||||||
|
@ -271,7 +281,8 @@ def main() -> None:
|
||||||
if os.readlink(system_dir(*gen)) == args.default_config:
|
if os.readlink(system_dir(*gen)) == args.default_config:
|
||||||
write_loader_conf(*gen)
|
write_loader_conf(*gen)
|
||||||
except OSError as e:
|
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):
|
for root, _, files in os.walk('@efiSysMountPoint@/efi/nixos/.extra-files', topdown=False):
|
||||||
relative_root = root.removeprefix("@efiSysMountPoint@/efi/nixos/.extra-files").removeprefix("/")
|
relative_root = root.removeprefix("@efiSysMountPoint@/efi/nixos/.extra-files").removeprefix("/")
|
||||||
|
|
|
@ -503,6 +503,7 @@ in
|
||||||
systemd-boot = handleTest ./systemd-boot.nix {};
|
systemd-boot = handleTest ./systemd-boot.nix {};
|
||||||
systemd-confinement = handleTest ./systemd-confinement.nix {};
|
systemd-confinement = handleTest ./systemd-confinement.nix {};
|
||||||
systemd-cryptenroll = handleTest ./systemd-cryptenroll.nix {};
|
systemd-cryptenroll = handleTest ./systemd-cryptenroll.nix {};
|
||||||
|
systemd-escaping = handleTest ./systemd-escaping.nix {};
|
||||||
systemd-journal = handleTest ./systemd-journal.nix {};
|
systemd-journal = handleTest ./systemd-journal.nix {};
|
||||||
systemd-machinectl = handleTest ./systemd-machinectl.nix {};
|
systemd-machinectl = handleTest ./systemd-machinectl.nix {};
|
||||||
systemd-networkd = handleTest ./systemd-networkd.nix {};
|
systemd-networkd = handleTest ./systemd-networkd.nix {};
|
||||||
|
@ -524,6 +525,7 @@ in
|
||||||
tinc = handleTest ./tinc {};
|
tinc = handleTest ./tinc {};
|
||||||
tinydns = handleTest ./tinydns.nix {};
|
tinydns = handleTest ./tinydns.nix {};
|
||||||
tinywl = handleTest ./tinywl.nix {};
|
tinywl = handleTest ./tinywl.nix {};
|
||||||
|
tomcat = handleTest ./tomcat.nix {};
|
||||||
tor = handleTest ./tor.nix {};
|
tor = handleTest ./tor.nix {};
|
||||||
# traefik test relies on docker-containers
|
# traefik test relies on docker-containers
|
||||||
traefik = handleTestOn ["x86_64-linux"] ./traefik.nix {};
|
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 = {
|
simpleServiceModified.configuration = {
|
||||||
imports = [ simpleService.configuration ];
|
imports = [ simpleService.configuration ];
|
||||||
systemd.services.test.serviceConfig.X-Test = true;
|
systemd.services.test.serviceConfig.X-Test = true;
|
||||||
|
@ -203,6 +208,39 @@ in {
|
||||||
systemd.services."escaped\\x2ddash".serviceConfig.X-Test = "test";
|
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 = {
|
restart-and-reload-by-activation-script.configuration = {
|
||||||
systemd.services = rec {
|
systemd.services = rec {
|
||||||
simple-service = {
|
simple-service = {
|
||||||
|
@ -350,6 +388,31 @@ in {
|
||||||
systemd.timers.test-timer.timerConfig.OnCalendar = lib.mkForce "Fri 2012-11-23 16:00:00";
|
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 = {
|
path.configuration = {
|
||||||
systemd.paths.test-watch = {
|
systemd.paths.test-watch = {
|
||||||
wantedBy = [ "paths.target" ];
|
wantedBy = [ "paths.target" ];
|
||||||
|
@ -472,6 +535,15 @@ in {
|
||||||
assert_lacks(out, "\nstarting the following units:")
|
assert_lacks(out, "\nstarting the following units:")
|
||||||
assert_lacks(out, "the following new units were started:")
|
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
|
# Restart the simple service
|
||||||
out = switch_to_specialisation("${machine}", "simpleServiceModified")
|
out = switch_to_specialisation("${machine}", "simpleServiceModified")
|
||||||
assert_contains(out, "stopping the following units: test.service\n")
|
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_contains(out, "\nstarting the following units: escaped\\x2ddash.service\n")
|
||||||
assert_lacks(out, "the following new units were started:")
|
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"):
|
with subtest("failing units"):
|
||||||
# Let the simple service fail
|
# Let the simple service fail
|
||||||
switch_to_specialisation("${machine}", "simpleServiceModified")
|
switch_to_specialisation("${machine}", "simpleServiceModified")
|
||||||
|
@ -821,6 +919,55 @@ in {
|
||||||
out = machine.succeed("systemctl show test-timer.timer")
|
out = machine.succeed("systemctl show test-timer.timer")
|
||||||
assert_contains(out, "OnCalendar=Fri 2012-11-23 16:00:00")
|
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"):
|
with subtest("paths"):
|
||||||
out = switch_to_specialisation("${machine}", "path")
|
out = switch_to_specialisation("${machine}", "path")
|
||||||
assert_contains(out, "stopping the following units: test-timer.timer\n")
|
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!'"
|
||||||
|
)
|
||||||
|
'';
|
||||||
|
})
|
|
@ -1,39 +1,50 @@
|
||||||
{ lib, stdenv, fetchFromGitHub
|
{ lib
|
||||||
, alsa-lib, flac, libmad, libvorbis, mpg123
|
, stdenv
|
||||||
|
, fetchFromGitHub
|
||||||
|
, alsa-lib
|
||||||
|
, flac
|
||||||
|
, libmad
|
||||||
|
, libpulseaudio
|
||||||
|
, libvorbis
|
||||||
|
, mpg123
|
||||||
|
, audioBackend ? "alsa"
|
||||||
, dsdSupport ? true
|
, dsdSupport ? true
|
||||||
, faad2Support ? true, faad2
|
, faad2Support ? true
|
||||||
, ffmpegSupport ? true, ffmpeg
|
, faad2
|
||||||
, opusSupport ? true, opusfile
|
, ffmpegSupport ? true
|
||||||
, resampleSupport ? true, soxr
|
, ffmpeg
|
||||||
, sslSupport ? true, openssl
|
, opusSupport ? true
|
||||||
|
, opusfile
|
||||||
|
, resampleSupport ? true
|
||||||
|
, soxr
|
||||||
|
, sslSupport ? true
|
||||||
|
, openssl
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
concatStringsSep = lib.concatStringsSep;
|
inherit (lib) optional optionalString;
|
||||||
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";
|
|
||||||
|
|
||||||
in stdenv.mkDerivation {
|
pulseSupport = audioBackend == "pulse";
|
||||||
pname = "squeezelite";
|
|
||||||
|
|
||||||
|
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`
|
# versions are specified in `squeezelite.h`
|
||||||
# see https://github.com/ralph-irving/squeezelite/issues/29
|
# see https://github.com/ralph-irving/squeezelite/issues/29
|
||||||
version = "1.9.6.1196";
|
version = "1.9.9.1401";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "ralph-irving";
|
owner = "ralph-irving";
|
||||||
repo = "squeezelite";
|
repo = "squeezelite";
|
||||||
rev = "2b508464dce2cbdb2a3089c58df2a6fbc36328c0";
|
rev = "894df3ea80f66a27a9ae5fab918acf62a6798b8b";
|
||||||
sha256 = "024ypr1da2r079k3hgiifzd3d3wcfprhbl5zdm40zm0c7frzmr8i";
|
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 faad2Support faad2
|
||||||
++ optional ffmpegSupport ffmpeg
|
++ optional ffmpegSupport ffmpeg
|
||||||
++ optional opusSupport opusfile
|
++ optional opusSupport opusfile
|
||||||
|
@ -47,15 +58,22 @@ in stdenv.mkDerivation {
|
||||||
--replace "<opusfile.h>" "<opus/opusfile.h>"
|
--replace "<opusfile.h>" "<opus/opusfile.h>"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
preBuild = ''
|
EXECUTABLE = binName;
|
||||||
export OPTS="${concatStringsSep " " opts}"
|
|
||||||
'';
|
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 = ''
|
installPhase = ''
|
||||||
runHook preInstall
|
runHook preInstall
|
||||||
|
|
||||||
install -Dm755 -t $out/bin squeezelite
|
install -Dm555 -t $out/bin ${binName}
|
||||||
install -Dm644 -t $out/share/doc/squeezelite *.txt *.md
|
install -Dm444 -t $out/share/doc/squeezelite *.txt *.md
|
||||||
|
|
||||||
runHook postInstall
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
|
@ -63,7 +81,7 @@ in stdenv.mkDerivation {
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Lightweight headless squeezebox client emulator";
|
description = "Lightweight headless squeezebox client emulator";
|
||||||
homepage = "https://github.com/ralph-irving/squeezelite";
|
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 ];
|
maintainers = with maintainers; [ samdoshi ];
|
||||||
platforms = platforms.linux;
|
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;
|
with lib;
|
||||||
|
|
||||||
let
|
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
|
# Sorted alphabetically
|
||||||
|
|
||||||
buildClion = { name, version, src, license, description, wmClass, ... }:
|
buildClion = { name, version, src, license, description, wmClass, ... }:
|
||||||
|
@ -19,13 +30,12 @@ let
|
||||||
product = "CLion";
|
product = "CLion";
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
homepage = "https://www.jetbrains.com/clion/";
|
homepage = "https://www.jetbrains.com/clion/";
|
||||||
inherit description license;
|
inherit description license platforms;
|
||||||
longDescription = ''
|
longDescription = ''
|
||||||
Enhancing productivity for every C and C++
|
Enhancing productivity for every C and C++
|
||||||
developer on Linux, macOS and Windows.
|
developer on Linux, macOS and Windows.
|
||||||
'';
|
'';
|
||||||
maintainers = with maintainers; [ edwtjo mic92 ];
|
maintainers = with maintainers; [ edwtjo mic92 ];
|
||||||
platforms = platforms.linux;
|
|
||||||
};
|
};
|
||||||
}).overrideAttrs (attrs: {
|
}).overrideAttrs (attrs: {
|
||||||
nativeBuildInputs = (attrs.nativeBuildInputs or []) ++ optionals (stdenv.isLinux) [
|
nativeBuildInputs = (attrs.nativeBuildInputs or []) ++ optionals (stdenv.isLinux) [
|
||||||
|
@ -58,14 +68,13 @@ let
|
||||||
product = "DataGrip";
|
product = "DataGrip";
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
homepage = "https://www.jetbrains.com/datagrip/";
|
homepage = "https://www.jetbrains.com/datagrip/";
|
||||||
inherit description license;
|
inherit description license platforms;
|
||||||
longDescription = ''
|
longDescription = ''
|
||||||
DataGrip is a new IDE from JetBrains built for database admins.
|
DataGrip is a new IDE from JetBrains built for database admins.
|
||||||
It allows you to quickly migrate and refactor relational databases,
|
It allows you to quickly migrate and refactor relational databases,
|
||||||
construct efficient, statically checked SQL queries and much more.
|
construct efficient, statically checked SQL queries and much more.
|
||||||
'';
|
'';
|
||||||
maintainers = with maintainers; [ ];
|
maintainers = with maintainers; [ ];
|
||||||
platforms = platforms.linux;
|
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -75,7 +84,7 @@ let
|
||||||
product = "Goland";
|
product = "Goland";
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
homepage = "https://www.jetbrains.com/go/";
|
homepage = "https://www.jetbrains.com/go/";
|
||||||
inherit description license;
|
inherit description license platforms;
|
||||||
longDescription = ''
|
longDescription = ''
|
||||||
Goland is the codename for a new commercial IDE by JetBrains
|
Goland is the codename for a new commercial IDE by JetBrains
|
||||||
aimed at providing an ergonomic environment for Go development.
|
aimed at providing an ergonomic environment for Go development.
|
||||||
|
@ -83,10 +92,9 @@ let
|
||||||
and tool integrations specific for the Go language
|
and tool integrations specific for the Go language
|
||||||
'';
|
'';
|
||||||
maintainers = [ maintainers.miltador ];
|
maintainers = [ maintainers.miltador ];
|
||||||
platforms = platforms.linux;
|
|
||||||
};
|
};
|
||||||
}).overrideAttrs (attrs: {
|
}).overrideAttrs (attrs: {
|
||||||
postFixup = (attrs.postFixup or "") + ''
|
postFixup = (attrs.postFixup or "") + lib.optionalString stdenv.isLinux ''
|
||||||
interp="$(cat $NIX_CC/nix-support/dynamic-linker)"
|
interp="$(cat $NIX_CC/nix-support/dynamic-linker)"
|
||||||
patchelf --set-interpreter $interp $out/goland*/plugins/go/lib/dlv/linux/dlv
|
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 {
|
(mkJetBrainsProduct {
|
||||||
inherit name version src wmClass jdk;
|
inherit name version src wmClass jdk product;
|
||||||
product = "IDEA";
|
productShort = "IDEA";
|
||||||
extraLdPath = [ zlib ];
|
extraLdPath = [ zlib ];
|
||||||
extraWrapperArgs = [
|
extraWrapperArgs = [
|
||||||
''--set M2_HOME "${maven}/maven"''
|
''--set M2_HOME "${maven}/maven"''
|
||||||
|
@ -116,18 +124,18 @@ let
|
||||||
with JUnit, TestNG, popular SCMs, Ant & Maven. Also known
|
with JUnit, TestNG, popular SCMs, Ant & Maven. Also known
|
||||||
as IntelliJ.
|
as IntelliJ.
|
||||||
'';
|
'';
|
||||||
maintainers = with maintainers; [ edwtjo gytis-ivaskevicius ];
|
maintainers = with maintainers; [ edwtjo gytis-ivaskevicius steinybot ];
|
||||||
platforms = [ "x86_64-darwin" "i686-darwin" "i686-linux" "x86_64-linux" ];
|
platforms = ideaPlatforms;
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
buildMps = { name, version, src, license, description, wmClass, ... }:
|
buildMps = { name, version, src, license, description, wmClass, product, ... }:
|
||||||
(mkJetBrainsProduct rec {
|
(mkJetBrainsProduct rec {
|
||||||
inherit name version src wmClass jdk;
|
inherit name version src wmClass jdk product;
|
||||||
product = "MPS";
|
productShort = "MPS";
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
homepage = "https://www.jetbrains.com/mps/";
|
homepage = "https://www.jetbrains.com/mps/";
|
||||||
inherit license description;
|
inherit license description platforms;
|
||||||
longDescription = ''
|
longDescription = ''
|
||||||
A metaprogramming system which uses projectional editing
|
A metaprogramming system which uses projectional editing
|
||||||
which allows users to overcome the limits of language
|
which allows users to overcome the limits of language
|
||||||
|
@ -135,7 +143,6 @@ let
|
||||||
diagrams.
|
diagrams.
|
||||||
'';
|
'';
|
||||||
maintainers = with maintainers; [ rasendubi ];
|
maintainers = with maintainers; [ rasendubi ];
|
||||||
platforms = platforms.linux;
|
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -145,24 +152,23 @@ let
|
||||||
product = "PhpStorm";
|
product = "PhpStorm";
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
homepage = "https://www.jetbrains.com/phpstorm/";
|
homepage = "https://www.jetbrains.com/phpstorm/";
|
||||||
inherit description license;
|
inherit description license platforms;
|
||||||
longDescription = ''
|
longDescription = ''
|
||||||
PhpStorm provides an editor for PHP, HTML and JavaScript
|
PhpStorm provides an editor for PHP, HTML and JavaScript
|
||||||
with on-the-fly code analysis, error prevention and
|
with on-the-fly code analysis, error prevention and
|
||||||
automated refactorings for PHP and JavaScript code.
|
automated refactorings for PHP and JavaScript code.
|
||||||
'';
|
'';
|
||||||
maintainers = with maintainers; [ schristo ma27 ];
|
maintainers = with maintainers; [ schristo ma27 ];
|
||||||
platforms = platforms.linux;
|
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
buildPycharm = { name, version, src, license, description, wmClass, ... }:
|
buildPycharm = { name, version, src, license, description, wmClass, product, ... }:
|
||||||
(mkJetBrainsProduct {
|
(mkJetBrainsProduct {
|
||||||
inherit name version src wmClass jdk;
|
inherit name version src wmClass jdk product;
|
||||||
product = "PyCharm";
|
productShort = "PyCharm";
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
homepage = "https://www.jetbrains.com/pycharm/";
|
homepage = "https://www.jetbrains.com/pycharm/";
|
||||||
inherit description license;
|
inherit description license platforms;
|
||||||
longDescription = ''
|
longDescription = ''
|
||||||
Python IDE with complete set of tools for productive
|
Python IDE with complete set of tools for productive
|
||||||
development with Python programming language. In addition, the
|
development with Python programming language. In addition, the
|
||||||
|
@ -177,11 +183,8 @@ let
|
||||||
and productive development!
|
and productive development!
|
||||||
'';
|
'';
|
||||||
maintainers = with maintainers; [ ];
|
maintainers = with maintainers; [ ];
|
||||||
platforms = platforms.linux;
|
|
||||||
};
|
};
|
||||||
}).override {
|
});
|
||||||
propagatedUserEnvPkgs = [ python3 ];
|
|
||||||
};
|
|
||||||
|
|
||||||
buildRider = { name, version, src, license, description, wmClass, ... }:
|
buildRider = { name, version, src, license, description, wmClass, ... }:
|
||||||
(mkJetBrainsProduct {
|
(mkJetBrainsProduct {
|
||||||
|
@ -189,7 +192,7 @@ let
|
||||||
product = "Rider";
|
product = "Rider";
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
homepage = "https://www.jetbrains.com/rider/";
|
homepage = "https://www.jetbrains.com/rider/";
|
||||||
inherit description license;
|
inherit description license platforms;
|
||||||
longDescription = ''
|
longDescription = ''
|
||||||
JetBrains Rider is a new .NET IDE based on the IntelliJ
|
JetBrains Rider is a new .NET IDE based on the IntelliJ
|
||||||
platform and ReSharper. Rider supports .NET Core,
|
platform and ReSharper. Rider supports .NET Core,
|
||||||
|
@ -199,7 +202,6 @@ let
|
||||||
ASP.NET Core web applications.
|
ASP.NET Core web applications.
|
||||||
'';
|
'';
|
||||||
maintainers = [ maintainers.miltador ];
|
maintainers = [ maintainers.miltador ];
|
||||||
platforms = platforms.linux;
|
|
||||||
};
|
};
|
||||||
}).overrideAttrs (attrs: {
|
}).overrideAttrs (attrs: {
|
||||||
postPatch = lib.optionalString (!stdenv.isDarwin) (attrs.postPatch + ''
|
postPatch = lib.optionalString (!stdenv.isDarwin) (attrs.postPatch + ''
|
||||||
|
@ -215,10 +217,9 @@ let
|
||||||
product = "RubyMine";
|
product = "RubyMine";
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
homepage = "https://www.jetbrains.com/ruby/";
|
homepage = "https://www.jetbrains.com/ruby/";
|
||||||
inherit description license;
|
inherit description license platforms;
|
||||||
longDescription = description;
|
longDescription = description;
|
||||||
maintainers = with maintainers; [ edwtjo ];
|
maintainers = with maintainers; [ edwtjo ];
|
||||||
platforms = platforms.linux;
|
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -228,14 +229,13 @@ let
|
||||||
product = "WebStorm";
|
product = "WebStorm";
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
homepage = "https://www.jetbrains.com/webstorm/";
|
homepage = "https://www.jetbrains.com/webstorm/";
|
||||||
inherit description license;
|
inherit description license platforms;
|
||||||
longDescription = ''
|
longDescription = ''
|
||||||
WebStorm provides an editor for HTML, JavaScript (incl. Node.js),
|
WebStorm provides an editor for HTML, JavaScript (incl. Node.js),
|
||||||
and CSS with on-the-fly code analysis, error prevention and
|
and CSS with on-the-fly code analysis, error prevention and
|
||||||
automated refactorings for JavaScript code.
|
automated refactorings for JavaScript code.
|
||||||
'';
|
'';
|
||||||
maintainers = with maintainers; [ abaldeau ];
|
maintainers = with maintainers; [ abaldeau ];
|
||||||
platforms = platforms.linux;
|
|
||||||
};
|
};
|
||||||
}).overrideAttrs (attrs: {
|
}).overrideAttrs (attrs: {
|
||||||
postPatch = (attrs.postPatch or "") + optionalString (stdenv.isLinux) ''
|
postPatch = (attrs.postPatch or "") + optionalString (stdenv.isLinux) ''
|
||||||
|
@ -244,6 +244,7 @@ let
|
||||||
rm -r jbr
|
rm -r jbr
|
||||||
'';
|
'';
|
||||||
});
|
});
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -251,12 +252,12 @@ in
|
||||||
|
|
||||||
clion = buildClion rec {
|
clion = buildClion rec {
|
||||||
name = "clion-${version}";
|
name = "clion-${version}";
|
||||||
version = "2021.3.3"; /* updated by script */
|
version = products.clion.version;
|
||||||
description = "C/C++ IDE. New. Intelligent. Cross-platform";
|
description = "C/C++ IDE. New. Intelligent. Cross-platform";
|
||||||
license = lib.licenses.unfree;
|
license = lib.licenses.unfree;
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://download.jetbrains.com/cpp/CLion-${version}.tar.gz";
|
url = products.clion.url;
|
||||||
sha256 = "03gil00srq3jljc13iyb7v1yc6l6yhdhqm9d1ld2j2pympl6p61m"; /* updated by script */
|
sha256 = products.clion.sha256;
|
||||||
};
|
};
|
||||||
wmClass = "jetbrains-clion";
|
wmClass = "jetbrains-clion";
|
||||||
update-channel = "CLion RELEASE"; # channel's id as in http://www.jetbrains.com/updates/updates.xml
|
update-channel = "CLion RELEASE"; # channel's id as in http://www.jetbrains.com/updates/updates.xml
|
||||||
|
@ -264,12 +265,12 @@ in
|
||||||
|
|
||||||
datagrip = buildDataGrip rec {
|
datagrip = buildDataGrip rec {
|
||||||
name = "datagrip-${version}";
|
name = "datagrip-${version}";
|
||||||
version = "2021.3.4"; /* updated by script */
|
version = products.datagrip.version;
|
||||||
description = "Your Swiss Army Knife for Databases and SQL";
|
description = "Your Swiss Army Knife for Databases and SQL";
|
||||||
license = lib.licenses.unfree;
|
license = lib.licenses.unfree;
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://download.jetbrains.com/datagrip/${name}.tar.gz";
|
url = products.datagrip.url;
|
||||||
sha256 = "09dkxj5vn99gkgc1yd18w7gqkw2vzci0z9q2fcih0zn7lvqp0im3"; /* updated by script */
|
sha256 = products.datagrip.sha256;
|
||||||
};
|
};
|
||||||
wmClass = "jetbrains-datagrip";
|
wmClass = "jetbrains-datagrip";
|
||||||
update-channel = "DataGrip RELEASE";
|
update-channel = "DataGrip RELEASE";
|
||||||
|
@ -277,12 +278,12 @@ in
|
||||||
|
|
||||||
goland = buildGoland rec {
|
goland = buildGoland rec {
|
||||||
name = "goland-${version}";
|
name = "goland-${version}";
|
||||||
version = "2021.3.3"; /* updated by script */
|
version = products.goland.version;
|
||||||
description = "Up and Coming Go IDE";
|
description = "Up and Coming Go IDE";
|
||||||
license = lib.licenses.unfree;
|
license = lib.licenses.unfree;
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://download.jetbrains.com/go/${name}.tar.gz";
|
url = products.goland.url;
|
||||||
sha256 = "18z4mvxhds5fgdwcfywc4pj8s9ifvsknhradgzmxsvji0fbp0awx"; /* updated by script */
|
sha256 = products.goland.sha256;
|
||||||
};
|
};
|
||||||
wmClass = "jetbrains-goland";
|
wmClass = "jetbrains-goland";
|
||||||
update-channel = "GoLand RELEASE";
|
update-channel = "GoLand RELEASE";
|
||||||
|
@ -290,12 +291,13 @@ in
|
||||||
|
|
||||||
idea-community = buildIdea rec {
|
idea-community = buildIdea rec {
|
||||||
name = "idea-community-${version}";
|
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";
|
description = "Integrated Development Environment (IDE) by Jetbrains, community edition";
|
||||||
license = lib.licenses.asl20;
|
license = lib.licenses.asl20;
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://download.jetbrains.com/idea/ideaIC-${version}.tar.gz";
|
url = products.idea-community.url;
|
||||||
sha256 = "1j889b2r950bl9wiqq1z8v8s2qicidfcdar300cy666i8rc25qlr"; /* updated by script */
|
sha256 = products.idea-community.sha256;
|
||||||
};
|
};
|
||||||
wmClass = "jetbrains-idea-ce";
|
wmClass = "jetbrains-idea-ce";
|
||||||
update-channel = "IntelliJ IDEA RELEASE";
|
update-channel = "IntelliJ IDEA RELEASE";
|
||||||
|
@ -303,12 +305,13 @@ in
|
||||||
|
|
||||||
idea-ultimate = buildIdea rec {
|
idea-ultimate = buildIdea rec {
|
||||||
name = "idea-ultimate-${version}";
|
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";
|
description = "Integrated Development Environment (IDE) by Jetbrains, requires paid license";
|
||||||
license = lib.licenses.unfree;
|
license = lib.licenses.unfree;
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://download.jetbrains.com/idea/ideaIU-${version}-no-jbr.tar.gz";
|
url = products.idea-ultimate.url;
|
||||||
sha256 = "0w36qnqgkvw6j1ks09h515237bhqfaixrimzg2r494ic98amvkps"; /* updated by script */
|
sha256 = products.idea-ultimate.sha256;
|
||||||
};
|
};
|
||||||
wmClass = "jetbrains-idea";
|
wmClass = "jetbrains-idea";
|
||||||
update-channel = "IntelliJ IDEA RELEASE";
|
update-channel = "IntelliJ IDEA RELEASE";
|
||||||
|
@ -316,13 +319,13 @@ in
|
||||||
|
|
||||||
mps = buildMps rec {
|
mps = buildMps rec {
|
||||||
name = "mps-${version}";
|
name = "mps-${version}";
|
||||||
version = "2021.3"; /* updated by script */
|
product = "MPS ${products.mps.version-major-minor}";
|
||||||
versionMajorMinor = "2021.3"; /* updated by script */
|
version = products.mps.version;
|
||||||
description = "Create your own domain-specific language";
|
description = "Create your own domain-specific language";
|
||||||
license = lib.licenses.asl20;
|
license = lib.licenses.asl20;
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://download.jetbrains.com/mps/${versionMajorMinor}/MPS-${version}.tar.gz";
|
url = products.mps.url;
|
||||||
sha256 = "0zw5xqdlhjfg0smfjl8xy7drf9spiwqbmqq8z22x4zb61lpvdbp9"; /* updated by script */
|
sha256 = products.mps.sha256;
|
||||||
};
|
};
|
||||||
wmClass = "jetbrains-mps";
|
wmClass = "jetbrains-mps";
|
||||||
update-channel = "MPS RELEASE";
|
update-channel = "MPS RELEASE";
|
||||||
|
@ -330,12 +333,12 @@ in
|
||||||
|
|
||||||
phpstorm = buildPhpStorm rec {
|
phpstorm = buildPhpStorm rec {
|
||||||
name = "phpstorm-${version}";
|
name = "phpstorm-${version}";
|
||||||
version = "2021.3.2"; /* updated by script */
|
version = products.phpstorm.version;
|
||||||
description = "Professional IDE for Web and PHP developers";
|
description = "Professional IDE for Web and PHP developers";
|
||||||
license = lib.licenses.unfree;
|
license = lib.licenses.unfree;
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://download.jetbrains.com/webide/PhpStorm-${version}.tar.gz";
|
url = products.phpstorm.url;
|
||||||
sha256 = "1qi0zq3gzcfnikky37g2dqgmzm7r1883k6asris8nph389qk86vn"; /* updated by script */
|
sha256 = products.phpstorm.sha256;
|
||||||
};
|
};
|
||||||
wmClass = "jetbrains-phpstorm";
|
wmClass = "jetbrains-phpstorm";
|
||||||
update-channel = "PhpStorm RELEASE";
|
update-channel = "PhpStorm RELEASE";
|
||||||
|
@ -343,12 +346,13 @@ in
|
||||||
|
|
||||||
pycharm-community = buildPycharm rec {
|
pycharm-community = buildPycharm rec {
|
||||||
name = "pycharm-community-${version}";
|
name = "pycharm-community-${version}";
|
||||||
version = "2021.3.2"; /* updated by script */
|
product = "PyCharm CE";
|
||||||
|
version = products.pycharm-community.version;
|
||||||
description = "PyCharm Community Edition";
|
description = "PyCharm Community Edition";
|
||||||
license = lib.licenses.asl20;
|
license = lib.licenses.asl20;
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://download.jetbrains.com/python/${name}.tar.gz";
|
url = products.pycharm-community.url;
|
||||||
sha256 = "1s36basydp7cxgbgdapjhkslx0x9vv3639xhm84ny76hf7s03bpi"; /* updated by script */
|
sha256 = products.pycharm-community.sha256;
|
||||||
};
|
};
|
||||||
wmClass = "jetbrains-pycharm-ce";
|
wmClass = "jetbrains-pycharm-ce";
|
||||||
update-channel = "PyCharm RELEASE";
|
update-channel = "PyCharm RELEASE";
|
||||||
|
@ -356,12 +360,13 @@ in
|
||||||
|
|
||||||
pycharm-professional = buildPycharm rec {
|
pycharm-professional = buildPycharm rec {
|
||||||
name = "pycharm-professional-${version}";
|
name = "pycharm-professional-${version}";
|
||||||
version = "2021.3.2"; /* updated by script */
|
product = "PyCharm";
|
||||||
|
version = products.pycharm-professional.version;
|
||||||
description = "PyCharm Professional Edition";
|
description = "PyCharm Professional Edition";
|
||||||
license = lib.licenses.unfree;
|
license = lib.licenses.unfree;
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://download.jetbrains.com/python/${name}.tar.gz";
|
url = products.pycharm-professional.url;
|
||||||
sha256 = "0rwykngqgby05mh47kls8wzi68gfka2z04k6kdmsxwn1hhx5gnbb"; /* updated by script */
|
sha256 = products.pycharm-professional.sha256;
|
||||||
};
|
};
|
||||||
wmClass = "jetbrains-pycharm";
|
wmClass = "jetbrains-pycharm";
|
||||||
update-channel = "PyCharm RELEASE";
|
update-channel = "PyCharm RELEASE";
|
||||||
|
@ -369,12 +374,12 @@ in
|
||||||
|
|
||||||
rider = buildRider rec {
|
rider = buildRider rec {
|
||||||
name = "rider-${version}";
|
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";
|
description = "A cross-platform .NET IDE based on the IntelliJ platform and ReSharper";
|
||||||
license = lib.licenses.unfree;
|
license = lib.licenses.unfree;
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://download.jetbrains.com/rider/JetBrains.Rider-${version}.tar.gz";
|
url = products.rider.url;
|
||||||
sha256 = "13q6hk5l3fqmz818z5wj014jd5iglpdcpi8zlpgaim1jg5fpvi8x"; /* updated by script */
|
sha256 = products.rider.sha256;
|
||||||
};
|
};
|
||||||
wmClass = "jetbrains-rider";
|
wmClass = "jetbrains-rider";
|
||||||
update-channel = "Rider RELEASE";
|
update-channel = "Rider RELEASE";
|
||||||
|
@ -382,12 +387,12 @@ in
|
||||||
|
|
||||||
ruby-mine = buildRubyMine rec {
|
ruby-mine = buildRubyMine rec {
|
||||||
name = "ruby-mine-${version}";
|
name = "ruby-mine-${version}";
|
||||||
version = "2021.3.2"; /* updated by script */
|
version = products.ruby-mine.version;
|
||||||
description = "The Most Intelligent Ruby and Rails IDE";
|
description = "The Most Intelligent Ruby and Rails IDE";
|
||||||
license = lib.licenses.unfree;
|
license = lib.licenses.unfree;
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://download.jetbrains.com/ruby/RubyMine-${version}.tar.gz";
|
url = products.ruby-mine.url;
|
||||||
sha256 = "18ny40zl9hgkynkc5yyy2xqngl9diifh2gqrfnz7rfq14kp10xb9"; /* updated by script */
|
sha256 = products.ruby-mine.sha256;
|
||||||
};
|
};
|
||||||
wmClass = "jetbrains-rubymine";
|
wmClass = "jetbrains-rubymine";
|
||||||
update-channel = "RubyMine RELEASE";
|
update-channel = "RubyMine RELEASE";
|
||||||
|
@ -395,12 +400,12 @@ in
|
||||||
|
|
||||||
webstorm = buildWebStorm rec {
|
webstorm = buildWebStorm rec {
|
||||||
name = "webstorm-${version}";
|
name = "webstorm-${version}";
|
||||||
version = "2021.3.2"; /* updated by script */
|
version = products.webstorm.version;
|
||||||
description = "Professional IDE for Web and JavaScript development";
|
description = "Professional IDE for Web and JavaScript development";
|
||||||
license = lib.licenses.unfree;
|
license = lib.licenses.unfree;
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://download.jetbrains.com/webstorm/WebStorm-${version}.tar.gz";
|
url = products.webstorm.url;
|
||||||
sha256 = "0q2hn48499hv7licpl84ly0bhiizya8a69dl2vjvgscj3cdkr98q"; /* updated by script */
|
sha256 = products.webstorm.sha256;
|
||||||
};
|
};
|
||||||
wmClass = "jetbrains-webstorm";
|
wmClass = "jetbrains-webstorm";
|
||||||
update-channel = "WebStorm RELEASE";
|
update-channel = "WebStorm RELEASE";
|
||||||
|
|
|
@ -3,17 +3,15 @@
|
||||||
, vmopts ? null
|
, 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;
|
with lib;
|
||||||
|
|
||||||
let loName = toLower product;
|
let loName = toLower productShort;
|
||||||
hiName = toUpper product;
|
hiName = toUpper productShort;
|
||||||
mainProgram = concatStringsSep "-" (init (splitString "-" name));
|
mainProgram = concatStringsSep "-" (init (splitString "-" name));
|
||||||
vmoptsName = loName
|
vmoptsName = loName
|
||||||
+ ( if (with stdenv.hostPlatform; (is32bit || isDarwin))
|
+ lib.optionalString stdenv.hostPlatform.is64bit "64"
|
||||||
then ""
|
|
||||||
else "64" )
|
|
||||||
+ ".vmoptions";
|
+ ".vmoptions";
|
||||||
in
|
in
|
||||||
|
|
||||||
|
@ -36,7 +34,7 @@ with stdenv; lib.makeOverridable mkDerivation (rec {
|
||||||
|
|
||||||
nativeBuildInputs = [ makeWrapper patchelf unzip ];
|
nativeBuildInputs = [ makeWrapper patchelf unzip ];
|
||||||
|
|
||||||
postPatch = lib.optionalString (!stdenv.isDarwin) ''
|
postPatch = ''
|
||||||
get_file_size() {
|
get_file_size() {
|
||||||
local fname="$1"
|
local fname="$1"
|
||||||
echo $(ls -l $fname | cut -d ' ' -f5)
|
echo $(ls -l $fname | cut -d ' ' -f5)
|
||||||
|
@ -73,7 +71,7 @@ with stdenv; lib.makeOverridable mkDerivation (rec {
|
||||||
item=${desktopItem}
|
item=${desktopItem}
|
||||||
|
|
||||||
makeWrapper "$out/$name/bin/${loName}.sh" "$out/bin/${mainProgram}" \
|
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 ([
|
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath ([
|
||||||
# Some internals want libstdc++.so.6
|
# Some internals want libstdc++.so.6
|
||||||
stdenv.cc.cc.lib libsecret e2fsprogs
|
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 {
|
mkDerivation rec {
|
||||||
pname = "sigil";
|
pname = "sigil";
|
||||||
version = "1.9.1";
|
version = "1.9.2";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
repo = "Sigil";
|
repo = "Sigil";
|
||||||
owner = "Sigil-Ebook";
|
owner = "Sigil-Ebook";
|
||||||
rev = version;
|
rev = version;
|
||||||
sha256 = "sha256-PsHliyJu61QFTFZUgDtxguu18GBVTOGMW6pPYjHhvG0=";
|
sha256 = "sha256-LfP3qUzoHuYSpkTz1queVGTWOP9v9kbgbgvvtiMK6Eo=";
|
||||||
};
|
};
|
||||||
|
|
||||||
pythonPath = with python3Packages; [ lxml ];
|
pythonPath = with python3Packages; [ lxml ];
|
||||||
|
|
|
@ -14,17 +14,17 @@ let
|
||||||
archive_fmt = if stdenv.isDarwin then "zip" else "tar.gz";
|
archive_fmt = if stdenv.isDarwin then "zip" else "tar.gz";
|
||||||
|
|
||||||
sha256 = {
|
sha256 = {
|
||||||
x86_64-linux = "09hqcym8dj4d8r5ibdzypdmjxdw4ix24zq688vnb4kfas2jbb3hi";
|
x86_64-linux = "0x8vc6gj83mn767wi285k0hxhlh5gh1lcvq63na89vglja4ipna4";
|
||||||
x86_64-darwin = "1wij82gl1wqrprrfn9cfih19wr4h3bn2xapr1l2l0mkansrzsvg5";
|
x86_64-darwin = "1x47xfq0fgd10wq6aa8gq55aqrl1ir1f6v1mm6324yny16pf20k2";
|
||||||
aarch64-linux = "09x93i190lmxb3ygzjcmb7ag3dz7ixf07yk7zqc7ljrnn5f0b6ag";
|
aarch64-linux = "1ibg2qvpnwfwwzgby2xva9xz138b13x9q8vf1xf6plazv0arla1l";
|
||||||
aarch64-darwin = "1k7glnqy0vjx55chjpwbgwipcvzb0vx0wmvqis865pvzmr0d06a0";
|
aarch64-darwin = "100834mqix7b46frlqf0jz4qs673lavxm8sizfjm7c9y0xxy4ld3";
|
||||||
armv7l-linux = "0vkivg1f61k8vkr0j9dm7fw2klh45xxnp07pill1gmrwxafm5bra";
|
armv7l-linux = "100yfkzvnjccp1g3p353jr2vicvkjc0skiwmmzgad6i8j1m9js62";
|
||||||
}.${system};
|
}.${system};
|
||||||
in
|
in
|
||||||
callPackage ./generic.nix rec {
|
callPackage ./generic.nix rec {
|
||||||
# Please backport all compatible updates to the stable release.
|
# Please backport all compatible updates to the stable release.
|
||||||
# This is important for the extension ecosystem.
|
# This is important for the extension ecosystem.
|
||||||
version = "1.65.1";
|
version = "1.65.2";
|
||||||
pname = "vscode";
|
pname = "vscode";
|
||||||
|
|
||||||
executableName = "code" + lib.optionalString isInsiders "-insiders";
|
executableName = "code" + lib.optionalString isInsiders "-insiders";
|
||||||
|
|
|
@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
|
||||||
sha256 = "sha256-csWowcRSgF5M74yv787MLSXOGXrkxnODCCgC5a3Nd7Y=";
|
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;
|
nativeBuildInputs = kernel.moduleBuildDependencies;
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
|
|
@ -2,13 +2,13 @@
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "fceux";
|
pname = "fceux";
|
||||||
version = "2.6.2";
|
version = "2.6.3";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "TASEmulators";
|
owner = "TASEmulators";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = "${pname}-${version}";
|
rev = "${pname}-${version}";
|
||||||
sha256 = "sha256-yQX58m/sMW/8Jr5cm2SrVXTiF7qyZOgOZg1v0qEyiLw=";
|
sha256 = "sha256-jNR9AB8s2S9ehYsompkV2GOLsaXIQzldeQ1WRCxdDG0=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake pkg-config wrapQtAppsHook ];
|
nativeBuildInputs = [ cmake pkg-config wrapQtAppsHook ];
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "lightburn";
|
pname = "lightburn";
|
||||||
version = "1.1.01";
|
version = "1.1.03";
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
p7zip
|
p7zip
|
||||||
|
@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://github.com/LightBurnSoftware/deployment/releases/download/${version}/LightBurn-Linux64-v${version}.7z";
|
url = "https://github.com/LightBurnSoftware/deployment/releases/download/${version}/LightBurn-Linux64-v${version}.7z";
|
||||||
sha256 = "sha256-HgyqpZTf9GTsbDi1+e20YNoFIPYtTHQd8KC626G0038=";
|
sha256 = "sha256-X7hAkzVqIABpyFokiYaMGZqSda69cKhKghFDWDEVOow=";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
|
|
|
@ -11,13 +11,13 @@
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "nsxiv";
|
pname = "nsxiv";
|
||||||
version = "28";
|
version = "29";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "nsxiv";
|
owner = "nsxiv";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
hash = "sha256-12RmEAzZdeanrRtnan96loXT7qSjIMjcWf296XmNE+A=";
|
hash = "sha256-JUF2cF6QeAXk6G76uMu3reaMgxp2RcqHDbamkNufwqE=";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
|
|
|
@ -2,16 +2,16 @@
|
||||||
|
|
||||||
buildGoModule rec {
|
buildGoModule rec {
|
||||||
pname = "charm";
|
pname = "charm";
|
||||||
version = "0.10.2";
|
version = "0.10.3";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "charmbracelet";
|
owner = "charmbracelet";
|
||||||
repo = "charm";
|
repo = "charm";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "sha256-kyfyRq/5QWMoiMooEpLv7UkehGxFlrfGEq9jA3OHiIs=";
|
sha256 = "sha256-7WdSIpmpN8Zz2k5PveYZoCueQo5sLxLLZvZdzxRlkaE=";
|
||||||
};
|
};
|
||||||
|
|
||||||
vendorSha256 = "sha256-LB5fwySDOH+kOYYdGdtLAvETmI6fFP2QT6l2eAS3Ijg=";
|
vendorSha256 = "sha256-5cqZxh2uvmJV7DtAGzQwt//heF3kF9mjyB0KAs8nWZY=";
|
||||||
|
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
|
|
||||||
|
|
|
@ -18,13 +18,13 @@
|
||||||
|
|
||||||
mkDerivation rec {
|
mkDerivation rec {
|
||||||
pname = "mediaelch";
|
pname = "mediaelch";
|
||||||
version = "2.8.14";
|
version = "2.8.16";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "Komet";
|
owner = "Komet";
|
||||||
repo = "MediaElch";
|
repo = "MediaElch";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "sha256-yHThX5Xs+8SijNKgmg+4Mawbwi3zHA/DJQoIBy0Wchs=";
|
sha256 = "sha256-83bHfIRVAC+3RkCYmV+TBjjQxaFMHfVyxt5Jq44dzeI=";
|
||||||
fetchSubmodules = true;
|
fetchSubmodules = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -15,13 +15,13 @@
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "otpclient";
|
pname = "otpclient";
|
||||||
version = "2.4.8";
|
version = "2.4.9.1";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "paolostivanin";
|
owner = "paolostivanin";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "sha256-2exqMYcxg0UxlH+ZANQv2MFii9dZ6nizB4vxGR9cAwk=";
|
sha256 = "sha256-QcdPyuwbGK12Kul+gGTfRGmXfghr0qugpBEcrgATOT4=";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ gtk3 jansson libgcrypt libzip libpng libcotp zbar ];
|
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 {
|
stdenv.mkDerivation rec {
|
||||||
pname = "systembus-notify";
|
pname = "systembus-notify";
|
||||||
version = "1.1";
|
version = "1.1";
|
||||||
|
@ -8,23 +33,32 @@ stdenv.mkDerivation rec {
|
||||||
owner = "rfjakob";
|
owner = "rfjakob";
|
||||||
repo = "systembus-notify";
|
repo = "systembus-notify";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "1pdn45rfpwhrf20hs87qmk2j8sr7ab8161f81019wnypnb1q2fsv";
|
sha256 = "sha256-WzuBw7LXW54CCMgFE9BSJ2skxaz4IA2BcBny63Ihtt0=";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ systemd ];
|
buildInputs = [ systemd ];
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
runHook preInstall
|
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
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
# requires a running dbus instance
|
||||||
|
doCheck = false;
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "System bus notification daemon";
|
description = "System bus notification daemon";
|
||||||
homepage = "https://github.com/rfjakob/systembus-notify";
|
homepage = "https://github.com/rfjakob/systembus-notify";
|
||||||
license = licenses.mit;
|
license = licenses.mit;
|
||||||
|
maintainers = with maintainers; [ peterhoeg ];
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
maintainers = with maintainers; [];
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
inherit patches;
|
inherit patches;
|
||||||
|
|
||||||
installFlags = [ "PREFIX=$(out)" ];
|
makeFlags = [ "PREFIX=$(out)" ];
|
||||||
|
|
||||||
# Add run-time dependencies to PATH. Append them to PATH so the user can
|
# Add run-time dependencies to PATH. Append them to PATH so the user can
|
||||||
# override the dependencies with their own PATH.
|
# override the dependencies with their own PATH.
|
||||||
|
|
|
@ -2,15 +2,15 @@
|
||||||
|
|
||||||
buildGoModule rec {
|
buildGoModule rec {
|
||||||
pname = "cloudfoundry-cli";
|
pname = "cloudfoundry-cli";
|
||||||
version = "8.0.0";
|
version = "8.3.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "cloudfoundry";
|
owner = "cloudfoundry";
|
||||||
repo = "cli";
|
repo = "cli";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "00cwnfylra0msbb423ad21if98s6smzccsyidqsl4r2mrlkhahwm";
|
sha256 = "sha256-tC9U0yvuMEwO4mzWyUC+v+/H0EzgwTu02waTQrx19Bs=";
|
||||||
};
|
};
|
||||||
vendorSha256 = "0fcgyyd11xfhn8i11bqnaw3h51bj1y8s37b4d8wzv31dr8zswqsc";
|
vendorSha256 = "sha256-aXq92SI4cgJrmo67SEfg8YKPEpO2UW2fcYnKq9TmAQg=";
|
||||||
|
|
||||||
subPackages = [ "." ];
|
subPackages = [ "." ];
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
# Update all providers which have specified provider source address
|
# Update all providers which have specified provider source address
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
providers=$(
|
readarray -t providers < <(
|
||||||
jq -r 'to_entries
|
jq -r 'to_entries
|
||||||
| map_values(.value + { alias: .key })
|
| map_values(.value + { alias: .key })
|
||||||
| .[]
|
| .[]
|
||||||
|
@ -13,10 +13,13 @@ providers=$(
|
||||||
| .alias' providers.json
|
| .alias' providers.json
|
||||||
)
|
)
|
||||||
|
|
||||||
echo "Will update providers:"
|
cat <<EOF
|
||||||
echo "${providers}"
|
Will update ${#providers[@]} providers:
|
||||||
|
|
||||||
for provider in ${providers}; do
|
${providers[*]}
|
||||||
echo "Updating ${provider}"
|
|
||||||
|
EOF
|
||||||
|
|
||||||
|
for provider in "${providers[@]}"; do
|
||||||
./update-provider "$@" "${provider}"
|
./update-provider "$@" "${provider}"
|
||||||
done
|
done
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env nix-shell
|
#!/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
|
# shellcheck shell=bash
|
||||||
# vim: ft=sh
|
# vim: ft=sh
|
||||||
#
|
#
|
||||||
|
@ -75,45 +75,46 @@ if [[ -z ${provider} ]]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
provider_name=$(basename "${provider}")
|
|
||||||
|
|
||||||
# Usage: read_attr <key>
|
# Usage: read_attr <key>
|
||||||
read_attr() {
|
read_attr() {
|
||||||
jq -r ".\"${provider_name}\".\"$1\"" providers.json
|
jq -r ".\"${provider}\".\"$1\"" providers.json
|
||||||
}
|
}
|
||||||
|
|
||||||
# Usage: update_attr <key> <value>
|
# Usage: update_attr <key> <value>
|
||||||
update_attr() {
|
update_attr() {
|
||||||
if [[ $2 == "null" ]]; then
|
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
|
else
|
||||||
jq -S ".\"${provider_name}\".\"$1\" = \"$2\"" providers.json | sponge providers.json
|
jq -S ".\"${provider}\".\"$1\" = \"$2\"" providers.json | sponge providers.json
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
prefetch_github() {
|
repo_root=$(git rev-parse --show-toplevel)
|
||||||
# of a given owner, repo and rev, fetch the tarball and return the output of
|
|
||||||
# `nix-prefetch-url`
|
generate_hash() {
|
||||||
local owner=$1
|
nix-prefetch -I nixpkgs="${repo_root}" \
|
||||||
local repo=$2
|
"{ sha256 }: (import ${repo_root} {}).terraform-providers.${provider}.$1.overrideAttrs (_: { $2 = sha256; })"
|
||||||
local rev=$3
|
|
||||||
nix-prefetch-url --unpack "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
old_source_address="$(read_attr provider-source-address)"
|
echo_provider() {
|
||||||
old_vendor_sha256=$(read_attr vendorSha256)
|
echo "== terraform-providers.${provider}: $* =="
|
||||||
old_version=$(read_attr version)
|
}
|
||||||
|
|
||||||
if [[ ${provider} =~ ^[^/]+/[^/]+$ ]]; then
|
if [[ ${provider} =~ ^[^/]+/[^/]+$ ]]; then
|
||||||
|
echo_provider "init"
|
||||||
source_address=registry.terraform.io/${provider}
|
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
|
else
|
||||||
source_address=${old_source_address}
|
source_address="$(read_attr provider-source-address)"
|
||||||
fi
|
fi
|
||||||
if [[ ${source_address} == "null" ]]; then
|
|
||||||
echo "Could not find the source address for provider: ${provider}"
|
old_vendor_sha256=$(read_attr vendorSha256)
|
||||||
exit 1
|
old_version=$(read_attr version)
|
||||||
fi
|
|
||||||
update_attr "provider-source-address" "${source_address}"
|
|
||||||
|
|
||||||
# The provider source address (used inside Terraform `required_providers` block) is
|
# The provider source address (used inside Terraform `required_providers` block) is
|
||||||
# used to compute the registry API endpoint
|
# 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}")"
|
version="$(jq -r '.version' <<<"${registry_response}")"
|
||||||
if [[ ${old_version} == "${version}" && ${force} != 1 && -z ${vendorSha256} && ${old_vendor_sha256} != "${vendorSha256}" ]]; then
|
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
|
exit
|
||||||
|
else
|
||||||
|
echo_provider "updating from ${old_version} to ${version}"
|
||||||
fi
|
fi
|
||||||
update_attr version "${version}"
|
update_attr version "${version}"
|
||||||
|
|
||||||
|
@ -138,28 +141,23 @@ repo="$(echo "${provider_source_url}" | cut -d '/' -f 5)"
|
||||||
update_attr repo "${repo}"
|
update_attr repo "${repo}"
|
||||||
rev="$(jq -r '.tag' <<<"${registry_response}")"
|
rev="$(jq -r '.tag' <<<"${registry_response}")"
|
||||||
update_attr rev "${rev}"
|
update_attr rev "${rev}"
|
||||||
sha256=$(prefetch_github "${org}" "${repo}" "${rev}")
|
echo_provider "calculating sha256"
|
||||||
|
sha256=$(generate_hash src outputHash)
|
||||||
update_attr sha256 "${sha256}"
|
update_attr sha256 "${sha256}"
|
||||||
|
|
||||||
if [[ -z ${vendorSha256} ]]; then
|
if [[ -z ${vendorSha256} ]]; then
|
||||||
if [[ ${old_vendor_sha256} == null ]]; then
|
if [[ ${old_vendor_sha256} == null ]]; then
|
||||||
vendorSha256=null
|
vendorSha256=null
|
||||||
elif [[ -n ${old_vendor_sha256} ]]; then
|
else
|
||||||
echo "=== Calculating vendorSha256 ==="
|
echo_provider "calculating vendorSha256"
|
||||||
vendorSha256=$(nix-prefetch -I nixpkgs=../../../../.. "{ sha256 }: (import ../../../../.. {}).terraform-providers.${provider_name}.go-modules.overrideAttrs (_: { vendorSha256 = sha256; })")
|
vendorSha256=$(generate_hash go-modules vendorSha256)
|
||||||
# Deal with nix unstable
|
|
||||||
if [[ ${vendorSha256} == sha256-* ]]; then
|
|
||||||
vendorSha256=$(nix --extra-experimental-features nix-command hash to-base32 "${vendorSha256}")
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -n ${vendorSha256} ]]; then
|
update_attr vendorSha256 "${vendorSha256}"
|
||||||
update_attr vendorSha256 "${vendorSha256}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Check that the provider builds
|
# Check that the provider builds
|
||||||
if [[ ${build} == 1 ]]; then
|
if [[ ${build} == 1 ]]; then
|
||||||
echo "=== Building terraform-providers.${provider_name} ==="
|
echo_provider "building"
|
||||||
nix-build --no-out-link ../../../../.. -A "terraform-providers.${provider_name}"
|
nix-build --no-out-link "${repo_root}" -A "terraform-providers.${provider}"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -2,13 +2,13 @@
|
||||||
|
|
||||||
buildGoModule rec {
|
buildGoModule rec {
|
||||||
pname = "vcluster";
|
pname = "vcluster";
|
||||||
version = "0.5.3";
|
version = "0.6.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "loft-sh";
|
owner = "loft-sh";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "sha256-+rLDRVfB6wZ1wYoLE2wwRxzS6GmI6KYtOKdXZd+LnnU=";
|
sha256 = "sha256-kY12bsZyDb36KE2dWx6RVYlKTbJh+XFQcBpFXoCLgEM=";
|
||||||
};
|
};
|
||||||
|
|
||||||
vendorSha256 = null;
|
vendorSha256 = null;
|
||||||
|
|
|
@ -4,11 +4,11 @@ let
|
||||||
configOverrides = writeText "cinny-config-overrides.json" (builtins.toJSON conf);
|
configOverrides = writeText "cinny-config-overrides.json" (builtins.toJSON conf);
|
||||||
in stdenv.mkDerivation rec {
|
in stdenv.mkDerivation rec {
|
||||||
pname = "cinny";
|
pname = "cinny";
|
||||||
version = "1.7.0";
|
version = "1.8.0";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://github.com/ajbura/cinny/releases/download/v${version}/cinny-v${version}.tar.gz";
|
url = "https://github.com/ajbura/cinny/releases/download/v${version}/cinny-v${version}.tar.gz";
|
||||||
sha256 = "0133dbzxy0n0i6bn2p3lx33kpabnf9kzs9mv4xws30hbns25q99k";
|
sha256 = "0pbapzl3pfx87ns4vp7088kkhl34c0ihbq90r3d0iz6sa16mcs79";
|
||||||
};
|
};
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
|
|
|
@ -28,13 +28,13 @@
|
||||||
|
|
||||||
mkDerivation rec {
|
mkDerivation rec {
|
||||||
pname = "qtox";
|
pname = "qtox";
|
||||||
version = "1.17.5";
|
version = "1.17.6";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "qTox";
|
owner = "qTox";
|
||||||
repo = "qTox";
|
repo = "qTox";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "sha256-H3qFEw/TkzOxEXtZs0k89wWMnhrOkF7VapUKtCUhGns=";
|
sha256 = "sha256-naKWoodSMw0AEtACvkASFmw9t0H0d2pcqOW79NNTYF0=";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
|
|
|
@ -24,7 +24,7 @@ let
|
||||||
|
|
||||||
in stdenv.mkDerivation rec {
|
in stdenv.mkDerivation rec {
|
||||||
pname = "signal-desktop";
|
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.
|
# All releases have a limited lifetime and "expire" 90 days after the release.
|
||||||
# When releases "expire" the application becomes unusable until an update is
|
# When releases "expire" the application becomes unusable until an update is
|
||||||
# applied. The expiration date for the current release can be extracted with:
|
# applied. The expiration date for the current release can be extracted with:
|
||||||
|
@ -34,7 +34,7 @@ in stdenv.mkDerivation rec {
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://updates.signal.org/desktop/apt/pool/main/s/signal-desktop/signal-desktop_${version}_amd64.deb";
|
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 = [
|
nativeBuildInputs = [
|
||||||
|
|
|
@ -2,16 +2,16 @@
|
||||||
|
|
||||||
buildGoModule rec {
|
buildGoModule rec {
|
||||||
pname = "juju";
|
pname = "juju";
|
||||||
version = "2.9.11";
|
version = "2.9.25";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "juju";
|
owner = "juju";
|
||||||
repo = "juju";
|
repo = "juju";
|
||||||
rev = "juju-${version}";
|
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
|
# Disable tests because it attempts to use a mongodb instance
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
|
|
|
@ -2,13 +2,13 @@
|
||||||
|
|
||||||
buildGoModule rec {
|
buildGoModule rec {
|
||||||
pname = "nextdns";
|
pname = "nextdns";
|
||||||
version = "1.37.7";
|
version = "1.37.10";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "nextdns";
|
owner = "nextdns";
|
||||||
repo = "nextdns";
|
repo = "nextdns";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "sha256-L5PeT4Y2oWM1WUJaBK9xgrpfkpvKM1+sA29A3AiDE38=";
|
sha256 = "sha256-iwxgDBIuTClikvXF+3mCjFKKV0upN+K+aL85ewYkMXo=";
|
||||||
};
|
};
|
||||||
|
|
||||||
vendorSha256 = "sha256-6hWD05lXteqL7egj9tiRVHlevKM33i+a+zBUZs7PF7I=";
|
vendorSha256 = "sha256-6hWD05lXteqL7egj9tiRVHlevKM33i+a+zBUZs7PF7I=";
|
||||||
|
|
|
@ -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";
|
||||||
|
};
|
||||||
|
}
|
|
@ -4,13 +4,13 @@
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "git-repo";
|
pname = "git-repo";
|
||||||
version = "2.21";
|
version = "2.22";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "android";
|
owner = "android";
|
||||||
repo = "tools_repo";
|
repo = "tools_repo";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "sha256-nl/NFbyL0MWgvpwaqkCOkKuSquFTQRKZ7Ski5qYRL9w=";
|
sha256 = "sha256-oVwvoZdjD6V3CHECZOYBSYVtCX1XwW5fynyCn7Oj+Bc=";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Fix 'NameError: name 'ssl' is not defined'
|
# Fix 'NameError: name 'ssl' is not defined'
|
||||||
|
|
|
@ -2,16 +2,16 @@
|
||||||
|
|
||||||
buildGoModule rec {
|
buildGoModule rec {
|
||||||
pname = "go-chromecast";
|
pname = "go-chromecast";
|
||||||
version = "0.2.11";
|
version = "0.2.12";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "vishen";
|
owner = "vishen";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "sha256-BCOyeXo3uoR4ry/nFbF+//U62/hHnPK+tbG+8Rv6Rv0=";
|
sha256 = "sha256-h8qWwMaEhXnj6ZSrKAXBVbrMR0je41EoOtFeN9XlCuk=";
|
||||||
};
|
};
|
||||||
|
|
||||||
vendorSha256 = "sha256-idxElk4Sy7SE9G1OMRw8YH4o8orBa80qhBXPA+ar620=";
|
vendorSha256 = "sha256-PpMLHuJR6irp+QHhzguwGtBy30HM7DR0tNGiwB07M5E=";
|
||||||
|
|
||||||
ldflags = [ "-s" "-w" "-X main.version=${version}" "-X main.commit=${src.rev}" "-X main.date=unknown" ];
|
ldflags = [ "-s" "-w" "-X main.version=${version}" "-X main.commit=${src.rev}" "-X main.date=unknown" ];
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
buildGoPackage rec {
|
buildGoPackage rec {
|
||||||
pname = "docker-slim";
|
pname = "docker-slim";
|
||||||
version = "1.37.3";
|
version = "1.37.4";
|
||||||
|
|
||||||
goPackagePath = "github.com/docker-slim/docker-slim";
|
goPackagePath = "github.com/docker-slim/docker-slim";
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ buildGoPackage rec {
|
||||||
owner = "docker-slim";
|
owner = "docker-slim";
|
||||||
repo = "docker-slim";
|
repo = "docker-slim";
|
||||||
rev = version;
|
rev = version;
|
||||||
sha256 = "sha256-jzwQ3nrhLDiQXcVkPiXrRAmpLQOD8ILBnoCEUiEbxzw=";
|
sha256 = "sha256-iz1V+wcrJf0grOe81kwbXPBqnvXpHnh7IMDdugaUOH0=";
|
||||||
};
|
};
|
||||||
|
|
||||||
subPackages = [ "cmd/docker-slim" "cmd/docker-slim-sensor" ];
|
subPackages = [ "cmd/docker-slim" "cmd/docker-slim-sensor" ];
|
||||||
|
|
|
@ -23,7 +23,7 @@ stdenv.mkDerivation {
|
||||||
sourceRoot = ".";
|
sourceRoot = ".";
|
||||||
src = dlbin {
|
src = dlbin {
|
||||||
x86_64-linux = "sha256-yeWVsrvH3yYlS2uH/TkSleHjXvIDnHWcZSvLgV+CGF0=";
|
x86_64-linux = "sha256-yeWVsrvH3yYlS2uH/TkSleHjXvIDnHWcZSvLgV+CGF0=";
|
||||||
aarch64-linux = "sha256-75UC+HeVUfUk1HRvTJsOHbHHkgr6me1OtxDF7lahf68=";
|
aarch64-linux = "sha256-9ggRmijwXE9adVFv5XommgvdpeeWnWUFES+Ep2GrBVo=";
|
||||||
};
|
};
|
||||||
|
|
||||||
dontConfigure = true;
|
dontConfigure = true;
|
||||||
|
|
49
pkgs/applications/virtualization/flintlock/default.nix
Normal file
49
pkgs/applications/virtualization/flintlock/default.nix
Normal file
|
@ -0,0 +1,49 @@
|
||||||
|
{ lib
|
||||||
|
, cni-plugins
|
||||||
|
, buildGoModule
|
||||||
|
, firecracker
|
||||||
|
, containerd
|
||||||
|
, runc
|
||||||
|
, makeWrapper
|
||||||
|
, fetchFromGitHub
|
||||||
|
}:
|
||||||
|
|
||||||
|
buildGoModule rec{
|
||||||
|
pname = "flintlock";
|
||||||
|
version = "0.1.0-alpha.9";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "weaveworks";
|
||||||
|
repo = "flintlock";
|
||||||
|
rev = "v${version}";
|
||||||
|
sha256 = "sha256-Xw3g2wh0fPUknSuAKoJL3jxVZS50wSPZ9Wz05zkTVXM=";
|
||||||
|
};
|
||||||
|
|
||||||
|
vendorSha256 = "sha256-EjVlM6AD+O/z6+R5TRBmmRWbrP4C+qyvsnEjwOkDkUE=";
|
||||||
|
|
||||||
|
subPackages = [ "cmd/flintlock-metrics" "cmd/flintlockd" ];
|
||||||
|
|
||||||
|
ldflags = [ "-s" "-w" "-X github.com/weaveworks/flintlock/internal/version.Version=v${version}" ];
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
makeWrapper
|
||||||
|
];
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
|
firecracker
|
||||||
|
];
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
for prog in flintlockd flintlock-metrics; do
|
||||||
|
wrapProgram "$out/bin/$prog" --prefix PATH : ${lib.makeBinPath [ cni-plugins firecracker containerd runc ]}
|
||||||
|
done
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "Create and manage the lifecycle of MicroVMs backed by containerd";
|
||||||
|
homepage = "https://github.com/weaveworks/flintlock";
|
||||||
|
license = licenses.mpl20;
|
||||||
|
platforms = [ "x86_64-linux" "aarch64-linux" ];
|
||||||
|
maintainers = with maintainers; [ techknowlogick ];
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,5 +1,5 @@
|
||||||
{ stdenv, lib, fetchFromGitHub, makeWrapper, autoreconfHook
|
{ stdenv, lib, fetchFromGitHub, fetchpatch, makeWrapper, autoreconfHook
|
||||||
, bash, fuse, libmspack, openssl, pam, xercesc, icu, libdnet, procps, libtirpc, rpcsvc-proto
|
, bash, fuse3, libmspack, openssl, pam, xercesc, icu, libdnet, procps, libtirpc, rpcsvc-proto
|
||||||
, libX11, libXext, libXinerama, libXi, libXrender, libXrandr, libXtst
|
, libX11, libXext, libXinerama, libXi, libXrender, libXrandr, libXtst
|
||||||
, pkg-config, glib, gdk-pixbuf-xlib, gtk3, gtkmm3, iproute2, dbus, systemd, which
|
, pkg-config, glib, gdk-pixbuf-xlib, gtk3, gtkmm3, iproute2, dbus, systemd, which
|
||||||
, libdrm, udev
|
, libdrm, udev
|
||||||
|
@ -8,13 +8,13 @@
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "open-vm-tools";
|
pname = "open-vm-tools";
|
||||||
version = "11.3.5";
|
version = "12.0.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "vmware";
|
owner = "vmware";
|
||||||
repo = "open-vm-tools";
|
repo = "open-vm-tools";
|
||||||
rev = "stable-${version}";
|
rev = "stable-${version}";
|
||||||
sha256 = "03fahljrijq4ij8a4v8d7806mpf22ppkgr61n5s974g3xfdvpl13";
|
sha256 = "sha256-agWTGf8x6bxZ7S5bU2scHt8IdLLe/hZdaEMfHIK9d8U=";
|
||||||
};
|
};
|
||||||
|
|
||||||
sourceRoot = "${src.name}/open-vm-tools";
|
sourceRoot = "${src.name}/open-vm-tools";
|
||||||
|
@ -22,10 +22,24 @@ stdenv.mkDerivation rec {
|
||||||
outputs = [ "out" "dev" ];
|
outputs = [ "out" "dev" ];
|
||||||
|
|
||||||
nativeBuildInputs = [ autoreconfHook makeWrapper pkg-config ];
|
nativeBuildInputs = [ autoreconfHook makeWrapper pkg-config ];
|
||||||
buildInputs = [ fuse glib icu libdnet libdrm libmspack libtirpc openssl pam procps rpcsvc-proto udev xercesc ]
|
buildInputs = [ fuse3 glib icu libdnet libdrm libmspack libtirpc openssl pam procps rpcsvc-proto udev xercesc ]
|
||||||
++ lib.optionals withX [ gdk-pixbuf-xlib gtk3 gtkmm3 libX11 libXext libXinerama libXi libXrender libXrandr libXtst ];
|
++ lib.optionals withX [ gdk-pixbuf-xlib gtk3 gtkmm3 libX11 libXext libXinerama libXi libXrender libXrandr libXtst ];
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
# glibc 2.35 and GCC 11 & 12 reporting possible array bounds overflow
|
||||||
|
# Will be fixed in the release after 12.0.0
|
||||||
|
(fetchpatch {
|
||||||
|
url = "https://github.com/vmware/open-vm-tools/commit/de6d129476724668b8903e2a87654f50ba21b1b2.patch";
|
||||||
|
sha256 = "1cqhm868g40kcp8qzzwq10zd4bah9ypaw1qawnli5d240mlkpfhh";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
|
prePatch = ''
|
||||||
|
cd ..
|
||||||
|
'';
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
|
cd open-vm-tools
|
||||||
sed -i 's,etc/vmware-tools,''${prefix}/etc/vmware-tools,' Makefile.am
|
sed -i 's,etc/vmware-tools,''${prefix}/etc/vmware-tools,' Makefile.am
|
||||||
sed -i 's,^confdir = ,confdir = ''${prefix},' scripts/Makefile.am
|
sed -i 's,^confdir = ,confdir = ''${prefix},' scripts/Makefile.am
|
||||||
sed -i 's,usr/bin,''${prefix}/usr/bin,' scripts/Makefile.am
|
sed -i 's,usr/bin,''${prefix}/usr/bin,' scripts/Makefile.am
|
||||||
|
@ -43,6 +57,7 @@ stdenv.mkDerivation rec {
|
||||||
"--without-kernel-modules"
|
"--without-kernel-modules"
|
||||||
"--without-xmlsecurity"
|
"--without-xmlsecurity"
|
||||||
"--with-udev-rules-dir=${placeholder "out"}/lib/udev/rules.d"
|
"--with-udev-rules-dir=${placeholder "out"}/lib/udev/rules.d"
|
||||||
|
"--with-fuse=fuse3"
|
||||||
] ++ lib.optional (!withX) "--without-x";
|
] ++ lib.optional (!withX) "--without-x";
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
{ lib, stdenv, fetchFromGitHub, makeWrapper, nx-libs, xorg, getopt, gnugrep, gawk, ps, mount, iproute2 }:
|
{ lib, stdenv, fetchFromGitHub, makeWrapper, nx-libs, xorg, getopt, gnugrep, gawk, ps, mount, iproute2 }:
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "x11docker";
|
pname = "x11docker";
|
||||||
version = "7.1.1";
|
version = "7.1.3";
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "mviereck";
|
owner = "mviereck";
|
||||||
repo = "x11docker";
|
repo = "x11docker";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "sha256-SUHWqcDL/oDljCpngkhUvzOvMIlZSc1p0j0wjupPBqw=";
|
sha256 = "sha256-eSarw5RG2ckup9pNlZtAyZAN8IPZy94RRfej9ppiLfo=";
|
||||||
};
|
};
|
||||||
nativeBuildInputs = [ makeWrapper ];
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
|
|
||||||
|
|
|
@ -55,6 +55,7 @@ stdenv.mkDerivation rec {
|
||||||
];
|
];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
homepage = "https://berrywm.org/";
|
||||||
description = "A healthy, bite-sized window manager";
|
description = "A healthy, bite-sized window manager";
|
||||||
longDescription = ''
|
longDescription = ''
|
||||||
berry is a healthy, bite-sized window manager written in C for unix
|
berry is a healthy, bite-sized window manager written in C for unix
|
||||||
|
@ -69,7 +70,6 @@ stdenv.mkDerivation rec {
|
||||||
- Intuitively place new windows in unoccupied spaces.
|
- Intuitively place new windows in unoccupied spaces.
|
||||||
- Virtual desktops.
|
- Virtual desktops.
|
||||||
'';
|
'';
|
||||||
homepage = "https://berrywm.org/";
|
|
||||||
license = licenses.mit;
|
license = licenses.mit;
|
||||||
maintainers = [ maintainers.AndersonTorres ];
|
maintainers = [ maintainers.AndersonTorres ];
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
|
|
|
@ -40,13 +40,13 @@
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "icewm";
|
pname = "icewm";
|
||||||
version = "2.9.4";
|
version = "2.9.6";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "ice-wm";
|
owner = "ice-wm";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = version;
|
rev = version;
|
||||||
hash = "sha256-ne2lqo9CAhGgC8dd9R03zhFXy9nPBQR0NcfAY0DeVj4=";
|
hash = "sha256-qC8gEVJ/cmsEbF8jMzv7zyvVcjlbXhgHU3ixe7RLcnA=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
|
@ -55,6 +55,7 @@ stdenv.mkDerivation rec {
|
||||||
perl
|
perl
|
||||||
pkg-config
|
pkg-config
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
expat
|
expat
|
||||||
fontconfig
|
fontconfig
|
||||||
|
@ -108,11 +109,11 @@ stdenv.mkDerivation rec {
|
||||||
system. Application windows can be managed by keyboard and mouse. Windows
|
system. Application windows can be managed by keyboard and mouse. Windows
|
||||||
can be iconified to the taskbar, to the tray, to the desktop or be made
|
can be iconified to the taskbar, to the tray, to the desktop or be made
|
||||||
hidden. They are controllable by a quick switch window (Alt+Tab) and in a
|
hidden. They are controllable by a quick switch window (Alt+Tab) and in a
|
||||||
window list. A handful of configurable focus models are
|
window list. A handful of configurable focus models are menu-selectable.
|
||||||
menu-selectable. Setups with multiple monitors are supported by RandR and
|
Setups with multiple monitors are supported by RandR and Xinerama. IceWM
|
||||||
Xinerama. IceWM is very configurable, themeable and well documented. It
|
is very configurable, themeable and well documented. It includes an
|
||||||
includes an optional external background wallpaper manager with
|
optional external background wallpaper manager with transparency support,
|
||||||
transparency support, a simple session manager and a system tray.
|
a simple session manager and a system tray.
|
||||||
'';
|
'';
|
||||||
license = licenses.lgpl2Only;
|
license = licenses.lgpl2Only;
|
||||||
maintainers = [ maintainers.AndersonTorres ];
|
maintainers = [ maintainers.AndersonTorres ];
|
||||||
|
|
|
@ -21,20 +21,15 @@
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "labwc";
|
pname = "labwc";
|
||||||
version = "0.4.0";
|
version = "0.5.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "labwc";
|
owner = "labwc";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = version;
|
rev = version;
|
||||||
hash = "sha256-O9jVDR7UROt5u8inUsZjbzB3dQTosiLYqXkeOyGrbaM=";
|
hash = "sha256-G0EQuXSHftl4JLXKIro+tmhbApwAhlzcjPEL7DP6LHk=";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [
|
|
||||||
# Required to fix the build with wlroots 0.15.1:
|
|
||||||
./relax-the-version-constraint-for-wlroots.patch
|
|
||||||
];
|
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
meson
|
meson
|
||||||
ninja
|
ninja
|
||||||
|
@ -64,6 +59,6 @@ stdenv.mkDerivation rec {
|
||||||
description = "A Wayland stacking compositor, similar to Openbox";
|
description = "A Wayland stacking compositor, similar to Openbox";
|
||||||
license = licenses.gpl2Plus;
|
license = licenses.gpl2Plus;
|
||||||
maintainers = with maintainers; [ AndersonTorres ];
|
maintainers = with maintainers; [ AndersonTorres ];
|
||||||
platforms = platforms.unix;
|
inherit (wayland.meta) platforms;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,29 +0,0 @@
|
||||||
From 21d8bfcf7899f5ec50b29f523ace4c19cbfbe919 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Michael Weiss <dev.primeos@gmail.com>
|
|
||||||
Date: Fri, 4 Feb 2022 21:17:05 +0100
|
|
||||||
Subject: [PATCH] build: Relax the version constraint for wlroots to accept
|
|
||||||
patch releases
|
|
||||||
|
|
||||||
Patch releases only contain backwards compatible changes (mainly bug
|
|
||||||
fixes) so we want to allow them. This fixes the build with the recently
|
|
||||||
released wlroots 0.15.1 and uses the same version constraints as other
|
|
||||||
projects that depend on wlroots (e.g., Sway).
|
|
||||||
---
|
|
||||||
meson.build | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/meson.build b/meson.build
|
|
||||||
index f950b8e..1905dda 100644
|
|
||||||
--- a/meson.build
|
|
||||||
+++ b/meson.build
|
|
||||||
@@ -37,7 +37,7 @@ if git.found()
|
|
||||||
endif
|
|
||||||
add_project_arguments('-DLABWC_VERSION=@0@'.format(version), language: 'c')
|
|
||||||
|
|
||||||
-wlroots_version = ['=0.15.0']
|
|
||||||
+wlroots_version = ['>=0.15.0', '<0.16.0']
|
|
||||||
wlroots_proj = subproject(
|
|
||||||
'wlroots',
|
|
||||||
default_options: ['default_library=static', 'examples=false'],
|
|
||||||
--
|
|
||||||
2.34.1
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
|
|
||||||
# Content-addressable Nix mirrors.
|
# Content-addressable Nix mirrors
|
||||||
hashedMirrors = [
|
hashedMirrors = [
|
||||||
"https://tarballs.nixos.org"
|
"https://tarballs.nixos.org"
|
||||||
];
|
];
|
||||||
|
@ -8,52 +8,48 @@
|
||||||
# Mirrors for mirror://site/filename URIs, where "site" is
|
# Mirrors for mirror://site/filename URIs, where "site" is
|
||||||
# "sourceforge", "gnu", etc.
|
# "sourceforge", "gnu", etc.
|
||||||
|
|
||||||
luarocks = [
|
# Alsa Project
|
||||||
"https://luarocks.org/"
|
alsa = [
|
||||||
"https://raw.githubusercontent.com/rocks-moonscript-org/moonrocks-mirror/master/"
|
"https://www.alsa-project.org/files/pub/"
|
||||||
"https://luafr.org/moonrocks/"
|
"ftp://ftp.alsa-project.org/pub/"
|
||||||
"http://luarocks.logiceditor.com/rocks/"
|
"http://alsa.cybermirror.org/"
|
||||||
|
"http://www.mirrorservice.org/sites/ftp.alsa-project.org/pub/"
|
||||||
];
|
];
|
||||||
|
|
||||||
# SourceForge.
|
# Apache
|
||||||
sourceforge = [
|
apache = [
|
||||||
"https://downloads.sourceforge.net/"
|
"https://www-eu.apache.org/dist/"
|
||||||
"https://prdownloads.sourceforge.net/"
|
"https://ftp.wayne.edu/apache/"
|
||||||
"https://netcologne.dl.sourceforge.net/sourceforge/"
|
"https://www.apache.org/dist/"
|
||||||
"https://versaweb.dl.sourceforge.net/sourceforge/"
|
"https://archive.apache.org/dist/" # fallback for old releases
|
||||||
"https://freefr.dl.sourceforge.net/sourceforge/"
|
"https://apache.cs.uu.nl/"
|
||||||
"https://osdn.dl.sourceforge.net/sourceforge/"
|
"https://apache.cs.utah.edu/"
|
||||||
"https://kent.dl.sourceforge.net/sourceforge/"
|
"http://ftp.tudelft.nl/apache/"
|
||||||
|
"ftp://ftp.funet.fi/pub/mirrors/apache.org/"
|
||||||
];
|
];
|
||||||
|
|
||||||
# OSDN (formerly SourceForge.jp).
|
# Bioconductor mirrors (from https://bioconductor.org/about/mirrors/)
|
||||||
osdn = [
|
# The commented-out ones don't seem to allow direct package downloads;
|
||||||
"https://osdn.dl.osdn.jp/"
|
# they serve error messages that result in hash mismatches instead
|
||||||
"https://osdn.mirror.constant.com/"
|
bioc = [
|
||||||
"https://mirrors.gigenet.com/OSDN/"
|
# http://bioc.ism.ac.jp/
|
||||||
"https://osdn.dl.sourceforge.jp/"
|
# http://bioc.openanalytics.eu/
|
||||||
"https://jaist.dl.sourceforge.jp/"
|
# http://bioconductor.fmrp.usp.br/
|
||||||
|
# http://mirror.aarnet.edu.au/pub/bioconductor/
|
||||||
|
# http://watson.nci.nih.gov/bioc_mirror/
|
||||||
|
"https://bioconductor.statistik.tu-dortmund.de/packages/"
|
||||||
|
"https://mirrors.ustc.edu.cn/bioc/"
|
||||||
|
"http://bioconductor.jp/packages/"
|
||||||
];
|
];
|
||||||
|
|
||||||
# GNU (https://www.gnu.org/prep/ftp.html).
|
# BitlBee mirrors, see https://www.bitlbee.org/main.php/mirrors.html
|
||||||
gnu = [
|
bitlbee = [
|
||||||
# This one redirects to a (supposedly) nearby and (supposedly) up-to-date
|
"https://get.bitlbee.org/"
|
||||||
# mirror.
|
"https://ftp.snt.utwente.nl/pub/software/bitlbee/"
|
||||||
"https://ftpmirror.gnu.org/"
|
"http://bitlbee.intergenia.de/"
|
||||||
|
|
||||||
"https://ftp.nluug.nl/pub/gnu/"
|
|
||||||
"https://mirrors.kernel.org/gnu/"
|
|
||||||
"https://mirror.ibcp.fr/pub/gnu/"
|
|
||||||
"https://mirror.dogado.de/gnu/"
|
|
||||||
"https://mirror.tochlab.net/pub/gnu/"
|
|
||||||
|
|
||||||
# This one is the master repository, and thus it's always up-to-date.
|
|
||||||
"https://ftp.gnu.org/pub/gnu/"
|
|
||||||
|
|
||||||
"ftp://ftp.funet.fi/pub/mirrors/ftp.gnu.org/gnu/"
|
|
||||||
];
|
];
|
||||||
|
|
||||||
# GCC.
|
# GCC
|
||||||
gcc = [
|
gcc = [
|
||||||
"https://bigsearcher.com/mirrors/gcc/"
|
"https://bigsearcher.com/mirrors/gcc/"
|
||||||
"https://mirror.koddos.net/gcc/"
|
"https://mirror.koddos.net/gcc/"
|
||||||
|
@ -63,7 +59,37 @@
|
||||||
"ftp://gcc.gnu.org/pub/gcc/"
|
"ftp://gcc.gnu.org/pub/gcc/"
|
||||||
];
|
];
|
||||||
|
|
||||||
# GnuPG.
|
# GNOME
|
||||||
|
gnome = [
|
||||||
|
# This one redirects to some mirror closeby, so it should be all you need
|
||||||
|
"https://download.gnome.org/"
|
||||||
|
|
||||||
|
"https://fr2.rpmfind.net/linux/gnome.org/"
|
||||||
|
"https://ftp.acc.umu.se/pub/GNOME/"
|
||||||
|
"https://ftp.belnet.be/mirror/ftp.gnome.org/"
|
||||||
|
"ftp://ftp.cse.buffalo.edu/pub/Gnome/"
|
||||||
|
"ftp://ftp.nara.wide.ad.jp/pub/X11/GNOME/"
|
||||||
|
];
|
||||||
|
|
||||||
|
# GNU (https://www.gnu.org/prep/ftp.html)
|
||||||
|
gnu = [
|
||||||
|
# This one redirects to a (supposedly) nearby and (supposedly) up-to-date
|
||||||
|
# mirror
|
||||||
|
"https://ftpmirror.gnu.org/"
|
||||||
|
|
||||||
|
"https://ftp.nluug.nl/pub/gnu/"
|
||||||
|
"https://mirrors.kernel.org/gnu/"
|
||||||
|
"https://mirror.ibcp.fr/pub/gnu/"
|
||||||
|
"https://mirror.dogado.de/gnu/"
|
||||||
|
"https://mirror.tochlab.net/pub/gnu/"
|
||||||
|
|
||||||
|
# This one is the master repository, and thus it's always up-to-date
|
||||||
|
"https://ftp.gnu.org/pub/gnu/"
|
||||||
|
|
||||||
|
"ftp://ftp.funet.fi/pub/mirrors/ftp.gnu.org/gnu/"
|
||||||
|
];
|
||||||
|
|
||||||
|
# GnuPG
|
||||||
gnupg = [
|
gnupg = [
|
||||||
"https://gnupg.org/ftp/gcrypt/"
|
"https://gnupg.org/ftp/gcrypt/"
|
||||||
"https://mirrors.dotsrc.org/gcrypt/"
|
"https://mirrors.dotsrc.org/gcrypt/"
|
||||||
|
@ -72,11 +98,13 @@
|
||||||
"http://www.ring.gr.jp/pub/net/"
|
"http://www.ring.gr.jp/pub/net/"
|
||||||
];
|
];
|
||||||
|
|
||||||
# kernel.org's /pub (/pub/{linux,software}) tree.
|
# ImageMagick mirrors, see https://www.imagemagick.org/script/mirror.php
|
||||||
kernel = [
|
imagemagick = [
|
||||||
"https://cdn.kernel.org/pub/"
|
"https://www.imagemagick.org/download/"
|
||||||
"http://linux-kernel.uio.no/pub/"
|
"https://mirror.checkdomain.de/imagemagick/"
|
||||||
"ftp://ftp.funet.fi/pub/mirrors/ftp.kernel.org/pub/"
|
"https://ftp.nluug.nl/ImageMagick/"
|
||||||
|
"https://ftp.sunet.se/mirror/imagemagick.org/ftp/"
|
||||||
|
"ftp://ftp.sunet.se/mirror/imagemagick.org/ftp/" # also contains older versions removed from most mirrors
|
||||||
];
|
];
|
||||||
|
|
||||||
# Mirrors from https://download.kde.org/ls-lR.mirrorlist
|
# Mirrors from https://download.kde.org/ls-lR.mirrorlist
|
||||||
|
@ -89,195 +117,47 @@
|
||||||
"https://ftp.funet.fi/pub/mirrors/ftp.kde.org/pub/kde/"
|
"https://ftp.funet.fi/pub/mirrors/ftp.kde.org/pub/kde/"
|
||||||
];
|
];
|
||||||
|
|
||||||
# Gentoo files.
|
# kernel.org's /pub (/pub/{linux,software}) tree
|
||||||
gentoo = [
|
kernel = [
|
||||||
"https://ftp.snt.utwente.nl/pub/os/linux/gentoo/"
|
"https://cdn.kernel.org/pub/"
|
||||||
"https://distfiles.gentoo.org/"
|
"http://linux-kernel.uio.no/pub/"
|
||||||
"https://mirrors.kernel.org/gentoo/"
|
"ftp://ftp.funet.fi/pub/mirrors/ftp.kernel.org/pub/"
|
||||||
];
|
|
||||||
|
|
||||||
savannah = [
|
|
||||||
# Mirrors from https://download-mirror.savannah.gnu.org/releases/00_MIRRORS.html
|
|
||||||
"https://mirror.easyname.at/nongnu/"
|
|
||||||
"https://savannah.c3sl.ufpr.br/"
|
|
||||||
"https://mirror.csclub.uwaterloo.ca/nongnu/"
|
|
||||||
"https://mirror.cedia.org.ec/nongnu/"
|
|
||||||
"https://ftp.igh.cnrs.fr/pub/nongnu/"
|
|
||||||
"https://mirror6.layerjet.com/nongnu"
|
|
||||||
"https://mirror.netcologne.de/savannah/"
|
|
||||||
"https://ftp.cc.uoc.gr/mirrors/nongnu.org/"
|
|
||||||
"https://nongnu.uib.no/"
|
|
||||||
"https://ftp.acc.umu.se/mirror/gnu.org/savannah/"
|
|
||||||
"http://mirror2.klaus-uwe.me/nongnu/"
|
|
||||||
"http://mirrors.fe.up.pt/pub/nongnu/"
|
|
||||||
"http://ftp.twaren.net/Unix/NonGNU/"
|
|
||||||
"http://savannah-nongnu-org.ip-connect.vn.ua/"
|
|
||||||
"http://www.mirrorservice.org/sites/download.savannah.gnu.org/releases/"
|
|
||||||
"http://gnu.mirrors.pair.com/savannah/savannah/"
|
|
||||||
"ftp://mirror.easyname.at/nongnu/"
|
|
||||||
"ftp://mirror2.klaus-uwe.me/nongnu/"
|
|
||||||
"ftp://mirror.csclub.uwaterloo.ca/nongnu/"
|
|
||||||
"ftp://ftp.igh.cnrs.fr/pub/nongnu/"
|
|
||||||
"ftp://mirror.netcologne.de/savannah/"
|
|
||||||
"ftp://nongnu.uib.no/pub/nongnu/"
|
|
||||||
"ftp://mirrors.fe.up.pt/pub/nongnu/"
|
|
||||||
"ftp://ftp.twaren.net/Unix/NonGNU/"
|
|
||||||
"ftp://savannah-nongnu-org.ip-connect.vn.ua/mirror/savannah.nongnu.org/"
|
|
||||||
"ftp://ftp.mirrorservice.org/sites/download.savannah.gnu.org/releases/"
|
|
||||||
];
|
|
||||||
|
|
||||||
samba = [
|
|
||||||
"https://www.samba.org/ftp/"
|
|
||||||
"http://www.samba.org/ftp/"
|
|
||||||
];
|
|
||||||
|
|
||||||
# BitlBee mirrors, see https://www.bitlbee.org/main.php/mirrors.html .
|
|
||||||
bitlbee = [
|
|
||||||
"https://get.bitlbee.org/"
|
|
||||||
"https://ftp.snt.utwente.nl/pub/software/bitlbee/"
|
|
||||||
"http://bitlbee.intergenia.de/"
|
|
||||||
];
|
|
||||||
|
|
||||||
# ImageMagick mirrors, see https://www.imagemagick.org/script/mirror.php
|
|
||||||
imagemagick = [
|
|
||||||
"https://www.imagemagick.org/download/"
|
|
||||||
"https://mirror.checkdomain.de/imagemagick/"
|
|
||||||
"https://ftp.nluug.nl/ImageMagick/"
|
|
||||||
"https://ftp.sunet.se/mirror/imagemagick.org/ftp/"
|
|
||||||
"ftp://ftp.sunet.se/mirror/imagemagick.org/ftp/" # also contains older versions removed from most mirrors
|
|
||||||
];
|
|
||||||
|
|
||||||
# CPAN mirrors.
|
|
||||||
cpan = [
|
|
||||||
"https://cpan.metacpan.org/"
|
|
||||||
"https://cpan.perl.org/"
|
|
||||||
"https://mirrors.kernel.org/CPAN/"
|
|
||||||
"https://backpan.perl.org/" # for old releases
|
|
||||||
];
|
|
||||||
|
|
||||||
# CentOS.
|
|
||||||
centos = [
|
|
||||||
# For old releases
|
|
||||||
"https://vault.centos.org/"
|
|
||||||
"https://archive.kernel.org/centos-vault/"
|
|
||||||
"https://ftp.jaist.ac.jp/pub/Linux/CentOS-vault/"
|
|
||||||
"https://mirrors.aliyun.com/centos-vault/"
|
|
||||||
"https://mirror.chpc.utah.edu/pub/vault.centos.org/"
|
|
||||||
"https://mirror.math.princeton.edu/pub/centos-vault/"
|
|
||||||
"https://mirrors.tripadvisor.com/centos-vault/"
|
|
||||||
"http://mirror.centos.org/centos/"
|
|
||||||
];
|
|
||||||
|
|
||||||
# Debian.
|
|
||||||
debian = [
|
|
||||||
"https://httpredir.debian.org/debian/"
|
|
||||||
"https://ftp.debian.org/debian/"
|
|
||||||
"https://mirrors.edge.kernel.org/debian/"
|
|
||||||
"ftp://ftp.de.debian.org/debian/"
|
|
||||||
"ftp://ftp.fr.debian.org/debian/"
|
|
||||||
"ftp://ftp.nl.debian.org/debian/"
|
|
||||||
"ftp://ftp.ru.debian.org/debian/"
|
|
||||||
"http://archive.debian.org/debian-archive/debian/"
|
|
||||||
"ftp://ftp.funet.fi/pub/mirrors/ftp.debian.org/debian/"
|
|
||||||
];
|
|
||||||
|
|
||||||
# Ubuntu.
|
|
||||||
ubuntu = [
|
|
||||||
"https://nl.archive.ubuntu.com/ubuntu/"
|
|
||||||
"https://old-releases.ubuntu.com/ubuntu/"
|
|
||||||
"https://mirrors.edge.kernel.org/ubuntu/"
|
|
||||||
"http://de.archive.ubuntu.com/ubuntu/"
|
|
||||||
"http://archive.ubuntu.com/ubuntu/"
|
|
||||||
];
|
|
||||||
|
|
||||||
# Fedora (please only add full mirrors that carry old Fedora distributions as well).
|
|
||||||
# See: https://mirrors.fedoraproject.org/publiclist (but not all carry old content).
|
|
||||||
fedora = [
|
|
||||||
"https://archives.fedoraproject.org/pub/fedora/"
|
|
||||||
"https://fedora.osuosl.org/"
|
|
||||||
"https://ftp.funet.fi/pub/mirrors/ftp.redhat.com/pub/fedora/"
|
|
||||||
"https://ftp.linux.cz/pub/linux/fedora/"
|
|
||||||
"https://archives.fedoraproject.org/pub/archive/fedora/"
|
|
||||||
"http://ftp.nluug.nl/pub/os/Linux/distr/fedora/"
|
|
||||||
"http://mirror.csclub.uwaterloo.ca/fedora/"
|
|
||||||
"http://mirror.1000mbps.com/fedora/"
|
|
||||||
];
|
|
||||||
|
|
||||||
# openSUSE.
|
|
||||||
opensuse = [
|
|
||||||
"https://opensuse.hro.nl/opensuse/distribution/"
|
|
||||||
"https://ftp.funet.fi/pub/linux/mirrors/opensuse/distribution/"
|
|
||||||
"https://ftp.opensuse.org/pub/opensuse/distribution/"
|
|
||||||
"https://ftp5.gwdg.de/pub/opensuse/discontinued/distribution/"
|
|
||||||
"https://mirrors.edge.kernel.org/opensuse/distribution/"
|
|
||||||
"http://ftp.hosteurope.de/mirror/ftp.opensuse.org/discontinued/"
|
|
||||||
];
|
|
||||||
|
|
||||||
gnome = [
|
|
||||||
# This one redirects to some mirror closeby, so it should be all you need.
|
|
||||||
"https://download.gnome.org/"
|
|
||||||
|
|
||||||
"https://fr2.rpmfind.net/linux/gnome.org/"
|
|
||||||
"https://ftp.acc.umu.se/pub/GNOME/"
|
|
||||||
"https://ftp.belnet.be/mirror/ftp.gnome.org/"
|
|
||||||
"ftp://ftp.cse.buffalo.edu/pub/Gnome/"
|
|
||||||
"ftp://ftp.nara.wide.ad.jp/pub/X11/GNOME/"
|
|
||||||
];
|
|
||||||
|
|
||||||
xfce = [
|
|
||||||
"https://archive.xfce.org/"
|
|
||||||
"https://mirror.netcologne.de/xfce/"
|
|
||||||
"https://archive.be.xfce.org/xfce/"
|
|
||||||
"https://archive.al-us.xfce.org/"
|
|
||||||
"http://archive.se.xfce.org/xfce/"
|
|
||||||
"http://mirror.perldude.de/archive.xfce.org/"
|
|
||||||
"http://archive.be2.xfce.org/"
|
|
||||||
"http://ftp.udc.es/xfce/"
|
|
||||||
];
|
|
||||||
|
|
||||||
# X.org.
|
|
||||||
xorg = [
|
|
||||||
"https://xorg.freedesktop.org/releases/"
|
|
||||||
"https://ftp.x.org/archive/"
|
|
||||||
];
|
|
||||||
|
|
||||||
apache = [
|
|
||||||
"https://www-eu.apache.org/dist/"
|
|
||||||
"https://ftp.wayne.edu/apache/"
|
|
||||||
"https://www.apache.org/dist/"
|
|
||||||
"https://archive.apache.org/dist/" # fallback for old releases
|
|
||||||
"https://apache.cs.uu.nl/"
|
|
||||||
"https://apache.cs.utah.edu/"
|
|
||||||
"http://ftp.tudelft.nl/apache/"
|
|
||||||
"ftp://ftp.funet.fi/pub/mirrors/apache.org/"
|
|
||||||
];
|
|
||||||
|
|
||||||
postgresql = [
|
|
||||||
"https://ftp.postgresql.org/pub/"
|
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# Metalab, now IBiblio
|
||||||
metalab = [
|
metalab = [
|
||||||
"ftp://ftp.gwdg.de/pub/linux/metalab/"
|
"ftp://ftp.gwdg.de/pub/linux/metalab/"
|
||||||
"ftp://ftp.metalab.unc.edu/pub/linux/"
|
"ftp://ftp.metalab.unc.edu/pub/linux/"
|
||||||
];
|
];
|
||||||
|
|
||||||
# Bioconductor mirrors (from https://bioconductor.org/about/mirrors/)
|
# MySQL
|
||||||
# The commented-out ones don't seem to allow direct package downloads;
|
mysql = [
|
||||||
# they serve error messages that result in hash mismatches instead.
|
"https://cdn.mysql.com/Downloads/"
|
||||||
bioc = [
|
|
||||||
# http://bioc.ism.ac.jp/
|
|
||||||
# http://bioc.openanalytics.eu/
|
|
||||||
# http://bioconductor.fmrp.usp.br/
|
|
||||||
# http://mirror.aarnet.edu.au/pub/bioconductor/
|
|
||||||
# http://watson.nci.nih.gov/bioc_mirror/
|
|
||||||
"https://bioconductor.statistik.tu-dortmund.de/packages/"
|
|
||||||
"https://mirrors.ustc.edu.cn/bioc/"
|
|
||||||
"http://bioconductor.jp/packages/"
|
|
||||||
];
|
];
|
||||||
|
|
||||||
# Hackage mirrors
|
# Maven Central
|
||||||
hackage = [
|
maven = [
|
||||||
"https://hackage.haskell.org/package/"
|
"https://repo1.maven.org/maven2/"
|
||||||
|
];
|
||||||
|
|
||||||
|
# Mozilla projects
|
||||||
|
mozilla = [
|
||||||
|
"https://download.cdn.mozilla.net/pub/mozilla.org/"
|
||||||
|
"https://archive.mozilla.org/pub/"
|
||||||
|
];
|
||||||
|
|
||||||
|
# OSDN (formerly SourceForge.jp)
|
||||||
|
osdn = [
|
||||||
|
"https://osdn.dl.osdn.jp/"
|
||||||
|
"https://osdn.mirror.constant.com/"
|
||||||
|
"https://mirrors.gigenet.com/OSDN/"
|
||||||
|
"https://osdn.dl.sourceforge.jp/"
|
||||||
|
"https://jaist.dl.sourceforge.jp/"
|
||||||
|
];
|
||||||
|
|
||||||
|
# PostgreSQL
|
||||||
|
postgresql = [
|
||||||
|
"https://ftp.postgresql.org/pub/"
|
||||||
];
|
];
|
||||||
|
|
||||||
# Roy marples mirrors
|
# Roy marples mirrors
|
||||||
|
@ -329,25 +209,114 @@
|
||||||
"http://ftp.ntua.gr/pub/sagemath/spkg/upstream/"
|
"http://ftp.ntua.gr/pub/sagemath/spkg/upstream/"
|
||||||
];
|
];
|
||||||
|
|
||||||
# MySQL mirrors
|
# SAMBA
|
||||||
mysql = [
|
samba = [
|
||||||
"https://cdn.mysql.com/Downloads/"
|
"https://www.samba.org/ftp/"
|
||||||
|
"http://www.samba.org/ftp/"
|
||||||
];
|
];
|
||||||
|
|
||||||
# OpenBSD mirrors
|
# GNU Savannah
|
||||||
openbsd = [
|
savannah = [
|
||||||
"https://ftp.openbsd.org/pub/OpenBSD/"
|
# Mirrors from https://download-mirror.savannah.gnu.org/releases/00_MIRRORS.html
|
||||||
"ftp://ftp.nluug.nl/pub/OpenBSD/"
|
"https://mirror.easyname.at/nongnu/"
|
||||||
"ftp://ftp-stud.fht-esslingen.de/pub/OpenBSD/"
|
"https://savannah.c3sl.ufpr.br/"
|
||||||
|
"https://mirror.csclub.uwaterloo.ca/nongnu/"
|
||||||
|
"https://mirror.cedia.org.ec/nongnu/"
|
||||||
|
"https://ftp.igh.cnrs.fr/pub/nongnu/"
|
||||||
|
"https://mirror6.layerjet.com/nongnu"
|
||||||
|
"https://mirror.netcologne.de/savannah/"
|
||||||
|
"https://ftp.cc.uoc.gr/mirrors/nongnu.org/"
|
||||||
|
"https://nongnu.uib.no/"
|
||||||
|
"https://ftp.acc.umu.se/mirror/gnu.org/savannah/"
|
||||||
|
"http://mirror2.klaus-uwe.me/nongnu/"
|
||||||
|
"http://mirrors.fe.up.pt/pub/nongnu/"
|
||||||
|
"http://ftp.twaren.net/Unix/NonGNU/"
|
||||||
|
"http://savannah-nongnu-org.ip-connect.vn.ua/"
|
||||||
|
"http://www.mirrorservice.org/sites/download.savannah.gnu.org/releases/"
|
||||||
|
"http://gnu.mirrors.pair.com/savannah/savannah/"
|
||||||
|
"ftp://mirror.easyname.at/nongnu/"
|
||||||
|
"ftp://mirror2.klaus-uwe.me/nongnu/"
|
||||||
|
"ftp://mirror.csclub.uwaterloo.ca/nongnu/"
|
||||||
|
"ftp://ftp.igh.cnrs.fr/pub/nongnu/"
|
||||||
|
"ftp://mirror.netcologne.de/savannah/"
|
||||||
|
"ftp://nongnu.uib.no/pub/nongnu/"
|
||||||
|
"ftp://mirrors.fe.up.pt/pub/nongnu/"
|
||||||
|
"ftp://ftp.twaren.net/Unix/NonGNU/"
|
||||||
|
"ftp://savannah-nongnu-org.ip-connect.vn.ua/mirror/savannah.nongnu.org/"
|
||||||
|
"ftp://ftp.mirrorservice.org/sites/download.savannah.gnu.org/releases/"
|
||||||
];
|
];
|
||||||
|
|
||||||
# Steam Runtime mirrors
|
# SourceForge
|
||||||
|
sourceforge = [
|
||||||
|
"https://downloads.sourceforge.net/"
|
||||||
|
"https://prdownloads.sourceforge.net/"
|
||||||
|
"https://netcologne.dl.sourceforge.net/sourceforge/"
|
||||||
|
"https://versaweb.dl.sourceforge.net/sourceforge/"
|
||||||
|
"https://freefr.dl.sourceforge.net/sourceforge/"
|
||||||
|
"https://osdn.dl.sourceforge.net/sourceforge/"
|
||||||
|
"https://kent.dl.sourceforge.net/sourceforge/"
|
||||||
|
];
|
||||||
|
|
||||||
|
# Steam Runtime
|
||||||
steamrt = [
|
steamrt = [
|
||||||
"https://repo.steampowered.com/steamrt/"
|
"https://repo.steampowered.com/steamrt/"
|
||||||
"https://public.abbradar.moe/steamrt/"
|
"https://public.abbradar.moe/steamrt/"
|
||||||
];
|
];
|
||||||
|
|
||||||
# Python PyPI mirrors
|
# TCSH shell
|
||||||
|
tcsh = [
|
||||||
|
"https://astron.com/pub/tcsh/"
|
||||||
|
"https://astron.com/pub/tcsh/old/"
|
||||||
|
"http://ftp.funet.fi/pub/mirrors/ftp.astron.com/pub/tcsh/"
|
||||||
|
"http://ftp.funet.fi/pub/mirrors/ftp.astron.com/pub/tcsh/old/"
|
||||||
|
"ftp://ftp.astron.com/pub/tcsh/"
|
||||||
|
"ftp://ftp.astron.com/pub/tcsh/old/"
|
||||||
|
"ftp://ftp.funet.fi/pub/unix/shells/tcsh/"
|
||||||
|
"ftp://ftp.funet.fi/pub/unix/shells/tcsh/old/"
|
||||||
|
];
|
||||||
|
|
||||||
|
# XFCE
|
||||||
|
xfce = [
|
||||||
|
"https://archive.xfce.org/"
|
||||||
|
"https://mirror.netcologne.de/xfce/"
|
||||||
|
"https://archive.be.xfce.org/xfce/"
|
||||||
|
"https://archive.al-us.xfce.org/"
|
||||||
|
"http://archive.se.xfce.org/xfce/"
|
||||||
|
"http://mirror.perldude.de/archive.xfce.org/"
|
||||||
|
"http://archive.be2.xfce.org/"
|
||||||
|
"http://ftp.udc.es/xfce/"
|
||||||
|
];
|
||||||
|
|
||||||
|
# X.org
|
||||||
|
xorg = [
|
||||||
|
"https://xorg.freedesktop.org/releases/"
|
||||||
|
"https://ftp.x.org/archive/"
|
||||||
|
];
|
||||||
|
|
||||||
|
### Programming languages' package repos
|
||||||
|
|
||||||
|
# Perl CPAN
|
||||||
|
cpan = [
|
||||||
|
"https://cpan.metacpan.org/"
|
||||||
|
"https://cpan.perl.org/"
|
||||||
|
"https://mirrors.kernel.org/CPAN/"
|
||||||
|
"https://backpan.perl.org/" # for old releases
|
||||||
|
];
|
||||||
|
|
||||||
|
# Haskell Hackage
|
||||||
|
hackage = [
|
||||||
|
"https://hackage.haskell.org/package/"
|
||||||
|
];
|
||||||
|
|
||||||
|
# Lua Rocks
|
||||||
|
luarocks = [
|
||||||
|
"https://luarocks.org/"
|
||||||
|
"https://raw.githubusercontent.com/rocks-moonscript-org/moonrocks-mirror/master/"
|
||||||
|
"https://luafr.org/moonrocks/"
|
||||||
|
"http://luarocks.logiceditor.com/rocks/"
|
||||||
|
];
|
||||||
|
|
||||||
|
# Python PyPI
|
||||||
pypi = [
|
pypi = [
|
||||||
"https://files.pythonhosted.org/packages/source/"
|
"https://files.pythonhosted.org/packages/source/"
|
||||||
# pypi.io is a more semantic link, but atm it’s referencing
|
# pypi.io is a more semantic link, but atm it’s referencing
|
||||||
|
@ -355,27 +324,85 @@
|
||||||
"https://pypi.io/packages/source/"
|
"https://pypi.io/packages/source/"
|
||||||
];
|
];
|
||||||
|
|
||||||
# Python Test-PyPI mirror
|
# Python Test-PyPI
|
||||||
testpypi = [
|
testpypi = [
|
||||||
"https://test.pypi.io/packages/source/"
|
"https://test.pypi.io/packages/source/"
|
||||||
];
|
];
|
||||||
|
|
||||||
# Mozilla projects.
|
### Linux distros
|
||||||
mozilla = [
|
|
||||||
"https://download.cdn.mozilla.net/pub/mozilla.org/"
|
# CentOS
|
||||||
"https://archive.mozilla.org/pub/"
|
centos = [
|
||||||
|
# For old releases
|
||||||
|
"https://vault.centos.org/"
|
||||||
|
"https://archive.kernel.org/centos-vault/"
|
||||||
|
"https://ftp.jaist.ac.jp/pub/Linux/CentOS-vault/"
|
||||||
|
"https://mirrors.aliyun.com/centos-vault/"
|
||||||
|
"https://mirror.chpc.utah.edu/pub/vault.centos.org/"
|
||||||
|
"https://mirror.math.princeton.edu/pub/centos-vault/"
|
||||||
|
"https://mirrors.tripadvisor.com/centos-vault/"
|
||||||
|
"http://mirror.centos.org/centos/"
|
||||||
];
|
];
|
||||||
|
|
||||||
# Maven Central
|
# Debian
|
||||||
maven = [
|
debian = [
|
||||||
"https://repo1.maven.org/maven2/"
|
"https://httpredir.debian.org/debian/"
|
||||||
|
"https://ftp.debian.org/debian/"
|
||||||
|
"https://mirrors.edge.kernel.org/debian/"
|
||||||
|
"ftp://ftp.de.debian.org/debian/"
|
||||||
|
"ftp://ftp.fr.debian.org/debian/"
|
||||||
|
"ftp://ftp.nl.debian.org/debian/"
|
||||||
|
"ftp://ftp.ru.debian.org/debian/"
|
||||||
|
"http://archive.debian.org/debian-archive/debian/"
|
||||||
|
"ftp://ftp.funet.fi/pub/mirrors/ftp.debian.org/debian/"
|
||||||
];
|
];
|
||||||
|
|
||||||
# Alsa Project
|
# Fedora
|
||||||
alsa = [
|
# Please add only full mirrors that carry old Fedora distributions as well
|
||||||
"https://www.alsa-project.org/files/pub/"
|
# See: https://mirrors.fedoraproject.org/publiclist (but not all carry old content)
|
||||||
"ftp://ftp.alsa-project.org/pub/"
|
fedora = [
|
||||||
"http://alsa.cybermirror.org/"
|
"https://archives.fedoraproject.org/pub/fedora/"
|
||||||
"http://www.mirrorservice.org/sites/ftp.alsa-project.org/pub/"
|
"https://fedora.osuosl.org/"
|
||||||
|
"https://ftp.funet.fi/pub/mirrors/ftp.redhat.com/pub/fedora/"
|
||||||
|
"https://ftp.linux.cz/pub/linux/fedora/"
|
||||||
|
"https://archives.fedoraproject.org/pub/archive/fedora/"
|
||||||
|
"http://ftp.nluug.nl/pub/os/Linux/distr/fedora/"
|
||||||
|
"http://mirror.csclub.uwaterloo.ca/fedora/"
|
||||||
|
"http://mirror.1000mbps.com/fedora/"
|
||||||
|
];
|
||||||
|
|
||||||
|
# Gentoo
|
||||||
|
gentoo = [
|
||||||
|
"https://ftp.snt.utwente.nl/pub/os/linux/gentoo/"
|
||||||
|
"https://distfiles.gentoo.org/"
|
||||||
|
"https://mirrors.kernel.org/gentoo/"
|
||||||
|
];
|
||||||
|
|
||||||
|
# openSUSE
|
||||||
|
opensuse = [
|
||||||
|
"https://opensuse.hro.nl/opensuse/distribution/"
|
||||||
|
"https://ftp.funet.fi/pub/linux/mirrors/opensuse/distribution/"
|
||||||
|
"https://ftp.opensuse.org/pub/opensuse/distribution/"
|
||||||
|
"https://ftp5.gwdg.de/pub/opensuse/discontinued/distribution/"
|
||||||
|
"https://mirrors.edge.kernel.org/opensuse/distribution/"
|
||||||
|
"http://ftp.hosteurope.de/mirror/ftp.opensuse.org/discontinued/"
|
||||||
|
];
|
||||||
|
|
||||||
|
# Ubuntu
|
||||||
|
ubuntu = [
|
||||||
|
"https://nl.archive.ubuntu.com/ubuntu/"
|
||||||
|
"https://old-releases.ubuntu.com/ubuntu/"
|
||||||
|
"https://mirrors.edge.kernel.org/ubuntu/"
|
||||||
|
"http://de.archive.ubuntu.com/ubuntu/"
|
||||||
|
"http://archive.ubuntu.com/ubuntu/"
|
||||||
|
];
|
||||||
|
|
||||||
|
# ... and other OSes in general
|
||||||
|
|
||||||
|
# OpenBSD
|
||||||
|
openbsd = [
|
||||||
|
"https://ftp.openbsd.org/pub/OpenBSD/"
|
||||||
|
"ftp://ftp.nluug.nl/pub/OpenBSD/"
|
||||||
|
"ftp://ftp-stud.fht-esslingen.de/pub/OpenBSD/"
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
{ pname, version, nativeBuildInputs ? [], enableParallelBuilding ? true, ... }@args:
|
{ pname, version, nativeBuildInputs ? [], enableParallelBuilding ? true, ... }@args:
|
||||||
|
|
||||||
let Dune = if args.useDune2 or false then dune_2 else dune_1; in
|
let Dune = if args.useDune2 or true then dune_2 else dune_1; in
|
||||||
|
|
||||||
if (args ? minimumOCamlVersion && ! lib.versionAtLeast ocaml.version args.minimumOCamlVersion) ||
|
if (args ? minimumOCamlVersion && ! lib.versionAtLeast ocaml.version args.minimumOCamlVersion) ||
|
||||||
(args ? minimalOCamlVersion && ! lib.versionAtLeast ocaml.version args.minimalOCamlVersion)
|
(args ? minimalOCamlVersion && ! lib.versionAtLeast ocaml.version args.minimalOCamlVersion)
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
{ lib, fetchzip }:
|
{ lib, fetchzip }:
|
||||||
|
|
||||||
let
|
let
|
||||||
version = "0.62";
|
version = "0.63.1";
|
||||||
in fetchzip {
|
in fetchzip {
|
||||||
name = "sudo-font-${version}";
|
name = "sudo-font-${version}";
|
||||||
url = "https://github.com/jenskutilek/sudo-font/releases/download/v${version}/sudo.zip";
|
url = "https://github.com/jenskutilek/sudo-font/releases/download/v${version}/sudo.zip";
|
||||||
sha256 = "sha256-I0E2zYbfEFBEIBNC7nnJb+hOaBgGZkAIg08YpA8awso=";
|
sha256 = "sha256-z/1Y2eJMrQ+43UIt4HWcLwjYs+hfCY/g4iRxJ+yBAqw=";
|
||||||
|
|
||||||
postFetch = ''
|
postFetch = ''
|
||||||
mkdir -p $out/share/fonts/
|
mkdir -p $out/share/fonts/
|
||||||
|
|
|
@ -2,13 +2,13 @@
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "v2ray-geoip";
|
pname = "v2ray-geoip";
|
||||||
version = "202203020509";
|
version = "202203100039";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "v2fly";
|
owner = "v2fly";
|
||||||
repo = "geoip";
|
repo = "geoip";
|
||||||
rev = "9dce4df2c1f409bad67f579910a4edf522251e7b";
|
rev = "564c2c8de36d3680a1d5f209d6bb05e4f3f70dfc";
|
||||||
sha256 = "sha256-fR0lzvVQjWA3KbzLhuvoB15Z+7RAv34Wf5W7KRZ//QA=";
|
sha256 = "sha256-JPpzIppgKQox8T6VC/kzhpLy+YAcuHdH5L6zqciOXow=";
|
||||||
};
|
};
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
|
|
|
@ -3,11 +3,11 @@
|
||||||
stdenvNoCC.mkDerivation rec {
|
stdenvNoCC.mkDerivation rec {
|
||||||
pname = "fasm-bin";
|
pname = "fasm-bin";
|
||||||
|
|
||||||
version = "1.73.29";
|
version = "1.73.30";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://flatassembler.net/fasm-${version}.tgz";
|
url = "https://flatassembler.net/fasm-${version}.tgz";
|
||||||
sha256 = "sha256-Yyj02DRo9wTkJ01ukOwElHr1ZyZFPOMTibwyAkqYISs=";
|
sha256 = "sha256-dRlQUaWIHbu+DwQBFh6Tf4o2u0LTRw/Ehp2hT9LC8QE=";
|
||||||
};
|
};
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
|
|
||||||
let
|
let
|
||||||
release_version = "14.0.0";
|
release_version = "14.0.0";
|
||||||
candidate = "rc2"; # empty or "rcN"
|
candidate = "rc4"; # empty or "rcN"
|
||||||
dash-candidate = lib.optionalString (candidate != "") "-${candidate}";
|
dash-candidate = lib.optionalString (candidate != "") "-${candidate}";
|
||||||
rev = ""; # When using a Git commit
|
rev = ""; # When using a Git commit
|
||||||
rev-version = ""; # When using a Git commit
|
rev-version = ""; # When using a Git commit
|
||||||
|
@ -30,7 +30,7 @@ let
|
||||||
owner = "llvm";
|
owner = "llvm";
|
||||||
repo = "llvm-project";
|
repo = "llvm-project";
|
||||||
rev = if rev != "" then rev else "llvmorg-${version}";
|
rev = if rev != "" then rev else "llvmorg-${version}";
|
||||||
sha256 = "sha256-5wJEaWvwJohtjqlIsBkqQ5rE6rcWw07MaQnN1RxPb5w=";
|
sha256 = "0xm3hscg6xv48rjdi7sg9ky960af1qyg5k3jyavnaqimlaj9wxgp";
|
||||||
};
|
};
|
||||||
|
|
||||||
llvm_meta = {
|
llvm_meta = {
|
||||||
|
|
|
@ -209,6 +209,9 @@ in stdenv.mkDerivation (rec {
|
||||||
|
|
||||||
checkTarget = "check-all";
|
checkTarget = "check-all";
|
||||||
|
|
||||||
|
# For the update script:
|
||||||
|
passthru.monorepoSrc = monorepoSrc;
|
||||||
|
|
||||||
requiredSystemFeatures = [ "big-parallel" ];
|
requiredSystemFeatures = [ "big-parallel" ];
|
||||||
meta = llvm_meta // {
|
meta = llvm_meta // {
|
||||||
homepage = "https://llvm.org/";
|
homepage = "https://llvm.org/";
|
||||||
|
|
|
@ -20,7 +20,11 @@ sed -Ei \
|
||||||
|
|
||||||
readonly ATTRSET="llvmPackages_$VERSION_MAJOR"
|
readonly ATTRSET="llvmPackages_$VERSION_MAJOR"
|
||||||
|
|
||||||
if [ "$VERSION_MAJOR" -ge "13" ]; then
|
if [ "$VERSION_MAJOR" -ge "14" ]; then
|
||||||
|
readonly SOURCES=(
|
||||||
|
"llvm.monorepoSrc"
|
||||||
|
)
|
||||||
|
elif [ "$VERSION_MAJOR" -eq "13" ]; then
|
||||||
readonly SOURCES=(
|
readonly SOURCES=(
|
||||||
"llvm.src"
|
"llvm.src"
|
||||||
)
|
)
|
||||||
|
@ -43,7 +47,7 @@ fi
|
||||||
for SOURCE in "${SOURCES[@]}"; do
|
for SOURCE in "${SOURCES[@]}"; do
|
||||||
echo "Updating the hash of $SOURCE:"
|
echo "Updating the hash of $SOURCE:"
|
||||||
declare ATTR="$ATTRSET.$SOURCE"
|
declare ATTR="$ATTRSET.$SOURCE"
|
||||||
declare OLD_HASH="$(nix eval -f . $ATTR.outputHash)"
|
declare OLD_HASH="$(nix --extra-experimental-features nix-command eval -f . $ATTR.outputHash)"
|
||||||
declare NEW_HASH="\"$(nix-prefetch-url -A $ATTR)\""
|
declare NEW_HASH="\"$(nix-prefetch-url -A $ATTR)\""
|
||||||
find "$DIR" -type f -exec sed -i "s/$OLD_HASH/$NEW_HASH/" {} +
|
find "$DIR" -type f -exec sed -i "s/$OLD_HASH/$NEW_HASH/" {} +
|
||||||
done
|
done
|
||||||
|
|
9
pkgs/development/compilers/ocaml/4.14.nix
Normal file
9
pkgs/development/compilers/ocaml/4.14.nix
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
import ./generic.nix {
|
||||||
|
major_version = "4";
|
||||||
|
minor_version = "14";
|
||||||
|
patch_version = "0-beta1";
|
||||||
|
src = fetchTarball {
|
||||||
|
url = "https://caml.inria.fr/pub/distrib/ocaml-4.14/ocaml-4.14.0~beta1.tar.xz";
|
||||||
|
sha256 = "0jiz20hb58jbbk8j38agx11ra4hg0v3prmzc5a9j70lm09mnzfcd";
|
||||||
|
};
|
||||||
|
}
|
|
@ -5,13 +5,13 @@
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "cimg";
|
pname = "cimg";
|
||||||
version = "3.0.0";
|
version = "3.0.2";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "dtschump";
|
owner = "dtschump";
|
||||||
repo = "CImg";
|
repo = "CImg";
|
||||||
rev = "v.${version}";
|
rev = "v.${version}";
|
||||||
hash = "sha256-dC4VuWTz0uyFxLjBQ+2ggndHaCErcoI7tJMfkqbWmeg=";
|
hash = "sha256-OWpztnyVXCg+uoAb6e/2eUK2ebBalDlz6Qcjf17IeMk=";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = [ "out" "doc" ];
|
outputs = [ "out" "doc" ];
|
||||||
|
|
|
@ -18,13 +18,13 @@ assert blas.isILP64 == scalapack.isILP64;
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "elpa";
|
pname = "elpa";
|
||||||
version = "2021.11.001";
|
version = "2021.11.002";
|
||||||
|
|
||||||
passthru = { inherit (blas) isILP64; };
|
passthru = { inherit (blas) isILP64; };
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://elpa.mpcdf.mpg.de/software/tarball-archive/Releases/${version}/elpa-${version}.tar.gz";
|
url = "https://elpa.mpcdf.mpg.de/software/tarball-archive/Releases/${version}/elpa-${version}.tar.gz";
|
||||||
sha256 = "0bw0nwzwvjfmijfwznmrghypd3q237a3h5g5fcdncilrqnk1sdpv";
|
sha256 = "sha256-V28cru14g7gTlmQP2g9QQYOGbPbL1Lxx0Tg7oiCPH5c=";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
, zlib
|
, zlib
|
||||||
, icu
|
, icu
|
||||||
, systemd
|
, systemd
|
||||||
|
, systemdSupport ? stdenv.hostPlatform.isLinux
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
|
@ -63,6 +64,7 @@ stdenv.mkDerivation rec {
|
||||||
pcre2
|
pcre2
|
||||||
zlib
|
zlib
|
||||||
icu
|
icu
|
||||||
|
] ++ lib.optionals systemdSupport [
|
||||||
systemd
|
systemd
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -73,6 +75,10 @@ stdenv.mkDerivation rec {
|
||||||
pango
|
pango
|
||||||
];
|
];
|
||||||
|
|
||||||
|
mesonFlags = lib.optionals (!systemdSupport) [
|
||||||
|
"-D_systemd=false"
|
||||||
|
];
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
patchShebangs perf/*
|
patchShebangs perf/*
|
||||||
patchShebangs src/box_drawing_generate.sh
|
patchShebangs src/box_drawing_generate.sh
|
||||||
|
|
|
@ -11,13 +11,13 @@
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "zchunk";
|
pname = "zchunk";
|
||||||
version = "1.1.16";
|
version = "1.2.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "zchunk";
|
owner = "zchunk";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = version;
|
rev = version;
|
||||||
hash = "sha256-+8FkivLTZXdu0+1wu+7T98y6rQzIHbG9l15Abrbln1o=";
|
hash = "sha256-7H1WF5VkpA65xCdEa0Sw4r4jj+kGhDVCMr5AeE+3Ii4=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
|
@ -47,5 +47,6 @@ stdenv.mkDerivation rec {
|
||||||
license = licenses.bsd2;
|
license = licenses.bsd2;
|
||||||
maintainers = with maintainers; [ AndersonTorres ];
|
maintainers = with maintainers; [ AndersonTorres ];
|
||||||
platforms = platforms.unix;
|
platforms = platforms.unix;
|
||||||
|
broken = stdenv.isDarwin; # does not find argp-standalone
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,8 @@ buildDunePackage rec {
|
||||||
pname = "facile";
|
pname = "facile";
|
||||||
version = "1.1.4";
|
version = "1.1.4";
|
||||||
|
|
||||||
|
useDune2 = false;
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://github.com/Emmanuel-PLF/facile/releases/download/${version}/facile-${version}.tbz";
|
url = "https://github.com/Emmanuel-PLF/facile/releases/download/${version}/facile-${version}.tbz";
|
||||||
sha256 = "0jqrwmn6fr2vj2rrbllwxq4cmxykv7zh0y4vnngx29f5084a04jp";
|
sha256 = "0jqrwmn6fr2vj2rrbllwxq4cmxykv7zh0y4vnngx29f5084a04jp";
|
||||||
|
|
|
@ -6,6 +6,8 @@ buildDunePackage rec {
|
||||||
pname = "genspio";
|
pname = "genspio";
|
||||||
version = "0.0.2";
|
version = "0.0.2";
|
||||||
|
|
||||||
|
useDune2 = false;
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "hammerlab";
|
owner = "hammerlab";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
|
@ -13,7 +15,7 @@ buildDunePackage rec {
|
||||||
sha256 = "0cp6p1f713sfv4p2r03bzvjvakzn4ili7hf3a952b3w1k39hv37x";
|
sha256 = "0cp6p1f713sfv4p2r03bzvjvakzn4ili7hf3a952b3w1k39hv37x";
|
||||||
};
|
};
|
||||||
|
|
||||||
minimumOCamlVersion = "4.03";
|
minimalOCamlVersion = "4.03";
|
||||||
|
|
||||||
propagatedBuildInputs = [ nonstd sosa ];
|
propagatedBuildInputs = [ nonstd sosa ];
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,9 @@
|
||||||
buildDunePackage (args // {
|
buildDunePackage (args // {
|
||||||
inherit version buildInputs;
|
inherit version buildInputs;
|
||||||
|
|
||||||
minimumOCamlVersion = "4.04";
|
useDune2 = false;
|
||||||
|
|
||||||
|
minimalOCamlVersion = "4.04";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "janestreet";
|
owner = "janestreet";
|
||||||
|
|
|
@ -5,6 +5,8 @@
|
||||||
buildDunePackage (args // {
|
buildDunePackage (args // {
|
||||||
inherit version;
|
inherit version;
|
||||||
|
|
||||||
|
useDune2 = false;
|
||||||
|
|
||||||
minimalOCamlVersion = "4.07";
|
minimalOCamlVersion = "4.07";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
|
|
|
@ -11,7 +11,9 @@ buildDunePackage rec {
|
||||||
sha256 = "1lv8z6ljfy47yvxmwf5jrvc5d3dc90r1n291x53j161sf22ddrk9";
|
sha256 = "1lv8z6ljfy47yvxmwf5jrvc5d3dc90r1n291x53j161sf22ddrk9";
|
||||||
};
|
};
|
||||||
|
|
||||||
minimumOCamlVersion = "4.02";
|
useDune2 = false;
|
||||||
|
|
||||||
|
minimalOCamlVersion = "4.02";
|
||||||
|
|
||||||
propagatedBuildInputs = [ camlp4 ];
|
propagatedBuildInputs = [ camlp4 ];
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,9 @@ buildDunePackage rec {
|
||||||
pname = "nonstd";
|
pname = "nonstd";
|
||||||
version = "0.0.3";
|
version = "0.0.3";
|
||||||
|
|
||||||
minimumOCamlVersion = "4.02";
|
useDune2 = false;
|
||||||
|
|
||||||
|
minimalOCamlVersion = "4.02";
|
||||||
|
|
||||||
src = fetchzip {
|
src = fetchzip {
|
||||||
url = "https://bitbucket.org/smondet/${pname}/get/${pname}.${version}.tar.gz";
|
url = "https://bitbucket.org/smondet/${pname}/get/${pname}.${version}.tar.gz";
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
{ lib, buildDunePackage, fetchFromGitHub, camlidl, fuse, dune-configurator }:
|
{ lib, buildDunePackage, fetchFromGitHub, camlidl, fuse, dune-configurator }:
|
||||||
|
|
||||||
buildDunePackage {
|
buildDunePackage rec {
|
||||||
pname = "ocamlfuse";
|
pname = "ocamlfuse";
|
||||||
version = "2.7.1_cvs6_e35e76b";
|
version = "2.7.1_cvs7";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "astrada";
|
owner = "astrada";
|
||||||
repo = "ocamlfuse";
|
repo = "ocamlfuse";
|
||||||
rev = "e35e76bee3b06806256b5bfca108b7697267cd5c";
|
rev = "v${version}";
|
||||||
sha256 = "1v9g0wh7rnjkrjrnw50145g6ry38plyjs8fq8w0nlzwizhf3qhff";
|
sha256 = "6nmPXZx38hBGlg+gV9nnlRpPfeSAqDj4zBPcjUNvTRo=";
|
||||||
};
|
};
|
||||||
|
|
||||||
# This currently fails with dune
|
# This currently fails with dune
|
||||||
|
|
|
@ -1,20 +1,19 @@
|
||||||
{ lib, buildDunePackage, fetchFromGitHub }:
|
{ lib, buildDunePackage, fetchurl }:
|
||||||
|
|
||||||
buildDunePackage rec {
|
buildDunePackage rec {
|
||||||
minimumOCamlVersion = "4.06";
|
minimalOCamlVersion = "4.06";
|
||||||
|
useDune2 = true;
|
||||||
pname = "owee";
|
pname = "owee";
|
||||||
version = "0.3";
|
version = "0.4";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchurl {
|
||||||
owner = "let-def";
|
url = "https://github.com/let-def/owee/releases/download/v${version}/owee-${version}.tbz";
|
||||||
repo = "owee";
|
sha256 = "sha256:055bi0yfdki1pqagbhrwmfvigyawjgsmqw04zhpp6hds8513qzvb";
|
||||||
rev = "v${version}";
|
|
||||||
sha256 = "0jp8ca57488d7sj2nqy4yxcdpda6sxx51yyi8k6888hbinhyqp0j";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "An experimental OCaml library to work with DWARF format";
|
description = "An experimental OCaml library to work with DWARF format";
|
||||||
inherit (src.meta) homepage;
|
homepage = "https://github.com/let-def/owee/";
|
||||||
license = lib.licenses.mit;
|
license = lib.licenses.mit;
|
||||||
maintainers = [ lib.maintainers.vbgl ];
|
maintainers = [ lib.maintainers.vbgl ];
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,4 +1,7 @@
|
||||||
{ lib, fetchFromGitHub, buildDunePackage, owee }:
|
{ lib, fetchFromGitHub, buildDunePackage, ocaml, owee }:
|
||||||
|
|
||||||
|
lib.throwIfNot (lib.versionAtLeast "4.12" ocaml.version)
|
||||||
|
"spacetime_lib is not available for OCaml ${ocaml.version}"
|
||||||
|
|
||||||
buildDunePackage rec {
|
buildDunePackage rec {
|
||||||
pname = "spacetime_lib";
|
pname = "spacetime_lib";
|
||||||
|
|
|
@ -16,10 +16,12 @@ mkDerivation {
|
||||||
nativeBuildInputs = [ makeWrapper ];
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
install -D $src $out/libexec/box/box.phar
|
install -D $src $out/libexec/box/box.phar
|
||||||
makeWrapper ${php}/bin/php $out/bin/box \
|
makeWrapper ${php}/bin/php $out/bin/box \
|
||||||
--add-flags "-d phar.readonly=0 $out/libexec/box/box.phar"
|
--add-flags "-d phar.readonly=0 $out/libexec/box/box.phar"
|
||||||
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
|
|
@ -14,6 +14,7 @@ mkDerivation rec {
|
||||||
nativeBuildInputs = [ makeWrapper installShellFiles ];
|
nativeBuildInputs = [ makeWrapper installShellFiles ];
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
install -D $src $out/libexec/deployer/deployer.phar
|
install -D $src $out/libexec/deployer/deployer.phar
|
||||||
makeWrapper ${php}/bin/php $out/bin/dep --add-flags "$out/libexec/deployer/deployer.phar"
|
makeWrapper ${php}/bin/php $out/bin/dep --add-flags "$out/libexec/deployer/deployer.phar"
|
||||||
|
@ -22,6 +23,7 @@ mkDerivation rec {
|
||||||
installShellCompletion --cmd dep \
|
installShellCompletion --cmd dep \
|
||||||
--bash <($out/bin/dep autocomplete --install) \
|
--bash <($out/bin/dep autocomplete --install) \
|
||||||
--zsh <($out/bin/dep autocomplete --install)
|
--zsh <($out/bin/dep autocomplete --install)
|
||||||
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
|
|
@ -16,10 +16,12 @@ mkDerivation {
|
||||||
nativeBuildInputs = [ makeWrapper ];
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
install -D $src $out/libexec/phing/phing.phar
|
install -D $src $out/libexec/phing/phing.phar
|
||||||
makeWrapper ${php}/bin/php $out/bin/phing \
|
makeWrapper ${php}/bin/php $out/bin/phing \
|
||||||
--add-flags "$out/libexec/phing/phing.phar"
|
--add-flags "$out/libexec/phing/phing.phar"
|
||||||
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
|
31
pkgs/development/php-packages/phive/default.nix
Normal file
31
pkgs/development/php-packages/phive/default.nix
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
{ mkDerivation, fetchurl, makeWrapper, lib, php }:
|
||||||
|
|
||||||
|
mkDerivation rec {
|
||||||
|
pname = "phive";
|
||||||
|
version = "0.15.0";
|
||||||
|
|
||||||
|
src = fetchurl {
|
||||||
|
url = "https://github.com/phar-io/phive/releases/download/${version}/phive-${version}.phar";
|
||||||
|
sha256 = "sha256-crMr8d5nsVt7+zQ5xPeph/JXmTEn6jJFVtp3mOgylB4=";
|
||||||
|
};
|
||||||
|
|
||||||
|
dontUnpack = true;
|
||||||
|
|
||||||
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
|
mkdir -p $out/bin
|
||||||
|
install -D $src $out/libexec/phive/phive.phar
|
||||||
|
makeWrapper ${php}/bin/php $out/bin/phive \
|
||||||
|
--add-flags "$out/libexec/phive/phive.phar"
|
||||||
|
runHook postInstall
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "The Phar Installation and Verification Environment (PHIVE)";
|
||||||
|
homepage = "https://github.com/phar-io/phive";
|
||||||
|
license = licenses.bsd3;
|
||||||
|
maintainers = with maintainers; teams.php.members;
|
||||||
|
};
|
||||||
|
}
|
|
@ -16,10 +16,12 @@ mkDerivation {
|
||||||
nativeBuildInputs = [ makeWrapper ];
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
install -D $src $out/libexec/php-cs-fixer/php-cs-fixer.phar
|
install -D $src $out/libexec/php-cs-fixer/php-cs-fixer.phar
|
||||||
makeWrapper ${php}/bin/php $out/bin/php-cs-fixer \
|
makeWrapper ${php}/bin/php $out/bin/php-cs-fixer \
|
||||||
--add-flags "$out/libexec/php-cs-fixer/php-cs-fixer.phar"
|
--add-flags "$out/libexec/php-cs-fixer/php-cs-fixer.phar"
|
||||||
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
|
|
@ -20,15 +20,19 @@ mkDerivation {
|
||||||
];
|
];
|
||||||
|
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
|
runHook preBuild
|
||||||
composer dump-autoload
|
composer dump-autoload
|
||||||
box build
|
box build
|
||||||
|
runHook postBuild
|
||||||
'';
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
install -D parallel-lint.phar $out/libexec/php-parallel-lint/php-parallel-lint.phar
|
install -D parallel-lint.phar $out/libexec/php-parallel-lint/php-parallel-lint.phar
|
||||||
makeWrapper ${php}/bin/php $out/bin/php-parallel-lint \
|
makeWrapper ${php}/bin/php $out/bin/php-parallel-lint \
|
||||||
--add-flags "$out/libexec/php-parallel-lint/php-parallel-lint.phar"
|
--add-flags "$out/libexec/php-parallel-lint/php-parallel-lint.phar"
|
||||||
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
|
|
@ -16,10 +16,12 @@ mkDerivation {
|
||||||
nativeBuildInputs = [ makeWrapper ];
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
install -D $src $out/libexec/phpcbf/phpcbf.phar
|
install -D $src $out/libexec/phpcbf/phpcbf.phar
|
||||||
makeWrapper ${php}/bin/php $out/bin/phpcbf \
|
makeWrapper ${php}/bin/php $out/bin/phpcbf \
|
||||||
--add-flags "$out/libexec/phpcbf/phpcbf.phar"
|
--add-flags "$out/libexec/phpcbf/phpcbf.phar"
|
||||||
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
|
|
@ -16,10 +16,12 @@ mkDerivation {
|
||||||
nativeBuildInputs = [ makeWrapper ];
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
install -D $src $out/libexec/phpcs/phpcs.phar
|
install -D $src $out/libexec/phpcs/phpcs.phar
|
||||||
makeWrapper ${php}/bin/php $out/bin/phpcs \
|
makeWrapper ${php}/bin/php $out/bin/phpcs \
|
||||||
--add-flags "$out/libexec/phpcs/phpcs.phar"
|
--add-flags "$out/libexec/phpcs/phpcs.phar"
|
||||||
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
|
|
@ -16,10 +16,12 @@ mkDerivation {
|
||||||
nativeBuildInputs = [ makeWrapper ];
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
install -D $src $out/libexec/phpmd/phpmd.phar
|
install -D $src $out/libexec/phpmd/phpmd.phar
|
||||||
makeWrapper ${php}/bin/php $out/bin/phpmd \
|
makeWrapper ${php}/bin/php $out/bin/phpmd \
|
||||||
--add-flags "$out/libexec/phpmd/phpmd.phar"
|
--add-flags "$out/libexec/phpmd/phpmd.phar"
|
||||||
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
|
|
@ -16,10 +16,12 @@ mkDerivation {
|
||||||
nativeBuildInputs = [ makeWrapper ];
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
install -D $src $out/libexec/phpstan/phpstan.phar
|
install -D $src $out/libexec/phpstan/phpstan.phar
|
||||||
makeWrapper ${php}/bin/php $out/bin/phpstan \
|
makeWrapper ${php}/bin/php $out/bin/phpstan \
|
||||||
--add-flags "$out/libexec/phpstan/phpstan.phar"
|
--add-flags "$out/libexec/phpstan/phpstan.phar"
|
||||||
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
|
|
@ -16,10 +16,12 @@ mkDerivation {
|
||||||
nativeBuildInputs = [ makeWrapper ];
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
install -D $src $out/libexec/psalm/psalm.phar
|
install -D $src $out/libexec/psalm/psalm.phar
|
||||||
makeWrapper ${php}/bin/php $out/bin/psalm \
|
makeWrapper ${php}/bin/php $out/bin/psalm \
|
||||||
--add-flags "$out/libexec/psalm/psalm.phar"
|
--add-flags "$out/libexec/psalm/psalm.phar"
|
||||||
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
|
|
@ -16,10 +16,12 @@ mkDerivation {
|
||||||
nativeBuildInputs = [ makeWrapper ];
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
tar -xzf $src -C $out/bin
|
tar -xzf $src -C $out/bin
|
||||||
chmod +x $out/bin/psysh
|
chmod +x $out/bin/psysh
|
||||||
wrapProgram $out/bin/psysh --prefix PATH : "${lib.makeBinPath [ php ]}"
|
wrapProgram $out/bin/psysh --prefix PATH : "${lib.makeBinPath [ php ]}"
|
||||||
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "aio-geojson-client";
|
pname = "aio-geojson-client";
|
||||||
version = "0.16";
|
version = "0.17";
|
||||||
format = "setuptools";
|
format = "setuptools";
|
||||||
|
|
||||||
disabled = pythonOlder "3.7";
|
disabled = pythonOlder "3.7";
|
||||||
|
@ -22,7 +22,7 @@ buildPythonPackage rec {
|
||||||
owner = "exxamalte";
|
owner = "exxamalte";
|
||||||
repo = "python-aio-geojson-client";
|
repo = "python-aio-geojson-client";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
hash = "sha256-u3SwrSxeBJrBTHfqKY/mAb2p1jqW2AvRsHomKsI81gM=";
|
hash = "sha256-5GiQgtbvYeleovFbXO2vlr2XPsDIWZiElM64O+urMcY=";
|
||||||
};
|
};
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
|
|
38
pkgs/development/python-modules/allure-behave/default.nix
Normal file
38
pkgs/development/python-modules/allure-behave/default.nix
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
{ lib
|
||||||
|
, fetchPypi
|
||||||
|
, buildPythonPackage
|
||||||
|
, pythonOlder
|
||||||
|
, behave
|
||||||
|
, allure-python-commons
|
||||||
|
, setuptools-scm
|
||||||
|
}:
|
||||||
|
|
||||||
|
buildPythonPackage rec {
|
||||||
|
pname = "allure-behave";
|
||||||
|
version = "2.9.45";
|
||||||
|
|
||||||
|
disabled = pythonOlder "3.4";
|
||||||
|
|
||||||
|
src = fetchPypi {
|
||||||
|
inherit pname version;
|
||||||
|
sha256 = "sha256-aK0SgQIXpuUoSTz8jg5IPKQM2Xvk2EfkSGigsy/GFNo=";
|
||||||
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
setuptools-scm
|
||||||
|
];
|
||||||
|
|
||||||
|
pythonImportsCheck = [ "allure_behave" ];
|
||||||
|
|
||||||
|
propagatedBuildInputs = [
|
||||||
|
allure-python-commons
|
||||||
|
behave
|
||||||
|
];
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "Allure behave integration.";
|
||||||
|
homepage = "https://github.com/allure-framework/allure-python";
|
||||||
|
license = licenses.asl20;
|
||||||
|
maintainers = with maintainers; [ happysalada ];
|
||||||
|
};
|
||||||
|
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue