Merge remote-tracking branch 'upstream/master' into staging

This commit is contained in:
John Ericson 2018-06-18 15:30:39 -04:00
commit b3d957649f
11 changed files with 187 additions and 15 deletions

View File

@ -72,6 +72,7 @@ let
mapConfig = key: attr:
if (!isNull attr && attr != []) then (
if isDerivation attr then mapConfig key (toString attr) else
if (builtins.typeOf attr) == "set" then concatStringsSep " "
(mapAttrsToList (name: value: mapConfig (key + "-" + name) value) attr) else
if (builtins.typeOf attr) == "list" then concatMapStringsSep " " (mapConfig key) attr else

View File

@ -0,0 +1,100 @@
{ config, lib, pkgs, ... }:
with lib;
let
dmcfg = config.services.xserver.displayManager;
ldmcfg = dmcfg.lightdm;
cfg = ldmcfg.greeters.mini;
xgreeters = pkgs.linkFarm "lightdm-mini-greeter-xgreeters" [{
path = "${pkgs.lightdm-mini-greeter}/share/xgreeters/lightdm-mini-greeter.desktop";
name = "lightdm-mini-greeter.desktop";
}];
miniGreeterConf = pkgs.writeText "lightdm-mini-greeter.conf"
''
[greeter]
user = ${cfg.user}
show-password-label = true
password-label-text = Password:
show-input-cursor = true
[greeter-hotkeys]
mod-key = meta
shutdown-key = s
restart-key = r
hibernate-key = h
suspend-key = u
[greeter-theme]
font = Sans
font-size = 1em
text-color = "#080800"
error-color = "#F8F8F0"
background-image = "${ldmcfg.background}"
background-color = "#1B1D1E"
window-color = "#F92672"
border-color = "#080800"
border-width = 2px
layout-space = 15
password-color = "#F8F8F0"
password-background-color = "#1B1D1E"
${cfg.extraConfig}
'';
in
{
options = {
services.xserver.displayManager.lightdm.greeters.mini = {
enable = mkOption {
type = types.bool;
default = false;
description = ''
Whether to enable lightdm-mini-greeter as the lightdm greeter.
Note that this greeter starts only the default X session.
You can configure the default X session by
<option>services.xserver.desktopManager.default</option> and
<option>services.xserver.windowManager.default</option>.
'';
};
user = mkOption {
type = types.str;
default = "root";
description = ''
The user to login as.
'';
};
extraConfig = mkOption {
type = types.lines;
default = "";
description = ''
Extra configuration that should be put in the lightdm-mini-greeter.conf
configuration file.
'';
};
};
};
config = mkIf (ldmcfg.enable && cfg.enable) {
services.xserver.displayManager.lightdm.greeters.gtk.enable = false;
services.xserver.displayManager.lightdm.greeter = mkDefault {
package = xgreeters;
name = "lightdm-mini-greeter";
};
environment.etc."lightdm/lightdm-mini-greeter.conf".source = miniGreeterConf;
};
}

View File

@ -72,6 +72,7 @@ in
# preferred.
imports = [
./lightdm-greeters/gtk.nix
./lightdm-greeters/mini.nix
];
options = {

View File

@ -0,0 +1,32 @@
{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, lightdm, gtk3 }:
stdenv.mkDerivation rec {
name = "lightdm-mini-greeter-${version}";
version = "0.3.2";
src = fetchFromGitHub {
owner = "prikhi";
repo = "lightdm-mini-greeter";
rev = version;
sha256 = "1g3lrh034w38hiq96b0xmghmlf87hcycwdh06dwkdksr0hl08wxy";
};
nativeBuildInputs = [ autoreconfHook pkgconfig ];
buildInputs = [ lightdm gtk3 ];
configureFlags = [ "--sysconfdir=/etc" ];
makeFlags = [ "configdir=$(out)/etc" ];
postInstall = ''
substituteInPlace "$out/share/xgreeters/lightdm-mini-greeter.desktop" \
--replace "Exec=lightdm-mini-greeter" "Exec=$out/bin/lightdm-mini-greeter"
'';
meta = with stdenv.lib; {
description = "A minimal, configurable, single-user GTK3 LightDM greeter";
homepage = https://github.com/prikhi/lightdm-mini-greeter;
license = licenses.gpl3;
maintainers = with maintainers; [ mnacamura ];
platforms = platforms.linux;
};
}

View File

@ -7,13 +7,13 @@ with stdenv.lib;
buildGoPackage rec {
name = "gitea-${version}";
version = "1.4.1";
version = "1.4.2";
src = fetchFromGitHub {
owner = "go-gitea";
repo = "gitea";
rev = "v${version}";
sha256 = "1mid67c4021m7mi4ablx1w5v43831gzn8xpg8n30a4zmr70781wm";
sha256 = "15iqvfvijg46444pybi7vg7xhl2x0pr5p1416qlc2nakkn3drpi1";
};
patches = [ ./static-root-path.patch ];

View File

@ -0,0 +1,24 @@
{ stdenv, fetchFromGitHub, autoreconfHook }:
stdenv.mkDerivation rec {
name = "editline-${version}";
version = "1.15.3";
src = fetchFromGitHub {
owner = "troglobit";
repo = "editline";
rev = version;
sha256 = "0dm5fgq0acpprr938idwml64nclg9l6c6avirsd8r6f40qicbgma";
};
nativeBuildInputs = [ autoreconfHook ];
dontDisableStatic = true;
meta = with stdenv.lib; {
homepage = http://troglobit.com/editline.html;
description = "A readline() replacement for UNIX without termcap (ncurses)";
license = licenses.bsdOriginal;
maintainers = with maintainers; [ dtzWill ];
platforms = platforms.all;
};
}

View File

@ -5,8 +5,8 @@
src = let gitsrc = pkgs.fetchFromGitHub {
owner = "eustas";
repo = "ngx_brotli";
rev = "37ab9b2933a0b756ba3447000b7f31d432ed8228"; # v0.1.1
sha256 = "114ai8v9ns23qm12wp9dgdjvldqjnrmb3cmarkn0d3k6n3bm01bf";
rev = "v0.1.2";
sha256 = "19r9igxm4hrzrhxajlxw2ccq0057h8ipkfiif725x0xqbxjskl6c";
}; in pkgs.runCommandNoCC "ngx_brotli-src" {} ''
cp -a ${gitsrc} $out
substituteInPlace $out/config \

View File

@ -283,10 +283,7 @@ in rec {
llvmPackages_5 = super.llvmPackages_5 // (let
tools = super.llvmPackages_5.tools.extend (llvmSelf: _: {
inherit (llvmPackages_5) llvm;
# The .override that was here before had the side affect of removing
# the hacked-in "man" output.
clang-unwrapped = builtins.removeAttrs llvmPackages_5.clang-unwrapped [ "man" ];
inherit (llvmPackages_5) llvm clang-unwrapped;
});
libraries = super.llvmPackages_5.libraries.extend (llvmSelf: _: {
inherit (llvmPackages_5) libcxx libcxxabi compiler-rt;
@ -327,8 +324,16 @@ in rec {
coreutils findutils diffutils patchutils;
llvmPackages_5 = super.llvmPackages_5 // (let
tools = super.llvmPackages_5.tools.extend (_: _: {
inherit (llvmPackages_5) llvm clang-unwrapped;
tools = super.llvmPackages_5.tools.extend (_: super: {
# Build man pages with final stdenv not before
llvm = lib.extendDerivation
true
{ inherit (super.llvm) man; }
llvmPackages_5.llvm;
clang-unwrapped = lib.extendDerivation
true
{ inherit (super.clang-unwrapped) man; }
llvmPackages_5.clang-unwrapped;
});
libraries = super.llvmPackages_5.libraries.extend (_: _: {
inherit (llvmPackages_5) compiler-rt libcxx libcxxabi;
@ -365,7 +370,10 @@ in rec {
initialPath = import ../common-path.nix { inherit pkgs; };
shell = "${pkgs.bash}/bin/bash";
cc = pkgs.llvmPackages.libcxxClang;
# Hack to avoid man pages in stdenv, building bootstrap python
cc = pkgs.llvmPackages.libcxxClang.override {
cc = builtins.removeAttrs pkgs.llvmPackages.clang-unwrapped [ "man" ];
};
extraNativeBuildInputs = [];
extraBuildInputs = [ pkgs.darwin.CF ];

View File

@ -3,7 +3,9 @@ with stdenv.lib;
let
# Sanitizers are not supported on Darwin.
# Sanitizer headers aren't available in older libc++ stdenvs due to a bug
sanitizersBroken = stdenv.cc.isClang && versionOlder (getVersion stdenv.cc.name) "5.0.0";
sanitizersWorking =
(stdenv.cc.isClang && versionAtLeast (getVersion stdenv.cc.name) "5.0.0")
|| (stdenv.cc.isGNU && stdenv.isLinux);
in stdenv.mkDerivation {
name = "cc-wrapper-test";
@ -43,7 +45,7 @@ in stdenv.mkDerivation {
NIX_LDFLAGS="-L$NIX_BUILD_TOP/foo/lib -rpath $NIX_BUILD_TOP/foo/lib" $CC -lfoo -o ldflags-check ${./ldflags-main.c}
./ldflags-check
${optionalString (!sanitizersBroken) ''
${optionalString sanitizersWorking ''
printf "checking whether sanitizers are fully functional... ">&2
$CC -o sanitizers -fsanitize=address,undefined ${./sanitizers.c}
./sanitizers

View File

@ -3,14 +3,14 @@
, wxGTK30 }:
stdenv.mkDerivation rec {
version = "3.1.5";
version = "3.2.1";
name = "woeusb-${version}";
src = fetchFromGitHub {
owner = "slacka";
repo = "WoeUSB";
rev = "v${version}";
sha256 = "0jbyrd49ikwkfpnka884y3p600bm3nfil2zinrgbac7vyhxxqjmw";
sha256 = "0qymdc216ws6adkzmzxz6hx43dim0hpwab9c4qmgg8jnkhnpvnj1";
};
buildInputs = [ wxGTK30 autoreconfHook makeWrapper ];

View File

@ -8930,6 +8930,8 @@ with pkgs;
eclib = callPackage ../development/libraries/eclib {};
editline = callPackage ../development/libraries/editline { };
eigen = callPackage ../development/libraries/eigen {};
eigen3_3 = callPackage ../development/libraries/eigen/3.3.nix {};
@ -18020,6 +18022,8 @@ with pkgs;
inherit (xfce) exo;
};
lightdm-mini-greeter = callPackage ../applications/display-managers/lightdm-mini-greeter { };
slic3r = callPackage ../applications/misc/slic3r { };
slic3r-prusa3d = callPackage ../applications/misc/slic3r/prusa3d.nix { };