1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-20 04:31:52 +00:00

Merge staging-next into staging

This commit is contained in:
github-actions[bot] 2020-12-12 12:19:53 +00:00 committed by GitHub
commit 9254ca7f5e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 265 additions and 32 deletions

View file

@ -238,9 +238,9 @@ in
'';
};
system.nssModules = singleton (
system.nssModules = mkIf cfg.nsswitch (singleton (
if cfg.daemon.enable then nss_pam_ldapd else nss_ldap
);
));
system.nssDatabases.group = optional cfg.nsswitch "ldap";
system.nssDatabases.passwd = optional cfg.nsswitch "ldap";

View file

@ -421,7 +421,7 @@ in {
inherit startAt;
restartTriggers = [ config.environment.etc."mailman3/settings.py".source ];
serviceConfig = {
ExecStart = "${pythonEnv}/bin/mailman-web runjobs minutely";
ExecStart = "${pythonEnv}/bin/mailman-web runjobs ${name}";
User = cfg.webUser;
Group = "mailman";
WorkingDirectory = "/var/lib/mailman-web";

View file

@ -0,0 +1,43 @@
{ stdenv, buildGoModule, fetchFromGitHub, installShellFiles }:
buildGoModule rec {
pname = "fluxcd";
version = "0.5.0";
src = fetchFromGitHub {
owner = "fluxcd";
repo = "flux2";
rev = "v${version}";
sha256 = "125im8br7x8djd6zagvikpc02k55pxbd97rjj3g2frj9plbryh8n";
};
vendorSha256 = "0f818a0z71nl061db93iqb87njx66vbrra1zh92warbx8djdsr7k";
nativeBuildInputs = [ installShellFiles ];
doCheck = false;
subPackages = [ "cmd/flux" ];
buildFlagsArray = [ "-ldflags=-s -w -X main.VERSION=${version}" ];
postInstall = ''
for shell in bash fish zsh; do
$out/bin/flux completion $shell > flux.$shell
installShellCompletion flux.$shell
done
'';
meta = with stdenv.lib; {
description = "Open and extensible continuous delivery solution for Kubernetes";
longDescription = ''
Flux is a tool for keeping Kubernetes clusters in sync
with sources of configuration (like Git repositories), and automating
updates to configuration when there is new code to deploy.
'';
homepage = "https://fluxcd.io";
license = licenses.asl20;
maintainers = with maintainers; [ jlesquembre ];
platforms = platforms.unix;
};
}

View file

@ -111,15 +111,9 @@ let
{
pyocr = pyocrWithUserTesseract super;
# Paperless only supports Django 2.0
django = customPkgs.django_2_0;
# Paperless is incompatible with factory_boy >= 3
factory_boy = customPkgs.factory_boy_2_12_0;
# The current version of django_extensions is incompatible with django 2.0
django_extensions = customPkgs.django_extensions_2_2_8;
# These are pre-release versions, hence they are private to this pkg
django-filter = self.callPackage ./python-modules/django-filter.nix {};
django-crispy-forms = self.callPackage ./python-modules/django-crispy-forms.nix {};

View file

@ -1,24 +1,5 @@
pyPkgs: fetchFromGitHub:
{
django_2_0 = pyPkgs.django_2.overridePythonAttrs (old: rec {
version = "2.0.12";
src = pyPkgs.fetchPypi {
inherit (old) pname;
inherit version;
sha256 = "15s8z54k0gf9brnz06521bikm60ddw5pn6v3nbvnl47j1jjsvwz2";
};
});
django_extensions_2_2_8 = pyPkgs.django_extensions.overridePythonAttrs (old: rec {
version = "2.2.8";
src = fetchFromGitHub {
owner = old.pname;
repo = old.pname;
rev = version;
sha256 = "1gd3nykwzh3azq1p9cvgkc3l5dwrv7y86sfjxd9llbyj8ky71iaj";
};
});
factory_boy_2_12_0 = pyPkgs.factory_boy.overridePythonAttrs (old: rec {
version = "2.12.0";
src = pyPkgs.fetchPypi {

View file

@ -18,13 +18,13 @@
buildPythonPackage rec {
pname = "django-extensions";
version = "3.0.8";
version = "3.1.0";
src = fetchFromGitHub {
owner = pname;
repo = pname;
rev = version;
sha256 = "1z2si9wpc8irqhi5i2wp4wr05dqxyw4mn2vj3amp0rvsvydws92c";
sha256 = "hZ6GS2VkXH8KfKZuL1rR6JS/nDkx8SfKuUx5XrvTbec=";
};
LC_ALL = "en_US.UTF-8";
@ -49,10 +49,11 @@ buildPythonPackage rec {
werkzeug
];
# tests not compatible with pip>=20
# remove tests that need network access
checkPhase = ''
rm tests/management/commands/test_pipchecker.py
${python.interpreter} setup.py test
DJANGO_SETTINGS_MODULE=tests.testapp.settings \
pytest django_extensions tests
'';
meta = with lib; {

View file

@ -0,0 +1,100 @@
{ lib
, buildGoModule
, buildFHSUserEnv
, dejavu_fonts
, pkgconfig
, fetchFromGitHub
, stdenv
, roboto
, writeScript
, xorg
, libglvnd
, addOpenGLRunpath
, makeWrapper
, gcc
, go
, flutter
}:
let
pname = "hover";
version = "0.43.0";
libs = with xorg; [
libX11.dev
libXcursor.dev
libXext.dev
libXi.dev
libXinerama.dev
libXrandr.dev
libXrender.dev
libXfixes.dev
libXxf86vm
libglvnd.dev
xorgproto
];
hover = buildGoModule rec {
inherit pname version;
meta = with stdenv.lib; {
description = "A build tool to run Flutter applications on desktop";
homepage = "https://github.com/go-flutter-desktop/hover";
license = licenses.bsd3;
platforms = platforms.linux ++ platforms.darwin;
maintainers = [ maintainers.ericdallo maintainers.thiagokokada];
};
subPackages = [ "." ];
vendorSha256 = "1wr08phjm87dxim47i8449rmq5wfscvjyz65g3lxmv468x209pam";
src = fetchFromGitHub {
rev = "v${version}";
owner = "go-flutter-desktop";
repo = pname;
sha256 = "0iw6sxg86wfdbihl2hxzn43ppdzl1p7g5b9wl8ac3xa9ix8759ax";
};
nativeBuildInputs = [ addOpenGLRunpath makeWrapper ];
buildInputs = libs;
checkRun = false;
patches = [
./fix-assets-path.patch
];
postPatch = ''
sed -i 's|@assetsFolder@|'"''${out}/share/assets"'|g' internal/fileutils/assets.go
'';
postInstall = ''
mkdir -p $out/share
cp -r assets $out/share/assets
chmod -R a+rx $out/share/assets
wrapProgram "$out/bin/hover" \
--prefix LD_LIBRARY_PATH : ${stdenv.lib.makeLibraryPath libs}
'';
postFixup = ''
addOpenGLRunpath $out/bin/hover
'';
};
in
buildFHSUserEnv rec {
name = pname;
targetPkgs = pkgs: [
dejavu_fonts
flutter
gcc
go
hover
pkgconfig
roboto
] ++ libs;
runScript = "hover";
}

View file

@ -0,0 +1,78 @@
diff --git a/internal/fileutils/assets.go b/internal/fileutils/assets.go
index 83eacd9..0b80e51 100644
--- a/internal/fileutils/assets.go
+++ b/internal/fileutils/assets.go
@@ -1,28 +1,7 @@
//go:generate rice embed
package fileutils
-import (
- "os"
- "sync"
-
- rice "github.com/GeertJohan/go.rice"
- "github.com/go-flutter-desktop/hover/internal/log"
-)
-
-var (
- assetsBox *rice.Box
- assetsBoxOnce sync.Once
-)
-
// AssetsBox hover's assets box
-func AssetsBox() *rice.Box {
- assetsBoxOnce.Do(func() {
- var err error
- assetsBox, err = rice.FindBox("../../assets")
- if err != nil {
- log.Errorf("Failed to find hover assets: %v", err)
- os.Exit(1)
- }
- })
- return assetsBox
+func AssetsBox() string {
+ return "@assetsFolder@"
}
diff --git a/internal/fileutils/file.go b/internal/fileutils/file.go
index cb75563..3822e80 100644
--- a/internal/fileutils/file.go
+++ b/internal/fileutils/file.go
@@ -11,8 +11,6 @@ import (
"strings"
"text/template"
- rice "github.com/GeertJohan/go.rice"
-
"github.com/go-flutter-desktop/hover/internal/log"
)
@@ -215,24 +213,24 @@ func ExecuteTemplateFromFile(boxed, to string, templateData interface{}) {
}
// ExecuteTemplateFromAssetsBox create file from a template asset
-func ExecuteTemplateFromAssetsBox(boxed, to string, assetsBox *rice.Box, templateData interface{}) {
- templateString, err := assetsBox.String(boxed)
+func ExecuteTemplateFromAssetsBox(boxed, to string, assetsBox string, templateData interface{}) {
+ templateString, err := ioutil.ReadFile(boxed + "/" + boxed)
if err != nil {
log.Errorf("Failed to find template file: %v\n", err)
os.Exit(1)
}
- executeTemplateFromString(templateString, to, templateData)
+ executeTemplateFromString(string(templateString), to, templateData)
}
// CopyAsset copies a file from asset
-func CopyAsset(boxed, to string, assetsBox *rice.Box) {
+func CopyAsset(boxed string, to string, assetsBox string) {
file, err := os.Create(to)
if err != nil {
log.Errorf("Failed to create %s: %v", to, err)
os.Exit(1)
}
defer file.Close()
- boxedFile, err := assetsBox.Open(boxed)
+ boxedFile, err := os.OpenFile(assetsBox + "/" + boxed, os.O_RDONLY, 0666)
if err != nil {
log.Errorf("Failed to find boxed file %s: %v", boxed, err)
os.Exit(1)

View file

@ -0,0 +1,30 @@
{ stdenv, pkgsBuildBuild, rustPlatform, fetchFromGitHub, pkgconfig, libunwind, python3 }:
rustPlatform.buildRustPackage rec {
pname = "py-spy";
version = "0.3.3";
src = fetchFromGitHub {
owner = "benfred";
repo = "py-spy";
rev = "v${version}";
sha256 = "1w9nwsmazafr78ghif6njdcqjisr0f1jb6cm1w4ngvigx5qlrbkv";
};
NIX_CFLAGS_COMPILE = "-L${libunwind}/lib";
# error: linker `arm-linux-gnueabihf-gcc` not found
preConfigure = stdenv.lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) ''
export RUSTFLAGS="-Clinker=$CC"
'';
checkInputs = [ python3 ];
cargoSha256 = "0hrzmpwd2k4l8gjbry8ddrkv9q9qh8ag096md4q0fyn5bgnxhkah";
meta = with stdenv.lib; {
description = "Sampling profiler for Python programs";
license = licenses.mit;
maintainers = [ maintainers.lnl7 ];
};
}

View file

@ -6756,6 +6756,8 @@ in
pythonPackages = python27Packages;
};
py-spy = callPackage ../development/tools/py-spy { };
pytrainer = callPackage ../applications/misc/pytrainer { };
pywal = with python3Packages; toPythonApplication pywal;
@ -21831,6 +21833,8 @@ in
gtk = gtk3;
};
hover = callPackage ../development/tools/hover { };
hovercraft = python3Packages.callPackage ../applications/misc/hovercraft { };
howl = callPackage ../applications/editors/howl { };
@ -22343,6 +22347,8 @@ in
fluxctl = callPackage ../applications/networking/cluster/fluxctl { };
fluxcd = callPackage ../applications/networking/cluster/fluxcd { };
linkerd = callPackage ../applications/networking/cluster/linkerd { };
kubernetes-helm = callPackage ../applications/networking/cluster/helm { };