3
0
Fork 0
forked from mirrors/nixpkgs

Merge staging-next into staging

This commit is contained in:
github-actions[bot] 2022-05-04 00:02:57 +00:00 committed by GitHub
commit ee7e3f30f3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
52 changed files with 1476 additions and 682 deletions

View file

@ -13288,6 +13288,12 @@
githubId = 1771332;
name = "László Vaskó";
};
vlinkz = {
email = "vmfuentes64@gmail.com";
github = "vlinkz";
githubId = 20145996;
name = "Victor Fuentes";
};
vlstill = {
email = "xstill@fi.muni.cz";
github = "vlstill";

View file

@ -311,6 +311,16 @@ def load_plugins_from_csv(config: FetchConfig, input_file: Path,) -> List[Plugin
return plugins
def run_nix_expr(expr):
with CleanEnvironment():
cmd = ["nix", "eval", "--extra-experimental-features",
"nix-command", "--impure", "--json", "--expr", expr]
log.debug("Running command %s", cmd)
out = subprocess.check_output(cmd)
data = json.loads(out)
return data
class Editor:
"""The configuration of the update script."""
@ -333,13 +343,9 @@ class Editor:
self.deprecated = deprecated or root.joinpath("deprecated.json")
self.cache_file = cache_file or f"{name}-plugin-cache.json"
def get_current_plugins(editor) -> List[Plugin]:
def get_current_plugins(self) -> List[Plugin]:
"""To fill the cache"""
with CleanEnvironment():
cmd = ["nix", "eval", "--extra-experimental-features", "nix-command", "--impure", "--json", "--expr", editor.get_plugins]
log.debug("Running command %s", cmd)
out = subprocess.check_output(cmd)
data = json.loads(out)
data = run_nix_expr(self.get_plugins)
plugins = []
for name, attr in data.items():
print("get_current_plugins: name %s" % name)

View file

@ -124,6 +124,14 @@
default.
</para>
</listitem>
<listitem>
<para>
The GNOME and Plasma installation CDs now use
<literal>pkgs.calamares</literal> and
<literal>pkgs.calamares-nixos-extensions</literal> to allow
users to easily install and set up NixOS with a GUI.
</para>
</listitem>
</itemizedlist>
</section>
<section xml:id="sec-release-22.05-new-services">

View file

@ -38,6 +38,8 @@ In addition to numerous new and upgraded packages, this release has the followin
- The default GHC version has been updated from 8.10.7 to 9.0.2. `pkgs.haskellPackages` and `pkgs.ghc` will now use this version by default.
- The GNOME and Plasma installation CDs now use `pkgs.calamares` and `pkgs.calamares-nixos-extensions` to allow users to easily install and set up NixOS with a GUI.
## New Services {#sec-release-22.05-new-services}
- [aesmd](https://github.com/intel/linux-sgx#install-the-intelr-sgx-psw), the Intel SGX Architectural Enclave Service Manager. Available as [services.aesmd](#opt-services.aesmd.enable).

View file

@ -35,22 +35,28 @@ with lib;
# Enable sound in graphical iso's.
hardware.pulseaudio.enable = true;
environment.systemPackages = [
# Spice guest additions
services.spice-vdagentd.enable = true;
# Enable plymouth
boot.plymouth.enable = true;
environment.defaultPackages = with pkgs; [
# Include gparted for partitioning disks.
pkgs.gparted
gparted
# Include some editors.
pkgs.vim
pkgs.bvi # binary editor
pkgs.joe
vim
nano
# Include some version control tools.
pkgs.git
git
rsync
# Firefox for reading the manual.
pkgs.firefox
firefox
pkgs.glxinfo
glxinfo
];
}

View file

@ -0,0 +1,59 @@
# This module defines a NixOS installation CD that contains GNOME.
{ pkgs, ... }:
{
imports = [ ./installation-cd-graphical-calamares.nix ];
isoImage.edition = "gnome";
services.xserver.desktopManager.gnome = {
# Add Firefox and other tools useful for installation to the launcher
favoriteAppsOverride = ''
[org.gnome.shell]
favorite-apps=[ 'firefox.desktop', 'nixos-manual.desktop', 'org.gnome.Console.desktop', 'org.gnome.Nautilus.desktop', 'gparted.desktop', 'io.calamares.calamares.desktop' ]
'';
# Override GNOME defaults to disable GNOME tour and disable suspend
extraGSettingsOverrides = ''
[org.gnome.shell]
welcome-dialog-last-shown-version='9999999999'
[org.gnome.settings-daemon.plugins.power]
sleep-inactive-ac-type='nothing'
sleep-inactive-battery-type='nothing'
'';
extraGSettingsOverridePackages = [ pkgs.gnome.gnome-settings-daemon ];
enable = true;
};
# Theme calamares with GNOME theme
qt5 = {
enable = true;
platformTheme = "gnome";
};
# Fix scaling for calamares on wayland
environment.variables = {
QT_QPA_PLATFORM = "$([[ $XDG_SESSION_TYPE = \"wayland\" ]] && echo \"wayland\")";
};
services.xserver.displayManager = {
gdm = {
enable = true;
# autoSuspend makes the machine automatically suspend after inactivity.
# It's possible someone could/try to ssh'd into the machine and obviously
# have issues because it's inactive.
# See:
# * https://github.com/NixOS/nixpkgs/pull/63790
# * https://gitlab.gnome.org/GNOME/gnome-control-center/issues/22
autoSuspend = false;
};
autoLogin = {
enable = true;
user = "nixos";
};
};
}

View file

@ -0,0 +1,49 @@
# This module defines a NixOS installation CD that contains X11 and
# Plasma 5.
{ pkgs, ... }:
{
imports = [ ./installation-cd-graphical-calamares.nix ];
isoImage.edition = "plasma5";
services.xserver = {
desktopManager.plasma5 = {
enable = true;
};
# Automatically login as nixos.
displayManager = {
sddm.enable = true;
autoLogin = {
enable = true;
user = "nixos";
};
};
};
environment.systemPackages = with pkgs; [
# Graphical text editor
kate
];
system.activationScripts.installerDesktop = let
# Comes from documentation.nix when xserver and nixos.enable are true.
manualDesktopFile = "/run/current-system/sw/share/applications/nixos-manual.desktop";
homeDir = "/home/nixos/";
desktopDir = homeDir + "Desktop/";
in ''
mkdir -p ${desktopDir}
chown nixos ${homeDir} ${desktopDir}
ln -sfT ${manualDesktopFile} ${desktopDir + "nixos-manual.desktop"}
ln -sfT ${pkgs.gparted}/share/applications/gparted.desktop ${desktopDir + "gparted.desktop"}
ln -sfT ${pkgs.konsole}/share/applications/org.kde.konsole.desktop ${desktopDir + "org.kde.konsole.desktop"}
ln -sfT ${pkgs.calamares-nixos}/share/applications/io.calamares.calamares.desktop ${desktopDir + "io.calamares.calamares.desktop"}
'';
}

View file

@ -0,0 +1,20 @@
# This module adds the calamares installer to the basic graphical NixOS
# installation CD.
{ pkgs, ... }:
let
calamares-nixos-autostart = pkgs.makeAutostartItem { name = "io.calamares.calamares"; package = pkgs.calamares-nixos; };
in
{
imports = [ ./installation-cd-graphical-base.nix ];
environment.systemPackages = with pkgs; [
# Calamares for graphical installation
libsForQt5.kpmcore
calamares-nixos
calamares-nixos-autostart
calamares-nixos-extensions
# Needed for calamares QML module packagechooserq
libsForQt5.full
];
}

View file

@ -1,8 +1,6 @@
# This module defines a NixOS installation CD that contains GNOME.
{ lib, ... }:
with lib;
{ ... }:
{
imports = [ ./installation-cd-graphical-base.nix ];

View file

@ -1,9 +1,7 @@
# This module defines a NixOS installation CD that contains X11 and
# Plasma 5.
{ config, lib, pkgs, ... }:
with lib;
{ pkgs, ... }:
{
imports = [ ./installation-cd-graphical-base.nix ];

View file

@ -150,13 +150,13 @@ in rec {
});
iso_plasma5 = forMatchingSystems [ "x86_64-linux" ] (system: makeIso {
module = ./modules/installer/cd-dvd/installation-cd-graphical-plasma5.nix;
module = ./modules/installer/cd-dvd/installation-cd-graphical-calamares-plasma5.nix;
type = "plasma5";
inherit system;
});
iso_gnome = forMatchingSystems [ "x86_64-linux" ] (system: makeIso {
module = ./modules/installer/cd-dvd/installation-cd-graphical-gnome.nix;
module = ./modules/installer/cd-dvd/installation-cd-graphical-calamares-gnome.nix;
type = "gnome";
inherit system;
});

View file

@ -2,15 +2,15 @@
with pythonPackages; buildPythonApplication rec {
pname = "greg";
version = "0.4.7";
version = "0.4.8";
disabled = !isPy3k;
src = fetchFromGitHub {
owner = "manolomartinez";
repo = pname;
rev = "v" + version;
sha256 = "0bdzgh2k1ppgcvqiasxwp3w89q44s4jgwjidlips3ixx1bzm822v";
rev = "refs/tags/v${version}";
sha256 = "sha256-o4+tXVJTgT52JyJOC+Glr2cvZjbTaZL8TIsmz+A4vE4=";
};
propagatedBuildInputs = [ setuptools feedparser ];

View file

@ -3,7 +3,8 @@
let
inherit (vimUtils.override {inherit vim;}) buildVimPluginFrom2Nix vimGenDocHook vimCommandCheckHook;
inherit (vimUtils.override {inherit vim;})
buildVimPluginFrom2Nix vimGenDocHook vimCommandCheckHook;
inherit (lib) extends;
@ -24,6 +25,7 @@ let
plugins = callPackage ./generated.nix {
inherit buildVimPluginFrom2Nix;
inherit (vimUtils) buildNeovimPluginFrom2Nix;
};
# TL;DR

File diff suppressed because it is too large Load diff

View file

@ -26,19 +26,24 @@ from typing import List, Tuple
from pathlib import Path
log = logging.getLogger()
log.addHandler(logging.StreamHandler())
sh = logging.StreamHandler()
formatter = logging.Formatter('%(name)s:%(levelname)s: %(message)s')
sh.setFormatter(formatter)
log.addHandler(sh)
# Import plugin update library from maintainers/scripts/pluginupdate.py
ROOT = Path(os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))))
# Ideally, ROOT.(parent^5) points to root of Nixpkgs official tree
sys.path.insert(0, os.path.join(ROOT.parent.parent.parent.parent.parent, "maintainers", "scripts"))
import pluginupdate
from pluginupdate import run_nix_expr, PluginDesc
GET_PLUGINS = f"""(with import <localpkgs> {{}};
let
inherit (vimUtils.override {{inherit vim;}}) buildVimPluginFrom2Nix;
inherit (vimUtils.override {{inherit vim;}}) buildNeovimPluginFrom2Nix buildVimPluginFrom2Nix;
generated = callPackage {ROOT}/generated.nix {{
inherit buildVimPluginFrom2Nix;
inherit buildNeovimPluginFrom2Nix buildVimPluginFrom2Nix;
}};
hasChecksum = value: lib.isAttrs value && lib.hasAttrByPath ["src" "outputHash"] value;
getChecksum = name: value:
@ -50,43 +55,69 @@ let
checksums = lib.mapAttrs getChecksum generated;
in lib.filterAttrs (n: v: v != null) checksums)"""
GET_PLUGINS_LUA = """
with import <localpkgs> {};
lib.attrNames lua51Packages"""
HEADER = (
"# This file has been generated by ./pkgs/applications/editors/vim/plugins/update.py. Do not edit!"
)
def isNeovimPlugin(plug: pluginupdate.Plugin) -> bool:
'''
Whether it's a neovim-only plugin
We can check if it's available in lua packages
'''
global luaPlugins
if plug.normalized_name in luaPlugins:
log.debug("%s is a neovim plugin", plug)
return True
return False
class VimEditor(pluginupdate.Editor):
def generate_nix(self, plugins: List[Tuple[pluginupdate.PluginDesc, pluginupdate.Plugin]], outfile: str):
def generate_nix(self, plugins: List[Tuple[PluginDesc, pluginupdate.Plugin]], outfile: str):
sorted_plugins = sorted(plugins, key=lambda v: v[0].name.lower())
with open(outfile, "w+") as f:
f.write(HEADER)
f.write(textwrap.dedent("""
{ lib, buildVimPluginFrom2Nix, fetchFromGitHub, fetchgit }:
{ lib, buildVimPluginFrom2Nix, buildNeovimPluginFrom2Nix, fetchFromGitHub, fetchgit }:
final: prev:
{"""
{
"""
))
for pdesc, plugin in sorted_plugins:
content = self.plugin2nix(pdesc, plugin)
f.write(content)
f.write("\n}\n")
print(f"updated {outfile}")
repo = pdesc.repo
src_nix = repo.as_nix(plugin)
f.write(
f"""
{plugin.normalized_name} = buildVimPluginFrom2Nix {{
def plugin2nix(self, pdesc: PluginDesc, plugin: pluginupdate.Plugin) -> str:
repo = pdesc.repo
isNeovim = isNeovimPlugin(plugin)
content = f" {plugin.normalized_name} = "
src_nix = repo.as_nix(plugin)
content += """{buildFn} {{
pname = "{plugin.name}";
version = "{plugin.version}";
src = {src_nix};
meta.homepage = "{repo.uri}";
}};
"""
)
f.write("\n}\n")
print(f"updated {outfile}")
""".format(
buildFn="buildNeovimPluginFrom2Nix" if isNeovim else "buildVimPluginFrom2Nix", plugin=plugin, src_nix=src_nix, repo=repo)
print(content)
return content
def main():
global luaPlugins
luaPlugins = run_nix_expr(GET_PLUGINS_LUA)
editor = VimEditor("vim", ROOT, GET_PLUGINS)
parser = editor.create_parser()
args = parser.parse_args()

View file

@ -535,6 +535,11 @@ rec {
inherit lib stdenv rtpPath vim vimGenDocHook vimCommandCheckHook;
}) buildVimPlugin buildVimPluginFrom2Nix;
# TODO placeholder to ease working on automatic plugin detection
# this should be a luarocks "flat" install with appropriate vim hooks
buildNeovimPluginFrom2Nix = buildVimPluginFrom2Nix;
# used to figure out which python dependencies etc. neovim needs
requiredPlugins = {
packages ? {},

View file

@ -20,13 +20,13 @@ let
in
python3Packages.buildPythonApplication rec {
pname = "bottles";
version = "2022.4.28-trento";
version = "2022.5.2-trento";
src = fetchFromGitHub {
owner = "bottlesdevs";
repo = pname;
rev = version;
sha256 = "sha256-PVtjKAwCA9GliUDIoAFMqeVFZYPo2dxCWhW9lSotC6w=";
sha256 = "sha256-9auQm8rmySjPQmhueGMRj4DsQiKhCGtE97byc/h+v84=";
};
postPatch = ''

View file

@ -27,7 +27,7 @@
}:
let
version = "1.11.0";
version = "1.12.1";
# build stimuli file for PGO build and the script to generate it
# independently of the foot's build, so we can cache the result
@ -99,7 +99,7 @@ stdenv.mkDerivation rec {
owner = "dnkl";
repo = pname;
rev = version;
sha256 = "1d9bk8lhmw5lc8k0mw80g0vbwgxyh3gw5c7ppy3sir07s9y0y0fn";
sha256 = "14jqs4sarxbrgi5pxz0afqa9jxq90cb5ayqd21qj2n65whqa5bpk";
};
depsBuildBuild = [
@ -144,6 +144,7 @@ stdenv.mkDerivation rec {
mesonBuildType = "release";
# See https://codeberg.org/dnkl/foot/src/tag/1.9.2/INSTALL.md#options
# TODO(@sternenseemann): install systemd user units
mesonFlags = [
# Use lto
"-Db_lto=true"

View file

@ -10,13 +10,13 @@
buildGoModule rec {
pname = "containerd";
version = "1.6.3";
version = "1.6.4";
src = fetchFromGitHub {
owner = "containerd";
repo = "containerd";
rev = "v${version}";
sha256 = "sha256-mVnZsvhpKx/5dHMF0Z8BfuUSqwoIhOtPkA/1BSrVVqA=";
sha256 = "sha256-425BcVHCliAHFQqGn6sWH/ahDX3JR6l/sYZWHpgmZW0=";
};
vendorSha256 = null;

View file

@ -178,4 +178,10 @@ in rec {
name = "wheel-unpack-hook.sh";
deps = [ wheel ];
} ./wheel-unpack-hook.sh) {};
sphinxHook = callPackage ({ sphinx }:
makeSetupHook {
name = "python${python.pythonVersion}-sphinx-hook";
deps = [ sphinx ];
} ./sphinx-hook.sh) {};
}

View file

@ -0,0 +1,57 @@
# This hook automatically finds Sphinx documentation, builds it in html format
# and installs it.
#
# This hook knows about several popular locations in which subdirectory
# documentation may be, but in very unusual cases $sphinxRoot directory can be
# set explicitly.
#
# Name of the directory relative to ${doc:-$out}/share/doc is normally also
# deduced automatically, but can be overridden with $sphinxOutdir variable.
#
# Sphinx build system can depend on arbitrary amount of python modules, client
# code is responsible for ensuring that all dependencies are present.
buildSphinxPhase() {
local __sphinxRoot="" o
runHook preBuildSphinx
if [[ -n "${sphinxRoot:-}" ]] ; then # explicit root
if ! [[ -f "${sphinxRoot}/conf.py" ]] ; then
echo 2>&1 "$sphinxRoot/conf.py: no such file"
exit 1
fi
__sphinxRoot=$sphinxRoot
else
for o in doc docs doc/source docs/source ; do
if [[ -f "$o/conf.py" ]] ; then
echo "Sphinx documentation found in $o"
__sphinxRoot=$o
break
fi
done
fi
if [[ -z "${__sphinxRoot}" ]] ; then
echo 2>&1 "Sphinx documentation not found, use 'sphinxRoot' variable"
exit 1
fi
sphinx-build -M html "${__sphinxRoot}" ".sphinx/html" -v
runHook postBuildSphinx
}
installSphinxPhase() {
local docdir=""
runHook preInstallSphinx
docdir="${doc:-$out}/share/doc/${sphinxOutdir:-$name}"
mkdir -p "$docdir"
cp -r .sphinx/html/html "$docdir/"
rm -fr "${docdir}/html/_sources" "${docdir}/html/.buildinfo"
runHook postInstallSphinx
}
preBuildPhases+=" buildSphinxPhase"
postPhases+=" installSphinxPhase"

View file

@ -20,14 +20,14 @@ in
stdenv.mkDerivation rec {
pname = "fcft";
version = "3.0.1";
version = "3.1.1";
src = fetchFromGitea {
domain = "codeberg.org";
owner = "dnkl";
repo = "fcft";
rev = version;
sha256 = "0jxy92ny8b7s7yvz1mr8zpf7l2zsn506fi9f98pvh9k25jprg0cx";
sha256 = "1b43sqp5hah374ns62pcrmbiriqsdisb60hp1nwqz3ny3rfjvn15";
};
depsBuildBuild = [ pkg-config ];

View file

@ -1,4 +1,4 @@
{ stdenv, lib, fetchurl, fetchpatch, extra-cmake-modules
{ stdenv, lib, fetchurl, extra-cmake-modules
, qca-qt5, kauth, kio, polkit-qt, qtbase
, util-linux
}:
@ -6,25 +6,14 @@
stdenv.mkDerivation rec {
pname = "kpmcore";
# NOTE: When changing this version, also change the version of `partition-manager`.
version = "4.2.0";
version = "22.04.0";
src = fetchurl {
url = "mirror://kde/stable/${pname}/${version}/src/${pname}-${version}.tar.xz";
hash = "sha256-MvW0CqvFZtzcJlya6DIpzorPbKJai6fxt7nKsKpJn54=";
url = "mirror://kde/stable/release-service/${version}/src/${pname}-${version}.tar.xz";
hash = "sha256-sO8WUJL6072H1ghMZd7j0xNMwEn4bJF5PXMhfEb2jbs=";
};
patches = [
# Fix build with `kcoreaddons` >= 5.77.0
(fetchpatch {
url = "https://github.com/KDE/kpmcore/commit/07e5a3ac2858e6d38cc698e0f740e7a693e9f302.patch";
sha256 = "sha256-LYzea888euo2HXM+acWaylSw28iwzOdZBvPBt/gjP1s=";
})
# Fix crash when `fstab` omits mount options.
(fetchpatch {
url = "https://github.com/KDE/kpmcore/commit/eea84fb60525803a789e55bb168afb968464c130.patch";
sha256 = "sha256-NJ3PvyRC6SKNSOlhJPrDDjepuw7IlAoufPgvml3fap0=";
})
];
nativeBuildInputs = [ extra-cmake-modules ];
buildInputs = [
qca-qt5
@ -35,10 +24,13 @@ stdenv.mkDerivation rec {
util-linux # Needs blkid in configure script (note that this is not provided by util-linux-compat)
];
nativeBuildInputs = [ extra-cmake-modules ];
dontWrapQtApps = true;
preConfigure = ''
substituteInPlace src/util/CMakeLists.txt \
--replace \$\{POLKITQT-1_POLICY_FILES_INSTALL_DIR\} $out/share/polkit-1/actions
'';
meta = with lib; {
description = "KDE Partition Manager core library";
homepage = "https://invent.kde.org/system/kpmcore";

View file

@ -6,12 +6,14 @@
, pytestCheckHook
, pythonOlder
, soupsieve
, sphinxHook
}:
buildPythonPackage rec {
pname = "beautifulsoup4";
version = "4.11.1";
format = "setuptools";
outputs = ["out" "doc"];
disabled = pythonOlder "3.6";
@ -29,6 +31,7 @@ buildPythonPackage rec {
checkInputs = [
pytestCheckHook
];
nativeBuildInputs = [ sphinxHook ];
pythonImportsCheck = [
"bs4"

View file

@ -8,6 +8,7 @@
, mock
, pytest-mock
, pytestCheckHook
, sphinxHook
}:
buildPythonPackage rec {
@ -16,6 +17,7 @@ buildPythonPackage rec {
format = "setuptools";
disabled = pythonOlder "3.7";
outputs = ["out" "doc"];
src = fetchFromGitHub {
owner = "dropbox";
@ -46,6 +48,7 @@ buildPythonPackage rec {
pythonImportsCheck = [
"dropbox"
];
nativeBuildInputs = [ sphinxHook ];
# Set SCOPED_USER_DROPBOX_TOKEN environment variable to a valid value.
disabledTests = [

View file

@ -11,7 +11,7 @@
, cdrtools
, usbutils
, util-linux
, spicy
, spice-gtk
, swtpm
, wget
, xdg-user-dirs
@ -32,7 +32,7 @@ let
cdrtools
usbutils
util-linux
spicy
spice-gtk
swtpm
wget
xdg-user-dirs

View file

@ -66,7 +66,7 @@ stdenv.mkDerivation rec {
${lib.concatStringsSep "\n" (map (p: addJars "${p}/share/java") extraJars)}
${lib.getBin jre}/bin/java -cp "\$CP" \$JAVA_OPTS \
liquibase.integration.commandline.Main \''${1+"\$@"}
liquibase.integration.commandline.LiquibaseCommandLine \''${1+"\$@"}
EOF
chmod +x $out/bin/liquibase
'';

View file

@ -2,13 +2,13 @@
stdenv.mkDerivation rec {
pname = "evdi";
version = "1.10.0";
version = "1.10.1";
src = fetchFromGitHub {
owner = "DisplayLink";
repo = pname;
rev = "v${version}";
sha256 = "sha256-vMcmUWdnO9JmImxz4vO3/UONlsrCGc8VH/o38YwCIzg=";
sha256 = "sha256-XABpC2g4/e6/2HsHzrBUs6OW1lzgGBYlFAatVcA/vD8=";
};
NIX_CFLAGS_COMPILE = "-Wno-error -Wno-error=sign-compare";

View file

@ -1,25 +0,0 @@
# Generated by bower2nix v3.2.0 (https://github.com/rvl/bower2nix)
{ fetchbower, buildEnv }:
buildEnv { name = "bower-env"; ignoreCollisions = true; paths = [
(fetchbower "uchiwa-web" "1.7.0" "1.7.0" "1qn09j3a1ngqn36rhz7a2dj00szr0r6fjb40lfbmq3drkzppgbm1")
(fetchbower "angular" "1.6.10" "~1.6.3" "0ag8xddsgxx5yka4wjq4ala4y6z3x2g1vc3x7a1n291fzz26p7ws")
(fetchbower "angular-bootstrap" "2.2.0" "~2.2.0" "11r2nlwp6xrim2y6lnrr8v064mx3bmlxchqpg1i803v9zxz3q53d")
(fetchbower "angular-cookies" "1.6.10" "~1.6.3" "0bjgmz5jnw06dfxhq9sajj62fk0b3v4j9p7nb45x8bl8rzkf25pn")
(fetchbower "angular-gravatar" "0.4.2" "~0.4.2" "14jrzvjwx64awh9z95054manp8qd57fvinqhmakipz5x12i7qrwi")
(fetchbower "angular-moment" "1.0.1" "~1.0.1" "0zkn52s9l15d6b5zfx52g5jpib23rpb637m0p1hzc429w5bbl0rj")
(fetchbower "angular-resource" "1.6.10" "~1.6.3" "1gplq8kd49qakk7ardg5xr5amwvspaz9n71kf8x49xfllda61rm0")
(fetchbower "angular-route" "1.6.10" "~1.6.3" "0vwbn7i45yvsn8c469nj141ahrn7iw85j7hy3vvhh2r373j94mai")
(fetchbower "angular-sanitize" "1.6.10" "~1.6.3" "066gsdl19s27w00wafg2skf5abdsdrlzhkcagkk1ma39dyqyl4i3")
(fetchbower "angular-toastr" "1.6.0" "1.6.0" "1szigf1m28bgpfyg8hbm5rffr5zi7wr9n73nc1fqhk0yqh7gzysh")
(fetchbower "angular-tools/ng-jsoneditor" "ea138469f157d8f2b54ec5b8dcf4b08a55b61459" "ea138469f157d8f2b54ec5b8dcf4b08a55b61459" "1j3vysr01niabc9fxcpixhcq1lyx2fr4q4wpmxhmiqki431h9hq8")
(fetchbower "angular-ua-parser" "0.0.2" "0.0.2" "0gb0vmwksnydlm6hklfq1n4ak2967wcmnx3cx9cgiv7v7vk3w2m9")
(fetchbower "bootstrap" "3.1.1" "3.1.1" "1a06mx1rw5h4wq89kqpa8g2pbiddm3p21dxq50jyi29sywd01ny4")
(fetchbower "bootstrap-sass-official" "3.1.1" "3.1.1" "1k6hhvsd75hdfrz8qcjzmb12c17fdn0h3l3l5k9wgd0rfhhfkyvd")
(fetchbower "fontawesome" "4.4.0" "~4.4.0" "09mrbik8i3skjwchn7ns2020bqmb51kbd3mqi59vh444s4az2sc7")
(fetchbower "highlightjs" "9.1.0" "~9.1.0" "0ld1da3h416a5j8v3v50rrpm4xwvvq8k8y2vwncvaqm9cqddz4s3")
(fetchbower "moment" "2.16.0" "~2.16.0" "1mji892i60f2aw3vhl6878acrcgh0ycn3r4af0ivnjf8az2b9n71")
(fetchbower "moment-picker" "0.9.11" "~0.9.7" "0p2g6rp2kcixydrga9lfihg4bxb598rvpi8n8l59mp549diy7vsb")
(fetchbower "ua-parser-js" "0.7.20" "~0.7.12" "18r0islba6cwkvx4s2gna7skhsn2vqjcf1xyap5pcmycjnq93j8s")
(fetchbower "jsoneditor" "5.5.11" "~5.5.10" "1gfsf8jqnd3hb3r9s9246mg40iqxk2ix8k4bjnrsbfmg6cd3xw6x")
(fetchbower "jquery" "3.4.1" ">= 1.9.0" "1vk25pbc55m2c82mqf26rfhxhnliq18isi4vbm4p98a1b9vp8fq7")
]; }

View file

@ -1,53 +0,0 @@
{ lib, stdenv, fetchFromGitHub, buildBowerComponents, buildGoPackage, makeWrapper }:
let
inherit (import ./src.nix) version sha256;
owner = "sensu";
repo = "uchiwa";
src = fetchFromGitHub {
inherit owner repo sha256;
rev = version;
};
backend = buildGoPackage {
pname = "uchiwa-backend";
inherit version;
goPackagePath = "github.com/${owner}/${repo}";
inherit src;
postInstall = ''
mkdir -p $out
cp go/src/github.com/sensu/uchiwa/public/index.html $out/
'';
};
frontend = buildBowerComponents {
name = "uchiwa-frontend-${version}";
generated = ./bower-packages.nix;
inherit src;
};
in stdenv.mkDerivation {
pname = "uchiwa";
inherit version;
inherit src;
nativeBuildInputs = [ makeWrapper ];
buildCommand = ''
mkdir -p $out/bin $out/public
makeWrapper ${backend}/bin/uchiwa $out/bin/uchiwa \
--add-flags "-p $out/public"
ln -s ${backend.out}/index.html $out/public/index.html
ln -s ${frontend.out}/bower_components $out/public/bower_components
'';
meta = with lib; {
description = "A Dashboard for the sensu monitoring framework";
homepage = "http://sensuapp.org/";
license = licenses.mit;
maintainers = with maintainers; [ peterhoeg ];
platforms = platforms.unix;
};
}

View file

@ -1,4 +0,0 @@
{
version = "1.7.0-1";
sha256 = "0fa3zzh6d8v1lfn828s0x65pcknycwyv0d1mndi0gvdfbfg463nf";
}

View file

@ -1,42 +0,0 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl.bin git.out nix jq.out nodePackages.bower2nix
set -euo pipefail
IFS=$'\n\t'
# set -x
REPO=sensu/uchiwa
VERSION=0.0.1
SHA="1111111111111111111111111111111111111111111111111111"
DIR=$(pwd)
write_src() {
cat <<_EOF > $DIR/src.nix
{
version = "${VERSION}";
sha256 = "${SHA}";
}
_EOF
}
LATEST_VERSION=$(curl https://api.github.com/repos/${REPO}/tags -s | jq '.[0]' -r | jq .name -r)
echo "Latest version: ${LATEST_VERSION}"
VERSION=${1:-${LATEST_VERSION}}
echo "Updating to: ${VERSION}"
TOP=$(git rev-parse --show-toplevel)
cd $(dirname $0)
write_src
pushd $TOP >/dev/null
SHA=$(nix-prefetch-url -A uchiwa.src)
popd >/dev/null
write_src
curl https://raw.githubusercontent.com/${REPO}/${VERSION}/bower.json -s > bower.json
rm -f bower-packages.nix
bower2nix bower.json $DIR/bower-packages.nix
rm -f bower.json

View file

@ -65,7 +65,7 @@ in rec {
};
unifi7 = generic {
version = "7.0.25";
sha256 = "sha256-DZi2xy6mS3hfqxX1ikiHKPlJ12eaoZVgyl9jKYt91hg=";
version = "7.1.61";
sha256 = "sha256-7Ac8BjlBLCslSU6IZK0EtheKz4CtH7tcmR8J2rUGYbs=";
};
}

View file

@ -7,6 +7,10 @@ let
# If we're in hydra, we can dispense with the more verbose error
# messages and make problems easier to spot.
inHydra = config.inHydra or false;
# Allow the user to opt-into additional warnings, e.g.
# import <nixpkgs> { config = { showDerivationWarnings = [ "maintainerless" ]; }; }
showWarnings = config.showDerivationWarnings;
getName = attrs: attrs.name or ("${attrs.pname or "«name-missing»"}-${attrs.version or "«version-missing»"}");
# See discussion at https://github.com/NixOS/nixpkgs/pull/25304#issuecomment-298385426
@ -46,6 +50,9 @@ let
hasLicense attrs &&
isUnfree (lib.lists.toList attrs.meta.license);
hasNoMaintainers = attrs:
attrs ? meta.maintainers && (lib.length attrs.meta.maintainers) == 0;
isMarkedBroken = attrs: attrs.meta.broken or false;
hasUnsupportedPlatform = attrs:
@ -91,6 +98,7 @@ let
insecure = remediate_insecure;
broken-outputs = remediateOutputsToInstall;
unknown-meta = x: "";
maintainerless = x: "";
};
remediation_env_var = allow_attr: {
Unfree = "NIXPKGS_ALLOW_UNFREE";
@ -199,6 +207,14 @@ let
else throw;
in handler msg;
handleEvalWarning = { meta, attrs }: { reason , errormsg ? "" }:
let
remediationMsg = (builtins.getAttr reason remediation) attrs;
msg = if inHydra then "Warning while evaluating ${getName attrs}: «${reason}»: ${errormsg}"
else "Package ${getName attrs} in ${pos_str meta} ${errormsg}, continuing anyway."
+ (if remediationMsg != "" then "\n${remediationMsg}" else "");
isEnabled = lib.findFirst (x: x == reason) null showWarnings;
in if isEnabled != null then builtins.trace msg true else true;
metaTypes = with lib.types; rec {
# These keys are documented
@ -277,28 +293,37 @@ let
insecure = isMarkedInsecure attrs;
}
// (if hasDeniedUnfreeLicense attrs && !(hasAllowlistedLicense attrs) then
{ valid = false; reason = "unfree"; errormsg = "has an unfree license (${showLicense attrs.meta.license})"; }
{ valid = "no"; reason = "unfree"; errormsg = "has an unfree license (${showLicense attrs.meta.license})"; }
else if hasBlocklistedLicense attrs then
{ valid = false; reason = "blocklisted"; errormsg = "has a blocklisted license (${showLicense attrs.meta.license})"; }
{ valid = "no"; reason = "blocklisted"; errormsg = "has a blocklisted license (${showLicense attrs.meta.license})"; }
else if !allowBroken && attrs.meta.broken or false then
{ valid = false; reason = "broken"; errormsg = "is marked as broken"; }
{ valid = "no"; reason = "broken"; errormsg = "is marked as broken"; }
else if !allowUnsupportedSystem && hasUnsupportedPlatform attrs then
{ valid = false; reason = "unsupported"; errormsg = "is not supported on ${hostPlatform.system}"; }
{ valid = "no"; reason = "unsupported"; errormsg = "is not supported on ${hostPlatform.system}"; }
else if !(hasAllowedInsecure attrs) then
{ valid = false; reason = "insecure"; errormsg = "is marked as insecure"; }
{ valid = "no"; reason = "insecure"; errormsg = "is marked as insecure"; }
else if checkOutputsToInstall attrs then
{ valid = false; reason = "broken-outputs"; errormsg = "has invalid meta.outputsToInstall"; }
{ valid = "no"; reason = "broken-outputs"; errormsg = "has invalid meta.outputsToInstall"; }
else let res = checkMeta (attrs.meta or {}); in if res != [] then
{ valid = false; reason = "unknown-meta"; errormsg = "has an invalid meta attrset:${lib.concatMapStrings (x: "\n\t - " + x) res}"; }
else { valid = true; });
{ valid = "no"; reason = "unknown-meta"; errormsg = "has an invalid meta attrset:${lib.concatMapStrings (x: "\n\t - " + x) res}"; }
# --- warnings ---
# Please also update the type in /pkgs/top-level/config.nix alongside this.
else if hasNoMaintainers attrs then
{ valid = "warn"; reason = "maintainerless"; errormsg = "has no maintainers"; }
# -----
else { valid = "yes"; });
assertValidity = { meta, attrs }: let
validity = checkValidity attrs;
in validity // {
# Throw an error if trying to evaluate an non-valid derivation
handled = if !validity.valid
then handleEvalIssue { inherit meta attrs; } { inherit (validity) reason errormsg; }
else true;
# Throw an error if trying to evaluate a non-valid derivation
# or, alternatively, just output a warning message.
handled =
{
no = handleEvalIssue { inherit meta attrs; } { inherit (validity) reason errormsg; };
warn = handleEvalWarning { inherit meta attrs; } { inherit (validity) reason errormsg; };
yes = true;
}.${validity.valid};
};
in assertValidity

View file

@ -370,7 +370,7 @@ else let
} // {
# Expose the result of the checks for everyone to see.
inherit (validity) unfree broken unsupported insecure;
available = validity.valid
available = validity.valid != "no"
&& (if config.checkMetaRecursively or false
then lib.all (d: d.meta.available or true) references
else true);

View file

@ -24,7 +24,7 @@ let
}.${stdenv.hostPlatform.system} or (throw "Unsupported platform ${stdenv.hostPlatform.system}");
in stdenv.mkDerivation rec {
pname = "ventoy-bin";
version = "1.0.72";
version = "1.0.74";
nativeBuildInputs = [ autoPatchelfHook makeWrapper ]
++ lib.optional withQt5 qt5.wrapQtAppsHook;
@ -40,13 +40,13 @@ in stdenv.mkDerivation rec {
src = fetchurl {
url = "https://github.com/ventoy/Ventoy/releases/download/v${version}/ventoy-${version}-linux.tar.gz";
sha256 = "sha256-1mfe6ZnqkeBNGNjI7Qx7jG5FLgfn6rVwr0VQvSOG7Ow=";
sha256 = "sha256-raoVbj1+6nSR4knq/FmgVpzXRV71Hrcqd8C6Zsi34Uo=";
};
patches = [
(fetchpatch {
name = "sanitize.patch";
url = "https://aur.archlinux.org/cgit/aur.git/plain/sanitize.patch?h=19f8922b3d96c5ff55eeefc269ae43369a0748e8";
sha256 = "sha256-RDdxPCmrfNMwXNuJwQW48fAiJPbMjdHiBmF03fKqm2o=";
url = "https://aur.archlinux.org/cgit/aur.git/plain/sanitize.patch?h=057f2d1eb496c7a3aaa8229e99a7f709428fa4c5";
sha256 = "sha256-iAtLtM+Q4OsXDK83eCnPNomeNSEqdRLFfK2x7ybPSpk=";
})
./fix-for-read-only-file-system.patch
./add-mips64.patch
@ -82,7 +82,7 @@ in stdenv.mkDerivation rec {
aarch64) rm -r {tool/,VentoyGUI.}{x86_64,i386,mips64el};;
mips64el) rm -r {tool/,VentoyGUI.}{x86_64,i386,aarch64};;
esac
rm README tool/VentoyWorker.sh.orig
rm README
rm tool/"$ARCH"/Ventoy2Disk.gtk2 || true # For aarch64 and mips64el.
# Copy from "$src" to "$out".
@ -106,10 +106,15 @@ in stdenv.mkDerivation rec {
makeWrapper "$VENTOY_PATH/VentoyGUI.$ARCH" "$out/bin/ventoy-gui" \
--prefix PATH : "${lib.makeBinPath buildInputs}" \
--chdir "$VENTOY_PATH"
mkdir "$out"/share/{applications,pixmaps}
ln -s "$VENTOY_PATH"/WebUI/static/img/VentoyLogo.png "$out"/share/pixmaps/
cp ${./ventoy-gui.desktop} "$out"/share/applications/
'' + lib.optionalString (!withGtk3) ''
rm "$VENTOY_PATH/tool/$ARCH/Ventoy2Disk.gtk3"
rm "$VENTOY_PATH"/tool/{"$ARCH"/Ventoy2Disk.gtk3,VentoyGTK.glade}
'' + lib.optionalString (!withQt5) ''
rm "$VENTOY_PATH/tool/$ARCH/Ventoy2Disk.qt5"
'' + lib.optionalString (!withGtk3 && !withQt5) ''
rm "$VENTOY_PATH"/VentoyGUI.*
'';
meta = with lib; {

View file

@ -0,0 +1,10 @@
[Desktop Entry]
Categories=Utility;
Comment=Tool to create bootable USB drive for ISO/WIM/IMG/VHD(x)/EFI files
Exec=ventoy-gui
Hidden=false
Icon=VentoyLogo
Name=Ventoy
StartupNotify=true
Terminal=false
Type=Application

View file

@ -0,0 +1,30 @@
{ stdenv, fetchFromGitHub, lib }:
stdenv.mkDerivation rec {
pname = "calamares-nixos-extensions";
version = "0.3.8";
src = fetchFromGitHub {
owner = "NixOS";
repo = "calamares-nixos-extensions";
rev = version;
sha256 = "MtqAOwlY5euVNAGRl2pRkbg/OolJPNOSQcR4DS5gFz4=";
};
installPhase = ''
runHook preInstall
mkdir -p $out/{lib,share}/calamares
cp -r modules $out/lib/calamares/
cp -r config/* $out/share/calamares/
cp -r branding $out/share/calamares/
runHook postInstall
'';
meta = with lib; {
description = "Calamares modules for NixOS";
homepage = "https://github.com/NixOS/calamares-nixos-extensions";
license = with licenses; [ gpl3Plus bsd2 cc-by-40 cc-by-sa-40 cc0 ];
maintainers = with maintainers; [ vlinkz ];
platforms = platforms.linux;
};
}

View file

@ -1,24 +1,48 @@
{ lib, fetchurl, boost, cmake, extra-cmake-modules, kparts, kpmcore
, kservice, libatasmart, libxcb, libyamlcpp, parted, polkit-qt, python, qtbase
, qtquickcontrols, qtsvg, qttools, qtwebengine, util-linux, tzdata
{ lib, fetchurl, boost, cmake, extra-cmake-modules, kparts, kpmcore, kirigami2
, kservice, libatasmart, libxcb, libyamlcpp, libpwquality, parted, polkit-qt, python
, qtbase, qtquickcontrols, qtsvg, qttools, qtwebengine, util-linux, tzdata
, ckbcomp, xkeyboard_config, mkDerivation
, nixos-extensions ? false
}:
mkDerivation rec {
pname = "calamares";
version = "3.2.55";
version = "3.2.56";
# release including submodule
src = fetchurl {
url = "https://github.com/${pname}/${pname}/releases/download/v${version}/${pname}-${version}.tar.gz";
sha256 = "sha256-1xf02rjy6+83zbU2yxGUGjcIGJfYS8ryqi4CBzrh7kI=";
url = "https://github.com/calamares/calamares/releases/download/v${version}/${pname}-${version}.tar.gz";
sha256 = "e1402d7693659b85c5e553481a7252d91350c3f33ffea413488d7712d3281e03";
};
patches = lib.optionals nixos-extensions [
# Modifies the users module to only set passwords of user and root
# as the users will have already been created in the configuration.nix file
./userjob.patch
# Makes calamares search /run/current-system/sw/share/calamares/ for extra configuration files
# as by default it only searches /usr/share/calamares/ and /nix/store/<hash>-calamares-<version>/share/calamares/
# but calamares-nixos-extensions is not in either of these locations
./nixos-extensions-paths.patch
# Uses pkexec within modules in order to run calamares without root permissions as a whole
# Also fixes storage check in the welcome module
./nonroot.patch
# Adds unfree qml to packagechooserq
./unfreeq.patch
# Adds config to change name of packagechooserq
# Upstreamed in PR: https://github.com/calamares/calamares/pull/1932
./packagechooserq.patch
# Modifies finished module to add some NixOS resources
# Modifies packagechooser module to change the UI
./uimod.patch
# Remove options for unsupported partition types
./partitions.patch
];
nativeBuildInputs = [ cmake extra-cmake-modules ];
buildInputs = [
boost kparts.dev kpmcore.out kservice.dev
libatasmart libxcb libyamlcpp parted polkit-qt python qtbase
qtquickcontrols qtsvg qttools qtwebengine.dev util-linux
boost kparts.dev kpmcore.out kservice.dev kirigami2
libatasmart libxcb libyamlcpp libpwquality parted polkit-qt python
qtbase qtquickcontrols qtsvg qttools qtwebengine.dev util-linux
];
cmakeFlags = [
@ -32,15 +56,28 @@ mkDerivation rec {
POLKITQT-1_POLICY_FILES_INSTALL_DIR = "$(out)/share/polkit-1/actions";
postPatch = ''
# Run calamares without root. Other patches make it functional as a normal user
sed -e "s,pkexec calamares,calamares," \
-i calamares.desktop
sed -e "s,X-AppStream-Ignore=true,&\nStartupWMClass=io.calamares.calamares," \
-i calamares.desktop
# Fix desktop reference with wayland
mv calamares.desktop io.calamares.calamares.desktop
sed -e "s,calamares.desktop,io.calamares.calamares.desktop," \
-i CMakeLists.txt
sed -e "s,/usr/bin/calamares,$out/bin/calamares," \
-i calamares.desktop \
-i com.github.calamares.calamares.policy
sed -e 's,/usr/share/zoneinfo,${tzdata}/share/zoneinfo,' \
-i src/modules/locale/SetTimezoneJob.cpp
-i src/modules/locale/SetTimezoneJob.cpp \
-i src/libcalamares/locale/TimeZone.cpp
sed -e 's,/usr/share/X11/xkb/rules/base.lst,${xkeyboard_config}/share/X11/xkb/rules/base.lst,' \
-i src/modules/keyboard/keyboardwidget/keyboardglobal.h
-i src/modules/keyboard/keyboardwidget/keyboardglobal.cpp
sed -e 's,"ckbcomp","${ckbcomp}/bin/ckbcomp",' \
-i src/modules/keyboard/keyboardwidget/keyboardpreview.cpp
@ -51,8 +88,9 @@ mkDerivation rec {
meta = with lib; {
description = "Distribution-independent installer framework";
license = with licenses; [ gpl3Plus bsd2 ];
maintainers = with maintainers; [ manveru ];
homepage = "https://calamares.io/";
license = with licenses; [ gpl3Plus bsd2 cc0 ];
maintainers = with maintainers; [ manveru vlinkz ];
platforms = platforms.linux;
};
}

View file

@ -0,0 +1,46 @@
diff --git a/src/calamares/main.cpp b/src/calamares/main.cpp
index de709156f..a0b6c5faf 100644
--- a/src/calamares/main.cpp
+++ b/src/calamares/main.cpp
@@ -131,6 +132,8 @@ main( int argc, char* argv[] )
// TODO: umount anything in /tmp/calamares-... as an emergency save function
#endif
+ CalamaresUtils::setNixosDirs();
+
bool is_debug = handle_args( a );
#ifdef WITH_KF5DBus
diff --git a/src/libcalamares/utils/Dirs.cpp b/src/libcalamares/utils/Dirs.cpp
index f333d6e64..6118fb412 100644
--- a/src/libcalamares/utils/Dirs.cpp
+++ b/src/libcalamares/utils/Dirs.cpp
@@ -115,6 +116,14 @@ setXdgDirs()
s_haveExtraDirs = !( s_extraConfigDirs.isEmpty() && s_extraDataDirs.isEmpty() );
}
+void
+setNixosDirs()
+{
+ s_extraConfigDirs << "/run/current-system/sw/share/calamares/";
+ s_extraDataDirs << "/run/current-system/sw/share/calamares/";
+ s_haveExtraDirs = !( s_extraConfigDirs.isEmpty() && s_extraDataDirs.isEmpty() );
+}
+
QStringList
extraConfigDirs()
{
diff --git a/src/libcalamares/utils/Dirs.h b/src/libcalamares/utils/Dirs.h
index 445cbe1f1..da869d446 100644
--- a/src/libcalamares/utils/Dirs.h
+++ b/src/libcalamares/utils/Dirs.h
@@ -50,6 +50,9 @@ DLLEXPORT bool isAppDataDirOverridden();
/** @brief Setup extra config and data dirs from the XDG variables.
*/
DLLEXPORT void setXdgDirs();
+/** @brief Setup extra config and data dirs fir NixOS.
+ */
+DLLEXPORT void setNixosDirs();
/** @brief Are any extra directories configured? */
DLLEXPORT bool haveExtraDirs();
/** @brief XDG_CONFIG_DIRS, each guaranteed to end with / */

View file

@ -0,0 +1,105 @@
diff --git a/src/libcalamares/utils/Runner.cpp b/src/libcalamares/utils/Runner.cpp
index c7146c2d7..e165d9a8f 100644
--- a/src/libcalamares/utils/Runner.cpp
+++ b/src/libcalamares/utils/Runner.cpp
@@ -140,13 +140,13 @@ Calamares::Utils::Runner::run()
}
if ( m_location == RunLocation::RunInTarget )
{
- process.setProgram( "chroot" );
- process.setArguments( QStringList { workingDirectory.absolutePath() } << m_command );
+ process.setProgram( "pkexec" );
+ process.setArguments( QStringList { "chroot" } + QStringList { workingDirectory.absolutePath() } << m_command );
}
else
{
- process.setProgram( "env" );
- process.setArguments( m_command );
+ process.setProgram( "pkexec" );
+ process.setArguments( QStringList { "env" } + m_command );
}
if ( m_output )
diff --git a/src/modules/mount/main.py b/src/modules/mount/main.py
index a3318d1a0..5fbe202fd 100644
--- a/src/modules/mount/main.py
+++ b/src/modules/mount/main.py
@@ -152,7 +152,8 @@ def mount_partition(root_mount_point, partition, partitions):
# Ensure that the created directory has the correct SELinux context on
# SELinux-enabled systems.
- os.makedirs(mount_point, exist_ok=True)
+ subprocess.check_call(["pkexec", "mkdir", "-p", mount_point])
+
try:
subprocess.call(['chcon', '--reference=' + raw_mount_point, mount_point])
except FileNotFoundError as e:
@@ -193,13 +194,13 @@ def mount_partition(root_mount_point, partition, partitions):
for s in btrfs_subvolumes:
if not s["subvolume"]:
continue
- os.makedirs(root_mount_point + os.path.dirname(s["subvolume"]), exist_ok=True)
- subprocess.check_call(["btrfs", "subvolume", "create",
+ subprocess.check_call(["pkexec", "mkdir", "-p", root_mount_point + os.path.dirname(s["subvolume"])])
+ subprocess.check_call(["pkexec", "btrfs", "subvolume", "create",
root_mount_point + s["subvolume"]])
if s["mountPoint"] == "/":
# insert the root subvolume into global storage
libcalamares.globalstorage.insert("btrfsRootSubvolume", s["subvolume"])
- subprocess.check_call(["umount", "-v", root_mount_point])
+ subprocess.check_call(["pkexec", "umount", "-v", root_mount_point])
device = partition["device"]
diff --git a/src/modules/welcome/checker/GeneralRequirements.cpp b/src/modules/welcome/checker/GeneralRequirements.cpp
index ca7219ca4..6ac682ba4 100644
--- a/src/modules/welcome/checker/GeneralRequirements.cpp
+++ b/src/modules/welcome/checker/GeneralRequirements.cpp
@@ -371,10 +371,34 @@ GeneralRequirements::checkEnoughStorage( qint64 requiredSpace )
cWarning() << "GeneralRequirements is configured without libparted.";
return false;
#else
- return check_big_enough( requiredSpace );
+ return big_enough( requiredSpace );
#endif
}
+bool
+GeneralRequirements::big_enough( qint64 requiredSpace )
+{
+ FILE *fpipe;
+ char command[128];
+ snprintf(command, sizeof(command), "lsblk --bytes -no SIZE,TYPE | grep disk | awk '$1 > %llu {print $1}'", requiredSpace);
+ char c = 0;
+
+ if (0 == (fpipe = (FILE*)popen(command, "r")))
+ {
+ cWarning() << "Failed to check storage size.";
+ return false;
+ }
+
+ while (fread(&c, sizeof c, 1, fpipe))
+ {
+ pclose(fpipe);
+ return true;
+ }
+
+ pclose(fpipe);
+
+ return false;
+}
bool
GeneralRequirements::checkEnoughRam( qint64 requiredRam )
diff --git a/src/modules/welcome/checker/GeneralRequirements.h b/src/modules/welcome/checker/GeneralRequirements.h
index b6646da11..ea27324fa 100644
--- a/src/modules/welcome/checker/GeneralRequirements.h
+++ b/src/modules/welcome/checker/GeneralRequirements.h
@@ -36,6 +36,7 @@ private:
bool checkHasPower();
bool checkHasInternet();
bool checkIsRoot();
+ bool big_enough( qint64 requiredSpace );
qreal m_requiredStorageGiB;
qreal m_requiredRamGiB;

View file

@ -0,0 +1,136 @@
diff --git a/src/modules/packagechooser/Config.cpp b/src/modules/packagechooser/Config.cpp
index 491fe5c25..667621597 100644
--- a/src/modules/packagechooser/Config.cpp
+++ b/src/modules/packagechooser/Config.cpp
@@ -237,6 +237,12 @@ Config::setPackageChoice( const QString& packageChoice )
emit packageChoiceChanged( m_packageChoice.value_or( QString() ) );
}
+QString
+Config::prettyName() const
+{
+ return m_stepName ? m_stepName->get() : tr( "Packages" );
+}
+
QString
Config::prettyStatus() const
{
@@ -343,4 +349,14 @@ Config::setConfigurationMap( const QVariantMap& configurationMap )
cWarning() << "Single-selection QML module must use 'Legacy' method.";
}
}
+
+ bool labels_ok = false;
+ auto labels = CalamaresUtils::getSubMap( configurationMap, "labels", labels_ok );
+ if ( labels_ok )
+ {
+ if ( labels.contains( "step" ) )
+ {
+ m_stepName = new CalamaresUtils::Locale::TranslatedString( labels, "step" );
+ }
+ }
}
diff --git a/src/modules/packagechooser/Config.h b/src/modules/packagechooser/Config.h
index b04b1c30b..d1b783a8d 100644
--- a/src/modules/packagechooser/Config.h
+++ b/src/modules/packagechooser/Config.h
@@ -98,6 +98,7 @@ public:
QString packageChoice() const { return m_packageChoice.value_or( QString() ); }
void setPackageChoice( const QString& packageChoice );
+ QString prettyName() const;
QString prettyStatus() const;
signals:
@@ -120,6 +121,7 @@ private:
* Reading the property will return an empty QString.
*/
std::optional< QString > m_packageChoice;
+ CalamaresUtils::Locale::TranslatedString* m_stepName; // As it appears in the sidebar
};
diff --git a/src/modules/packagechooser/PackageChooserViewStep.cpp b/src/modules/packagechooser/PackageChooserViewStep.cpp
index 9057004de..8eacf82ec 100644
--- a/src/modules/packagechooser/PackageChooserViewStep.cpp
+++ b/src/modules/packagechooser/PackageChooserViewStep.cpp
@@ -29,7 +29,6 @@ PackageChooserViewStep::PackageChooserViewStep( QObject* parent )
: Calamares::ViewStep( parent )
, m_config( new Config( this ) )
, m_widget( nullptr )
- , m_stepName( nullptr )
{
emit nextStatusChanged( false );
}
@@ -41,14 +40,12 @@ PackageChooserViewStep::~PackageChooserViewStep()
{
m_widget->deleteLater();
}
- delete m_stepName;
}
-
QString
PackageChooserViewStep::prettyName() const
{
- return m_stepName ? m_stepName->get() : tr( "Packages" );
+ return m_config->prettyName();
}
@@ -139,16 +136,6 @@ PackageChooserViewStep::setConfigurationMap( const QVariantMap& configurationMap
m_config->setDefaultId( moduleInstanceKey() );
m_config->setConfigurationMap( configurationMap );
- bool labels_ok = false;
- auto labels = CalamaresUtils::getSubMap( configurationMap, "labels", labels_ok );
- if ( labels_ok )
- {
- if ( labels.contains( "step" ) )
- {
- m_stepName = new CalamaresUtils::Locale::TranslatedString( labels, "step" );
- }
- }
-
if ( m_widget )
{
hookupModel();
diff --git a/src/modules/packagechooser/PackageChooserViewStep.h b/src/modules/packagechooser/PackageChooserViewStep.h
index 7561f2bd7..76b35aed8 100644
--- a/src/modules/packagechooser/PackageChooserViewStep.h
+++ b/src/modules/packagechooser/PackageChooserViewStep.h
@@ -50,7 +50,6 @@ private:
Config* m_config;
PackageChooserPage* m_widget;
- CalamaresUtils::Locale::TranslatedString* m_stepName; // As it appears in the sidebar
};
CALAMARES_PLUGIN_FACTORY_DECLARATION( PackageChooserViewStepFactory )
diff --git a/src/modules/packagechooserq/PackageChooserQmlViewStep.cpp b/src/modules/packagechooserq/PackageChooserQmlViewStep.cpp
index 543c9771d..7c4d5fda7 100644
--- a/src/modules/packagechooserq/PackageChooserQmlViewStep.cpp
+++ b/src/modules/packagechooserq/PackageChooserQmlViewStep.cpp
@@ -29,7 +29,7 @@ PackageChooserQmlViewStep::PackageChooserQmlViewStep( QObject* parent )
QString
PackageChooserQmlViewStep::prettyName() const
{
- return tr( "Packages" );
+ return m_config->prettyName();
}
QString
@@ -83,4 +83,13 @@ PackageChooserQmlViewStep::setConfigurationMap( const QVariantMap& configuration
m_config->setDefaultId( moduleInstanceKey() );
m_config->setConfigurationMap( configurationMap );
Calamares::QmlViewStep::setConfigurationMap( configurationMap ); // call parent implementation last
+ /*bool labels_ok = false;
+ auto labels = CalamaresUtils::getSubMap( configurationMap, "labels", labels_ok );
+ if ( labels_ok )
+ {
+ if ( labels.contains( "step" ) )
+ {
+ m_stepName = new CalamaresUtils::Locale::TranslatedString( labels, "step" );
+ }
+ }*/
}

View file

@ -0,0 +1,28 @@
diff --git a/src/modules/partition/gui/CreatePartitionDialog.cpp b/src/modules/partition/gui/CreatePartitionDialog.cpp
index c5b17c69e..353b6f964 100644
--- a/src/modules/partition/gui/CreatePartitionDialog.cpp
+++ b/src/modules/partition/gui/CreatePartitionDialog.cpp
@@ -107,7 +107,8 @@ CreatePartitionDialog::CreatePartitionDialog( Device* device,
{
// We need to ensure zfs is added to the list if the zfs module is enabled
if ( ( fs->type() == FileSystem::Type::Zfs && Calamares::Settings::instance()->isModuleEnabled( "zfs" ) )
- || ( fs->supportCreate() != FileSystem::cmdSupportNone && fs->type() != FileSystem::Extended ) )
+ || ( fs->supportCreate() != FileSystem::cmdSupportNone && fs->type() != FileSystem::Extended
+ && fs->type() != FileSystem::Luks && fs->type() != FileSystem::Luks2 && fs->type() != FileSystem::Minix ) )
{
fsNames << userVisibleFS( fs ); // This is put into the combobox
if ( fs->type() == defaultFSType )
diff --git a/src/modules/partition/gui/EditExistingPartitionDialog.cpp b/src/modules/partition/gui/EditExistingPartitionDialog.cpp
index 0bc35cabe..3cf8a7fa2 100644
--- a/src/modules/partition/gui/EditExistingPartitionDialog.cpp
+++ b/src/modules/partition/gui/EditExistingPartitionDialog.cpp
@@ -95,7 +95,8 @@ EditExistingPartitionDialog::EditExistingPartitionDialog( Device* device,
{
// We need to ensure zfs is added to the list if the zfs module is enabled
if ( ( fs->type() == FileSystem::Type::Zfs && Calamares::Settings::instance()->isModuleEnabled( "zfs" ) )
- || ( fs->supportCreate() != FileSystem::cmdSupportNone && fs->type() != FileSystem::Extended ) )
+ || ( fs->supportCreate() != FileSystem::cmdSupportNone && fs->type() != FileSystem::Extended
+ && fs->type() != FileSystem::Luks && fs->type() != FileSystem::Luks2 && fs->type() != FileSystem::Minix) )
{
fsNames << userVisibleFS( fs ); // For the combo box
}

View file

@ -0,0 +1,85 @@
diff --git a/src/modules/finished/FinishedPage.cpp b/src/modules/finished/FinishedPage.cpp
index 6c5f9ad16..24d75e07b 100644
--- a/src/modules/finished/FinishedPage.cpp
+++ b/src/modules/finished/FinishedPage.cpp
@@ -71,7 +71,10 @@ FinishedPage::retranslate()
{
ui->mainText->setText( tr( "<h1>All done.</h1><br/>"
"%1 has been set up on your computer.<br/>"
- "You may now start using your new system." )
+ "You may now start using your new system.<br/>"
+ "You can change every setting later except the bootloader.<br/>"
+ "Check the <a href=\"https://nixos.org/manual/nixos/stable/\">manual</a> for instructions on how to install software, upgrade the system or enable services.<br/>"
+ "You can find ways to get in touch with the <a href=\"https://nixos.org/community/\">community on the website!</a>")
.arg( branding->versionedName() ) );
ui->restartCheckBox->setToolTip( tr( "<html><head/><body>"
"<p>When this box is checked, your system will "
@@ -84,7 +87,10 @@ FinishedPage::retranslate()
ui->mainText->setText( tr( "<h1>All done.</h1><br/>"
"%1 has been installed on your computer.<br/>"
"You may now restart into your new system, or continue "
- "using the %2 Live environment." )
+ "using the %2 Live environment.<br/>"
+ "You can change every setting later except the bootloader.<br/>"
+ "Check the <a href=\"https://nixos.org/manual/nixos/stable/\">manual</a> for instructions on how to install software, upgrade the system or enable services.<br/>"
+ "You can find ways to get in touch with the <a href=\"https://nixos.org/community/\">community on the website!</a>")
.arg( branding->versionedName(), branding->productName() ) );
ui->restartCheckBox->setToolTip( tr( "<html><head/><body>"
"<p>When this box is checked, your system will "
diff --git a/src/modules/packagechooser/PackageChooserPage.cpp b/src/modules/packagechooser/PackageChooserPage.cpp
index 721329c1b..164b9945e 100644
--- a/src/modules/packagechooser/PackageChooserPage.cpp
+++ b/src/modules/packagechooser/PackageChooserPage.cpp
@@ -52,6 +52,7 @@ PackageChooserPage::currentChanged( const QModelIndex& index )
if ( !index.isValid() || !ui->products->selectionModel()->hasSelection() )
{
ui->productName->setText( m_introduction.name.get() );
+ ui->productName->setStyleSheet("font-weight: bold");
ui->productScreenshot->setPixmap( m_introduction.screenshot );
ui->productDescription->setText( m_introduction.description.get() );
}
diff --git a/src/modules/packagechooser/page_package.ui b/src/modules/packagechooser/page_package.ui
index d021b08b3..fecfa3060 100644
--- a/src/modules/packagechooser/page_package.ui
+++ b/src/modules/packagechooser/page_package.ui
@@ -38,19 +38,6 @@ SPDX-License-Identifier: GPL-3.0-or-later
</item>
<item>
- <layout class="QVBoxLayout" name="verticalLayout" stretch="1,30,1">
+ <layout class="QVBoxLayout" name="verticalLayout" stretch="30,1,1">
- <item>
- <widget class="QLabel" name="productName">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Product Name</string>
- </property>
- </widget>
- </item>
<item>
<widget class="FixedAspectRatioLabel" name="productScreenshot">
<property name="sizePolicy">
@@ -67,6 +54,19 @@ SPDX-License-Identifier: GPL-3.0-or-later
</property>
</widget>
</item>
+ <item>
+ <widget class="QLabel" name="productName">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Product Name</string>
+ </property>
+ </widget>
+ </item>
<item>
<widget class="QLabel" name="productDescription">
<property name="sizePolicy">

View file

@ -0,0 +1,109 @@
diff --git a/src/modules/packagechooserq/packagechooserq.qrc b/src/modules/packagechooserq/packagechooserq.qrc
index 1b892dce1..ee80a934b 100644
--- a/src/modules/packagechooserq/packagechooserq.qrc
+++ b/src/modules/packagechooserq/packagechooserq.qrc
@@ -4,5 +4,6 @@
<file>images/libreoffice.jpg</file>
<file>images/no-selection.png</file>
<file>images/plasma.png</file>
+ <file>packagechooserq@unfree.qml</file>
</qresource>
</RCC>
diff --git a/src/modules/packagechooserq/packagechooserq@unfree.qml b/src/modules/packagechooserq/packagechooserq@unfree.qml
new file mode 100644
index 000000000..cb87d864a
--- /dev/null
+++ b/src/modules/packagechooserq/packagechooserq@unfree.qml
@@ -0,0 +1,75 @@
+/* === This file is part of Calamares - <https://calamares.io> ===
+ *
+ * SPDX-FileCopyrightText: 2021 Anke Boersma <demm@kaosx.us>
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ *
+ * Calamares is Free Software: see the License-Identifier above.
+ *
+ */
+
+import io.calamares.core 1.0
+import io.calamares.ui 1.0
+
+import QtQuick 2.15
+import QtQuick.Controls 2.15
+import QtQuick.Layouts 1.3
+
+Item {
+
+ SystemPalette {
+ id: palette
+ colorGroup: SystemPalette.Active
+ }
+
+ width: parent.width
+ height: parent.height
+
+ Rectangle {
+ anchors.fill: parent
+ color: palette.window
+
+ ButtonGroup {
+ id: switchGroup
+ }
+
+ Column {
+ id: column
+ anchors.centerIn: parent
+ spacing: 5
+
+ Rectangle {
+ width: 700
+ height: 200
+ color: palette.base
+ radius: 10
+ border.width: 0
+ Text {
+ color: palette.text
+ width: 600
+ height: 150
+ anchors.centerIn: parent
+ text: qsTr("NixOS is fully open source, but it also provides software packages with unfree licenses. By default unfree packages are not allowed, but you can enable it here. If you check this box, software installed might have additional End User License Agreements (EULAs) attached. If not enabled, some hardware might not work fully when no suitable open source drivers are available.<br/>")
+ font.pointSize: 12
+ wrapMode: Text.WordWrap
+ }
+
+ CheckBox {
+ id: element2
+ anchors.horizontalCenter: parent.horizontalCenter
+ y: 145
+ text: qsTr("Allow unfree software")
+ checked: false
+
+ onCheckedChanged: {
+ if ( checked ) {
+ config.packageChoice = "unfree"
+ } else {
+ config.packageChoice = "free"
+ }
+ }
+ }
+ }
+ }
+ }
+
+}
diff --git a/src/modules/packagechooserq/unfree.conf b/src/modules/packagechooserq/unfree.conf
new file mode 100644
index 000000000..da79a8eac
--- /dev/null
+++ b/src/modules/packagechooserq/unfree.conf
@@ -0,0 +1,11 @@
+# SPDX-FileCopyrightText: no
+# SPDX-License-Identifier: CC0-1.0
+#
+---
+qmlLabel:
+ label: "Unfree Software"
+method: legacy
+mode: required
+labels:
+ step: "Unfree Software"
+packageChoice: free

View file

@ -0,0 +1,31 @@
diff --git a/src/modules/users/Config.cpp b/src/modules/users/Config.cpp
index eedfd274d..0f3e78848 100644
--- a/src/modules/users/Config.cpp
+++ b/src/modules/users/Config.cpp
@@ -972,26 +972,11 @@ Config::createJobs() const
Calamares::Job* j;
- if ( !m_sudoersGroup.isEmpty() )
- {
- j = new SetupSudoJob( m_sudoersGroup, m_sudoStyle );
- jobs.append( Calamares::job_ptr( j ) );
- }
-
- j = new SetupGroupsJob( this );
- jobs.append( Calamares::job_ptr( j ) );
-
- j = new CreateUserJob( this );
- jobs.append( Calamares::job_ptr( j ) );
-
j = new SetPasswordJob( loginName(), userPassword() );
jobs.append( Calamares::job_ptr( j ) );
j = new SetPasswordJob( "root", rootPassword() );
jobs.append( Calamares::job_ptr( j ) );
- j = new SetHostNameJob( this );
- jobs.append( Calamares::job_ptr( j ) );
-
return jobs;
}

View file

@ -1,6 +1,6 @@
{ mkDerivation, fetchurl, lib, makeWrapper
, extra-cmake-modules, kdoctools, wrapGAppsHook, wrapQtAppsHook
, kconfig, kcrash, kinit, kpmcore
, kconfig, kcrash, kinit, kpmcore, polkit-qt
, cryptsetup, lvm2, mdadm, smartmontools, systemdMinimal, util-linux
, btrfs-progs, dosfstools, e2fsprogs, exfat, f2fs-tools, fatresize, hfsprogs
, jfsutils, nilfs-utils, ntfs3g, reiser4progs, reiserfsprogs, udftools, xfsprogs, zfs
@ -41,16 +41,16 @@ let
in mkDerivation rec {
pname = "partitionmanager";
# NOTE: When changing this version, also change the version of `kpmcore`.
version = "4.2.0";
version = "22.04.0";
src = fetchurl {
url = "mirror://kde/stable/${pname}/${version}/src/${pname}-${version}.tar.xz";
hash = "sha256-6Qlt1c47Eek6TkWWBzTyBZYJ1jfhtwsC9X5q5h6IhPg=";
url = "mirror://kde/stable/release-service/${version}/src/${pname}-${version}.tar.xz";
hash = "sha256-eChn3OkdLHC9pedDBBwszTeTj2l7ky2W79INqvjrkBo=";
};
nativeBuildInputs = [ extra-cmake-modules kdoctools wrapGAppsHook wrapQtAppsHook makeWrapper ];
propagatedBuildInputs = [ kconfig kcrash kinit kpmcore ];
propagatedBuildInputs = [ kconfig kcrash kinit kpmcore polkit-qt ];
postFixup = ''
wrapProgram $out/bin/partitionmanager \

View file

@ -2,16 +2,16 @@
rustPlatform.buildRustPackage rec {
pname = "jwt-cli";
version = "5.0.2";
version = "5.0.3";
src = fetchFromGitHub {
owner = "mike-engel";
repo = pname;
rev = version;
sha256 = "0w7fqmh8gihknvdamnq1n519253d4lxrpv378jajca9x906rqy1r";
sha256 = "01aqqjynfcrn3m36hfjwcfh870imcd0hj5gifxzpnjiqjwpvys59";
};
cargoSha256 = "0b7m23azy8cb8d5wkawnw6nv8k7lfnfwc06swmbkfvg8vcxfsacs";
cargoSha256 = "1n4gmqmi975cd2zyrf0yi4gbxjjg9f99xa191mgmrdyyij7id3cf";
buildInputs = lib.optional stdenv.isDarwin Security;

View file

@ -1311,6 +1311,7 @@ mapAliases ({
uberwriter = apostrophe; # Added 2020-04-23
ubootBeagleboneBlack = ubootAmx335xEVM; # Added 2020-01-21
uchiwa = throw "uchiwa is deprecated and archived by upstream"; # Added 2022-05-02
ucsFonts = throw "'ucsFonts' has been renamed to/replaced by 'ucs-fonts'"; # Converted to throw 2022-02-22
ufraw = throw "ufraw is unmaintained and has been removed from nixpkgs. Its successor, nufraw, doesn't seem to be stable enough. Consider using Darktable for now"; # Added 2020-01-11
ultrastardx-beta = throw "'ultrastardx-beta' has been renamed to/replaced by 'ultrastardx'"; # Converted to throw 2022-02-22

View file

@ -2867,6 +2867,8 @@ with pkgs;
python = python3;
boost = boost.override { enablePython = true; python = python3; };
};
calamares-nixos = lowPrio (calamares.override { nixos-extensions = true; });
calamares-nixos-extensions = callPackage ../tools/misc/calamares-nixos-extensions {};
calendar-cli = callPackage ../tools/networking/calendar-cli { };
@ -22540,8 +22542,6 @@ with pkgs;
check-wmiplus = callPackage ../servers/monitoring/plugins/wmiplus { };
uchiwa = callPackage ../servers/monitoring/uchiwa { };
shishi = callPackage ../servers/shishi {
pam = if stdenv.isLinux then pam else null;
# see also openssl, which has/had this same trick

View file

@ -94,6 +94,21 @@ let
'';
};
showDerivationWarnings = mkOption {
type = types.listOf (types.enum [ "maintainerless" ]);
default = [];
description = ''
Which warnings to display for potentially dangerous
or deprecated values passed into `stdenv.mkDerivation`.
A list of warnings can be found in
<link xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/check-meta.nix">/pkgs/stdenv/generic/check-meta.nix</link>.
This is not a stable interface; warnings may be added, changed
or removed without prior notice.
'';
};
};
in {

View file

@ -106,6 +106,7 @@ in {
inherit buildSetupcfg;
inherit (callPackage ../development/interpreters/python/hooks { })
sphinxHook
condaInstallHook
condaUnpackHook
eggUnpackHook