diff options
Diffstat (limited to 'pkgs/os-specific')
6 files changed, 175 insertions, 31 deletions
diff --git a/pkgs/os-specific/darwin/apple-source-releases/default.nix b/pkgs/os-specific/darwin/apple-source-releases/default.nix index 23434931542..3e431810f20 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/default.nix @@ -1,9 +1,6 @@ -{ lib, stdenv, fetchurl, fetchzip, pkgs }: +{ lib, stdenv, stdenvNoCC, fetchurl, fetchzip, pkgs }: let - macosPackages_11_0_1 = import ./macos-11.0.1.nix { inherit applePackage'; }; - developerToolsPackages_11_3_1 = import ./developer-tools-11.3.1.nix { inherit applePackage'; }; - # This attrset can in theory be computed automatically, but for that to work nicely we need # import-from-derivation to work properly. Currently it's rather ugly when we try to bootstrap # a stdenv out of something like this. With some care we can probably get rid of this, but for @@ -190,17 +187,6 @@ let }) // (attrs.meta or {}); }); - applePackage' = namePath: version: sdkName: sha256: let - pname = builtins.head (lib.splitString "/" namePath); - appleDerivation = appleDerivation' pname version sdkName sha256; - callPackage = pkgs.newScope (packages // pkgs.darwin // { inherit appleDerivation; }); - in callPackage (./. + "/${namePath}"); - - applePackage = namePath: sdkName: sha256: let - pname = builtins.head (lib.splitString "/" namePath); - version = versions.${sdkName}.${pname}; - in applePackage' namePath version sdkName sha256; - IOKitSpecs = { IOAudioFamily = fetchApple "osx-10.10.5" "0ggq7za3iq8g02j16rj67prqhrw828jsw3ah3bxq8a1cvr55aqnq"; IOFireWireFamily = fetchApple "osx-10.10.5" "059qa1m668kwvchl90cqcx35b31zaqdg61zi11y1imn5s389y2g1"; @@ -225,11 +211,35 @@ let IOKitSrcs = lib.mapAttrs (name: value: if lib.isFunction value then value name else value) IOKitSpecs; +in + +# darwin package set +self: + +let + macosPackages_11_0_1 = import ./macos-11.0.1.nix { inherit applePackage'; }; + developerToolsPackages_11_3_1 = import ./developer-tools-11.3.1.nix { inherit applePackage'; }; + + applePackage' = namePath: version: sdkName: sha256: + let + pname = builtins.head (lib.splitString "/" namePath); + appleDerivation = appleDerivation' pname version sdkName sha256; + callPackage = self.newScope { inherit appleDerivation; }; + in callPackage (./. + "/${namePath}"); + + applePackage = namePath: sdkName: sha256: let + pname = builtins.head (lib.splitString "/" namePath); + version = versions.${sdkName}.${pname}; + in applePackage' namePath version sdkName sha256; + # Only used for bootstrapping. It’s convenient because it was the last version to come with a real makefile. adv_cmds-boot = applePackage "adv_cmds/boot.nix" "osx-10.5.8" "102ssayxbg9wb35mdmhswbnw0bg7js3pfd8fcbic83c5q3bqa6c6" {}; - # TODO: shorten this list, we should cut down to a minimum set of bootstrap or necessary packages here. - stubPackages = { +in + +developerToolsPackages_11_3_1 // macosPackages_11_0_1 // { + # TODO: shorten this list, we should cut down to a minimum set of bootstrap or necessary packages here. + inherit (adv_cmds-boot) ps locale; architecture = applePackage "architecture" "osx-10.11.6" "1pbpjcd7is69hn8y29i98ci0byik826if8gnp824ha92h90w0fq3" {}; bsdmake = applePackage "bsdmake" "dev-tools-3.2.6" "11a9kkhz5bfgi1i8kpdkis78lhc6b5vxmhd598fcdgra1jw4iac2" {}; @@ -290,7 +300,4 @@ let # TODO(matthewbauer): # To be removed, once I figure out how to build a newer Security version. Security = applePackage "Security/boot.nix" "osx-10.9.5" "1nv0dczf67dhk17hscx52izgdcyacgyy12ag0jh6nl5hmfzsn8yy" {}; - }; - - packages = developerToolsPackages_11_3_1 // macosPackages_11_0_1 // stubPackages; -in packages +} diff --git a/pkgs/os-specific/linux/kernel/linux-lqx.nix b/pkgs/os-specific/linux/kernel/linux-lqx.nix index 8d0333e8fd6..c279edee2f1 100644 --- a/pkgs/os-specific/linux/kernel/linux-lqx.nix +++ b/pkgs/os-specific/linux/kernel/linux-lqx.nix @@ -1,7 +1,7 @@ { lib, fetchFromGitHub, buildLinux, linux_zen, ... } @ args: let - version = "5.11.16"; + version = "5.11.18"; suffix = "lqx1"; in @@ -14,7 +14,7 @@ buildLinux (args // { owner = "zen-kernel"; repo = "zen-kernel"; rev = "v${version}-${suffix}"; - sha256 = "1j25r45arikjwyhbr72r1935pr7a8g2j6vshggywdiixvizvrx9b"; + sha256 = "0fz0s6bdcvbzy1149acqkq3aqg481dwiq85wh7ii1hx6p1gbsx71"; }; extraMeta = { diff --git a/pkgs/os-specific/linux/lxc/default.nix b/pkgs/os-specific/linux/lxc/default.nix index 1f5cf028a28..bad7622771a 100644 --- a/pkgs/os-specific/linux/lxc/default.nix +++ b/pkgs/os-specific/linux/lxc/default.nix @@ -9,11 +9,11 @@ with lib; stdenv.mkDerivation rec { pname = "lxc"; - version = "4.0.8"; + version = "4.0.9"; src = fetchurl { url = "https://linuxcontainers.org/downloads/lxc/lxc-${version}.tar.gz"; - sha256 = "16qbmysiyrvb1inbbdr8qwqa0c6h9mwyrbx4ry18x0kvrhmqamdc"; + sha256 = "0az56xpvhqiwmf9wfxzaz89s5idrgd9ynd13psscw3hlx480dkqz"; }; nativeBuildInputs = [ diff --git a/pkgs/os-specific/linux/tuxedo-keyboard/default.nix b/pkgs/os-specific/linux/tuxedo-keyboard/default.nix index 3187ba6d4db..fabfebfcba1 100644 --- a/pkgs/os-specific/linux/tuxedo-keyboard/default.nix +++ b/pkgs/os-specific/linux/tuxedo-keyboard/default.nix @@ -1,16 +1,18 @@ -{ lib, stdenv, fetchFromGitHub, kernel, kmod }: +{ lib, stdenv, fetchFromGitHub, kernel, linuxHeaders}: stdenv.mkDerivation rec { pname = "tuxedo-keyboard-${kernel.version}"; - version = "2019-08-26"; + version = "3.0.5"; src = fetchFromGitHub { owner = "tuxedocomputers"; repo = "tuxedo-keyboard"; - rev = "d65e76e84cfd8169591fc2a0a7c9219fa19da1b5"; - sha256 = "1s48qpwybwh5pwqas2d1v2a7x4r97sm4hr9i4902r1d7h384bv17"; + rev = "v${version}"; + sha256 = "123ady2bi2dwbajy3pgv10l3g2pyhi5k31c1ii0zcrvl2qqhndck"; }; + buildInputs = [ linuxHeaders ]; + makeFlags = [ "KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" ]; installPhase = '' @@ -21,7 +23,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "Full color keyboard driver for tuxedo computers laptops"; homepage = "https://github.com/tuxedocomputers/tuxedo-keyboard/"; - license = licenses.gpl2; + license = licenses.gpl3Plus; platforms = platforms.linux; maintainers = [ maintainers.blanky0230 ]; }; diff --git a/pkgs/os-specific/linux/wpa_supplicant/0001-Implement-read-only-mode-for-ssids.patch b/pkgs/os-specific/linux/wpa_supplicant/0001-Implement-read-only-mode-for-ssids.patch new file mode 100644 index 00000000000..d459de8a7f3 --- /dev/null +++ b/pkgs/os-specific/linux/wpa_supplicant/0001-Implement-read-only-mode-for-ssids.patch @@ -0,0 +1,130 @@ +From 99ae610f0ae3608a12c864caedf396f14e68327d Mon Sep 17 00:00:00 2001 +From: Maximilian Bosch <maximilian@mbosch.me> +Date: Fri, 19 Feb 2021 19:44:21 +0100 +Subject: [PATCH] Implement read-only mode for ssids + +With this change it's possible to define `network=`-sections in a second +config file specified via `-I` without having changes written to +`/etc/wpa_supplicant.conf`. + +This is helpful on e.g. NixOS to allow both declarative (i.e. read-only) +and imperative (i.e. mutable) networks. +--- + wpa_supplicant/config.h | 2 +- + wpa_supplicant/config_file.c | 5 +++-- + wpa_supplicant/config_none.c | 2 +- + wpa_supplicant/config_ssid.h | 2 ++ + wpa_supplicant/wpa_supplicant.c | 8 ++++---- + 5 files changed, 11 insertions(+), 8 deletions(-) + +diff --git a/wpa_supplicant/config.h b/wpa_supplicant/config.h +index 6a297ecfe..adaf4d398 100644 +--- a/wpa_supplicant/config.h ++++ b/wpa_supplicant/config.h +@@ -1614,7 +1614,7 @@ const char * wpa_config_get_global_field_name(unsigned int i, int *no_var); + * + * Each configuration backend needs to implement this function. + */ +-struct wpa_config * wpa_config_read(const char *name, struct wpa_config *cfgp); ++struct wpa_config * wpa_config_read(const char *name, struct wpa_config *cfgp, int ro); + + /** + * wpa_config_write - Write or update configuration data +diff --git a/wpa_supplicant/config_file.c b/wpa_supplicant/config_file.c +index 77c326df5..d5ed051b9 100644 +--- a/wpa_supplicant/config_file.c ++++ b/wpa_supplicant/config_file.c +@@ -373,7 +373,7 @@ static int wpa_config_process_blob(struct wpa_config *config, FILE *f, + #endif /* CONFIG_NO_CONFIG_BLOBS */ + + +-struct wpa_config * wpa_config_read(const char *name, struct wpa_config *cfgp) ++struct wpa_config * wpa_config_read(const char *name, struct wpa_config *cfgp, int ro) + { + FILE *f; + char buf[512], *pos; +@@ -415,6 +415,7 @@ struct wpa_config * wpa_config_read(const char *name, struct wpa_config *cfgp) + while (wpa_config_get_line(buf, sizeof(buf), f, &line, &pos)) { + if (os_strcmp(pos, "network={") == 0) { + ssid = wpa_config_read_network(f, &line, id++); ++ ssid->ro = ro; + if (ssid == NULL) { + wpa_printf(MSG_ERROR, "Line %d: failed to " + "parse network block.", line); +@@ -1591,7 +1592,7 @@ int wpa_config_write(const char *name, struct wpa_config *config) + } + + for (ssid = config->ssid; ssid; ssid = ssid->next) { +- if (ssid->key_mgmt == WPA_KEY_MGMT_WPS || ssid->temporary) ++ if (ssid->key_mgmt == WPA_KEY_MGMT_WPS || ssid->temporary || ssid->ro) + continue; /* do not save temporary networks */ + if (wpa_key_mgmt_wpa_psk(ssid->key_mgmt) && !ssid->psk_set && + !ssid->passphrase) +diff --git a/wpa_supplicant/config_none.c b/wpa_supplicant/config_none.c +index 2aac28fa3..02191b425 100644 +--- a/wpa_supplicant/config_none.c ++++ b/wpa_supplicant/config_none.c +@@ -17,7 +17,7 @@ + #include "base64.h" + + +-struct wpa_config * wpa_config_read(const char *name, struct wpa_config *cfgp) ++struct wpa_config * wpa_config_read(const char *name, struct wpa_config *cfgp, int ro) + { + struct wpa_config *config; + +diff --git a/wpa_supplicant/config_ssid.h b/wpa_supplicant/config_ssid.h +index d5c5c00a9..fd80c079c 100644 +--- a/wpa_supplicant/config_ssid.h ++++ b/wpa_supplicant/config_ssid.h +@@ -93,6 +93,8 @@ struct wpa_ssid { + */ + int id; + ++ int ro; ++ + /** + * priority - Priority group + * +diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c +index 911d79d17..cb0cb99b1 100644 +--- a/wpa_supplicant/wpa_supplicant.c ++++ b/wpa_supplicant/wpa_supplicant.c +@@ -1052,14 +1052,14 @@ int wpa_supplicant_reload_configuration(struct wpa_supplicant *wpa_s) + + if (wpa_s->confname == NULL) + return -1; +- conf = wpa_config_read(wpa_s->confname, NULL); ++ conf = wpa_config_read(wpa_s->confname, NULL, 0); + if (conf == NULL) { + wpa_msg(wpa_s, MSG_ERROR, "Failed to parse the configuration " + "file '%s' - exiting", wpa_s->confname); + return -1; + } + if (wpa_s->confanother && +- !wpa_config_read(wpa_s->confanother, conf)) { ++ !wpa_config_read(wpa_s->confanother, conf, 1)) { + wpa_msg(wpa_s, MSG_ERROR, + "Failed to parse the configuration file '%s' - exiting", + wpa_s->confanother); +@@ -5638,7 +5638,7 @@ static int wpa_supplicant_init_iface(struct wpa_supplicant *wpa_s, + #else /* CONFIG_BACKEND_FILE */ + wpa_s->confname = os_strdup(iface->confname); + #endif /* CONFIG_BACKEND_FILE */ +- wpa_s->conf = wpa_config_read(wpa_s->confname, NULL); ++ wpa_s->conf = wpa_config_read(wpa_s->confname, NULL, 0); + if (wpa_s->conf == NULL) { + wpa_printf(MSG_ERROR, "Failed to read or parse " + "configuration '%s'.", wpa_s->confname); +@@ -5646,7 +5646,7 @@ static int wpa_supplicant_init_iface(struct wpa_supplicant *wpa_s, + } + wpa_s->confanother = os_rel2abs_path(iface->confanother); + if (wpa_s->confanother && +- !wpa_config_read(wpa_s->confanother, wpa_s->conf)) { ++ !wpa_config_read(wpa_s->confanother, wpa_s->conf, 1)) { + wpa_printf(MSG_ERROR, + "Failed to read or parse configuration '%s'.", + wpa_s->confanother); +-- +2.29.2 + diff --git a/pkgs/os-specific/linux/wpa_supplicant/default.nix b/pkgs/os-specific/linux/wpa_supplicant/default.nix index 80eaf04a114..51af6abde8c 100644 --- a/pkgs/os-specific/linux/wpa_supplicant/default.nix +++ b/pkgs/os-specific/linux/wpa_supplicant/default.nix @@ -1,5 +1,7 @@ { lib, stdenv, fetchurl, fetchpatch, openssl, pkg-config, libnl , dbus, readline ? null, pcsclite ? null + +, readOnlyModeSSIDs ? false }: with lib; @@ -43,6 +45,9 @@ stdenv.mkDerivation rec { url = "https://w1.fi/cgit/hostap/patch/?id=a0541334a6394f8237a4393b7372693cd7e96f15"; sha256 = "1gbhlz41x1ar1hppnb76pqxj6vimiypy7c4kq6h658637s4am3xg"; }) + ] ++ lib.optionals readOnlyModeSSIDs [ + # Allow read-only networks + ./0001-Implement-read-only-mode-for-ssids.patch ]; # TODO: Patch epoll so that the dbus actually responds @@ -134,7 +139,7 @@ stdenv.mkDerivation rec { homepage = "https://w1.fi/wpa_supplicant/"; description = "A tool for connecting to WPA and WPA2-protected wireless networks"; license = licenses.bsd3; - maintainers = with maintainers; [ marcweber ]; + maintainers = with maintainers; [ marcweber ma27 ]; platforms = platforms.linux; }; } |