Merge branch master into haskell-updates
This commit is contained in:
commit
b4d48b0f9e
343 changed files with 5243 additions and 1932 deletions
|
@ -1,3 +1,3 @@
|
|||
document.addEventListener('DOMContentLoaded', function(event) {
|
||||
anchors.add('h1:not(div.note h1, div.warning h1, div.tip h1, div.caution h1, div.important h1), h2:not(div.note h2, div.warning h2, div.tip h2, div.caution h2, div.important h2), h3:not(div.note h3, div.warning h3, div.tip h3, div.caution h3, div.important h3), h4:not(div.note h4, div.warning h4, div.tip h4, div.caution h4, div.important h4), h5:not(div.note h5, div.warning h5, div.tip h5, div.caution h5, div.important h5), h6:not(div.note h6, div.warning h6, div.tip h6, div.caution h6, div.important h6)');
|
||||
anchors.add('h1[id]:not(div.note h1, div.warning h1, div.tip h1, div.caution h1, div.important h1), h2[id]:not(div.note h2, div.warning h2, div.tip h2, div.caution h2, div.important h2), h3[id]:not(div.note h3, div.warning h3, div.tip h3, div.caution h3, div.important h3), h4[id]:not(div.note h4, div.warning h4, div.tip h4, div.caution h4, div.important h4), h5[id]:not(div.note h5, div.warning h5, div.tip h5, div.caution h5, div.important h5), h6[id]:not(div.note h6, div.warning h6, div.tip h6, div.caution h6, div.important h6)');
|
||||
});
|
||||
|
|
|
@ -1266,11 +1266,6 @@ in mkLicense lset) ({
|
|||
};
|
||||
} // {
|
||||
# TODO: remove legacy aliases
|
||||
agpl3 = {
|
||||
spdxId = "AGPL-3.0";
|
||||
fullName = "GNU Affero General Public License v3.0";
|
||||
deprecated = true;
|
||||
};
|
||||
gpl2 = {
|
||||
spdxId = "GPL-2.0";
|
||||
fullName = "GNU General Public License v2.0";
|
||||
|
|
|
@ -6227,6 +6227,12 @@
|
|||
githubId = 303897;
|
||||
name = "Fabián Heredia Montiel";
|
||||
};
|
||||
fabianrig = {
|
||||
email = "fabianrig@posteo.de";
|
||||
github = "fabianrig";
|
||||
githubId = 88741530;
|
||||
name = "Fabian Rigoll";
|
||||
};
|
||||
fadenb = {
|
||||
email = "tristan.helmich+nixos@gmail.com";
|
||||
github = "fadenb";
|
||||
|
@ -13723,6 +13729,12 @@
|
|||
githubId = 77314501;
|
||||
name = "Maurice Zhou";
|
||||
};
|
||||
nealfennimore = {
|
||||
email = "hi@neal.codes";
|
||||
github = "nealfennimore";
|
||||
githubId = 5731551;
|
||||
name = "Neal Fennimore";
|
||||
};
|
||||
Nebucatnetzer = {
|
||||
email = "andreas+nixpkgs@zweili.ch";
|
||||
github = "Nebucatnetzer";
|
||||
|
@ -21332,6 +21344,12 @@
|
|||
github = "yanganto";
|
||||
githubId = 10803111;
|
||||
};
|
||||
yannickulrich = {
|
||||
email = "yannick.ulrich@proton.me";
|
||||
github = "yannickulrich";
|
||||
githubId = 749922;
|
||||
name = "Yannick Ulrich";
|
||||
};
|
||||
yannip = {
|
||||
email = "yPapandreou7@gmail.com";
|
||||
github = "YanniPapandreou";
|
||||
|
|
|
@ -82,6 +82,8 @@ In addition to numerous new and upgraded packages, this release has the followin
|
|||
|
||||
- [ollama](https://ollama.ai), server for running large language models locally.
|
||||
|
||||
- [Mihomo](https://github.com/MetaCubeX/mihomo), a rule-based proxy in Go. Available as [services.mihomo.enable](#opt-services.mihomo.enable).
|
||||
|
||||
- [hebbot](https://github.com/haecker-felix/hebbot), a Matrix bot to generate "This Week in X" like blog posts. Available as [services.hebbot](#opt-services.hebbot.enable).
|
||||
|
||||
- [Python Matter Server](https://github.com/home-assistant-libs/python-matter-server), a
|
||||
|
|
|
@ -1,20 +1,95 @@
|
|||
/* Generate JSON, XML and DocBook documentation for given NixOS options.
|
||||
/**
|
||||
Generates documentation for [nix modules](https://nix.dev/tutorials/module-system/module-system.html).
|
||||
|
||||
Minimal example:
|
||||
It uses the declared `options` to generate documentation in various formats.
|
||||
|
||||
{ pkgs, }:
|
||||
# Outputs
|
||||
|
||||
let
|
||||
eval = import (pkgs.path + "/nixos/lib/eval-config.nix") {
|
||||
baseModules = [
|
||||
../module.nix
|
||||
];
|
||||
modules = [];
|
||||
};
|
||||
in pkgs.nixosOptionsDoc {
|
||||
options = eval.options;
|
||||
This function returns an attribute set with the following entries.
|
||||
|
||||
## optionsCommonMark
|
||||
|
||||
Documentation in CommonMark text format.
|
||||
|
||||
## optionsJSON
|
||||
|
||||
All options in a JSON format suitable for further automated processing.
|
||||
|
||||
`example.json`
|
||||
```json
|
||||
{
|
||||
...
|
||||
"fileSystems.<name>.options": {
|
||||
"declarations": ["nixos/modules/tasks/filesystems.nix"],
|
||||
"default": {
|
||||
"_type": "literalExpression",
|
||||
"text": "[\n \"defaults\"\n]"
|
||||
},
|
||||
"description": "Options used to mount the file system.",
|
||||
"example": {
|
||||
"_type": "literalExpression",
|
||||
"text": "[\n \"data=journal\"\n]"
|
||||
},
|
||||
"loc": ["fileSystems", "<name>", "options"],
|
||||
"readOnly": false,
|
||||
"type": "non-empty (list of string (with check: non-empty))"
|
||||
"relatedPackages": "- [`pkgs.tmux`](\n https://search.nixos.org/packages?show=tmux&sort=relevance&query=tmux\n )\n",
|
||||
},
|
||||
...
|
||||
}
|
||||
```
|
||||
|
||||
## optionsDocBook
|
||||
|
||||
deprecated since 23.11 and will be removed in 24.05.
|
||||
|
||||
## optionsAsciiDoc
|
||||
|
||||
Documentation rendered as AsciiDoc. This is useful for e.g. man pages.
|
||||
|
||||
> Note: NixOS itself uses this ouput to to build the configuration.nix man page"
|
||||
|
||||
## optionsNix
|
||||
|
||||
All options as a Nix attribute set value, with the same schema as `optionsJSON`.
|
||||
|
||||
# Example
|
||||
|
||||
## Example: NixOS configuration
|
||||
|
||||
```nix
|
||||
let
|
||||
# Evaluate a NixOS configuration
|
||||
eval = import (pkgs.path + "/nixos/lib/eval-config.nix") {
|
||||
# Overriden explicitly here, this would include all modules from NixOS otherwise.
|
||||
# See: docs of eval-config.nix for more details
|
||||
baseModules = [];
|
||||
modules = [
|
||||
./module.nix
|
||||
];
|
||||
};
|
||||
in
|
||||
pkgs.nixosOptionsDoc {
|
||||
inherit (eval) options;
|
||||
}
|
||||
```
|
||||
|
||||
## Example: non-NixOS modules
|
||||
|
||||
`nixosOptionsDoc` can also be used to build documentation for non-NixOS modules.
|
||||
|
||||
```nix
|
||||
let
|
||||
eval = lib.evalModules {
|
||||
modules = [
|
||||
./module.nix
|
||||
];
|
||||
};
|
||||
in
|
||||
pkgs.nixosOptionsDoc {
|
||||
inherit (eval) options;
|
||||
}
|
||||
```
|
||||
*/
|
||||
{ pkgs
|
||||
, lib
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
# NixOS module that can be imported.
|
||||
|
||||
{ lib
|
||||
, stdenvNoCC
|
||||
, runCommand
|
||||
, runCommandLocal
|
||||
, python3
|
||||
, black
|
||||
, ruff
|
||||
|
@ -26,15 +26,18 @@
|
|||
, xz
|
||||
|
||||
# arguments
|
||||
, name
|
||||
, version
|
||||
, imageFileBasename
|
||||
, compression
|
||||
, fileSystems
|
||||
, partitions
|
||||
, partitionsJSON
|
||||
, split
|
||||
, seed
|
||||
, definitionsDirectory
|
||||
, sectorSize
|
||||
, mkfsEnv ? {}
|
||||
, createEmpty ? true
|
||||
}:
|
||||
|
||||
let
|
||||
|
@ -52,11 +55,6 @@ let
|
|||
mypy --strict $out
|
||||
'';
|
||||
|
||||
amendedRepartDefinitions = runCommandLocal "amended-repart.d" {} ''
|
||||
definitions=$(${amendRepartDefinitions} ${partitions} ${definitionsDirectory})
|
||||
cp -r $definitions $out
|
||||
'';
|
||||
|
||||
fileSystemToolMapping = {
|
||||
"vfat" = [ dosfstools mtools ];
|
||||
"ext4" = [ e2fsprogs.bin ];
|
||||
|
@ -78,53 +76,88 @@ let
|
|||
"xz" = "xz --keep --verbose --threads=0 -${toString compression.level}";
|
||||
}."${compression.algorithm}";
|
||||
in
|
||||
|
||||
runCommand imageFileBasename
|
||||
{
|
||||
stdenvNoCC.mkDerivation (finalAttrs:
|
||||
(if (version != null)
|
||||
then { pname = name; inherit version; }
|
||||
else { inherit name; }
|
||||
) // {
|
||||
__structuredAttrs = true;
|
||||
|
||||
nativeBuildInputs = [
|
||||
systemd
|
||||
fakeroot
|
||||
util-linux
|
||||
] ++ lib.optionals (compression.enable) [
|
||||
compressionPkg
|
||||
] ++ fileSystemTools;
|
||||
|
||||
env = mkfsEnv;
|
||||
|
||||
inherit partitionsJSON definitionsDirectory;
|
||||
|
||||
# relative path to the repart definitions that are read by systemd-repart
|
||||
finalRepartDefinitions = "repart.d";
|
||||
|
||||
systemdRepartFlags = [
|
||||
"--dry-run=no"
|
||||
"--empty=create"
|
||||
"--size=auto"
|
||||
"--seed=${seed}"
|
||||
"--definitions=${amendedRepartDefinitions}"
|
||||
"--definitions=${finalAttrs.finalRepartDefinitions}"
|
||||
"--split=${lib.boolToString split}"
|
||||
"--json=pretty"
|
||||
] ++ lib.optionals createEmpty [
|
||||
"--empty=create"
|
||||
] ++ lib.optionals (sectorSize != null) [
|
||||
"--sector-size=${toString sectorSize}"
|
||||
];
|
||||
|
||||
passthru = {
|
||||
inherit amendRepartDefinitions amendedRepartDefinitions;
|
||||
};
|
||||
} ''
|
||||
mkdir -p $out
|
||||
cd $out
|
||||
dontUnpack = true;
|
||||
dontConfigure = true;
|
||||
doCheck = false;
|
||||
|
||||
echo "Building image with systemd-repart..."
|
||||
unshare --map-root-user fakeroot systemd-repart \
|
||||
''${systemdRepartFlags[@]} \
|
||||
${imageFileBasename}.raw \
|
||||
| tee repart-output.json
|
||||
patchPhase = ''
|
||||
runHook prePatch
|
||||
|
||||
amendedRepartDefinitionsDir=$(${amendRepartDefinitions} $partitionsJSON $definitionsDirectory)
|
||||
ln -vs $amendedRepartDefinitionsDir $finalRepartDefinitions
|
||||
|
||||
runHook postPatch
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
|
||||
echo "Building image with systemd-repart..."
|
||||
unshare --map-root-user fakeroot systemd-repart \
|
||||
''${systemdRepartFlags[@]} \
|
||||
${imageFileBasename}.raw \
|
||||
| tee repart-output.json
|
||||
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out
|
||||
''
|
||||
# Compression is implemented in the same derivation as opposed to in a
|
||||
# separate derivation to allow users to save disk space. Disk images are
|
||||
# already very space intensive so we want to allow users to mitigate this.
|
||||
if ${lib.boolToString compression.enable}; then
|
||||
+ lib.optionalString compression.enable
|
||||
''
|
||||
for f in ${imageFileBasename}*; do
|
||||
echo "Compressing $f with ${compression.algorithm}..."
|
||||
# Keep the original file when compressing and only delete it afterwards
|
||||
${compressionCommand} $f && rm $f
|
||||
done
|
||||
fi
|
||||
''
|
||||
'' + ''
|
||||
mv -v repart-output.json ${imageFileBasename}* $out
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
inherit amendRepartDefinitions;
|
||||
};
|
||||
})
|
||||
|
|
|
@ -211,6 +211,15 @@ in
|
|||
'';
|
||||
};
|
||||
|
||||
finalPartitions = lib.mkOption {
|
||||
type = lib.types.attrs;
|
||||
internal = true;
|
||||
readOnly = true;
|
||||
description = lib.mdDoc ''
|
||||
Convenience option to access partitions with added closures.
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
config = {
|
||||
|
@ -224,6 +233,16 @@ in
|
|||
"zstd" = ".zst";
|
||||
"xz" = ".xz";
|
||||
}."${cfg.compression.algorithm}";
|
||||
|
||||
makeClosure = paths: pkgs.closureInfo { rootPaths = paths; };
|
||||
|
||||
# Add the closure of the provided Nix store paths to cfg.partitions so
|
||||
# that amend-repart-definitions.py can read it.
|
||||
addClosure = _name: partitionConfig: partitionConfig // (
|
||||
lib.optionalAttrs
|
||||
(partitionConfig.storePaths or [ ] != [ ])
|
||||
{ closure = "${makeClosure partitionConfig.storePaths}/store-paths"; }
|
||||
);
|
||||
in
|
||||
{
|
||||
name = lib.mkIf (config.system.image.id != null) (lib.mkOptionDefault config.system.image.id);
|
||||
|
@ -239,6 +258,8 @@ in
|
|||
"xz" = 3;
|
||||
}."${cfg.compression.algorithm}";
|
||||
};
|
||||
|
||||
finalPartitions = lib.mapAttrs addClosure cfg.partitions;
|
||||
};
|
||||
|
||||
system.build.image =
|
||||
|
@ -247,36 +268,25 @@ in
|
|||
(f: f != null)
|
||||
(lib.mapAttrsToList (_n: v: v.repartConfig.Format or null) cfg.partitions);
|
||||
|
||||
makeClosure = paths: pkgs.closureInfo { rootPaths = paths; };
|
||||
|
||||
# Add the closure of the provided Nix store paths to cfg.partitions so
|
||||
# that amend-repart-definitions.py can read it.
|
||||
addClosure = _name: partitionConfig: partitionConfig // (
|
||||
lib.optionalAttrs
|
||||
(partitionConfig.storePaths or [ ] != [ ])
|
||||
{ closure = "${makeClosure partitionConfig.storePaths}/store-paths"; }
|
||||
);
|
||||
|
||||
finalPartitions = lib.mapAttrs addClosure cfg.partitions;
|
||||
|
||||
format = pkgs.formats.ini { };
|
||||
|
||||
definitionsDirectory = utils.systemdUtils.lib.definitions
|
||||
"repart.d"
|
||||
format
|
||||
(lib.mapAttrs (_n: v: { Partition = v.repartConfig; }) finalPartitions);
|
||||
(lib.mapAttrs (_n: v: { Partition = v.repartConfig; }) cfg.finalPartitions);
|
||||
|
||||
partitions = pkgs.writeText "partitions.json" (builtins.toJSON finalPartitions);
|
||||
partitionsJSON = pkgs.writeText "partitions.json" (builtins.toJSON cfg.finalPartitions);
|
||||
|
||||
mkfsEnv = mkfsOptionsToEnv cfg.mkfsOptions;
|
||||
in
|
||||
pkgs.callPackage ./repart-image.nix {
|
||||
systemd = cfg.package;
|
||||
inherit (cfg) imageFileBasename compression split seed sectorSize;
|
||||
inherit fileSystems definitionsDirectory partitions mkfsEnv;
|
||||
inherit (cfg) name version imageFileBasename compression split seed sectorSize;
|
||||
inherit fileSystems definitionsDirectory partitionsJSON mkfsEnv;
|
||||
};
|
||||
|
||||
meta.maintainers = with lib.maintainers; [ nikstur ];
|
||||
meta.maintainers = with lib.maintainers; [ nikstur willibutz ];
|
||||
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1018,6 +1018,7 @@
|
|||
./services/networking/lxd-image-server.nix
|
||||
./services/networking/magic-wormhole-mailbox-server.nix
|
||||
./services/networking/matterbridge.nix
|
||||
./services/networking/mihomo.nix
|
||||
./services/networking/minidlna.nix
|
||||
./services/networking/miniupnpd.nix
|
||||
./services/networking/miredo.nix
|
||||
|
|
|
@ -95,6 +95,14 @@ in {
|
|||
enable = mkEnableOption (lib.mdDoc "JACK audio emulation");
|
||||
};
|
||||
|
||||
raopOpenFirewall = mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = lib.mdDoc ''
|
||||
Opens UDP/6001-6002, required by RAOP/Airplay for timing and control data.
|
||||
'';
|
||||
};
|
||||
|
||||
pulse = {
|
||||
enable = mkEnableOption (lib.mdDoc "PulseAudio server emulation");
|
||||
};
|
||||
|
@ -371,6 +379,8 @@ in {
|
|||
environment.sessionVariables.LD_LIBRARY_PATH =
|
||||
lib.mkIf cfg.jack.enable [ "${cfg.package.jack}/lib" ];
|
||||
|
||||
networking.firewall.allowedUDPPorts = lib.mkIf cfg.raopOpenFirewall [ 6001 6002 ];
|
||||
|
||||
users = lib.mkIf cfg.systemWide {
|
||||
users.pipewire = {
|
||||
uid = config.ids.uids.pipewire;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, pkgs, lib, options, ... }:
|
||||
{ config, pkgs, lib, options, utils, ... }:
|
||||
|
||||
let
|
||||
inherit (lib) concatStrings foldl foldl' genAttrs literalExpression maintainers
|
||||
|
@ -94,10 +94,10 @@ let
|
|||
"zfs"
|
||||
]
|
||||
(name:
|
||||
import (./. + "/exporters/${name}.nix") { inherit config lib pkgs options; }
|
||||
import (./. + "/exporters/${name}.nix") { inherit config lib pkgs options utils; }
|
||||
)) // (mapAttrs
|
||||
(name: params:
|
||||
import (./. + "/exporters/${params.name}.nix") { inherit config lib pkgs options; type = params.type ; })
|
||||
import (./. + "/exporters/${params.name}.nix") { inherit config lib pkgs options utils; type = params.type ; })
|
||||
{
|
||||
exportarr-bazarr = {
|
||||
name = "exportarr";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, pkgs, options }:
|
||||
{ config, lib, pkgs, options, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, pkgs, options }:
|
||||
{ config, lib, pkgs, options, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, pkgs, options }:
|
||||
{ config, lib, pkgs, options, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, pkgs, options }:
|
||||
{ config, lib, pkgs, options, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, pkgs, options }:
|
||||
{ config, lib, pkgs, options, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, pkgs, options }:
|
||||
{ config, lib, pkgs, options, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, pkgs, options }:
|
||||
{ config, lib, pkgs, options, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, pkgs, options }:
|
||||
{ config, lib, pkgs, options, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, pkgs, options }:
|
||||
{ config, lib, pkgs, options, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, pkgs, options }:
|
||||
{ config, lib, pkgs, options, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, pkgs, options }:
|
||||
{ config, lib, pkgs, options, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, pkgs, options }:
|
||||
{ config, lib, pkgs, options, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, pkgs, options, type }:
|
||||
{ config, lib, pkgs, options, type, ... }:
|
||||
|
||||
let
|
||||
cfg = config.services.prometheus.exporters."exportarr-${type}";
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
, lib
|
||||
, pkgs
|
||||
, options
|
||||
, ...
|
||||
}:
|
||||
|
||||
let
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, pkgs, options }:
|
||||
{ config, lib, pkgs, options, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, pkgs, options }:
|
||||
{ config, lib, pkgs, options, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, pkgs, options }:
|
||||
{ config, lib, pkgs, options, ... }:
|
||||
|
||||
let
|
||||
cfg = config.services.prometheus.exporters.graphite;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, pkgs, options }:
|
||||
{ config, lib, pkgs, options, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, pkgs, options }:
|
||||
{ config, lib, pkgs, options, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, pkgs, options }:
|
||||
{ config, lib, pkgs, options, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, pkgs, options }:
|
||||
{ config, lib, pkgs, options, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, pkgs, options }:
|
||||
{ config, lib, pkgs, options, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, pkgs, options }:
|
||||
{ config, lib, pkgs, options, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, pkgs, options }:
|
||||
{ config, lib, pkgs, options, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
{ config
|
||||
, lib
|
||||
, pkgs
|
||||
, options
|
||||
, utils
|
||||
, ...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
@ -9,18 +10,22 @@ with lib;
|
|||
let
|
||||
cfg = config.services.prometheus.exporters.kea;
|
||||
in {
|
||||
imports = [
|
||||
(mkRenamedOptionModule [ "controlSocketPaths" ] [ "targets" ])
|
||||
];
|
||||
port = 9547;
|
||||
extraOpts = {
|
||||
controlSocketPaths = mkOption {
|
||||
targets = mkOption {
|
||||
type = types.listOf types.str;
|
||||
example = literalExpression ''
|
||||
[
|
||||
"/run/kea/kea-dhcp4.socket"
|
||||
"/run/kea/kea-dhcp6.socket"
|
||||
"http://127.0.0.1:8547"
|
||||
]
|
||||
'';
|
||||
description = lib.mdDoc ''
|
||||
Paths to kea control sockets
|
||||
Paths or URLs to the Kea control socket.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
@ -32,12 +37,11 @@ in {
|
|||
serviceConfig = {
|
||||
User = "kea";
|
||||
DynamicUser = true;
|
||||
ExecStart = ''
|
||||
${pkgs.prometheus-kea-exporter}/bin/kea-exporter \
|
||||
--address ${cfg.listenAddress} \
|
||||
--port ${toString cfg.port} \
|
||||
${concatStringsSep " " cfg.controlSocketPaths}
|
||||
'';
|
||||
ExecStart = utils.escapeSystemdExecArgs ([
|
||||
(lib.getExe pkgs.prometheus-kea-exporter)
|
||||
"--address" cfg.listenAddress
|
||||
"--port" cfg.port
|
||||
] ++ cfg.extraFlags ++ cfg.targets);
|
||||
RuntimeDirectory = "kea";
|
||||
RuntimeDirectoryPreserve = true;
|
||||
RestrictAddressFamilies = [
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, pkgs, options }:
|
||||
{ config, lib, pkgs, options, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, pkgs, options }:
|
||||
{ config, lib, pkgs, options, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, pkgs, options }:
|
||||
{ config, lib, pkgs, options, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, pkgs, options }:
|
||||
{ config, lib, pkgs, options, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, pkgs, options }:
|
||||
{ config, lib, pkgs, options, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, pkgs, options }:
|
||||
{ config, lib, pkgs, options, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, pkgs, options }:
|
||||
{ config, lib, pkgs, options, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, pkgs, options }:
|
||||
{ config, lib, pkgs, options, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, pkgs, options }:
|
||||
{ config, lib, pkgs, options, ... }:
|
||||
let
|
||||
cfg = config.services.prometheus.exporters.mysqld;
|
||||
inherit (lib) types mkOption mdDoc mkIf mkForce cli concatStringsSep optionalString escapeShellArgs;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, pkgs, options }:
|
||||
{ config, lib, pkgs, options, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, pkgs, options }:
|
||||
{ config, lib, pkgs, options, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, pkgs, options }:
|
||||
{ config, lib, pkgs, options, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, pkgs, options }:
|
||||
{ config, lib, pkgs, options, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, pkgs, options }:
|
||||
{ config, lib, pkgs, options, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, pkgs, options }:
|
||||
{ config, lib, pkgs, options, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
, lib
|
||||
, pkgs
|
||||
, options
|
||||
, ...
|
||||
}:
|
||||
|
||||
let
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, pkgs, options }:
|
||||
{ config, lib, pkgs, options, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, pkgs, options }:
|
||||
{ config, lib, pkgs, options, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, pkgs, options }:
|
||||
{ config, lib, pkgs, options, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, pkgs, options }:
|
||||
{ config, lib, pkgs, options, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, pkgs, options }:
|
||||
{ config, lib, pkgs, options, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, pkgs, options }:
|
||||
{ config, lib, pkgs, options, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, pkgs, options }:
|
||||
{ config, lib, pkgs, options, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, pkgs, options }:
|
||||
{ config, lib, pkgs, options, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, pkgs, options }:
|
||||
{ config, lib, pkgs, options, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, pkgs, options }:
|
||||
{ config, lib, pkgs, options, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, pkgs, options }:
|
||||
{ config, lib, pkgs, options, ... }:
|
||||
|
||||
let
|
||||
cfg = config.services.prometheus.exporters.rtl_433;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, pkgs, options }:
|
||||
{ config, lib, pkgs, options, ... }:
|
||||
|
||||
let
|
||||
inherit (lib) mkOption types;
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
, lib
|
||||
, pkgs
|
||||
, options
|
||||
, ...
|
||||
}:
|
||||
|
||||
let
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, pkgs, options }:
|
||||
{ config, lib, pkgs, options, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, pkgs, options }:
|
||||
{ config, lib, pkgs, options, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, pkgs, options }:
|
||||
{ config, lib, pkgs, options, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, pkgs, options }:
|
||||
{ config, lib, pkgs, options, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, pkgs, options }:
|
||||
{ config, lib, pkgs, options, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, pkgs, options }:
|
||||
{ config, lib, pkgs, options, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.services.prometheus.exporters.sql;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, pkgs, options }:
|
||||
{ config, lib, pkgs, options, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, pkgs, options }:
|
||||
{ config, lib, pkgs, options, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, pkgs, options }:
|
||||
{ config, lib, pkgs, options, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
, lib
|
||||
, pkgs
|
||||
, options
|
||||
, ...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, pkgs, options }:
|
||||
{ config, lib, pkgs, options, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, pkgs, options }:
|
||||
{ config, lib, pkgs, options, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, pkgs, options }:
|
||||
{ config, lib, pkgs, options, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, pkgs, options }:
|
||||
{ config, lib, pkgs, options, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, pkgs, options }:
|
||||
{ config, lib, pkgs, options, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, pkgs, options }:
|
||||
{ config, lib, pkgs, options, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
|
118
nixos/modules/services/networking/mihomo.nix
Normal file
118
nixos/modules/services/networking/mihomo.nix
Normal file
|
@ -0,0 +1,118 @@
|
|||
# NOTE:
|
||||
# cfg.configFile contains secrets such as proxy servers' credential!
|
||||
# we dont want plaintext secrets in world-readable `/nix/store`.
|
||||
|
||||
{ lib
|
||||
, config
|
||||
, pkgs
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
cfg = config.services.mihomo;
|
||||
in
|
||||
{
|
||||
options.services.mihomo = {
|
||||
enable = lib.mkEnableOption "Mihomo, A rule-based proxy in Go.";
|
||||
|
||||
package = lib.mkPackageOption pkgs "mihomo" { };
|
||||
|
||||
configFile = lib.mkOption {
|
||||
default = null;
|
||||
type = lib.types.nullOr lib.types.path;
|
||||
description = "Configuration file to use.";
|
||||
};
|
||||
|
||||
webui = lib.mkOption {
|
||||
default = null;
|
||||
type = lib.types.nullOr lib.types.path;
|
||||
description = ''
|
||||
Local web interface to use.
|
||||
|
||||
You can also use the following website, just in case:
|
||||
- metacubexd:
|
||||
- https://d.metacubex.one
|
||||
- https://metacubex.github.io/metacubexd
|
||||
- https://metacubexd.pages.dev
|
||||
- yacd:
|
||||
- https://yacd.haishan.me
|
||||
- clash-dashboard (buggy):
|
||||
- https://clash.razord.top
|
||||
'';
|
||||
};
|
||||
|
||||
extraOpts = lib.mkOption {
|
||||
default = null;
|
||||
type = lib.types.nullOr lib.types.str;
|
||||
description = "Extra command line options to use.";
|
||||
};
|
||||
|
||||
tunMode = lib.mkEnableOption ''
|
||||
necessary permission for Mihomo's systemd service for TUN mode to function properly.
|
||||
|
||||
Keep in mind, that you still need to enable TUN mode manually in Mihomo's configuration.
|
||||
'';
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
### systemd service
|
||||
systemd.services."mihomo" = {
|
||||
description = "Mihomo daemon, A rule-based proxy in Go.";
|
||||
documentation = [ "https://wiki.metacubex.one/" ];
|
||||
requires = [ "network-online.target" ];
|
||||
after = [ "network-online.target" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
serviceConfig =
|
||||
{
|
||||
ExecStart = lib.concatStringsSep " " [
|
||||
(lib.getExe cfg.package)
|
||||
"-d /var/lib/private/mihomo"
|
||||
(lib.optionalString (cfg.configFile != null) "-f \${CREDENTIALS_DIRECTORY}/config.yaml")
|
||||
(lib.optionalString (cfg.webui != null) "-ext-ui ${cfg.webui}")
|
||||
(lib.optionalString (cfg.extraOpts != null) cfg.extraOpts)
|
||||
];
|
||||
|
||||
DynamicUser = true;
|
||||
StateDirectory = "mihomo";
|
||||
LoadCredential = "config.yaml:${cfg.configFile}";
|
||||
|
||||
### Hardening
|
||||
AmbientCapabilities = "";
|
||||
CapabilityBoundingSet = "";
|
||||
DeviceAllow = "";
|
||||
LockPersonality = true;
|
||||
MemoryDenyWriteExecute = true;
|
||||
NoNewPrivileges = true;
|
||||
PrivateDevices = true;
|
||||
PrivateMounts = true;
|
||||
PrivateTmp = true;
|
||||
PrivateUsers = true;
|
||||
ProcSubset = "pid";
|
||||
ProtectClock = true;
|
||||
ProtectControlGroups = true;
|
||||
ProtectHome = true;
|
||||
ProtectHostname = true;
|
||||
ProtectKernelLogs = true;
|
||||
ProtectKernelModules = true;
|
||||
ProtectKernelTunables = true;
|
||||
ProtectProc = "invisible";
|
||||
ProtectSystem = "strict";
|
||||
RestrictRealtime = true;
|
||||
RestrictSUIDSGID = true;
|
||||
RestrictNamespaces = true;
|
||||
RestrictAddressFamilies = "AF_INET AF_INET6";
|
||||
SystemCallArchitectures = "native";
|
||||
SystemCallFilter = "@system-service bpf";
|
||||
UMask = "0077";
|
||||
}
|
||||
// lib.optionalAttrs cfg.tunMode {
|
||||
AmbientCapabilities = "CAP_NET_ADMIN";
|
||||
CapabilityBoundingSet = "CAP_NET_ADMIN";
|
||||
PrivateDevices = false;
|
||||
PrivateUsers = false;
|
||||
RestrictAddressFamilies = "AF_INET AF_INET6 AF_NETLINK";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
meta.maintainers = with lib.maintainers; [ Guanran928 ];
|
||||
}
|
|
@ -8,16 +8,23 @@ in
|
|||
{
|
||||
options = {
|
||||
services.xserver.windowManager.nimdow.enable = mkEnableOption (lib.mdDoc "nimdow");
|
||||
services.xserver.windowManager.nimdow.package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.nimdow;
|
||||
defaultText = "pkgs.nimdow";
|
||||
description = lib.mdDoc "nimdow package to use";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
services.xserver.windowManager.session = singleton {
|
||||
name = "nimdow";
|
||||
start = ''
|
||||
${pkgs.nimdow}/bin/nimdow &
|
||||
${cfg.package}/bin/nimdow &
|
||||
waitPID=$!
|
||||
'';
|
||||
};
|
||||
environment.systemPackages = [ pkgs.nimdow ];
|
||||
environment.systemPackages = [ cfg.package pkgs.st ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -529,6 +529,7 @@ in {
|
|||
memcached = handleTest ./memcached.nix {};
|
||||
merecat = handleTest ./merecat.nix {};
|
||||
metabase = handleTest ./metabase.nix {};
|
||||
mihomo = handleTest ./mihomo.nix {};
|
||||
mindustry = handleTest ./mindustry.nix {};
|
||||
minecraft = handleTest ./minecraft.nix {};
|
||||
minecraft-server = handleTest ./minecraft-server.nix {};
|
||||
|
@ -581,6 +582,7 @@ in {
|
|||
ndppd = handleTest ./ndppd.nix {};
|
||||
nebula = handleTest ./nebula.nix {};
|
||||
netbird = handleTest ./netbird.nix {};
|
||||
nimdow = handleTest ./nimdow.nix {};
|
||||
neo4j = handleTest ./neo4j.nix {};
|
||||
netdata = handleTest ./netdata.nix {};
|
||||
networking.networkd = handleTest ./networking.nix { networkd = true; };
|
||||
|
|
|
@ -44,6 +44,11 @@ import ./make-test-python.nix ({ pkgs, lib, ...}: {
|
|||
name = "/var/lib/kea/dhcp4.leases";
|
||||
};
|
||||
|
||||
control-socket = {
|
||||
socket-type = "unix";
|
||||
socket-name = "/run/kea/dhcp4.sock";
|
||||
};
|
||||
|
||||
interfaces-config = {
|
||||
dhcp-socket-type = "raw";
|
||||
interfaces = [
|
||||
|
@ -89,6 +94,25 @@ import ./make-test-python.nix ({ pkgs, lib, ...}: {
|
|||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.kea.ctrl-agent = {
|
||||
enable = true;
|
||||
settings = {
|
||||
http-host = "127.0.0.1";
|
||||
http-port = 8000;
|
||||
control-sockets.dhcp4 = {
|
||||
socket-type = "unix";
|
||||
socket-name = "/run/kea/dhcp4.sock";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.prometheus.exporters.kea = {
|
||||
enable = true;
|
||||
controlSocketPaths = [
|
||||
"http://127.0.0.1:8000"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
nameserver = { config, pkgs, ... }: {
|
||||
|
@ -182,5 +206,7 @@ import ./make-test-python.nix ({ pkgs, lib, ...}: {
|
|||
client.wait_until_succeeds("ping -c 5 10.0.0.1")
|
||||
router.wait_until_succeeds("ping -c 5 10.0.0.3")
|
||||
nameserver.wait_until_succeeds("kdig +short client.lan.nixos.test @10.0.0.2 | grep -q 10.0.0.3")
|
||||
router.log(router.execute("curl 127.0.0.1:9547")[1])
|
||||
router.succeed("curl --no-buffer 127.0.0.1:9547 | grep -qE '^kea_dhcp4_addresses_assigned_total.*1.0$'")
|
||||
'';
|
||||
})
|
||||
|
|
44
nixos/tests/mihomo.nix
Normal file
44
nixos/tests/mihomo.nix
Normal file
|
@ -0,0 +1,44 @@
|
|||
import ./make-test-python.nix ({ pkgs, ... }: {
|
||||
name = "mihomo";
|
||||
meta.maintainers = with pkgs.lib.maintainers; [ Guanran928 ];
|
||||
|
||||
nodes.machine = {
|
||||
environment.systemPackages = [ pkgs.curl ];
|
||||
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
statusPage = true;
|
||||
};
|
||||
|
||||
services.mihomo = {
|
||||
enable = true;
|
||||
configFile = pkgs.writeTextFile {
|
||||
name = "config.yaml";
|
||||
text = ''
|
||||
mixed-port: 7890
|
||||
external-controller: 127.0.0.1:9090
|
||||
authentication:
|
||||
- "user:supersecret"
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
# Wait until it starts
|
||||
machine.wait_for_unit("nginx.service")
|
||||
machine.wait_for_unit("mihomo.service")
|
||||
machine.wait_for_open_port(80)
|
||||
machine.wait_for_open_port(7890)
|
||||
machine.wait_for_open_port(9090)
|
||||
|
||||
# Proxy
|
||||
machine.succeed("curl --fail --max-time 10 --proxy http://user:supersecret@localhost:7890 http://localhost")
|
||||
machine.succeed("curl --fail --max-time 10 --proxy socks5://user:supersecret@localhost:7890 http://localhost")
|
||||
machine.fail("curl --fail --max-time 10 --proxy http://user:supervillain@localhost:7890 http://localhost")
|
||||
machine.fail("curl --fail --max-time 10 --proxy socks5://user:supervillain@localhost:7890 http://localhost")
|
||||
|
||||
# Web UI
|
||||
machine.succeed("curl --fail http://localhost:9090") == '{"hello":"clash"}'
|
||||
'';
|
||||
})
|
25
nixos/tests/nimdow.nix
Normal file
25
nixos/tests/nimdow.nix
Normal file
|
@ -0,0 +1,25 @@
|
|||
import ./make-test-python.nix ({ pkgs, ...} : {
|
||||
name = "nimdow";
|
||||
meta = with pkgs.lib.maintainers; {
|
||||
maintainers = [ marcusramberg ];
|
||||
};
|
||||
|
||||
nodes.machine = { lib, ... }: {
|
||||
imports = [ ./common/x11.nix ./common/user-account.nix ];
|
||||
test-support.displayManager.auto.user = "alice";
|
||||
services.xserver.displayManager.defaultSession = lib.mkForce "none+nimdow";
|
||||
services.xserver.windowManager.nimdow.enable = true;
|
||||
};
|
||||
|
||||
testScript = { ... }: ''
|
||||
with subtest("ensure x starts"):
|
||||
machine.wait_for_x()
|
||||
machine.wait_for_file("/home/alice/.Xauthority")
|
||||
machine.succeed("xauth merge ~alice/.Xauthority")
|
||||
|
||||
with subtest("ensure we can open a new terminal"):
|
||||
machine.send_key("meta_l-ret")
|
||||
machine.wait_for_window(r"alice.*?machine")
|
||||
machine.screenshot("terminal")
|
||||
'';
|
||||
})
|
|
@ -418,54 +418,6 @@ let
|
|||
'';
|
||||
};
|
||||
|
||||
kea = let
|
||||
controlSocketPathV4 = "/run/kea/dhcp4.sock";
|
||||
controlSocketPathV6 = "/run/kea/dhcp6.sock";
|
||||
in
|
||||
{
|
||||
exporterConfig = {
|
||||
enable = true;
|
||||
controlSocketPaths = [
|
||||
controlSocketPathV4
|
||||
controlSocketPathV6
|
||||
];
|
||||
};
|
||||
metricProvider = {
|
||||
services.kea = {
|
||||
dhcp4 = {
|
||||
enable = true;
|
||||
settings = {
|
||||
control-socket = {
|
||||
socket-type = "unix";
|
||||
socket-name = controlSocketPathV4;
|
||||
};
|
||||
};
|
||||
};
|
||||
dhcp6 = {
|
||||
enable = true;
|
||||
settings = {
|
||||
control-socket = {
|
||||
socket-type = "unix";
|
||||
socket-name = controlSocketPathV6;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
exporterTest = ''
|
||||
wait_for_unit("kea-dhcp4-server.service")
|
||||
wait_for_unit("kea-dhcp6-server.service")
|
||||
wait_for_file("${controlSocketPathV4}")
|
||||
wait_for_file("${controlSocketPathV6}")
|
||||
wait_for_unit("prometheus-kea-exporter.service")
|
||||
wait_for_open_port(9547)
|
||||
succeed(
|
||||
"curl --fail localhost:9547/metrics | grep 'packets_received_total'"
|
||||
)
|
||||
'';
|
||||
};
|
||||
|
||||
knot = {
|
||||
exporterConfig = {
|
||||
enable = true;
|
||||
|
|
|
@ -23,7 +23,7 @@ appimageTools.wrapType2 rec {
|
|||
meta = with lib; {
|
||||
description = "A new look into listening and enjoying Apple Music in style and performance.";
|
||||
homepage = "https://github.com/ciderapp/Cider";
|
||||
license = licenses.agpl3;
|
||||
license = licenses.agpl3Only;
|
||||
maintainers = [ maintainers.cigrainger ];
|
||||
platforms = [ "x86_64-linux" ];
|
||||
mainProgram = "cider";
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "2.2.3";
|
||||
version = "2.2.4";
|
||||
pname = "jacktrip";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
|
@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
|
|||
repo = "jacktrip";
|
||||
rev = "v${version}";
|
||||
fetchSubmodules = true;
|
||||
sha256 = "sha256-uUmaTqUiih4nVt4Cba77WDt4xGQixsBe3WNavBDanx0=";
|
||||
sha256 = "sha256-H1zjBNEFPvZRDEaFOiL1ZAlHQsNxeT4WbXEOqg0+eFg=";
|
||||
};
|
||||
|
||||
preConfigure = ''
|
||||
|
|
|
@ -38,7 +38,7 @@ stdenv.mkDerivation rec {
|
|||
description = "An easy to setup Open Source client/server backup system";
|
||||
longDescription = "An easy to setup Open Source client/server backup system, that through a combination of image and file backups accomplishes both data safety and a fast restoration time";
|
||||
homepage = "https://www.urbackup.org/index.html";
|
||||
license = licenses.agpl3;
|
||||
license = licenses.agpl3Plus;
|
||||
platforms = platforms.linux;
|
||||
maintainers = [ maintainers.mgttlinger ];
|
||||
};
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
, qtbase
|
||||
, qttools
|
||||
, wrapQtAppsHook
|
||||
, syntax-highlighting
|
||||
, cmake
|
||||
, ninja
|
||||
, python3
|
||||
|
@ -13,25 +14,23 @@
|
|||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "cpeditor";
|
||||
version = "6.11.2";
|
||||
version = "7.0.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "cpeditor";
|
||||
repo = "cpeditor";
|
||||
rev = version;
|
||||
sha256 = "sha256-zotbXzRjIwZdYluJiz6GWUIOXl/wz1TWt+dcTwMhURo=";
|
||||
hash = "sha256-t7nn3sO45dOQq5OMWhaseO9XHicQ/1fjukXal5yPMgY";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ninja pkg-config wrapQtAppsHook python3 ];
|
||||
buildInputs = [ qtbase qttools ];
|
||||
buildInputs = [ qtbase qttools syntax-highlighting ];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace src/Core/Runner.cpp --replace "/bin/bash" "${runtimeShell}"
|
||||
substituteInPlace src/Core/Runner.cpp --replace-fail "/bin/bash" "${runtimeShell}"
|
||||
'';
|
||||
|
||||
env.NIX_CFLAGS_COMPILE = "-std=c++14";
|
||||
|
||||
meta = with lib; {
|
||||
description = "An IDE specially designed for competitive programming";
|
||||
homepage = "https://cpeditor.org";
|
||||
|
|
|
@ -51,7 +51,7 @@ stdenv.mkDerivation rec {
|
|||
end-to-end encryption, powerful extensions, and open-source applications.
|
||||
'';
|
||||
homepage = "https://standardnotes.org";
|
||||
license = licenses.agpl3;
|
||||
license = licenses.agpl3Only;
|
||||
maintainers = with maintainers; [ mgregoire chuangzhu squalus ];
|
||||
sourceProvenance = [ sourceTypes.binaryNativeCode ];
|
||||
platforms = builtins.attrNames srcjson.deb;
|
||||
|
|
|
@ -102,6 +102,23 @@ let
|
|||
};
|
||||
};
|
||||
|
||||
"42crunch".vscode-openapi = buildVscodeMarketplaceExtension {
|
||||
mktplcRef = {
|
||||
publisher = "42Crunch";
|
||||
name = "vscode-openapi";
|
||||
version = "4.25.1";
|
||||
sha256 = "+hKQUJp9c0oyhePFmQEXAqtqKL3fkQ1nhopUPnhRZc4=";
|
||||
};
|
||||
meta = {
|
||||
changelog = "https://marketplace.visualstudio.com/items/42Crunch.vscode-openapi/changelog";
|
||||
description = "A Visual Studio Code extension with rich support for the OpenAPI Specification (OAS).";
|
||||
downloadPage = "https://marketplace.visualstudio.com/items?itemName=42Crunch.vscode-openapi";
|
||||
homepage = "https://github.com/42Crunch/vscode-openapi";
|
||||
license = lib.licenses.gpl3;
|
||||
maintainers = [ lib.maintainers.benhiemer ];
|
||||
};
|
||||
};
|
||||
|
||||
a5huynh.vscode-ron = buildVscodeMarketplaceExtension {
|
||||
mktplcRef = {
|
||||
name = "vscode-ron";
|
||||
|
@ -1576,8 +1593,8 @@ let
|
|||
mktplcRef = {
|
||||
name = "prettier-vscode";
|
||||
publisher = "esbenp";
|
||||
version = "10.1.0";
|
||||
sha256 = "sha256-SQuf15Jq84MKBVqK6UviK04uo7gQw9yuw/WEBEXcQAc=";
|
||||
version = "10.3.0";
|
||||
sha256 = "sha256-Oc46dxOI+55Y6hiJe0zTakdTM1sikcF7ISWkkVlaO1c=";
|
||||
};
|
||||
meta = {
|
||||
changelog = "https://marketplace.visualstudio.com/items/esbenp.prettier-vscode/changelog";
|
||||
|
@ -1743,8 +1760,8 @@ let
|
|||
mktplcRef = {
|
||||
name = "shell-format";
|
||||
publisher = "foxundermoon";
|
||||
version = "7.1.0";
|
||||
sha256 = "09z72mdr5bfdcb67xyzlv7lb9vyjlc3k9ackj4jgixfk40c68cnj";
|
||||
version = "7.2.5";
|
||||
sha256 = "sha256-kfpRByJDcGY3W9+ELBzDOUMl06D/vyPlN//wPgQhByk=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ jq moreutils ];
|
||||
|
@ -2216,8 +2233,8 @@ let
|
|||
mktplcRef = {
|
||||
name = "Ionide-fsharp";
|
||||
publisher = "Ionide";
|
||||
version = "7.17.0";
|
||||
sha256 = "sha256-CC6ySeuO61O/mAkQYGoK/1cd4hlyS0vG+Lqv0HQ7K6c=";
|
||||
version = "7.18.2";
|
||||
sha256 = "sha256-CEeTLiZktp5YzCRxDXa+s8W9N971iQla/FyCr8Co0SQ=";
|
||||
};
|
||||
meta = {
|
||||
changelog = "https://marketplace.visualstudio.com/items/Ionide.Ionide-fsharp/changelog";
|
||||
|
@ -3042,8 +3059,8 @@ let
|
|||
mktplcRef = {
|
||||
name = "remote-containers";
|
||||
publisher = "ms-vscode-remote";
|
||||
version = "0.305.0";
|
||||
sha256 = "sha256-srSRD/wgDbQo9P1uJk8YtcXPZO62keG5kRnp1TmHqOc=";
|
||||
version = "0.347.0";
|
||||
sha256 = "sha256-E9H1nPWG5JuzBxbYc/yWd8Y3azEWrd9whGirl0GK7kU=";
|
||||
};
|
||||
meta = {
|
||||
description = "Open any folder or repository inside a Docker container.";
|
||||
|
@ -3757,6 +3774,23 @@ let
|
|||
};
|
||||
};
|
||||
|
||||
smcpeak.default-keys-windows = buildVscodeMarketplaceExtension {
|
||||
mktplcRef = {
|
||||
name = "default-keys-windows";
|
||||
publisher = "smcpeak";
|
||||
version = "0.0.10";
|
||||
sha256 = "sha256-v1JY5ZGWOfF14H235Y9CLlPwIvmNwCeRhIkdmcgCCFU=";
|
||||
};
|
||||
meta = {
|
||||
changelog = "https://github.com/smcpeak/vscode-default-keys-windows/blob/master/CHANGELOG.md";
|
||||
description = "VSCode extension that provides default Windows keybindings on any platform";
|
||||
downloadPage = "https://marketplace.visualstudio.com/items?itemName=smcpeak.default-keys-windows";
|
||||
homepage = "https://github.com/smcpeak/vscode-default-keys-windows";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = [ ];
|
||||
};
|
||||
};
|
||||
|
||||
sonarsource.sonarlint-vscode = buildVscodeMarketplaceExtension {
|
||||
mktplcRef = {
|
||||
name = "sonarlint-vscode";
|
||||
|
|
|
@ -39,15 +39,17 @@ let
|
|||
];
|
||||
|
||||
postFixup = ''
|
||||
mkdir -p $out/share
|
||||
mkdir -p $out/share/{adapter,formatters}
|
||||
# codelldb expects libcodelldb.so to be in the same
|
||||
# directory as the executable, and can't find it in $out/lib.
|
||||
# To make codelldb executable as a standalone,
|
||||
# we put all files in $out/share, and then wrap the binary in $out/bin.
|
||||
mv $out/bin/* $out/share
|
||||
cp $out/lib/* $out/share
|
||||
ln -s ${lldb.lib} $out/lldb
|
||||
makeWrapper $out/share/codelldb $out/bin/codelldb \
|
||||
mv $out/bin/* $out/share/adapter
|
||||
cp $out/lib/* $out/share/adapter
|
||||
cp -r adapter/scripts $out/share/adapter
|
||||
cp -t $out/share/formatters formatters/*.py
|
||||
ln -s ${lldb.lib} $out/share/lldb
|
||||
makeWrapper $out/share/adapter/codelldb $out/bin/codelldb \
|
||||
--set-default LLDB_DEBUGSERVER_PATH "${lldb.out}/bin/lldb-server"
|
||||
'';
|
||||
|
||||
|
@ -125,12 +127,9 @@ in stdenv.mkDerivation {
|
|||
|
||||
mkdir -p $ext/{adapter,formatters}
|
||||
mv -t $ext vsix-extracted/extension/*
|
||||
cp -t $ext/adapter ${adapter}/share/*
|
||||
cp -r ../adapter/scripts $ext/adapter
|
||||
cp -t $ext/ -r ${adapter}/share/*
|
||||
wrapProgram $ext/adapter/codelldb \
|
||||
--set-default LLDB_DEBUGSERVER_PATH "${lldb.out}/bin/lldb-server"
|
||||
cp -t $ext/formatters ../formatters/*.py
|
||||
ln -s ${lldb.lib} $ext/lldb
|
||||
# Mark that all components are installed.
|
||||
touch $ext/platform.ok
|
||||
|
||||
|
|
|
@ -1,59 +0,0 @@
|
|||
diff --git a/cmake/FindPyQt5.cmake b/cmake/FindPyQt5.cmake
|
||||
index b51fd0075e..87ee317e05 100644
|
||||
--- a/cmake/FindPyQt5.cmake
|
||||
+++ b/cmake/FindPyQt5.cmake
|
||||
@@ -25,7 +25,7 @@ ELSE(EXISTS PYQT5_VERSION_STR)
|
||||
IF(SIP_BUILD_EXECUTABLE)
|
||||
# SIP >= 5.0 path
|
||||
|
||||
- FILE(GLOB _pyqt5_metadata "${Python_SITEARCH}/PyQt5-*.dist-info/METADATA")
|
||||
+ FILE(GLOB _pyqt5_metadata "@pyQt5PackageDir@/PyQt5-*.dist-info/METADATA")
|
||||
IF(_pyqt5_metadata)
|
||||
FILE(READ ${_pyqt5_metadata} _pyqt5_metadata_contents)
|
||||
STRING(REGEX REPLACE ".*\nVersion: ([^\n]+).*$" "\\1" PYQT5_VERSION_STR ${_pyqt5_metadata_contents})
|
||||
@@ -34,8 +34,8 @@ ELSE(EXISTS PYQT5_VERSION_STR)
|
||||
ENDIF(_pyqt5_metadata)
|
||||
|
||||
IF(PYQT5_VERSION_STR)
|
||||
- SET(PYQT5_MOD_DIR "${Python_SITEARCH}/PyQt5")
|
||||
- SET(PYQT5_SIP_DIR "${Python_SITEARCH}/PyQt5/bindings")
|
||||
+ SET(PYQT5_MOD_DIR "@pyQt5PackageDir@/PyQt5")
|
||||
+ SET(PYQT5_SIP_DIR "@pyQt5PackageDir@/PyQt5/bindings")
|
||||
FIND_PROGRAM(__pyuic5 "pyuic5")
|
||||
GET_FILENAME_COMPONENT(PYQT5_BIN_DIR ${__pyuic5} DIRECTORY)
|
||||
|
||||
diff --git a/cmake/FindQsci.cmake b/cmake/FindQsci.cmake
|
||||
index 69e41c1fe9..5456c3d59b 100644
|
||||
--- a/cmake/FindQsci.cmake
|
||||
+++ b/cmake/FindQsci.cmake
|
||||
@@ -24,7 +24,7 @@ ELSE(QSCI_MOD_VERSION_STR)
|
||||
IF(SIP_BUILD_EXECUTABLE)
|
||||
# SIP >= 5.0 path
|
||||
|
||||
- FILE(GLOB _qsci_metadata "${Python_SITEARCH}/QScintilla*.dist-info/METADATA")
|
||||
+ FILE(GLOB _qsci_metadata "@qsciPackageDir@/QScintilla*.dist-info/METADATA")
|
||||
IF(_qsci_metadata)
|
||||
FILE(READ ${_qsci_metadata} _qsci_metadata_contents)
|
||||
STRING(REGEX REPLACE ".*\nVersion: ([^\n]+).*$" "\\1" QSCI_MOD_VERSION_STR ${_qsci_metadata_contents})
|
||||
@@ -33,7 +33,7 @@ ELSE(QSCI_MOD_VERSION_STR)
|
||||
ENDIF(_qsci_metadata)
|
||||
|
||||
IF(QSCI_MOD_VERSION_STR)
|
||||
- SET(QSCI_SIP_DIR "${PYQT5_SIP_DIR}")
|
||||
+ SET(QSCI_SIP_DIR "@qsciPackageDir@/PyQt5/bindings")
|
||||
SET(QSCI_FOUND TRUE)
|
||||
ENDIF(QSCI_MOD_VERSION_STR)
|
||||
|
||||
diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt
|
||||
index 4cd19c3af4..668cc6a5e6 100644
|
||||
--- a/python/CMakeLists.txt
|
||||
+++ b/python/CMakeLists.txt
|
||||
@@ -206,7 +206,7 @@ if (WITH_GUI)
|
||||
install(FILES ${QGIS_PYTHON_OUTPUT_DIRECTORY}/_gui.pyi DESTINATION ${QGIS_PYTHON_DIR})
|
||||
endif()
|
||||
if(QSCI_SIP_DIR)
|
||||
- set(SIP_EXTRA_OPTIONS ${SIP_EXTRA_OPTIONS} -I ${QSCI_SIP_DIR})
|
||||
+ set(SIP_BUILD_EXTRA_OPTIONS ${SIP_BUILD_EXTRA_OPTIONS} --include-dir=${QSCI_SIP_DIR})
|
||||
else()
|
||||
message(STATUS "Qsci sip file not found - disabling bindings for derived classes")
|
||||
set(SIP_DISABLE_FEATURES ${SIP_DISABLE_FEATURES} HAVE_QSCI_SIP)
|
|
@ -1,17 +1,17 @@
|
|||
{ lib
|
||||
, callPackage
|
||||
, fetchFromGitHub
|
||||
, fetchpatch
|
||||
, makeWrapper
|
||||
, mkDerivation
|
||||
, substituteAll
|
||||
, wrapGAppsHook
|
||||
, wrapQtAppsHook
|
||||
|
||||
, withGrass ? true
|
||||
, withWebKit ? false
|
||||
|
||||
, bison
|
||||
, cmake
|
||||
, draco
|
||||
, exiv2
|
||||
, fcgi
|
||||
, flex
|
||||
|
@ -25,7 +25,7 @@
|
|||
, netcdf
|
||||
, ninja
|
||||
, openssl
|
||||
# , pdal
|
||||
, pdal
|
||||
, postgresql
|
||||
, proj
|
||||
, protobuf
|
||||
|
@ -36,6 +36,7 @@
|
|||
, qtbase
|
||||
, qtkeychain
|
||||
, qtlocation
|
||||
, qtmultimedia
|
||||
, qtsensors
|
||||
, qtserialport
|
||||
, qtwebkit
|
||||
|
@ -63,8 +64,8 @@ let
|
|||
owslib
|
||||
psycopg2
|
||||
pygments
|
||||
pyqt-builder
|
||||
pyqt5
|
||||
pyqt-builder
|
||||
python-dateutil
|
||||
pytz
|
||||
pyyaml
|
||||
|
@ -76,14 +77,14 @@ let
|
|||
urllib3
|
||||
];
|
||||
in mkDerivation rec {
|
||||
version = "3.28.15";
|
||||
version = "3.34.4";
|
||||
pname = "qgis-ltr-unwrapped";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "qgis";
|
||||
repo = "QGIS";
|
||||
rev = "final-${lib.replaceStrings [ "." ] [ "_" ] version}";
|
||||
hash = "sha256-R6p1MVeCMbaD74Eqn+OLQkTYP+00y9mBucJR1JXPEJ4=";
|
||||
hash = "sha256-yEltpPhNFT/XB1EB5FvhCKcP0YY4j/q7luhd1mI0ZJU=";
|
||||
};
|
||||
|
||||
passthru = {
|
||||
|
@ -94,6 +95,7 @@ in mkDerivation rec {
|
|||
nativeBuildInputs = [
|
||||
makeWrapper
|
||||
wrapGAppsHook
|
||||
wrapQtAppsHook
|
||||
|
||||
bison
|
||||
cmake
|
||||
|
@ -102,32 +104,34 @@ in mkDerivation rec {
|
|||
];
|
||||
|
||||
buildInputs = [
|
||||
openssl
|
||||
proj
|
||||
geos
|
||||
sqlite
|
||||
gsl
|
||||
qwt
|
||||
draco
|
||||
exiv2
|
||||
protobuf
|
||||
fcgi
|
||||
geos
|
||||
gsl
|
||||
hdf5
|
||||
libspatialindex
|
||||
libspatialite
|
||||
postgresql
|
||||
txt2tags
|
||||
libzip
|
||||
hdf5
|
||||
netcdf
|
||||
qtbase
|
||||
qtsensors
|
||||
openssl
|
||||
pdal
|
||||
postgresql
|
||||
proj
|
||||
protobuf
|
||||
qca-qt5
|
||||
qtkeychain
|
||||
qscintilla
|
||||
qt3d
|
||||
qtbase
|
||||
qtkeychain
|
||||
qtlocation
|
||||
qtmultimedia
|
||||
qtsensors
|
||||
qtserialport
|
||||
qtxmlpatterns
|
||||
qt3d
|
||||
# pdal
|
||||
qwt
|
||||
sqlite
|
||||
txt2tags
|
||||
zstd
|
||||
] ++ lib.optional withGrass grass
|
||||
++ lib.optional withWebKit qtwebkit
|
||||
|
@ -135,22 +139,22 @@ in mkDerivation rec {
|
|||
|
||||
patches = [
|
||||
(substituteAll {
|
||||
src = ./set-pyqt-package-dirs-ltr.patch;
|
||||
src = ./set-pyqt-package-dirs.patch;
|
||||
pyQt5PackageDir = "${py.pkgs.pyqt5}/${py.pkgs.python.sitePackages}";
|
||||
qsciPackageDir = "${py.pkgs.qscintilla-qt5}/${py.pkgs.python.sitePackages}";
|
||||
})
|
||||
(fetchpatch {
|
||||
name = "qgis-3.28.9-exiv2-0.28.patch";
|
||||
url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/sci-geosciences/qgis/files/qgis-3.28.9-exiv2-0.28.patch?id=002882203ad6a2b08ce035a18b95844a9f4b85d0";
|
||||
hash = "sha256-mPRo0A7ko4GCHJrfJ2Ls0dUKvkFtDmhKekI2CR9StMw=";
|
||||
})
|
||||
];
|
||||
|
||||
# PDAL is disabled until https://github.com/qgis/QGIS/pull/54940
|
||||
# is backported.
|
||||
# Add path to Qt platform plugins
|
||||
# (offscreen is needed by "${APIS_SRC_DIR}/generate_console_pap.py")
|
||||
preBuild = ''
|
||||
export QT_QPA_PLATFORM_PLUGIN_PATH=${qtbase.bin}/lib/qt-${qtbase.version}/plugins/platforms
|
||||
'';
|
||||
|
||||
cmakeFlags = [
|
||||
"-DCMAKE_BUILD_TYPE=Release"
|
||||
"-DWITH_3D=True"
|
||||
"-DWITH_PDAL=False" # TODO: re-enable PDAL
|
||||
"-DWITH_PDAL=True"
|
||||
"-DENABLE_TESTS=False"
|
||||
] ++ lib.optional (!withWebKit) "-DWITH_QTWEBKIT=OFF"
|
||||
++ lib.optional withGrass (let
|
||||
|
@ -159,6 +163,10 @@ in mkDerivation rec {
|
|||
in "-DGRASS_PREFIX${gmajor}=${grass}/grass${gmajor}${gminor}"
|
||||
);
|
||||
|
||||
qtWrapperArgs = [
|
||||
"--set QT_QPA_PLATFORM_PLUGIN_PATH ${qtbase.bin}/lib/qt-${qtbase.version}/plugins/platforms"
|
||||
];
|
||||
|
||||
dontWrapGApps = true; # wrapper params passed below
|
||||
|
||||
postFixup = lib.optionalString withGrass ''
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
, stdenv
|
||||
, mkDerivation
|
||||
, fetchFromGitHub
|
||||
, makeDesktopItem
|
||||
, copyDesktopItems
|
||||
, cmake
|
||||
, boost
|
||||
, cgal
|
||||
|
@ -23,13 +25,13 @@
|
|||
|
||||
mkDerivation rec {
|
||||
pname = "cloudcompare";
|
||||
version = "2.13";
|
||||
version = "2.13.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "CloudCompare";
|
||||
repo = "CloudCompare";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-tCmIdajizaTT1tvPA7YQoklfz7pYVKS0lJXrxV2fidg=";
|
||||
hash = "sha256-QQwQt63tXxJnGaBLu+GvWkEazumYPhXnDe+giSu7wjk=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
|
@ -37,6 +39,7 @@ mkDerivation rec {
|
|||
cmake
|
||||
eigen # header-only
|
||||
wrapGAppsHook
|
||||
copyDesktopItems
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
|
@ -96,12 +99,15 @@ mkDerivation rec {
|
|||
dontWrapGApps = true;
|
||||
|
||||
postInstall = ''
|
||||
install -Dm444 $src/snap/gui/{ccViewer,cloudcompare}.png -t $out/share/icons/hicolor/256x256/apps
|
||||
install -Dm444 $src/snap/gui/{ccViewer,cloudcompare}.desktop -t $out/share/applications
|
||||
substituteInPlace $out/share/applications/{ccViewer,cloudcompare}.desktop \
|
||||
--replace 'Exec=cloudcompare.' 'Exec=' \
|
||||
--replace 'Icon=''${SNAP}/meta/gui/' 'Icon=' \
|
||||
--replace '.png' ""
|
||||
install -Dm444 $src/qCC/images/icon/cc_icon_16.png $out/share/icons/hicolor/16x16/apps/CloudCompare.png
|
||||
install -Dm444 $src/qCC/images/icon/cc_icon_32.png $out/share/icons/hicolor/32x32/apps/CloudCompare.png
|
||||
install -Dm444 $src/qCC/images/icon/cc_icon_64.png $out/share/icons/hicolor/64x64/apps/CloudCompare.png
|
||||
install -Dm444 $src/qCC/images/icon/cc_icon_256.png $out/share/icons/hicolor/256x256/apps/CloudCompare.png
|
||||
|
||||
install -Dm444 $src/qCC/images/icon/cc_viewer_icon_16.png $out/share/icons/hicolor/16x16/apps/ccViewer.png
|
||||
install -Dm444 $src/qCC/images/icon/cc_viewer_icon_32.png $out/share/icons/hicolor/32x32/apps/ccViewer.png
|
||||
install -Dm444 $src/qCC/images/icon/cc_viewer_icon_64.png $out/share/icons/hicolor/64x64/apps/ccViewer.png
|
||||
install -Dm444 $src/qCC/images/icon/cc_viewer_icon_256.png $out/share/icons/hicolor/256x256/apps/ccViewer.png
|
||||
'';
|
||||
|
||||
# fix file dialogs crashing on non-NixOS (and avoid double wrapping)
|
||||
|
@ -109,11 +115,35 @@ mkDerivation rec {
|
|||
qtWrapperArgs+=("''${gappsWrapperArgs[@]}")
|
||||
'';
|
||||
|
||||
desktopItems = [
|
||||
(makeDesktopItem {
|
||||
name = "CloudCompare";
|
||||
desktopName = "CloudCompare";
|
||||
comment = "3D point cloud and mesh processing software";
|
||||
exec = "CloudCompare";
|
||||
terminal = false;
|
||||
categories = [ "Graphics" "3DGraphics" "Viewer" ];
|
||||
keywords = [ "3d" "processing" ];
|
||||
icon = "CloudCompare";
|
||||
})
|
||||
(makeDesktopItem {
|
||||
name = "ccViewer";
|
||||
desktopName = "CloudCompare Viewer";
|
||||
comment = "3D point cloud and mesh processing software";
|
||||
exec = "ccViewer";
|
||||
terminal = false;
|
||||
categories = [ "Graphics" "3DGraphics" "Viewer" ];
|
||||
keywords = [ "3d" "viewer" ];
|
||||
icon = "ccViewer";
|
||||
})
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "3D point cloud and mesh processing software";
|
||||
homepage = "https://cloudcompare.org";
|
||||
license = licenses.gpl2Plus;
|
||||
maintainers = with maintainers; [ nh2 ];
|
||||
mainProgram = "CloudCompare";
|
||||
platforms = with platforms; linux; # only tested here; might work on others
|
||||
};
|
||||
}
|
||||
|
|
|
@ -42,7 +42,7 @@ clangStdenv.mkDerivation rec {
|
|||
mainProgram = "PikoPixel";
|
||||
homepage = "https://twilightedge.com/mac/pikopixel/";
|
||||
downloadPage = "https://twilightedge.com/mac/pikopixel/";
|
||||
license = licenses.agpl3;
|
||||
license = licenses.agpl3Plus;
|
||||
maintainers = with maintainers; [ fgaz ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
|
|
|
@ -169,7 +169,7 @@ stdenv.mkDerivation rec {
|
|||
meta = with lib; {
|
||||
description = "PC Software for BambuLab's 3D printers";
|
||||
homepage = "https://github.com/bambulab/BambuStudio";
|
||||
license = licenses.agpl3;
|
||||
license = licenses.agpl3Plus;
|
||||
maintainers = with maintainers; [ zhaofengli ];
|
||||
mainProgram = "bambu-studio";
|
||||
platforms = platforms.linux;
|
||||
|
|
|
@ -27,7 +27,7 @@ let
|
|||
meta = with lib; {
|
||||
description = "Enables printing directly to OctoPrint and monitoring the process";
|
||||
homepage = "https://github.com/fieldOfView/Cura-OctoPrintPlugin";
|
||||
license = licenses.agpl3;
|
||||
license = licenses.agpl3Plus;
|
||||
maintainers = with maintainers; [ gebner ];
|
||||
};
|
||||
};
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue