Merge branch 'master' into staging-next

This commit is contained in:
Vladimír Čunát 2022-03-25 10:16:56 +01:00
commit 0a8b4eddd2
No known key found for this signature in database
GPG key ID: E747DF1F9575A3AA
403 changed files with 3246 additions and 2048 deletions

View file

@ -72,6 +72,10 @@ Used with Mercurial. Expects `url`, `rev`, and `sha256`.
A number of fetcher functions wrap part of `fetchurl` and `fetchzip`. They are mainly convenience functions intended for commonly used destinations of source code in Nixpkgs. These wrapper fetchers are listed below.
## `fetchFromGitea` {#fetchfromgitea}
`fetchFromGitea` expects five arguments. `domain` is the gitea server name. `owner` is a string corresponding to the Gitea user or organization that controls this repository. `repo` corresponds to the name of the software repository. These are located at the top of every Gitea HTML page as `owner`/`repo`. `rev` corresponds to the Git commit hash or tag (e.g `v1.0`) that will be downloaded from Git. Finally, `sha256` corresponds to the hash of the extracted directory. Again, other hash algorithms are also available but `sha256` is currently preferred.
## `fetchFromGitHub` {#fetchfromgithub}
`fetchFromGitHub` expects four arguments. `owner` is a string corresponding to the GitHub user or organization that controls this repository. `repo` corresponds to the name of the software repository. These are located at the top of every GitHub HTML page as `owner`/`repo`. `rev` corresponds to the Git commit hash or tag (e.g `v1.0`) that will be downloaded from Git. Finally, `sha256` corresponds to the hash of the extracted directory. Again, other hash algorithms are also available but `sha256` is currently preferred.

View file

