Merge remote-tracking branch 'upstream/master' into aj-rust-custom-target

This commit is contained in:
John Ericson 2020-10-14 02:54:31 +00:00
commit 6866f26c89
462 changed files with 18548 additions and 13520 deletions

View file

@ -56,6 +56,8 @@ indent_size = unset
[deps.nix]
insert_final_newline = unset
[pkgs/tools/networking/dd-agent/*-deps.nix]
insert_final_newline = unset
[eggs.nix]
trim_trailing_whitespace = unset
@ -65,6 +67,8 @@ insert_final_newline = unset
[node-{composition,packages}.nix]
insert_final_newline = unset
[node-packages-generated.nix]
insert_final_newline = unset
[nixos/modules/services/networking/ircd-hybrid/*.{conf,in}]
trim_trailing_whitespace = unset
@ -98,7 +102,7 @@ trim_trailing_whitespace = unset
[pkgs/development/mobile/androidenv/generated/{addons,packages}.nix]
trim_trailing_whitespace = unset
[pkgs/development/node-packages/node-packages.nix]
[pkgs/development/node-packages/composition.nix]
insert_final_newline = unset
[pkgs/servers/dict/wordnet_structures.py]

View file

@ -10,7 +10,7 @@ jobs:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: technote-space/get-diff-action@v3.1.0
- uses: technote-space/get-diff-action@v4.0.0
- name: Fetch editorconfig-checker
if: env.GIT_DIFF
env:

View file

@ -12,12 +12,13 @@ Agda can be installed from `agda`:
$ nix-env -iA agda
```
To use agda with libraries, the `agda.withPackages` function can be used. This function either takes:
+ A list of packages,
+ or a function which returns a list of packages when given the `agdaPackages` attribute set,
+ or an attribute set containing a list of packages and a GHC derivation for compilation (see below).
To use Agda with libraries, the `agda.withPackages` function can be used. This function either takes:
For example, suppose we wanted a version of agda which has access to the standard library. This can be obtained with the expressions:
* A list of packages,
* or a function which returns a list of packages when given the `agdaPackages` attribute set,
* or an attribute set containing a list of packages and a GHC derivation for compilation (see below).
For example, suppose we wanted a version of Agda which has access to the standard library. This can be obtained with the expressions:
```
agda.withPackages [ agdaPackages.standard-library ]
@ -33,18 +34,19 @@ or can be called as in the [Compiling Agda](#compiling-agda) section.
If you want to use a library in your home directory (for instance if it is a development version) then typecheck it manually (using `agda.withPackages` if necessary) and then override the `src` attribute of the package to point to your local repository.
Agda will not by default use these libraries. To tell agda to use the library we have some options:
- Call `agda` with the library flag:
Agda will not by default use these libraries. To tell Agda to use the library we have some options:
* Call `agda` with the library flag:
```
$ agda -l standard-library -i . MyFile.agda
```
- Write a `my-library.agda-lib` file for the project you are working on which may look like:
* Write a `my-library.agda-lib` file for the project you are working on which may look like:
```
name: my-library
include: .
depend: standard-library
```
- Create the file `~/.agda/defaults` and add any libraries you want to use by default.
* Create the file `~/.agda/defaults` and add any libraries you want to use by default.
More information can be found in the [official Agda documentation on library management](https://agda.readthedocs.io/en/v2.6.1/tools/package-system.html).
@ -60,12 +62,13 @@ agda.withPackages {
```
## Writing Agda packages
To write a nix derivation for an agda library, first check that the library has a `*.agda-lib` file.
To write a nix derivation for an Agda library, first check that the library has a `*.agda-lib` file.
A derivation can then be written using `agdaPackages.mkDerivation`. This has similar arguments to `stdenv.mkDerivation` with the following additions:
+ `everythingFile` can be used to specify the location of the `Everything.agda` file, defaulting to `./Everything.agda`. If this file does not exist then either it should be patched in or the `buildPhase` should be overridden (see below).
+ `libraryName` should be the name that appears in the `*.agda-lib` file, defaulting to `pname`.
+ `libraryFile` should be the file name of the `*.agda-lib` file, defaulting to `${libraryName}.agda-lib`.
* `everythingFile` can be used to specify the location of the `Everything.agda` file, defaulting to `./Everything.agda`. If this file does not exist then either it should be patched in or the `buildPhase` should be overridden (see below).
* `libraryName` should be the name that appears in the `*.agda-lib` file, defaulting to `pname`.
* `libraryFile` should be the file name of the `*.agda-lib` file, defaulting to `${libraryName}.agda-lib`.
### Building Agda packages
The default build phase for `agdaPackages.mkDerivation` simply runs `agda` on the `Everything.agda` file.
@ -74,12 +77,14 @@ Additionally, a `preBuild` or `configurePhase` can be used if there are steps th
`agda` and the Agda libraries contained in `buildInputs` are made available during the build phase.
### Installing Agda packages
The default install phase copies agda source files, agda interface files (`*.agdai`) and `*.agda-lib` files to the output directory.
The default install phase copies Agda source files, Agda interface files (`*.agdai`) and `*.agda-lib` files to the output directory.
This can be overridden.
By default, agda sources are files ending on `.agda`, or literate agda files ending on `.lagda`, `.lagda.tex`, `.lagda.org`, `.lagda.md`, `.lagda.rst`. The list of recognised agda source extensions can be extended by setting the `extraExtensions` config variable.
By default, Agda sources are files ending on `.agda`, or literate Agda files ending on `.lagda`, `.lagda.tex`, `.lagda.org`, `.lagda.md`, `.lagda.rst`. The list of recognised Agda source extensions can be extended by setting the `extraExtensions` config variable.
To add an agda package to `nixpkgs`, the derivation should be written to `pkgs/development/libraries/agda/${library-name}/` and an entry should be added to `pkgs/top-level/agda-packages.nix`. Here it is called in a scope with access to all other agda libraries, so the top line of the `default.nix` can look like:
## Adding Agda packages to Nixpkgs
To add an Agda package to `nixpkgs`, the derivation should be written to `pkgs/development/libraries/agda/${library-name}/` and an entry should be added to `pkgs/top-level/agda-packages.nix`. Here it is called in a scope with access to all other Agda libraries, so the top line of the `default.nix` can look like:
```
{ mkDerivation, standard-library, fetchFromGitHub }:
```
@ -103,4 +108,4 @@ mkDerivation {
```
This library has a file called `.agda-lib`, and so we give an empty string to `libraryFile` as nothing precedes `.agda-lib` in the filename. This file contains `name: IAL-1.3`, and so we let `libraryName = "IAL-1.3"`. This library does not use an `Everything.agda` file and instead has a Makefile, so there is no need to set `everythingFile` and we set a custom `buildPhase`.
When writing an agda package it is essential to make sure that no `.agda-lib` file gets added to the store as a single file (for example by using `writeText`). This causes agda to think that the nix store is a agda library and it will attempt to write to it whenever it typechecks something. See [https://github.com/agda/agda/issues/4613](https://github.com/agda/agda/issues/4613).
When writing an Agda package it is essential to make sure that no `.agda-lib` file gets added to the store as a single file (for example by using `writeText`). This causes Agda to think that the nix store is a Agda library and it will attempt to write to it whenever it typechecks something. See [https://github.com/agda/agda/issues/4613](https://github.com/agda/agda/issues/4613).

View file

@ -755,8 +755,8 @@ and in this case the `python38` interpreter is automatically used.
### Interpreters
Versions 2.7, 3.6, 3.7 and 3.8 of the CPython interpreter are available as
respectively `python27`, `python36`, `python37` and `python38`. The
Versions 2.7, 3.6, 3.7, 3.8 and 3.9 of the CPython interpreter are available as
respectively `python27`, `python36`, `python37`, `python38` and `python39`. The
aliases `python2` and `python3` correspond to respectively `python27` and
`python38`. The default interpreter, `python`, maps to `python2`. The PyPy
interpreters compatible with Python 2.7 and 3 are available as `pypy27` and

View file

@ -45,7 +45,7 @@
modules ++ [
{
system.nixos.versionSuffix =
".${final.substring 0 8 (self.lastModifiedDate or self.lastModified)}.${self.shortRev or "dirty"}";
".${final.substring 0 8 (self.lastModifiedDate or self.lastModified or "19700101")}.${self.shortRev or "dirty"}";
system.nixos.revision = final.mkIf (self ? rev) self.rev;
system.build = {

View file

@ -66,7 +66,7 @@ let
stringLength sub substring tail;
inherit (trivial) id const pipe concat or and bitAnd bitOr bitXor
bitNot boolToString mergeAttrs flip mapNullable inNixShell min max
importJSON warn info showWarnings nixpkgsVersion version mod compare
importJSON importTOML warn info showWarnings nixpkgsVersion version mod compare
splitByAndCompare functionArgs setFunctionArgs isFunction toHexString toBaseDigits;
inherit (fixedPoints) fix fix' converge extends composeExtensions
makeExtensible makeExtensibleWithCustomName;

View file

@ -875,4 +875,21 @@ rec {
];
};
/* Use this function to import a JSON file as NixOS configuration.
importJSON -> path -> attrs
*/
importJSON = file: {
_file = file;
config = lib.importJSON file;
};
/* Use this function to import a TOML file as NixOS configuration.
importTOML -> path -> attrs
*/
importTOML = file: {
_file = file;
config = lib.importTOML file;
};
}

View file

@ -281,6 +281,12 @@ rec {
importJSON = path:
builtins.fromJSON (builtins.readFile path);
/* Reads a TOML file.
Type :: path -> any
*/
importTOML = path:
builtins.fromTOML (builtins.readFile path);
## Warnings

View file

@ -1242,6 +1242,12 @@
githubId = 32319131;
name = "Brett L";
};
buckley310 = {
email = "sean.bck@gmail.com";
github = "buckley310";
githubId = 2379774;
name = "Sean Buckley";
};
buffet = {
email = "niclas@countingsort.com";
github = "buffet";
@ -2389,6 +2395,12 @@
githubId = 984691;
name = "Evan Danaher";
};
edcragg = {
email = "ed.cragg@eipi.xyz";
github = "nuxeh";
githubId = 1516017;
name = "Ed Cragg";
};
edef = {
email = "edef@edef.eu";
github = "edef1c";
@ -3313,6 +3325,12 @@
githubId = 10654650;
name = "Guillaume Koenig";
};
guserav = {
email = "guserav@users.noreply.github.com";
github = "guserav";
githubId = 28863828;
name = "guserav";
};
guyonvarch = {
email = "joris@guyonvarch.me";
github = "guyonvarch";
@ -4262,6 +4280,12 @@
githubId = 39434424;
name = "Felix Springer";
};
justinas = {
email = "justinas@justinas.org";
github = "justinas";
githubId = 662666;
name = "Justinas Stankevičius";
};
justinlovinger = {
email = "git@justinlovinger.com";
github = "JustinLovinger";
@ -6231,6 +6255,12 @@
githubId = 40049608;
name = "Andy Chun";
};
norfair = {
email = "syd@cs-syd.eu";
github = "NorfairKing";
githubId = 3521180;
name = "Tom Sydney Kerckhove";
};
notthemessiah = {
email = "brian.cohen.88@gmail.com";
github = "notthemessiah";
@ -6365,6 +6395,12 @@
githubId = 1538622;
name = "Michael Reilly";
};
onny = {
email = "onny@project-insanity.org";
github = "onny";
githubId = 757752;
name = "Jonas Heinrich";
};
OPNA2608 = {
email = "christoph.neidahl@gmail.com";
github = "OPNA2608";
@ -9094,6 +9130,12 @@
githubId = 508305;
name = "Jaroslavas Pocepko";
};
vonfry = {
email = "nixos@vonfry.name";
github = "Vonfry";
githubId = 3413119;
name = "Vonfry";
};
vozz = {
email = "oliver.huntuk@gmail.com";
name = "Oliver Hunt";
@ -9750,4 +9792,10 @@
fingerprint = "8597 4506 EC69 5392 0443 0805 9D98 CDAC FF04 FD78";
}];
};
hloeffler = {
name = "Hauke Löffler";
email = "nix@hauke-loeffler.de";
github = "hloeffler";
githubId = 6627191;
};
}

View file

@ -64,6 +64,12 @@
Python 3 now defaults to Python 3.8 instead of 3.7.
</para>
</listitem>
<listitem>
<para>
Python 3.5 has reached its upstream EOL at the end of September 2020: it
has been removed from the list of available packages.
</para>
</listitem>
<listitem>
<para>
Two new options, <link linkend="opt-services.openssh.authorizedKeysCommand">authorizedKeysCommand</link>
@ -583,8 +589,8 @@ systemd.services.nginx.serviceConfig.ReadWritePaths = [ "/var/www" ];
<listitem>
<para>
In addition to the hostname, the fully qualified domain name (FQDN),
which consists of <literal>${cfg.hostName}</literal> and
<literal>${cfg.domain}</literal> is now added to
which consists of <literal>${networking.hostName}</literal> and
<literal>${networking.domain}</literal> is now added to
<literal>/etc/hosts</literal>, to allow local FQDN resolution, as used by the
<literal>hostname --fqdn</literal> command and other applications that
try to determine the FQDN. These new entries take precedence over entries
@ -604,6 +610,10 @@ systemd.services.nginx.serviceConfig.ReadWritePaths = [ "/var/www" ];
or digit, and have as interior characters only letters, digits, and
hyphen. The maximum length is 63 characters. Additionally it is
recommended to only use lower-case characters.
If (e.g. for legacy reasons) a FQDN is required as the Linux kernel network node hostname
(<literal>uname --nodename</literal>) the option
<literal>boot.kernel.sysctl."kernel.hostname"</literal>
can be used as a workaround (but be aware of the 64 character limit).
</para>
</listitem>
<listitem>
@ -839,6 +849,13 @@ CREATE ROLE postgres LOGIN SUPERUSER;
functionally redundent.
</para>
</listitem>
<listitem>
<para>
The <literal>hardware.nvidia.optimus_prime.enable</literal> service has been renamed to
<literal>hardware.nvidia.prime.sync.enable</literal> and has many new enhancements.
Related nvidia prime settings may have also changed.
</para>
</listitem>
<listitem>
<para>
The package <package>nextcloud17</package> has been removed and <package>nextcloud18</package> was marked as insecure
@ -864,6 +881,13 @@ CREATE ROLE postgres LOGIN SUPERUSER;
</itemizedlist>
</para>
</listitem>
<listitem>
<para>
The GNOME desktop manager no longer default installs <package>gnome3.epiphany</package>.
It was chosen to do this as it has a usability breaking issue (see issue <link xlink:href="https://github.com/NixOS/nixpkgs/issues/98819">#98819</link>)
that makes it unsuitable to be a default app.
</para>
</listitem>
</itemizedlist>
</section>
@ -1093,8 +1117,10 @@ services.transmission.settings.rpc-bind-address = "0.0.0.0";
</listitem>
<listitem>
<para>
The <literal>fontconfig</literal> module stopped generating fontconfig 2.10.x config and cache.
Fontconfig 2.10.x was removed from Nixpkgs - it hasn't been used in any nixpkgs package anymore.
The <literal>fontconfig</literal> module stopped generating config and cache files for fontconfig 2.10.x, the <filename>/etc/fonts/fonts.conf</filename> now belongs to the latest fontconfig, just like on other Linux distributions, and we will <link xlink:href="https://github.com/NixOS/nixpkgs/pull/95358">no longer</link> be versioning the config directories.
</para>
<para>
Fontconfig 2.10.x was removed from Nixpkgs since it hasnt been used in any Nixpkgs package for years now.
</para>
</listitem>
<listitem>
@ -1184,5 +1210,20 @@ services.transmission.settings.rpc-bind-address = "0.0.0.0";
</para>
</listitem>
</itemizedlist>
<itemizedlist>
<listitem>
<para>
For AMD GPUs, Vulkan can now be used by adding <literal>amdvlk</literal>
to <literal>hardware.opengl.extraPackages</literal>.
</para>
</listitem>
<listitem>
<para>
Similarly, still for AMD GPUs, the ROCm OpenCL stack can now be used by adding
<literal>rocm-opencl-icd</literal> to
<literal>hardware.opengl.extraPackages</literal>.
</para>
</listitem>
</itemizedlist>
</section>
</section>

View file

@ -71,6 +71,17 @@
for consistency with other X11 resources.
</para>
</listitem>
<listitem>
<para>
A number of options have been renamed in the kicad interface. <literal>oceSupport</literal>
has been renamed to <literal>withOCE</literal>, <literal>withOCCT</literal> has been renamed
to <literal>withOCC</literal>, <literal>ngspiceSupport</literal> has been renamed to
<literal>withNgspice</literal>, and <literal>scriptingSupport</literal> has been renamed to
<literal>withScripting</literal>. Additionally, <literal>kicad/base.nix</literal> no longer
provides default argument values since these are provided by
<literal>kicad/default.nix</literal>.
</para>
</listitem>
</itemizedlist>
</section>

View file

@ -442,6 +442,7 @@
./services/misc/dysnomia.nix
./services/misc/disnix.nix
./services/misc/docker-registry.nix
./services/misc/domoticz.nix
./services/misc/errbot.nix
./services/misc/etcd.nix
./services/misc/ethminer.nix
@ -466,6 +467,7 @@
./services/misc/irkerd.nix
./services/misc/jackett.nix
./services/misc/jellyfin.nix
./services/misc/klipper.nix
./services/misc/logkeys.nix
./services/misc/leaps.nix
./services/misc/lidarr.nix

View file

@ -122,19 +122,22 @@ let
"--email" data.email
"--key-type" data.keyType
] ++ protocolOpts
++ optionals data.ocspMustStaple [ "--must-staple" ]
++ optionals (acmeServer != null) [ "--server" acmeServer ]
++ concatMap (name: [ "-d" name ]) extraDomains
++ data.extraLegoFlags;
# Although --must-staple is common to both modes, it is not declared as a
# mode-agnostic argument in lego and thus must come after the mode.
runOpts = escapeShellArgs (
commonOpts
++ [ "run" ]
++ optionals data.ocspMustStaple [ "--must-staple" ]
++ data.extraLegoRunFlags
);
renewOpts = escapeShellArgs (
commonOpts
++ [ "renew" "--reuse-key" ]
++ optionals data.ocspMustStaple [ "--must-staple" ]
++ data.extraLegoRenewFlags
);

View file

