Merge branch 'master' into staging

This commit is contained in:
Nikolay Amiantov 2016-07-16 13:36:27 +03:00
commit d936272b79
406 changed files with 24479 additions and 6159 deletions

View File

@ -1,14 +1,20 @@
language: nix
matrix:
allow_failures:
- os: osx
include:
- os: linux
language: generic
sudo: false
script:
- ./maintainers/scripts/travis-nox-review-pr.sh nixpkgs-verify nixpkgs-manual nixpkgs-tarball
- ./maintainers/scripts/travis-nox-review-pr.sh nixos-options nixos-manual
- os: linux
sudo: required
dist: trusty
script: ./maintainers/scripts/travis-nox-review-pr.sh pr
- os: osx
language: generic
osx_image: xcode7.3
before_install: ./maintainers/scripts/travis-nox-review-pr.sh nix
install: ./maintainers/scripts/travis-nox-review-pr.sh nox
script: ./maintainers/scripts/travis-nox-review-pr.sh build
script: ./maintainers/scripts/travis-nox-review-pr.sh pr
git:
depth: 1
env:
global:
- GITHUB_TOKEN=5edaaf1017f691ed34e7f80878f8f5fbd071603f

View File

@ -31,7 +31,7 @@ For pull-requests, please rebase onto nixpkgs `master`.
* [Documentation (Nix Expression Language chapter)](https://nixos.org/nix/manual/#ch-expression-language)
* [Manual (How to write packages for Nix)](https://nixos.org/nixpkgs/manual/)
* [Manual (NixOS)](https://nixos.org/nixos/manual/)
* [Nix Wiki](https://nixos.org/wiki/)
* [Nix Wiki](https://nixos.org/wiki/) (deprecated, see milestone ["Move the Wiki!"](https://github.com/NixOS/nixpkgs/issues?q=is%3Aopen+is%3Aissue+milestone%3A%22Move+the+wiki%21%22))
* [Continuous package builds for unstable/master](https://hydra.nixos.org/jobset/nixos/trunk-combined)
* [Continuous package builds for 16.03 release](https://hydra.nixos.org/jobset/nixos/release-16.03)
* [Tests for unstable/master](https://hydra.nixos.org/job/nixos/trunk-combined/tested#tabs-constituents)

View File

@ -186,6 +186,7 @@
joamaki = "Jussi Maki <joamaki@gmail.com>";
joelmo = "Joel Moberg <joel.moberg@gmail.com>";
joelteon = "Joel Taylor <me@joelt.io>";
joko = "Ioannis Koutras <ioannis.koutras@gmail.com>";
jpbernardy = "Jean-Philippe Bernardy <jeanphilippe.bernardy@gmail.com>";
jraygauthier = "Raymond Gauthier <jraygauthier@gmail.com>";
juliendehos = "Julien Dehos <dehos@lisic.univ-littoral.fr>";

View File

@ -1,3 +1,5 @@
#!/bin/sh
./fetch-kde-qt.sh http://download.kde.org/stable/applications/16.04.2/ -A '*.tar.xz'
./maintainers/scripts/fetch-kde-qt.sh \
http://download.kde.org/stable/applications/16.04.3/ -A '*.tar.xz' \
>pkgs/desktops/kde-5/applications/srcs.nix

View File

@ -1,3 +1,5 @@
#!/bin/sh
./fetch-kde-qt.sh http://download.kde.org/stable/frameworks/5.22/ -A '*.tar.xz'
./maintainers/scripts/fetch-kde-qt.sh \
http://download.kde.org/stable/frameworks/5.24/ -A '*.tar.xz' \
>pkgs/desktops/kde-5/frameworks/srcs.nix

View File

@ -1,3 +1,5 @@
#!/bin/sh
./fetch-kde-qt.sh http://download.kde.org/stable/plasma/5.6.5/ -A '*.tar.xz'
./maintainers/scripts/fetch-kde-qt.sh \
http://download.kde.org/stable/plasma/5.7.1/ -A '*.tar.xz' \
>pkgs/desktops/kde-5/plasma/srcs.nix

View File

@ -1,58 +1,69 @@
#! /usr/bin/env bash
set -e
export NIX_CURL_FLAGS=-sS
while test -n "$1"; do
if [[ $1 == nix ]]; then
echo "=== Installing Nix..."
# Install Nix
bash <(curl -sS https://nixos.org/nix/install)
source $HOME/.nix-profile/etc/profile.d/nix.sh
# tell Travis to use folding
echo -en "travis_fold:start:$1\r"
# Make sure we can use hydra's binary cache
sudo mkdir /etc/nix
sudo sh -c 'echo "build-max-jobs = 4" > /etc/nix/nix.conf'
case $1 in
# Verify evaluation
echo "=== Verifying that nixpkgs evaluates..."
nix-env -f. -qa --json >/dev/null
elif [[ $1 == nox ]]; then
source $HOME/.nix-profile/etc/profile.d/nix.sh
echo "=== Installing nox..."
nix-build -A nox '<nixpkgs>' --show-trace
elif [[ $1 == build ]]; then
source $HOME/.nix-profile/etc/profile.d/nix.sh
nixpkgs-verify)
echo "=== Verifying that nixpkgs evaluates..."
if [[ $TRAVIS_OS_NAME == "osx" ]]; then
echo "Skipping NixOS things on darwin"
else
# Nix builds in /tmp and we need exec support
sudo mount -o remount,exec /run
sudo mount -o remount,exec /run/user
sudo mount
nix-env --file $TRAVIS_BUILD_DIR --query --available --json > /dev/null
;;
echo "=== Checking NixOS options"
nix-build nixos/release.nix -A options --show-trace
nixos-options)
echo "=== Checking NixOS options"
echo "=== Checking tarball creation"
nix-build pkgs/top-level/release.nix -A tarball --show-trace
fi
nix-build $TRAVIS_BUILD_DIR/nixos/release.nix --attr options --show-trace
;;
if [[ $TRAVIS_PULL_REQUEST == false ]]; then
echo "=== Not a pull request"
else
echo "=== Checking PR"
nixos-manual)
echo "=== Checking NixOS manuals"
if ! nix-shell -p nox --run "nox-review pr ${TRAVIS_PULL_REQUEST}"; then
if sudo dmesg | egrep 'Out of memory|Killed process' > /tmp/oom-log; then
echo "=== The build failed due to running out of memory:"
cat /tmp/oom-log
echo "=== Please disregard the result of this Travis build."
nix-build $TRAVIS_BUILD_DIR/nixos/release.nix --attr manual --show-trace
;;
nixpkgs-manual)
echo "=== Checking nixpkgs manuals"
nix-build $TRAVIS_BUILD_DIR/pkgs/top-level/release.nix --attr manpages --show-trace
;;
nixpkgs-tarball)
echo "=== Checking nixpkgs tarball creation"
nix-build $TRAVIS_BUILD_DIR/pkgs/top-level/release.nix --attr tarball --show-trace
;;
nixpkgs-lint)
echo "=== Checking nixpkgs lint"
nix-shell --packages nixpkgs-lint --run "nixpkgs-lint -f $TRAVIS_BUILD_DIR"
;;
pr)
if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
echo "=== No pull request found"
else
echo "=== Building pull request #$TRAVIS_PULL_REQUEST"
token=""
if [ -n "$GITHUB_TOKEN" ]; then
token="--token $GITHUB_TOKEN"
fi
nix-shell --packages nox git --run "nox-review pr --slug $TRAVIS_REPO_SLUG $token $TRAVIS_PULL_REQUEST" -I nixpkgs=$TRAVIS_BUILD_DIR
fi
exit 1
fi
fi
else
echo "$0: Unknown option $1" >&2
false
fi
;;
*)
echo "Skipping unknown option $1"
;;
esac
echo -en "travis_fold:end:$1\r"
shift
done

View File

@ -10,7 +10,7 @@
<refnamediv>
<refname><command>nixos-version</command></refname>
<refpurpose>show the version of nixpkgs NixOS was built from</refpurpose>
<refpurpose>show the NixOS version</refpurpose>
</refnamediv>
<refsynopsisdiv>
@ -23,58 +23,52 @@
<refsection><title>Description</title>
<para>This command describes the version of nixpkgs used to build
NixOS.</para>
<para>This command shows the version of the currently active NixOS
configuration. For example:
<para>By default the output includes:</para>
<itemizedlist>
<listitem><para>The NixOS release</para></listitem>
<listitem><para>Number of commits since the release</para></listitem>
<listitem><para>Git SHA of the released commit</para></listitem>
<listitem><para>Codename of the NixOS release</para></listitem>
</itemizedlist>
</refsection>
<refsection><title>Example</title>
<para>Here is an example output, and corresponding information:
<screen>$ nixos-version
16.03.1011.6317da4 (Emu)
</screen>
</para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>Attribute</entry>
<entry>Value</entry>
</row>
</thead>
<tbody>
<row>
<entry>NixOS Release</entry>
<entry><literal>16.03</literal></entry>
</row>
<row>
<entry>Commit Count</entry>
<entry><literal>1011</literal></entry>
</row>
<row>
<entry>Commit SHA</entry>
<entry><literal>6317da4</literal></entry>
</row>
<row>
<entry>Release Codename</entry>
<entry><literal>Emu</literal></entry>
</row>
</tbody>
</tgroup>
</informaltable>
<para>
</para>
The version consists of the following elements:
<variablelist>
<varlistentry>
<term><literal>16.03</literal></term>
<listitem><para>The NixOS release, indicating the year and month
in which it was released (e.g. March 2016).</para></listitem>
</varlistentry>
<varlistentry>
<term><literal>1011</literal></term>
<listitem><para>The number of commits in the Nixpkgs Git
repository between the start of the release branch and the commit
from which this version was built. This ensures that NixOS
versions are monotonically increasing. It is
<literal>git</literal> when the current NixOS configuration was
built from a checkout of the Nixpkgs Git repository rather than
from a NixOS channel.</para></listitem>
</varlistentry>
<varlistentry>
<term><literal>6317da4</literal></term>
<listitem><para>The first 7 characters of the commit in the
Nixpkgs Git repository from which this version was
built.</para></listitem>
</varlistentry>
<varlistentry>
<term><literal>Emu</literal></term>
<listitem><para>The code name of the NixOS release. The first
letter of the code name indicates that this is the N'th stable
NixOS release; for example, Emu is the fifth
release.</para></listitem>
</varlistentry>
</variablelist>
</para>
</refsection>
@ -89,7 +83,8 @@ NixOS.</para>
<term><option>--hash</option></term>
<term><option>--revision</option></term>
<listitem>
<para>The output will be the full hash of the git commit
<para>Show the full SHA1 hash of the Git commit from which this
configuration was built, e.g.
<screen>$ nixos-version --hash
6317da40006f6bc2480c6781999c52d88dde2acf
</screen>

View File

@ -3,84 +3,6 @@
with lib;
let fcBool = x: if x then "<bool>true</bool>" else "<bool>false</bool>";
cfg = config.fonts.fontconfig.ultimate;
fontconfigUltimateConf = pkgs.writeText "ultimate-conf" ''
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
${optionalString (!cfg.allowBitmaps) ''
<!-- Reject bitmap fonts -->
<selectfont>
<rejectfont>
<pattern>
<patelt name="scalable"><bool>false</bool></patelt>
</pattern>
</rejectfont>
</selectfont>
''}
${optionalString cfg.allowType1 ''
<!-- Reject Type 1 fonts -->
<selectfont>
<rejectfont>
<pattern>
<patelt name="fontformat">
<string>Type 1</string>
</patelt>
</pattern>
</rejectfont>
</selectfont>
''}
<!-- Use embedded bitmaps in fonts like Calibri? -->
<match target="font">
<edit name="embeddedbitmap" mode="assign">
${fcBool cfg.useEmbeddedBitmaps}
</edit>
</match>
<!-- Force autohint always -->
<match target="font">
<edit name="force_autohint" mode="assign">
${fcBool cfg.forceAutohint}
</edit>
</match>
<!-- Render some monospace TTF fonts as bitmaps -->
<match target="pattern">
<edit name="bitmap_monospace" mode="assign">
${fcBool cfg.renderMonoTTFAsBitmap}
</edit>
</match>
</fontconfig>
'';
confPkg =
let version = pkgs.fontconfig.configVersion;
in pkgs.runCommand "font-ultimate-conf" {} ''
mkdir -p $out/etc/fonts/{,${version}/}conf.d/
cp ${fontconfigUltimateConf} \
$out/etc/fonts/conf.d/52-fontconfig-ultimate.conf
cp ${fontconfigUltimateConf} \
$out/etc/fonts/${version}/conf.d/52-fontconfig-ultimate.conf
${optionalString (cfg.substitutions != "none") ''
cp ${pkgs.fontconfig-ultimate.confd}/etc/fonts/presets/${cfg.substitutions}/*.conf \
$out/etc/fonts/conf.d/
cp ${pkgs.fontconfig-ultimate.confd}/etc/fonts/presets/${cfg.substitutions}/*.conf \
$out/etc/fonts/${version}/conf.d/
''}
ln -s ${pkgs.fontconfig-ultimate.confd}/etc/fonts/conf.d/*.conf \
$out/etc/fonts/conf.d/
ln -s ${pkgs.fontconfig-ultimate.confd}/etc/fonts/conf.d/*.conf \
$out/etc/fonts/${version}/conf.d/
'';
in
{
@ -193,11 +115,78 @@ in
};
config = mkIf (config.fonts.fontconfig.enable && cfg.enable) {
config =
let ultimate = config.fonts.fontconfig.ultimate;
fontconfigUltimateConf = ''
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
fonts.fontconfig.confPkgs = [ confPkg ];
environment.variables = cfg.rendering;
${optionalString (!ultimate.allowBitmaps) ''
<!-- Reject bitmap fonts -->
<selectfont>
<rejectfont>
<pattern>
<patelt name="scalable"><bool>false</bool></patelt>
</pattern>
</rejectfont>
</selectfont>
''}
${optionalString ultimate.allowType1 ''
<!-- Reject Type 1 fonts -->
<selectfont>
<rejectfont>
<pattern>
<patelt name="fontformat">
<string>Type 1</string>
</patelt>
</pattern>
</rejectfont>
</selectfont>
''}
<!-- Use embedded bitmaps in fonts like Calibri? -->
<match target="font">
<edit name="embeddedbitmap" mode="assign">
${fcBool ultimate.useEmbeddedBitmaps}
</edit>
</match>
<!-- Force autohint always -->
<match target="font">
<edit name="force_autohint" mode="assign">
${fcBool ultimate.forceAutohint}
</edit>
</match>
<!-- Render some monospace TTF fonts as bitmaps -->
<match target="pattern">
<edit name="bitmap_monospace" mode="assign">
${fcBool ultimate.renderMonoTTFAsBitmap}
</edit>
</match>
${optionalString (ultimate.substitutions != "none") ''
<!-- Type 1 font substitutions -->
<include ignore_missing="yes">${pkgs.fontconfig-ultimate.confd}/etc/fonts/presets/${ultimate.substitutions}</include>
''}
<include ignore_missing="yes">${pkgs.fontconfig-ultimate.confd}/etc/fonts/conf.d</include>
</fontconfig>
'';
in mkIf (config.fonts.fontconfig.enable && ultimate.enable) {
environment.etc."fonts/conf.d/52-fontconfig-ultimate.conf" = {
text = fontconfigUltimateConf;
};
environment.etc."fonts/${pkgs.fontconfig.configVersion}/conf.d/52-fontconfig-ultimate.conf" = {
text = fontconfigUltimateConf;
};
environment.variables = ultimate.rendering;
};

View File

@ -2,121 +2,6 @@
with lib;
let cfg = config.fonts.fontconfig;
fcBool = x: "<bool>" + (if x then "true" else "false") + "</bool>";
renderConf = pkgs.writeText "render-conf" ''
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<!-- Default rendering settings -->
<match target="font">
<edit mode="assign" name="hinting">
${fcBool cfg.hinting.enable}
</edit>
<edit mode="assign" name="autohint">
${fcBool cfg.hinting.autohint}
</edit>
<edit mode="assign" name="hintstyle">
<const>hint${cfg.hinting.style}</const>
</edit>
<edit mode="assign" name="antialias">
${fcBool cfg.antialias}
</edit>
<edit mode="assign" name="rgba">
<const>${cfg.subpixel.rgba}</const>
</edit>
<edit mode="assign" name="lcdfilter">
<const>lcd${cfg.subpixel.lcdfilter}</const>
</edit>
</match>
${optionalString (cfg.dpi != 0) ''
<match target="pattern">
<edit name="dpi" mode="assign">
<double>${toString cfg.dpi}</double>
</edit>
</match>
''}
</fontconfig>
'';
genericAliasConf =
let genDefault = fonts: name:
optionalString (fonts != []) ''
<alias>
<family>${name}</family>
<prefer>
${concatStringsSep ""
(map (font: ''
<family>${font}</family>
'') fonts)}
</prefer>
</alias>
'';
in
pkgs.writeText "generic-alias-conf" ''
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<!-- Default fonts -->
${genDefault cfg.defaultFonts.sansSerif "sans-serif"}
${genDefault cfg.defaultFonts.serif "serif"}
${genDefault cfg.defaultFonts.monospace "monospace"}
</fontconfig>
'';
cacheConf = let
cache = fontconfig: pkgs.makeFontsCache { inherit fontconfig; fontDirectories = config.fonts.fonts; };
in
pkgs.writeText "cache-conf" ''
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<!-- Font directories -->
${concatStringsSep "\n" (map (font: "<dir>${font}</dir>") config.fonts.fonts)}
<!-- Pre-generated font caches -->
<cachedir>${cache pkgs.fontconfig}</cachedir>
${optionalString (pkgs.stdenv.isx86_64 && cfg.cache32Bit) ''
<cachedir>${cache pkgs.pkgsi686Linux.fontconfig}</cachedir>
''}
</fontconfig>
'';
userConf = pkgs.writeText "user-conf" ''
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<include ignore_missing="yes" prefix="xdg">fontconfig/conf.d</include>
<include ignore_missing="yes" prefix="xdg">fontconfig/fonts.conf</include>
</fontconfig>
'';
fontsConf = pkgs.makeFontsConf { fontconfig = pkgs.fontconfig_210; fontDirectories = config.fonts.fonts; };
confPkg =
let version = pkgs.fontconfig.configVersion;
in pkgs.runCommand "fontconfig-conf" {} ''
mkdir -p $out/etc/fonts/{,${version}/}conf.d
ln -s ${fontsConf} $out/etc/fonts/fonts.conf
ln -s ${pkgs.fontconfig.out}/etc/fonts/fonts.conf $out/etc/fonts/${version}/fonts.conf
ln -s ${pkgs.fontconfig.out}/etc/fonts/conf.d/* $out/etc/fonts/${version}/conf.d/
ln -s ${renderConf} $out/etc/fonts/conf.d/10-nixos-rendering.conf
ln -s ${genericAliasConf} $out/etc/fonts/conf.d/60-nixos-generic-alias.conf
ln -s ${cacheConf} $out/etc/fonts/${version}/conf.d/00-nixos.conf
ln -s ${renderConf} $out/etc/fonts/${version}/conf.d/10-nixos-rendering.conf
ln -s ${genericAliasConf} $out/etc/fonts/${version}/conf.d/30-nixos-generic-alias.conf
${optionalString cfg.includeUserConf
"ln -s ${userConf} $out/etc/fonts/${version}/conf.d/99-user.conf"}
'';
in
{
options = {
@ -136,15 +21,6 @@ in
'';
};
confPkgs = mkOption {
internal = true;
type = with types; listOf path;
default = [ ];
description = ''
Fontconfig configuration packages.
'';
};
antialias = mkOption {
type = types.bool;
default = true;
@ -267,17 +143,135 @@ in
};
config = mkIf cfg.enable {
fonts.fontconfig.confPkgs = [ confPkg ];
config =
let fontconfig = config.fonts.fontconfig;
fcBool = x: "<bool>" + (if x then "true" else "false") + "</bool>";
renderConf = ''
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
environment.etc.fonts.source =
let fontConf = pkgs.symlinkJoin {
name = "fontconfig-etc";
paths = cfg.confPkgs;
};
in "${fontConf}/etc/fonts/";
<!-- Default rendering settings -->
<match target="font">
<edit mode="assign" name="hinting">
${fcBool fontconfig.hinting.enable}
</edit>
<edit mode="assign" name="autohint">
${fcBool fontconfig.hinting.autohint}
</edit>
<edit mode="assign" name="hintstyle">
<const>hint${fontconfig.hinting.style}</const>
</edit>
<edit mode="assign" name="antialias">
${fcBool fontconfig.antialias}
</edit>
<edit mode="assign" name="rgba">
<const>${fontconfig.subpixel.rgba}</const>
</edit>
<edit mode="assign" name="lcdfilter">
<const>lcd${fontconfig.subpixel.lcdfilter}</const>
</edit>
</match>
environment.systemPackages = [ pkgs.fontconfig ];
};
${optionalString (fontconfig.dpi != 0) ''
<match target="pattern">
<edit name="dpi" mode="assign">
<double>${toString fontconfig.dpi}</double>
</edit>
</match>
''}
</fontconfig>
'';
genericAliasConf = ''
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<!-- Default fonts -->
${optionalString (fontconfig.defaultFonts.sansSerif != []) ''
<alias>
<family>sans-serif</family>
<prefer>
${concatStringsSep "\n"
(map (font: "<family>${font}</family>")
fontconfig.defaultFonts.sansSerif)}
</prefer>
</alias>
''}
${optionalString (fontconfig.defaultFonts.serif != []) ''
<alias>
<family>serif</family>
<prefer>
${concatStringsSep "\n"
(map (font: "<family>${font}</family>")
fontconfig.defaultFonts.serif)}
</prefer>
</alias>
''}
${optionalString (fontconfig.defaultFonts.monospace != []) ''
<alias>
<family>monospace</family>
<prefer>
${concatStringsSep "\n"
(map (font: "<family>${font}</family>")
fontconfig.defaultFonts.monospace)}
</prefer>
</alias>
''}
</fontconfig>
'';
in mkIf fontconfig.enable {
# Fontconfig 2.10 backward compatibility
# Bring in the default (upstream) fontconfig configuration, only for fontconfig 2.10
environment.etc."fonts/fonts.conf".source =
pkgs.makeFontsConf { fontconfig = pkgs.fontconfig_210; fontDirectories = config.fonts.fonts; };
environment.etc."fonts/conf.d/10-nixos-rendering.conf".text = renderConf;
environment.etc."fonts/conf.d/60-nixos-generic-alias.conf".text = genericAliasConf;
# Versioned fontconfig > 2.10. Take shared fonts.conf from fontconfig.
# Otherwise specify only font directories.
environment.etc."fonts/${pkgs.fontconfig.configVersion}/fonts.conf".source =
"${pkgs.fontconfig.out}/etc/fonts/fonts.conf";
environment.etc."fonts/${pkgs.fontconfig.configVersion}/conf.d/00-nixos.conf".text =
let
cache = fontconfig: pkgs.makeFontsCache { inherit fontconfig; fontDirectories = config.fonts.fonts; };
in ''
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<!-- Font directories -->
${concatStringsSep "\n" (map (font: "<dir>${font}</dir>") config.fonts.fonts)}
<!-- Pre-generated font caches -->
<cachedir>${cache pkgs.fontconfig}</cachedir>
${optionalString (pkgs.stdenv.isx86_64 && config.fonts.fontconfig.cache32Bit) ''
<cachedir>${cache pkgs.pkgsi686Linux.fontconfig}</cachedir>
''}
</fontconfig>
'';
environment.etc."fonts/${pkgs.fontconfig.configVersion}/conf.d/10-nixos-rendering.conf".text = renderConf;
environment.etc."fonts/${pkgs.fontconfig.configVersion}/conf.d/60-nixos-generic-alias.conf".text = genericAliasConf;
environment.etc."fonts/${pkgs.fontconfig.configVersion}/conf.d/99-user.conf" = {
enable = fontconfig.includeUserConf;
text = ''
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<include ignore_missing="yes" prefix="xdg">fontconfig/conf.d</include>
<include ignore_missing="yes" prefix="xdg">fontconfig/fonts.conf</include>
</fontconfig>
'';
};
environment.systemPackages = [ pkgs.fontconfig ];
};
}

View File

@ -1,9 +1,10 @@
#! @shell@
case "$1" in
--help)
-h|--help)
exec man nixos-version
exit 1
;;
--hash|--revision)
echo "@nixosRevision@"
;;

View File

@ -258,6 +258,7 @@
./services/misc/ripple-data-api.nix
./services/misc/rogue.nix
./services/misc/siproxd.nix
./services/misc/sonarr.nix
./services/misc/spice-vdagentd.nix
./services/misc/subsonic.nix
./services/misc/sundtek.nix

View File

@ -13,12 +13,16 @@ let
|| elem fs.mountPoint [ "/" "/nix" "/nix/store" "/var" "/var/log" "/var/lib" "/etc" ])
&& fs.fsType == "zfs")
(attrValues config.fileSystems) != [];
# Ascertain whether NixOS container support is required
containerSupportRequired =
config.boot.enableContainers && config.containers != {};
in
{
options.security.grsecurity = {
enable = mkEnableOption "Grsecurity/PaX";
enable = mkEnableOption "grsecurity/PaX";
lockTunables = mkOption {
type = types.bool;
@ -27,9 +31,9 @@ in
description = ''
Whether to automatically lock grsecurity tunables
(<option>boot.kernel.sysctl."kernel.grsecurity.*"</option>). Disable
this to allow configuration of grsecurity features while the system is
running. The lock can be manually engaged by activating the
<literal>grsec-lock</literal> service unit.
this to allow runtime configuration of grsecurity features. Activate
the <literal>grsec-lock</literal> service unit to prevent further
configuration until the next reboot.
'';
};
@ -48,10 +52,6 @@ in
(isYES "GRKERNSEC_SYSCTL_DISTRO")
];
# Crashing on an overflow in kernel land is user unfriendly and may prevent
# the system from booting, which is too severe for our use case.
boot.kernelParams = [ "pax_size_overflow_report_only" ];
# Install PaX related utillities into the system profile. Eventually, we
# also want to include gradm here.
environment.systemPackages = with pkgs; [ paxctl pax-utils ];
@ -59,7 +59,7 @@ in
# Install rules for the grsec device node
services.udev.packages = [ pkgs.gradm ];
# This service unit is responsible for locking the Grsecurity tunables. The
# This service unit is responsible for locking the grsecurity tunables. The
# unit is always defined, but only activated on bootup if lockTunables is
# toggled. When lockTunables is toggled, failure to activate the unit will
# enter emergency mode. The intent is to make it difficult to silently
@ -105,7 +105,7 @@ in
"kernel.grsecurity.chroot_deny_chroot" = mkForce 0;
"kernel.grsecurity.chroot_deny_mount" = mkForce 0;
"kernel.grsecurity.chroot_deny_pivot" = mkForce 0;
} // optionalAttrs config.boot.enableContainers {
} // optionalAttrs containerSupportRequired {
# chroot(2) restrictions that conflict with NixOS lightweight containers
"kernel.grsecurity.chroot_deny_chmod" = mkForce 0;
"kernel.grsecurity.chroot_deny_mount" = mkForce 0;

View File

@ -154,7 +154,7 @@ in {
'';
script = ''
${pkgs.jdk}/bin/java -jar ${pkgs.jenkins} --httpListenAddress=${cfg.listenAddress} \
${pkgs.jdk}/bin/java -jar ${pkgs.jenkins}/webapps/jenkins.war --httpListenAddress=${cfg.listenAddress} \
--httpPort=${toString cfg.port} \
--prefix=${cfg.prefix} \
${concatStringsSep " " cfg.extraOptions}

View File

@ -0,0 +1,44 @@
{ config, pkgs, lib, mono, ... }:
with lib;
let
cfg = config.services.sonarr;
in
{
options = {
services.sonarr = {
enable = mkEnableOption "Sonarr";
};
};
config = mkIf cfg.enable {
systemd.services.sonarr = {
description = "Sonarr";
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
preStart = ''
test -d /var/lib/sonarr/ || {
echo "Creating sonarr data directory in /var/lib/sonarr/"
mkdir -p /var/lib/sonarr/
}
chown -R sonarr /var/lib/sonarr/
chmod 0700 /var/lib/sonarr/
'';
serviceConfig = {
Type = "simple";
User = "sonarr";
Group = "nogroup";
PermissionsStartOnly = "true";
ExecStart = "${pkgs.sonarr}/bin/NzbDrone --no-browser";
Restart = "on-failure";
};
};
users.extraUsers.sonarr = {
home = "/var/lib/sonarr";
};
};
}

View File

@ -33,7 +33,7 @@ in
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
ExecStart = "${pkgs.caddy}/bin/caddy -conf=${configFile} -email=${cfg.email}";
ExecStart = "${pkgs.caddy.bin}/bin/caddy -conf=${configFile} -email=${cfg.email}";
Type = "simple";
User = "caddy";
Group = "caddy";

View File

@ -122,6 +122,7 @@ in {
services.dbus.packages = mkIf config.services.printing.enable [ pkgs.system-config-printer ];
services.colord.enable = mkDefault true;
hardware.bluetooth.enable = mkDefault true;
services.xserver.libinput.enable = mkDefault true; # for controlling touchpad settings via gnome control center
fonts.fonts = [ pkgs.dejavu_fonts pkgs.cantarell_fonts ];

View File

@ -68,6 +68,7 @@ in rec {
(all nixos.tests.boot.uefiCdrom)
(all nixos.tests.boot.uefiUsb)
(all nixos.tests.boot-stage1)
(all nixos.tests.ecryptfs)
(all nixos.tests.ipv6)
(all nixos.tests.i3wm)
(all nixos.tests.kde4)

View File

@ -220,6 +220,7 @@ in rec {
tests.docker = hydraJob (import tests/docker.nix { system = "x86_64-linux"; });
tests.dockerRegistry = hydraJob (import tests/docker-registry.nix { system = "x86_64-linux"; });
tests.dnscrypt-proxy = callTest tests/dnscrypt-proxy.nix { system = "x86_64-linux"; };
tests.ecryptfs = callTest tests/ecryptfs.nix {};
tests.etcd = hydraJob (import tests/etcd.nix { system = "x86_64-linux"; });
tests.ec2-nixops = hydraJob (import tests/ec2.nix { system = "x86_64-linux"; }).boot-ec2-nixops;
tests.ec2-config = hydraJob (import tests/ec2.nix { system = "x86_64-linux"; }).boot-ec2-config;

81
nixos/tests/ecryptfs.nix Normal file
View File

@ -0,0 +1,81 @@
import ./make-test.nix ({ pkgs, ... }:
{
name = "ecryptfs";
machine = { config, pkgs, ... }: {
imports = [ ./common/user-account.nix ];
boot.kernelModules = [ "ecryptfs" ];
security.pam.enableEcryptfs = true;
environment.systemPackages = with pkgs; [ keyutils ];
};
testScript = ''
$machine->waitForUnit("default.target");
# Set alice up with a password and a home
$machine->succeed("(echo foobar; echo foobar) | passwd alice");
$machine->succeed("chown -R alice.users ~alice");
# Migrate alice's home
my $out = $machine->succeed("echo foobar | ecryptfs-migrate-home -u alice");
$machine->log("ecryptfs-migrate-home said: $out");
# Log alice in (ecryptfs passwhrase is wrapped during first login)
$machine->sleep(2); # urgh: wait for username prompt
$machine->sendChars("alice\n");
$machine->sleep(1);
$machine->sendChars("foobar\n");
$machine->sleep(2);
$machine->sendChars("logout\n");
$machine->sleep(2);
# Why do I need to do this??
$machine->succeed("su alice -c ecryptfs-umount-private");
$machine->sleep(1);
$machine->fail("mount | grep ecryptfs"); # check that encrypted home is not mounted
# Show contents of the user keyring
my $out = $machine->succeed("su - alice -c 'keyctl list \@u'");
$machine->log("keyctl unlink said: " . $out);
# Log alice again
$machine->sendChars("alice\n");
$machine->sleep(1);
$machine->sendChars("foobar\n");
$machine->sleep(2);
# Create some files in encrypted home
$machine->succeed("su alice -c 'touch ~alice/a'");
$machine->succeed("su alice -c 'echo c > ~alice/b'");
# Logout
$machine->sendChars("logout\n");
$machine->sleep(2);
# Why do I need to do this??
$machine->succeed("su alice -c ecryptfs-umount-private");
$machine->sleep(1);
# Check that the filesystem is not accessible
$machine->fail("mount | grep ecryptfs");
$machine->succeed("su alice -c 'test \! -f ~alice/a'");
$machine->succeed("su alice -c 'test \! -f ~alice/b'");
# Log alice once more
$machine->sendChars("alice\n");
$machine->sleep(1);
$machine->sendChars("foobar\n");
$machine->sleep(2);
# Check that the files are there
$machine->sleep(1);
$machine->succeed("su alice -c 'test -f ~alice/a'");
$machine->succeed("su alice -c 'test -f ~alice/b'");
$machine->succeed(qq%test "\$(cat ~alice/b)" = "c"%);
# Catch https://github.com/NixOS/nixpkgs/issues/16766
$machine->succeed("su alice -c 'ls -lh ~alice/'");
$machine->sendChars("logout\n");
'';
})

View File

@ -189,13 +189,13 @@ in
idea-community = buildIdea rec {
name = "idea-community-${version}";
version = "2016.1.3";
build = "IC-145.1617.8";
version = "2016.2";
build = "IC-162.1121";
description = "Integrated Development Environment (IDE) by Jetbrains, community edition";
license = stdenv.lib.licenses.asl20;
src = fetchurl {
url = "https://download.jetbrains.com/idea/ideaIC-${version}.tar.gz";
sha256 = "0yd1jqz4arywyjsiakszrr48w2xqnik6vnl1a6l0ph2hssgkzkfi";
sha256 = "164x4l0q31zpc1jh3js1xx9y6afrzsshmnkx1mwhmq8qmvzc4w32";
};
wmClass = "jetbrains-idea-ce";
};
@ -228,13 +228,13 @@ in
idea-ultimate = buildIdea rec {
name = "idea-ultimate-${version}";
version = "2016.1.3";
build = "IU-145.1617.8";
version = "2016.2";
build = "IU-162.1121";
description = "Integrated Development Environment (IDE) by Jetbrains, requires paid license";
license = stdenv.lib.licenses.unfree;
src = fetchurl {
url = "https://download.jetbrains.com/idea/ideaIU-${version}.tar.gz";
sha256 = "1zzxwdnw2bbnl86kj7fjk5p8c99d0hdn1ki2alw5xm8wp4k0w7rv";
sha256 = "10hiqh6ccmai2cnc5p72vqjcz9kzmmcpn0hy5v514h4mq6vs4zk4";
};
wmClass = "jetbrains-idea";
};

View File

@ -59,7 +59,7 @@ stdenv.mkDerivation rec {
2a3,5
> export MONO_GAC_PREFIX=${gnome-sharp}:${gtk-sharp}:\$MONO_GAC_PREFIX
> export PATH=${mono}/bin:\$PATH
> export LD_LIBRARY_PATH=${glib}/lib:${gnome.libgnomeui}/lib:${gnome.gnome_vfs}/lib:${gnome-sharp}/lib:${gtk-sharp}/lib:${gtk-sharp.gtk}/lib:\$LD_LIBRARY_PATH
> export LD_LIBRARY_PATH=${stdenv.lib.makeLibraryPath [ glib gnome.libgnomeui gnome.gnome_vfs gnome-sharp gtk-sharp gtk-sharp.gtk ]}:\$LD_LIBRARY_PATH
>
EOF
done

View File

@ -32,5 +32,8 @@ stdenv.mkDerivation rec {
license = licenses.gpl2; # Commercial license is also available
maintainers = with maintainers; [ bjornfor prikhi ];
platforms = platforms.linux;
# See https://github.com/prikhi/pencil/issues/840
# ("Error: Platform version '47.0' is not compatible with minVersion >= 36.0 maxVersion <= 46.*")
broken = true;
};
}

View File

@ -1,17 +1,19 @@
{ fetchurl, stdenv, m4, glibc, gtk3, libexif, libgphoto2, libsoup, libxml2, vala, sqlite
, webkitgtk24x, pkgconfig, gnome3, gst_all_1, which, udev, libgudev, libraw, glib, json_glib
, webkitgtk, pkgconfig, gnome3, gst_all_1, which, udev, libgudev, libraw, glib, json_glib
, gettext, desktop_file_utils, lcms2, gdk_pixbuf, librsvg, makeWrapper
, gnome_doc_utils, hicolor_icon_theme }:
# for dependencies see http://www.yorba.org/projects/shotwell/install/
stdenv.mkDerivation rec {
version = "0.22.0";
version = "${major}.${minor}";
major = "0.23";
minor = "2";
name = "shotwell-${version}";
src = fetchurl {
url = "mirror://gnome/sources/shotwell/0.22/${name}.tar.xz";
sha256 = "0cgqaaikrb10plhf6zxbgqy32zqpiwyi9dpx3g8yr261q72r5c81";
url = "mirror://gnome/sources/shotwell/${major}/${name}.tar.xz";
sha256 = "d52caae4e3204f2f78e2eb828d955848ea6fef5c91d3ac6e9eb0b185c0490b39";
};
NIX_CFLAGS_COMPILE = "-I${glib.dev}/include/glib-2.0 -I${glib.out}/lib/glib-2.0/include";
@ -35,7 +37,7 @@ stdenv.mkDerivation rec {
'';
buildInputs = [ m4 glibc gtk3 libexif libgphoto2 libsoup libxml2 vala sqlite webkitgtk24x
buildInputs = [ m4 glibc gtk3 libexif libgphoto2 libsoup libxml2 vala sqlite webkitgtk
pkgconfig gst_all_1.gstreamer gst_all_1.gst-plugins-base gnome3.libgee
which udev libgudev gnome3.gexiv2 hicolor_icon_theme
libraw json_glib gettext desktop_file_utils glib lcms2 gdk_pixbuf librsvg

View File

@ -2,14 +2,14 @@
stdenv.mkDerivation rec {
pname = "emem";
version = "0.2.15";
version = "0.2.16";
name = "${pname}-${version}";
inherit jdk;
src = fetchurl {
url = "https://github.com/ebzzry/${pname}/releases/download/v${version}/${pname}.jar";
sha256 = "0jj990syd9biq2awnjydi4x3p4hivigc522ds59hdf5wg4y2gg6c";
sha256 = "1j6i40mcfwcx85zv0pxpwrqj0zy9s5qd7j63zdqf0lckkjvyrih9";
};
buildInputs = [ ];

View File

@ -0,0 +1,50 @@
{ stdenv, pkgconfig, fetchFromGitHub
, cmake, boost
, portmidi, sqlite
, freetype, libpng, pngpp, zlib
, wxGTK30, wxsqlite3
}:
stdenv.mkDerivation rec {
name = "lenmus-${version}";
version = "5.4.1";
src = fetchFromGitHub {
owner = "lenmus";
repo = "lenmus";
rev = "Release_${version}";
sha256 = "03xar8x38x20cns2gnv34jp0hw0k16sa62kkfhka9iiiw90wfyrp";
};
postPatch = ''
substituteInPlace CMakeLists.txt \
--replace "DESTINATION \"/usr/share" "DESTINATION \"$out/share"
'';
cmakeFlags = [
"-DCMAKE_INSALL_PREFIX=$out"
];
enableParallelBuilding = true;
buildInputs = [
pkgconfig
cmake boost
portmidi sqlite
freetype libpng pngpp zlib
wxGTK30 wxsqlite3
];
meta = with stdenv.lib; {
description = "LenMus Phonascus is a program for learning music";
longDescription = ''
LenMus Phonascus is a free open source program (GPL v3) for learning music.
It allows you to focus on specific skills and exercises, on both theory and aural training.
The different activities can be customized to meet your needs
'';
homepage = "http://www.lenmus.org/";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ ramkromberg ];
platforms = with platforms; linux;
};
}

View File

@ -3,26 +3,26 @@
stdenv.mkDerivation {
name = "procmail-3.22";
buildInputs = [ stdenv.cc.libc ];
patches = [ ./CVE-2014-3618.patch ];
# getline is defined differently in glibc now. So rename it.
installPhase = "
mkdir -p \$out/bin
sed -e \"s%^RM.*$%RM=`type -f rm | awk '{print $3;}'` -f%\" -i Makefile
sed -e \"s%^BASENAME.*%\BASENAME=$out%\" -i Makefile
sed -e \"s%^LIBS=.*%LIBS=-lm%\" -i Makefile
sed -e \"s%getline%thisgetline%g\" -i src/*.c src/*.h
make DESTDIR=\$out install
";
phases = "unpackPhase patchPhase installPhase";
patches = [ ./CVE-2014-3618.patch ];
postPatch = ''
sed -e "s%^RM.*$%#%" -i Makefile
sed -e "s%^BASENAME.*%\BASENAME=$out%" -i Makefile
sed -e "s%^LIBS=.*%LIBS=-lm%" -i Makefile
sed -e "s%getline%thisgetline%g" -i src/*.c src/*.h
'';
src = fetchurl {
url = ftp://ftp.fu-berlin.de/pub/unix/mail/procmail/procmail-3.22.tar.gz;
sha256 = "05z1c803n5cppkcq99vkyd5myff904lf9sdgynfqngfk9nrpaz08";
};
meta.homepage = "http://www.procmail.org/";
meta = with stdenv.lib; {
description = "Mail processing and filtering utility";
homepage = http://www.procmail.org/;
license = licenses.gpl2;
platforms = platforms.unix;
maintainers = with maintainers; [ gebner ];
};
}

View File

@ -16,7 +16,7 @@ python3Packages.buildPythonApplication {
doCheck = false;
propogatedBuildInputs = [ python3 ];
propagatedBuildInputs = [ python3 ];
meta = with stdenv.lib; {
description = "A text scroller for use with panels and shells";

View File

@ -1,9 +1,9 @@
{ stdenv, fetchurl, ... } @ args:
import ./generic.nix (args // {
version = "2.3.7";
version = "2.3.8";
sha256s = {
"x86_64-linux" = "1hnw6bv60xrnc733gm1ilywc0y93k2g6bmwgnww9qk7ivbvi6pd1";
"i686-linux" = "0hj8nbq6mava15m1hxaqq371fqk0whdx5iqsbnppyci0jjnr4qv1";
"x86_64-linux" = "02n5s561cz3mprg682mrbmh3qai42dh64jgi05rqy9s6wgbn66ly";
"i686-linux" = "118qrnxc7gvm30rsz0xfx6dlxmrr0dk5ajrvszhy06ww7xvqhzji";
};
})

View File

@ -70,11 +70,11 @@ let
in
stdenv.mkDerivation rec {
name = "flashplayer-${version}";
version = "11.2.202.626";
version = "11.2.202.632";
src = fetchurl {
url = "https://fpdownload.macromedia.com/pub/flashplayer/installers/archive/fp_${version}_archive.zip";
sha256 = "1c7ffr1kjmdq5rcx3xzgkd4wg1c8b3zkb1ysmnjiicfm423xr9h7";
sha256 = "0nf2d7jn8g6bp9vilkwwkkh6pm05fg3h73njsn4yvx3285k73lpn";
};
nativeBuildInputs = [ unzip ];

View File

@ -0,0 +1,9 @@
# TODO: Drop once https://github.com/habitat-sh/habitat/issues/994
# is resolved.
{ habitat, libsodium, libarchive, openssl, buildFHSUserEnv }:
buildFHSUserEnv {
name = "habitat-sh";
targetPkgs = pkgs: [ habitat libsodium libarchive openssl ];
runScript = "bash";
}

View File

@ -5,18 +5,18 @@ with rustPlatform;
buildRustPackage rec {
name = "habitat-${version}";
version = "0.7.0";
version = "0.8.0";
src = fetchFromGitHub {
owner = "habitat-sh";
repo = "habitat";
rev = version;
sha256 = "0pacxcc86w4zdakyd6qbz2rqx30rkv1j5aca1fqa1hf1jqg44vg0";
sha256 = "1h9wv2v4hcv79jkkjf8j96lzxni9d51755zfflfr5s3ayaip7rzj";
};
sourceRoot = "habitat-${version}-src/components/hab";
depsSha256 = "0bm9f6w7ircji4d1c1fgysna93w0lf8ws7gfkqq80zx92x3lz5z5";
depsSha256 = "1612jaw3zdrgrb56r755bb18l8szdmf1wi7p9lpv3d2gklqcb7l1";
buildInputs = [ libsodium libarchive openssl ];

View File

@ -2,16 +2,16 @@
buildGoPackage rec {
name = "terraform-${version}";
version = "0.6.15";
version = "0.6.16";
rev = "v${version}";
goPackagePath = "github.com/hashicorp/terraform";
src = fetchFromGitHub {
inherit rev;
owner = "hashicorp";
repo = "terraform";
sha256 = "1mf98hagb0yp40g2mbar7aw7hmpq01clnil6y9khvykrb33vy0nb";
sha256 = "1bg8hn4b31xphyxrc99bpnf7gmq20fxqx1k871nidx132brcsah2";
};
postInstall = ''

View File

@ -1,20 +1,20 @@
{ fetchurl, stdenv, dpkg, makeWrapper, xorg, qt5Full, gstreamer, zlib, sqlite, libxslt }:
{fetchurl, stdenv, dpkg, makeWrapper,
alsaLib, cups, curl, dbus, expat, fontconfig, freetype, glib, gst_all_1, harfbuzz, libcap,
libpulseaudio, mesa, nspr, nss, libudev, wayland, xorg, zlib, ...
}:
assert stdenv.system == "x86_64-linux";
# BUG: viber tries to access contacts list and that causes segfault
# FIX: you have to do `chmod 444 ~/.ViberPC/<your mobile phone number>/Avatars`
# BUG: viber tries to it's downloads and that causes segfault
# FIX: you have to do `chmod 444 ~/Documents/ViberDownloads`
# TODO: fix bugs
# BUG: Viber requires running tray application, segfaulting if it's missing
# FIX: Start something like `stalonetray` if you DE doesn't provide tray
stdenv.mkDerivation rec {
name = "viber-${version}";
version = "4.2.2.6";
version = "6.0.1.5";
src = fetchurl {
url = "http://download.cdn.viber.com/cdn/desktop/Linux/viber.deb";
sha256 = "1fv269z9sni21lc1ka25jnxr9w8zfg1gfn2c7fnd8cdd5fm57d26";
sha256 = "026vp2pv66b2dlwi5w5wk4yjnnmnsqapdww98p7xdnz8n0hnsbbi";
};
buildInputs = [ dpkg makeWrapper ];
@ -22,36 +22,74 @@ stdenv.mkDerivation rec {
unpackPhase = "true";
libPath = stdenv.lib.makeLibraryPath [
qt5Full
xorg.libX11
gstreamer
zlib
sqlite
xorg.libXrender
libxslt
alsaLib
cups
curl
dbus
expat
fontconfig
freetype
glib
gst_all_1.gst-plugins-base
gst_all_1.gstreamer
harfbuzz
libcap
libpulseaudio
mesa
nspr
nss
stdenv.cc.cc
xorg.libXScrnSaver
libudev
wayland
zlib
xorg.libICE
xorg.libSM
xorg.libX11
xorg.libxcb
xorg.libXcomposite
xorg.libXcursor
xorg.libXdamage
xorg.libXext
];
xorg.libXfixes
xorg.libXi
xorg.libXrandr
xorg.libXrender
xorg.libXScrnSaver
xorg.libXtst
xorg.xcbutilimage
xorg.xcbutilkeysyms
xorg.xcbutilrenderutil
xorg.xcbutilwm
]
;
installPhase = ''
dpkg-deb -x $src $out
mkdir -p $out/bin
mv $out/opt/viber/{Sound,icons,libqfacebook.so} $out
mv $out/opt/viber/Viber $out/viber
rm -rf $out/opt
ln -s $out/viber $out/bin/viber
mkdir -p usr/lib/mozilla/plugins
patchelf \
--set-rpath $libPath \
$out/libqfacebook.so
patchelf \
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath $libPath:$out \
$out/viber
# Soothe nix-build "suspicions"
chmod -R g-w $out
wrapProgram $out/viber --prefix LD_LIBRARY_PATH : $libPath:$out
for file in $(find $out -type f \( -perm /0111 -o -name \*.so\* \) ); do
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$file" || true
patchelf --set-rpath $libPath:$out/opt/viber/lib $file || true
done
# qt.conf is not working, so override everything using environment variables
wrapProgram $out/opt/viber/Viber \
--set QT_PLUGIN_PATH "$out/opt/viber/plugins" \
--set QT_XKB_CONFIG_ROOT "${xorg.xkeyboardconfig}/share/X11/xkb" \
--set QTCOMPOSE "${xorg.libX11}/share/X11/locale"
ln -s $out/opt/viber/Viber $out/bin/viber
mv $out/usr/share $out/share
rm -rf $out/usr
# Fix the desktop link
substituteInPlace $out/share/applications/viber.desktop \
--replace /opt/viber/Viber $out/opt/viber/Viber \
--replace /usr/share/ $out/share/
'';
dontStrip = true;
@ -63,7 +101,6 @@ stdenv.mkDerivation rec {
license = stdenv.lib.licenses.unfree;
platforms = stdenv.lib.platforms.linux;
maintainers = with stdenv.lib.maintainers; [ jagajaga ];
broken = true;
};
}

View File

@ -1,43 +1,51 @@
{ stdenv, fetchurl, ncurses, which, perl, autoreconfHook
, sslSupport ? true
, imapSupport ? true
, headerCache ? true
, saslSupport ? true
, gpgmeSupport ? true
, gdbm ? null
, openssl ? null
, cyrus_sasl ? null
, gpgme ? null
, withSidebar ? false
, aclocal ? null
, headerCache ? true
, sslSupport ? true
, saslSupport ? true
, gpgmeSupport ? true
, imapSupport ? true
, withSidebar ? false
, withTrash ? false
}:
assert headerCache -> gdbm != null;
assert sslSupport -> openssl != null;
assert saslSupport -> cyrus_sasl != null;
assert gpgmeSupport -> gpgme != null;
assert headerCache -> gdbm != null;
assert sslSupport -> openssl != null;
assert saslSupport -> cyrus_sasl != null;
assert gpgmeSupport -> gpgme != null;
with stdenv.lib;
let
version = "1.6.0";
in
stdenv.mkDerivation rec {
name = "mutt${stdenv.lib.optionalString withSidebar "-with-sidebar"}-${version}";
name = "mutt-${version}";
version = "1.6.2";
src = fetchurl {
url = "http://ftp.mutt.org/pub/mutt/mutt-${version}.tar.gz";
sha256 = "06bc2drbgalkk68rzg7hq2v5m5qgjxff5357wg0419dpi8ivdbr9";
url = "http://ftp.mutt.org/pub/mutt/${name}.tar.gz";
sha256 = "13hxmji7v9m2agmvzrs7gzx8s3c9jiwrv7pbkr7z1kc6ckq2xl65";
};
buildInputs = with stdenv.lib;
buildInputs =
[ ncurses which perl ]
++ optional headerCache gdbm
++ optional sslSupport openssl
++ optional saslSupport cyrus_sasl
++ optional gpgmeSupport gpgme;
nativeBuildInputs = stdenv.lib.optional withSidebar autoreconfHook;
++ optional headerCache gdbm
++ optional sslSupport openssl
++ optional saslSupport cyrus_sasl
++ optional gpgmeSupport gpgme
++ optional withSidebar autoreconfHook;
configureFlags = [
"--with-mailpath=" "--enable-smtp"
(enableFeature headerCache "hcache")
(enableFeature gpgmeSupport "gpgme")
(enableFeature imapSupport "imap")
(enableFeature withSidebar "sidebar")
"--enable-smtp"
"--enable-pop"
"--enable-imap"
"--with-mailpath="
# Look in $PATH at runtime, instead of hardcoding /usr/bin/sendmail
"ac_cv_path_SENDMAIL=sendmail"
@ -45,36 +53,22 @@ stdenv.mkDerivation rec {
# This allows calls with "-d N", that output debug info into ~/.muttdebug*
"--enable-debug"
"--enable-pop" "--enable-imap"
# The next allows building mutt without having anything setgid
# set by the installer, and removing the need for the group 'mail'
# I set the value 'mailbox' because it is a default in the configure script
"--with-homespool=mailbox"
(if headerCache then "--enable-hcache" else "--disable-hcache")
(if sslSupport then "--with-ssl" else "--without-ssl")
(if imapSupport then "--enable-imap" else "--disable-imap")
(if saslSupport then "--with-sasl" else "--without-sasl")
(if gpgmeSupport then "--enable-gpgme" else "--disable-gpgme")
];
] ++ optional sslSupport "--with-ssl"
++ optional saslSupport "--with-sasl";
# Adding the sidebar
patches = stdenv.lib.optional withSidebar [
./trash-folder.patch
./sidebar.patch
./sidebar-dotpathsep.patch
./sidebar-utf8.patch
./sidebar-newonly.patch
./sidebar-delimnullwide.patch
./sidebar-compose.patch
./sidebar-new.patch
];
patches =
optional withTrash ./trash.patch ++
optional withSidebar ./sidebar.patch;
meta = with stdenv.lib; {
meta = {
description = "A small but very powerful text-based mail client";
homepage = http://www.mutt.org;
license = stdenv.lib.licenses.gpl2Plus;
license = licenses.gpl2Plus;
platforms = platforms.unix;
maintainers = with maintainers; [ the-kenny ];
maintainers = with maintainers; [ the-kenny rnhmjoj ];
};
}

View File

@ -1,40 +0,0 @@
From: Evgeni Golov <evgeni@debian.org>
Date: Fri, 14 Mar 2014 08:54:47 +0100
Subject: sidebar-compose
draw_sidebar sets SidebarWidth to 0 when sidebar_visible is false.
However, if you start mutt in compose mode, draw_sidebar won't be
called until the next redraw and your header lines will be off by
the width of the sidebar, even when you did not want a sidebar at
all.
Can be tested with:
HOME=/ LC_ALL=C mutt -e 'unset sidebar_visible' -s test recipient
Closes: #502627
Gbp-Pq: Topic mutt-patched
---
compose.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/compose.c b/compose.c
index b63695f..0fa6df2 100644
--- a/compose.c
+++ b/compose.c
@@ -32,6 +32,7 @@
#include "mailbox.h"
#include "sort.h"
#include "charset.h"
+#include "sidebar.h"
#ifdef MIXMASTER
#include "remailer.h"
@@ -248,6 +249,7 @@ static void draw_envelope_addr (int line, ADDRESS *addr)
static void draw_envelope (HEADER *msg, char *fcc)
{
+ draw_sidebar (MENU_COMPOSE);
draw_envelope_addr (HDR_FROM, msg->env->from);
draw_envelope_addr (HDR_TO, msg->env->to);
draw_envelope_addr (HDR_CC, msg->env->cc);

View File

@ -1,38 +0,0 @@
From: Evgeni Golov <sargentd@die-welt.net>
Date: Wed, 5 Mar 2014 17:46:07 +0100
Subject: sidebar-delimnullwide
SidebarDelim can be NULL and strlen(NULL) is a bad idea, as it will segfault.
Wrap it with NONULL().
While at it, change strlen to mbstowcs for better utf8 support.
Closes: #696145, #663883
Gbp-Pq: Topic mutt-patched
---
sidebar.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sidebar.c b/sidebar.c
index 51a25ca..c3ea338 100644
--- a/sidebar.c
+++ b/sidebar.c
@@ -88,7 +88,7 @@ char *make_sidebar_entry(char *box, int size, int new, int flagged)
int box_len, box_bytes;
int int_len;
int right_offset = 0;
- int delim_len = strlen(SidebarDelim);
+ int delim_len = mbstowcs(NULL, NONULL(SidebarDelim), 0);
static char *entry;
right_width = left_width = 0;
@@ -178,7 +178,7 @@ int draw_sidebar(int menu) {
#ifndef USE_SLANG_CURSES
attr_t attrs;
#endif
- short delim_len = strlen(SidebarDelim);
+ short delim_len = mbstowcs(NULL, NONULL(SidebarDelim), 0);
short color_pair;
static bool initialized = false;

View File

@ -1,98 +0,0 @@
From: Fabian Groffen <grobian@gentoo.org>
Date: Tue, 4 Mar 2014 21:12:15 +0100
Subject: sidebar-dotpathsep
Make path separators for sidebar folders configurable.
When using IMAP, a '.' is often used as path separator, hence make the
path separators configurable through sidebar_delim_chars variable.
It defaults to "/." to work for both mboxes as well as IMAP folders. It
can be set to only "/" or "." or whichever character desired as needed.
Gbp-Pq: Topic mutt-patched
---
globals.h | 1 +
init.h | 8 ++++++++
sidebar.c | 31 ++++++++++++++++++++++++-------
3 files changed, 33 insertions(+), 7 deletions(-)
diff --git a/globals.h b/globals.h
index 004c795..602f932 100644
--- a/globals.h
+++ b/globals.h
@@ -119,6 +119,7 @@ WHERE char *SendCharset;
WHERE char *Sendmail;
WHERE char *Shell;
WHERE char *SidebarDelim;
+WHERE char *SidebarDelimChars INITVAL (NULL);
WHERE char *Signature;
WHERE char *SimpleSearch;
#if USE_SMTP
diff --git a/init.h b/init.h
index c664e5f..166671b 100644
--- a/init.h
+++ b/init.h
@@ -2051,6 +2051,14 @@ struct option_t MuttVars[] = {
** .pp
** The width of the sidebar.
*/
+ { "sidebar_delim_chars", DT_STR, R_NONE, UL &SidebarDelimChars, UL "/." },
+ /*
+ ** .pp
+ ** This contains the list of characters which you would like to treat
+ ** as folder separators for displaying paths in the sidebar. If
+ ** you're not using IMAP folders, you probably prefer setting this to "/"
+ ** alone.
+ */
{ "pgp_use_gpg_agent", DT_BOOL, R_NONE, OPTUSEGPGAGENT, 0},
/*
** .pp
diff --git a/sidebar.c b/sidebar.c
index 6098c2a..4356ffc 100644
--- a/sidebar.c
+++ b/sidebar.c
@@ -249,20 +249,37 @@ int draw_sidebar(int menu) {
// calculate depth of current folder and generate its display name with indented spaces
int sidebar_folder_depth = 0;
char *sidebar_folder_name;
- sidebar_folder_name = basename(tmp->path);
+ int i;
+ sidebar_folder_name = tmp->path;
+ /* disregard a trailing separator, so strlen() - 2
+ * https://bugs.gentoo.org/show_bug.cgi?id=373197#c16 */
+ for (i = strlen(sidebar_folder_name) - 2; i >= 0; i--) {
+ if (SidebarDelimChars &&
+ strchr(SidebarDelimChars, sidebar_folder_name[i]))
+ {
+ sidebar_folder_name += i + 1;
+ break;
+ }
+ }
if ( maildir_is_prefix ) {
char *tmp_folder_name;
- int i;
+ int lastsep = 0;
tmp_folder_name = tmp->path + strlen(Maildir);
- for (i = 0; i < strlen(tmp->path) - strlen(Maildir); i++) {
- if (tmp_folder_name[i] == '/') sidebar_folder_depth++;
- }
+ for (i = 0; i < strlen(tmp_folder_name) - 1; i++) {
+ if (SidebarDelimChars &&
+ strchr(SidebarDelimChars, tmp_folder_name[i]))
+ {
+ sidebar_folder_depth++;
+ lastsep = i + 1;
+ }
+ }
if (sidebar_folder_depth > 0) {
- sidebar_folder_name = malloc(strlen(basename(tmp->path)) + sidebar_folder_depth + 1);
+ tmp_folder_name += lastsep; /* basename */
+ sidebar_folder_name = malloc(strlen(tmp_folder_name) + sidebar_folder_depth + 1);
for (i=0; i < sidebar_folder_depth; i++)
sidebar_folder_name[i]=' ';
sidebar_folder_name[i]=0;
- strncat(sidebar_folder_name, basename(tmp->path), strlen(basename(tmp->path)) + sidebar_folder_depth);
+ strncat(sidebar_folder_name, tmp_folder_name, strlen(tmp_folder_name) + sidebar_folder_depth);
}
}
printw( "%.*s", SidebarWidth - delim_len + 1,

View File

@ -1,97 +0,0 @@
From 355399bde98203af59d20821f9e840fc056bd383 Mon Sep 17 00:00:00 2001
From: Julius Haertl <jus@bitgrid.net>
Date: Tue, 9 Sep 2014 22:31:49 +0200
Subject: Patch for sidebar iteration functionality
sidebar-new will move the selected folder to the next with new messages.
If the end is reached, it will start at the top.
Useful macros would be:
macro index <esc>a "<sidebar-new><sidebar-open>"
macro pager <esc>a "<exit><sidebar-new><sidebar-open>"
---
OPS | 1 +
curs_main.c | 1 +
functions.h | 2 ++
pager.c | 1 +
sidebar.c | 10 ++++++++++
5 files changed, 15 insertions(+)
diff --git a/OPS b/OPS
index 1ed9c96..3ffb82a 100644
--- a/OPS
+++ b/OPS
@@ -187,3 +187,4 @@ OP_SIDEBAR_PREV "go to previous mailbox"
OP_SIDEBAR_OPEN "open hilighted mailbox"
OP_SIDEBAR_NEXT_NEW "go down to next mailbox with new mail"
OP_SIDEBAR_PREV_NEW "go to previous mailbox with new mail"
+OP_SIDEBAR_NEW "iterate though mailboxes with new mail"
diff --git a/curs_main.c b/curs_main.c
index acb106d..2e35f90 100644
--- a/curs_main.c
+++ b/curs_main.c
@@ -2328,6 +2328,7 @@ int mutt_index_menu (void)
case OP_SIDEBAR_PREV:
case OP_SIDEBAR_NEXT_NEW:
case OP_SIDEBAR_PREV_NEW:
+ case OP_SIDEBAR_NEW:
scroll_sidebar(op, menu->menu);
break;
default:
diff --git a/functions.h b/functions.h
index 363b4d5..1485080 100644
--- a/functions.h
+++ b/functions.h
@@ -176,6 +176,7 @@ const struct binding_t OpMain[] = { /* map: index */
{ "sidebar-prev", OP_SIDEBAR_PREV, NULL },
{ "sidebar-next-new", OP_SIDEBAR_NEXT_NEW, NULL},
{ "sidebar-prev-new", OP_SIDEBAR_PREV_NEW, NULL},
+ { "sidebar-new", OP_SIDEBAR_NEW, NULL },
{ "sidebar-open", OP_SIDEBAR_OPEN, NULL },
{ NULL, 0, NULL }
};
@@ -287,6 +288,7 @@ const struct binding_t OpPager[] = { /* map: pager */
{ "sidebar-prev", OP_SIDEBAR_PREV, NULL },
{ "sidebar-next-new", OP_SIDEBAR_NEXT_NEW, NULL},
{ "sidebar-prev-new", OP_SIDEBAR_PREV_NEW, NULL},
+ { "sidebar-new", OP_SIDEBAR_NEW, NULL },
{ "sidebar-open", OP_SIDEBAR_OPEN, NULL },
{ NULL, 0, NULL }
};
diff --git a/pager.c b/pager.c
index 8d64fe1..696e55c 100644
--- a/pager.c
+++ b/pager.c
@@ -2791,6 +2791,7 @@ search_next:
case OP_SIDEBAR_PREV:
case OP_SIDEBAR_NEXT_NEW:
case OP_SIDEBAR_PREV_NEW:
+ case OP_SIDEBAR_NEW:
scroll_sidebar(ch, MENU_PAGER);
break;
diff --git a/sidebar.c b/sidebar.c
index c3ea338..eb8ecd2 100644
--- a/sidebar.c
+++ b/sidebar.c
@@ -429,6 +429,16 @@ void scroll_sidebar(int op, int menu)
CurBuffy = CurBuffy->next;
}
break;
+ case OP_SIDEBAR_NEW:
+ if ( (tmp = exist_next_new()) == NULL)
+ tmp = TopBuffy;
+ if ( tmp->msg_unread == 0 ) {
+ CurBuffy = tmp;
+ tmp = exist_next_new();
+ }
+ if ( tmp != NULL )
+ CurBuffy = tmp;
+ break;
default:
return;
}
--
2.6.0.rc0.2.g7662973.dirty

View File

@ -1,198 +0,0 @@
From: Steve Kemp <steve@steve.org.uk>
Date: Tue, 4 Mar 2014 22:07:06 +0100
Subject: sidebar-newonly
patches written by Steve Kemp, it adds two new functionalities to the sidebar,
so only the mailbox with new messages will be shown (and/or) selected
See Debian bug http://bugs.debian.org/532510
Gbp-Pq: Topic mutt-patched
---
OPS | 2 ++
curs_main.c | 2 ++
functions.h | 4 ++++
init.h | 5 +++++
mutt.h | 2 ++
pager.c | 2 ++
sidebar.c | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++--
7 files changed, 70 insertions(+), 2 deletions(-)
diff --git a/OPS b/OPS
index b036db9..1ed9c96 100644
--- a/OPS
+++ b/OPS
@@ -185,3 +185,5 @@ OP_SIDEBAR_SCROLL_DOWN "scroll the mailbox pane down 1 page"
OP_SIDEBAR_NEXT "go down to next mailbox"
OP_SIDEBAR_PREV "go to previous mailbox"
OP_SIDEBAR_OPEN "open hilighted mailbox"
+OP_SIDEBAR_NEXT_NEW "go down to next mailbox with new mail"
+OP_SIDEBAR_PREV_NEW "go to previous mailbox with new mail"
diff --git a/curs_main.c b/curs_main.c
index ea530a6..acb106d 100644
--- a/curs_main.c
+++ b/curs_main.c
@@ -2326,6 +2326,8 @@ int mutt_index_menu (void)
case OP_SIDEBAR_SCROLL_DOWN:
case OP_SIDEBAR_NEXT:
case OP_SIDEBAR_PREV:
+ case OP_SIDEBAR_NEXT_NEW:
+ case OP_SIDEBAR_PREV_NEW:
scroll_sidebar(op, menu->menu);
break;
default:
diff --git a/functions.h b/functions.h
index ef8937a..363b4d5 100644
--- a/functions.h
+++ b/functions.h
@@ -174,6 +174,8 @@ const struct binding_t OpMain[] = { /* map: index */
{ "sidebar-scroll-down", OP_SIDEBAR_SCROLL_DOWN, NULL },
{ "sidebar-next", OP_SIDEBAR_NEXT, NULL },
{ "sidebar-prev", OP_SIDEBAR_PREV, NULL },
+ { "sidebar-next-new", OP_SIDEBAR_NEXT_NEW, NULL},
+ { "sidebar-prev-new", OP_SIDEBAR_PREV_NEW, NULL},
{ "sidebar-open", OP_SIDEBAR_OPEN, NULL },
{ NULL, 0, NULL }
};
@@ -283,6 +285,8 @@ const struct binding_t OpPager[] = { /* map: pager */
{ "sidebar-scroll-down", OP_SIDEBAR_SCROLL_DOWN, NULL },
{ "sidebar-next", OP_SIDEBAR_NEXT, NULL },
{ "sidebar-prev", OP_SIDEBAR_PREV, NULL },
+ { "sidebar-next-new", OP_SIDEBAR_NEXT_NEW, NULL},
+ { "sidebar-prev-new", OP_SIDEBAR_PREV_NEW, NULL},
{ "sidebar-open", OP_SIDEBAR_OPEN, NULL },
{ NULL, 0, NULL }
};
diff --git a/init.h b/init.h
index 166671b..a5d4238 100644
--- a/init.h
+++ b/init.h
@@ -2059,6 +2059,11 @@ struct option_t MuttVars[] = {
** you're not using IMAP folders, you probably prefer setting this to "/"
** alone.
*/
+ {"sidebar_newmail_only", DT_BOOL, R_BOTH, OPTSIDEBARNEWMAILONLY, 0 },
+ /*
+ ** .pp
+ ** Show only new mail in the sidebar.
+ */
{ "pgp_use_gpg_agent", DT_BOOL, R_NONE, OPTUSEGPGAGENT, 0},
/*
** .pp
diff --git a/mutt.h b/mutt.h
index 5f25406..d73e514 100644
--- a/mutt.h
+++ b/mutt.h
@@ -529,6 +529,8 @@ enum
OPTDONTHANDLEPGPKEYS, /* (pseudo) used to extract PGP keys */
OPTUNBUFFEREDINPUT, /* (pseudo) don't use key buffer */
+ OPTSIDEBARNEWMAILONLY,
+
OPTMAX
};
diff --git a/pager.c b/pager.c
index 5cfcb75..8d64fe1 100644
--- a/pager.c
+++ b/pager.c
@@ -2789,6 +2789,8 @@ search_next:
case OP_SIDEBAR_SCROLL_DOWN:
case OP_SIDEBAR_NEXT:
case OP_SIDEBAR_PREV:
+ case OP_SIDEBAR_NEXT_NEW:
+ case OP_SIDEBAR_PREV_NEW:
scroll_sidebar(ch, MENU_PAGER);
break;
diff --git a/sidebar.c b/sidebar.c
index 8f58f85..51a25ca 100644
--- a/sidebar.c
+++ b/sidebar.c
@@ -269,8 +269,21 @@ int draw_sidebar(int menu) {
SETCOLOR(MT_COLOR_NEW);
else if ( tmp->msg_flagged > 0 )
SETCOLOR(MT_COLOR_FLAGGED);
- else
- SETCOLOR(MT_COLOR_NORMAL);
+ else {
+ /* make sure the path is either:
+ 1. Containing new mail.
+ 2. The inbox.
+ 3. The current box.
+ */
+ if ((option (OPTSIDEBARNEWMAILONLY)) &&
+ ( (tmp->msg_unread <= 0) &&
+ ( tmp != Incoming ) &&
+ Context &&
+ ( strcmp( tmp->path, Context->path ) != 0 ) ) )
+ continue;
+ else
+ SETCOLOR(MT_COLOR_NORMAL);
+ }
move( lines, 0 );
if ( Context && !strcmp( tmp->path, Context->path ) ) {
@@ -336,6 +349,29 @@ int draw_sidebar(int menu) {
return 0;
}
+BUFFY * exist_next_new()
+{
+ BUFFY *tmp = CurBuffy;
+ if(tmp == NULL) return NULL;
+ while (tmp->next != NULL)
+ {
+ tmp = tmp->next;
+ if(tmp->msg_unread) return tmp;
+ }
+ return NULL;
+}
+
+BUFFY * exist_prev_new()
+{
+ BUFFY *tmp = CurBuffy;
+ if(tmp == NULL) return NULL;
+ while (tmp->prev != NULL)
+ {
+ tmp = tmp->prev;
+ if(tmp->msg_unread) return tmp;
+ }
+ return NULL;
+}
void set_buffystats(CONTEXT* Context)
{
@@ -352,18 +388,33 @@ void set_buffystats(CONTEXT* Context)
void scroll_sidebar(int op, int menu)
{
+ BUFFY *tmp;
if(!SidebarWidth) return;
if(!CurBuffy) return;
switch (op) {
case OP_SIDEBAR_NEXT:
+ if (!option (OPTSIDEBARNEWMAILONLY)) {
if ( CurBuffy->next == NULL ) return;
CurBuffy = CurBuffy->next;
break;
+ }
+ case OP_SIDEBAR_NEXT_NEW:
+ if ( (tmp = exist_next_new()) == NULL)
+ return;
+ else CurBuffy = tmp;
+ break;
case OP_SIDEBAR_PREV:
+ if (!option (OPTSIDEBARNEWMAILONLY)) {
if ( CurBuffy->prev == NULL ) return;
CurBuffy = CurBuffy->prev;
break;
+ }
+ case OP_SIDEBAR_PREV_NEW:
+ if ( (tmp = exist_prev_new()) == NULL)
+ return;
+ else CurBuffy = tmp;
+ break;
case OP_SIDEBAR_SCROLL_UP:
CurBuffy = TopBuffy;
if ( CurBuffy != Incoming ) {

View File

@ -1,132 +0,0 @@
From: Antonio Radici <antonio@debian.org>
Date: Tue, 4 Mar 2014 15:39:14 +0100
Subject: sidebar-utf8
This patch fixes a problem with utf-8 strings and the sidebar,
it rewrites entirely make_sidebar_entry so it also fixes some
segfaults due to misallocations and overflows.
See:
http://bugs.debian.org/584581
http://bugs.debian.org/603287
Gbp-Pq: Topic mutt-patched
---
sidebar.c | 97 +++++++++++++++++++++++++++++++++++++++++++--------------------
1 file changed, 67 insertions(+), 30 deletions(-)
diff --git a/sidebar.c b/sidebar.c
index 4356ffc..8f58f85 100644
--- a/sidebar.c
+++ b/sidebar.c
@@ -30,6 +30,7 @@
#include <libgen.h>
#include "keymap.h"
#include <stdbool.h>
+#include <wchar.h>
/*BUFFY *CurBuffy = 0;*/
static BUFFY *TopBuffy = 0;
@@ -82,36 +83,72 @@ void calc_boundaries (int menu)
char *make_sidebar_entry(char *box, int size, int new, int flagged)
{
- static char *entry = 0;
- char *c;
- int i = 0;
- int delim_len = strlen(SidebarDelim);
-
- c = realloc(entry, SidebarWidth - delim_len + 2);
- if ( c ) entry = c;
- entry[SidebarWidth - delim_len + 1] = 0;
- for (; i < SidebarWidth - delim_len + 1; entry[i++] = ' ' );
- i = strlen(box);
- strncpy( entry, box, i < (SidebarWidth - delim_len + 1) ? i : (SidebarWidth - delim_len + 1) );
-
- if (size == -1)
- sprintf(entry + SidebarWidth - delim_len - 3, "?");
- else if ( new ) {
- if (flagged > 0) {
- sprintf(
- entry + SidebarWidth - delim_len - 5 - quick_log10(size) - quick_log10(new) - quick_log10(flagged),
- "% d(%d)[%d]", size, new, flagged);
- } else {
- sprintf(
- entry + SidebarWidth - delim_len - 3 - quick_log10(size) - quick_log10(new),
- "% d(%d)", size, new);
- }
- } else if (flagged > 0) {
- sprintf( entry + SidebarWidth - delim_len - 3 - quick_log10(size) - quick_log10(flagged), "% d[%d]", size, flagged);
- } else {
- sprintf( entry + SidebarWidth - delim_len - 1 - quick_log10(size), "% d", size);
- }
- return entry;
+ char int_store[20]; // up to 64 bits integers
+ int right_width, left_width;
+ int box_len, box_bytes;
+ int int_len;
+ int right_offset = 0;
+ int delim_len = strlen(SidebarDelim);
+ static char *entry;
+
+ right_width = left_width = 0;
+ box_len = box_bytes = 0;
+
+ // allocate an entry big enough to contain SidebarWidth wide chars
+ entry = malloc((SidebarWidth*4)+1); // TODO: error check
+
+ // determine the right space (i.e.: how big are the numbers that we want to print)
+ if ( size > 0 ) {
+ int_len = snprintf(int_store, sizeof(int_store), "%d", size);
+ right_width += int_len;
+ } else {
+ right_width = 1; // to represent 0
+ }
+ if ( new > 0 ) {
+ int_len = snprintf(int_store, sizeof(int_store), "%d", new);
+ right_width += int_len + 2; // 2 is for ()
+ }
+ if ( flagged > 0 ) {
+ int_len = snprintf(int_store, sizeof(int_store), "%d", flagged);
+ right_width += int_len + 2; // 2 is for []
+ }
+
+ // determine how much space we have for *box and its padding (if any)
+ left_width = SidebarWidth - right_width - 1 - delim_len; // 1 is for the space
+ //fprintf(stdout, "left_width: %d right_width: %d\n", left_width, right_width);
+ // right side overflow case
+ if ( left_width <= 0 ) {
+ snprintf(entry, SidebarWidth*4, "%-*.*s ...", SidebarWidth-4-delim_len, SidebarWidth-4-delim_len, box);
+ return entry;
+ }
+ right_width -= delim_len;
+
+ // to support utf-8 chars we need to add enough space padding in case there
+ // are less chars than bytes in *box
+ box_len = mbstowcs(NULL, box, 0);
+ box_bytes = strlen(box);
+ // debug
+ //fprintf(stdout, "box_len: %d box_bytes: %d (diff: %d)\n", box_len, box_bytes, (box_bytes-box_len));
+ // if there is less string than the space we allow, then we will add the
+ // spaces
+ if ( box_len != -1 && box_len < left_width ) {
+ left_width += (box_bytes - box_len);
+ }
+ // otherwise sprintf will truncate the string for us (therefore, no else case)
+
+ // print the sidebar entry (without new and flagged messages, at the moment)
+ //fprintf(stdout, "left_width: %d right_width: %d\n", left_width, right_width);
+ right_offset = snprintf(entry, SidebarWidth*4, "%-*.*s %d", left_width, left_width, box, size);
+
+ // then pad new and flagged messages if any
+ if ( new > 0 ) {
+ right_offset += snprintf(entry+right_offset, SidebarWidth*4-right_offset, "(%d)", new);
+ }
+ if ( flagged > 0 ) {
+ right_offset += snprintf(entry+right_offset, SidebarWidth*4-right_offset, "[%d]", flagged);
+ }
+
+ return entry;
}
void set_curbuffy(char buf[LONG_STRING])

File diff suppressed because it is too large Load Diff

View File

@ -1,316 +0,0 @@
From: Cedric Duval <cedricduval@free.fr>
Date: Thu, 27 Feb 2014 12:27:41 +0100
Subject: trash-folder
With this patch, if the trash variable is set to a path (unset by default), the
deleted mails will be moved to a trash folder instead of being irremediably
purged when syncing the mailbox.
For instance, set trash="~/Mail/trash" will cause every deleted mail to go to
this folder.
Note that the append to the trash folder doesn't occur until the resync is
done. This allows you to change your mind and undo deletes, and thus the moves
to the trash folder are unnecessary.
Notes
* You might also want to have a look at the purge message feature below
which is related to this patch.
* IMAP is now supported. To retain the previous behavior, add this to your
muttrc:
folder-hook ^imap:// 'unset trash'
FAQ
Every once in a while, someone asks what are the advantages of this patch over
a macro based solution. Here's an attempt to answer this question:
* The folder history doesn't clutter up with unwanted trash entries.
* Delayed move to the trash allows to change one's mind.
* No need to treat the case of "normal folders" and trash folders
separately with folder-hooks, and to create two sets of macros (one for
the index, one for the pager).
* Works not only with delete-message, but also with every deletion
functions like delete-pattern, delete-thread or delete-subthread.
To sum up, it's more integrated and transparent to the user.
* Patch last synced with upstream:
- Date: 2007-02-15
- File: http://cedricduval.free.fr/mutt/patches/download/patch-1.5.5.1.cd.trash_folder.3.4
* Changes made:
- Updated to 1.5.13:
- structure of _mutt_save_message changed (commands.c)
- context of option (OPTCONFIRMAPPEND) changed (muttlib.c)
- Fixed indentation of "appended" in mutt.h.
Signed-off-by: Matteo F. Vescovi <mfvescovi@gmail.com>
Gbp-Pq: Topic features
---
commands.c | 1 +
flags.c | 19 +++++++++++++++++-
globals.h | 1 +
imap/message.c | 2 ++
init.h | 10 ++++++++++
mutt.h | 3 +++
muttlib.c | 4 +++-
mx.c | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
postpone.c | 3 +++
9 files changed, 103 insertions(+), 2 deletions(-)
diff --git a/commands.c b/commands.c
index 5dbd100..7fd014b 100644
--- a/commands.c
+++ b/commands.c
@@ -720,6 +720,7 @@ int _mutt_save_message (HEADER *h, CONTEXT *ctx, int delete, int decode, int dec
if (option (OPTDELETEUNTAG))
mutt_set_flag (Context, h, M_TAG, 0);
}
+ mutt_set_flag (Context, h, M_APPENDED, 1);
return 0;
}
diff --git a/flags.c b/flags.c
index f0f3d81..dfa6a50 100644
--- a/flags.c
+++ b/flags.c
@@ -65,7 +65,13 @@ void _mutt_set_flag (CONTEXT *ctx, HEADER *h, int flag, int bf, int upd_ctx)
{
h->deleted = 0;
update = 1;
- if (upd_ctx) ctx->deleted--;
+ if (upd_ctx)
+ {
+ ctx->deleted--;
+ if (h->appended)
+ ctx->appended--;
+ }
+ h->appended = 0; /* when undeleting, also reset the appended flag */
#ifdef USE_IMAP
/* see my comment above */
if (ctx->magic == M_IMAP)
@@ -87,6 +93,17 @@ void _mutt_set_flag (CONTEXT *ctx, HEADER *h, int flag, int bf, int upd_ctx)
}
break;
+ case M_APPENDED:
+ if (bf)
+ {
+ if (!h->appended)
+ {
+ h->appended = 1;
+ if (upd_ctx) ctx->appended++;
+ }
+ }
+ break;
+
case M_NEW:
if (!mutt_bit_isset(ctx->rights,M_ACL_SEEN))
diff --git a/globals.h b/globals.h
index e77030c..6a1b8da 100644
--- a/globals.h
+++ b/globals.h
@@ -144,6 +144,7 @@ WHERE char *Tochars;
WHERE char *TSStatusFormat;
WHERE char *TSIconFormat;
WHERE short TSSupported;
+WHERE char *TrashPath;
WHERE char *Username;
WHERE char *Visual;
diff --git a/imap/message.c b/imap/message.c
index 3877381..039fda6 100644
--- a/imap/message.c
+++ b/imap/message.c
@@ -884,6 +884,7 @@ int imap_copy_messages (CONTEXT* ctx, HEADER* h, char* dest, int delete)
if (ctx->hdrs[n]->tagged)
{
mutt_set_flag (ctx, ctx->hdrs[n], M_DELETE, 1);
+ mutt_set_flag (ctx, ctx->hdrs[n], M_APPENDED, 1);
if (option (OPTDELETEUNTAG))
mutt_set_flag (ctx, ctx->hdrs[n], M_TAG, 0);
}
@@ -891,6 +892,7 @@ int imap_copy_messages (CONTEXT* ctx, HEADER* h, char* dest, int delete)
else
{
mutt_set_flag (ctx, h, M_DELETE, 1);
+ mutt_set_flag (ctx, h, M_APPENDED, 1);
if (option (OPTDELETEUNTAG))
mutt_set_flag (ctx, h, M_TAG, 0);
}
diff --git a/init.h b/init.h
index 6b49341..d3206f9 100644
--- a/init.h
+++ b/init.h
@@ -3341,6 +3341,16 @@ struct option_t MuttVars[] = {
** provided that ``$$ts_enabled'' has been set. This string is identical in
** formatting to the one used by ``$$status_format''.
*/
+ { "trash", DT_PATH, R_NONE, UL &TrashPath, 0 },
+ /*
+ ** .pp
+ ** If set, this variable specifies the path of the trash folder where the
+ ** mails marked for deletion will be moved, instead of being irremediably
+ ** purged.
+ ** .pp
+ ** NOTE: When you delete a message in the trash folder, it is really
+ ** deleted, so that you have a way to clean the trash.
+ */
#ifdef USE_SOCKET
{ "tunnel", DT_STR, R_NONE, UL &Tunnel, UL 0 },
/*
diff --git a/mutt.h b/mutt.h
index f8565fa..29bb6c2 100644
--- a/mutt.h
+++ b/mutt.h
@@ -185,6 +185,7 @@ enum
M_DELETE,
M_UNDELETE,
M_DELETED,
+ M_APPENDED,
M_FLAG,
M_TAG,
M_UNTAG,
@@ -713,6 +714,7 @@ typedef struct header
unsigned int mime : 1; /* has a MIME-Version header? */
unsigned int flagged : 1; /* marked important? */
unsigned int tagged : 1;
+ unsigned int appended : 1; /* has been saved */
unsigned int deleted : 1;
unsigned int changed : 1;
unsigned int attach_del : 1; /* has an attachment marked for deletion */
@@ -885,6 +887,7 @@ typedef struct _context
int new; /* how many new messages? */
int unread; /* how many unread messages? */
int deleted; /* how many deleted messages */
+ int appended; /* how many saved messages? */
int flagged; /* how many flagged messages */
int msgnotreadyet; /* which msg "new" in pager, -1 if none */
diff --git a/muttlib.c b/muttlib.c
index 02067cc..0fd9766 100644
--- a/muttlib.c
+++ b/muttlib.c
@@ -1505,7 +1505,9 @@ int mutt_save_confirm (const char *s, struct stat *st)
if (magic > 0 && !mx_access (s, W_OK))
{
- if (option (OPTCONFIRMAPPEND))
+ if (option (OPTCONFIRMAPPEND) &&
+ (!TrashPath || (mutt_strcmp (s, TrashPath) != 0)))
+ /* if we're appending to the trash, there's no point in asking */
{
snprintf (tmp, sizeof (tmp), _("Append messages to %s?"), s);
if ((rc = mutt_yesorno (tmp, M_YES)) == M_NO)
diff --git a/mx.c b/mx.c
index 4c5cb07..c0a6d30 100644
--- a/mx.c
+++ b/mx.c
@@ -776,6 +776,53 @@ static int sync_mailbox (CONTEXT *ctx, int *index_hint)
return rc;
}
+/* move deleted mails to the trash folder */
+static int trash_append (CONTEXT *ctx)
+{
+ CONTEXT *ctx_trash;
+ int i = 0;
+ struct stat st, stc;
+
+ if (!TrashPath || !ctx->deleted ||
+ (ctx->magic == M_MAILDIR && option (OPTMAILDIRTRASH)))
+ return 0;
+
+ for (;i < ctx->msgcount && (!ctx->hdrs[i]->deleted ||
+ ctx->hdrs[i]->appended); i++);
+ if (i == ctx->msgcount)
+ return 0; /* nothing to be done */
+
+ if (mutt_save_confirm (TrashPath, &st) != 0)
+ {
+ mutt_error _("message(s) not deleted");
+ return -1;
+ }
+
+ if (lstat (ctx->path, &stc) == 0 && stc.st_ino == st.st_ino
+ && stc.st_dev == st.st_dev && stc.st_rdev == st.st_rdev)
+ return 0; /* we are in the trash folder: simple sync */
+
+ if ((ctx_trash = mx_open_mailbox (TrashPath, M_APPEND, NULL)) != NULL)
+ {
+ for (i = 0 ; i < ctx->msgcount ; i++)
+ if (ctx->hdrs[i]->deleted && !ctx->hdrs[i]->appended
+ && mutt_append_message (ctx_trash, ctx, ctx->hdrs[i], 0, 0) == -1)
+ {
+ mx_close_mailbox (ctx_trash, NULL);
+ return -1;
+ }
+
+ mx_close_mailbox (ctx_trash, NULL);
+ }
+ else
+ {
+ mutt_error _("Can't open trash folder");
+ return -1;
+ }
+
+ return 0;
+}
+
/* save changes and close mailbox */
int mx_close_mailbox (CONTEXT *ctx, int *index_hint)
{
@@ -912,6 +959,7 @@ int mx_close_mailbox (CONTEXT *ctx, int *index_hint)
if (mutt_append_message (&f, ctx, ctx->hdrs[i], 0, CH_UPDATE_LEN) == 0)
{
mutt_set_flag (ctx, ctx->hdrs[i], M_DELETE, 1);
+ mutt_set_flag (ctx, ctx->hdrs[i], M_APPENDED, 1);
}
else
{
@@ -936,6 +984,14 @@ int mx_close_mailbox (CONTEXT *ctx, int *index_hint)
return 0;
}
+ /* copy mails to the trash before expunging */
+ if (purge && ctx->deleted && mutt_strcmp(ctx->path, TrashPath))
+ if (trash_append (ctx) != 0)
+ {
+ ctx->closing = 0;
+ return -1;
+ }
+
#ifdef USE_IMAP
/* allow IMAP to preserve the deleted flag across sessions */
if (ctx->magic == M_IMAP)
@@ -1133,6 +1189,12 @@ int mx_sync_mailbox (CONTEXT *ctx, int *index_hint)
msgcount = ctx->msgcount;
deleted = ctx->deleted;
+ if (purge && ctx->deleted && mutt_strcmp(ctx->path, TrashPath))
+ {
+ if (trash_append (ctx) == -1)
+ return -1;
+ }
+
#ifdef USE_IMAP
if (ctx->magic == M_IMAP)
rc = imap_sync_mailbox (ctx, purge, index_hint);
diff --git a/postpone.c b/postpone.c
index a703161..7a4cbb1 100644
--- a/postpone.c
+++ b/postpone.c
@@ -277,6 +277,9 @@ int mutt_get_postponed (CONTEXT *ctx, HEADER *hdr, HEADER **cur, char *fcc, size
/* finished with this message, so delete it. */
mutt_set_flag (PostContext, h, M_DELETE, 1);
+ /* and consider it saved, so that it won't be moved to the trash folder */
+ mutt_set_flag (PostContext, h, M_APPENDED, 1);
+
/* update the count for the status display */
PostCount = PostContext->msgcount - PostContext->deleted;

View File

@ -0,0 +1,797 @@
diff -urN mutt-1.6.1/commands.c mutt-1.6.1-trash/commands.c
--- mutt-1.6.1/commands.c 2016-06-12 18:43:00.397447512 +0100
+++ mutt-1.6.1-trash/commands.c 2016-06-12 18:43:04.892517610 +0100
@@ -720,6 +720,7 @@
if (option (OPTDELETEUNTAG))
mutt_set_flag (Context, h, M_TAG, 0);
}
+ mutt_set_flag (Context, h, M_APPENDED, 1);
return 0;
}
diff -urN mutt-1.6.1/curs_main.c mutt-1.6.1-trash/curs_main.c
--- mutt-1.6.1/curs_main.c 2016-06-12 18:43:00.399447544 +0100
+++ mutt-1.6.1-trash/curs_main.c 2016-06-12 18:43:04.895517656 +0100
@@ -1919,6 +1919,7 @@
MAYBE_REDRAW (menu->redraw);
break;
+ case OP_PURGE_MESSAGE:
case OP_DELETE:
CHECK_MSGCOUNT;
@@ -1930,6 +1931,7 @@
if (tag)
{
mutt_tag_set_flag (M_DELETE, 1);
+ mutt_tag_set_flag (M_PURGED, (op != OP_PURGE_MESSAGE) ? 0 : 1);
if (option (OPTDELETEUNTAG))
mutt_tag_set_flag (M_TAG, 0);
menu->redraw = REDRAW_INDEX;
@@ -1937,6 +1939,8 @@
else
{
mutt_set_flag (Context, CURHDR, M_DELETE, 1);
+ mutt_set_flag (Context, CURHDR, M_PURGED,
+ (op != OP_PURGE_MESSAGE) ? 0 : 1);
if (option (OPTDELETEUNTAG))
mutt_set_flag (Context, CURHDR, M_TAG, 0);
if (option (OPTRESOLVE))
@@ -2242,11 +2246,13 @@
if (tag)
{
mutt_tag_set_flag (M_DELETE, 0);
+ mutt_tag_set_flag (M_PURGED, 0);
menu->redraw = REDRAW_INDEX;
}
else
{
mutt_set_flag (Context, CURHDR, M_DELETE, 0);
+ mutt_set_flag (Context, CURHDR, M_PURGED, 0);
if (option (OPTRESOLVE) && menu->current < Context->vcount - 1)
{
menu->current++;
@@ -2268,9 +2274,11 @@
CHECK_ACL(M_ACL_DELETE, _("Cannot undelete message(s)"));
rc = mutt_thread_set_flag (CURHDR, M_DELETE, 0,
- op == OP_UNDELETE_THREAD ? 0 : 1);
+ op == OP_UNDELETE_THREAD ? 0 : 1)
+ + mutt_thread_set_flag (CURHDR, M_PURGED, 0,
+ (op == OP_UNDELETE_THREAD) ? 0 : 1);
- if (rc != -1)
+ if (rc > -1)
{
if (option (OPTRESOLVE))
{
diff -urN mutt-1.6.1/doc/manual.xml.head mutt-1.6.1-trash/doc/manual.xml.head
--- mutt-1.6.1/doc/manual.xml.head 2016-06-12 18:43:00.402447590 +0100
+++ mutt-1.6.1-trash/doc/manual.xml.head 2016-06-12 18:43:04.901517750 +0100
@@ -7467,6 +7467,16 @@
</sect2>
+<sect2 id="mutt-patches">
+<title>Mutt Patches</title>
+<para>
+Mutt may also be <quote>patched</quote> to support smaller features.
+These patches should add a free-form string to the end Mutt's version string.
+Running <literal>mutt -v</literal> might show:
+<screen>patch-1.6.1.sidebar.20160502</screen>
+</para>
+</sect2>
+
<sect2 id="url-syntax">
<title>URL Syntax</title>
@@ -8081,6 +8091,175 @@
</sect1>
+<sect1 id="trash-folder">
+ <title>Trash Folder Patch</title>
+ <subtitle>Automatically move "deleted" emails to a trash bin</subtitle>
+
+ <sect2 id="trash-folder-patch">
+ <title>Patch</title>
+
+ <para>
+ To check if Mutt supports <quote>Trash Folder</quote>, look for
+ <quote>patch-trash</quote> in the mutt version.
+ See: <xref linkend="mutt-patches"/>.
+ </para>
+
+ If IMAP is enabled, this patch will use it
+
+ <itemizedlist>
+ <title>Dependencies:</title>
+ <listitem><para>mutt-1.6.1</para></listitem>
+ <listitem><para>IMAP support</para></listitem>
+ </itemizedlist>
+
+ <para>This patch is part of the <ulink url="http://www.neomutt.org/">NeoMutt Project</ulink>.</para>
+ </sect2>
+
+ <sect2 id="trash-folder-intro">
+ <title>Introduction</title>
+
+ <para>
+ In Mutt, when you <quote>delete</quote> an email it is first marked
+ deleted. The email isn't really gone until
+ <link linkend="index-map">&lt;sync-mailbox&gt;</link> is called.
+ This happens when the user leaves the folder, or the function is called
+ manually.
+ </para>
+
+ <para>
+ After <literal>&lt;sync-mailbox&gt;</literal> has been called the email is gone forever.
+ </para>
+
+ <para>
+ The <link linkend="trash">$trash</link> variable defines a folder in
+ which to keep old emails. As before, first you mark emails for
+ deletion. When &lt;sync-mailbox&gt; is called the emails are moved to
+ the trash folder.
+ </para>
+
+ <para>
+ The <literal>$trash</literal> path can be either a full directory,
+ or be relative to the <link linkend="folder">$folder</link>
+ variable, like the <literal>mailboxes</literal> command.
+ </para>
+
+ <note>
+ Emails deleted from the trash folder are gone forever.
+ </note>
+ </sect2>
+
+ <sect2 id="trash-folder-variables">
+ <title>Variables</title>
+ <table id="table-trash-variables">
+ <title>Trash Variables</title>
+ <tgroup cols="3">
+ <thead>
+ <row>
+ <entry>Name</entry>
+ <entry>Type</entry>
+ <entry>Default</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>trash</entry>
+ <entry>string</entry>
+ <entry>(none)</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </sect2>
+
+ <sect2 id="trash-folder-functions">
+ <title>Functions</title>
+ <table id="table-trash-functions">
+ <title>Trash Functions</title>
+ <tgroup cols="4">
+ <thead>
+ <row>
+ <entry>Menus</entry>
+ <entry>Default Key</entry>
+ <entry>Function</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>index,pager</entry>
+ <entry>(none)</entry>
+ <entry><literal>&lt;purge-message&gt;</literal></entry>
+ <entry>really delete the current entry, bypassing the trash folder</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </sect2>
+
+<!--
+ <sect2 id="trash-folder-commands">
+ <title>Commands</title>
+ <para>None</para>
+ </sect2>
+
+ <sect2 id="trash-folder-colors">
+ <title>Colors</title>
+ <para>None</para>
+ </sect2>
+
+ <sect2 id="trash-folder-sort">
+ <title>Sort</title>
+ <para>None</para>
+ </sect2>
+-->
+
+ <sect2 id="trash-folder-muttrc">
+ <title>Muttrc</title>
+<screen>
+<emphasis role="comment"># Example Mutt config file for the 'trash' feature.
+
+# This feature defines a new 'trash' folder.
+# When mail is deleted it will be moved to this folder.
+
+# Folder in which to put deleted emails</emphasis>
+set trash='+Trash'
+set trash='/home/flatcap/Mail/Trash'
+
+<emphasis role="comment"># The default delete key 'd' will move an email to the 'trash' folder
+# Bind 'D' to REALLY delete an email</emphasis>
+bind index D purge-message
+
+<emphasis role="comment"># Note: Deleting emails from the 'trash' folder will REALLY delete them.
+
+# vim: syntax=muttrc</emphasis>
+</screen>
+ </sect2>
+
+ <sect2 id="trash-folder-see-also">
+ <title>See Also</title>
+
+ <itemizedlist>
+ <listitem><para><ulink url="http://www.neomutt.org/">NeoMutt Project</ulink></para></listitem>
+ <listitem><para><link linkend="folder-hook">folder-hook</link></para></listitem>
+ </itemizedlist>
+ </sect2>
+
+ <sect2 id="trash-folder-known-bugs">
+ <title>Known Bugs</title>
+ <para>None</para>
+ </sect2>
+
+ <sect2 id="trash-folder-credits">
+ <title>Credits</title>
+ <itemizedlist>
+ <listitem><para>Cedric Duval <email>cedricduval@free.fr</email></para></listitem>
+ <listitem><para>Benjamin Kuperman <email>kuperman@acm.org</email></para></listitem>
+ <listitem><para>Paul Miller <email>paul@voltar.org</email></para></listitem>
+ <listitem><para>Richard Russon <email>rich@flatcap.org</email></para></listitem>
+ </itemizedlist>
+ </sect2>
+</sect1>
+
</chapter>
<chapter id="security">
diff -urN mutt-1.6.1/doc/muttrc.trash mutt-1.6.1-trash/doc/muttrc.trash
--- mutt-1.6.1/doc/muttrc.trash 1970-01-01 01:00:00.000000000 +0100
+++ mutt-1.6.1-trash/doc/muttrc.trash 2016-06-12 18:43:04.768515676 +0100
@@ -0,0 +1,16 @@
+# Example Mutt config file for the 'trash' feature.
+
+# This feature defines a new 'trash' folder.
+# When mail is deleted it will be moved to this folder.
+
+# Folder in which to put deleted emails
+set trash='+Trash'
+set trash='/home/flatcap/Mail/Trash'
+
+# The default delete key 'd' will move an email to the 'trash' folder
+# Bind 'D' to REALLY delete an email
+bind index D purge-message
+
+# Note: Deleting emails from the 'trash' folder will REALLY delete them.
+
+# vim: syntax=muttrc
diff -urN mutt-1.6.1/doc/vimrc.trash mutt-1.6.1-trash/doc/vimrc.trash
--- mutt-1.6.1/doc/vimrc.trash 1970-01-01 01:00:00.000000000 +0100
+++ mutt-1.6.1-trash/doc/vimrc.trash 2016-06-12 18:43:04.769515692 +0100
@@ -0,0 +1,7 @@
+" Vim syntax file for the mutt trash patch
+
+syntax keyword muttrcVarStr contained skipwhite trash nextgroup=muttrcVarEqualsIdxFmt
+
+syntax match muttrcFunction contained "\<purge-message\>"
+
+" vim: syntax=vim
diff -urN mutt-1.6.1/flags.c mutt-1.6.1-trash/flags.c
--- mutt-1.6.1/flags.c 2016-06-12 18:43:00.403447606 +0100
+++ mutt-1.6.1-trash/flags.c 2016-06-12 18:43:04.902517766 +0100
@@ -65,7 +65,13 @@
{
h->deleted = 0;
update = 1;
- if (upd_ctx) ctx->deleted--;
+ if (upd_ctx) {
+ ctx->deleted--;
+ if (h->appended) {
+ ctx->appended--;
+ }
+ }
+ h->appended = 0; /* when undeleting, also reset the appended flag */
#ifdef USE_IMAP
/* see my comment above */
if (ctx->magic == M_IMAP)
@@ -87,6 +93,27 @@
}
break;
+ case M_APPENDED:
+ if (bf) {
+ if (!h->appended) {
+ h->appended = 1;
+ if (upd_ctx) {
+ ctx->appended++;
+ }
+ }
+ }
+ break;
+
+ case M_PURGED:
+ if (bf) {
+ if (!h->purged) {
+ h->purged = 1;
+ }
+ } else if (h->purged) {
+ h->purged = 0;
+ }
+ break;
+
case M_NEW:
if (!mutt_bit_isset(ctx->rights,M_ACL_SEEN))
diff -urN mutt-1.6.1/functions.h mutt-1.6.1-trash/functions.h
--- mutt-1.6.1/functions.h 2016-06-12 18:43:00.403447606 +0100
+++ mutt-1.6.1-trash/functions.h 2016-06-12 18:43:04.902517766 +0100
@@ -121,6 +121,7 @@
{ "toggle-write", OP_TOGGLE_WRITE, "%" },
{ "next-thread", OP_MAIN_NEXT_THREAD, "\016" },
{ "next-subthread", OP_MAIN_NEXT_SUBTHREAD, "\033n" },
+ { "purge-message", OP_PURGE_MESSAGE, NULL },
{ "query", OP_QUERY, "Q" },
{ "quit", OP_QUIT, "q" },
{ "reply", OP_REPLY, "r" },
@@ -213,6 +214,7 @@
{ "print-message", OP_PRINT, "p" },
{ "previous-thread", OP_MAIN_PREV_THREAD, "\020" },
{ "previous-subthread",OP_MAIN_PREV_SUBTHREAD, "\033p" },
+ { "purge-message", OP_PURGE_MESSAGE, NULL },
{ "quit", OP_QUIT, "Q" },
{ "exit", OP_EXIT, "q" },
{ "reply", OP_REPLY, "r" },
diff -urN mutt-1.6.1/globals.h mutt-1.6.1-trash/globals.h
--- mutt-1.6.1/globals.h 2016-06-12 18:43:00.403447606 +0100
+++ mutt-1.6.1-trash/globals.h 2016-06-12 18:43:04.903517781 +0100
@@ -141,6 +141,7 @@
WHERE char *Status;
WHERE char *Tempdir;
WHERE char *Tochars;
+WHERE char *TrashPath;
WHERE char *TSStatusFormat;
WHERE char *TSIconFormat;
WHERE short TSSupported;
diff -urN mutt-1.6.1/imap/imap.c mutt-1.6.1-trash/imap/imap.c
--- mutt-1.6.1/imap/imap.c 2016-06-12 18:43:00.405447637 +0100
+++ mutt-1.6.1-trash/imap/imap.c 2016-06-12 18:43:04.905517812 +0100
@@ -888,6 +888,12 @@
if (hdrs[n]->deleted != HEADER_DATA(hdrs[n])->deleted)
match = invert ^ hdrs[n]->deleted;
break;
+ case M_EXPIRED: /* imap_fast_trash version of M_DELETED */
+ if (hdrs[n]->purged)
+ break;
+ if (hdrs[n]->deleted != HEADER_DATA(hdrs[n])->deleted)
+ match = invert ^ (hdrs[n]->deleted && !hdrs[n]->appended);
+ break;
case M_FLAG:
if (hdrs[n]->flagged != HEADER_DATA(hdrs[n])->flagged)
match = invert ^ hdrs[n]->flagged;
@@ -2038,3 +2044,53 @@
return -1;
}
+
+/**
+ * imap_fast_trash - XXX
+ */
+int
+imap_fast_trash (void)
+{
+ if ((Context->magic == M_IMAP) && mx_is_imap (TrashPath)) {
+ IMAP_MBOX mx;
+ IMAP_DATA *idata = (IMAP_DATA *) Context->data;
+ char mbox[LONG_STRING];
+ char mmbox[LONG_STRING];
+ int rc;
+ dprint (1, (debugfile, "[itf] trashcan seems to be on imap.\n"));
+
+ if (imap_parse_path (TrashPath, &mx) == 0) {
+ if (mutt_account_match (&(idata->conn->account), &(mx.account))) {
+ dprint (1, (debugfile, "[itf] trashcan seems to be on the same account.\n"));
+
+ imap_fix_path (idata, mx.mbox, mbox, sizeof (mbox));
+ if (!*mbox)
+ strfcpy (mbox, "INBOX", sizeof (mbox));
+ imap_munge_mbox_name (idata, mmbox, sizeof (mmbox), mbox);
+
+ rc = imap_exec_msgset (idata, "UID COPY", mmbox, M_EXPIRED, 0, 0);
+ if (rc == 0) {
+ dprint (1, (debugfile, "imap_copy_messages: No messages del-tagged\n"));
+ rc = -1;
+ goto old_way;
+ } else if (rc < 0) {
+ dprint (1, (debugfile, "could not queue copy\n"));
+ goto old_way;
+ } else {
+ mutt_message (_("Copying %d messages to %s..."), rc, mbox);
+ return 0;
+ }
+ } else {
+ dprint (1, (debugfile, "[itf] trashcan seems to be on a different account.\n"));
+ }
+old_way:
+ FREE(&mx.mbox); /* we probably only need to free this when the parse works */
+ } else {
+ dprint (1, (debugfile, "[itf] failed to parse TrashPath.\n"));
+ }
+
+ dprint (1, (debugfile, "[itf] giving up and trying old fasioned way.\n"));
+ }
+
+ return 1;
+}
diff -urN mutt-1.6.1/imap/imap.h mutt-1.6.1-trash/imap/imap.h
--- mutt-1.6.1/imap/imap.h 2016-06-12 18:43:00.405447637 +0100
+++ mutt-1.6.1-trash/imap/imap.h 2016-06-12 18:43:04.774515769 +0100
@@ -72,4 +72,7 @@
int imap_account_match (const ACCOUNT* a1, const ACCOUNT* a2);
+/* trash */
+int imap_fast_trash (void);
+
#endif
diff -urN mutt-1.6.1/imap/message.c mutt-1.6.1-trash/imap/message.c
--- mutt-1.6.1/imap/message.c 2016-06-12 18:43:00.406447652 +0100
+++ mutt-1.6.1-trash/imap/message.c 2016-06-12 18:43:04.906517828 +0100
@@ -886,6 +886,7 @@
if (ctx->hdrs[n]->tagged)
{
mutt_set_flag (ctx, ctx->hdrs[n], M_DELETE, 1);
+ mutt_set_flag (ctx, ctx->hdrs[n], M_APPENDED, 1);
if (option (OPTDELETEUNTAG))
mutt_set_flag (ctx, ctx->hdrs[n], M_TAG, 0);
}
@@ -893,6 +894,7 @@
else
{
mutt_set_flag (ctx, h, M_DELETE, 1);
+ mutt_set_flag (ctx, h, M_APPENDED, 1);
if (option (OPTDELETEUNTAG))
mutt_set_flag (ctx, h, M_TAG, 0);
}
diff -urN mutt-1.6.1/init.h mutt-1.6.1-trash/init.h
--- mutt-1.6.1/init.h 2016-06-12 18:43:00.408447684 +0100
+++ mutt-1.6.1-trash/init.h 2016-06-12 18:43:04.909517875 +0100
@@ -3419,6 +3419,16 @@
** provided that ``$$ts_enabled'' has been set. This string is identical in
** formatting to the one used by ``$$status_format''.
*/
+ { "trash", DT_PATH, R_NONE, UL &TrashPath, 0 },
+ /*
+ ** .pp
+ ** If set, this variable specifies the path of the trash folder where the
+ ** mails marked for deletion will be moved, instead of being irremediably
+ ** purged.
+ ** .pp
+ ** NOTE: When you delete a message in the trash folder, it is really
+ ** deleted, so that you have a way to clean the trash.
+ */
#ifdef USE_SOCKET
{ "tunnel", DT_STR, R_NONE, UL &Tunnel, UL 0 },
/*
diff -urN mutt-1.6.1/mutt.h mutt-1.6.1-trash/mutt.h
--- mutt-1.6.1/mutt.h 2016-06-12 18:43:00.410447715 +0100
+++ mutt-1.6.1-trash/mutt.h 2016-06-12 18:43:04.912517922 +0100
@@ -182,6 +182,8 @@
M_DELETE,
M_UNDELETE,
M_DELETED,
+ M_APPENDED,
+ M_PURGED,
M_FLAG,
M_TAG,
M_UNTAG,
@@ -719,6 +721,8 @@
unsigned int mime : 1; /* has a MIME-Version header? */
unsigned int flagged : 1; /* marked important? */
unsigned int tagged : 1;
+ unsigned int appended : 1; /* has been saved */
+ unsigned int purged : 1; /* bypassing the trash folder */
unsigned int deleted : 1;
unsigned int changed : 1;
unsigned int attach_del : 1; /* has an attachment marked for deletion */
@@ -891,6 +895,7 @@
int new; /* how many new messages? */
int unread; /* how many unread messages? */
int deleted; /* how many deleted messages */
+ int appended; /* how many saved messages? */
int flagged; /* how many flagged messages */
int msgnotreadyet; /* which msg "new" in pager, -1 if none */
diff -urN mutt-1.6.1/muttlib.c mutt-1.6.1-trash/muttlib.c
--- mutt-1.6.1/muttlib.c 2016-06-12 18:43:00.411447731 +0100
+++ mutt-1.6.1-trash/muttlib.c 2016-06-12 18:43:04.913517937 +0100
@@ -1511,7 +1511,9 @@
if (magic > 0 && !mx_access (s, W_OK))
{
- if (option (OPTCONFIRMAPPEND))
+ if (option (OPTCONFIRMAPPEND) &&
+ (!TrashPath || (mutt_strcmp (s, TrashPath) != 0)))
+ /* if we're appending to the trash, there's no point in asking */
{
snprintf (tmp, sizeof (tmp), _("Append messages to %s?"), s);
if ((rc = mutt_yesorno (tmp, M_YES)) == M_NO)
diff -urN mutt-1.6.1/mx.c mutt-1.6.1-trash/mx.c
--- mutt-1.6.1/mx.c 2016-06-12 18:43:00.411447731 +0100
+++ mutt-1.6.1-trash/mx.c 2016-06-12 18:43:04.914517953 +0100
@@ -776,6 +776,62 @@
return rc;
}
+/**
+ * trash_append - XXX
+ *
+ * move deleted mails to the trash folder
+ */
+static int trash_append (CONTEXT *ctx)
+{
+ CONTEXT *ctx_trash;
+ int i = 0;
+ struct stat st, stc;
+
+ if (!TrashPath || !ctx->deleted ||
+ ((ctx->magic == M_MAILDIR) && option (OPTMAILDIRTRASH))) {
+ return 0;
+ }
+
+ for (; i < ctx->msgcount && (!ctx->hdrs[i]->deleted || ctx->hdrs[i]->appended); i++);
+ /* nothing */
+
+ if (i == ctx->msgcount)
+ return 0; /* nothing to be done */
+
+ if (mutt_save_confirm (TrashPath, &st) != 0) {
+ mutt_error _("message(s) not deleted");
+ return -1;
+ }
+
+ if (lstat (ctx->path, &stc) == 0 && stc.st_ino == st.st_ino
+ && stc.st_dev == st.st_dev && stc.st_rdev == st.st_rdev) {
+ return 0; /* we are in the trash folder: simple sync */
+ }
+
+#ifdef USE_IMAP
+ if (!imap_fast_trash())
+ return 0;
+#endif
+
+ if ((ctx_trash = mx_open_mailbox (TrashPath, M_APPEND, NULL)) != NULL) {
+ for (i = 0 ; i < ctx->msgcount ; i++) {
+ if (ctx->hdrs[i]->deleted && !ctx->hdrs[i]->appended
+ && !ctx->hdrs[i]->purged
+ && mutt_append_message (ctx_trash, ctx, ctx->hdrs[i], 0, 0) == -1) {
+ mx_close_mailbox (ctx_trash, NULL);
+ return -1;
+ }
+ }
+
+ mx_close_mailbox (ctx_trash, NULL);
+ } else {
+ mutt_error _("Can't open trash folder");
+ return -1;
+ }
+
+ return 0;
+}
+
/* save changes and close mailbox */
int mx_close_mailbox (CONTEXT *ctx, int *index_hint)
{
@@ -912,6 +968,7 @@
if (mutt_append_message (&f, ctx, ctx->hdrs[i], 0, CH_UPDATE_LEN) == 0)
{
mutt_set_flag (ctx, ctx->hdrs[i], M_DELETE, 1);
+ mutt_set_flag (ctx, ctx->hdrs[i], M_APPENDED, 1);
}
else
{
@@ -936,6 +993,14 @@
return 0;
}
+ /* copy mails to the trash before expunging */
+ if (purge && ctx->deleted && mutt_strcmp (ctx->path, TrashPath)) {
+ if (trash_append (ctx) != 0) {
+ ctx->closing = 0;
+ return -1;
+ }
+ }
+
#ifdef USE_IMAP
/* allow IMAP to preserve the deleted flag across sessions */
if (ctx->magic == M_IMAP)
@@ -1140,6 +1205,12 @@
msgcount = ctx->msgcount;
deleted = ctx->deleted;
+ if (purge && ctx->deleted && mutt_strcmp (ctx->path, TrashPath)) {
+ if (trash_append (ctx) == -1) {
+ return -1;
+ }
+ }
+
#ifdef USE_IMAP
if (ctx->magic == M_IMAP)
rc = imap_sync_mailbox (ctx, purge, index_hint);
diff -urN mutt-1.6.1/OPS mutt-1.6.1-trash/OPS
--- mutt-1.6.1/OPS 2016-06-12 18:43:00.389447388 +0100
+++ mutt-1.6.1-trash/OPS 2016-06-12 18:43:04.883517469 +0100
@@ -142,6 +142,7 @@
OP_PREV_LINE "scroll up one line"
OP_PREV_PAGE "move to the previous page"
OP_PRINT "print the current entry"
+OP_PURGE_MESSAGE "really delete the current entry, bypassing the trash folder"
OP_QUERY "query external program for addresses"
OP_QUERY_APPEND "append new query results to current results"
OP_QUIT "save changes to mailbox and quit"
diff -urN mutt-1.6.1/pager.c mutt-1.6.1-trash/pager.c
--- mutt-1.6.1/pager.c 2016-06-12 18:43:00.412447746 +0100
+++ mutt-1.6.1-trash/pager.c 2016-06-12 18:43:04.915517968 +0100
@@ -2351,6 +2351,7 @@
MAYBE_REDRAW (redraw);
break;
+ case OP_PURGE_MESSAGE:
case OP_DELETE:
CHECK_MODE(IsHeader (extra));
CHECK_READONLY;
@@ -2358,6 +2359,8 @@
CHECK_ACL(M_ACL_DELETE, _("Cannot delete message"));
mutt_set_flag (Context, extra->hdr, M_DELETE, 1);
+ mutt_set_flag (Context, extra->hdr, M_PURGED,
+ ch != OP_PURGE_MESSAGE ? 0 : 1);
if (option (OPTDELETEUNTAG))
mutt_set_flag (Context, extra->hdr, M_TAG, 0);
redraw = REDRAW_STATUS | REDRAW_INDEX;
@@ -2688,6 +2691,7 @@
CHECK_ACL(M_ACL_DELETE, _("Cannot undelete message"));
mutt_set_flag (Context, extra->hdr, M_DELETE, 0);
+ mutt_set_flag (Context, extra->hdr, M_PURGED, 0);
redraw = REDRAW_STATUS | REDRAW_INDEX;
if (option (OPTRESOLVE))
{
@@ -2704,9 +2708,11 @@
CHECK_ACL(M_ACL_DELETE, _("Cannot undelete message(s)"));
r = mutt_thread_set_flag (extra->hdr, M_DELETE, 0,
+ ch == OP_UNDELETE_THREAD ? 0 : 1)
+ + mutt_thread_set_flag (extra->hdr, M_PURGED, 0,
ch == OP_UNDELETE_THREAD ? 0 : 1);
- if (r != -1)
+ if (r > -1)
{
if (option (OPTRESOLVE))
{
diff -urN mutt-1.6.1/PATCHES mutt-1.6.1-trash/PATCHES
--- mutt-1.6.1/PATCHES 2016-06-12 18:43:00.395447481 +0100
+++ mutt-1.6.1-trash/PATCHES 2016-06-12 18:43:04.889517563 +0100
@@ -0,0 +1 @@
+patch-trash-neo-20160612
diff -urN mutt-1.6.1/pattern.c mutt-1.6.1-trash/pattern.c
--- mutt-1.6.1/pattern.c 2016-06-12 18:43:00.413447762 +0100
+++ mutt-1.6.1-trash/pattern.c 2016-06-12 18:43:04.916517984 +0100
@@ -1367,8 +1367,9 @@
{
switch (op)
{
- case M_DELETE:
case M_UNDELETE:
+ mutt_set_flag (Context, Context->hdrs[Context->v2r[i]], M_PURGED, 0);
+ case M_DELETE:
mutt_set_flag (Context, Context->hdrs[Context->v2r[i]], M_DELETE,
(op == M_DELETE));
break;
diff -urN mutt-1.6.1/postpone.c mutt-1.6.1-trash/postpone.c
--- mutt-1.6.1/postpone.c 2016-06-12 18:43:00.414447777 +0100
+++ mutt-1.6.1-trash/postpone.c 2016-06-12 18:43:04.917518000 +0100
@@ -277,6 +277,9 @@
/* finished with this message, so delete it. */
mutt_set_flag (PostContext, h, M_DELETE, 1);
+ /* and consider it saved, so that it won't be moved to the trash folder */
+ mutt_set_flag (PostContext, h, M_APPENDED, 1);
+
/* update the count for the status display */
PostCount = PostContext->msgcount - PostContext->deleted;
diff -urN mutt-1.6.1/README.trash mutt-1.6.1-trash/README.trash
--- mutt-1.6.1/README.trash 1970-01-01 01:00:00.000000000 +0100
+++ mutt-1.6.1-trash/README.trash 2016-06-12 18:43:04.748515364 +0100
@@ -0,0 +1,74 @@
+Trash Folder Patch
+==================
+
+ Automatically move "deleted" emails to a trash bin
+
+Patch
+-----
+
+ To check if Mutt supports "Trash Folder", look for "patch-trash" in the
+ mutt version.
+
+ If IMAP is enabled, this patch will use it
+
+ Dependencies
+ * mutt-1.6.1
+ * IMAP support
+
+Introduction
+------------
+
+ In Mutt, when you "delete" an email it is first marked deleted. The email
+ isn't really gone until <sync-mailbox> is called. This happens when the
+ user leaves the folder, or the function is called manually.
+
+ After '<sync-mailbox>' has been called the email is gone forever.
+
+ The $trash variable defines a folder in which to keep old emails. As
+ before, first you mark emails for deletion. When <sync-mailbox> is called
+ the emails are moved to the trash folder.
+
+ The '$trash' path can be either a full directory, or be relative to the
+ $folder variable, like the 'mailboxes' command.
+
+ > Note
+ >
+ > Emails deleted from the trash folder are gone forever.
+
+Variables
+---------
+
+ Trash Variables
+
+ | Name | Type | Default |
+ |-------|--------|---------|
+ | trash | string | (none) |
+
+Functions
+---------
+
+ Trash Functions
+
+ | Menus | Default Key | Function | Description |
+ |-------------|-------------|-------------------|-------------------------------------------------------------|
+ | index,pager | (none) | '<purge-message>' | really delete the current entry, bypassing the trash folder |
+
+See Also
+--------
+
+ * NeoMutt project
+ * folder-hook
+
+Known Bugs
+----------
+
+ None
+
+Credits
+-------
+
+ * Cedric Duval <cedricduval@free.fr>
+ * Benjamin Kuperman <kuperman@acm.org>
+ * Paul Miller <paul@voltar.org>
+ * Richard Russon <rich@flatcap.org>
+

View File

@ -124,6 +124,8 @@ in stdenv.mkDerivation rec {
sed -e /CppunitTest_sd_tiledrendering/d -i sd/Module_sd.mk
# one more fragile test?
sed -e '/CPPUNIT_TEST(testTdf96536);/d' -i sw/qa/extras/uiwriter/uiwriter.cxx
# rendering-dependent test
sed -e '/CPPUNIT_ASSERT_EQUAL(11148L, pOleObj->GetLogicRect().getWidth());/d ' -i sc/qa/unit/subsequent_filters-test.cxx
'';
makeFlags = "SHELL=${bash}/bin/bash";

View File

@ -124,6 +124,8 @@ in stdenv.mkDerivation rec {
sed -e /CppunitTest_sd_tiledrendering/d -i sd/Module_sd.mk
# one more fragile test?
sed -e '/CPPUNIT_TEST(testTdf96536);/d' -i sw/qa/extras/uiwriter/uiwriter.cxx
# rendering-dependent test
sed -e '/CPPUNIT_ASSERT_EQUAL(11148L, pOleObj->GetLogicRect().getWidth());/d ' -i sc/qa/unit/subsequent_filters-test.cxx
'';
makeFlags = "SHELL=${bash}/bin/bash";

View File

@ -2,14 +2,14 @@
stdenv.mkDerivation rec {
name = "TPTP-${version}";
version = "6.3.0";
version = "6.4.0";
src = fetchurl {
url = [
"http://www.cs.miami.edu/~tptp/TPTP/Distribution/TPTP-v${version}.tgz"
"http://www.cs.miami.edu/~tptp/TPTP/Archive/TPTP-v${version}/TPTP-v${version}.tgz"
];
sha256 = "0xy4cqniyx9fv8r9mc5q5b7xl163pkr9hcmpq6gkls2a0pvg07w9";
sha256 = "1i5hi8grfl5zyh8py63zn39rg019bd90h2l312iswbgai6nyfdw0";
};
buildInputs = [ tcsh yap perl patchelf ];

View File

@ -10,7 +10,7 @@
}:
let
version = "2.9.0";
version = "2.9.1";
svn = subversionClient.override { perlBindings = true; };
in
@ -19,7 +19,7 @@ stdenv.mkDerivation {
src = fetchurl {
url = "https://www.kernel.org/pub/software/scm/git/git-${version}.tar.xz";
sha256 = "02dl8yvvl7m4zy39s0xmqr958ah7krvkv94lmx4vz3wl95wsj7zl";
sha256 = "18l2jb4bkp9ljz6p2aviwzxqyzza9z3v6h1pnkz7kjf1fay61zp8";
};
patches = [

View File

@ -62,11 +62,11 @@ in
stdenv.mkDerivation rec {
name = "mpv-${version}";
version = "0.17.0";
version = "0.18.1";
src = fetchurl {
url = "https://github.com/mpv-player/mpv/archive/v${version}.tar.gz";
sha256 = "0vms3viwqcwl1mrgmf2yy4c69fvv7xpbkyrl693l6zpwynqd4b30";
sha256 = "0ab3lkvx1j06x7qlp9m4r4zk28dr7z8ki3w4kfgkpm2axizxa4z4";
};
patchPhase = ''

View File

@ -11,7 +11,7 @@ let
stage1Flavours = [ "coreos" "fly" ];
in stdenv.mkDerivation rec {
version = "1.9.1";
version = "1.10.1";
name = "rkt-${version}";
BUILDDIR="build-${name}";
@ -19,7 +19,7 @@ in stdenv.mkDerivation rec {
rev = "v${version}";
owner = "coreos";
repo = "rkt";
sha256 = "094pqxcn91g1s3f0ly3z2lb11s4q3dn99h8cr7lqalkd0gj9l4xg";
sha256 = "0hy6b0lyjsh0m1ca7hga31nybrbi9wpf8c59wbzvm1wlnqzsjkqi";
};
stage1BaseImage = fetchurl {
@ -50,7 +50,7 @@ in stdenv.mkDerivation rec {
installPhase = ''
mkdir -p $out/bin
cp -Rv $BUILDDIR/bin/* $out/bin
cp -Rv $BUILDDIR/target/bin/* $out/bin
wrapProgram $out/bin/rkt \
--prefix LD_LIBRARY_PATH : ${systemd}/lib \
--prefix PATH : ${iptables}/bin

View File

@ -49,15 +49,17 @@ rec {
# Create a forest of symlinks to the files in `paths'.
symlinkJoin =
args@{ name
args_@{ name
, paths
, preferLocalBuild ? true
, allowSubstitutes ? false
, postBuild ? ""
, ...
}:
runCommand name
(removeAttrs args [ "name" "postBuild" ])
let
args = removeAttrs args_ [ "name" "postBuild" ]
// { inherit preferLocalBuild allowSubstitutes; }; # pass the defaults
in runCommand name args
''
mkdir -p $out
for i in $paths; do

View File

@ -319,6 +319,7 @@ rec {
origArgs = args;
origBuilder = builder;
QEMU_OPTS = "${QEMU_OPTS} -m ${toString memSize}";
passAsFile = []; # HACK fix - see https://github.com/NixOS/nixpkgs/issues/16742
});

View File

@ -1,9 +1,11 @@
{ stdenv, intltool, fetchurl, python, pygobject3, atk
{ stdenv, intltool, fetchurl, atk
, pkgconfig, gtk3, glib, libsoup
, bash, makeWrapper, itstool, libxml2, python3Packages
, gnome3, librsvg, gdk_pixbuf, file, libnotify }:
, bash, makeWrapper, itstool, libxml2, python2Packages
, gnome3, librsvg, gdk_pixbuf, file, libnotify, gobjectIntrospection, wrapGAppsHook }:
stdenv.mkDerivation rec {
let
python = python2Packages.python.withPackages ( ps: with ps; [ pygobject3 ] );
in stdenv.mkDerivation rec {
inherit (import ./src.nix fetchurl) name src;
doCheck = true;
@ -15,17 +17,15 @@ stdenv.mkDerivation rec {
buildInputs = [ pkgconfig gtk3 glib intltool itstool libxml2
gnome3.gsettings_desktop_schemas makeWrapper file
gdk_pixbuf gnome3.defaultIconTheme librsvg
python pygobject3 libnotify gnome3.gnome_shell
libnotify gnome3.gnome_shell
libsoup gnome3.gnome_settings_daemon gnome3.nautilus
gnome3.gnome_desktop ];
gnome3.gnome_desktop wrapGAppsHook ];
preFixup = ''
wrapProgram "$out/bin/gnome-tweak-tool" \
--set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" \
--suffix XDG_DATA_DIRS : "${gtk3}/share:${gnome3.gnome_themes_standard}/share:$out/share:$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH" \
--prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH" \
--prefix PYTHONPATH : "$PYTHONPATH:$(toPythonPath $out)"
'';
propagatedBuildInputs = [ python gobjectIntrospection ];
PYTHONPATH = "$out/${python.python.sitePackages}";
wrapPrefixVariables = [ "PYTHONPATH" ];
patches = [
./find_gsettings.patch

File diff suppressed because it is too large Load Diff

View File

@ -2,14 +2,10 @@
# Updates
Before a major version update, make a copy of this directory. (We like to
keep the old version around for a short time after major updates.)
1. Update the URL in `maintainers/scripts/generate-kde-applications.sh`.
2. From the top of the Nixpkgs tree, run
`./maintainers/scripts/generate-kde-applications.sh > pkgs/desktops/kde-5/applications-$VERSION/srcs.nix`.
3. Check that the new packages build correctly.
4. Commit the changes and open a pull request.
1. Update the URL in `maintainers/scripts/generate-kde-applications.sh` and
run that script from the top of the Nixpkgs tree.
2. Check that the new packages build correctly.
3. Commit the changes and open a pull request.
*/
@ -31,7 +27,7 @@ let
kdelibs = callPackage ./kdelibs { inherit (pkgs) attica phonon; };
ark = callPackage ./ark.nix {};
ark = callPackage ./ark/default.nix {};
baloo-widgets = callPackage ./baloo-widgets.nix {};
dolphin = callPackage ./dolphin.nix {};
dolphin-plugins = callPackage ./dolphin-plugins.nix {};

File diff suppressed because it is too large Load Diff

View File

@ -1,581 +0,0 @@
# DO NOT EDIT! This file is generated automatically by fetchsrcs.sh
{ fetchurl, mirror }:
{
attica = {
version = "5.22.0";
src = fetchurl {
url = "${mirror}/stable/frameworks/5.22/attica-5.22.0.tar.xz";
sha256 = "1i26nwxyrb62icw49znlyz9y670cv7xvibzbdfnnxq9czsalwym7";
name = "attica-5.22.0.tar.xz";
};
};
baloo = {
version = "5.22.0";
src = fetchurl {
url = "${mirror}/stable/frameworks/5.22/baloo-5.22.0.tar.xz";
sha256 = "0h51j41pa8b18jkdna0247z5alqfbvgfzlxc6s6p0c7g7658z0w3";
name = "baloo-5.22.0.tar.xz";
};
};
bluez-qt = {
version = "5.22.0";
src = fetchurl {
url = "${mirror}/stable/frameworks/5.22/bluez-qt-5.22.0.tar.xz";
sha256 = "1lrkkg2f2qjj8cy968l3scdrvi506m5hr9x22d1zn6r12fvq6304";
name = "bluez-qt-5.22.0.tar.xz";
};
};
breeze-icons = {
version = "5.22.0";
src = fetchurl {
url = "${mirror}/stable/frameworks/5.22/breeze-icons-5.22.0.tar.xz";
sha256 = "162698h01cs7116la4jfygn8ka4ffjmnv7nxjl6yhcqrs25nky7l";
name = "breeze-icons-5.22.0.tar.xz";
};
};
extra-cmake-modules = {
version = "5.22.0";
src = fetchurl {
url = "${mirror}/stable/frameworks/5.22/extra-cmake-modules-5.22.0.tar.xz";
sha256 = "042ad7kp2ijp66gvz0q60glk95wj9f0fymrjyw68253rqynf3zj3";
name = "extra-cmake-modules-5.22.0.tar.xz";
};
};
frameworkintegration = {
version = "5.22.0";
src = fetchurl {
url = "${mirror}/stable/frameworks/5.22/frameworkintegration-5.22.0.tar.xz";
sha256 = "0jf9y738r86ss520hqhfll8prrfpha73myj99hbz3sqrix7b0va9";
name = "frameworkintegration-5.22.0.tar.xz";
};
};
kactivities = {
version = "5.22.0";
src = fetchurl {
url = "${mirror}/stable/frameworks/5.22/kactivities-5.22.0.tar.xz";
sha256 = "068jhc6lw47hcibvys968m4wa1b278ccy2gas9iymzzys1ccv6kr";
name = "kactivities-5.22.0.tar.xz";
};
};
kactivities-stats = {
version = "5.22.0";
src = fetchurl {
url = "${mirror}/stable/frameworks/5.22/kactivities-stats-5.22.0.tar.xz";
sha256 = "1gx5wm337nwbwqb56xvl16vhk47v7a5qpx5hhn7ygpfxkgxh6wiq";
name = "kactivities-stats-5.22.0.tar.xz";
};
};
kapidox = {
version = "5.22.0";
src = fetchurl {
url = "${mirror}/stable/frameworks/5.22/kapidox-5.22.0.tar.xz";
sha256 = "0cs133g1rvbcrdvy7zvk5c14p5iwwn0x0m76c2ifal0g8qh0hmd1";
name = "kapidox-5.22.0.tar.xz";
};
};
karchive = {
version = "5.22.0";
src = fetchurl {
url = "${mirror}/stable/frameworks/5.22/karchive-5.22.0.tar.xz";
sha256 = "1ywd38j6jpwj21kdp504gs0pfvlnvg6ak8hjk6a269pkci3dyf91";
name = "karchive-5.22.0.tar.xz";
};
};
kauth = {
version = "5.22.0";
src = fetchurl {
url = "${mirror}/stable/frameworks/5.22/kauth-5.22.0.tar.xz";
sha256 = "1c0kp25g57nldh1x5vfq9fypbznc991jrry2lydvb06d3jh44vbn";
name = "kauth-5.22.0.tar.xz";
};
};
kbookmarks = {
version = "5.22.0";
src = fetchurl {
url = "${mirror}/stable/frameworks/5.22/kbookmarks-5.22.0.tar.xz";
sha256 = "093rlg8pprjg7ba52dh2z9j2x5ir7s9kjas6ni4fqxxzpp15hh3p";
name = "kbookmarks-5.22.0.tar.xz";
};
};
kcmutils = {
version = "5.22.0";
src = fetchurl {
url = "${mirror}/stable/frameworks/5.22/kcmutils-5.22.0.tar.xz";
sha256 = "1s7gw9l2n92rrcdzy9pnwq8na65axd8bkk9nphyhpbxk76zj1gyy";
name = "kcmutils-5.22.0.tar.xz";
};
};
kcodecs = {
version = "5.22.0";
src = fetchurl {
url = "${mirror}/stable/frameworks/5.22/kcodecs-5.22.0.tar.xz";
sha256 = "0rlqs8m2ib2kkj679gn74zqqxzsddfcbywpgwlcd6b992i4cad87";
name = "kcodecs-5.22.0.tar.xz";
};
};
kcompletion = {
version = "5.22.0";
src = fetchurl {
url = "${mirror}/stable/frameworks/5.22/kcompletion-5.22.0.tar.xz";
sha256 = "07jqjrddigdqsdy2adzari7g626sakilg9d765s75vncv5amrvzy";
name = "kcompletion-5.22.0.tar.xz";
};
};
kconfig = {
version = "5.22.0";
src = fetchurl {
url = "${mirror}/stable/frameworks/5.22/kconfig-5.22.0.tar.xz";
sha256 = "0n0dzgba96pkabbvk1cfm34j9jirgbd84xha6adscpxs28506cg0";
name = "kconfig-5.22.0.tar.xz";
};
};
kconfigwidgets = {
version = "5.22.0";
src = fetchurl {
url = "${mirror}/stable/frameworks/5.22/kconfigwidgets-5.22.0.tar.xz";
sha256 = "0jr6ygd8c0gap2ay2685wj3fx4scrahzbpaaj4bjhq2s79nvmlyg";
name = "kconfigwidgets-5.22.0.tar.xz";
};
};
kcoreaddons = {
version = "5.22.0";
src = fetchurl {
url = "${mirror}/stable/frameworks/5.22/kcoreaddons-5.22.0.tar.xz";
sha256 = "0zzwcw0n9bd3pi3rv7cdwynb67x1bqf1bh3s59hjipf9d412wl15";
name = "kcoreaddons-5.22.0.tar.xz";
};
};
kcrash = {
version = "5.22.0";
src = fetchurl {
url = "${mirror}/stable/frameworks/5.22/kcrash-5.22.0.tar.xz";
sha256 = "1r0i9ngk5jypzfhhssjm5b3n5sqli3jhh896r1qwpfcq9w15x7qg";
name = "kcrash-5.22.0.tar.xz";
};
};
kdbusaddons = {
version = "5.22.0";
src = fetchurl {
url = "${mirror}/stable/frameworks/5.22/kdbusaddons-5.22.0.tar.xz";
sha256 = "0w9spb5i5qi2r5kfgrylpvw6mwjxfhd4j7yslc9jy0q4y8j3f1dk";
name = "kdbusaddons-5.22.0.tar.xz";
};
};
kdeclarative = {
version = "5.22.0";
src = fetchurl {
url = "${mirror}/stable/frameworks/5.22/kdeclarative-5.22.0.tar.xz";
sha256 = "06n6wqy8dm2hv6dbar453z4rmiyf6f34zak1fhs38sqkfy6syva1";
name = "kdeclarative-5.22.0.tar.xz";
};
};
kded = {
version = "5.22.0";
src = fetchurl {
url = "${mirror}/stable/frameworks/5.22/kded-5.22.0.tar.xz";
sha256 = "1zfggr6pmiypw5bnh6hr22agms589hm7hw35nhfhc4r7qd1drf6q";
name = "kded-5.22.0.tar.xz";
};
};
kdelibs4support = {
version = "5.22.0";
src = fetchurl {
url = "${mirror}/stable/frameworks/5.22/portingAids/kdelibs4support-5.22.0.tar.xz";
sha256 = "1mmrr54kkicnz4pjksnrh40md80m18mr5ba2la7kwjxmdyl6znm3";
name = "kdelibs4support-5.22.0.tar.xz";
};
};
kdesignerplugin = {
version = "5.22.0";
src = fetchurl {
url = "${mirror}/stable/frameworks/5.22/kdesignerplugin-5.22.0.tar.xz";
sha256 = "0cfnmpz845l39qpy5r6pknzm78js81bci9qi0xfnrf8gm3lvjg5l";
name = "kdesignerplugin-5.22.0.tar.xz";
};
};
kdesu = {
version = "5.22.0";
src = fetchurl {
url = "${mirror}/stable/frameworks/5.22/kdesu-5.22.0.tar.xz";
sha256 = "1jsr9m32dyzvsvsy743h3jih8v4yyr2zf15hh908anbamp7449bd";
name = "kdesu-5.22.0.tar.xz";
};
};
kdewebkit = {
version = "5.22.0";
src = fetchurl {
url = "${mirror}/stable/frameworks/5.22/kdewebkit-5.22.0.tar.xz";
sha256 = "0rmxa4j3jx7689jcf45fghh7jff16x34xrzrw0clg3fj4w47ik0b";
name = "kdewebkit-5.22.0.tar.xz";
};
};
kdnssd = {
version = "5.22.0";
src = fetchurl {
url = "${mirror}/stable/frameworks/5.22/kdnssd-5.22.0.tar.xz";
sha256 = "1b0s5gwn51zh2h5w2mzpzjj86qaz6pl7gzqf5q88vpzsiqjg14vp";
name = "kdnssd-5.22.0.tar.xz";
};
};
kdoctools = {
version = "5.22.0";
src = fetchurl {
url = "${mirror}/stable/frameworks/5.22/kdoctools-5.22.0.tar.xz";
sha256 = "0y4ayms0hyj4nv5flr0a198lb545plfbxkwhqsmzc0c77gagcw5k";
name = "kdoctools-5.22.0.tar.xz";
};
};
kemoticons = {
version = "5.22.0";
src = fetchurl {
url = "${mirror}/stable/frameworks/5.22/kemoticons-5.22.0.tar.xz";
sha256 = "1swrpqm441ngmps00hr15pgvw1382zbf2q2ncndj7i30725nfq1g";
name = "kemoticons-5.22.0.tar.xz";
};
};
kfilemetadata = {
version = "5.22.0";
src = fetchurl {
url = "${mirror}/stable/frameworks/5.22/kfilemetadata-5.22.0.tar.xz";
sha256 = "0p6s1r2qv5396ghkw79wyf7yf4hzj562yp83wgplwmr6lgh4b2fc";
name = "kfilemetadata-5.22.0.tar.xz";
};
};
kglobalaccel = {
version = "5.22.0";
src = fetchurl {
url = "${mirror}/stable/frameworks/5.22/kglobalaccel-5.22.0.tar.xz";
sha256 = "1m1aviz5g0vwk58j0z9jckz4rzns7md7mr3zlqqpvp1r032qc30k";
name = "kglobalaccel-5.22.0.tar.xz";
};
};
kguiaddons = {
version = "5.22.0";
src = fetchurl {
url = "${mirror}/stable/frameworks/5.22/kguiaddons-5.22.0.tar.xz";
sha256 = "10chxcvf4hxyfkgprsj7rg4dv788dzqjgsm6m0a4m6qmx12zhckh";
name = "kguiaddons-5.22.0.tar.xz";
};
};
khtml = {
version = "5.22.0";
src = fetchurl {
url = "${mirror}/stable/frameworks/5.22/portingAids/khtml-5.22.0.tar.xz";
sha256 = "1w5q41fjrqqq91j3dvhc9lrrhvrwy1izws6af7srh768gn6yig0m";
name = "khtml-5.22.0.tar.xz";
};
};
ki18n = {
version = "5.22.1";
src = fetchurl {
url = "${mirror}/stable/frameworks/5.22/ki18n-5.22.1.tar.xz";
sha256 = "0fasp8akj6wysn4acf9vyivcgb8x9dlnhkqmw7j0g7z1qgvjn4pv";
name = "ki18n-5.22.1.tar.xz";
};
};
kiconthemes = {
version = "5.22.0";
src = fetchurl {
url = "${mirror}/stable/frameworks/5.22/kiconthemes-5.22.0.tar.xz";
sha256 = "1bh76f7kpha4c5qs3n8z6g1qah0rsk99yqcz8j1dlss4ws65j9j3";
name = "kiconthemes-5.22.0.tar.xz";
};
};
kidletime = {
version = "5.22.0";
src = fetchurl {
url = "${mirror}/stable/frameworks/5.22/kidletime-5.22.0.tar.xz";
sha256 = "0dgw0rin6wz31xdspbjpvcs5x1b163ggqkz2zn73zavbr7f5jypc";
name = "kidletime-5.22.0.tar.xz";
};
};
kimageformats = {
version = "5.22.0";
src = fetchurl {
url = "${mirror}/stable/frameworks/5.22/kimageformats-5.22.0.tar.xz";
sha256 = "0g3f73m3yj5iqivcsn83pm32w4l13zbyzz5azgm3jjfhgnd00c18";
name = "kimageformats-5.22.0.tar.xz";
};
};
kinit = {
version = "5.22.0";
src = fetchurl {
url = "${mirror}/stable/frameworks/5.22/kinit-5.22.0.tar.xz";
sha256 = "1f71y6gf00p4jkqvpzyjlbnwc4gvjl2h4wi61xhpjz8lrmpsb6ac";
name = "kinit-5.22.0.tar.xz";
};
};
kio = {
version = "5.22.0";
src = fetchurl {
url = "${mirror}/stable/frameworks/5.22/kio-5.22.0.tar.xz";
sha256 = "02knylbs9ymb8qm7fkp3dkdqc9cvgw2dwfl4phzl1iax2fx2zkqy";
name = "kio-5.22.0.tar.xz";
};
};
kitemmodels = {
version = "5.22.0";
src = fetchurl {
url = "${mirror}/stable/frameworks/5.22/kitemmodels-5.22.0.tar.xz";
sha256 = "03gnglfhpzrc67bi0xdcy4xdhankic5cqnpahp9wwsis12ac6i83";
name = "kitemmodels-5.22.0.tar.xz";
};
};
kitemviews = {
version = "5.22.0";
src = fetchurl {
url = "${mirror}/stable/frameworks/5.22/kitemviews-5.22.0.tar.xz";
sha256 = "0nhwg7bmv1c8p6pnbfsz96mq9wbq339ir9yp7kfnhfrg0wqi44ar";
name = "kitemviews-5.22.0.tar.xz";
};
};
kjobwidgets = {
version = "5.22.0";
src = fetchurl {
url = "${mirror}/stable/frameworks/5.22/kjobwidgets-5.22.0.tar.xz";
sha256 = "1inqrb0j64b3519qcr0wk9izd4c1zi4kfjc8wa04s2kwxg6z7j1p";
name = "kjobwidgets-5.22.0.tar.xz";
};
};
kjs = {
version = "5.22.0";
src = fetchurl {
url = "${mirror}/stable/frameworks/5.22/portingAids/kjs-5.22.0.tar.xz";
sha256 = "0xqlkhm8r021xd5a25nwp9a4r7cbjkpqkc89fjma8qyvq5785qxw";
name = "kjs-5.22.0.tar.xz";
};
};
kjsembed = {
version = "5.22.0";
src = fetchurl {
url = "${mirror}/stable/frameworks/5.22/portingAids/kjsembed-5.22.0.tar.xz";
sha256 = "0fcc1lm5l8r0lj35r3niliyn8zxr90by2vjc9krzfm4i7kwij7wb";
name = "kjsembed-5.22.0.tar.xz";
};
};
kmediaplayer = {
version = "5.22.0";
src = fetchurl {
url = "${mirror}/stable/frameworks/5.22/portingAids/kmediaplayer-5.22.0.tar.xz";
sha256 = "1pn3fmaixcxba1wl63hblhnpj7jblrala9j3xrj8z2abhhfl5vzy";
name = "kmediaplayer-5.22.0.tar.xz";
};
};
knewstuff = {
version = "5.22.0";
src = fetchurl {
url = "${mirror}/stable/frameworks/5.22/knewstuff-5.22.0.tar.xz";
sha256 = "1gr566k95bg58hpn569kkarmlxk5rp12jcxdp7ksw1j8mp6la7a7";
name = "knewstuff-5.22.0.tar.xz";
};
};
knotifications = {
version = "5.22.0";
src = fetchurl {
url = "${mirror}/stable/frameworks/5.22/knotifications-5.22.0.tar.xz";
sha256 = "0fh6ahfr9pa8643i1ma40h7afnd1jn0m6dw5f9hgndxhwi6h3bps";
name = "knotifications-5.22.0.tar.xz";
};
};
knotifyconfig = {
version = "5.22.0";
src = fetchurl {
url = "${mirror}/stable/frameworks/5.22/knotifyconfig-5.22.0.tar.xz";
sha256 = "0p4g7wv2w6cpjzhlkh7rnzzhwcj86sgz98fl97is1fl65q8f0szr";
name = "knotifyconfig-5.22.0.tar.xz";
};
};
kpackage = {
version = "5.22.0";
src = fetchurl {
url = "${mirror}/stable/frameworks/5.22/kpackage-5.22.0.tar.xz";
sha256 = "1nbwjc4n8f2iisdckm5ll3qyls1sq02ia6vmhj4mfm4w44q4s1bk";
name = "kpackage-5.22.0.tar.xz";
};
};
kparts = {
version = "5.22.0";
src = fetchurl {
url = "${mirror}/stable/frameworks/5.22/kparts-5.22.0.tar.xz";
sha256 = "091wm2flhqgpqsffdd8nlwbdffvsj7cyd0c46949d9chm64723cg";
name = "kparts-5.22.0.tar.xz";
};
};
kpeople = {
version = "5.22.0";
src = fetchurl {
url = "${mirror}/stable/frameworks/5.22/kpeople-5.22.0.tar.xz";
sha256 = "0rbwxzmyaig92vcd26v1yqd13swk15pp0lpvjp6hdpxbhpxijyf7";
name = "kpeople-5.22.0.tar.xz";
};
};
kplotting = {
version = "5.22.0";
src = fetchurl {
url = "${mirror}/stable/frameworks/5.22/kplotting-5.22.0.tar.xz";
sha256 = "0ljiyxa2320v937lkqkxx3jc7sg45z4vjl74lxfybwspgs6y5hqk";
name = "kplotting-5.22.0.tar.xz";
};
};
kpty = {
version = "5.22.0";
src = fetchurl {
url = "${mirror}/stable/frameworks/5.22/kpty-5.22.0.tar.xz";
sha256 = "12lfwv45d06ksx5xc4hgk075mj2ckkqpc8mksx99f700yvcyk1db";
name = "kpty-5.22.0.tar.xz";
};
};
kross = {
version = "5.22.0";
src = fetchurl {
url = "${mirror}/stable/frameworks/5.22/portingAids/kross-5.22.0.tar.xz";
sha256 = "1ika9ha06vspjn8hy6mv5vi5n7xj7sj45csmjjxcqwhn2wlcdj4l";
name = "kross-5.22.0.tar.xz";
};
};
krunner = {
version = "5.22.0";
src = fetchurl {
url = "${mirror}/stable/frameworks/5.22/krunner-5.22.0.tar.xz";
sha256 = "09jhdy48dciqd8hwxmvjyw547fr48mzns5f0yknsnnb8a47yhrd4";
name = "krunner-5.22.0.tar.xz";
};
};
kservice = {
version = "5.22.0";
src = fetchurl {
url = "${mirror}/stable/frameworks/5.22/kservice-5.22.0.tar.xz";
sha256 = "1c5q8cxghbji3imamjbxymcd5cz9a9rapqriy1wmskys3ms3fag9";
name = "kservice-5.22.0.tar.xz";
};
};
ktexteditor = {
version = "5.22.0";
src = fetchurl {
url = "${mirror}/stable/frameworks/5.22/ktexteditor-5.22.0.tar.xz";
sha256 = "1jsa8cfq0245bsris46i3k8f8g7l0sc5jpj4iwkxrl9m0nk5j1v0";
name = "ktexteditor-5.22.0.tar.xz";
};
};
ktextwidgets = {
version = "5.22.0";
src = fetchurl {
url = "${mirror}/stable/frameworks/5.22/ktextwidgets-5.22.0.tar.xz";
sha256 = "01a2vkdpq06libap5g6a90jrcc0phmfd859kilraqyxhbrp9sw5l";
name = "ktextwidgets-5.22.0.tar.xz";
};
};
kunitconversion = {
version = "5.22.0";
src = fetchurl {
url = "${mirror}/stable/frameworks/5.22/kunitconversion-5.22.0.tar.xz";
sha256 = "1phbqxddp8ks36nr4982n4bwwx7d6yxll629gpb0ddc4yfsjv48p";
name = "kunitconversion-5.22.0.tar.xz";
};
};
kwallet = {
version = "5.22.0";
src = fetchurl {
url = "${mirror}/stable/frameworks/5.22/kwallet-5.22.0.tar.xz";
sha256 = "1i20kp1gkdiwmwy8vf7vd6r89qx6lpxwr6nib35khp93ci9l3838";
name = "kwallet-5.22.0.tar.xz";
};
};
kwayland = {
version = "5.22.0";
src = fetchurl {
url = "${mirror}/stable/frameworks/5.22/kwayland-5.22.0.tar.xz";
sha256 = "1jfibqai7vy1vklj19x7z0r4qc0rc7yd5r4wpp98mmdwzpnhlrgy";
name = "kwayland-5.22.0.tar.xz";
};
};
kwidgetsaddons = {
version = "5.22.0";
src = fetchurl {
url = "${mirror}/stable/frameworks/5.22/kwidgetsaddons-5.22.0.tar.xz";
sha256 = "1bwmnfa1l3s33nc6b0ryk78gxhrynyd07ffqw7mw211r34pg4c14";
name = "kwidgetsaddons-5.22.0.tar.xz";
};
};
kwindowsystem = {
version = "5.22.0";
src = fetchurl {
url = "${mirror}/stable/frameworks/5.22/kwindowsystem-5.22.0.tar.xz";
sha256 = "05jwmjqk03pc2g09rnyb9qh0dfi0c46awbaxgc7i7z4i9swv1k30";
name = "kwindowsystem-5.22.0.tar.xz";
};
};
kxmlgui = {
version = "5.22.0";
src = fetchurl {
url = "${mirror}/stable/frameworks/5.22/kxmlgui-5.22.0.tar.xz";
sha256 = "16q222jvnsd6pj49ih44qpks97lcjsamcpjg5x5ysn4a6w5h4mds";
name = "kxmlgui-5.22.0.tar.xz";
};
};
kxmlrpcclient = {
version = "5.22.0";
src = fetchurl {
url = "${mirror}/stable/frameworks/5.22/kxmlrpcclient-5.22.0.tar.xz";
sha256 = "00qj4pa7r0ny6pwivq6qqw80v4dsg9lgwd2qdlp9kddi0f8i2p1b";
name = "kxmlrpcclient-5.22.0.tar.xz";
};
};
modemmanager-qt = {
version = "5.22.0";
src = fetchurl {
url = "${mirror}/stable/frameworks/5.22/modemmanager-qt-5.22.0.tar.xz";
sha256 = "1b1gx33vrw7qcvy3zlc01x7wlalx5csfl590gfxlf870i3m7dnhf";
name = "modemmanager-qt-5.22.0.tar.xz";
};
};
networkmanager-qt = {
version = "5.22.0";
src = fetchurl {
url = "${mirror}/stable/frameworks/5.22/networkmanager-qt-5.22.0.tar.xz";
sha256 = "03b710n4107qw9c3p7wdma9fz9vqixrjydfa02f7vgzw1rixmmqq";
name = "networkmanager-qt-5.22.0.tar.xz";
};
};
oxygen-icons5 = {
version = "5.22.0";
src = fetchurl {
url = "${mirror}/stable/frameworks/5.22/oxygen-icons5-5.22.0.tar.xz";
sha256 = "1m3f5wrgahqlzzl3jyfymh6n515fsmsi8ckimvma2d8qqpb0dc2l";
name = "oxygen-icons5-5.22.0.tar.xz";
};
};
plasma-framework = {
version = "5.22.0";
src = fetchurl {
url = "${mirror}/stable/frameworks/5.22/plasma-framework-5.22.0.tar.xz";
sha256 = "1wn7ib030dw8rj5dprl8bzz4c3dv4nlmrfb9wgr6x78w4ac967zc";
name = "plasma-framework-5.22.0.tar.xz";
};
};
solid = {
version = "5.22.0";
src = fetchurl {
url = "${mirror}/stable/frameworks/5.22/solid-5.22.0.tar.xz";
sha256 = "04a7z5g2ylhbj2572wa6w51cs98ddn4d7lfirzawxf0f8d2693w2";
name = "solid-5.22.0.tar.xz";
};
};
sonnet = {
version = "5.22.0";
src = fetchurl {
url = "${mirror}/stable/frameworks/5.22/sonnet-5.22.0.tar.xz";
sha256 = "0y8l3mfa65a59vjj424ga87q3bixx8inicp2jp9zi36p4g7xwww8";
name = "sonnet-5.22.0.tar.xz";
};
};
threadweaver = {
version = "5.22.0";
src = fetchurl {
url = "${mirror}/stable/frameworks/5.22/threadweaver-5.22.0.tar.xz";
sha256 = "1ax58k6nl8za79j99spa2r76m9xz8ih9iflksgpng40wlnkwlp59";
name = "threadweaver-5.22.0.tar.xz";
};
};
}

View File

@ -2,14 +2,10 @@
# Updates
Before a major version update, make a copy of this directory. (We like to
keep the old version around for a short time after major updates.)
1. Update the URL in `maintainers/scripts/generate-kde-frameworks.sh`.
2. From the top of the Nixpkgs tree, run
`./maintainers/scripts/generate-kde-frameworks.sh > pkgs/desktops/kde-5/frameworks-$VERSION/srcs.nix'.
3. Check that the new packages build correctly.
4. Commit the changes and open a pull request.
1. Update the URL in `maintainers/scripts/generate-kde-frameworks.sh` and
run that script from the top of the Nixpkgs tree.
2. Check that the new packages build correctly.
3. Commit the changes and open a pull request.
*/
@ -106,6 +102,7 @@ let
ktextwidgets = callPackage ./ktextwidgets.nix {};
kunitconversion = callPackage ./kunitconversion.nix {};
kwallet = callPackage ./kwallet.nix {};
kwayland = callPackage ./kwayland.nix {};
kwidgetsaddons = callPackage ./kwidgetsaddons.nix {};
kwindowsystem = callPackage ./kwindowsystem.nix {};
kxmlgui = callPackage ./kxmlgui.nix {};

Some files were not shown because too many files have changed in this diff Show More