@ -6,7 +6,7 @@ Since release 15.09 there is a new TeX Live packaging that lives entirely under
- For basic usage just pull `texlive.combined.scheme-basic` for an environment with basic LaTeX support.
- It typically won't work to use separately installed packages together. Instead, you can build a custom set of packages like this:
- It typically won't work to use separately installed packages together. Instead, you can build a custom set of packages like this. Most CTAN packages should be available:
```nix
texlive.combine {

View file

@ -68,7 +68,8 @@ let
bitNot boolToString mergeAttrs flip mapNullable inNixShell isFloat min max
importJSON importTOML warn warnIf throwIfNot checkListOfEnum
info showWarnings nixpkgsVersion version isInOldestRelease
mod compare splitByAndCompare functionArgs setFunctionArgs isFunction
mod compare splitByAndCompare
functionArgs setFunctionArgs isFunction toFunction
toHexString toBaseDigits;
inherit (self.fixedPoints) fix fix' converge extends composeExtensions
composeManyExtensions makeExtensible makeExtensibleWithCustomName;
@ -113,7 +114,7 @@ let
commitIdFromGitRepo cleanSourceWith pathHasContext
canCleanSource pathIsRegularFile pathIsGitRepo;
inherit (self.modules) evalModules setDefaultModuleLocation
unifyModuleSyntax applyIfFunction mergeModules
unifyModuleSyntax applyModuleArgsIfFunction mergeModules
mergeModules' mergeOptionDecls evalOptionValue mergeDefinitions
pushDownProperties dischargeProperties filterOverrides
sortProperties fixupOptionType mkIf mkAssert mkMerge mkOverride

View file

@ -282,11 +282,11 @@ rec {
# Like unifyModuleSyntax, but also imports paths and calls functions if necessary
loadModule = args: fallbackFile: fallbackKey: m:
if isFunction m || isAttrs m then
unifyModuleSyntax fallbackFile fallbackKey (applyIfFunction fallbackKey m args)
unifyModuleSyntax fallbackFile fallbackKey (applyModuleArgsIfFunction fallbackKey m args)
else if isList m then
let defs = [{ file = fallbackFile; value = m; }]; in
throw "Module imports can't be nested lists. Perhaps you meant to remove one level of lists? Definitions: ${showDefs defs}"
else unifyModuleSyntax (toString m) (toString m) (applyIfFunction (toString m) (import m) args);
else unifyModuleSyntax (toString m) (toString m) (applyModuleArgsIfFunction (toString m) (import m) args);
/*
Collects all modules recursively into the form
@ -383,7 +383,7 @@ rec {
config = addFreeformType (addMeta (removeAttrs m ["_file" "key" "disabledModules" "require" "imports" "freeformType"]));
};
applyIfFunction = key: f: args@{ config, options, lib, ... }: if isFunction f then
applyModuleArgsIfFunction = key: f: args@{ config, options, lib, ... }: if isFunction f then
let
# Module arguments are resolved in a strict manner when attribute set
# deconstruction is used. As the arguments are now defined with the

View file

@ -441,6 +441,25 @@ rec {
isFunction = f: builtins.isFunction f ||
(f ? __functor && isFunction (f.__functor f));
/*
Turns any non-callable values into constant functions.
Returns callable values as is.
Example:
nix-repl> lib.toFunction 1 2
1
nix-repl> lib.toFunction (x: x + 1) 2
3
*/
toFunction =
# Any value
v:
if isFunction v
then v
else k: v;
/* Convert the given positive integer to a string of its hexadecimal
representation. For example:

View file

@ -4241,7 +4241,12 @@
githubId = 119691;
name = "Michael Gough";
};
freax13 = {
email = "erbse.13@gmx.de";
github = "freax13";
githubId = 14952658;
name = "Tom Dohrmann";
};
fredeb = {
email = "im@fredeb.dev";
github = "fredeeb";

View file

@ -478,6 +478,15 @@
its reliance on python2.
</para>
</listitem>
<listitem>
<para>
<literal>services.ipfs.extraFlags</literal> is now escaped
with <literal>utils.escapeSystemdExecArgs</literal>. If you
rely on systemd interpolating <literal>extraFlags</literal> in
the service <literal>ExecStart</literal>, this will no longer
work.
</para>
</listitem>
<listitem>
<para>
The <literal>matrix-synapse</literal> service

View file

@ -161,6 +161,8 @@ In addition to numerous new and upgraded packages, this release has the followin
- The `mailpile` email webclient (`services.mailpile`) has been removed due to its reliance on python2.
- `services.ipfs.extraFlags` is now escaped with `utils.escapeSystemdExecArgs`. If you rely on systemd interpolating `extraFlags` in the service `ExecStart`, this will no longer work.
- The `matrix-synapse` service (`services.matrix-synapse`) has been converted to use the `settings` option defined in RFC42.
This means that options that are part of your `homeserver.yaml` configuration, and that were specified at the top-level of the
module (`services.matrix-synapse`) now need to be moved into `services.matrix-synapse.settings`. And while not all options you

View file

@ -146,26 +146,28 @@ rec {
# Make a full-blown test
makeTest =
{ testScript
{ machine ? null
, nodes ? {}
, testScript
, enableOCR ? false
, name ? "unnamed"
# Skip linting (mainly intended for faster dev cycles)
, skipLint ? false
, passthru ? {}
, meta ? {}
, # For meta.position
pos ? # position used in error messages and for meta.position
(if t.meta.description or null != null
then builtins.unsafeGetAttrPos "description" t.meta
(if meta.description or null != null
then builtins.unsafeGetAttrPos "description" meta
else builtins.unsafeGetAttrPos "testScript" t)
, ...
} @ t:
let
nodes = qemu_pkg:
mkNodes = qemu_pkg:
let
testScript' =
# Call the test script with the computed nodes.
if lib.isFunction testScript
then testScript { nodes = nodes qemu_pkg; }
then testScript { nodes = mkNodes qemu_pkg; }
else testScript;
build-vms = import ./build-vms.nix {
@ -205,33 +207,29 @@ rec {
};
in
build-vms.buildVirtualNetwork (
t.nodes or (if t ? machine then { machine = t.machine; } else { })
nodes // lib.optionalAttrs (machine != null) { inherit machine; }
);
driver = setupDriverForTest {
inherit testScript enableOCR skipLint passthru;
testName = name;
qemu_pkg = pkgs.qemu_test;
nodes = nodes pkgs.qemu_test;
nodes = mkNodes pkgs.qemu_test;
};
driverInteractive = setupDriverForTest {
inherit testScript enableOCR skipLint passthru;
testName = name;
qemu_pkg = pkgs.qemu;
nodes = nodes pkgs.qemu;
nodes = mkNodes pkgs.qemu;
interactive = true;
};
test =
let
passMeta = drv: drv // lib.optionalAttrs (t ? meta) {
meta = (drv.meta or { }) // t.meta;
};
in passMeta (runTests { inherit driver pos driverInteractive; });
test = lib.addMetaAttrs meta (runTests { inherit driver pos driverInteractive; });
in
test // {
inherit test driver driverInteractive nodes;
inherit test driver driverInteractive;
inherit (driver) nodes;
};
abortForFunction = functionName: abort ''The ${functionName} function was

View file

@ -117,7 +117,7 @@ in
'';
};
config = lib.mkIf (!config.system.disableInstallerTools) {
config = lib.mkIf (config.nix.enable && !config.system.disableInstallerTools) {
system.nixos-generate-config.configuration = mkDefault ''
# Edit this configuration file to define what should be installed on

View file

@ -777,6 +777,7 @@
./services/networking/headscale.nix
./services/networking/hostapd.nix
./services/networking/htpdate.nix
./services/networking/https-dns-proxy.nix
./services/networking/hylafax/default.nix
./services/networking/i2pd.nix
./services/networking/i2p.nix

View file

@ -132,7 +132,7 @@ in
description = "Graylog server daemon user";
};
};
users.groups = mkIf (cfg.user == "graylog") {};
users.groups = mkIf (cfg.user == "graylog") { graylog = {}; };
systemd.tmpfiles.rules = [
"d '${cfg.messageJournalDir}' - ${cfg.user} - - -"

View file

@ -79,6 +79,19 @@ in {
for supported values.
'';
};
allowSystemControl = mkOption {
type = types.bool;
default = false;
description = ''
Whether to allow Moonraker to perform system-level operations.
Moonraker exposes APIs to perform system-level operations, such as
reboot, shutdown, and management of systemd units. See the
<link xlink:href="https://moonraker.readthedocs.io/en/latest/web_api/#machine-commands">documentation</link>
for details on what clients are able to do.
'';
};
};
};
@ -86,6 +99,13 @@ in {
warnings = optional (cfg.settings ? update_manager)
''Enabling update_manager is not supported on NixOS and will lead to non-removable warnings in some clients.'';
assertions = [
{
assertion = cfg.allowSystemControl -> config.security.polkit.enable;
message = "services.moonraker.allowSystemControl requires polkit to be enabled (security.polkit.enable).";
}
];
users.users = optionalAttrs (cfg.user == "moonraker") {
moonraker = {
group = cfg.group;
@ -128,11 +148,31 @@ in {
exec ${pkg}/bin/moonraker -c ${cfg.configDir}/moonraker-temp.cfg
'';
# Needs `ip` command
path = [ pkgs.iproute2 ];
serviceConfig = {
WorkingDirectory = cfg.stateDir;
Group = cfg.group;
User = cfg.user;
};
};
security.polkit.extraConfig = lib.optionalString cfg.allowSystemControl ''
// nixos/moonraker: Allow Moonraker to perform system-level operations
//
// This was enabled via services.moonraker.allowSystemControl.
polkit.addRule(function(action, subject) {
if ((action.id == "org.freedesktop.systemd1.manage-units" ||
action.id == "org.freedesktop.login1.power-off" ||
action.id == "org.freedesktop.login1.power-off-multiple-sessions" ||
action.id == "org.freedesktop.login1.reboot" ||
action.id == "org.freedesktop.login1.reboot-multiple-sessions" ||
action.id.startsWith("org.freedesktop.packagekit.")) &&
subject.user == "${cfg.user}") {
return polkit.Result.YES;
}
});
'';
};
}

View file

@ -81,8 +81,14 @@ in
###### implementation
config = {
assertions = [
{
assertion = cfg.automatic -> config.nix.enable;
message = ''nix.gc.automatic requires nix.enable'';
}
];
systemd.services.nix-gc = {
systemd.services.nix-gc = lib.mkIf config.nix.enable {
description = "Nix Garbage Collector";
script = "exec ${config.nix.package.out}/bin/nix-collect-garbage ${cfg.options}";
startAt = optional cfg.automatic cfg.dates;

View file

@ -37,8 +37,14 @@ in
###### implementation
config = {
assertions = [
{
assertion = cfg.automatic -> config.nix.enable;
message = ''nix.optimise.automatic requires nix.enable'';
}
];
systemd.services.nix-optimise =
systemd.services.nix-optimise = lib.mkIf config.nix.enable
{ description = "Nix Store Optimiser";
# No point this if the nix daemon (and thus the nix store) is outside
unitConfig.ConditionPathIsReadWrite = "/nix/var/nix/daemon-socket";

View file

@ -1,16 +1,17 @@
{ config, lib, pkgs, options, ... }:
{ config, lib, pkgs, options, utils, ... }:
with lib;
let
cfg = config.services.ipfs;
opt = options.services.ipfs;
ipfsFlags = toString ([
(optionalString cfg.autoMount "--mount")
(optionalString cfg.enableGC "--enable-gc")
(optionalString (cfg.serviceFdlimit != null) "--manage-fdlimit=false")
(optionalString (cfg.defaultMode == "offline") "--offline")
(optionalString (cfg.defaultMode == "norouting") "--routing=none")
] ++ cfg.extraFlags);
ipfsFlags = utils.escapeSystemdExecArgs (
optional cfg.autoMount "--mount" ++
optional cfg.enableGC "--enable-gc" ++
optional (cfg.serviceFdlimit != null) "--manage-fdlimit=false" ++
optional (cfg.defaultMode == "offline") "--offline" ++
optional (cfg.defaultMode == "norouting") "--routing=none" ++
cfg.extraFlags
);
profile =
if cfg.localDiscovery

View file

@ -0,0 +1,128 @@
{ config, lib, pkgs, ... }:
let
inherit (lib)
concatStringsSep
mkEnableOption mkIf mkOption types;
cfg = config.services.https-dns-proxy;
providers = {
cloudflare = {
ips = [ "1.1.1.1" "1.0.0.1" ];
url = "https://cloudflare-dns.com/dns-query";
};
google = {
ips = [ "8.8.8.8" "8.8.4.4" ];
url = "https://dns.google/dns-query";
};
quad9 = {
ips = [ "9.9.9.9" "149.112.112.112" ];
url = "https://dns.quad9.net/dns-query";
};
};
defaultProvider = "quad9";
providerCfg =
let
isCustom = cfg.provider.kind == "custom";
in
lib.concatStringsSep " " [
"-b"
(concatStringsSep "," (if isCustom then cfg.provider.ips else providers."${cfg.provider.kind}".ips))
"-r"
(if isCustom then cfg.provider.url else providers."${cfg.provider.kind}".url)
];
in
{
meta.maintainers = with lib.maintainers; [ peterhoeg ];
###### interface
options.services.https-dns-proxy = {
enable = mkEnableOption "https-dns-proxy daemon";
address = mkOption {
description = "The address on which to listen";
type = types.str;
default = "127.0.0.1";
};
port = mkOption {
description = "The port on which to listen";
type = types.port;
default = 5053;
};
provider = {
kind = mkOption {
description = ''
The upstream provider to use or custom in case you do not trust any of
the predefined providers or just want to use your own.
The default is ${defaultProvider} and there are privacy and security trade-offs
when using any upstream provider. Please consider that before using any
of them.
If you pick a custom provider, you will need to provide the bootstrap
IP addresses as well as the resolver https URL.
'';
type = types.enum ((builtins.attrNames providers) ++ [ "custom" ]);
default = defaultProvider;
};
ips = mkOption {
description = "The custom provider IPs";
type = types.listOf types.str;
};
url = mkOption {
description = "The custom provider URL";
type = types.str;
};
};
preferIPv4 = mkOption {
description = ''
https_dns_proxy will by default use IPv6 and fail if it is not available.
To play it safe, we choose IPv4.
'';
type = types.bool;
default = true;
};
extraArgs = mkOption {
description = "Additional arguments to pass to the process.";
type = types.listOf types.str;
default = [ "-v" ];
};
};
###### implementation
config = lib.mkIf cfg.enable {
systemd.services.https-dns-proxy = {
description = "DNS to DNS over HTTPS (DoH) proxy";
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = rec {
Type = "exec";
DynamicUser = true;
ExecStart = lib.concatStringsSep " " (
[
"${pkgs.https-dns-proxy}/bin/https_dns_proxy"
"-a ${toString cfg.address}"
"-p ${toString cfg.port}"
"-l -"
providerCfg
]
++ lib.optional cfg.preferIPv4 "-4"
++ cfg.extraArgs
);
Restart = "on-failure";
};
};
};
}

View file

@ -5,8 +5,8 @@ let
inherit (lib)
mkDefault mkEnableOption mkIf mkOption types
mkRemovedOptionModule
concatStringsSep optional;
mkRemovedOptionModule literalExpression
escapeShellArg concatStringsSep optional optionalString;
in
{
@ -17,10 +17,26 @@ in
type = types.ints.between 1 100;
default = 10;
description = ''
Minimum of availabe memory (in percent).
If the free memory falls below this threshold and the analog is true for
<option>services.earlyoom.freeSwapThreshold</option>
the killing begins.
Minimum available memory (in percent).
If the available memory falls below this threshold (and the analog is true for
<option>freeSwapThreshold</option>) the killing begins.
SIGTERM is sent first to the process that uses the most memory; then, if the available
memory falls below <option>freeMemKillThreshold</option> (and the analog is true for
<option>freeSwapKillThreshold</option>), SIGKILL is sent.
See <link xlink:href="https://github.com/rfjakob/earlyoom#command-line-options">README</link> for details.
'';
};
freeMemKillThreshold = mkOption {
type = types.nullOr (types.ints.between 1 100);
default = null;
description = ''
Minimum available memory (in percent) before sending SIGKILL.
If unset, this defaults to half of <option>freeMemThreshold</option>.
See the description of <xref linkend="opt-services.earlyoom.freeMemThreshold"/>.
'';
};
@ -28,19 +44,20 @@ in
type = types.ints.between 1 100;
default = 10;
description = ''
Minimum of availabe swap space (in percent).
If the available swap space falls below this threshold and the analog
is true for <option>services.earlyoom.freeMemThreshold</option>
the killing begins.
Minimum free swap space (in percent) before sending SIGTERM.
See the description of <xref linkend="opt-services.earlyoom.freeMemThreshold"/>.
'';
};
# TODO: remove or warn after 1.7 (https://github.com/rfjakob/earlyoom/commit/7ebc4554)
ignoreOOMScoreAdjust = mkOption {
type = types.bool;
default = false;
freeSwapKillThreshold = mkOption {
type = types.nullOr (types.ints.between 1 100);
default = null;
description = ''
Ignore oom_score_adjust values of processes.
Minimum free swap space (in percent) before sending SIGKILL.
If unset, this defaults to half of <option>freeSwapThreshold</option>.
See the description of <xref linkend="opt-services.earlyoom.freeMemThreshold"/>.
'';
};
@ -63,12 +80,43 @@ in
local user to DoS your session by spamming notifications.
To actually see the notifications in your GUI session, you need to have
<literal>systembus-notify</literal> running as your user which this
option handles.
<literal>systembus-notify</literal> running as your user, which this
option handles by enabling <option>services.systembus-notify</option>.
See <link xlink:href="https://github.com/rfjakob/earlyoom#notifications">README</link> for details.
'';
};
killHook = mkOption {
type = types.nullOr types.path;
default = null;
example = literalExpression ''
pkgs.writeShellScript "earlyoom-kill-hook" '''
echo "Process $EARLYOOM_NAME ($EARLYOOM_PID) was killed" >> /path/to/log
'''
'';
description = ''
An absolute path to an executable to be run for each process killed.
Some environment variables are available, see
<link xlink:href="https://github.com/rfjakob/earlyoom#notifications">README</link> and
<link xlink:href="https://github.com/rfjakob/earlyoom/blob/master/MANPAGE.md#-n-pathtoscript">the man page</link>
for details.
'';
};
reportInterval = mkOption {
type = types.int;
default = 3600;
example = 0;
description = "Interval (in seconds) at which a memory report is printed (set to 0 to disable).";
};
extraArgs = mkOption {
type = types.listOf types.str;
default = [];
example = [ "-g" "--prefer '(^|/)(java|chromium)$'" ];
description = "Extra command-line arguments to be passed to earlyoom.";
};
};
imports = [
@ -76,7 +124,11 @@ in
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.
This option was removed in earlyoom 1.6, but was reimplemented in 1.7
and is available as the new option `services.earlyoom.killHook`.
'')
(mkRemovedOptionModule [ "services" "earlyoom" "ignoreOOMScoreAdjust" ] ''
This option is deprecated and ignored by earlyoom since 1.7.
'')
];
@ -91,12 +143,16 @@ in
StandardError = "journal";
ExecStart = concatStringsSep " " ([
"${pkgs.earlyoom}/bin/earlyoom"
"-m ${toString cfg.freeMemThreshold}"
"-s ${toString cfg.freeSwapThreshold}"
("-m ${toString cfg.freeMemThreshold}"
+ optionalString (cfg.freeMemKillThreshold != null) ",${toString cfg.freeMemKillThreshold}")
("-s ${toString cfg.freeSwapThreshold}"
+ optionalString (cfg.freeSwapKillThreshold != null) ",${toString cfg.freeSwapKillThreshold}")
"-r ${toString cfg.reportInterval}"
]
++ optional cfg.ignoreOOMScoreAdjust "-i"
++ optional cfg.enableDebugInfo "-d"
++ optional cfg.enableNotifications "-n"
++ optional (cfg.killHook != null) "-N ${escapeShellArg cfg.killHook}"
++ cfg.extraArgs
);
};
};

View file

@ -519,7 +519,7 @@ in
with plasma5; with kdeApplications; with kdeFrameworks;
[
# Basic packages without which Plasma Mobile fails to work properly.
plasma-phone-components
plasma-mobile
plasma-nano
pkgs.maliit-framework
pkgs.maliit-keyboard
@ -573,7 +573,7 @@ in
};
};
services.xserver.displayManager.sessionPackages = [ pkgs.libsForQt5.plasma5.plasma-phone-components ];
services.xserver.displayManager.sessionPackages = [ pkgs.libsForQt5.plasma5.plasma-mobile ];
})
];
}

View file

@ -535,6 +535,7 @@ let
createGreDevice = n: v: nameValuePair "${n}-netdev"
(let
deps = deviceDependency v.dev;
ttlarg = if lib.hasPrefix "ip6" v.type then "hoplimit" else "ttl";
in
{ description = "GRE Tunnel Interface ${n}";
wantedBy = [ "network-setup.service" (subsystemDevice n) ];
@ -551,6 +552,7 @@ let
ip link add name "${n}" type ${v.type} \
${optionalString (v.remote != null) "remote \"${v.remote}\""} \
${optionalString (v.local != null) "local \"${v.local}\""} \
${optionalString (v.ttl != null) "${ttlarg} ${toString v.ttl}"} \
${optionalString (v.dev != null) "dev \"${v.dev}\""}
ip link set "${n}" up
'';

View file

@ -318,6 +318,8 @@ in
Remote = gre.remote;
}) // (optionalAttrs (gre.local != null) {
Local = gre.local;
}) // (optionalAttrs (gre.ttl != null) {
TTL = gre.ttl;
});
};
networks = mkIf (gre.dev != null) {

View file

@ -1020,12 +1020,14 @@ in
local = "10.0.0.22";
dev = "enp4s0f0";
type = "tap";
ttl = 255;
};
gre6Tunnel = {
remote = "fd7a:5634::1";
local = "fd7a:5634::2";
dev = "enp4s0f0";
type = "tun6";
ttl = 255;
};
}
'';
@ -1063,6 +1065,15 @@ in
'';
};
ttl = mkOption {
type = types.nullOr types.int;
default = null;
example = 255;
description = ''
The time-to-live/hoplimit of the connection to the remote tunnel endpoint.
'';
};
type = mkOption {
type = with types; enum [ "tun" "tap" "tun6" "tap6" ];
default = "tap";

View file

@ -796,7 +796,7 @@ in
# allow `system.build.toplevel' to be included. (If we had a direct
# reference to ${regInfo} here, then we would get a cyclic
# dependency.)
boot.postBootCommands =
boot.postBootCommands = lib.mkIf config.nix.enable
''
if [[ "$(cat /proc/cmdline)" =~ regInfo=([^ ]*) ]]; then
${config.nix.package.out}/bin/nix-store --load-db < ''${BASH_REMATCH[1]}

View file

@ -132,6 +132,7 @@ in
domination = handleTest ./domination.nix {};
dovecot = handleTest ./dovecot.nix {};
drbd = handleTest ./drbd.nix {};
earlyoom = handleTestOn ["x86_64-linux"] ./earlyoom.nix {};
ec2-config = (handleTestOn ["x86_64-linux"] ./ec2.nix {}).boot-ec2-config or {};
ec2-nixops = (handleTestOn ["x86_64-linux"] ./ec2.nix {}).boot-ec2-nixops or {};
ecryptfs = handleTest ./ecryptfs.nix {};
@ -308,6 +309,7 @@ in
molly-brown = handleTest ./molly-brown.nix {};
mongodb = handleTest ./mongodb.nix {};
moodle = handleTest ./moodle.nix {};
moonraker = handleTest ./moonraker.nix {};
morty = handleTest ./morty.nix {};
mosquitto = handleTest ./mosquitto.nix {};
moosefs = handleTest ./moosefs.nix {};

View file

@ -38,7 +38,6 @@ let
} // extraConfig);
in
makeTest {
inherit iso;
name = "boot-" + name;
nodes = { };
testScript =

View file

@ -7,7 +7,7 @@ import ./make-test-python.nix ({ pkgs, ... }: {
nodes = {
webserver = { pkgs, lib, ... }: {
services.caddy.enable = true;
services.caddy.config = ''
services.caddy.extraConfig = ''
http://localhost {
encode gzip
@ -22,7 +22,7 @@ import ./make-test-python.nix ({ pkgs, ... }: {
'';
specialisation.etag.configuration = {
services.caddy.config = lib.mkForce ''
services.caddy.extraConfig = lib.mkForce ''
http://localhost {
encode gzip
@ -38,7 +38,7 @@ import ./make-test-python.nix ({ pkgs, ... }: {
};
specialisation.config-reload.configuration = {
services.caddy.config = ''
services.caddy.extraConfig = ''
http://localhost:8080 {
}
'';

View file

@ -48,7 +48,7 @@ let
sudo
ceph
xfsprogs
netcat-openbsd
libressl.nc
];
boot.kernelModules = [ "xfs" ];

View file

@ -15,26 +15,9 @@
with import ../lib/testing-python.nix { inherit system pkgs; };
with pkgs.lib;
mapAttrs (channel: chromiumPkg: makeTest rec {
name = "chromium-${channel}";
meta = {
maintainers = with maintainers; [ aszlig primeos ];
# https://github.com/NixOS/hydra/issues/591#issuecomment-435125621
inherit (chromiumPkg.meta) timeout;
};
enableOCR = true;
let
user = "alice";
machine.imports = [ ./common/user-account.nix ./common/x11.nix ];
machine.virtualisation.memorySize = 2047;
machine.test-support.displayManager.auto.user = user;
machine.environment = {
systemPackages = [ chromiumPkg ];
variables."XAUTHORITY" = "/home/alice/.Xauthority";
};
startupHTML = pkgs.writeText "chromium-startup.html" ''
<!DOCTYPE html>
<html>
@ -50,6 +33,25 @@ mapAttrs (channel: chromiumPkg: makeTest rec {
</body>
</html>
'';
in
mapAttrs (channel: chromiumPkg: makeTest {
name = "chromium-${channel}";
meta = {
maintainers = with maintainers; [ aszlig primeos ];
# https://github.com/NixOS/hydra/issues/591#issuecomment-435125621
inherit (chromiumPkg.meta) timeout;
};
enableOCR = true;
machine.imports = [ ./common/user-account.nix ./common/x11.nix ];
machine.virtualisation.memorySize = 2047;
machine.test-support.displayManager.auto.user = user;
machine.environment = {
systemPackages = [ chromiumPkg ];
variables."XAUTHORITY" = "/home/alice/.Xauthority";
};
testScript = let
xdo = name: text: let

View file

@ -1,7 +1,7 @@
# This test runs CRI-O and verifies via critest
import ./make-test-python.nix ({ pkgs, ... }: {
name = "cri-o";
maintainers = with pkgs.lib.maintainers; teams.podman.members;
meta.maintainers = with pkgs.lib.maintainers; teams.podman.members;
nodes = {
crio = {

16
nixos/tests/earlyoom.nix Normal file
View file

@ -0,0 +1,16 @@
import ./make-test-python.nix ({ lib, ... }: {
name = "earlyoom";
meta = {
maintainers = with lib.maintainers; [ ncfavier ];
};
machine = {
services.earlyoom = {
enable = true;
};
};
testScript = ''
machine.wait_for_unit("earlyoom.service")
'';
})

View file

@ -20,7 +20,7 @@ import ./make-test-python.nix (
nodes = {
server =
{ ... }:
{ config, ... }:
{
networking.firewall.allowedTCPPorts = [ 80 ];

View file

@ -21,9 +21,9 @@ import ./make-test-python.nix ({ pkgs, ... }: {
forceSSL = true;
};
security.acme.email = "me@example.org";
security.acme.acceptTerms = true;
security.acme.server = "https://example.com"; # self-signed only
security.acme.defaults.email = "me@example.org";
security.acme.defaults.server = "https://example.com"; # self-signed only
};
};

View file

@ -1,13 +1,13 @@
# Miscellaneous small tests that don't warrant their own VM run.
import ./make-test-python.nix ({ pkgs, ...} : rec {
import ./make-test-python.nix ({ pkgs, ...} : let
foo = pkgs.writeText "foo" "Hello World";
in {
name = "misc";
meta = with pkgs.lib.maintainers; {
maintainers = [ eelco ];
};
foo = pkgs.writeText "foo" "Hello World";
machine =
{ lib, ... }:
with lib;

45
nixos/tests/moonraker.nix Normal file
View file

@ -0,0 +1,45 @@
import ./make-test-python.nix ({ pkgs, ...} : {
name = "moonraker";
meta = with pkgs.lib.maintainers; {
maintainers = [ zhaofengli ];
};
nodes = {
printer = { config, pkgs, ... }: {
security.polkit.enable = true;
services.moonraker = {
enable = true;
allowSystemControl = true;
settings = {
authorization = {
trusted_clients = [ "127.0.0.0/8" "::1/128" ];
};
};
};
services.klipper = {
enable = true;
user = "moonraker";
group = "moonraker";
# No mcu configured so won't even enter `ready` state
settings = {};
};
};
};
testScript = ''
printer.start()
printer.wait_for_unit("klipper.service")
printer.wait_for_unit("moonraker.service")
printer.wait_until_succeeds("curl http://localhost:7125/printer/info | grep -v 'Not Found' >&2", timeout=30)
with subtest("Check that we can perform system-level operations"):
printer.succeed("curl -X POST http://localhost:7125/machine/services/stop?service=klipper | grep ok >&2")
printer.wait_until_succeeds("systemctl --no-pager show klipper.service | grep ActiveState=inactive", timeout=10)
'';
})

View file

@ -514,12 +514,14 @@ let
local = "192.168.2.1";
remote = "192.168.2.2";
dev = "eth2";
ttl = 225;
type = "tap";
};
gre6Tunnel = {
local = "fd00:1234:5678:4::1";
remote = "fd00:1234:5678:4::2";
dev = "eth3";
ttl = 255;
type = "tun6";
};
};
@ -548,12 +550,14 @@ let
local = "192.168.2.2";
remote = "192.168.2.1";
dev = "eth1";
ttl = 225;
type = "tap";
};
gre6Tunnel = {
local = "fd00:1234:5678:4::2";
remote = "fd00:1234:5678:4::1";
dev = "eth3";
ttl = 255;
type = "tun6";
};
};
@ -573,6 +577,7 @@ let
];
testScript = { ... }:
''
import json
start_all()
with subtest("Wait for networking to be configured"):
@ -591,6 +596,13 @@ let
client1.wait_until_succeeds("ping -c 1 fc00::2")
client2.wait_until_succeeds("ping -c 1 fc00::1")
with subtest("Test GRE tunnel TTL"):
links = json.loads(client1.succeed("ip -details -json link show greTunnel"))
assert links[0]['linkinfo']['info_data']['ttl'] == 225, "ttl not set for greTunnel"
links = json.loads(client2.succeed("ip -details -json link show gre6Tunnel"))
assert links[0]['linkinfo']['info_data']['ttl'] == 255, "ttl not set for gre6Tunnel"
'';
};
vlan = let

View file

@ -14,12 +14,6 @@ import ./make-test-python.nix ({ pkgs, ... }:
};
};
users.testuser = {
uid = 1000;
group = "testgroup";
};
groups.testgroup.gid = 1000;
testScript = ''
machine.wait_for_unit("rstudio-server.service")
machine.succeed("curl -f -vvv -s http://127.0.0.1:8787")

View file

@ -42,8 +42,8 @@ import ./make-test-python.nix ({ pkgs, ... }:
caclient =
{ config, pkgs, ... }: {
security.acme.server = "https://caserver:8443/acme/acme/directory";
security.acme.email = "root@example.org";
security.acme.defaults.server = "https://caserver:8443/acme/acme/directory";
security.acme.defaults.email = "root@example.org";
security.acme.acceptTerms = true;
security.pki.certificateFiles = [ "${test-certificates}/root_ca.crt" ];

View file

@ -1,24 +1,19 @@
import ./make-test-python.nix ({ lib, ... }: with lib;
rec {
{
name = "tor";
meta.maintainers = with maintainers; [ joachifm ];
common =
{ ... }:
{ boot.kernelParams = [ "audit=0" "apparmor=0" "quiet" ];
networking.firewall.enable = false;
networking.useDHCP = false;
};
nodes.client = { pkgs, ... }: {
boot.kernelParams = [ "audit=0" "apparmor=0" "quiet" ];
networking.firewall.enable = false;
networking.useDHCP = false;
nodes.client =
{ pkgs, ... }:
{ imports = [ common ];
environment.systemPackages = with pkgs; [ netcat ];
services.tor.enable = true;
services.tor.client.enable = true;
services.tor.settings.ControlPort = 9051;
};
environment.systemPackages = with pkgs; [ netcat ];
services.tor.enable = true;
services.tor.client.enable = true;
services.tor.settings.ControlPort = 9051;
};
testScript = ''
client.wait_for_unit("tor.service")

View file

@ -4,14 +4,23 @@ import ./make-test-python.nix ({ lib, ... }: {
maintainers = [ ericson2314 ];
};
nixpkgs.overlays = [
(self: super: {
nix = throw "don't want to use this";
})
];
nodes.machine = { ... }: {
nix.enable = false;
nixpkgs.overlays = [
(self: super: {
nix = throw "don't want to use pkgs.nix";
nixVersions = lib.mapAttrs (k: throw "don't want to use pkgs.nixVersions.${k}") super.nixVersions;
# aliases, some deprecated
nix_2_3 = throw "don't want to use pkgs.nix_2_3";
nix_2_4 = throw "don't want to use pkgs.nix_2_4";
nix_2_5 = throw "don't want to use pkgs.nix_2_5";
nix_2_6 = throw "don't want to use pkgs.nix_2_6";
nixFlakes = throw "don't want to use pkgs.nixFlakes";
nixStable = throw "don't want to use pkgs.nixStable";
nixUnstable = throw "don't want to use pkgs.nixUnstable";
nixStatic = throw "don't want to use pkgs.nixStatic";
})
];
};
testScript = ''

View file

@ -3,7 +3,6 @@
}:
let
version = "1.3.3";
airwave-src = fetchFromGitHub {
@ -38,7 +37,8 @@ let
in
multiStdenv.mkDerivation {
name = "airwave-${version}";
pname = "airwave";
inherit version;
src = airwave-src;

View file

@ -1,12 +1,11 @@
{ lib, stdenv, fetchurl, alsa-lib, jack2, minixml, pkg-config }:
stdenv.mkDerivation rec {
name = packageName + "-" + version ;
packageName = "aj-snapshot" ;
pname = "aj-snapshot" ;
version = "0.9.9";
src = fetchurl {
url = "mirror://sourceforge/${packageName}/${name}.tar.bz2";
url = "mirror://sourceforge/aj-snapshot/aj-snapshot-${version}.tar.bz2";
sha256 = "0z8wd5yvxdmw1h1rj6km9h01xd4xmp4d86gczlix7hsc7zrf0wil";
};

View file

@ -12,7 +12,7 @@
}:
stdenv.mkDerivation rec {
name = "ams";
pname = "ams";
version = "unstable-2019-04-27";
src = fetchgit {

View file

@ -2,7 +2,7 @@
pulseaudio }:
bitwig-studio1.overrideAttrs (oldAttrs: rec {
name = "bitwig-studio-${version}";
pname = "bitwig-studio";
version = "2.5";
src = fetchurl {

View file

@ -22,7 +22,7 @@
}:
stdenv.mkDerivation rec {
name = "cardinal-${version}";
pname = "cardinal";
version = "22.02";
src = fetchurl {

View file

@ -4,11 +4,11 @@
}:
stdenv.mkDerivation rec {
name = "cmt";
pname = "cmt";
version = "1.17";
src = fetchurl {
url = "http://www.ladspa.org/download/${name}_${version}.tgz";
url = "http://www.ladspa.org/download/cmt_${version}.tgz";
sha256 = "07xd0xmwpa0j12813jpf87fr9hwzihii5l35mp8ady7xxfmxfmpb";
};

View file

@ -112,6 +112,5 @@ stdenv.mkDerivation rec {
license = licenses.gpl2;
platforms = [ "x86_64-linux" "i686-linux" ];
maintainers = [ maintainers.abbradar ];
repositories.git = "https://github.com/Alexey-Yakovenko/deadbeef";
};
}

View file

@ -2,6 +2,7 @@
, lib
, rustPlatform
, fetchFromGitLab
, fetchpatch
, meson
, ninja
, gettext
@ -31,6 +32,16 @@ stdenv.mkDerivation rec {
sha256 = "00vy1qkkpn76jdpybsq9qp8s6fh1ih10j73p2x43sl97m5g8944h";
};
patches = [
# Fix build with meson 0.61, can be removed on next release.
# podcasts-gtk/resources/meson.build:5:0: ERROR: Function does not take positional arguments.
# podcasts-gtk/resources/meson.build:30:0: ERROR: Function does not take positional arguments.
(fetchpatch {
url = "https://gitlab.gnome.org/World/podcasts/-/commit/6614bb62ecbec7c3b18ea7fe44beb50fe7942b27.patch";
sha256 = "3TVKFV9V6Ofdajgkdc+j+yxsU21C4JWSc6GjLExSM00=";
})
];
cargoDeps = rustPlatform.fetchCargoTarball {
inherit src;
name = "${pname}-${version}";

View file

@ -4,7 +4,7 @@
stdenv.mkDerivation rec {
version = "0.95.0";
name = "jamin-${version}";
pname = "jamin";
src = fetchurl {
url = "mirror://sourceforge/jamin/jamin-${version}.tar.gz";

View file

@ -1,6 +1,6 @@
{ lib, stdenv, fetchFromGitHub, faust2jaqt, faust2lv2 }:
stdenv.mkDerivation rec {
name = "faustCompressors-v${version}";
pname = "faustCompressors";
version = "1.2";
src = fetchFromGitHub {

View file

@ -1,10 +1,13 @@
{ lib, stdenv, fetchurl, alsa-lib, libX11, libXi, libXtst, xorgproto }:
{ lib, stdenv, fetchFromGitHub, alsa-lib, libX11, libXi, libXtst, xorgproto }:
stdenv.mkDerivation rec {
name = "mid2key-r1";
pname = "mid2key";
version = "1";
src = fetchurl {
url = "http://mid2key.googlecode.com/files/${name}.tar.gz";
src = fetchFromGitHub {
owner = "dnschneid";
repo = "mid2key";
rev = "v${version}";
sha256 = "0j2vsjvdgx51nd1qmaa18mcy0yw9pwrhbv2mdwnf913bwsk4y904";
};

View file

@ -1,8 +1,7 @@
{ stdenv, fetchurl, lib, libX11, libXext, alsa-lib, freetype, brand, type, version, homepage, url, sha256, ... }:
stdenv.mkDerivation rec {
inherit type;
baseName = "${type}-Edit";
name = "${lib.toLower baseName}-${version}";
pname = "${lib.toLower type}-edit";
inherit version;
src = fetchurl {
inherit url;
@ -15,7 +14,7 @@ stdenv.mkDerivation rec {
installPhase = ''
mkdir -p $out/bin
cp ${baseName} $out/bin
cp ${pname} $out/bin
'';
preFixup = let
# we prepare our library path in the let clause to avoid it become part of the input of mkDerivation
@ -30,7 +29,7 @@ stdenv.mkDerivation rec {
patchelf \
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath "${libPath}" \
$out/bin/${baseName}
$out/bin/${pname}
'';
meta = with lib; {

View file

@ -6,15 +6,14 @@
python3.pkgs.buildPythonApplication rec {
pname = "mopidy-youtube";
version = "3.4";
disabled = python3.pythonOlder "3.7";
version = "3.5";
format = "setuptools";
src = fetchFromGitHub {
owner = "natumbri";
repo = pname;
rev = "v${version}";
sha256 = "0lm6nn926qkrwzvj64yracdixfrnv5zk243msjskrnlzkhgk01rk";
hash = "sha256-hlokysFFgZZYY7flghgRq6wVG824kpcLkXxk6nMhxn4=";
};
propagatedBuildInputs = with python3.pkgs; [
@ -39,8 +38,10 @@ python3.pkgs.buildPythonApplication rec {
];
disabledTestPaths = [
# Fails with an import error
# Disable tests which interact with Youtube
"tests/test_api.py"
"tests/test_backend.py"
"tests/test_youtube.py"
];
pythonImportsCheck = [

View file

@ -32,6 +32,5 @@ stdenv.mkDerivation rec {
license = licenses.gpl2;
platforms = platforms.darwin;
maintainers = [];
repositories.git = "https://github.com/musescore/MuseScore";
};
}

View file

@ -51,6 +51,5 @@ mkDerivation rec {
license = licenses.gpl2;
maintainers = with maintainers; [ vandenoever turion doronbehar ];
platforms = platforms.linux;
repositories.git = "https://github.com/musescore/MuseScore";
};
}

View file

@ -10,13 +10,13 @@
}:
stdenv.mkDerivation rec {
name = "qmidiarp";
pname = "qmidiarp";
version = "0.6.5";
src = fetchgit {
url = "https://git.code.sf.net/p/qmidiarp/code";
sha256 = "1g2143gzfbihqr2zi3k2v1yn1x3mwfbb2khmcd4m4cq3hcwhhlx9";
rev = "qmidiarp-0.6.5";
rev = "qmidiarp-${version}";
};
nativeBuildInputs = [

View file

@ -58,6 +58,5 @@ mkDerivation rec {
license = licenses.gpl2Plus;
platforms = platforms.linux;
maintainers = [ maintainers.bjornfor ];
repositories.svn = "https://svn.code.sf.net/p/qmmp-dev/code";
};
}

View file

@ -1,7 +1,6 @@
{ lib, stdenv, fetchFromGitHub, lv2, pkg-config, libGLU, libGL, cairo, pango, libjack2 }:
let
name = "sisco.lv2-${version}";
version = "0.7.0";
robtkVersion = "80a2585253a861c81f0bfb7e4579c75f5c73af89";
@ -22,7 +21,8 @@ let
};
in
stdenv.mkDerivation rec {
inherit name;
pname = "sisco.lv2";
inherit version;
srcs = [ src robtkSrc ];
sourceRoot = src.name;

View file

@ -1,6 +1,7 @@
{ lib
, stdenv
, fetchurl
, fetchpatch
, meson
, ninja
, pkg-config
@ -28,6 +29,15 @@ stdenv.mkDerivation rec {
sha256 = "08d5d81rz9sj3m5paw8fwbgxmhlbr7bcjdzpmzj832qvg8smydxf";
};
patches = [
# Fix build with meson 0.61
# data/meson.build:2:5: ERROR: Function does not take positional arguments.
(fetchpatch {
url = "https://gitlab.gnome.org/GNOME/sound-juicer/-/commit/9f97ca1faca396099f52264a9729aa355f8d122e.patch";
sha256 = "8JllVSQgI7KiBI5WP6QtXRiggYuD89NSJJp1hP4Dbao=";
})
];
nativeBuildInputs = [
meson
ninja

View file

@ -45,7 +45,7 @@ let runtimeDeps = []
in
mkDerivation rec {
name = "soundkonverter";
pname = "soundkonverter";
version = "3.0.1";
src = fetchFromGitHub {
owner = "dfaust";

View file

@ -6,7 +6,7 @@
with lib;
stdenv.mkDerivation rec {
name = "bitcoin" + (toString (optional (!withGui) "d")) + "-unlimited-" + version;
pname = "bitcoin" + optionalString (!withGui) "d" + "-unlimited";
version = "1.9.2.0";
src = fetchFromGitHub {

View file

@ -6,7 +6,7 @@
with lib;
stdenv.mkDerivation rec {
name = "dogecoin" + (toString (optional (!withGui) "d")) + "-" + version;
pname = "dogecoin" + optionalString (!withGui) "d";
version = "1.14.5";
src = fetchFromGitHub {

View file

@ -11,8 +11,7 @@
with lib;
mkDerivation rec {
name = "litecoin" + (toString (optional (!withGui) "d")) + "-" + version;
pname = "litecoin" + optionalString (!withGui) "d";
version = "0.18.1";
src = fetchFromGitHub {

View file

@ -3,8 +3,8 @@
with lib;
stdenv.mkDerivation rec {
pname = "namecoin" + optionalString (!withGui) "d";
version = "nc22.0";
name = "namecoin" + toString (optional (!withGui) "d") + "-" + version;
src = fetchFromGitHub {
owner = "namecoin";

View file

@ -1,17 +1,17 @@
{ lib, fetchFromGitHub, rustPlatform, ncurses }:
rustPlatform.buildRustPackage {
rustPlatform.buildRustPackage rec {
pname = "hexdino";
version = "0.1.0";
version = "0.1.1";
src = fetchFromGitHub {
owner = "Luz";
repo = "hexdino";
rev = "de5b5d7042129f57e0ab36416a06476126bce389";
sha256 = "11mz07735gxqfamjcjjmxya6swlvr1p77sgd377zjcmd6z54gwyf";
repo = pname;
rev = version;
sha256 = "1n8gizawx8h58hpyyqivp7vwy7yhn6scipl5rrbvkpnav8qpmk1r";
};
cargoSha256 = "1hpndmpk1zlfvb4r95m13yvnsbjkwgw4pb9ala2d5yzfp38225nm";
cargoSha256 = "01869b1d7gbsprcxxj7h9z16pvnzb02j2hywh97gfq5x96gnmkz3";
buildInputs = [ ncurses ];

View file

@ -5,7 +5,7 @@
}:
{ meta
, name
, pname
, product
, productShort ? product
, src
@ -17,7 +17,7 @@ let
loname = lib.toLower productShort;
in
stdenvNoCC.mkDerivation {
inherit meta src version;
inherit pname meta src version;
desktopName = product;
installPhase = ''
runHook preInstall
@ -32,6 +32,5 @@ in
runHook postInstall
'';
nativeBuildInputs = [ undmg ];
pname = lib.concatStringsSep "-" (lib.init (lib.splitString "-" name));
sourceRoot = ".";
}

View file

@ -24,9 +24,9 @@ let
# Sorted alphabetically
buildClion = { name, version, src, license, description, wmClass, ... }:
buildClion = { pname, version, src, license, description, wmClass, ... }:
(mkJetBrainsProduct {
inherit name version src wmClass jdk;
inherit pname version src wmClass jdk;
product = "CLion";
meta = with lib; {
homepage = "https://www.jetbrains.com/clion/";
@ -62,9 +62,9 @@ let
'';
});
buildDataGrip = { name, version, src, license, description, wmClass, ... }:
buildDataGrip = { pname, version, src, license, description, wmClass, ... }:
(mkJetBrainsProduct {
inherit name version src wmClass jdk;
inherit pname version src wmClass jdk;
product = "DataGrip";
meta = with lib; {
homepage = "https://www.jetbrains.com/datagrip/";
@ -78,9 +78,9 @@ let
};
});
buildGoland = { name, version, src, license, description, wmClass, ... }:
buildGoland = { pname, version, src, license, description, wmClass, ... }:
(mkJetBrainsProduct {
inherit name version src wmClass jdk;
inherit pname version src wmClass jdk;
product = "Goland";
meta = with lib; {
homepage = "https://www.jetbrains.com/go/";
@ -106,9 +106,9 @@ let
'';
});
buildIdea = { name, version, src, license, description, wmClass, product, ... }:
buildIdea = { pname, version, src, license, description, wmClass, product, ... }:
(mkJetBrainsProduct {
inherit name version src wmClass jdk product;
inherit pname version src wmClass jdk product;
productShort = "IDEA";
extraLdPath = [ zlib ];
extraWrapperArgs = [
@ -129,9 +129,9 @@ let
};
});
buildMps = { name, version, src, license, description, wmClass, product, ... }:
buildMps = { pname, version, src, license, description, wmClass, product, ... }:
(mkJetBrainsProduct rec {
inherit name version src wmClass jdk product;
inherit pname version src wmClass jdk product;
productShort = "MPS";
meta = with lib; {
homepage = "https://www.jetbrains.com/mps/";
@ -146,9 +146,9 @@ let
};
});
buildPhpStorm = { name, version, src, license, description, wmClass, ... }:
buildPhpStorm = { pname, version, src, license, description, wmClass, ... }:
(mkJetBrainsProduct {
inherit name version src wmClass jdk;
inherit pname version src wmClass jdk;
product = "PhpStorm";
meta = with lib; {
homepage = "https://www.jetbrains.com/phpstorm/";
@ -162,9 +162,9 @@ let
};
});
buildPycharm = { name, version, src, license, description, wmClass, product, ... }:
buildPycharm = { pname, version, src, license, description, wmClass, product, ... }:
(mkJetBrainsProduct {
inherit name version src wmClass jdk product;
inherit pname version src wmClass jdk product;
productShort = "PyCharm";
meta = with lib; {
homepage = "https://www.jetbrains.com/pycharm/";
@ -186,9 +186,9 @@ let
};
});
buildRider = { name, version, src, license, description, wmClass, ... }:
buildRider = { pname, version, src, license, description, wmClass, ... }:
(mkJetBrainsProduct {
inherit name version src wmClass jdk;
inherit pname version src wmClass jdk;
product = "Rider";
meta = with lib; {
homepage = "https://www.jetbrains.com/rider/";
@ -211,9 +211,9 @@ let
'');
});
buildRubyMine = { name, version, src, license, description, wmClass, ... }:
buildRubyMine = { pname, version, src, license, description, wmClass, ... }:
(mkJetBrainsProduct {
inherit name version src wmClass jdk;
inherit pname version src wmClass jdk;
product = "RubyMine";
meta = with lib; {
homepage = "https://www.jetbrains.com/ruby/";
@ -223,9 +223,9 @@ let
};
});
buildWebStorm = { name, version, src, license, description, wmClass, ... }:
buildWebStorm = { pname, version, src, license, description, wmClass, ... }:
(mkJetBrainsProduct {
inherit name version src wmClass jdk;
inherit pname version src wmClass jdk;
product = "WebStorm";
meta = with lib; {
homepage = "https://www.jetbrains.com/webstorm/";
@ -251,7 +251,7 @@ in
# Sorted alphabetically
clion = buildClion rec {
name = "clion-${version}";
pname = "clion";
version = products.clion.version;
description = "C/C++ IDE. New. Intelligent. Cross-platform";
license = lib.licenses.unfree;
@ -264,7 +264,7 @@ in
};
datagrip = buildDataGrip rec {
name = "datagrip-${version}";
pname = "datagrip";
version = products.datagrip.version;
description = "Your Swiss Army Knife for Databases and SQL";
license = lib.licenses.unfree;
@ -277,7 +277,7 @@ in
};
goland = buildGoland rec {
name = "goland-${version}";
pname = "goland";
version = products.goland.version;
description = "Up and Coming Go IDE";
license = lib.licenses.unfree;
@ -290,7 +290,7 @@ in
};
idea-community = buildIdea rec {
name = "idea-community-${version}";
pname = "idea-community";
product = "IntelliJ IDEA CE";
version = products.idea-community.version;
description = "Integrated Development Environment (IDE) by Jetbrains, community edition";
@ -304,7 +304,7 @@ in
};
idea-ultimate = buildIdea rec {
name = "idea-ultimate-${version}";
pname = "idea-ultimate";
product = "IntelliJ IDEA";
version = products.idea-ultimate.version;
description = "Integrated Development Environment (IDE) by Jetbrains, requires paid license";
@ -318,7 +318,7 @@ in
};
mps = buildMps rec {
name = "mps-${version}";
pname = "mps";
product = "MPS ${products.mps.version-major-minor}";
version = products.mps.version;
description = "Create your own domain-specific language";
@ -332,7 +332,7 @@ in
};
phpstorm = buildPhpStorm rec {
name = "phpstorm-${version}";
pname = "phpstorm";
version = products.phpstorm.version;
description = "Professional IDE for Web and PHP developers";
license = lib.licenses.unfree;
@ -345,7 +345,7 @@ in
};
pycharm-community = buildPycharm rec {
name = "pycharm-community-${version}";
pname = "pycharm-community";
product = "PyCharm CE";
version = products.pycharm-community.version;
description = "PyCharm Community Edition";
@ -359,7 +359,7 @@ in
};
pycharm-professional = buildPycharm rec {
name = "pycharm-professional-${version}";
pname = "pycharm-professional";
product = "PyCharm";
version = products.pycharm-professional.version;
description = "PyCharm Professional Edition";
@ -373,7 +373,7 @@ in
};
rider = buildRider rec {
name = "rider-${version}";
pname = "rider";
version = products.rider.version;
description = "A cross-platform .NET IDE based on the IntelliJ platform and ReSharper";
license = lib.licenses.unfree;
@ -386,7 +386,7 @@ in
};
ruby-mine = buildRubyMine rec {
name = "ruby-mine-${version}";
pname = "ruby-mine";
version = products.ruby-mine.version;
description = "The Most Intelligent Ruby and Rails IDE";
license = lib.licenses.unfree;
@ -399,7 +399,7 @@ in
};
webstorm = buildWebStorm rec {
name = "webstorm-${version}";
pname = "webstorm";
version = products.webstorm.version;
description = "Professional IDE for Web and JavaScript development";
license = lib.licenses.unfree;

View file

@ -3,30 +3,29 @@
, vmopts ? null
}:
{ name, product, productShort ? product, version, src, wmClass, jdk, meta, extraLdPath ? [], extraWrapperArgs ? [] }@args:
{ pname, product, productShort ? product, version, src, wmClass, jdk, meta, extraLdPath ? [], extraWrapperArgs ? [] }@args:
with lib;
let loName = toLower productShort;
hiName = toUpper productShort;
mainProgram = concatStringsSep "-" (init (splitString "-" name));
vmoptsName = loName
+ lib.optionalString stdenv.hostPlatform.is64bit "64"
+ ".vmoptions";
in
with stdenv; lib.makeOverridable mkDerivation (rec {
inherit name src;
meta = args.meta // { inherit mainProgram; };
inherit pname version src;
meta = args.meta // { mainProgram = pname; };
desktopItem = makeDesktopItem {
name = mainProgram;
exec = mainProgram;
name = pname;
exec = pname;
comment = lib.replaceChars ["\n"] [" "] meta.longDescription;
desktopName = product;
genericName = meta.description;
categories = [ "Development" ];
icon = mainProgram;
icon = pname;
startupWMClass = wmClass;
};
@ -62,16 +61,16 @@ with stdenv; lib.makeOverridable mkDerivation (rec {
installPhase = ''
runHook preInstall
mkdir -p $out/{bin,$name,share/pixmaps,libexec/${name}}
cp -a . $out/$name
ln -s $out/$name/bin/${loName}.png $out/share/pixmaps/${mainProgram}.png
mv bin/fsnotifier* $out/libexec/${name}/.
mkdir -p $out/{bin,$pname,share/pixmaps,libexec/${pname}}
cp -a . $out/$pname
ln -s $out/$pname/bin/${loName}.png $out/share/pixmaps/${pname}.png
mv bin/fsnotifier* $out/libexec/${pname}/.
jdk=${jdk.home}
item=${desktopItem}
makeWrapper "$out/$name/bin/${loName}.sh" "$out/bin/${mainProgram}" \
--prefix PATH : "$out/libexec/${name}:${lib.makeBinPath [ jdk coreutils gnugrep which git ]}" \
makeWrapper "$out/$pname/bin/${loName}.sh" "$out/bin/${pname}" \
--prefix PATH : "$out/libexec/${pname}:${lib.makeBinPath [ jdk coreutils gnugrep which git ]}" \
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath ([
# Some internals want libstdc++.so.6
stdenv.cc.cc.lib libsecret e2fsprogs

View file

@ -32,7 +32,8 @@ rec {
'';
sizedLogo = size: stdenv.mkDerivation {
name = ''octave-logo-${octave.version}-${size}x${size}.png'';
pname = "octave-logo-${size}x${size}.png";
inherit (octave) version;
src = octave.src;

View file

@ -1,4 +1,4 @@
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
{ lib, buildGoModule, fetchFromGitHub, installShellFiles, callPackage }:
buildGoModule rec {
pname = "micro";
@ -24,6 +24,8 @@ buildGoModule rec {
install -Dt $out/share/applications assets/packaging/micro.desktop
'';
passthru.tests.expect = callPackage ./test-with-expect.nix {};
meta = with lib; {
homepage = "https://micro-editor.github.io";
description = "Modern and intuitive terminal-based text editor";

View file

@ -0,0 +1,30 @@
{ micro, expect, runCommand, writeScript, runtimeShell }:
let expect-script = writeScript "expect-script" ''
#!${expect}/bin/expect -f
spawn micro file.txt
expect "file.txt"
send "Hello world!"
expect "Hello world!"
# Send ctrl-q (exit)
send "\021"
expect "Save changes to file.txt before closing?"
send "y"
expect eof
''; in
runCommand "micro-test-expect"
{
nativeBuildInputs = [ micro expect ];
passthru = { inherit expect-script; };
} ''
# Micro really wants a writable $HOME for its config directory.
export HOME=$(pwd)
expect -f ${expect-script}
grep "Hello world!" file.txt
touch $out
''

View file

@ -2,7 +2,7 @@
qmake, qtbase, qtxmlpatterns, qtsvg, qtscxml, qtquick1, libGLU }:
stdenv.mkDerivation rec {
name = "qxmledit-${version}" ;
pname = "qxmledit" ;
version = "0.9.15" ;
src = fetchFromGitHub ( lib.importJSON ./qxmledit.json ) ;
nativeBuildInputs = [ qmake ] ;

View file

@ -2,13 +2,13 @@
stdenv.mkDerivation rec {
pname = "fceux";
version = "2.6.3";
version = "2.6.4";
src = fetchFromGitHub {
owner = "TASEmulators";
repo = pname;
rev = "${pname}-${version}";
sha256 = "sha256-jNR9AB8s2S9ehYsompkV2GOLsaXIQzldeQ1WRCxdDG0=";
sha256 = "sha256-Q6r/iBlmi0z40+U6OLZCahS0io4IBBGZMP1mJH7szRM=";
};
nativeBuildInputs = [ cmake pkg-config wrapQtAppsHook ];

View file

@ -17,13 +17,13 @@
buildDotnetModule rec {
pname = "ryujinx";
version = "1.1.76"; # Based off of the official github actions builds: https://github.com/Ryujinx/Ryujinx/actions/workflows/release.yml
version = "1.1.77"; # Based off of the official github actions builds: https://github.com/Ryujinx/Ryujinx/actions/workflows/release.yml
src = fetchFromGitHub {
owner = "Ryujinx";
repo = "Ryujinx";
rev = "e2ffa5a125fcbe8a25c73d8e04c08c08ef378860";
sha256 = "1rmiyjqwlsbzh9q7d12n72ka9adaby2rfcbn75sf47p5857yi3p9";
rev = "df70442c46e7ee133b1fb79dc23ddd134e618085";
sha256 = "1m9msp7kxsj7251l2yjcfzrb4k1lisk9sip7acm22pxmi1a7gw73";
};
dotnet-sdk = dotnetCorePackages.sdk_6_0;

View file

@ -1,5 +1,5 @@
{ stdenv, lib, pkgArches, callPackage, makeSetupHook,
name, version, src, mingwGccs, monos, geckos, platforms,
pname, version, src, mingwGccs, monos, geckos, platforms,
bison, flex, fontforge, makeWrapper, pkg-config,
autoconf, hexdump, perl, nixosTests,
supportFlags,
@ -13,7 +13,7 @@ with import ./util.nix { inherit lib; };
let
patches' = patches;
prevName = name;
prevName = pname;
prevPlatforms = platforms;
prevConfigFlags = configureFlags;
setupHookDarwin = makeSetupHook {
@ -42,9 +42,9 @@ stdenv.mkDerivation ((lib.optionalAttrs (buildScript != null) {
make loader/wine64-preloader NIX_LDFLAGS="" NIX_LDFLAGS_${stdenv.cc.suffixSalt}=""
'';
}) // rec {
inherit src;
inherit version src;
name = if supportFlags.waylandSupport then "${prevName}-wayland" else prevName;
pname = prevName + lib.optionalString supportFlags.waylandSupport "wayland";
# Fixes "Compiler cannot create executables" building wineWow with mingwSupport
strictDeps = true;

View file

@ -9,7 +9,7 @@ let
vkd3d_i686 = pkgsi686Linux.callPackage ./vkd3d.nix { inherit moltenvk; };
in with src; {
wine32 = pkgsi686Linux.callPackage ./base.nix {
name = "wine-${version}";
pname = "wine";
inherit src version supportFlags patches moltenvk;
pkgArches = [ pkgsi686Linux ];
vkd3dArches = lib.optionals supportFlags.vkd3dSupport [ vkd3d_i686 ];
@ -19,7 +19,7 @@ in with src; {
platforms = [ "i686-linux" "x86_64-linux" ];
};
wine64 = callPackage ./base.nix {
name = "wine64-${version}";
pname = "wine64";
inherit src version supportFlags patches moltenvk;
pkgArches = [ pkgs ];
vkd3dArches = lib.optionals supportFlags.vkd3dSupport [ vkd3d ];
@ -30,7 +30,7 @@ in with src; {
platforms = [ "x86_64-linux" "x86_64-darwin" ];
};
wineWow = callPackage ./base.nix {
name = "wine-wow-${version}";
pname = "wine-wow";
inherit src version supportFlags patches moltenvk;
stdenv = stdenv_32bit;
pkgArches = [ pkgs pkgsi686Linux ];

View file

@ -5,7 +5,7 @@
}:
stdenv.mkDerivation rec {
name = "grass";
pname = "grass";
version = "7.8.6";
src = with lib; fetchFromGitHub {

View file

@ -11,11 +11,11 @@
stdenv.mkDerivation rec {
pname = "drawio";
version = "16.5.1";
version = "17.2.1";
src = fetchurl {
url = "https://github.com/jgraph/drawio-desktop/releases/download/v${version}/drawio-x86_64-${version}.rpm";
sha256 = "a8ebf2560820d2d05677b9b16fc863f555dde8235b3e34acd7916eee3544eaa9";
sha256 = "28019774a18f6e74c0d126346ae3551b5eb9c73aae13fe87f6d49120c183697a";
};
nativeBuildInputs = [

View file

@ -23,7 +23,6 @@ stdenv.mkDerivation rec {
meta = with lib; {
description = "A simple and fast image viewer for X";
homepage = "http://lxde.sourceforge.net/gpicview/";
repositories.git = "git://lxde.git.sourceforge.net/gitroot/lxde/gpicview";
license = licenses.gpl2;
maintainers = with maintainers; [ lovek323 ];
platforms = platforms.unix;

View file

@ -9,8 +9,8 @@
applytransforms = callPackage ./extensions/applytransforms { };
hexmap = stdenv.mkDerivation {
name = "hexmap";
version = "2020-06-06";
pname = "hexmap";
version = "unstable-2020-06-06";
src = fetchFromGitHub {
owner = "lifelike";

View file

@ -4,14 +4,12 @@
}:
stdenv.mkDerivation rec {
p_name = "mtPaint";
ver_maj = "3.50";
ver_min = "01";
name = "${p_name}-${ver_maj}.${ver_min}";
pname = "mtPaint";
version = "3.50.01";
src = fetchFromGitHub {
owner = "wjaguar";
repo = p_name;
repo = "mtPaint";
rev = "a4675ff5cd9fcd57d291444cb9f332b48f11243f";
sha256 = "04wqxz8i655gz5rnz90cksy8v6m2jhcn1j8rzhqpp5xhawlmq24y";
};

View file

@ -66,7 +66,6 @@ mkDerivation rec {
description = "Qt-based image viewer";
maintainers = with lib.maintainers; [ mindavi ];
license = licenses.gpl3Plus;
repositories.git = "https://github.com/nomacs/nomacs.git";
inherit (qtbase.meta) platforms;
};
}

View file

@ -0,0 +1,107 @@
{ lib
, stdenv
, fetchurl
, makeWrapper
, libX11
, libXext
, libXrandr
, freetype
, fontconfig
, libXrender
, libXinerama
, autoPatchelfHook
, libglvnd
, openal
, imagemagick
, makeDesktopItem
}:
let
version = "4.0";
arch =
if stdenv.hostPlatform.system == "x86_64-linux" then
"x64"
else if stdenv.hostPlatform.system == "i686-linux" then
"x86"
else
throw "Unsupported platform ${stdenv.hostPlatform.system}";
desktopItem = makeDesktopItem {
name = "Heaven";
exec = "heaven";
genericName = "A GPU Stress test tool from the UNIGINE";
icon = "Heaven";
desktopName = "Heaven Benchmark";
};
in
stdenv.mkDerivation
{
pname = "unigine-heaven";
inherit version;
src = fetchurl {
url = "https://assets.unigine.com/d/Unigine_Heaven-${version}.run";
sha256 = "19rndwwxnb9k2nw9h004hyrmr419471s0fp25yzvvc6rkd521c0v";
};
installPhase =
''
sh $src --target $name
mkdir -p $out/lib/unigine/heaven/bin
mkdir -p $out/bin
mkdir -p $out/share/applications/
mkdir -p $out/share/icons/hicolor
install -m 0755 $name/bin/browser_${arch} $out/lib/unigine/heaven/bin
install -m 0755 $name/bin/libApp{Stereo,Surround,Wall}_${arch}.so $out/lib/unigine/heaven/bin
install -m 0755 $name/bin/libGPUMonitor_${arch}.so $out/lib/unigine/heaven/bin
install -m 0755 $name/bin/libQt{Core,Gui,Network,WebKit,Xml}Unigine_${arch}.so.4 $out/lib/unigine/heaven/bin
install -m 0755 $name/bin/libUnigine_${arch}.so $out/lib/unigine/heaven/bin
install -m 0755 $name/bin/heaven_${arch} $out/lib/unigine/heaven/bin
install -m 0755 $name/heaven $out/bin/heaven
cp -R $name/data $name/documentation $out/lib/unigine/heaven
wrapProgram $out/bin/heaven --prefix LD_LIBRARY_PATH : ${libglvnd}/lib:$out/bin:${openal}/lib --run "cd $out/lib/unigine/heaven/"
convert $out/lib/unigine/heaven/data/launcher/icon.png -resize 128x128 $out/share/icons/Heaven.png
for RES in 16 24 32 48 64 128 256
do
mkdir -p $out/share/icons/hicolor/"$RES"x"$RES"/apps
convert $out/lib/unigine/heaven/data/launcher/icon.png -resize "$RES"x"$RES" $out/share/icons/hicolor/"$RES"x"$RES"/apps/Heaven.png
done
ln -s ${desktopItem}/share/applications/* $out/share/applications
'';
nativeBuildInputs =
[
autoPatchelfHook
makeWrapper
imagemagick
];
buildInputs =
[
libX11
stdenv.cc.cc
libXext
libXrandr
freetype
fontconfig
libXrender
libXinerama
];
dontUnpack = true;
meta =
{
description = "The Unigine Heaven GPU benchmarking tool";
homepage = "https://benchmark.unigine.com/heaven";
license = lib.licenses.unfree;
maintainers = [ lib.maintainers.BarinovMaxim ];
platforms = [ "x86_64-linux" "i686-linux" ];
};
}

View file

@ -10,9 +10,9 @@ in
stdenv.mkDerivation rec {
version = "0.4.8.2016";
name = "xournal-" + version;
pname = "xournal";
src = fetchurl {
url = "mirror://sourceforge/xournal/${name}.tar.gz";
url = "mirror://sourceforge/xournal/xournal-${version}.tar.gz";
sha256 = "09i88v3wacmx7f96dmq0l3afpyv95lh6jrx16xzm0jd1szdrhn5j";
};
@ -30,7 +30,7 @@ stdenv.mkDerivation rec {
+ lib.optionalString (!isGdkQuartzBackend) " -lX11";
desktopItem = makeDesktopItem {
name = name;
name = "xournal-${version}";
exec = "xournal";
icon = "xournal";
desktopName = "Xournal";

View file

@ -2,11 +2,11 @@
stdenv.mkDerivation {
pname = "avrdudess";
version = "2.2.20140102";
version = "2.13";
src = fetchurl {
url = "http://blog.zakkemble.co.uk/download/avrdudess_20140102.zip";
sha256 = "18llpvjsfhypzijrvfbzmcg3g141f307mzsrg11wcdxh9syxqak6";
url = "https://github.com/ZakKemble/AVRDUDESS/releases/download/v2.13/AVRDUDESS-2.13-portable.zip";
sha256 = "0fpvc19fb14ppqfb2yg821szmhyanxcp5chfldf8yh51f64zihv9";
};
nativeBuildInputs = [ unzip ];
@ -36,7 +36,8 @@ stdenv.mkDerivation {
meta = with lib; {
description = "GUI for AVRDUDE (AVR microcontroller programmer)";
homepage = "https://github.com/zkemble/AVRDUDESS";
homepage = "https://blog.zakkemble.net/avrdudess-a-gui-for-avrdude/";
changelog = "https://github.com/ZakKemble/AVRDUDESS/blob/v${version}/Changelog.txt";
license = licenses.gpl3;
platforms = platforms.linux;
maintainers = [ maintainers.bjornfor ];

View file

@ -1,10 +1,8 @@
{ lib, stdenv, fetchsvn, libxml2, gtk2, curl, pkg-config } :
let
stdenv.mkDerivation rec {
pname = "gosmore";
version = "31801";
in
stdenv.mkDerivation {
name = "gosmore-r${version}";
# the gosmore svn repository does not lock revision numbers of its externals
# so we explicitly disable them to avoid breaking the hash
# especially as the externals appear to be unused

View file

@ -3,8 +3,8 @@
}:
stdenv.mkDerivation rec {
name = "lighthouse-${date}";
date = "2016-07-20";
pname = "lighthouse";
version = "unstable-2016-07-20";
src = fetchFromGitHub {
owner = "emgram769";

View file

@ -2,7 +2,6 @@
let
version = "0.9.3-3";
name = "mucommander-${version}";
src = fetchFromGitHub {
owner = "mucommander";
@ -34,8 +33,8 @@ let
# fake build to pre-download deps into fixed-output derivation
deps = stdenv.mkDerivation {
name = "${name}-deps";
inherit src postPatch;
pname = "mucommander-deps";
inherit version src postPatch;
nativeBuildInputs = [ gradle_6 perl ];
buildPhase = ''
export GRADLE_USER_HOME=$(mktemp -d)
@ -53,7 +52,8 @@ let
};
in stdenv.mkDerivation {
inherit name src postPatch;
pname = "mucommander";
inherit version src postPatch;
nativeBuildInputs = [ gradle_6 perl makeWrapper ];
buildPhase = ''

View file

@ -82,7 +82,6 @@ in stdenv.mkDerivation rec {
meta = with lib; {
homepage = "https://mupdf.com";
repositories.git = "git://git.ghostscript.com/mupdf.git";
description = "Lightweight PDF, XPS, and E-book viewer and toolkit written in portable C";
license = licenses.agpl3Plus;
maintainers = with maintainers; [ vrthra fpletz ];

View file

@ -111,7 +111,6 @@ stdenv.mkDerivation rec {
meta = with lib; {
homepage = "https://mupdf.com";
repositories.git = "git://git.ghostscript.com/mupdf.git";
description = "Lightweight PDF, XPS, and E-book viewer and toolkit written in portable C";
license = licenses.agpl3Plus;
maintainers = with maintainers; [ vrthra fpletz ];

View file

@ -49,7 +49,6 @@ stdenv.mkDerivation rec {
It uses a layered approach to connect all of the parts.
'';
homepage = "https://networkupstools.org/";
repositories.git = "https://github.com/networkupstools/nut.git";
platforms = platforms.linux;
maintainers = [ maintainers.pierron ];
license = with licenses; [ gpl1Plus gpl2Plus gpl3Plus ];

View file

@ -49,8 +49,9 @@ let
desktopName = "Obsidian";
comment = "Knowledge base";
icon = "obsidian";
exec = "obsidian";
exec = "obsidian %u";
categories = [ "Office" ];
mimeTypes = [ "x-scheme-handler/obsidian" ];
};
inherit pname version src;

View file

@ -34,6 +34,47 @@ let
(mkOverride "markdown" "3.1.1" "2e50876bcdd74517e7b71f3e7a76102050edec255b3983403f1a63e7c8a41e7a")
(mkOverride "markupsafe" "1.1.1" "29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b")
# black uses hash, not sha256 identifier. Newer black version requires newer click version
(
self: super: {
black = super.black.overridePythonAttrs (oldAttrs: rec {
version = "21.12b0";
src = oldAttrs.src.override {
inherit version;
hash = "sha256-d7gPaTpWni5SeVhFljTxjfmwuiYluk4MLV2lvkLm8rM=";
};
doCheck = false;
});
}
)
# tests need network
(
self: super: {
curio = super.curio.overridePythonAttrs (oldAttrs: rec {
disabledTests = [
"test_timeout"
"test_ssl_outgoing"
];
});
}
)
# tests need network
(
self: super: {
trio = super.trio.overridePythonAttrs (oldAttrs: rec {
disabledTests = [
"test_local_address_real"
];
disabledTestPaths = [
"trio/tests/test_exports.py"
"trio/tests/test_socket.py"
];
});
}
)
# Requires flask<2, cannot mkOverride because tests need to be disabled
(
self: super: {
@ -400,7 +441,7 @@ let
homepage = "https://octoprint.org/";
description = "The snappy web interface for your 3D printer";
license = licenses.agpl3Only;
maintainers = with maintainers; [ abbradar gebner WhittlesJr ];
maintainers = with maintainers; [ abbradar gebner WhittlesJr gador ];
};
};
}

View file

@ -1,9 +1,7 @@
{ lib, python2Packages, fetchurl, xpdf }:
let
py = python2Packages;
in
py.buildPythonApplication rec {
name = "pdfdiff-${version}";
python2Packages.buildPythonApplication rec {
pname = "pdfdiff";
version = "0.92";
src = fetchurl {

View file

@ -3,13 +3,12 @@
, webkitgtk, discount, json-glib }:
stdenv.mkDerivation rec {
name = "${product}-${version}";
product = "pdfpc";
pname = "pdfpc";
version = "4.5.0";
src = fetchFromGitHub {
repo = product;
owner = product;
repo = "pdfpc";
owner = "pdfpc";
rev = "v${version}";
sha256 = "0bmy51w6ypz927hxwp5g7wapqvzqmsi3w32rch6i3f94kg1152ck";
};

View file

@ -1,12 +1,11 @@
{ lib, stdenv, fetchurl, qmake4Hook, unzip, qt4 }:
stdenv.mkDerivation rec {
name = "${project}-${version}";
project = "qmetro";
pname = "qmetro";
version = "0.7.1";
src = fetchurl {
url = "mirror://sourceforge/${project}/${name}.zip";
url = "mirror://sourceforge/qmetro/qmetro-${version}.zip";
sha256 = "1zdj87lzcr43gr2h05g17z31pd22n5kxdwbvx7rx656rmhv0sjq5";
};

View file

@ -1,10 +1,8 @@
{ lib, stdenv, mkDerivation, fetchgit, zlib, libGLU, libX11, qtbase, qtwebkit, qtserialport, wrapQtAppsHook }:
let
name = "sleepyhead-${version}";
mkDerivation {
pname = "sleepyhead";
version = "1.0.0-beta-git";
in mkDerivation {
inherit name;
src = fetchgit {
url = "https://gitlab.com/sleepyhead/sleepyhead-code.git";

View file

@ -1,30 +1,19 @@
{lib, stdenv, fetchhg}:
let
s =
rec {
baseName = "slmenu";
version = "hg-${date}";
date = "2012-02-01";
name = "${baseName}-${version}";
stdenv.mkDerivation {
pname = "slmenu";
version = "hg-2012-02-01";
src = fetchhg {
url = "https://bitbucket.org/rafaelgg/slmenu/";
rev = "7e74fa5db73e8b018da48d50dbbaf11cb5c62d13";
sha256 = "0zb7mm8344d3xmvrl62psazcabfk75pp083jqkmywdsrikgjagv6";
};
buildInputs = [
];
in
stdenv.mkDerivation {
inherit (s) name version;
inherit buildInputs;
src = fetchhg {
inherit (s) url sha256;
};
makeFlags = [ "PREFIX=$(out)" ];
meta = {
inherit (s) version;
meta = with lib; {
description = "A console dmenu-like tool";
license = lib.licenses.mit;
maintainers = [lib.maintainers.raskin];
platforms = lib.platforms.linux;
license = licenses.mit;
maintainers = with maintainers; [ raskin ];
platforms = platforms.linux;
};
}

View file

@ -13,15 +13,15 @@
}:
python3Packages.buildPythonApplication rec {
name = "tuhi";
pname = "tuhi";
version = "0.5";
format = "other";
src = fetchFromGitHub {
owner = "tuhiproject";
repo = name;
rev = "${version}";
repo = "tuhi";
rev = version;
sha256 = "17kggm9c423vj7irxx248fjc8sxvkp9w1mgawlx1snrii817p3db";
};

View file

@ -1,15 +1,15 @@
{ lib, stdenv, fetchurl, ncurses, autoreconfHook }:
stdenv.mkDerivation rec {
version = "0.9";
pname = "urlview";
_version = "0.9";
patchLevel = "19";
name = "urlview-${version}-${patchLevel}";
version = "${_version}-${patchLevel}";
urlBase = "mirror://debian/pool/main/u/urlview/";
src = fetchurl {
url = urlBase + "urlview_${version}.orig.tar.gz";
url = urlBase + "urlview_${_version}.orig.tar.gz";
sha256 = "746ff540ccf601645f500ee7743f443caf987d6380e61e5249fc15f7a455ed42";
};
@ -25,7 +25,7 @@ stdenv.mkDerivation rec {
'';
debianPatches = fetchurl {
url = urlBase + "urlview_${version}-${patchLevel}.diff.gz";
url = urlBase + "urlview_${_version}-${patchLevel}.diff.gz";
sha256 = "056883c17756f849fb9235596d274fbc5bc0d944fcc072bdbb13d1e828301585";
};

View file

@ -11,7 +11,7 @@ let
in
stdenv'.mkDerivation rec {
name = "xmr-stak-${version}";
pname = "xmr-stak";
version = "2.10.8";
src = fetchFromGitHub {

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