@ -366,7 +366,7 @@ let
${let p11 = config.security.pam.p11; in optionalString cfg.p11Auth
"auth ${p11.control} ${pkgs.pam_p11}/lib/security/pam_p11.so ${pkgs.opensc}/lib/opensc-pkcs11.so"}
${let u2f = config.security.pam.u2f; in optionalString cfg.u2fAuth
"auth ${u2f.control} ${pkgs.pam_u2f}/lib/security/pam_u2f.so ${optionalString u2f.debug "debug"} ${optionalString (u2f.authFile != null) "authfile=${u2f.authFile}"} ${optionalString u2f.interactive "interactive"} ${optionalString u2f.cue "cue"}"}
"auth ${u2f.control} ${pkgs.pam_u2f}/lib/security/pam_u2f.so ${optionalString u2f.debug "debug"} ${optionalString (u2f.authFile != null) "authfile=${u2f.authFile}"} ${optionalString u2f.interactive "interactive"} ${optionalString u2f.cue "cue"} ${optionalString (u2f.appId != null) "appid=${u2f.appId}"}"}
${optionalString cfg.usbAuth
"auth sufficient ${pkgs.pam_usb}/lib/security/pam_usb.so"}
${let oath = config.security.pam.oath; in optionalString cfg.oathAuth
@ -654,6 +654,22 @@ in
'';
};
appId = mkOption {
default = null;
type = with types; nullOr str;
description = ''
By default <literal>pam-u2f</literal> module sets the application
ID to <literal>pam://$HOSTNAME</literal>.
When using <command>pamu2fcfg</command>, you can specify your
application ID with the <literal>-i</literal> flag.
More information can be found <link
xlink:href="https://developers.yubico.com/pam-u2f/Manuals/pam_u2f.8.html">
here</link>
'';
};
control = mkOption {
default = "sufficient";
type = types.enum [ "required" "requisite" "sufficient" "optional" ];

View file

@ -0,0 +1,51 @@
{ lib, pkgs, config, ... }:
with lib;
let
cfg = config.services.domoticz;
pkgDesc = "Domoticz home automation";
in {
options = {
services.domoticz = {
enable = mkEnableOption pkgDesc;
bind = mkOption {
type = types.str;
default = "0.0.0.0";
description = "IP address to bind to.";
};
port = mkOption {
type = types.int;
default = 8080;
description = "Port to bind to for HTTP, set to 0 to disable HTTP.";
};
};
};
config = mkIf cfg.enable {
systemd.services."domoticz" = {
description = pkgDesc;
wantedBy = [ "multi-user.target" ];
after = [ "network-online.target" ];
serviceConfig = {
DynamicUser = true;
StateDirectory = "domoticz";
Restart = "always";
ExecStart = ''
${pkgs.domoticz}/bin/domoticz -noupdates -www ${toString cfg.port} -wwwbind ${cfg.bind} -sslwww 0 -userdata /var/lib/domoticz -approot ${pkgs.domoticz}/share/domoticz/ -pidfile /var/run/domoticz.pid
'';
};
};
};
}

View file

@ -73,6 +73,11 @@ let
redisConfig.production.url = cfg.redisUrl;
pagesArgs = [
"-pages-domain" gitlabConfig.production.pages.host
"-pages-root" "${gitlabConfig.production.shared.path}/pages"
] ++ cfg.pagesExtraArgs;
gitlabConfig = {
# These are the default settings from config/gitlab.example.yml
production = flip recursiveUpdate cfg.extraConfig {
@ -236,6 +241,13 @@ in {
description = "Reference to the gitaly package";
};
packages.pages = mkOption {
type = types.package;
default = pkgs.gitlab-pages;
defaultText = "pkgs.gitlab-pages";
description = "Reference to the gitlab-pages package";
};
statePath = mkOption {
type = types.str;
default = "/var/gitlab/state";
@ -451,6 +463,12 @@ in {
};
};
pagesExtraArgs = mkOption {
type = types.listOf types.str;
default = [ "-listen-proxy" "127.0.0.1:8090" ];
description = "Arguments to pass to the gitlab-pages daemon";
};
secrets.secretFile = mkOption {
type = with types; nullOr path;
default = null;
@ -754,6 +772,26 @@ in {
};
};
systemd.services.gitlab-pages = mkIf (gitlabConfig.production.pages.enabled or false) {
description = "GitLab static pages daemon";
after = [ "network.target" "redis.service" "gitlab.service" ]; # gitlab.service creates configs
wantedBy = [ "multi-user.target" ];
path = [ pkgs.unzip ];
serviceConfig = {
Type = "simple";
TimeoutSec = "infinity";
Restart = "on-failure";
User = cfg.user;
Group = cfg.group;
ExecStart = "${cfg.packages.pages}/bin/gitlab-pages ${escapeShellArgs pagesArgs}";
WorkingDirectory = gitlabEnv.HOME;
};
};
systemd.services.gitlab-workhorse = {
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];

View file

@ -0,0 +1,59 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.klipper;
package = pkgs.klipper;
format = pkgs.formats.ini { mkKeyValue = generators.mkKeyValueDefault {} ":"; };
in
{
##### interface
options = {
services.klipper = {
enable = mkEnableOption "Klipper, the 3D printer firmware";
octoprintIntegration = mkOption {
type = types.bool;
default = false;
description = "Allows Octoprint to control Klipper.";
};
settings = mkOption {
type = format.type;
default = { };
description = ''
Configuration for Klipper. See the <link xlink:href="https://www.klipper3d.org/Overview.html#configuration-and-tuning-guides">documentation</link>
for supported values.
'';
};
};
};
##### implementation
config = mkIf cfg.enable {
assertions = [{
assertion = cfg.octoprintIntegration -> config.services.octoprint.enable;
message = "Option klipper.octoprintIntegration requires Octoprint to be enabled on this system. Please enable services.octoprint to use it.";
}];
environment.etc."klipper.cfg".source = format.generate "klipper.cfg" cfg.settings;
systemd.services.klipper = {
description = "Klipper 3D Printer Firmware";
wantedBy = [ "multi-user.target" ];
after = [ "network.target" ];
serviceConfig = {
ExecStart = "${package}/lib/klipper/klippy.py --input-tty=/run/klipper/tty /etc/klipper.cfg";
RuntimeDirectory = "klipper";
SupplementaryGroups = [ "dialout" ];
WorkingDirectory = "${package}/lib";
} // (if cfg.octoprintIntegration then {
Group = config.services.octoprint.group;
User = config.services.octoprint.user;
} else {
DynamicUser = true;
User = "klipper";
});
};
};
}

View file

@ -6,37 +6,97 @@ let
gid = config.ids.gids.mediatomb;
cfg = config.services.mediatomb;
name = cfg.package.pname;
pkg = cfg.package;
optionYesNo = option: if option then "yes" else "no";
# configuration on media directory
mediaDirectory = {
options = {
path = mkOption {
type = types.str;
description = ''
Absolute directory path to the media directory to index.
'';
};
recursive = mkOption {
type = types.bool;
default = false;
description = "Whether the indexation must take place recursively or not.";
};
hidden-files = mkOption {
type = types.bool;
default = true;
description = "Whether to index the hidden files or not.";
};
};
};
toMediaDirectory = d: "<directory location=\"${d.path}\" mode=\"inotify\" recursive=\"${optionYesNo d.recursive}\" hidden-files=\"${optionYesNo d.hidden-files}\" />\n";
mtConf = pkgs.writeText "config.xml" ''
<?xml version="1.0" encoding="UTF-8"?>
<config version="2" xmlns="http://mediatomb.cc/config/2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://mediatomb.cc/config/2 http://mediatomb.cc/config/2.xsd">
transcodingConfig = if cfg.transcoding then with pkgs; ''
<transcoding enabled="yes">
<mimetype-profile-mappings>
<transcode mimetype="video/x-flv" using="vlcmpeg" />
<transcode mimetype="application/ogg" using="vlcmpeg" />
<transcode mimetype="audio/ogg" using="ogg2mp3" />
<transcode mimetype="audio/x-flac" using="oggflac2raw"/>
</mimetype-profile-mappings>
<profiles>
<profile name="ogg2mp3" enabled="no" type="external">
<mimetype>audio/mpeg</mimetype>
<accept-url>no</accept-url>
<first-resource>yes</first-resource>
<accept-ogg-theora>no</accept-ogg-theora>
<agent command="${ffmpeg}/bin/ffmpeg" arguments="-y -i %in -f mp3 %out" />
<buffer size="1048576" chunk-size="131072" fill-size="262144" />
</profile>
<profile name="vlcmpeg" enabled="no" type="external">
<mimetype>video/mpeg</mimetype>
<accept-url>yes</accept-url>
<first-resource>yes</first-resource>
<accept-ogg-theora>yes</accept-ogg-theora>
<agent command="${libsForQt5.vlc}/bin/vlc"
arguments="-I dummy %in --sout #transcode{venc=ffmpeg,vcodec=mp2v,vb=4096,fps=25,aenc=ffmpeg,acodec=mpga,ab=192,samplerate=44100,channels=2}:standard{access=file,mux=ps,dst=%out} vlc:quit" />
<buffer size="14400000" chunk-size="512000" fill-size="120000" />
</profile>
</profiles>
</transcoding>
'' else ''
<transcoding enabled="no">
</transcoding>
'';
configText = optionalString (! cfg.customCfg) ''
<?xml version="1.0" encoding="UTF-8"?>
<config version="2" xmlns="http://mediatomb.cc/config/2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://mediatomb.cc/config/2 http://mediatomb.cc/config/2.xsd">
<server>
<ui enabled="yes" show-tooltips="yes">
<accounts enabled="no" session-timeout="30">
<account user="mediatomb" password="mediatomb"/>
<account user="${name}" password="${name}"/>
</accounts>
</ui>
<name>${cfg.serverName}</name>
<udn>uuid:${cfg.uuid}</udn>
<home>${cfg.dataDir}</home>
<webroot>${pkgs.mediatomb}/share/mediatomb/web</webroot>
<interface>${cfg.interface}</interface>
<webroot>${pkg}/share/${name}/web</webroot>
<pc-directory upnp-hide="${optionYesNo cfg.pcDirectoryHide}"/>
<storage>
<sqlite3 enabled="yes">
<database-file>mediatomb.db</database-file>
<database-file>${name}.db</database-file>
</sqlite3>
</storage>
<protocolInfo extend="${if cfg.ps3Support then "yes" else "no"}"/>
${if cfg.dsmSupport then ''
<protocolInfo extend="${optionYesNo cfg.ps3Support}"/>
${optionalString cfg.dsmSupport ''
<custom-http-headers>
<add header="X-User-Agent: redsonic"/>
</custom-http-headers>
<manufacturerURL>redsonic.com</manufacturerURL>
<modelNumber>105</modelNumber>
'' else ""}
${if cfg.tg100Support then ''
''}
${optionalString cfg.tg100Support ''
<upnp-string-limit>101</upnp-string-limit>
'' else ""}
''}
<extended-runtime-options>
<mark-played-items enabled="yes" suppress-cds-updates="yes">
<string mode="prepend">*</string>
@ -47,11 +107,14 @@ let
</extended-runtime-options>
</server>
<import hidden-files="no">
<autoscan use-inotify="auto">
${concatMapStrings toMediaDirectory cfg.mediaDirectories}
</autoscan>
<scripting script-charset="UTF-8">
<common-script>${pkgs.mediatomb}/share/mediatomb/js/common.js</common-script>
<playlist-script>${pkgs.mediatomb}/share/mediatomb/js/playlists.js</playlist-script>
<common-script>${pkg}/share/${name}/js/common.js</common-script>
<playlist-script>${pkg}/share/${name}/js/playlists.js</playlist-script>
<virtual-layout type="builtin">
<import-script>${pkgs.mediatomb}/share/mediatomb/js/import.js</import-script>
<import-script>${pkg}/share/${name}/js/import.js</import-script>
</virtual-layout>
</scripting>
<mappings>
@ -75,12 +138,12 @@ let
<map from="flv" to="video/x-flv"/>
<map from="mkv" to="video/x-matroska"/>
<map from="mka" to="audio/x-matroska"/>
${if cfg.ps3Support then ''
${optionalString cfg.ps3Support ''
<map from="avi" to="video/divx"/>
'' else ""}
${if cfg.dsmSupport then ''
''}
${optionalString cfg.dsmSupport ''
<map from="avi" to="video/avi"/>
'' else ""}
''}
</extension-mimetype>
<mimetype-upnpclass>
<map from="audio/*" to="object.item.audioItem.musicTrack"/>
@ -108,46 +171,27 @@ let
</mappings>
<online-content>
<YouTube enabled="no" refresh="28800" update-at-start="no" purge-after="604800" racy-content="exclude" format="mp4" hd="no">
<favorites user="mediatomb"/>
<favorites user="${name}"/>
<standardfeed feed="most_viewed" time-range="today"/>
<playlists user="mediatomb"/>
<uploads user="mediatomb"/>
<playlists user="${name}"/>
<uploads user="${name}"/>
<standardfeed feed="recently_featured" time-range="today"/>
</YouTube>
</online-content>
</import>
<transcoding enabled="${if cfg.transcoding then "yes" else "no"}">
<mimetype-profile-mappings>
<transcode mimetype="video/x-flv" using="vlcmpeg"/>
<transcode mimetype="application/ogg" using="vlcmpeg"/>
<transcode mimetype="application/ogg" using="oggflac2raw"/>
<transcode mimetype="audio/x-flac" using="oggflac2raw"/>
</mimetype-profile-mappings>
<profiles>
<profile name="oggflac2raw" enabled="no" type="external">
<mimetype>audio/L16</mimetype>
<accept-url>no</accept-url>
<first-resource>yes</first-resource>
<accept-ogg-theora>no</accept-ogg-theora>
<agent command="ogg123" arguments="-d raw -o byteorder:big -f %out %in"/>
<buffer size="1048576" chunk-size="131072" fill-size="262144"/>
</profile>
<profile name="vlcmpeg" enabled="no" type="external">
<mimetype>video/mpeg</mimetype>
<accept-url>yes</accept-url>
<first-resource>yes</first-resource>
<accept-ogg-theora>yes</accept-ogg-theora>
<agent command="vlc" arguments="-I dummy %in --sout #transcode{venc=ffmpeg,vcodec=mp2v,vb=4096,fps=25,aenc=ffmpeg,acodec=mpga,ab=192,samplerate=44100,channels=2}:standard{access=file,mux=ps,dst=%out} vlc:quit"/>
<buffer size="14400000" chunk-size="512000" fill-size="120000"/>
</profile>
</profiles>
</transcoding>
${transcodingConfig}
</config>
'';
'';
defaultFirewallRules = {
# udp 1900 port needs to be opened for SSDP (not configurable within
# mediatomb/gerbera) cf.
# http://docs.gerbera.io/en/latest/run.html?highlight=udp%20port#network-setup
allowedUDPPorts = [ 1900 cfg.port ];
allowedTCPPorts = [ cfg.port ];
};
in {
###### interface
options = {
@ -158,18 +202,27 @@ in {
type = types.bool;
default = false;
description = ''
Whether to enable the mediatomb DLNA server.
Whether to enable the Gerbera/Mediatomb DLNA server.
'';
};
serverName = mkOption {
type = types.str;
default = "mediatomb";
default = "Gerbera (Mediatomb)";
description = ''
How to identify the server on the network.
'';
};
package = mkOption {
type = types.package;
example = literalExample "pkgs.mediatomb";
default = pkgs.gerbera;
description = ''
Underlying package to be used with the module (default: pkgs.gerbera).
'';
};
ps3Support = mkOption {
type = types.bool;
default = false;
@ -206,23 +259,34 @@ in {
dataDir = mkOption {
type = types.path;
default = "/var/lib/mediatomb";
default = "/var/lib/${name}";
description = ''
The directory where mediatomb stores its state, data, etc.
The directory where Gerbera/Mediatomb stores its state, data, etc.
'';
};
pcDirectoryHide = mkOption {
type = types.bool;
default = true;
description = ''
Whether to list the top-level directory or not (from upnp client standpoint).
'';
};
user = mkOption {
type = types.str;
default = "mediatomb";
description = "User account under which mediatomb runs.";
description = "User account under which ${name} runs.";
};
group = mkOption {
type = types.str;
default = "mediatomb";
description = "Group account under which mediatomb runs.";
description = "Group account under which ${name} runs.";
};
port = mkOption {
type = types.int;
default = 49152;
description = ''
The network port to listen on.
@ -230,40 +294,76 @@ in {
};
interface = mkOption {
type = types.str;
default = "";
description = ''
A specific interface to bind to.
'';
};
openFirewall = mkOption {
type = types.bool;
default = false;
description = ''
If false (the default), this is up to the user to declare the firewall rules.
If true, this opens port 1900 (tcp and udp) and the port specified by
<option>sercvices.mediatomb.port</option>.
If the option <option>services.mediatomb.interface</option> is set,
the firewall rules opened are dedicated to that interface. Otherwise,
those rules are opened globally.
'';
};
uuid = mkOption {
type = types.str;
default = "fdfc8a4e-a3ad-4c1d-b43d-a2eedb03a687";
description = ''
A unique (on your network) to identify the server by.
'';
};
mediaDirectories = mkOption {
type = with types; listOf (submodule mediaDirectory);
default = {};
description = ''
Declare media directories to index.
'';
example = [
{ path = "/data/pictures"; recursive = false; hidden-files = false; }
{ path = "/data/audio"; recursive = true; hidden-files = false; }
];
};
customCfg = mkOption {
type = types.bool;
default = false;
description = ''
Allow mediatomb to create and use its own config file inside ${cfg.dataDir}.
Allow ${name} to create and use its own config file inside the <literal>dataDir</literal> as
configured by <option>services.mediatomb.dataDir</option>.
Deactivated by default, the service then runs with the configuration generated from this module.
Otherwise, when enabled, no service configuration is generated. Gerbera/Mediatomb then starts using
config.xml within the configured <literal>dataDir</literal>. It's up to the user to make a correct
configuration file.
'';
};
};
};
###### implementation
config = mkIf cfg.enable {
config = let binaryCommand = "${pkg}/bin/${name}";
interfaceFlag = optionalString ( cfg.interface != "") "--interface ${cfg.interface}";
configFlag = optionalString (! cfg.customCfg) "--config ${pkgs.writeText "config.xml" configText}";
in mkIf cfg.enable {
systemd.services.mediatomb = {
description = "MediaTomb media Server";
description = "${cfg.serverName} media Server";
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
path = [ pkgs.mediatomb ];
serviceConfig.ExecStart = "${pkgs.mediatomb}/bin/mediatomb -p ${toString cfg.port} ${if cfg.interface!="" then "-e ${cfg.interface}" else ""} ${if cfg.customCfg then "" else "-c ${mtConf}"} -m ${cfg.dataDir}";
serviceConfig.User = "${cfg.user}";
serviceConfig.ExecStart = "${binaryCommand} --port ${toString cfg.port} ${interfaceFlag} ${configFlag} --home ${cfg.dataDir}";
serviceConfig.User = cfg.user;
};
users.groups = optionalAttrs (cfg.group == "mediatomb") {
@ -274,15 +374,18 @@ in {
mediatomb = {
isSystemUser = true;
group = cfg.group;
home = "${cfg.dataDir}";
home = cfg.dataDir;
createHome = true;
description = "Mediatomb DLNA Server User";
description = "${name} DLNA Server User";
};
};
networking.firewall = {
allowedUDPPorts = [ 1900 cfg.port ];
allowedTCPPorts = [ cfg.port ];
};
# Open firewall only if users enable it
networking.firewall = mkMerge [
(mkIf (cfg.openFirewall && cfg.interface != "") {
interfaces."${cfg.interface}" = defaultFirewallRules;
})
(mkIf (cfg.openFirewall && cfg.interface == "") defaultFirewallRules)
];
};
}

View file

@ -121,6 +121,16 @@ in
services.dbus.packages = [ pkgs.snapper ];
systemd.services.snapperd = {
description = "DBus interface for snapper";
inherit documentation;
serviceConfig = {
Type = "dbus";
BusName = "org.opensuse.Snapper";
ExecStart = "${pkgs.snapper}/bin/snapperd";
};
};
systemd.services.snapper-timeline = {
description = "Timeline of Snapper Snapshots";
inherit documentation;

View file

@ -29,8 +29,6 @@ in {
config = mkIf cfg.enable {
systemd.services.ssm-agent = {
users.extraUsers.ssm-user = {};
inherit (cfg.package.meta) description;
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
@ -43,5 +41,26 @@ in {
RestartSec = "15min";
};
};
# Add user that Session Manager needs, and give it sudo.
# This is consistent with Amazon Linux 2 images.
security.sudo.extraRules = [
{
users = [ "ssm-user" ];
commands = [
{
command = "ALL";
options = [ "NOPASSWD" ];
}
];
}
];
# On Amazon Linux 2 images, the ssm-user user is pretty much a
# normal user with its own group. We do the same.
users.groups.ssm-user = {};
users.users.ssm-user = {
isNormalUser = true;
group = "ssm-user";
};
};
}

View file

@ -239,7 +239,7 @@ in
system.nssModules = optional cfg.nssmdns pkgs.nssmdns;
system.nssDatabases.hosts = optionals cfg.nssmdns (mkMerge [
[ "mdns_minimal [NOTFOUND=return]" ]
(mkOrder 900 [ "mdns_minimal [NOTFOUND=return]" ]) # must be before resolve
(mkOrder 1501 [ "mdns" ]) # 1501 to ensure it's after dns
]);

View file

@ -7,7 +7,7 @@ let
configFile = pkgs.writeText "dndist.conf" ''
setLocal('${cfg.listenAddress}:${toString cfg.listenPort}')
${cfg.extraConfig}
'';
'';
in {
options = {
services.dnsdist = {
@ -35,25 +35,18 @@ in {
};
};
config = mkIf config.services.dnsdist.enable {
config = mkIf cfg.enable {
systemd.packages = [ pkgs.dnsdist ];
systemd.services.dnsdist = {
description = "dnsdist load balancer";
wantedBy = [ "multi-user.target" ];
after = ["network.target"];
serviceConfig = {
Restart="on-failure";
RestartSec="1";
DynamicUser = true;
StartLimitInterval="0";
PrivateDevices=true;
AmbientCapabilities="CAP_NET_BIND_SERVICE";
CapabilityBoundingSet="CAP_NET_BIND_SERVICE";
ExecStart = "${pkgs.dnsdist}/bin/dnsdist --supervised --disable-syslog --config ${configFile}";
ProtectHome=true;
RestrictAddressFamilies="AF_UNIX AF_INET AF_INET6";
LimitNOFILE="16384";
TasksMax="8192";
# upstream overrides for better nixos compatibility
ExecStartPre = [ "" "${pkgs.dnsdist}/bin/dnsdist --check-config --config ${configFile}" ];
ExecStart = [ "" "${pkgs.dnsdist}/bin/dnsdist --supervised --disable-syslog --config ${configFile}" ];
};
};
};

View file

@ -593,20 +593,19 @@ in {
fastcgi_read_timeout 120s;
'';
};
"~ \\.(?:css|js|svg|gif|map)$".extraConfig = ''
"~ \\.(?:css|js|woff2?|svg|gif|map)$".extraConfig = ''
try_files $uri /index.php$request_uri;
expires 6M;
access_log off;
'';
"~ \\.woff2?$".extraConfig = ''
try_files $uri /index.php$request_uri;
expires 7d;
access_log off;
'';
"~ ^\\/(?:updater|ocs-provider|ocm-provider)(?:$|\\/)".extraConfig = ''
try_files $uri/ =404;
index index.php;
'';
"~ \\.(?:png|html|ttf|ico|jpg|jpeg|bcmap|mp4|webm)$".extraConfig = ''
try_files $uri /index.php$request_uri;
access_log off;
'';
};
extraConfig = ''
index index.php index.html /index.php$request_uri;

View file

@ -374,7 +374,9 @@ in
baobab
cheese
eog
epiphany
/* Not in good standing on nixos:
* https://github.com/NixOS/nixpkgs/issues/98819
/* epiphany */
gedit
gnome-calculator
gnome-calendar

View file

@ -481,6 +481,13 @@ in
)
[dms wms]
);
# Make xsessions and wayland sessions installed at
# /run/current-system/sw/share as some programs
# have behavior that depends on them being installed
environment.systemPackages = [
cfg.displayManager.sessionData.desktops
];
};
imports = [

View file

@ -4,13 +4,15 @@ with lib;
let
inherit (lib) mkOption mkIf optionals literalExample;
cfg = config.services.xserver.windowManager.xmonad;
xmonad = pkgs.xmonad-with-packages.override {
xmonad-vanilla = pkgs.xmonad-with-packages.override {
ghcWithPackages = cfg.haskellPackages.ghcWithPackages;
packages = self: cfg.extraPackages self ++
optionals cfg.enableContribAndExtras
[ self.xmonad-contrib self.xmonad-extras ];
};
xmonadBin = pkgs.writers.writeHaskell "xmonad" {
xmonad-config = pkgs.writers.writeHaskellBin "xmonad" {
ghc = cfg.haskellPackages.ghc;
libraries = [ cfg.haskellPackages.xmonad ] ++
cfg.extraPackages cfg.haskellPackages ++
@ -19,8 +21,10 @@ let
inherit (cfg) ghcArgs;
} cfg.config;
in
{
xmonad = if (cfg.config != null) then xmonad-config else xmonad-vanilla;
in {
meta.maintainers = with maintainers; [ lassulus xaverdh ];
options = {
services.xserver.windowManager.xmonad = {
enable = mkEnableOption "xmonad";
@ -62,19 +66,50 @@ in
default = null;
type = with lib.types; nullOr (either path str);
description = ''
Configuration from which XMonad gets compiled. If no value
is specified, the xmonad config from $HOME/.xmonad is taken.
If you use xmonad --recompile, $HOME/.xmonad will be taken as
the configuration, but on the next restart of display-manager
this config will be reapplied.
Configuration from which XMonad gets compiled. If no value is
specified, a vanilla xmonad binary is put in PATH, which will
attempt to recompile and exec your xmonad config from $HOME/.xmonad.
This setup is then analogous to other (non-NixOS) linux distributions.
If you do set this option, you likely want to use "launch" as your
entry point for xmonad (as in the example), to avoid xmonads
recompilation logic on startup. Doing so will render the default
"mod+q" restart key binding dysfunctional though, because that attempts
to call your binary with the "--restart" command line option, unless
you implement that yourself. You way mant to bind "mod+q" to
<literal>(restart "xmonad" True)</literal> instead, which will just restart
xmonad from PATH. This allows e.g. switching to the new xmonad binary,
after rebuilding your system with nixos-rebuild.
If you actually want to run xmonad with a config specified here, but
also be able to recompile and restart it from a copy of that source in
$HOME/.xmonad on the fly, you will have to implement that yourself
using something like "compileRestart" from the example.
This should allow you to switch at will between the local xmonad and
the one NixOS puts in your PATH.
'';
example = ''
import XMonad
import XMonad.Util.EZConfig (additionalKeys)
import Text.Printf (printf)
import System.Posix.Process (executeFile)
import System.Info (arch,os)
import System.Environment (getArgs)
import System.FilePath ((</>))
compiledConfig = printf "xmonad-%s-%s" arch os
compileRestart = whenX (recompile True) . catchIO $ do
dir <- getXMonadDataDir
args <- getArgs
executeFile (dir </> compiledConfig) False args Nothing
main = launch defaultConfig
{ modMask = mod4Mask -- Use Super instead of Alt
, terminal = "urxvt"
}
{ modMask = mod4Mask -- Use Super instead of Alt
, terminal = "urxvt" }
`additionalKeys`
[ ( (mod4Mask,xK_r), compileRestart )
, ( (mod4Mask,xK_q), restart "xmonad" True ) ]
'';
};
@ -101,10 +136,8 @@ in
services.xserver.windowManager = {
session = [{
name = "xmonad";
start = let
xmonadCommand = if (cfg.config != null) then xmonadBin else "${xmonad}/bin/xmonad";
in ''
systemd-cat -t xmonad -- ${xmonadCommand} ${lib.escapeShellArgs cfg.xmonadCliArgs} &
start = ''
systemd-cat -t xmonad -- ${xmonad}/bin/xmonad ${lib.escapeShellArgs cfg.xmonadCliArgs} &
waitPID=$!
'';
}];

View file

@ -716,7 +716,7 @@ in
system.extraDependencies = singleton (pkgs.runCommand "xkb-validated" {
inherit (cfg) xkbModel layout xkbVariant xkbOptions;
nativeBuildInputs = [ pkgs.xkbvalidate ];
nativeBuildInputs = with pkgs.buildPackages; [ xkbvalidate ];
preferLocalBuild = true;
} ''
xkbvalidate "$xkbModel" "$layout" "$xkbVariant" "$xkbOptions"

View file

@ -391,6 +391,10 @@ in
end with a letter or digit, and have as interior characters only
letters, digits, and hyphen. The maximum length is 63 characters.
Additionally it is recommended to only use lower-case characters.
If (e.g. for legacy reasons) a FQDN is required as the Linux kernel
network node hostname (uname --nodename) the option
boot.kernel.sysctl."kernel.hostname" can be used as a workaround (but
the 64 character limit still applies).
'';
};
@ -470,7 +474,7 @@ in
networking.search = mkOption {
default = [];
example = [ "example.com" "local.domain" ];
example = [ "example.com" "home.arpa" ];
type = types.listOf types.str;
description = ''
The list of search paths used when resolving domain names.
@ -479,7 +483,7 @@ in
networking.domain = mkOption {
default = null;
example = "home";
example = "home.arpa";
type = types.nullOr types.str;
description = ''
The domain. It can be left empty if it is auto-detected through DHCP.

View file

@ -97,6 +97,19 @@ in import ./make-test-python.nix ({ lib, ... }: {
};
};
# Test OCSP Stapling
specialisation.ocsp-stapling.configuration = { pkgs, ... }: {
security.acme.certs."a.example.test" = {
ocspMustStaple = true;
};
services.nginx.virtualHosts."a.example.com" = {
extraConfig = ''
ssl_stapling on;
ssl_stapling_verify on;
'';
};
};
# Test using Apache HTTPD
specialisation.httpd-aliases.configuration = { pkgs, config, lib, ... }: {
services.nginx.enable = lib.mkForce false;
@ -163,6 +176,7 @@ in import ./make-test-python.nix ({ lib, ... }: {
testScript = {nodes, ...}:
let
caDomain = nodes.acme.config.test-support.acme.caDomain;
newServerSystem = nodes.webserver.config.system.build.toplevel;
switchToNewServer = "${newServerSystem}/bin/switch-to-configuration test";
in
@ -246,6 +260,22 @@ in import ./make-test-python.nix ({ lib, ... }: {
return check_connection_key_bits(node, domain, bits, retries - 1)
def check_stapling(node, domain, retries=3):
assert retries >= 0
# Pebble doesn't provide a full OCSP responder, so just check the URL
result = node.succeed(
"openssl s_client -CAfile /tmp/ca.crt"
f" -servername {domain} -connect {domain}:443 < /dev/null"
" | openssl x509 -noout -ocsp_uri"
)
print("OCSP Responder URL:", result)
if "${caDomain}:4002" not in result.lower():
time.sleep(1)
return check_stapling(node, domain, retries - 1)
client.start()
dnsserver.start()
@ -253,7 +283,7 @@ in import ./make-test-python.nix ({ lib, ... }: {
client.wait_for_unit("default.target")
client.succeed(
'curl --data \'{"host": "acme.test", "addresses": ["${nodes.acme.config.networking.primaryIPAddress}"]}\' http://${dnsServerIP nodes}:8055/add-a'
'curl --data \'{"host": "${caDomain}", "addresses": ["${nodes.acme.config.networking.primaryIPAddress}"]}\' http://${dnsServerIP nodes}:8055/add-a'
)
acme.start()
@ -262,8 +292,8 @@ in import ./make-test-python.nix ({ lib, ... }: {
acme.wait_for_unit("default.target")
acme.wait_for_unit("pebble.service")
client.succeed("curl https://acme.test:15000/roots/0 > /tmp/ca.crt")
client.succeed("curl https://acme.test:15000/intermediate-keys/0 >> /tmp/ca.crt")
client.succeed("curl https://${caDomain}:15000/roots/0 > /tmp/ca.crt")
client.succeed("curl https://${caDomain}:15000/intermediate-keys/0 >> /tmp/ca.crt")
with subtest("Can request certificate with HTTPS-01 challenge"):
webserver.wait_for_unit("acme-finished-a.example.test.target")
@ -290,6 +320,11 @@ in import ./make-test-python.nix ({ lib, ... }: {
check_connection_key_bits(client, "a.example.test", "384")
webserver.succeed("grep testing /var/lib/acme/a.example.test/test")
with subtest("Correctly implements OCSP stapling"):
switch_to(webserver, "ocsp-stapling")
webserver.wait_for_unit("acme-finished-a.example.test.target")
check_stapling(client, "a.example.test")
with subtest("Can request certificate with HTTPS-01 when nginx startup is delayed"):
switch_to(webserver, "slow-startup")
webserver.wait_for_unit("acme-finished-slow.example.com.target")

View file

@ -31,7 +31,7 @@ in
machine.succeed('echo "import IO" > TestIO.agda')
machine.succeed("agda -l standard-library -i . TestIO.agda")
# # Hello world
# Hello world
machine.succeed(
"cp ${hello-world} HelloWorld.agda"
)

View file

@ -26,6 +26,7 @@ in
agda = handleTest ./agda.nix {};
atd = handleTest ./atd.nix {};
avahi = handleTest ./avahi.nix {};
avahi-with-resolved = handleTest ./avahi.nix { networkd = true; };
babeld = handleTest ./babeld.nix {};
bazarr = handleTest ./bazarr.nix {};
bcachefs = handleTestOn ["x86_64-linux"] ./bcachefs.nix {}; # linux-4.18.2018.10.12 is unsupported on aarch64
@ -44,6 +45,7 @@ in
caddy = handleTest ./caddy.nix {};
cadvisor = handleTestOn ["x86_64-linux"] ./cadvisor.nix {};
cage = handleTest ./cage.nix {};
cagebreak = handleTest ./cagebreak.nix {};
cassandra = handleTest ./cassandra.nix {};
ceph-single-node = handleTestOn ["x86_64-linux"] ./ceph-single-node.nix {};
ceph-multi-node = handleTestOn ["x86_64-linux"] ./ceph-multi-node.nix {};
@ -111,6 +113,7 @@ in
fontconfig-default-fonts = handleTest ./fontconfig-default-fonts.nix {};
freeswitch = handleTest ./freeswitch.nix {};
fsck = handleTest ./fsck.nix {};
ft2-clone = handleTest ./ft2-clone.nix {};
gerrit = handleTest ./gerrit.nix {};
gotify-server = handleTest ./gotify-server.nix {};
grocy = handleTest ./grocy.nix {};

View file

@ -1,5 +1,11 @@
{ system ? builtins.currentSystem
, config ? {}
, pkgs ? import ../.. { inherit system config; }
# bool: whether to use networkd in the tests
, networkd ? false }:
# Test whether `avahi-daemon' and `libnss-mdns' work as expected.
import ./make-test-python.nix ({ pkgs, ... } : {
import ./make-test-python.nix ({ ... } : {
name = "avahi";
meta = with pkgs.stdenv.lib.maintainers; {
maintainers = [ eelco ];
@ -17,6 +23,11 @@ import ./make-test-python.nix ({ pkgs, ... } : {
publish.workstation = true;
extraServiceFiles.ssh = "${pkgs.avahi}/etc/avahi/services/ssh.service";
};
} // pkgs.lib.optionalAttrs (networkd) {
networking = {
useNetworkd = true;
useDHCP = false;
};
};
in {
one = cfg;

93
nixos/tests/cagebreak.nix Normal file
View file

@ -0,0 +1,93 @@
import ./make-test-python.nix ({ pkgs, lib, ...} :
let
cagebreakConfigfile = pkgs.writeText "config" ''
workspaces 1
escape C-t
bind t exec env DISPLAY=:0 ${pkgs.xterm}/bin/xterm -cm -pc
'';
in
{
name = "cagebreak";
meta = with pkgs.stdenv.lib.maintainers; {
maintainers = [ berbiche ];
};
machine = { config, ... }:
let
alice = config.users.users.alice;
in {
imports = [ ./common/user-account.nix ];
environment.systemPackages = [ pkgs.cagebreak pkgs.wallutils ];
services.xserver = {
enable = true;
displayManager.autoLogin = {
enable = true;
user = alice.name;
};
};
services.xserver.windowManager.session = lib.singleton {
manage = "desktop";
name = "cagebreak";
start = ''
export XDG_RUNTIME_DIR="/run/user/${toString alice.uid}"
${pkgs.cagebreak}/bin/cagebreak &
waitPID=$!
'';
};
systemd.services.setupCagebreakConfig = {
wantedBy = [ "multi-user.target" ];
before = [ "multi-user.target" ];
environment = {
HOME = alice.home;
};
unitConfig = {
type = "oneshot";
RemainAfterExit = true;
user = alice.name;
};
script = ''
cd $HOME
CONFFILE=$HOME/.config/cagebreak/config
mkdir -p $(dirname $CONFFILE)
cp ${cagebreakConfigfile} $CONFFILE
'';
};
# Copied from cage:
# this needs a fairly recent kernel, otherwise:
# [backend/drm/util.c:215] Unable to add DRM framebuffer: No such file or directory
# [backend/drm/legacy.c:15] Virtual-1: Failed to set CRTC: No such file or directory
# [backend/drm/util.c:215] Unable to add DRM framebuffer: No such file or directory
# [backend/drm/legacy.c:15] Virtual-1: Failed to set CRTC: No such file or directory
# [backend/drm/drm.c:618] Failed to initialize renderer on connector 'Virtual-1': initial page-flip failed
# [backend/drm/drm.c:701] Failed to initialize renderer for plane
boot.kernelPackages = pkgs.linuxPackages_latest;
virtualisation.memorySize = 1024;
};
enableOCR = true;
testScript = { nodes, ... }: let
user = nodes.machine.config.users.users.alice;
XDG_RUNTIME_DIR = "/run/user/${toString user.uid}";
in ''
start_all()
machine.wait_for_unit("multi-user.target")
machine.wait_for_file("${XDG_RUNTIME_DIR}/wayland-0")
with subtest("ensure wayland works with wayinfo from wallutils"):
machine.succeed("env XDG_RUNTIME_DIR=${XDG_RUNTIME_DIR} wayinfo")
with subtest("ensure xwayland works with xterm"):
machine.send_key("ctrl-t")
machine.send_key("t")
machine.wait_until_succeeds("pgrep xterm")
machine.wait_for_text("${user.name}@machine")
machine.screenshot("screen")
machine.send_key("ctrl-d")
'';
})

View file

@ -70,7 +70,7 @@ let
privateKey = testCerts.${domain}.key;
httpPort = 80;
tlsPort = 443;
ocspResponderURL = "http://0.0.0.0:4002";
ocspResponderURL = "http://${domain}:4002";
strict = true;
};

35
nixos/tests/ft2-clone.nix Normal file
View file

@ -0,0 +1,35 @@
import ./make-test-python.nix ({ pkgs, ... }: {
name = "ft2-clone";
meta = with pkgs.lib.maintainers; {
maintainers = [ fgaz ];
};
machine = { config, pkgs, ... }: {
imports = [
./common/x11.nix
];
services.xserver.enable = true;
sound.enable = true;
environment.systemPackages = [ pkgs.ft2-clone ];
};
enableOCR = true;
testScript =
''
machine.wait_for_x()
# Add a dummy sound card, or the program won't start
machine.execute("modprobe snd-dummy")
machine.execute("ft2-clone &")
machine.wait_for_window(r"Fasttracker")
machine.sleep(5)
# One of the few words that actually get recognized
if "Songlen" not in machine.get_screen_text():
raise Exception("Program did not start successfully")
machine.screenshot("screen")
'';
})

81
nixos/tests/mediatomb.nix Normal file
View file

@ -0,0 +1,81 @@
import ./make-test-python.nix ({ pkgs, ... }:
{
name = "mediatomb";
nodes = {
serverGerbera =
{ ... }:
let port = 49152;
in {
imports = [ ../modules/profiles/minimal.nix ];
services.mediatomb = {
enable = true;
serverName = "Gerbera";
package = pkgs.gerbera;
interface = "eth1"; # accessible from test
openFirewall = true;
mediaDirectories = [
{ path = "/var/lib/gerbera/pictures"; recursive = false; hidden-files = false; }
{ path = "/var/lib/gerbera/audio"; recursive = true; hidden-files = false; }
];
};
};
serverMediatomb =
{ ... }:
let port = 49151;
in {
imports = [ ../modules/profiles/minimal.nix ];
services.mediatomb = {
enable = true;
serverName = "Mediatomb";
package = pkgs.mediatomb;
interface = "eth1";
inherit port;
mediaDirectories = [
{ path = "/var/lib/mediatomb/pictures"; recursive = false; hidden-files = false; }
{ path = "/var/lib/mediatomb/audio"; recursive = true; hidden-files = false; }
];
};
networking.firewall.interfaces.eth1 = {
allowedUDPPorts = [ 1900 port ];
allowedTCPPorts = [ port ];
};
};
client = { ... }: { };
};
testScript =
''
start_all()
port = 49151
serverMediatomb.succeed("mkdir -p /var/lib/mediatomb/{pictures,audio}")
serverMediatomb.succeed("chown -R mediatomb:mediatomb /var/lib/mediatomb")
serverMediatomb.wait_for_unit("mediatomb")
serverMediatomb.wait_for_open_port(port)
serverMediatomb.succeed(f"curl --fail http://serverMediatomb:{port}/")
page = client.succeed(f"curl --fail http://serverMediatomb:{port}/")
assert "MediaTomb" in page and "Gerbera" not in page
serverMediatomb.shutdown()
port = 49152
serverGerbera.succeed("mkdir -p /var/lib/mediatomb/{pictures,audio}")
serverGerbera.succeed("chown -R mediatomb:mediatomb /var/lib/mediatomb")
# service running gerbera fails the first time claiming something is already bound
# gerbera[715]: 2020-07-18 23:52:14 info: Please check if another instance of Gerbera or
# gerbera[715]: 2020-07-18 23:52:14 info: another application is running on port TCP 49152 or UDP 1900.
# I did not find anything so here I work around this
serverGerbera.succeed("sleep 2")
serverGerbera.wait_until_succeeds("systemctl restart mediatomb")
serverGerbera.wait_for_unit("mediatomb")
serverGerbera.succeed(f"curl --fail http://serverGerbera:{port}/")
page = client.succeed(f"curl --fail http://serverGerbera:{port}/")
assert "Gerbera" in page and "MediaTomb" not in page
serverGerbera.shutdown()
client.shutdown()
'';
})

View file

@ -38,14 +38,14 @@ in {
matchConfig.Name = "vrf1";
networkConfig.IPForward = "yes";
routes = [
{ routeConfig = { Destination = "192.168.1.2"; Metric = "100"; }; }
{ routeConfig = { Destination = "192.168.1.2"; Metric = 100; }; }
];
};
networks."10-vrf2" = {
matchConfig.Name = "vrf2";
networkConfig.IPForward = "yes";
routes = [
{ routeConfig = { Destination = "192.168.2.3"; Metric = "100"; }; }
{ routeConfig = { Destination = "192.168.2.3"; Metric = 100; }; }
];
};

View file

@ -14,9 +14,16 @@ import ./make-test-python.nix ({ pkgs, ...} : {
extraPackages = with pkgs.haskellPackages; haskellPackages: [ xmobar ];
config = ''
import XMonad
import XMonad.Operations (restart)
import XMonad.Util.EZConfig
main = launch $ def `additionalKeysP` myKeys
myKeys = [ ("M-C-x", spawn "xterm") ]
import XMonad.Util.SessionStart
main = launch $ def { startupHook = startup } `additionalKeysP` myKeys
startup = isSessionStart >>= \sessInit ->
if sessInit then setSessionStarted else spawn "xterm"
myKeys = [ ("M-C-x", spawn "xterm"), ("M-q", restart "xmonad" True) ]
'';
};
};
@ -30,12 +37,11 @@ import ./make-test-python.nix ({ pkgs, ...} : {
machine.send_key("alt-ctrl-x")
machine.wait_for_window("${user.name}.*machine")
machine.sleep(1)
machine.screenshot("terminal")
machine.wait_until_succeeds("xmonad --restart")
machine.screenshot("terminal1")
machine.send_key("alt-q")
machine.sleep(3)
machine.send_key("alt-shift-ret")
machine.wait_for_window("${user.name}.*machine")
machine.sleep(1)
machine.screenshot("terminal")
machine.screenshot("terminal2")
'';
})

View file

@ -1,38 +1,24 @@
{ stdenv, fetchurl, fetchpatch, makeWrapper, pkgconfig, alsaLib, dbus, libjack2
, wafHook
, python2Packages}:
{ stdenv, fetchFromGitHub, fetchpatch, makeWrapper, pkgconfig, alsaLib, dbus, libjack2
, python3Packages , meson, ninja }:
let
inherit (python2Packages) python dbus-python;
in stdenv.mkDerivation {
stdenv.mkDerivation rec {
pname = "a2jmidid";
version = "8";
version = "9";
src = fetchurl {
url = "https://github.com/linuxaudio/a2jmidid/archive/7383d268c4bfe85df9f10df6351677659211d1ca.tar.gz";
sha256 = "06dgf5655znbvrd7fhrv8msv6zw8vk0hjqglcqkh90960mnnmwz7";
src = fetchFromGitHub {
owner = "linuxaudio";
repo = pname;
rev = version;
sha256 = "sha256-WNt74tSWV8bY4TnpLp86PsnrjkqWynJJt3Ra4gZl2fQ=";
};
nativeBuildInputs = [ pkgconfig makeWrapper wafHook ];
buildInputs = [ alsaLib dbus libjack2 python dbus-python ];
patches = [
(fetchpatch {
url = "https://github.com/linuxaudio/a2jmidid/commit/24e3b8e543256ae8fdfb4b75eb9fd775f07c46e2.diff";
sha256 = "1nxrvnhxlgqc9wbxnp1gnpw4wjyzxvymwcg1gh2nqzmssgfykfkc";
})
(fetchpatch {
url = "https://github.com/linuxaudio/a2jmidid/commit/7f82da7eb2f540a94db23331be98d42a58ddc269.diff";
sha256 = "1nab9zf0agbcj5pvhl90pz0cx1d204d4janqflc5ymjhy8jyrsdv";
})
(fetchpatch {
url = "https://github.com/linuxaudio/a2jmidid/commit/c07775d021a71cb91bf64ce1391cf525415cb060.diff";
sha256 = "172v9hri03qdqi8a3zsg227k5qxldd8v5bj4jk7fyk5jf50fcxga";
})
];
nativeBuildInputs = [ pkgconfig makeWrapper meson ninja ];
buildInputs = [ alsaLib dbus libjack2 ] ++
(with python3Packages; [ python dbus-python ]);
postInstall = ''
wrapProgram $out/bin/a2j_control --set PYTHONPATH $PYTHONPATH
substituteInPlace $out/bin/a2j --replace "a2j_control" "$out/bin/a2j_control"
'';
meta = with stdenv.lib; {

View file

@ -15,13 +15,13 @@ assert withGtk3 -> gtk3 != null;
stdenv.mkDerivation rec {
pname = "carla";
version = "2.1.1";
version = "2.2.0";
src = fetchFromGitHub {
owner = "falkTX";
repo = pname;
rev = "v${version}";
sha256 = "0c3y4a6cgi4bv1mg57i3qn5ia6pqjqlaylvkapj6bmpsw71ig22g";
sha256 = "B4xoRuNEW4Lz9haP8fqxOTcysGTNEXFOq9UXqUJLSFw=";
};
nativeBuildInputs = [

View file

@ -32,9 +32,8 @@ in py.buildPythonApplication rec {
./unlock_constraints.patch
];
postFixup = ''
wrapQtApp $out/bin/friture
wrapQtApp $out/bin/.friture-wrapped
preFixup = ''
makeWrapperArgs+=("''${qtWrapperArgs[@]}")
'';
meta = with lib; {

View file

@ -1,8 +1,10 @@
{ stdenv
, fetchFromGitHub
, cmake
, nixosTests
, alsaLib
, SDL2
, libiconv
}:
stdenv.mkDerivation rec {
@ -17,7 +19,13 @@ stdenv.mkDerivation rec {
};
nativeBuildInputs = [ cmake ];
buildInputs = [ SDL2 ] ++ stdenv.lib.optional stdenv.isLinux alsaLib;
buildInputs = [ SDL2 ]
++ stdenv.lib.optional stdenv.isLinux alsaLib
++ stdenv.lib.optional stdenv.isDarwin libiconv;
passthru.tests = {
ft2-clone-starts = nixosTests.ft2-clone;
};
meta = with stdenv.lib; {
description = "A highly accurate clone of the classic Fasttracker II software for MS-DOS";

View file

@ -5,14 +5,14 @@
stdenv.mkDerivation rec {
pname = "helio-workstation";
version = "2.2";
version = "3.1";
src = fetchFromGitHub {
owner = "helio-fm";
repo = pname;
rev = version;
fetchSubmodules = true;
sha256 = "16iwj4mjs1nm8dlk70q97svp3vkcgs7hdj9hfda9h67acn4a8vvk";
sha256 = "10pna4k43g648gapviykq2zk82iwy5rqff4lbfh5vzxqpg5v4ma6";
};
buildInputs = [
@ -22,7 +22,10 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ pkgconfig makeWrapper ];
preBuild = "cd Projects/LinuxMakefile";
preBuild = ''
cd Projects/LinuxMakefile
substituteInPlace Makefile --replace alsa "alsa jack"
'';
buildFlags = [ "CONFIG=Release64" ];
installPhase = ''

View file

@ -1,5 +1,5 @@
{ stdenv, fetchurl
, pkgconfig, cmake, python, ffmpeg_3, phonon, automoc4
, pkgconfig, cmake, python3, ffmpeg_3, phonon, automoc4
, chromaprint, docbook_xml_dtd_45, docbook_xsl, libxslt
, id3lib, taglib, mp4v2, flac, libogg, libvorbis
, zlib, readline , qtbase, qttools, qtmultimedia, qtquickcontrols
@ -7,18 +7,17 @@
}:
stdenv.mkDerivation rec {
pname = "kid3";
version = "3.8.3";
version = "3.8.4";
src = fetchurl {
url = "mirror://sourceforge/project/kid3/kid3/${version}/${pname}-${version}.tar.gz";
sha256 = "0i0c4bmsm36jj1v535kil47ig0ig70ykrzcw2f56spr25xns06ka";
sha256 = "sha256-WYuEOqMu2VMOv6mkVCRXnmInFER/DWfPNqYuaTJ3vAc=";
};
nativeBuildInputs = [ wrapQtAppsHook ];
buildInputs = with stdenv.lib;
[ pkgconfig cmake python ffmpeg_3 phonon automoc4
buildInputs = [
pkgconfig cmake python3 ffmpeg_3 phonon automoc4
chromaprint docbook_xml_dtd_45 docbook_xsl libxslt
id3lib taglib mp4v2 flac libogg libvorbis zlib readline
qtbase qttools qtmultimedia qtquickcontrols ];
@ -35,34 +34,33 @@ stdenv.mkDerivation rec {
meta = with stdenv.lib; {
description = "A simple and powerful audio tag editor";
longDescription = ''
If you want to easily tag multiple MP3, Ogg/Vorbis, FLAC, MPC,
MP4/AAC, MP2, Opus, Speex, TrueAudio, WavPack, WMA, WAV and AIFF
files (e.g. full albums) without typing the same information
again and again and have control over both ID3v1 and ID3v2 tags,
then Kid3 is the program you are looking for.
If you want to easily tag multiple MP3, Ogg/Vorbis, FLAC, MPC, MP4/AAC,
MP2, Opus, Speex, TrueAudio, WavPack, WMA, WAV and AIFF files (e.g. full
albums) without typing the same information again and again and have
control over both ID3v1 and ID3v2 tags, then Kid3 is the program you are
looking for.
With Kid3 you can:
- Edit ID3v1.1 tags;
- Edit all ID3v2.3 and ID3v2.4 frames;
- Convert between ID3v1.1, ID3v2.3 and ID3v2.4 tags
- Edit tags in MP3, Ogg/Vorbis, FLAC, MPC, MP4/AAC, MP2, Opus,
Speex, TrueAudio, WavPack, WMA, WAV, AIFF files and tracker
modules (MOD, S3M, IT, XM);
- Edit tags of multiple files, e.g. the artist, album, year and
genre of all files of an album typically have the same values
and can be set together;
- Edit tags in MP3, Ogg/Vorbis, FLAC, MPC, MP4/AAC, MP2, Opus, Speex,
TrueAudio, WavPack, WMA, WAV, AIFF files and tracker modules (MOD, S3M,
IT, XM);
- Edit tags of multiple files, e.g. the artist, album, year and genre of
all files of an album typically have the same values and can be set
together;
- Generate tags from filenames;
- Generate tags from the contents of tag fields;
- Generate filenames from tags;
- Rename and create directories from tags;
- Generate playlist files;
- Automatically convert upper and lower case and replace strings;
- Import from gnudb.org, TrackType.org, MusicBrainz, Discogs,
Amazon and other sources of album data;
- Export tags as CSV, HTML, playlists, Kover XML and in other
formats;
- Edit synchronized lyrics and event timing codes, import and
export LRC files
- Import from gnudb.org, TrackType.org, MusicBrainz, Discogs, Amazon and
other sources of album data;
- Export tags as CSV, HTML, playlists, Kover XML and in other formats;
- Edit synchronized lyrics and event timing codes, import and export
LRC files.
'';
homepage = "http://kid3.sourceforge.net/";
license = licenses.lgpl2Plus;

View file

@ -14,13 +14,13 @@
mkDerivation rec {
pname = "MellowPlayer";
version = "3.6.5";
version = "3.6.6";
src = fetchFromGitLab {
owner = "ColinDuquesnoy";
repo = "MellowPlayer";
rev = version;
sha256 = "1fnfqyy52hnh9vwq4rcndcqwh0zsm1sd3vi4h5gzaj4zbniq5v2f";
sha256 = "14y175fl6wg04fz0fhx553r8z3nwqrs2lr3rdls70bhwx5x6lavw";
};
nativeBuildInputs = [ cmake pkgconfig ];

View file

@ -1,4 +1,4 @@
{ stdenv, mkDerivation, fetchFromGitHub, cmake, qtbase, alsaLib, makeDesktopItem }:
{ stdenv, mkDerivation, fetchFromGitHub, cmake, qtbase, alsaLib, makeDesktopItem, libjack2 }:
let
desktopItem = makeDesktopItem rec {
@ -9,14 +9,14 @@ let
categories = "Audio;AudioVideo;";
};
in mkDerivation rec {
version = "2.4.0";
version = "2.4.1";
pname = "munt";
src = fetchFromGitHub {
owner = pname;
repo = pname;
rev = with stdenv.lib.versions; "libmt32emu_${major version}_${minor version}_${patch version}";
sha256 = "0521i7js5imlsxj6n7181w5szfjikam0k4vq1d2ilkqgcwrkg6ln";
sha256 = "0bszhkbz24hhx32f973l6h5lkyn4lxhqrckiwmv765d1sba8n5bk";
};
postInstall = ''
@ -26,7 +26,7 @@ in mkDerivation rec {
dontFixCmake = true;
nativeBuildInputs = [ cmake ];
buildInputs = [ qtbase alsaLib ];
buildInputs = [ qtbase alsaLib libjack2 ];
meta = with stdenv.lib; {
description = "Multi-platform software synthesiser emulating Roland MT-32, CM-32L, CM-64 and LAPC-I devices";

View file

@ -0,0 +1,54 @@
{ stdenv
, lib
, fetchurl
, autoPatchelfHook
, dpkg
, qt5
, libjack2
, alsaLib
, bzip2
, libpulseaudio }:
stdenv.mkDerivation rec {
pname = "ocenaudio";
version = "3.9.2";
src = fetchurl {
url = "https://www.ocenaudio.com/downloads/index.php/ocenaudio_debian9_64.deb?version=${version}";
sha256 = "1fvpba3dnzb7sm6gp0znbrima02ckfiy2zwb66x1gr05y9a56inv";
};
nativeBuildInputs = [
autoPatchelfHook
qt5.qtbase
libjack2
libpulseaudio
bzip2
alsaLib
];
buildInputs = [ dpkg ];
dontUnpack = true;
dontBuild = true;
dontStrip = true;
installPhase = ''
mkdir -p $out
dpkg -x $src $out
cp -av $out/opt/ocenaudio/* $out
rm -rf $out/opt
# Create symlink bzip2 library
ln -s ${bzip2.out}/lib/libbz2.so.1 $out/libbz2.so.1.0
'';
meta = with stdenv.lib; {
description = "Cross-platform, easy to use, fast and functional audio editor";
homepage = "https://www.ocenaudio.com";
license = licenses.unfree;
platforms = platforms.linux;
maintainers = with maintainers; [ onny ];
};
}

View file

@ -30,5 +30,6 @@ python3Packages.buildPythonApplication rec {
license = licenses.gpl3;
maintainers = with maintainers; [ peterhoeg ];
platforms = platforms.linux;
broken = true; # Needs Qt wrapping
};
}

View file

@ -3,7 +3,7 @@
mkDerivation, fetchFromGitHub, fetchpatch, lib, makeWrapper,
cmake, extra-cmake-modules, pkgconfig,
libkcddb, kconfig, kconfigwidgets, ki18n, kdelibs4support, kio, solid, kwidgetsaddons, kxmlgui,
qtbase, phonon,
qtbase, phonon,
taglib,
# optional backends
withCD ? true, cdparanoia,
@ -43,7 +43,7 @@ let runtimeDeps = []
++ lib.optionals withMp3 [ lame mp3gain ]
++ lib.optionals withAac [ faad2 aacgain ];
in
in
mkDerivation rec {
name = "soundkonverter";
version = "3.0.1";
@ -67,7 +67,7 @@ mkDerivation rec {
propagatedBuildInputs = [ libkcddb kconfig kconfigwidgets ki18n kdelibs4support kio solid kwidgetsaddons kxmlgui qtbase phonon];
buildInputs = [ taglib ] ++ runtimeDeps;
# encoder plugins go to ${out}/lib so they're found by kbuildsycoca5
cmakeFlags = [ "-DCMAKE_INSTALL_PREFIX=$out" ];
cmakeFlags = [ "-DCMAKE_INSTALL_PREFIX=$out" ];
sourceRoot = "source/src";
# add runt-time deps to PATH
postInstall = ''
@ -79,26 +79,26 @@ mkDerivation rec {
description = "Audio file converter, CD ripper and Replay Gain tool";
longDescription = ''
soundKonverter is a frontend to various audio converters.
The key features are:
- Audio file conversion
- Replay Gain calculation
- CD ripping
soundKonverter supports reading and writing tags and covers for many formats, so they are preserved when converting files.
It is extendable by plugins and supports many backends including:
- Audio file conversion
Backends: faac, faad, ffmpeg, flac, lame, mplayer, neroaac, timidity, fluidsynth, vorbistools, opustools, sox, twolame,
flake, mac, shorten, wavpack and speex
Formats: ogg vorbis, mp3, flac, wma, aac, ac3, opus, alac, mp2, als, amr nb, amr wb, ape, speex, m4a, mp1, musepack shorten,
tta, wavpack, ra, midi, mod, 3gp, rm, avi, mkv, ogv, mpeg, mov, mp4, flv, wmv and rv
- Replay Gain calculation
Backends: aacgain, metaflac, mp3gain, vorbisgain, wvgain, mpcgain
Formats: aac, mp3, flac, ogg vorbis, wavpack, musepack
- CD ripping
Backends: cdparanoia
'';

View file

@ -1,7 +1,7 @@
{ fetchurl, stdenv, squashfsTools, xorg, alsaLib, makeWrapper, openssl, freetype
, glib, pango, cairo, atk, gdk-pixbuf, gtk2, cups, nspr, nss, libpng, libnotify
, libgcrypt, systemd, fontconfig, dbus, expat, ffmpeg_3, curl, zlib, gnome3
, at-spi2-atk, at-spi2-core, libpulseaudio
, at-spi2-atk, at-spi2-core, libpulseaudio, libdrm, mesa
}:
let
@ -10,15 +10,14 @@ let
# If an update breaks things, one of those might have valuable info:
# https://aur.archlinux.org/packages/spotify/
# https://community.spotify.com/t5/Desktop-Linux
version = "1.1.26.501.gbe11e53b-15";
version = "1.1.42.622.gbd112320-37";
# To get the latest stable revision:
# curl -H 'X-Ubuntu-Series: 16' 'https://api.snapcraft.io/api/v1/snaps/details/spotify?channel=stable' | jq '.download_url,.version,.last_updated'
# To get general information:
# curl -H 'Snap-Device-Series: 16' 'https://api.snapcraft.io/v2/snaps/info/spotify' | jq '.'
# More examples of api usage:
# https://github.com/canonical-websites/snapcraft.io/blob/master/webapp/publisher/snaps/views.py
rev = "41";
rev = "42";
deps = [
alsaLib
@ -36,10 +35,12 @@ let
gdk-pixbuf
glib
gtk2
libdrm
libgcrypt
libnotify
libpng
libpulseaudio
mesa
nss
pango
stdenv.cc.cc
@ -77,7 +78,7 @@ stdenv.mkDerivation {
# https://community.spotify.com/t5/Desktop-Linux/Redistribute-Spotify-on-Linux-Distributions/td-p/1695334
src = fetchurl {
url = "https://api.snapcraft.io/api/v1/snaps/download/pOBIoZ2LrCB3rDohMxoYGnbN14EHOgD7_${rev}.snap";
sha512 = "41bc8d20388bab39058d0709d99b1c8e324ea37af217620797356b8bc0b24aedbe801eaaa6e00a93e94e26765602e5dc27ad423ce2e777b4bec1b92daf04f81e";
sha512 = "06371c6a285aba916a779cd9f2a933f97db8fb38393545baa94c8984302e003c559af7b1b35afd7df5f2c35e379e2cb80c00facf527bc22df09061cdb67d9d7a";
};
buildInputs = [ squashfsTools makeWrapper ];

View file

@ -28,8 +28,8 @@ buildPythonApplication rec {
# QT setup in tests broken.
doCheck = false;
postFixup = ''
wrapQtApp $out/bin/vorta
preFixup = ''
makeWrapperArgs+=("''${qtWrapperArgs[@]}")
'';
meta = with lib; {

View file

@ -1,62 +1,87 @@
{ stdenv, wrapQtAppsHook, makeDesktopItem
, fetchFromGitHub, qmake, qttools, pkgconfig
, fetchFromGitHub
, cmake, qttools, pkgconfig
, qtbase, qtdeclarative, qtgraphicaleffects
, qtmultimedia, qtxmlpatterns
, qtquickcontrols, qtquickcontrols2
, monero, unbound, readline, boost, libunwind
, libsodium, pcsclite, zeromq, libgcrypt, libgpgerror
, hidapi, libusb-compat-0_1, protobuf, randomx
, monero, miniupnpc, unbound, readline
, boost, libunwind, libsodium, pcsclite
, randomx, zeromq, libgcrypt, libgpgerror
, hidapi, rapidjson
, trezorSupport ? true
, libusb1 ? null
, protobuf ? null
, python3 ? null
}:
with stdenv.lib;
assert trezorSupport -> all (x: x!=null) [ libusb1 protobuf python3 ];
let
arch = if stdenv.isx86_64 then "x86-64"
else if stdenv.isi686 then "i686"
else if stdenv.isAarch64 then "armv8-a"
else throw "unsupported architecture";
in
stdenv.mkDerivation rec {
pname = "monero-gui";
version = "0.16.0.3";
version = "0.17.0.1";
src = fetchFromGitHub {
owner = "monero-project";
repo = "monero-gui";
rev = "v${version}";
sha256 = "0iwjp8x5swy8i8pzrlm5v55awhm54cf48pm1vz98lcq361lhfzk6";
sha256 = "1i9a3ampppyzsl4sllbqlr3w43sjpb3fdfxhb1j4n49p8g0jzmf3";
};
nativeBuildInputs = [ qmake pkgconfig wrapQtAppsHook ];
nativeBuildInputs = [
cmake pkgconfig wrapQtAppsHook
(getDev qttools)
];
buildInputs = [
qtbase qtdeclarative qtgraphicaleffects
qtmultimedia qtquickcontrols qtquickcontrols2
qtxmlpatterns
monero unbound readline libgcrypt libgpgerror
boost libunwind libsodium pcsclite zeromq
hidapi libusb-compat-0_1 protobuf randomx
];
monero miniupnpc unbound readline
randomx libgcrypt libgpgerror
boost libunwind libsodium pcsclite
zeromq hidapi rapidjson
] ++ optionals trezorSupport [ libusb1 protobuf python3 ];
NIX_CFLAGS_COMPILE = [ "-Wno-error=format-security" ];
postUnpack = ''
# copy monero sources here
# (needs to be writable)
cp -r ${monero.source}/* source/monero
chmod -R +w source/monero
'';
patches = [ ./move-log-file.patch ];
postPatch = ''
echo '
var GUI_VERSION = "${version}";
var GUI_MONERO_VERSION = "${getVersion monero}";
' > version.js
substituteInPlace monero-wallet-gui.pro \
--replace '$$[QT_INSTALL_BINS]/lrelease' '${getDev qttools}/bin/lrelease'
# set monero-gui version
substituteInPlace src/version.js.in \
--replace '@VERSION_TAG_GUI@' '${version}'
# remove this line on the next release
rm cmake/Version.cmake
# use monerod from the monero package
substituteInPlace src/daemon/DaemonManager.cpp \
--replace 'QApplication::applicationDirPath() + "' '"${monero}/bin'
# only build external deps, *not* the full monero
substituteInPlace CMakeLists.txt \
--replace 'add_subdirectory(monero)' \
'add_subdirectory(monero EXCLUDE_FROM_ALL)'
'';
makeFlags = [ "INSTALL_ROOT=$(out)" ];
preBuild = ''
sed -i s#/opt/monero-wallet-gui##g Makefile
make -C src/zxcvbn-c
# use nixpkgs monero sources
rmdir monero
ln -s "${monero.src}" monero
'';
cmakeFlags = [
"-DCMAKE_INSTALL_PREFIX=$out/bin"
"-DARCH=${arch}"
];
desktopItem = makeDesktopItem {
name = "monero-wallet-gui";
@ -69,15 +94,15 @@ stdenv.mkDerivation rec {
postInstall = ''
# install desktop entry
mkdir -p $out/share/applications
cp ${desktopItem}/share/applications/* $out/share/applications
install -Dm644 -t $out/share/applications \
${desktopItem}/share/applications/*
# install icons
for n in 16 24 32 48 64 96 128 256; do
size=$n"x"$n
mkdir -p $out/share/icons/hicolor/$size/apps
cp $src/images/appicons/$size.png \
$out/share/icons/hicolor/$size/apps/monero.png
install -Dm644 \
-t $out/share/icons/hicolor/$size/apps/monero.png \
$src/images/appicons/$size.png
done;
'';

View file

@ -1,40 +1,69 @@
{ stdenv, fetchFromGitHub
{ stdenv, fetchFromGitHub, fetchpatch
, cmake, pkgconfig
, boost, miniupnpc, openssl, unbound
, zeromq, pcsclite, readline, libsodium, hidapi
, protobuf, randomx, rapidjson, libusb-compat-0_1
, randomx, rapidjson
, CoreData, IOKit, PCSC
, trezorSupport ? true
, libusb1 ? null
, protobuf ? null
, python3 ? null
}:
with stdenv.lib;
assert stdenv.isDarwin -> IOKit != null;
assert trezorSupport -> all (x: x!=null) [ libusb1 protobuf python3 ];
stdenv.mkDerivation rec {
pname = "monero";
version = "0.16.0.3";
version = "0.17.0.1";
src = fetchFromGitHub {
owner = "monero-project";
repo = "monero";
rev = "v${version}";
sha256 = "1r9x3712vhb24dxxirfiwj5f9x0h4m7x0ngiiavf5983dfdlgz33";
sha256 = "1v0phvg5ralli4dr09a60nq032xqlci5d6v4zfq8304vgrn1ffgp";
fetchSubmodules = true;
};
patches = [
./use-system-libraries.patch
# This fixes a bug in the monero-gui build system,
# remove it once the PR has been merged
(fetchpatch {
url = "https://github.com/monero-project/monero/pull/6867.patch";
sha256 = "0nxa6861df1fadrm9bmhqf2g6mljgr4jndsbxqp7g501hv9z51j3";
})
];
postPatch = ''
# remove vendored libraries
rm -r external/{miniupnp,randomx,rapidjson,unbound}
# export patched source for monero-gui
cp -r . $source
'';
nativeBuildInputs = [ cmake pkgconfig ];
buildInputs = [
boost miniupnpc openssl unbound
zeromq pcsclite readline
libsodium hidapi randomx rapidjson
protobuf libusb-compat-0_1
] ++ stdenv.lib.optionals stdenv.isDarwin [ IOKit CoreData PCSC ];
protobuf
] ++ optionals stdenv.isDarwin [ IOKit CoreData PCSC ]
++ optionals trezorSupport [ libusb1 protobuf python3 ];
cmakeFlags = [
"-DCMAKE_BUILD_TYPE=Release"
"-DUSE_DEVICE_TREZOR=ON"
"-DBUILD_GUI_DEPS=ON"
"-DReadline_ROOT_DIR=${readline.dev}"
] ++ stdenv.lib.optional stdenv.isDarwin "-DBoost_USE_MULTITHREADED=OFF";
"-DRandomX_ROOT_DIR=${randomx}"
] ++ optional stdenv.isDarwin "-DBoost_USE_MULTITHREADED=OFF";
outputs = [ "out" "source" ];
meta = with stdenv.lib; {
description = "Private, secure, untraceable currency";

View file

@ -0,0 +1,69 @@
diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt
index a8916a7d0..39ec7747b 100644
--- a/external/CMakeLists.txt
+++ b/external/CMakeLists.txt
@@ -37,34 +37,16 @@
find_package(Miniupnpc REQUIRED)
-message(STATUS "Using in-tree miniupnpc")
-add_subdirectory(miniupnp/miniupnpc)
-set_property(TARGET libminiupnpc-static PROPERTY FOLDER "external")
-if(MSVC)
- set_property(TARGET libminiupnpc-static APPEND_STRING PROPERTY COMPILE_FLAGS " -wd4244 -wd4267")
-elseif(NOT MSVC)
- set_property(TARGET libminiupnpc-static APPEND_STRING PROPERTY COMPILE_FLAGS " -Wno-undef -Wno-unused-result -Wno-unused-value")
-endif()
-if(CMAKE_SYSTEM_NAME MATCHES "NetBSD")
- set_property(TARGET libminiupnpc-static APPEND_STRING PROPERTY COMPILE_FLAGS " -D_NETBSD_SOURCE")
-endif()
-
-set(UPNP_LIBRARIES "libminiupnpc-static" PARENT_SCOPE)
+set(UPNP_STATIC false PARENT_SCOPE)
+set(UPNP_INCLUDE ${MINIUPNP_INCLUDE_DIR} PARENT_SCOPE)
+set(UPNP_LIBRARIES ${MINIUPNP_LIBRARY} PARENT_SCOPE)
find_package(Unbound)
if(NOT UNBOUND_INCLUDE_DIR OR STATIC)
- # NOTE: If STATIC is true, CMAKE_FIND_LIBRARY_SUFFIXES has been reordered.
- # unbound has config tests which used OpenSSL libraries, so -ldl may need to
- # be set in this case.
- # The unbound CMakeLists.txt can set it, since it's also needed for the
- # static OpenSSL libraries set up there after with target_link_libraries.
- add_subdirectory(unbound)
-
- set(UNBOUND_STATIC true PARENT_SCOPE)
- set(UNBOUND_INCLUDE "${CMAKE_CURRENT_SOURCE_DIR}/unbound/libunbound" PARENT_SCOPE)
- set(UNBOUND_LIBRARY "unbound" PARENT_SCOPE)
- set(UNBOUND_LIBRARY_DIRS "${LIBEVENT2_LIBDIR}" PARENT_SCOPE)
+ set(UNBOUND_STATIC false PARENT_SCOPE)
+ set(UPNP_INCLUDE ${MINIUPNP_INCLUDE_DIR} PARENT_SCOPE)
+ set(UPNP_LIBRARIES ${MINIUPNP_LIBRARY} PARENT_SCOPE)
else()
message(STATUS "Found libunbound include (unbound.h) in ${UNBOUND_INCLUDE_DIR}")
if(UNBOUND_LIBRARIES)
@@ -81,4 +63,5 @@ endif()
add_subdirectory(db_drivers)
add_subdirectory(easylogging++)
add_subdirectory(qrcodegen)
-add_subdirectory(randomx EXCLUDE_FROM_ALL)
+
+find_library(RANDOMX_LIBRARIES NAMES RandomX)
diff --git a/src/p2p/net_node.inl b/src/p2p/net_node.inl
index 175741146..088b582f7 100644
--- a/src/p2p/net_node.inl
+++ b/src/p2p/net_node.inl
@@ -60,9 +60,9 @@
#include "cryptonote_core/cryptonote_core.h"
#include "net/parse.h"
-#include <miniupnp/miniupnpc/miniupnpc.h>
-#include <miniupnp/miniupnpc/upnpcommands.h>
-#include <miniupnp/miniupnpc/upnperrors.h>
+#include <miniupnpc/miniupnpc.h>
+#include <miniupnpc/upnpcommands.h>
+#include <miniupnpc/upnperrors.h>
#undef MONERO_DEFAULT_LOG_CATEGORY
#define MONERO_DEFAULT_LOG_CATEGORY "net.p2p"

View file

@ -9,9 +9,9 @@ let
inherit buildFHSUserEnv;
};
stableVersion = {
version = "4.0.1.0"; # "Android Studio 4.0.1"
build = "193.6626763";
sha256Hash = "15vm7fvi8c286wx9f28z6ysvm8wqqda759qql0zy9simwx22gy7j";
version = "4.1.0.19"; # "Android Studio 4.1.0"
build = "201.6858069";
sha256Hash = "sha256-S5Uh/EpjE61l/z4UsPP7UEJ9Rk/hQidVVWX0bg/60gI=";
};
betaVersion = {
version = "4.1.0.18"; # "Android Studio 4.1 RC 3"

View file

@ -85,7 +85,7 @@ let
description = "A hackable text editor for the 21st Century";
homepage = "https://atom.io/";
license = licenses.mit;
maintainers = with maintainers; [ offline nequissimus ysndr ];
maintainers = with maintainers; [ offline ysndr ];
platforms = platforms.x86_64;
};
};

View file

@ -22,12 +22,11 @@
}:
mkDerivation rec {
name = "kile-2.9.92";
name = "kile-2.9.93";
src = fetchurl {
url = "mirror://sourceforge/kile/${name}.tar.bz2";
sha256 = "177372dc25b1d109e037a7dbfc64b5dab2efe538320c87f4a8ceada21e9097f2";
sha256 = "BEmSEv/LJPs6aCkUmnyuTGrV15WYXwgIANbfcviMXfA=";
};
nativeBuildInputs = [ extra-cmake-modules wrapGAppsHook ];

View file

@ -20,11 +20,11 @@ let
in stdenv.mkDerivation rec {
pname = "nano";
version = "5.2";
version = "5.3";
src = fetchurl {
url = "mirror://gnu/nano/${pname}-${version}.tar.xz";
sha256 = "1qd7pn9g5dgzbfg4fb3nqxqgi2iqq0g6x33x8d1mx6mfw51xmhij";
sha256 = "0lj3fcfzprmv9raydx8yq25lw81bs6g40rhd0fv9d6idcb7wphf5";
};
nativeBuildInputs = [ texinfo ] ++ optional enableNls gettext;

View file

@ -2,13 +2,13 @@
stdenv.mkDerivation {
pname = "nanorc";
version = "2018-09-05";
version = "2020-01-25";
src = fetchFromGitHub {
owner = "scopatz";
repo = "nanorc";
rev = "1e589cb729d24fba470228d429e6dde07973d597";
sha256 = "136yxr38lzrfv8bar0c6c56rh54q9s94zpwa19f425crh44drppl";
rev = "2020.1.25";
sha256 = "1y8jk3jsl4bd6r4hzmxzcf77hv8bwm0318yv7y2npkkd3a060z8d";
};
dontBuild = true;

View file

@ -46,11 +46,13 @@ in python.pkgs.buildPythonApplication {
propagatedBuildInputs = [ pythonEnv ];
postInstall = ''
wrapQtApp "$out/bin/retext" \
--set ASPELL_CONF "dict-dir ${buildEnv {
makeWrapperArgs+=("''${qtWrapperArgs[@]}")
makeWrapperArgs+=(
"--set" "ASPELL_CONF" "dict-dir ${buildEnv {
name = "aspell-all-dicts";
paths = map (path: "${path}/lib/aspell") enchantAspellDicts;
}}"
)
'';
meta = with stdenv.lib; {

View file

@ -1,7 +1,7 @@
{ stdenv, lib, makeDesktopItem
, unzip, libsecret, libXScrnSaver, wrapGAppsHook
, gtk2, atomEnv, at-spi2-atk, autoPatchelfHook
, systemd, fontconfig
, systemd, fontconfig, libdbusmenu
# Attributes inherit from specific versions
, version, src, meta, sourceRoot
@ -62,7 +62,7 @@ in
else [ gtk2 at-spi2-atk wrapGAppsHook ] ++ atomEnv.packages)
++ [ libsecret libXScrnSaver ];
runtimeDependencies = lib.optional (stdenv.isLinux) [ (lib.getLib systemd) fontconfig.lib ];
runtimeDependencies = lib.optional (stdenv.isLinux) [ (lib.getLib systemd) fontconfig.lib libdbusmenu ];
nativeBuildInputs = lib.optional (!stdenv.isDarwin) autoPatchelfHook;

View file

@ -8,10 +8,6 @@ if [ ! -f "$ROOT/vscode.nix" ]; then
echo "ERROR: cannot find vscode.nix in $ROOT"
exit 1
fi
if [ ! -f "$ROOT/vscodium.nix" ]; then
echo "ERROR: cannot find vscodium.nix in $ROOT"
exit 1
fi
# VSCode
@ -26,16 +22,3 @@ sed -i "s/x86_64-linux = \".\{52\}\"/x86_64-linux = \"${VSCODE_LINUX_SHA256}\"/"
VSCODE_DARWIN_URL="https://vscode-update.azurewebsites.net/${VSCODE_VER}/darwin/stable"
VSCODE_DARWIN_SHA256=$(nix-prefetch-url ${VSCODE_DARWIN_URL})
sed -i "s/x86_64-darwin = \".\{52\}\"/x86_64-darwin = \"${VSCODE_DARWIN_SHA256}\"/" "$ROOT/vscode.nix"
# VSCodium
VSCODIUM_VER=$(curl -Ls -w %{url_effective} -o /dev/null https://github.com/VSCodium/vscodium/releases/latest | awk -F'/' '{print $NF}')
sed -i "s/version = \".*\"/version = \"${VSCODIUM_VER}\"/" "$ROOT/vscodium.nix"
VSCODIUM_LINUX_URL="https://github.com/VSCodium/vscodium/releases/download/${VSCODIUM_VER}/VSCodium-linux-x64-${VSCODIUM_VER}.tar.gz"
VSCODIUM_LINUX_SHA256=$(nix-prefetch-url ${VSCODIUM_LINUX_URL})
sed -i "s/x86_64-linux = \".\{52\}\"/x86_64-linux = \"${VSCODIUM_LINUX_SHA256}\"/" "$ROOT/vscodium.nix"
VSCODIUM_DARWIN_URL="https://github.com/VSCodium/vscodium/releases/download/${VSCODIUM_VER}/VSCodium-darwin-${VSCODIUM_VER}.zip"
VSCODIUM_DARWIN_SHA256=$(nix-prefetch-url ${VSCODIUM_DARWIN_URL})
sed -i "s/x86_64-darwin = \".\{52\}\"/x86_64-darwin = \"${VSCODIUM_DARWIN_SHA256}\"/" "$ROOT/vscodium.nix"

View file

@ -0,0 +1,23 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl gnugrep gnused gawk
set -eou pipefail
ROOT="$(dirname "$(readlink -f "$0")")"
if [ ! -f "$ROOT/vscodium.nix" ]; then
echo "ERROR: cannot find vscodium.nix in $ROOT"
exit 1
fi
# VSCodium
VSCODIUM_VER=$(curl -Ls -w %{url_effective} -o /dev/null https://github.com/VSCodium/vscodium/releases/latest | awk -F'/' '{print $NF}')
sed -i "s/version = \".*\"/version = \"${VSCODIUM_VER}\"/" "$ROOT/vscodium.nix"
VSCODIUM_LINUX_URL="https://github.com/VSCodium/vscodium/releases/download/${VSCODIUM_VER}/VSCodium-linux-x64-${VSCODIUM_VER}.tar.gz"
VSCODIUM_LINUX_SHA256=$(nix-prefetch-url ${VSCODIUM_LINUX_URL})
sed -i "s/x86_64-linux = \".\{52\}\"/x86_64-linux = \"${VSCODIUM_LINUX_SHA256}\"/" "$ROOT/vscodium.nix"
VSCODIUM_DARWIN_URL="https://github.com/VSCodium/vscodium/releases/download/${VSCODIUM_VER}/VSCodium-darwin-${VSCODIUM_VER}.zip"
VSCODIUM_DARWIN_SHA256=$(nix-prefetch-url ${VSCODIUM_DARWIN_URL})
sed -i "s/x86_64-darwin = \".\{52\}\"/x86_64-darwin = \"${VSCODIUM_DARWIN_SHA256}\"/" "$ROOT/vscodium.nix"

View file

@ -11,8 +11,8 @@ let
archive_fmt = if system == "x86_64-darwin" then "zip" else "tar.gz";
sha256 = {
x86_64-linux = "103p0daf13zsqz2481pw6zpr6n0vaf57dq89i4djcm449i9c959i";
x86_64-darwin = "0bxggvi0wzsy801iylszqp8rv6kij6j2v05b6qyf6af7j3cmd1qf";
x86_64-linux = "12nrv037an4f6h8hrbmysc0lk5wm492hywa7lp64n4d308zg5567";
x86_64-darwin = "1z22hn2ngx2x5l9h6zsblpyzr85lyjzv2ayplscbgaa9ff52l429";
}.${system};
in
callPackage ./generic.nix rec {
@ -21,7 +21,7 @@ in
# Please backport all compatible updates to the stable release.
# This is important for the extension ecosystem.
version = "1.49.3";
version = "1.50.0";
pname = "vscode";
executableName = "code" + lib.optionalString isInsiders "-insiders";

View file

@ -1,6 +1,7 @@
{ stdenv
, mkDerivation
, fetchFromGitHub
, substituteAll
, gdal
, cmake
, ninja
@ -18,7 +19,7 @@
mkDerivation rec {
pname = "OpenOrienteering-Mapper";
version = "0.9.3";
version = "0.9.4";
buildInputs = [
gdal
@ -37,18 +38,14 @@ mkDerivation rec {
owner = "OpenOrienteering";
repo = "mapper";
rev = "v${version}";
sha256 = "05bliglpc8170px6k9lfrp9ylpnb2zf47gnjns9b2bif8dv8zq0l";
sha256 = "13k9dirqm74lknhr8w121zr1hjd9gm1y73cj4rrj98rx44dzmk7b";
};
patches = [
patches = (substituteAll {
# See https://github.com/NixOS/nixpkgs/issues/86054
./fix-qttranslations-path.diff
];
postPatch = ''
substituteInPlace src/util/translation_util.cpp \
--subst-var-by qttranslations ${qttranslations}
'';
src = ./fix-qttranslations-path.diff;
inherit qttranslations;
});
cmakeFlags = [
# Building the manual and bundling licenses fails

View file

@ -10,7 +10,7 @@ let
[ qscintilla-qt5 gdal jinja2 numpy psycopg2
chardet dateutil pyyaml pytz requests urllib3 pygments pyqt5 sip owslib six ];
in mkDerivation rec {
version = "3.10.9";
version = "3.10.10";
pname = "qgis";
name = "${pname}-unwrapped-${version}";
@ -18,7 +18,7 @@ in mkDerivation rec {
owner = "qgis";
repo = "QGIS";
rev = "final-${lib.replaceStrings ["."] ["_"] version}";
sha256 = "0d646hvrhhgsw789qc2g3iblmsvr64qh15jck1jkaljzrj3qbml6";
sha256 = "yZBG+bpJA7iKkUEjVo45d+bmRp9WS7mk8z96FLf0ZQ0=";
};
passthru = {

View file

@ -0,0 +1,57 @@
{ mkDerivation
, lib
, fetchFromGitLab
, qmake
, qtbase
, qtcharts
, qtsvg
, marble
, qtwebengine
, ldutils
}:
mkDerivation rec {
pname = "zombietrackergps";
version = "1.01";
src = fetchFromGitLab {
owner = "ldutils-projects";
repo = pname;
rev = "v_${version}";
sha256 = "0h354ydbahy8rpkmzh5ym5bddbl6irjzklpcg6nbkv6apry84d48";
};
buildInputs = [
ldutils
qtbase
qtcharts
qtsvg
marble.dev
qtwebengine
];
nativeBuildInputs = [
qmake
];
prePatch = ''
sed -ie "s,INCLUDEPATH += /usr/include/libldutils,INCLUDEPATH += ${ldutils}," ZombieTrackerGPS.pro
'';
preConfigure = ''
export LANG=en_US.UTF-8
export INSTALL_ROOT=$out
'';
postConfigure = ''
substituteInPlace Makefile --replace '$(INSTALL_ROOT)' ""
'';
meta = with lib; {
description = "GPS track manager for Qt using KDE Marble maps";
homepage = "https://gitlab.com/ldutils-projects/zombietrackergps";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ sohalt ];
platforms = platforms.linux;
};
}

View file

@ -1,13 +1,14 @@
{ stdenv, fetchgit, cmake, itk4, Cocoa }:
{ stdenv, fetchFromGitHub, cmake, itk4, Cocoa }:
stdenv.mkDerivation {
stdenv.mkDerivation rec {
pname = "c3d";
version = "unstable-2019-10-22";
version = "unstable-2020-10-05";
src = fetchgit {
url = "https://github.com/pyushkevich/c3d";
rev = "c04e2b84568654665c64d8843378c8bbd58ba9b0";
sha256 = "0lzldxvshl9q362mg76byc7s5zc9qx7mxf2wgyij5vysx8mihx3q";
src = fetchFromGitHub {
owner = "pyushkevich";
repo = pname;
rev = "0a87e3972ea403babbe2d05ec6d50855e7c06465";
sha256 = "0wsmkifqrcfy13fnwvinmnq1m0lkqmpyg7bgbwnb37mbrlbq06wf";
};
nativeBuildInputs = [ cmake ];
@ -15,11 +16,11 @@ stdenv.mkDerivation {
++ stdenv.lib.optional stdenv.isDarwin Cocoa;
meta = with stdenv.lib; {
homepage = "http://www.itksnap.org/c3d";
homepage = "https://github.com/pyushkevich/c3d";
description = "Medical imaging processing tool";
maintainers = with maintainers; [ bcdarwin ];
platforms = platforms.unix;
license = licenses.gpl2;
license = licenses.gpl3;
broken = stdenv.isAarch64;
# /build/git-3453f61/itkextras/OneDimensionalInPlaceAccumulateFilter.txx:311:10: fatal error: xmmintrin.h: No such file or directory
};

View file

@ -2,6 +2,7 @@
, mkDerivationWith
, python3Packages
, fetchFromGitHub
, wrapQtAppsHook
}:
mkDerivationWith python3Packages.buildPythonApplication rec {
@ -27,8 +28,9 @@ mkDerivationWith python3Packages.buildPythonApplication rec {
requests
];
postFixup = ''
wrapQtApp "$out/bin/cq-editor"
nativeBuildInputs = [ wrapQtAppsHook ];
preFixup = ''
makeWrapperArgs+=("''${qtWrapperArgs[@]}")
'';
checkInputs = with python3Packages; [

View file

@ -0,0 +1,28 @@
{ stdenv, fetchFromGitLab, cmake, vtk_9, libX11, libGL, Cocoa, OpenGL }:
stdenv.mkDerivation rec {
pname = "f3d";
version = "1.0.1";
src = fetchFromGitLab {
domain = "gitlab.kitware.com";
owner = "f3d";
repo = "f3d";
rev = "v${version}";
sha256 = "0a6r0jspkhl735f6zmnhby1g4dlmjqd5izgsp5yfdcdhqj4j63mg";
};
nativeBuildInputs = [ cmake ];
buildInputs = [ vtk_9 ]
++ stdenv.lib.optionals stdenv.isLinux [ libGL libX11 ]
++ stdenv.lib.optionals stdenv.isDarwin [ Cocoa OpenGL ];
meta = with stdenv.lib; {
description = "Fast and minimalist 3D viewer using VTK";
homepage = "https://kitware.github.io/F3D";
license = licenses.bsd3;
maintainers = with maintainers; [ bcdarwin ];
platforms = with platforms; unix;
};
}

View file

@ -52,13 +52,13 @@ let
python = python2.withPackages (pp: [ pp.pygtk ]);
in stdenv.mkDerivation rec {
pname = "gimp";
version = "2.10.20";
version = "2.10.22";
outputs = [ "out" "dev" ];
src = fetchurl {
url = "http://download.gimp.org/pub/gimp/v${lib.versions.majorMinor version}/${pname}-${version}.tar.bz2";
sha256 = "4S+fh0saAHxCd7YKqB4LZzML5+YVPldJ6tg5uQL8ezw=";
sha256 = "1fqqyshakvdarf1jipk2n33ibqr23ni22z3d8srq13bpydblpf1d";
};
patches = [

View file

@ -7,24 +7,24 @@ let
bgrabitmap = fetchFromGitHub {
owner = "bgrabitmap";
repo = "bgrabitmap";
rev = "v11.1";
sha256 = "0bcmiiwly4a7w8p3m5iskzvk8rz87qhc0gcijrdvwg87cafd88gz";
rev = "v11.2.4";
sha256 = "1zk88crfn07md16wg6af4i8nlx4ikkhxq9gfk49jirwimgwbf1md";
};
bgracontrols = fetchFromGitHub {
owner = "bgrabitmap";
repo = "bgracontrols";
rev = "v6.7.2";
sha256 = "0cwxzv0rl6crkf6f67mvga5cn5pyhr6ksm8cqhpxjiqi937dnyxx";
rev = "v6.9";
sha256 = "0hwjlqlwqs4fqxlgay84hccs1lm3c6i9nmq9sxzrip410mggnjyw";
};
in stdenv.mkDerivation rec {
pname = "lazpaint";
version = "7.1.3";
version = "7.1.4";
src = fetchFromGitHub {
owner = "bgrabitmap";
repo = "lazpaint";
rev = "v${version}";
sha256 = "1sfb5hmhzscz3nv4cmc192jimkg70l4z3q3yxkivhw1hwwsv9cbg";
sha256 = "19b0wrjjyvz3g2d2gdsz8ihc1clda5v22yb597an8j9sblp9m0nf";
};
nativeBuildInputs = [ lazarus fpc makeWrapper ];

View file

@ -2,13 +2,13 @@
buildGoModule rec {
pname = "charm";
version = "0.8.2";
version = "0.8.3";
src = fetchFromGitHub {
owner = "charmbracelet";
repo = "charm";
rev = "v${version}";
sha256 = "1hgw3sxh7ary75286051v5xmdcw70ns1fm7m5nkqz04cx113hlwj";
sha256 = "1nbix7fi6g9jadak5zyx7fdz7d6367aly6fnrs0v98zsl1kxyvx3";
};
vendorSha256 = "0lhml6m0j9ksn09j7z4d9pix5aszhndpyqajycwj3apvi3ic90il";

View file

@ -1,4 +1,4 @@
{stdenv, python3Packages, gettext, qt5, fetchFromGitHub}:
{stdenv, python3Packages, fetchpatch, gettext, qt5, fetchFromGitHub}:
python3Packages.buildPythonApplication rec {
pname = "dupeguru";
@ -14,6 +14,15 @@ python3Packages.buildPythonApplication rec {
fetchSubmodules = true;
};
patches = [
# already merged to master, remove next version bump
(fetchpatch {
name = "remove-m-from-so-var.patch";
url = "https://github.com/arsenetar/dupeguru/commit/bd0f53bcbe463c48fe141b73af13542da36d82ba.patch";
sha256 = "07iisz8kcr7v8lb21inzj1avlpfhh9k8wcivbd33w49cr3mmnr26";
})
];
nativeBuildInputs = [
gettext
python3Packages.pyqt5
@ -40,15 +49,15 @@ python3Packages.buildPythonApplication rec {
# Avoid double wrapping Python programs.
dontWrapQtApps = true;
# TODO: A bug in python wrapper
# see https://github.com/NixOS/nixpkgs/pull/75054#discussion_r357656916
preFixup = ''
# TODO: A bug in python wrapper
# see https://github.com/NixOS/nixpkgs/pull/75054#discussion_r357656916
makeWrapperArgs="''${qtWrapperArgs[@]}"
'';
# Executable in $out/bin is a symlink to $out/share/dupeguru/run.py
# so wrapPythonPrograms hook does not handle it automatically.
postFixup = ''
# Executable in $out/bin is a symlink to $out/share/dupeguru/run.py
# so wrapPythonPrograms hook does not handle it automatically.
wrapPythonProgramsIn "$out/share/dupeguru" "$out $pythonPath"
'';

View file

@ -3,13 +3,13 @@
python3Packages.buildPythonApplication rec {
pname = "electron-cash";
version = "4.1.0";
version = "4.1.1";
src = fetchFromGitHub {
owner = "Electron-Cash";
repo = "Electron-Cash";
rev = version;
sha256 = "1ccfm6kkmbkvykfdzrisxvr0lx9kgq4l43ixk6v3xnvhnbfwz4s2";
sha256 = "1fllz2s20lg4hrppzmnlgjy9mrq7gaq66l2apb3vz1avzvsjw3gm";
};
propagatedBuildInputs = with python3Packages; [
@ -36,15 +36,6 @@ 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"
@ -70,9 +61,11 @@ python3Packages.buildPythonApplication rec {
# Electron Cash was unable to find the secp256k1 library on this system.
# Elliptic curve cryptography operations will be performed in slow
# Python-only mode.
postFixup = ''
wrapQtApp $out/bin/electron-cash \
--prefix LD_LIBRARY_PATH : ${secp256k1}/lib
preFixup = ''
makeWrapperArgs+=("''${qtWrapperArgs[@]}")
makeWrapperArgs+=(
"--prefix" "LD_LIBRARY_PATH" ":" "${secp256k1}/lib"
)
'';
doInstallCheck = true;

View file

@ -36,8 +36,8 @@ python3Packages.buildPythonApplication rec {
sed -i '/Created: .*/d' gui/qt/icons_rc.py
'';
postFixup = ''
wrapQtApp $out/bin/electrum-ltc
preFixup = ''
makeWrapperArgs+=("''${qtWrapperArgs[@]}")
'';
checkPhase = ''

View file

@ -2,16 +2,21 @@
python3Packages.buildPythonApplication rec {
pname = "gallery_dl";
version = "1.15.0";
version = "1.15.1";
src = python3Packages.fetchPypi {
inherit pname version;
sha256 = "1g9hmb5637x8bhm2wzarqnxzj0i93fcdm1myvld2d97a2d32hy6m";
sha256 = "1pysh0gz3f3dxk5bfkzaii4myrgik396mf6vlks50inpbnslmqsl";
};
doCheck = false;
propagatedBuildInputs = with python3Packages; [ requests ];
checkInputs = with python3Packages; [ pytestCheckHook ];
pytestFlagsArray = [
# requires network access
"--ignore=test/test_results.py"
];
meta = {
description = "Command-line program to download image-galleries and -collections from several image hosting sites";
homepage = "https://github.com/mikf/gallery-dl";

View file

@ -0,0 +1,80 @@
{ stdenv
, meson
, ninja
, pkg-config
, gettext
, fetchFromGitLab
, python3
, libhandy
, libpwquality
, wrapGAppsHook
, gtk3
, glib
, gdk-pixbuf
, gobject-introspection
, desktop-file-utils
, appstream-glib }:
python3.pkgs.buildPythonApplication rec {
pname = "gnome-passwordsafe";
version = "3.99.2";
format = "other";
strictDeps = false; # https://github.com/NixOS/nixpkgs/issues/56943
src = fetchFromGitLab {
domain = "gitlab.gnome.org";
owner = "World";
repo = "PasswordSafe";
rev = version;
sha256 = "0pi2l4gwf8paxm858mxrcsk5nr0c0zw5ycax40mghndb6b1qmmhf";
};
nativeBuildInputs = [
meson
ninja
gettext
pkg-config
wrapGAppsHook
desktop-file-utils
appstream-glib
gobject-introspection
];
buildInputs = [
gtk3
glib
gdk-pixbuf
libhandy
];
propagatedBuildInputs = with python3.pkgs; [
pygobject3
construct
# pykeepass 3.2.1 changed some exception types, and is not backwards compatible.
# Remove override once the MR is merged upstream.
# https://gitlab.gnome.org/World/PasswordSafe/-/merge_requests/79
(pykeepass.overridePythonAttrs (old: rec {
version = "3.2.0";
src = fetchPypi {
pname = "pykeepass";
inherit version;
sha256 = "1ysjn92bixq8wkwhlbhrjj9z0h80qnlnj7ks5478ndkzdw5gxvm1";
};
propagatedBuildInputs = old.propagatedBuildInputs ++ [ pycryptodome ];
}))
] ++ [
libpwquality # using the python bindings
];
meta = with stdenv.lib; {
broken = stdenv.hostPlatform.isStatic; # libpwquality doesn't provide bindings when static
description = "Password manager for GNOME which makes use of the KeePass v.4 format";
homepage = "https://gitlab.gnome.org/World/PasswordSafe";
license = licenses.gpl3Only;
platforms = platforms.linux;
maintainers = with maintainers; [ mvnetbiz ];
};
}

View file

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, mkDerivation
{ stdenv, fetchFromGitHub, fetchpatch, mkDerivation
, qtbase, qtsvg, qtserialport, qtwebengine, qtmultimedia, qttools
, qtconnectivity, qtcharts, libusb-compat-0_1
, yacc, flex, zlib, qmake, makeDesktopItem, makeWrapper
@ -16,13 +16,13 @@ let
};
in mkDerivation rec {
pname = "golden-cheetah";
version = "3.5-RC2X";
version = "3.5";
src = fetchFromGitHub {
owner = "GoldenCheetah";
repo = "GoldenCheetah";
rev = "V${version}";
sha256 = "1d85700gjbcw2badwz225rjdr954ai89900vp8sal04sk79wbr6g";
sha256 = "1lyd0b2s3s9c2ppj7l4hf3s4gfzscaaam2pbiaby714bi9nr0ka7";
};
buildInputs = [
@ -31,6 +31,15 @@ in mkDerivation rec {
];
nativeBuildInputs = [ flex makeWrapper qmake yacc ];
patches = [
# allow building with bison 3.7
# PR at https://github.com/GoldenCheetah/GoldenCheetah/pull/3590
(fetchpatch {
url = "https://github.com/GoldenCheetah/GoldenCheetah/commit/e1f42f8b3340eb4695ad73be764332e75b7bce90.patch";
sha256 = "1h0y9vfji5jngqcpzxna5nnawxs77i1lrj44w8a72j0ah0sznivb";
})
];
NIX_LDFLAGS = "-lz";
qtWrapperArgs = [ "--set LD_LIBRARY_PATH ${zlib.out}/lib" ];

View file

@ -2,13 +2,13 @@
mkDerivation rec {
pname = "gpxsee";
version = "7.32";
version = "7.33";
src = fetchFromGitHub {
owner = "tumic0";
repo = "GPXSee";
rev = version;
sha256 = "0mcd6zv71laykg1208vkqmaxv1v12mqq47156gb78a5ww8paa0ka";
sha256 = "1k4zl7knlpwxrpqk1axkmy8x12915z15h3q2sjnx3jcnx6qw73ja";
};
patches = (substituteAll {

View file

@ -2,7 +2,7 @@
let
pname = "joplin-desktop";
version = "1.1.4";
version = "1.2.6";
name = "${pname}-${version}";
inherit (stdenv.hostPlatform) system;
@ -16,8 +16,8 @@ let
src = fetchurl {
url = "https://github.com/laurent22/joplin/releases/download/v${version}/Joplin-${version}.${suffix}";
sha256 = {
x86_64-linux = "1jgmjwjl2y3nrywnwidpk6p31sypy3gjghmzzqkrgjpf77ccbssm";
x86_64-darwin = "1v06k4qrk3n1ncgpmnqp4axmn7gvs3mgbvf8n6ldhgjhj3hq9day";
x86_64-linux = "14svzfhszb0pnsajbydsic0rdc64zp6csqjp6k2p2i20jf0c0im6";
x86_64-darwin = "1wdv8idnvn5567xdmsaa3f7skv48i9q6jqd4pgv8pz1zkhiqj0wi";
}.${system} or throwSystem;
};

View file

@ -1,15 +1,15 @@
{ stdenv, fetchurl, fetchsvn, makeWrapper, unzip, jre, libXxf86vm }:
let
pname = "josm";
version = "17013";
version = "17084";
srcs = {
jar = fetchurl {
url = "https://josm.openstreetmap.de/download/josm-snapshot-${version}.jar";
sha256 = "0dgfiqk5bcbs03llkffm6h96zcqa19azbanac883g26f6z6j9b8j";
sha256 = "0avzpzmvv371jpbph9xpq0ia2nikha2aib9v10hr2f9q7vka9zx4";
};
macosx = fetchurl {
url = "https://josm.openstreetmap.de/download/macosx/josm-macosx-${version}.zip";
sha256 = "1mzaxcswmxah0gc9cifgaazwisr5cbanf4bspv1ra8xwzj5mdss6";
sha256 = "1vd2r4sshjpd6ic460cdil75skrm6f6q48lm6n3g1ywkn4mx63p1";
};
pkg = fetchsvn {
url = "https://josm.openstreetmap.de/svn/trunk/native/linux/tested";

View file

@ -1,6 +1,7 @@
{ mkDerivation
, lib
, fetchurl
, fetchpatch
, extra-cmake-modules
, kcmutils
, kconfigwidgets
@ -13,25 +14,55 @@
, libfakekey
, libXtst
, qtx11extras
, qtmultimedia
, qtgraphicaleffects
, sshfs
, makeWrapper
, kwayland
, kio
, kpeoplevcard
, kpeople
, kirigami2
, pulseaudio-qt
}:
mkDerivation rec {
pname = "kdeconnect";
version = "1.3.5";
version = "20.08.1";
src = fetchurl {
url = "mirror://kde/stable/${pname}/${version}/${pname}-kde-${version}.tar.xz";
sha256 = "02lr3xx5s2mgddac4n3lkgr7ppf1z5m6ajs90rjix0vs8a271kp5";
url = "https://download.kde.org/stable/release-service/${version}/src/${pname}-kde-${version}.tar.xz";
sha256 = "0s76djgpx08jfmh99c7kx18mnr3w7bv4hdra120nicq89mmy7gwf";
};
patches = [
# https://invent.kde.org/network/kdeconnect-kde/-/merge_requests/328
(fetchpatch {
url = "https://invent.kde.org/network/kdeconnect-kde/-/commit/6101ef3ad07d865958d58a3d2736f5536f1c5719.diff";
sha256 = "17mr7k13226vzcgxlmfs6q2mdc5j7vwp4iri9apmh6xlf6r591ac";
})
];
buildInputs = [
libfakekey libXtst
ki18n kiconthemes kcmutils kconfigwidgets kdbusaddons knotifications
qca-qt5 qtx11extras makeWrapper kwayland kio
libfakekey
libXtst
qtmultimedia
qtgraphicaleffects
pulseaudio-qt
kpeoplevcard
kpeople
kirigami2
ki18n
kiconthemes
kcmutils
kconfigwidgets
kdbusaddons
knotifications
qca-qt5
qtx11extras
makeWrapper
kwayland
kio
];
nativeBuildInputs = [ extra-cmake-modules kdoctools ];

View file

@ -0,0 +1,52 @@
{ stdenv
, fetchurl
, makeWrapper
, dpkg
, luajit
, gtk3-x11
, SDL2
, glib
, noto-fonts
, nerdfonts }:
let font-droid = nerdfonts.override { fonts = [ "DroidSansMono" ]; };
in stdenv.mkDerivation rec {
pname = "koreader";
version = "2020.09";
src = fetchurl {
url =
"https://github.com/koreader/koreader/releases/download/v${version}/koreader-${version}-amd64.deb";
sha256 = "12kiw3mw8g8d9fb8ywd4clm2bgblhq2gqcxzadwpmf0wxq7p0v8z";
};
sourceRoot = ".";
nativeBuildInputs = [ makeWrapper dpkg ];
buildInputs = [ luajit gtk3-x11 SDL2 glib ];
unpackCmd = "dpkg-deb -x ${src} .";
dontConfigure = true;
dontBuild = true;
installPhase = ''
mkdir -p $out
cp -R usr/* $out/
cp ${luajit}/bin/luajit $out/lib/koreader/luajit
find $out -xtype l -delete
for i in ${noto-fonts}/share/fonts/truetype/noto/*; do
ln -s "$i" $out/lib/koreader/fonts/noto/
done
ln -s "${font-droid}/share/fonts/opentype/NerdFonts/Droid Sans Mono Nerd Font Complete Mono.otf" $out/lib/koreader/fonts/droid/DroidSansMono.ttf
wrapProgram $out/bin/koreader --prefix LD_LIBRARY_PATH : ${
stdenv.lib.makeLibraryPath [ gtk3-x11 SDL2 glib ]
}
'';
meta = with stdenv.lib; {
homepage = "https://github.com/koreader/koreader";
description =
"An ebook reader application supporting PDF, DjVu, EPUB, FB2 and many more formats, running on Cervantes, Kindle, Kobo, PocketBook and Android devices";
platforms = intersectLists platforms.x86_64 platforms.linux;
license = licenses.agpl3;
maintainers = [ maintainers.contrun ];
};
}

View file

@ -1,6 +1,14 @@
--- a/build.xml 2019-08-26 23:22:55.104829846 +0300
+++ b/build.xml 2019-08-27 00:11:07.366257594 +0300
@@ -227,7 +227,7 @@
--- a/build.xml (revision 4555)
+++ a/build.xml (working copy)
@@ -222,13 +222,13 @@
<property name="svn.version.build" value="none"/>
<propertyfile file="${build.classes}/mkgmap-version.properties">
- <entry key="svn.version" value="${svn.version.build}" />
- <entry key="build.timestamp" value="${build.timestamp}" />
+ <entry key="svn.version" value="@version@" />
+ <entry key="build.timestamp" value="unknown" />
</propertyfile>
</target>
<!-- Compile the product itself (no tests). -->
@ -9,3 +17,30 @@
description="main compilation">
<javac srcdir="${src}" destdir="${build.classes}" encoding="utf-8" debug="true" includeantruntime="false">
@@ -263,7 +263,7 @@
</target>
<!-- Compile the test classes -->
- <target name="build-test" depends="build, resolve-test">
+ <target name="build-test" depends="build">
<mkdir dir="${build.test}" />
<javac srcdir="${test}" destdir="${build.test}" encoding="utf-8" debug="true" includeantruntime="false">
<include name="**/*.java" />
@@ -271,7 +271,7 @@
</javac>
</target>
- <target name="test" depends="build-test, obtain-test-input-files" description="Run the junit tests">
+ <target name="test" depends="build-test" description="Run the junit tests">
<mkdir dir="tmp/report"/>
<junit printsummary="yes" failureproperty="junit.failure" forkmode="once">
@@ -351,7 +351,7 @@
ignoreerrors="true"/>
</target>
- <target name="dist" depends="build, check-version, version-file"
+ <target name="dist" depends="build, version-file"
description="Make the distribution area">
<mkdir dir="${dist}"/>

View file

@ -1,56 +1,84 @@
{ stdenv, fetchurl, fetchsvn, jdk, jre, ant, makeWrapper }:
{ stdenv
, fetchurl
, fetchsvn
, jdk
, jre
, ant
, makeWrapper
, doCheck ? true
, withExamples ? false
}:
let
fastutil = fetchurl {
url = "http://ivy.mkgmap.org.uk/repo/it.unimi.dsi/fastutil/6.5.15-mkg.1b/jars/fastutil.jar";
sha256 = "0d88m0rpi69wgxhnj5zh924q4zsvxq8m4ybk7m9mr3gz1hx0yx8c";
};
osmpbf = fetchurl {
url = "http://ivy.mkgmap.org.uk/repo/crosby/osmpbf/1.3.3/jars/osmpbf.jar";
sha256 = "0zb4pqkwly5z30ww66qhhasdhdrzwmrw00347yrbgyk2ii4wjad3";
};
protobuf = fetchurl {
url = "https://repo1.maven.org/maven2/com/google/protobuf/protobuf-java/2.5.0/protobuf-java-2.5.0.jar";
sha256 = "0x6c4pbsizvk3lm6nxcgi1g2iqgrxcna1ip74lbn01f0fm2wdhg0";
};
in
version = "4565";
sha256 = "0cfh0msky5812l28mavy6p3k2zgyxb698xk79mvla9l45zcicnvw";
stdenv.mkDerivation rec {
deps = import ./deps.nix { inherit fetchurl; };
testInputs = import ./testinputs.nix { inherit fetchurl; };
in
stdenv.mkDerivation {
pname = "mkgmap";
version = "4432";
inherit version;
src = fetchsvn {
inherit sha256;
url = "https://svn.mkgmap.org.uk/mkgmap/mkgmap/trunk";
rev = version;
sha256 = "1z1ppf9v1b9clnx20v15xkmdrfw6q4h7i15drzxsdh2wl6bafzvx";
};
# This patch removes from the build process
# the automatic download of dependencies (see configurePhase)
patches = [ ./build.xml.patch ];
patches = [
# Disable automatic download of dependencies
./build.xml.patch
# Fix testJavaRules test
./fix-failing-test.patch
];
postPatch = with deps; ''
substituteInPlace build.xml \
--subst-var-by version ${version}
mkdir -p lib/compile
cp ${fastutil} lib/compile/${fastutil.name}
cp ${osmpbf} lib/compile/${osmpbf.name}
cp ${protobuf} lib/compile/${protobuf.name}
'' + stdenv.lib.optionalString doCheck ''
mkdir -p lib/test
cp ${fastutil} lib/test/${fastutil.name}
cp ${osmpbf} lib/test/${osmpbf.name}
cp ${protobuf} lib/test/${protobuf.name}
cp ${jaxb-api} lib/test/${jaxb-api.name}
cp ${junit} lib/test/${junit.name}
cp ${hamcrest-core} lib/test/${hamcrest-core.name}
mkdir -p test/resources/in/img
${stdenv.lib.concatMapStringsSep "\n" (res: ''
cp ${res} test/resources/in/${builtins.replaceStrings [ "__" ] [ "/" ] res.name}
'') testInputs}
'';
nativeBuildInputs = [ jdk ant makeWrapper ];
configurePhase = ''
mkdir -p lib/compile
cp ${fastutil} ${osmpbf} ${protobuf} lib/compile/
'';
buildPhase = "ant";
inherit doCheck;
checkPhase = "ant test";
installPhase = ''
cd dist
install -Dm644 mkgmap.jar $out/share/java/mkgmap/mkgmap.jar
install -Dm644 doc/mkgmap.1 $out/share/man/man1/mkgmap.1
cp -r lib/ $out/share/java/mkgmap/
install -Dm644 dist/mkgmap.jar $out/share/java/mkgmap/mkgmap.jar
install -Dm644 dist/doc/mkgmap.1 $out/share/man/man1/mkgmap.1
cp -r dist/lib/ $out/share/java/mkgmap/
makeWrapper ${jre}/bin/java $out/bin/mkgmap \
--add-flags "-jar $out/share/java/mkgmap/mkgmap.jar"
'' + stdenv.lib.optionalString withExamples ''
mkdir -p $out/share/mkgmap
cp -r dist/examples $out/share/mkgmap/
'';
meta = with stdenv.lib; {
description = "Create maps for Garmin GPS devices from OpenStreetMap (OSM) data";
homepage = "http://www.mkgmap.org.uk";
license = licenses.gpl2;
license = licenses.gpl2Only;
maintainers = with maintainers; [ sikmir ];
platforms = platforms.all;
};

31
pkgs/applications/misc/mkgmap/deps.nix generated Normal file
View file

@ -0,0 +1,31 @@
{ fetchurl }:
{
fastutil = fetchurl {
url = "http://ivy.mkgmap.org.uk/repo/it.unimi.dsi/fastutil/6.5.15-mkg.1b/jars/fastutil.jar";
sha256 = "0d88m0rpi69wgxhnj5zh924q4zsvxq8m4ybk7m9mr3gz1hx0yx8c";
};
osmpbf = fetchurl {
url = "http://ivy.mkgmap.org.uk/repo/crosby/osmpbf/1.3.3/jars/osmpbf.jar";
sha256 = "0zb4pqkwly5z30ww66qhhasdhdrzwmrw00347yrbgyk2ii4wjad3";
};
protobuf = fetchurl {
url = "https://repo1.maven.org/maven2/com/google/protobuf/protobuf-java/2.5.0/protobuf-java-2.5.0.jar";
sha256 = "0x6c4pbsizvk3lm6nxcgi1g2iqgrxcna1ip74lbn01f0fm2wdhg0";
};
xpp3 = fetchurl {
url = "https://repo1.maven.org/maven2/xpp3/xpp3/1.1.4c/xpp3-1.1.4c.jar";
sha256 = "1f9ifnxxj295xb1494jycbfm76476xm5l52p7608gf0v91d3jh83";
};
jaxb-api = fetchurl {
url = "https://repo1.maven.org/maven2/javax/xml/bind/jaxb-api/2.3.0/jaxb-api-2.3.0.jar";
sha256 = "00rxpc0m30d3jc572ni01ryxq8gcbnr955xsabrijg9pknc0fc48";
};
junit = fetchurl {
url = "https://repo1.maven.org/maven2/junit/junit/4.11/junit-4.11.jar";
sha256 = "1zh6klzv8w30dx7jg6pkhllk4587av4znflzhxz8x97c7rhf3a4h";
};
hamcrest-core = fetchurl {
url = "https://repo1.maven.org/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar";
sha256 = "1sfqqi8p5957hs9yik44an3lwpv8ln2a6sh9gbgli4vkx68yzzb6";
};
}

View file

@ -0,0 +1,22 @@
--- a/test/uk/me/parabola/imgfmt/app/srt/SrtCollatorTest.java (revision 4555)
+++ a/test/uk/me/parabola/imgfmt/app/srt/SrtCollatorTest.java (working copy)
@@ -125,7 +125,7 @@
assertEquals("prim: different letter", -1, collator.compare("aaac", "aaad"));
assertEquals("prim: different letter", 1, collator.compare("aaae", "aaad"));
assertEquals(0, collator.compare("aaaa", "aaaa"));
- assertEquals(0, collator.compare("aáÄâ", "aaaa"));
+ //assertEquals(0, collator.compare("aáÄâ", "aaaa"));
collator.setStrength(Collator.SECONDARY);
assertEquals(0, collator.compare("AabBb", "aabbb"));
@@ -132,8 +132,8 @@
assertEquals(0, collator.compare("aabBb", "aabBb"));
assertEquals(0, collator.compare("aabbB", "aabBb"));
assertEquals(1, collator.compare("aáÄâ", "aaaa"));
- assertEquals("prim len diff", -1, collator.compare("aáÄâ", "aaaaa"));
- assertEquals(-1, collator.compare("aáÄâa", "aaaab"));
+ //assertEquals("prim len diff", -1, collator.compare("aáÄâ", "aaaaa"));
+ //assertEquals(-1, collator.compare("aáÄâa", "aaaab"));
collator.setStrength(Collator.TERTIARY);
assertEquals("prim: different case", 1, collator.compare("AabBb", "aabbb"));

View file

@ -0,0 +1,54 @@
--- a/build.xml (revision 597)
+++ a/build.xml (working copy)
@@ -207,12 +207,12 @@
<property name="svn.version.build" value="unknown"/>
<propertyfile file="${build.classes}/splitter-version.properties">
- <entry key="svn.version" value="${svn.version.build}" />
- <entry key="build.timestamp" value="${build.timestamp}" />
+ <entry key="svn.version" value="@version@" />
+ <entry key="build.timestamp" value="unknown" />
</propertyfile>
</target>
- <target name="compile" depends="prepare, resolve-compile" description="main compilation">
+ <target name="compile" depends="prepare" description="main compilation">
<javac srcdir="${src}" destdir="${build.classes}" debug="yes" includeantruntime="false">
<include name="**/*.java"/>
<classpath refid="classpath"/>
@@ -219,7 +219,7 @@
</javac>
</target>
- <target name="compile.tests" depends="prepare, resolve-test" description="test compilation">
+ <target name="compile.tests" depends="prepare" description="test compilation">
<javac srcdir="${test}" destdir="${build.test-classes}" debug="yes" includeantruntime="false">
<include name="**/*.java"/>
<classpath refid="test.classpath"/>
@@ -261,7 +261,7 @@
<fail if="junit.failure" message="Test failed. See test-reports/index.html"/>
</target>
- <target name="dist" depends="build, check-version, version-file" description="Make the distribution area">
+ <target name="dist" depends="build, version-file" description="Make the distribution area">
<mkdir dir="${dist}"/>
<mkdir dir="${dist}/doc/api"/>
@@ -324,7 +324,7 @@
</target>
<!-- Main -->
- <target name="build" depends="compile,compile.tests,run.tests">
+ <target name="build" depends="compile">
<copy todir="${build.classes}">
<fileset dir="${resources}">
<include name="*.properties"/>
@@ -349,7 +349,7 @@
ignoreerrors="true"/>
</target>
- <target name="run.func-tests" depends="compile,compile.tests,obtain-test-input-files" description="Run the functional tests">
+ <target name="run.func-tests" depends="compile,compile.tests" description="Run the functional tests">
<mkdir dir="tmp/report"/>
<junit printsummary="yes" failureproperty="junit.failure" forkmode="once">

View file

@ -0,0 +1,78 @@
{ stdenv
, fetchurl
, fetchsvn
, jdk
, jre
, ant
, makeWrapper
, doCheck ? true
}:
let
version = "597";
sha256 = "1al3160amw0gdarrc707dsppm0kcai9mpkfak7ffspwzw9alsndx";
deps = import ../deps.nix { inherit fetchurl; };
testInputs = import ./testinputs.nix { inherit fetchurl; };
in
stdenv.mkDerivation {
pname = "splitter";
inherit version;
src = fetchsvn {
inherit sha256;
url = "https://svn.mkgmap.org.uk/mkgmap/splitter/trunk";
rev = version;
};
patches = [
# Disable automatic download of dependencies
./build.xml.patch
# Fix func.SolverAndProblemGeneratorTest test
./fix-failing-test.patch
];
postPatch = with deps; ''
substituteInPlace build.xml \
--subst-var-by version ${version}
mkdir -p lib/compile
cp ${fastutil} lib/compile/${fastutil.name}
cp ${osmpbf} lib/compile/${osmpbf.name}
cp ${protobuf} lib/compile/${protobuf.name}
cp ${xpp3} lib/compile/${xpp3.name}
'' + stdenv.lib.optionalString doCheck ''
mkdir -p lib/test
cp ${junit} lib/test/${junit.name}
cp ${hamcrest-core} lib/test/${hamcrest-core.name}
mkdir -p test/resources/in/osm
${stdenv.lib.concatMapStringsSep "\n" (res: ''
cp ${res} test/resources/in/${builtins.replaceStrings [ "__" ] [ "/" ] res.name}
'') testInputs}
'';
nativeBuildInputs = [ jdk ant makeWrapper ];
buildPhase = "ant";
inherit doCheck;
checkPhase = "ant run.tests && ant run.func-tests";
installPhase = ''
install -Dm644 dist/splitter.jar $out/share/java/splitter/splitter.jar
install -Dm644 doc/splitter.1 $out/share/man/man1/splitter.1
cp -r dist/lib/ $out/share/java/splitter/
makeWrapper ${jre}/bin/java $out/bin/splitter \
--add-flags "-jar $out/share/java/splitter/splitter.jar"
'';
meta = with stdenv.lib; {
description = "Utility for splitting OpenStreetMap maps into tiles";
homepage = "http://www.mkgmap.org.uk";
license = licenses.gpl2Only;
maintainers = with maintainers; [ sikmir ];
platforms = platforms.all;
};
}

View file

@ -0,0 +1,11 @@
--- a/test/func/SolverAndProblemGeneratorTest.java (revision 597)
+++ a/test/func/SolverAndProblemGeneratorTest.java (working copy)
@@ -89,7 +89,7 @@
for (String l : lines) {
realSize += l.length();
}
- assertEquals(f + " has wrong size", expectedSize, realSize);
+ //assertEquals(f + " has wrong size", expectedSize, realSize);
}
}

View file

@ -0,0 +1,18 @@
{ fetchurl }:
let
fetchTestInput = { res, sha256 }: fetchurl {
inherit sha256;
url = "http://www.mkgmap.org.uk/testinput/${res}";
name = builtins.replaceStrings [ "/" ] [ "__" ] res;
};
in
[
(fetchTestInput {
res = "osm/alaska-2016-12-27.osm.pbf";
sha256 = "0hmb5v71a1bxgvrg1cbfj5l27b3vvdazs4pyggpmhcdhbwpw7ppm";
})
(fetchTestInput {
res = "osm/hamburg-2016-12-26.osm.pbf";
sha256 = "08bny4aavwm3z2114q99fv3fi2w905zxi0fl7bqgjyhgk0fxjssf";
})
]

View file

@ -0,0 +1,66 @@
{ fetchurl }:
let
fetchTestInput = { res, sha256 }: fetchurl {
inherit sha256;
url = "http://www.mkgmap.org.uk/testinput/${res}";
name = builtins.replaceStrings [ "/" ] [ "__" ] res;
};
in
[
(fetchTestInput {
res = "osm/lon1.osm.gz";
sha256 = "1r8sl67hayjgybxy9crqwp7f1w0ljxvxh0apqcvr888yhsbb8drv";
})
(fetchTestInput {
res = "osm/uk-test-1.osm.gz";
sha256 = "0jdngkjn22jvi8q7hrzpqb9mnjlz82h1dwdmc4qrb64kkhzm4dfk";
})
(fetchTestInput {
res = "osm/uk-test-2.osm.gz";
sha256 = "05mw0qcdgki151ldmxayry0gqlb72jm5wrvxq3dkwq5i7jb21qs4";
})
(fetchTestInput {
res = "osm/is-in-samples.osm";
sha256 = "18vqfbq25ys59bj6dl6dq3q4m2ri3ki2xazim14fm94k1pbyhbh3";
})
(fetchTestInput {
res = "mp/test1.mp";
sha256 = "1dykr0z84c3fqgm9kdp2dzvxc3galjbx0dn9zxjw8cfk7mvnspj2";
})
(fetchTestInput {
res = "img/63240001.img";
sha256 = "1wmqgy940q1svazw85z8di20xyjm3vpaiaj9hizr47b549klw74q";
})
(fetchTestInput {
res = "img/63240002.img";
sha256 = "12ivywkiw6lrglyk0clnx5ff2wqj4z0c3f5yqjsqlsaawbmxqa1f";
})
(fetchTestInput {
res = "img/63240003.img";
sha256 = "19mgxqv6kqk8ahs8s819sj7cc79id67373ckwfsq7vvqyfrbasz1";
})
(fetchTestInput {
res = "hgt/N00W090.hgt.zip";
sha256 = "16hb06bgf47sz2mfbbx3xqmrh1nmm04wj4ngm512sng4rjhksxgn";
})
(fetchTestInput {
res = "hgt/N00W091.hgt.zip";
sha256 = "153j4wj7170qj81nr7sr6dp9zar62gnrkh6ww62bygpfqqyzdr1x";
})
(fetchTestInput {
res = "hgt/S01W090.hgt.zip";
sha256 = "0czgs9rhp7bnzmzm7907vprj3nhm2lj6q1piafk8dm9rcqkfg8sj";
})
(fetchTestInput {
res = "hgt/S01W091.hgt.zip";
sha256 = "0z58q3ai499mflxfjqhqv9i1di3fmp05pkv39886k1na107g3wbn";
})
(fetchTestInput {
res = "hgt/S02W090.hgt.zip";
sha256 = "0q7817gdxk2vq73ci6ffks288zqywc21f5ns73b6p5ds2lrxhf5n";
})
(fetchTestInput {
res = "hgt/S02W091.hgt.zip";
sha256 = "1mwpgd85v9n99gmx2bn8md7d312wvhq86w3c9k92y8ayrs20lmdr";
})
]

View file

@ -255,13 +255,13 @@ in {
displaylayerprogress = buildPlugin rec {
pname = "OctoPrint-DisplayLayerProgress";
version = "1.23.2";
version = "1.24.0";
src = fetchFromGitHub {
owner = "OllisGit";
repo = pname;
rev = version;
sha256 = "0yv8gy5dq0rl7zxkvqa98az391aiixl8wbzkyvbmpjar9r6whdzm";
sha256 = "1lbivg3rcjzv8zqvp8n8gcaczxdm7gvd5ihjb6jq0fgf958lv59n";
};
meta = with stdenv.lib; {
@ -272,15 +272,34 @@ in {
};
};
octoklipper = buildPlugin rec {
pname = "OctoKlipper";
version = "0.3.2";
src = fetchFromGitHub {
owner = "AliceGrey";
repo = "OctoprintKlipperPlugin";
rev = version;
sha256 = "15yg2blbgqp2gdpsqqm8qiiznq5qaq8wss07jimkl0865vrvlz7l";
};
meta = with stdenv.lib; {
description = "A plugin for a better integration of Klipper into OctoPrint";
homepage = "https://github.com/AliceGrey/OctoprintKlipperPlugin";
license = licenses.agpl3;
maintainers = with maintainers; [ lovesegfault ];
};
};
octoprint-dashboard = buildPlugin rec {
pname = "OctoPrint-Dashboard";
version = "1.13.0";
version = "1.15.1";
src = fetchFromGitHub {
owner = "StefanCohen";
repo = pname;
rev = version;
sha256 = "1879l05gkkryvhxkmhr3xvd10d4m7i0cr3jk1gdcv47xwyr6q9pf";
sha256 = "1psk069g8xdpgbzmna51dh978vrildh33dn7kbbi5y31ry5c3gx6";
};
meta = with stdenv.lib; {

View file

@ -0,0 +1,41 @@
{ stdenv, fetchFromGitHub, prevo-tools }:
stdenv.mkDerivation rec {
pname = "prevo-data";
version = "2020-03-08";
src = fetchFromGitHub {
owner = "bpeel";
repo = "revo";
rev = "1e8d7197c0bc831e2127909e77e64dfc26906bdd";
sha256 = "1ldhzpi3d5cbssv8r7acsn7qwxcl8qpqi8ywpsp7cbgx3w7hhkyz";
};
nativeBuildInputs = [ prevo-tools ];
dontUnpack = true;
buildPhase = ''
prevodb -s -i $src -o prevo.db
'';
installPhase = ''
mkdir -p $out/share/prevo
cp prevo.db $out/share/prevo/
'';
meta = with stdenv.lib; {
description =
"data for offline version of the Esperanto dictionary Reta Vortaro";
longDescription = ''
PReVo is the "portable" ReVo, i.e., the offline version
of the Esperanto dictionary Reta Vortaro.
This package provides the ReVo database for the prevo command line application.
'';
homepage = "https://github.com/bpeel/revo";
license = licenses.gpl2Only;
maintainers = [ maintainers.das-g ];
platforms = platforms.linux;
};
}

View file

@ -0,0 +1,27 @@
{ stdenv, symlinkJoin, prevo-tools, prevo-data, makeWrapper }:
symlinkJoin rec {
name = "prevo-${version}";
inherit (prevo-tools) version;
paths = [ prevo-tools ];
nativeBuildInputs = [ makeWrapper ];
postBuild = ''
wrapProgram $out/bin/prevo \
--prefix XDG_DATA_DIRS : "${prevo-data}/share"
'';
meta = with stdenv.lib; {
description = "offline version of the Esperanto dictionary Reta Vortaro";
longDescription = ''
PReVo is the "portable" ReVo, i.e., the offline version
of the Esperanto dictionary Reta Vortaro.
'';
homepage = "https://github.com/bpeel/prevodb";
license = licenses.gpl2Only;
maintainers = [ maintainers.das-g ];
platforms = platforms.linux;
};
}

View file

@ -0,0 +1,38 @@
{ stdenv, fetchFromGitHub, autoreconfHook, pkg-config, glib, expat
, installShellFiles }:
stdenv.mkDerivation rec {
pname = "prevo-tools";
version = "0.2";
src = fetchFromGitHub {
owner = "bpeel";
repo = "prevodb";
rev = version;
sha256 = "1fyrc4g9qdq04nxs4g8x0krxfani5xady6v9m0qfqpbh4xk2ry2d";
};
nativeBuildInputs = [ autoreconfHook pkg-config installShellFiles ];
buildInputs = [ glib expat ];
postInstall = ''
installShellCompletion --bash $out/etc/bash_completion.d/prevo-completion
'';
meta = with stdenv.lib; {
description =
"CLI tools for the offline version of the Esperanto dictionary Reta Vortaro";
longDescription = ''
PReVo is the "portable" ReVo, i.e., the offline version
of the Esperanto dictionary Reta Vortaro.
This package provides the command line application prevo to query a local
ReVo database, as well as the command line tool revodb to create such a
database for this application or for the Android app of the same name.
'';
homepage = "https://github.com/bpeel/prevodb";
license = licenses.gpl2Only;
maintainers = [ maintainers.das-g ];
platforms = platforms.linux;
};
}

View file

@ -0,0 +1,26 @@
{ stdenv
, fetchurl
, unzip
}:
stdenv.mkDerivation rec {
name = "smos-${version}";
version = "0.1.0";
src = fetchurl {
url = "https://github.com/NorfairKing/smos/releases/download/v${version}/smos-release.zip";
sha256 = "sha256:07yavk7xl92yjwwjdig90yq421n8ldv4fjfw7izd4hfpzw849a12";
};
phases = [ "unpackPhase" ];
unpackCmd = "${unzip}/bin/unzip -d $out $curSrc";
sourceRoot = ".";
meta = with stdenv.lib; {
description = "A comprehensive self-management system";
homepage = https://smos.online;
license = licenses.mit;
maintainers = with maintainers; [ norfair ];
platforms = platforms.linux ++ platforms.darwin;
};
}

View file

@ -15,7 +15,11 @@ stdenv.mkDerivation rec {
inherit patches;
configFile = optionalString (conf!=null) (writeText "config.def.h" conf);
postPatch = optionalString (conf!=null) "cp ${configFile} config.def.h";
postPatch = optionalString (conf!=null) "cp ${configFile} config.def.h"
+ optionalString stdenv.isDarwin ''
substituteInPlace config.mk --replace "-lrt" ""
'';
nativeBuildInputs = [ pkgconfig ncurses ];
buildInputs = [ libX11 libXft ] ++ extraLibs;
@ -28,7 +32,7 @@ stdenv.mkDerivation rec {
homepage = "https://st.suckless.org/";
description = "Simple Terminal for X from Suckless.org Community";
license = licenses.mit;
maintainers = with maintainers; [andsild];
platforms = platforms.linux;
maintainers = with maintainers; [ andsild ];
platforms = platforms.linux ++ platforms.darwin;
};
}

View file

@ -1,23 +1,33 @@
{ stdenv, lib, fetchurl, makeWrapper, wrapGAppsHook, electron_7
{ stdenv
, lib
, fetchurl
, makeWrapper
, electron_9
, common-updater-scripts
, writeShellScript
, jq
, makeDesktopItem
}:
let
electron = electron_7;
electron = electron_9;
in
stdenv.mkDerivation rec {
pname = "stretchly";
version = "0.21.1";
version = "1.2.0";
src = fetchurl {
url = "https://github.com/hovancik/stretchly/releases/download/v${version}/stretchly-${version}.tar.xz";
sha256 = "0776pywyqylwd33m85l4wdr89x0q9xkrjgliag10fp1bswz844lf";
sha256 = "07v9yk9qgya9ladfgbfkwwnbzvczs1cv6yn3zrg9rviyv8zlqjls";
};
nativeBuildInputs = [
wrapGAppsHook
];
icon = fetchurl {
url = "https://raw.githubusercontent.com/hovancik/stretchly/v${version}/stretchly_128x128.png";
sha256 = "0whfg1fy2hjyk1lzpryikc1aj8agsjhfrb0bf7ggl6r9m8s1rvdl";
};
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
runHook preInstall
@ -25,15 +35,15 @@ stdenv.mkDerivation rec {
mkdir -p $out/bin $out/share/${pname}/
mv resources/app.asar $out/share/${pname}/
mkdir -p $out/share/applications
ln -s ${desktopItem}/share/applications/* $out/share/applications/
makeWrapper ${electron}/bin/electron $out/bin/${pname} \
--add-flags $out/share/${pname}/app.asar \
"''${gappsWrapperArgs[@]}" \
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ stdenv.cc.cc.lib ]}"
--add-flags $out/share/${pname}/app.asar
runHook postInstall
'';
passthru = {
updateScript = writeShellScript "update-stretchly" ''
set -eu -o pipefail
@ -47,6 +57,15 @@ stdenv.mkDerivation rec {
'';
};
desktopItem = makeDesktopItem {
name = pname;
exec = pname;
icon = icon;
desktopName = "Stretchly";
genericName = "Stretchly";
categories = "Utility;";
};
meta = with stdenv.lib; {
description = "A break time reminder app";
longDescription = ''
@ -59,7 +78,7 @@ stdenv.mkDerivation rec {
homepage = "https://hovancik.net/stretchly";
downloadPage = "https://hovancik.net/stretchly/downloads/";
license = licenses.bsd2;
maintainers = with maintainers; [ cdepillabout ];
maintainers = with maintainers; [ _1000101 ];
platforms = platforms.linux;
};
}

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