Merge staging-next into staging
This commit is contained in:
@@ -110,6 +110,8 @@ In addition to numerous new and upgraded packages, this release has the followin
|
||||
|
||||
- [v2rayA](https://v2raya.org), a Linux web GUI client of Project V which supports V2Ray, Xray, SS, SSR, Trojan and Pingtunnel. Available as [services.v2raya](options.html#opt-services.v2raya.enable).
|
||||
|
||||
- [rshim](https://github.com/Mellanox/rshim-user-space), the user-space rshim driver for the BlueField SoC. Available as [services.rshim](options.html#opt-services.rshim.enable).
|
||||
|
||||
- [wstunnel](https://github.com/erebe/wstunnel), a proxy tunnelling arbitrary TCP or UDP traffic through a WebSocket connection. Instances may be configured via [services.wstunnel](options.html#opt-services.wstunnel.enable).
|
||||
|
||||
- [ulogd](https://www.netfilter.org/projects/ulogd/index.html), a userspace logging daemon for netfilter/iptables related logging. Available as [services.ulogd](options.html#opt-services.ulogd.enable).
|
||||
@@ -124,6 +126,10 @@ In addition to numerous new and upgraded packages, this release has the followin
|
||||
|
||||
- [photoprism](https://photoprism.app/), a AI-Powered Photos App for the Decentralized Web. Available as [services.photoprism](options.html#opt-services.photoprism.enable).
|
||||
|
||||
- [alice-lg](github.com/alice-lg/alice-lg), a looking-glass for BGP sessions. Available as [services.alice-lg](#opt-services.alice-lg.enable).
|
||||
|
||||
- [birdwatcher](github.com/alice-lg/birdwatcher), a small HTTP server meant to provide an API defined by Barry O'Donovan's birds-eye to the BIRD internet routing daemon. Available as [services.birdwatcher](#opt-services.birdwatcher.enable).
|
||||
|
||||
- [peroxide](https://github.com/ljanyst/peroxide), a fork of the official [ProtonMail bridge](https://github.com/ProtonMail/proton-bridge) that aims to be similar to [Hydroxide](https://github.com/emersion/hydroxide). Available as [services.peroxide](#opt-services.peroxide.enable).
|
||||
|
||||
- [autosuspend](https://github.com/languitar/autosuspend), a python daemon that suspends a system if certain conditions are met, or not met.
|
||||
@@ -237,7 +243,6 @@ In addition to numerous new and upgraded packages, this release has the followin
|
||||
|
||||
- [`services.nextcloud.database.createLocally`](#opt-services.nextcloud.database.createLocally) now uses socket authentication and is no longer compatible with password authentication.
|
||||
- If you want the module to manage the database for you, unset [`services.nextcloud.config.dbpassFile`](#opt-services.nextcloud.config.dbpassFile) (and [`services.nextcloud.config.dbhost`](#opt-services.nextcloud.config.dbhost), if it's set).
|
||||
- If your database is external, simply set [`services.nextcloud.database.createLocally`](#opt-services.nextcloud.database.createLocally) to `false`.
|
||||
- If you want to use password authentication **and** create the database locally, you will have to use [`services.mysql`](#opt-services.mysql.enable) to set it up.
|
||||
|
||||
- `protonmail-bridge` package has been updated to major version 3.
|
||||
@@ -405,6 +410,8 @@ In addition to numerous new and upgraded packages, this release has the followin
|
||||
}
|
||||
```
|
||||
|
||||
- New option `security.pam.zfs` to enable unlocking and mounting of encrypted ZFS home dataset at login.
|
||||
|
||||
- `services.peertube` now requires you to specify the secret file `secrets.secretsFile`. It can be generated by running `openssl rand -hex 32`.
|
||||
Before upgrading, read the release notes for PeerTube:
|
||||
- [Release v5.0.0](https://github.com/Chocobozzz/PeerTube/releases/tag/v5.0.0)
|
||||
|
||||
@@ -511,7 +511,7 @@ let format' = format; in let
|
||||
${if format == "raw" then ''
|
||||
mv $diskImage $out/${filename}
|
||||
'' else ''
|
||||
${pkgs.qemu}/bin/qemu-img convert -f raw -O ${format} ${compress} $diskImage $out/${filename}
|
||||
${pkgs.qemu-utils}/bin/qemu-img convert -f raw -O ${format} ${compress} $diskImage $out/${filename}
|
||||
''}
|
||||
diskImage=$out/${filename}
|
||||
'';
|
||||
|
||||
@@ -261,8 +261,8 @@ let
|
||||
mv $bootDiskImage $out/${bootFilename}
|
||||
mv $rootDiskImage $out/${rootFilename}
|
||||
'' else ''
|
||||
${pkgs.qemu}/bin/qemu-img convert -f raw -O ${formatOpt} ${compress} $bootDiskImage $out/${bootFilename}
|
||||
${pkgs.qemu}/bin/qemu-img convert -f raw -O ${formatOpt} ${compress} $rootDiskImage $out/${rootFilename}
|
||||
${pkgs.qemu_kvm}/bin/qemu-img convert -f raw -O ${formatOpt} ${compress} $bootDiskImage $out/${bootFilename}
|
||||
${pkgs.qemu_kvm}/bin/qemu-img convert -f raw -O ${formatOpt} ${compress} $rootDiskImage $out/${rootFilename}
|
||||
''}
|
||||
bootDiskImage=$out/${bootFilename}
|
||||
rootDiskImage=$out/${rootFilename}
|
||||
|
||||
@@ -244,7 +244,7 @@ let
|
||||
${if formatOpt == "raw" then ''
|
||||
mv $rootDiskImage $out/${rootFilename}
|
||||
'' else ''
|
||||
${pkgs.qemu}/bin/qemu-img convert -f raw -O ${formatOpt} ${compress} $rootDiskImage $out/${rootFilename}
|
||||
${pkgs.qemu_kvm}/bin/qemu-img convert -f raw -O ${formatOpt} ${compress} $rootDiskImage $out/${rootFilename}
|
||||
''}
|
||||
rootDiskImage=$out/${rootFilename}
|
||||
set -x
|
||||
|
||||
@@ -102,8 +102,8 @@ in {
|
||||
${pkgs.jq}/bin/jq -n \
|
||||
--arg system_label ${lib.escapeShellArg config.system.nixos.label} \
|
||||
--arg system ${lib.escapeShellArg pkgs.stdenv.hostPlatform.system} \
|
||||
--arg root_logical_bytes "$(${pkgs.qemu}/bin/qemu-img info --output json "$rootDisk" | ${pkgs.jq}/bin/jq '."virtual-size"')" \
|
||||
--arg boot_logical_bytes "$(${pkgs.qemu}/bin/qemu-img info --output json "$bootDisk" | ${pkgs.jq}/bin/jq '."virtual-size"')" \
|
||||
--arg root_logical_bytes "$(${pkgs.qemu_kvm}/bin/qemu-img info --output json "$rootDisk" | ${pkgs.jq}/bin/jq '."virtual-size"')" \
|
||||
--arg boot_logical_bytes "$(${pkgs.qemu_kvm}/bin/qemu-img info --output json "$bootDisk" | ${pkgs.jq}/bin/jq '."virtual-size"')" \
|
||||
--arg boot_mode "${amiBootMode}" \
|
||||
--arg root "$rootDisk" \
|
||||
--arg boot "$bootDisk" \
|
||||
@@ -142,7 +142,7 @@ in {
|
||||
${pkgs.jq}/bin/jq -n \
|
||||
--arg system_label ${lib.escapeShellArg config.system.nixos.label} \
|
||||
--arg system ${lib.escapeShellArg pkgs.stdenv.hostPlatform.system} \
|
||||
--arg logical_bytes "$(${pkgs.qemu}/bin/qemu-img info --output json "$diskImage" | ${pkgs.jq}/bin/jq '."virtual-size"')" \
|
||||
--arg logical_bytes "$(${pkgs.qemu_kvm}/bin/qemu-img info --output json "$diskImage" | ${pkgs.jq}/bin/jq '."virtual-size"')" \
|
||||
--arg boot_mode "${amiBootMode}" \
|
||||
--arg file "$diskImage" \
|
||||
'{}
|
||||
|
||||
@@ -85,7 +85,7 @@ in
|
||||
${pkgs.jq}/bin/jq -n \
|
||||
--arg system_label ${lib.escapeShellArg config.system.nixos.label} \
|
||||
--arg system ${lib.escapeShellArg pkgs.stdenv.hostPlatform.system} \
|
||||
--arg root_logical_bytes "$(${pkgs.qemu}/bin/qemu-img info --output json "$rootDisk" | ${pkgs.jq}/bin/jq '."virtual-size"')" \
|
||||
--arg root_logical_bytes "$(${pkgs.qemu_kvm}/bin/qemu-img info --output json "$rootDisk" | ${pkgs.jq}/bin/jq '."virtual-size"')" \
|
||||
--arg boot_mode "${imageBootMode}" \
|
||||
--arg root "$rootDisk" \
|
||||
'{}
|
||||
|
||||
@@ -688,6 +688,7 @@
|
||||
./services/misc/ripple-data-api.nix
|
||||
./services/misc/rippled.nix
|
||||
./services/misc/rmfakecloud.nix
|
||||
./services/misc/rshim.nix
|
||||
./services/misc/safeeyes.nix
|
||||
./services/misc/sdrplay.nix
|
||||
./services/misc/serviio.nix
|
||||
@@ -805,6 +806,7 @@
|
||||
./services/network-filesystems/yandex-disk.nix
|
||||
./services/networking/3proxy.nix
|
||||
./services/networking/adguardhome.nix
|
||||
./services/networking/alice-lg.nix
|
||||
./services/networking/amuled.nix
|
||||
./services/networking/antennas.nix
|
||||
./services/networking/aria2.nix
|
||||
@@ -819,6 +821,7 @@
|
||||
./services/networking/bind.nix
|
||||
./services/networking/bird-lg.nix
|
||||
./services/networking/bird.nix
|
||||
./services/networking/birdwatcher.nix
|
||||
./services/networking/bitcoind.nix
|
||||
./services/networking/bitlbee.nix
|
||||
./services/networking/blockbook-frontend.nix
|
||||
|
||||
@@ -446,6 +446,15 @@ let
|
||||
};
|
||||
};
|
||||
|
||||
zfs = mkOption {
|
||||
default = config.security.pam.zfs.enable;
|
||||
defaultText = literalExpression "config.security.pam.zfs.enable";
|
||||
type = types.bool;
|
||||
description = lib.mdDoc ''
|
||||
Enable unlocking and mounting of encrypted ZFS home dataset at login.
|
||||
'';
|
||||
};
|
||||
|
||||
text = mkOption {
|
||||
type = types.nullOr types.lines;
|
||||
description = lib.mdDoc "Contents of the PAM service file.";
|
||||
@@ -556,7 +565,8 @@ let
|
||||
|| cfg.googleAuthenticator.enable
|
||||
|| cfg.gnupg.enable
|
||||
|| cfg.failDelay.enable
|
||||
|| cfg.duoSecurity.enable))
|
||||
|| cfg.duoSecurity.enable
|
||||
|| cfg.zfs))
|
||||
(
|
||||
optionalString config.services.homed.enable ''
|
||||
auth optional ${config.systemd.package}/lib/security/pam_systemd_home.so
|
||||
@@ -570,6 +580,9 @@ let
|
||||
optionalString config.security.pam.enableFscrypt ''
|
||||
auth optional ${pkgs.fscrypt-experimental}/lib/security/pam_fscrypt.so
|
||||
'' +
|
||||
optionalString cfg.zfs ''
|
||||
auth optional ${config.boot.zfs.package}/lib/security/pam_zfs_key.so homes=${config.security.pam.zfs.homes}
|
||||
'' +
|
||||
optionalString cfg.pamMount ''
|
||||
auth optional ${pkgs.pam_mount}/lib/security/pam_mount.so disable_interactive
|
||||
'' +
|
||||
@@ -628,6 +641,9 @@ let
|
||||
optionalString config.security.pam.enableFscrypt ''
|
||||
password optional ${pkgs.fscrypt-experimental}/lib/security/pam_fscrypt.so
|
||||
'' +
|
||||
optionalString cfg.zfs ''
|
||||
password optional ${config.boot.zfs.package}/lib/security/pam_zfs_key.so homes=${config.security.pam.zfs.homes}
|
||||
'' +
|
||||
optionalString cfg.pamMount ''
|
||||
password optional ${pkgs.pam_mount}/lib/security/pam_mount.so
|
||||
'' +
|
||||
@@ -685,6 +701,10 @@ let
|
||||
session [success=1 default=ignore] pam_succeed_if.so service = systemd-user
|
||||
session optional ${pkgs.fscrypt-experimental}/lib/security/pam_fscrypt.so
|
||||
'' +
|
||||
optionalString cfg.zfs ''
|
||||
session [success=1 default=ignore] pam_succeed_if.so service = systemd-user
|
||||
session optional ${config.boot.zfs.package}/lib/security/pam_zfs_key.so homes=${config.security.pam.zfs.homes} ${optionalString config.security.pam.zfs.noUnmount "nounmount"}
|
||||
'' +
|
||||
optionalString cfg.pamMount ''
|
||||
session optional ${pkgs.pam_mount}/lib/security/pam_mount.so disable_interactive
|
||||
'' +
|
||||
@@ -1202,6 +1222,34 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
security.pam.zfs = {
|
||||
enable = mkOption {
|
||||
default = false;
|
||||
type = types.bool;
|
||||
description = lib.mdDoc ''
|
||||
Enable unlocking and mounting of encrypted ZFS home dataset at login.
|
||||
'';
|
||||
};
|
||||
|
||||
homes = mkOption {
|
||||
example = "rpool/home";
|
||||
default = "rpool/home";
|
||||
type = types.str;
|
||||
description = lib.mdDoc ''
|
||||
Prefix of home datasets. This value will be concatenated with
|
||||
`"/" + <username>` in order to determine the home dataset to unlock.
|
||||
'';
|
||||
};
|
||||
|
||||
noUnmount = mkOption {
|
||||
default = false;
|
||||
type = types.bool;
|
||||
description = lib.mdDoc ''
|
||||
Do not unmount home dataset on logout.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
security.pam.enableEcryptfs = mkEnableOption (lib.mdDoc "eCryptfs PAM module (mounting ecryptfs home directory on login)");
|
||||
security.pam.enableFscrypt = mkEnableOption (lib.mdDoc ''
|
||||
Enables fscrypt to automatically unlock directories with the user's login password.
|
||||
@@ -1238,6 +1286,12 @@ in
|
||||
Only one of users.motd and users.motdFile can be set.
|
||||
'';
|
||||
}
|
||||
{
|
||||
assertion = config.security.pam.zfs.enable -> (config.boot.zfs.enabled || config.boot.zfs.enableUnstable);
|
||||
message = ''
|
||||
`security.pam.zfs.enable` requires enabling ZFS (`boot.zfs.enabled` or `boot.zfs.enableUnstable`).
|
||||
'';
|
||||
}
|
||||
];
|
||||
|
||||
environment.systemPackages =
|
||||
@@ -1378,7 +1432,10 @@ in
|
||||
mr ${pkgs.plasma5Packages.kwallet-pam}/lib/security/pam_kwallet5.so,
|
||||
'' +
|
||||
optionalString config.virtualisation.lxc.lxcfs.enable ''
|
||||
mr ${pkgs.lxc}/lib/security/pam_cgfs.so
|
||||
mr ${pkgs.lxc}/lib/security/pam_cgfs.so,
|
||||
'' +
|
||||
optionalString (isEnabled (cfg: cfg.zfs)) ''
|
||||
mr ${config.boot.zfs.package}/lib/security/pam_zfs_key.so,
|
||||
'' +
|
||||
optionalString config.services.homed.enable ''
|
||||
mr ${config.systemd.package}/lib/security/pam_systemd_home.so
|
||||
|
||||
@@ -167,10 +167,11 @@ in {
|
||||
ETCD_LISTEN_CLIENT_URLS = concatStringsSep "," cfg.listenClientUrls;
|
||||
ETCD_LISTEN_PEER_URLS = concatStringsSep "," cfg.listenPeerUrls;
|
||||
ETCD_INITIAL_ADVERTISE_PEER_URLS = concatStringsSep "," cfg.initialAdvertisePeerUrls;
|
||||
ETCD_PEER_CLIENT_CERT_AUTH = toString cfg.peerClientCertAuth;
|
||||
ETCD_PEER_TRUSTED_CA_FILE = cfg.peerTrustedCaFile;
|
||||
ETCD_PEER_CERT_FILE = cfg.peerCertFile;
|
||||
ETCD_PEER_KEY_FILE = cfg.peerKeyFile;
|
||||
ETCD_CLIENT_CERT_AUTH = toString cfg.peerClientCertAuth;
|
||||
ETCD_CLIENT_CERT_AUTH = toString cfg.clientCertAuth;
|
||||
ETCD_TRUSTED_CA_FILE = cfg.trustedCaFile;
|
||||
ETCD_CERT_FILE = cfg.certFile;
|
||||
ETCD_KEY_FILE = cfg.keyFile;
|
||||
|
||||
@@ -0,0 +1,99 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
cfg = config.services.rshim;
|
||||
|
||||
rshimCommand = lib.escapeShellArgs ([ "${cfg.package}/bin/rshim" ]
|
||||
++ lib.optionals (cfg.backend != null) [ "--backend ${cfg.backend}" ]
|
||||
++ lib.optionals (cfg.device != null) [ "--device ${cfg.device}" ]
|
||||
++ lib.optionals (cfg.index != null) [ "--index ${builtins.toString cfg.index}" ]
|
||||
++ [ "--log-level ${builtins.toString cfg.log-level}" ])
|
||||
;
|
||||
in
|
||||
{
|
||||
options.services.rshim = {
|
||||
enable = lib.mkEnableOption (lib.mdDoc "User-space rshim driver for the BlueField SoC");
|
||||
|
||||
package = lib.mkPackageOptionMD pkgs "rshim-user-space" { };
|
||||
|
||||
backend = lib.mkOption {
|
||||
type = with lib.types; nullOr (enum [ "usb" "pcie" "pcie_lf" ]);
|
||||
description = lib.mdDoc ''
|
||||
Specify the backend to attach. If not specified, the driver will scan
|
||||
all rshim backends unless the `device` option is given with a device
|
||||
name specified.
|
||||
'';
|
||||
default = null;
|
||||
example = "pcie";
|
||||
};
|
||||
|
||||
device = lib.mkOption {
|
||||
type = with lib.types; nullOr str;
|
||||
description = lib.mdDoc ''
|
||||
Specify the device name to attach. The backend driver can be deduced
|
||||
from the device name, thus the `backend` option is not needed.
|
||||
'';
|
||||
default = null;
|
||||
example = "pcie-04:00.2";
|
||||
};
|
||||
|
||||
index = lib.mkOption {
|
||||
type = with lib.types; nullOr int;
|
||||
description = lib.mdDoc ''
|
||||
Specify the index to create device path `/dev/rshim<index>`. It's also
|
||||
used to create network interface name `tmfifo_net<index>`. This option
|
||||
is needed when multiple rshim instances are running.
|
||||
'';
|
||||
default = null;
|
||||
example = 1;
|
||||
};
|
||||
|
||||
log-level = lib.mkOption {
|
||||
type = lib.types.int;
|
||||
description = lib.mdDoc ''
|
||||
Specify the log level (0:none, 1:error, 2:warning, 3:notice, 4:debug).
|
||||
'';
|
||||
default = 2;
|
||||
example = 4;
|
||||
};
|
||||
|
||||
config = lib.mkOption {
|
||||
type = with lib.types; attrsOf (oneOf [ int str ]);
|
||||
description = lib.mdDoc ''
|
||||
Structural setting for the rshim configuration file
|
||||
(`/etc/rshim.conf`). It can be used to specify the static mapping
|
||||
between rshim devices and rshim names. It can also be used to ignore
|
||||
some rshim devices.
|
||||
'';
|
||||
default = { };
|
||||
example = {
|
||||
DISPLAY_LEVEL = 0;
|
||||
rshim0 = "usb-2-1.7";
|
||||
none = "usb-1-1.4";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment.etc = lib.mkIf (cfg.config != { }) {
|
||||
"rshim.conf".text = lib.generators.toKeyValue
|
||||
{ mkKeyValue = lib.generators.mkKeyValueDefault { } " "; }
|
||||
cfg.config;
|
||||
};
|
||||
|
||||
systemd.services.rshim = {
|
||||
after = [ "network.target" ];
|
||||
serviceConfig = {
|
||||
Restart = "always";
|
||||
Type = "forking";
|
||||
ExecStart = [
|
||||
(lib.concatStringsSep " \\\n" rshimCommand)
|
||||
];
|
||||
KillMode = "control-group";
|
||||
};
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
};
|
||||
};
|
||||
|
||||
meta.maintainers = with lib.maintainers; [ nikstur ];
|
||||
}
|
||||
@@ -0,0 +1,101 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.services.alice-lg;
|
||||
settingsFormat = pkgs.formats.ini { };
|
||||
in
|
||||
{
|
||||
options = {
|
||||
services.alice-lg = {
|
||||
enable = mkEnableOption (lib.mdDoc "Alice Looking Glass");
|
||||
|
||||
package = mkPackageOptionMD pkgs "alice-lg" { };
|
||||
|
||||
settings = mkOption {
|
||||
type = settingsFormat.type;
|
||||
default = { };
|
||||
description = lib.mdDoc ''
|
||||
alice-lg configuration, for configuration options see the example on [github](https://github.com/alice-lg/alice-lg/blob/main/etc/alice-lg/alice.example.conf)
|
||||
'';
|
||||
example = literalExpression ''
|
||||
{
|
||||
server = {
|
||||
# configures the built-in webserver and provides global application settings
|
||||
listen_http = "127.0.0.1:7340";
|
||||
enable_prefix_lookup = true;
|
||||
asn = 9033;
|
||||
store_backend = postgres;
|
||||
routes_store_refresh_parallelism = 5;
|
||||
neighbors_store_refresh_parallelism = 10000;
|
||||
routes_store_refresh_interval = 5;
|
||||
neighbors_store_refresh_interval = 5;
|
||||
};
|
||||
postgres = {
|
||||
url = "postgres://postgres:postgres@localhost:5432/alice";
|
||||
min_connections = 2;
|
||||
max_connections = 128;
|
||||
};
|
||||
pagination = {
|
||||
routes_filtered_page_size = 250;
|
||||
routes_accepted_page_size = 250;
|
||||
routes_not_exported_page_size = 250;
|
||||
};
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment = {
|
||||
etc."alice-lg/alice.conf".source = settingsFormat.generate "alice-lg.conf" cfg.settings;
|
||||
};
|
||||
systemd.services = {
|
||||
alice-lg = {
|
||||
wants = [ "network.target" ];
|
||||
after = [ "network.target" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
description = "Alice Looking Glass";
|
||||
serviceConfig = {
|
||||
DynamicUser = true;
|
||||
Type = "simple";
|
||||
Restart = "on-failure";
|
||||
RestartSec = 15;
|
||||
ExecStart = "${cfg.package}/bin/alice-lg";
|
||||
StateDirectoryMode = "0700";
|
||||
UMask = "0007";
|
||||
CapabilityBoundingSet = "";
|
||||
NoNewPrivileges = true;
|
||||
ProtectSystem = "strict";
|
||||
PrivateTmp = true;
|
||||
PrivateDevices = true;
|
||||
PrivateUsers = true;
|
||||
ProtectHostname = true;
|
||||
ProtectClock = true;
|
||||
ProtectKernelTunables = true;
|
||||
ProtectKernelModules = true;
|
||||
ProtectKernelLogs = true;
|
||||
ProtectControlGroups = true;
|
||||
RestrictAddressFamilies = [ "AF_INET AF_INET6" ];
|
||||
LockPersonality = true;
|
||||
MemoryDenyWriteExecute = true;
|
||||
RestrictRealtime = true;
|
||||
RestrictSUIDSGID = true;
|
||||
PrivateMounts = true;
|
||||
SystemCallArchitectures = "native";
|
||||
SystemCallFilter = "~@clock @privileged @cpu-emulation @debug @keyring @module @mount @obsolete @raw-io @reboot @setuid @swap";
|
||||
BindReadOnlyPaths = [
|
||||
"-/etc/resolv.conf"
|
||||
"-/etc/nsswitch.conf"
|
||||
"-/etc/ssl/certs"
|
||||
"-/etc/static/ssl/certs"
|
||||
"-/etc/hosts"
|
||||
"-/etc/localtime"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,129 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.services.birdwatcher;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
services.birdwatcher = {
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.birdwatcher;
|
||||
defaultText = literalExpression "pkgs.birdwatcher";
|
||||
description = lib.mdDoc "The Birdwatcher package to use.";
|
||||
};
|
||||
enable = mkEnableOption (lib.mdDoc "Birdwatcher");
|
||||
flags = mkOption {
|
||||
default = [ ];
|
||||
type = types.listOf types.str;
|
||||
example = [ "-worker-pool-size 16" "-6" ];
|
||||
description = lib.mdDoc ''
|
||||
Flags to append to the program call
|
||||
'';
|
||||
};
|
||||
|
||||
settings = mkOption {
|
||||
type = types.lines;
|
||||
default = { };
|
||||
description = lib.mdDoc ''
|
||||
birdwatcher configuration, for configuration options see the example on [github](https://github.com/alice-lg/birdwatcher/blob/master/etc/birdwatcher/birdwatcher.conf)
|
||||
'';
|
||||
example = literalExpression ''
|
||||
[server]
|
||||
allow_from = []
|
||||
allow_uncached = false
|
||||
modules_enabled = ["status",
|
||||
"protocols",
|
||||
"protocols_bgp",
|
||||
"protocols_short",
|
||||
"routes_protocol",
|
||||
"routes_peer",
|
||||
"routes_table",
|
||||
"routes_table_filtered",
|
||||
"routes_table_peer",
|
||||
"routes_filtered",
|
||||
"routes_prefixed",
|
||||
"routes_noexport",
|
||||
"routes_pipe_filtered_count",
|
||||
"routes_pipe_filtered"
|
||||
]
|
||||
|
||||
[status]
|
||||
reconfig_timestamp_source = "bird"
|
||||
reconfig_timestamp_match = "# created: (.*)"
|
||||
|
||||
filter_fields = []
|
||||
|
||||
[bird]
|
||||
listen = "0.0.0.0:29184"
|
||||
config = "/etc/bird/bird2.conf"
|
||||
birdc = "''${pkgs.bird}/bin/birdc"
|
||||
ttl = 5 # time to live (in minutes) for caching of cli output
|
||||
|
||||
[parser]
|
||||
filter_fields = []
|
||||
|
||||
[cache]
|
||||
use_redis = false # if not using redis cache, activate housekeeping to save memory!
|
||||
|
||||
[housekeeping]
|
||||
interval = 5
|
||||
force_release_memory = true
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config =
|
||||
let flagsStr = escapeShellArgs cfg.flags;
|
||||
in lib.mkIf cfg.enable {
|
||||
environment.etc."birdwatcher/birdwatcher.conf".source = pkgs.writeTextFile {
|
||||
name = "birdwatcher.conf";
|
||||
text = cfg.settings;
|
||||
};
|
||||
systemd.services = {
|
||||
birdwatcher = {
|
||||
wants = [ "network.target" ];
|
||||
after = [ "network.target" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
description = "Birdwatcher";
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
Restart = "on-failure";
|
||||
RestartSec = 15;
|
||||
ExecStart = "${cfg.package}/bin/birdwatcher";
|
||||
StateDirectoryMode = "0700";
|
||||
UMask = "0117";
|
||||
NoNewPrivileges = true;
|
||||
ProtectSystem = "strict";
|
||||
PrivateTmp = true;
|
||||
PrivateDevices = true;
|
||||
ProtectHostname = true;
|
||||
ProtectClock = true;
|
||||
ProtectKernelTunables = true;
|
||||
ProtectKernelModules = true;
|
||||
ProtectKernelLogs = true;
|
||||
ProtectControlGroups = true;
|
||||
RestrictAddressFamilies = [ "AF_UNIX AF_INET AF_INET6" ];
|
||||
LockPersonality = true;
|
||||
MemoryDenyWriteExecute = true;
|
||||
RestrictRealtime = true;
|
||||
RestrictSUIDSGID = true;
|
||||
PrivateMounts = true;
|
||||
SystemCallArchitectures = "native";
|
||||
SystemCallFilter = "~@clock @privileged @cpu-emulation @debug @keyring @module @mount @obsolete @raw-io @reboot @setuid @swap";
|
||||
BindReadOnlyPaths = [
|
||||
"-/etc/resolv.conf"
|
||||
"-/etc/nsswitch.conf"
|
||||
"-/etc/ssl/certs"
|
||||
"-/etc/static/ssl/certs"
|
||||
"-/etc/hosts"
|
||||
"-/etc/localtime"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -17,11 +17,12 @@ and optionally supports
|
||||
|
||||
For the database, you can set
|
||||
[`services.nextcloud.config.dbtype`](#opt-services.nextcloud.config.dbtype) to
|
||||
either `sqlite` (the default), `mysql`, or `pgsql`. For the last two, by
|
||||
default, a local database will be created and nextcloud will connect to it via
|
||||
socket; this can be disabled by setting
|
||||
either `sqlite` (the default), `mysql`, or `pgsql`. The simplest is `sqlite`,
|
||||
which will be automatically created and managed by the application. For the
|
||||
last two, you can easily create a local database by setting
|
||||
[`services.nextcloud.database.createLocally`](#opt-services.nextcloud.database.createLocally)
|
||||
to `false`.
|
||||
to `true`, Nextcloud will automatically be configured to connect to it through
|
||||
socket.
|
||||
|
||||
A very basic configuration may look like this:
|
||||
```
|
||||
@@ -30,6 +31,7 @@ A very basic configuration may look like this:
|
||||
services.nextcloud = {
|
||||
enable = true;
|
||||
hostName = "nextcloud.tld";
|
||||
database.createLocally = true;
|
||||
config = {
|
||||
dbtype = "pgsql";
|
||||
adminpassFile = "/path/to/admin-pass-file";
|
||||
|
||||
@@ -317,7 +317,7 @@ in {
|
||||
|
||||
createLocally = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
default = false;
|
||||
description = lib.mdDoc ''
|
||||
Create the database and database user locally.
|
||||
'';
|
||||
@@ -754,9 +754,8 @@ in {
|
||||
{ assertions = [
|
||||
{ assertion = cfg.database.createLocally -> cfg.config.dbpassFile == null;
|
||||
message = ''
|
||||
Using `services.nextcloud.database.createLocally` (that now defaults
|
||||
to true) with database password authentication is no longer
|
||||
supported.
|
||||
Using `services.nextcloud.database.createLocally` with database
|
||||
password authentication is no longer supported.
|
||||
|
||||
If you use an external database (or want to use password auth for any
|
||||
other reason), set `services.nextcloud.database.createLocally` to
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
# This test does a basic functionality check for alice-lg
|
||||
|
||||
{ system ? builtins.currentSystem
|
||||
, pkgs ? import ../.. { inherit system; config = { }; }
|
||||
}:
|
||||
|
||||
let
|
||||
inherit (import ../lib/testing-python.nix { inherit system pkgs; }) makeTest;
|
||||
inherit (pkgs.lib) optionalString;
|
||||
in
|
||||
makeTest {
|
||||
name = "birdwatcher";
|
||||
nodes = {
|
||||
host1 = {
|
||||
environment.systemPackages = with pkgs; [ jq ];
|
||||
services.alice-lg = {
|
||||
enable = true;
|
||||
settings = {
|
||||
server = {
|
||||
listen_http = "[::]:7340";
|
||||
enable_prefix_lookup = true;
|
||||
asn = 1;
|
||||
routes_store_refresh_parallelism = 5;
|
||||
neighbors_store_refresh_parallelism = 10000;
|
||||
routes_store_refresh_interval = 5;
|
||||
neighbors_store_refresh_interval = 5;
|
||||
};
|
||||
housekeeping = {
|
||||
interval = 5;
|
||||
force_release_memory = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
start_all()
|
||||
|
||||
host1.wait_for_unit("alice-lg.service")
|
||||
host1.wait_for_open_port(7340)
|
||||
host1.succeed("curl http://[::]:7340 | grep 'Alice BGP Looking Glass'")
|
||||
'';
|
||||
}
|
||||
@@ -102,6 +102,7 @@ in {
|
||||
airsonic = handleTest ./airsonic.nix {};
|
||||
akkoma = handleTestOn [ "x86_64-linux" "aarch64-linux" ] ./akkoma.nix {};
|
||||
akkoma-confined = handleTestOn [ "x86_64-linux" "aarch64-linux" ] ./akkoma.nix { confined = true; };
|
||||
alice-lg = handleTest ./alice-lg.nix {};
|
||||
allTerminfo = handleTest ./all-terminfo.nix {};
|
||||
alps = handleTest ./alps.nix {};
|
||||
amazon-init-shell = handleTest ./amazon-init-shell.nix {};
|
||||
@@ -123,6 +124,7 @@ in {
|
||||
binary-cache = handleTest ./binary-cache.nix {};
|
||||
bind = handleTest ./bind.nix {};
|
||||
bird = handleTest ./bird.nix {};
|
||||
birdwatcher = handleTest ./birdwatcher.nix {};
|
||||
bitcoind = handleTest ./bitcoind.nix {};
|
||||
bittorrent = handleTest ./bittorrent.nix {};
|
||||
blockbook-frontend = handleTest ./blockbook-frontend.nix {};
|
||||
@@ -562,6 +564,7 @@ in {
|
||||
pam-oath-login = handleTest ./pam/pam-oath-login.nix {};
|
||||
pam-u2f = handleTest ./pam/pam-u2f.nix {};
|
||||
pam-ussh = handleTest ./pam/pam-ussh.nix {};
|
||||
pam-zfs-key = handleTest ./pam/zfs-key.nix {};
|
||||
pass-secret-service = handleTest ./pass-secret-service.nix {};
|
||||
patroni = handleTestOn ["x86_64-linux"] ./patroni.nix {};
|
||||
pantalaimon = handleTest ./matrix/pantalaimon.nix {};
|
||||
|
||||
@@ -0,0 +1,94 @@
|
||||
# This test does a basic functionality check for birdwatcher
|
||||
|
||||
{ system ? builtins.currentSystem
|
||||
, pkgs ? import ../.. { inherit system; config = { }; }
|
||||
}:
|
||||
|
||||
let
|
||||
inherit (import ../lib/testing-python.nix { inherit system pkgs; }) makeTest;
|
||||
inherit (pkgs.lib) optionalString;
|
||||
in
|
||||
makeTest {
|
||||
name = "birdwatcher";
|
||||
nodes = {
|
||||
host1 = {
|
||||
environment.systemPackages = with pkgs; [ jq ];
|
||||
services.bird2 = {
|
||||
enable = true;
|
||||
config = ''
|
||||
log syslog all;
|
||||
|
||||
debug protocols all;
|
||||
|
||||
router id 10.0.0.1;
|
||||
|
||||
protocol device {
|
||||
}
|
||||
|
||||
protocol kernel kernel4 {
|
||||
ipv4 {
|
||||
import none;
|
||||
export all;
|
||||
};
|
||||
}
|
||||
|
||||
protocol kernel kernel6 {
|
||||
ipv6 {
|
||||
import none;
|
||||
export all;
|
||||
};
|
||||
}
|
||||
'';
|
||||
};
|
||||
services.birdwatcher = {
|
||||
enable = true;
|
||||
settings = ''
|
||||
[server]
|
||||
allow_from = []
|
||||
allow_uncached = false
|
||||
modules_enabled = ["status",
|
||||
"protocols",
|
||||
"protocols_bgp",
|
||||
"protocols_short",
|
||||
"routes_protocol",
|
||||
"routes_peer",
|
||||
"routes_table",
|
||||
"routes_table_filtered",
|
||||
"routes_table_peer",
|
||||
"routes_filtered",
|
||||
"routes_prefixed",
|
||||
"routes_noexport",
|
||||
"routes_pipe_filtered_count",
|
||||
"routes_pipe_filtered"
|
||||
]
|
||||
[status]
|
||||
reconfig_timestamp_source = "bird"
|
||||
reconfig_timestamp_match = "# created: (.*)"
|
||||
filter_fields = []
|
||||
[bird]
|
||||
listen = "0.0.0.0:29184"
|
||||
config = "/etc/bird/bird2.conf"
|
||||
birdc = "${pkgs.bird}/bin/birdc"
|
||||
ttl = 5 # time to live (in minutes) for caching of cli output
|
||||
[parser]
|
||||
filter_fields = []
|
||||
[cache]
|
||||
use_redis = false # if not using redis cache, activate housekeeping to save memory!
|
||||
[housekeeping]
|
||||
interval = 5
|
||||
force_release_memory = true
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
start_all()
|
||||
|
||||
host1.wait_for_unit("bird2.service")
|
||||
host1.wait_for_unit("birdwatcher.service")
|
||||
host1.wait_for_open_port(29184)
|
||||
host1.succeed("curl http://[::]:29184/status | jq -r .status.message | grep 'Daemon is up and running'")
|
||||
host1.succeed("curl http://[::]:29184/protocols | jq -r .protocols.device1.state | grep 'up'")
|
||||
'';
|
||||
}
|
||||
@@ -43,6 +43,7 @@ in {
|
||||
enable = true;
|
||||
datadir = "/var/lib/nextcloud-data";
|
||||
hostName = "nextcloud";
|
||||
database.createLocally = true;
|
||||
config = {
|
||||
# Don't inherit adminuser since "root" is supposed to be the default
|
||||
adminpassFile = "${pkgs.writeText "adminpass" adminpass}"; # Don't try this at home!
|
||||
|
||||
@@ -9,6 +9,7 @@ args@{ pkgs, nextcloudVersion ? 25, ... }:
|
||||
services.nextcloud = {
|
||||
enable = true;
|
||||
config.adminpassFile = "${pkgs.writeText "adminpass" adminpass}";
|
||||
database.createLocally = true;
|
||||
package = pkgs.${"nextcloud" + (toString nextcloudVersion)};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -26,6 +26,7 @@ in {
|
||||
redis = false;
|
||||
memcached = true;
|
||||
};
|
||||
database.createLocally = true;
|
||||
config = {
|
||||
dbtype = "mysql";
|
||||
# Don't inherit adminuser since "root" is supposed to be the default
|
||||
|
||||
@@ -25,6 +25,7 @@ in {
|
||||
redis = true;
|
||||
memcached = false;
|
||||
};
|
||||
database.createLocally = true;
|
||||
config = {
|
||||
dbtype = "pgsql";
|
||||
inherit adminuser;
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
import ../make-test-python.nix ({ ... }:
|
||||
|
||||
let
|
||||
userPassword = "password";
|
||||
mismatchPass = "mismatch";
|
||||
in
|
||||
{
|
||||
name = "pam-zfs-key";
|
||||
|
||||
nodes.machine =
|
||||
{ ... }: {
|
||||
boot.supportedFilesystems = [ "zfs" ];
|
||||
|
||||
networking.hostId = "12345678";
|
||||
|
||||
security.pam.zfs.enable = true;
|
||||
|
||||
users.users = {
|
||||
alice = {
|
||||
isNormalUser = true;
|
||||
password = userPassword;
|
||||
};
|
||||
bob = {
|
||||
isNormalUser = true;
|
||||
password = userPassword;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
testScript = { nodes, ... }:
|
||||
let
|
||||
homes = nodes.machine.security.pam.zfs.homes;
|
||||
pool = builtins.head (builtins.split "/" homes);
|
||||
in
|
||||
''
|
||||
machine.wait_for_unit("multi-user.target")
|
||||
machine.wait_until_succeeds("pgrep -f 'agetty.*tty1'")
|
||||
|
||||
with subtest("Create encrypted ZFS datasets"):
|
||||
machine.succeed("truncate -s 64M /testpool.img")
|
||||
machine.succeed("zpool create -O canmount=off '${pool}' /testpool.img")
|
||||
machine.succeed("zfs create -o canmount=off -p '${homes}'")
|
||||
machine.succeed("echo ${userPassword} | zfs create -o canmount=noauto -o encryption=on -o keyformat=passphrase '${homes}/alice'")
|
||||
machine.succeed("zfs unload-key '${homes}/alice'")
|
||||
machine.succeed("echo ${mismatchPass} | zfs create -o canmount=noauto -o encryption=on -o keyformat=passphrase '${homes}/bob'")
|
||||
machine.succeed("zfs unload-key '${homes}/bob'")
|
||||
|
||||
with subtest("Switch to tty2"):
|
||||
machine.fail("pgrep -f 'agetty.*tty2'")
|
||||
machine.send_key("alt-f2")
|
||||
machine.wait_until_succeeds("[ $(fgconsole) = 2 ]")
|
||||
machine.wait_for_unit("getty@tty2.service")
|
||||
machine.wait_until_succeeds("pgrep -f 'agetty.*tty2'")
|
||||
|
||||
with subtest("Log in as user with home locked by login password"):
|
||||
machine.wait_until_tty_matches("2", "login: ")
|
||||
machine.send_chars("alice\n")
|
||||
machine.wait_until_tty_matches("2", "login: alice")
|
||||
machine.wait_until_succeeds("pgrep login")
|
||||
machine.wait_until_tty_matches("2", "Password: ")
|
||||
machine.send_chars("${userPassword}\n")
|
||||
machine.wait_until_succeeds("pgrep -u alice bash")
|
||||
machine.succeed("mount | grep ${homes}/alice")
|
||||
|
||||
with subtest("Switch to tty3"):
|
||||
machine.fail("pgrep -f 'agetty.*tty3'")
|
||||
machine.send_key("alt-f3")
|
||||
machine.wait_until_succeeds("[ $(fgconsole) = 3 ]")
|
||||
machine.wait_for_unit("getty@tty3.service")
|
||||
machine.wait_until_succeeds("pgrep -f 'agetty.*tty3'")
|
||||
|
||||
with subtest("Log in as user with home locked by password different from login"):
|
||||
machine.wait_until_tty_matches("3", "login: ")
|
||||
machine.send_chars("bob\n")
|
||||
machine.wait_until_tty_matches("3", "login: bob")
|
||||
machine.wait_until_succeeds("pgrep login")
|
||||
machine.wait_until_tty_matches("3", "Password: ")
|
||||
machine.send_chars("${userPassword}\n")
|
||||
machine.wait_until_succeeds("pgrep -u bob bash")
|
||||
machine.fail("mount | grep ${homes}/bob")
|
||||
'';
|
||||
}
|
||||
)
|
||||
@@ -21,7 +21,7 @@ let
|
||||
shutil.copyfile("${machine.system.build.diskImage}/nixos.img", tmp_disk_image.name)
|
||||
|
||||
subprocess.run([
|
||||
"${pkgs.qemu}/bin/qemu-img",
|
||||
"${machine.config.virtualisation.qemu.package}/bin/qemu-img",
|
||||
"resize",
|
||||
"-f",
|
||||
"raw",
|
||||
|
||||
@@ -16,13 +16,13 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "mympd";
|
||||
version = "10.3.1";
|
||||
version = "10.3.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "jcorporation";
|
||||
repo = "myMPD";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-KQf+Szr/AunL/roCtRPiC771P2A3POXPFlXUhbNej6g=";
|
||||
sha256 = "sha256-VnV0jZp2ymsZkVIDBYXHhJTR10CZ74wutue1GTGQtxI=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
||||
Generated
+1406
-799
File diff suppressed because it is too large
Load Diff
@@ -16,22 +16,21 @@ let
|
||||
in
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "psst";
|
||||
version = "unstable-2022-10-13";
|
||||
version = "unstable-2023-05-13";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "jpochyla";
|
||||
repo = pname;
|
||||
rev = "d70ed8104533dc15bc36b989ba8428872c9b578f";
|
||||
hash = "sha256-ZKhHN0ruLb6ZVKkrKv/YawRsVop6SP1QF/nrtkmA8P8=";
|
||||
rev = "f94af14aa9fdd3d59cd92849fa7f076103b37a70";
|
||||
hash = "sha256-Cmpdyec1xe7j10LDm+iCaKlBICHkmmbhKz2nDeOFOF8=";
|
||||
};
|
||||
|
||||
cargoLock = {
|
||||
lockFile = ./Cargo.lock;
|
||||
outputHashes = {
|
||||
"cubeb-0.10.1" = "sha256-PRQL8dq5BAsodbVlm5SnuzUDLg9/UY3BmoumcmWF+aY=";
|
||||
"druid-0.7.0" = "sha256-fnsm+KGsuePLRRjTecJ0GBQEySSeDIth13AX/aAigqU=";
|
||||
"druid-enums-0.1.0" = "sha256-4fo0ywoK+m4OuqYlbNbJS2BZK/VBFqeAYEFNGnGUVmM=";
|
||||
"piet-0.5.0" = "sha256-hCg8vABnLAO8egFwMtRSpRdzH6auETrICoUfuBZVzz8=";
|
||||
"cubeb-0.10.3" = "sha256-3eHW+kIJydF6nF0EkB/vglOvksfol+xIKoqFsKg3omI=";
|
||||
"druid-0.8.3" = "sha256-hTB9PQf2TAhcLr64VjjQIr18mczwcNogDSRSN5dQULA=";
|
||||
"druid-enums-0.1.0" = "sha256-KJvAgKxicx/g+4QRZq3iHt6MGVQbfOpyN+EhS6CyDZk=";
|
||||
};
|
||||
};
|
||||
# specify the subdirectory of the binary crate to build from the workspace
|
||||
@@ -50,11 +49,20 @@ rustPlatform.buildRustPackage rec {
|
||||
pango
|
||||
];
|
||||
|
||||
patches = [
|
||||
# Use a fixed build time, hard-code upstream URL instead of trying to read `.git`
|
||||
./make-build-reproducible.patch
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
install -Dm444 psst-gui/assets/logo_512.png $out/share/icons/hicolor/512x512/apps/${pname}.png
|
||||
install -Dm444 -t $out/share/applications ${desktopItem}/share/applications/*
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
updateScript = ./update.sh;
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "Fast and multi-platform Spotify client with native GUI";
|
||||
homepage = "https://github.com/jpochyla/psst";
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
diff --git a/psst-core/build.rs b/psst-core/build.rs
|
||||
deleted file mode 100644
|
||||
index 1057827..0000000
|
||||
--- a/psst-core/build.rs
|
||||
+++ /dev/null
|
||||
@@ -1,37 +0,0 @@
|
||||
-use std::{env, fs, io::Write};
|
||||
-
|
||||
-fn main() {
|
||||
- let outdir = env::var("OUT_DIR").unwrap();
|
||||
- let outfile = format!("{}/build-time.txt", outdir);
|
||||
-
|
||||
- let mut fh = fs::File::create(outfile).unwrap();
|
||||
- write!(fh, r#""{}""#, chrono::Local::now()).ok();
|
||||
-
|
||||
- let git_config = gix_config::File::from_git_dir("../.git/").expect("Git Config not found!");
|
||||
- // Get Git's 'Origin' URL
|
||||
- let mut remote_url = git_config
|
||||
- .raw_value("remote", Some("origin".as_ref()), "url")
|
||||
- .expect("Couldn't extract origin url!")
|
||||
- .to_string();
|
||||
- // Check whether origin is accessed via ssh
|
||||
- if remote_url.contains('@') {
|
||||
- // If yes, strip the `git@` prefix and split the domain and path
|
||||
- let mut split = remote_url
|
||||
- .strip_prefix("git@")
|
||||
- .unwrap_or(&remote_url)
|
||||
- .split(':');
|
||||
- let domain = split
|
||||
- .next()
|
||||
- .expect("Couldn't extract domain from ssh-style origin");
|
||||
- let path = split
|
||||
- .next()
|
||||
- .expect("Couldn't expect path from ssh-style origin");
|
||||
-
|
||||
- // And construct the http-style url
|
||||
- remote_url = format!("https://{domain}/{path}");
|
||||
- }
|
||||
- remote_url = remote_url.trim_end_matches(".git").to_owned();
|
||||
- let outfile = format!("{}/remote-url.txt", outdir);
|
||||
- let mut file = fs::File::create(outfile).unwrap();
|
||||
- write!(file, r#""{}""#, remote_url).ok();
|
||||
-}
|
||||
diff --git a/psst-core/src/lib.rs b/psst-core/src/lib.rs
|
||||
index fcbd491..2d71ee3 100644
|
||||
--- a/psst-core/src/lib.rs
|
||||
+++ b/psst-core/src/lib.rs
|
||||
@@ -3,8 +3,8 @@
|
||||
use git_version::git_version;
|
||||
|
||||
-pub const GIT_VERSION: &str = git_version!();
|
||||
-pub const BUILD_TIME: &str = include!(concat!(env!("OUT_DIR"), "/build-time.txt"));
|
||||
-pub const REMOTE_URL: &str = include!(concat!(env!("OUT_DIR"), "/remote-url.txt"));
|
||||
+pub const GIT_VERSION: &str = "f94af14aa9fdd3d59cd92849fa7f076103b37a70";
|
||||
+pub const BUILD_TIME: &str = "1970-01-01 00:00:00";
|
||||
+pub const REMOTE_URL: &str = "https://github.com/jpochyla/psst";
|
||||
|
||||
pub mod actor;
|
||||
pub mod audio;
|
||||
Executable
+44
@@ -0,0 +1,44 @@
|
||||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p nix wget nix-prefetch-github jq coreutils
|
||||
|
||||
# shellcheck shell=bash
|
||||
|
||||
if [ -n "$GITHUB_TOKEN" ]; then
|
||||
TOKEN_ARGS=(--header "Authorization: token $GITHUB_TOKEN")
|
||||
fi
|
||||
|
||||
if [[ $# -gt 1 || $1 == -* ]]; then
|
||||
echo "Regenerates packaging data for psst."
|
||||
echo "Usage: $0 [git commit]"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
set -x
|
||||
|
||||
cd "$(dirname "$0")"
|
||||
rev="$1"
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
if [ -z "$rev" ]; then
|
||||
rev="$(wget -O- "${TOKEN_ARGS[@]}" "https://api.github.com/repos/jpochyla/psst/commits?per_page=1" | jq -r '.[0].sha')"
|
||||
fi
|
||||
|
||||
version="unstable-$(date +%F)"
|
||||
|
||||
# Sources
|
||||
src_hash=$(nix-prefetch-github jpochyla psst --rev "$rev" | jq -r .sha256)
|
||||
|
||||
# Cargo.lock
|
||||
src="https://raw.githubusercontent.com/jpochyla/psst/$rev"
|
||||
wget "${TOKEN_ARGS[@]}" "$src/Cargo.lock" -O Cargo.lock
|
||||
|
||||
# Use friendlier hashes
|
||||
src_hash=$(nix hash to-sri --type sha256 "$src_hash")
|
||||
|
||||
sed -i -E -e "s#version = \".*\"#version = \"$version\"#" default.nix
|
||||
sed -i -E -e "s#rev = \".*\"#rev = \"$rev\"#" default.nix
|
||||
sed -i -E -e "s#hash = \".*\"#hash = \"$src_hash\"#" default.nix
|
||||
|
||||
# Also update the git hash shown in the UI
|
||||
sed -i -E -e "s#GIT_VERSION = \".*\"#GIT_VERSION = \"$rev\"#" make-build-reproducible.patch
|
||||
@@ -2,11 +2,11 @@
|
||||
|
||||
let
|
||||
pname = "ledger-live-desktop";
|
||||
version = "2.57.0";
|
||||
version = "2.58.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://download.live.ledger.com/${pname}-${version}-linux-x86_64.AppImage";
|
||||
hash = "sha256-fXvCj9eBEp/kGPSiNUdir19eU0x461KzXgl5YgeapHI=";
|
||||
hash = "sha256-y9D+RKAB/woYmnu8X0armsVaxu0CWbqZpRiEFcN7rYM=";
|
||||
};
|
||||
|
||||
appimageContents = appimageTools.extractType2 {
|
||||
|
||||
@@ -37,7 +37,7 @@ stdenv.mkDerivation rec {
|
||||
owner = "MCJack123";
|
||||
repo = "craftos2";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-Vb6mvim42Kvn7A3Qsp4gvTRBGQ5OJ9pVij96LZwWyuQ=";
|
||||
sha256 = "sha256-9XMc7zmtPxlt3WgS93lUJNMFtUJ/llG9SFGtgdFqZEA=";
|
||||
};
|
||||
|
||||
buildInputs = [ patchelf poco openssl SDL2 SDL2_mixer ncurses libpng pngpp libwebp ];
|
||||
|
||||
@@ -2,16 +2,16 @@
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "argo-rollouts";
|
||||
version = "1.4.1";
|
||||
version = "1.5.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "argoproj";
|
||||
repo = "argo-rollouts";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-MpiKdPjQRF1LzNxBvPucoeRkDfboJdStfQ6X+d2jiwk=";
|
||||
sha256 = "sha256-bOGC4RAeydPCvqyQZE+K0N01xRIGsoiwKJ4lMwVVgGk=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-ZIFZCMyhpfKK/Irq2/MvkXuXX1jExDaSK/nXZgzCZgU=";
|
||||
vendorHash = "sha256-IxSLlRsOz/Xamguxm+7jy8qAAEZZFm/NHDIBjm5tnCs=";
|
||||
|
||||
# Disable tests since some test fail because of missing test data
|
||||
doCheck = false;
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
{ lib
|
||||
, fetchFromGitHub
|
||||
, stdenv
|
||||
, cmake
|
||||
, copyDesktopItems
|
||||
, makeDesktopItem
|
||||
, makeWrapper
|
||||
, pkg-config
|
||||
, curl
|
||||
, gtkmm3
|
||||
, libhandy
|
||||
, libsecret
|
||||
, nlohmann_json
|
||||
, sqlite
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "abaddon";
|
||||
version = "0.1.10";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "uowuo";
|
||||
repo = "abaddon";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-84DrPx0e3pZjg87dHZO4y/z7KfIYNyAibE7/J7oYwXA=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
copyDesktopItems
|
||||
makeWrapper
|
||||
pkg-config
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
curl
|
||||
gtkmm3
|
||||
libhandy
|
||||
libsecret
|
||||
nlohmann_json
|
||||
sqlite
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/share/abaddon
|
||||
cp -r ../res/{css,res} $out/share/abaddon
|
||||
mkdir $out/bin
|
||||
cp abaddon $out/bin
|
||||
wrapProgram $out/bin/abaddon \
|
||||
--chdir $out/share/abaddon
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
desktopItems = [
|
||||
(makeDesktopItem {
|
||||
name = pname;
|
||||
exec = pname;
|
||||
desktopName = "Abaddon";
|
||||
genericName = meta.description;
|
||||
startupWMClass = pname;
|
||||
categories = [ "Network" "InstantMessaging" ];
|
||||
mimeTypes = [ "x-scheme-handler/discord" ];
|
||||
})
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A discord client reimplementation, written in C++";
|
||||
homepage = "https://github.com/uowuo/abaddon";
|
||||
license = licenses.gpl3Plus;
|
||||
maintainers = with maintainers; [ genericnerdyusername ];
|
||||
platforms = lib.intersectLists lib.platforms.x86_64 lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
@@ -8,13 +8,13 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "fastp";
|
||||
version = "0.23.2";
|
||||
version = "0.23.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "OpenGene";
|
||||
repo = "fastp";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-W1mXTfxD7/gHJhao6qqbNcyM3t2cfrUYiBYPJi/O1RI=";
|
||||
sha256 = "sha256-9YHm5LIKJJpMavlWMZXD5ZgTgT5w9eXuXwQVa/prux8=";
|
||||
};
|
||||
|
||||
buildInputs = [ zlib libdeflate isa-l ];
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{ lib
|
||||
, fetchFromGitHub
|
||||
, fetchpatch
|
||||
, python3Packages
|
||||
, runtimeShell
|
||||
, bcftools
|
||||
@@ -24,6 +25,19 @@ in python3Packages.buildPythonApplication rec {
|
||||
hash = "sha256-UJNMKEV5m2jFqnWvkVAtymkcE2TjPIXp7JqRZpMSqsE=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
name = "fix-anno-trf-on-darwin.patch";
|
||||
url = "https://github.com/ACEnglish/truvari/commit/f9f36305e8eaa88f951562210e3672a4d4f71265.patch";
|
||||
hash = "sha256-7O9jTQDCC2b8hUBm0qJQCYMzTC9NFtn/E0dTHSfJALU=";
|
||||
})
|
||||
(fetchpatch {
|
||||
name = "fix-anno-grm-on-darwin.patch";
|
||||
url = "https://github.com/ACEnglish/truvari/commit/31416552008a506204ed4e2add55474f10392357.patch";
|
||||
hash = "sha256-42u0ewZU38GCoSfff+XQFv9hEFeO3WlJufTHcl6vkN4=";
|
||||
})
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace setup.py \
|
||||
--replace "rich==" "rich>="
|
||||
|
||||
@@ -27,13 +27,13 @@ let
|
||||
in
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "labwc";
|
||||
version = "0.6.2";
|
||||
version = "0.6.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "labwc";
|
||||
repo = "labwc";
|
||||
rev = finalAttrs.version;
|
||||
hash = "sha256-yZ1tXx7AA9pFc5C6c/J3B03/TfXw1PsAunNNiee3BGU=";
|
||||
hash = "sha256-d8cbY1NbW5LLKxkoh+PFelPhikDOwBrFt3jfizKSb/0=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
{ lib, ncurses, graphviz, lua, fetchzip,
|
||||
mkCoqDerivation, recurseIntoAttrs, withDoc ? false, single ? false,
|
||||
coqPackages, coq, version ? null }@args:
|
||||
coqPackages, coq, hierarchy-builder, version ? null }@args:
|
||||
with builtins // lib;
|
||||
let
|
||||
repo = "math-comp";
|
||||
@@ -20,6 +20,7 @@ let
|
||||
withDoc = single && (args.withDoc or false);
|
||||
defaultVersion = with versions; lib.switch coq.coq-version [
|
||||
{ case = range "8.13" "8.17"; out = "1.16.0"; }
|
||||
{ case = range "8.16" "8.17"; out = "2.0.0"; }
|
||||
{ case = range "8.14" "8.16"; out = "1.15.0"; }
|
||||
{ case = range "8.11" "8.15"; out = "1.14.0"; }
|
||||
{ case = range "8.11" "8.15"; out = "1.13.0"; }
|
||||
@@ -32,6 +33,7 @@ let
|
||||
{ case = range "8.5" "8.7"; out = "1.6.4"; }
|
||||
] null;
|
||||
release = {
|
||||
"2.0.0".sha256 = "sha256-dpOmrHYUXBBS9kmmz7puzufxlbNpIZofpcTvJFLG5DI=";
|
||||
"1.16.0".sha256 = "sha256-gXTKhRgSGeRBUnwdDezMsMKbOvxdffT+kViZ9e1gEz0=";
|
||||
"1.15.0".sha256 = "1bp0jxl35ms54s0mdqky15w9af03f3i0n06qk12k4gw1xzvwqv21";
|
||||
"1.14.0".sha256 = "07yamlp1c0g5nahkd2gpfhammcca74ga2s6qr7a3wm6y6j5pivk9";
|
||||
@@ -113,13 +115,20 @@ let
|
||||
o.version != null && o.version != "dev" && versions.isLt "1.7" o.version)
|
||||
{ preBuild = ""; buildPhase = ""; installPhase = "echo doing nothing"; }
|
||||
);
|
||||
patched-derivation = patched-derivation1.overrideAttrs (o:
|
||||
patched-derivation2 = patched-derivation1.overrideAttrs (o:
|
||||
optionalAttrs (versions.isLe "8.7" coq.coq-version ||
|
||||
(o.version != "dev" && versions.isLe "1.7" o.version))
|
||||
{
|
||||
installFlags = o.installFlags ++ [ "-f Makefile.coq" ];
|
||||
}
|
||||
);
|
||||
patched-derivation = patched-derivation2.overrideAttrs (o:
|
||||
optionalAttrs (o.version != null
|
||||
&& (o.version == "dev" || versions.isGe "2.0.0" o.version))
|
||||
{
|
||||
propagatedBuildInputs = o.propagatedBuildInputs ++ [ hierarchy-builder ];
|
||||
}
|
||||
);
|
||||
in patched-derivation;
|
||||
in
|
||||
mathcomp_ (if single then "single" else "all")
|
||||
|
||||
@@ -34,7 +34,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
inherit libsigsegv gettext coreutils;
|
||||
|
||||
ffcallAvailable = stdenv.isLinux && (libffcall != null);
|
||||
ffcallAvailable = libffcall != null;
|
||||
|
||||
buildInputs = [libsigsegv]
|
||||
++ lib.optional (gettext != null) gettext
|
||||
@@ -101,8 +101,7 @@ stdenv.mkDerivation rec {
|
||||
homepage = "http://clisp.cons.org";
|
||||
maintainers = lib.teams.lisp.members;
|
||||
platforms = lib.platforms.unix;
|
||||
# problems on Darwin: https://github.com/NixOS/nixpkgs/issues/20062
|
||||
broken = stdenv.hostPlatform.isDarwin || stdenv.hostPlatform.isAarch64;
|
||||
broken = stdenv.hostPlatform.isAarch64;
|
||||
license = lib.licenses.gpl2;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -93,6 +93,7 @@ stdenv.mkDerivation rec {
|
||||
homepage = "http://clisp.cons.org";
|
||||
maintainers = lib.teams.lisp.members;
|
||||
# problems on Darwin: https://github.com/NixOS/nixpkgs/issues/20062
|
||||
platforms = lib.platforms.linux;
|
||||
platforms = lib.platforms.unix;
|
||||
broken = stdenv.hostPlatform.isDarwin;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "sha256-SU1pPmLLeTWZe5ybhmDplFw6O/vpEjFAKgfKDl0RS4U=";
|
||||
};
|
||||
|
||||
makeFlags = [ "PREFIX=$(out)" ];
|
||||
makeFlags = [ "PREFIX=$(out)" "AR=${stdenv.cc.targetPrefix}ar" ];
|
||||
|
||||
# Just let the installPhase build stuff, because there's no
|
||||
# non-install target that builds everything anyway.
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
, licenseAccepted ? false
|
||||
}:
|
||||
|
||||
{ cmdLineToolsVersion ? "8.0"
|
||||
{ cmdLineToolsVersion ? "9.0"
|
||||
, toolsVersion ? "26.1.1"
|
||||
, platformToolsVersion ? "33.0.3"
|
||||
, buildToolsVersions ? [ "33.0.1" ]
|
||||
, platformToolsVersion ? "34.0.1"
|
||||
, buildToolsVersions ? [ "33.0.2" ]
|
||||
, includeEmulator ? false
|
||||
, emulatorVersion ? "31.3.14"
|
||||
, emulatorVersion ? "33.1.6"
|
||||
, platformVersions ? []
|
||||
, includeSources ? false
|
||||
, includeSystemImages ? false
|
||||
@@ -15,7 +15,7 @@
|
||||
, abiVersions ? [ "armeabi-v7a" "arm64-v8a" ]
|
||||
, cmakeVersions ? [ ]
|
||||
, includeNDK ? false
|
||||
, ndkVersion ? "25.1.8937393"
|
||||
, ndkVersion ? "25.2.9519653"
|
||||
, ndkVersions ? [ndkVersion]
|
||||
, useGoogleAPIs ? false
|
||||
, useGoogleTVAddOns ? false
|
||||
|
||||
@@ -115,7 +115,7 @@ pkgs.mkShell rec {
|
||||
echo "installed_packages_section: ''${installed_packages_section}"
|
||||
|
||||
packages=(
|
||||
"build-tools;33.0.1" "cmdline-tools;8.0" \
|
||||
"build-tools;33.0.2" "cmdline-tools;9.0" \
|
||||
"emulator" "patcher;v4" "platform-tools" "platforms;android-33" \
|
||||
"system-images;android-33;google_apis;arm64-v8a" \
|
||||
"system-images;android-33;google_apis;x86_64"
|
||||
|
||||
@@ -25,15 +25,15 @@ let
|
||||
# versions may be used in multiple places in this Nix expression.
|
||||
android = {
|
||||
versions = {
|
||||
cmdLineToolsVersion = "8.0";
|
||||
platformTools = "33.0.3";
|
||||
buildTools = "30.0.3";
|
||||
cmdLineToolsVersion = "9.0";
|
||||
platformTools = "34.0.1";
|
||||
buildTools = "33.0.2";
|
||||
ndk = [
|
||||
"25.1.8937393" # LTS NDK
|
||||
"24.0.8215888"
|
||||
"25.2.9519653"
|
||||
];
|
||||
cmake = "3.22.1";
|
||||
emulator = "31.3.14";
|
||||
cmake = "3.6.4111459";
|
||||
emulator = "33.1.6";
|
||||
};
|
||||
|
||||
platforms = ["23" "24" "25" "26" "27" "28" "29" "30" "31" "32" "33"];
|
||||
@@ -165,7 +165,7 @@ pkgs.mkShell rec {
|
||||
installed_packages_section=$(echo "''${output%%Available Packages*}" | awk 'NR>4 {print $1}')
|
||||
|
||||
packages=(
|
||||
"build-tools;30.0.3" "platform-tools" \
|
||||
"build-tools;33.0.2" "platform-tools" \
|
||||
"platforms;android-23" "platforms;android-24" "platforms;android-25" "platforms;android-26" \
|
||||
"platforms;android-27" "platforms;android-28" "platforms;android-29" "platforms;android-30" \
|
||||
"platforms;android-31" "platforms;android-32" "platforms;android-33" \
|
||||
|
||||
@@ -177,8 +177,8 @@ def empty? value
|
||||
!value || value.empty?
|
||||
end
|
||||
|
||||
# Fixes up returned hashes by sorting keys.
|
||||
# Will also convert archives (e.g. {'linux' => {'sha1' => ...}, 'macosx' => ...} to
|
||||
# Fixes up returned hashes by converting archives like
|
||||
# (e.g. {'linux' => {'sha1' => ...}, 'macosx' => ...} to
|
||||
# [{'os' => 'linux', 'sha1' => ...}, {'os' => 'macosx', ...}, ...].
|
||||
def fixup value
|
||||
Hash[value.map do |k, v|
|
||||
@@ -191,7 +191,35 @@ def fixup value
|
||||
else
|
||||
[k, v]
|
||||
end
|
||||
end.sort {|(k1, v1), (k2, v2)| k1 <=> k2 }]
|
||||
end]
|
||||
end
|
||||
|
||||
# Today since Unix Epoch, January 1, 1970.
|
||||
def today
|
||||
Time.now.utc.to_i / 24 / 60 / 60
|
||||
end
|
||||
|
||||
# The expiration strategy. Expire if the last available day was before the `oldest_valid_day`.
|
||||
def expire_records record, oldest_valid_day
|
||||
if record.is_a?(Hash)
|
||||
if record.has_key?('last-available-day') &&
|
||||
record['last-available-day'] < oldest_valid_day
|
||||
return nil
|
||||
end
|
||||
update = {}
|
||||
# This should only happen in the first run of this scrip after adding the `expire_record` function.
|
||||
if record.has_key?('displayName') &&
|
||||
!record.has_key?('last-available-day')
|
||||
update['last-available-day'] = today
|
||||
end
|
||||
record.each {|key, value|
|
||||
v = expire_records value, oldest_valid_day
|
||||
update[key] = v if v
|
||||
}
|
||||
update
|
||||
else
|
||||
record
|
||||
end
|
||||
end
|
||||
|
||||
# Normalize the specified license text.
|
||||
@@ -253,6 +281,7 @@ def parse_package_xml doc
|
||||
target['dependencies'] ||= dependencies if dependencies
|
||||
target['archives'] ||= {}
|
||||
merge target['archives'], archives
|
||||
target['last-available-day'] = today
|
||||
end
|
||||
|
||||
[licenses, packages]
|
||||
@@ -294,6 +323,7 @@ def parse_image_xml doc
|
||||
target['dependencies'] ||= dependencies if dependencies
|
||||
target['archives'] ||= {}
|
||||
merge target['archives'], archives
|
||||
target['last-available-day'] = today
|
||||
end
|
||||
|
||||
[licenses, images]
|
||||
@@ -351,19 +381,36 @@ def parse_addon_xml doc
|
||||
target['dependencies'] ||= dependencies if dependencies
|
||||
target['archives'] ||= {}
|
||||
merge target['archives'], archives
|
||||
target['last-available-day'] = today
|
||||
end
|
||||
|
||||
[licenses, addons, extras]
|
||||
end
|
||||
|
||||
# Make the clean diff by always sorting the result before puting it in the stdout.
|
||||
def sort_recursively value
|
||||
if value.is_a?(Hash)
|
||||
Hash[
|
||||
value.map do |k, v|
|
||||
[k, sort_recursively(v)]
|
||||
end.sort_by {|(k, v)| k }
|
||||
]
|
||||
elsif value.is_a?(Array)
|
||||
value.map do |v| sort_recursively(v) end
|
||||
else
|
||||
value
|
||||
end
|
||||
end
|
||||
|
||||
def merge_recursively a, b
|
||||
a.merge!(b) {|key, a_item, b_item|
|
||||
if a_item.is_a?(Hash) && b_item.is_a?(Hash)
|
||||
merge_recursively(a_item, b_item)
|
||||
else
|
||||
a[key] = b_item
|
||||
elsif b_item != nil
|
||||
b_item
|
||||
end
|
||||
}
|
||||
a
|
||||
end
|
||||
|
||||
def merge dest, src
|
||||
@@ -376,31 +423,55 @@ opts = Slop.parse do |o|
|
||||
o.array '-a', '--addons', 'addon repo XMLs to parse'
|
||||
end
|
||||
|
||||
result = {
|
||||
licenses: {},
|
||||
packages: {},
|
||||
images: {},
|
||||
addons: {},
|
||||
extras: {}
|
||||
}
|
||||
result = {}
|
||||
result['licenses'] = {}
|
||||
result['packages'] = {}
|
||||
result['images'] = {}
|
||||
result['addons'] = {}
|
||||
result['extras'] = {}
|
||||
|
||||
opts[:packages].each do |filename|
|
||||
licenses, packages = parse_package_xml(Nokogiri::XML(File.open(filename)) { |conf| conf.noblanks })
|
||||
merge result[:licenses], licenses
|
||||
merge result[:packages], packages
|
||||
merge result['licenses'], licenses
|
||||
merge result['packages'], packages
|
||||
end
|
||||
|
||||
opts[:images].each do |filename|
|
||||
licenses, images = parse_image_xml(Nokogiri::XML(File.open(filename)) { |conf| conf.noblanks })
|
||||
merge result[:licenses], licenses
|
||||
merge result[:images], images
|
||||
merge result['licenses'], licenses
|
||||
merge result['images'], images
|
||||
end
|
||||
|
||||
opts[:addons].each do |filename|
|
||||
licenses, addons, extras = parse_addon_xml(Nokogiri::XML(File.open(filename)) { |conf| conf.noblanks })
|
||||
merge result[:licenses], licenses
|
||||
merge result[:addons], addons
|
||||
merge result[:extras], extras
|
||||
merge result['licenses'], licenses
|
||||
merge result['addons'], addons
|
||||
merge result['extras'], extras
|
||||
end
|
||||
|
||||
puts JSON.pretty_generate(fixup(result))
|
||||
# As we keep the old packages in the repo JSON file, we should have
|
||||
# a strategy to remove them at some point!
|
||||
# So with this variable we claim it's okay to remove them from the
|
||||
# JSON after two years that they are not available.
|
||||
two_years_ago = today - 2 * 365
|
||||
|
||||
input = {}
|
||||
begin
|
||||
input_json = (STDIN.tty?) ? "{}" : $stdin.read
|
||||
if input_json != nil && !input_json.empty?
|
||||
input = expire_records(JSON.parse(input_json), two_years_ago)
|
||||
end
|
||||
rescue JSON::ParserError => e
|
||||
$stderr.write(e.message)
|
||||
return
|
||||
end
|
||||
|
||||
|
||||
fixup_result = fixup(result)
|
||||
|
||||
# Regular installation of Android SDK would keep the previously installed packages even if they are not
|
||||
# in the uptodate XML files, so here we try to support this logic by keeping un-available packages,
|
||||
# therefore the old packages will work as long as the links are working on the Google servers.
|
||||
output = merge input, fixup_result
|
||||
|
||||
puts JSON.pretty_generate(sort_recursively(output))
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p "ruby.withPackages (pkgs: with pkgs; [ slop nokogiri ])"
|
||||
#!nix-shell -i bash -p "ruby.withPackages (pkgs: with pkgs; [ slop nokogiri moreutils ])"
|
||||
|
||||
set -e
|
||||
|
||||
pushd "$(dirname "$0")" &>/dev/null || exit 1
|
||||
|
||||
echo "Writing repo.json" >&2
|
||||
ruby mkrepo.rb \
|
||||
cat ./repo.json | ruby mkrepo.rb \
|
||||
--packages ./xml/repository2-1.xml \
|
||||
--images ./xml/android-sys-img2-1.xml \
|
||||
--images ./xml/android-tv-sys-img2-1.xml \
|
||||
@@ -14,6 +14,7 @@ ruby mkrepo.rb \
|
||||
--images ./xml/android-wear-sys-img2-1.xml \
|
||||
--images ./xml/google_apis-sys-img2-1.xml \
|
||||
--images ./xml/google_apis_playstore-sys-img2-1.xml \
|
||||
--addons ./xml/addon2-1.xml > repo.json
|
||||
--addons ./xml/addon2-1.xml \
|
||||
| sponge repo.json
|
||||
|
||||
popd &>/dev/null
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,11 +1,9 @@
|
||||
{ lib, buildDunePackage, fetchFromGitHub, m4, camlp-streams, core_kernel, ounit }:
|
||||
{ lib, buildDunePackage, fetchFromGitHub, ocaml, m4, camlp-streams, core_kernel, ounit }:
|
||||
|
||||
buildDunePackage rec {
|
||||
pname = "cfstream";
|
||||
version = "1.3.2";
|
||||
|
||||
duneVersion = "3";
|
||||
|
||||
minimalOCamlVersion = "4.04.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
@@ -23,7 +21,7 @@ buildDunePackage rec {
|
||||
checkInputs = [ ounit ];
|
||||
propagatedBuildInputs = [ camlp-streams core_kernel ];
|
||||
|
||||
doCheck = true;
|
||||
doCheck = lib.versionAtLeast ocaml.version "4.08";
|
||||
|
||||
meta = with lib; {
|
||||
inherit (src.meta) homepage;
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, cmdliner
|
||||
, fetchurl
|
||||
, findlib
|
||||
, ocaml
|
||||
, ocamlbuild
|
||||
, topkg
|
||||
}:
|
||||
|
||||
if lib.versionOlder ocaml.version "4.14.0"
|
||||
then throw "cmarkit is not available for OCaml ${ocaml.version}"
|
||||
else
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "cmarkit";
|
||||
version = "0.1.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://erratique.ch/software/cmarkit/releases/cmarkit-${version}.tbz";
|
||||
hash = "sha256-pLPCLlwJt5W5R92HPY8gGpisyjlbSaaEe0HLuJlkjuY=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
ocaml
|
||||
findlib
|
||||
ocamlbuild
|
||||
topkg
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
topkg
|
||||
cmdliner
|
||||
];
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
inherit (topkg) buildPhase installPhase;
|
||||
|
||||
meta = with lib; {
|
||||
description = "CommonMark parser and renderer for OCaml";
|
||||
homepage = "https://erratique.ch/software/cmarkit";
|
||||
changelog = "https://github.com/dbuenzli/cmarkit/blob/v${version}/CHANGES.md";
|
||||
license = licenses.isc;
|
||||
maintainers = [ maintainers.marsam ];
|
||||
inherit (ocaml.meta) platforms;
|
||||
};
|
||||
}
|
||||
@@ -36,7 +36,7 @@ stdenv.mkDerivation rec {
|
||||
checkInputs = [
|
||||
ounit
|
||||
];
|
||||
doCheck = true;
|
||||
doCheck = lib.versionAtLeast ocaml.version "4.08";
|
||||
|
||||
preInstall = "mkdir -p $OCAMLFIND_DESTDIR";
|
||||
installFlags = [ "BINDIR=$(out)/bin" ];
|
||||
|
||||
@@ -1,22 +1,20 @@
|
||||
{ lib, buildDunePackage, fetchurl, stdlib-shims, ounit }:
|
||||
{ lib, buildDunePackage, fetchurl, ocaml, stdlib-shims, ounit }:
|
||||
|
||||
buildDunePackage rec {
|
||||
pname = "diet";
|
||||
version = "0.4";
|
||||
|
||||
useDune2 = true;
|
||||
|
||||
src = fetchurl {
|
||||
url =
|
||||
"https://github.com/mirage/ocaml-diet/releases/download/v${version}/diet-v${version}.tbz";
|
||||
sha256 = "96acac2e4fdedb5f47dd8ad2562e723d85ab59cd1bd85554df21ec907b071741";
|
||||
};
|
||||
|
||||
minimumOCamlVersion = "4.03";
|
||||
minimalOCamlVersion = "4.03";
|
||||
|
||||
propagatedBuildInputs = [ stdlib-shims ];
|
||||
|
||||
doCheck = true;
|
||||
doCheck = lib.versionAtLeast ocaml.version "4.08";
|
||||
checkInputs = [ ounit ];
|
||||
|
||||
meta = with lib; {
|
||||
|
||||
@@ -1,54 +0,0 @@
|
||||
{stdenv, lib, fetchurl, ocaml, findlib, ounit, expat}:
|
||||
|
||||
let
|
||||
pname = "ocaml-expat";
|
||||
testcase = fetchurl {
|
||||
url = "http://www.w3.org/TR/1998/REC-xml-19980210.xml";
|
||||
sha256 = "00a3gsfvlkdhmcbziqhvpvy1zmcgbcihfqwcvl6ay03zf7gvw0k1";
|
||||
};
|
||||
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "${pname}-${version}";
|
||||
version = "0.9.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://www.xs4all.nl/~mmzeeman/ocaml/${pname}-${version}.tar.gz";
|
||||
sha256 = "16n2j3y0jc9xgqyshw9plrwqnjiz30vnpbhahmgxlidbycw8rgjz";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ocaml findlib ];
|
||||
buildInputs = [ ounit expat];
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
createFindlibDestdir = true;
|
||||
|
||||
patches = [ ./unittest.patch ];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace "unittest.ml" \
|
||||
--replace "/home/maas/xml-samples/REC-xml-19980210.xml.txt" "${testcase}"
|
||||
substituteInPlace Makefile --replace "EXPAT_LIBDIR=/usr/local/lib" "EXPAT_LIBDIR=${expat.out}/lib" \
|
||||
--replace "EXPAT_INCDIR=/usr/local/include" "EXPAT_INCDIR=${expat.dev}/include" \
|
||||
--replace "gcc" "\$(CC)"
|
||||
'';
|
||||
|
||||
dontConfigure = true; # Skip configure
|
||||
|
||||
buildPhase = ''
|
||||
make all allopt
|
||||
'';
|
||||
|
||||
doCheck = true;
|
||||
|
||||
checkTarget = "testall";
|
||||
|
||||
meta = {
|
||||
homepage = "http://www.xs4all.nl/~mmzeeman/ocaml/";
|
||||
description = "An ocaml wrapper for the Expat XML parsing library";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = [ lib.maintainers.roconnor ];
|
||||
};
|
||||
}
|
||||
@@ -1,5 +1,8 @@
|
||||
{ stdenv, lib, fetchFromGitHub, expat, ocaml, findlib, ounit }:
|
||||
|
||||
lib.throwIfNot (lib.versionAtLeast ocaml.version "4.02")
|
||||
"ocaml_expat is not available for OCaml ${ocaml.version}"
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "ocaml${ocaml.version}-expat";
|
||||
version = "1.1.0";
|
||||
@@ -16,12 +19,13 @@ stdenv.mkDerivation rec {
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ ocaml findlib ];
|
||||
buildInputs = [ expat ounit ];
|
||||
buildInputs = [ expat ];
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
doCheck = lib.versionOlder ocaml.version "4.06";
|
||||
doCheck = lib.versionAtLeast ocaml.version "4.08";
|
||||
checkTarget = "testall";
|
||||
checkInputs = [ ounit ];
|
||||
|
||||
createFindlibDestdir = true;
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ buildDunePackage rec {
|
||||
checkInputs = [
|
||||
ounit2
|
||||
];
|
||||
doCheck = lib.versionAtLeast ocaml.version "4.04";
|
||||
doCheck = lib.versionAtLeast ocaml.version "4.08";
|
||||
|
||||
meta = with lib; {
|
||||
description = "OCaml API to manipulate real files (POSIX like) and filenames";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ lib, buildDunePackage, fetchFromGitHub
|
||||
{ lib, buildDunePackage, fetchFromGitHub, ocaml
|
||||
, menhir, ppxlib, ppx_deriving, re, uutf, uucp, ounit2
|
||||
}:
|
||||
|
||||
@@ -6,8 +6,6 @@ buildDunePackage rec {
|
||||
pname = "jingoo";
|
||||
version = "1.4.4";
|
||||
|
||||
duneVersion = "3";
|
||||
|
||||
minimalOCamlVersion = "4.05";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
@@ -20,7 +18,7 @@ buildDunePackage rec {
|
||||
nativeBuildInputs = [ menhir ];
|
||||
propagatedBuildInputs = [ ppxlib ppx_deriving re uutf uucp ];
|
||||
checkInputs = [ ounit2 ];
|
||||
doCheck = true;
|
||||
doCheck = lib.versionAtLeast ocaml.version "4.08";
|
||||
|
||||
|
||||
meta = with lib; {
|
||||
|
||||
@@ -6,8 +6,6 @@ buildDunePackage rec {
|
||||
|
||||
minimalOCamlVersion = "4.03";
|
||||
|
||||
duneVersion = "3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "aantron";
|
||||
repo = pname;
|
||||
@@ -17,7 +15,7 @@ buildDunePackage rec {
|
||||
|
||||
propagatedBuildInputs = [ camlp-streams markup ];
|
||||
|
||||
doCheck = lib.versionAtLeast ocaml.version "4.04";
|
||||
doCheck = lib.versionAtLeast ocaml.version "4.08";
|
||||
checkInputs = [ ounit2 ];
|
||||
|
||||
meta = {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ lib, fetchurl, buildDunePackage
|
||||
{ lib, fetchurl, buildDunePackage, ocaml
|
||||
, ppx_sexp_conv, ounit2
|
||||
}:
|
||||
|
||||
@@ -7,7 +7,6 @@ buildDunePackage rec {
|
||||
version = "5.4.0";
|
||||
|
||||
minimalOCamlVersion = "4.04";
|
||||
duneVersion = "3";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/mirage/ocaml-ipaddr/releases/download/v${version}/ipaddr-${version}.tbz";
|
||||
@@ -15,7 +14,7 @@ buildDunePackage rec {
|
||||
};
|
||||
|
||||
checkInputs = [ ppx_sexp_conv ounit2 ];
|
||||
doCheck = true;
|
||||
doCheck = lib.versionAtLeast ocaml.version "4.08";
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/mirage/ocaml-ipaddr";
|
||||
|
||||
@@ -16,7 +16,7 @@ buildDunePackage rec {
|
||||
propagatedBuildInputs = [ uchar uutf ];
|
||||
|
||||
checkInputs = [ ounit2 ];
|
||||
doCheck = lib.versionAtLeast ocaml.version "4.04";
|
||||
doCheck = lib.versionAtLeast ocaml.version "4.08";
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/aantron/markup.ml/";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ buildDunePackage, ocaml_gettext, camomile, ounit, fileutils }:
|
||||
{ lib, buildDunePackage, ocaml, ocaml_gettext, camomile, ounit, fileutils }:
|
||||
|
||||
buildDunePackage {
|
||||
pname = "gettext-camomile";
|
||||
@@ -6,7 +6,7 @@ buildDunePackage {
|
||||
|
||||
propagatedBuildInputs = [ camomile ocaml_gettext ];
|
||||
|
||||
doCheck = true;
|
||||
doCheck = lib.versionAtLeast ocaml.version "4.08";
|
||||
checkInputs = [ ounit fileutils ];
|
||||
|
||||
meta = (builtins.removeAttrs ocaml_gettext.meta [ "mainProgram" ]) // {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ buildDunePackage, ocaml_gettext, dune-configurator, ounit }:
|
||||
{ lib, buildDunePackage, ocaml, ocaml_gettext, dune-configurator, ounit }:
|
||||
|
||||
buildDunePackage rec {
|
||||
|
||||
@@ -12,7 +12,7 @@ buildDunePackage rec {
|
||||
|
||||
propagatedBuildInputs = [ ocaml_gettext ];
|
||||
|
||||
doCheck = true;
|
||||
doCheck = lib.versionAtLeast ocaml.version "4.08";
|
||||
|
||||
checkInputs = [ ounit ];
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{ lib, ocaml, buildDunePackage, fetchurl, seq, stdlib-shims, ncurses }:
|
||||
|
||||
buildDunePackage (rec {
|
||||
minimalOCamlVersion = "4.04";
|
||||
buildDunePackage rec {
|
||||
minimalOCamlVersion = "4.08";
|
||||
|
||||
pname = "ounit2";
|
||||
version = "2.2.6";
|
||||
@@ -14,7 +14,6 @@ buildDunePackage (rec {
|
||||
propagatedBuildInputs = [ seq stdlib-shims ];
|
||||
|
||||
doCheck = true;
|
||||
checkInputs = lib.optional (lib.versionOlder ocaml.version "4.07") ncurses;
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/gildor478/ounit";
|
||||
@@ -22,6 +21,4 @@ buildDunePackage (rec {
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ sternenseemann ];
|
||||
};
|
||||
} // lib.optionalAttrs (!lib.versionAtLeast ocaml.version "4.08") {
|
||||
duneVersion = "1";
|
||||
})
|
||||
}
|
||||
|
||||
@@ -7,9 +7,7 @@ buildDunePackage rec {
|
||||
pname = "parse-argv";
|
||||
version = "0.2.0";
|
||||
|
||||
useDune2 = true;
|
||||
|
||||
minimumOCamlVersion = "4.03";
|
||||
minimalOCamlVersion = "4.03";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/mirage/parse-argv/releases/download/v${version}/parse-argv-v${version}.tbz";
|
||||
@@ -18,7 +16,7 @@ buildDunePackage rec {
|
||||
|
||||
propagatedBuildInputs = [ astring ];
|
||||
|
||||
doCheck = lib.versionAtLeast ocaml.version "4.04";
|
||||
doCheck = lib.versionAtLeast ocaml.version "4.08";
|
||||
checkInputs = [ ounit ];
|
||||
|
||||
meta = {
|
||||
|
||||
@@ -52,7 +52,8 @@ buildDunePackage rec {
|
||||
result
|
||||
];
|
||||
|
||||
doCheck = lib.versionOlder ocaml.version "5.0";
|
||||
doCheck = lib.versionAtLeast ocaml.version "4.08"
|
||||
&& lib.versionOlder ocaml.version "5.0";
|
||||
checkInputs = [
|
||||
(if lib.versionAtLeast version "5.2" then ounit2 else ounit)
|
||||
];
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ lib, buildDunePackage, fetchFromGitHub, ppxlib, ounit
|
||||
{ lib, buildDunePackage, fetchFromGitHub, ocaml, ppxlib, ounit
|
||||
, ppx_deriving, yojson
|
||||
}:
|
||||
|
||||
@@ -17,7 +17,6 @@ buildDunePackage rec {
|
||||
inherit (param) version;
|
||||
|
||||
minimalOCamlVersion = "4.07";
|
||||
duneVersion = "3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ocaml-ppx";
|
||||
@@ -28,7 +27,7 @@ buildDunePackage rec {
|
||||
|
||||
propagatedBuildInputs = [ ppxlib ppx_deriving yojson ];
|
||||
|
||||
doCheck = true;
|
||||
doCheck = lib.versionAtLeast ocaml.version "4.08";
|
||||
checkInputs = [ ounit ];
|
||||
|
||||
meta = {
|
||||
|
||||
@@ -4,9 +4,7 @@ buildDunePackage rec {
|
||||
pname = "rdbg";
|
||||
version = "1.199.0";
|
||||
|
||||
duneVersion = "3";
|
||||
|
||||
minimalOCamlVersion = "4.07";
|
||||
minimalOCamlVersion = "4.08";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://www-verimag.imag.fr/DIST-TOOLS/SYNCHRONE/pool/rdbg.v${version}.tgz";
|
||||
|
||||
@@ -26,7 +26,7 @@ buildDunePackage (rec {
|
||||
|
||||
buildInputs = lib.optional doCheck ounit;
|
||||
propagatedBuildInputs = [ seq ];
|
||||
doCheck = lib.versionAtLeast ocaml.version "4.04";
|
||||
doCheck = lib.versionAtLeast ocaml.version "4.08";
|
||||
|
||||
meta = {
|
||||
homepage = "https://github.com/ocaml/ocaml-re";
|
||||
|
||||
@@ -18,14 +18,11 @@ buildDunePackage rec {
|
||||
sha256 = "sha256-mgZooyfxrKBVQFn01B8PULmFUW9Zq5HJfgHCSJSkJo4=";
|
||||
};
|
||||
|
||||
useDune2 = true;
|
||||
|
||||
minimumOCamlVersion = "4.05";
|
||||
minimalOCamlVersion = "4.05";
|
||||
|
||||
propagatedBuildInputs = [ zarith ];
|
||||
|
||||
# the tests fail for 4.05
|
||||
doCheck = lib.versionAtLeast ocaml.version "4.06";
|
||||
doCheck = lib.versionAtLeast ocaml.version "4.08";
|
||||
checkInputs = [ ounit ];
|
||||
|
||||
meta = {
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
{ lib, fetchurl, buildDunePackage, stdlib-shims, ounit2 }:
|
||||
{ lib, fetchurl, buildDunePackage, ocaml, stdlib-shims, ounit2 }:
|
||||
|
||||
buildDunePackage rec {
|
||||
pname = "sha";
|
||||
version = "1.15.4";
|
||||
duneVersion = "3";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/djs55/ocaml-${pname}/releases/download/v${version}/${pname}-${version}.tbz";
|
||||
@@ -14,7 +13,7 @@ buildDunePackage rec {
|
||||
stdlib-shims
|
||||
];
|
||||
|
||||
doCheck = true;
|
||||
doCheck = lib.versionAtLeast ocaml.version "4.08";
|
||||
checkInputs = [
|
||||
ounit2
|
||||
];
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ lib, fetchFromGitHub, ocamlPackages, buildOasisPackage, ounit, extlib, num }:
|
||||
{ lib, fetchFromGitHub, ocamlPackages, buildOasisPackage, extlib, num }:
|
||||
|
||||
buildOasisPackage rec {
|
||||
pname = "tcslib";
|
||||
@@ -13,7 +13,6 @@ buildOasisPackage rec {
|
||||
sha256 = "05g6m82blsccq8wx8knxv6a5fzww7hi624jx91f9h87nk2fsplhi";
|
||||
};
|
||||
|
||||
buildInputs = [ ounit ];
|
||||
propagatedBuildInputs = [ extlib num ];
|
||||
|
||||
meta = {
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "aiosqlite";
|
||||
version = "0.18.0";
|
||||
version = "0.19.0";
|
||||
format = "pyproject";
|
||||
|
||||
disabled = pythonOlder "3.8";
|
||||
@@ -18,7 +18,7 @@ buildPythonPackage rec {
|
||||
owner = "omnilib";
|
||||
repo = pname;
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-yPGSKqjOz1EY5/V0oKz2EiZ90q2O4TINoXdxHuB7Gqk=";
|
||||
hash = "sha256-dm7uqG59FP40hcQt+R7qfQiD8P42AYZ2WcH1RoEC5wQ=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, emcee
|
||||
, h5netcdf
|
||||
, matplotlib
|
||||
, netcdf4
|
||||
, numba
|
||||
@@ -31,7 +32,7 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "arviz";
|
||||
version = "0.15.0";
|
||||
version = "0.15.1";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
@@ -40,10 +41,11 @@ buildPythonPackage rec {
|
||||
owner = "arviz-devs";
|
||||
repo = pname;
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-LcdITCT9Bvycfj/taXhzkjn4IfZrxWX9MYXD6+MifOs=";
|
||||
hash = "sha256-jjA+yltvpPZldIxXXqu1bXCLqpiU5/NBYTPlI9ImGVs=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
h5netcdf
|
||||
matplotlib
|
||||
netcdf4
|
||||
numpy
|
||||
@@ -80,11 +82,6 @@ buildPythonPackage rec {
|
||||
"arviz/tests/base_tests/"
|
||||
];
|
||||
|
||||
disabledTestPaths = [
|
||||
# Remove tests as dependency creates a circular dependency
|
||||
"arviz/tests/external_tests/test_data_pymc.py"
|
||||
];
|
||||
|
||||
disabledTests = [
|
||||
# Tests require network access
|
||||
"test_plot_separation"
|
||||
@@ -94,6 +91,8 @@ buildPythonPackage rec {
|
||||
"test_plot_kde"
|
||||
"test_plot_kde_2d"
|
||||
"test_plot_pair"
|
||||
# Array mismatch
|
||||
"test_plot_ts"
|
||||
];
|
||||
|
||||
pythonImportsCheck = [
|
||||
@@ -103,6 +102,7 @@ buildPythonPackage rec {
|
||||
meta = with lib; {
|
||||
description = "Library for exploratory analysis of Bayesian models";
|
||||
homepage = "https://arviz-devs.github.io/arviz/";
|
||||
changelog = "https://github.com/arviz-devs/arviz/blob/v${version}/CHANGELOG.md";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ omnipotententity ];
|
||||
};
|
||||
|
||||
@@ -8,14 +8,14 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "atenpdu";
|
||||
version = "0.6.0";
|
||||
version = "0.6.1";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
hash = "sha256-E/cRjbispHiS38BdIvOKD4jOFrDmpx8L4eAlMV8Re70=";
|
||||
hash = "sha256-Of7tQJNqaLDgO8nie6rSd1saMbauXJBp8vWfXYAziEE=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "atlassian-python-api";
|
||||
version = "3.34.0";
|
||||
version = "3.36.0";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
@@ -21,7 +21,7 @@ buildPythonPackage rec {
|
||||
owner = "atlassian-api";
|
||||
repo = pname;
|
||||
rev = "refs/tags/${version}";
|
||||
hash = "sha256-en+4EKkmTQWMgnGZaGs+O9Yh2TI03xW111wbp9O8dYE=";
|
||||
hash = "sha256-9xKGA9F3RLijjiEnb01QjmWA9CnN7FZGEEFEWZU4A+A=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
@@ -43,6 +43,7 @@ buildPythonPackage rec {
|
||||
meta = with lib; {
|
||||
description = "Python Atlassian REST API Wrapper";
|
||||
homepage = "https://github.com/atlassian-api/atlassian-python-api";
|
||||
changelog = "https://github.com/atlassian-api/atlassian-python-api/releases/tag/${version}";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ arnoldfarkas ];
|
||||
};
|
||||
|
||||
@@ -6,17 +6,20 @@
|
||||
, azure-common
|
||||
, azure-mgmt-core
|
||||
, azure-mgmt-nspkg
|
||||
, isPy3k
|
||||
, pythonOlder
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "azure-mgmt-iothub";
|
||||
version = "2.3.0";
|
||||
version = "2.4.0";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
extension = "zip";
|
||||
hash = "sha256-ml+koj52l5o0toAcnsGtsw0tGnO5F/LKq56ovzdmx/A=";
|
||||
hash = "sha256-enpNE5kVyGK+ctrGt1gt6633rNvT9FM76kSQ7prb1Wo=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
@@ -24,8 +27,6 @@ buildPythonPackage rec {
|
||||
azure-mgmt-core
|
||||
msrest
|
||||
msrestazure
|
||||
] ++ lib.optionals (!isPy3k) [
|
||||
azure-mgmt-nspkg
|
||||
];
|
||||
|
||||
# has no tests
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
, setuptools
|
||||
, setuptools-scm
|
||||
, cocotb-bus
|
||||
, find-libpython
|
||||
, pytestCheckHook
|
||||
, swig
|
||||
, verilog
|
||||
@@ -24,7 +25,7 @@ buildPythonPackage rec {
|
||||
|
||||
nativeBuildInputs = [ setuptools-scm ];
|
||||
|
||||
buildInputs = [ setuptools ];
|
||||
buildInputs = [ setuptools find-libpython ];
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs bin/*.py
|
||||
|
||||
@@ -1,37 +1,31 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, pythonOlder
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, cvxopt
|
||||
, ecos
|
||||
, fetchPypi
|
||||
, numpy
|
||||
, osqp
|
||||
, pytestCheckHook
|
||||
, pythonOlder
|
||||
, scipy
|
||||
, scs
|
||||
, setuptools
|
||||
, useOpenmp ? (!stdenv.isDarwin)
|
||||
# Check inputs
|
||||
, pytestCheckHook
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "cvxpy";
|
||||
version = "1.3.0";
|
||||
version = "1.3.1";
|
||||
format = "pyproject";
|
||||
|
||||
disabled = pythonOlder "3.5";
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
hash = "sha256-Zszme9xjW5spBmUQR0OSwM/A2V24rdpAENyM3Y4EYlA=";
|
||||
hash = "sha256-8Hv+k2d6dVqFVMT9piLvAeIkes6Zs6eBB6qQcODQo8s=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace setup.py \
|
||||
--replace "setuptools <= 64.0.2" "setuptools"
|
||||
'';
|
||||
|
||||
propagatedBuildInputs = [
|
||||
cvxopt
|
||||
ecos
|
||||
@@ -42,33 +36,39 @@ buildPythonPackage rec {
|
||||
setuptools
|
||||
];
|
||||
|
||||
# Required flags from https://github.com/cvxgrp/cvxpy/releases/tag/v1.1.11
|
||||
nativeCheckInputs = [
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
# Required flags from https://github.com/cvxpy/cvxpy/releases/tag/v1.1.11
|
||||
preBuild = lib.optionalString useOpenmp ''
|
||||
export CFLAGS="-fopenmp"
|
||||
export LDFLAGS="-lgomp"
|
||||
'';
|
||||
|
||||
nativeCheckInputs = [ pytestCheckHook ];
|
||||
pytestFlagsArray = [
|
||||
"cvxpy"
|
||||
];
|
||||
|
||||
pytestFlagsArray = [ "./cvxpy" ];
|
||||
|
||||
# Disable the slowest benchmarking tests, cuts test time in half
|
||||
disabledTests = [
|
||||
# Disable the slowest benchmarking tests, cuts test time in half
|
||||
"test_tv_inpainting"
|
||||
"test_diffcp_sdp_example"
|
||||
"test_huber"
|
||||
"test_partial_problem"
|
||||
] ++ lib.optionals stdenv.isAarch64 [
|
||||
"test_ecos_bb_mi_lp_2" # https://github.com/cvxgrp/cvxpy/issues/1241#issuecomment-780912155
|
||||
"test_ecos_bb_mi_lp_2" # https://github.com/cvxpy/cvxpy/issues/1241#issuecomment-780912155
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "cvxpy" ];
|
||||
pythonImportsCheck = [
|
||||
"cvxpy"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A domain-specific language for modeling convex optimization problems in Python";
|
||||
homepage = "https://www.cvxpy.org/";
|
||||
downloadPage = "https://github.com/cvxgrp/cvxpy/releases";
|
||||
changelog = "https://github.com/cvxgrp/cvxpy/releases/tag/v${version}";
|
||||
downloadPage = "https://github.com/cvxpy/cvxpy//releases";
|
||||
changelog = "https://github.com/cvxpy/cvxpy/releases/tag/v${version}";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ drewrisinger ];
|
||||
};
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "dvc-data";
|
||||
version = "0.49.1";
|
||||
version = "0.50.0";
|
||||
format = "pyproject";
|
||||
|
||||
disabled = pythonOlder "3.8";
|
||||
@@ -24,7 +24,7 @@ buildPythonPackage rec {
|
||||
owner = "iterative";
|
||||
repo = pname;
|
||||
rev = "refs/tags/${version}";
|
||||
hash = "sha256-+bVDfjfWLJKCYVM5B0cy5E7hzdjHQSG/UIHaxus4D6E=";
|
||||
hash = "sha256-TWn+9u+m9CwRoJRcFvRT45TXq7U08nc/3NLDKshNcJc=";
|
||||
};
|
||||
|
||||
SETUPTOOLS_SCM_PRETEND_VERSION = version;
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, fetchpatch
|
||||
, nose
|
||||
, numpy
|
||||
, pythonOlder
|
||||
@@ -10,7 +9,7 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "ecos";
|
||||
version = "2.0.10";
|
||||
version = "2.0.11";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = pythonOlder "3.6";
|
||||
@@ -18,20 +17,11 @@ buildPythonPackage rec {
|
||||
src = fetchFromGitHub {
|
||||
owner = "embotech";
|
||||
repo = "ecos-python";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-TPxrTyVZ1KXgPoDbZZqXT5+NEIEndg9qepujqFQwK+Q=";
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-jflmXR7fuGRSyI6NoQrHFvkKqF/D4iq47StNSCdLbqQ=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Fix for test_interface_bb.py tests
|
||||
(fetchpatch {
|
||||
name = "test_interface_bb_use_nparray.patch";
|
||||
url = "https://github.com/embotech/ecos-python/commit/4440dcb7ddbd92217bc83d8916b72b61537dffbf.patch";
|
||||
hash = "sha256-pcTPviK916jzCLllRhopbC9wDHv+aS6GmV/92sUwzHc=";
|
||||
})
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
numpy
|
||||
scipy
|
||||
@@ -51,7 +41,7 @@ buildPythonPackage rec {
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Python package for ECOS: Embedded Cone Solver";
|
||||
description = "Python interface for ECOS";
|
||||
homepage = "https://github.com/embotech/ecos-python";
|
||||
license = licenses.gpl3Only;
|
||||
maintainers = with maintainers; [ drewrisinger ];
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "findimports";
|
||||
version = "2.2.0";
|
||||
version = "2.3.0";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = pythonOlder "3.6";
|
||||
@@ -15,8 +15,8 @@ buildPythonPackage rec {
|
||||
src = fetchFromGitHub {
|
||||
owner = "mgedmin";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
hash = "sha256-p13GVDXDOzOiTnRgtF7UxN1vwZRMa7wVEXJQrFQV7RU=";
|
||||
rev = "refs/tags/${version}";
|
||||
hash = "sha256-yA1foeGhgOXZArc/nZfS1tbGyONXJZ9lW+Zcx7hCedM=";
|
||||
};
|
||||
|
||||
pythonImportsCheck = [
|
||||
@@ -24,6 +24,9 @@ buildPythonPackage rec {
|
||||
];
|
||||
|
||||
checkPhase = ''
|
||||
# Tests fails
|
||||
rm tests/cmdline.txt
|
||||
|
||||
runHook preCheck
|
||||
${python.interpreter} testsuite.py
|
||||
runHook postCheck
|
||||
@@ -32,6 +35,7 @@ buildPythonPackage rec {
|
||||
meta = with lib; {
|
||||
description = "Module for the analysis of Python import statements";
|
||||
homepage = "https://github.com/mgedmin/findimports";
|
||||
changelog = "https://github.com/mgedmin/findimports/blob/${version}/CHANGES.rst";
|
||||
license = with licenses; [ gpl2Only /* or */ gpl3Only ];
|
||||
maintainers = with maintainers; [ fab ];
|
||||
};
|
||||
|
||||
@@ -7,14 +7,14 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "guppy3";
|
||||
version = "3.1.2";
|
||||
version = "3.1.3";
|
||||
disabled = pythonOlder "3.6";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "zhuyifei1999";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
hash = "sha256-f7YpaZ85PU/CSsDwSm2IJ/x2ZxzHoMOVbdbzT1i8y/w=";
|
||||
hash = "sha256-i3WqXlNnNhBVw9rdnxnzQISFkZHBpc/gqG+rxOWPiyc=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [ tkinter ];
|
||||
|
||||
@@ -21,9 +21,11 @@ buildPythonPackage rec {
|
||||
hash = "sha256-kyw7Vzvtc3Dr/J6ALNYPGk2lI277EbNu7/iXMk12v1Y=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
setuptools-scm
|
||||
];
|
||||
SETUPTOOLS_SCM_PRETEND_VERSION = version;
|
||||
|
||||
nativeBuildInputs = [
|
||||
setuptools-scm
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
h5py
|
||||
|
||||
@@ -3,13 +3,17 @@
|
||||
, fetchPypi
|
||||
, pythonOlder
|
||||
, pytestCheckHook
|
||||
, pythonRelaxDepsHook
|
||||
, matplotlib
|
||||
, nibabel
|
||||
, numpy
|
||||
, pydicom
|
||||
, pymedio
|
||||
, scikit-fuzzy
|
||||
, scikitimage
|
||||
, scikit-learn
|
||||
, scipy
|
||||
, simpleitk
|
||||
, statsmodels
|
||||
}:
|
||||
|
||||
@@ -26,25 +30,32 @@ buildPythonPackage rec {
|
||||
hash = "sha256-Yjd4hXmbT87xNKSqc6zkKNisOVhQzQAUZI5wBiI/UBk=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace setup.cfg --replace "!=3.10.*," "" --replace "!=3.11.*" ""
|
||||
substituteInPlace setup.cfg --replace "pytest-runner" ""
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ pythonRelaxDepsHook ];
|
||||
pythonRelaxDeps = [ "nibabel" ];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
matplotlib
|
||||
nibabel
|
||||
numpy
|
||||
pydicom
|
||||
pymedio
|
||||
scikit-fuzzy
|
||||
scikitimage
|
||||
scikit-learn
|
||||
scipy
|
||||
simpleitk
|
||||
statsmodels
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace setup.cfg \
|
||||
--replace "pytest-runner" ""
|
||||
'';
|
||||
pytestFlagsArray = [ "tests" ];
|
||||
|
||||
pythonImportsCheck = [
|
||||
"intensity_normalization"
|
||||
@@ -53,12 +64,11 @@ buildPythonPackage rec {
|
||||
"intensity_normalization.util"
|
||||
];
|
||||
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/jcreinhold/intensity-normalization";
|
||||
description = "MRI intensity normalization tools";
|
||||
maintainers = with maintainers; [ bcdarwin ];
|
||||
license = licenses.asl20;
|
||||
# depends on simpleitk python wrapper which is not packaged yet
|
||||
broken = true;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -12,16 +12,16 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "mizani";
|
||||
version = "0.8.1";
|
||||
version = "0.9.0";
|
||||
format = "pyproject";
|
||||
|
||||
disabled = pythonOlder "3.8";
|
||||
disabled = pythonOlder "3.9";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "has2k1";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
hash = "sha256-VE0M5/s8/XmmAe8EE/FcHBFGc9ppVWuYOYMuajQeZww=";
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-XV/Lqr/kGx+t26ALLY7wTp2Ez487yvExM1GUD4AH9Bc=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
@@ -40,7 +40,7 @@ buildPythonPackage rec {
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace pytest.ini \
|
||||
substituteInPlace pyproject.toml \
|
||||
--replace " --cov=mizani --cov-report=xml" ""
|
||||
'';
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
, numpy
|
||||
, pytestCheckHook
|
||||
, pythonOlder
|
||||
, tensorflow-probability
|
||||
, tqdm
|
||||
}:
|
||||
|
||||
@@ -31,6 +32,7 @@ buildPythonPackage rec {
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
tensorflow-probability
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
@@ -46,11 +48,16 @@ buildPythonPackage rec {
|
||||
"test_gamma_poisson"
|
||||
"test_gof"
|
||||
"test_hpdi"
|
||||
"test_kl_dirichlet_dirichlet"
|
||||
"test_kl_univariate"
|
||||
"test_mean_var"
|
||||
# Tests want to download data
|
||||
"data_load"
|
||||
"test_jsb_chorales"
|
||||
# RuntimeWarning: overflow encountered in cast
|
||||
"test_zero_inflated_logits_probs_agree"
|
||||
# NameError: unbound axis name: _provenance
|
||||
"test_model_transformation"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, ciso8601
|
||||
, fetchPypi
|
||||
, httpx
|
||||
, pythonOlder
|
||||
@@ -8,17 +9,18 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "onvif-zeep-async";
|
||||
version = "3.1.3";
|
||||
version = "3.1.7";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
hash = "sha256-Lq8jYLEJKluRfsuRghkp7VPIcrHn3qaJTyid9O8lriA=";
|
||||
hash = "sha256-ra/1qKKmuWWvJCrr1uTCU5Awv5+GShgDHlHw0igLc4c=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
ciso8601
|
||||
httpx
|
||||
zeep
|
||||
];
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "pyaussiebb";
|
||||
version = "0.0.16";
|
||||
version = "0.0.18";
|
||||
format = "pyproject";
|
||||
|
||||
disabled = pythonOlder "3.9";
|
||||
@@ -20,7 +20,7 @@ buildPythonPackage rec {
|
||||
owner = "yaleman";
|
||||
repo = "aussiebb";
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-dbu26QFboqVaSFYlTXsOFA4yhXXNcB4QBCA8PZTphns=";
|
||||
hash = "sha256-tEdddVsLFCHRvyLCctDakioiop2xWaJlfGE16P1ukHc=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
, numpy
|
||||
, psutil
|
||||
, qiskit-terra
|
||||
, retworkx
|
||||
, rustworkx
|
||||
, scikit-learn
|
||||
, scipy
|
||||
, withPyscf ? false
|
||||
@@ -37,7 +37,7 @@ buildPythonPackage rec {
|
||||
numpy
|
||||
psutil
|
||||
qiskit-terra
|
||||
retworkx
|
||||
rustworkx
|
||||
scikit-learn
|
||||
scipy
|
||||
] ++ lib.optional withPyscf pyscf;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
, psutil
|
||||
, python-constraint
|
||||
, python-dateutil
|
||||
, retworkx
|
||||
, rustworkx
|
||||
, scipy
|
||||
, scikit-quant ? null
|
||||
, setuptools-rust
|
||||
@@ -85,7 +85,7 @@ buildPythonPackage rec {
|
||||
psutil
|
||||
python-constraint
|
||||
python-dateutil
|
||||
retworkx
|
||||
rustworkx
|
||||
scipy
|
||||
scikit-quant
|
||||
stevedore
|
||||
|
||||
@@ -1,67 +0,0 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, buildPythonPackage
|
||||
, pythonOlder
|
||||
, rustPlatform
|
||||
, fetchFromGitHub
|
||||
, libiconv
|
||||
# Check inputs
|
||||
, pytestCheckHook
|
||||
, fixtures
|
||||
, graphviz
|
||||
, matplotlib
|
||||
, networkx
|
||||
, numpy
|
||||
, pydot
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "retworkx";
|
||||
version = "0.11.0";
|
||||
format = "pyproject";
|
||||
disabled = pythonOlder "3.6";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Qiskit";
|
||||
repo = "retworkx";
|
||||
rev = version;
|
||||
hash = "sha256-o3XPMTaiFH5cBtyqtW650wiDBElLvCmERr2XwwdPO1c=";
|
||||
};
|
||||
|
||||
cargoDeps = rustPlatform.fetchCargoTarball {
|
||||
inherit src;
|
||||
name = "${pname}-${version}";
|
||||
hash = "sha256-Zhk4m+HNtimhPWfiBLi9dqJ0fp2D8d0u9k6ROG0/jBo=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = with rustPlatform; [ cargoSetupHook maturinBuildHook ];
|
||||
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
|
||||
|
||||
pythonImportsCheck = [ "retworkx" ];
|
||||
nativeCheckInputs = [
|
||||
pytestCheckHook
|
||||
fixtures
|
||||
graphviz
|
||||
matplotlib
|
||||
networkx
|
||||
numpy
|
||||
pydot
|
||||
];
|
||||
|
||||
preCheck = ''
|
||||
export TESTDIR=$(mktemp -d)
|
||||
cp -r tests/ $TESTDIR
|
||||
pushd $TESTDIR
|
||||
'';
|
||||
postCheck = "popd";
|
||||
|
||||
meta = with lib; {
|
||||
description = "A python graph library implemented in Rust.";
|
||||
homepage = "https://retworkx.readthedocs.io/en/latest/index.html";
|
||||
downloadPage = "https://github.com/Qiskit/retworkx/releases";
|
||||
changelog = "https://github.com/Qiskit/retworkx/releases/tag/${version}";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ drewrisinger ];
|
||||
};
|
||||
}
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "rns";
|
||||
version = "0.5.1";
|
||||
version = "0.5.2";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
@@ -18,7 +18,7 @@ buildPythonPackage rec {
|
||||
owner = "markqvist";
|
||||
repo = "Reticulum";
|
||||
rev = "refs/tags/${version}";
|
||||
hash = "sha256-yVjbYmvE6b9NZI0JYuMFjU+lh4l8Hf+pF+I/7sQNjVI=";
|
||||
hash = "sha256-yyBUz+Bg05TtPTtREkylqaj2oz8kfxC5fSYpgPCF0Vs=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "sensor-state-data";
|
||||
version = "2.14.0";
|
||||
version = "2.15.1";
|
||||
format = "pyproject";
|
||||
|
||||
disabled = pythonOlder "3.9";
|
||||
@@ -19,7 +19,7 @@ buildPythonPackage rec {
|
||||
owner = "Bluetooth-Devices";
|
||||
repo = pname;
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-ICr/IyzzWX1u4qndZYlPpAMlI3Z1A9povzPseMkIZ4U=";
|
||||
hash = "sha256-EZL/sYz2U4V2p0eEoxLwZhe9Xok9IcZabNLwAE6itGw=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
||||
@@ -1,18 +1,22 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, fetchpatch
|
||||
, pythonOlder
|
||||
, pytestCheckHook
|
||||
, gym
|
||||
, gymnasium
|
||||
, torch
|
||||
, tensorboard
|
||||
, tqdm
|
||||
, wandb
|
||||
, packaging
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "skrl";
|
||||
version = "0.10.1";
|
||||
version = "0.10.2";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = pythonOlder "3.6";
|
||||
|
||||
@@ -20,14 +24,25 @@ buildPythonPackage rec {
|
||||
owner = "Toni-SM";
|
||||
repo = pname;
|
||||
rev = "refs/tags/${version}";
|
||||
hash = "sha256-/fFKotDibc+wcoGteloh5OEKbQdN/W1NdF+mWf8mSNw=";
|
||||
hash = "sha256-OY5+bUPg+G1eKFMvHlXSHwc2WWHTpyoyCKjY3MvlLyM=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# remove after next release:
|
||||
(fetchpatch {
|
||||
name = "fix-python_requires-specification";
|
||||
url = "https://github.com/Toni-SM/skrl/pull/62/commits/9b554adfe2da6cd97cccbbcd418a349cc8f1de80.patch";
|
||||
hash = "sha256-GeASMU1Pgy8U1zaIAVroBDjYaY+n93XP5uFyP4U9lok=";
|
||||
})
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
gym
|
||||
gymnasium
|
||||
torch
|
||||
tensorboard
|
||||
tqdm
|
||||
wandb
|
||||
packaging
|
||||
];
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "textual";
|
||||
version = "0.23.0";
|
||||
version = "0.24.1";
|
||||
format = "pyproject";
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
@@ -31,7 +31,7 @@ buildPythonPackage rec {
|
||||
owner = "Textualize";
|
||||
repo = pname;
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-XgJ43yyiwzSH22NzidJ7z+Qh6+pOuAdfL7ZxabJkd3U=";
|
||||
hash = "sha256-nFio45LxoVQK/IzVo2ZHGYzG6bHHr3yvA7P3kMZOUso=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "types-python-dateutil";
|
||||
version = "2.8.19.12";
|
||||
version = "2.8.19.13";
|
||||
format = "setuptools";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
hash = "sha256-NVssuCsx5Vb9GOewdN58NQxoCrgGCPDMVbpncNmG1n0=";
|
||||
hash = "sha256-CaAnX5XuMc5oGWcQ7Sw9G53ELgthzEOsw2mkLLk5E08=";
|
||||
};
|
||||
|
||||
# Modules doesn't have tests
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, pythonOlder
|
||||
, fetchFromGitHub
|
||||
, poetry-core
|
||||
, pytestCheckHook
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "xdg-base-dirs";
|
||||
version = "6.0.0";
|
||||
format = "pyproject";
|
||||
|
||||
disabled = pythonOlder "3.10";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "srstevenson";
|
||||
repo = "xdg-base-dirs";
|
||||
rev = version;
|
||||
hash = "sha256-yVuruSKv99IZGNCpY9cKwAe6gJNAWjL+Lol2D1/0hiI=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
poetry-core
|
||||
];
|
||||
|
||||
nativeCheckInputs = [ pytestCheckHook ];
|
||||
|
||||
pythonImportsCheck = [ "xdg_base_dirs" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "An implementation of the XDG Base Directory Specification in Python";
|
||||
homepage = "https://github.com/srstevenson/xdg-base-dirs";
|
||||
changelog = "https://github.com/srstevenson/xdg-base-dirs/releases/tag/${src.rev}";
|
||||
license = licenses.isc;
|
||||
maintainers = with maintainers; [ figsoda ];
|
||||
};
|
||||
}
|
||||
@@ -5,6 +5,7 @@
|
||||
, cryptography
|
||||
, fetchFromGitHub
|
||||
, frozendict
|
||||
, html5lib
|
||||
, multitasking
|
||||
, numpy
|
||||
, pandas
|
||||
@@ -32,6 +33,7 @@ buildPythonPackage rec {
|
||||
beautifulsoup4
|
||||
cryptography
|
||||
frozendict
|
||||
html5lib
|
||||
multitasking
|
||||
numpy
|
||||
pandas
|
||||
|
||||
@@ -6,16 +6,16 @@
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "cirrus-cli";
|
||||
version = "0.97.0";
|
||||
version = "0.98.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "cirruslabs";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-6MkQUnqHn96S4+hGuHHfJojZUJXNxWTkmLkahVZWQTA=";
|
||||
sha256 = "sha256-cuStFYtHBNnKkBTUs8QU0JOdgfQ68ZmV25XHOfYJKKQ=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-gqpcGEbvfVMkAQ3c6EwW9xTTeMH9VOlMiuCz7uZUbnw=";
|
||||
vendorHash = "sha256-BtcuqdVOOBG/yPdKaj+8nCvg050F/s/davblLUval+o=";
|
||||
|
||||
ldflags = [
|
||||
"-X github.com/cirruslabs/cirrus-cli/internal/version.Version=v${version}"
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
{ buildFHSEnv
|
||||
, electron_22
|
||||
, electron_24
|
||||
, fetchFromGitHub
|
||||
, fetchYarnDeps
|
||||
, fetchurl
|
||||
, fixup_yarn_lock
|
||||
, git
|
||||
, lib
|
||||
, makeDesktopItem
|
||||
, nodejs_16
|
||||
, nodejs_18
|
||||
, stdenvNoCC
|
||||
, util-linux
|
||||
, zip
|
||||
@@ -14,21 +15,29 @@
|
||||
|
||||
let
|
||||
pname = "electron-fiddle";
|
||||
version = "0.32.1";
|
||||
electron = electron_22;
|
||||
nodejs = nodejs_16;
|
||||
version = "0.32.6";
|
||||
electron = electron_24;
|
||||
nodejs = nodejs_18;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "electron";
|
||||
repo = "fiddle";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-k+cbg03mwvobyazIUqm+TO9OMYVFQICy4CtkUZmvkr8=";
|
||||
hash = "sha256-Iuss2xwts1aWy2rKYG7J2EvFdH8Bbedn/uZG2bi9UHw=";
|
||||
};
|
||||
|
||||
# As of https://github.com/electron/fiddle/pull/1316 this is fetched
|
||||
# from the network and has no stable hash. Grab an old version from
|
||||
# the repository.
|
||||
releasesJson = fetchurl {
|
||||
url = "https://raw.githubusercontent.com/electron/fiddle/v0.32.4~18/static/releases.json";
|
||||
hash = "sha256-1sxd3eJ6/WjXS6XQbrgKUTNUmrhuc1dAvy+VAivGErg=";
|
||||
};
|
||||
|
||||
inherit (nodejs.pkgs) yarn;
|
||||
offlineCache = fetchYarnDeps {
|
||||
yarnLock = "${src}/yarn.lock";
|
||||
hash = "sha256-3vM+YPIA3zeWBaEFXU5lFl+VaGmAY0Qdg4pSA6mIKl0=";
|
||||
hash = "sha256-dwhwUWwv6RYKEMdhRBvKVXvM8n1r+Qo0D3/uFsWIOpw=";
|
||||
};
|
||||
|
||||
electronDummyMirror = "https://electron.invalid/";
|
||||
@@ -55,6 +64,8 @@ let
|
||||
cp -ra '${electron}/lib/electron' "$TMPDIR/electron"
|
||||
chmod -R u+w "$TMPDIR/electron"
|
||||
(cd "$TMPDIR/electron" && zip -0Xr ~/.cache/electron/${electronDummyHash}/${electronDummyFilename} .)
|
||||
|
||||
ln -s ${releasesJson} static/releases.json
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
|
||||
let
|
||||
pname = "phpunit";
|
||||
version = "10.1.2";
|
||||
version = "10.1.3";
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
inherit pname version;
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://phar.phpunit.de/phpunit-${version}.phar";
|
||||
hash = "sha256-X6upMANmKU2H8Qs0pOd/uRL2GdH/JPyOAQ/P8Z5yNl8=";
|
||||
hash = "sha256-b0ruyOh/DqKJYQskZSJnBsROotQuZsIBzscjKfrZ0tY=";
|
||||
};
|
||||
|
||||
dontUnpack = true;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
{ lib, stdenv, fetchurl, ocaml, findlib, ocamlbuild, ounit }:
|
||||
|
||||
let
|
||||
# ounit is only available for OCaml >= 4.04
|
||||
doCheck = lib.versionAtLeast ocaml.version "4.04";
|
||||
# ounit is only available for OCaml >= 4.08
|
||||
doCheck = lib.versionAtLeast ocaml.version "4.08";
|
||||
in
|
||||
|
||||
lib.throwIf (lib.versionAtLeast ocaml.version "5.0")
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
{ lib, stdenv, fetchurl, dpkg, makeWrapper, buildFHSEnv
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetchurl
|
||||
, dpkg
|
||||
, makeWrapper
|
||||
, buildFHSEnv
|
||||
, extraPkgs ? pkgs: [ ]
|
||||
, extraLibs ? pkgs: [ ]
|
||||
}:
|
||||
@@ -62,7 +67,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
# Unity Hub additional dependencies
|
||||
libva
|
||||
openssl_1_1
|
||||
openssl
|
||||
cairo
|
||||
xdg-utils
|
||||
libnotify
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
, smartmontools, enableMail ? false
|
||||
, sysstat, pkg-config
|
||||
, curl
|
||||
, pam
|
||||
|
||||
# Kernel dependencies
|
||||
, kernel ? null
|
||||
@@ -111,7 +112,7 @@ stdenv'.mkDerivation {
|
||||
nativeBuildInputs = [ autoreconfHook269 nukeReferences ]
|
||||
++ optionals buildKernel (kernel.moduleBuildDependencies ++ [ perl ])
|
||||
++ optional buildUser pkg-config;
|
||||
buildInputs = optionals buildUser [ zlib libuuid attr libtirpc ]
|
||||
buildInputs = optionals buildUser [ zlib libuuid attr libtirpc pam ]
|
||||
++ optional buildUser openssl
|
||||
++ optional buildUser curl
|
||||
++ optional (buildUser && enablePython) python3;
|
||||
@@ -136,6 +137,7 @@ stdenv'.mkDerivation {
|
||||
"--sysconfdir=/etc"
|
||||
"--localstatedir=/var"
|
||||
"--enable-systemd"
|
||||
"--enable-pam"
|
||||
] ++ optionals buildKernel ([
|
||||
"--with-linux=${kernel.dev}/lib/modules/${kernel.modDirVersion}/source"
|
||||
"--with-linux-obj=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user