Merge master into haskell-updates

This commit is contained in:
github-actions[bot]
2024-09-06 00:15:14 +00:00
committed by GitHub
320 changed files with 10289 additions and 5834 deletions
+1 -1
View File
@@ -580,7 +580,7 @@ After unpacking all of `src` and `srcs`, if neither of `sourceRoot` and `setSour
If `unpackPhase` produces multiple source directories, you should set `sourceRoot` to the name of the intended directory.
You can also set `sourceRoot = ".";` if you want to control it yourself in a later phase.
For example, if your want your build to start in a sub-directory inside your sources, and you are using `fetchzip`-derived `src` (like `fetchFromGitHub` or similar), you need to set `sourceRoot = "${src.name}/my-sub-directory"`.
For example, if you want your build to start in a sub-directory inside your sources, and you are using `fetchzip`-derived `src` (like `fetchFromGitHub` or similar), you need to set `sourceRoot = "${src.name}/my-sub-directory"`.
##### `setSourceRoot` {#var-stdenv-setSourceRoot}
+43 -7
View File
@@ -2279,6 +2279,11 @@
github = "barinov274";
githubId = 54442153;
};
BarrOff = {
name = "BarrOff";
github = "BarrOff";
githubId = 58253563;
};
barrucadu = {
email = "mike@barrucadu.co.uk";
github = "barrucadu";
@@ -3190,6 +3195,15 @@
{ fingerprint = "208A 2A66 8A2F CDE7 B5D3 8F64 CDDC 792F 6552 51ED"; }
];
};
cageyv = {
email = "pingme@cageyv.dev";
github = "cageyv";
githubId = 51059484;
name = "Vladmir Samoylov";
keys = [
{ fingerprint = "8916 F727 734E 77AB 437F A33A 19AB 76F5 CEE1 1392"; }
];
};
CaitlinDavitt = {
email = "CaitlinDavitt@gmail.com";
github = "CaitlinDavitt";
@@ -5792,6 +5806,14 @@
githubId = 119483;
name = "Matthew Brown";
};
edgar-vincent = {
name = "Edgar Vincent";
email = "e-v@posteo.net";
matrix = "@edgar.vincent:matrix.org";
github = "edgar-vincent";
githubId = 63352906;
keys = [ { fingerprint = "922F CA48 5FDB 20B1 ED1B A61F 284D 11D3 33C4 D21B"; } ];
};
edlimerkaj = {
name = "Edli Merkaj";
email = "edli.merkaj@identinet.io";
@@ -12015,13 +12037,6 @@
githubId = 4969294;
name = "Louis Tim Larsen";
};
loveisgrief = {
name = "LoveIsGrief";
email = "loveisgrief@tuta.io";
github = "LoveIsGrief";
githubId = 2829538;
keys = [ { fingerprint = "9847 4F48 18C6 4E0A F0C5 3529 E96D 1EDF A053 45EB"; } ];
};
lovek323 = {
email = "jason@oconal.id.au";
github = "lovek323";
@@ -20980,6 +20995,14 @@
github = "tirimia";
githubId = 11174371;
};
titaniumtown = {
email = "titaniumtown@proton.me";
name = "Simon Gardling";
github = "titaniumtown";
githubId = 11786225;
matrix = "@titaniumtown:envs.net";
keys = [ { fingerprint = "D15E 4754 FE1A EDA1 5A6D 4702 9AB2 8AC1 0ECE 533D"; } ];
};
tjni = {
email = "43ngvg@masqt.com";
matrix = "@tni:matrix.org";
@@ -21491,6 +21514,13 @@
githubId = 12422133;
name = "Chromo-residuum-opec";
};
uku3lig = {
name = "uku";
email = "hi@uku.moe";
matrix = "@uku:m.uku.moe";
github = "uku3lig";
githubId = 61147779;
};
ulrikstrid = {
email = "ulrik.strid@outlook.com";
github = "ulrikstrid";
@@ -21793,6 +21823,12 @@
github = "vector1dev";
githubId = 127302590;
};
vedantmgoyal9 = {
name = "Vedant Mohan Goyal";
matrix = "@vedantmgoyal:beeper.com";
github = "vedantmgoyal9";
githubId = 83997633;
};
veehaitch = {
name = "Vincent Haupert";
email = "mail@vincent-haupert.de";
@@ -4,11 +4,10 @@
## Highlights {#sec-release-24.11-highlights}
- **This will be the latest version of Nixpkgs to support macOS 10.12 (Sierra).**
Starting with release 25.05, the minimum supported version will be macOS 11 (Big Sur).
From that point on, packages may or may not work on older releases of macOS.
Users on old macOS versions should consider upgrading to a supported OS release (potentially using [OpenCore Legacy Patcher](https://dortania.github.io/OpenCore-Legacy-Patcher/) for old hardware) or installing NixOS.
If neither of those options are viable and you require new versions of software, [MacPorts](https://www.macports.org/) supports back to OS X 10.6 (Snow Leopard).
- **This will be the last release of Nixpkgs to support macOS Sierra 10.12 to macOS Catalina 10.15.**
Starting with release 25.05, the minimum supported version will be macOS Big Sur 11, and we cannot guarantee that packages will continue to work on older versions of macOS.
Users on old macOS versions should consider upgrading to a supported version (potentially using [OpenCore Legacy Patcher](https://dortania.github.io/OpenCore-Legacy-Patcher/) for old hardware) or installing NixOS.
If neither of those options are viable and you require new versions of software, [MacPorts](https://www.macports.org/) supports back to Mac OS X Snow Leopard 10.6.
- Convenience options for `amdgpu`, open source driver for Radeon cards, is now available under `hardware.amdgpu`.
@@ -335,10 +334,6 @@
- `zx` was updated to v8, which introduces several breaking changes.
See the [v8 changelog](https://github.com/google/zx/releases/tag/8.0.0) for more information.
- `system.stateVersion` is now validated. If you never changed this yourself, you don't need to do anything. If your `stateVersion` is not a valid NixOS release version (e.g. "24.11" is valid),
your system was already at risk of experiencing silent incompatible state updates. If your previous value is a well-formed version but not a valid release (e.g. "23.12"),
round down to the nearest actual release. If it wasn't a well-formed version (e.g. "nixos-unstable"), set it to the version of NixOS that you originally installed.
- The `portunus` package and service do not support weak password hashes anymore.
If you installed Portunus on NixOS 23.11 or earlier, upgrade to NixOS 24.05 first to get support for strong password hashing.
Then, follow the instructions on the [upstream release notes](https://github.com/majewsky/portunus/releases/tag/v2.0.0) to upgrade all existing user accounts to strong password hashes.
@@ -403,9 +398,15 @@
- The `antennas` package and the `services.antennas` module have been
removed as they only work with `tvheadend` (see above).
- The `system.build.brightboxImage` image has been removed as It did not build anymore and has not seen any maintenance in over 7 years (excluding tree-wide changes).
- The `services.syncplay` module now exposes all currently available command-line arguments for `syncplay-server` as options, as well as a `useACMEHost` option for easy TLS setup.
The systemd service now uses `DynamicUser`/`StateDirectory` and the `user` and `group` options have been deprecated.
- The `openlens` package got removed, suggested replacment `lens-desktop`
- The NixOS installation media no longer support the ReiserFS or JFS file systems by default.
## Other Notable Changes {#sec-release-24.11-notable-changes}
<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->
+2 -45
View File
@@ -44,49 +44,6 @@ let
};
initrdRelease = pkgs.writeText "initrd-release" (attrsToText initrdReleaseContents);
checkRelease = version:
let
parts = lib.versions.splitVersion version;
isVersion = lib.length parts == 2 && lib.all (p: lib.stringLength p == 2) parts;
majorVersion = lib.toIntBase10 (lib.elemAt parts 0);
minorVersion = lib.elemAt parts 1;
versionPatterns = [
# only 13.10
{ fromMajor = 13; minor = [ "10" ]; }
# 14.04 and 14.12
{ fromMajor = 14; minor = [ "04" "12" ]; }
# only 15.09
{ fromMajor = 15; minor = [ "09" ]; }
# 16.03 to 20.09
{ fromMajor = 16; minor = [ "03" "09" ]; }
# from 21.05
{ fromMajor = 21; minor = [ "05" "11" ]; }
];
# find the versioning pattern that applies by looking for the first
# major version newer than `majorVersion`, and picking the previous pattern
patternIndex = lib.lists.findFirstIndex
({ fromMajor, ... }: fromMajor > majorVersion)
(lib.length versionPatterns)
versionPatterns;
validMinorVersions =
if patternIndex == 0
then []
else (lib.elemAt versionPatterns (patternIndex - 1)).minor;
correctMinorVersion = lib.elem minorVersion validMinorVersions;
notNewerThanNixpkgs = lib.versionAtLeast trivial.release version;
in isVersion && correctMinorVersion && notNewerThanNixpkgs;
releaseType = types.addCheck
(types.strMatching "[[:digit:]]{2}\\.[[:digit:]]{2}")
checkRelease // {
name = "nixosRelease";
description = "NixOS release version, e.g. \"${trivial.release}\"";
descriptionClass = "nonRestrictiveClause";
};
in
{
imports = [
@@ -113,7 +70,7 @@ in
release = mkOption {
readOnly = true;
type = releaseType;
type = types.str;
default = trivial.release;
description = "The NixOS release (e.g. `16.03`).";
};
@@ -194,7 +151,7 @@ in
};
stateVersion = mkOption {
type = releaseType;
type = types.str;
# TODO Remove this and drop the default of the option so people are forced to set it.
# Doing this also means fixing the comment in nixos/modules/testing/test-instrumentation.nix
apply = v:
+1
View File
@@ -363,6 +363,7 @@
./security/systemd-confinement.nix
./security/tpm2.nix
./security/wrappers/default.nix
./services/accessibility/orca.nix
./services/accessibility/speechd.nix
./services/admin/docuum.nix
./services/admin/meshcentral.nix
+1 -1
View File
@@ -50,7 +50,7 @@
# Include support for various filesystems and tools to create / manipulate them.
boot.supportedFilesystems =
[ "btrfs" "cifs" "f2fs" "jfs" "ntfs" "reiserfs" "vfat" "xfs" ] ++
[ "btrfs" "cifs" "f2fs" "ntfs" "vfat" "xfs" ] ++
lib.optional (lib.meta.availableOn pkgs.stdenv.hostPlatform config.boot.zfs.package) "zfs";
# Configure host id for ZFS to work
+137 -138
View File
@@ -1,5 +1,4 @@
{ config, lib, pkgs, options, ... }:
with lib;
let
@@ -8,11 +7,11 @@ let
user = if cfg.useRoot then "root" else "acme";
# Used to calculate timer accuracy for coalescing
numCerts = length (builtins.attrNames cfg.certs);
numCerts = lib.length (builtins.attrNames cfg.certs);
_24hSecs = 60 * 60 * 24;
# Used to make unique paths for each cert/account config set
mkHash = with builtins; val: substring 0 20 (hashString "sha256" val);
mkHash = with builtins; val: lib.substring 0 20 (hashString "sha256" val);
mkAccountHash = acmeServer: data: mkHash "${toString acmeServer} ${data.keyType} ${data.email}";
accountDirRoot = "/var/lib/acme/.lego/accounts/";
@@ -29,7 +28,7 @@ let
else
[{ fst = head workingBaseList; snd = head needAssignmentList;}] ++
_rrCycler origBaseList (if (tail workingBaseList == []) then origBaseList else tail workingBaseList) (tail needAssignmentList);
attrsToList = mapAttrsToList (attrname: attrval: {name = attrname; value = attrval;});
attrsToList = lib.mapAttrsToList (attrname: attrval: {name = attrname; value = attrval;});
# for an AttrSet `funcsAttrs` having functions as values, apply single arguments from
# `argsList` to them in a round-robin manner.
# Returns an attribute set with the applied functions as values.
@@ -57,7 +56,7 @@ let
commonServiceConfig = {
Type = "oneshot";
User = user;
Group = mkDefault "acme";
Group = lib.mkDefault "acme";
UMask = "0022";
StateDirectoryMode = "750";
ProtectSystem = "strict";
@@ -136,8 +135,8 @@ let
userMigrationService = let
script = with builtins; ''
chown -R ${user} .lego/accounts
'' + (concatStringsSep "\n" (mapAttrsToList (cert: data: ''
for fixpath in ${escapeShellArg cert} .lego/${escapeShellArg cert}; do
'' + (lib.concatStringsSep "\n" (lib.mapAttrsToList (cert: data: ''
for fixpath in ${lib.escapeShellArg cert} .lego/${lib.escapeShellArg cert}; do
if [ -d "$fixpath" ]; then
chmod -R u=rwX,g=rX,o= "$fixpath"
chown -R ${user}:${data.group} "$fixpath"
@@ -166,7 +165,7 @@ let
# ensure all required lock files exist, but none more
script = ''
GLOBIGNORE="${concatStringsSep ":" concurrencyLockfiles}"
GLOBIGNORE="${lib.concatStringsSep ":" concurrencyLockfiles}"
rm -f *
unset GLOBIGNORE
@@ -186,7 +185,7 @@ let
useDns = data.dnsProvider != null;
useDnsOrS3 = useDns || data.s3Bucket != null;
destPath = "/var/lib/acme/${cert}";
selfsignedDeps = optionals (cfg.preliminarySelfsigned) [ "acme-selfsigned-${cert}.service" ];
selfsignedDeps = lib.optionals (cfg.preliminarySelfsigned) [ "acme-selfsigned-${cert}.service" ];
# Minica and lego have a "feature" which replaces * with _. We need
# to make this substitution to reference the output files from both programs.
@@ -196,7 +195,7 @@ let
# FIXME when mkChangedOptionModule supports submodules, change to that.
# This is a workaround
extraDomains = data.extraDomainNames ++ (
optionals
lib.optionals
(data.extraDomains != "_mkMergedOptionModule")
(builtins.attrNames data.extraDomains)
);
@@ -204,22 +203,22 @@ let
# Create hashes for cert data directories based on configuration
# Flags are separated to avoid collisions
hashData = with builtins; ''
${concatStringsSep " " data.extraLegoFlags} -
${concatStringsSep " " data.extraLegoRunFlags} -
${concatStringsSep " " data.extraLegoRenewFlags} -
${lib.concatStringsSep " " data.extraLegoFlags} -
${lib.concatStringsSep " " data.extraLegoRunFlags} -
${lib.concatStringsSep " " data.extraLegoRenewFlags} -
${toString acmeServer} ${toString data.dnsProvider}
${toString data.ocspMustStaple} ${data.keyType}
'';
certDir = mkHash hashData;
# TODO remove domainHash usage entirely. Waiting on go-acme/lego#1532
domainHash = mkHash "${concatStringsSep " " extraDomains} ${data.domain}";
domainHash = mkHash "${lib.concatStringsSep " " extraDomains} ${data.domain}";
accountHash = (mkAccountHash acmeServer data);
accountDir = accountDirRoot + accountHash;
protocolOpts = if useDns then (
[ "--dns" data.dnsProvider ]
++ optionals (!data.dnsPropagationCheck) [ "--dns.disable-cp" ]
++ optionals (data.dnsResolver != null) [ "--dns.resolvers" data.dnsResolver ]
++ lib.optionals (!data.dnsPropagationCheck) [ "--dns.disable-cp" ]
++ lib.optionals (data.dnsResolver != null) [ "--dns.resolvers" data.dnsResolver ]
) else if data.s3Bucket != null then [ "--http" "--http.s3-bucket" data.s3Bucket ]
else if data.listenHTTP != null then [ "--http" "--http.port" data.listenHTTP ]
else [ "--http" "--http.webroot" data.webroot ];
@@ -231,22 +230,22 @@ let
"--email" data.email
"--key-type" data.keyType
] ++ protocolOpts
++ optionals (acmeServer != null) [ "--server" acmeServer ]
++ concatMap (name: [ "-d" name ]) extraDomains
++ lib.optionals (acmeServer != null) [ "--server" acmeServer ]
++ lib.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 (
runOpts = lib.escapeShellArgs (
commonOpts
++ [ "run" ]
++ optionals data.ocspMustStaple [ "--must-staple" ]
++ lib.optionals data.ocspMustStaple [ "--must-staple" ]
++ data.extraLegoRunFlags
);
renewOpts = escapeShellArgs (
renewOpts = lib.escapeShellArgs (
commonOpts
++ [ "renew" "--no-random-sleep" ]
++ optionals data.ocspMustStaple [ "--must-staple" ]
++ lib.optionals data.ocspMustStaple [ "--must-staple" ]
++ data.extraLegoRenewFlags
);
@@ -286,8 +285,8 @@ let
selfsignService = lockfileName: {
description = "Generate self-signed certificate for ${cert}";
after = [ "acme-selfsigned-ca.service" "acme-fixperms.service" ] ++ optional (cfg.maxConcurrentRenewals > 0) "acme-lockfiles.service";
requires = [ "acme-selfsigned-ca.service" "acme-fixperms.service" ] ++ optional (cfg.maxConcurrentRenewals > 0) "acme-lockfiles.service";
after = [ "acme-selfsigned-ca.service" "acme-fixperms.service" ] ++ lib.optional (cfg.maxConcurrentRenewals > 0) "acme-lockfiles.service";
requires = [ "acme-selfsigned-ca.service" "acme-fixperms.service" ] ++ lib.optional (cfg.maxConcurrentRenewals > 0) "acme-lockfiles.service";
path = with pkgs; [ minica ];
@@ -315,7 +314,7 @@ let
minica \
--ca-key ca/key.pem \
--ca-cert ca/cert.pem \
--domains ${escapeShellArg (builtins.concatStringsSep "," ([ data.domain ] ++ extraDomains))}
--domains ${lib.escapeShellArg (builtins.concatStringsSep "," ([ data.domain ] ++ extraDomains))}
# Create files to match directory layout for real certificates
cd '${keyName}'
@@ -334,11 +333,11 @@ let
renewService = lockfileName: {
description = "Renew ACME certificate for ${cert}";
after = [ "network.target" "network-online.target" "acme-fixperms.service" "nss-lookup.target" ] ++ selfsignedDeps ++ optional (cfg.maxConcurrentRenewals > 0) "acme-lockfiles.service";
wants = [ "network-online.target" "acme-fixperms.service" ] ++ selfsignedDeps ++ optional (cfg.maxConcurrentRenewals > 0) "acme-lockfiles.service";
after = [ "network.target" "network-online.target" "acme-fixperms.service" "nss-lookup.target" ] ++ selfsignedDeps ++ lib.optional (cfg.maxConcurrentRenewals > 0) "acme-lockfiles.service";
wants = [ "network-online.target" "acme-fixperms.service" ] ++ selfsignedDeps ++ lib.optional (cfg.maxConcurrentRenewals > 0) "acme-lockfiles.service";
# https://github.com/NixOS/nixpkgs/pull/81371#issuecomment-605526099
wantedBy = optionals (!config.boot.isContainer) [ "multi-user.target" ];
wantedBy = lib.optionals (!config.boot.isContainer) [ "multi-user.target" ];
path = with pkgs; [ lego coreutils diffutils openssl ];
@@ -368,33 +367,33 @@ let
"/var/lib/acme/.lego/${cert}/${certDir}:/tmp/certificates"
];
EnvironmentFile = mkIf useDnsOrS3 data.environmentFile;
EnvironmentFile = lib.mkIf useDnsOrS3 data.environmentFile;
Environment = mkIf useDnsOrS3
(mapAttrsToList (k: v: ''"${k}=%d/${k}"'') data.credentialFiles);
Environment = lib.mkIf useDnsOrS3
(lib.mapAttrsToList (k: v: ''"${k}=%d/${k}"'') data.credentialFiles);
LoadCredential = mkIf useDnsOrS3
(mapAttrsToList (k: v: "${k}:${v}") data.credentialFiles);
LoadCredential = lib.mkIf useDnsOrS3
(lib.mapAttrsToList (k: v: "${k}:${v}") data.credentialFiles);
# Run as root (Prefixed with +)
ExecStartPost = "+" + (pkgs.writeShellScript "acme-postrun" ''
cd /var/lib/acme/${escapeShellArg cert}
cd /var/lib/acme/${lib.escapeShellArg cert}
if [ -e renewed ]; then
rm renewed
${data.postRun}
${optionalString (data.reloadServices != [])
"systemctl --no-block try-reload-or-restart ${escapeShellArgs data.reloadServices}"
${lib.optionalString (data.reloadServices != [])
"systemctl --no-block try-reload-or-restart ${lib.escapeShellArgs data.reloadServices}"
}
fi
'');
} // optionalAttrs (data.listenHTTP != null && toInt (last (splitString ":" data.listenHTTP)) < 1024) {
} // lib.optionalAttrs (data.listenHTTP != null && lib.toInt (lib.last (lib.splitString ":" data.listenHTTP)) < 1024) {
CapabilityBoundingSet = [ "CAP_NET_BIND_SERVICE" ];
AmbientCapabilities = [ "CAP_NET_BIND_SERVICE" ];
};
# Working directory will be /tmp
script = (if (lockfileName == null) then lib.id else wrapInFlock "${lockdir}${lockfileName}") ''
${optionalString data.enableDebugLogs "set -x"}
${lib.optionalString data.enableDebugLogs "set -x"}
set -euo pipefail
# This reimplements the expiration date check, but without querying
@@ -425,7 +424,7 @@ let
[[ $expiration_days -gt ${toString data.validMinDays} ]]
}
${optionalString (data.webroot != null) ''
${lib.optionalString (data.webroot != null) ''
# Ensure the webroot exists. Fixing group is required in case configuration was changed between runs.
# Lego will fail if the webroot does not exist at all.
(
@@ -461,7 +460,7 @@ let
# Produce a nice error for those doing their first nixos-rebuild with these certs
echo Failed to fetch certificates. \
This may mean your DNS records are set up incorrectly. \
${optionalString (cfg.preliminarySelfsigned) "Selfsigned certs are in place and dependant services will still start."}
${lib.optionalString (cfg.preliminarySelfsigned) "Selfsigned certs are in place and dependant services will still start."}
# Exit 10 so that users can potentially amend SuccessExitStatus to ignore this error.
# High number to avoid Systemd reserved codes.
exit 10
@@ -490,7 +489,7 @@ let
};
};
certConfigs = mapAttrs certToConfig cfg.certs;
certConfigs = lib.mapAttrs certToConfig cfg.certs;
# These options can be specified within
# security.acme.defaults or security.acme.certs.<name>
@@ -504,22 +503,22 @@ let
# stay constant. Though notably it wouldn't matter much, because to get
# the option information, a submodule with name `<name>` is evaluated
# without any definitions.
defaultText = if isDefaults then default else literalExpression "config.security.acme.defaults.${name}";
defaultText = if isDefaults then default else lib.literalExpression "config.security.acme.defaults.${name}";
};
in {
imports = [
(mkRenamedOptionModule [ "credentialsFile" ] [ "environmentFile" ])
(lib.mkRenamedOptionModule [ "credentialsFile" ] [ "environmentFile" ])
];
options = {
validMinDays = mkOption {
type = types.int;
validMinDays = lib.mkOption {
type = lib.types.int;
inherit (defaultAndText "validMinDays" 30) default defaultText;
description = "Minimum remaining validity before renewal in days.";
};
renewInterval = mkOption {
type = types.str;
renewInterval = lib.mkOption {
type = lib.types.str;
inherit (defaultAndText "renewInterval" "daily") default defaultText;
description = ''
Systemd calendar expression when to check for renewal. See
@@ -527,12 +526,12 @@ let
'';
};
enableDebugLogs = mkEnableOption "debug logging for this certificate" // {
enableDebugLogs = lib.mkEnableOption "debug logging for this certificate" // {
inherit (defaultAndText "enableDebugLogs" true) default defaultText;
};
webroot = mkOption {
type = types.nullOr types.str;
webroot = lib.mkOption {
type = lib.types.nullOr lib.types.str;
inherit (defaultAndText "webroot" null) default defaultText;
example = "/var/lib/acme/acme-challenge";
description = ''
@@ -544,8 +543,8 @@ let
'';
};
server = mkOption {
type = types.nullOr types.str;
server = lib.mkOption {
type = lib.types.nullOr lib.types.str;
inherit (defaultAndText "server" "https://acme-v02.api.letsencrypt.org/directory") default defaultText;
example = "https://acme-staging-v02.api.letsencrypt.org/directory";
description = ''
@@ -556,8 +555,8 @@ let
'';
};
email = mkOption {
type = types.nullOr types.str;
email = lib.mkOption {
type = lib.types.nullOr lib.types.str;
inherit (defaultAndText "email" null) default defaultText;
description = ''
Email address for account creation and correspondence from the CA.
@@ -566,14 +565,14 @@ let
'';
};
group = mkOption {
type = types.str;
group = lib.mkOption {
type = lib.types.str;
inherit (defaultAndText "group" "acme") default defaultText;
description = "Group running the ACME client.";
};
reloadServices = mkOption {
type = types.listOf types.str;
reloadServices = lib.mkOption {
type = lib.types.listOf lib.types.str;
inherit (defaultAndText "reloadServices" []) default defaultText;
description = ''
The list of systemd services to call `systemctl try-reload-or-restart`
@@ -581,8 +580,8 @@ let
'';
};
postRun = mkOption {
type = types.lines;
postRun = lib.mkOption {
type = lib.types.lines;
inherit (defaultAndText "postRun" "") default defaultText;
example = "cp full.pem backup.pem";
description = ''
@@ -593,8 +592,8 @@ let
'';
};
keyType = mkOption {
type = types.str;
keyType = lib.mkOption {
type = lib.types.str;
inherit (defaultAndText "keyType" "ec256") default defaultText;
description = ''
Key type to use for private keys.
@@ -603,8 +602,8 @@ let
'';
};
dnsProvider = mkOption {
type = types.nullOr types.str;
dnsProvider = lib.mkOption {
type = lib.types.nullOr lib.types.str;
inherit (defaultAndText "dnsProvider" null) default defaultText;
example = "route53";
description = ''
@@ -613,8 +612,8 @@ let
'';
};
dnsResolver = mkOption {
type = types.nullOr types.str;
dnsResolver = lib.mkOption {
type = lib.types.nullOr lib.types.str;
inherit (defaultAndText "dnsResolver" null) default defaultText;
example = "1.1.1.1:53";
description = ''
@@ -624,8 +623,8 @@ let
'';
};
environmentFile = mkOption {
type = types.nullOr types.path;
environmentFile = lib.mkOption {
type = lib.types.nullOr lib.types.path;
inherit (defaultAndText "environmentFile" null) default defaultText;
description = ''
Path to an EnvironmentFile for the cert's service containing any required and
@@ -636,8 +635,8 @@ let
example = "/var/src/secrets/example.org-route53-api-token";
};
credentialFiles = mkOption {
type = types.attrsOf (types.path);
credentialFiles = lib.mkOption {
type = lib.types.attrsOf (lib.types.path);
inherit (defaultAndText "credentialFiles" {}) default defaultText;
description = ''
Environment variables suffixed by "_FILE" to set for the cert's service
@@ -647,15 +646,15 @@ let
This allows to securely pass credential files to lego by leveraging systemd
credentials.
'';
example = literalExpression ''
example = lib.literalExpression ''
{
"RFC2136_TSIG_SECRET_FILE" = "/run/secrets/tsig-secret-example.org";
}
'';
};
dnsPropagationCheck = mkOption {
type = types.bool;
dnsPropagationCheck = lib.mkOption {
type = lib.types.bool;
inherit (defaultAndText "dnsPropagationCheck" true) default defaultText;
description = ''
Toggles lego DNS propagation check, which is used alongside DNS-01
@@ -663,8 +662,8 @@ let
'';
};
ocspMustStaple = mkOption {
type = types.bool;
ocspMustStaple = lib.mkOption {
type = lib.types.bool;
inherit (defaultAndText "ocspMustStaple" false) default defaultText;
description = ''
Turns on the OCSP Must-Staple TLS extension.
@@ -675,24 +674,24 @@ let
'';
};
extraLegoFlags = mkOption {
type = types.listOf types.str;
extraLegoFlags = lib.mkOption {
type = lib.types.listOf lib.types.str;
inherit (defaultAndText "extraLegoFlags" []) default defaultText;
description = ''
Additional global flags to pass to all lego commands.
'';
};
extraLegoRenewFlags = mkOption {
type = types.listOf types.str;
extraLegoRenewFlags = lib.mkOption {
type = lib.types.listOf lib.types.str;
inherit (defaultAndText "extraLegoRenewFlags" []) default defaultText;
description = ''
Additional flags to pass to lego renew.
'';
};
extraLegoRunFlags = mkOption {
type = types.listOf types.str;
extraLegoRunFlags = lib.mkOption {
type = lib.types.listOf lib.types.str;
inherit (defaultAndText "extraLegoRunFlags" []) default defaultText;
description = ''
Additional flags to pass to lego run.
@@ -704,40 +703,40 @@ let
certOpts = { name, config, ... }: {
options = {
# user option has been removed
user = mkOption {
user = lib.mkOption {
visible = false;
default = "_mkRemovedOptionModule";
};
# allowKeysForGroup option has been removed
allowKeysForGroup = mkOption {
allowKeysForGroup = lib.mkOption {
visible = false;
default = "_mkRemovedOptionModule";
};
# extraDomains was replaced with extraDomainNames
extraDomains = mkOption {
extraDomains = lib.mkOption {
visible = false;
default = "_mkMergedOptionModule";
};
directory = mkOption {
type = types.str;
directory = lib.mkOption {
type = lib.types.str;
readOnly = true;
default = "/var/lib/acme/${name}";
description = "Directory where certificate and other state is stored.";
};
domain = mkOption {
type = types.str;
domain = lib.mkOption {
type = lib.types.str;
default = name;
description = "Domain to fetch certificate for (defaults to the entry name).";
};
extraDomainNames = mkOption {
type = types.listOf types.str;
extraDomainNames = lib.mkOption {
type = lib.types.listOf lib.types.str;
default = [];
example = literalExpression ''
example = lib.literalExpression ''
[
"example.org"
"mydomain.org"
@@ -751,8 +750,8 @@ let
# This setting must be different for each configured certificate, otherwise
# two or more renewals may fail to bind to the address. Hence, it is not in
# the inheritableOpts.
listenHTTP = mkOption {
type = types.nullOr types.str;
listenHTTP = lib.mkOption {
type = lib.types.nullOr lib.types.str;
default = null;
example = ":1360";
description = ''
@@ -762,8 +761,8 @@ let
'';
};
s3Bucket = mkOption {
type = types.nullOr types.str;
s3Bucket = lib.mkOption {
type = lib.types.nullOr lib.types.str;
default = null;
example = "acme";
description = ''
@@ -771,7 +770,7 @@ let
'';
};
inheritDefaults = mkOption {
inheritDefaults = lib.mkOption {
default = true;
example = true;
description = "Whether to inherit values set in `security.acme.defaults` or not.";
@@ -784,8 +783,8 @@ in {
options = {
security.acme = {
preliminarySelfsigned = mkOption {
type = types.bool;
preliminarySelfsigned = lib.mkOption {
type = lib.types.bool;
default = true;
description = ''
Whether a preliminary self-signed certificate should be generated before
@@ -797,8 +796,8 @@ in {
'';
};
acceptTerms = mkOption {
type = types.bool;
acceptTerms = lib.mkOption {
type = lib.types.bool;
default = false;
description = ''
Accept the CA's terms of service. The default provider is Let's Encrypt,
@@ -806,8 +805,8 @@ in {
'';
};
useRoot = mkOption {
type = types.bool;
useRoot = lib.mkOption {
type = lib.types.bool;
default = false;
description = ''
Whether to use the root user when generating certs. This is not recommended
@@ -818,8 +817,8 @@ in {
'';
};
defaults = mkOption {
type = types.submodule (inheritableModule true);
defaults = lib.mkOption {
type = lib.types.submodule (inheritableModule true);
description = ''
Default values inheritable by all configured certs. You can
use this to define options shared by all your certs. These defaults
@@ -828,9 +827,9 @@ in {
'';
};
certs = mkOption {
certs = lib.mkOption {
default = { };
type = with types; attrsOf (submodule [ (inheritableModule false) certOpts ]);
type = with lib.types; attrsOf (submodule [ (inheritableModule false) certOpts ]);
description = ''
Attribute set of certificates to get signed and renewed. Creates
`acme-''${cert}.{service,timer}` systemd units for
@@ -838,7 +837,7 @@ in {
to those units if they rely on the certificates being present,
or trigger restarts of the service if certificates get renewed.
'';
example = literalExpression ''
example = lib.literalExpression ''
{
"example.com" = {
webroot = "/var/lib/acme/acme-challenge/";
@@ -852,9 +851,9 @@ in {
}
'';
};
maxConcurrentRenewals = mkOption {
maxConcurrentRenewals = lib.mkOption {
default = 5;
type = types.int;
type = lib.types.int;
description = ''
Maximum number of concurrent certificate generation or renewal jobs. All other
jobs will queue and wait running jobs to finish. Reduces the system load of
@@ -867,39 +866,39 @@ in {
};
imports = [
(mkRemovedOptionModule [ "security" "acme" "production" ] ''
(lib.mkRemovedOptionModule [ "security" "acme" "production" ] ''
Use security.acme.server to define your staging ACME server URL instead.
To use the let's encrypt staging server, use security.acme.server =
"https://acme-staging-v02.api.letsencrypt.org/directory".
'')
(mkRemovedOptionModule [ "security" "acme" "directory" ] "ACME Directory is now hardcoded to /var/lib/acme and its permissions are managed by systemd. See https://github.com/NixOS/nixpkgs/issues/53852 for more info.")
(mkRemovedOptionModule [ "security" "acme" "preDelay" ] "This option has been removed. If you want to make sure that something executes before certificates are provisioned, add a RequiredBy=acme-\${cert}.service to the service you want to execute before the cert renewal")
(mkRemovedOptionModule [ "security" "acme" "activationDelay" ] "This option has been removed. If you want to make sure that something executes before certificates are provisioned, add a RequiredBy=acme-\${cert}.service to the service you want to execute before the cert renewal")
(mkChangedOptionModule [ "security" "acme" "validMin" ] [ "security" "acme" "defaults" "validMinDays" ] (config: config.security.acme.validMin / (24 * 3600)))
(mkChangedOptionModule [ "security" "acme" "validMinDays" ] [ "security" "acme" "defaults" "validMinDays" ] (config: config.security.acme.validMinDays))
(mkChangedOptionModule [ "security" "acme" "renewInterval" ] [ "security" "acme" "defaults" "renewInterval" ] (config: config.security.acme.renewInterval))
(mkChangedOptionModule [ "security" "acme" "email" ] [ "security" "acme" "defaults" "email" ] (config: config.security.acme.email))
(mkChangedOptionModule [ "security" "acme" "server" ] [ "security" "acme" "defaults" "server" ] (config: config.security.acme.server))
(mkChangedOptionModule [ "security" "acme" "enableDebugLogs" ] [ "security" "acme" "defaults" "enableDebugLogs" ] (config: config.security.acme.enableDebugLogs))
(lib.mkRemovedOptionModule [ "security" "acme" "directory" ] "ACME Directory is now hardcoded to /var/lib/acme and its permissions are managed by systemd. See https://github.com/NixOS/nixpkgs/issues/53852 for more info.")
(lib.mkRemovedOptionModule [ "security" "acme" "preDelay" ] "This option has been removed. If you want to make sure that something executes before certificates are provisioned, add a RequiredBy=acme-\${cert}.service to the service you want to execute before the cert renewal")
(lib.mkRemovedOptionModule [ "security" "acme" "activationDelay" ] "This option has been removed. If you want to make sure that something executes before certificates are provisioned, add a RequiredBy=acme-\${cert}.service to the service you want to execute before the cert renewal")
(lib.mkChangedOptionModule [ "security" "acme" "validMin" ] [ "security" "acme" "defaults" "validMinDays" ] (config: config.security.acme.validMin / (24 * 3600)))
(lib.mkChangedOptionModule [ "security" "acme" "validMinDays" ] [ "security" "acme" "defaults" "validMinDays" ] (config: config.security.acme.validMinDays))
(lib.mkChangedOptionModule [ "security" "acme" "renewInterval" ] [ "security" "acme" "defaults" "renewInterval" ] (config: config.security.acme.renewInterval))
(lib.mkChangedOptionModule [ "security" "acme" "email" ] [ "security" "acme" "defaults" "email" ] (config: config.security.acme.email))
(lib.mkChangedOptionModule [ "security" "acme" "server" ] [ "security" "acme" "defaults" "server" ] (config: config.security.acme.server))
(lib.mkChangedOptionModule [ "security" "acme" "enableDebugLogs" ] [ "security" "acme" "defaults" "enableDebugLogs" ] (config: config.security.acme.enableDebugLogs))
];
config = mkMerge [
(mkIf (cfg.certs != { }) {
config = lib.mkMerge [
(lib.mkIf (cfg.certs != { }) {
# FIXME Most of these custom warnings and filters for security.acme.certs.* are required
# because using mkRemovedOptionModule/mkChangedOptionModule with attrsets isn't possible.
warnings = filter (w: w != "") (mapAttrsToList (cert: data: optionalString (data.extraDomains != "_mkMergedOptionModule") ''
warnings = lib.filter (w: w != "") (lib.mapAttrsToList (cert: data: lib.optionalString (data.extraDomains != "_mkMergedOptionModule") ''
The option definition `security.acme.certs.${cert}.extraDomains` has changed
to `security.acme.certs.${cert}.extraDomainNames` and is now a list of strings.
Setting a custom webroot for extra domains is not possible, instead use separate certs.
'') cfg.certs);
assertions = let
certs = attrValues cfg.certs;
certs = lib.attrValues cfg.certs;
in [
{
assertion = cfg.defaults.email != null || all (certOpts: certOpts.email != null) certs;
assertion = cfg.defaults.email != null || lib.all (certOpts: certOpts.email != null) certs;
message = ''
You must define `security.acme.certs.<name>.email` or
`security.acme.defaults.email` to register with the CA. Note that using
@@ -914,7 +913,7 @@ in {
to `true`. For Let's Encrypt's ToS see https://letsencrypt.org/repository/
'';
}
] ++ (builtins.concatLists (mapAttrsToList (cert: data: [
] ++ (builtins.concatLists (lib.mapAttrsToList (cert: data: [
{
assertion = data.user == "_mkRemovedOptionModule";
message = ''
@@ -936,7 +935,7 @@ in {
# referencing them as a user quite weird too. Best practice is to use
# the domain option.
{
assertion = ! hasInfix "*" cert;
assertion = ! lib.hasInfix "*" cert;
message = ''
The cert option path `security.acme.certs.${cert}.dnsProvider`
cannot contain a * character.
@@ -959,7 +958,7 @@ in {
'';
})
{
assertion = all (hasSuffix "_FILE") (attrNames data.credentialFiles);
assertion = lib.all (lib.hasSuffix "_FILE") (lib.attrNames data.credentialFiles);
message = ''
Option `security.acme.certs.${cert}.credentialFiles` can only be
used for variables suffixed by "_FILE".
@@ -982,27 +981,27 @@ in {
];
systemd.services = let
renewServiceFunctions = mapAttrs' (cert: conf: nameValuePair "acme-${cert}" conf.renewService) certConfigs;
renewServiceFunctions = lib.mapAttrs' (cert: conf: lib.nameValuePair "acme-${cert}" conf.renewService) certConfigs;
renewServices = if cfg.maxConcurrentRenewals > 0
then roundRobinApplyAttrs renewServiceFunctions concurrencyLockfiles
else mapAttrs (_: f: f null) renewServiceFunctions;
selfsignServiceFunctions = mapAttrs' (cert: conf: nameValuePair "acme-selfsigned-${cert}" conf.selfsignService) certConfigs;
else lib.mapAttrs (_: f: f null) renewServiceFunctions;
selfsignServiceFunctions = lib.mapAttrs' (cert: conf: lib.nameValuePair "acme-selfsigned-${cert}" conf.selfsignService) certConfigs;
selfsignServices = if cfg.maxConcurrentRenewals > 0
then roundRobinApplyAttrs selfsignServiceFunctions concurrencyLockfiles
else mapAttrs (_: f: f null) selfsignServiceFunctions;
else lib.mapAttrs (_: f: f null) selfsignServiceFunctions;
in
{ "acme-fixperms" = userMigrationService; }
// (optionalAttrs (cfg.maxConcurrentRenewals > 0) {"acme-lockfiles" = lockfilePrepareService; })
// (lib.optionalAttrs (cfg.maxConcurrentRenewals > 0) {"acme-lockfiles" = lockfilePrepareService; })
// renewServices
// (optionalAttrs (cfg.preliminarySelfsigned) ({
// (lib.optionalAttrs (cfg.preliminarySelfsigned) ({
"acme-selfsigned-ca" = selfsignCAService;
} // selfsignServices));
systemd.timers = mapAttrs' (cert: conf: nameValuePair "acme-${cert}" conf.renewTimer) certConfigs;
systemd.timers = lib.mapAttrs' (cert: conf: lib.nameValuePair "acme-${cert}" conf.renewTimer) certConfigs;
systemd.targets = let
# Create some targets which can be depended on to be "active" after cert renewals
finishedTargets = mapAttrs' (cert: conf: nameValuePair "acme-finished-${cert}" {
finishedTargets = lib.mapAttrs' (cert: conf: lib.nameValuePair "acme-finished-${cert}" {
wantedBy = [ "default.target" ];
requires = [ "acme-${cert}.service" ];
after = [ "acme-${cert}.service" ];
@@ -1017,15 +1016,15 @@ in {
# Using a target here is fine - account creation is a one time event. Even if
# systemd clean --what=state is used to delete the account, so long as the user
# then runs one of the cert services, there won't be any issues.
accountTargets = mapAttrs' (hash: confs: let
accountTargets = lib.mapAttrs' (hash: confs: let
leader = "acme-${(builtins.head confs).cert}.service";
dependantServices = map (conf: "acme-${conf.cert}.service") (builtins.tail confs);
in nameValuePair "acme-account-${hash}" {
in lib.nameValuePair "acme-account-${hash}" {
requiredBy = dependantServices;
before = dependantServices;
requires = [ leader ];
after = [ leader ];
}) (groupBy (conf: conf.accountHash) (attrValues certConfigs));
}) (lib.groupBy (conf: conf.accountHash) (lib.attrValues certConfigs));
in finishedTargets // accountTargets;
})
];
+17 -7
View File
@@ -1,19 +1,29 @@
{ config, lib, pkgs, ... }:
with lib;
{
config,
lib,
pkgs,
...
}:
{
options.security.auditd.enable = mkEnableOption "the Linux Audit daemon";
options.security.auditd.enable = lib.mkEnableOption "the Linux Audit daemon";
config = mkIf config.security.auditd.enable {
config = lib.mkIf config.security.auditd.enable {
boot.kernelParams = [ "audit=1" ];
environment.systemPackages = [ pkgs.audit ];
systemd.services.auditd = {
description = "Linux Audit daemon";
wantedBy = [ "basic.target" ];
before = [ "shutdown.target" ];
wantedBy = [ "sysinit.target" ];
after = [
"local-fs.target"
"systemd-tmpfiles-setup.service"
];
before = [
"sysinit.target"
"shutdown.target"
];
conflicts = [ "shutdown.target" ];
unitConfig = {
@@ -0,0 +1,25 @@
{
config,
lib,
pkgs,
...
}:
let
cfg = config.services.orca;
inherit (lib)
mkEnableOption
mkIf
mkPackageOption
;
in
{
options.services.orca = {
enable = mkEnableOption "Orca screen reader";
package = mkPackageOption pkgs "orca" { };
};
config = mkIf cfg.enable {
environment.systemPackages = [ cfg.package ];
services.speechd.enable = true;
};
}
@@ -245,6 +245,9 @@ in {
xdg.portal.configPackages = mkDefault [kdePackages.xdg-desktop-portal-kde];
services.pipewire.enable = mkDefault true;
# Enable screen reader by default
services.orca.enable = mkDefault true;
services.displayManager = {
sessionPackages = [kdePackages.plasma-workspace];
defaultSession = mkDefault "plasma";
@@ -137,6 +137,37 @@ in {
type = submodule { freeformType = jsonType; };
description = "IRC servers to connect to";
};
mediaProxy = {
signingKeyPath = lib.mkOption {
type = path;
default = "/var/lib/matrix-appservice-irc/media-signingkey.jwk";
description = ''
Path to the signing key file for authenticated media.
'';
};
ttlSeconds = lib.mkOption {
type = ints.positive;
default = 3600;
description = ''
Lifetime in seconds, that generated URLs stay valid.
'';
};
bindPort = lib.mkOption {
type = port;
default = 11111;
description = ''
Port that the media proxy binds to.
'';
};
publicUrl = lib.mkOption {
type = str;
example = "https://matrix.example.com/media";
description = ''
URL under which the media proxy is publicly acccessible.
'';
};
};
};
};
};
@@ -144,6 +175,7 @@ in {
};
};
};
config = lib.mkIf cfg.enable {
systemd.services.matrix-appservice-irc = {
description = "Matrix-IRC bridge";
@@ -181,6 +213,9 @@ in {
sed -i "s/^hs_token:.*$/$hs_token/g" ${registrationFile}
sed -i "s/^as_token:.*$/$as_token/g" ${registrationFile}
fi
if ! [ -f "${cfg.settings.ircService.mediaProxy.signingKeyPath}"]; then
${lib.getExe pkgs.nodejs} ${pkg}/lib/generate-signing-key.js > "${cfg.settings.ircService.mediaProxy.signingKeyPath}"
fi
# Allow synapse access to the registration
if ${pkgs.getent}/bin/getent group matrix-synapse > /dev/null; then
chgrp matrix-synapse ${registrationFile}
+2 -2
View File
@@ -188,7 +188,7 @@ or [OpenID](https://element-hq.github.io/synapse/latest/openid.html).
## Element (formerly known as Riot) Web Client {#module-services-matrix-element-web}
[Element Web](https://github.com/vector-im/riot-web/) is
[Element Web](https://github.com/element-hq/element-web) is
the reference web client for Matrix and developed by the core team at
matrix.org. Element was formerly known as Riot.im, see the
[Element introductory blog post](https://element.io/blog/welcome-to-element/)
@@ -228,6 +228,6 @@ the example, this means that you should not reuse the
`myhostname.example.org` virtualHost to also serve Element,
but instead serve it on a different subdomain, like
`element.example.org` in the example. See the
[Element Important Security Notes](https://github.com/vector-im/element-web/tree/v1.10.0#important-security-notes)
[Element Important Security Notes](https://github.com/element-hq/element-web/tree/v1.10.0#important-security-notes)
for more information on this subject.
:::
@@ -374,14 +374,6 @@ in {
permissions = "u+rx,g+x,o-rwx";
};
"logs-management.plugin" = {
source = "${cfg.package}/libexec/netdata/plugins.d/logs-management.plugin.org";
capabilities = "cap_dac_read_search,cap_syslog+ep";
owner = cfg.user;
group = cfg.group;
permissions = "u+rx,g+x,o-rwx";
};
"slabinfo.plugin" = {
source = "${cfg.package}/libexec/netdata/plugins.d/slabinfo.plugin.org";
capabilities = "cap_dac_override+ep";
@@ -1,16 +1,13 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.ceph;
# function that translates "camelCaseOptions" to "camel case options", credits to tilpner in #nixos@freenode
expandCamelCase = replaceStrings upperChars (map (s: " ${s}") lowerChars);
expandCamelCaseAttrs = mapAttrs' (name: value: nameValuePair (expandCamelCase name) value);
expandCamelCase = lib.replaceStrings lib.upperChars (map (s: " ${s}") lib.lowerChars);
expandCamelCaseAttrs = lib.mapAttrs' (name: value: lib.nameValuePair (expandCamelCase name) value);
makeServices = daemonType: daemonIds:
mkMerge (map (daemonId:
lib.mkMerge (map (daemonId:
{ "ceph-${daemonType}-${daemonId}" = makeService daemonType daemonId cfg.global.clusterName cfg.${daemonType}.package; })
daemonIds);
@@ -18,8 +15,8 @@ let
let
stateDirectory = "ceph/${if daemonType == "rgw" then "radosgw" else daemonType}/${clusterName}-${daemonId}"; in {
enable = true;
description = "Ceph ${builtins.replaceStrings lowerChars upperChars daemonType} daemon ${daemonId}";
after = [ "network-online.target" "time-sync.target" ] ++ optional (daemonType == "osd") "ceph-mon.target";
description = "Ceph ${builtins.replaceStrings lib.lowerChars lib.upperChars daemonType} daemon ${daemonId}";
after = [ "network-online.target" "time-sync.target" ] ++ lib.optional (daemonType == "osd") "ceph-mon.target";
wants = [ "network-online.target" "time-sync.target" ];
partOf = [ "ceph-${daemonType}.target" ];
wantedBy = [ "ceph-${daemonType}.target" ];
@@ -47,11 +44,11 @@ let
Group = if daemonType == "osd" then "disk" else "ceph";
ExecStart = ''${ceph.out}/bin/${if daemonType == "rgw" then "radosgw" else "ceph-${daemonType}"} \
-f --cluster ${clusterName} --id ${daemonId}'';
} // optionalAttrs (daemonType == "osd") {
} // lib.optionalAttrs (daemonType == "osd") {
ExecStartPre = "${ceph.lib}/libexec/ceph/ceph-osd-prestart.sh --id ${daemonId} --cluster ${clusterName}";
RestartSec = "20s";
PrivateDevices = "no"; # osd needs disk access
} // optionalAttrs ( daemonType == "mon") {
} // lib.optionalAttrs ( daemonType == "mon") {
RestartSec = "10";
};
};
@@ -71,11 +68,11 @@ in
options.services.ceph = {
# Ceph has a monolithic configuration file but different sections for
# each daemon, a separate client section and a global section
enable = mkEnableOption "Ceph global configuration";
enable = lib.mkEnableOption "Ceph global configuration";
global = {
fsid = mkOption {
type = types.str;
fsid = lib.mkOption {
type = lib.types.str;
example = ''
433a2193-4f8a-47a0-95d2-209d7ca2cca5
'';
@@ -85,25 +82,25 @@ in
'';
};
clusterName = mkOption {
type = types.str;
clusterName = lib.mkOption {
type = lib.types.str;
default = "ceph";
description = ''
Name of cluster
'';
};
mgrModulePath = mkOption {
type = types.path;
mgrModulePath = lib.mkOption {
type = lib.types.path;
default = "${pkgs.ceph.lib}/lib/ceph/mgr";
defaultText = literalExpression ''"''${pkgs.ceph.lib}/lib/ceph/mgr"'';
defaultText = lib.literalExpression ''"''${pkgs.ceph.lib}/lib/ceph/mgr"'';
description = ''
Path at which to find ceph-mgr modules.
'';
};
monInitialMembers = mkOption {
type = with types; nullOr commas;
monInitialMembers = lib.mkOption {
type = with lib.types; nullOr commas;
default = null;
example = ''
node0, node1, node2
@@ -113,8 +110,8 @@ in
'';
};
monHost = mkOption {
type = with types; nullOr commas;
monHost = lib.mkOption {
type = with lib.types; nullOr commas;
default = null;
example = ''
10.10.0.1, 10.10.0.2, 10.10.0.3
@@ -124,40 +121,40 @@ in
'';
};
maxOpenFiles = mkOption {
type = types.int;
maxOpenFiles = lib.mkOption {
type = lib.types.int;
default = 131072;
description = ''
Max open files for each OSD daemon.
'';
};
authClusterRequired = mkOption {
type = types.enum [ "cephx" "none" ];
authClusterRequired = lib.mkOption {
type = lib.types.enum [ "cephx" "none" ];
default = "cephx";
description = ''
Enables requiring daemons to authenticate with eachother in the cluster.
'';
};
authServiceRequired = mkOption {
type = types.enum [ "cephx" "none" ];
authServiceRequired = lib.mkOption {
type = lib.types.enum [ "cephx" "none" ];
default = "cephx";
description = ''
Enables requiring clients to authenticate with the cluster to access services in the cluster (e.g. radosgw, mds or osd).
'';
};
authClientRequired = mkOption {
type = types.enum [ "cephx" "none" ];
authClientRequired = lib.mkOption {
type = lib.types.enum [ "cephx" "none" ];
default = "cephx";
description = ''
Enables requiring the cluster to authenticate itself to the client.
'';
};
publicNetwork = mkOption {
type = with types; nullOr commas;
publicNetwork = lib.mkOption {
type = with lib.types; nullOr commas;
default = null;
example = ''
10.20.0.0/24, 192.168.1.0/24
@@ -167,8 +164,8 @@ in
'';
};
clusterNetwork = mkOption {
type = with types; nullOr commas;
clusterNetwork = lib.mkOption {
type = with lib.types; nullOr commas;
default = null;
example = ''
10.10.0.0/24, 192.168.0.0/24
@@ -178,18 +175,18 @@ in
'';
};
rgwMimeTypesFile = mkOption {
type = with types; nullOr path;
rgwMimeTypesFile = lib.mkOption {
type = with lib.types; nullOr path;
default = "${pkgs.mailcap}/etc/mime.types";
defaultText = literalExpression ''"''${pkgs.mailcap}/etc/mime.types"'';
defaultText = lib.literalExpression ''"''${pkgs.mailcap}/etc/mime.types"'';
description = ''
Path to mime types used by radosgw.
'';
};
};
extraConfig = mkOption {
type = with types; attrsOf str;
extraConfig = lib.mkOption {
type = with lib.types; attrsOf str;
default = {};
example = {
"ms bind ipv6" = "true";
@@ -200,9 +197,9 @@ in
};
mgr = {
enable = mkEnableOption "Ceph MGR daemon";
daemons = mkOption {
type = with types; listOf str;
enable = lib.mkEnableOption "Ceph MGR daemon";
daemons = lib.mkOption {
type = with lib.types; listOf str;
default = [];
example = [ "name1" "name2" ];
description = ''
@@ -210,9 +207,9 @@ in
to the id part in ceph i.e. [ "name1" ] would result in mgr.name1
'';
};
package = mkPackageOption pkgs "ceph" { };
extraConfig = mkOption {
type = with types; attrsOf str;
package = lib.mkPackageOption pkgs "ceph" { };
extraConfig = lib.mkOption {
type = with lib.types; attrsOf str;
default = {};
description = ''
Extra configuration to add to the global section for manager daemons.
@@ -221,9 +218,9 @@ in
};
mon = {
enable = mkEnableOption "Ceph MON daemon";
daemons = mkOption {
type = with types; listOf str;
enable = lib.mkEnableOption "Ceph MON daemon";
daemons = lib.mkOption {
type = with lib.types; listOf str;
default = [];
example = [ "name1" "name2" ];
description = ''
@@ -231,9 +228,9 @@ in
to the id part in ceph i.e. [ "name1" ] would result in mon.name1
'';
};
package = mkPackageOption pkgs "ceph" { };
extraConfig = mkOption {
type = with types; attrsOf str;
package = lib.mkPackageOption pkgs "ceph" { };
extraConfig = lib.mkOption {
type = with lib.types; attrsOf str;
default = {};
description = ''
Extra configuration to add to the monitor section.
@@ -242,9 +239,9 @@ in
};
osd = {
enable = mkEnableOption "Ceph OSD daemon";
daemons = mkOption {
type = with types; listOf str;
enable = lib.mkEnableOption "Ceph OSD daemon";
daemons = lib.mkOption {
type = with lib.types; listOf str;
default = [];
example = [ "name1" "name2" ];
description = ''
@@ -252,9 +249,9 @@ in
to the id part in ceph i.e. [ "name1" ] would result in osd.name1
'';
};
package = mkPackageOption pkgs "ceph" { };
extraConfig = mkOption {
type = with types; attrsOf str;
package = lib.mkPackageOption pkgs "ceph" { };
extraConfig = lib.mkOption {
type = with lib.types; attrsOf str;
default = {
"osd journal size" = "10000";
"osd pool default size" = "3";
@@ -270,9 +267,9 @@ in
};
mds = {
enable = mkEnableOption "Ceph MDS daemon";
daemons = mkOption {
type = with types; listOf str;
enable = lib.mkEnableOption "Ceph MDS daemon";
daemons = lib.mkOption {
type = with lib.types; listOf str;
default = [];
example = [ "name1" "name2" ];
description = ''
@@ -280,9 +277,9 @@ in
to the id part in ceph i.e. [ "name1" ] would result in mds.name1
'';
};
package = mkPackageOption pkgs "ceph" { };
extraConfig = mkOption {
type = with types; attrsOf str;
package = lib.mkPackageOption pkgs "ceph" { };
extraConfig = lib.mkOption {
type = with lib.types; attrsOf str;
default = {};
description = ''
Extra configuration to add to the MDS section.
@@ -291,10 +288,10 @@ in
};
rgw = {
enable = mkEnableOption "Ceph RadosGW daemon";
package = mkPackageOption pkgs "ceph" { };
daemons = mkOption {
type = with types; listOf str;
enable = lib.mkEnableOption "Ceph RadosGW daemon";
package = lib.mkPackageOption pkgs "ceph" { };
daemons = lib.mkOption {
type = with lib.types; listOf str;
default = [];
example = [ "name1" "name2" ];
description = ''
@@ -307,11 +304,11 @@ in
};
client = {
enable = mkEnableOption "Ceph client configuration";
extraConfig = mkOption {
type = with types; attrsOf (attrsOf str);
enable = lib.mkEnableOption "Ceph client configuration";
extraConfig = lib.mkOption {
type = with lib.types; attrsOf (attrsOf str);
default = {};
example = literalExpression ''
example = lib.literalExpression ''
{
# This would create a section for a radosgw daemon named node0 and related
# configuration for it
@@ -326,7 +323,7 @@ in
};
};
config = mkIf config.services.ceph.enable {
config = lib.mkIf config.services.ceph.enable {
assertions = [
{ assertion = cfg.global.fsid != "";
message = "fsid has to be set to a valid uuid for the cluster to function";
@@ -345,22 +342,22 @@ in
}
];
warnings = optional (cfg.global.monInitialMembers == null)
warnings = lib.optional (cfg.global.monInitialMembers == null)
"Not setting up a list of members in monInitialMembers requires that you set the host variable for each mon daemon or else the cluster won't function";
environment.etc."ceph/ceph.conf".text = let
# Merge the extraConfig set for mgr daemons, as mgr don't have their own section
globalSection = expandCamelCaseAttrs (cfg.global // cfg.extraConfig // optionalAttrs cfg.mgr.enable cfg.mgr.extraConfig);
globalSection = expandCamelCaseAttrs (cfg.global // cfg.extraConfig // lib.optionalAttrs cfg.mgr.enable cfg.mgr.extraConfig);
# Remove all name-value pairs with null values from the attribute set to avoid making empty sections in the ceph.conf
globalSection' = filterAttrs (name: value: value != null) globalSection;
globalSection' = lib.filterAttrs (name: value: value != null) globalSection;
totalConfig = {
global = globalSection';
} // optionalAttrs (cfg.mon.enable && cfg.mon.extraConfig != {}) { mon = cfg.mon.extraConfig; }
// optionalAttrs (cfg.mds.enable && cfg.mds.extraConfig != {}) { mds = cfg.mds.extraConfig; }
// optionalAttrs (cfg.osd.enable && cfg.osd.extraConfig != {}) { osd = cfg.osd.extraConfig; }
// optionalAttrs (cfg.client.enable && cfg.client.extraConfig != {}) cfg.client.extraConfig;
} // lib.optionalAttrs (cfg.mon.enable && cfg.mon.extraConfig != {}) { mon = cfg.mon.extraConfig; }
// lib.optionalAttrs (cfg.mds.enable && cfg.mds.extraConfig != {}) { mds = cfg.mds.extraConfig; }
// lib.optionalAttrs (cfg.osd.enable && cfg.osd.extraConfig != {}) { osd = cfg.osd.extraConfig; }
// lib.optionalAttrs (cfg.client.enable && cfg.client.extraConfig != {}) cfg.client.extraConfig;
in
generators.toINI {} totalConfig;
lib.generators.toINI {} totalConfig;
users.users.ceph = {
uid = config.ids.uids.ceph;
@@ -375,13 +372,13 @@ in
systemd.services = let
services = []
++ optional cfg.mon.enable (makeServices "mon" cfg.mon.daemons)
++ optional cfg.mds.enable (makeServices "mds" cfg.mds.daemons)
++ optional cfg.osd.enable (makeServices "osd" cfg.osd.daemons)
++ optional cfg.rgw.enable (makeServices "rgw" cfg.rgw.daemons)
++ optional cfg.mgr.enable (makeServices "mgr" cfg.mgr.daemons);
++ lib.optional cfg.mon.enable (makeServices "mon" cfg.mon.daemons)
++ lib.optional cfg.mds.enable (makeServices "mds" cfg.mds.daemons)
++ lib.optional cfg.osd.enable (makeServices "osd" cfg.osd.daemons)
++ lib.optional cfg.rgw.enable (makeServices "rgw" cfg.rgw.daemons)
++ lib.optional cfg.mgr.enable (makeServices "mgr" cfg.mgr.daemons);
in
mkMerge services;
lib.mkMerge services;
systemd.targets = let
targets = [
@@ -390,13 +387,13 @@ in
wantedBy = [ "multi-user.target" ];
unitConfig.StopWhenUnneeded = true;
}; } ]
++ optional cfg.mon.enable (makeTarget "mon")
++ optional cfg.mds.enable (makeTarget "mds")
++ optional cfg.osd.enable (makeTarget "osd")
++ optional cfg.rgw.enable (makeTarget "rgw")
++ optional cfg.mgr.enable (makeTarget "mgr");
++ lib.optional cfg.mon.enable (makeTarget "mon")
++ lib.optional cfg.mds.enable (makeTarget "mds")
++ lib.optional cfg.osd.enable (makeTarget "osd")
++ lib.optional cfg.rgw.enable (makeTarget "rgw")
++ lib.optional cfg.mgr.enable (makeTarget "mgr");
in
mkMerge targets;
lib.mkMerge targets;
systemd.tmpfiles.settings."10-ceph" = let
defaultConfig = {
@@ -407,9 +404,9 @@ in
"/etc/ceph".d = defaultConfig;
"/run/ceph".d = defaultConfig // { mode = "0770"; };
"/var/lib/ceph".d = defaultConfig;
"/var/lib/ceph/mgr".d = mkIf (cfg.mgr.enable) defaultConfig;
"/var/lib/ceph/mon".d = mkIf (cfg.mon.enable) defaultConfig;
"/var/lib/ceph/osd".d = mkIf (cfg.osd.enable) defaultConfig;
"/var/lib/ceph/mgr".d = lib.mkIf (cfg.mgr.enable) defaultConfig;
"/var/lib/ceph/mon".d = lib.mkIf (cfg.mon.enable) defaultConfig;
"/var/lib/ceph/osd".d = lib.mkIf (cfg.osd.enable) defaultConfig;
};
};
}
@@ -9,6 +9,8 @@ in
options.services.endlessh-go = {
enable = mkEnableOption "endlessh-go service";
package = mkPackageOption pkgs "endlessh-go" { };
listenAddress = mkOption {
type = types.str;
default = "0.0.0.0";
@@ -86,7 +88,7 @@ in
{
Restart = "always";
ExecStart = with cfg; concatStringsSep " " ([
"${pkgs.endlessh-go}/bin/endlessh-go"
(lib.getExe cfg.package)
"-logtostderr"
"-host=${listenAddress}"
"-port=${toString port}"
@@ -172,7 +172,6 @@ in
] ++ utils.removePackagesByName [
# accessibility
onboard
orca
# theme
sound-theme-freedesktop
@@ -199,6 +198,8 @@ in
})
];
services.orca.enable = mkDefault (notExcluded pkgs.orca);
xdg.portal.configPackages = mkDefault [ pkgs.cinnamon-common ];
# Override GSettings schemas
@@ -155,8 +155,6 @@ in
deepin-desktop-base
startdde
# TODO: should remove dde-dock, but dde-shell still need it's dconfig
dde-dock
dde-shell
dde-launchpad
dde-session-ui
@@ -177,6 +175,8 @@ in
dde-application-manager
deepin-service-manager
dde-grand-search
dde-api-proxy
dde-tray-loader
];
optionalPackages = [
onboard # dde-dock plugin
@@ -216,6 +216,7 @@ in
dde-application-manager
deepin-service-manager
dde-grand-search
dde-api-proxy
];
systemd.packages = with pkgs.deepin; [
@@ -230,6 +231,7 @@ in
dde-session
dde-application-manager
deepin-service-manager
dde-api-proxy
];
};
}
@@ -357,6 +357,8 @@ in
isSystem = true;
};
services.orca.enable = notExcluded pkgs.orca;
fonts.packages = with pkgs; [
cantarell-fonts
dejavu_fonts
@@ -380,7 +382,6 @@ in
pkgs.gnome-shell-extensions
pkgs.gnome-tour # GNOME Shell detects the .desktop file on first log-in.
pkgs.gnome-user-docs
pkgs.orca
pkgs.glib # for gsettings program
pkgs.gnome-menus
pkgs.gtk3.out # for gtk-launch program
@@ -175,6 +175,7 @@ in
# https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1443
pkgs.pantheon.mutter
];
services.orca.enable = mkDefault (notExcluded pkgs.orca);
systemd.packages = with pkgs; [
gnome-session
pantheon.gala
@@ -211,7 +212,6 @@ in
adwaita-icon-theme
gtk3.out # for gtk-launch program
onboard
orca # elementary/greeter#668
sound-theme-freedesktop
xdg-user-dirs # Update user dirs as described in https://freedesktop.org/wiki/Software/xdg-user-dirs/
]) ++ (with pkgs.pantheon; [
@@ -357,6 +357,9 @@ in
pkgs.media-player-info
];
# Enable screen reader by default
services.orca.enable = mkDefault true;
services.displayManager.sddm = {
theme = mkDefault "breeze";
};
+3 -2
View File
@@ -205,11 +205,12 @@ in
boot.initrd.systemd = {
contents = {
"/etc/tmpfiles.d/resolv.conf".text =
"L /etc/resolv.conf - - - - /run/systemd/resolve/stub-resolv.conf";
"/etc/systemd/resolved.conf".text = resolvedConf;
};
tmpfiles.settings.systemd-resolved-stub."/etc/resolv.conf".L.argument =
"/run/systemd/resolve/stub-resolv.conf";
additionalUpstreamUnits = ["systemd-resolved.service"];
users.systemd-resolve = {};
groups.systemd-resolve = {};
@@ -163,6 +163,20 @@ in
};
config = {
warnings =
let
paths = lib.filter (path:
path != null && lib.hasPrefix "/etc/tmpfiles.d/" path
) (map (path: path.target) config.boot.initrd.systemd.storePaths);
in
lib.optional (lib.length paths > 0) (lib.concatStringsSep " " [
"Files inside /etc/tmpfiles.d in the initrd need to be created with"
"boot.initrd.systemd.tmpfiles.settings."
"Creating them by hand using boot.initrd.systemd.contents or"
"boot.initrd.systemd.storePaths will lead to errors in the future."
"Found these problematic files: ${lib.concatStringsSep ", " paths}"
]);
systemd.additionalUpstreamSystemUnits = [
"systemd-tmpfiles-clean.service"
"systemd-tmpfiles-clean.timer"
@@ -1,5 +0,0 @@
{ modulesPath, ... }:
{
imports = [ "${modulesPath}/virtualisation/brightbox-image.nix" ];
}
@@ -1,166 +0,0 @@
{ config, lib, pkgs, ... }:
with lib;
let
diskSize = "20G";
in
{
imports = [ ../profiles/headless.nix ../profiles/qemu-guest.nix ];
system.build.brightboxImage =
pkgs.vmTools.runInLinuxVM (
pkgs.runCommand "brightbox-image"
{ preVM =
''
mkdir $out
diskImage=$out/$diskImageBase
truncate $diskImage --size ${diskSize}
mv closure xchg/
'';
postVM =
''
PATH=$PATH:${lib.makeBinPath [ pkgs.gnutar pkgs.gzip ]}
pushd $out
${pkgs.qemu_kvm}/bin/qemu-img convert -c -O qcow2 $diskImageBase nixos.qcow2
rm $diskImageBase
popd
'';
diskImageBase = "nixos-image-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}.raw";
buildInputs = [ pkgs.util-linux pkgs.perl ];
exportReferencesGraph =
[ "closure" config.system.build.toplevel ];
}
''
# Create partition table
${pkgs.parted}/sbin/parted --script /dev/vda mklabel msdos
${pkgs.parted}/sbin/parted --script /dev/vda mkpart primary ext4 1 ${diskSize}
${pkgs.parted}/sbin/parted --script /dev/vda print
. /sys/class/block/vda1/uevent
mknod /dev/vda1 b $MAJOR $MINOR
# Create an empty filesystem and mount it.
${pkgs.e2fsprogs}/sbin/mkfs.ext4 -L nixos /dev/vda1
${pkgs.e2fsprogs}/sbin/tune2fs -c 0 -i 0 /dev/vda1
mkdir /mnt
mount /dev/vda1 /mnt
# The initrd expects these directories to exist.
mkdir /mnt/dev /mnt/proc /mnt/sys
mount --bind /proc /mnt/proc
mount --bind /dev /mnt/dev
mount --bind /sys /mnt/sys
# Copy all paths in the closure to the filesystem.
storePaths=$(perl ${pkgs.pathsFromGraph} /tmp/xchg/closure)
mkdir -p /mnt/nix/store
echo "copying everything (will take a while)..."
cp -prd $storePaths /mnt/nix/store/
# Register the paths in the Nix database.
printRegistration=1 perl ${pkgs.pathsFromGraph} /tmp/xchg/closure | \
chroot /mnt ${config.nix.package.out}/bin/nix-store --load-db --option build-users-group ""
# Create the system profile to allow nixos-rebuild to work.
chroot /mnt ${config.nix.package.out}/bin/nix-env \
-p /nix/var/nix/profiles/system --set ${config.system.build.toplevel} \
--option build-users-group ""
# `nixos-rebuild' requires an /etc/NIXOS.
mkdir -p /mnt/etc
touch /mnt/etc/NIXOS
# `switch-to-configuration' requires a /bin/sh
mkdir -p /mnt/bin
ln -s ${config.system.build.binsh}/bin/sh /mnt/bin/sh
# Install a configuration.nix.
mkdir -p /mnt/etc/nixos /mnt/boot/grub
cp ${./brightbox-config.nix} /mnt/etc/nixos/configuration.nix
# Generate the GRUB menu.
ln -s vda /dev/sda
chroot /mnt ${config.system.build.toplevel}/bin/switch-to-configuration boot
umount /mnt/proc /mnt/dev /mnt/sys
umount /mnt
''
);
fileSystems."/".label = "nixos";
# Generate a GRUB menu. Amazon's pv-grub uses this to boot our kernel/initrd.
boot.loader.grub.device = "/dev/vda";
boot.loader.timeout = 0;
# Don't put old configurations in the GRUB menu. The user has no
# way to select them anyway.
boot.loader.grub.configurationLimit = 0;
# Allow root logins only using the SSH key that the user specified
# at instance creation time.
services.openssh.enable = true;
services.openssh.settings.PermitRootLogin = "prohibit-password";
# Force getting the hostname from Google Compute.
networking.hostName = mkDefault "";
# Always include cryptsetup so that NixOps can use it.
environment.systemPackages = [ pkgs.cryptsetup ];
systemd.services.fetch-ec2-data =
{ description = "Fetch EC2 Data";
wantedBy = [ "multi-user.target" "sshd.service" ];
before = [ "sshd.service" ];
wants = [ "network-online.target" ];
after = [ "network-online.target" ];
path = [ pkgs.wget pkgs.iproute2 ];
script =
''
wget="wget -q --retry-connrefused -O -"
${optionalString (config.networking.hostName == "") ''
echo "setting host name..."
${pkgs.nettools}/bin/hostname $($wget http://169.254.169.254/latest/meta-data/hostname)
''}
# Don't download the SSH key if it has already been injected
# into the image (a Nova feature).
if ! [ -e /root/.ssh/authorized_keys ]; then
echo "obtaining SSH key..."
mkdir -m 0700 -p /root/.ssh
$wget http://169.254.169.254/latest/meta-data/public-keys/0/openssh-key > /root/key.pub
if [ $? -eq 0 -a -e /root/key.pub ]; then
if ! grep -q -f /root/key.pub /root/.ssh/authorized_keys; then
cat /root/key.pub >> /root/.ssh/authorized_keys
echo "new key added to authorized_keys"
fi
chmod 600 /root/.ssh/authorized_keys
rm -f /root/key.pub
fi
fi
# Extract the intended SSH host key for this machine from
# the supplied user data, if available. Otherwise sshd will
# generate one normally.
$wget http://169.254.169.254/2011-01-01/user-data > /root/user-data || true
key="$(sed 's/|/\n/g; s/SSH_HOST_DSA_KEY://; t; d' /root/user-data)"
key_pub="$(sed 's/SSH_HOST_DSA_KEY_PUB://; t; d' /root/user-data)"
if [ -n "$key" -a -n "$key_pub" -a ! -e /etc/ssh/ssh_host_dsa_key ]; then
mkdir -m 0755 -p /etc/ssh
(umask 077; echo "$key" > /etc/ssh/ssh_host_dsa_key)
echo "$key_pub" > /etc/ssh/ssh_host_dsa_key.pub
fi
'';
serviceConfig.Type = "oneshot";
serviceConfig.RemainAfterExit = true;
};
}
+1 -1
View File
@@ -570,7 +570,7 @@ in {
mate-wayland = handleTest ./mate-wayland.nix {};
matter-server = handleTest ./matter-server.nix {};
matomo = handleTest ./matomo.nix {};
matrix-appservice-irc = handleTest ./matrix/appservice-irc.nix {};
matrix-appservice-irc = runTest ./matrix/appservice-irc.nix;
matrix-conduit = handleTest ./matrix/conduit.nix {};
matrix-synapse = handleTest ./matrix/synapse.nix {};
matrix-synapse-workers = handleTest ./matrix/synapse-workers.nix {};
+15 -10
View File
@@ -1,4 +1,4 @@
import ../make-test-python.nix ({ pkgs, ... }:
{ pkgs, ... }:
let
homeserverUrl = "http://homeserver:8008";
in
@@ -9,7 +9,7 @@ import ../make-test-python.nix ({ pkgs, ... }:
};
nodes = {
homeserver = { pkgs, ... }: {
homeserver = {
# We'll switch to this once the config is copied into place
specialisation.running.configuration = {
services.matrix-synapse = {
@@ -46,7 +46,7 @@ import ../make-test-python.nix ({ pkgs, ... }:
};
};
ircd = { pkgs, ... }: {
ircd = {
services.ngircd = {
enable = true;
config = ''
@@ -75,13 +75,16 @@ import ../make-test-python.nix ({ pkgs, ... }:
homeserver.url = homeserverUrl;
homeserver.domain = "homeserver";
ircService.servers."ircd" = {
name = "IRCd";
port = 6667;
dynamicChannels = {
enabled = true;
aliasTemplate = "#irc_$CHANNEL";
ircService = {
servers."ircd" = {
name = "IRCd";
port = 6667;
dynamicChannels = {
enabled = true;
aliasTemplate = "#irc_$CHANNEL";
};
};
mediaProxy.publicUrl = "http://localhost:11111/media";
};
};
};
@@ -203,6 +206,8 @@ import ../make-test-python.nix ({ pkgs, ... }:
with subtest("start the appservice"):
appservice.wait_for_unit("matrix-appservice-irc.service")
appservice.wait_for_open_port(8009)
appservice.wait_for_file("/var/lib/matrix-appservice-irc/media-signingkey.jwk")
appservice.wait_for_open_port(11111)
with subtest("copy the registration file"):
appservice.copy_from_vm("/var/lib/matrix-appservice-irc/registration.yml")
@@ -222,4 +227,4 @@ import ../make-test-python.nix ({ pkgs, ... }:
with subtest("ensure messages can be exchanged"):
client.succeed("do_test ${homeserverUrl} >&2")
'';
})
}
@@ -47,15 +47,16 @@ let
withMTP = config.clementine.mtp or true;
withCD = config.clementine.cd or true;
withCloud = config.clementine.cloud or true;
in mkDerivation {
in
mkDerivation {
pname = "clementine";
version = "unstable-2022-04-11";
version = "1.4.rc2-unstable-2024-05-12";
src = fetchFromGitHub {
owner = "clementine-player";
repo = "Clementine";
rev = "250024e117fbe5fae7c62b9c8e655d66412a6ed7";
sha256 = "06fcbs3wig3mh711iypyj49qm5246f7qhvgvv8brqfrd8cqyh6qf";
rev = "7607ddcb96e79d373c4b60d9de21f3315719c7d8";
sha256 = "sha256-yOG/Je6N8YEsu5AOtxOFgDl3iqb97assYMZYMSwQqqk=";
};
nativeBuildInputs = [
@@ -117,6 +118,7 @@ in mkDerivation {
'';
cmakeFlags = [
"-DFORCE_GIT_REVISION=1.3.1"
"-DUSE_SYSTEM_PROJECTM=ON"
"-DSPOTIFY_BLOB=OFF"
];
+34 -20
View File
@@ -1,6 +1,7 @@
{ stdenv
, lib
, fetchFromGitHub
, fetchpatch
, cmake
, wrapQtAppsHook
, pkg-config
@@ -18,18 +19,16 @@
, portmidi
, qtbase
, qtdeclarative
, qtgraphicaleffects
, flac
, libopusenc
, libopus
, tinyxml-2
, qtquickcontrols
, qtquickcontrols2
, qtscript
, qt5compat
, qtwayland
, qtsvg
, qtxmlpatterns
, qtscxml
, qtnetworkauth
, qtx11extras
, qttools
, nixosTests
, darwin
}:
@@ -50,31 +49,48 @@ let
} else portaudio;
in stdenv'.mkDerivation (finalAttrs: {
pname = "musescore";
version = "4.3.2";
version = "4.4.0";
src = fetchFromGitHub {
owner = "musescore";
repo = "MuseScore";
rev = "v${finalAttrs.version}";
sha256 = "sha256-QjvY8R2nq/DeFDikHn9qr4aCEwzAcogQXM5vdZqhoMM=";
sha256 = "sha256-oDbOaLFmSpZ7D8E7LBxUwFwiaPcucIUj3eEp6sXR5o8=";
};
patches = [
# https://github.com/musescore/MuseScore/pull/24247
(fetchpatch {
name = "skip-downloading-harfbuzz.patch";
url = "https://github.com/musescore/MuseScore/commit/686ea243d58b43eb3dff7ebdabb2e09de4d212e4.patch";
hash = "sha256-fsb1hKFKXwBdMPh+Ek0UT3XtI8qg3ieWUQW1/XDvhmg=";
})
# https://github.com/musescore/MuseScore/pull/24261
(fetchpatch {
name = "allow-using-system-harfbuzz.patch";
url = "https://github.com/musescore/MuseScore/commit/696279e362afe72db5e92f8a47aa64b3a0e86a86.patch";
hash = "sha256-z1W2SmzUUlVL7mRR2frzUZjMEnwqkVfRVz4TufR1tDU=";
})
# https://github.com/musescore/MuseScore/pull/24326
(fetchpatch {
name = "fix-menubar-with-qt6.5+.patch";
url = "https://github.com/musescore/MuseScore/pull/24326/commits/b274f13311ad0b2bce339634a006ba22fbd3379e.patch";
hash = "sha256-ZGmjRa01CBEIxJdJYQMhdg4A9yjWdlgn0pCPmENBTq0=";
})
];
cmakeFlags = [
"-DMUSESCORE_BUILD_MODE=release"
"-DMUSE_APP_BUILD_MODE=release"
# Disable the build and usage of the `/bin/crashpad_handler` utility - it's
# not useful on NixOS, see:
# https://github.com/musescore/MuseScore/issues/15571
"-DMUE_BUILD_CRASHPAD_CLIENT=OFF"
"-DMUSE_MODULE_DIAGNOSTICS_CRASHPAD_CLIENT=OFF"
# Use our versions of system libraries
"-DMUE_COMPILE_USE_SYSTEM_FREETYPE=ON"
"-DMUE_COMPILE_USE_SYSTEM_HARFBUZZ=ON"
"-DMUE_COMPILE_USE_SYSTEM_TINYXML=ON"
# Implies also -DMUE_COMPILE_USE_SYSTEM_OPUS=ON
"-DMUE_COMPILE_USE_SYSTEM_OPUSENC=ON"
"-DMUE_COMPILE_USE_SYSTEM_FLAC=ON"
# From some reason, in $src/build/cmake/SetupBuildEnvironment.cmake,
# upstream defaults to compiling to x86_64 only, unless this cmake flag is
# set
"-DMUE_COMPILE_BUILD_MACOS_APPLE_SILICON=ON"
# Don't bundle qt qml files, relevant really only for darwin, but we set
# this for all platforms anyway.
"-DMUE_COMPILE_INSTALL_QTQML_FILES=OFF"
@@ -94,6 +110,7 @@ in stdenv'.mkDerivation (finalAttrs: {
nativeBuildInputs = [
wrapQtAppsHook
cmake
qttools
pkg-config
ninja
];
@@ -114,14 +131,11 @@ in stdenv'.mkDerivation (finalAttrs: {
tinyxml-2
qtbase
qtdeclarative
qtgraphicaleffects
qtquickcontrols
qtquickcontrols2
qtscript
qt5compat
qtwayland
qtsvg
qtxmlpatterns
qtscxml
qtnetworkauth
qtx11extras
] ++ lib.optionals stdenv.isLinux [
alsa-lib
];
+2 -2
View File
@@ -21,14 +21,14 @@ in
pythonPackages.buildPythonApplication rec {
pname = "picard";
# nix-update --commit picard --version-regex 'release-(.*)'
version = "2.12.2";
version = "2.12.3";
format = "setuptools";
src = fetchFromGitHub {
owner = "metabrainz";
repo = "picard";
rev = "refs/tags/release-${version}";
hash = "sha256-m0cFJKkYNH01YzcRrbKgkXpjlZ9ZEymwGDnOFQfZKv0=";
hash = "sha256-ysHOiX8b9tlUaQDGl4qHUVLrLUF9MUDc4+vOQB76cj4=";
};
nativeBuildInputs = [
@@ -42,7 +42,7 @@ let
(f (tree-sitter.builtGrammars // builtGrammars));
copyGrammar = grammar:
let name = lib.last (lib.splitString "-" grammar.name); in
"ln -s ${grammar}/parser/${name}.so $out/parser/${name}.so";
"ln -sf ${grammar}/parser/${name}.so $out/parser/${name}.so";
in
[
(runCommand "vimplugin-treesitter-grammars"
@@ -4,8 +4,8 @@ vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
name = "mongodb-vscode";
publisher = "mongodb";
version = "1.8.0";
hash = "sha256-KtpXhDRf9vFS0iSQCJzywmIlRMhWLOlSuK7DPc0ddnw=";
version = "1.8.1";
hash = "sha256-dHvYl3bg5OB/HYBoHQnUODhAob/ZylFNGLAuUQByvdM=";
};
meta = {
+5 -5
View File
@@ -24,13 +24,13 @@ in symlinkJoin rec {
pythonInputs = qgis-unwrapped.pythonBuildInputs ++ (extraPythonPackages qgis-unwrapped.py.pkgs);
postBuild = ''
# unpackPhase
buildPythonPath "$pythonInputs"
wrapProgram $out/bin/qgis \
--prefix PATH : $program_PATH \
--set PYTHONPATH $program_PYTHONPATH
for program in $out/bin/*; do
wrapProgram $program \
--prefix PATH : $program_PATH \
--set PYTHONPATH $program_PYTHONPATH
done
'';
passthru = {
+5 -5
View File
@@ -24,13 +24,13 @@ in symlinkJoin rec {
pythonInputs = qgis-ltr-unwrapped.pythonBuildInputs ++ (extraPythonPackages qgis-ltr-unwrapped.py.pkgs);
postBuild = ''
# unpackPhase
buildPythonPath "$pythonInputs"
wrapProgram $out/bin/qgis \
--prefix PATH : $program_PATH \
--set PYTHONPATH $program_PYTHONPATH
for program in $out/bin/*; do
wrapProgram $program \
--prefix PATH : $program_PATH \
--set PYTHONPATH $program_PYTHONPATH
done
'';
passthru = {
+5 -3
View File
@@ -173,9 +173,11 @@ in mkDerivation rec {
# the path at build time using GRASS_PREFIX.
# Using wrapGAppsHook also prevents file dialogs from crashing the program
# on non-NixOS.
wrapProgram $out/bin/qgis \
"''${gappsWrapperArgs[@]}" \
--prefix PATH : ${lib.makeBinPath [ grass ]}
for program in $out/bin/*; do
wrapProgram $program \
"''${gappsWrapperArgs[@]}" \
--prefix PATH : ${lib.makeBinPath [ grass ]}
done
'';
meta = with lib; {
+5 -3
View File
@@ -175,9 +175,11 @@ in mkDerivation rec {
# the path at build time using GRASS_PREFIX.
# Using wrapGAppsHook also prevents file dialogs from crashing the program
# on non-NixOS.
wrapProgram $out/bin/qgis \
"''${gappsWrapperArgs[@]}" \
--prefix PATH : ${lib.makeBinPath [ grass ]}
for program in $out/bin/*; do
wrapProgram $program \
"''${gappsWrapperArgs[@]}" \
--prefix PATH : ${lib.makeBinPath [ grass ]}
done
'';
meta = with lib; {
@@ -133,7 +133,7 @@ stdenv.mkDerivation (finalAttrs: {
version = testers.testVersion { package = finalAttrs.finalPackage; };
inherit nixos-icons;
inherit (perlPackages) ImageMagick;
inherit (python3.pkgs) img2pdf;
inherit (python3.pkgs) img2pdf willow;
pkg-config = testers.hasPkgConfigModules {
package = finalAttrs.finalPackage;
version = lib.head (lib.splitString "-" finalAttrs.version);
@@ -10,43 +10,43 @@
let
pname = "1password";
version = if channel == "stable" then "8.10.36" else "8.10.38-13.BETA";
version = if channel == "stable" then "8.10.40" else "8.10.44-21.BETA";
sources = {
stable = {
x86_64-linux = {
url = "https://downloads.1password.com/linux/tar/stable/x86_64/1password-${version}.x64.tar.gz";
hash = "sha256-yUSU0np6li5zLfFOnebpv0+s1UQ6BdgI+28OvcxS3H8=";
hash = "sha256-viY0SOUhrOvmue6Nolau356rIqwDo2nLzMilFFmNb9g=";
};
aarch64-linux = {
url = "https://downloads.1password.com/linux/tar/stable/aarch64/1password-${version}.arm64.tar.gz";
hash = "sha256-KG0PJ/gwBd9+qYyraRqS/D58Y58VwLd8yCnYzPVWQAY=";
hash = "sha256-7lUZiS3TSsIVqPoN5A6YqyVaaaRI9BliT51FHkwOPyw=";
};
x86_64-darwin = {
url = "https://downloads.1password.com/mac/1Password-${version}-x86_64.zip";
hash = "sha256-vYhmA9N1izPRo3HPDouOpjJzMwK7LkCHuyYxBGkIPKM=";
hash = "sha256-xK/B8J3VP8y1xw3KorzZzPf/LjYmYdOIjDECMJnVv6I=";
};
aarch64-darwin = {
url = "https://downloads.1password.com/mac/1Password-${version}-aarch64.zip";
hash = "sha256-v1eCh/cOpA5XcmamAqreKHRQ+waoBQtvvmNO4wvFq6A=";
hash = "sha256-iqdK6K7dcypZFGseYal2KjOaqJtUjXeCzbDdx7pDv8A=";
};
};
beta = {
x86_64-linux = {
url = "https://downloads.1password.com/linux/tar/beta/x86_64/1password-${version}.x64.tar.gz";
hash = "sha256-SeB1Em2WuYvslBv//TROYTAB1asYFhC22IwhcwGi+Qs=";
hash = "sha256-enorJfbn+xJVy1fG3wjhO3LkSsMncHA9/yA13kG+h4Y=";
};
aarch64-linux = {
url = "https://downloads.1password.com/linux/tar/beta/aarch64/1password-${version}.arm64.tar.gz";
hash = "sha256-Ik5gL5FCxNANOKx/MSH7dCz3XEdLr7jxykaWhMQKUVw=";
hash = "sha256-EUnIIi6DB5kBVid9ExBpNApKItHnRKQziBy/GFt0xag=";
};
x86_64-darwin = {
url = "https://downloads.1password.com/mac/1Password-${version}-x86_64.zip";
hash = "sha256-8cNxhRAOrn/A++APOMUxwrD3+a++ksRMzlmmnQ8J8/c=";
hash = "sha256-U14CjoUJUpd4wWidZz6xGErhHI/VPChqG8cwBTBYoYc=";
};
aarch64-darwin = {
url = "https://downloads.1password.com/mac/1Password-${version}-aarch64.zip";
hash = "sha256-YkZbuCFvWHksLQYKJ3LQD2YDXj9qwHF4Gg8JbxBZsuc=";
hash = "sha256-DD1M2EFSHqG9OHX5Q/CmZLZIKYrBMS4cnX/6tLVi7H0=";
};
};
};
+2 -2
View File
@@ -18,13 +18,13 @@
buildGoModule rec {
pname = "clipqr";
version = "1.2.0";
version = "1.3.0";
src = fetchFromGitLab {
owner = "imatt-foss";
repo = "clipqr";
rev = "v${version}";
hash = "sha256-gfKCuTZY9VsiXMlw6XX6YylMO4xGoLQU/5QvnDV7GbE=";
hash = "sha256-iuA6RqclMm1CWaiM1kpOpgfYvKaYGOIwFQkLr/nCL5M=";
};
vendorHash = null;
+15 -10
View File
@@ -9,15 +9,17 @@
girara,
gettext,
libarchive,
desktop-file-utils,
appstream-glib,
}:
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "zathura-cb";
version = "0.1.10";
version = "0.1.11";
src = fetchurl {
url = "https://pwmt.org/projects/${pname}/download/${pname}-${version}.tar.xz";
hash = "sha256-ibDKF6gMuh6p/Rs7cvOnFz8KrToGqMNk2GXEmZwYu8g=";
url = "https://pwmt.org/projects/zathura-cb/download/zathura-cb-${finalAttrs.version}.tar.xz";
hash = "sha256-TiAepUzcIKkyWMQ1VvY4lEGvmXQN59ymyh/1JBcvvUc=";
};
nativeBuildInputs = [
@@ -25,23 +27,26 @@ stdenv.mkDerivation rec {
ninja
pkg-config
gettext
desktop-file-utils
appstream-glib
];
buildInputs = [
libarchive
zathura_core
girara
];
PKG_CONFIG_ZATHURA_PLUGINDIR = "lib/zathura";
env.PKG_CONFIG_ZATHURA_PLUGINDIR = "lib/zathura";
meta = with lib; {
meta = {
homepage = "https://pwmt.org/projects/zathura-cb/";
description = "Zathura CB plugin";
longDescription = ''
The zathura-cb plugin adds comic book support to zathura.
'';
license = licenses.zlib;
platforms = platforms.unix;
maintainers = with maintainers; [ jlesquembre ];
license = lib.licenses.zlib;
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [ jlesquembre ];
};
}
})
@@ -2,6 +2,7 @@
lib,
stdenv,
fetchFromGitHub,
fetchpatch,
meson,
ninja,
wrapGAppsHook3,
@@ -28,15 +29,24 @@
stdenv.mkDerivation (finalAttrs: {
pname = "zathura";
version = "0.5.6";
version = "0.5.8";
src = fetchFromGitHub {
owner = "pwmt";
repo = "zathura";
rev = finalAttrs.version;
hash = "sha256-lTEBIZ3lkzjJ+L1qecrcL8iseo8AvSIo3Wh65/ikwac=";
hash = "sha256-k6DEJpUA3s0mGxE38aYnX7uea98LrzevJhWW1abHo/c=";
};
patches = [
# https://github.com/pwmt/zathura/issues/664
(fetchpatch {
name = "fix-build-on-macos.patch";
url = "https://github.com/pwmt/zathura/commit/53f151f775091abec55ccc4b63893a8f9a668588.patch";
hash = "sha256-d8lRdlBN1Kfw/aTjz8x0gvTKy+SqSYWHLQCjV7hF5MI=";
})
];
outputs = [
"bin"
"man"
@@ -54,6 +64,7 @@ stdenv.mkDerivation (finalAttrs: {
# Make sure tests are enabled for doCheck
# (lib.mesonEnable "tests" finalAttrs.finalPackage.doCheck)
(lib.mesonEnable "seccomp" stdenv.hostPlatform.isLinux)
(lib.mesonEnable "landlock" stdenv.hostPlatform.isLinux)
];
nativeBuildInputs = [
@@ -85,11 +96,11 @@ stdenv.mkDerivation (finalAttrs: {
passthru.updateScript = gitUpdater { };
meta = with lib; {
meta = {
homepage = "https://pwmt.org/projects/zathura";
description = "Core component for zathura PDF viewer";
license = licenses.zlib;
platforms = platforms.unix;
maintainers = with maintainers; [ globin ];
license = lib.licenses.zlib;
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [ globin ];
};
})
@@ -10,22 +10,27 @@
girara,
djvulibre,
gettext,
desktop-file-utils,
appstream-glib,
}:
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "zathura-djvu";
version = "0.2.9";
version = "0.2.10";
src = fetchurl {
url = "https://pwmt.org/projects/${pname}/download/${pname}-${version}.tar.xz";
hash = "sha256-lub4pu5TIxBzsvcAMmSHL4RQHmPD2nvwWY0EYoawwgA=";
url = "https://pwmt.org/projects/zathura-djvu/download/zathura-djvu-${finalAttrs.version}.tar.xz";
hash = "sha256-MunYmSmnbNfT/Lr3n0QYaL2r7fFzF9HRhD+qHxkzjZU=";
};
nativeBuildInputs = [
meson
ninja
pkg-config
desktop-file-utils
appstream-glib
];
buildInputs = [
djvulibre
gettext
@@ -34,17 +39,17 @@ stdenv.mkDerivation rec {
girara
];
PKG_CONFIG_ZATHURA_PLUGINDIR = "lib/zathura";
env.PKG_CONFIG_ZATHURA_PLUGINDIR = "lib/zathura";
meta = with lib; {
meta = {
homepage = "https://pwmt.org/projects/zathura-djvu/";
description = "Zathura DJVU plugin";
longDescription = ''
The zathura-djvu plugin adds DjVu support to zathura by using the
djvulibre library.
'';
license = licenses.zlib;
platforms = platforms.unix;
license = lib.licenses.zlib;
platforms = lib.platforms.unix;
maintainers = [ ];
};
}
})
@@ -17,22 +17,26 @@
tesseract,
leptonica,
mujs,
desktop-file-utils,
appstream-glib,
gitUpdater,
}:
stdenv.mkDerivation rec {
version = "0.4.2";
stdenv.mkDerivation (finalAttrs: {
version = "0.4.4";
pname = "zathura-pdf-mupdf";
src = fetchurl {
url = "https://pwmt.org/projects/${pname}/download/${pname}-${version}.tar.xz";
hash = "sha256-fFC+z9mJX9ccExsV336Ut+zJJa8UdfUz/qVp9YgcnhM=";
url = "https://pwmt.org/projects/zathura-pdf-mupdf/download/zathura-pdf-mupdf-${finalAttrs.version}.tar.xz";
hash = "sha256-ASViSQHKvjov5jMVpG59lmoyPAKP9TiQ3694Vq2x9Pw=";
};
nativeBuildInputs = [
meson
ninja
pkg-config
desktop-file-utils
appstream-glib
];
buildInputs = [
@@ -49,7 +53,7 @@ stdenv.mkDerivation rec {
mujs
] ++ lib.optional stdenv.isDarwin gtk-mac-integration;
PKG_CONFIG_ZATHURA_PLUGINDIR = "lib/zathura";
env.PKG_CONFIG_ZATHURA_PLUGINDIR = "lib/zathura";
postPatch = ''
sed -i -e '/^mupdfthird =/d' -e 's/, mupdfthird//g' meson.build
@@ -57,15 +61,15 @@ stdenv.mkDerivation rec {
passthru.updateScript = gitUpdater { url = "https://git.pwmt.org/pwmt/zathura-pdf-mupdf.git"; };
meta = with lib; {
meta = {
homepage = "https://pwmt.org/projects/zathura-pdf-mupdf/";
description = "Zathura PDF plugin (mupdf)";
longDescription = ''
The zathura-pdf-mupdf plugin adds PDF support to zathura by
using the mupdf rendering library.
'';
license = licenses.zlib;
platforms = platforms.unix;
license = lib.licenses.zlib;
platforms = lib.platforms.unix;
maintainers = [ ];
};
}
})
@@ -8,39 +8,44 @@
zathura_core,
girara,
poppler,
desktop-file-utils,
appstream-glib,
}:
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "zathura-pdf-poppler";
version = "0.3.2";
version = "0.3.3";
src = fetchurl {
url = "https://pwmt.org/projects/${pname}/download/${pname}-${version}.tar.xz";
hash = "sha256-cavu1RzR0YjO89vUwWR1jjw3FgR1aWeyOtF2rlNFMBE=";
url = "https://pwmt.org/projects/zathura-pdf-poppler/download/zathura-pdf-poppler-${finalAttrs.version}.tar.xz";
hash = "sha256-yBLy9ERv1d4Wc04TwC6pqiW6Tjup9ytzLA/5D5ujSTU=";
};
nativeBuildInputs = [
meson
ninja
pkg-config
desktop-file-utils
appstream-glib
zathura_core
];
buildInputs = [
poppler
girara
];
PKG_CONFIG_ZATHURA_PLUGINDIR = "lib/zathura";
env.PKG_CONFIG_ZATHURA_PLUGINDIR = "lib/zathura";
meta = with lib; {
meta = {
homepage = "https://pwmt.org/projects/zathura-pdf-poppler/";
description = "Zathura PDF plugin (poppler)";
longDescription = ''
The zathura-pdf-poppler plugin adds PDF support to zathura by
using the poppler rendering library.
'';
license = licenses.zlib;
platforms = platforms.unix;
license = lib.licenses.zlib;
platforms = lib.platforms.unix;
maintainers = [ ];
};
}
})
+14 -9
View File
@@ -9,15 +9,17 @@
girara,
libspectre,
gettext,
desktop-file-utils,
appstream-glib,
}:
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "zathura-ps";
version = "0.2.7";
version = "0.2.8";
src = fetchurl {
url = "https://pwmt.org/projects/${pname}/download/${pname}-${version}.tar.xz";
hash = "sha256-WJf5IEz1+Xi5QTvnzn/r3oQxV69I41GTjt8H2/kwjkY=";
url = "https://pwmt.org/projects/zathura-ps/download/zathura-ps-${finalAttrs.version}.tar.xz";
hash = "sha256-B8pZT3J3+YdtADgEhBg0PqKWQCjpPJD5Vp7/NqiTLko=";
};
nativeBuildInputs = [
@@ -25,24 +27,27 @@ stdenv.mkDerivation rec {
ninja
pkg-config
gettext
desktop-file-utils
appstream-glib
];
buildInputs = [
libspectre
zathura_core
girara
];
PKG_CONFIG_ZATHURA_PLUGINDIR = "lib/zathura";
env.PKG_CONFIG_ZATHURA_PLUGINDIR = "lib/zathura";
meta = with lib; {
meta = {
homepage = "https://pwmt.org/projects/zathura-ps/";
description = "Zathura PS plugin";
longDescription = ''
The zathura-ps plugin adds PS support to zathura by using the
libspectre library.
'';
license = licenses.zlib;
platforms = platforms.unix;
license = lib.licenses.zlib;
platforms = lib.platforms.unix;
maintainers = [ ];
};
}
})
@@ -1,18 +1,18 @@
{
"airgap-images-amd64": {
"url": "https://github.com/k3s-io/k3s/releases/download/v1.28.12%2Bk3s1/k3s-airgap-images-amd64.tar.zst",
"sha256": "0dhzkn5y3ng7blyxj4bwrhbq5qvl3hq1hzg0h9633h8swv0xbsss"
"url": "https://github.com/k3s-io/k3s/releases/download/v1.28.13%2Bk3s1/k3s-airgap-images-amd64.tar.zst",
"sha256": "1v3vyrb86xijyvljs0s0skhxpjbarjqg2sx9m40332dfq9din7xq"
},
"airgap-images-arm": {
"url": "https://github.com/k3s-io/k3s/releases/download/v1.28.12%2Bk3s1/k3s-airgap-images-arm.tar.zst",
"sha256": "1225nqsfg7p6iq7a7qibzf3d0r7iwn53hnd9w6l189dxqna97015"
"url": "https://github.com/k3s-io/k3s/releases/download/v1.28.13%2Bk3s1/k3s-airgap-images-arm.tar.zst",
"sha256": "0yifpx6vix5bjzkz81i5rsn89hkpp0rhk77ndl1lgy66pq4csbmm"
},
"airgap-images-arm64": {
"url": "https://github.com/k3s-io/k3s/releases/download/v1.28.12%2Bk3s1/k3s-airgap-images-arm64.tar.zst",
"sha256": "1lic564naj9323dkkq0z0y10n3j3yfmhixargqqs60syanfvj2p7"
"url": "https://github.com/k3s-io/k3s/releases/download/v1.28.13%2Bk3s1/k3s-airgap-images-arm64.tar.zst",
"sha256": "1p8zf47pghhjqhrcvmzdbcfxxy78pjpqwvmhm3wdidsa8xyy375a"
},
"images-list": {
"url": "https://github.com/k3s-io/k3s/releases/download/v1.28.12%2Bk3s1/k3s-images.txt",
"sha256": "1my3lfs5rfazcnnpsc9dj84dfnxx88xydrl86z6yw5n5p84x4nif"
"url": "https://github.com/k3s-io/k3s/releases/download/v1.28.13%2Bk3s1/k3s-images.txt",
"sha256": "1f1d33jn4g5b6zmzdzzm4ffwfrmjwh60v9gnph0ysxjwsq1k0pxp"
}
}
@@ -1,15 +1,15 @@
{
k3sVersion = "1.28.12+k3s1";
k3sCommit = "4717e2a58e04f0ba3d9f43d574a7eff01dea9146";
k3sRepoSha256 = "02wywlqqna0dj9cam6q3ykb3p5mi96f6lclrg5yhjky7jdvkffds";
k3sVendorHash = "sha256-RyUlaGQnfrCm4cB5FRs9IAeF+zn4LzAXmIViU3o30Z4=";
k3sVersion = "1.28.13+k3s1";
k3sCommit = "47737e1c4c941325574e8aa14e4a3af2e596f696";
k3sRepoSha256 = "1x66n36lxcvi5d9bdz0f1w2p24493rh3vbk1pskqd1f3v3fbv7kn";
k3sVendorHash = "sha256-/knBr0l7dZ6lX9QpohyPNrFEi4WQpNM01zOE5bCIB2E=";
chartVersions = import ./chart-versions.nix;
imagesVersions = builtins.fromJSON (builtins.readFile ./images-versions.json);
k3sRootVersion = "0.14.0";
k3sRootSha256 = "15cs9faw3jishsb5nhgmb5ldjc47hkwf7hz2126fp8ahf80m0fcl";
k3sCNIVersion = "1.4.0-k3s2";
k3sCNISha256 = "17dg6jgjx18nrlyfmkv14dhzxsljz4774zgwz5dchxcf38bvarqa";
containerdVersion = "1.7.17-k3s1.28";
containerdSha256 = "0nhhx932j551ran3kkvyp4nmsg5c71mq0g6jrcbs2j4nn7yqdkhm";
containerdVersion = "1.7.20-k3s2.28";
containerdSha256 = "0jqqa9202d94qd7g8d5zy161snlsc42cdjpmp50w4j3pnp2i1cki";
criCtlVersion = "1.26.0-rc.0-k3s1";
}
@@ -1,18 +1,18 @@
{
"airgap-images-amd64": {
"url": "https://github.com/k3s-io/k3s/releases/download/v1.29.7%2Bk3s1/k3s-airgap-images-amd64.tar.zst",
"sha256": "1dyh107ygnlv9gyq2f9jdgrwjiyg25a61id69z48vc60gq480888"
"url": "https://github.com/k3s-io/k3s/releases/download/v1.29.8%2Bk3s1/k3s-airgap-images-amd64.tar.zst",
"sha256": "1v3vyrb86xijyvljs0s0skhxpjbarjqg2sx9m40332dfq9din7xq"
},
"airgap-images-arm": {
"url": "https://github.com/k3s-io/k3s/releases/download/v1.29.7%2Bk3s1/k3s-airgap-images-arm.tar.zst",
"sha256": "16l6d1ix3ri1l2wr2k5brg11a1snbkqhqasrk69wrix6diddklrn"
"url": "https://github.com/k3s-io/k3s/releases/download/v1.29.8%2Bk3s1/k3s-airgap-images-arm.tar.zst",
"sha256": "0yifpx6vix5bjzkz81i5rsn89hkpp0rhk77ndl1lgy66pq4csbmm"
},
"airgap-images-arm64": {
"url": "https://github.com/k3s-io/k3s/releases/download/v1.29.7%2Bk3s1/k3s-airgap-images-arm64.tar.zst",
"sha256": "0pg4nzh1rf28003yxhl3jklxs41vjjgldviybvnqqp146ib6hy0r"
"url": "https://github.com/k3s-io/k3s/releases/download/v1.29.8%2Bk3s1/k3s-airgap-images-arm64.tar.zst",
"sha256": "1p8zf47pghhjqhrcvmzdbcfxxy78pjpqwvmhm3wdidsa8xyy375a"
},
"images-list": {
"url": "https://github.com/k3s-io/k3s/releases/download/v1.29.7%2Bk3s1/k3s-images.txt",
"sha256": "1my3lfs5rfazcnnpsc9dj84dfnxx88xydrl86z6yw5n5p84x4nif"
"url": "https://github.com/k3s-io/k3s/releases/download/v1.29.8%2Bk3s1/k3s-images.txt",
"sha256": "1f1d33jn4g5b6zmzdzzm4ffwfrmjwh60v9gnph0ysxjwsq1k0pxp"
}
}
@@ -1,15 +1,15 @@
{
k3sVersion = "1.29.7+k3s1";
k3sCommit = "f246bbc390a05f45431e49617b58013fe06a460d";
k3sRepoSha256 = "0fv628rxxavqmb2gv0ncsx4m8ghn3v6ddn2n06x8q4ar27d9gijg";
k3sVendorHash = "sha256-pAOyGgEaO6ewNv+6yhDt83NZl95rmLseFUs4vlXNH6Q=";
k3sVersion = "1.29.8+k3s1";
k3sCommit = "33fdc35dd67cf6c07989327e992fd26ed89b2449";
k3sRepoSha256 = "0ky5f039nkhdj6y5v9yr6lk875l29c67j6kqc2dzdb3iqbwskcbr";
k3sVendorHash = "sha256-VxVGBvpeKf/nuw09Llf85d4P8oCD2GvD1f0Mxt6fMj8=";
chartVersions = import ./chart-versions.nix;
imagesVersions = builtins.fromJSON (builtins.readFile ./images-versions.json);
k3sRootVersion = "0.14.0";
k3sRootSha256 = "15cs9faw3jishsb5nhgmb5ldjc47hkwf7hz2126fp8ahf80m0fcl";
k3sCNIVersion = "1.4.0-k3s2";
k3sCNISha256 = "17dg6jgjx18nrlyfmkv14dhzxsljz4774zgwz5dchxcf38bvarqa";
containerdVersion = "1.7.17-k3s1";
containerdSha256 = "1j61mbgx346ydvnjd8b07wf7nmvvplx28wi5jjdzi1k688r2hxpf";
containerdVersion = "1.7.20-k3s1";
containerdSha256 = "12ihr3z8vcglv5b0v9ris29zkkkdvjbcp3bf7ym71a0xdbg83s8i";
criCtlVersion = "1.29.0-k3s1";
}
@@ -1,18 +1,18 @@
{
"airgap-images-amd64": {
"url": "https://github.com/k3s-io/k3s/releases/download/v1.30.3%2Bk3s1/k3s-airgap-images-amd64.tar.zst",
"sha256": "1ym7cdm3a2f05wgh4vba2g7q1zihrfvvm2zngcs0gm8djj7hy4d9"
"url": "https://github.com/k3s-io/k3s/releases/download/v1.30.4%2Bk3s1/k3s-airgap-images-amd64.tar.zst",
"sha256": "145sj4gpwdjvfv3bphpdg6db1d83bbwl0shbnsqpjizsm3ifvmm9"
},
"airgap-images-arm": {
"url": "https://github.com/k3s-io/k3s/releases/download/v1.30.3%2Bk3s1/k3s-airgap-images-arm.tar.zst",
"sha256": "15mj949msrd30xhqryhpsvx1bi3pywm1z5bmi0h40qyzc1mcfvjk"
"url": "https://github.com/k3s-io/k3s/releases/download/v1.30.4%2Bk3s1/k3s-airgap-images-arm.tar.zst",
"sha256": "0sdkfsjxxi5sq0nxjw7g7r1p7711l74r39y5ss12q85q4sla0m7l"
},
"airgap-images-arm64": {
"url": "https://github.com/k3s-io/k3s/releases/download/v1.30.3%2Bk3s1/k3s-airgap-images-arm64.tar.zst",
"sha256": "1k2q6rzczajnrkj57p97fdr7lgmrfv7x54by2syngfwb5in8fhd5"
"url": "https://github.com/k3s-io/k3s/releases/download/v1.30.4%2Bk3s1/k3s-airgap-images-arm64.tar.zst",
"sha256": "1kw85g79rywk6n3wda7ffvjhf030wwj8g3x8n73rgiprvksw4p7j"
},
"images-list": {
"url": "https://github.com/k3s-io/k3s/releases/download/v1.30.3%2Bk3s1/k3s-images.txt",
"sha256": "1my3lfs5rfazcnnpsc9dj84dfnxx88xydrl86z6yw5n5p84x4nif"
"url": "https://github.com/k3s-io/k3s/releases/download/v1.30.4%2Bk3s1/k3s-images.txt",
"sha256": "1f1d33jn4g5b6zmzdzzm4ffwfrmjwh60v9gnph0ysxjwsq1k0pxp"
}
}
@@ -1,15 +1,15 @@
{
k3sVersion = "1.30.3+k3s1";
k3sCommit = "f646604010affc6a1d3233a8a0870bca46bf80cf";
k3sRepoSha256 = "1sqa4cx5rihrqcnriq7if7sm4hx73ma975yyr5k9nvhg71dvlig3";
k3sVendorHash = "sha256-HMlYdWDUoELpwsfCtyCxVIcFULdvu5gna83lc79AUWc=";
k3sVersion = "1.30.4+k3s1";
k3sCommit = "98262b5dee29fe5ac849a0cef90b5d50292b020b";
k3sRepoSha256 = "1iwg7j0divbh41dx40kz69qkvscvppqb37dqvxayw3ha1yja4sq6";
k3sVendorHash = "sha256-EovTZ3DvDqWFR9vxhtjgcZcPXVk1C0PYNCxEV5XA6wg=";
chartVersions = import ./chart-versions.nix;
imagesVersions = builtins.fromJSON (builtins.readFile ./images-versions.json);
k3sRootVersion = "0.14.0";
k3sRootSha256 = "15cs9faw3jishsb5nhgmb5ldjc47hkwf7hz2126fp8ahf80m0fcl";
k3sCNIVersion = "1.4.0-k3s2";
k3sCNISha256 = "17dg6jgjx18nrlyfmkv14dhzxsljz4774zgwz5dchxcf38bvarqa";
containerdVersion = "1.7.17-k3s1";
containerdSha256 = "1j61mbgx346ydvnjd8b07wf7nmvvplx28wi5jjdzi1k688r2hxpf";
containerdVersion = "1.7.20-k3s1";
containerdSha256 = "12ihr3z8vcglv5b0v9ris29zkkkdvjbcp3bf7ym71a0xdbg83s8i";
criCtlVersion = "1.29.0-k3s1";
}
@@ -0,0 +1,10 @@
{
traefik-crd = {
url = "https://k3s.io/k3s-charts/assets/traefik-crd/traefik-crd-25.0.3+up25.0.0.tgz";
sha256 = "1z693i4kd3jyf26ccnb0sxjyxadipl6k13n7jyg5v4y93fv1rpdw";
};
traefik = {
url = "https://k3s.io/k3s-charts/assets/traefik/traefik-25.0.3+up25.0.0.tgz";
sha256 = "1a24qlp7c6iri72ka1i37l1lzn13xibrd26dy295z2wzr55gg7if";
};
}
@@ -0,0 +1,18 @@
{
"airgap-images-amd64": {
"url": "https://github.com/k3s-io/k3s/releases/download/v1.31.0%2Bk3s1/k3s-airgap-images-amd64.tar.zst",
"sha256": "13pakr8nxlbqhqcz40gyjncw4bghk7x7ryb2ynmr5airspqcdrl6"
},
"airgap-images-arm": {
"url": "https://github.com/k3s-io/k3s/releases/download/v1.31.0%2Bk3s1/k3s-airgap-images-arm.tar.zst",
"sha256": "0vc2v89qy9gbzfbmfrdb0l5yzyprk7yma5ps0yfj60jd9av07qvh"
},
"airgap-images-arm64": {
"url": "https://github.com/k3s-io/k3s/releases/download/v1.31.0%2Bk3s1/k3s-airgap-images-arm64.tar.zst",
"sha256": "10ffa45pm1scavcd5cimdaw29rlc55c9i40qzh3n3451g1yqlmmk"
},
"images-list": {
"url": "https://github.com/k3s-io/k3s/releases/download/v1.31.0%2Bk3s1/k3s-images.txt",
"sha256": "0y4x02fj1iysghq6s88wsiqfpsajrrwrg89m59qk431cii23nrza"
}
}
@@ -0,0 +1,15 @@
{
k3sVersion = "1.31.0+k3s1";
k3sCommit = "34be6d96d17d8d65fda86272b62b752cb0e9c45e";
k3sRepoSha256 = "16yzsx56jmca07jdnzjvy4pcfrvvibv987l1mzdaws1vkm3xqfnw";
k3sVendorHash = "sha256-1uYlvGkW6n4aiUVX/2OjppczdobY/fk1ZaK6j3AEwvM=";
chartVersions = import ./chart-versions.nix;
imagesVersions = builtins.fromJSON (builtins.readFile ./images-versions.json);
k3sRootVersion = "0.14.0";
k3sRootSha256 = "15cs9faw3jishsb5nhgmb5ldjc47hkwf7hz2126fp8ahf80m0fcl";
k3sCNIVersion = "1.4.0-k3s2";
k3sCNISha256 = "17dg6jgjx18nrlyfmkv14dhzxsljz4774zgwz5dchxcf38bvarqa";
containerdVersion = "1.7.20-k3s1";
containerdSha256 = "12ihr3z8vcglv5b0v9ris29zkkkdvjbcp3bf7ym71a0xdbg83s8i";
criCtlVersion = "1.31.0-k3s2";
}
@@ -211,7 +211,7 @@ let
sed --quiet '/# --- run the install process --/q;p' ${k3sRepo}/install.sh > install.sh
# Let killall expect "containerd-shim" in the Nix store
to_replace="k3s/data/\[\^/\]\*/bin/containerd-shim"
to_replace="/data/\[\^/\]\*/bin/containerd-shim"
replacement="/nix/store/.*k3s-containerd.*/bin/containerd-shim"
changes=$(sed -i "s|$to_replace|$replacement| w /dev/stdout" install.sh)
if [ -z "$changes" ]; then
@@ -43,4 +43,14 @@ in
];
}
) extraArgs;
k3s_1_31 = common (
(import ./1_31/versions.nix)
// {
updateScript = [
./update-script.sh
"31"
];
}
) extraArgs;
}
@@ -107,7 +107,13 @@ CONTAINERD_VERSION=$(grep github.com/containerd/containerd ${FILE_GO_MOD} \
CONTAINERD_SHA256=$(nix-prefetch-url --quiet --unpack \
"https://github.com/k3s-io/containerd/archive/refs/tags/v${CONTAINERD_VERSION}.tar.gz")
CRI_CTL_VERSION=$(grep github.com/kubernetes-sigs/cri-tools ${FILE_GO_MOD} \
# The repository of "cri-tools" changes for 1.31.x, this can likely be removed in future releases
if [ "$MINOR_VERSION" -gt 30 ]; then
CRI_CTL_REPO=sigs.k8s.io
else
CRI_CTL_REPO=github.com/kubernetes-sigs
fi
CRI_CTL_VERSION=$(grep "$CRI_CTL_REPO/cri-tools" ${FILE_GO_MOD} \
| head -n1 | awk '{print $4}' | sed -e 's/"//g' -e 's/^v//')
setKV () {
@@ -2,7 +2,6 @@
, stdenv
, rustPlatform
, fetchFromGitHub
, perl
, Security ? null
}:
@@ -25,7 +24,6 @@ rustPlatform.buildRustPackage rec {
lockFile = ./Cargo.lock;
};
nativeBuildInputs = [ perl ];
buildInputs = lib.optionals stdenv.isDarwin [ Security ];
meta = with lib; {
@@ -2,16 +2,16 @@
buildGoModule rec {
pname = "kubergrunt";
version = "0.15.0";
version = "0.16.0";
src = fetchFromGitHub {
owner = "gruntwork-io";
repo = "kubergrunt";
rev = "v${version}";
sha256 = "sha256-yN5tpe3ayQPhTlBvxlt7CD6mSURCB4lxGatEK9OThzs=";
sha256 = "sha256-FOXnerB6qmUUotWLlTTsR5x0+A0Q9D8PVDTMG8j8b9o=";
};
vendorHash = "sha256-VJkqg2cnpYHuEYOv5+spoyRWFAdFWE7YIVYaN9OmIZM=";
vendorHash = "sha256-rgU6Yv+gmKShWfpPaWtK2VIBPgFSsPVOnUzIp2+V7oI=";
# Disable tests since it requires network access and relies on the
# presence of certain AWS infrastructure
@@ -2,17 +2,17 @@
buildGoModule rec {
pname = "kuttl";
version = "0.18.0";
version = "0.19.0";
cli = "kubectl-kuttl";
src = fetchFromGitHub {
owner = "kudobuilder";
repo = "kuttl";
rev = "v${version}";
sha256 = "sha256-wTnBMNgwHqK8PdpEa3RAsVJemnGw/ymn6GJciPFsYrU=";
sha256 = "sha256-7fcVmLvRbKYuWuqwqZWlQf08YEyowcTxrp5RteV8qyU=";
};
vendorHash = "sha256-RKQM1JxyZA1HwqRjCULY4X3jZK9SgclW55/qXp395cQ=";
vendorHash = "sha256-E6gzr9gCLbRaoJU/pYA2cAy0rv5SUVmwf0m34lchF+M=";
subPackages = [ "cmd/kubectl-kuttl" ];
@@ -1,39 +0,0 @@
{ lib, fetchurl, appimageTools }:
let
pname = "openlens";
version = "6.5.2-366";
src = fetchurl {
url = "https://github.com/MuhammedKalkan/OpenLens/releases/download/v${version}/OpenLens-${version}.x86_64.AppImage";
sha256 = "sha256-ZAltAS/U/xh4kCT7vQ+NHAzWV7z0uE5GMQICHKSdj8k=";
};
appimageContents = appimageTools.extractType2 {
inherit pname version src;
};
in
appimageTools.wrapType2 {
inherit pname version src;
unshareIpc = false;
extraInstallCommands = ''
install -m 444 -D ${appimageContents}/open-lens.desktop $out/share/applications/${pname}.desktop
install -m 444 -D ${appimageContents}/usr/share/icons/hicolor/512x512/apps/open-lens.png \
$out/share/icons/hicolor/512x512/apps/${pname}.png
substituteInPlace $out/share/applications/${pname}.desktop \
--replace 'Icon=open-lens' 'Icon=${pname}' \
--replace 'Exec=AppRun' 'Exec=${pname}'
'';
meta = with lib; {
description = "Kubernetes IDE";
homepage = "https://github.com/MuhammedKalkan/OpenLens";
license = licenses.mit;
maintainers = with maintainers; [ benwbooth sebtm ];
mainProgram = "openlens";
platforms = [ "x86_64-linux" ];
};
}
@@ -14,13 +14,13 @@
let
package = buildGoModule rec {
pname = "opentofu";
version = "1.8.1";
version = "1.8.2";
src = fetchFromGitHub {
owner = "opentofu";
repo = "opentofu";
rev = "v${version}";
hash = "sha256-mMp3X2jXBQi/lRbqdiBa1UMYPKXl4jEvTHXxbPji5D8=";
hash = "sha256-kBI3Jgi4fDOx5bknTMlcI2K3LxKj6Q4dunbG9N33Ps0=";
};
vendorHash = "sha256-cM2DSP2ss3vleUhPBIdyxKeWJxtHpdjL5b5HVS/iC6o=";
@@ -17,16 +17,16 @@ let
tctl-next = buildGoModule rec {
pname = "tctl-next";
version = "0.13.1";
version = "1.0.0";
src = fetchFromGitHub {
owner = "temporalio";
repo = "cli";
rev = "v${version}";
hash = "sha256-bh0UsXA5yHtvP9femOwEzVzmu1VLz2uZwoIHL/kI7kM=";
hash = "sha256-y0C2z2iMMQSG5+xGngZ98+ixIgbvaQxPdAWuPbEbBAY=";
};
vendorHash = "sha256-ziCJG722c32QAh9QmoC2E7TcLiC2InKwfdC9mkanTsU=";
vendorHash = "sha256-zhGqDHdVGg7eGnw5L3eSyXKBTjp85ir5zrtf7HbXmC0=";
inherit overrideModAttrs;
@@ -37,7 +37,7 @@ let
ldflags = [
"-s"
"-w"
"-X github.com/temporalio/cli/headers.Version=${version}"
"-X github.com/temporalio/cli/temporalcli.Version=${version}"
];
# Tests fail with x86 on macOS Rosetta 2
@@ -30,7 +30,7 @@ stdenv.mkDerivation (finalAttrs: builtins.removeAttrs pinData [ "hashes" ] // {
pname = "element-desktop";
name = "${finalAttrs.pname}-${finalAttrs.version}";
src = fetchFromGitHub {
owner = "vector-im";
owner = "element-hq";
repo = "element-desktop";
rev = "v${finalAttrs.version}";
hash = desktopSrcHash;
@@ -112,7 +112,7 @@ stdenv.mkDerivation (finalAttrs: builtins.removeAttrs pinData [ "hashes" ] // {
'';
# The desktop item properties should be kept in sync with data from upstream:
# https://github.com/vector-im/element-desktop/blob/develop/package.json
# https://github.com/element-hq/element-desktop/blob/develop/package.json
desktopItem = makeDesktopItem {
name = "element-desktop";
exec = "${executableName} %u";
@@ -147,7 +147,7 @@ stdenv.mkDerivation (finalAttrs: builtins.removeAttrs pinData [ "hashes" ] // {
meta = with lib; {
description = "A feature-rich client for Matrix.org";
homepage = "https://element.io/";
changelog = "https://github.com/vector-im/element-desktop/blob/v${finalAttrs.version}/CHANGELOG.md";
changelog = "https://github.com/element-hq/element-desktop/blob/v${finalAttrs.version}/CHANGELOG.md";
license = licenses.asl20;
maintainers = teams.matrix.members;
inherit (electron.meta) platforms;
@@ -20,7 +20,7 @@ stdenv.mkDerivation (finalAttrs: builtins.removeAttrs pinData [ "hashes" ] // {
pname = "element-web";
src = fetchFromGitHub {
owner = "vector-im";
owner = "element-hq";
repo = "element-web";
rev = "v${finalAttrs.version}";
hash = webSrcHash;
@@ -51,7 +51,7 @@ stdenv.mkDerivation (finalAttrs: builtins.removeAttrs pinData [ "hashes" ] // {
# with the update of openssl3, some key ciphers are not supported anymore
# this flag will allow those codecs again as a workaround
# see https://medium.com/the-node-js-collection/node-js-17-is-here-8dba1e14e382#5f07
# and https://github.com/vector-im/element-web/issues/21043
# and https://github.com/element-hq/element-web/issues/21043
export NODE_OPTIONS=--openssl-legacy-provider
mkdir -p $HOME
@@ -77,7 +77,7 @@ stdenv.mkDerivation (finalAttrs: builtins.removeAttrs pinData [ "hashes" ] // {
meta = {
description = "Glossy Matrix collaboration client for the web";
homepage = "https://element.io/";
changelog = "https://github.com/vector-im/element-web/blob/v${finalAttrs.version}/CHANGELOG.md";
changelog = "https://github.com/element-hq/element-web/blob/v${finalAttrs.version}/CHANGELOG.md";
maintainers = lib.teams.matrix.members;
license = lib.licenses.asl20;
platforms = lib.platforms.all;
@@ -12,15 +12,15 @@ version="$1"
set -euo pipefail
if [ -z "$version" ]; then
version="$(wget -q -O- "https://api.github.com/repos/vector-im/element-desktop/releases?per_page=1" | jq -r '.[0].tag_name')"
version="$(wget -q -O- "https://api.github.com/repos/element-hq/element-desktop/releases?per_page=1" | jq -r '.[0].tag_name')"
fi
# strip leading "v"
version="${version#v}"
# Element Web
web_src="https://raw.githubusercontent.com/vector-im/element-web/v$version"
web_src_hash=$(nix-prefetch-github vector-im element-web --rev v${version} | jq -r .hash)
web_src="https://raw.githubusercontent.com/element-hq/element-web/v$version"
web_src_hash=$(nix-prefetch-github element-hq element-web --rev v${version} | jq -r .hash)
web_tmpdir=$(mktemp -d)
trap 'rm -rf "$web_tmpdir"' EXIT
@@ -31,8 +31,8 @@ web_yarn_hash=$(prefetch-yarn-deps yarn.lock)
popd
# Element Desktop
desktop_src="https://raw.githubusercontent.com/vector-im/element-desktop/v$version"
desktop_src_hash=$(nix-prefetch-github vector-im element-desktop --rev v${version} | jq -r .hash)
desktop_src="https://raw.githubusercontent.com/element-hq/element-desktop/v$version"
desktop_src_hash=$(nix-prefetch-github element-hq element-desktop --rev v${version} | jq -r .hash)
desktop_tmpdir=$(mktemp -d)
trap 'rm -rf "$desktop_tmpdir"' EXIT
@@ -12,7 +12,7 @@ stdenv.mkDerivation (finalAttrs: {
version = "0.4.0";
src = fetchFromGitHub {
owner = "vector-im";
owner = "element-hq";
repo = "hydrogen-web";
rev = "v${finalAttrs.version}";
hash = "sha256-u8Yex3r7EZH+JztQHJbfncYeyyl6hgb1ZNFIg//wcb0=";
@@ -57,7 +57,7 @@ stdenv.mkDerivation (finalAttrs: {
meta = {
description = "Lightweight matrix client with legacy and mobile browser support";
homepage = "https://github.com/vector-im/hydrogen-web";
homepage = "https://github.com/element-hq/hydrogen-web";
maintainers = lib.teams.matrix.members;
license = lib.licenses.asl20;
platforms = lib.platforms.all;
@@ -48,23 +48,23 @@ let
# and often with different versions. We write them on three lines
# like this (rather than using {}) so that the updater script can
# find where to edit them.
versions.aarch64-darwin = "6.1.10.38818";
versions.x86_64-darwin = "6.1.10.38818";
versions.x86_64-linux = "6.1.10.1400";
versions.aarch64-darwin = "6.1.11.39163";
versions.x86_64-darwin = "6.1.11.39163";
versions.x86_64-linux = "6.1.11.1545";
srcs = {
aarch64-darwin = fetchurl {
url = "https://zoom.us/client/${versions.aarch64-darwin}/zoomusInstallerFull.pkg?archType=arm64";
name = "zoomusInstallerFull.pkg";
hash = "sha256-E8r0bctM5whwEMppzO9hR3W+k+BmrV0gVx+J02KYmuk=";
hash = "sha256-xWeCiDhYPfTAJttXG5bCwhLu+bmHlcFF/s3+EACeph4=";
};
x86_64-darwin = fetchurl {
url = "https://zoom.us/client/${versions.x86_64-darwin}/zoomusInstallerFull.pkg";
hash = "sha256-HMSBV/B/nTkcU8src6Wdz8uZnz455guSAMGm5ha7mIA=";
hash = "sha256-AB+QXx6r3raymVU7rEJ9dO4CqJI9tnRF3l61vuGnqpI=";
};
x86_64-linux = fetchurl {
url = "https://zoom.us/client/${versions.x86_64-linux}/zoom_x86_64.pkg.tar.xz";
hash = "sha256-c3WywWmblz9Wg3RMtovCBcR/mYyaWkmuoCqqGvHBxwo=";
hash = "sha256-wkG/fYbn3EdbVJwZQI8EcRPmHFX+4zggmfM4sHUjD8I=";
};
};
@@ -7,13 +7,13 @@ let
apps = lib.makeBinPath [ openssh python' cron rsync sshfs-fuse encfs ];
in stdenv.mkDerivation rec {
pname = "backintime-common";
version = "1.4.3";
version = "1.5.2";
src = fetchFromGitHub {
owner = "bit-team";
repo = "backintime";
rev = "v${version}";
sha256 = "sha256-2q2Q4rnxXwVnfH1YEBwY35B2ctG9+qpOIAHqPOjjArg=";
sha256 = "sha256-yfCSTzCmhXDBC1vYqwgVjsYUtc5VO1VW74BmIB0hHfE=";
};
nativeBuildInputs = [ makeWrapper gettext ];
@@ -24,12 +24,13 @@ in stdenv.mkDerivation rec {
configureFlags = [ "--python=${lib.getExe python'}" ];
preConfigure = ''
patchShebangs --build updateversion.sh
cd common
substituteInPlace configure \
--replace "/.." "" \
--replace "share/backintime" "${python'.sitePackages}/backintime"
substituteInPlace "backintime" \
--replace "share" "${python'.sitePackages}"
--replace-fail "/.." "" \
--replace-fail "share/backintime" "${python'.sitePackages}/backintime"
substituteInPlace "backintime" "backintime-askpass" \
--replace-fail "share" "${python'.sitePackages}"
'';
dontAddPrefix = true;
@@ -44,10 +45,11 @@ in stdenv.mkDerivation rec {
description = "Simple backup tool for Linux";
license = lib.licenses.gpl2;
maintainers = with lib.maintainers; [ stephen-huan ];
platforms = lib.platforms.all;
platforms = lib.platforms.linux;
mainProgram = "backintime";
longDescription = ''
Back In Time is a simple backup tool (on top of rsync) for Linux
inspired from flyback project and TimeVault. The backup is
inspired from "flyback project" and "TimeVault". The backup is
done by taking snapshots of a specified set of directories.
'';
};
@@ -1,19 +1,25 @@
{ lib, mkDerivation, backintime-common, python3, polkit, which, su, coreutils, util-linux }:
{ lib, stdenv, backintime-common, python3, polkit, which, su, coreutils, util-linux,
wrapQtAppsHook, qtbase, qtwayland }:
let
python' = python3.withPackages (ps: with ps; [ pyqt5 backintime-common packaging ]);
python' = python3.withPackages (ps: with ps; [ pyqt6 backintime-common packaging ]);
in
mkDerivation {
stdenv.mkDerivation {
inherit (backintime-common)
version src installFlags meta dontAddPrefix nativeBuildInputs;
version src installFlags meta dontAddPrefix;
pname = "backintime-qt";
buildInputs = [ python' backintime-common ];
buildInputs = [ python' backintime-common qtbase qtwayland ];
nativeBuildInputs = backintime-common.nativeBuildInputs or [ ] ++ [
wrapQtAppsHook
];
configureFlags = [ "--python=${lib.getExe python'}" ];
preConfigure = ''
patchShebangs --build updateversion.sh
cd qt
substituteInPlace qttools_path.py \
--replace "__file__, os.pardir, os.pardir" '"${backintime-common}/${python'.sitePackages}/backintime"'
@@ -24,23 +30,23 @@ mkDerivation {
--prefix PATH : "${lib.getBin backintime-common}/bin:$PATH"
substituteInPlace "$out/share/polkit-1/actions/net.launchpad.backintime.policy" \
--replace "/usr/bin/backintime-qt" "$out/bin/backintime-qt"
--replace-fail "/usr/bin/backintime-qt" "$out/bin/backintime-qt"
substituteInPlace "$out/share/applications/backintime-qt-root.desktop" \
--replace "/usr/bin/backintime-qt" "backintime-qt"
--replace-fail "/usr/bin/backintime-qt" "backintime-qt"
substituteInPlace "$out/share/backintime/qt/serviceHelper.py" \
--replace "'which'" "'${lib.getBin which}/bin/which'" \
--replace "/bin/su" "${lib.getBin su}/bin/su" \
--replace "/usr/bin/backintime" "${lib.getBin backintime-common}/bin/backintime" \
--replace "/usr/bin/nice" "${lib.getBin coreutils}/bin/nice" \
--replace "/usr/bin/ionice" "${lib.getBin util-linux}/bin/ionice"
--replace-fail "'which'" "'${lib.getExe which}'" \
--replace-fail "/bin/su" "${lib.getBin su}/bin/su" \
--replace-fail "/usr/bin/backintime" "${lib.getExe backintime-common}" \
--replace-fail "/usr/bin/nice" "${lib.getBin coreutils}/bin/nice" \
--replace-fail "/usr/bin/ionice" "${lib.getBin util-linux}/bin/ionice"
substituteInPlace "$out/share/dbus-1/system-services/net.launchpad.backintime.serviceHelper.service" \
--replace "/usr/share/backintime" "$out/share/backintime"
--replace-fail "/usr/share/backintime" "$out/share/backintime"
substituteInPlace "$out/bin/backintime-qt_polkit" \
--replace "/usr/bin/backintime-qt" "$out/bin/backintime-qt"
--replace-fail "/usr/bin/backintime-qt" "$out/bin/backintime-qt"
wrapProgram "$out/bin/backintime-qt_polkit" \
--prefix PATH : "${lib.getBin polkit}/bin:$PATH"
@@ -33,14 +33,14 @@ let
}.${system} or throwSystem;
hash = {
x86_64-linux = "sha256-l67oq9Jj2mmxcLsEMI4t+85cKD65xxMNkTNJrrRrwJQ=";
x86_64-linux = "sha256-DoN6I1lk4WpOZ+jC+od7jum3lxBHFppea5QFTuqY5nk=";
}.${system} or throwSystem;
displayname = "XPipe";
in stdenvNoCC.mkDerivation rec {
pname = "xpipe";
version = "11.0";
version = "11.1";
src = fetchzip {
url = "https://github.com/xpipe-io/xpipe/releases/download/${version}/xpipe-portable-linux-${arch}.tar.gz";
@@ -17,11 +17,11 @@ let
rec {
x86_64-linux = {
urlSuffix = "linux-x86_64.tar.gz";
hash = "sha256-2v7LF53UmVxFzoNHwv+B2zN7I6pSP66x32OplcIR7Fk=";
hash = "sha256-sQ3dxwPWHLUoWgnR9+oHaFoDzXxtwKRiBvz2wkFB01g=";
};
x86_64-darwin = {
urlSuffix = "macos-universal.zip";
hash = "sha256-73Do2Jhso6GJsyDiSz3ACN8pEmZbuPNW3vjW3BFLhY4=";
hash = "sha256-4bU/qecZBrTr34SZAjDDgwpXAAHDITz6lV6mJGjElko=";
};
aarch64-darwin = x86_64-darwin;
}
@@ -29,7 +29,7 @@ let
in
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "appflowy";
version = "0.6.6";
version = "0.6.8";
src = fetchzip {
url = "https://github.com/AppFlowy-IO/appflowy/releases/download/${finalAttrs.version}/AppFlowy-${finalAttrs.version}-${dist.urlSuffix}";
@@ -20,14 +20,14 @@
let
pname = "qownnotes";
appname = "QOwnNotes";
version = "24.9.0";
version = "24.9.1";
in
stdenv.mkDerivation {
inherit pname version;
src = fetchurl {
url = "https://github.com/pbek/QOwnNotes/releases/download/v${version}/qownnotes-${version}.tar.xz";
hash = "sha256-xlGBpRiak/th/z9zKbQXpuk3py/W1ns90NjKw4w3FtI=";
hash = "sha256-W9w7FJ0EfwPLC9R6OnDz+yny4VSaRGdrPXvaReV9hco=";
};
nativeBuildInputs = [
@@ -1,4 +1,5 @@
{ lib
, cmake
, cppzmq
, curl
, fetchFromGitHub
@@ -9,6 +10,8 @@
, libgit2
, librsvg
, libuuid
, meson
, ninja
, opencascade-occt_7_6
, pkg-config
, podofo
@@ -20,16 +23,19 @@ in
# This base is used in horizon-eda and python3Packages.horizon-eda
rec {
pname = "horizon-eda";
version = "2.5.0";
version = "2.6.0";
src = fetchFromGitHub {
owner = "horizon-eda";
repo = "horizon";
rev = "v${version}";
hash = "sha256-UcjbDJR6shyETpanNkRoH8LF8r6gFjsyNHVSCMHKqS8=";
hash = "sha256-0ikCR10r/WPb+H+Ut2GO6y4A/9bctJLanL/RR4r9GWs=";
};
nativeBuildInputs = [
meson
ninja
cmake
pkg-config
];
@@ -4,7 +4,7 @@
stdenv.mkDerivation rec {
pname = "qgroundcontrol";
version = "4.4.1";
version = "4.4.2";
propagatedBuildInputs = [
qtbase qtcharts qtlocation qtserialport qtsvg qtquickcontrols2
@@ -67,7 +67,7 @@ stdenv.mkDerivation rec {
owner = "mavlink";
repo = pname;
rev = "v${version}";
hash = "sha256-FdF9QQYCF7HbmjvUQgV6HytJo2Aje2OEDPO2GSl1dqE=";
hash = "sha256-2Bc4uC/2e+PTsvFZ4RjnTzkOiBO9vsYHeLPkcwpDRrg=";
fetchSubmodules = true;
};
@@ -40,6 +40,6 @@ stdenv.mkDerivation rec {
homepage = "https://github.com/pentix/qjournalctl";
license = licenses.gpl3Only;
platforms = platforms.all;
maintainers = with maintainers; [ srgom romildo ];
maintainers = with maintainers; [ romildo ];
};
}
@@ -1,90 +0,0 @@
{ stdenv
, lib
, fetchFromGitHub
, fetchpatch2
, rustPlatform
, Security
, SystemConfiguration
, pkg-config
, libiconv
, openssl
, gzip
, libssh2
, libgit2
, zstd
, installShellFiles
, nix-update-script
, testers
, jujutsu
}:
rustPlatform.buildRustPackage rec {
pname = "jujutsu";
version = "0.21.0";
src = fetchFromGitHub {
owner = "martinvonz";
repo = "jj";
rev = "v${version}";
hash = "sha256-uZsfHhcYpobatWaDQczuc9Z3BWHN5VO0qr/8mu5kEio=";
};
cargoHash = "sha256-BOO1jP1Y5CNbE97zj+tpariiBdcuxKb1wyvI7i/VpYI=";
cargoBuildFlags = [ "--bin" "jj" ]; # don't install the fake editors
useNextest = false; # nextest is the upstream integration framework, but is problematic for test skipping
ZSTD_SYS_USE_PKG_CONFIG = "1"; # disable vendored zlib
LIBGIT2_NO_VENDOR = "1"; # disable vendored libgit2
LIBSSH2_SYS_USE_PKG_CONFIG = "1"; # disable vendored libssh2
nativeBuildInputs = [
gzip
installShellFiles
pkg-config
];
buildInputs = [
openssl
zstd
libgit2
libssh2
] ++ lib.optionals stdenv.isDarwin [
Security
SystemConfiguration
libiconv
];
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
$out/bin/jj util mangen > ./jj.1
installManPage ./jj.1
installShellCompletion --cmd jj \
--bash <($out/bin/jj util completion bash) \
--fish <($out/bin/jj util completion fish) \
--zsh <($out/bin/jj util completion zsh)
'';
checkFlags = [
# signing tests spin up an ssh-agent and do git checkouts
"--skip=test_ssh_signing"
];
passthru = {
updateScript = nix-update-script { };
tests = {
version = testers.testVersion {
package = jujutsu;
command = "jj --version";
};
};
};
meta = with lib; {
description = "Git-compatible DVCS that is both simple and powerful";
homepage = "https://github.com/martinvonz/jj";
changelog = "https://github.com/martinvonz/jj/blob/v${version}/CHANGELOG.md";
license = licenses.asl20;
maintainers = with maintainers; [ _0x4A6F thoughtpolice ];
mainProgram = "jj";
};
}
@@ -11,9 +11,9 @@ in
} { };
sublime-merge-dev = common {
buildVersion = "2095";
buildVersion = "2099";
dev = true;
aarch64sha256 = "FmXz8VAWS7e0bB9NeXbihnhdhWMyNJJs6PNt+K2G0Bk=";
x64sha256 = "83Hw27RgGPgugpf4eMuWT6/MSQ2Q2VBCbaXoSGFtTPI=";
aarch64sha256 = "6rfUwzSBCJ3CRrL5E4+wBQ3FuB3PaAUCwh5pDtAbNKE=";
x64sha256 = "qIXDlsdaxY8wvky/ClwhZykZTVrUShsV56utb6BRCWQ=";
} { };
}
@@ -7,12 +7,12 @@
python3Packages.buildPythonApplication rec {
pname = "streamlink";
version = "6.8.3";
version = "6.9.0";
pyproject = true;
src = fetchPypi {
inherit pname version;
hash = "sha256-4/UaVnwIcDCS+R0El6P8Ku/jJ+/Ncl0D5m89zRHtm2g=";
hash = "sha256-LKmwsXuAvJ0JqEIsOQyzjYGa9VZkk5YL8hDY/uIhwX8=";
};
patches = [
@@ -1,10 +1,10 @@
{ lib, stdenv, fetchurl, fetchpatch, python3Packages, zlib, pkg-config, glib, buildPackages
{ lib, stdenv, fetchurl, fetchpatch, python3Packages, zlib, pkg-config, glib, overrideSDK, buildPackages
, pixman, vde2, alsa-lib, flex, pcre2
, bison, lzo, snappy, libaio, libtasn1, gnutls, nettle, curl, dtc, ninja, meson
, sigtool
, makeWrapper, removeReferencesTo
, attr, libcap, libcap_ng, socat, libslirp
, CoreServices, Cocoa, Hypervisor, rez, setfile, vmnet
, CoreServices, Cocoa, Hypervisor, Kernel, rez, setfile, vmnet
, guestAgentSupport ? (with stdenv.hostPlatform; isLinux || isNetBSD || isOpenBSD || isSunOS || isWindows) && !minimal
, numaSupport ? stdenv.isLinux && !stdenv.isAarch32 && !minimal, numactl
, seccompSupport ? stdenv.isLinux && !minimal, libseccomp
@@ -52,6 +52,16 @@
let
hexagonSupport = hostCpuTargets == null || lib.elem "hexagon" hostCpuTargets;
buildPlatformStdenv =
if stdenv.buildPlatform.isDarwin then
overrideSDK buildPackages.stdenv {
# Keep these values in sync with `all-packages.nix`.
darwinSdkVersion = "12.3";
darwinMinVersion = "12.0";
}
else
buildPackages.stdenv;
in
stdenv.mkDerivation (finalAttrs: {
@@ -61,14 +71,14 @@ stdenv.mkDerivation (finalAttrs: {
+ lib.optionalString nixosTestRunner "-for-vm-tests"
+ lib.optionalString toolsOnly "-utils"
+ lib.optionalString userOnly "-user";
version = "9.0.2";
version = "9.1.0";
src = fetchurl {
url = "https://download.qemu.org/qemu-${finalAttrs.version}.tar.xz";
hash = "sha256-qMP1lq7Olto7AMr7dLqvoNFFFer7jtHuP39cLQ6/ArY=";
hash = "sha256-gWtwIqi6fCrDDi4M+XPoJva8yFBTOWAyEsXt6OlNeDQ=";
};
depsBuildBuild = [ buildPackages.stdenv.cc ]
depsBuildBuild = [ buildPlatformStdenv.cc ]
++ lib.optionals hexagonSupport [ pkg-config ];
nativeBuildInputs = [
@@ -82,16 +92,14 @@ stdenv.mkDerivation (finalAttrs: {
++ lib.optionals enableDocs [ python3Packages.sphinx python3Packages.sphinx-rtd-theme ]
++ lib.optionals hexagonSupport [ glib ]
++ lib.optionals stdenv.isDarwin [ sigtool ]
++ lib.optionals (!userOnly) [ dtc ]
# workaround, remove once this patch lands: https://lore.kernel.org/qemu-devel/20240805104921.4035256-1-hi@alyssa.is/
++ lib.optionals (hexagonSupport && stdenv.hostPlatform.isStatic) [ pcre2 ];
++ lib.optionals (!userOnly) [ dtc ];
buildInputs = [ zlib glib pixman
vde2 lzo snappy libtasn1
gnutls nettle curl libslirp
]
++ lib.optionals ncursesSupport [ ncurses ]
++ lib.optionals stdenv.isDarwin [ CoreServices Cocoa Hypervisor rez setfile vmnet ]
++ lib.optionals stdenv.isDarwin [ CoreServices Cocoa Hypervisor Kernel rez setfile vmnet ]
++ lib.optionals seccompSupport [ libseccomp ]
++ lib.optionals numaSupport [ numactl ]
++ lib.optionals alsaSupport [ alsa-lib ]
@@ -129,17 +137,6 @@ stdenv.mkDerivation (finalAttrs: {
patches = [
./fix-qemu-ga.patch
# QEMU upstream does not demand compatibility to pre-10.13, so 9p-darwin
# support on nix requires utimensat fallback. The patch adding this fallback
# set was removed during the process of upstreaming this functionality, and
# will still be needed in nix until the macOS SDK reaches 10.13+.
./provide-fallback-for-utimensat.patch
# Cocoa clipboard support only works on macOS 10.14+
./revert-ui-cocoa-add-clipboard-support.patch
# Standard about panel requires AppKit and macOS 10.13+
./revert-ui-cocoa-use-the-standard-about-panel.patch
# Safe area insets require macOS 11+
./remove-ui-cocoa-use-safe-area-insets.patch
# Workaround for upstream issue with nested virtualisation: https://gitlab.com/qemu-project/qemu/-/issues/1008
(fetchpatch {
url = "https://gitlab.com/qemu-project/qemu/-/commit/3e4546d5bd38a1e98d4bd2de48631abf0398a3a2.diff";
@@ -1,36 +1,45 @@
diff --git i/qga/commands-posix.c w/qga/commands-posix.c
index 954efed01b..39c4b916ce 100644
--- i/qga/commands-posix.c
+++ w/qga/commands-posix.c
@@ -123,6 +123,8 @@ void qmp_guest_shutdown(bool has_mode, const char *mode, Error **errp)
execl("/sbin/shutdown", "shutdown", shutdown_flag, "-g0", "-y",
"hypervisor initiated shutdown", (char *)NULL);
#else
+ execl("/run/current-system/sw/bin/shutdown", "shutdown", "-h", shutdown_flag, "+0",
+ "hypervisor initiated shutdown", (char *)NULL);
execl("/sbin/shutdown", "shutdown", "-h", shutdown_flag, "+0",
"hypervisor initiated shutdown", (char *)NULL);
#endif
@@ -158,11 +160,13 @@ void qmp_guest_set_time(bool has_time, int64_t time_ns, Error **errp)
pid_t pid;
Error *local_err = NULL;
struct timeval tv;
+ static const char hwclock_path_nix[] = "/run/current-system/sw/bin/hwclock";
static const char hwclock_path[] = "/sbin/hwclock";
static int hwclock_available = -1;
if (hwclock_available < 0) {
- hwclock_available = (access(hwclock_path, X_OK) == 0);
+ hwclock_available = (access(hwclock_path_nix, X_OK) == 0) ||
+ (access(hwclock_path, X_OK) == 0);
diff --git a/qga/commands-posix.c b/qga/commands-posix.c
index c2bd0b4316..47cee1c351 100644
--- a/qga/commands-posix.c
+++ b/qga/commands-posix.c
@@ -246,7 +246,7 @@ void qmp_guest_shutdown(const char *mode, Error **errp)
return;
}
if (!hwclock_available) {
@@ -208,6 +212,7 @@ void qmp_guest_set_time(bool has_time, int64_t time_ns, Error **errp)
- const char *argv[] = {"/sbin/shutdown",
+ const char *argv[] = {"/run/current-system/sw/bin/shutdown",
#ifdef CONFIG_SOLARIS
shutdown_flag, "-g0", "-y",
#elif defined(CONFIG_BSD)
@@ -257,6 +257,10 @@ void qmp_guest_shutdown(const char *mode, Error **errp)
"hypervisor initiated shutdown", (char *) NULL};
/* Use '/sbin/hwclock -w' to set RTC from the system time,
* or '/sbin/hwclock -s' to set the system time from RTC. */
+ execl(hwclock_path_nix, "hwclock", has_time ? "-w" : "-s", NULL);
execl(hwclock_path, "hwclock", has_time ? "-w" : "-s", NULL);
_exit(EXIT_FAILURE);
} else if (pid < 0) {
ga_run_command(argv, NULL, "shutdown", &local_err);
+ if (local_err) {
+ argv[0] = "/sbin/shutdown";
+ ga_run_command(argv, NULL, "shutdown", &local_err);
+ }
if (local_err) {
error_propagate(errp, local_err);
return;
@@ -270,7 +274,7 @@ void qmp_guest_set_time(bool has_time, int64_t time_ns, Error **errp)
int ret;
Error *local_err = NULL;
struct timeval tv;
- const char *argv[] = {"/sbin/hwclock", has_time ? "-w" : "-s", NULL};
+ const char *argv[] = {"/run/current-system/sw/bin/hwclock", has_time ? "-w" : "-s", NULL};
/* If user has passed a time, validate and set it. */
if (has_time) {
@@ -303,6 +307,11 @@ void qmp_guest_set_time(bool has_time, int64_t time_ns, Error **errp)
* hardware clock (RTC). */
ga_run_command(argv, NULL, "set hardware clock to system time",
&local_err);
+ if (local_err) {
+ argv[0] = "/sbin/hwclock";
+ ga_run_command(argv, NULL, "set hardware clock to system time",
+ &local_err);
+ }
if (local_err) {
error_propagate(errp, local_err);
return;
@@ -1,189 +0,0 @@
From 2ec149ea3f0046fa83e3be74aca192649a60be47 Mon Sep 17 00:00:00 2001
From: Keno Fischer <keno@juliacomputing.com>
Date: Sat, 16 Jun 2018 20:56:54 -0400
Subject: [PATCH] 9p: darwin: Provide fallback impl for utimensat
This function is new in Mac OS 10.13. Provide a fallback implementation
when building against older SDKs. The complication in the definition comes
having to separately handle the used SDK version and the target OS version.
- If the SDK version is too low (__MAC_10_13 not defined), utimensat is not
defined in the header, so we must not try to use it (doing so would error).
- Otherwise, if the targetted OS version is at least 10.13, we know this
function is available, so we can unconditionally call it.
- Lastly, we check for the availability of the __builtin_available macro to
potentially insert a dynamic check for this OS version. However, __builtin_available
is only available with sufficiently recent versions of clang and while all
Apple clang versions that ship with Xcode versions that support the 10.13
SDK support with builtin, we want to allow building with compilers other
than Apple clang that may not support this builtin.
Signed-off-by: Keno Fischer <keno@juliacomputing.com>
Signed-off-by: Michael Roitzsch <reactorcontrol@icloud.com>
Signed-off-by: Will Cohen <wwcohen@gmail.com>
---
hw/9pfs/9p-local.c | 2 +-
hw/9pfs/9p-util-darwin.c | 96 ++++++++++++++++++++++++++++++++++++++++
hw/9pfs/9p-util-linux.c | 6 +++
hw/9pfs/9p-util.h | 8 ++++
4 files changed, 111 insertions(+), 1 deletion(-)
diff --git a/hw/9pfs/9p-local.c b/hw/9pfs/9p-local.c
index 9d07620235..9c77a431d5 100644
--- a/hw/9pfs/9p-local.c
+++ b/hw/9pfs/9p-local.c
@@ -1081,7 +1081,7 @@ static int local_utimensat(FsContext *s, V9fsPath *fs_path,
goto out;
}
- ret = qemu_utimensat(dirfd, name, buf, AT_SYMLINK_NOFOLLOW);
+ ret = utimensat_nofollow(dirfd, name, buf);
close_preserve_errno(dirfd);
out:
g_free(dirpath);
diff --git a/hw/9pfs/9p-util-darwin.c b/hw/9pfs/9p-util-darwin.c
index 95146e7354..74ab2a7f99 100644
--- a/hw/9pfs/9p-util-darwin.c
+++ b/hw/9pfs/9p-util-darwin.c
@@ -145,3 +145,99 @@ int qemu_mknodat(int dirfd, const char *filename, mode_t mode, dev_t dev)
}
#endif
+
+#ifndef __has_builtin
+#define __has_builtin(x) 0
+#endif
+
+static int update_times_from_stat(int fd, struct timespec times[2],
+ int update0, int update1)
+{
+ struct stat buf;
+ int ret = fstat(fd, &buf);
+ if (ret == -1) {
+ return ret;
+ }
+ if (update0) {
+ times[0] = buf.st_atimespec;
+ }
+ if (update1) {
+ times[1] = buf.st_mtimespec;
+ }
+ return 0;
+}
+
+int utimensat_nofollow(int dirfd, const char *filename,
+ const struct timespec times_in[2])
+{
+ int ret, fd;
+ int special0, special1;
+ struct timeval futimes_buf[2];
+ struct timespec times[2];
+ memcpy(times, times_in, 2 * sizeof(struct timespec));
+
+/* Check whether we have an SDK version that defines utimensat */
+#if defined(__MAC_10_13)
+# if __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_13
+# define UTIMENSAT_AVAILABLE 1
+# elif __has_builtin(__builtin_available)
+# define UTIMENSAT_AVAILABLE __builtin_available(macos 10.13, *)
+# else
+# define UTIMENSAT_AVAILABLE 0
+# endif
+ if (UTIMENSAT_AVAILABLE) {
+ return utimensat(dirfd, filename, times, AT_SYMLINK_NOFOLLOW);
+ }
+#endif
+
+ /* utimensat not available. Use futimes. */
+ fd = openat_file(dirfd, filename, O_PATH_9P_UTIL | O_NOFOLLOW, 0);
+ if (fd == -1) {
+ return -1;
+ }
+
+ special0 = times[0].tv_nsec == UTIME_OMIT;
+ special1 = times[1].tv_nsec == UTIME_OMIT;
+ if (special0 || special1) {
+ /* If both are set, nothing to do */
+ if (special0 && special1) {
+ ret = 0;
+ goto done;
+ }
+
+ ret = update_times_from_stat(fd, times, special0, special1);
+ if (ret < 0) {
+ goto done;
+ }
+ }
+
+ special0 = times[0].tv_nsec == UTIME_NOW;
+ special1 = times[1].tv_nsec == UTIME_NOW;
+ if (special0 || special1) {
+ ret = futimes(fd, NULL);
+ if (ret < 0) {
+ goto done;
+ }
+
+ /* If both are set, we are done */
+ if (special0 && special1) {
+ ret = 0;
+ goto done;
+ }
+
+ ret = update_times_from_stat(fd, times, special0, special1);
+ if (ret < 0) {
+ goto done;
+ }
+ }
+
+ futimes_buf[0].tv_sec = times[0].tv_sec;
+ futimes_buf[0].tv_usec = times[0].tv_nsec / 1000;
+ futimes_buf[1].tv_sec = times[1].tv_sec;
+ futimes_buf[1].tv_usec = times[1].tv_nsec / 1000;
+ ret = futimes(fd, futimes_buf);
+
+done:
+ close_preserve_errno(fd);
+ return ret;
+}
diff --git a/hw/9pfs/9p-util-linux.c b/hw/9pfs/9p-util-linux.c
index db451b0784..320697f347 100644
--- a/hw/9pfs/9p-util-linux.c
+++ b/hw/9pfs/9p-util-linux.c
@@ -68,3 +68,9 @@ int qemu_mknodat(int dirfd, const char *filename, mode_t mode, dev_t dev)
{
return mknodat(dirfd, filename, mode, dev);
}
+
+int utimensat_nofollow(int dirfd, const char *filename,
+ const struct timespec times[2])
+{
+ return utimensat(dirfd, filename, times, AT_SYMLINK_NOFOLLOW);
+}
diff --git a/hw/9pfs/9p-util.h b/hw/9pfs/9p-util.h
index c314cf381d..12d57f3398 100644
--- a/hw/9pfs/9p-util.h
+++ b/hw/9pfs/9p-util.h
@@ -101,6 +101,12 @@ static inline int errno_to_dotl(int err) {
#define qemu_utimensat utimensat
#define qemu_unlinkat unlinkat
+/* Compatibility with old SDK Versions for Darwin */
+#if defined(CONFIG_DARWIN) && !defined(UTIME_NOW)
+#define UTIME_NOW -1
+#define UTIME_OMIT -2
+#endif
+
static inline void close_preserve_errno(int fd)
{
int serrno = errno;
@@ -163,6 +169,8 @@ ssize_t flistxattrat_nofollow(int dirfd, const char *filename,
char *list, size_t size);
ssize_t fremovexattrat_nofollow(int dirfd, const char *filename,
const char *name);
+int utimensat_nofollow(int dirfd, const char *filename,
+ const struct timespec times[2]);
/*
* Darwin has d_seekoff, which appears to function similarly to d_off.
--
2.39.2
@@ -1,14 +0,0 @@
diff --git a/ui/cocoa.m b/ui/cocoa.m
index 25e0db9dd0..7ce889d798 100644
--- a/ui/cocoa.m
+++ b/ui/cocoa.m
@@ -539,9 +539,6 @@ - (NSSize)fixAspectRatio:(NSSize)max
- (NSSize) screenSafeAreaSize
{
NSSize size = [[[self window] screen] frame].size;
- NSEdgeInsets insets = [[[self window] screen] safeAreaInsets];
- size.width -= insets.left + insets.right;
- size.height -= insets.top + insets.bottom;
return size;
}
@@ -1,200 +0,0 @@
Based on a reversion of upstream 7e3e20d89129614f4a7b2451fe321cc6ccca3b76,
adapted for 7.2.0
diff --git a/include/ui/clipboard.h b/include/ui/clipboard.h
index ce76aa451f..c4e1dc4ff4 100644
--- a/include/ui/clipboard.h
+++ b/include/ui/clipboard.h
@@ -269,7 +269,7 @@ void qemu_clipboard_set_data(QemuClipboardPeer *peer,
QemuClipboardInfo *info,
QemuClipboardType type,
uint32_t size,
- const void *data,
+ void *data,
bool update);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(QemuClipboardInfo, qemu_clipboard_info_unref)
diff --git a/ui/clipboard.c b/ui/clipboard.c
index 3d14bffaf8..2c3f4c3ba0 100644
--- a/ui/clipboard.c
+++ b/ui/clipboard.c
@@ -154,7 +154,7 @@ void qemu_clipboard_set_data(QemuClipboardPeer *peer,
QemuClipboardInfo *info,
QemuClipboardType type,
uint32_t size,
- const void *data,
+ void *data,
bool update)
{
if (!info ||
diff --git a/ui/cocoa.m b/ui/cocoa.m
index 660d3e0935..0e6760c360 100644
--- a/ui/cocoa.m
+++ b/ui/cocoa.m
@@ -29,7 +29,6 @@
#include "qemu/help-texts.h"
#include "qemu-main.h"
-#include "ui/clipboard.h"
#include "ui/console.h"
#include "ui/input.h"
#include "ui/kbd-state.h"
@@ -105,10 +104,6 @@ static void cocoa_switch(DisplayChangeListener *dcl,
static bool allow_events;
-static NSInteger cbchangecount = -1;
-static QemuClipboardInfo *cbinfo;
-static QemuEvent cbevent;
-
// Utility functions to run specified code block with the BQL held
typedef void (^CodeBlock)(void);
typedef bool (^BoolCodeBlock)(void);
@@ -1799,107 +1794,6 @@ static void addRemovableDevicesMenuItems(void)
qapi_free_BlockInfoList(pointerToFree);
}
-@interface QemuCocoaPasteboardTypeOwner : NSObject<NSPasteboardTypeOwner>
-@end
-
-@implementation QemuCocoaPasteboardTypeOwner
-
-- (void)pasteboard:(NSPasteboard *)sender provideDataForType:(NSPasteboardType)type
-{
- if (type != NSPasteboardTypeString) {
- return;
- }
-
- with_bql(^{
- QemuClipboardInfo *info = qemu_clipboard_info_ref(cbinfo);
- qemu_event_reset(&cbevent);
- qemu_clipboard_request(info, QEMU_CLIPBOARD_TYPE_TEXT);
-
- while (info == cbinfo &&
- info->types[QEMU_CLIPBOARD_TYPE_TEXT].available &&
- info->types[QEMU_CLIPBOARD_TYPE_TEXT].data == NULL) {
- bql_unlock();
- qemu_event_wait(&cbevent);
- bql_lock();
- }
-
- if (info == cbinfo) {
- NSData *data = [[NSData alloc] initWithBytes:info->types[QEMU_CLIPBOARD_TYPE_TEXT].data
- length:info->types[QEMU_CLIPBOARD_TYPE_TEXT].size];
- [sender setData:data forType:NSPasteboardTypeString];
- [data release];
- }
-
- qemu_clipboard_info_unref(info);
- });
-}
-
-@end
-
-static QemuCocoaPasteboardTypeOwner *cbowner;
-
-static void cocoa_clipboard_notify(Notifier *notifier, void *data);
-static void cocoa_clipboard_request(QemuClipboardInfo *info,
- QemuClipboardType type);
-
-static QemuClipboardPeer cbpeer = {
- .name = "cocoa",
- .notifier = { .notify = cocoa_clipboard_notify },
- .request = cocoa_clipboard_request
-};
-
-static void cocoa_clipboard_update_info(QemuClipboardInfo *info)
-{
- if (info->owner == &cbpeer || info->selection != QEMU_CLIPBOARD_SELECTION_CLIPBOARD) {
- return;
- }
-
- if (info != cbinfo) {
- NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
- qemu_clipboard_info_unref(cbinfo);
- cbinfo = qemu_clipboard_info_ref(info);
- cbchangecount = [[NSPasteboard generalPasteboard] declareTypes:@[NSPasteboardTypeString] owner:cbowner];
- [pool release];
- }
-
- qemu_event_set(&cbevent);
-}
-
-static void cocoa_clipboard_notify(Notifier *notifier, void *data)
-{
- QemuClipboardNotify *notify = data;
-
- switch (notify->type) {
- case QEMU_CLIPBOARD_UPDATE_INFO:
- cocoa_clipboard_update_info(notify->info);
- return;
- case QEMU_CLIPBOARD_RESET_SERIAL:
- /* ignore */
- return;
- }
-}
-
-static void cocoa_clipboard_request(QemuClipboardInfo *info,
- QemuClipboardType type)
-{
- NSAutoreleasePool *pool;
- NSData *text;
-
- switch (type) {
- case QEMU_CLIPBOARD_TYPE_TEXT:
- pool = [[NSAutoreleasePool alloc] init];
- text = [[NSPasteboard generalPasteboard] dataForType:NSPasteboardTypeString];
- if (text) {
- qemu_clipboard_set_data(&cbpeer, info, type,
- [text length], [text bytes], true);
- }
- [pool release];
- break;
- default:
- break;
- }
-}
-
/*
* The startup process for the OSX/Cocoa UI is complicated, because
* OSX insists that the UI runs on the initial main thread, and so we
@@ -1922,7 +1816,6 @@ static void cocoa_clipboard_request(QemuClipboardInfo *info,
status = qemu_default_main();
qemu_mutex_unlock_iothread();
COCOA_DEBUG("Second thread: qemu_default_main() returned, exiting\n");
- [cbowner release];
exit(status);
}
@@ -2003,18 +1896,6 @@ static void cocoa_refresh(DisplayChangeListener *dcl)
[cocoaView setAbsoluteEnabled:YES];
});
}
-
- if (cbchangecount != [[NSPasteboard generalPasteboard] changeCount]) {
- qemu_clipboard_info_unref(cbinfo);
- cbinfo = qemu_clipboard_info_new(&cbpeer, QEMU_CLIPBOARD_SELECTION_CLIPBOARD);
- if ([[NSPasteboard generalPasteboard] availableTypeFromArray:@[NSPasteboardTypeString]]) {
- cbinfo->types[QEMU_CLIPBOARD_TYPE_TEXT].available = true;
- }
- qemu_clipboard_update(cbinfo);
- cbchangecount = [[NSPasteboard generalPasteboard] changeCount];
- qemu_event_set(&cbevent);
- }
-
[pool release];
}
@@ -2071,12 +1952,6 @@ static void cocoa_display_init(DisplayState *ds, DisplayOptions *opts)
// register vga output callbacks
register_displaychangelistener(&dcl);
[cocoaView updateUIInfo];
-
- qemu_event_init(&cbevent, false);
- cbowner = [[QemuCocoaPasteboardTypeOwner alloc] init];
- qemu_clipboard_peer_register(&cbpeer);
-
- [pool release];
}
static QemuDisplay qemu_display_cocoa = {
@@ -1,145 +0,0 @@
diff --git a/ui/cocoa.m b/ui/cocoa.m
index 25e0db9dd0..4af0712036 100644
--- a/ui/cocoa.m
+++ b/ui/cocoa.m
@@ -93,6 +93,7 @@ static void cocoa_switch(DisplayChangeListener *dcl,
static void cocoa_refresh(DisplayChangeListener *dcl);
+static NSWindow *about_window;
static const DisplayChangeListenerOps dcl_ops = {
.dpy_name = "cocoa",
.dpy_gfx_update = cocoa_update,
@@ -1180,6 +1181,7 @@ - (void)changeDeviceMedia:(id)sender;
- (BOOL)verifyQuit;
- (void)openDocumentation:(NSString *)filename;
- (IBAction) do_about_menu_item: (id) sender;
+- (void)make_about_window;
- (void)adjustSpeed:(id)sender;
@end
@@ -1227,6 +1229,8 @@ - (id) init
[pauseLabel setFont: [NSFont fontWithName: @"Helvetica" size: 90]];
[pauseLabel setTextColor: [NSColor blackColor]];
[pauseLabel sizeToFit];
+
+ [self make_about_window];
}
return self;
}
@@ -1549,29 +1553,92 @@ - (BOOL)verifyQuit
/* The action method for the About menu item */
- (IBAction) do_about_menu_item: (id) sender
{
- NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
- char *icon_path_c = get_relocated_path(CONFIG_QEMU_ICONDIR "/hicolor/512x512/apps/qemu.png");
- NSString *icon_path = [NSString stringWithUTF8String:icon_path_c];
- g_free(icon_path_c);
- NSImage *icon = [[NSImage alloc] initWithContentsOfFile:icon_path];
- NSString *version = @"QEMU emulator version " QEMU_FULL_VERSION;
- NSString *copyright = @QEMU_COPYRIGHT;
- NSDictionary *options;
- if (icon) {
- options = @{
- NSAboutPanelOptionApplicationIcon : icon,
- NSAboutPanelOptionApplicationVersion : version,
- @"Copyright" : copyright,
- };
- [icon release];
- } else {
- options = @{
- NSAboutPanelOptionApplicationVersion : version,
- @"Copyright" : copyright,
- };
- }
- [NSApp orderFrontStandardAboutPanelWithOptions:options];
- [pool release];
+ [about_window makeKeyAndOrderFront: nil];
+}
+
+/* Create and display the about dialog */
+- (void)make_about_window
+{
+ /* Make the window */
+ int x = 0, y = 0, about_width = 400, about_height = 200;
+ NSRect window_rect = NSMakeRect(x, y, about_width, about_height);
+ about_window = [[NSWindow alloc] initWithContentRect:window_rect
+ styleMask:NSWindowStyleMaskTitled | NSWindowStyleMaskClosable |
+ NSWindowStyleMaskMiniaturizable
+ backing:NSBackingStoreBuffered
+ defer:NO];
+ [about_window setTitle: @"About"];
+ [about_window setReleasedWhenClosed: NO];
+ [about_window center];
+ NSView *superView = [about_window contentView];
+
+ /* Create the dimensions of the picture */
+ int picture_width = 80, picture_height = 80;
+ x = (about_width - picture_width)/2;
+ y = about_height - picture_height - 10;
+ NSRect picture_rect = NSMakeRect(x, y, picture_width, picture_height);
+
+ /* Make the picture of QEMU */
+ NSImageView *picture_view = [[NSImageView alloc] initWithFrame:
+ picture_rect];
+ char *qemu_image_path_c = get_relocated_path(CONFIG_QEMU_ICONDIR "/hicolor/512x512/apps/qemu.png");
+ NSString *qemu_image_path = [NSString stringWithUTF8String:qemu_image_path_c];
+ g_free(qemu_image_path_c);
+ NSImage *qemu_image = [[NSImage alloc] initWithContentsOfFile:qemu_image_path];
+ [picture_view setImage: qemu_image];
+ [picture_view setImageScaling: NSImageScaleProportionallyUpOrDown];
+ [superView addSubview: picture_view];
+
+ /* Make the name label */
+ NSBundle *bundle = [NSBundle mainBundle];
+ if (bundle) {
+ x = 0;
+ y = y - 25;
+ int name_width = about_width, name_height = 20;
+ NSRect name_rect = NSMakeRect(x, y, name_width, name_height);
+ NSTextField *name_label = [[NSTextField alloc] initWithFrame: name_rect];
+ [name_label setEditable: NO];
+ [name_label setBezeled: NO];
+ [name_label setDrawsBackground: NO];
+ [name_label setAlignment: NSTextAlignmentCenter];
+ NSString *qemu_name = [[bundle executablePath] lastPathComponent];
+ [name_label setStringValue: qemu_name];
+ [superView addSubview: name_label];
+ }
+
+ /* Set the version label's attributes */
+ x = 0;
+ y = 50;
+ int version_width = about_width, version_height = 20;
+ NSRect version_rect = NSMakeRect(x, y, version_width, version_height);
+ NSTextField *version_label = [[NSTextField alloc] initWithFrame:
+ version_rect];
+ [version_label setEditable: NO];
+ [version_label setBezeled: NO];
+ [version_label setAlignment: NSTextAlignmentCenter];
+ [version_label setDrawsBackground: NO];
+
+ /* Create the version string*/
+ NSString *version_string;
+ version_string = [[NSString alloc] initWithFormat:
+ @"QEMU emulator version %s", QEMU_FULL_VERSION];
+ [version_label setStringValue: version_string];
+ [superView addSubview: version_label];
+
+ /* Make copyright label */
+ x = 0;
+ y = 35;
+ int copyright_width = about_width, copyright_height = 20;
+ NSRect copyright_rect = NSMakeRect(x, y, copyright_width, copyright_height);
+ NSTextField *copyright_label = [[NSTextField alloc] initWithFrame:
+ copyright_rect];
+ [copyright_label setEditable: NO];
+ [copyright_label setBezeled: NO];
+ [copyright_label setDrawsBackground: NO];
+ [copyright_label setAlignment: NSTextAlignmentCenter];
+ [copyright_label setStringValue: [NSString stringWithFormat: @"%s",
+ QEMU_COPYRIGHT]];
+ [superView addSubview: copyright_label];
}
/* Used by the Speed menu items */
@@ -15,16 +15,16 @@
rustPlatform.buildRustPackage rec {
pname = "jay";
version = "1.4.0";
version = "1.5.0";
src = fetchFromGitHub {
owner = "mahkoh";
repo = pname;
rev = "v${version}";
sha256 = "sha256-iZTdhWHlorTAJTd3p2ZJbD5LRYkUmDAFjSEIR5E0JDI=";
sha256 = "sha256-cuXFkG2YwS0w4xzr7jpjr0QmVA5UJfk5SpjIQKxN/LY=";
};
cargoHash = "sha256-SEL7hpHcW+p49vFRedC1hDRZ/Vq9zMzMAACyyBXHwZM=";
cargoHash = "sha256-w3ARwQlehJq9uNSQmbUjiWik4a2W3Ax/6/BIsdDUfKM=";
SHADERC_LIB_DIR = "${lib.getLib shaderc}/lib";
@@ -11,13 +11,13 @@
stdenv.mkDerivation (finalAttrs: {
pname = "miriway";
version = "0-unstable-2024-08-14";
version = "0-unstable-2024-08-31";
src = fetchFromGitHub {
owner = "Miriway";
repo = "Miriway";
rev = "2d00e8a61cb029cec96596897a1dada8033c601a";
hash = "sha256-DB07IGFXLQj2LsU8iVZrSda0FS/efKUAolet8fK9Clo=";
rev = "2d754931f038865bd91938578b862262f0ce7c00";
hash = "sha256-wmtAbajZ859tvLjKuwqFUq05VGLxHNJX1XyIXM6vvgU=";
};
strictDeps = true;
@@ -1,10 +1,27 @@
{ lib
, buildGoModule
, fetchFromGitHub
, libfido2
, stdenv
{
lib,
buildGoModule,
fetchFromGitHub,
stdenv,
libfido2,
openssl,
libcbor
}:
let
darwin_arch = if stdenv.hostPlatform.system == "aarch64-darwin" then "arm64" else "amd64";
darwin_configure = ''
chmod -R +w vendor/github.com/keys-pub/go-libfido2
cat << EOF > vendor/github.com/keys-pub/go-libfido2/fido2_static_${darwin_arch}.go
package libfido2
/*
#cgo darwin LDFLAGS: -framework CoreFoundation -framework IOKit -L${lib.getLib openssl}/lib -L${lib.getLib libcbor}/lib -lfido2
#cgo darwin CFLAGS: -I${libfido2.dev}/include -I${openssl.dev}/include
*/
import "C"
EOF
'';
in
buildGoModule rec {
pname = "age-plugin-fido2-hmac";
version = "0.2.3";
@@ -18,11 +35,11 @@ buildGoModule rec {
vendorHash = "sha256-h4/tyq9oZt41IfRJmmsLHUpJiPJ7YuFu59ccM7jHsFo=";
ldflags = [ "-s" "-w" ];
ldflags = [ "-s" "-w" "-X main.version=v${version}" ];
buildInputs = [
libfido2
];
buildInputs = [ libfido2 ];
postConfigure = lib.optional stdenv.isDarwin darwin_configure;
meta = with lib; {
description = "Age plugin to encrypt files with fido2 tokens using the hmac-secret extension and non-discoverable credentials";
@@ -30,6 +47,5 @@ buildGoModule rec {
license = licenses.mit;
maintainers = with maintainers; [ matthewcroughan ];
mainProgram = "age-plugin-fido2-hmac";
broken = stdenv.isDarwin;
};
}
+2 -2
View File
@@ -2,11 +2,11 @@
let
pname = "anytype";
version = "0.42.5";
version = "0.42.6";
name = "Anytype-${version}";
src = fetchurl {
url = "https://github.com/anyproto/anytype-ts/releases/download/v${version}/${name}.AppImage";
hash = "sha256-43g/CdmmQTSxk7OTZMPIiWIYJjCG2zJNM9kaAq1jOqE=";
hash = "sha256-ubYk3CsdaUW4AtMYskmFunznUAVcBdbJh4dyGgSs1Io=";
};
appimageContents = appimageTools.extractType2 { inherit pname version src; };
in appimageTools.wrapType2 {
+2 -2
View File
@@ -23,10 +23,10 @@ python3Packages.buildPythonApplication {
postPatch = ''
substituteInPlace org.debian.apt.aptoffline.policy \
--replace /usr/bin/ "$out/bin"
--replace-fail /usr/bin/ "$out/bin"
substituteInPlace apt_offline_core/AptOfflineCoreLib.py \
--replace /usr/bin/gpgv "${lib.getBin gnupg}/bin/gpgv"
--replace-fail /usr/bin/gpgv "${lib.getBin gnupg}/bin/gpgv"
'';
postInstall = ''
File diff suppressed because it is too large Load Diff
+44 -30
View File
@@ -1,9 +1,8 @@
{
copyDesktopItems,
fetchurl,
fetchFromGitHub,
gradle,
jre,
lib,
makeDesktopItem,
makeWrapper,
stdenvNoCC,
@@ -22,25 +21,39 @@
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "atlauncher";
version = "3.4.36.10";
version = "3.4.37.2";
src = fetchurl {
url = "https://github.com/ATLauncher/ATLauncher/releases/download/v${finalAttrs.version}/ATLauncher-${finalAttrs.version}.jar";
hash = "sha256-JZTiYcea5ik8a4RmNLxZcuea7spGWftUGRiRW2Ive7c=";
src = fetchFromGitHub {
owner = "ATLauncher";
repo = "ATLauncher";
rev = "v${finalAttrs.version}";
hash = "sha256-1sIzQBJWbkGk8VrZdRi3eIHBAfiu90lodEZVouZNzVM=";
};
env.ICON = fetchurl {
url = "https://atlauncher.com/assets/images/logo.svg";
hash = "sha256-XoqpsgLmkpa2SdjZvPkgg6BUJulIBIeu6mBsJJCixfo=";
};
dontUnpack = true;
postPatch = ''
# exclude UI tests
sed -i "/test {/a\ exclude '**/BasicLauncherUiTest.class'" build.gradle
'';
nativeBuildInputs = [
copyDesktopItems
gradle
makeWrapper
];
mitmCache = gradle.fetchDeps {
inherit (finalAttrs) pname;
data = ./deps.json;
};
doCheck = true;
gradleBuildTask = "shadowJar";
gradleFlags = [
"--exclude-task"
"createExe"
];
installPhase =
let
runtimeLibraries =
@@ -59,30 +72,28 @@ stdenvNoCC.mkDerivation (finalAttrs: {
''
runHook preInstall
mkdir -p $out/bin $out/share/java
cp $src $out/share/java/ATLauncher.jar
mkdir -p $out/{bin,share/java}
cp build/libs/ATLauncher-${finalAttrs.version}.jar $out/share/java/ATLauncher.jar
makeWrapper ${jre}/bin/java $out/bin/atlauncher \
makeWrapper ${lib.getExe jre} $out/bin/atlauncher \
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath runtimeLibraries}" \
--add-flags "-jar $out/share/java/ATLauncher.jar" \
--add-flags "--working-dir \"\''${XDG_DATA_HOME:-\$HOME/.local/share}/ATLauncher\"" \
--add-flags "--no-launcher-update"
mkdir -p $out/share/icons/hicolor/scalable/apps
cp $ICON $out/share/icons/hicolor/scalable/apps/atlauncher.svg
runHook postInstall
'';
desktopItems = [
(makeDesktopItem {
categories = [ "Game" ];
desktopName = "ATLauncher";
exec = "atlauncher";
icon = "atlauncher";
name = "atlauncher";
})
];
postInstall =
let
packagingDir = "${finalAttrs.src}/packaging/linux/_common";
in
''
install -D -m444 ${packagingDir}/atlauncher.desktop -t $out/share/applications
install -D -m444 ${packagingDir}/atlauncher.metainfo.xml -t $out/share/metainfo
install -D -m444 ${packagingDir}/atlauncher.png -t $out/share/pixmaps
install -D -m444 ${packagingDir}/atlauncher.svg -t $out/share/icons/hicolor/scalable/apps
'';
meta = {
changelog = "https://github.com/ATLauncher/ATLauncher/blob/v${finalAttrs.version}/CHANGELOG.md";
@@ -93,6 +104,9 @@ stdenvNoCC.mkDerivation (finalAttrs: {
mainProgram = "atlauncher";
maintainers = with lib.maintainers; [ getpsyched ];
platforms = lib.platforms.all;
sourceProvenance = [ lib.sourceTypes.binaryBytecode ];
sourceProvenance = with lib.sourceTypes; [
fromSource
binaryBytecode # mitm cache
];
};
})
+5 -5
View File
@@ -1,9 +1,9 @@
{
"owner": "advplyr",
"repo": "audiobookshelf",
"rev": "48f232790a5026ac886564ef57660a338a168187",
"hash": "sha256-2/lUByeWMZlxk7i+mvzBuxlxD97C+JEtmf/ajht5AOs=",
"version": "2.13.2",
"depsHash": "sha256-kU5Nrhy6AePwD2/kmvTXvrvGUH8uz3qm3ZvD3kC9EmE=",
"clientDepsHash": "sha256-1haujBoC9KyusE52HeepOcvmb6v7EG5XWD4dq1wPfe4="
"rev": "24923c0009446e2db26ec366b25dd38deb2e2573",
"hash": "sha256-afNz4dTEr/6STn6cqSHxugn5ofa0jY4HvUnckJabxdo=",
"version": "2.13.3",
"depsHash": "sha256-fRz4qUxd8lZODQikP011FtvyFCz4fehESUfBmSBLwtA=",
"clientDepsHash": "sha256-VGbwiCuDjA1rtUpLw7gO+Xb5/D09evf/Jrb93H0QCH8="
}
@@ -7,7 +7,12 @@
let
python3 = python311.override {
self = python3;
packageOverrides = _: super: { tree-sitter = super.tree-sitter_0_21; };
packageOverrides = _: super: {
tree-sitter = super.tree-sitter_0_21;
lsp-tree-sitter = super.lsp-tree-sitter.overridePythonAttrs(__: {
pythonRelaxDeps = [ "tree-sitter" ];
});
};
};
in
python3.pkgs.buildPythonApplication rec {
+12 -4
View File
@@ -4,7 +4,7 @@
makeBinaryWrapper,
av1an-unwrapped,
ffmpeg,
python3Packages,
python3,
libaom,
svt-av1,
rav1e,
@@ -12,6 +12,8 @@
x264,
x265,
libvmaf,
vapoursynth,
mkvtoolnix-cli,
withAom ? true, # AV1 reference encoder
withSvtav1 ? false, # AV1 encoder/decoder (focused on speed and correctness)
withRav1e ? false, # AV1 encoder (focused on speed and safety)
@@ -19,6 +21,7 @@
withX264 ? true, # H.264/AVC encoder
withX265 ? true, # H.265/HEVC encoder
withVmaf ? false, # Perceptual video quality assessment algorithm
withMkvtoolnix ? true, # mkv editor, recommended concatenation method
}:
# av1an requires at least one encoder
@@ -41,19 +44,24 @@ symlinkJoin {
postBuild =
let
runtimePrograms =
[ (ffmpeg.override { inherit withVmaf; }) ]
[
vapoursynth
(ffmpeg.override { inherit withVmaf; })
]
++ lib.optional withAom libaom
++ lib.optional withSvtav1 svt-av1
++ lib.optional withRav1e rav1e
++ lib.optional withVpx libvpx
++ lib.optional withX264 x264
++ lib.optional withX265 x265
++ lib.optional withVmaf libvmaf;
++ lib.optional withVmaf libvmaf
++ lib.optional withMkvtoolnix mkvtoolnix-cli;
in
''
wrapProgram $out/bin/av1an \
--prefix LD_LIBRARY_PATH : ${vapoursynth}/lib \
--prefix PATH : ${lib.makeBinPath runtimePrograms} \
--prefix PYTHONPATH : ${python3Packages.makePythonPath [ python3Packages.vapoursynth ]}
--prefix PYTHONPATH : ${vapoursynth}/${python3.sitePackages}
'';
passthru = {
@@ -29,7 +29,7 @@ let
postPatch = ''
substituteInPlace backgroundremover/bg.py backgroundremover/u2net/detect.py \
--replace 'os.path.expanduser(os.path.join("~", ".u2net", model_name + ".pth"))' "os.path.join(\"$models\", model_name + \".pth\")"
--replace-fail 'os.path.expanduser(os.path.join("~", ".u2net", model_name + ".pth"))' "os.path.join(\"$models\", model_name + \".pth\")"
'';
nativeBuildInputs = [ p.setuptools p.wheel ];
+4 -4
View File
@@ -11,13 +11,13 @@
}:
let
version = "1.17.1";
version = "1.17.2";
src = fetchFromGitHub {
owner = "detachhead";
repo = "basedpyright";
rev = "refs/tags/v${version}";
hash = "sha256-mFY0GvVGiozxd04ktSoqcezBwXkOAeIWTgNnv1zB74A=";
hash = "sha256-6pksb2drjiZo1Hp6P/G06LAj3nW5WXJbVNGt5897jAA=";
};
patchedPackageJSON = runCommand "package.json" { } ''
@@ -47,7 +47,7 @@ let
pname = "pyright-internal";
inherit version src;
sourceRoot = "${src.name}/packages/pyright-internal";
npmDepsHash = "sha256-IJMK/YhTldOr3Gh4ewlVLUSt3PlhIjilxB7QBJpdu80=";
npmDepsHash = "sha256-w6SurZ4EG2QW7paZsWxu0gNXMXxnzQygClOUdLeBKdw=";
dontNpmBuild = true;
# Uncomment this flag when using unreleased peer dependencies
# npmFlags = [ "--legacy-peer-deps" ];
@@ -94,7 +94,7 @@ buildNpmPackage rec {
inherit version src;
sourceRoot = "${src.name}/packages/pyright";
npmDepsHash = "sha256-TmJrh/Pya7jXhMQyCz6wwCCP0gzTTKFNUKF+vBq22U0=";
npmDepsHash = "sha256-y7arZsXjJ0LdWpXdSZjc7EBJPN/oWAje4uQDEhkRbDM=";
postPatch = ''
chmod +w ../../
+3 -3
View File
@@ -7,16 +7,16 @@
buildGoModule rec {
pname = "civo";
version = "1.0.89";
version = "1.0.90";
src = fetchFromGitHub {
owner = "civo";
repo = "cli";
rev = "v${version}";
sha256 = "sha256-hX/tmeQYcTDs3JZSFhvzCrcbqvfa78MXtTo8VcuAqxY=";
sha256 = "sha256-2UWEQZRbtPArYK7Kr0eHtF8+XWXl06v86nAb8nka50g=";
};
vendorHash = "sha256-bwmJnKxdvVskrrTCa0cdpiYeFVZWTYyaFNEbeymT7P0=";
vendorHash = "sha256-ZnomzHbsNKWwAsRjOjESKSdR+KgSiMMlG0xq33qpzX0=";
nativeBuildInputs = [ installShellFiles ];
+3 -3
View File
@@ -7,14 +7,14 @@
}:
rustPlatform.buildRustPackage rec {
pname = "clang-tidy-sarif";
version = "0.6.5";
version = "0.6.6";
src = fetchCrate {
inherit pname version;
hash = "sha256-pQbhLbDRcZJhXXY6bWGO/8mmQRwgM3tDEWKoqmsNr68=";
hash = "sha256-rZnGueaqK7h8tWwwWacvFBvJwE1li2wN9iB4DJRHJ8U=";
};
cargoHash = "sha256-K+Cle2eCH4jCLbYfOrlEXeBvFUr7dGmpKFQM1IJi7p4=";
cargoHash = "sha256-mELx6UGHV+qtL1G3+xvYUaUzZbfMy0dKgai6IqdbT+A=";
nativeInstallCheckInputs = [ versionCheckHook ];
doInstallCheck = true;
+2 -2
View File
@@ -5,11 +5,11 @@
let
pname = "codux";
version = "15.33.0";
version = "15.34.0";
src = fetchurl {
url = "https://github.com/wixplosives/codux-versions/releases/download/${version}/Codux-${version}.x86_64.AppImage";
sha256 = "sha256-Fdy/Ovx8VCBe+pO/87VHVEnafJ9Ms8Pop0DOLYOHuQY=";
sha256 = "sha256-/e5tz3/XD/aaxLc/SUrTmWWfqI2Gw/xBTTTSmv5uZEQ=";
};
appimageContents = appimageTools.extractType2 { inherit pname version src; };
+7 -4
View File
@@ -1,5 +1,6 @@
{
lib,
biome,
buildNpmPackage,
fetchFromGitHub,
jre,
@@ -9,13 +10,13 @@
writeText,
}:
let
version = "4.3.3";
version = "4.6.0";
src = fetchFromGitHub {
owner = "Athou";
repo = "commafeed";
rev = version;
hash = "sha256-y0gTmtlDg7sdunG1ne/3WkFx2KQkTGRlfYpXBHFFh2o=";
hash = "sha256-Qc2l/CSVK+8k7b3RZA8hQsGTq29OvkDMbMzHcnPm/yE=";
};
frontend = buildNpmPackage {
@@ -25,7 +26,9 @@ let
sourceRoot = "${src.name}/commafeed-client";
npmDepsHash = "sha256-fye7MPWXUeFCMgcnesspd1giGG/ZldiOv00fjtXZSb4=";
npmDepsHash = "sha256-bQShz6dmE9IZ9to5Z2DScncc/WVJnX1tRCm8XQJNmiU=";
nativeBuildInputs = [ biome ];
installPhase = ''
runHook preInstall
@@ -49,7 +52,7 @@ maven.buildMavenPackage {
pname = "commafeed";
mvnHash = "sha256-LDZv3CBc/FpVMKmZ+kqfBdkTbqZcJMRqeXN35t4rwJI=";
mvnHash = "sha256-7nm8Cz05Qa44TMC0ioklvKAXQnE9J2wUDZFXLQt2A1w=";
mvnParameters = lib.escapeShellArgs [
"-Dskip.installnodenpm"

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