Merge master into staging-next
This commit is contained in:
@@ -34,4 +34,3 @@
|
||||
### Additions and Improvements {#sec-nixpkgs-release-25.11-lib-additions-improvements}
|
||||
|
||||
- Create the first release note entry in this section!
|
||||
|
||||
|
||||
@@ -11482,6 +11482,12 @@
|
||||
githubId = 30251156;
|
||||
name = "Jesse Moore";
|
||||
};
|
||||
jethair = {
|
||||
email = "jethair@duck.com";
|
||||
github = "JetHair";
|
||||
githubId = 106916147;
|
||||
name = "JetHair";
|
||||
};
|
||||
jethro = {
|
||||
email = "jethrokuan95@gmail.com";
|
||||
github = "jethrokuan";
|
||||
@@ -16824,12 +16830,6 @@
|
||||
githubId = 72663763;
|
||||
keys = [ { fingerprint = "DB3E A12D B291 594A 79C5 F6B3 10AB 6868 37F6 FA3F"; } ];
|
||||
};
|
||||
mtreca = {
|
||||
email = "maxime.treca@gmail.com";
|
||||
github = "mtreca";
|
||||
githubId = 16440823;
|
||||
name = "Maxime Tréca";
|
||||
};
|
||||
mtreskin = {
|
||||
email = "zerthurd@gmail.com";
|
||||
github = "Zert";
|
||||
@@ -24620,6 +24620,12 @@
|
||||
githubId = 6579555;
|
||||
name = "Jeroen Jetten";
|
||||
};
|
||||
thetaoofsu = {
|
||||
email = "TheTaoOfSu@protonmail.com";
|
||||
github = "TheTaoOfSu";
|
||||
githubId = 45526311;
|
||||
name = "TheTaoOfSu";
|
||||
};
|
||||
theuni = {
|
||||
email = "ct@flyingcircus.io";
|
||||
github = "ctheune";
|
||||
@@ -25149,6 +25155,12 @@
|
||||
github = "totoroot";
|
||||
githubId = 39650930;
|
||||
};
|
||||
tournev = {
|
||||
name = "Vincent Tourneur";
|
||||
email = "vincent@pimoid.fr";
|
||||
github = "vtourneur";
|
||||
githubId = 48284424;
|
||||
};
|
||||
ToxicFrog = {
|
||||
email = "toxicfrog@ancilla.ca";
|
||||
github = "ToxicFrog";
|
||||
|
||||
@@ -50,6 +50,12 @@
|
||||
"module-services-crab-hole-upstream-options": [
|
||||
"index.html#module-services-crab-hole-upstream-options"
|
||||
],
|
||||
"module-services-opencloud": [
|
||||
"index.html#module-services-opencloud"
|
||||
],
|
||||
"module-services-opencloud-basic-usage": [
|
||||
"index.html#module-services-opencloud-basic-usage"
|
||||
],
|
||||
"module-services-strfry": [
|
||||
"index.html#module-services-strfry"
|
||||
],
|
||||
|
||||
@@ -200,6 +200,8 @@ Alongside many enhancements to NixOS modules and general system improvements, th
|
||||
|
||||
- [`g3proxy`](https://github.com/bytedance/g3), an open source enterprise forward proxy from ByteDance, similar to Squid or tinyproxy. Available as [services.g3proxy](#opt-services.g3proxy.enable).
|
||||
|
||||
- [OpenCloud](https://opencloud.eu/), an open-source, modern file-sync and sharing platform. It is a fork of oCIS, a ground-up rewrite of the well-known PHP-based NextCloud server. Available as [services.opencloud](#opt-services.opencloud.enable).
|
||||
|
||||
- [echoip](https://github.com/mpolden/echoip), a simple service for looking up your IP address. Available as [services.echoip](#opt-services.echoip.enable).
|
||||
|
||||
- [whoami](https://github.com/traefik/whoami), a tiny Go server that prints OS information and HTTP request to output. Available as [services.whoami](#opt-services.whoami.enable).
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->
|
||||
|
||||
- Create the first release note entry in this section!
|
||||
- Secure boot support can now be enabled for the Limine bootloader through {option}`boot.loader.limine.secureBoot.enable`. Bootloader install script signs the bootloader, then kernels are hashed during system rebuild and written to a config. This allows Limine to boot only the kernels installed through NixOS system.
|
||||
|
||||
## New Modules {#sec-release-25.11-new-modules}
|
||||
|
||||
|
||||
@@ -1610,6 +1610,7 @@
|
||||
./services/web-apps/oncall.nix
|
||||
./services/web-apps/onlyoffice.nix
|
||||
./services/web-apps/open-web-calendar.nix
|
||||
./services/web-apps/opencloud.nix
|
||||
./services/web-apps/openvscode-server.nix
|
||||
./services/web-apps/openwebrx.nix
|
||||
./services/web-apps/outline.nix
|
||||
|
||||
@@ -24,9 +24,10 @@ After that, `davis` can be deployed like this:
|
||||
adminLogin = "admin";
|
||||
adminPasswordFile = "/run/secrets/davis-admin-password";
|
||||
appSecretFile = "/run/secrets/davis-app-secret";
|
||||
nginx = {};
|
||||
};
|
||||
}
|
||||
```
|
||||
|
||||
This deploys Davis using a sqlite database running out of `/var/lib/davis`.
|
||||
|
||||
Logs can be found in `/var/lib/davis/var/log/`.
|
||||
|
||||
@@ -220,10 +220,13 @@ in
|
||||
};
|
||||
|
||||
nginx = lib.mkOption {
|
||||
type = lib.types.submodule (
|
||||
lib.recursiveUpdate (import ../web-servers/nginx/vhost-options.nix { inherit config lib; }) { }
|
||||
type = lib.types.nullOr (
|
||||
lib.types.submodule (
|
||||
lib.recursiveUpdate (import ../web-servers/nginx/vhost-options.nix { inherit config lib; }) {
|
||||
}
|
||||
)
|
||||
);
|
||||
default = null;
|
||||
default = { };
|
||||
example = ''
|
||||
{
|
||||
serverAliases = [
|
||||
@@ -235,7 +238,7 @@ in
|
||||
}
|
||||
'';
|
||||
description = ''
|
||||
With this option, you can customize the nginx virtualHost settings.
|
||||
Use this option to customize an nginx virtual host. To disable the nginx set this to null.
|
||||
'';
|
||||
};
|
||||
|
||||
@@ -308,18 +311,16 @@ in
|
||||
message = "One of services.davis.database.urlFile or services.davis.database.createLocally must be set.";
|
||||
}
|
||||
{
|
||||
assertion = (mail.dsn != null) != (mail.dsnFile != null);
|
||||
message = "One of (and only one of) services.davis.mail.dsn or services.davis.mail.dsnFile must be set.";
|
||||
assertion = !(mail.dsn != null && mail.dsnFile != null);
|
||||
message = "services.davis.mail.dsn and services.davis.mail.dsnFile cannot both be set.";
|
||||
}
|
||||
];
|
||||
services.davis.config =
|
||||
{
|
||||
APP_ENV = "prod";
|
||||
APP_CACHE_DIR = "${cfg.dataDir}/var/cache";
|
||||
# note: we do not need the log dir (we log to stdout/journald), by davis/symfony will try to create it, and the default value is one in the nix-store
|
||||
# so we set it to a path under dataDir to avoid something like: Unable to create the "logs" directory (/nix/store/5cfskz0ybbx37s1161gjn5klwb5si1zg-davis-4.4.1/var/log).
|
||||
APP_LOG_DIR = "${cfg.dataDir}/var/log";
|
||||
LOG_FILE_PATH = "/dev/stdout";
|
||||
LOG_FILE_PATH = "%kernel.logs_dir%/%kernel.environment%.log";
|
||||
DATABASE_DRIVER = db.driver;
|
||||
INVITE_FROM_ADDRESS = mail.inviteFromAddress;
|
||||
APP_SECRET._secret = cfg.appSecretFile;
|
||||
@@ -330,7 +331,14 @@ in
|
||||
CALDAV_ENABLED = true;
|
||||
CARDDAV_ENABLED = true;
|
||||
}
|
||||
// (if mail.dsn != null then { MAILER_DSN = mail.dsn; } else { MAILER_DSN._secret = mail.dsnFile; })
|
||||
// (
|
||||
if mail.dsn != null then
|
||||
{ MAILER_DSN = mail.dsn; }
|
||||
else if mail.dsnFile != null then
|
||||
{ MAILER_DSN._secret = mail.dsnFile; }
|
||||
else
|
||||
{ }
|
||||
)
|
||||
// (
|
||||
if db.createLocally then
|
||||
{
|
||||
@@ -381,6 +389,7 @@ in
|
||||
APP_CACHE_DIR = "${cfg.dataDir}/var/cache";
|
||||
APP_LOG_DIR = "${cfg.dataDir}/var/log";
|
||||
};
|
||||
phpPackage = lib.mkDefault cfg.package.passthru.php;
|
||||
settings =
|
||||
{
|
||||
"listen.mode" = "0660";
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
# OpenCloud {#module-services-opencloud}
|
||||
|
||||
[OpenCloud](https://opencloud.eu/en) is an open-source, modern file-sync and
|
||||
sharing platform. It is a fork of oCIS, a ground-up rewrite of the well-known
|
||||
PHP-based NextCloud server.
|
||||
|
||||
The service can be configured using a combination of [](#opt-services.opencloud.settings),
|
||||
[](#opt-services.opencloud.environment) and [](#opt-services.opencloud.environmentFile).
|
||||
|
||||
## Basic usage {#module-services-opencloud-basic-usage}
|
||||
|
||||
OpenCloud is configured using a combination of YAML and environment
|
||||
variables. The full documentation can be found at
|
||||
[OpenCloud Admin Docs](https://docs.opencloud.eu/docs/admin/intro).
|
||||
|
||||
The general flow of configuring OpenCloud is:
|
||||
- configure services with `services.opencloud.settings.<service>` when possible
|
||||
- configure global settings that affect multiple services via `services.opencloud.environment`
|
||||
- allow NixOS to provision a default `opencloud.yaml` for you, containing default credentials
|
||||
for communication between the microservices
|
||||
- provide additional secrets via `environmentFile`, provisioned out of band
|
||||
|
||||
Please note that current NixOS module for OpenCloud is configured to run in
|
||||
`fullstack` mode, which starts all the services for OpenCloud in a single
|
||||
instance, in so called supervised mode. This will start multiple OpenCloud
|
||||
services and listen on multiple other ports.
|
||||
|
||||
Current known services and their ports are as below:
|
||||
|
||||
| Service | Group | Port |
|
||||
|--------------------|---------|-------|
|
||||
| gateway | api | 9142 |
|
||||
| sharing | api | 9150 |
|
||||
| app-registry | api | 9242 |
|
||||
| ocdav | web | 45023 |
|
||||
| auth-machine | api | 9166 |
|
||||
| storage-system | api | 9215 |
|
||||
| webdav | web | 9115 |
|
||||
| webfinger | web | 46871 |
|
||||
| storage-system | web | 9216 |
|
||||
| web | web | 9100 |
|
||||
| eventhistory | api | 33177 |
|
||||
| ocs | web | 9110 |
|
||||
| storage-publiclink | api | 9178 |
|
||||
| settings | web | 9190 |
|
||||
| ocm | api | 9282 |
|
||||
| settings | api | 9191 |
|
||||
| ocm | web | 9280 |
|
||||
| app-provider | api | 9164 |
|
||||
| storage-users | api | 9157 |
|
||||
| auth-service | api | 9199 |
|
||||
| thumbnails | web | 9186 |
|
||||
| thumbnails | api | 9185 |
|
||||
| storage-shares | api | 9154 |
|
||||
| sse | sse | 46833 |
|
||||
| userlog | userlog | 45363 |
|
||||
| search | api | 9220 |
|
||||
| proxy | web | 9200 |
|
||||
| idp | web | 9130 |
|
||||
| frontend | web | 9140 |
|
||||
| groups | api | 9160 |
|
||||
| graph | graph | 9120 |
|
||||
| users | api | 9144 |
|
||||
| auth-basic | api | 9146 |
|
||||
@@ -0,0 +1,242 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
inherit (lib) types;
|
||||
cfg = config.services.opencloud;
|
||||
|
||||
defaultUser = "opencloud";
|
||||
defaultGroup = defaultUser;
|
||||
|
||||
settingsFormat = pkgs.formats.yaml { };
|
||||
in
|
||||
{
|
||||
options = {
|
||||
services.opencloud = {
|
||||
enable = lib.mkEnableOption "OpenCloud";
|
||||
|
||||
package = lib.mkPackageOption pkgs "opencloud" { };
|
||||
webPackage = lib.mkPackageOption pkgs [ "opencloud" "web" ] { };
|
||||
idpWebPackage = lib.mkPackageOption pkgs [ "opencloud" "idp-web" ] { };
|
||||
|
||||
user = lib.mkOption {
|
||||
type = types.str;
|
||||
default = defaultUser;
|
||||
example = "mycloud";
|
||||
description = ''
|
||||
The user to run OpenCloud as.
|
||||
By default, a user named `${defaultUser}` will be created whose home
|
||||
directory is [](#opt-services.opencloud.stateDir).
|
||||
'';
|
||||
};
|
||||
|
||||
group = lib.mkOption {
|
||||
type = types.str;
|
||||
default = defaultGroup;
|
||||
example = "mycloud";
|
||||
description = ''
|
||||
The group to run OpenCloud under.
|
||||
By default, a group named `${defaultGroup}` will be created.
|
||||
'';
|
||||
};
|
||||
|
||||
address = lib.mkOption {
|
||||
type = types.str;
|
||||
default = "127.0.0.1";
|
||||
description = "Web server bind address.";
|
||||
};
|
||||
|
||||
port = lib.mkOption {
|
||||
type = types.port;
|
||||
default = 9200;
|
||||
description = "Web server port.";
|
||||
};
|
||||
|
||||
url = lib.mkOption {
|
||||
type = types.str;
|
||||
default = "https://localhost:9200";
|
||||
example = "https://cloud.example.com";
|
||||
description = "Web interface root public URL, including scheme and port (if non-default).";
|
||||
};
|
||||
|
||||
stateDir = lib.mkOption {
|
||||
default = "/var/lib/opencloud";
|
||||
type = types.str;
|
||||
description = "OpenCloud data directory.";
|
||||
};
|
||||
|
||||
settings = lib.mkOption {
|
||||
type = lib.types.attrsOf settingsFormat.type;
|
||||
default = { };
|
||||
description = ''
|
||||
Additional YAML configuration for OpenCloud services.
|
||||
|
||||
Every item in this attrset will be mapped to a .yaml file in /etc/opencloud.
|
||||
|
||||
The possible config options are currently not well documented, see source code:
|
||||
https://github.com/opencloud-eu/opencloud/blob/main/pkg/config/config.go
|
||||
'';
|
||||
};
|
||||
|
||||
environmentFile = lib.mkOption {
|
||||
type = types.nullOr types.path;
|
||||
default = null;
|
||||
example = "/run/keys/opencloud.env";
|
||||
description = ''
|
||||
An environment file as defined in {manpage}`systemd.exec(5)`.
|
||||
|
||||
Use this to inject secrets, e.g. database or auth credentials out of band.
|
||||
|
||||
Configuration provided here will override `settings` and `environment`.
|
||||
'';
|
||||
};
|
||||
|
||||
environment = lib.mkOption {
|
||||
type = types.attrsOf types.str;
|
||||
default = {
|
||||
OC_INSECURE = "true";
|
||||
};
|
||||
description = ''
|
||||
Extra environment variables to set for the service.
|
||||
|
||||
Use this to set configuration that may affect multiple microservices.
|
||||
|
||||
Configuration provided here will override `settings`.
|
||||
'';
|
||||
example = {
|
||||
OC_INSECURE = "false";
|
||||
OC_LOG_LEVEL = "error";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
users.users.${defaultUser} = lib.mkIf (cfg.user == defaultUser) {
|
||||
group = cfg.group;
|
||||
home = cfg.stateDir;
|
||||
isSystemUser = true;
|
||||
createHome = true;
|
||||
description = "OpenCloud daemon user";
|
||||
};
|
||||
|
||||
users.groups = lib.mkIf (cfg.group == defaultGroup) { ${defaultGroup} = { }; };
|
||||
|
||||
systemd = {
|
||||
services =
|
||||
let
|
||||
environment = {
|
||||
PROXY_HTTP_ADDR = "${cfg.address}:${toString cfg.port}";
|
||||
OC_URL = cfg.url;
|
||||
OC_BASE_DATA_PATH = cfg.stateDir;
|
||||
WEB_ASSET_CORE_PATH = "${cfg.webPackage}";
|
||||
IDP_ASSET_PATH = "${cfg.idpWebPackage}/assets";
|
||||
OC_CONFIG_DIR = "/etc/opencloud";
|
||||
} // cfg.environment;
|
||||
commonServiceConfig = {
|
||||
EnvironmentFile = lib.optional (cfg.environmentFile != null) cfg.environmentFile;
|
||||
MemoryDenyWriteExecute = true;
|
||||
NoNewPrivileges = true;
|
||||
PrivateTmp = true;
|
||||
PrivateDevices = true;
|
||||
ProtectSystem = "strict";
|
||||
ProtectHome = true;
|
||||
ProtectControlGroups = true;
|
||||
ProtectKernelModules = true;
|
||||
ProtectKernelTunables = true;
|
||||
ProtectKernelLogs = true;
|
||||
RestrictAddressFamilies = [
|
||||
"AF_UNIX"
|
||||
"AF_INET"
|
||||
"AF_INET6"
|
||||
];
|
||||
RestrictNamespaces = true;
|
||||
RestrictRealtime = true;
|
||||
RestrictSUIDSGID = true;
|
||||
LockPersonality = true;
|
||||
SystemCallArchitectures = "native";
|
||||
};
|
||||
in
|
||||
{
|
||||
opencloud-init-config = lib.mkIf (cfg.settings.opencloud or { } == { }) {
|
||||
description = "Provision initial OpenCloud config";
|
||||
before = [ "opencloud.service" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
|
||||
inherit environment;
|
||||
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
ReadWritePaths = [ "/etc/opencloud" ];
|
||||
} // commonServiceConfig;
|
||||
|
||||
path = [ cfg.package ];
|
||||
script = ''
|
||||
set -x
|
||||
config="''${OC_CONFIG_DIR}/opencloud.yaml"
|
||||
if [ ! -e "$config" ]; then
|
||||
echo "Provisioning initial OpenCloud config..."
|
||||
opencloud init --insecure "''${OC_INSECURE:false}" --config-path "''${OC_CONFIG_DIR}"
|
||||
chown ${cfg.user}:${cfg.group} "$config"
|
||||
fi
|
||||
'';
|
||||
};
|
||||
|
||||
opencloud = {
|
||||
description = "OpenCloud - a secure and private way to store, access, and share your files";
|
||||
after = [ "network.target" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
|
||||
inherit environment;
|
||||
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
ExecStart = "${lib.getExe cfg.package} server";
|
||||
WorkingDirectory = cfg.stateDir;
|
||||
User = cfg.user;
|
||||
Group = cfg.group;
|
||||
Restart = "always";
|
||||
ReadWritePaths = [ cfg.stateDir ];
|
||||
} // commonServiceConfig;
|
||||
|
||||
restartTriggers = lib.mapAttrsToList (
|
||||
name: _: config.environment.etc."opencloud/${name}.yaml".source
|
||||
) cfg.settings;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
systemd.tmpfiles.settings."10-opencloud" = {
|
||||
${cfg.stateDir}.d = {
|
||||
inherit (cfg) user group;
|
||||
mode = "0750";
|
||||
};
|
||||
"${cfg.stateDir}/idm".d = {
|
||||
inherit (cfg) user group;
|
||||
mode = "0750";
|
||||
};
|
||||
};
|
||||
|
||||
environment.etc =
|
||||
(lib.mapAttrs' (name: value: {
|
||||
name = "opencloud/${name}.yaml";
|
||||
value.source = settingsFormat.generate "${name}.yaml" value;
|
||||
}) cfg.settings)
|
||||
// {
|
||||
# ensure /etc/opencloud gets created, so we can provision the config
|
||||
"opencloud/.keep".text = "";
|
||||
};
|
||||
};
|
||||
|
||||
meta = {
|
||||
doc = ./opencloud.md;
|
||||
maintainers = with lib.maintainers; [
|
||||
christoph-heiss
|
||||
k900
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -249,6 +249,10 @@ def main():
|
||||
partition formatted as FAT.
|
||||
'''))
|
||||
|
||||
if config('secureBoot')['enable'] and not config('secureBoot')['createAndEnrollKeys'] and not os.path.exists("/var/lib/sbctl"):
|
||||
print("There are no sbctl secure boot keys present. Please generate some.")
|
||||
sys.exit(1)
|
||||
|
||||
if not os.path.exists(limine_dir):
|
||||
os.makedirs(limine_dir)
|
||||
else:
|
||||
@@ -352,6 +356,28 @@ def main():
|
||||
print('error: failed to enroll limine config.', file=sys.stderr)
|
||||
sys.exit(1)
|
||||
|
||||
if config('secureBoot')['enable']:
|
||||
sbctl = os.path.join(config('secureBoot')['sbctl'], 'bin', 'sbctl')
|
||||
if config('secureBoot')['createAndEnrollKeys']:
|
||||
print("TEST MODE: creating and enrolling keys")
|
||||
try:
|
||||
subprocess.run([sbctl, 'create-keys'])
|
||||
except:
|
||||
print('error: failed to create keys', file=sys.stderr)
|
||||
sys.exit(1)
|
||||
try:
|
||||
subprocess.run([sbctl, 'enroll-keys', '--yes-this-might-brick-my-machine'])
|
||||
except:
|
||||
print('error: failed to enroll keys', file=sys.stderr)
|
||||
sys.exit(1)
|
||||
|
||||
print('signing limine...')
|
||||
try:
|
||||
subprocess.run([sbctl, 'sign', dest_path])
|
||||
except:
|
||||
print('error: failed to sign limine', file=sys.stderr)
|
||||
sys.exit(1)
|
||||
|
||||
if not config('efiRemovable') and not config('canTouchEfiVariables'):
|
||||
print('warning: boot.loader.efi.canTouchEfiVariables is set to false while boot.loader.limine.efiInstallAsRemovable.\n This may render the system unbootable.')
|
||||
|
||||
@@ -362,9 +388,16 @@ def main():
|
||||
efibootmgr = os.path.join(config('efiBootMgrPath'), 'bin', 'efibootmgr')
|
||||
efi_partition = find_mounted_device(config('efiMountPoint'))
|
||||
efi_disk = find_disk_device(efi_partition)
|
||||
|
||||
efibootmgr_output = subprocess.check_output([efibootmgr], stderr=subprocess.STDOUT, universal_newlines=True)
|
||||
create_flag = '-c'
|
||||
# Check the output of `efibootmgr` to find if limine is already installed and present in the boot record
|
||||
if matches := re.findall(r'Boot[0-9a-fA-F]{4}\*? Limine', efibootmgr_output):
|
||||
create_flag = '-C' # if present, keep the same boot order
|
||||
|
||||
efibootmgr_output = subprocess.check_output([
|
||||
efibootmgr,
|
||||
'-c',
|
||||
create_flag,
|
||||
'-d', efi_disk,
|
||||
'-p', efi_partition.removeprefix(efi_disk).removeprefix('p'),
|
||||
'-l', f'\\efi\\limine\\{boot_file}',
|
||||
|
||||
@@ -18,6 +18,7 @@ let
|
||||
canTouchEfiVariables = efi.canTouchEfiVariables;
|
||||
efiSupport = cfg.efiSupport;
|
||||
efiRemovable = cfg.efiInstallAsRemovable;
|
||||
secureBoot = cfg.secureBoot;
|
||||
biosSupport = cfg.biosSupport;
|
||||
biosDevice = cfg.biosDevice;
|
||||
partitionIndex = cfg.partitionIndex;
|
||||
@@ -177,6 +178,41 @@ in
|
||||
'';
|
||||
};
|
||||
|
||||
secureBoot = {
|
||||
enable = lib.mkEnableOption null // {
|
||||
description = ''
|
||||
Whether to use sign the limine binary with sbctl.
|
||||
|
||||
::: {.note}
|
||||
This requires you to already have generated the keys and enrolled them with {command}`sbctl`.
|
||||
|
||||
To create keys use {command}`sbctl create-keys`.
|
||||
|
||||
To enroll them first reset secure boot to "Setup Mode". This is device specific.
|
||||
Then enroll them using {command}`sbctl enroll-keys -m -f`.
|
||||
|
||||
You can now rebuild your system with this option enabled.
|
||||
|
||||
Afterwards turn setup mode off and enable secure boot.
|
||||
:::
|
||||
'';
|
||||
};
|
||||
|
||||
createAndEnrollKeys = lib.mkEnableOption null // {
|
||||
internal = true;
|
||||
description = ''
|
||||
Creates secure boot signing keys and enrolls them during bootloader installation.
|
||||
|
||||
::: {.note}
|
||||
This is used for automated nixos tests.
|
||||
NOT INTENDED to be used on a real system.
|
||||
:::
|
||||
'';
|
||||
};
|
||||
|
||||
sbctl = lib.mkPackageOption pkgs "sbctl" { };
|
||||
};
|
||||
|
||||
style = {
|
||||
wallpapers = lib.mkOption {
|
||||
default = [ ];
|
||||
@@ -368,5 +404,57 @@ in
|
||||
};
|
||||
};
|
||||
})
|
||||
(lib.mkIf (cfg.enable && cfg.secureBoot.enable) {
|
||||
assertions = [
|
||||
{
|
||||
assertion = cfg.enrollConfig;
|
||||
message = "Disabling enrollConfig allows bypassing secure boot.";
|
||||
}
|
||||
{
|
||||
assertion = cfg.validateChecksums;
|
||||
message = "Disabling validateChecksums allows bypassing secure boot.";
|
||||
}
|
||||
{
|
||||
assertion = cfg.panicOnChecksumMismatch;
|
||||
message = "Disabling panicOnChecksumMismatch allows bypassing secure boot.";
|
||||
}
|
||||
{
|
||||
assertion = cfg.efiSupport;
|
||||
message = "Secure boot is only supported on EFI systems.";
|
||||
}
|
||||
];
|
||||
|
||||
boot.loader.limine.enrollConfig = true;
|
||||
boot.loader.limine.validateChecksums = true;
|
||||
boot.loader.limine.panicOnChecksumMismatch = true;
|
||||
})
|
||||
|
||||
# Fwupd binary needs to be signed in secure boot mode
|
||||
(lib.mkIf (cfg.enable && cfg.secureBoot.enable && config.services.fwupd.enable) {
|
||||
systemd.services.fwupd = {
|
||||
environment.FWUPD_EFIAPPDIR = "/run/fwupd-efi";
|
||||
};
|
||||
|
||||
systemd.services.fwupd-efi = {
|
||||
description = "Sign fwupd EFI app for secure boot";
|
||||
wantedBy = [ "fwupd.service" ];
|
||||
partOf = [ "fwupd.service" ];
|
||||
before = [ "fwupd.service" ];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
RemainAfterExit = true;
|
||||
RuntimeDirectory = "fwupd-efi";
|
||||
};
|
||||
script = ''
|
||||
cp ${config.services.fwupd.package.fwupd-efi}/libexec/fwupd/efi/fwupd*.efi /run/fwupd-efi/
|
||||
chmod +w /run/fwupd-efi/fwupd*.efi
|
||||
${lib.getExe pkgs.sbctl} sign /run/fwupd-efi/fwupd*.efi
|
||||
'';
|
||||
};
|
||||
|
||||
services.fwupd.uefiCapsuleSettings = {
|
||||
DisableShimForSecureBoot = true;
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
||||
|
||||
@@ -975,6 +975,7 @@ in
|
||||
ombi = handleTest ./ombi.nix { };
|
||||
openarena = handleTest ./openarena.nix { };
|
||||
openbao = runTest ./openbao.nix;
|
||||
opencloud = runTest ./opencloud.nix;
|
||||
openldap = handleTest ./openldap.nix { };
|
||||
opensearch = discoverTests (import ./opensearch.nix);
|
||||
openresty-lua = handleTest ./openresty-lua.nix { };
|
||||
|
||||
@@ -48,10 +48,6 @@ import ./make-test-python.nix (
|
||||
print(scanimage)
|
||||
assert """device `brother5:net1;dev0' is a Brother b ADS-1200""" in scanimage
|
||||
assert """device `brother5:net1;dev1' is a Brother a ADS-1200""" in scanimage
|
||||
|
||||
# Confirm systemd-udevd no longer logs errors about SYSFS
|
||||
logs = machine.succeed('journalctl --unit systemd-udevd')
|
||||
assert "Invalid key 'SYSFS'" not in logs
|
||||
'';
|
||||
}
|
||||
)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Checks that `security.pki` options are working in curl and the main browser
|
||||
# engines: Gecko (via Firefox), Chromium, QtWebEngine (via qutebrowser) and
|
||||
# WebKitGTK (via Midori). The test checks that certificates issued by a custom
|
||||
# engines: Gecko (via Firefox), Chromium, QtWebEngine (via qutebrowser).
|
||||
# The test checks that certificates issued by a custom
|
||||
# trusted CA are accepted but those from an unknown CA are rejected.
|
||||
|
||||
{
|
||||
@@ -210,8 +210,4 @@ in
|
||||
args = "-T";
|
||||
error = "Certificate error";
|
||||
};
|
||||
midori = {
|
||||
args = "-p";
|
||||
error = "Security";
|
||||
};
|
||||
}
|
||||
|
||||
+50
-12
@@ -1,10 +1,14 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
{
|
||||
name = "davis";
|
||||
|
||||
meta.maintainers = pkgs.davis.meta.maintainers;
|
||||
|
||||
nodes.machine =
|
||||
nodes.machine1 =
|
||||
{ config, ... }:
|
||||
{
|
||||
virtualisation = {
|
||||
@@ -24,33 +28,67 @@
|
||||
adminLogin = "admin";
|
||||
appSecretFile = "${pkgs.writeText "davisAppSecret" "52882ef142066e09ab99ce816ba72522e789505caba224"}";
|
||||
adminPasswordFile = "${pkgs.writeText "davisAdminPass" "nixos"}";
|
||||
nginx = { };
|
||||
};
|
||||
};
|
||||
nodes.machine2 =
|
||||
{ nodes, config, ... }:
|
||||
{
|
||||
virtualisation = {
|
||||
memorySize = 512;
|
||||
};
|
||||
environment.systemPackages = [ pkgs.fcgi ];
|
||||
|
||||
# no nginx, and no mail dsn
|
||||
services.davis = {
|
||||
enable = true;
|
||||
hostname = "davis.example.com";
|
||||
database = {
|
||||
driver = "postgresql";
|
||||
};
|
||||
adminLogin = "admin";
|
||||
appSecretFile = "${pkgs.writeText "davisAppSecret" "52882ef142066e09ab99ce816ba72522e789505caba224"}";
|
||||
adminPasswordFile = "${pkgs.writeText "davisAdminPass" "nixos"}";
|
||||
nginx = null;
|
||||
};
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
start_all()
|
||||
machine.wait_for_unit("postgresql.service")
|
||||
machine.wait_for_unit("davis-env-setup.service")
|
||||
machine.wait_for_unit("davis-db-migrate.service")
|
||||
machine.wait_for_unit("nginx.service")
|
||||
machine.wait_for_unit("phpfpm-davis.service")
|
||||
|
||||
machine1.wait_for_unit("postgresql.service")
|
||||
machine1.wait_for_unit("davis-env-setup.service")
|
||||
machine1.wait_for_unit("davis-db-migrate.service")
|
||||
machine1.wait_for_unit("phpfpm-davis.service")
|
||||
|
||||
with subtest("welcome screen loads"):
|
||||
machine.succeed(
|
||||
machine1.succeed(
|
||||
"curl -sSfL --resolve davis.example.com:80:127.0.0.1 http://davis.example.com/ | grep '<title>Davis</title>'"
|
||||
)
|
||||
|
||||
with subtest("login works"):
|
||||
csrf_token = machine.succeed(
|
||||
csrf_token = machine1.succeed(
|
||||
"curl -c /tmp/cookies -sSfL --resolve davis.example.com:80:127.0.0.1 http://davis.example.com/login | grep '_csrf_token' | sed -E 's,.*value=\"(.*)\".*,\\1,g'"
|
||||
)
|
||||
r = machine.succeed(
|
||||
r = machine1.succeed(
|
||||
f"curl -b /tmp/cookies --resolve davis.example.com:80:127.0.0.1 http://davis.example.com/login -X POST -F _username=admin -F _password=nixos -F _csrf_token={csrf_token.strip()} -D headers"
|
||||
)
|
||||
print(r)
|
||||
machine.succeed(
|
||||
machine1.succeed(
|
||||
"[[ $(grep -i 'location: ' headers | cut -d: -f2- | xargs echo) == /dashboard* ]]"
|
||||
)
|
||||
machine2.wait_for_unit("davis-env-setup.service")
|
||||
machine2.wait_for_unit("davis-db-migrate.service")
|
||||
machine2.wait_for_unit("phpfpm-davis.service")
|
||||
r = machine2.succeed(
|
||||
"find /var/lib/davis/var/log"
|
||||
)
|
||||
print(r)
|
||||
env = (
|
||||
"SCRIPT_NAME=/index.php",
|
||||
"SCRIPT_FILENAME=${config.nodes.machine2.services.davis.package}/public/index.php",
|
||||
"REMOTE_ADDR=127.0.0.1",
|
||||
"REQUEST_METHOD=GET",
|
||||
);
|
||||
page = machine2.succeed(f"{' '.join(env)} ${pkgs.fcgi}/bin/cgi-fcgi -bind -connect ${config.nodes.machine2.services.phpfpm.pools.davis.socket}")
|
||||
'';
|
||||
}
|
||||
|
||||
@@ -4,5 +4,6 @@
|
||||
}:
|
||||
{
|
||||
checksum = runTest ./checksum.nix;
|
||||
secureBoot = runTest ./secure-boot.nix;
|
||||
uefi = runTest ./uefi.nix;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
{ lib, ... }:
|
||||
{
|
||||
name = "secureBoot";
|
||||
meta.maintainers = with lib.maintainers; [
|
||||
programmerlexi
|
||||
];
|
||||
meta.platforms = [
|
||||
"aarch64-linux"
|
||||
"i686-linux"
|
||||
"x86_64-linux"
|
||||
];
|
||||
nodes.machine =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
virtualisation.useBootLoader = true;
|
||||
virtualisation.useEFIBoot = true;
|
||||
virtualisation.useSecureBoot = true;
|
||||
virtualisation.efi.OVMF = pkgs.OVMFFull.fd;
|
||||
virtualisation.efi.keepVariables = true;
|
||||
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
boot.loader.limine.enable = true;
|
||||
boot.loader.limine.efiSupport = true;
|
||||
boot.loader.limine.secureBoot.enable = true;
|
||||
boot.loader.limine.secureBoot.createAndEnrollKeys = true;
|
||||
boot.loader.timeout = 0;
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
machine.start()
|
||||
assert "Secure Boot: enabled (user)" in machine.succeed("bootctl status")
|
||||
'';
|
||||
}
|
||||
@@ -0,0 +1,110 @@
|
||||
{ lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
certs = import ./common/acme/server/snakeoil-certs.nix;
|
||||
inherit (certs) domain;
|
||||
|
||||
# this is a demo user created by IDM_CREATE_DEMO_USERS=true
|
||||
demoUser = "alan";
|
||||
demoPassword = "demo";
|
||||
|
||||
adminUser = "admin";
|
||||
adminPassword = "hunter2";
|
||||
testRunner =
|
||||
pkgs.writers.writePython3Bin "test-runner"
|
||||
{
|
||||
libraries = [ pkgs.python3Packages.selenium ];
|
||||
flakeIgnore = [ "E501" ];
|
||||
}
|
||||
''
|
||||
import sys
|
||||
from selenium.webdriver.common.by import By
|
||||
from selenium.webdriver import Firefox
|
||||
from selenium.webdriver.firefox.options import Options
|
||||
from selenium.webdriver.support.ui import WebDriverWait
|
||||
from selenium.webdriver.support import expected_conditions as EC
|
||||
|
||||
options = Options()
|
||||
options.add_argument('--headless')
|
||||
driver = Firefox(options=options)
|
||||
|
||||
host = sys.argv[1]
|
||||
user = sys.argv[2]
|
||||
password = sys.argv[3]
|
||||
|
||||
driver.get(f"https://{host}/")
|
||||
wait = WebDriverWait(driver, 60)
|
||||
wait.until(EC.title_contains("Sign in"))
|
||||
wait.until(EC.url_contains(f"https://{host}/signin/v1/identifier"))
|
||||
wait.until(EC.visibility_of_element_located((By.ID, 'oc-login-username')))
|
||||
driver.find_element(By.ID, 'oc-login-username').send_keys(user)
|
||||
driver.find_element(By.ID, 'oc-login-password').send_keys(password)
|
||||
wait.until(EC.visibility_of_element_located((By.XPATH, '//button[@type="submit"]')))
|
||||
driver.find_element(By.XPATH, '//button[@type="submit"]').click()
|
||||
wait.until(EC.visibility_of_element_located((By.ID, 'new-file-menu-btn')))
|
||||
wait.until(EC.title_contains("Personal"))
|
||||
'';
|
||||
in
|
||||
|
||||
{
|
||||
name = "opencloud";
|
||||
|
||||
meta.maintainers = with lib.maintainers; [
|
||||
christoph-heiss
|
||||
k900
|
||||
];
|
||||
|
||||
nodes.machine = {
|
||||
virtualisation.memorySize = 2048;
|
||||
environment.systemPackages = [
|
||||
pkgs.firefox-unwrapped
|
||||
pkgs.geckodriver
|
||||
testRunner
|
||||
];
|
||||
|
||||
networking.hosts."127.0.0.1" = [ domain ];
|
||||
security.pki.certificateFiles = [ certs.ca.cert ];
|
||||
|
||||
services.opencloud = {
|
||||
enable = true;
|
||||
url = "https://${domain}:9200";
|
||||
environment = {
|
||||
ADMIN_PASSWORD = adminPassword;
|
||||
IDM_CREATE_DEMO_USERS = "true";
|
||||
IDM_LDAPS_CERT = "${certs.${domain}.cert}";
|
||||
IDM_LDAPS_KEY = "${certs.${domain}.key}";
|
||||
OC_INSECURE = "false";
|
||||
OC_LDAP_URI = "ldaps://${domain}:9235";
|
||||
OC_LDAP_CACERT = "${certs.${domain}.cert}";
|
||||
OC_HTTP_TLS_ENABLED = "true";
|
||||
OC_HTTP_TLS_CERTIFICATE = "${certs.${domain}.cert}";
|
||||
OC_HTTP_TLS_KEY = "${certs.${domain}.key}";
|
||||
PROXY_TLS = "true";
|
||||
PROXY_TRANSPORT_TLS_CERT = "${certs.${domain}.cert}";
|
||||
PROXY_TRANSPORT_TLS_KEY = "${certs.${domain}.key}";
|
||||
PROXY_INSECURE_BACKENDS = "true";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
start_all()
|
||||
machine.wait_for_unit("opencloud.service")
|
||||
machine.wait_for_open_port(9200)
|
||||
|
||||
# wait for OpenCloud to fully come up
|
||||
machine.sleep(10)
|
||||
|
||||
with subtest("opencloud bin works"):
|
||||
machine.succeed("${lib.getExe pkgs.opencloud} version")
|
||||
|
||||
with subtest("web interface presents start page"):
|
||||
machine.succeed("curl -sSf https://${domain}:9200 | grep '<title>OpenCloud</title>'")
|
||||
|
||||
with subtest("use the web interface to log in with the provisioned admin user"):
|
||||
machine.succeed("PYTHONUNBUFFERED=1 systemd-cat -t test-runner test-runner ${domain}:9200 ${adminUser} ${adminPassword}")
|
||||
|
||||
with subtest("use the web interface to log in with a demo user"):
|
||||
machine.succeed("PYTHONUNBUFFERED=1 systemd-cat -t test-runner test-runner ${domain}:9200 ${demoUser} ${demoPassword}")
|
||||
'';
|
||||
}
|
||||
@@ -5,7 +5,7 @@ in
|
||||
{
|
||||
name = "spiped";
|
||||
meta = with pkgs.lib.maintainers; {
|
||||
maintainers = [ tomfitzhenry ];
|
||||
maintainers = [ ];
|
||||
};
|
||||
|
||||
nodes = {
|
||||
|
||||
@@ -22,13 +22,6 @@ stdenv.mkDerivation rec {
|
||||
hash = "sha256-of493Gd3vc6/a3l+ft/gQ3lUskdW/8yMa4FrY+BGDd4=";
|
||||
};
|
||||
|
||||
# ld64 on darwin doesn't support nested archives and as the nested lib
|
||||
# (libbase64.a) is not required to build so leave it out
|
||||
postPatch = lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||
substituteInPlace share/Makefile.am \
|
||||
--replace-fail libpicture_a_LIBADD '#libpicture_a_LIBADD'
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoreconfHook
|
||||
pkg-config
|
||||
|
||||
@@ -28,6 +28,7 @@ Multi-node setup
|
||||
it is simple to create a cluster of multiple nodes in a highly available setup (all nodes are in the control-plane and are a part of the etcd cluster).
|
||||
|
||||
The first node is configured like this:
|
||||
|
||||
```
|
||||
{
|
||||
services.k3s = {
|
||||
@@ -55,3 +56,11 @@ Any other subsequent nodes can be added with a slightly different config:
|
||||
For this to work you need to open the aforementioned API, etcd, and flannel ports in the firewall. Official documentation on what ports need to be opened for specific use cases can be found on [k3s' documentation site](https://docs.k3s.io/installation/requirements#inbound-rules-for-k3s-nodes). Note that it is [recommended](https://etcd.io/docs/v3.3/faq/#why-an-odd-number-of-cluster-members) to use an odd number of nodes in such a cluster.
|
||||
|
||||
Tip: If you run into connectivity issues between nodes for specific applications (e.g. ingress controller), please verify the firewall settings you have enabled (example under [Single Node](#single-node)) against the documentation for that specific application. In the ingress controller example, you may want to open 443 or 80 depending on your use case.
|
||||
|
||||
## Quirks
|
||||
|
||||
### `prefer-bundled-bin`
|
||||
|
||||
K3s has a config setting `prefer-bundled-bin` (and CLI flag `--prefer-bundled-bin`) that makes k3s use binaries from the `/var/lib/rancher/k3s/data/current/bin/aux/` directory, as unpacked by the k3s binary, before the system `$PATH`.
|
||||
This works with the official distribution of k3s but not with the package from nixpkgs, as it does not bundle the upstream binaries from [`k3s-root`](https://github.com/k3s-io/k3s-root) into the k3s binary.
|
||||
Thus the `prefer-bundled-bin` setting **cannot** be used to work around issues (like [this `mount` regression](https://github.com/util-linux/util-linux/issues/3474)) with binaries used/called by the kubelet.
|
||||
|
||||
@@ -112,7 +112,6 @@ buildGoModule rec {
|
||||
mainProgram = "rclone";
|
||||
maintainers = with maintainers; [
|
||||
SuperSandro2000
|
||||
tomfitzhenry
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -10,17 +10,20 @@
|
||||
libGLU,
|
||||
cmake,
|
||||
wrapQtAppsHook,
|
||||
rustPlatform,
|
||||
cargo,
|
||||
rustc,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "librepcb";
|
||||
version = "1.2.0";
|
||||
version = "1.3.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = pname;
|
||||
repo = pname;
|
||||
rev = version;
|
||||
hash = "sha256-/Hw7ZTv2CbDcKuyI27wC46IxCcTnrXDS/Mf7csUTc7w=";
|
||||
hash = "sha256-J4y0ikZNuOguN9msmEQzgcY0/REnOEOoDkY/ga+Cfd8=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
@@ -32,9 +35,20 @@ stdenv.mkDerivation rec {
|
||||
wrapQtAppsHook
|
||||
opencascade-occt
|
||||
libGLU
|
||||
rustPlatform.cargoSetupHook
|
||||
cargo
|
||||
rustc
|
||||
];
|
||||
buildInputs = [ qtbase ];
|
||||
|
||||
cargoDeps = rustPlatform.fetchCargoVendor {
|
||||
inherit src;
|
||||
sourceRoot = "source/${cargoRoot}";
|
||||
hash = "sha256-1td3WjxbDq2lX7c0trpYRhO82ChNAG/ZABBRsekYtq4=";
|
||||
};
|
||||
|
||||
cargoRoot = "libs/librepcb/rust-core";
|
||||
|
||||
meta = with lib; {
|
||||
description = "Free EDA software to develop printed circuit boards";
|
||||
homepage = "https://librepcb.org/";
|
||||
|
||||
@@ -1,127 +0,0 @@
|
||||
{
|
||||
stdenvNoCC,
|
||||
lib,
|
||||
fetchurl,
|
||||
writeScript,
|
||||
installShellFiles,
|
||||
qemu,
|
||||
makeBinaryWrapper,
|
||||
autoPatchelfHook,
|
||||
}:
|
||||
|
||||
let
|
||||
version = "0.22.0";
|
||||
|
||||
dist = {
|
||||
aarch64-darwin = rec {
|
||||
archSuffix = "Darwin-arm64";
|
||||
url = "https://github.com/lima-vm/lima/releases/download/v${version}/lima-${version}-${archSuffix}.tar.gz";
|
||||
sha256 = "271e0224d3e678450424abd4e6766a14ea52b146824bf8cfac7a0f486ceb2a0c";
|
||||
};
|
||||
|
||||
x86_64-darwin = rec {
|
||||
archSuffix = "Darwin-x86_64";
|
||||
url = "https://github.com/lima-vm/lima/releases/download/v${version}/lima-${version}-${archSuffix}.tar.gz";
|
||||
sha256 = "f2d331ef783e0bb00e193efc3d5c9438df5d284b1cbac771e5d239c3459b2b3d";
|
||||
};
|
||||
|
||||
aarch64-linux = rec {
|
||||
archSuffix = "Linux-aarch64";
|
||||
url = "https://github.com/lima-vm/lima/releases/download/v${version}/lima-${version}-${archSuffix}.tar.gz";
|
||||
sha256 = "8c5c6dc21fae19c5645bf8db8f441aeab7fba21fbe882b2b9db58c126d07846b";
|
||||
};
|
||||
|
||||
x86_64-linux = rec {
|
||||
archSuffix = "Linux-x86_64";
|
||||
url = "https://github.com/lima-vm/lima/releases/download/v${version}/lima-${version}-${archSuffix}.tar.gz";
|
||||
sha256 = "58e66114ae1e991512a86b6952ab3a1ffe0e12e08199a9a3ea13c3d2f24b307e";
|
||||
};
|
||||
};
|
||||
in
|
||||
stdenvNoCC.mkDerivation {
|
||||
inherit version;
|
||||
pname = "lima";
|
||||
src = fetchurl {
|
||||
inherit
|
||||
(dist.${stdenvNoCC.hostPlatform.system}
|
||||
or (throw "Unsupported system: ${stdenvNoCC.hostPlatform.system}")
|
||||
)
|
||||
url
|
||||
sha256
|
||||
;
|
||||
};
|
||||
|
||||
sourceRoot = ".";
|
||||
|
||||
nativeBuildInputs = [
|
||||
makeBinaryWrapper
|
||||
installShellFiles
|
||||
] ++ lib.optionals stdenvNoCC.hostPlatform.isLinux [ autoPatchelfHook ];
|
||||
|
||||
installPhase =
|
||||
''
|
||||
runHook preInstall
|
||||
mkdir -p $out
|
||||
cp -r bin share $out
|
||||
chmod +x $out/bin/limactl
|
||||
wrapProgram $out/bin/limactl \
|
||||
--prefix PATH : ${lib.makeBinPath [ qemu ]}
|
||||
''
|
||||
+ lib.optionalString (stdenvNoCC.buildPlatform.canExecute stdenvNoCC.hostPlatform) ''
|
||||
# the shell completion only works with a patched $out/bin/limactl and so
|
||||
# needs to run after the autoPatchelfHook is executed in postFixup.
|
||||
doShellCompletion() {
|
||||
installShellCompletion --cmd limactl \
|
||||
--bash <($out/bin/limactl completion bash) \
|
||||
--fish <($out/bin/limactl completion fish) \
|
||||
--zsh <($out/bin/limactl completion zsh)
|
||||
}
|
||||
postFixupHooks+=(doShellCompletion)
|
||||
''
|
||||
+ ''
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
doInstallCheck = true;
|
||||
installCheckPhase = ''
|
||||
USER=nix $out/bin/limactl validate $out/share/lima/examples/default.yaml
|
||||
USER=nix $out/bin/limactl validate $out/share/lima/examples/experimental/vz.yaml
|
||||
'';
|
||||
|
||||
# Stripping removes entitlements of the binary on Darwin making it non-operational.
|
||||
# Therefore, disable stripping on Darwin.
|
||||
dontStrip = stdenvNoCC.hostPlatform.isDarwin;
|
||||
|
||||
passthru.updateScript =
|
||||
let
|
||||
lima-bin = builtins.toString ./bin.nix;
|
||||
in
|
||||
writeScript "update-lima-bin.sh" ''
|
||||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p common-updater-scripts curl jq gawk
|
||||
|
||||
set -eou pipefail
|
||||
|
||||
LATEST_VERSION=$(curl -H "Accept: application/vnd.github+json" -Ls https://api.github.com/repos/lima-vm/lima/releases/latest | jq -r .tag_name | cut -c 2-)
|
||||
curl -Ls -o SHA256SUMS https://github.com/lima-vm/lima/releases/download/v$LATEST_VERSION/SHA256SUMS
|
||||
AARCH64_DARWIN_SHA256=$(cat SHA256SUMS | awk '/Darwin-arm64/{print $1}')
|
||||
X86_64_DARWIN_SHA256=$(cat SHA256SUMS | awk '/Darwin-x86_64/{print $1}')
|
||||
AARCH64_LINUX_SHA256=$(cat SHA256SUMS | awk '/Linux-aarch64/{print $1}')
|
||||
X86_64_LINUX_SHA256=$(cat SHA256SUMS | awk '/Linux-x86_64/{print $1}')
|
||||
|
||||
# reset version first so that all platforms are always updated and in sync
|
||||
update-source-version lima-bin $LATEST_VERSION $AARCH64_DARWIN_SHA256 --file=${lima-bin} --ignore-same-version --system=aarch64-darwin
|
||||
update-source-version lima-bin $LATEST_VERSION $X86_64_DARWIN_SHA256 --file=${lima-bin} --ignore-same-version --system=x86_64-darwin
|
||||
update-source-version lima-bin $LATEST_VERSION $AARCH64_LINUX_SHA256 --file=${lima-bin} --ignore-same-version --system=aarch64-linux
|
||||
update-source-version lima-bin $LATEST_VERSION $X86_64_LINUX_SHA256 --file=${lima-bin} --ignore-same-version --system=x86_64-linux
|
||||
rm SHA256SUMS
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/lima-vm/lima";
|
||||
description = "Linux virtual machines (on macOS, in most cases)";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ tricktron ];
|
||||
platforms = platforms.linux ++ platforms.darwin;
|
||||
};
|
||||
}
|
||||
@@ -8,11 +8,11 @@
|
||||
|
||||
stdenvNoCC.mkDerivation (finalAttrs: {
|
||||
pname = "aldente";
|
||||
version = "1.32";
|
||||
version = "1.33";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/davidwernhart/aldente-charge-limiter/releases/download/${finalAttrs.version}/AlDente.dmg";
|
||||
hash = "sha256-pUFcP7J60lLeuX9v3qhCMcsRmurfw0LnoCcbRONnxKM=";
|
||||
hash = "sha256-uUklxpQEVVXp2eZLYBpmAsVo5ziV0zvHRJA4JRiJAJk=";
|
||||
};
|
||||
|
||||
dontBuild = true;
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
cmake,
|
||||
libansilove,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "ansilove";
|
||||
version = "4.2.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ansilove";
|
||||
repo = "ansilove";
|
||||
tag = version;
|
||||
hash = "sha256-13v2NLVJt11muwocBiQYz/rxQkte/W6LXwB/H/E9Nvk=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
];
|
||||
|
||||
buildInputs = [ libansilove ];
|
||||
|
||||
meta = {
|
||||
description = "ANSI and ASCII art to PNG converter in C";
|
||||
homepage = "https://github.com/ansilove/ansilove";
|
||||
changelog = "https://github.com/ansilove/ansilove/blob/${src.rev}/ChangeLog";
|
||||
license = lib.licenses.bsd2;
|
||||
maintainers = with lib.maintainers; [ jethair ];
|
||||
mainProgram = "ansilove";
|
||||
platforms = lib.platforms.unix;
|
||||
};
|
||||
}
|
||||
@@ -10,6 +10,11 @@
|
||||
installShellFiles,
|
||||
crates ? [ "attic-client" ],
|
||||
}:
|
||||
let
|
||||
# Only the attic-client crate builds against the Nix C++ libs
|
||||
# This derivation is also used to build the server
|
||||
needNixInclude = lib.elem "attic-client" crates;
|
||||
in
|
||||
rustPlatform.buildRustPackage {
|
||||
pname = "attic";
|
||||
version = "0-unstable-2025-02-02";
|
||||
@@ -26,8 +31,7 @@ rustPlatform.buildRustPackage {
|
||||
installShellFiles
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
nixVersions.nix_2_24
|
||||
buildInputs = lib.optional needNixInclude nixVersions.nix_2_24 ++ [
|
||||
boost
|
||||
];
|
||||
|
||||
@@ -35,8 +39,13 @@ rustPlatform.buildRustPackage {
|
||||
cargoHash = "sha256-AbpWnYfBMrR6oOfy2LkQvIPYsClCWE89bJav+iHTtLM=";
|
||||
useFetchCargoVendor = true;
|
||||
|
||||
ATTIC_DISTRIBUTOR = "nixpkgs";
|
||||
NIX_INCLUDE_PATH = "${lib.getDev nixVersions.nix_2_24}/include";
|
||||
env =
|
||||
{
|
||||
ATTIC_DISTRIBUTOR = "nixpkgs";
|
||||
}
|
||||
// lib.optionalAttrs needNixInclude {
|
||||
NIX_INCLUDE_PATH = "${lib.getDev nixVersions.nix_2_24}/include";
|
||||
};
|
||||
|
||||
# Attic interacts with Nix directly and its tests require trusted-user access
|
||||
# to nix-daemon to import NARs, which is not possible in the build sandbox.
|
||||
|
||||
@@ -8,11 +8,11 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "bdf2psf";
|
||||
version = "1.236";
|
||||
version = "1.237";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://debian/pool/main/c/console-setup/bdf2psf_${version}_all.deb";
|
||||
sha256 = "sha256-b4zEgpDxvllj/9EuKdgTOz1X6bB+4nk/W1WUUMBCU+s=";
|
||||
sha256 = "sha256-TdEIXD4COatzgtPm8EGMxQFqqgy/5gkgnZKrze4U2sM=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ dpkg ];
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
{
|
||||
fetchurl,
|
||||
lib,
|
||||
libusb-compat-0_1,
|
||||
stdenv,
|
||||
...
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "bootloadhid";
|
||||
version = "0-unstable-2012-12-08";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://www.obdev.at/downloads/vusb/bootloadHID.2012-12-08.tar.gz";
|
||||
hash = "sha256-FU5+OGKaOi7sLfZm7foe4vLppXAY8X2fD48GTMINh1Q=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
libusb-compat-0_1
|
||||
];
|
||||
|
||||
makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ];
|
||||
|
||||
setSourceRoot = "sourceRoot=$(echo */commandline)";
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/bin
|
||||
install bootloadHID $out/bin
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "USB boot loader for AVR microcontrollers with at least 2 kB of boot load section, e.g. ATMega8";
|
||||
homepage = "https://www.obdev.at/products/vusb/bootloadhid.html";
|
||||
license = lib.licenses.gpl2Plus;
|
||||
maintainers = with lib.maintainers; [ thetaoofsu ];
|
||||
mainProgram = "bootloadHID";
|
||||
platforms = lib.platforms.unix;
|
||||
};
|
||||
}
|
||||
@@ -9,6 +9,7 @@
|
||||
glib,
|
||||
libredirect,
|
||||
nixosTests,
|
||||
udevCheckHook,
|
||||
}:
|
||||
let
|
||||
myPatchElf = file: ''
|
||||
@@ -43,6 +44,7 @@ stdenv.mkDerivation rec {
|
||||
nativeBuildInputs = [
|
||||
makeWrapper
|
||||
patchelf
|
||||
udevCheckHook
|
||||
];
|
||||
buildInputs = [
|
||||
libusb1
|
||||
@@ -114,7 +116,7 @@ stdenv.mkDerivation rec {
|
||||
echo "brother5" > $out/etc/sane.d/dll.d/brother5.conf
|
||||
|
||||
mkdir -p $out/etc/udev/rules.d
|
||||
cp -p $PATH_TO_BRSCAN5/udev-rules/NN-brother-mfp-brscan5-1.0.2-2.rules \
|
||||
install -m 0444 $PATH_TO_BRSCAN5/udev-rules/NN-brother-mfp-brscan5-1.0.2-2.rules \
|
||||
$out/etc/udev/rules.d/49-brother-mfp-brscan5-1.0.2-2.rules
|
||||
|
||||
ETCDIR=$out/etc/opt/brother/scanner/brscan5
|
||||
@@ -124,6 +126,9 @@ stdenv.mkDerivation rec {
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
# We want to run the udevCheckHook
|
||||
doInstallCheck = true;
|
||||
|
||||
dontPatchELF = true;
|
||||
|
||||
passthru.tests = { inherit (nixosTests) brscan5; };
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
fetchFromGitHub,
|
||||
python3,
|
||||
}:
|
||||
|
||||
python3.pkgs.buildPythonApplication rec {
|
||||
pname = "catcli";
|
||||
version = "1.0";
|
||||
format = "setuptools";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "deadc0de6";
|
||||
repo = pname;
|
||||
tag = "v${version}";
|
||||
hash = "sha256-dAt9NysH3q5YC+vO9XTnapBxFZmC4vWwJ8SxT9CzCQE=";
|
||||
};
|
||||
|
||||
postPatch = "patchShebangs . ";
|
||||
|
||||
propagatedBuildInputs = with python3.pkgs; [
|
||||
anytree
|
||||
docopt
|
||||
fusepy
|
||||
pyfzf
|
||||
types-docopt
|
||||
cmd2
|
||||
natsort
|
||||
];
|
||||
|
||||
nativeCheckInputs = with python3.pkgs; [
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Command line catalog tool for your offline data";
|
||||
mainProgram = "catcli";
|
||||
homepage = "https://github.com/deadc0de6/catcli";
|
||||
changelog = "https://github.com/deadc0de6/catcli/releases/tag/v${version}";
|
||||
license = licenses.gpl3Only;
|
||||
maintainers = with maintainers; [ petersjt014 ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
@@ -6,14 +6,10 @@
|
||||
fetchFromGitHub,
|
||||
installShellFiles,
|
||||
lima,
|
||||
lima-bin,
|
||||
makeWrapper,
|
||||
qemu,
|
||||
testers,
|
||||
colima,
|
||||
# use lima-bin on darwin to support native macOS virtualization
|
||||
# https://github.com/NixOS/nixpkgs/pull/209171
|
||||
lima-drv ? if stdenv.hostPlatform.isDarwin then lima-bin else lima,
|
||||
}:
|
||||
|
||||
buildGoModule rec {
|
||||
@@ -55,7 +51,7 @@ buildGoModule rec {
|
||||
wrapProgram $out/bin/colima \
|
||||
--prefix PATH : ${
|
||||
lib.makeBinPath [
|
||||
lima-drv
|
||||
lima
|
||||
qemu
|
||||
]
|
||||
}
|
||||
|
||||
@@ -24,15 +24,17 @@ stdenv.mkDerivation rec {
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoreconfHook
|
||||
pkg-config
|
||||
cups
|
||||
glib # Required for gdbus-codegen
|
||||
pkg-config
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
avahi
|
||||
cups
|
||||
glib
|
||||
libcupsfilters
|
||||
libppd
|
||||
glib
|
||||
];
|
||||
|
||||
configureFlags = [
|
||||
|
||||
@@ -27,8 +27,11 @@ php.buildComposerProject2 (finalAttrs: {
|
||||
rm -rf "$out/share"
|
||||
'';
|
||||
|
||||
passthru.tests = {
|
||||
inherit (nixosTests) davis;
|
||||
passthru = {
|
||||
php = php;
|
||||
tests = {
|
||||
inherit (nixosTests) davis;
|
||||
};
|
||||
};
|
||||
|
||||
meta = {
|
||||
|
||||
@@ -106,7 +106,6 @@ buildGoModule {
|
||||
homepage = "https://github.com/dependabot/cli";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [
|
||||
l0b0
|
||||
infinisil
|
||||
];
|
||||
};
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
meson,
|
||||
ninja,
|
||||
pkg-config,
|
||||
glib,
|
||||
gobject-introspection,
|
||||
gtk4,
|
||||
desktop-file-utils,
|
||||
gettext,
|
||||
wrapGAppsHook4,
|
||||
libadwaita,
|
||||
gjs,
|
||||
gnome-autoar,
|
||||
libsoup_3,
|
||||
}:
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "embellish";
|
||||
version = "0.4.7";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "getnf";
|
||||
repo = "embellish";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-+tTuQNok2rqTcQR4CRMc4qRqw0Ah2rovIut618z9GhU=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
meson
|
||||
ninja
|
||||
pkg-config
|
||||
glib
|
||||
gobject-introspection
|
||||
gtk4
|
||||
gettext
|
||||
desktop-file-utils
|
||||
wrapGAppsHook4
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
gtk4
|
||||
libadwaita
|
||||
gjs
|
||||
gnome-autoar
|
||||
libsoup_3
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "User-friendly application designed for managing Nerd Fonts on your system";
|
||||
longDescription = ''
|
||||
Embellish provides a seamless experience for installing, uninstalling
|
||||
and updating of Nerd Fonts. It's able to:
|
||||
- List all available Nerd Fonts
|
||||
- Download and install a Font
|
||||
- Uninstall an installed Font
|
||||
- Update an installed font
|
||||
- Preview fonts
|
||||
- Search fonts
|
||||
- Read font's licence(s)
|
||||
'';
|
||||
homepage = "https://github.com/getnf/embellish";
|
||||
changelog = "https://github.com/getnf/embellish/releases/tag/v${finalAttrs.version}";
|
||||
license = lib.licenses.gpl3Plus;
|
||||
maintainers = with lib.maintainers; [ normalcea ];
|
||||
mainProgram = "io.github.getnf.embellish";
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
})
|
||||
@@ -13,19 +13,19 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "esphome-dashboard";
|
||||
version = "20250415.0";
|
||||
version = "20250514.0";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "esphome";
|
||||
repo = "dashboard";
|
||||
rev = "refs/tags/${version}";
|
||||
hash = "sha256-HpmHII1pSsSO/hEHcy/QHv7jxslpz9a6EeHcEZQ+VIA=";
|
||||
hash = "sha256-t0+YlITnxgnLrK/SN0bSmMIv3djR9DKMlnFrR9Btwx8=";
|
||||
};
|
||||
|
||||
npmDeps = fetchNpmDeps {
|
||||
inherit src;
|
||||
hash = "sha256-SiH6CqFOpDQMMtRcgxr0LSJKuziZoYVjgVTpKBoebbg=";
|
||||
hash = "sha256-Uiz26kPxoz32t/GRppiYiVBVwWcQqUzPr0kScVUZak8=";
|
||||
};
|
||||
|
||||
build-system = [ setuptools ];
|
||||
|
||||
@@ -17,19 +17,30 @@ let
|
||||
self = python;
|
||||
packageOverrides = self: super: {
|
||||
esphome-dashboard = self.callPackage ./dashboard.nix { };
|
||||
|
||||
paho-mqtt = super.paho-mqtt.overridePythonAttrs (oldAttrs: rec {
|
||||
version = "1.6.1";
|
||||
src = fetchFromGitHub {
|
||||
inherit (oldAttrs.src) owner repo;
|
||||
tag = "v${version}";
|
||||
hash = "sha256-9nH6xROVpmI+iTKXfwv2Ar1PAmWbEunI3HO0pZyK6Rg=";
|
||||
};
|
||||
build-system = with self; [ setuptools ];
|
||||
doCheck = false;
|
||||
});
|
||||
};
|
||||
};
|
||||
in
|
||||
python.pkgs.buildPythonApplication rec {
|
||||
pname = "esphome";
|
||||
version = "2025.4.2";
|
||||
version = "2025.5.0";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = pname;
|
||||
repo = pname;
|
||||
tag = version;
|
||||
hash = "sha256-vy/wjtl/IbdSOxAUsV4bl7VNEBTetsvIDh2V1gDHSMs=";
|
||||
hash = "sha256-BcPdgAvRR7zataL4KOhLAvQaQnS60z8UZ9xdIK7ydz4=";
|
||||
};
|
||||
|
||||
build-systems = with python.pkgs; [
|
||||
@@ -50,10 +61,7 @@ python.pkgs.buildPythonApplication rec {
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace pyproject.toml \
|
||||
--replace-fail "setuptools==" "setuptools>="
|
||||
|
||||
# ensure component dependencies are available
|
||||
cat requirements_optional.txt >> requirements.txt
|
||||
--replace-fail "setuptools==80.4.0" "setuptools"
|
||||
'';
|
||||
|
||||
# Remove esptool and platformio from requirements
|
||||
@@ -160,7 +168,6 @@ python.pkgs.buildPythonApplication rec {
|
||||
gpl3Only # The python codebase and all other parts of this codebase
|
||||
];
|
||||
maintainers = with maintainers; [
|
||||
globin
|
||||
hexa
|
||||
];
|
||||
mainProgram = "esphome";
|
||||
|
||||
@@ -8,11 +8,11 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "gerrit";
|
||||
version = "3.11.3";
|
||||
version = "3.12.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://gerrit-releases.storage.googleapis.com/gerrit-${version}.war";
|
||||
hash = "sha256-SkLfxBU4ePnrgqB9k9qoYZ1njgHVMjRX4BZYbbeUaAQ=";
|
||||
hash = "sha256-/1QKWu1OF6uPkuBcnHBoVRqiiIxr7LPkrfQHpjO9sz4=";
|
||||
};
|
||||
|
||||
buildCommand = ''
|
||||
|
||||
@@ -52,7 +52,6 @@ rustPlatform.buildRustPackage rec {
|
||||
description = "git commit --fixup, but automatic";
|
||||
license = [ licenses.bsd3 ];
|
||||
maintainers = with maintainers; [
|
||||
tomfitzhenry
|
||||
matthiasbeyer
|
||||
];
|
||||
mainProgram = "git-absorb";
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
pkg-config,
|
||||
libiconv,
|
||||
rustPlatform,
|
||||
libz,
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
@@ -30,6 +31,7 @@ rustPlatform.buildRustPackage rec {
|
||||
[ openssl.dev ]
|
||||
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
libiconv
|
||||
libz
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
|
||||
@@ -9,16 +9,18 @@
|
||||
|
||||
buildGoModule (finalAttrs: {
|
||||
pname = "glance";
|
||||
version = "0.8.1";
|
||||
version = "0.8.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "glanceapp";
|
||||
repo = "glance";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-syWalphoKjUYrQjKrQUMDijgILQ+AIOVTMqYCiYVWyU=";
|
||||
hash = "sha256-o2Yom40HbNKe3DMMxz0Mf2gG8zresgU52Odpj2H7ZPU=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-81FAWMe7ksmbklXGGg15v2W4nuT6AcBHLIhXF7bI78c=";
|
||||
patches = [ ./update_purego.patch ];
|
||||
|
||||
vendorHash = "sha256-esPtCg63A40mX9hADOhEa+NjNk+9MI/0qZG3uE91qxg=";
|
||||
|
||||
ldflags = [
|
||||
"-s"
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
diff --git a/go.mod b/go.mod
|
||||
index ccea58ca68..118d91c650 100644
|
||||
--- a/go.mod
|
||||
+++ b/go.mod
|
||||
@@ -15,7 +15,7 @@
|
||||
require (
|
||||
github.com/PuerkitoBio/goquery v1.10.3 // indirect
|
||||
github.com/andybalholm/cascadia v1.3.3 // indirect
|
||||
- github.com/ebitengine/purego v0.8.2 // indirect
|
||||
+ github.com/ebitengine/purego v0.8.3 // indirect
|
||||
github.com/go-ole/go-ole v1.3.0 // indirect
|
||||
github.com/json-iterator/go v1.1.12 // indirect
|
||||
github.com/lufia/plan9stats v0.0.0-20250317134145-8bc96cf8fc35 // indirect
|
||||
diff --git a/go.sum b/go.sum
|
||||
index 80c2d6c664..6236b4de85 100644
|
||||
--- a/go.sum
|
||||
+++ b/go.sum
|
||||
@@ -11,6 +11,8 @@
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/ebitengine/purego v0.8.2 h1:jPPGWs2sZ1UgOSgD2bClL0MJIqu58nOmIcBuXr62z1I=
|
||||
github.com/ebitengine/purego v0.8.2/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ=
|
||||
+github.com/ebitengine/purego v0.8.3 h1:K+0AjQp63JEZTEMZiwsI9g0+hAMNohwUOtY0RPGexmc=
|
||||
+github.com/ebitengine/purego v0.8.3/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ=
|
||||
github.com/fsnotify/fsnotify v1.8.0 h1:dAwr6QBTBZIkG8roQaJjGof0pp0EeF+tNV7YBP3F/8M=
|
||||
github.com/fsnotify/fsnotify v1.8.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0=
|
||||
github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k=
|
||||
@@ -26,6 +26,6 @@ buildGoModule {
|
||||
description = "Go library for the Linux Landlock sandboxing feature";
|
||||
homepage = "https://github.com/landlock-lsm/go-landlock";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ tomfitzhenry ];
|
||||
maintainers = [ ];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -35,16 +35,16 @@
|
||||
let
|
||||
|
||||
pname = "hplip";
|
||||
version = "3.24.4";
|
||||
version = "3.25.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/hplip/${pname}-${version}.tar.gz";
|
||||
hash = "sha256-XXZDgxiTpeKt351C1YGl2/5arwI2Johrh2LFZF2g8fs=";
|
||||
hash = "sha256-6HL/KOslF3Balfbhg576HlCnejOq6JBSeN8r2CCRllM=";
|
||||
};
|
||||
|
||||
plugin = fetchurl {
|
||||
url = "https://www.openprinting.org/download/printdriver/auxfiles/HP/plugins/${pname}-${version}-plugin.run";
|
||||
hash = "sha256-Hzxr3SVmGoouGBU2VdbwbwKMHZwwjWnI7P13Z6LQxao=";
|
||||
hash = "sha256-miz41WYehGVI27tZUjGlRIpctjcpzJPfjR9lLf0WelQ=";
|
||||
};
|
||||
|
||||
hplipState = replaceVars ./hplip.state {
|
||||
@@ -161,8 +161,8 @@ python3Packages.buildPythonApplication {
|
||||
postPatch = ''
|
||||
# https://github.com/NixOS/nixpkgs/issues/44230
|
||||
substituteInPlace createPPD.sh \
|
||||
--replace ppdc "${cups}/bin/ppdc" \
|
||||
--replace "gzip -c" "gzip -cn"
|
||||
--replace-fail ppdc "${cups}/bin/ppdc" \
|
||||
--replace-fail "gzip -c" "gzip -cn"
|
||||
|
||||
# HPLIP hardcodes absolute paths everywhere. Nuke from orbit.
|
||||
find . -type f -exec sed -i \
|
||||
@@ -223,6 +223,7 @@ python3Packages.buildPythonApplication {
|
||||
"policykit_dir=${out}/share/polkit-1/actions"
|
||||
"policykit_dbus_etcdir=${out}/etc/dbus-1/system.d"
|
||||
"policykit_dbus_sharedir=${out}/share/dbus-1/system-services"
|
||||
"PYTHONEXECDIR=${out}/lib/python${lib.versions.majorMinor python3Packages.python.version}/site-packages"
|
||||
"hplip_confdir=${out}/etc/hp"
|
||||
"hplip_statedir=${out}/var/lib/hp"
|
||||
];
|
||||
@@ -347,15 +348,15 @@ python3Packages.buildPythonApplication {
|
||||
"lib/sane"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
description = "Print, scan and fax HP drivers for Linux";
|
||||
homepage = "https://developers.hp.com/hp-linux-imaging-and-printing";
|
||||
downloadPage = "https://sourceforge.net/projects/hplip/files/hplip/";
|
||||
license =
|
||||
if withPlugin then
|
||||
licenses.unfree
|
||||
lib.licenses.unfree
|
||||
else
|
||||
with licenses;
|
||||
with lib.licenses;
|
||||
[
|
||||
mit
|
||||
bsd2
|
||||
@@ -368,6 +369,6 @@ python3Packages.buildPythonApplication {
|
||||
"armv7l-linux"
|
||||
"aarch64-linux"
|
||||
];
|
||||
maintainers = with maintainers; [ ttuegel ];
|
||||
maintainers = with lib.maintainers; [ ttuegel ];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ stdenv.mkDerivation rec {
|
||||
mainProgram = "tpm_server";
|
||||
homepage = "https://sourceforge.net/projects/ibmswtpm2/";
|
||||
platforms = platforms.linux ++ platforms.darwin;
|
||||
maintainers = with maintainers; [ tomfitzhenry ];
|
||||
maintainers = [ ];
|
||||
license = licenses.bsd3;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -78,7 +78,6 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
homepage = "http://jim.tcl.tk/";
|
||||
license = lib.licenses.bsd2;
|
||||
platforms = lib.platforms.all;
|
||||
broken = stdenv.hostPlatform.isDarwin;
|
||||
maintainers = with lib.maintainers; [
|
||||
dbohdan
|
||||
fgaz
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
cmake,
|
||||
gd,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "libansilove";
|
||||
version = "1.4.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ansilove";
|
||||
repo = "libansilove";
|
||||
tag = version;
|
||||
hash = "sha256-kbQ7tbQbJ8zYhdbfiVZY26woyR4NNzqjCJ/5nrunlWs=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
];
|
||||
|
||||
buildInputs = [ gd ];
|
||||
|
||||
meta = {
|
||||
description = "Library for converting ANSI, ASCII, and other formats to PNG";
|
||||
homepage = "https://github.com/ansilove/libansilove";
|
||||
changelog = "https://github.com/ansilove/libansilove/blob/${src.rev}/ChangeLog";
|
||||
license = lib.licenses.bsd2;
|
||||
maintainers = with lib.maintainers; [ jethair ];
|
||||
mainProgram = "libansilove";
|
||||
platforms = lib.platforms.unix;
|
||||
};
|
||||
}
|
||||
@@ -4,6 +4,7 @@
|
||||
fetchFromGitHub,
|
||||
libarchive,
|
||||
iucode-tool,
|
||||
buildPackages,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
@@ -17,16 +18,13 @@ stdenv.mkDerivation rec {
|
||||
hash = "sha256-xasV1w6+8qnD+RLWsReMo+xm7a9nguV2st3IC4FURDU=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
iucode-tool
|
||||
libarchive
|
||||
];
|
||||
nativeBuildInputs = [ libarchive ];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out kernel/x86/microcode
|
||||
iucode_tool -w kernel/x86/microcode/GenuineIntel.bin intel-ucode/
|
||||
${stdenv.hostPlatform.emulator buildPackages} ${lib.getExe iucode-tool} -w kernel/x86/microcode/GenuineIntel.bin intel-ucode/
|
||||
touch -d @$SOURCE_DATE_EPOCH kernel/x86/microcode/GenuineIntel.bin
|
||||
echo kernel/x86/microcode/GenuineIntel.bin | bsdtar --uid 0 --gid 0 -cnf - -T - | bsdtar --null -cf - --format=newc @- > $out/intel-ucode.img
|
||||
|
||||
|
||||
@@ -1,72 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchurl,
|
||||
cmake,
|
||||
ninja,
|
||||
pkg-config,
|
||||
intltool,
|
||||
vala,
|
||||
wrapGAppsHook3,
|
||||
gcr,
|
||||
libpeas,
|
||||
gtk3,
|
||||
webkitgtk_4_0,
|
||||
sqlite,
|
||||
gsettings-desktop-schemas,
|
||||
libsoup_2_4,
|
||||
glib-networking,
|
||||
json-glib,
|
||||
libarchive,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "midori";
|
||||
version = "9.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/midori-browser/core/releases/download/v${version}/midori-v${version}.tar.gz";
|
||||
sha256 = "05i04qa83dnarmgkx4xsk6fga5lw1lmslh4rb3vhyyy4ala562jy";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
intltool
|
||||
ninja
|
||||
pkg-config
|
||||
vala
|
||||
wrapGAppsHook3
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
(libsoup_2_4.override { gnomeSupport = true; })
|
||||
gcr
|
||||
glib-networking
|
||||
gsettings-desktop-schemas
|
||||
gtk3
|
||||
libpeas
|
||||
sqlite
|
||||
webkitgtk_4_0
|
||||
json-glib
|
||||
libarchive
|
||||
];
|
||||
|
||||
passthru = {
|
||||
inherit gtk3;
|
||||
applicationName = "Midori";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "Lightweight WebKitGTK web browser";
|
||||
mainProgram = "midori";
|
||||
homepage = "https://github.com/midori-browser/core";
|
||||
license = with licenses; [ lgpl21Plus ];
|
||||
platforms = with platforms; linux;
|
||||
maintainers = with maintainers; [
|
||||
raskin
|
||||
ramkromberg
|
||||
];
|
||||
# https://github.com/NixOS/nixpkgs/issues/374354
|
||||
broken = true;
|
||||
};
|
||||
}
|
||||
@@ -7,16 +7,16 @@
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "mihomo";
|
||||
version = "1.19.6";
|
||||
version = "1.19.8";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "MetaCubeX";
|
||||
repo = "mihomo";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-eVqV7Dt6V4fAT0yGF8D7niZevMmX6WggSpA5J+LU7jY=";
|
||||
hash = "sha256-C8g2KhhXY11bqGKthNgiqdZwxoPVPhflhkh+X6JU33I=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-8LATtCrQs7rDiEWKep9xPlzKw413DpS1FGJsLiWriIQ=";
|
||||
vendorHash = "sha256-j97UFlcN8SfY6nireI6NDw8UcQuxyH34gue1Ywf25Yg=";
|
||||
|
||||
excludedPackages = [ "./test" ];
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ import json
|
||||
import logging
|
||||
import os
|
||||
import textwrap
|
||||
import uuid
|
||||
from concurrent.futures import ThreadPoolExecutor
|
||||
from datetime import datetime
|
||||
from importlib.resources import files
|
||||
@@ -9,7 +10,6 @@ from pathlib import Path
|
||||
from string import Template
|
||||
from subprocess import PIPE, CalledProcessError
|
||||
from typing import Final, Literal
|
||||
from uuid import uuid4
|
||||
|
||||
from . import tmpdir
|
||||
from .constants import WITH_NIX_2_18
|
||||
@@ -107,7 +107,7 @@ def build_remote(
|
||||
"--attr",
|
||||
build_attr.to_attr(attr),
|
||||
"--add-root",
|
||||
tmpdir.TMPDIR_PATH / uuid4().hex,
|
||||
tmpdir.TMPDIR_PATH / uuid.uuid4().hex,
|
||||
*dict_to_flags(instantiate_flags),
|
||||
],
|
||||
stdout=PIPE,
|
||||
@@ -127,7 +127,7 @@ def build_remote(
|
||||
"--realise",
|
||||
drv,
|
||||
"--add-root",
|
||||
remote_tmpdir / uuid4().hex,
|
||||
remote_tmpdir / uuid.uuid4().hex,
|
||||
*dict_to_flags(realise_flags),
|
||||
],
|
||||
remote=build_host,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import atexit
|
||||
import getpass
|
||||
import logging
|
||||
import os
|
||||
import re
|
||||
@@ -6,7 +7,6 @@ import shlex
|
||||
import subprocess
|
||||
from collections.abc import Sequence
|
||||
from dataclasses import dataclass
|
||||
from getpass import getpass
|
||||
from typing import Final, Self, TypedDict, Unpack
|
||||
|
||||
from . import tmpdir
|
||||
@@ -46,7 +46,7 @@ class Remote:
|
||||
cls._validate_opts(opts, ask_sudo_password)
|
||||
sudo_password = None
|
||||
if ask_sudo_password:
|
||||
sudo_password = getpass(f"[sudo] password for {host}: ")
|
||||
sudo_password = getpass.getpass(f"[sudo] password for {host}: ")
|
||||
return cls(host, opts, sudo_password)
|
||||
|
||||
@staticmethod
|
||||
|
||||
@@ -8,4 +8,8 @@ def get_qualified_name(
|
||||
) -> str:
|
||||
module_name = getattr(module, "__name__", method.__module__)
|
||||
method_name = getattr(method, "__qualname__", method.__name__)
|
||||
return f"{module_name}.{method_name}"
|
||||
name = f"{module_name}.{method_name}"
|
||||
assert name.startswith("nixos_rebuild"), (
|
||||
f"Non-internal module '{name}' called with 'get_qualified_name'"
|
||||
)
|
||||
return name
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import logging
|
||||
import os
|
||||
import textwrap
|
||||
import uuid
|
||||
from pathlib import Path
|
||||
@@ -126,8 +127,8 @@ def test_parse_args() -> None:
|
||||
]
|
||||
|
||||
|
||||
@patch.dict(nr.os.environ, {}, clear=True)
|
||||
@patch(get_qualified_name(nr.os.execve, nr.os), autospec=True)
|
||||
@patch.dict(os.environ, {}, clear=True)
|
||||
@patch("os.execve", autospec=True)
|
||||
@patch(get_qualified_name(nr.nix.build), autospec=True)
|
||||
def test_reexec(mock_build: Mock, mock_execve: Mock, monkeypatch: MonkeyPatch) -> None:
|
||||
monkeypatch.setattr(nr, "EXECUTABLE", "nixos-rebuild-ng")
|
||||
@@ -170,8 +171,8 @@ def test_reexec(mock_build: Mock, mock_execve: Mock, monkeypatch: MonkeyPatch) -
|
||||
)
|
||||
|
||||
|
||||
@patch.dict(nr.os.environ, {}, clear=True)
|
||||
@patch(get_qualified_name(nr.os.execve, nr.os), autospec=True)
|
||||
@patch.dict(os.environ, {}, clear=True)
|
||||
@patch("os.execve", autospec=True)
|
||||
@patch(get_qualified_name(nr.nix.build_flake), autospec=True)
|
||||
def test_reexec_flake(
|
||||
mock_build: Mock, mock_execve: Mock, monkeypatch: MonkeyPatch
|
||||
@@ -212,8 +213,8 @@ def test_reexec_flake(
|
||||
)
|
||||
|
||||
|
||||
@patch.dict(nr.process.os.environ, {}, clear=True)
|
||||
@patch(get_qualified_name(nr.process.subprocess.run), autospec=True)
|
||||
@patch.dict(os.environ, {}, clear=True)
|
||||
@patch("subprocess.run", autospec=True)
|
||||
def test_execute_nix_boot(mock_run: Mock, tmp_path: Path) -> None:
|
||||
nixpkgs_path = tmp_path / "nixpkgs"
|
||||
nixpkgs_path.mkdir()
|
||||
@@ -296,8 +297,8 @@ def test_execute_nix_boot(mock_run: Mock, tmp_path: Path) -> None:
|
||||
)
|
||||
|
||||
|
||||
@patch.dict(nr.process.os.environ, {}, clear=True)
|
||||
@patch(get_qualified_name(nr.process.subprocess.run), autospec=True)
|
||||
@patch.dict(os.environ, {}, clear=True)
|
||||
@patch("subprocess.run", autospec=True)
|
||||
def test_execute_nix_build_vm(mock_run: Mock, tmp_path: Path) -> None:
|
||||
config_path = tmp_path / "test"
|
||||
config_path.touch()
|
||||
@@ -345,8 +346,8 @@ def test_execute_nix_build_vm(mock_run: Mock, tmp_path: Path) -> None:
|
||||
)
|
||||
|
||||
|
||||
@patch.dict(nr.process.os.environ, {}, clear=True)
|
||||
@patch(get_qualified_name(nr.process.subprocess.run), autospec=True)
|
||||
@patch.dict(os.environ, {}, clear=True)
|
||||
@patch("subprocess.run", autospec=True)
|
||||
def test_execute_nix_build_image_flake(mock_run: Mock, tmp_path: Path) -> None:
|
||||
config_path = tmp_path / "test"
|
||||
config_path.touch()
|
||||
@@ -420,8 +421,8 @@ def test_execute_nix_build_image_flake(mock_run: Mock, tmp_path: Path) -> None:
|
||||
)
|
||||
|
||||
|
||||
@patch.dict(nr.process.os.environ, {}, clear=True)
|
||||
@patch(get_qualified_name(nr.process.subprocess.run), autospec=True)
|
||||
@patch.dict(os.environ, {}, clear=True)
|
||||
@patch("subprocess.run", autospec=True)
|
||||
def test_execute_nix_switch_flake(mock_run: Mock, tmp_path: Path) -> None:
|
||||
config_path = tmp_path / "test"
|
||||
config_path.touch()
|
||||
@@ -503,13 +504,13 @@ def test_execute_nix_switch_flake(mock_run: Mock, tmp_path: Path) -> None:
|
||||
)
|
||||
|
||||
|
||||
@patch.dict(nr.process.os.environ, {}, clear=True)
|
||||
@patch(get_qualified_name(nr.process.subprocess.run), autospec=True)
|
||||
@patch(get_qualified_name(nr.cleanup_ssh, nr), autospec=True)
|
||||
@patch(get_qualified_name(nr.nix.uuid4, nr.nix), autospec=True)
|
||||
@patch.dict(os.environ, {}, clear=True)
|
||||
@patch("subprocess.run", autospec=True)
|
||||
@patch("uuid.uuid4", autospec=True)
|
||||
@patch(get_qualified_name(nr.cleanup_ssh), autospec=True)
|
||||
def test_execute_nix_switch_build_target_host(
|
||||
mock_uuid4: Mock,
|
||||
mock_cleanup_ssh: Mock,
|
||||
mock_uuid4: Mock,
|
||||
mock_run: Mock,
|
||||
tmp_path: Path,
|
||||
) -> None:
|
||||
@@ -713,9 +714,9 @@ def test_execute_nix_switch_build_target_host(
|
||||
)
|
||||
|
||||
|
||||
@patch.dict(nr.process.os.environ, {}, clear=True)
|
||||
@patch(get_qualified_name(nr.process.subprocess.run), autospec=True)
|
||||
@patch(get_qualified_name(nr.cleanup_ssh, nr), autospec=True)
|
||||
@patch.dict(os.environ, {}, clear=True)
|
||||
@patch("subprocess.run", autospec=True)
|
||||
@patch(get_qualified_name(nr.cleanup_ssh), autospec=True)
|
||||
def test_execute_nix_switch_flake_target_host(
|
||||
mock_cleanup_ssh: Mock,
|
||||
mock_run: Mock,
|
||||
@@ -816,9 +817,9 @@ def test_execute_nix_switch_flake_target_host(
|
||||
)
|
||||
|
||||
|
||||
@patch.dict(nr.process.os.environ, {}, clear=True)
|
||||
@patch(get_qualified_name(nr.process.subprocess.run), autospec=True)
|
||||
@patch(get_qualified_name(nr.cleanup_ssh, nr), autospec=True)
|
||||
@patch.dict(os.environ, {}, clear=True)
|
||||
@patch("subprocess.run", autospec=True)
|
||||
@patch(get_qualified_name(nr.cleanup_ssh), autospec=True)
|
||||
def test_execute_nix_switch_flake_build_host(
|
||||
mock_cleanup_ssh: Mock,
|
||||
mock_run: Mock,
|
||||
@@ -927,7 +928,7 @@ def test_execute_nix_switch_flake_build_host(
|
||||
)
|
||||
|
||||
|
||||
@patch(get_qualified_name(nr.process.subprocess.run), autospec=True)
|
||||
@patch("subprocess.run", autospec=True)
|
||||
def test_execute_switch_rollback(mock_run: Mock, tmp_path: Path) -> None:
|
||||
nixpkgs_path = tmp_path / "nixpkgs"
|
||||
nixpkgs_path.touch()
|
||||
@@ -1004,7 +1005,7 @@ def test_execute_switch_rollback(mock_run: Mock, tmp_path: Path) -> None:
|
||||
)
|
||||
|
||||
|
||||
@patch(get_qualified_name(nr.process.subprocess.run), autospec=True)
|
||||
@patch("subprocess.run", autospec=True)
|
||||
def test_execute_build(mock_run: Mock, tmp_path: Path) -> None:
|
||||
config_path = tmp_path / "test"
|
||||
config_path.touch()
|
||||
@@ -1033,7 +1034,7 @@ def test_execute_build(mock_run: Mock, tmp_path: Path) -> None:
|
||||
)
|
||||
|
||||
|
||||
@patch(get_qualified_name(nr.process.subprocess.run), autospec=True)
|
||||
@patch("subprocess.run", autospec=True)
|
||||
def test_execute_test_flake(mock_run: Mock, tmp_path: Path) -> None:
|
||||
config_path = tmp_path / "test"
|
||||
config_path.touch()
|
||||
@@ -1082,9 +1083,9 @@ def test_execute_test_flake(mock_run: Mock, tmp_path: Path) -> None:
|
||||
)
|
||||
|
||||
|
||||
@patch(get_qualified_name(nr.process.subprocess.run), autospec=True)
|
||||
@patch(get_qualified_name(nr.nix.Path.exists, nr.nix), autospec=True, return_value=True)
|
||||
@patch(get_qualified_name(nr.nix.Path.mkdir, nr.nix), autospec=True)
|
||||
@patch("subprocess.run", autospec=True)
|
||||
@patch("pathlib.Path.exists", autospec=True, return_value=True)
|
||||
@patch("pathlib.Path.mkdir", autospec=True)
|
||||
def test_execute_test_rollback(
|
||||
mock_path_mkdir: Mock,
|
||||
mock_path_exists: Mock,
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import platform
|
||||
import subprocess
|
||||
from pathlib import Path
|
||||
from unittest.mock import Mock, patch
|
||||
@@ -77,7 +76,7 @@ def test_flake_to_attr() -> None:
|
||||
)
|
||||
|
||||
|
||||
@patch(get_qualified_name(platform.node), autospec=True)
|
||||
@patch("platform.node", autospec=True)
|
||||
def test_flake_from_arg(
|
||||
mock_node: Mock, monkeypatch: MonkeyPatch, tmpdir: Path
|
||||
) -> None:
|
||||
@@ -100,7 +99,7 @@ def test_flake_from_arg(
|
||||
|
||||
# None when we do not have /etc/nixos/flake.nix
|
||||
with patch(
|
||||
get_qualified_name(m.Path.exists, m),
|
||||
"pathlib.Path.exists",
|
||||
autospec=True,
|
||||
return_value=False,
|
||||
):
|
||||
@@ -109,17 +108,17 @@ def test_flake_from_arg(
|
||||
# None when we have a file in /etc/nixos/flake.nix
|
||||
with (
|
||||
patch(
|
||||
get_qualified_name(m.Path.exists, m),
|
||||
"pathlib.Path.exists",
|
||||
autospec=True,
|
||||
return_value=True,
|
||||
),
|
||||
patch(
|
||||
get_qualified_name(m.Path.is_symlink, m),
|
||||
"pathlib.Path.is_symlink",
|
||||
autospec=True,
|
||||
return_value=False,
|
||||
),
|
||||
patch(
|
||||
get_qualified_name(m.discover_git, m),
|
||||
get_qualified_name(m.discover_git),
|
||||
autospec=True,
|
||||
return_value="/etc/nixos",
|
||||
),
|
||||
@@ -130,17 +129,17 @@ def test_flake_from_arg(
|
||||
|
||||
with (
|
||||
patch(
|
||||
get_qualified_name(m.Path.exists, m),
|
||||
"pathlib.Path.exists",
|
||||
autospec=True,
|
||||
return_value=True,
|
||||
),
|
||||
patch(
|
||||
get_qualified_name(m.Path.is_symlink, m),
|
||||
"pathlib.Path.is_symlink",
|
||||
autospec=True,
|
||||
return_value=True,
|
||||
),
|
||||
patch(
|
||||
get_qualified_name(m.Path.resolve, m),
|
||||
"pathlib.Path.resolve",
|
||||
autospec=True,
|
||||
return_value=Path("/path/to/flake.nix"),
|
||||
),
|
||||
@@ -151,7 +150,7 @@ def test_flake_from_arg(
|
||||
|
||||
with (
|
||||
patch(
|
||||
get_qualified_name(m.subprocess.run),
|
||||
"subprocess.run",
|
||||
autospec=True,
|
||||
return_value=subprocess.CompletedProcess([], 0, "remote-hostname\n"),
|
||||
),
|
||||
@@ -161,7 +160,7 @@ def test_flake_from_arg(
|
||||
)
|
||||
|
||||
|
||||
@patch(get_qualified_name(m.Path.mkdir, m), autospec=True)
|
||||
@patch("pathlib.Path.mkdir", autospec=True)
|
||||
def test_profile_from_arg(mock_mkdir: Mock) -> None:
|
||||
assert m.Profile.from_arg("system") == m.Profile(
|
||||
"system",
|
||||
|
||||
@@ -78,7 +78,7 @@ def test_build_flake(mock_run: Mock, monkeypatch: MonkeyPatch, tmpdir: Path) ->
|
||||
|
||||
|
||||
@patch(get_qualified_name(n.run_wrapper, n), autospec=True)
|
||||
@patch(get_qualified_name(n.uuid4, n), autospec=True)
|
||||
@patch("uuid.uuid4", autospec=True)
|
||||
def test_build_remote(
|
||||
mock_uuid4: Mock, mock_run: Mock, monkeypatch: MonkeyPatch
|
||||
) -> None:
|
||||
@@ -809,7 +809,7 @@ def test_switch_to_configuration_with_systemd_run(
|
||||
|
||||
|
||||
@patch(
|
||||
get_qualified_name(n.Path.glob, n),
|
||||
"pathlib.Path.glob",
|
||||
autospec=True,
|
||||
return_value=[
|
||||
Path("/nix/var/nix/profiles/per-user/root/channels/nixos"),
|
||||
@@ -817,7 +817,7 @@ def test_switch_to_configuration_with_systemd_run(
|
||||
Path("/nix/var/nix/profiles/per-user/root/channels/home-manager"),
|
||||
],
|
||||
)
|
||||
@patch(get_qualified_name(n.Path.is_dir, n), autospec=True, return_value=True)
|
||||
@patch("pathlib.Path.is_dir", autospec=True, return_value=True)
|
||||
def test_upgrade_channels(mock_is_dir: Mock, mock_glob: Mock) -> None:
|
||||
with patch(get_qualified_name(n.run_wrapper, n), autospec=True) as mock_run:
|
||||
n.upgrade_channels(False)
|
||||
|
||||
@@ -6,10 +6,8 @@ from pytest import MonkeyPatch
|
||||
import nixos_rebuild.models as m
|
||||
import nixos_rebuild.process as p
|
||||
|
||||
from .helpers import get_qualified_name
|
||||
|
||||
|
||||
@patch(get_qualified_name(p.subprocess.run), autospec=True)
|
||||
@patch("subprocess.run", autospec=True)
|
||||
def test_run(mock_run: Any) -> None:
|
||||
p.run_wrapper(["test", "--with", "flags"], check=True)
|
||||
mock_run.assert_called_with(
|
||||
@@ -96,7 +94,7 @@ def test_run(mock_run: Any) -> None:
|
||||
)
|
||||
|
||||
|
||||
@patch(get_qualified_name(p.subprocess.run), autospec=True)
|
||||
@patch("subprocess.run", autospec=True)
|
||||
def test__kill_long_running_ssh_process(mock_run: Any) -> None:
|
||||
p._kill_long_running_ssh_process(
|
||||
[
|
||||
@@ -135,9 +133,7 @@ def test_remote_from_name(monkeypatch: MonkeyPatch) -> None:
|
||||
sudo_password=None,
|
||||
)
|
||||
|
||||
# get_qualified_name doesn't work because getpass is aliased to another
|
||||
# function
|
||||
with patch(f"{p.__name__}.getpass", autospec=True, return_value="password"):
|
||||
with patch("getpass.getpass", autospec=True, return_value="password"):
|
||||
monkeypatch.setenv("NIX_SSHOPTS", "-f foo -b bar -t")
|
||||
assert m.Remote.from_arg("user@localhost", True, True) == m.Remote(
|
||||
"user@localhost",
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
{
|
||||
stdenvNoCC,
|
||||
lib,
|
||||
opencloud,
|
||||
pnpm_10,
|
||||
nodejs,
|
||||
}:
|
||||
|
||||
stdenvNoCC.mkDerivation (finalAttrs: {
|
||||
pname = "opencloud-idp-web";
|
||||
|
||||
inherit (opencloud) version src;
|
||||
|
||||
pnpmRoot = "services/idp";
|
||||
|
||||
pnpmDeps = pnpm_10.fetchDeps {
|
||||
inherit (finalAttrs) pname version src;
|
||||
sourceRoot = "${finalAttrs.src.name}/${finalAttrs.pnpmRoot}";
|
||||
hash = "sha256-gFhWDYk3DcwUowZ9AQjCqHZL1oniK3YCNiG1cDGabYg=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
nodejs
|
||||
pnpm_10.configHook
|
||||
];
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
cd $pnpmRoot
|
||||
pnpm build
|
||||
mkdir -p assets/identifier/static
|
||||
cp -v src/images/favicon.svg assets/identifier/static/favicon.svg
|
||||
cp -v src/images/icon-lilac.svg assets/identifier/static/icon-lilac.svg
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
mkdir $out
|
||||
cp -r assets $out
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "OpenCloud - IDP Web UI";
|
||||
homepage = "https://github.com/opencloud-eu/opencloud";
|
||||
changelog = "https://github.com/opencloud-eu/opencloud/blob/v${finalAttrs.src.rev}/CHANGELOG.md";
|
||||
license = lib.licenses.asl20;
|
||||
maintainers = with lib.maintainers; [
|
||||
christoph-heiss
|
||||
k900
|
||||
];
|
||||
platforms = lib.platforms.all;
|
||||
};
|
||||
})
|
||||
@@ -0,0 +1,119 @@
|
||||
{
|
||||
lib,
|
||||
callPackage,
|
||||
buildGoModule,
|
||||
fetchFromGitHub,
|
||||
ncurses,
|
||||
gettext,
|
||||
pigeon,
|
||||
go-mockery,
|
||||
protoc-go-inject-tag,
|
||||
libxcrypt,
|
||||
vips,
|
||||
pkg-config,
|
||||
nixosTests,
|
||||
nix-update-script,
|
||||
versionCheckHook,
|
||||
}:
|
||||
|
||||
let
|
||||
bingoBinsMakefile = builtins.concatStringsSep "\n" (
|
||||
lib.mapAttrsToList (n: v: "${n} := ${v}\n\\$(${n}):") {
|
||||
GO_XGETTEXT = "xgettext";
|
||||
MOCKERY = "mockery";
|
||||
PIGEON = "pigeon";
|
||||
PROTOC_GO_INJECT_TAG = "protoc-go-inject-tag";
|
||||
}
|
||||
);
|
||||
in
|
||||
buildGoModule rec {
|
||||
pname = "opencloud";
|
||||
version = "2.3.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "opencloud-eu";
|
||||
repo = "opencloud";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-IIasFyKF28ynYi8bAmx8LddF0OWB1/Hji6Ovp5pm9QE=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
echo "${bingoBinsMakefile}" >.bingo/Variables.mk
|
||||
|
||||
# tries to build web assets, done separately
|
||||
substituteInPlace services/idp/Makefile \
|
||||
--replace-fail 'node-generate-prod: assets' 'node-generate-prod:'
|
||||
# tries to download something web assets ..
|
||||
substituteInPlace services/web/Makefile \
|
||||
--replace-fail 'node-generate-prod: download-assets' 'node-generate-prod:'
|
||||
|
||||
# tries to build some random binaries off the internet and
|
||||
# no need to build protobuf bindings anyway, as they are in-repo already
|
||||
sed -i -e '/\$(BINGO) get/d' -e '/\$(BUF) generate/d' .make/protobuf.mk
|
||||
'';
|
||||
|
||||
vendorHash = null;
|
||||
|
||||
preConfigure = ''
|
||||
export HOME=$(mktemp -d)
|
||||
make generate
|
||||
'';
|
||||
|
||||
ldflags = [
|
||||
"-s"
|
||||
"-w"
|
||||
"-X"
|
||||
"github.com/opencloud-eu/opencloud/pkg/version.String=nixos"
|
||||
"-X"
|
||||
"github.com/opencloud-eu/opencloud/pkg/version.Tag=${version}"
|
||||
"-X"
|
||||
"github.com/opencloud-eu/opencloud/pkg/version.Date=19700101"
|
||||
];
|
||||
|
||||
tags = [ "enable_vips" ];
|
||||
|
||||
nativeBuildInputs = [
|
||||
ncurses
|
||||
gettext
|
||||
pigeon
|
||||
go-mockery
|
||||
protoc-go-inject-tag
|
||||
pkg-config
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
libxcrypt
|
||||
vips
|
||||
];
|
||||
|
||||
env = {
|
||||
# avoids 'make generate' calling `git`, otherwise no-op
|
||||
STRING = version;
|
||||
VERSION = version;
|
||||
};
|
||||
|
||||
excludedPackages = [ "tests/*" ];
|
||||
|
||||
passthru = {
|
||||
web = callPackage ./web.nix { };
|
||||
idp-web = callPackage ./idp-web.nix { };
|
||||
tests = { inherit (nixosTests) opencloud; };
|
||||
updateScript = nix-update-script { };
|
||||
};
|
||||
|
||||
doInstallCheck = true;
|
||||
nativeInstallCheckInputs = [ versionCheckHook ];
|
||||
versionCheckProgramArg = [ "version" ];
|
||||
|
||||
meta = {
|
||||
description = "OpenCloud gives you a secure and private way to store, access, and share your files.";
|
||||
homepage = "https://github.com/opencloud-eu/opencloud";
|
||||
changelog = "https://github.com/opencloud-eu/opencloud/blob/v${version}/CHANGELOG.md";
|
||||
license = lib.licenses.asl20;
|
||||
maintainers = with lib.maintainers; [
|
||||
christoph-heiss
|
||||
k900
|
||||
];
|
||||
mainProgram = "opencloud";
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
{
|
||||
lib,
|
||||
stdenvNoCC,
|
||||
fetchFromGitHub,
|
||||
nodejs,
|
||||
pnpm_10,
|
||||
nix-update-script,
|
||||
}:
|
||||
|
||||
stdenvNoCC.mkDerivation (finalAttrs: {
|
||||
pname = "opencloud-web";
|
||||
version = "2.4.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "opencloud-eu";
|
||||
repo = "web";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-64Dwkx5IEwlaIX1z6Roi6cSWB2ETBldQcNWxgWiUX18=";
|
||||
};
|
||||
|
||||
pnpmDeps = pnpm_10.fetchDeps {
|
||||
inherit (finalAttrs) pname version src;
|
||||
hash = "sha256-UKgtthdRnI+iR4Qn07nabQOzWZFATjIfrQfwxhKJkx8=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
nodejs
|
||||
pnpm_10.configHook
|
||||
];
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
pnpm build
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
mkdir $out
|
||||
cp -r dist/* $out
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
passthru.updateScript = nix-update-script { };
|
||||
|
||||
meta = {
|
||||
description = "Web UI for OpenCloud built with Vue.js and TypeScript";
|
||||
homepage = "https://github.com/opencloud-eu/web";
|
||||
changelog = "https://github.com/opencloud-eu/web/blob/${finalAttrs.version}/CHANGELOG.md";
|
||||
license = lib.licenses.agpl3Only;
|
||||
maintainers = with lib.maintainers; [
|
||||
christoph-heiss
|
||||
k900
|
||||
];
|
||||
platforms = lib.platforms.all;
|
||||
};
|
||||
})
|
||||
@@ -97,6 +97,5 @@ stdenv.mkDerivation rec {
|
||||
prusnak
|
||||
];
|
||||
platforms = platforms.unix ++ platforms.windows;
|
||||
broken = stdenv.hostPlatform.isDarwin;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -37,6 +37,6 @@ stdenv.mkDerivation rec {
|
||||
'';
|
||||
homepage = "https://github.com/cruegge/pam-gnupg";
|
||||
license = licenses.gpl3;
|
||||
maintainers = with maintainers; [ mtreca ];
|
||||
maintainers = with maintainers; [ ];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ rustPlatform.buildRustPackage rec {
|
||||
homepage = "https://github.com/matiaskorhonen/paper-age";
|
||||
changelog = "https://github.com/matiaskorhonen/paper-age/blob/${src.rev}/CHANGELOG.md";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ tomfitzhenry ];
|
||||
maintainers = [ ];
|
||||
mainProgram = "paper-age";
|
||||
};
|
||||
}
|
||||
|
||||
@@ -3,12 +3,21 @@
|
||||
stdenv,
|
||||
fetchFromGitLab,
|
||||
gradle_8,
|
||||
jre,
|
||||
jre_headless,
|
||||
jre_minimal,
|
||||
runtimeShell,
|
||||
}:
|
||||
let
|
||||
# "Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0."
|
||||
gradle = gradle_8;
|
||||
|
||||
jre = jre_minimal.override {
|
||||
modules = [
|
||||
"java.base"
|
||||
"java.desktop"
|
||||
];
|
||||
jdk = jre_headless;
|
||||
};
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "pdftk";
|
||||
|
||||
@@ -20,17 +20,17 @@
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "pdns-recursor";
|
||||
version = "5.1.2";
|
||||
version = "5.2.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://downloads.powerdns.com/releases/pdns-recursor-${finalAttrs.version}.tar.bz2";
|
||||
hash = "sha256-s6N+uyAoWrmsu7DhNw5iO7OY7TCH8OZ48j/6OwBjmD0=";
|
||||
hash = "sha256-+clSdCMe48XJQZf20FAR1Vq/BrKTdTW6jnjiTqT7vW4=";
|
||||
};
|
||||
|
||||
cargoDeps = rustPlatform.fetchCargoVendor {
|
||||
inherit (finalAttrs) src;
|
||||
sourceRoot = "pdns-recursor-${finalAttrs.version}/settings/rust";
|
||||
hash = "sha256-/fxFqs5lDzOhatc6KBc7Zwsq3A7N5AOanGOebttr1l8=";
|
||||
hash = "sha256-A3NX1zj9+9qCLTkfca3v8Rr8oc/zL/Ruknjl3g1aMG4=";
|
||||
};
|
||||
|
||||
cargoRoot = "settings/rust";
|
||||
@@ -38,10 +38,10 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
nativeBuildInputs = [
|
||||
cargo
|
||||
rustc
|
||||
|
||||
rustPlatform.cargoSetupHook
|
||||
pkg-config
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
boost
|
||||
openssl
|
||||
@@ -67,14 +67,14 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
inherit (nixosTests) pdns-recursor ncdns;
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
description = "Recursive DNS server";
|
||||
homepage = "https://www.powerdns.com/";
|
||||
platforms = platforms.linux;
|
||||
platforms = lib.platforms.linux;
|
||||
badPlatforms = [
|
||||
"i686-linux" # a 64-bit time_t is needed
|
||||
];
|
||||
license = licenses.gpl2Only;
|
||||
maintainers = with maintainers; [ rnhmjoj ];
|
||||
license = lib.licenses.gpl2Only;
|
||||
maintainers = with lib.maintainers; [ rnhmjoj ];
|
||||
};
|
||||
})
|
||||
|
||||
@@ -13,18 +13,18 @@
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "pict-rs";
|
||||
version = "0.5.16";
|
||||
version = "0.5.19";
|
||||
|
||||
src = fetchFromGitea {
|
||||
domain = "git.asonix.dog";
|
||||
owner = "asonix";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-q0h+H3260CSpZemVuyaiwSHDi8yKXUX8Df9ih3IzAWo=";
|
||||
sha256 = "sha256-ifuN3Kb7Hhq8H/eoZcumO5yyrxOCA+nWQQvAdFk7w2Q=";
|
||||
};
|
||||
|
||||
useFetchCargoVendor = true;
|
||||
cargoHash = "sha256-JJB5d9N2/tu2SYudNNguQGocQdyFAMvBea/Q3V7pYOw=";
|
||||
cargoHash = "sha256-wZRWusETLl32BJy5lza4Bvix500VkpXLUpQb5aO8yJ0=";
|
||||
|
||||
# needed for internal protobuf c wrapper library
|
||||
PROTOC = "${protobuf}/bin/protoc";
|
||||
|
||||
@@ -8,13 +8,13 @@
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "prometheus-klipper-exporter";
|
||||
version = "0.12.0";
|
||||
version = "0.13.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "scross01";
|
||||
repo = "prometheus-klipper-exporter";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-OlNUBdCizMOSb7WEtu00LaHYSXLSPlISVJD/0rHujnY=";
|
||||
sha256 = "sha256-zNRjD2YO7OfcNXF5pukXChxhC5LB88C1EKfiMreMzTs=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-0nbLHZ2WMLMK0zKZuUYz355K01Xspn9svmlFCtQjed0=";
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
# Generated by ./update.sh - do not update manually!
|
||||
# Last updated: 2025-05-03
|
||||
# Last updated: 2025-05-19
|
||||
{
|
||||
version = "3.2.17-2025.4.29";
|
||||
amd64_url = "https://dldir1.qq.com/qqfile/qq/QQNT/Linux/QQ_3.2.17_250429_amd64_01.deb";
|
||||
arm64_url = "https://dldir1.qq.com/qqfile/qq/QQNT/Linux/QQ_3.2.17_250429_arm64_01.deb";
|
||||
arm64_hash = "sha256-BxyJ9NNdMck3qk8wzCd07x/W9QlTMemHi3l0TIQ04ZY=";
|
||||
amd64_hash = "sha256-DDqLHl8Ig7miZTheRltBq+riLXyGGnW8NtcOI0PgKtc=";
|
||||
version = "3.2.17-2025.5.19";
|
||||
amd64_url = "https://dldir1.qq.com/qqfile/qq/QQNT/Linux/QQ_3.2.17_250519_amd64_01.deb";
|
||||
arm64_url = "https://dldir1.qq.com/qqfile/qq/QQNT/Linux/QQ_3.2.17_250519_arm64_01.deb";
|
||||
arm64_hash = "sha256-IGwcZfxePhhu46ARCML/TgVCC2QrIqsd6sh5As30JBY=";
|
||||
amd64_hash = "sha256-kCA5MmLHumCJqQ959L3wXO9bX5mzhowyrRxy5LRocfY=";
|
||||
}
|
||||
|
||||
@@ -12,19 +12,19 @@
|
||||
|
||||
stdenvNoCC.mkDerivation (finalAttrs: {
|
||||
pname = "raycast";
|
||||
version = "1.98.0";
|
||||
version = "1.99.0";
|
||||
|
||||
src =
|
||||
{
|
||||
aarch64-darwin = fetchurl {
|
||||
name = "Raycast.dmg";
|
||||
url = "https://releases.raycast.com/releases/${finalAttrs.version}/download?build=arm";
|
||||
hash = "sha256-cHTGXuzi7YVAPeeMHugL7uvR9BHJ5xR7I9NE63H3vcg=";
|
||||
hash = "sha256-5TMVwZ912+r0OP2NeBc53FOkanaRHJgw+P+JbtdBsKg=";
|
||||
};
|
||||
x86_64-darwin = fetchurl {
|
||||
name = "Raycast.dmg";
|
||||
url = "https://releases.raycast.com/releases/${finalAttrs.version}/download?build=x86_64";
|
||||
hash = "sha256-KYMjr8SA8a0B19hmdsKLLz+smBpB687e+BLRRCRM+AM=";
|
||||
hash = "sha256-fhW/qQksn69ri7dLwMerRsktZ3Ykn5qmlNkWZ2piN58=";
|
||||
};
|
||||
}
|
||||
.${stdenvNoCC.system} or (throw "raycast: ${stdenvNoCC.system} is unsupported.");
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
libsecret,
|
||||
libportal-gtk3,
|
||||
gsettings-desktop-schemas,
|
||||
libheif,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
@@ -87,6 +88,18 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
libportal-gtk3
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
# Pull in HEIF support.
|
||||
# In postInstall to run before gappsWrapperArgsHook.
|
||||
export GDK_PIXBUF_MODULE_FILE="${
|
||||
gnome._gdkPixbufCacheBuilder_DO_NOT_USE {
|
||||
extraLoaders = [
|
||||
libheif.out
|
||||
];
|
||||
}
|
||||
}"
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
updateScript = gnome.updateScript {
|
||||
packageName = "shotwell";
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
sqlite,
|
||||
foundationdb,
|
||||
zstd,
|
||||
rust-jemalloc-sys,
|
||||
stdenv,
|
||||
nix-update-script,
|
||||
nixosTests,
|
||||
@@ -43,6 +44,7 @@ rustPlatform.buildRustPackage rec {
|
||||
openssl
|
||||
sqlite
|
||||
zstd
|
||||
rust-jemalloc-sys
|
||||
] ++ lib.optionals (stdenv.hostPlatform.isLinux && withFoundationdb) [ foundationdb ];
|
||||
|
||||
# Issue: https://github.com/stalwartlabs/mail-server/issues/1104
|
||||
|
||||
@@ -93,6 +93,6 @@ stdenv.mkDerivation rec {
|
||||
'';
|
||||
homepage = "https://github.com/eclipse/sumo";
|
||||
license = licenses.epl20;
|
||||
maintainers = with maintainers; [ mtreca ];
|
||||
maintainers = with maintainers; [ ];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -17,18 +17,18 @@ assert lib.asserts.assertMsg (
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "synapse-admin-etkecc";
|
||||
version = "0.10.4-etke41";
|
||||
version = "0.11.0-etke42";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "etkecc";
|
||||
repo = "synapse-admin";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-LHZtB6139sV2HdbIKCZruwH1G5+8iTfKXwjjo4gbNcI=";
|
||||
hash = "sha256-HWhyG/dVP9M84OOYH95RPLqiXDYOs+QOxwLM8pPl1vA=";
|
||||
};
|
||||
|
||||
yarnOfflineCache = fetchYarnDeps {
|
||||
yarnLock = finalAttrs.src + "/yarn.lock";
|
||||
hash = "sha256-wdnmsz41rIu8HvsoVHSW8PZLwtmwpz+YSeeDs1GT/vA=";
|
||||
hash = "sha256-GO5m+7fcm/XO38XlsQq6fwKslzdZkE6WleP3GHNKuPU=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
||||
@@ -146,7 +146,6 @@ buildGoModule rec {
|
||||
homepage = "https://tinygo.org/";
|
||||
description = "Go compiler for small places";
|
||||
license = licenses.bsd3;
|
||||
broken = stdenv.hostPlatform.isDarwin;
|
||||
maintainers = with maintainers; [
|
||||
Madouura
|
||||
muscaln
|
||||
|
||||
@@ -57,6 +57,6 @@ stdenv.mkDerivation rec {
|
||||
homepage = "https://github.com/tpm2-software/tpm2-tools";
|
||||
license = licenses.bsd3;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ tomfitzhenry ];
|
||||
maintainers = [ ];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -6,13 +6,13 @@
|
||||
}:
|
||||
buildGoModule rec {
|
||||
pname = "treefmt";
|
||||
version = "2.3.0";
|
||||
version = "2.3.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "numtide";
|
||||
repo = "treefmt";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-tDezwRWEfPz+u/i9Wz7MZULMmmIUwnl+5gcFU+dDj6Y=";
|
||||
hash = "sha256-Z1AGLaGrRrUd75aQJc/UKwzMGb9gI/p5WxQ5XUgp98o=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-9yAvqz99YlBfFU/hGs1PB/sH0iOyWaVadqGhfXMkj5E=";
|
||||
|
||||
@@ -21,7 +21,7 @@ udevCheckHook() {
|
||||
echo Finished udevCheckPhase
|
||||
}
|
||||
|
||||
if [[ -z "${dontUdevCheck-}" ]]; then
|
||||
if [[ -z "${dontUdevCheck-}" && -n "@udevadm@" ]]; then
|
||||
echo "Using udevCheckHook"
|
||||
preInstallCheckHooks+=(udevCheckHook)
|
||||
fi
|
||||
|
||||
@@ -2,12 +2,20 @@
|
||||
lib,
|
||||
makeSetupHook,
|
||||
systemdMinimal,
|
||||
udev,
|
||||
stdenv,
|
||||
}:
|
||||
|
||||
let
|
||||
# udev rules can only be checked if systemd (specifically, 'udevadm') can be executed on build platform
|
||||
# if udev is not available on hostPlatform, there is no point in checking rules
|
||||
applyHook =
|
||||
lib.meta.availableOn stdenv.hostPlatform udev
|
||||
&& lib.meta.availableOn stdenv.buildPlatform systemdMinimal;
|
||||
in
|
||||
makeSetupHook {
|
||||
name = "udev-check-hook";
|
||||
substitutions = {
|
||||
udevadm = lib.getExe' systemdMinimal "udevadm";
|
||||
udevadm = if applyHook then lib.getExe' systemdMinimal "udevadm" else "";
|
||||
};
|
||||
meta = {
|
||||
description = "check validity of udev rules in outputs";
|
||||
|
||||
@@ -33,28 +33,44 @@
|
||||
unzip,
|
||||
}:
|
||||
|
||||
let
|
||||
# base - versions
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "vmware-workstation";
|
||||
version = "17.6.3";
|
||||
build = "24583834";
|
||||
|
||||
# macOS - versions
|
||||
unlockerVersion = "3.0.5";
|
||||
|
||||
# macOS - Unlocker
|
||||
unlockerSrc = fetchFromGitHub {
|
||||
owner = "paolo-projects";
|
||||
repo = "unlocker";
|
||||
rev = "${unlockerVersion}";
|
||||
sha256 = "sha256-JSEW1gqQuLGRkathlwZU/TnG6dL/xWKW4//SfE+kO0A=";
|
||||
src = requireFile {
|
||||
name = "VMware-Workstation-Full-${finalAttrs.version}-${finalAttrs.build}.x86_64.bundle";
|
||||
url = "https://support.broadcom.com/group/ecx/productdownloads?subfamily=VMware%20Workstation%20Pro&freeDownloads=true";
|
||||
hash = "sha256-eVdZF3KN7UxtC4n0q2qBvpp3PADuto0dEqwNsSVHjuA=";
|
||||
};
|
||||
|
||||
vmware-unpack-env = buildFHSEnv {
|
||||
pname = "vmware-unpack-env";
|
||||
inherit version;
|
||||
inherit (finalAttrs) version;
|
||||
targetPkgs = pkgs: [ zlib ];
|
||||
};
|
||||
|
||||
unpackPhase = ''
|
||||
${finalAttrs.vmware-unpack-env}/bin/vmware-unpack-env -c "sh ${finalAttrs.src} --extract unpacked"
|
||||
'';
|
||||
|
||||
macOSUnlockerSrc = fetchFromGitHub {
|
||||
owner = "paolo-projects";
|
||||
repo = "unlocker";
|
||||
tag = "3.0.5";
|
||||
hash = "sha256-JSEW1gqQuLGRkathlwZU/TnG6dL/xWKW4//SfE+kO0A=";
|
||||
};
|
||||
|
||||
postPatch = lib.optionalString enableMacOSGuests ''
|
||||
cp -R "${finalAttrs.macOSUnlockerSrc}" unlocker/
|
||||
|
||||
substituteInPlace unlocker/unlocker.py --replace \
|
||||
"/usr/lib/vmware/bin/" "$out/lib/vmware/bin"
|
||||
|
||||
substituteInPlace unlocker/unlocker.py --replace \
|
||||
"/usr/lib/vmware/lib/libvmwarebase.so/libvmwarebase.so" "$out/lib/vmware/lib/libvmwarebase.so/libvmwarebase.so"
|
||||
'';
|
||||
|
||||
readline70_compat63 = symlinkJoin {
|
||||
name = "readline70_compat63";
|
||||
paths = [ readline70 ];
|
||||
@@ -62,10 +78,20 @@ let
|
||||
ln -s $out/lib/libreadline.so $out/lib/libreadline.so.6
|
||||
'';
|
||||
};
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "vmware-workstation";
|
||||
inherit version build;
|
||||
|
||||
nativeBuildInputs =
|
||||
[
|
||||
python3
|
||||
finalAttrs.vmware-unpack-env
|
||||
autoPatchelfHook
|
||||
makeWrapper
|
||||
]
|
||||
++ lib.optionals enableInstaller [
|
||||
bzip2
|
||||
sqlite
|
||||
finalAttrs.readline70_compat63
|
||||
]
|
||||
++ lib.optionals enableMacOSGuests [ unzip ];
|
||||
|
||||
buildInputs = [
|
||||
libxslt
|
||||
@@ -99,40 +125,6 @@ stdenv.mkDerivation rec {
|
||||
xorg.libXtst
|
||||
];
|
||||
|
||||
nativeBuildInputs =
|
||||
[
|
||||
python3
|
||||
vmware-unpack-env
|
||||
autoPatchelfHook
|
||||
makeWrapper
|
||||
]
|
||||
++ lib.optionals enableInstaller [
|
||||
bzip2
|
||||
sqlite
|
||||
readline70_compat63
|
||||
]
|
||||
++ lib.optionals enableMacOSGuests [ unzip ];
|
||||
|
||||
src = requireFile {
|
||||
name = "VMware-Workstation-Full-${version}-${build}.x86_64.bundle";
|
||||
url = "https://support.broadcom.com/group/ecx/productdownloads?subfamily=VMware%20Workstation%20Pro&freeDownloads=true";
|
||||
hash = "sha256-eVdZF3KN7UxtC4n0q2qBvpp3PADuto0dEqwNsSVHjuA=";
|
||||
};
|
||||
|
||||
unpackPhase = ''
|
||||
${vmware-unpack-env}/bin/vmware-unpack-env -c "sh ${src} --extract unpacked"
|
||||
'';
|
||||
|
||||
postPatch = lib.optionalString enableMacOSGuests ''
|
||||
cp -R "${unlockerSrc}" unlocker/
|
||||
|
||||
substituteInPlace unlocker/unlocker.py --replace \
|
||||
"/usr/lib/vmware/bin/" "$out/lib/vmware/bin"
|
||||
|
||||
substituteInPlace unlocker/unlocker.py --replace \
|
||||
"/usr/lib/vmware/lib/libvmwarebase.so/libvmwarebase.so" "$out/lib/vmware/lib/libvmwarebase.so/libvmwarebase.so"
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
@@ -167,7 +159,7 @@ stdenv.mkDerivation rec {
|
||||
cp ${./vmware-installer-bootstrap} $out/etc/vmware-installer/bootstrap
|
||||
sed -i -e "s,@@INSTALLERDIR@@,$dest," $out/etc/vmware-installer/bootstrap
|
||||
sed -i -e "s,@@IVERSION@@,$vmware_installer_version," $out/etc/vmware-installer/bootstrap
|
||||
sed -i -e "s,@@BUILD@@,${build}," $out/etc/vmware-installer/bootstrap
|
||||
sed -i -e "s,@@BUILD@@,${finalAttrs.build}," $out/etc/vmware-installer/bootstrap
|
||||
|
||||
# create database of vmware guest tools (avoids vmware fetching them later)
|
||||
mkdir -p $out/etc/vmware-installer/components
|
||||
@@ -181,7 +173,7 @@ stdenv.mkDerivation rec {
|
||||
component_version=$(cat unpacked/$component/manifest.xml | grep -oPm1 "(?<=<version>)[^<]+")
|
||||
component_core_id=$([ "$component" == "vmware-installer" ] && echo "-1" || echo "1")
|
||||
type=$([ "$component" == "vmware-workstation" ] && echo "0" || echo "1")
|
||||
sqlite3 "$database_filename" "INSERT INTO components(name,version,buildNumber,component_core_id,longName,description,type) VALUES('$component','$component_version',${build},$component_core_id,'$component','$component',$type);"
|
||||
sqlite3 "$database_filename" "INSERT INTO components(name,version,buildNumber,component_core_id,longName,description,type) VALUES('$component','$component_version',${finalAttrs.build},$component_core_id,'$component','$component',$type);"
|
||||
mkdir -p $out/etc/vmware-installer/components/$component
|
||||
cp -r $folder/* $out/etc/vmware-installer/components/$component
|
||||
done
|
||||
@@ -195,8 +187,8 @@ stdenv.mkDerivation rec {
|
||||
## VMware Config
|
||||
echo "Installing VMware Config"
|
||||
cp ${./vmware-config} $out/etc/vmware/config
|
||||
sed -i -e "s,@@VERSION@@,${version}," $out/etc/vmware/config
|
||||
sed -i -e "s,@@BUILD@@,${build}," $out/etc/vmware/config
|
||||
sed -i -e "s,@@VERSION@@,${finalAttrs.version}," $out/etc/vmware/config
|
||||
sed -i -e "s,@@BUILD@@,${finalAttrs.build}," $out/etc/vmware/config
|
||||
sed -i -e "s,@@PREFIXDIR@@,$out," $out/etc/vmware/config
|
||||
|
||||
## VMware VMX
|
||||
@@ -378,16 +370,17 @@ stdenv.mkDerivation rec {
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
description = "Industry standard desktop hypervisor for x86-64 architecture";
|
||||
homepage = "https://www.vmware.com/products/workstation-pro.html";
|
||||
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
|
||||
license = licenses.unfree;
|
||||
homepage = "https://www.vmware.com/products/desktop-hypervisor/workstation-and-fusion";
|
||||
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
|
||||
license = lib.licenses.unfree;
|
||||
platforms = [ "x86_64-linux" ];
|
||||
maintainers = with maintainers; [
|
||||
mainProgram = "vmware";
|
||||
maintainers = with lib.maintainers; [
|
||||
cawilliamson
|
||||
deinferno
|
||||
vifino
|
||||
];
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
@@ -22,7 +22,7 @@ rustPlatform.buildRustPackage rec {
|
||||
description = "Execute a program when a Wayland compositor reports being N seconds idle";
|
||||
homepage = "https://git.sr.ht/~whynothugo/wayidle";
|
||||
license = licenses.isc;
|
||||
maintainers = with maintainers; [ tomfitzhenry ];
|
||||
maintainers = [ ];
|
||||
mainProgram = "wayidle";
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
}:
|
||||
mkYaziPlugin {
|
||||
pname = "mediainfo.yazi";
|
||||
version = "25.2.7-unstable-2025-04-17";
|
||||
version = "25.4.8-unstable-2025-05-19";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "boydaihungst";
|
||||
repo = "mediainfo.yazi";
|
||||
rev = "9629b1e85c3757c834ec83fb7d931982c55f4c3f";
|
||||
hash = "sha256-EDEIiZJy/RfXVaLNsKDeklH4qY2h+js2m0y6VSAjPkk=";
|
||||
rev = "70ed2287159b17bf2b9c1598252c5c33ba52b8a3";
|
||||
hash = "sha256-MMsKb9+zeOtWrpE3SalWhGIqeOwHrLdwf8xWYvWXjbo=";
|
||||
};
|
||||
|
||||
meta = {
|
||||
|
||||
@@ -11,13 +11,13 @@
|
||||
|
||||
stdenvNoCC.mkDerivation rec {
|
||||
pname = "kora-icon-theme";
|
||||
version = "1.6.4";
|
||||
version = "1.6.5";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "bikass";
|
||||
repo = "kora";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-5bGiePD0PwTvVEdVDzr6hIVtLwwF2mPa8ywLH1u8hLk=";
|
||||
sha256 = "sha256-Oralfx5MzCzkx+c+zwtFp8q83oKrNINd/PmVeugNKGo=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
||||
@@ -119,8 +119,6 @@ makeScopeWithSplicing' {
|
||||
|
||||
xfce4-cpugraph-plugin = callPackage ./panel-plugins/xfce4-cpugraph-plugin { };
|
||||
|
||||
xfce4-datetime-plugin = callPackage ./panel-plugins/xfce4-datetime-plugin { };
|
||||
|
||||
xfce4-dockbarx-plugin = callPackage ./panel-plugins/xfce4-dockbarx-plugin { };
|
||||
|
||||
xfce4-docklike-plugin = callPackage ./panel-plugins/xfce4-docklike-plugin { };
|
||||
@@ -173,6 +171,11 @@ makeScopeWithSplicing' {
|
||||
|
||||
thunar-bare = self.thunar.override { thunarPlugins = [ ]; }; # added 2019-11-04
|
||||
|
||||
xfce4-datetime-plugin = throw ''
|
||||
xfce4-datetime-plugin has been removed: this plugin has been merged into the xfce4-panel's built-in clock
|
||||
plugin and thus no longer maintained upstream, see https://gitlab.xfce.org/xfce/xfce4-panel/-/issues/563.
|
||||
''; # Added 2025-05-20
|
||||
|
||||
xfce4-embed-plugin = throw "xfce4-embed-plugin has been removed, as it was broken"; # Added 2024-07-15
|
||||
|
||||
xfce4-hardware-monitor-plugin = throw "xfce.xfce4-hardware-monitor-plugin has been removed: abandoned by upstream and does not build"; # added 2023-01-15
|
||||
|
||||
@@ -1,21 +1,40 @@
|
||||
{
|
||||
stdenv,
|
||||
lib,
|
||||
mkXfceDerivation,
|
||||
fetchFromGitLab,
|
||||
gettext,
|
||||
meson,
|
||||
ninja,
|
||||
pkg-config,
|
||||
glib,
|
||||
gtk3,
|
||||
libxfce4ui,
|
||||
libxfce4util,
|
||||
xfce4-panel,
|
||||
xfconf,
|
||||
gitUpdater,
|
||||
}:
|
||||
|
||||
mkXfceDerivation {
|
||||
category = "panel-plugins";
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "xfce4-battery-plugin";
|
||||
version = "1.1.6";
|
||||
rev-prefix = "xfce4-battery-plugin-";
|
||||
odd-unstable = false;
|
||||
sha256 = "sha256-tbI4zg6BFsPzREbh/tdFiEbZVXkAsblxzcZdIaQIqa0=";
|
||||
version = "1.2.0";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
domain = "gitlab.xfce.org";
|
||||
owner = "panel-plugins";
|
||||
repo = "xfce4-battery-plugin";
|
||||
tag = "xfce4-battery-plugin-${finalAttrs.version}";
|
||||
hash = "sha256-I4x2QRYp6H5mR4J7nQ+VZ/T3r/dj4r4M9JbgN+oZHWQ=";
|
||||
};
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
nativeBuildInputs = [
|
||||
gettext
|
||||
meson
|
||||
ninja
|
||||
pkg-config
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
glib
|
||||
@@ -26,8 +45,13 @@ mkXfceDerivation {
|
||||
xfconf
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
passthru.updateScript = gitUpdater { rev-prefix = "xfce4-battery-plugin-"; };
|
||||
|
||||
meta = {
|
||||
description = "Battery plugin for Xfce panel";
|
||||
teams = [ teams.xfce ];
|
||||
homepage = "https://gitlab.xfce.org/panel-plugins/xfce4-battery-plugin";
|
||||
license = lib.licenses.gpl2Plus;
|
||||
teams = [ lib.teams.xfce ];
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
@@ -1,7 +1,13 @@
|
||||
{
|
||||
stdenv,
|
||||
lib,
|
||||
mkXfceDerivation,
|
||||
fetchFromGitLab,
|
||||
gettext,
|
||||
meson,
|
||||
ninja,
|
||||
pkg-config,
|
||||
wayland-scanner,
|
||||
wrapGAppsHook3,
|
||||
glib,
|
||||
gtk3,
|
||||
libX11,
|
||||
@@ -13,16 +19,34 @@
|
||||
xfconf,
|
||||
wayland,
|
||||
wlr-protocols,
|
||||
gitUpdater,
|
||||
}:
|
||||
|
||||
mkXfceDerivation {
|
||||
category = "panel-plugins";
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "xfce4-clipman-plugin";
|
||||
version = "1.6.7";
|
||||
sha256 = "sha256-kbcA1X5LBnk1FcrhVqpCENp5bleJga2jnCh1RltN72o=";
|
||||
version = "1.7.0";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
domain = "gitlab.xfce.org";
|
||||
owner = "panel-plugins";
|
||||
repo = "xfce4-clipman-plugin";
|
||||
tag = "xfce4-clipman-plugin-${finalAttrs.version}";
|
||||
hash = "sha256-w9axHJJnTQrkN9s3RQyvkOcK0FOqsvWpoJ+UCDntnZk=";
|
||||
};
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
depsBuildBuild = [
|
||||
pkg-config
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
gettext
|
||||
meson
|
||||
ninja
|
||||
pkg-config
|
||||
wayland-scanner
|
||||
wrapGAppsHook3
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
@@ -39,8 +63,13 @@ mkXfceDerivation {
|
||||
wlr-protocols
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
passthru.updateScript = gitUpdater { rev-prefix = "xfce4-clipman-plugin-"; };
|
||||
|
||||
meta = {
|
||||
description = "Clipboard manager for Xfce panel";
|
||||
teams = [ teams.xfce ];
|
||||
homepage = "https://gitlab.xfce.org/panel-plugins/xfce4-clipman-plugin";
|
||||
license = lib.licenses.gpl2Plus;
|
||||
teams = [ lib.teams.xfce ];
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
@@ -1,20 +1,43 @@
|
||||
{
|
||||
stdenv,
|
||||
lib,
|
||||
mkXfceDerivation,
|
||||
fetchFromGitLab,
|
||||
gettext,
|
||||
meson,
|
||||
ninja,
|
||||
pkg-config,
|
||||
glib,
|
||||
gtk3,
|
||||
libxfce4ui,
|
||||
libxfce4util,
|
||||
xfce4-panel,
|
||||
xfconf,
|
||||
gitUpdater,
|
||||
}:
|
||||
|
||||
mkXfceDerivation {
|
||||
category = "panel-plugins";
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "xfce4-cpufreq-plugin";
|
||||
version = "1.2.9";
|
||||
sha256 = "sha256-WC419ZRQAnV+yNbdWH5lMt4RGvQb7zv2dqQdTE2kIFU=";
|
||||
version = "1.3.0";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
domain = "gitlab.xfce.org";
|
||||
owner = "panel-plugins";
|
||||
repo = "xfce4-cpufreq-plugin";
|
||||
tag = "xfce4-cpufreq-plugin-${finalAttrs.version}";
|
||||
hash = "sha256-IJ0gOzMs2JBS8KIlD5NHyUOf53PtTytm8J/j+5AEh5E=";
|
||||
};
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
nativeBuildInputs = [
|
||||
gettext
|
||||
meson
|
||||
ninja
|
||||
pkg-config
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
glib
|
||||
gtk3
|
||||
libxfce4ui
|
||||
libxfce4util
|
||||
@@ -22,8 +45,13 @@ mkXfceDerivation {
|
||||
xfconf
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
passthru.updateScript = gitUpdater { rev-prefix = "xfce4-cpufreq-plugin-"; };
|
||||
|
||||
meta = {
|
||||
description = "CPU Freq load plugin for Xfce panel";
|
||||
teams = [ teams.xfce ];
|
||||
homepage = "https://gitlab.xfce.org/panel-plugins/xfce4-cpufreq-plugin";
|
||||
license = lib.licenses.gpl2Plus;
|
||||
teams = [ lib.teams.xfce ];
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
@@ -1,39 +1,57 @@
|
||||
{
|
||||
stdenv,
|
||||
lib,
|
||||
mkXfceDerivation,
|
||||
exo,
|
||||
fetchFromGitLab,
|
||||
gettext,
|
||||
meson,
|
||||
ninja,
|
||||
pkg-config,
|
||||
glib,
|
||||
gtk3,
|
||||
libXtst,
|
||||
libxfce4ui,
|
||||
libxfce4util,
|
||||
xfce4-panel,
|
||||
xfconf,
|
||||
xorgproto,
|
||||
gitUpdater,
|
||||
}:
|
||||
|
||||
mkXfceDerivation {
|
||||
category = "panel-plugins";
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "xfce4-cpugraph-plugin";
|
||||
version = "1.2.11";
|
||||
rev-prefix = "xfce4-cpugraph-plugin-";
|
||||
odd-unstable = false;
|
||||
sha256 = "sha256-Q+H6riGF5sEcyrVFoDfudwVw4QORa2atE6NTb+xde/w=";
|
||||
version = "1.3.0";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
domain = "gitlab.xfce.org";
|
||||
owner = "panel-plugins";
|
||||
repo = "xfce4-cpugraph-plugin";
|
||||
tag = "xfce4-cpugraph-plugin-${finalAttrs.version}";
|
||||
hash = "sha256-IXAoxMzKZhABiiZYhL4UGkzqFNGMJicGQqSIfy2DEfc=";
|
||||
};
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
nativeBuildInputs = [
|
||||
gettext
|
||||
meson
|
||||
ninja
|
||||
pkg-config
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
exo
|
||||
glib
|
||||
gtk3
|
||||
libXtst
|
||||
libxfce4ui
|
||||
libxfce4util
|
||||
xfce4-panel
|
||||
xfconf
|
||||
xorgproto
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
passthru.updateScript = gitUpdater { rev-prefix = "xfce4-cpugraph-plugin-"; };
|
||||
|
||||
meta = {
|
||||
description = "CPU graph show for Xfce panel";
|
||||
teams = [ teams.xfce ];
|
||||
homepage = "https://gitlab.xfce.org/panel-plugins/xfce4-cpugraph-plugin";
|
||||
license = lib.licenses.gpl2Plus;
|
||||
teams = [ lib.teams.xfce ];
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
{
|
||||
mkXfceDerivation,
|
||||
lib,
|
||||
intltool,
|
||||
libxfce4ui,
|
||||
xfce4-panel,
|
||||
gettext,
|
||||
}:
|
||||
|
||||
mkXfceDerivation {
|
||||
category = "panel-plugins";
|
||||
pname = "xfce4-datetime-plugin";
|
||||
version = "0.8.3";
|
||||
|
||||
rev-prefix = "xfce4-datetime-plugin-";
|
||||
sha256 = "sha256-dpN5ZN7VjgO1GQ6v8NXuBKACyIwIosaiVGtmLEb6auI=";
|
||||
|
||||
nativeBuildInputs = [
|
||||
gettext
|
||||
intltool
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
libxfce4ui
|
||||
xfce4-panel
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Shows the date and time in the panel, and a calendar appears when you left-click on it";
|
||||
teams = [ teams.xfce ];
|
||||
};
|
||||
}
|
||||
@@ -1,22 +1,49 @@
|
||||
{
|
||||
stdenv,
|
||||
lib,
|
||||
mkXfceDerivation,
|
||||
fetchFromGitLab,
|
||||
gettext,
|
||||
meson,
|
||||
ninja,
|
||||
pkg-config,
|
||||
cairo,
|
||||
glib,
|
||||
gtk3,
|
||||
gtk-layer-shell,
|
||||
libX11,
|
||||
libXi,
|
||||
libxfce4ui,
|
||||
libxfce4util,
|
||||
xfce4-panel,
|
||||
libxfce4windowing,
|
||||
xfce4-panel,
|
||||
gitUpdater,
|
||||
}:
|
||||
|
||||
mkXfceDerivation {
|
||||
category = "panel-plugins";
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "xfce4-docklike-plugin";
|
||||
version = "0.4.3";
|
||||
sha256 = "sha256-cQ9B/sIzp1sq3GXPMtbb8xrfFhWiBS+FDe7/qlWVPdA=";
|
||||
version = "0.5.0";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
domain = "gitlab.xfce.org";
|
||||
owner = "panel-plugins";
|
||||
repo = "xfce4-docklike-plugin";
|
||||
tag = "xfce4-docklike-plugin-${finalAttrs.version}";
|
||||
hash = "sha256-1R9qQKqn/CIV36GYmyg54t3xiY23qUs5EMLxvAIavK8=";
|
||||
};
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
depsBuildBuild = [
|
||||
pkg-config
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
gettext
|
||||
glib # glib-compile-resources
|
||||
meson
|
||||
ninja
|
||||
pkg-config
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
cairo
|
||||
@@ -24,17 +51,20 @@ mkXfceDerivation {
|
||||
gtk3
|
||||
gtk-layer-shell
|
||||
libX11
|
||||
libXi
|
||||
libxfce4ui
|
||||
libxfce4util
|
||||
xfce4-panel
|
||||
libxfce4windowing
|
||||
xfce4-panel
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
passthru.updateScript = gitUpdater { rev-prefix = "xfce4-docklike-plugin-"; };
|
||||
|
||||
meta = {
|
||||
homepage = "https://docs.xfce.org/panel-plugins/xfce4-docklike-plugin/start";
|
||||
description = "Modern, minimalist taskbar for Xfce";
|
||||
license = licenses.gpl3;
|
||||
platforms = platforms.linux;
|
||||
teams = [ teams.xfce ];
|
||||
license = lib.licenses.gpl3Plus;
|
||||
teams = [ lib.teams.xfce ];
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{ mkDerivation }:
|
||||
|
||||
mkDerivation {
|
||||
version = "28.0-rc4";
|
||||
sha256 = "sha256-CZAs1lqzTWyNoKhEpHdYnFYOfHRX00X2CimC4VeA0MA=";
|
||||
version = "28.0";
|
||||
sha256 = "sha256-ZqND4bOp0vUkBKznhojwsN3MygDf3I7OLkR05EUnSRg=";
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{
|
||||
stdenv,
|
||||
lib,
|
||||
buildLuarocksPackage,
|
||||
cmake,
|
||||
@@ -28,6 +29,18 @@ buildLuarocksPackage rec {
|
||||
rm -rf deps/lua deps/luajit deps/libuv
|
||||
'';
|
||||
|
||||
patches =
|
||||
[
|
||||
# Fails with "Uncaught Error: ./tests/test-dns.lua:164: assertion failed!"
|
||||
# and "./tests/test-tty.lua:19: bad argument #1 to 'is_readable' (Expected
|
||||
# uv_stream userdata)"
|
||||
./disable-failing-tests.patch
|
||||
]
|
||||
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
# Fails with "Uncaught Error: ./tests/test-udp.lua:261: EHOSTUNREACH"
|
||||
./disable-failing-darwin-tests.patch
|
||||
];
|
||||
|
||||
buildInputs = [ libuv ];
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
@@ -56,10 +69,13 @@ buildLuarocksPackage rec {
|
||||
EOF
|
||||
'';
|
||||
|
||||
__darwinAllowLocalNetworking = true;
|
||||
|
||||
doInstallCheck = true;
|
||||
installCheckPhase = ''
|
||||
rm tests/test-{dns,thread,tty}.lua
|
||||
runHook preInstallCheck
|
||||
luarocks test
|
||||
runHook postInstallCheck
|
||||
'';
|
||||
|
||||
disabled = luaOlder "5.1";
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
diff --git a/tests/test-udp.lua b/tests/test-udp.lua
|
||||
index bd0f46d..e4542b4 100644
|
||||
--- a/tests/test-udp.lua
|
||||
+++ b/tests/test-udp.lua
|
||||
@@ -280,14 +280,6 @@ return require('lib/tap')(function (test)
|
||||
-- same check for skipping the ipv6 test; we just expanded it to
|
||||
-- the ipv4 test as well.
|
||||
local function has_external_interface(uv, family)
|
||||
- local addresses = assert(uv.interface_addresses())
|
||||
- for _, vals in pairs(addresses) do
|
||||
- for _, info in ipairs(vals) do
|
||||
- if (not family or info.family == family) and not info.internal then
|
||||
- return true
|
||||
- end
|
||||
- end
|
||||
- end
|
||||
return false
|
||||
end
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
diff --git a/tests/test-dns.lua b/tests/test-dns.lua
|
||||
index 894220b..0763b36 100644
|
||||
--- a/tests/test-dns.lua
|
||||
+++ b/tests/test-dns.lua
|
||||
@@ -161,7 +161,6 @@ return require('lib/tap')(function (test)
|
||||
p{err=err,hostname=hostname,service=service}
|
||||
assert(not err, err)
|
||||
assert(hostname)
|
||||
- assert(service == "http")
|
||||
end)))
|
||||
end)
|
||||
|
||||
diff --git a/tests/test-tty.lua b/tests/test-tty.lua
|
||||
index 165e58d..11368df 100644
|
||||
--- a/tests/test-tty.lua
|
||||
+++ b/tests/test-tty.lua
|
||||
@@ -13,13 +13,10 @@ end
|
||||
return require('lib/tap')(function (test)
|
||||
|
||||
test("tty normal", function (print, p, expect, uv)
|
||||
- local stdin = uv.new_tty(0, true)
|
||||
local stdout = uv.new_tty(1, false)
|
||||
|
||||
- assert(uv.is_readable(stdin))
|
||||
assert(uv.is_writable(stdout))
|
||||
|
||||
- uv.close(stdin)
|
||||
uv.close(stdout)
|
||||
end)
|
||||
|
||||
@@ -7,16 +7,16 @@
|
||||
|
||||
buildDunePackage {
|
||||
pname = "readline";
|
||||
version = "0.1";
|
||||
version = "0.2";
|
||||
|
||||
minimalOCamlVersion = "4.14";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
domain = "gitlab.inria.fr";
|
||||
owner = "vtourneu";
|
||||
repo = "readline-ocaml";
|
||||
rev = "b3f84c8a006439142884d3e0df51b395d963f9fe";
|
||||
hash = "sha256-h4kGbzwM88rPGj/KkHKgGyfyvkAYHP83ZY1INZzTaIE=";
|
||||
owner = "acg";
|
||||
repo = "dev/readline-ocaml";
|
||||
tag = "v0.2";
|
||||
hash = "sha256-qWxciodgINCFCxAVLdoU4z+ypWPYjrUwq8pU80saclw=";
|
||||
};
|
||||
|
||||
patches = [ ./dune.patch ];
|
||||
@@ -30,8 +30,8 @@ buildDunePackage {
|
||||
|
||||
meta = {
|
||||
description = "OCaml bindings for GNU Readline";
|
||||
homepage = "https://vtourneu.gitlabpages.inria.fr/readline-ocaml/readline/index.html";
|
||||
homepage = "https://acg.gitlabpages.inria.fr/dev/readline-ocaml/readline/index.html";
|
||||
license = lib.licenses.cecill20;
|
||||
maintainers = [ lib.maintainers.vbgl ];
|
||||
maintainers = [ lib.maintainers.tournev ];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "aiokem";
|
||||
version = "0.5.10";
|
||||
version = "0.5.11";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.12";
|
||||
@@ -23,7 +23,7 @@ buildPythonPackage rec {
|
||||
owner = "kohlerlibs";
|
||||
repo = "aiokem";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-C9px2Gooh6Ob3rGGhKtRdScuA+PCU93xDvOjk7+q3e8=";
|
||||
hash = "sha256-1fBGmsp6DoDP1EUjp2tfWT3nTux0/2iiC6x/LxrCrd8=";
|
||||
};
|
||||
|
||||
build-system = [ setuptools ];
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
{
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
colcon,
|
||||
cargo,
|
||||
fetchFromGitHub,
|
||||
scspell,
|
||||
setuptools,
|
||||
pythonOlder,
|
||||
pytestCheckHook,
|
||||
rustfmt,
|
||||
toml,
|
||||
writableTmpDirAsHomeHook,
|
||||
}:
|
||||
buildPythonPackage rec {
|
||||
pname = "colcon-cargo";
|
||||
version = "0.1.3";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.10";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "colcon";
|
||||
repo = "colcon-cargo";
|
||||
tag = version;
|
||||
hash = "sha256-Do8i/Z1nn8wsj0xzCQdSaaXoDf9N34SiMb/GIe4YOs4=";
|
||||
};
|
||||
|
||||
build-system = [ setuptools ];
|
||||
|
||||
dependencies = [
|
||||
colcon
|
||||
toml
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
cargo
|
||||
pytestCheckHook
|
||||
scspell
|
||||
rustfmt
|
||||
writableTmpDirAsHomeHook
|
||||
];
|
||||
|
||||
disabledTestPaths = [
|
||||
# Skip the linter tests
|
||||
"test/test_flake8.py"
|
||||
];
|
||||
|
||||
pythonImportsCheck = [
|
||||
"colcon_cargo"
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "An extension for colcon-core to support Rust packages built with Cargo";
|
||||
homepage = "https://github.com/colcon/colcon-cargo";
|
||||
license = lib.licenses.asl20;
|
||||
maintainers = with lib.maintainers; [ guelakais ];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
{
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
colcon,
|
||||
fetchFromGitHub,
|
||||
pytestCheckHook,
|
||||
pytest-cov,
|
||||
pytest-repeat,
|
||||
pytest-rerunfailures,
|
||||
scspell,
|
||||
setuptools,
|
||||
writableTmpDirAsHomeHook,
|
||||
}:
|
||||
buildPythonPackage {
|
||||
pname = "colcon-ros-domain-id-coordinator";
|
||||
version = "0.2.1";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "colcon";
|
||||
repo = "colcon-ros-domain-id-coordinator";
|
||||
tag = "0.2.1";
|
||||
hash = "sha256-8DTpixa5ZGuSOpmwoeJgxLQI+17XheLxPWcJymE0GqM=";
|
||||
};
|
||||
build-system = [ setuptools ];
|
||||
|
||||
dependencies = [
|
||||
colcon
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
pytestCheckHook
|
||||
pytest-cov
|
||||
pytest-repeat
|
||||
pytest-rerunfailures
|
||||
scspell
|
||||
writableTmpDirAsHomeHook
|
||||
];
|
||||
|
||||
disabledTestPaths = [
|
||||
"test/test_flake8.py"
|
||||
];
|
||||
|
||||
pythonImportsCheck = [
|
||||
"colcon_ros_domain_id_coordinator"
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "An extension for colcon-core to coordinate ROS_DOMAIN_ID values across multiple terminals";
|
||||
homepage = "https://github.com/colcon/colcon-ros-domain-id-coordinator";
|
||||
license = lib.licenses.asl20;
|
||||
maintainers = with lib.maintainers; [ guelakais ];
|
||||
};
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
buildPythonPackage,
|
||||
|
||||
# build-system
|
||||
@@ -15,6 +16,7 @@
|
||||
pytestCheckHook,
|
||||
torch,
|
||||
transformers,
|
||||
writableTmpDirAsHomeHook,
|
||||
wurlitzer,
|
||||
}:
|
||||
|
||||
@@ -49,16 +51,20 @@ buildPythonPackage rec {
|
||||
pytestCheckHook
|
||||
torch
|
||||
transformers
|
||||
writableTmpDirAsHomeHook
|
||||
wurlitzer
|
||||
];
|
||||
|
||||
preCheck = ''
|
||||
# run tests against build result, not sources
|
||||
rm -rf ctranslate2
|
||||
|
||||
export HOME=$TMPDIR
|
||||
'';
|
||||
|
||||
disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
# Fatal Python error: Aborted
|
||||
"test_invalid_model_path"
|
||||
];
|
||||
|
||||
disabledTestPaths = [
|
||||
# TODO: ModuleNotFoundError: No module named 'opennmt'
|
||||
"tests/test_opennmt_tf.py"
|
||||
@@ -66,11 +72,11 @@ buildPythonPackage rec {
|
||||
"tests/test_transformers.py"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
description = "Fast inference engine for Transformer models";
|
||||
homepage = "https://github.com/OpenNMT/CTranslate2";
|
||||
changelog = "https://github.com/OpenNMT/CTranslate2/blob/${src.rev}/CHANGELOG.md";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ hexa ];
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ hexa ];
|
||||
};
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user