Merge branch 'master' into staging-next

A few thousand rebuilds per platform have arrived in the meantime.
This commit is contained in:
Vladimír Čunát 2020-09-11 14:18:32 +02:00
commit e88e14ec8d
No known key found for this signature in database
GPG Key ID: E747DF1F9575A3AA
465 changed files with 11188 additions and 4896 deletions

6
.github/CODEOWNERS vendored
View File

@ -83,9 +83,9 @@
/pkgs/development/haskell-modules/hoogle.nix @cdepillabout
# Perl
/pkgs/development/interpreters/perl @volth
/pkgs/top-level/perl-packages.nix @volth
/pkgs/development/perl-modules @volth
/pkgs/development/interpreters/perl @volth @stigtsp
/pkgs/top-level/perl-packages.nix @volth @stigtsp
/pkgs/development/perl-modules @volth @stigtsp
# R
/pkgs/applications/science/math/R @peti

View File

@ -1 +1 @@
20.09
21.03

View File

@ -117,7 +117,9 @@ deis = buildGoPackage rec {
goDeps = ./deps.nix; <co xml:id='ex-buildGoPackage-3' />
buildFlags = [ "--tags" "release" ]; <co xml:id='ex-buildGoPackage-4' />
deleteVendor = true; <co xml:id='ex-buildGoPackage-4' />
buildFlags = [ "--tags" "release" ]; <co xml:id='ex-buildGoPackage-5' />
}
</programlisting>
</example>
@ -144,6 +146,11 @@ deis = buildGoPackage rec {
</para>
</callout>
<callout arearefs='ex-buildGoPackage-4'>
<para>
<varname>deleteVendor</varname> removes the pre-existing vendor directory. This should only be used if the dependencies included in the vendor folder are broken or incomplete.
</para>
</callout>
<callout arearefs='ex-buildGoPackage-5'>
<para>
<varname>buildFlags</varname> is a list of flags passed to the go build command.
</para>

View File

@ -50,7 +50,7 @@ rustPlatform.buildRustPackage rec {
`buildRustPackage` requires a `cargoSha256` attribute which is computed over
all crate sources of this package. Currently it is obtained by inserting a
fake checksum into the expression and building the package once. The correct
checksum can be then take from the failed build.
checksum can then be taken from the failed build.
Per the instructions in the [Cargo Book](https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html)
best practices guide, Rust applications should always commit the `Cargo.lock`

View File

@ -184,6 +184,17 @@ self: super:
The Nixpkgs attribute is <literal>mkl</literal>.
</para>
</listitem>
<listitem>
<para>
<link
xlink:href="https://github.com/flame/blis">BLIS</link>
</para>
<para>
BLIS, available through the attribute
<literal>blis</literal>, is a framework for linear algebra kernels. In
addition, it implements the BLAS interface.
</para>
</listitem>
<listitem>
<para>
<link
@ -191,10 +202,13 @@ self: super:
BLIS/LIBFLAME</link> (optimized for modern AMD x86_64 CPUs)
</para>
<para>
The AMD BLIS library, with attribute <literal>amd-blis</literal>,
provides a BLAS implementation. The complementary AMD LIBFLAME
library, with attribute <literal>amd-libflame</literal>, provides
a LAPACK implementation.
The AMD fork of the BLIS library, with attribute
<literal>amd-blis</literal>, extends BLIS with optimizations for
modern AMD CPUs. The changes are usually submitted to
the upstream BLIS project after some time. However, AMD BLIS
typically provides some performance improvements on AMD Zen CPUs.
The complementary AMD LIBFLAME library, with attribute
<literal>amd-libflame</literal>, provides a LAPACK implementation.
</para>
</listitem>
</itemizedlist>

View File

@ -448,11 +448,6 @@ lib.mapAttrs (n: v: v // { shortName = n; }) {
free = false;
};
jasper = spdx {
spdxId = "JasPer-2.0";
fullName = "JasPer License";
};
lgpl2Only = spdx {
spdxId = "LGPL-2.0-only";
fullName = "GNU Library General Public License v2 only";

View File

@ -457,7 +457,11 @@ rec {
# yield a value computed from the definitions
value = if opt ? apply then opt.apply res.mergedValue else res.mergedValue;
in opt //
warnDeprecation =
if opt.type.deprecationMessage == null then id
else warn "The type `types.${opt.type.name}' of option `${showOption loc}' defined in ${showFiles opt.declarations} is deprecated. ${opt.type.deprecationMessage}";
in warnDeprecation opt //
{ value = builtins.addErrorContext "while evaluating the option `${showOption loc}':" value;
inherit (res.defsFinal') highestPrio;
definitions = map (def: def.value) res.defsFinal;

View File

@ -60,7 +60,7 @@ rec {
};
predicates = let
featureSupport = feature: x: builtins.elem feature features.${x};
featureSupport = feature: x: builtins.elem feature features.${x} or [];
in {
sse3Support = featureSupport "sse3";
ssse3Support = featureSupport "ssse3";

View File

@ -47,7 +47,7 @@ rec {
armv7a-android-prebuilt = {
config = "armv7a-unknown-linux-androideabi";
sdkVer = "29";
ndkVer = "18b";
ndkVer = "21";
platform = platforms.armv7a-android;
useAndroidPrebuilt = true;
};
@ -55,7 +55,7 @@ rec {
aarch64-android-prebuilt = {
config = "aarch64-unknown-linux-android";
sdkVer = "29";
ndkVer = "18b";
ndkVer = "21";
platform = platforms.aarch64-multiplatform;
useAndroidPrebuilt = true;
};

View File

@ -542,4 +542,30 @@ runTests {
name = "";
expected = "unknown";
};
testFreeformOptions = {
expr =
let
submodule = { lib, ... }: {
freeformType = lib.types.attrsOf (lib.types.submodule {
options.bar = lib.mkOption {};
});
options.bar = lib.mkOption {};
};
module = { lib, ... }: {
options.foo = lib.mkOption {
type = lib.types.submodule submodule;
};
};
options = (evalModules {
modules = [ module ];
}).options;
locs = filter (o: ! o.internal) (optionAttrSetToDocList options);
in map (o: o.loc) locs;
expected = [ [ "foo" ] [ "foo" "<name>" "bar" ] [ "foo" "bar" ] ];
};
}

View File

@ -171,7 +171,7 @@ rec {
On each release the first letter is bumped and a new animal is chosen
starting with that new letter.
*/
codeName = "Nightingale";
codeName = "Okapi";
/* Returns the current nixpkgs version suffix as string. */
versionSuffix =

View File

@ -91,9 +91,12 @@ rec {
# combinable with the binOp binary operation.
# binOp: binary operation that merge two payloads of the same type.
functor ? defaultFunctor name
, # The deprecation message to display when this type is used by an option
# If null, the type isn't deprecated
deprecationMessage ? null
}:
{ _type = "option-type";
inherit name check merge emptyValue getSubOptions getSubModules substSubModules typeMerge functor;
inherit name check merge emptyValue getSubOptions getSubModules substSubModules typeMerge functor deprecationMessage;
description = if description == null then name else description;
};
@ -222,8 +225,10 @@ rec {
# Deprecated; should not be used because it quietly concatenates
# strings, which is usually not what you want.
string = warn "types.string is deprecated because it quietly concatenates strings"
(separatedString "");
string = separatedString "" // {
name = "string";
deprecationMessage = "See https://github.com/NixOS/nixpkgs/pull/66346 for better alternative types.";
};
attrs = mkOptionType {
name = "attrs";
@ -252,9 +257,6 @@ rec {
merge = mergeEqualOption;
};
# TODO: drop this in the future:
list = builtins.trace "`types.list` has been removed; please use `types.listOf` instead" types.listOf;
listOf = elemType: mkOptionType rec {
name = "listOf";
description = "list of ${elemType.description}s";
@ -327,14 +329,12 @@ rec {
};
# TODO: drop this in the future:
loaOf =
let msg =
''
`types.loaOf` has been removed and mixing lists with attribute values
is no longer possible; please use `types.attrsOf` instead.
See https://github.com/NixOS/nixpkgs/issues/1800 for the motivation.
'';
in builtins.trace msg types.attrsOf;
loaOf = elemType: types.attrsOf elemType // {
name = "loaOf";
deprecationMessage = "Mixing lists with attribute values is no longer"
+ " possible; please use `types.attrsOf` instead. See"
+ " https://github.com/NixOS/nixpkgs/issues/1800 for the motivation.";
};
# Value of given type but with no merging (i.e. `uniq list`s are not concatenated).
uniq = elemType: mkOptionType rec {
@ -427,7 +427,12 @@ rec {
# would be used, and use of `<` and `>` would break the XML document.
# It shouldn't cause an issue since this is cosmetic for the manual.
args.name = "name";
}).options;
}).options // optionalAttrs (freeformType != null) {
# Expose the sub options of the freeform type. Note that the option
# discovery doesn't care about the attribute name used here, so this
# is just to avoid conflicts with potential options from the submodule
_freeformOptions = freeformType.getSubOptions prefix;
};
getSubModules = modules;
substSubModules = m: submoduleWith (attrs // {
modules = m;
@ -529,8 +534,9 @@ rec {
# declarations from the options attribute of containing option
# declaration.
optionSet = mkOptionType {
name = builtins.trace "types.optionSet is deprecated; use types.submodule instead" "optionSet";
name = "optionSet";
description = "option set";
deprecationMessage = "Use `types.submodule' instead";
};
# Augment the given type with an additional type check function.
addCheck = elemType: check: elemType // { check = x: elemType.check x && check x; };

View File

@ -886,9 +886,9 @@
githubId = 1017537;
name = "Bruno Bieth";
};
badi = {
email = "abdulwahidc@gmail.com";
github = "badi";
badmutex = {
email = "github@badi.sh";
github = "badmutex";
githubId = 35324;
name = "Badi' Abdul-Wahid";
};
@ -1200,6 +1200,12 @@
githubId = 5525646;
name = "Brice Waegeneire";
};
bsima = {
email = "ben@bsima.me";
github = "bsima";
githubId = 200617;
name = "Ben Sima";
};
bstrik = {
email = "dutchman55@gmx.com";
github = "bstrik";
@ -1635,6 +1641,12 @@
githubId = 5561189;
name = "Cody Opel";
};
cohei = {
email = "a.d.xvii.kal.mai@gmail.com";
github = "cohei";
githubId = 3477497;
name = "TANIGUCHI Kohei";
};
cohencyril = {
email = "cyril.cohen@inria.fr";
github = "CohenCyril";
@ -3541,6 +3553,12 @@
githubId = 993484;
name = "Greg Hale";
};
immae = {
email = "ismael@bouya.org";
github = "immae";
githubId = 510202;
name = "Ismaël Bouya";
};
imuli = {
email = "i@imu.li";
github = "imuli";
@ -7847,6 +7865,12 @@
githubId = 3371635;
name = "Salar Rahmanian";
};
sohalt = {
email = "nixos@sohalt.net";
github = "sohalt";
githubId = 2157287;
name = "sohalt";
};
solson = {
email = "scott@solson.me";
github = "solson";
@ -8035,6 +8059,12 @@
githubId = 65870;
name = "Сухарик";
};
superbo = {
email = "supernbo@gmail.com";
github = "SuperBo";
githubId = 2666479;
name = "Y Nguyen";
};
SuperSandro2000 = {
email = "sandro.jaeckel@gmail.com";
github = "SuperSandro2000";
@ -8421,6 +8451,12 @@
githubId = 1391883;
name = "Tom Hall";
};
tiagolobocastro = {
email = "tiagolobocastro@gmail.com";
github = "tiagolobocastro";
githubId = 1618946;
name = "Tiago Castro";
};
tilpner = {
email = "till@hoeppner.ws";
github = "tilpner";

View File

@ -30,7 +30,7 @@ in
packagesWith
(name: pkg:
(
if builtins.hasAttr "maintainers" pkg.meta
if builtins.hasAttr "meta" pkg && builtins.hasAttr "maintainers" pkg.meta
then (
if builtins.isList pkg.meta.maintainers
then builtins.elem maintainer_ pkg.meta.maintainers

View File

@ -29,6 +29,13 @@ with lib.maintainers; {
scope = "Maintain ACME-related packages and modules.";
};
cinnamon = {
members = [
mkg20001
];
scope = "Maintain Cinnamon desktop environment and applications made by the LinuxMint team.";
};
freedesktop = {
members = [ jtojnar worldofpeace ];
scope = "Maintain Freedesktop.org packages for graphical desktop.";

View File

@ -70,9 +70,13 @@
<para>
If you would like to continue the installation from a different machine you
need to activate the SSH daemon via <command>systemctl start
sshd</command>. You then must set a password for either <literal>root</literal> or
<literal>nixos</literal> with <command>passwd</command> to be able to login.
can use activated SSH daemon. You need to copy your ssh key to either
<literal>/home/nixos/.ssh/authorized_keys</literal> or
<literal>/root/.ssh/authorized_keys</literal> (Tip: For installers with a
modifiable filesystem such as the sd-card installer image a key can be manually
placed by mounting the image on a different machine). Alternatively you must set
a password for either <literal>root</literal> or <literal>nixos</literal> with
<command>passwd</command> to be able to login.
</para>
</section>
</section>

View File

@ -8,6 +8,7 @@
This section lists the release notes for each stable version of NixOS and
current unstable revision.
</para>
<xi:include href="rl-2103.xml" />
<xi:include href="rl-2009.xml" />
<xi:include href="rl-2003.xml" />
<xi:include href="rl-1909.xml" />

View File

@ -427,8 +427,8 @@ php.override {
</listitem>
<listitem>
<para>
Add option <literal>services.nginx.enableSandbox</literal> to starting Nginx web server with additional sandbox/hardening options.
By default, write access to <literal>services.nginx.stateDir</literal> is allowed. To allow writing to other folders,
Nginx web server now starting with additional sandbox/hardening options. By default, write access
to <literal>services.nginx.stateDir</literal> is allowed. To allow writing to other folders,
use <literal>systemd.services.nginx.serviceConfig.ReadWritePaths</literal>
<programlisting>
systemd.services.nginx.serviceConfig.ReadWritePaths = [ "/var/www" ];
@ -796,6 +796,32 @@ CREATE ROLE postgres LOGIN SUPERUSER;
<literal>config.systemd.services.${name}.path</literal> now returns a list of paths instead of a colon-separated string.
</para>
</listitem>
<listitem>
<para>
Caddy module now uses Caddy v2 by default. Caddy v1 can still be used by setting
<xref linkend="opt-services.caddy.package"/> to <literal>pkgs.caddy1</literal>.
</para>
<para>
New option <xref linkend="opt-services.caddy.adapter"/> has been added.
</para>
</listitem>
<listitem>
<para>
The <link linkend="opt-services.jellyfin.enable">jellyfin</link> module will use and stay on the Jellyfin version <literal>10.5.5</literal>
if <literal>stateVersion</literal> is lower than <literal>20.09</literal>. This is because significant changes were made to the database schema,
and it is highly recommended to backup your instance before upgrading. After making your backup, you can upgrade to the latest version either by
setting your <literal>stateVersion</literal> to <literal>20.09</literal> or higher, or set the <option>services.jellyfin.package</option> to
<literal>pkgs.jellyfin</literal>. If you do not wish to upgrade Jellyfin, but want to change your <literal>stateVersion</literal>, you can set
the value of <option>services.jellyfin.package</option> to <literal>pkgs.jellyfin_10_5</literal>.
</para>
</listitem>
<listitem>
<para>
The <literal>security.rngd</literal> service is now disabled by default.
This choice was made because there's krngd in the linux kernel space making it (for most usecases)
functionally redundent.
</para>
</listitem>
</itemizedlist>
</section>
@ -824,6 +850,17 @@ CREATE ROLE postgres LOGIN SUPERUSER;
of the default <literal>out</literal> output anymore - if you relied on the
<literal>notmuch-emacs-mua</literal> binary or the emacs lisp files, access them via
the <literal>notmuch.emacs</literal> output.
Device tree overlay support was improved in
<link xlink:href="https://github.com/NixOS/nixpkgs/pull/79370">#79370</link>
and now uses <xref linkend="opt-hardware.deviceTree.kernelPackage"/>
instead of <option>hardware.deviceTree.base</option>.
<xref linkend="opt-hardware.deviceTree.overlays"/> configuration was
extended to support <literal>.dts</literal> files with symbols.
Device trees can now be filtered by setting
<xref linkend="opt-hardware.deviceTree.filter"/> option.
</para>
</listitem>
<listitem>
@ -864,6 +901,12 @@ CREATE ROLE postgres LOGIN SUPERUSER;
Default algorithm for ZRAM swap was changed to <literal>zstd</literal>.
</para>
</listitem>
<listitem>
<para>
The installer now enables sshd by default. This improves installation on headless machines especially ARM single-board-computer.
To login through ssh, either a password or an ssh key must be set for the root user or the nixos user.
</para>
</listitem>
<listitem>
<para>
The scripted networking system now uses <literal>.link</literal> files in
@ -1016,7 +1059,11 @@ services.transmission.settings.rpc-bind-address = "0.0.0.0";
<para>
Nginx module <literal>nginxModules.fastcgi-cache-purge</literal> renamed to official name <literal>nginxModules.cache-purge</literal>.
Nginx module <literal>nginxModules.ngx_aws_auth</literal> renamed to official name <literal>nginxModules.aws-auth</literal>.
The packages <package>perl</package>, <package>rsync</package> and <package>strace</package> were removed from <option>systemPackages</option>. If you need them, install them again with <code><xref linkend="opt-environment.systemPackages"/> = with pkgs; [ perl rsync strace ];</code> in your <filename>configuration.nix</filename>.
</para>
</listitem>
<listitem>
<para>
The option <option>defaultPackages</option> was added. It installs the packages <package>perl</package>, <package>rsync</package> and <package>strace</package> for now. They were added unconditionally to <option>systemPackages</option> before, but are not strictly necessary for a minimal NixOS install. You can set it to an empty list to have a more minimal system. Be aware that some functionality might still have an impure dependency on those packages, so things might break.
</para>
</listitem>
<listitem>

View File

@ -0,0 +1,80 @@
<section xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xi="http://www.w3.org/2001/XInclude"
version="5.0"
xml:id="sec-release-21.03">
<title>Release 21.03 (“Okapi”, 2021.03/??)</title>
<section xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xi="http://www.w3.org/2001/XInclude"
version="5.0"
xml:id="sec-release-21.03-highlights">
<title>Highlights</title>
<para>
In addition to numerous new and upgraded packages, this release has the
following highlights:
</para>
<itemizedlist>
<listitem>
<para>
Support is planned until the end of October 2021, handing over to 21.09.
</para>
</listitem>
</itemizedlist>
</section>
<section xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xi="http://www.w3.org/2001/XInclude"
version="5.0"
xml:id="sec-release-21.03-new-services">
<title>New Services</title>
<para>
The following new services were added since the last release:
</para>
<itemizedlist>
<listitem>
<para />
</listitem>
</itemizedlist>
</section>
<section xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xi="http://www.w3.org/2001/XInclude"
version="5.0"
xml:id="sec-release-21.03-incompatibilities">
<title>Backward Incompatibilities</title>
<para>
When upgrading from a previous release, please be aware of the following
incompatible changes:
</para>
<itemizedlist>
<listitem>
<para />
</listitem>
</itemizedlist>
</section>
<section xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xi="http://www.w3.org/2001/XInclude"
version="5.0"
xml:id="sec-release-21.03-notable-changes">
<title>Other Notable Changes</title>
<itemizedlist>
<listitem>
<para />
</listitem>
</itemizedlist>
</section>
</section>

View File

@ -217,7 +217,7 @@ class Machine:
match = re.search("run-(.+)-vm$", cmd)
if match:
self.name = match.group(1)
self.logger = args["log"]
self.script = args.get("startCommand", self.create_startcommand(args))
tmp_dir = os.environ.get("TMPDIR", tempfile.gettempdir())
@ -227,7 +227,10 @@ class Machine:
os.makedirs(path, mode=0o700, exist_ok=True)
return path
self.state_dir = create_dir("vm-state-{}".format(self.name))
self.state_dir = os.path.join(tmp_dir, f"vm-state-{self.name}")
if not args.get("keepVmState", False):
self.cleanup_statedir()
os.makedirs(self.state_dir, mode=0o700, exist_ok=True)
self.shared_dir = create_dir("shared-xchg")
self.booted = False
@ -235,7 +238,6 @@ class Machine:
self.pid: Optional[int] = None
self.socket = None
self.monitor: Optional[socket.socket] = None
self.logger: Logger = args["log"]
self.allow_reboot = args.get("allowReboot", False)
@staticmethod
@ -780,9 +782,10 @@ class Machine:
self.log("QEMU running (pid {})".format(self.pid))
def cleanup_statedir(self) -> None:
self.log("delete the VM state directory")
if os.path.isfile(self.state_dir):
if os.path.isdir(self.state_dir):
shutil.rmtree(self.state_dir)
self.logger.log(f"deleting VM state directory {self.state_dir}")
self.logger.log("if you want to keep the VM state, pass --keep-vm-state")
def shutdown(self) -> None:
if not self.booted:
@ -940,10 +943,10 @@ if __name__ == "__main__":
for nr, vde_socket, _, _ in vde_sockets:
os.environ["QEMU_VDE_SOCKET_{}".format(nr)] = vde_socket
machines = [create_machine({"startCommand": s}) for s in vm_scripts]
for machine in machines:
if not cli_args.keep_vm_state:
machine.cleanup_statedir()
machines = [
create_machine({"startCommand": s, "keepVmState": cli_args.keep_vm_state})
for s in vm_scripts
]
machine_eval = [
"{0} = machines[{1}]".format(m.name, idx) for idx, m in enumerate(machines)
]

View File

@ -41,6 +41,12 @@ let
pkgs.zstd
];
defaultPackages = map (pkg: setPrio ((pkg.meta.priority or 5) + 3) pkg)
[ pkgs.perl
pkgs.rsync
pkgs.strace
];
in
{
@ -63,6 +69,21 @@ in
'';
};
defaultPackages = mkOption {
type = types.listOf types.package;
default = defaultPackages;
example = literalExample "[]";
description = ''
Set of packages users expect from a minimal linux istall.
Like systemPackages, they appear in
/run/current-system/sw. These packages are
automatically available to all users, and are
automatically updated every time you rebuild the system
configuration.
If you want a more minimal system, set it to an empty list.
'';
};
pathsToLink = mkOption {
type = types.listOf types.str;
# Note: We need `/lib' to be among `pathsToLink' for NSS modules
@ -102,7 +123,7 @@ in
config = {
environment.systemPackages = requiredPackages;
environment.systemPackages = requiredPackages ++ config.environment.defaultPackages;
environment.pathsToLink =
[ "/bin"

View File

@ -4,7 +4,114 @@ with lib;
let
cfg = config.hardware.deviceTree;
in {
overlayType = types.submodule {
options = {
name = mkOption {
type = types.str;
description = ''
Name of this overlay
'';
};
dtsFile = mkOption {
type = types.nullOr types.path;
description = ''
Path to .dts overlay file, overlay is applied to
each .dtb file matching "compatible" of the overlay.
'';
default = null;
example = literalExample "./dts/overlays.dts";
};
dtsText = mkOption {
type = types.nullOr types.str;
default = null;
description = ''
Literal DTS contents, overlay is applied to
each .dtb file matching "compatible" of the overlay.
'';
example = literalExample ''
/dts-v1/;
/plugin/;
/ {
compatible = "raspberrypi";
fragment@0 {
target-path = "/soc";
__overlay__ {
pps {
compatible = "pps-gpio";
status = "okay";
};
};
};
};
'';
};
dtboFile = mkOption {
type = types.nullOr types.path;
default = null;
description = ''
Path to .dtbo compiled overlay file.
'';
};
};
};
# this requires kernel package
dtbsWithSymbols = pkgs.stdenv.mkDerivation {
name = "dtbs-with-symbols";
inherit (cfg.kernelPackage) src nativeBuildInputs depsBuildBuild;
patches = map (patch: patch.patch) cfg.kernelPackage.kernelPatches;
buildPhase = ''
patchShebangs scripts/*
substituteInPlace scripts/Makefile.lib \
--replace 'DTC_FLAGS += $(DTC_FLAGS_$(basetarget))' 'DTC_FLAGS += $(DTC_FLAGS_$(basetarget)) -@'
make ${pkgs.stdenv.hostPlatform.platform.kernelBaseConfig} ARCH="${pkgs.stdenv.hostPlatform.platform.kernelArch}"
make dtbs ARCH="${pkgs.stdenv.hostPlatform.platform.kernelArch}"
'';
installPhase = ''
make dtbs_install INSTALL_DTBS_PATH=$out/dtbs ARCH="${pkgs.stdenv.hostPlatform.platform.kernelArch}"
'';
};
filterDTBs = src: if isNull cfg.filter
then "${src}/dtbs"
else
pkgs.runCommand "dtbs-filtered" {} ''
mkdir -p $out
cd ${src}/dtbs
find . -type f -name '${cfg.filter}' -print0 \
| xargs -0 cp -v --no-preserve=mode --target-directory $out --parents
'';
# Compile single Device Tree overlay source
# file (.dts) into its compiled variant (.dtbo)
compileDTS = name: f: pkgs.callPackage({ dtc }: pkgs.stdenv.mkDerivation {
name = "${name}-dtbo";
nativeBuildInputs = [ dtc ];
buildCommand = ''
dtc -I dts ${f} -O dtb -@ -o $out
'';
}) {};
# Fill in `dtboFile` for each overlay if not set already.
# Existence of one of these is guarded by assertion below
withDTBOs = xs: flip map xs (o: o // { dtboFile =
if isNull o.dtboFile then
if !isNull o.dtsFile then compileDTS o.name o.dtsFile
else compileDTS o.name (pkgs.writeText "dts" o.dtsText)
else o.dtboFile; } );
in
{
imports = [
(mkRemovedOptionModule [ "hardware" "deviceTree" "base" ] "Use hardware.deviceTree.kernelPackage instead")
];
options = {
hardware.deviceTree = {
enable = mkOption {
@ -16,13 +123,13 @@ in {
'';
};
base = mkOption {
default = "${config.boot.kernelPackages.kernel}/dtbs";
defaultText = "\${config.boot.kernelPackages.kernel}/dtbs";
example = literalExample "pkgs.device-tree_rpi";
kernelPackage = mkOption {
default = config.boot.kernelPackages.kernel;
defaultText = "config.boot.kernelPackages.kernel";
example = literalExample "pkgs.linux_latest";
type = types.path;
description = ''
The path containing the base device-tree (.dtb) to boot. Contains
Kernel package containing the base device-tree (.dtb) to boot. Uses
device trees bundled with the Linux kernel by default.
'';
};
@ -38,14 +145,32 @@ in {
'';
};
filter = mkOption {
type = types.nullOr types.str;
default = null;
example = "*rpi*.dtb";
description = ''
Only include .dtb files matching glob expression.
'';
};
overlays = mkOption {
default = [];
example = literalExample
"[\"\${pkgs.device-tree_rpi.overlays}/w1-gpio.dtbo\"]";
type = types.listOf types.path;
example = literalExample ''
[
{ name = "pps"; dtsFile = ./dts/pps.dts; }
{ name = "spi";
dtsText = "...";
}
{ name = "precompiled"; dtboFile = ./dtbos/example.dtbo; }
]
'';
type = types.listOf (types.coercedTo types.path (path: {
name = baseNameOf path;
dtboFile = path;
}) overlayType);
description = ''
A path containing device tree overlays (.dtbo) to be applied to all
base device-trees.
List of overlays to apply to base device-tree (.dtb) files.
'';
};
@ -54,14 +179,27 @@ in {
type = types.nullOr types.path;
internal = true;
description = ''
A path containing the result of applying `overlays` to `base`.
A path containing the result of applying `overlays` to `kernelPackage`.
'';
};
};
};
config = mkIf (cfg.enable) {
assertions = let
invalidOverlay = o: isNull o.dtsFile && isNull o.dtsText && isNull o.dtboFile;
in lib.singleton {
assertion = lib.all (o: !invalidOverlay o) cfg.overlays;
message = ''
deviceTree overlay needs one of dtsFile, dtsText or dtboFile set.
Offending overlay(s):
${toString (map (o: o.name) (builtins.filter invalidOverlay cfg.overlays))}
'';
};
hardware.deviceTree.package = if (cfg.overlays != [])
then pkgs.deviceTree.applyOverlays cfg.base cfg.overlays else cfg.base;
then pkgs.deviceTree.applyOverlays (filterDTBs dtbsWithSymbols) (withDTBOs cfg.overlays)
else (filterDTBs cfg.kernelPackage);
};
}

View File

@ -554,6 +554,7 @@
./services/monitoring/telegraf.nix
./services/monitoring/thanos.nix
./services/monitoring/tuptime.nix
./services/monitoring/unifi-poller.nix
./services/monitoring/ups.nix
./services/monitoring/uptime.nix
./services/monitoring/vnstat.nix

View File

@ -51,22 +51,23 @@ with lib;
services.mingetty.helpLine = ''
The "nixos" and "root" accounts have empty passwords.
Type `sudo systemctl start sshd` to start the SSH daemon.
You then must set a password for either "root" or "nixos"
with `passwd` to be able to login.
An ssh daemon is running. You then must set a password
for either "root" or "nixos" with `passwd` or add an ssh key
to /home/nixos/.ssh/authorized_keys be able to login.
'' + optionalString config.services.xserver.enable ''
Type `sudo systemctl start display-manager' to
start the graphical user interface.
'';
# Allow sshd to be started manually through "systemctl start sshd".
# We run sshd by default. Login via root is only possible after adding a
# password via "passwd" or by adding a ssh key to /home/nixos/.ssh/authorized_keys.
# The latter one is particular useful if keys are manually added to
# installation device for head-less systems i.e. arm boards by manually
# mounting the storage in a different system.
services.openssh = {
enable = true;
# Allow password login to the installation, if the user sets a password via "passwd"
# It is safe as root doesn't have a password by default and SSH is disabled by default
permitRootLogin = "yes";
};
systemd.services.sshd.wantedBy = mkOverride 50 [];
# Enable wpa_supplicant, but don't start it by default.
networking.wireless.enable = mkDefault true;

View File

@ -26,6 +26,6 @@ with lib;
###### implementation
config = mkIf config.programs.qt5ct.enable {
environment.variables.QT_QPA_PLATFORMTHEME = "qt5ct";
environment.systemPackages = with pkgs; [ qt5ct libsForQt5.qtstyleplugins ];
environment.systemPackages = with pkgs; [ qt5ct ];
};
}

View File

@ -34,7 +34,7 @@ in
partOf = [ "graphical-session.target" ];
serviceConfig.ExecStart = with lib;
strings.concatStringsSep " " ([
"${pkgs.xss-lock}/bin/xss-lock"
"${pkgs.xss-lock}/bin/xss-lock" "--session \${XDG_SESSION_ID}"
] ++ (map escapeShellArg cfg.extraOptions) ++ [
"--"
cfg.lockerCommand

View File

@ -394,7 +394,7 @@ let
"auth optional ${pkgs.pam_mount}/lib/security/pam_mount.so"}
${optionalString cfg.enableKwallet
("auth optional ${pkgs.plasma5.kwallet-pam}/lib/security/pam_kwallet5.so" +
" kwalletd=${pkgs.libsForQt5.kwallet.bin}/bin/kwalletd5")}
" kwalletd=${pkgs.kdeFrameworks.kwallet.bin}/bin/kwalletd5")}
${optionalString cfg.enableGnomeKeyring
"auth optional ${pkgs.gnome3.gnome-keyring}/lib/security/pam_gnome_keyring.so"}
${optionalString cfg.googleAuthenticator.enable
@ -471,7 +471,7 @@ let
"session optional ${pkgs.apparmor-pam}/lib/security/pam_apparmor.so order=user,group,default debug"}
${optionalString (cfg.enableKwallet)
("session optional ${pkgs.plasma5.kwallet-pam}/lib/security/pam_kwallet5.so" +
" kwalletd=${pkgs.libsForQt5.kwallet.bin}/bin/kwalletd5")}
" kwalletd=${pkgs.kdeFrameworks.kwallet.bin}/bin/kwalletd5")}
${optionalString (cfg.enableGnomeKeyring)
"session optional ${pkgs.gnome3.gnome-keyring}/lib/security/pam_gnome_keyring.so auto_start"}
${optionalString (config.virtualisation.lxc.lxcfs.enable)

View File

@ -10,11 +10,10 @@ in
security.rngd = {
enable = mkOption {
type = types.bool;
default = true;
default = false;
description = ''
Whether to enable the rng daemon, which adds entropy from
hardware sources of randomness to the kernel entropy pool when
available.
Whether to enable the rng daemon. Devices that the kernel recognises
as entropy sources are handled automatically by krngd.
'';
};
debug = mkOption {
@ -26,12 +25,6 @@ in
};
config = mkIf cfg.enable {
services.udev.extraRules = ''
KERNEL=="random", TAG+="systemd"
SUBSYSTEM=="cpu", ENV{MODALIAS}=="cpu:type:x86,*feature:*009E*", TAG+="systemd", ENV{SYSTEMD_WANTS}+="rngd.service"
KERNEL=="hw_random", TAG+="systemd", ENV{SYSTEMD_WANTS}+="rngd.service"
'';
systemd.services.rngd = {
bindsTo = [ "dev-random.device" ];

View File

@ -135,7 +135,7 @@ in {
];
execPkgs = lib.concatMap (opt: let
isSet = config.serviceConfig ? ${opt};
in lib.optional isSet config.serviceConfig.${opt}) execOpts;
in lib.flatten (lib.optional isSet config.serviceConfig.${opt})) execOpts;
unitAttrs = toplevelConfig.systemd.units."${name}.service";
allPkgs = lib.singleton (builtins.toJSON unitAttrs);
unitPkgs = if fullUnit then allPkgs else execPkgs;

View File

@ -11,6 +11,10 @@ let
cfg = config.services.mpd;
mpdConf = pkgs.writeText "mpd.conf" ''
# This file was automatically generated by NixOS. Edit mpd's configuration
# via NixOS' configuration.nix, as this file will be rewritten upon mpd's
# restart.
music_directory "${cfg.musicDirectory}"
playlist_directory "${cfg.playlistDirectory}"
${lib.optionalString (cfg.dbFile != null) ''
@ -140,6 +144,18 @@ in {
'';
};
credentialsFile = mkOption {
type = types.path;
description = ''
Path to a file to be merged with the settings during the service startup.
Useful to merge a file which is better kept out of the Nix store
because it contains sensible data like MPD's password. Example may look like this:
<literal>password "myMpdPassword@read,add,control,admin"</literal>
'';
default = "/dev/null";
example = "/var/lib/secrets/mpd.conf";
};
fluidsynth = mkOption {
type = types.bool;
default = false;
@ -181,7 +197,12 @@ in {
serviceConfig = {
User = "${cfg.user}";
ExecStart = "${pkgs.mpd}/bin/mpd --no-daemon ${mpdConf}";
ExecStart = "${pkgs.mpd}/bin/mpd --no-daemon /etc/mpd.conf";
ExecStartPre = pkgs.writeScript "mpd-start-pre" ''
#!${pkgs.runtimeShell}
set -euo pipefail
cat ${mpdConf} ${cfg.credentialsFile} > /etc/mpd.conf
'';
Type = "notify";
LimitRTPRIO = 50;
LimitRTTIME = "infinity";
@ -195,6 +216,14 @@ in {
Restart = "always";
};
};
environment.etc."mpd.conf" = {
mode = "0640";
group = cfg.group;
user = cfg.user;
# To be modified by the service' ExecStartPre
text = ''
'';
};
users.users = optionalAttrs (cfg.user == name) {
${name} = {

View File

@ -4,17 +4,59 @@ with lib;
let
cfg = config.services.mailhog;
in {
args = lib.concatStringsSep " " (
[
"-api-bind-addr :${toString cfg.apiPort}"
"-smtp-bind-addr :${toString cfg.smtpPort}"
"-ui-bind-addr :${toString cfg.uiPort}"
"-storage ${cfg.storage}"
] ++ lib.optional (cfg.storage == "maildir")
"-maildir-path $STATE_DIRECTORY"
++ cfg.extraArgs
);
in
{
###### interface
imports = [
(mkRemovedOptionModule [ "services" "mailhog" "user" ] "")
];
options = {
services.mailhog = {
enable = mkEnableOption "MailHog";
user = mkOption {
type = types.str;
default = "mailhog";
description = "User account under which mailhog runs.";
storage = mkOption {
type = types.enum [ "maildir" "memory" ];
default = "memory";
description = "Store mails on disk or in memory.";
};
apiPort = mkOption {
type = types.port;
default = 8025;
description = "Port on which the API endpoint will listen.";
};
smtpPort = mkOption {
type = types.port;
default = 1025;
description = "Port on which the SMTP endpoint will listen.";
};
uiPort = mkOption {
type = types.port;
default = 8025;
description = "Port on which the HTTP UI will listen.";
};
extraArgs = mkOption {
type = types.listOf types.str;
default = [];
description = "List of additional arguments to pass to the MailHog process.";
};
};
};
@ -24,20 +66,16 @@ in {
config = mkIf cfg.enable {
users.users.mailhog = {
name = cfg.user;
description = "MailHog service user";
isSystemUser = true;
};
systemd.services.mailhog = {
description = "MailHog service";
description = "MailHog - Web and API based SMTP testing";
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
Type = "simple";
ExecStart = "${pkgs.mailhog}/bin/MailHog";
User = cfg.user;
Type = "exec";
ExecStart = "${pkgs.mailhog}/bin/MailHog ${args}";
DynamicUser = true;
Restart = "on-failure";
StateDirectory = "mailhog";
};
};
};

View File

@ -46,6 +46,7 @@ let
"surfboard"
"tor"
"unifi"
"unifi-poller"
"varnish"
"wireguard"
] (name:

View File

@ -0,0 +1,34 @@
{ config, lib, pkgs, options }:
with lib;
let
cfg = config.services.prometheus.exporters.unifi-poller;
configFile = pkgs.writeText "prometheus-unifi-poller-exporter.json" (generators.toJSON {} {
poller = { inherit (cfg.log) debug quiet; };
unifi = { inherit (cfg) controllers; };
influxdb.disable = true;
prometheus = {
http_listen = "${cfg.listenAddress}:${toString cfg.port}";
report_errors = cfg.log.prometheusErrors;
};
});
in {
port = 9130;
extraOpts = {
inherit (options.services.unifi-poller.unifi) controllers;
log = {
debug = mkEnableOption "debug logging including line numbers, high resolution timestamps, per-device logs.";
quiet = mkEnableOption "startup and error logs only.";
prometheusErrors = mkEnableOption "emitting errors to prometheus.";
};
};
serviceOpts.serviceConfig = {
ExecStart = "${pkgs.unifi-poller}/bin/unifi-poller --config ${configFile}";
DynamicUser = false;
};
}

View File

@ -0,0 +1,242 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.unifi-poller;
configFile = pkgs.writeText "unifi-poller.json" (generators.toJSON {} {
inherit (cfg) poller influxdb prometheus unifi;
});
in {
options.services.unifi-poller = {
enable = mkEnableOption "unifi-poller";
poller = {
debug = mkOption {
type = types.bool;
default = false;
description = ''
Turns on line numbers, microsecond logging, and a per-device log.
This may be noisy if you have a lot of devices. It adds one line per device.
'';
};
quiet = mkOption {
type = types.bool;
default = false;
description = ''
Turns off per-interval logs. Only startup and error logs will be emitted.
'';
};
plugins = mkOption {
type = with types; listOf str;
default = [];
description = ''
Load additional plugins.
'';
};
};
prometheus = {
disable = mkOption {
type = types.bool;
default = false;
description = ''
Whether to disable the prometheus ouput plugin.
'';
};
http_listen = mkOption {
type = types.str;
default = "[::]:9130";
description = ''
Bind the prometheus exporter to this IP or hostname.
'';
};
report_errors = mkOption {
type = types.bool;
default = false;
description = ''
Whether to report errors.
'';
};
};
influxdb = {
disable = mkOption {
type = types.bool;
default = false;
description = ''
Whether to disable the influxdb ouput plugin.
'';
};
url = mkOption {
type = types.str;
default = "http://127.0.0.1:8086";
description = ''
URL of the influxdb host.
'';
};
user = mkOption {
type = types.str;
default = "unifipoller";
description = ''
Username for the influxdb.
'';
};
pass = mkOption {
type = types.path;
default = pkgs.writeText "unifi-poller-influxdb-default.password" "unifipoller";
defaultText = "unifi-poller-influxdb-default.password";
description = ''
Path of a file containing the password for influxdb.
This file needs to be readable by the unifi-poller user.
'';
apply = v: "file://${v}";
};
db = mkOption {
type = types.str;
default = "unifi";
description = ''
Database name. Database should exist.
'';
};
verify_ssl = mkOption {
type = types.bool;
default = true;
description = ''
Verify the influxdb's certificate.
'';
};
interval = mkOption {
type = types.str;
default = "30s";
description = ''
Setting this lower than the Unifi controller's refresh
interval may lead to zeroes in your database.
'';
};
};
unifi = let
controllerOptions = {
user = mkOption {
type = types.str;
default = "unifi";
description = ''
Unifi service user name.
'';
};
pass = mkOption {
type = types.path;
default = pkgs.writeText "unifi-poller-unifi-default.password" "unifi";
defaultText = "unifi-poller-unifi-default.password";
description = ''
Path of a file containing the password for the unifi service user.
This file needs to be readable by the unifi-poller user.
'';
apply = v: "file://${v}";
};
url = mkOption {
type = types.str;
default = "https://unifi:8443";
description = ''
URL of the Unifi controller.
'';
};
sites = mkOption {
type = with types; either (enum [ "default" "all" ]) (listOf str);
default = "all";
description = ''
List of site names for which statistics should be exported.
Or the string "default" for the default site or the string "all" for all sites.
'';
apply = toList;
};
save_ids = mkOption {
type = types.bool;
default = false;
description = ''
Collect and save data from the intrusion detection system to influxdb.
'';
};
save_dpi = mkOption {
type = types.bool;
default = false;
description = ''
Collect and save data from deep packet inspection.
Adds around 150 data points and impacts performance.
'';
};
save_sites = mkOption {
type = types.bool;
default = true;
description = ''
Collect and save site data.
'';
};
hash_pii = mkOption {
type = types.bool;
default = false;
description = ''
Hash, with md5, client names and MAC addresses. This attempts
to protect personally identifiable information.
'';
};
verify_ssl = mkOption {
type = types.bool;
default = true;
description = ''
Verify the Unifi controller's certificate.
'';
};
};
in {
dynamic = mkOption {
type = types.bool;
default = false;
description = ''
Let prometheus select which controller to poll when scraping.
Use with default credentials. See unifi-poller wiki for more.
'';
};
defaults = controllerOptions;
controllers = mkOption {
type = with types; listOf (submodule { options = controllerOptions; });
default = [];
description = ''
List of Unifi controllers to poll. Use defaults if empty.
'';
apply = map (flip removeAttrs [ "_module" ]);
};
};
};
config = mkIf cfg.enable {
users.groups.unifi-poller = { };
users.users.unifi-poller = {
description = "unifi-poller Service User";
group = "unifi-poller";
isSystemUser = true;
};
systemd.services.unifi-poller = {
wantedBy = [ "multi-user.target" ];
after = [ "network.target" ];
serviceConfig = {
ExecStart = "${pkgs.unifi-poller}/bin/unifi-poller --config ${configFile}";
Restart = "always";
PrivateTmp = true;
ProtectHome = true;
ProtectSystem = "full";
DevicePolicy = "closed";
NoNewPrivileges = true;
User = "unifi-poller";
WorkingDirectory = "/tmp";
};
};
};
}

View File

@ -117,7 +117,6 @@ in
ProtectHome = "yes";
ProtectSystem = "full";
PrivateTmp = "yes";
StateDirectory = "chrony";
};
};

View File

@ -11,7 +11,7 @@ let
makeOpenVPNJob = cfg: name:
let
path = (getAttr "openvpn-${name}" config.systemd.services).path;
path = makeBinPath (getAttr "openvpn-${name}" config.systemd.services).path;
upScript = ''
#! /bin/sh

View File

@ -81,6 +81,23 @@ in {
<link xlink:href="https://github.com/dani-garcia/bitwarden_rs/blob/${bitwarden_rs.version}/.env.template">the environment template file</link>.
'';
};
environmentFile = mkOption {
type = with types; nullOr path;
default = null;
example = "/root/bitwarden_rs.env";
description = ''
Additional environment file as defined in <citerefentry>
<refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum>
</citerefentry>.
Secrets like <envar>ADMIN_TOKEN</envar> and <envar>SMTP_PASSWORD</envar>
may be passed to the service without adding them to the world-readable Nix store.
Note that this file needs to be available on the host on which
<literal>bitwarden_rs</literal> is running.
'';
};
};
config = mkIf cfg.enable {
@ -101,7 +118,7 @@ in {
serviceConfig = {
User = user;
Group = group;
EnvironmentFile = configFile;
EnvironmentFile = [ configFile ] ++ optional (cfg.environmentFile != null) cfg.environmentFile;
ExecStart = "${bitwarden_rs}/bin/bitwarden_rs";
LimitNOFILE = "1048576";
LimitNPROC = "64";

View File

@ -5,6 +5,26 @@ with lib;
let
cfg = config.services.caddy;
configFile = pkgs.writeText "Caddyfile" cfg.config;
# v2-specific options
isCaddy2 = versionAtLeast cfg.package.version "2.0";
tlsConfig = {
apps.tls.automation.policies = [{
issuer = {
inherit (cfg) ca email;
module = "acme";
};
}];
};
adaptedConfig = pkgs.runCommand "caddy-config-adapted.json" { } ''
${cfg.package}/bin/caddy adapt \
--config ${configFile} --adapter ${cfg.adapter} > $out
'';
tlsJSON = pkgs.writeText "tls.json" (builtins.toJSON tlsConfig);
configJSON = pkgs.runCommand "caddy-config.json" { } ''
${pkgs.jq}/bin/jq -s '.[0] * .[1]' ${adaptedConfig} ${tlsJSON} > $out
'';
in {
options.services.caddy = {
enable = mkEnableOption "Caddy web server";
@ -13,15 +33,26 @@ in {
default = "";
example = ''
example.com {
gzip
minify
log syslog
encode gzip
log
root /srv/http
}
'';
type = types.lines;
description = "Verbatim Caddyfile to use";
description = ''
Verbatim Caddyfile to use.
Caddy v2 supports multiple config formats via adapters (see <option>services.caddy.adapter</option>).
'';
};
adapter = mkOption {
default = "caddyfile";
example = "nginx";
type = types.str;
description = ''
Name of the config adapter to use. Not applicable to Caddy v1.
See https://caddyserver.com/docs/config-adapters for the full list.
'';
};
ca = mkOption {
@ -50,33 +81,46 @@ in {
The data directory, for storing certificates. Before 17.09, this
would create a .caddy directory. With 17.09 the contents of the
.caddy directory are in the specified data directory instead.
Caddy v2 replaced CADDYPATH with XDG directories.
See https://caddyserver.com/docs/conventions#file-locations.
'';
};
package = mkOption {
default = pkgs.caddy;
defaultText = "pkgs.caddy";
example = "pkgs.caddy1";
type = types.package;
description = "Caddy package to use.";
description = ''
Caddy package to use.
To use Caddy v1 (obsolete), set this to <literal>pkgs.caddy1</literal>.
'';
};
};
config = mkIf cfg.enable {
systemd.services.caddy = {
description = "Caddy web server";
# upstream unit: https://github.com/caddyserver/caddy/blob/master/dist/init/linux-systemd/caddy.service
# upstream unit: https://github.com/caddyserver/dist/blob/master/init/caddy.service
after = [ "network-online.target" ];
wants = [ "network-online.target" ]; # systemd-networkd-wait-online.service
wantedBy = [ "multi-user.target" ];
environment = mkIf (versionAtLeast config.system.stateVersion "17.09")
environment = mkIf (versionAtLeast config.system.stateVersion "17.09" && !isCaddy2)
{ CADDYPATH = cfg.dataDir; };
serviceConfig = {
ExecStart = ''
ExecStart = if isCaddy2 then ''
${cfg.package}/bin/caddy run --config ${configJSON}
'' else ''
${cfg.package}/bin/caddy -log stdout -log-timestamps=false \
-root=/var/tmp -conf=${configFile} \
-ca=${cfg.ca} -email=${cfg.email} ${optionalString cfg.agree "-agree"}
'';
ExecReload = "${pkgs.coreutils}/bin/kill -USR1 $MAINPID";
ExecReload =
if isCaddy2 then
"${cfg.package}/bin/caddy reload --config ${configJSON}"
else
"${pkgs.coreutils}/bin/kill -USR1 $MAINPID";
Type = "simple";
User = "caddy";
Group = "caddy";

View File

@ -463,14 +463,6 @@ in
'';
};
enableSandbox = mkOption {
default = false;
type = types.bool;
description = ''
Starting Nginx web server with additional sandbox/hardening options.
'';
};
user = mkOption {
type = types.str;
default = "nginx";
@ -728,7 +720,6 @@ in
CapabilityBoundingSet = [ "CAP_NET_BIND_SERVICE" "CAP_SYS_RESOURCE" ];
# Security
NoNewPrivileges = true;
} // optionalAttrs cfg.enableSandbox {
# Sandboxing
ProtectSystem = "strict";
ProtectHome = mkDefault true;

View File

@ -0,0 +1,205 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.xserver.desktopManager.cinnamon;
serviceCfg = config.services.cinnamon;
nixos-gsettings-overrides = pkgs.cinnamon.cinnamon-gsettings-overrides.override {
extraGSettingsOverridePackages = cfg.extraGSettingsOverridePackages;
extraGSettingsOverrides = cfg.extraGSettingsOverrides;
};
in
{
options = {
services.cinnamon = {
apps.enable = mkEnableOption "Cinnamon default applications";
};
services.xserver.desktopManager.cinnamon = {
enable = mkEnableOption "the cinnamon desktop manager";
sessionPath = mkOption {
default = [];
example = literalExample "[ pkgs.gnome3.gpaste ]";
description = ''
Additional list of packages to be added to the session search path.
Useful for GSettings-conditional autostart.
Note that this should be a last resort; patching the package is preferred (see GPaste).
'';
};
extraGSettingsOverrides = mkOption {
default = "";
type = types.lines;
description = "Additional gsettings overrides.";
};
extraGSettingsOverridePackages = mkOption {
default = [];
type = types.listOf types.path;
description = "List of packages for which gsettings are overridden.";
};
};
environment.cinnamon.excludePackages = mkOption {
default = [];
example = literalExample "[ pkgs.cinnamon.blueberry ]";
type = types.listOf types.package;
description = "Which packages cinnamon should exclude from the default environment";
};
};
config = mkMerge [
(mkIf (cfg.enable && config.services.xserver.displayManager.lightdm.enable && config.services.xserver.displayManager.lightdm.greeters.gtk.enable) {
services.xserver.displayManager.lightdm.greeters.gtk.extraConfig = mkDefault (builtins.readFile "${pkgs.cinnamon.mint-artwork}/etc/lightdm/lightdm-gtk-greeter.conf.d/99_linuxmint.conf");
})
(mkIf cfg.enable {
services.xserver.displayManager.sessionPackages = [ pkgs.cinnamon.cinnamon-common ];
services.xserver.displayManager.sessionCommands = ''
if test "$XDG_CURRENT_DESKTOP" = "Cinnamon"; then
true
${concatMapStrings (p: ''
if [ -d "${p}/share/gsettings-schemas/${p.name}" ]; then
export XDG_DATA_DIRS=$XDG_DATA_DIRS''${XDG_DATA_DIRS:+:}${p}/share/gsettings-schemas/${p.name}
fi
if [ -d "${p}/lib/girepository-1.0" ]; then
export GI_TYPELIB_PATH=$GI_TYPELIB_PATH''${GI_TYPELIB_PATH:+:}${p}/lib/girepository-1.0
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}${p}/lib
fi
'') cfg.sessionPath}
fi
'';
# Default services
hardware.bluetooth.enable = mkDefault true;
hardware.pulseaudio.enable = mkDefault true;
security.polkit.enable = true;
services.accounts-daemon.enable = true;
services.system-config-printer.enable = (mkIf config.services.printing.enable (mkDefault true));
services.dbus.packages = with pkgs.cinnamon; [
cinnamon-common
cinnamon-screensaver
nemo
xapps
];
services.cinnamon.apps.enable = mkDefault true;
services.gnome3.glib-networking.enable = true;
services.gnome3.gnome-keyring.enable = true;
services.gvfs.enable = true;
services.udisks2.enable = true;
services.upower.enable = mkDefault config.powerManagement.enable;
services.xserver.libinput.enable = mkDefault true;
services.xserver.updateDbusEnvironment = true;
networking.networkmanager.enable = mkDefault true;
# Enable colord server
services.colord.enable = true;
# Enable dconf
programs.dconf.enable = true;
# Enable org.a11y.Bus
services.gnome3.at-spi2-core.enable = true;
# Fix lockscreen
security.pam.services = {
cinnamon-screensaver = {};
};
environment.systemPackages = with pkgs.cinnamon // pkgs; [
desktop-file-utils
nixos-artwork.wallpapers.simple-dark-gray
onboard
sound-theme-freedesktop
# common-files
cinnamon-common
cinnamon-session
cinnamon-desktop
cinnamon-menus
# utils needed by some scripts
killall
# session requirements
cinnamon-screensaver
# cinnamon-killer-daemon: provided by cinnamon-common
gnome3.networkmanagerapplet # session requirement - also nm-applet not needed
# packages
nemo
cinnamon-control-center
cinnamon-settings-daemon
gnome3.libgnomekbd
orca
# theme
gnome3.adwaita-icon-theme
hicolor-icon-theme
gnome3.gnome-themes-extra
gtk3.out
mint-artwork
mint-themes
mint-x-icons
mint-y-icons
vanilla-dmz
# other
glib # for gsettings
shared-mime-info # for update-mime-database
xdg-user-dirs
];
# Override GSettings schemas
environment.sessionVariables.NIX_GSETTINGS_OVERRIDES_DIR = "${nixos-gsettings-overrides}/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas";
environment.pathsToLink = [
# FIXME: modules should link subdirs of `/share` rather than relying on this
"/share" # TODO: https://github.com/NixOS/nixpkgs/issues/47173
];
# Shell integration for VTE terminals
programs.bash.vteIntegration = mkDefault true;
programs.zsh.vteIntegration = mkDefault true;
# Harmonize Qt5 applications under Pantheon
qt5.enable = true;
qt5.platformTheme = "gnome";
qt5.style = "adwaita";
# Default Fonts
fonts.fonts = with pkgs; [
source-code-pro # Default monospace font in 3.32
ubuntu_font_family # required for default theme
];
})
(mkIf serviceCfg.apps.enable {
programs.geary.enable = mkDefault true;
programs.gnome-disks.enable = mkDefault true;
programs.gnome-terminal.enable = mkDefault true;
programs.evince.enable = mkDefault true;
programs.file-roller.enable = mkDefault true;
environment.systemPackages = (with pkgs // pkgs.gnome3 // pkgs.cinnamon; pkgs.gnome3.removePackagesByName [
# cinnamon team apps
blueberry
warpinator
# external apps shipped with linux-mint
hexchat
gnome-calculator
] config.environment.cinnamon.excludePackages);
})
];
}

View File

@ -21,6 +21,7 @@ in
./none.nix ./xterm.nix ./xfce.nix ./plasma5.nix ./lumina.nix
./lxqt.nix ./enlightenment.nix ./gnome3.nix ./kodi.nix
./mate.nix ./pantheon.nix ./surf-display.nix ./cde.nix
./cinnamon.nix
];
options = {

View File

@ -7,7 +7,9 @@ let
xcfg = config.services.xserver;
cfg = xcfg.desktopManager.plasma5;
inherit (pkgs) kdeApplications plasma5 libsForQt5 qt5;
inherit (pkgs) kdeApplications kdeFrameworks plasma5;
libsForQt5 = pkgs.libsForQt514;
qt5 = pkgs.qt514;
inherit (pkgs) writeText;
pulseaudio = config.hardware.pulseaudio;
@ -83,7 +85,7 @@ let
# recognize that software that has been removed.
rm -fv $HOME/.cache/ksycoca*
${pkgs.libsForQt5.kservice}/bin/kbuildsycoca5
${libsForQt5.kservice}/bin/kbuildsycoca5
'';
set_XDG_CONFIG_HOME = ''
@ -203,7 +205,9 @@ in
KERNEL=="i2c-[0-9]*", TAG+="uaccess"
'';
environment.systemPackages = with pkgs; with qt5; with libsForQt5; with plasma5; with kdeApplications;
environment.systemPackages =
with qt5; with libsForQt5;
with plasma5; with kdeApplications; with kdeFrameworks;
[
frameworkintegration
kactivities
@ -293,7 +297,7 @@ in
qtvirtualkeyboard
xdg-user-dirs # Update user dirs as described in https://freedesktop.org/wiki/Software/xdg-user-dirs/
pkgs.xdg-user-dirs # Update user dirs as described in https://freedesktop.org/wiki/Software/xdg-user-dirs/
]
# Phonon audio backend
@ -301,7 +305,7 @@ in
++ lib.optional (cfg.phononBackend == "vlc") libsForQt5.phonon-backend-vlc
# Optional hardware support features
++ lib.optionals config.hardware.bluetooth.enable [ bluedevil bluez-qt openobex obexftp ]
++ lib.optionals config.hardware.bluetooth.enable [ bluedevil bluez-qt pkgs.openobex pkgs.obexftp ]
++ lib.optional config.networking.networkmanager.enable plasma-nm
++ lib.optional config.hardware.pulseaudio.enable plasma-pa
++ lib.optional config.powerManagement.enable powerdevil

View File

@ -55,13 +55,6 @@ let
exec &> >(tee ~/.xsession-errors)
''}
# Tell systemd about our $DISPLAY and $XAUTHORITY.
# This is needed by the ssh-agent unit.
#
# Also tell systemd about the dbus session bus address.
# This is required by user units using the session bus.
/run/current-system/systemd/bin/systemctl --user import-environment DISPLAY XAUTHORITY DBUS_SESSION_BUS_ADDRESS
# Load X defaults. This should probably be safe on wayland too.
${xorg.xrdb}/bin/xrdb -merge ${xresourcesXft}
if test -e ~/.Xresources; then
@ -70,6 +63,12 @@ let
${xorg.xrdb}/bin/xrdb -merge ~/.Xdefaults
fi
# Import environment variables into the systemd user environment.
${optionalString (cfg.displayManager.importedVariables != []) (
"/run/current-system/systemd/bin/systemctl --user import-environment "
+ toString (unique cfg.displayManager.importedVariables)
)}
# Speed up application start by 50-150ms according to
# http://kdemonkey.blogspot.nl/2008/04/magic-trick.html
rm -rf "$HOME/.compose-cache"
@ -289,6 +288,14 @@ in
'';
};
importedVariables = mkOption {
type = types.listOf (types.strMatching "[a-zA-Z_][a-zA-Z0-9_]*");
visible = false;
description = ''
Environment variables to import into the systemd user environment.
'';
};
job = {
preStart = mkOption {
@ -393,6 +400,16 @@ in
services.xserver.displayManager.xserverBin = "${xorg.xorgserver.out}/bin/X";
services.xserver.displayManager.importedVariables = [
# This is required by user units using the session bus.
"DBUS_SESSION_BUS_ADDRESS"
# These are needed by the ssh-agent unit.
"DISPLAY"
"XAUTHORITY"
# This is required to specify session within user units (e.g. loginctl lock-session).
"XDG_SESSION_ID"
];
systemd.user.targets.graphical-session = {
unitConfig = {
RefuseManualStart = false;

View File

@ -16,6 +16,7 @@ let
cfg.extraPackages cfg.haskellPackages ++
optionals cfg.enableContribAndExtras
(with cfg.haskellPackages; [ xmonad-contrib xmonad-extras ]);
inherit (cfg) ghcArgs;
} cfg.config;
in
@ -76,6 +77,24 @@ in
}
'';
};
xmonadCliArgs = mkOption {
default = [];
type = with lib.types; listOf str;
description = ''
Command line arguments passed to the xmonad binary.
'';
};
ghcArgs = mkOption {
default = [];
type = with lib.types; listOf str;
description = ''
Command line arguments passed to the compiler (ghc)
invocation when xmonad.config is set.
'';
};
};
};
config = mkIf cfg.enable {
@ -85,7 +104,7 @@ in
start = let
xmonadCommand = if (cfg.config != null) then xmonadBin else "${xmonad}/bin/xmonad";
in ''
systemd-cat -t xmonad ${xmonadCommand} &
systemd-cat -t xmonad -- ${xmonadCommand} ${lib.escapeShellArgs cfg.xmonadCliArgs} &
waitPID=$!
'';
}];

View File

@ -3,8 +3,8 @@
pkgs.substituteAll {
src = ./raspberrypi-builder.sh;
isExecutable = true;
inherit (pkgs.buildPackages) bash;
path = with pkgs.buildPackages; [coreutils gnused gnugrep];
inherit (pkgs) bash;
path = [pkgs.coreutils pkgs.gnused pkgs.gnugrep];
firmware = pkgs.raspberrypifw;
inherit configTxt;
}

View File

@ -200,7 +200,9 @@ def main():
else:
# Update bootloader to latest if needed
systemd_version = subprocess.check_output(["@systemd@/bin/bootctl", "--version"], universal_newlines=True).split()[1]
sdboot_status = subprocess.check_output(["@systemd@/bin/bootctl", "--path=@efiSysMountPoint@", "status"], universal_newlines=True)
# Ideally this should use check_output as well, but as a temporary
# work-around for #97433 we ignore any errors.
sdboot_status = subprocess.run(["@systemd@/bin/bootctl", "--path=@efiSysMountPoint@", "status"], universal_newlines=True, stdout=subprocess.PIPE).stdout
# See status_binaries() in systemd bootctl.c for code which generates this
m = re.search("^\W+File:.*/EFI/(BOOT|systemd)/.*\.efi \(systemd-boot (\d+)\)$",

View File

@ -134,6 +134,10 @@ import ./make-test-python.nix ({ pkgs, ...} : {
};
testScript = ''
start_all()
peer0.wait_for_unit("network-online.target")
peer1.wait_for_unit("3proxy.service")
peer1.wait_for_open_port("9999")

View File

@ -363,6 +363,7 @@ in
unit-php = handleTest ./web-servers/unit-php.nix {};
upnp = handleTest ./upnp.nix {};
uwsgi = handleTest ./uwsgi.nix {};
v2ray = handleTest ./v2ray.nix {};
vault = handleTest ./vault.nix {};
victoriametrics = handleTest ./victoriametrics.nix {};
virtualbox = handleTestOn ["x86_64-linux"] ./virtualbox.nix {};

View File

@ -1,7 +1,7 @@
import ./make-test-python.nix ({ pkgs, ... }: {
name = "caddy";
meta = with pkgs.stdenv.lib.maintainers; {
maintainers = [ xfix ];
maintainers = [ xfix filalex77 ];
};
nodes = {
@ -9,9 +9,10 @@ import ./make-test-python.nix ({ pkgs, ... }: {
services.caddy.enable = true;
services.caddy.config = ''
http://localhost {
gzip
encode gzip
root ${
file_server
root * ${
pkgs.runCommand "testdir" {} ''
mkdir "$out"
echo hello world > "$out/example.html"
@ -23,9 +24,10 @@ import ./make-test-python.nix ({ pkgs, ... }: {
specialisation.etag.configuration = {
services.caddy.config = lib.mkForce ''
http://localhost {
gzip
encode gzip
root ${
file_server
root * ${
pkgs.runCommand "testdir2" {} ''
mkdir "$out"
echo changed > "$out/example.html"
@ -59,9 +61,11 @@ import ./make-test-python.nix ({ pkgs, ... }: {
)
etag = etag.replace("\r\n", " ")
http_code = webserver.succeed(
"curl -w \"%{{http_code}}\" -X HEAD -H 'If-None-Match: {}' {}".format(etag, url)
"curl --silent --show-error -o /dev/null -w \"%{{http_code}}\" --head -H 'If-None-Match: {}' {}".format(
etag, url
)
assert int(http_code) == 304, "HTTP code is not 304"
)
assert int(http_code) == 304, "HTTP code is {}, expected 304".format(http_code)
return etag

View File

@ -7,6 +7,7 @@
import ./make-test-python.nix ({ pkgs, ...} : {
name = "lxd-nftables";
meta = with pkgs.stdenv.lib.maintainers; {
maintainers = [ patryk27 ];
};

View File

@ -6,15 +6,14 @@ let
#
# I've chosen to import Alpine Linux, because its image is turbo-tiny and,
# generally, sufficient for our tests.
alpine-meta = pkgs.fetchurl {
url = "https://uk.images.linuxcontainers.org/images/alpine/3.11/i386/default/20200608_13:00/lxd.tar.xz";
sha256 = "1hkvaj3rr333zmx1759njy435lps33gl4ks8zfm7m4nqvipm26a0";
url = "https://tarballs.nixos.org/alpine/3.12/lxd.tar.xz";
hash = "sha256-1tcKaO9lOkvqfmG/7FMbfAEToAuFy2YMewS8ysBKuLA=";
};
alpine-rootfs = pkgs.fetchurl {
url = "https://uk.images.linuxcontainers.org/images/alpine/3.11/i386/default/20200608_13:00/rootfs.tar.xz";
sha256 = "1v82zdra4j5xwsff09qlp7h5vbsg54s0j7rdg4rynichfid3r347";
url = "https://tarballs.nixos.org/alpine/3.12/rootfs.tar.xz";
hash = "sha256-Tba9sSoaiMtQLY45u7p5DMqXTSDgs/763L/SQp0bkCA=";
};
lxd-config = pkgs.writeText "config.yaml" ''
@ -44,8 +43,10 @@ let
type: disk
'';
in {
name = "lxd";
meta = with pkgs.stdenv.lib.maintainers; {
maintainers = [ patryk27 ];
};
@ -53,7 +54,7 @@ in {
machine = { lib, ... }: {
virtualisation = {
# Since we're testing `limits.cpu`, we've gotta have a known number of
# cores to lay on
# cores to lean on
cores = 2;
# Ditto, for `limits.memory`
@ -67,6 +68,7 @@ in {
testScript = ''
machine.wait_for_unit("sockets.target")
machine.wait_for_unit("lxd.service")
machine.wait_for_file("/var/lib/lxd/unix.socket")
# It takes additional second for lxd to settle
machine.sleep(1)

View File

@ -18,7 +18,6 @@ import ./make-test-python.nix ({ pkgs, ... }: {
];
services.nginx.enable = true;
services.nginx.package = pkgs.nginx-lua;
services.nginx.enableSandbox = true;
services.nginx.virtualHosts.localhost = {
extraConfig = ''
location /test1-write {

View File

@ -22,6 +22,9 @@ let
* `metricProvider` (optional)
* this attribute contains additional machine config
*
* `nodeName` (optional)
* override an incompatible testnode name
*
* Example:
* exporterTests.<exporterName> = {
* exporterConfig = {
@ -590,6 +593,19 @@ let
'';
};
unifi-poller = {
nodeName = "unifi_poller";
exporterConfig.enable = true;
exporterConfig.controllers = [ { } ];
exporterTest = ''
wait_for_unit("prometheus-unifi-poller-exporter.service")
wait_for_open_port(9130)
succeed(
"curl -sSf localhost:9130/metrics | grep -q 'unifipoller_build_info{.\\+} 1'"
)
'';
};
varnish = {
exporterConfig = {
enable = true;
@ -646,24 +662,27 @@ let
};
};
in
mapAttrs (exporter: testConfig: (makeTest {
mapAttrs (exporter: testConfig: (makeTest (let
nodeName = testConfig.nodeName or exporter;
in {
name = "prometheus-${exporter}-exporter";
nodes.${exporter} = mkMerge [{
nodes.${nodeName} = mkMerge [{
services.prometheus.exporters.${exporter} = testConfig.exporterConfig;
} testConfig.metricProvider or {}];
testScript = ''
${exporter}.start()
${nodeName}.start()
${concatStringsSep "\n" (map (line:
if (builtins.substring 0 1 line == " " || builtins.substring 0 1 line == ")")
then line
else "${exporter}.${line}"
else "${nodeName}.${line}"
) (splitString "\n" (removeSuffix "\n" testConfig.exporterTest)))}
${exporter}.shutdown()
${nodeName}.shutdown()
'';
meta = with maintainers; {
maintainers = [ willibutz ];
maintainers = [ willibutz elseym ];
};
})) exporterTests
}))) exporterTests

83
nixos/tests/v2ray.nix Normal file
View File

@ -0,0 +1,83 @@
import ./make-test-python.nix ({ lib, pkgs, ... }: let
v2rayUser = {
# A random UUID.
id = "a6a46834-2150-45f8-8364-0f6f6ab32384";
alterId = 4;
};
# 1080 [http proxy] -> 1081 [vmess] -> direct
v2rayConfig = {
inbounds = [
{
tag = "http_in";
port = 1080;
listen = "127.0.0.1";
protocol = "http";
}
{
tag = "vmess_in";
port = 1081;
listen = "127.0.0.1";
protocol = "vmess";
settings.clients = [v2rayUser];
}
];
outbounds = [
{
tag = "vmess_out";
protocol = "vmess";
settings.vnext = [{
address = "127.0.0.1";
port = 1081;
users = [v2rayUser];
}];
}
{
tag = "direct";
protocol = "freedom";
}
];
routing.rules = [
{
type = "field";
inboundTag = "http_in";
outboundTag = "vmess_out";
}
{
type = "field";
inboundTag = "vmess_in";
outboundTag = "direct";
}
];
};
in {
name = "v2ray";
meta = with lib.maintainers; {
maintainers = [ servalcatty ];
};
machine = { pkgs, ... }: {
environment.systemPackages = [ pkgs.curl ];
services.v2ray = {
enable = true;
config = v2rayConfig;
};
services.httpd = {
enable = true;
adminAddr = "foo@example.org";
};
};
testScript = ''
start_all()
machine.wait_for_unit("httpd.service")
machine.wait_for_unit("v2ray.service")
machine.wait_for_open_port(80)
machine.wait_for_open_port(1080)
machine.succeed(
"curl --fail --max-time 10 --proxy http://localhost:1080 http://localhost"
)
'';
})

View File

@ -5,6 +5,10 @@ import ../make-test-python.nix ({ pkgs, ... }: {
};
nodes = {
client = { nodes, pkgs, ... }: {
networking.extraHosts = ''
${nodes.server.config.networking.primaryIPAddress} example.com
'';
environment.systemPackages = [
(pkgs.callPackage ./xmpp-sendmessage.nix { connectTo = nodes.server.config.networking.primaryIPAddress; })
];
@ -46,6 +50,11 @@ import ../make-test-python.nix ({ pkgs, ... }: {
module: ejabberd_service
access: local
shaper: fast
-
port: 5444
module: ejabberd_http
request_handlers:
"/upload": mod_http_upload
## Disabling digest-md5 SASL authentication. digest-md5 requires plain-text
## password storage (see auth_password_format option).
@ -180,6 +189,7 @@ import ../make-test-python.nix ({ pkgs, ... }: {
mod_client_state: {}
mod_configure: {} # requires mod_adhoc
## mod_delegation: {} # for xep0356
mod_disco: {}
#mod_irc:
# host: "irc.@HOST@"
# default_encoding: "utf-8"
@ -187,9 +197,9 @@ import ../make-test-python.nix ({ pkgs, ... }: {
## mod_http_fileserver:
## docroot: "/var/www"
## accesslog: "/var/log/ejabberd/access.log"
#mod_http_upload:
# thumbnail: false # otherwise needs the identify command from ImageMagick installed
# put_url: "https://@HOST@:5444"
mod_http_upload:
thumbnail: false # otherwise needs the identify command from ImageMagick installed
put_url: "http://@HOST@:5444/upload"
## # docroot: "@HOME@/upload"
#mod_http_upload_quota:
# max_days: 14

View File

@ -36,7 +36,11 @@ class CthonTest(ClientXMPP):
def timeout_callback(arg):
log.error("ERROR: Cannot upload file. XEP_0363 seems broken")
sys.exit(1)
try:
url = await self['xep_0363'].upload_file("${dummyFile}",timeout=10, timeout_callback=timeout_callback)
except:
log.error("ERROR: Cannot run upload command. XEP_0363 seems broken")
sys.exit(1)
log.info('Upload success!')
# Test MUC
self.plugin['xep_0045'].join_muc('testMucRoom', 'cthon98', wait=True)

View File

@ -1,5 +1,5 @@
{ mkDerivation, lib, fetchFromGitHub, cmake, pkgconfig
, qtbase, qtsvg, qttools
, qtbase, qtsvg, qttools, perl
# Cantata doesn't build with cdparanoia enabled so we disable that
# default for now until I (or someone else) figure it out.
@ -38,6 +38,8 @@ let
withUdisks = (withTaglib && withDevices);
perl' = perl.withPackages (ppkgs: [ ppkgs.URI ]);
in mkDerivation {
name = "${pname}-${version}";
@ -48,7 +50,18 @@ in mkDerivation {
sha256 = "0ix7xp352bziwz31mw79y7wxxmdn6060p8ry2px243ni1lz1qx1c";
};
buildInputs = [ qtbase qtsvg ]
patches = [
# Cantata wants to check if perl is in the PATH at runtime, but we
# patchShebangs the playlists scripts, making that unnecessary (perl will
# always be available because it's a dependency)
./dont-check-for-perl-in-PATH.diff
];
postPatch = ''
patchShebangs playlists
'';
buildInputs = [ qtbase qtsvg perl' ]
++ lib.optionals withTaglib [ taglib taglib_extras ]
++ lib.optionals withReplaygain [ ffmpeg_3 speex mpg123 ]
++ lib.optional withHttpStream qtmultimedia

View File

@ -0,0 +1,17 @@
diff --git a/playlists/dynamicplaylists.cpp b/playlists/dynamicplaylists.cpp
index 07b6dce3..6a3f97c9 100644
--- a/playlists/dynamicplaylists.cpp
+++ b/playlists/dynamicplaylists.cpp
@@ -211,11 +211,6 @@ void DynamicPlaylists::start(const QString &name)
return;
}
- if (Utils::findExe("perl").isEmpty()) {
- emit error(tr("You need to install \"perl\" on your system in order for Cantata's dynamic mode to function."));
- return;
- }
-
QString fName(Utils::dataDir(rulesDir, false)+name+constExtension);
if (!QFile::exists(fName)) {

View File

@ -4,30 +4,32 @@ let
py = python3Packages;
in py.buildPythonApplication rec {
pname = "friture";
version = "0.37";
version = "unstable-2020-02-16";
src = fetchFromGitHub {
owner = "tlecomte";
repo = pname;
rev = "v${version}";
sha256 = "1ivy5qfd90w1s1icsphvvdnnqz563v3fhg5pws2zn4483cgnzc2y";
rev = "4460b4e72a9c55310d6438f294424b5be74fc0aa";
sha256 = "1pmxzq78ibifby3gbir1ah30mgsqv0y7zladf5qf3sl5r1as0yym";
};
# module imports scipy.misc.factorial, but it has been removed since scipy
# 1.3.0; use scipy.special.factorial instead
patches = [ ./factorial.patch ];
nativeBuildInputs = (with py; [ numpy cython scipy ]) ++
[ wrapQtAppsHook ];
propagatedBuildInputs = with py; [
sounddevice
pyopengl
pyopengl-accelerate
docutils
numpy
pyqt5
appdirs
pyrr
rtmixer
];
patches = [
./unlock_constraints.patch
];
postFixup = ''

View File

@ -0,0 +1,34 @@
diff --git a/setup.py b/setup.py
index f31eeec..ac0927b 100644
--- a/setup.py
+++ b/setup.py
@@ -50,19 +50,19 @@ ext_modules = [LateIncludeExtension("friture_extensions.exp_smoothing_conv",
# these will be installed when calling 'pip install friture'
# they are also retrieved by 'requirements.txt'
install_requires = [
- "sounddevice==0.3.14",
- "rtmixer==0.1.0",
- "PyOpenGL==3.1.4",
- "PyOpenGL-accelerate==3.1.4",
- "docutils==0.15.2",
- "numpy==1.17.4",
- "PyQt5==5.13.2",
- "appdirs==1.4.3",
- "pyrr==0.10.3",
+ "sounddevice>=0.3.14",
+ "rtmixer>=0.1.0",
+ "PyOpenGL>=3.1.4",
+ "PyOpenGL-accelerate>=3.1.4",
+ "docutils>=0.15.2",
+ "numpy>=1.17.4",
+ "PyQt5>=5.13.2",
+ "appdirs>=1.4.3",
+ "pyrr>=0.10.3",
]
# Cython and numpy are needed when running setup.py, to build extensions
-setup_requires=["numpy==1.17.4", "Cython==0.29.14"]
+setup_requires=["numpy>=1.17.4", "Cython>=0.29.14"]
with open(join(dirname(__file__), 'README.rst')) as f:
long_description = f.read()

View File

@ -7,13 +7,13 @@
stdenv.mkDerivation rec {
pname = "ft2-clone";
version = "1.28";
version = "1.31";
src = fetchFromGitHub {
owner = "8bitbubsy";
repo = "ft2-clone";
rev = "v${version}";
sha256 = "1hbcl89cpx9bsafxrjyfx6vrbs4h3lnzmqm12smcvdg8ksfgzj0d";
sha256 = "02j876d4xmbdmqairrs5190dzdm3k4s5hi3g9wvx62cxnnw7igha";
};
nativeBuildInputs = [ cmake ];

View File

@ -1,7 +1,8 @@
{ stdenv
, fetchFromGitHub
, pkgconfig
, pkg-config
, cairo
, fluidsynth
, libX11
, libjack2
, liblo
@ -11,20 +12,18 @@
stdenv.mkDerivation rec {
pname = "mamba";
version = "1.3";
version = "1.4";
src = fetchFromGitHub {
owner = "brummer10";
repo = "Mamba";
rev = "v${version}";
sha256 = "1wa3f9c4l239mpxa7nxx8hajy4icn40vpvaxq5l1qzskl74w072d";
sha256 = "08dcm0mmka1lbssrgck66v9l2rk3r4y63ij06aw2f9la8a84y20j";
fetchSubmodules = true;
};
patches = [ ./fix-build.patch ];
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ cairo libX11 libjack2 liblo libsigcxx libsmf ];
nativeBuildInputs = [ pkg-config ];
buildInputs = [ cairo fluidsynth libX11 libjack2 liblo libsigcxx libsmf ];
makeFlags = [ "PREFIX=$(out)" ];

View File

@ -1,10 +0,0 @@
--- a/libxputty/Build/Makefile
+++ b/libxputty/Build/Makefile
@@ -20,1 +20,1 @@
- LDFLAGS += -fPIC `pkg-config --static --cflags --libs cairo x11` -lm
+ LDFLAGS += -fPIC `pkg-config --cflags --libs cairo x11` -lm
--- a/src/Makefile
+++ b/src/Makefile
@@ -84,1 +83,1 @@ ifneq ("$(wildcard ./$(BUILD_DIR))","")
- update-desktop-database
+ update-desktop-database || true

View File

@ -0,0 +1,42 @@
{ stdenv, fetchFromGitHub, cmake, pkg-config, libX11, glfw, makeWrapper,
libXrandr, libXinerama, libXcursor, gtk3, ffmpeg-full, ...}:
stdenv.mkDerivation rec {
pname = "MIDIVisualizer";
version = "5.1";
src = fetchFromGitHub {
owner = "kosua20";
repo = pname;
rev = "v${version}";
sha256 = "1fjlfa0qjpnjxl3bx5cq3dkswv9wihxmgfpkjijqp7kvf3q127rq";
};
nativeBuildInputs = [ cmake pkg-config makeWrapper];
buildInputs = [
libX11
glfw
libXrandr
libXinerama
libXcursor
gtk3
ffmpeg-full
];
installPhase = ''
mkdir -p $out/bin
cp MIDIVisualizer $out/bin
wrapProgram $out/bin/MIDIVisualizer \
--prefix XDG_DATA_DIRS : "${gtk3}/share/gsettings-schemas/${gtk3.name}:$XDG_DATA_DIRS"
'';
meta = with stdenv.lib; {
description = "A small MIDI visualizer tool, using OpenGL";
homepage = "https://github.com/kosua20/MIDIVisualizer";
license = licenses.mit;
platforms = platforms.linux;
maintainers = [ maintainers.ericdallo ];
};
}

View File

@ -0,0 +1,50 @@
{ stdenv, fetchFromGitHub, libpulseaudio, SDL2, SDL2_image, SDL2_ttf, alsaLib, libjack2 }:
stdenv.mkDerivation rec {
pname = "picoloop";
version = "0.77e";
src = fetchFromGitHub {
repo = pname;
owner = "yoyz";
rev = "${pname}-${version}";
sha256 = "0i8j8rgyha3ara6d4iis3wcimszf2csxdwrm5yq0wyhg74g7cvjd";
};
buildInputs = [
libpulseaudio
SDL2
SDL2.dev
SDL2_image
SDL2_ttf
alsaLib
libjack2
];
sourceRoot = "source/picoloop";
makeFlags = [ "-f Makefile.PatternPlayer_debian_RtAudio_sdl20" ];
NIX_CFLAGS_COMPILE = [ "-I${SDL2.dev}/include/SDL2" ];
hardeningDisable = [ "format" ];
patchPhase = ''
substituteInPlace SDL_GUI.cpp \
--replace "\"font.ttf\"" "\"$out/share/font.ttf\"" \
--replace "\"font.bmp\"" "\"$out/share/font.bmp\""
'';
installPhase = ''
mkdir -p $out/{bin,share}
cp PatternPlayer_debian_RtAudio_sdl20 $out/bin/picoloop
cp {font.*,LICENSE} $out/share
'';
meta = with stdenv.lib; {
description = "Picoloop is a synth and a stepsequencer (a clone of the famous nanoloop).";
homepage = "https://github.com/yoyz/picoloop";
platforms = platforms.linux;
license = licenses.bsd3;
};
}

View File

@ -0,0 +1,35 @@
{ stdenv, fetchFromGitHub, autoreconfHook, pkg-config, qttools, which
, alsaLib, libjack2, liblo, qtbase
}:
stdenv.mkDerivation rec {
pname = "seq66";
version = "0.90.5";
src = fetchFromGitHub {
owner = "ahlstromcj";
repo = pname;
rev = version;
sha256 = "1jvra1wzlycfpvffnqidk264zw6fyl4fsghkw5256ldk22aalmq9";
};
nativeBuildInputs = [ autoreconfHook pkg-config qttools which ];
buildInputs = [ alsaLib libjack2 liblo qtbase ];
postPatch = ''
for d in libseq66/include libseq66/src libsessions/include libsessions/src seq_qt5/src seq_rtmidi/include seq_rtmidi/src Seqtool/src; do
substituteInPlace "$d/Makefile.am" --replace '$(git_info)' '${version}'
done
'';
enableParallelBuilding = true;
meta = with stdenv.lib; {
homepage = "https://github.com/ahlstromcj/seq66";
description = "Loop based midi sequencer with Qt GUI derived from seq24 and sequencer64";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ orivej ];
platforms = platforms.linux;
};
}

View File

@ -9,11 +9,11 @@
python3Packages.buildPythonApplication rec {
pname = "sublime-music";
version = "0.11.0";
version = "0.11.7";
src = python3Packages.fetchPypi {
inherit pname version;
sha256 = "1rnjc8pjfaq67mq10gy939g77azc80lxf77s9nsaxds4q5j1yrl2";
sha256 = "1x6b02gw46gp6qcgv67j7k3gr1dpfczbyma6dxanag8pnpqrj8qi";
};
nativeBuildInputs = [

View File

@ -5,13 +5,13 @@
buildPythonApplication rec {
pname = "vorta";
version = "0.7.0";
version = "0.7.1";
src = fetchFromGitHub {
owner = "borgbase";
repo = "vorta";
rev = "v${version}";
sha256 = "1hz19c0lphwql881n7w0ls39bbl63lccx57c3klwfyzgsxcgdy2j";
sha256 = "069fq5gv324l2ap3g6m6i12lhq1iqm27dsmaagyc3sva945j0gxw";
};
postPatch = ''

View File

@ -2,17 +2,17 @@
buildGoModule rec {
pname = "go-ethereum";
version = "1.9.20";
version = "1.9.21";
src = fetchFromGitHub {
owner = "ethereum";
repo = pname;
rev = "v${version}";
sha256 = "031cbl8yqw5g5yrm5h1x8s5ckdw2xkym46009l579zvafn2vcnj7";
sha256 = "0mr5pw08jka11lzgl28555nb90cqxx9vlqd1plfmyic6rb5z11df";
};
runVend = true;
vendorSha256 = "1744df059bjksvih4653nnvb4kb1xvzdhypd0nnz36m1wrihqssv";
vendorSha256 = "155hmny3543h02ryn1nnlpmvs0qvhd0lb66vmkhw5351m6gkbx7x";
doCheck = false;
@ -31,7 +31,6 @@ buildGoModule rec {
"cmd/puppeth"
"cmd/rlpdump"
"cmd/utils"
"cmd/wnode"
];
# Fix for usb-related segmentation faults on darwin

View File

@ -19,9 +19,9 @@ let
sha256Hash = "sha256-3W+eUcffRk7lZxbvf3X/Np4hkwAUqU51sQ061XR7Ddc=";
};
latestVersion = { # canary & dev
version = "4.2.0.8"; # "Android Studio 4.2 Canary 8"
build = "202.6787931";
sha256Hash = "0y5fzr22dknzxay1bhd1ymhdnmdrpccdw8dswy2z9bxjsvq65n62";
version = "4.2.0.10"; # "Android Studio 4.2 Canary 10"
build = "202.6811877";
sha256Hash = "sha256-ZKfETCECIOq+q/5N+I13ceb5dqGMGTXMGrqSeTL9KCc=";
};
in {
# Attributes are named by their corresponding release channels

View File

@ -0,0 +1,113 @@
{ stdenv
, lib
, fetchFromGitHub
, lazarus
, fpc
, libX11
# GTK2/3
, pango
, cairo
, glib
, atk
, gtk2
, gtk3
, gdk-pixbuf
, python3
# Qt5
, libqt5pas
, qt5
, widgetset ? "qt5"
# See https://github.com/Alexey-T/CudaText-lexers
, additionalLexers ? [ "Nix" ]
}:
assert builtins.elem widgetset [ "gtk2" "gtk3" "qt5" ];
let
deps = lib.mapAttrs
(name: spec:
fetchFromGitHub {
owner = "Alexey-T";
repo = name;
inherit (spec) rev sha256;
}
)
(builtins.fromJSON (builtins.readFile ./deps.json));
in
stdenv.mkDerivation rec {
pname = "cudatext";
version = "1.111.0";
src = fetchFromGitHub {
owner = "Alexey-T";
repo = "CudaText";
rev = version;
sha256 = "1ai0g8fmw4m237dqh5dkr8w9qqricyvp49ijz2ivvmg9dsdfzjfp";
};
patches = [
# Don't check for update
./dont-check-update.patch
];
postPatch = ''
substituteInPlace app/proc_globdata.pas \
--replace "/usr/share/cudatext" "$out/share/cudatext" \
--replace "libpython3.so" "${python3}/lib/libpython3.so"
'';
nativeBuildInputs = [ lazarus fpc ]
++ lib.optional (widgetset == "qt5") qt5.wrapQtAppsHook;
buildInputs = [ libX11 ]
++ lib.optionals (lib.hasPrefix "gtk" widgetset) [ pango cairo glib atk gdk-pixbuf ]
++ lib.optional (widgetset == "gtk2") gtk2
++ lib.optional (widgetset == "gtk3") gtk3
++ lib.optional (widgetset == "qt5") libqt5pas;
NIX_LDFLAGS = "--as-needed -rpath ${lib.makeLibraryPath buildInputs}";
buildPhase = lib.concatStringsSep "\n" (lib.mapAttrsToList (name: dep: ''
cp -r --no-preserve=mode ${dep} ${name}
'') deps) + ''
lazbuild --lazarusdir=${lazarus}/share/lazarus --pcp=./lazarus --ws=${widgetset} \
EncConv/encconv/encconv_package.lpk \
ATBinHex-Lazarus/atbinhex/atbinhex_package.lpk \
ATFlatControls/atflatcontrols/atflatcontrols_package.lpk \
ATSynEdit/atsynedit/atsynedit_package.lpk \
ATSynEdit_Cmp/atsynedit_cmp/atsynedit_cmp_package.lpk \
EControl/econtrol/econtrol_package.lpk \
ATSynEdit_Ex/atsynedit_ex/atsynedit_ex_package.lpk \
Python-for-Lazarus/python4lazarus/python4lazarus_package.lpk \
Emmet-Pascal/emmet/emmet_package.lpk \
app/cudatext.lpi
'';
installPhase = ''
install -Dm755 app/cudatext $out/bin/cudatext
install -dm755 $out/share/cudatext
cp -r app/{data,py,settings_default} $out/share/cudatext
install -Dm644 setup/debfiles/cudatext-512.png -t $out/share/pixmaps
install -Dm644 setup/debfiles/cudatext.desktop -t $out/share/applications
'' + lib.concatMapStringsSep "\n" (lexer: ''
install -Dm644 CudaText-lexers/${lexer}/*.{cuda-lexmap,lcf} $out/share/cudatext/data/lexlib
'') additionalLexers;
meta = with lib; {
description = "Cross-platform code editor";
longDescription = ''
Text/code editor with lite UI. Syntax highlighting for 200+ languages.
Config system in JSON files. Multi-carets and multi-selections.
Search and replace with RegEx. Extendable by Python plugins and themes.
'';
homepage = "http://www.uvviewsoft.com/cudatext/";
license = licenses.mpl20;
maintainers = with maintainers; [ sikmir ];
platforms = platforms.linux;
};
}

View File

@ -0,0 +1,42 @@
{
"EncConv": {
"rev": "2020.06.15",
"sha256": "07dpvq3ppfq3b70i1smkf7vwdlzq8qnxs3fk94hi9h1z36bz2rw3"
},
"ATBinHex-Lazarus": {
"rev": "2020.09.05",
"sha256": "022yx5vic4hnc9lz53wvr4h7hf0h71801dzlilj55x5mf8p59072"
},
"ATFlatControls": {
"rev": "2020.08.23",
"sha256": "1axzwiz5h62v11ncynxcg431dfbky9pwyha7cd6kpizjdjagfklw"
},
"ATSynEdit": {
"rev": "2020.09.05",
"sha256": "0qn0fp7rbi48f3nrysb0knkd7a3a6pl5w72yf95g5iibal4zrib2"
},
"ATSynEdit_Cmp": {
"rev": "2020.09.05",
"sha256": "1bd25zc97001b7lg0bvi8va9mazkr6jih6d2ddkabcxcnsj0dxnq"
},
"EControl": {
"rev": "2020.09.05",
"sha256": "1n7s1zkhrr216gqdqvq6wq0n3jq7s78mwpi5s5j8054p0fak1ywi"
},
"ATSynEdit_Ex": {
"rev": "2020.09.05",
"sha256": "17y2cx5syj3jvrszjgdyf1p6vilp2qgaggz4y8yqnz99cvd0shs7"
},
"Python-for-Lazarus": {
"rev": "2020.07.31",
"sha256": "0qbs51h6gw8qd3h06kwy1j7db35shbg7r2rayrhvvw0vzr9n330j"
},
"Emmet-Pascal": {
"rev": "2020.09.05",
"sha256": "0qfiirxnk5g3whx8y8hp54ch3h6gkkd01yf79m95bwar5qvdfybg"
},
"CudaText-lexers": {
"rev": "2020.08.10",
"sha256": "1gzs2psyfhb9si1qyacxzfjb3dz2v255hv7y4jlkbxdxv0kckqr6"
}
}

View File

@ -0,0 +1,12 @@
diff --git i/app/formmain.pas w/app/formmain.pas
index 8c1131680..6c6c0043f 100644
--- i/app/formmain.pas
+++ w/app/formmain.pas
@@ -2135,6 +2135,7 @@ begin
false
{$endif};
*)
+ mnuHelpCheckUpd.Enabled:=false;
with AppPanels[cPaneSide] do
begin

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, ncurses, pkgconfig, texinfo, libxml2, gnutls, gettext, autoconf, automake
{ stdenv, fetchurl, ncurses, pkgconfig, texinfo, libxml2, gnutls, gettext, autoconf, automake, jansson
, AppKit, Carbon, Cocoa, IOKit, OSAKit, Quartz, QuartzCore, WebKit
, ImageCaptureCore, GSS, ImageIO # These may be optional
}:
@ -32,7 +32,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ pkgconfig autoconf automake ];
buildInputs = [ ncurses libxml2 gnutls texinfo gettext
buildInputs = [ ncurses libxml2 gnutls texinfo gettext jansson
AppKit Carbon Cocoa IOKit OSAKit Quartz QuartzCore WebKit
ImageCaptureCore GSS ImageIO # may be optional
];

View File

@ -268,12 +268,12 @@ in
clion = buildClion rec {
name = "clion-${version}";
version = "2020.2"; /* updated by script */
version = "2020.2.1"; /* updated by script */
description = "C/C++ IDE. New. Intelligent. Cross-platform";
license = stdenv.lib.licenses.unfree;
src = fetchurl {
url = "https://download.jetbrains.com/cpp/CLion-${version}.tar.gz";
sha256 = "1j80k6r4nbr8abwkpx78sy3jzq3jsywn2k6g4mjx6h0adwxswymm"; /* updated by script */
sha256 = "1sma3ay02lajg6q1g3k05gi7jdja7cf9rxb9v0w62s6z87l719bv"; /* updated by script */
};
wmClass = "jetbrains-clion";
update-channel = "CLion RELEASE"; # channel's id as in http://www.jetbrains.com/updates/updates.xml
@ -281,12 +281,12 @@ in
datagrip = buildDataGrip rec {
name = "datagrip-${version}";
version = "2020.2"; /* updated by script */
version = "2020.2.2"; /* updated by script */
description = "Your Swiss Army Knife for Databases and SQL";
license = stdenv.lib.licenses.unfree;
src = fetchurl {
url = "https://download.jetbrains.com/datagrip/${name}.tar.gz";
sha256 = "0d0m6v4lr6qhi79csdpcyiyd2hnhlsan9lpnjmhkdxd84i1dl15a"; /* updated by script */
sha256 = "1bk6z6mirrykypb4j2wa4744v0m9y1n7973qgj6z3dsifrq9q7zc"; /* updated by script */
};
wmClass = "jetbrains-datagrip";
update-channel = "DataGrip RELEASE";
@ -294,12 +294,12 @@ in
goland = buildGoland rec {
name = "goland-${version}";
version = "2020.2.1"; /* updated by script */
version = "2020.2.2"; /* updated by script */
description = "Up and Coming Go IDE";
license = stdenv.lib.licenses.unfree;
src = fetchurl {
url = "https://download.jetbrains.com/go/${name}.tar.gz";
sha256 = "15jd2yn4g3lya54ppcp8b0bvf2pp2khdvqba2g1aml16d5z8mkq6"; /* updated by script */
sha256 = "1r6bbx5hsg82l1pa3syfdi8nbsz6rrfszsw4dmwcnxvccp2hs3mh"; /* updated by script */
};
wmClass = "jetbrains-goland";
update-channel = "GoLand RELEASE";
@ -307,12 +307,12 @@ in
idea-community = buildIdea rec {
name = "idea-community-${version}";
version = "2020.2"; /* updated by script */
version = "2020.2.1"; /* updated by script */
description = "Integrated Development Environment (IDE) by Jetbrains, community edition";
license = stdenv.lib.licenses.asl20;
src = fetchurl {
url = "https://download.jetbrains.com/idea/ideaIC-${version}.tar.gz";
sha256 = "0rymyyhgm42i487dhlxh78shyvq4hd56frgz7wrqf85hg2j5ha0y"; /* updated by script */
sha256 = "055hy5jy5151x3gf8hn7ar36br545qr253fz9wrc3b49wydg01x1"; /* updated by script */
};
wmClass = "jetbrains-idea-ce";
update-channel = "IntelliJ IDEA RELEASE";
@ -320,12 +320,12 @@ in
idea-ultimate = buildIdea rec {
name = "idea-ultimate-${version}";
version = "2020.2"; /* updated by script */
version = "2020.2.1"; /* updated by script */
description = "Integrated Development Environment (IDE) by Jetbrains, requires paid license";
license = stdenv.lib.licenses.unfree;
src = fetchurl {
url = "https://download.jetbrains.com/idea/ideaIU-${version}-no-jbr.tar.gz";
sha256 = "00mbf8asxjdnfciz6bl8b83kqknqdnars5w5w5w38rmza53pzxsi"; /* updated by script */
sha256 = "1g18l3malsyn7dij4w83yfcsb8msa0s89mzlld3dby8hr9bq0aqm"; /* updated by script */
};
wmClass = "jetbrains-idea";
update-channel = "IntelliJ IDEA RELEASE";
@ -333,12 +333,12 @@ in
mps = buildMps rec {
name = "mps-${version}";
version = "2020.1.3"; /* updated by script */
version = "2020.1.4"; /* updated by script */
description = "Create your own domain-specific language";
license = stdenv.lib.licenses.unfree;
src = fetchurl {
url = "https://download.jetbrains.com/mps/2020.1/MPS-${version}.tar.gz";
sha256 = "1ncvq834vn47pmh3q875hgqi4m7h3inljp89w3jwwhjn3g985ysz"; /* updated by script */
sha256 = "1j5n100fl8yvfla2slm95wv499azwzzxigp1kdcaj8xbc0a0mp7c"; /* updated by script */
};
wmClass = "jetbrains-mps";
update-channel = "MPS RELEASE";
@ -346,12 +346,12 @@ in
phpstorm = buildPhpStorm rec {
name = "phpstorm-${version}";
version = "2020.2"; /* updated by script */
version = "2020.2.1"; /* updated by script */
description = "Professional IDE for Web and PHP developers";
license = stdenv.lib.licenses.unfree;
src = fetchurl {
url = "https://download.jetbrains.com/webide/PhpStorm-${version}.tar.gz";
sha256 = "1zxhb2w7nivnx8habcf5vii6bwzaihs5x8smy0zf8ngv3xwr6vjc"; /* updated by script */
sha256 = "14hz6w5lgn8ddscicm4s9xhi07j5adsq0bmyr8amzmj5q6jgw4p9"; /* updated by script */
};
wmClass = "jetbrains-phpstorm";
update-channel = "PhpStorm RELEASE";
@ -359,12 +359,12 @@ in
pycharm-community = buildPycharm rec {
name = "pycharm-community-${version}";
version = "2020.2"; /* updated by script */
version = "2020.2.1"; /* updated by script */
description = "PyCharm Community Edition";
license = stdenv.lib.licenses.asl20;
src = fetchurl {
url = "https://download.jetbrains.com/python/${name}.tar.gz";
sha256 = "12pp3xp74dzgjrv2nz83dnqycb250kkgqlb3skjkdx9pabmfxck0"; /* updated by script */
sha256 = "0kml58v6clqj0j0vlvghrywxym2n9h41izazzn4srn7wjj9010fa"; /* updated by script */
};
wmClass = "jetbrains-pycharm-ce";
update-channel = "PyCharm RELEASE";
@ -372,12 +372,12 @@ in
pycharm-professional = buildPycharm rec {
name = "pycharm-professional-${version}";
version = "2020.2"; /* updated by script */
version = "2020.2.1"; /* updated by script */
description = "PyCharm Professional Edition";
license = stdenv.lib.licenses.unfree;
src = fetchurl {
url = "https://download.jetbrains.com/python/${name}.tar.gz";
sha256 = "0xq0nba31yc7cm1lbgkmgfbr5kp5fq5k7j2n6kampm2hyx5fa0ak"; /* updated by script */
sha256 = "0ml9fg1dlfg8sdp9n8nlsj7z88dx0ac1kvlpk61p7q5di1lyxc94"; /* updated by script */
};
wmClass = "jetbrains-pycharm";
update-channel = "PyCharm RELEASE";
@ -385,12 +385,12 @@ in
rider = buildRider rec {
name = "rider-${version}";
version = "2020.2"; /* updated by script */
version = "2020.2.1"; /* updated by script */
description = "A cross-platform .NET IDE based on the IntelliJ platform and ReSharper";
license = stdenv.lib.licenses.unfree;
src = fetchurl {
url = "https://download.jetbrains.com/rider/JetBrains.Rider-${version}.tar.gz";
sha256 = "0fxgdxsrrl659lh45slikgck6jld90rd6nnj8gj3aixq0yp5pkix"; /* updated by script */
sha256 = "0xrk7n0mprzy7dfkx3vj5wasw5031jl61qkh89y6w031hp77vq7n"; /* updated by script */
};
wmClass = "jetbrains-rider";
update-channel = "Rider RELEASE";
@ -398,12 +398,12 @@ in
ruby-mine = buildRubyMine rec {
name = "ruby-mine-${version}";
version = "2020.2"; /* updated by script */
version = "2020.2.1"; /* updated by script */
description = "The Most Intelligent Ruby and Rails IDE";
license = stdenv.lib.licenses.unfree;
src = fetchurl {
url = "https://download.jetbrains.com/ruby/RubyMine-${version}.tar.gz";
sha256 = "1caxd5qcxwwrdy3ma87gnywr5czg3lam1n2gwbnc7hdxgfnvn3qz"; /* updated by script */
sha256 = "1pkzql710bc4qdz5pdhh0yx9wkqx85qwkwm1jvvvxbvbsj299vcb"; /* updated by script */
};
wmClass = "jetbrains-rubymine";
update-channel = "RubyMine RELEASE";
@ -411,12 +411,12 @@ in
webstorm = buildWebStorm rec {
name = "webstorm-${version}";
version = "2020.2"; /* updated by script */
version = "2020.2.1"; /* updated by script */
description = "Professional IDE for Web and JavaScript development";
license = stdenv.lib.licenses.unfree;
src = fetchurl {
url = "https://download.jetbrains.com/webstorm/WebStorm-${version}.tar.gz";
sha256 = "100j2q9hz0a50n3x3khk7hap7b496g6sx0y6q7n7vy2zayh5ibm5"; /* updated by script */
sha256 = "1sx67bms90fsc1bf6pqz1rd1x9aysj0xxb8d7cnclz6bv8kzhgfp"; /* updated by script */
};
wmClass = "jetbrains-webstorm";
update-channel = "WebStorm RELEASE";

View File

@ -26,7 +26,6 @@
, exiv2
, ffmpeg
, flex
, jasper ? null, withJpeg2k ? false # disable JPEG2000 support, jasper has unfixed CVE
, lcms2
, lensfun
, libgphoto2
@ -98,8 +97,7 @@ mkDerivation rec {
marble
oxygen
threadweaver
]
++ lib.optionals withJpeg2k [ jasper ];
];
enableParallelBuilding = true;

View File

@ -14,6 +14,7 @@
, qtmultimedia
, qtsvg
, qttools
, libsecret
# optional client deps
, giflib
@ -45,6 +46,7 @@ let
qtmultimedia
qtsvg
qttools
libsecret
# optional:
giflib # gif animation export support
kdnssd # local server discovery with Zeroconf

View File

@ -0,0 +1,37 @@
{ stdenv
, fetchFromGitHub
}:
{
hexmap = stdenv.mkDerivation {
name = "hexmap";
version = "2020-06-06";
src = fetchFromGitHub {
owner = "lifelike";
repo = "hexmapextension";
rev = "11401e23889318bdefb72df6980393050299d8cc";
sha256 = "1a4jhva624mbljj2k43wzi6hrxacjz4626jfk9y2fg4r4sga22mm";
};
preferLocalBuild = true;
installPhase = ''
runHook preInstall
mkdir -p "$out/share/inkscape/extensions"
cp -p *.inx *.py "$out/share/inkscape/extensions/"
find "$out/share/inkscape/extensions/" -name "*.py" -exec chmod +x {} \;
runHook postInstall
'';
meta = with stdenv.lib; {
description = "This is an extension for creating hex grids in Inkscape. It can also be used to make brick patterns of staggered rectangles";
homepage = "https://github.com/lifelike/hexmapextension";
license = licenses.gpl2Plus;
maintainers = [ maintainers.raboof ];
platforms = platforms.all;
};
};
}

View File

@ -0,0 +1,21 @@
{ lib
, inkscape
, symlinkJoin
, makeWrapper
, inkscapeExtensions ? []
}:
symlinkJoin {
name = "inkscape-with-extensions-${lib.getVersion inkscape}";
paths = [ inkscape ] ++ inkscapeExtensions;
buildInputs = [ makeWrapper ];
postBuild = ''
rm -f $out/bin/inkscape
makeWrapper "${inkscape}/bin/inkscape" "$out/bin/inkscape" --set INKSCAPE_DATADIR "$out/share"
'';
inherit (inkscape) meta;
}

View File

@ -1,6 +1,7 @@
{ stdenv, fetchFromGitHub, fetchpatch
, pkgconfig, wrapQtAppsHook
, poppler, qt5, gnuplot
, poppler, gnuplot
, qmake, qtbase, qttools
}:
# This package only builds ktikz without KDE integration because KDE4 is
@ -36,10 +37,10 @@ stdenv.mkDerivation rec {
})
];
nativeBuildInputs = [ pkgconfig qt5.qttools qt5.qmake wrapQtAppsHook ];
QT_PLUGIN_PATH = "${qt5.qtbase}/${qt5.qtbase.qtPluginPrefix}";
nativeBuildInputs = [ pkgconfig qttools qmake wrapQtAppsHook ];
QT_PLUGIN_PATH = "${qtbase}/${qtbase.qtPluginPrefix}";
buildInputs = [ qt5.qtbase poppler ];
buildInputs = [ qtbase poppler ];
enableParallelBuilding = true;
qmakeFlags = [

View File

@ -8,6 +8,7 @@
, librsvg
, gobject-introspection
, libmypaint
, hicolor-icon-theme
, mypaint-brushes
, gdk-pixbuf
, pkgconfig
@ -36,7 +37,9 @@ in buildPythonApplication rec {
swig
wrapGAppsHook
gobject-introspection # for setup hook
hicolor-icon-theme # fór setup hook
];
buildInputs = [
gtk3
gdk-pixbuf
@ -48,6 +51,9 @@ in buildPythonApplication rec {
librsvg
pycairo
pygobject3
# Mypaint checks for a presence of this theme scaffold and crashes when not present.
hicolor-icon-theme
];
propagatedBuildInputs = [

View File

@ -12,8 +12,6 @@ buildGoPackage {
sha256 = "0p48lgig9kblxvgq1kggczkn4qdbx6ciq9c8x0179i80vl4jf7v6";
};
goDeps = ./deps.nix;
# patching path where repository used to exist
postPatch = ''
sed -i "s+github.com/cristim/autospotting/core+github.com/AutoSpotting/AutoSpotting/core+" autospotting.go

View File

@ -1,75 +0,0 @@
# file generated from Gopkg.lock using dep2nix (https://github.com/nixcloud/dep2nix)
[
{
goPackagePath = "github.com/aws/aws-lambda-go";
fetch = {
type = "git";
url = "https://github.com/aws/aws-lambda-go";
rev = "2d482ef09017ae953b1e8d5a6ddac5b696663a3c";
sha256 = "06v2yfvn4sn116lds0526a8mfrsng4vafrdjf1dhpalqarrbdvmz";
};
}
{
goPackagePath = "github.com/aws/aws-sdk-go";
fetch = {
type = "git";
url = "https://github.com/aws/aws-sdk-go";
rev = "9333060a8d957db41bff1c80603a802aa674fad8";
sha256 = "0fnypw6zm6k70fzhm5a8g69ag64rxbrrpdk7l3rkfqd99slyg5kz";
};
}
{
goPackagePath = "github.com/cristim/ec2-instances-info";
fetch = {
type = "git";
url = "https://github.com/cristim/ec2-instances-info";
rev = "73c042a5558cd6d8b61fb82502d6f7aec334e9ed";
sha256 = "1xajrkxqqz5wlbi9w2wdhnk115rbmqxyga29f8v9psq8hzwgi0rg";
};
}
{
goPackagePath = "github.com/davecgh/go-spew";
fetch = {
type = "git";
url = "https://github.com/davecgh/go-spew";
rev = "d8f796af33cc11cb798c1aaeb27a4ebc5099927d";
sha256 = "19z27f306fpsrjdvkzd61w1bdazcdbczjyjck177g33iklinhpvx";
};
}
{
goPackagePath = "github.com/go-ini/ini";
fetch = {
type = "git";
url = "https://github.com/go-ini/ini";
rev = "5cf292cae48347c2490ac1a58fe36735fb78df7e";
sha256 = "0xbnw1nd22q6k863n5gs0nxld15w0p8qxbhfky85akcb5rk1vwi9";
};
}
{
goPackagePath = "github.com/jmespath/go-jmespath";
fetch = {
type = "git";
url = "https://github.com/jmespath/go-jmespath";
rev = "0b12d6b5";
sha256 = "1vv6hph8j6xgv7gwl9vvhlsaaqsm22sxxqmgmldi4v11783pc1ld";
};
}
{
goPackagePath = "github.com/namsral/flag";
fetch = {
type = "git";
url = "https://github.com/namsral/flag";
rev = "67f268f20922975c067ed799e4be6bacf152208c";
sha256 = "1lmxq3z276zrsggpfq9b7yklzzxdyib49zr8sznb1lcqlvxqsr47";
};
}
{
goPackagePath = "github.com/pkg/errors";
fetch = {
type = "git";
url = "https://github.com/pkg/errors";
rev = "645ef00459ed84a119197bfb8d8205042c6df63d";
sha256 = "001i6n71ghp2l6kdl3qq1v2vmghcz3kicv9a5wgcihrzigm75pp5";
};
}
]

View File

@ -2,17 +2,19 @@
buildGoPackage rec {
pname = "cointop";
version = "1.4.6";
version = "1.5.4";
src = fetchFromGitHub {
owner = "miguelmota";
repo = pname;
rev = version;
sha256 = "1mkb97x73vzxnbvhnxx3msicr1z0b3sjmydx257ax3nscrmf1l5z";
rev = "v${version}";
sha256 = "1gkrwh5g69mywlllszy310xpahr8rz8nghjjpiamd85djf1iz43b";
};
goPackagePath = "github.com/miguelmota/cointop";
buildFlagsArray = [ "-ldflags=-s -w -X ${goPackagePath}/cointop.version=${version}" ];
meta = with lib; {
description = "The fastest and most interactive terminal based UI application for tracking cryptocurrencies";
longDescription = ''

View File

@ -1,14 +1,15 @@
{ lib, fetchFromGitHub, python3Packages, qtbase, wrapQtAppsHook, secp256k1 }:
{ lib, fetchFromGitHub, python3Packages, qtbase, fetchpatch, wrapQtAppsHook
, secp256k1 }:
python3Packages.buildPythonApplication rec {
pname = "electron-cash";
version = "4.0.14";
version = "4.1.0";
src = fetchFromGitHub {
owner = "Electron-Cash";
repo = "Electron-Cash";
rev = version;
sha256 = "1dp7cj1185h6xfz6jzh0iq58zvg3wq9hl96bkgxkf5h4ygni2vm6";
sha256 = "1ccfm6kkmbkvykfdzrisxvr0lx9kgq4l43ixk6v3xnvhnbfwz4s2";
};
propagatedBuildInputs = with python3Packages; [
@ -35,6 +36,15 @@ python3Packages.buildPythonApplication rec {
nativeBuildInputs = [ wrapQtAppsHook ];
patches = [
# Patch a failed test, this can be removed in next version
(fetchpatch {
url =
"https://github.com/Electron-Cash/Electron-Cash/commit/1a9122d59be0c351b14c174a60880c2e927e6168.patch";
sha256 = "0zw629ypn9jxb1y124s3dkbbf2q3wj1i97j16lzdxpjy3sk0p5hk";
})
];
postPatch = ''
substituteInPlace contrib/requirements/requirements.txt \
--replace "qdarkstyle==2.6.8" "qdarkstyle<3"
@ -43,9 +53,7 @@ python3Packages.buildPythonApplication rec {
--replace "(share_dir" "(\"share\""
'';
checkInputs = with python3Packages; [
pytest
];
checkInputs = with python3Packages; [ pytest ];
checkPhase = ''
unset HOME

View File

@ -2,12 +2,12 @@
let
pname = "joplin-desktop";
version = "1.0.233";
version = "1.0.241";
name = "${pname}-${version}";
src = fetchurl {
url = "https://github.com/laurent22/joplin/releases/download/v${version}/Joplin-${version}.AppImage";
sha256 = "1fmk56b9b70ly1r471mhppr8fz1wm2gpxji1v760ynha8fqy7qg1";
sha256 = "0q0vwjch6m0n461x4llhidkqvy492dqnk8q1al8gnfz2grav6537";
};
appimageContents = appimageTools.extractType2 {

View File

@ -3,7 +3,6 @@
, enableGSL ? true, gsl
, enableGhostScript ? true, ghostscript
, enableMuPDF ? true, mupdf
, enableJPEG2K ? false, jasper ? null # disabled by default, jasper has unfixed CVE
, enableDJVU ? true, djvulibre
, enableGOCR ? false, gocr # Disabled by default due to crashes
, enableTesseract ? true, leptonica, tesseract4
@ -144,7 +143,6 @@ in stdenv.mkDerivation rec {
optional enableGSL gsl ++
optional enableGhostScript ghostscript ++
optional enableMuPDF mupdf_modded ++
optional enableJPEG2K jasper ++
optional enableDJVU djvulibre ++
optional enableGOCR gocr ++
optionals enableTesseract [ leptonica_modded tesseract_modded ];

View File

@ -1,32 +1,74 @@
{ appimageTools, fetchurl, lib, gsettings-desktop-schemas, gtk3}:
{ stdenv, fetchurl, lib, makeWrapper, electron, makeDesktopItem, graphicsmagick
, writeScript }:
let
pname = "obsidian";
version = "0.8.2";
in
appimageTools.wrapType2 rec {
name = "${pname}-${version}";
src = fetchurl {
url = "https://github.com/obsidianmd/obsidian-releases/releases/download/v${version}/Obsidian-${version}.AppImage";
sha256 = "04jgsd97ivdm84diiafwqxzc9vvga1gsr7xicmqhdq05ns3xsfyz";
icon = fetchurl {
url =
"https://forum.obsidian.md/uploads/default/original/1X/bf119bd48f748f4fd2d65f2d1bb05d3c806883b5.png";
sha256 = "18ylnbvxr6k4x44c4i1d55wxy2dq4fdppp43a4wl6h6zar0sc9s2";
};
profile = ''
export LC_ALL=C.UTF-8
export XDG_DATA_DIRS=${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name}:${gtk3}/share/gsettings-schemas/${gtk3.name}:$XDG_DATA_DIRS
desktopItem = makeDesktopItem {
name = "obsidian";
desktopName = "Obsidian";
comment = "Knowledge base";
icon = "obsidian";
exec = "obsidian";
categories = "Office";
};
updateScript = writeScript "obsidian-updater" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl jq common-updater-scripts
set -eu -o pipefail
latestVersion="$(curl -sS https://raw.githubusercontent.com/obsidianmd/obsidian-releases/master/desktop-releases.json | jq -r '.latestVersion')"
update-source-version obsidian "$latestVersion"
'';
# Strip version from binary name.
extraInstallCommands = "mv $out/bin/{${name},${pname}}";
in stdenv.mkDerivation rec {
pname = "obsidian";
version = "0.8.12";
src = fetchurl {
url =
"https://github.com/obsidianmd/obsidian-releases/releases/download/v${version}/obsidian-${version}.asar.gz";
sha256 = "1rvdxdxrfhw0ldslbnmx26znlvznb1iqpk95c0rh12hlzh4nlgxm";
};
nativeBuildInputs = [ makeWrapper graphicsmagick ];
unpackPhase = ''
gzip -dc $src > obsidian.asar
'';
installPhase = ''
mkdir -p $out/bin
makeWrapper ${electron}/bin/electron $out/bin/obsidian \
--add-flags $out/share/electron/obsidian.asar
install -m 444 -D obsidian.asar $out/share/electron/obsidian.asar
install -m 444 -D "${desktopItem}/share/applications/"* \
-t $out/share/applications/
for size in 16 24 32 48 64 128 256 512; do
mkdir -p $out/share/icons/hicolor/"$size"x"$size"/apps
gm convert -resize "$size"x"$size" ${icon} $out/share/icons/hicolor/"$size"x"$size"/apps/obsidian.png
done
'';
passthru.updateScript = updateScript;
meta = with lib; {
description = "Obsidian is a powerful knowledge base that works on top of a local folder of plain text Markdown files.";
description =
"Obsidian is a powerful knowledge base that works on top of a local folder of plain text Markdown files";
homepage = "https://obsidian.md";
license = licenses.obsidian;
maintainers = with maintainers; [ conradmearns ];
maintainers = with maintainers; [ conradmearns zaninime ];
platforms = [ "x86_64-linux" ];
};
}

View File

@ -6,11 +6,11 @@
stdenv.mkDerivation rec {
pname = "rofi-unwrapped";
version = "1.5.4";
version = "1.6.0";
src = fetchurl {
url = "https://github.com/davatorium/rofi/releases/download/${version}/rofi-${version}.tar.gz";
sha256 = "1g1170zmh5v7slnm1sm2d08jgz6icikf8rm17apm1bjzzyw1lhk7";
sha256 = "sha256-BS/ypMS/MfaiUizWVov8yYgGJjgwMWvz0PiH3sYYn50=";
};
preConfigure = ''

View File

@ -3,13 +3,13 @@
mkDerivation rec {
pname = "tipp10";
version = "3.2.0";
version = "unstable-20200616";
src = fetchFromGitLab {
owner = "tipp10";
repo = pname;
rev = "v${version}";
sha256 = "0fav5jlw6lw78iqrj7a65b8vd50hhyyaqyzmfrvyxirpsqhjk1v7";
repo = "tipp10";
rev = "2dd6d45c8a91cff7075675d8875721456cdd5f1b";
sha256 = "16x51rv4r6cz5vsmrfbakqzbfxy456h82ibzacknp35f41cjdqq4";
};
nativeBuildInputs = [ cmake qttools ];

View File

@ -1,12 +1,12 @@
{ stdenv, fetchurl, pythonPackages }:
stdenv.mkDerivation rec {
version = "2.4";
version = "2.4.1";
pname = "weather";
src = fetchurl {
url = "http://fungi.yuggoth.org/weather/src/${pname}-${version}.tar.xz";
sha256 = "084f0am0s1h6y71wgja9acaaxp0mq6k74b6ad4b5wpk2znwv0rzz";
sha256 = "0nf680dl7a2vlgavdhj6ljq8a7lkhvr6zghkpzad53vmilxsndys";
};
nativeBuildInputs = [ pythonPackages.wrapPython ];
@ -31,11 +31,11 @@ stdenv.mkDerivation rec {
wrapPythonPrograms
'';
meta = {
meta = with stdenv.lib; {
homepage = "http://fungi.yuggoth.org/weather";
description = "Quick access to current weather conditions and forecasts";
license = stdenv.lib.licenses.isc;
maintainers = [ stdenv.lib.maintainers.matthiasbeyer ];
platforms = with stdenv.lib.platforms; linux; # my only platform
license = licenses.isc;
maintainers = [ maintainers.matthiasbeyer ];
platforms = platforms.linux; # my only platform
};
}

View File

@ -0,0 +1,46 @@
{ stdenv, fetchgit, libX11, perl, ... }:
stdenv.mkDerivation rec {
pname = "xbattbar";
version = "1.4.9";
# The current active upstream of xbattbar seems to be the Debian source
# repository.
src = fetchgit {
url = "https://salsa.debian.org/debian/xbattbar.git";
rev = "upstream/${version}";
sha256 = "10w7gs0l4hzhdn38yqyr3az7n4ncmfnd6hhhly6lk5dg7k441ck6";
};
buildInputs = [ libX11 ];
# The following patches are applied:
# - sys-by-default: remove the APM checker binary, make the sys checker
# script the default. Rationale: checking battery status by /proc/apm is
# extremely oldschool and does not work on NixOS, while the sysfs script
# does.
# - perl shebang patches for acpi/sys scripts
# - unhardcode path to checker scripts
patchPhase = ''
patch -p1 < ${./sys-by-default.patch}
sed -i -e "s,/usr/lib/xbattbar/,$out/libexec/," xbattbar.c
sed -i -e "s,/usr/bin/perl,${perl}/bin/perl," xbattbar-check-acpi
sed -i -e "s,/usr/bin/perl,${perl}/bin/perl," xbattbar-check-sys
'';
installPhase = ''
mkdir -p $out/bin
mkdir -p $out/libexec
install -m 0755 xbattbar $out/bin/
install -m 0755 xbattbar-check-acpi $out/libexec/
install -m 0755 xbattbar-check-sys $out/libexec/
'';
meta = with stdenv.lib; {
description = "Display battery status in X11";
homepage = "https://salsa.debian.org/debian/xbattbar";
license = licenses.gpl2Plus;
platforms = platforms.linux;
maintainers = [ maintainers.q3k ];
};
}

View File

@ -0,0 +1,26 @@
diff --git a/xbattbar.c b/xbattbar.c
index 1e26019..cb3eab5 100644
--- a/xbattbar.c
+++ b/xbattbar.c
@@ -75,9 +75,8 @@ char *ONOUT_C = "olive drab";
char *OFFIN_C = "blue";
char *OFFOUT_C = "red";
-char *EXTERNAL_CHECK = "/usr/lib/xbattbar/xbattbar-check-apm";
+char *EXTERNAL_CHECK = "/usr/lib/xbattbar/xbattbar-check-sys";
char *EXTERNAL_CHECK_ACPI = "/usr/lib/xbattbar/xbattbar-check-acpi";
-char *EXTERNAL_CHECK_SYS = "/usr/lib/xbattbar/xbattbar-check-sys";
int alwaysontop = False;
@@ -245,10 +244,6 @@ main(int argc, char **argv)
EXTERNAL_CHECK = EXTERNAL_CHECK_ACPI;
break;
- case 'r':
- EXTERNAL_CHECK = EXTERNAL_CHECK_SYS;
- break;
-
case 's':
EXTERNAL_CHECK = optarg;
break;

View File

@ -0,0 +1,28 @@
{ stdenv, fetchFromGitHub, pkg-config, gtk3 }:
stdenv.mkDerivation rec {
pname = "xdragon";
version = "1.1.1";
src = fetchFromGitHub {
owner = "mwh";
repo = "dragon";
rev = "v${version}";
sha256 = "0fgzz39007fdjwq72scp0qygp2v3zc5f1xkm0sxaa8zxm25g1bra";
};
nativeBuildInputs = [ pkg-config ];
buildInputs = [ gtk3 ];
installFlags = [ "PREFIX=${placeholder "out"}/bin" ];
postInstall = ''
ln -s $out/bin/dragon $out/bin/xdragon
'';
meta = with stdenv.lib; {
description = "Simple drag-and-drop source/sink for X (called dragon in upstream)";
homepage = "https://github.com/mwh/dragon";
license = licenses.gpl3;
maintainers = with maintainers; [ das_j ];
};
}

View File

@ -1,26 +0,0 @@
{ stdenv, fetchFromGitHub, qt4, qmake4Hook }:
stdenv.mkDerivation rec {
pname = "arora";
version = "0.11.0";
src = fetchFromGitHub {
owner = "Arora";
repo = "arora";
rev = version;
sha256 = "0wmivgx3mw51rghi6q8fgivpkqc98z2mqmllf7c98ln0wd8rkf3c";
};
buildInputs = [ qt4 ];
nativeBuildInputs = [ qmake4Hook ];
enableParallelBuilding = true;
meta = with stdenv.lib; {
platforms = qt4.meta.platforms;
maintainers = [ maintainers.phreedom ];
description = "A cross-platform Qt4 Webkit browser";
homepage = "https://github.com/Arora/arora";
license = with licenses; [ gpl2 gpl3 ];
};
}

View File

@ -39,7 +39,8 @@ rustPlatform.buildRustPackage rec {
postInstall = "make PREFIX=$out copy-data";
# Sometimes tests fail when run in parallel
checkFlags = [ "--test-threads=1" ];
#checkFlags = [ "--test-threads=1" ];
doCheck = false;
meta = with stdenv.lib; {
description = "A graphical client for plain-text protocols written in Rust with GTK. It currently supports the Gemini, Gopher and Finger protocols";

View File

@ -55,6 +55,17 @@ let
sha256 = "0h3wf4152zdvrbb0jbj49q6814lfl3rcy5mj8b2pl9s0ahvkbc6q";
};
});
} // lib.optionalAttrs (lib.versionAtLeast upstream-info.version "87") {
llvmPackages = llvmPackages_11;
useOzone = true; # YAY: https://chromium-review.googlesource.com/c/chromium/src/+/2382834 \o/
gnChromium = gn.overrideAttrs (oldAttrs: {
version = "2020-08-17";
src = fetchgit {
url = "https://gn.googlesource.com/gn";
rev = "6f13aaac55a977e1948910942675c69f2b4f7a94";
sha256 = "01hpma1sllpdx09mvr4d6073sg6zmk6iv44kd3r28khymcj4s251";
};
});
});
browser = callPackage ./browser.nix { inherit channel enableWideVine; };

View File

@ -44,11 +44,11 @@ let
flash = stdenv.mkDerivation rec {
pname = "flashplayer-ppapi";
version = "32.0.0.414";
version = "32.0.0.433";
src = fetchzip {
url = "https://fpdownload.adobe.com/pub/flashplayer/pdc/${version}/flash_player_ppapi_linux.x86_64.tar.gz";
sha256 = "0wzf5i6qf5wgjm905kd3qh97rj47fybl9g7z72vasilbx8q5wfwk";
sha256 = "1wfwnmai6wnwi6cfxwqix6n471jjyl6nc7p67sa7cfqwg16b53kx";
stripRoot = false;
};

View File

@ -4,9 +4,11 @@
import csv
import json
import subprocess
import sys
from codecs import iterdecode
from collections import OrderedDict
from os.path import abspath, dirname
from sys import stderr
from urllib.request import urlopen
HISTORY_URL = 'https://omahaproxy.appspot.com/history?os=linux'
@ -27,7 +29,7 @@ def nix_prefetch_url(url, algo='sha256'):
channels = {}
last_channels = load_json(JSON_PATH)
print(f'GET {HISTORY_URL}', file=stderr)
print(f'GET {HISTORY_URL}', file=sys.stderr)
with urlopen(HISTORY_URL) as resp:
builds = csv.DictReader(iterdecode(resp, 'utf-8'))
for build in builds:
@ -59,5 +61,17 @@ with urlopen(HISTORY_URL) as resp:
channels[channel_name] = channel
with open(JSON_PATH, 'w') as out:
json.dump(channels, out, indent=2)
def get_channel_key(item):
channel_name = item[0]
if channel_name == 'stable':
return 0
elif channel_name == 'beta':
return 1
elif channel_name == 'dev':
return 2
else:
print(f'Error: Unexpected channel: {channel_name}', file=sys.stderr)
sys.exit(1)
sorted_channels = OrderedDict(sorted(channels.items(), key=get_channel_key))
json.dump(sorted_channels, out, indent=2)
out.write('\n')

View File

@ -1,17 +1,17 @@
{
"stable": {
"version": "85.0.4183.102",
"sha256": "032yh1mfwins7a62zw8kwwq8xw1n52a0a93lqz7qlyjaf9sd8s4a",
"sha256bin64": "1i8xaxxnmg80vsia8hxnq58qi9k5nnbrl80d6d23g9lb7dbc9cpm"
},
"beta": {
"version": "86.0.4240.22",
"sha256": "1qxacdwknrjwfp44mnqmq24n8sw4yaf0d1qnz39km2m4apc39svp",
"sha256bin64": "05qdzkq9daqjliqj7zxsa03903rv3kwaj627192ls6m33bacz9gp"
"version": "86.0.4240.30",
"sha256": "1isj0zngb72k1hhn3h0s8mccg1cdmppz1mjmg19f2h306farzmzl",
"sha256bin64": "10d8im2adqqnkd6265gngv6xlm5qsz6r13z6cbbchsss0ssr8fxa"
},
"dev": {
"version": "86.0.4240.8",
"sha256": "1x0kbc7xp6599jyn461mbmchbixivnxm0jsyfq0snhxz8x81z55q",
"sha256bin64": "0y7drzxxfn0vmfq0m426l8xvkgyajb8pjydi0d7kzk6i92sjf45j"
},
"stable": {
"version": "85.0.4183.83",
"sha256": "0fz781bxx1rnjwfix2dgzq5w1lg3x6a9vd9k49gh4z5q092slr10",
"sha256bin64": "0fa3la2nvqr0w40j2qkbwnh36924fsp2ajsla6aky6hz08mq2q1g"
"version": "87.0.4252.0",
"sha256": "1lxlsdni63zh79hxvpwgmnfn67kgfzhz3yg9bkxghqchqykkz92y",
"sha256bin64": "130hf7b35wcxpw05ddbqq89x10c0kays1vb9qg6xhq3zx2mk6ijw"
}
}

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