Skip to content
This repository was archived by the owner on Apr 12, 2021. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs-channels
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: c637aeff19b5
Choose a base ref
...
head repository: NixOS/nixpkgs-channels
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: d8c7f0bd3f42
Choose a head ref
  • 16 commits
  • 16 files changed
  • 9 contributors

Commits on Mar 26, 2019

  1. khal: 0.9.10 -> 0.10.0

    https://github.com/pimutils/khal/releases/tag/v0.10.0
    
    * new dep, click-log
    * enable tests (pass!)
    
    Release notes mention 'only dateutil < 2.7 is supported',
    which may be a problem as ours is currently 2.8.
    
    There's a history of python-dateutil version particularity
    in previous releases (such as 0.9.10 upgrading from),
    unsure if should override to older or if it's just a suggestion.
    dtzWill committed Mar 26, 2019
    Copy the full SHA
    ad91dca View commit details
  2. Copy the full SHA
    c8fa127 View commit details

Commits on Mar 29, 2019

  1. Verified

    This commit was signed with the committer’s verified signature.
    infinisil Silvan Mosberger
    Copy the full SHA
    0b31827 View commit details

Commits on Mar 31, 2019

  1. Merge pull request #58542 from Infinisil/fix/jupyterhub

    pythonPackages.jupyterhub: Fix running locally
    infinisil authored Mar 31, 2019

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    6705421 View commit details
  2. behdad-fonts: init at v0.0.3 (#58497)

    LinArcX authored and veprbl committed Mar 31, 2019
    Copy the full SHA
    1fcad30 View commit details
  3. khal: 0.10.0 -> 0.10.1

    dtzWill committed Mar 31, 2019
    Copy the full SHA
    4f62e1b View commit details
  4. Copy the full SHA
    d4f172c View commit details
  5. Copy the full SHA
    eaff327 View commit details
  6. Copy the full SHA
    c29f267 View commit details
  7. samim-fonts: init at 3.1.0 (#58383)

    LinArcX authored and veprbl committed Mar 31, 2019
    Copy the full SHA
    9396b27 View commit details
  8. Merge pull request #58324 from dtzWill/update/khal-0.10.0

    khal: 0.9.10 -> 0.10.0
    gebner authored Mar 31, 2019

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    05bed04 View commit details
  9. linux: 5.0-rc8 -> 5.1-rc2

    NeQuissimus committed Mar 31, 2019

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    NeQuissimus Tim Steinbach
    Copy the full SHA
    9ba43c0 View commit details
  10. direnv: 2.19.2 -> 2.20.0

    zimbatm committed Mar 31, 2019

    Verified

    This commit was signed with the committer’s verified signature.
    zimbatm Jonas Chevalier
    Copy the full SHA
    f88d9c3 View commit details
  11. kitty: support macOS (#56740)

    Install the `kitty` command-line utility and the `kitty.app` macOS
    application.
    
    * Prefer libicns (png2icns) over Apple's non-free iconutil.
    * Work around warnings from Apple headers by disabling -pedantic-errors
      and -Werror.
    * Work around ld not support LLVM-LTO by disabling LTO.
    * Make Kitty and glfw compile for macOS 10.11 (and macOS 10.10).
    strager authored and veprbl committed Mar 31, 2019
    Copy the full SHA
    75aa846 View commit details
  12. semver-tool: init at 2.1.0

    Cherry-picked from: alyssais/nixpkgs@eeb1751
    Although fixed so that it actually builds.
    
    Original message:
    
    > I chose "semver-tool" as the path for this package because "semver" is
    > extremely generic, and probably more rightly belongs to node-semver[1]
    > (at least judging by GitHub stars), and because "semver-tool" is the
    > name of this project's GitHub repository, and because it was the name
    > used in the package request[2].
    >
    > Closes NixOS/nixpkgs#50945.
    >
    > [1]: https://github.com/npm/node-semver
    > [2]: NixOS/nixpkgs#50945
    
    Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
    alyssais authored and matthiasbeyer committed Mar 31, 2019
    Copy the full SHA
    98c22f2 View commit details
  13. Merge pull request #58581 from matthiasbeyer/add-semver-tool

    semver-tool: init at 2.1.0
    worldofpeace authored Mar 31, 2019

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    d8c7f0b View commit details
12 changes: 5 additions & 7 deletions pkgs/applications/misc/khal/default.nix
Original file line number Diff line number Diff line change
@@ -2,18 +2,17 @@

with python3.pkgs; buildPythonApplication rec {
pname = "khal";
version = "0.9.10";
version = "0.10.1";

src = fetchPypi {
inherit pname version;
sha256 = "03h0j0d3xyqh98x5v2gv63wv3g91hip3vsaxvybsn5iz331d23h4";
sha256 = "1r8bkgjwkh7i8ygvsv51h1cnax50sb183vafg66x5snxf3dgjl6l";
};

LC_ALL = "en_US.UTF-8";

propagatedBuildInputs = [
atomicwrites
click
click-log
configobj
dateutil
icalendar
@@ -27,15 +26,14 @@ with python3.pkgs; buildPythonApplication rec {
pkginfo
freezegun
];
nativeBuildInputs = [ setuptools_scm pkgs.glibcLocales ];
nativeBuildInputs = [ setuptools_scm ];
checkInputs = [ pytest ];

postInstall = ''
install -D misc/__khal $out/share/zsh/site-functions/__khal
'';

# One test fails as of 0.9.10 due to the upgrade to icalendar 4.0.3
doCheck = false;
doCheck = !stdenv.isAarch64;

checkPhase = ''
py.test
64 changes: 58 additions & 6 deletions pkgs/applications/misc/kitty/default.nix
Original file line number Diff line number Diff line change
@@ -2,7 +2,20 @@
harfbuzz, fontconfig, pkgconfig, ncurses, imagemagick, xsel,
libstartup_notification, libX11, libXrandr, libXinerama, libXcursor,
libxkbcommon, libXi, libXext, wayland-protocols, wayland,
which, dbus
which, dbus,
Cocoa,
CoreGraphics,
Foundation,
IOKit,
Kernel,
OpenGL,
cf-private,
libicns,
libpng,
librsvg,
optipng,
python3,
zlib,
}:

with python3Packages;
@@ -19,12 +32,32 @@ buildPythonApplication rec {
};

buildInputs = [
fontconfig glfw ncurses libunistring harfbuzz libX11
ncurses harfbuzz
] ++ stdenv.lib.optionals stdenv.isDarwin [
Cocoa
CoreGraphics
Foundation
IOKit
Kernel
OpenGL
cf-private
libpng
python3
zlib
] ++ stdenv.lib.optionals stdenv.isLinux [
fontconfig glfw libunistring libX11
libXrandr libXinerama libXcursor libxkbcommon libXi libXext
wayland-protocols wayland dbus
];

nativeBuildInputs = [ pkgconfig which sphinx ncurses ];
nativeBuildInputs = [
pkgconfig which sphinx ncurses
] ++ stdenv.lib.optionals stdenv.isDarwin [
imagemagick
libicns # For the png2icns tool.
librsvg
optipng
];

outputs = [ "out" "terminfo" ];

@@ -33,16 +66,30 @@ buildPythonApplication rec {
src = ./fix-paths.patch;
libstartup_notification = "${libstartup_notification}/lib/libstartup-notification-1.so";
})
] ++ stdenv.lib.optionals stdenv.isDarwin [
./macos-10.11.patch
./no-lto.patch
./no-werror.patch
./png2icns.patch
];

buildPhase = ''
buildPhase = if stdenv.isDarwin then ''
make app
'' else ''
${python.interpreter} setup.py linux-package
'';

installPhase = ''
runHook preInstall
mkdir -p $out
${if stdenv.isDarwin then ''
mkdir "$out/bin"
ln -s ../Applications/kitty.app/Contents/MacOS/kitty "$out/bin/kitty"
mkdir "$out/Applications"
cp -r kitty.app "$out/Applications/kitty.app"
'' else ''
cp -r linux-package/{bin,share,lib} $out
''}
wrapProgram "$out/bin/kitty" --prefix PATH : "$out/bin:${stdenv.lib.makeBinPath [ imagemagick xsel ]}"
runHook postInstall
@@ -54,8 +101,13 @@ buildPythonApplication rec {
'';

postInstall = ''
terminfo_src=${if stdenv.isDarwin then
''"$out/Applications/kitty.app/Contents/Resources/terminfo"''
else
"$out/share/terminfo"}
mkdir -p $terminfo/share
mv $out/share/terminfo $terminfo/share/terminfo
mv "$terminfo_src" $terminfo/share/terminfo
mkdir -p $out/nix-support
echo "$terminfo" >> $out/nix-support/propagated-user-env-packages
@@ -65,7 +117,7 @@ buildPythonApplication rec {
homepage = https://github.com/kovidgoyal/kitty;
description = "A modern, hackable, featureful, OpenGL based terminal emulator";
license = licenses.gpl3;
platforms = platforms.linux;
platforms = platforms.darwin ++ platforms.linux;
maintainers = with maintainers; [ tex rvolosatovs ];
};
}
116 changes: 116 additions & 0 deletions pkgs/applications/misc/kitty/macos-10.11.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
commit 749772b8b8179eb3b71e542fd9ed5621feb578f5
Author: Matthew Glazar <strager.nds@gmail.com>
Date: Thu Feb 28 22:01:32 2019 -0800

Support macOS 10.11

Allow Kitty to run on macOS 10.11 El Capitan.

diff --git a/glfw/cocoa_init.m b/glfw/cocoa_init.m
index 1e719d2e..05a680e4 100644
--- a/glfw/cocoa_init.m
+++ b/glfw/cocoa_init.m
@@ -30,6 +30,10 @@
#define NSEventMaskKeyUp NSKeyUpMask
#define NSEventMaskKeyDown NSKeyDownMask
#define NSEventModifierFlagCommand NSCommandKeyMask
+ #define NSEventModifierFlagControl NSControlKeyMask
+ #define NSEventModifierFlagDeviceIndependentFlagsMask NSDeviceIndependentModifierFlagsMask
+ #define NSEventModifierFlagShift NSShiftKeyMask
+ #define NSEventTypeApplicationDefined NSApplicationDefined
#endif

// Change to our application bundle's resources directory, if present
diff --git a/glfw/cocoa_window.m b/glfw/cocoa_window.m
index 1ce79b56..fd2255fc 100644
--- a/glfw/cocoa_window.m
+++ b/glfw/cocoa_window.m
@@ -41,6 +41,7 @@
#define NSWindowStyleMaskTitled NSTitledWindowMask
#define NSEventModifierFlagCommand NSCommandKeyMask
#define NSEventModifierFlagControl NSControlKeyMask
+ #define NSEventModifierFlagNumericPad NSNumericPadKeyMask
#define NSEventModifierFlagOption NSAlternateKeyMask
#define NSEventModifierFlagShift NSShiftKeyMask
#define NSEventModifierFlagCapsLock NSAlphaShiftKeyMask
diff --git a/kitty/cocoa_window.m b/kitty/cocoa_window.m
index 5e9252ba..99eb3352 100644
--- a/kitty/cocoa_window.m
+++ b/kitty/cocoa_window.m
@@ -15,6 +15,9 @@
#include <objc/runtime.h>

#if (MAC_OS_X_VERSION_MAX_ALLOWED < 101200)
+typedef NSUInteger NSWindowStyleMask;
+#define NSWindowStyleMaskBorderless NSBorderlessWindowMask
+#define NSWindowStyleMaskFullScreen NSFullScreenWindowMask
#define NSWindowStyleMaskResizable NSResizableWindowMask
#define NSEventModifierFlagOption NSAlternateKeyMask
#define NSEventModifierFlagCommand NSCommandKeyMask
diff --git a/kitty/logging.c b/kitty/logging.c
index 45c88174..1ec9f1b0 100644
--- a/kitty/logging.c
+++ b/kitty/logging.c
@@ -5,12 +5,21 @@
* Distributed under terms of the GPL3 license.
*/

+#ifdef __APPLE__
+#include <AvailabilityMacros.h>
+#endif
+#if defined(__APPLE__) && defined(MAC_OS_X_VERSION_10_12) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_12
+#define USE_APPLE_OS_LOG 1
+#else
+#define USE_APPLE_OS_LOG 0
+#endif
+
#include "data-types.h"
#include <stdlib.h>
#include <stdarg.h>
#include <time.h>
#include <sys/time.h>
-#ifdef __APPLE__
+#if USE_APPLE_OS_LOG
#include <os/log.h>
#endif

@@ -21,7 +30,7 @@ void
log_error(const char *fmt, ...) {
va_list ar;
struct timeval tv;
-#ifdef __APPLE__
+#if USE_APPLE_OS_LOG
// Apple does not provide a varargs style os_logv
char logbuf[16 * 1024] = {0};
#else
@@ -44,7 +53,7 @@ log_error(const char *fmt, ...) {
if (use_os_log) { bufprint(vsnprintf, fmt, ar); }
else vfprintf(stderr, fmt, ar);
va_end(ar);
-#ifdef __APPLE__
+#if USE_APPLE_OS_LOG
if (use_os_log) os_log(OS_LOG_DEFAULT, "%{public}s", logbuf);
#endif
if (!use_os_log) fprintf(stderr, "\n");
@@ -66,7 +75,7 @@ static PyMethodDef module_methods[] = {
bool
init_logging(PyObject *module) {
if (PyModule_AddFunctions(module, module_methods) != 0) return false;
-#ifdef __APPLE__
+#if USE_APPLE_OS_LOG
if (getenv("KITTY_LAUNCHED_BY_LAUNCH_SERVICES") != NULL) use_os_log = true;
#endif
return true;
diff --git a/setup.py b/setup.py
index f8643fce..55a96e73 100755
--- a/setup.py
+++ b/setup.py
@@ -711,7 +711,7 @@ Categories=System;TerminalEmulator;
CFBundlePackageType='APPL',
CFBundleSignature='????',
CFBundleExecutable=appname,
- LSMinimumSystemVersion='10.12.0',
+ LSMinimumSystemVersion='10.11.0',
LSRequiresNativeExecution=True,
NSAppleScriptEnabled=False,
# Needed for dark mode in Mojave when linking against older SDKs
12 changes: 12 additions & 0 deletions pkgs/applications/misc/kitty/no-lto.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
--- a/setup.py
+++ b/setup.py
@@ -223,9 +223,6 @@ def init_env(
cppflags += shlex.split(os.environ.get('CPPFLAGS', ''))
cflags += shlex.split(os.environ.get('CFLAGS', ''))
ldflags += shlex.split(os.environ.get('LDFLAGS', ''))
- if not debug and not sanitize:
- # See https://github.com/google/sanitizers/issues/647
- cflags.append('-flto'), ldflags.append('-flto')

if profile:
cppflags.append('-DWITH_PROFILER')
11 changes: 11 additions & 0 deletions pkgs/applications/misc/kitty/no-werror.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- a/setup.py
+++ b/setup.py
@@ -202,7 +202,7 @@ def init_env(
cflags = os.environ.get(
'OVERRIDE_CFLAGS', (
'-Wextra -Wno-missing-field-initializers -Wall -std=c11'
- ' -pedantic-errors -Werror {} {} -fwrapv {} {} -pipe {} -fvisibility=hidden'
+ ' {} {} -fwrapv {} {} -pipe {} -fvisibility=hidden'
).format(
optimize,
' '.join(sanitize_args),
19 changes: 19 additions & 0 deletions pkgs/applications/misc/kitty/png2icns.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
--- a/setup.py
+++ b/setup.py
@@ -744,9 +744,15 @@ Categories=System;TerminalEmulator;
if not os.path.exists(logo_dir):
raise SystemExit('The kitty logo has not been generated, you need to run logo/make.py')
subprocess.check_call([
- 'iconutil', '-c', 'icns', logo_dir, '-o',
+ 'png2icns',
os.path.join('Resources', os.path.basename(logo_dir).partition('.')[0] + '.icns')
- ])
+ ] + [os.path.join(logo_dir, logo) for logo in (
+ 'icon_128x128.png',
+ 'icon_16x16.png',
+ 'icon_256x256.png',
+ 'icon_32x32.png',
+ 'icon_512x512.png',
+ )])
# }}}
# }}}
26 changes: 26 additions & 0 deletions pkgs/data/fonts/behdad-fonts/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{ stdenv, fetchFromGitHub }:

stdenv.mkDerivation rec {
pname = "behdad-fonts";
version = "0.0.3";

src = fetchFromGitHub {
owner = "font-store";
repo = "BehdadFont";
rev = "v${version}";
sha256 = "0rlmyv82qmyy90zvkjnlva44ia7dyhiyk7axbq526v7zip3g79w0";
};

installPhase = ''
mkdir -p $out/share/fonts/behdad-fonts
cp -v $( find . -name '*.ttf') $out/share/fonts/behdad-fonts
'';

meta = with stdenv.lib; {
homepage = https://github.com/font-store/BehdadFont;
description = "A Persian/Arabic Open Source Font";
license = licenses.ofl;
platforms = platforms.all;
maintainers = [ maintainers.linarcx ];
};
}
26 changes: 26 additions & 0 deletions pkgs/data/fonts/parastoo-fonts/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{ stdenv, fetchFromGitHub }:

stdenv.mkDerivation rec {
pname = "parastoo-fonts";
version = "1.0.0-alpha5";

src = fetchFromGitHub {
owner = "rastikerdar";
repo = "parastoo-font";
rev = "v${version}";
sha256 = "1nya9cbbs6sgv2w3zyah3lb1kqylf922q3fazh4l7bi6zgm8q680";
};

installPhase = ''
mkdir -p $out/share/fonts/parastoo-fonts
cp -v $( find . -name '*.ttf') $out/share/fonts/parastoo-fonts
'';

meta = with stdenv.lib; {
homepage = https://github.com/rastikerdar/parastoo-font;
description = "A Persian (Farsi) Font - فونت ( قلم ) فارسی پرستو";
license = licenses.ofl;
platforms = platforms.all;
maintainers = [ maintainers.linarcx ];
};
}
26 changes: 26 additions & 0 deletions pkgs/data/fonts/sahel-fonts/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{ stdenv, fetchFromGitHub }:

stdenv.mkDerivation rec {
pname = "sahel-fonts";
version = "1.0.0-alpha22";

src = fetchFromGitHub {
owner = "rastikerdar";
repo = "sahel-font";
rev = "v${version}";
sha256 = "1kx7byzb5zxspq0i4cvgf4q7sm6xnhdnfyw9zrb1wfmdv3jzaz7p";
};

installPhase = ''
mkdir -p $out/share/fonts/sahel-fonts
cp -v $( find . -name '*.ttf') $out/share/fonts/sahel-fonts
'';

meta = with stdenv.lib; {
homepage = https://github.com/rastikerdar/sahel-font;
description = "A Persian (farsi) Font - فونت (قلم) فارسی ساحل";
license = licenses.ofl;
platforms = platforms.all;
maintainers = [ maintainers.linarcx ];
};
}
Loading