Merge branch 'master.upstream' into staging.upstream

This commit is contained in:
William A. Kennington III 2015-07-15 02:02:46 -07:00
commit 25e60feb72
46 changed files with 2279 additions and 564 deletions

View file

@ -7,72 +7,6 @@
* Clearly describe the issue including steps to reproduce when it is a bug.
* Include information what version of nixpkgs and Nix are you using (nixos-version or git revision).
## Making patches
* Read [Manual (How to write packages for Nix)](https://nixos.org/nixpkgs/manual/).
* Fork the repository on GitHub.
* Create a branch for your future fix.
* You can make branch from a commit of your local `nixos-version`. That will help you to avoid additional local compilations. Because you will recieve packages from binary cache.
* For example: `nixos-version` returns `15.05.git.0998212 (Dingo)`. So you can do:
```bash
git checkout 0998212
git checkout -b 'fix/pkg-name-update'
```
* Please avoid working directly on the `master` branch.
* Make commits of logical units.
* If you removed pkgs, made some major NixOS changes etc., write about them in `nixos/doc/manual/release-notes/rl-unstable.xml`.
* Check for unnecessary whitespace with `git diff --check` before committing.
* Format the commit in a following way:
```
(pkg-name | service-name): (from -> to | init at version | refactor | etc)
Additional information.
```
* Examples:
* `nginx: init at 2.0.1`
* `firefox: 3.0 -> 3.1.1`
* `hydra service: add bazBaz option`
* `nginx service: refactor config generation`
* Test your changes. If you work with
* nixpkgs:
* update pkg ->
* `nix-env -i pkg-name -f <path to your local nixpkgs folder>`
* add pkg ->
* Make sure it's in `pkgs/top-level/all-packages.nix`
* `nix-env -i pkg-name -f <path to your local nixpkgs folder>`
* _If you don't want to install pkg in you profile_.
* `nix-build -A pkg-attribute-name <path to your local nixpkgs folder>/default.nix` and check results in the folder `result`. It will appear in the same directory where you did `nix-build`.
* If you did `nix-env -i pkg-name` you can do `nix-env -e pkg-name` to uninstall it from your system.
* NixOS and its modules:
* You can add new module to your NixOS configuration file (usually it's `/etc/nixos/configuration.nix`).
And do `sudo nixos-rebuild test -I nixpkgs=<path to your local nixpkgs folder> --fast`.
* If you have commits `pkg-name: oh, forgot to insert whitespace`: squash commits in this case. Use `git rebase -i`.
* Rebase you branch against current `master`.
## Submitting changes
* Push your changes to your fork of nixpkgs.
* Create pull request:
* Write the title in format `(pkg-name | service): improvement`.
* If you update the pkg, write versions `from -> to`.
* Write in comment if you have tested your patch. Do not rely much on `TravisCI`.
* If you make an improvement, write about your motivation.
* Notify maintainers of the package. For example add to the message: `cc @jagajaga @domenkozar`.
## Hotfixing pull requests
* Make the appropriate changes in you branch.
* Don't create additional commits, do
* `git rebase -i`
* `git push --force` to your branch.
## Commit policy
* Commits must be sufficiently tested before being merged, both for the master and staging branches.
* Hydra builds for master and staging should not be used as testing platform, it's a build farm for changes that have been already tested.
* Master should only see non-breaking commits that do not cause mass rebuilds.
* Staging should only see non-breaking mass-rebuild commits. That means it's not to be used for testing, and changes must have been well tested already. [Read policy here](http://comments.gmane.org/gmane.linux.distributions.nixos/13447).
* If staging is already in a broken state, please refrain from adding extra new breakages. Stabilize it for a few days, merge into master, then resume development on staging. [Keep an eye on the staging evaluations here](http://hydra.nixos.org/jobset/nixpkgs/staging#tabs-evaluations).
* When changing the bootloader installation process, extra care must be taken. Grub installations cannot be rolled back, hence changes may break people's installations forever. For any non-trivial change to the bootloader please file a PR asking for review, especially from @edolstra.
See the nixpkgs manual for details on how to [Submit changes to nixpkgs](http://hydra.nixos.org/job/nixpkgs/trunk/manual/latest/download-by-type/doc/manual#chap-submitting-changes).

View file

@ -18,6 +18,7 @@
<xi:include href="language-support.xml" />
<xi:include href="package-notes.xml" />
<xi:include href="coding-conventions.xml" />
<xi:include href="submitting-changes.xml" />
<xi:include href="haskell-users-guide.xml" />
<xi:include href="contributing.xml" />

283
doc/submitting-changes.xml Normal file
View file

@ -0,0 +1,283 @@
<chapter xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xml:id="chap-submitting-changes">
<title>Submitting changes</title>
<section>
<title>Making patches</title>
<itemizedlist>
<listitem>
<para>Read <link xlink:href="https://nixos.org/nixpkgs/manual/">Manual (How to write packages for Nix)</link>.</para>
</listitem>
<listitem>
<para>Fork the repository on GitHub.</para>
</listitem>
<listitem>
<para>Create a branch for your future fix.
<itemizedlist>
<listitem>
<para>You can make branch from a commit of your local <command>nixos-version</command>. That will help you to avoid additional local compilations. Because you will receive packages from binary cache.
<itemizedlist>
<listitem>
<para>For example: <command>nixos-version</command> returns <command>15.05.git.0998212 (Dingo)</command>. So you can do:</para>
</listitem>
</itemizedlist>
<screen>
$ git checkout 0998212
$ git checkout -b 'fix/pkg-name-update'
</screen>
</para>
</listitem>
<listitem>
<para>Please avoid working directly on the <command>master</command> branch.</para>
</listitem>
</itemizedlist>
</para>
</listitem>
<listitem>
<para>Make commits of logical units.
<itemizedlist>
<listitem>
<para>If you removed pkgs, made some major NixOS changes etc., write about them in <command>nixos/doc/manual/release-notes/rl-unstable.xml</command>.</para>
</listitem>
</itemizedlist>
</para>
</listitem>
<listitem>
<para>Check for unnecessary whitespace with <command>git diff --check</command> before committing.</para>
</listitem>
<listitem>
<para>Format the commit in a following way:</para>
<programlisting>
(pkg-name | service-name): (from -> to | init at version | refactor | etc)
Additional information.
</programlisting>
<itemizedlist>
<listitem>
<para>Examples:
<itemizedlist>
<listitem>
<para>
<command>nginx: init at 2.0.1</command>
</para>
</listitem>
<listitem>
<para>
<command>firefox: 3.0 -> 3.1.1</command>
</para>
</listitem>
<listitem>
<para>
<command>hydra service: add bazBaz option</command>
</para>
</listitem>
<listitem>
<para>
<command>nginx service: refactor config generation</command>
</para>
</listitem>
</itemizedlist>
</para>
</listitem>
</itemizedlist>
</listitem>
<listitem>
<para>Test your changes. If you work with
<itemizedlist>
<listitem>
<para>nixpkgs:
<itemizedlist>
<listitem>
<para>update pkg ->
<itemizedlist>
<listitem>
<para>
<command>nix-env -i pkg-name -f &lt;path to your local nixpkgs folder&gt;</command>
</para>
</listitem>
</itemizedlist>
</para>
</listitem>
<listitem>
<para>add pkg ->
<itemizedlist>
<listitem>
<para>Make sure it's in <command>pkgs/top-level/all-packages.nix</command>
</para>
</listitem>
<listitem>
<para>
<command>nix-env -i pkg-name -f &lt;path to your local nixpkgs folder&gt;</command>
</para>
</listitem>
</itemizedlist>
</para>
</listitem>
<listitem>
<para>
<emphasis>If you don't want to install pkg in you profile</emphasis>.
<itemizedlist>
<listitem>
<para>
<command>nix-build -A pkg-attribute-name &lt;path to your local nixpkgs folder&gt;/default.nix</command> and check results in the folder <command>result</command>. It will appear in the same directory where you did <command>nix-build</command>.</para>
</listitem>
</itemizedlist>
</para>
</listitem>
<listitem>
<para>If you did <command>nix-env -i pkg-name</command> you can do <command>nix-env -e pkg-name</command> to uninstall it from your system.</para>
</listitem>
</itemizedlist>
</para>
</listitem>
<listitem>
<para>NixOS and its modules:
<itemizedlist>
<listitem>
<para>You can add new module to your NixOS configuration file (usually it's <command>/etc/nixos/configuration.nix</command>).
And do <command>sudo nixos-rebuild test -I nixpkgs=&lt;path to your local nixpkgs folder&gt; --fast</command>.</para>
</listitem>
</itemizedlist>
</para>
</listitem>
</itemizedlist>
</para>
</listitem>
<listitem>
<para>If you have commits <command>pkg-name: oh, forgot to insert whitespace</command>: squash commits in this case. Use <command>git rebase -i</command>.</para>
</listitem>
<listitem>
<para>Rebase you branch against current <command>master</command>.</para>
</listitem>
</itemizedlist>
</section>
<section>
<title>Submitting changes</title>
<itemizedlist>
<listitem>
<para>Push your changes to your fork of nixpkgs.</para>
</listitem>
<listitem>
<para>Create pull request:
<itemizedlist>
<listitem>
<para>Write the title in format <command>(pkg-name | service): improvement</command>.
<itemizedlist>
<listitem>
<para>If you update the pkg, write versions <command>from -> to</command>.</para>
</listitem>
</itemizedlist>
</para>
</listitem>
<listitem>
<para>Write in comment if you have tested your patch. Do not rely much on <command>TravisCI</command>.</para>
</listitem>
<listitem>
<para>If you make an improvement, write about your motivation.</para>
</listitem>
<listitem>
<para>Notify maintainers of the package. For example add to the message: <command>cc @jagajaga @domenkozar</command>.</para>
</listitem>
</itemizedlist>
</para>
</listitem>
</itemizedlist>
</section>
<section>
<title>Hotfixing pull requests</title>
<itemizedlist>
<listitem>
<para>Make the appropriate changes in you branch.</para>
</listitem>
<listitem>
<para>Don't create additional commits, do
<itemizedlist>
<listitem>
<para><command>git rebase -i</command></para>
</listitem>
<listitem>
<para>
<command>git push --force</command> to your branch.</para>
</listitem>
</itemizedlist>
</para>
</listitem>
</itemizedlist>
</section>
<section>
<title>Commit policy</title>
<itemizedlist>
<listitem>
<para>Commits must be sufficiently tested before being merged, both for the master and staging branches.</para>
</listitem>
<listitem>
<para>Hydra builds for master and staging should not be used as testing platform, it's a build farm for changes that have been already tested.</para>
</listitem>
<listitem>
<para>Master should only see non-breaking commits that do not cause mass rebuilds.</para>
</listitem>
<listitem>
<para>Staging should only see non-breaking mass-rebuild commits. That means it's not to be used for testing, and changes must have been well tested already. <link xlink:href="http://comments.gmane.org/gmane.linux.distributions.nixos/13447">Read policy here</link>.</para>
</listitem>
<listitem>
<para>If staging is already in a broken state, please refrain from adding extra new breakages. Stabilize it for a few days, merge into master, then resume development on staging. <link xlink:href="http://hydra.nixos.org/jobset/nixpkgs/staging#tabs-evaluations">Keep an eye on the staging evaluations here</link>.</para>
</listitem>
<listitem>
<para>When changing the bootloader installation process, extra care must be taken. Grub installations cannot be rolled back, hence changes may break people's installations forever. For any non-trivial change to the bootloader please file a PR asking for review, especially from @edolstra.</para>
</listitem>
</itemizedlist>
</section>
</chapter>

View file

@ -327,6 +327,11 @@ lib.mapAttrs (n: v: v // { shortName = n; }) rec {
fullName = "University of Illinois/NCSA Open Source License";
};
notion_lgpl = {
url = "https://raw.githubusercontent.com/raboof/notion/master/LICENSE";
fullName = "Notion modified LGPL";
};
ofl = spdx {
spdxId = "OFL-1.1";
fullName = "SIL Open Font License 1.1";

View file

@ -117,6 +117,7 @@
jagajaga = "Arseniy Seroka <ars.seroka@gmail.com>";
jb55 = "William Casarin <bill@casarin.me>";
jcumming = "Jack Cummings <jack@mudshark.org>";
jfb = "James Felix Black <james@yamtime.com>";
jgeerds = "Jascha Geerds <jg@ekby.de>";
jirkamarsik = "Jirka Marsik <jiri.marsik89@gmail.com>";
joachifm = "Joachim Fasting <joachifm@fastmail.fm>";
@ -141,6 +142,7 @@
linus = "Linus Arver <linusarver@gmail.com>";
lnl7 = "Daiderd Jordan <daiderd@gmail.com>";
lovek323 = "Jason O'Conal <jason@oconal.id.au>";
lsix = "Lancelot SIX <lsix@lancelotsix.com>";
ludo = "Ludovic Courtès <ludo@gnu.org>";
madjar = "Georges Dubus <georges.dubus@compiletoi.net>";
magnetophon = "Bart Brouns <bart@magnetophon.nl>";

View file

@ -91,9 +91,11 @@ rec {
let
toClosureList = file: parentKey: imap (n: x:
if isAttrs x || isFunction x then
unifyModuleSyntax file "${parentKey}:anon-${toString n}" (unpackSubmodule applyIfFunction x args)
let key = "${parentKey}:anon-${toString n}"; in
unifyModuleSyntax file key (unpackSubmodule (applyIfFunction key) x args)
else
unifyModuleSyntax (toString x) (toString x) (applyIfFunction (import x) args));
let file = toString x; key = toString x; in
unifyModuleSyntax file key (applyIfFunction key (import x) args));
in
builtins.genericClosure {
startSet = toClosureList unknownModule "" modules;
@ -122,7 +124,7 @@ rec {
config = removeAttrs m ["key" "_file" "require" "imports"];
};
applyIfFunction = f: arg@{ config, options, lib, ... }: if isFunction f then
applyIfFunction = key: f: args@{ config, options, lib, ... }: if isFunction f then
let
# Module arguments are resolved in a strict manner when attribute set
# deconstruction is used. As the arguments are now defined with the
@ -137,11 +139,18 @@ rec {
# not their values. The values are forwarding the result of the
# evaluation of the option.
requiredArgs = builtins.attrNames (builtins.functionArgs f);
context = name: ''while evaluating the module argument `${name}' in "${key}":'';
extraArgs = builtins.listToAttrs (map (name: {
inherit name;
value = config._module.args.${name};
value = addErrorContext (context name)
(args.${name} or config._module.args.${name});
}) requiredArgs);
in f (extraArgs // arg)
# Note: we append in the opposite order such that we can add an error
# context on the explicited arguments of "args" too. This update
# operator is used to make the "args@{ ... }: with args.lib;" notation
# works.
in f (args // extraArgs)
else
f;

View file

@ -107,11 +107,13 @@ rec {
# replaceChars ["<" ">"] ["&lt;" "&gt;"] "<foo>" returns "&lt;foo&gt;".
replaceChars = del: new: s:
let
substList = lib.zipLists del new;
subst = c:
(lib.fold
(sub: res: if sub.fst == c then sub else res)
{fst = c; snd = c;} (lib.zipLists del new)
).snd;
let found = lib.findFirst (sub: sub.fst == c) null substList; in
if found == null then
c
else
found.snd;
in
stringAsChars subst s;

View file

@ -12,7 +12,7 @@ evalConfig() {
local attr=$1
shift;
local script="import ./default.nix { modules = [ $@ ];}"
nix-instantiate --timeout 1 -E "$script" -A "$attr" --eval-only
nix-instantiate --timeout 1 -E "$script" -A "$attr" --eval-only --show-trace
}
reportFailure() {
@ -100,7 +100,15 @@ checkConfigOutput 'true' "$@" ./define-enable.nix ./define-loaOfSub-foo-if-enabl
checkConfigOutput 'true' "$@" ./define-enable.nix ./define-loaOfSub-foo-enable-if.nix
# Check _module.args.
checkConfigOutput "true" config.enable ./declare-enable.nix ./custom-arg-define-enable.nix
set -- config.enable ./declare-enable.nix ./define-enable-with-custom-arg.nix
checkConfigError 'while evaluating the module argument .*custom.* in .*define-enable-with-custom-arg.nix.*:' "$@"
checkConfigOutput "true" "$@" ./define-_module-args-custom.nix
# Check that using _module.args on imports cause infinite recursions, with
# the proper error context.
set -- "$@" ./define-_module-args-custom.nix ./import-custom-arg.nix
checkConfigError 'while evaluating the module argument .*custom.* in .*import-custom-arg.nix.*:' "$@"
checkConfigError 'infinite recursion encountered' "$@"
# Check _module.check.
set -- config.enable ./declare-enable.nix ./define-enable.nix ./define-loaOfSub-foo.nix

View file

@ -0,0 +1,7 @@
{ lib, ... }:
{
config = {
_module.args.custom = true;
};
}

View file

@ -2,7 +2,6 @@
{
config = {
_module.args.custom = true;
enable = custom;
};
}

View file

@ -0,0 +1,6 @@
{ lib, custom, ... }:
{
imports = []
++ lib.optional custom ./define-enable-force.nix;
}

View file

@ -16,6 +16,7 @@ in
./i3.nix
./metacity.nix
./openbox.nix
./notion.nix
./ratpoison.nix
./sawfish.nix
./stumpwm.nix

View file

@ -0,0 +1,32 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.xserver.windowManager.notion;
in
{
options = {
services.xserver.windowManager.notion = {
enable = mkOption {
default = false;
example = true;
description = "Enable the notion tiling window manager.";
};
};
};
config = mkIf cfg.enable {
services.xserver.windowManager = {
session = [{
name = "notion";
start = ''
${pkgs.notion}/bin/notion &
waitPID=$!
'';
}];
};
environment.systemPackages = [ pkgs.notion ];
};
}

View file

@ -90,6 +90,7 @@ in rec {
nixpkgs.tarball
(all nixpkgs.emacs)
(all nixpkgs.jdk)
];
});

View file

@ -87,7 +87,10 @@ in rec {
};
constituents =
let all = x: map (system: x.${system}) supportedSystems; in
[ nixpkgs.tarball ] ++ lib.collect lib.isDerivation nixos;
[ nixpkgs.tarball
(all nixpkgs.jdk)
]
++ lib.collect lib.isDerivation nixos;
});
}

View file

@ -1,6 +1,6 @@
{ stdenv, fetchFromGitHub, libav, libkeyfinder }:
{ stdenv, fetchFromGitHub, libav, libkeyfinder_0_11 }:
let version = "20150130"; in
let version = "20150201"; in
stdenv.mkDerivation rec {
name = "keyfinder-cli-${version}";
@ -12,19 +12,20 @@ stdenv.mkDerivation rec {
};
meta = with stdenv.lib; {
inherit version;
inherit (src.meta) homepage;
description = "Musical key detection for digital audio (command-line tool)";
longDescription = ''
This small utility is the automation-oriented DJ's best friend. By making
use of Ibrahim Sha'ath's high quality libKeyFinder library, it can be
used to estimate the musical key of many different audio formats.
'';
homepage = https://github.com/EvanPurkhiser/keyfinder-cli;
license = licenses.gpl3Plus;
platforms = with platforms; linux;
maintainers = with maintainers; [ nckx ];
};
buildInputs = [ libav libkeyfinder ];
buildInputs = [ libav libkeyfinder_0_11 ];
makeFlagsArray = "PREFIX=$(out)";

View file

@ -1,11 +1,11 @@
{ stdenv, fetchFromGitHub, libav_0_8, libkeyfinder, qt5, taglib }:
let version = "1.26"; in
let version = "2.00"; in
stdenv.mkDerivation {
name = "keyfinder-${version}";
src = fetchFromGitHub {
sha256 = "1sfnywc6jdpm03344i6i4pz13mqa4i5agagj4k6252m63cqmjkrc";
sha256 = "16gyvvws93fyvx5qb2x9qhsg4bn710kgdh6q9sl2dwfsx6npkh9m";
rev = version;
repo = "is_KeyFinder";
owner = "ibsh";
@ -32,10 +32,14 @@ stdenv.mkDerivation {
# TODO: upgrade libav when "Audio sample format conversion failed" is fixed
buildInputs = [ libav_0_8 libkeyfinder qt5.base qt5.xmlpatterns taglib ];
configurePhase = ''
postPatch = ''
substituteInPlace is_KeyFinder.pro \
--replace "keyfinder.0" "keyfinder" \
--replace '$$[QT_INSTALL_PREFIX]' "$out"
--replace '$$[QT_INSTALL_PREFIX]' "$out" \
--replace "-stdlib=libc++" ""
'';
configurePhase = ''
qmake
'';

View file

@ -26,16 +26,18 @@ stdenv.mkDerivation rec {
install -Dpm755 -D diffpdf $out/bin/diffpdf
install -Dpm644 -D diffpdf.1 $out/share/man/man1/diffpdf.1
install -dpm755 $out/share/doc/${name} $out/share/licenses/${name} $out/share/pixmaps $out/share/applications
install -dpm755 $out/share/doc/${name} $out/share/licenses/${name} $out/share/icons $out/share/pixmaps $out/share/applications
install -Dpm644 CHANGES README help.html $out/share/doc/${name}/
install -Dpm644 gpl-2.0.txt $out/share/licenses/${name}/
install -Dpm644 images/icon.png $out/share/pixmaps/${name}.png
install -Dpm644 images/icon.png $out/share/icons/diffpdf.png
install -Dpm644 images/icon.png $out/share/pixmaps/diffpdf.png
cat > $out/share/applications/diffpdf.desktop <<EOF
[Desktop Entry]
Type=Application
Version=1.0
Name=diffpdf
Icon=diffpdf
Comment=PDF diffing tool
Exec=$out/bin/diffpdf
Terminal=false

View file

@ -0,0 +1,43 @@
{ stdenv, fetchgit, qt4, trousers }:
stdenv.mkDerivation rec {
version = "0.8.1";
name = "tpmmanager-${version}";
src = fetchgit {
url = "https://github.com/Sirrix-AG/TPMManager";
rev = "9f989206635a6d2c1342576c90fa73eb239519cd";
sha256 = "24a606f88fed67ed0d0e61dc220295e9e1ab8db3ef3d028fa34b04ff30652d8e";
};
buildInputs = [ qt4 trousers ];
preBuild = ''
qmake -makefile PREFIX=\$out
'';
installPhase = ''
mkdir -p $out/bin
install -Dpm755 -D bin/tpmmanager $out/bin/tpmmanager
mkdir -p $out/share/applications
cat > $out/share/applications/tpmmanager.desktop <<EOF
[Desktop Entry]
Type=Application
Version=1.0
Name=tpmmanager
Comment=TPM manager
Exec=$out/bin/tpmmanager
Terminal=false
EOF
'';
meta = {
homepage = https://projects.sirrix.com/trac/tpmmanager;
description = "Tool for managing the TPM";
license = stdenv.lib.licenses.gpl2;
maintainers = with stdenv.lib.maintainers; [ tstrobel ];
platforms = with stdenv.lib.platforms; linux;
inherit version;
};
}

View file

@ -4,12 +4,12 @@ with goPackages;
buildGoPackage rec {
name = "syncthing-${version}";
version = "0.11.13";
version = "0.11.15";
goPackagePath = "github.com/syncthing/syncthing";
src = fetchgit {
url = "git://github.com/syncthing/syncthing.git";
rev = "refs/tags/v${version}";
sha256 = "07045f4c24e546f4e8307acedeb5fe72b023db57bbf4d73b56d7fe2c75d694dc";
sha256 = "8afd0a0999c7d7d285f361589330421c00012da86ce91623c5ad6b96d8fb9695";
};
subPackages = [ "cmd/syncthing" ];

View file

@ -1,5 +1,4 @@
{ stdenv, fetchurl, cmake, freetype, libpng, mesa, gettext, openssl, qt5, perl
, libiconv }:
{ stdenv, fetchurl, cmake, freetype, libpng, mesa, gettext, openssl, qt5Full, perl, libiconv }:
stdenv.mkDerivation rec {
name = "stellarium-0.13.3";
@ -9,7 +8,7 @@ stdenv.mkDerivation rec {
sha256 = "1ml6z2xda4vx61agdz54x8fw1b115gwc7rcy0zhz1jh6g5jvf0ij";
};
buildInputs = [ cmake freetype libpng mesa gettext openssl qt5.base qt5.quick1 perl libiconv ];
buildInputs = [ cmake freetype libpng mesa gettext openssl perl libiconv qt5Full ];
enableParallelBuilding = true;

View file

@ -0,0 +1,35 @@
{ stdenv, fetchgit, iasl, flex, bison }:
stdenv.mkDerivation rec {
name = "cbfstool-${version}";
version = "git-2015-07-09";
src = fetchgit {
url = "http://review.coreboot.org/p/coreboot";
rev = "5d866213f42fd22aed80abb5a91d74f6d485ac3f";
sha256 = "148155829jbabsgg1inmcpqmwbg0fgp8a685bzybv9j4ibasi0z2";
};
buildInputs = [ iasl flex bison ];
buildPhase = ''
export LEX=${flex}/bin/flex
make -C util/cbfstool
'';
installPhase = ''
mkdir -p $out/bin
cp util/cbfstool/cbfstool $out/bin
cp util/cbfstool/fmaptool $out/bin
cp util/cbfstool/rmodtool $out/bin
'';
meta = with stdenv.lib; {
description = "CBFS tool";
homepage = http://www.coreboot.org;
license = licenses.gpl2;
maintainers = [ maintainers.tstrobel ];
platforms = platforms.linux;
};
}

View file

@ -0,0 +1,33 @@
{
enableXft ? true, libXft ? null,
patches ? [],
stdenv, fetchurl,
lua, gettext, groff,
pkgconfig, busybox,
x11, libXinerama, libXrandr, libX11
}:
assert enableXft -> libXft != null;
stdenv.mkDerivation {
name = "notion";
version = "3-2015061300";
meta = with stdenv.lib; {
description = "Tiling tabbed window manager, follow-on to the ion window manager";
homepage = http://notion.sourceforge.net;
platforms = platforms.linux;
license = licenses.notion_lgpl;
maintainers = [maintainers.jfb];
};
src = fetchurl {
url = https://github.com/raboof/notion/archive/3-2015061300.tar.gz;
sha256 = "3c9d9f35a9fb0d17c263b76fe28f7a1a4a05b7d6140545524cc1effd98c5c305";
};
patches = patches ++ stdenv.lib.optional enableXft ./notion-xft_nixos.diff;
postPatch = "substituteInPlace system-autodetect.mk --replace '#PRELOAD_MODULES=1' 'PRELOAD_MODULES=1'";
buildInputs = [x11 lua gettext groff pkgconfig busybox libXinerama libXrandr libX11] ++ stdenv.lib.optional enableXft libXft;
buildFlags = "LUA_DIR=${lua} X11_PREFIX=/no-such-path PREFIX=\${out}";
installFlags = "PREFIX=\${out}";
}

View file

@ -0,0 +1,662 @@
diff -ur notion-3-2015061300/de/brush.c notion-3-2015061300-PATCHED/de/brush.c
--- notion-3-2015061300/de/brush.c 2015-06-13 10:37:26.000000000 -0400
+++ notion-3-2015061300-PATCHED/de/brush.c 2015-07-13 10:37:23.093298917 -0400
@@ -48,6 +48,9 @@
gr_stylespec_init(&brush->current_attr);
+#ifdef XFT
+ brush->draw=NULL;
+#endif /* XFT */
style->usecount++;
if(!grbrush_init(&(brush->grbrush))){
@@ -128,6 +131,10 @@
{
destyle_unref(brush->d);
brush->d=NULL;
+#ifdef XFT
+ if(brush->draw!=NULL)
+ XftDrawDestroy(brush->draw);
+#endif /* XFT */
gr_stylespec_unalloc(&brush->current_attr);
grbrush_deinit(&(brush->grbrush));
}
@@ -139,6 +146,21 @@
}
+#ifdef XFT
+XftDraw *debrush_get_draw(DEBrush *brush, Drawable d)
+{
+ if(brush->draw==NULL)
+ brush->draw=XftDrawCreate(ioncore_g.dpy, d,
+ XftDEDefaultVisual(),
+ DefaultColormap(ioncore_g.dpy,
+ 0));
+ else
+ XftDrawChange(brush->draw, d);
+
+ return brush->draw;
+}
+#endif
+
/*}}}*/
diff -ur notion-3-2015061300/de/brush.h notion-3-2015061300-PATCHED/de/brush.h
--- notion-3-2015061300/de/brush.h 2015-06-13 10:37:26.000000000 -0400
+++ notion-3-2015061300-PATCHED/de/brush.h 2015-07-13 10:37:23.096298747 -0400
@@ -15,6 +15,10 @@
#include <ioncore/gr.h>
#include <ioncore/rectangle.h>
+#ifdef XFT
+#include <X11/Xft/Xft.h>
+#endif /* XFT */
+
INTRCLASS(DEBrush);
#include "style.h"
@@ -33,6 +37,9 @@
DECLCLASS(DEBrush){
GrBrush grbrush;
DEStyle *d;
+#ifdef XFT
+ XftDraw *draw;
+#endif
DEBrushExtrasFn *extras_fn;
int indicator_w;
Window win;
@@ -108,5 +115,8 @@
extern void debrush_fill_area(DEBrush *brush, const WRectangle *geom);
extern void debrush_clear_area(DEBrush *brush, const WRectangle *geom);
+#ifdef XFT
+XftDraw *debrush_get_draw(DEBrush *brush, Drawable d);
+#endif
#endif /* ION_DE_BRUSH_H */
diff -ur notion-3-2015061300/de/colour.c notion-3-2015061300-PATCHED/de/colour.c
--- notion-3-2015061300/de/colour.c 2015-06-13 10:37:26.000000000 -0400
+++ notion-3-2015061300-PATCHED/de/colour.c 2015-07-13 10:37:23.098298633 -0400
@@ -12,9 +12,21 @@
bool de_alloc_colour(WRootWin *rootwin, DEColour *ret, const char *name)
{
+#ifndef XFT
XColor c;
bool ok=FALSE;
+#else /* XFT */
+ if(name==NULL)
+ return FALSE;
+ return XftColorAllocName(
+ ioncore_g.dpy,
+ XftDEDefaultVisual(),
+ rootwin->default_cmap,
+ name,
+ ret);
+#endif /* XFT */
+#ifndef XFT
if(name==NULL)
return FALSE;
@@ -25,11 +37,13 @@
}
return ok;
+#endif /* ! XFT */
}
bool de_duplicate_colour(WRootWin *rootwin, DEColour in, DEColour *out)
{
+#ifndef XFT
XColor c;
c.pixel=in;
XQueryColor(ioncore_g.dpy, rootwin->default_cmap, &c);
@@ -38,11 +52,20 @@
return TRUE;
}
return FALSE;
+#else /* XFT */
+ return XftColorAllocName(
+ ioncore_g.dpy,
+ XftDEDefaultVisual(),
+ rootwin->default_cmap,
+ &(in.color),
+ out);
+#endif /* XFT */
}
void de_free_colour_group(WRootWin *rootwin, DEColourGroup *cg)
{
+#ifndef XFT
DEColour pixels[5];
pixels[0]=cg->bg;
@@ -54,15 +77,26 @@
XFreeColors(ioncore_g.dpy, rootwin->default_cmap, pixels, 5, 0);
gr_stylespec_unalloc(&cg->spec);
+#else /* XFT */
+ de_free_colour(rootwin, cg->bg);
+ de_free_colour(rootwin, cg->fg);
+ de_free_colour(rootwin, cg->hl);
+ de_free_colour(rootwin, cg->sh);
+ de_free_colour(rootwin, cg->pad);
+#endif /* XFT */
}
void de_free_colour(WRootWin *rootwin, DEColour col)
{
+#ifndef XFT
DEColour pixels[1];
pixels[0]=col;
XFreeColors(ioncore_g.dpy, rootwin->default_cmap, pixels, 1, 0);
+#else /* XFT */
+ XftColorFree(ioncore_g.dpy, XftDEDefaultVisual(), rootwin->default_cmap, &col);
+#endif /* XFT */
}
diff -ur notion-3-2015061300/de/colour.h notion-3-2015061300-PATCHED/de/colour.h
--- notion-3-2015061300/de/colour.h 2015-06-13 10:37:26.000000000 -0400
+++ notion-3-2015061300-PATCHED/de/colour.h 2015-07-13 10:37:23.099298576 -0400
@@ -12,12 +12,19 @@
#include <ioncore/common.h>
#include <ioncore/global.h>
#include <ioncore/rootwin.h>
+#ifdef XFT
+#include <X11/Xft/Xft.h>
+#endif /* XFT */
INTRSTRUCT(DEColourGroup);
+#ifndef XFT
typedef unsigned long DEColour;
+#else /* XFT */
+typedef XftColor DEColour;
+#endif /* XFT */
DECLSTRUCT(DEColourGroup){
@@ -34,5 +41,6 @@
bool de_duplicate_colour(WRootWin *rootwin, DEColour in, DEColour *out);
void de_free_colour_group(WRootWin *rootwin, DEColourGroup *cg);
void de_free_colour(WRootWin *rootwin, DEColour col);
+#define XftDEDefaultVisual() DefaultVisual(ioncore_g.dpy, 0)
#endif /* ION_DE_COLOUR_H */
diff -ur notion-3-2015061300/de/draw.c notion-3-2015061300-PATCHED/de/draw.c
--- notion-3-2015061300/de/draw.c 2015-06-13 10:37:26.000000000 -0400
+++ notion-3-2015061300-PATCHED/de/draw.c 2015-07-13 10:37:23.109298008 -0400
@@ -20,6 +20,14 @@
#include <X11/extensions/shape.h>
+#ifndef XFT
+#define PIXEL(x) x
+#else /* XFT */
+#define PIXEL(x) x.pixel
+#endif /* XFT */
+
+
+
/*{{{ Colour group lookup */
@@ -84,8 +92,7 @@
w--;
h--;
- XSetForeground(ioncore_g.dpy, gc, tlc);
-
+ XSetForeground(ioncore_g.dpy, gc, PIXEL(tlc));
a=(br!=0);
b=0;
@@ -104,7 +111,7 @@
}
- XSetForeground(ioncore_g.dpy, gc, brc);
+ XSetForeground(ioncore_g.dpy, gc, PIXEL(brc));
a=(tl!=0);
b=0;
@@ -141,23 +148,23 @@
GrBorderLine line)
{
if(line==GR_BORDERLINE_LEFT && geom->h>0 && tl>0){
- XSetForeground(ioncore_g.dpy, gc, tlc);
- XSetBackground(ioncore_g.dpy, gc, tlc);
+ XSetForeground(ioncore_g.dpy, gc, PIXEL(tlc));
+ XSetBackground(ioncore_g.dpy, gc, PIXEL(tlc));
XFillRectangle(ioncore_g.dpy, win, gc, geom->x, geom->y, tl, geom->h);
geom->x+=tl;
}else if(line==GR_BORDERLINE_TOP && geom->w>0 && tl>0){
- XSetForeground(ioncore_g.dpy, gc, tlc);
- XSetBackground(ioncore_g.dpy, gc, tlc);
+ XSetForeground(ioncore_g.dpy, gc, PIXEL(tlc));
+ XSetBackground(ioncore_g.dpy, gc, PIXEL(tlc));
XFillRectangle(ioncore_g.dpy, win, gc, geom->x, geom->y, geom->w, tl);
geom->y+=tl;
}else if(line==GR_BORDERLINE_RIGHT && geom->h>0 && br>0){
- XSetForeground(ioncore_g.dpy, gc, brc);
- XSetBackground(ioncore_g.dpy, gc, brc);
+ XSetForeground(ioncore_g.dpy, gc, PIXEL(brc));
+ XSetBackground(ioncore_g.dpy, gc, PIXEL(brc));
XFillRectangle(ioncore_g.dpy, win, gc, geom->x+geom->w-br, geom->y, br, geom->h);
geom->w-=br;
}else if(line==GR_BORDERLINE_BOTTOM && geom->w>0 && br>0){
- XSetForeground(ioncore_g.dpy, gc, brc);
- XSetBackground(ioncore_g.dpy, gc, brc);
+ XSetForeground(ioncore_g.dpy, gc, PIXEL(brc));
+ XSetBackground(ioncore_g.dpy, gc, PIXEL(brc));
XFillRectangle(ioncore_g.dpy, win, gc, geom->x, geom->y+geom->h-br, geom->w, br);
geom->h-=br;
}
@@ -388,7 +395,7 @@
}
if(ISSET(a2, GR_ATTR(tagged)) || ISSET(a1, GR_ATTR(tagged))){
- XSetForeground(ioncore_g.dpy, d->copy_gc, cg->fg);
+ XSetForeground(ioncore_g.dpy, d->copy_gc, PIXEL(cg->fg));
copy_masked(brush, d->tag_pixmap, brush->win, 0, 0,
d->tag_pixmap_w, d->tag_pixmap_h,
@@ -437,7 +444,7 @@
GC gc=brush->d->normal_gc;
if(TRUE/*needfill*/){
- XSetForeground(ioncore_g.dpy, gc, cg->bg);
+ XSetForeground(ioncore_g.dpy, gc, PIXEL(cg->bg));
XFillRectangle(ioncore_g.dpy, brush->win, gc, geom->x, geom->y,
geom->w, geom->h);
}
@@ -605,7 +612,7 @@
attr.background_pixmap=ParentRelative;
}else{
attrflags=CWBackPixel;
- attr.background_pixel=brush->d->cgrp.bg;
+ attr.background_pixel=brush->d->PIXEL(cgrp.bg);
}
XChangeWindowAttributes(ioncore_g.dpy, brush->win, attrflags, &attr);
@@ -621,7 +628,7 @@
if(cg==NULL)
return;
- XSetForeground(ioncore_g.dpy, gc, cg->bg);
+ XSetForeground(ioncore_g.dpy, gc, PIXEL(cg->bg));
XFillRectangle(ioncore_g.dpy, brush->win, gc,
geom->x, geom->y, geom->w, geom->h);
}
diff -ur notion-3-2015061300/de/font.c notion-3-2015061300-PATCHED/de/font.c
--- notion-3-2015061300/de/font.c 2015-06-13 10:37:26.000000000 -0400
+++ notion-3-2015061300-PATCHED/de/font.c 2015-07-13 10:37:23.118297497 -0400
@@ -13,7 +13,9 @@
#include <ioncore/common.h>
#include <ioncore/log.h>
#include "font.h"
+#ifndef XFT
#include "fontset.h"
+#endif /* ! XFT */
#include "brush.h"
#include "precompose.h"
@@ -106,6 +108,9 @@
DEFont *de_load_font(const char *fontname)
{
+#ifdef XFT
+ XftFont *font;
+#endif
DEFont *fnt;
XFontSet fontset=NULL;
XFontStruct *fontstruct=NULL;
@@ -120,7 +125,8 @@
return fnt;
}
}
-
+
+#ifndef XFT
if(ioncore_g.use_mb && !(ioncore_g.enc_utf8 && iso10646_font(fontname))){
LOG(DEBUG, FONT, "Loading fontset %s", fontname);
fontset=de_create_font_set(fontname);
@@ -149,13 +155,34 @@
return NULL;
}
+#else /* XFT */
+ if(strncmp(fontname, "xft:", 4)==0){
+ font=XftFontOpenName(ioncore_g.dpy, DefaultScreen(ioncore_g.dpy),
+ fontname+4);
+ }else{
+ font=XftFontOpenXlfd(ioncore_g.dpy, DefaultScreen(ioncore_g.dpy), fontname);
+ }
+
+ if(font==NULL){
+ if(strcmp(fontname, CF_FALLBACK_FONT_NAME)!=0){
+ warn(TR("Could not load font \"%s\", trying \"%s\""),
+ fontname, CF_FALLBACK_FONT_NAME);
+ return de_load_font(CF_FALLBACK_FONT_NAME);
+ }
+ return NULL;
+ }
+#endif /* XFT */
fnt=ALLOC(DEFont);
if(fnt==NULL)
return NULL;
+#ifndef XFT
fnt->fontset=fontset;
fnt->fontstruct=fontstruct;
+#else
+ fnt->font=font;
+#endif
fnt->pattern=scopy(fontname);
fnt->next=NULL;
fnt->prev=NULL;
@@ -175,11 +202,13 @@
style->font=font;
font->refcount++;
+#ifndef XFT
if(style->font->fontstruct!=NULL){
XSetFont(ioncore_g.dpy, style->normal_gc,
style->font->fontstruct->fid);
}
+#endif /* ! XFT */
return TRUE;
}
@@ -194,11 +223,13 @@
if(style->font==NULL)
return FALSE;
+#ifndef XFT
if(style->font->fontstruct!=NULL){
XSetFont(ioncore_g.dpy, style->normal_gc,
style->font->fontstruct->fid);
}
+#endif /* ! XFT */
return TRUE;
}
@@ -208,10 +239,15 @@
if(--font->refcount!=0)
return;
+#ifndef XFT
if(font->fontset!=NULL)
XFreeFontSet(ioncore_g.dpy, font->fontset);
if(font->fontstruct!=NULL)
XFreeFont(ioncore_g.dpy, font->fontstruct);
+#else /* XFT */
+ if(font->font!=NULL)
+ XftFontClose(ioncore_g.dpy, font->font);
+#endif /* XFT */
if(font->pattern!=NULL)
free(font->pattern);
@@ -239,6 +275,7 @@
void defont_get_font_extents(DEFont *font, GrFontExtents *fnte)
{
+#ifndef XFT
if(font->fontset!=NULL){
XFontSetExtents *ext=XExtentsOfFontSet(font->fontset);
if(ext==NULL)
@@ -254,7 +291,14 @@
fnte->baseline=fnt->ascent;
return;
}
-
+#else /* XFT */
+ if(font->font!=NULL){
+ fnte->max_height=font->font->ascent+font->font->descent;
+ fnte->max_width=font->font->max_advance_width;
+ fnte->baseline=font->font->ascent;
+ return;
+ }
+#endif /* XFT */
fail:
DE_RESET_FONT_EXTENTS(fnte);
}
@@ -271,6 +315,7 @@
uint defont_get_text_width(DEFont *font, const char *text, uint len)
{
+#ifndef XFT
if(font->fontset!=NULL){
XRectangle lext;
#ifdef CF_DE_USE_XUTF8
@@ -298,6 +343,18 @@
}else{
return 0;
}
+#else /* XFT */
+ if(font->font!=NULL){
+ XGlyphInfo extents;
+ if(ioncore_g.enc_utf8)
+ XftTextExtentsUtf8(ioncore_g.dpy, font->font, (XftChar8 *)text, len, &extents);
+ else
+ XftTextExtents8(ioncore_g.dpy, font->font, (XftChar8 *)text, len, &extents);
+ return extents.xOff;
+ }else{
+ return 0;
+ }
+#endif /* XFT */
}
@@ -307,6 +364,7 @@
/*{{{ String drawing */
+#ifndef XFT
void debrush_do_draw_string_default(DEBrush *brush, int x, int y,
const char *str, int len, bool needfill,
DEColourGroup *colours)
@@ -366,6 +424,43 @@
}
}
+#else /* XFT */
+void debrush_do_draw_string_default(DEBrush *brush,
+ int x, int y, const char *str,
+ int len, bool needfill,
+ DEColourGroup *colours)
+{
+ Window win = brush->win;
+ GC gc=brush->d->normal_gc;
+ XftDraw *draw;
+ XftFont *font;
+
+ if(brush->d->font==NULL)
+ return;
+
+ font=brush->d->font->font;
+ draw=debrush_get_draw(brush, win);
+
+ if(needfill){
+ XGlyphInfo extents;
+ if(ioncore_g.enc_utf8){
+ XftTextExtentsUtf8(ioncore_g.dpy, font, (XftChar8 *)str, len,
+ &extents);
+ }else{
+ XftTextExtents8(ioncore_g.dpy, font, (XftChar8 *)str, len, &extents);
+ XftDrawRect(draw, &(colours->bg), x-extents.x, y-extents.y,
+ extents.width+10, extents.height);
+ }
+ }
+
+ if(ioncore_g.enc_utf8){
+ XftDrawStringUtf8(draw, &(colours->fg), font, x, y, (XftChar8 *)str,
+ len);
+ }else{
+ XftDrawString8(draw, &(colours->fg), font, x, y, (XftChar8 *)str, len);
+ }
+}
+#endif /* XFT */
void debrush_do_draw_string(DEBrush *brush, int x, int y,
const char *str, int len, bool needfill,
diff -ur notion-3-2015061300/de/font.h notion-3-2015061300-PATCHED/de/font.h
--- notion-3-2015061300/de/font.h 2015-06-13 10:37:26.000000000 -0400
+++ notion-3-2015061300-PATCHED/de/font.h 2015-07-13 10:37:23.119297440 -0400
@@ -12,6 +12,9 @@
#include <ioncore/common.h>
#include <ioncore/gr.h>
+#ifdef XFT
+#include <X11/Xft/Xft.h>
+#endif /* XFT */
INTRSTRUCT(DEFont);
@@ -27,6 +30,9 @@
int refcount;
XFontSet fontset;
XFontStruct *fontstruct;
+#ifdef XFT /* XFT */
+ XftFont *font;
+#endif /* XFT */
DEFont *next, *prev;
};
diff -ur notion-3-2015061300/de/init.c notion-3-2015061300-PATCHED/de/init.c
--- notion-3-2015061300/de/init.c 2015-06-13 10:37:26.000000000 -0400
+++ notion-3-2015061300-PATCHED/de/init.c 2015-07-13 10:37:23.122297270 -0400
@@ -165,17 +165,26 @@
{
bool bgset;
DEColour padinh;
-
+ DEColour black, white;
+
+#ifdef XFT
+ de_alloc_colour(rootwin, &black, "black");
+ de_alloc_colour(rootwin, &white, "white");
+#else
+ black=DE_BLACK(rootwin);
+ white=DE_WHITE(rootwin);
+#endif
+
de_get_colour(rootwin, &(cg->hl), tab, "highlight_colour",
- (based_on ? based_on->cgrp.hl : DE_WHITE(rootwin)));
+ (based_on ? based_on->cgrp.hl : white));
de_get_colour(rootwin, &(cg->sh), tab, "shadow_colour",
- (based_on ? based_on->cgrp.sh : DE_WHITE(rootwin)));
+ (based_on ? based_on->cgrp.sh : white));
de_get_colour(rootwin, &(cg->fg), tab, "foreground_colour",
- (based_on ? based_on->cgrp.fg : DE_WHITE(rootwin)));
+ (based_on ? based_on->cgrp.fg : white));
bgset=de_get_colour(rootwin, &(cg->bg), tab, "background_colour",
- (based_on ? based_on->cgrp.bg : DE_BLACK(rootwin)));
+ (based_on ? based_on->cgrp.bg : black));
- padinh=(based_on ? based_on->cgrp.pad : DE_WHITE(rootwin));
+ padinh=(based_on ? based_on->cgrp.pad : white);
de_get_colour_(rootwin, &(cg->pad), tab, "padding_colour",
(bgset ? cg->bg : padinh), padinh);
diff -ur notion-3-2015061300/de/style.c notion-3-2015061300-PATCHED/de/style.c
--- notion-3-2015061300/de/style.c 2015-06-13 10:37:26.000000000 -0400
+++ notion-3-2015061300-PATCHED/de/style.c 2015-07-13 10:37:23.128296929 -0400
@@ -70,10 +70,17 @@
/*gcv.function=GXclear;*/
gcv.stipple=stipple_pixmap;
gcvmask=GCFillStyle|GCStipple/*|GCFunction*/;
+#ifndef XFT
if(style->font!=NULL && style->font->fontstruct!=NULL){
gcv.font=style->font->fontstruct->fid;
gcvmask|=GCFont;
}
+#else /* XFT */
+// if(style->font!=NULL){
+// gcv.font=style->font;
+// gcvmask|=GCFont;
+// }
+#endif /* XFT */
style->stipple_gc=XCreateGC(dpy, root, gcvmask, &gcv);
XCopyGC(dpy, style->normal_gc,
@@ -201,6 +208,14 @@
bool destyle_init(DEStyle *style, WRootWin *rootwin, const char *name)
{
+ DEColour black, white;
+#ifdef XFT
+ de_alloc_colour(rootwin, &black, "black");
+ de_alloc_colour(rootwin, &white, "white");
+#else
+ black=DE_BLACK(rootwin);
+ white=DE_WHITE(rootwin);
+#endif /* XFT */
if(!gr_stylespec_load(&style->spec, name))
return FALSE;
@@ -223,11 +238,11 @@
style->textalign=DEALIGN_CENTER;
style->cgrp_alloced=FALSE;
- style->cgrp.bg=DE_BLACK(rootwin);
- style->cgrp.pad=DE_BLACK(rootwin);
- style->cgrp.fg=DE_WHITE(rootwin);
- style->cgrp.hl=DE_WHITE(rootwin);
- style->cgrp.sh=DE_WHITE(rootwin);
+ style->cgrp.bg=black;
+ style->cgrp.pad=black;
+ style->cgrp.fg=white;
+ style->cgrp.hl=white;
+ style->cgrp.sh=white;
gr_stylespec_init(&style->cgrp.spec);
style->font=NULL;
diff -ur notion-3-2015061300/de/style.h notion-3-2015061300-PATCHED/de/style.h
--- notion-3-2015061300/de/style.h 2015-06-13 10:37:26.000000000 -0400
+++ notion-3-2015061300-PATCHED/de/style.h 2015-07-13 10:37:23.130296815 -0400
@@ -80,6 +80,7 @@
Pixmap tag_pixmap;
int tag_pixmap_w;
int tag_pixmap_h;
+ int xft_style;
DEStyle *next, *prev;
};
diff -ur notion-3-2015061300/system-autodetect.mk notion-3-2015061300-PATCHED/system-autodetect.mk
--- notion-3-2015061300/system-autodetect.mk 2015-06-13 10:37:26.000000000 -0400
+++ notion-3-2015061300-PATCHED/system-autodetect.mk 2015-07-13 10:38:14.921332013 -0400
@@ -103,6 +103,19 @@
##
+## Xft support
+##
+
+USE_XFT=1
+
+ifeq ($(USE_XFT),1)
+EXTRA_INCLUDES += `pkg-config xft --cflags`
+EXTRA_LIBS += `pkg-config xft --libs`
+DEFINES += -DXFT -DCF_FALLBACK_FONT_NAME=\"Sans\"
+endif
+
+
+##
## Localisation
##

View file

@ -42,7 +42,7 @@ infoFile: let
src = dirOf infoFile;
in {
inherit repo settings;
inherit repo settings info;
build = stdenv.mkDerivation {
name = "${info.project.artifactId}-${info.project.version}.jar";

View file

@ -1,17 +1,17 @@
{ stdenv, fetchurl, unzip }:
{ stdenv, fetchFromGitHub }:
stdenv.mkDerivation rec {
version = "2c11fbfcee";
package-name = "numix-icon-theme";
name = "${package-name}-20150302";
buildInputs = [ unzip ];
src = fetchurl {
url = "https://github.com/numixproject/${package-name}/archive/${version}.zip";
sha256 = "61dc170b8a70b20a9075f06e1668d6bd8907a6db0ef9e3568c473296d0f351e1";
src = fetchFromGitHub {
owner = "numixproject";
repo = package-name;
rev = version;
sha256 = "1bjh2j4vqk9s31syv7ig3hwpp5z0n6sx74iz332y0wdz6ngj5x08";
};
dontBuild = true;
@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
install -dm 755 $out/share/icons
cp -dr --no-preserve='ownership' Numix{,-Light} $out/share/icons/
'';
meta = {
description = "Numix icon theme";
homepage = https://numixproject.org;

View file

@ -24,7 +24,9 @@ stdenv.mkDerivation rec {
preFixup = ''
for f in "$out/libexec/gnome-terminal-server"; do
wrapProgram "$f" --prefix XDG_DATA_DIRS : "$out/share:$GSETTINGS_SCHEMAS_PATH"
wrapProgram "$f" \
--prefix XDG_DATA_DIRS : "$out/share:$GSETTINGS_SCHEMAS_PATH" \
--prefix GIO_EXTRA_MODULES : "${gnome3.dconf}/lib/gio/modules"
done
'';

View file

@ -1,9 +1,9 @@
import ./jdk-linux-base.nix {
productVersion = "8";
patchVersion = "45";
patchVersion = "51";
downloadUrl = http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html;
sha256_i686 = "1y1zymydd1azv14r0hh12zjr8k64wa8wfdbz8sn1css84aqwl87d";
sha256_x86_64 = "0v9ilahx03isxdzh4ryv1bqmmzppckickz22hvgzs785769cm67j";
sha256_i686 = "0awzgs090n2cj6a5mlla0pgxk0y6aslhm6024pqrnxgai1fkmm1z";
sha256_x86_64 = "1wggrcr2gjwkv5bawgcw86h6rhyzw0jphxm1sfwcvhjirh99056p";
jceName = "jce_policy-8.zip";
jceDownloadUrl = http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html;
sha256JCE = "0n8b6b8qmwb14lllk2lk1q1ahd3za9fnjigz5xn65mpg48whl0pk";

View file

@ -265,4 +265,7 @@ self: super: {
# Won't work with LLVM 3.5.
llvm-general = markBrokenVersion "3.4.5.3" super.llvm-general;
# Inexplicable haddock failure
# https://github.com/gregwebs/aeson-applicative/issues/2
aeson-applicative = dontHaddock super.aeson-applicative;
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,40 @@
{ stdenv, fetchFromGitHub, boost, fftw, qt5 }:
let version = "0.11"; in
stdenv.mkDerivation {
name = "libkeyfinder-${version}";
src = fetchFromGitHub {
sha256 = "0674gykdi1nffvba5rv6fsp0zw02w1gkpn9grh8w983xf13ykbz9";
rev = "v${version}";
repo = "libKeyFinder";
owner = "ibsh";
};
meta = with stdenv.lib; {
inherit version;
description = "Musical key detection for digital audio (C++ library)";
homepage = http://www.ibrahimshaath.co.uk/keyfinder/;
license = licenses.gpl3Plus;
platforms = with platforms; linux;
maintainers = with maintainers; [ nckx ];
};
buildInputs = [ fftw qt5.base ];
propagatedBuildInputs = [ boost ];
patchPhase = ''
substituteInPlace LibKeyFinder.pro --replace "/usr/local" "$out"
'';
configurePhase = ''
qmake
'';
enableParallelBuilding = true;
postInstall = ''
mkdir -p $out/include/keyfinder
cp *.h $out/include/keyfinder
'';
}

View file

@ -1,11 +1,11 @@
{ stdenv, fetchFromGitHub, boost, fftw, qt5 }:
{ stdenv, fetchFromGitHub, fftw, qt5 }:
let version = "0.11"; in
let version = "2.1"; in
stdenv.mkDerivation {
name = "libkeyfinder-${version}";
src = fetchFromGitHub {
sha256 = "0674gykdi1nffvba5rv6fsp0zw02w1gkpn9grh8w983xf13ykbz9";
sha256 = "07kc0cl6kirgmpdgkgmp6r3yvyf7b1w569z01g8rfl1cig80qdc7";
rev = "v${version}";
repo = "libKeyFinder";
owner = "ibsh";
@ -21,10 +21,11 @@ stdenv.mkDerivation {
};
buildInputs = [ fftw qt5.base ];
propagatedBuildInputs = [ boost ];
patchPhase = ''
substituteInPlace LibKeyFinder.pro --replace "/usr/local" "$out"
postPatch = ''
substituteInPlace LibKeyFinder.pro \
--replace "/usr/local" "$out" \
--replace "-stdlib=libc++" ""
'';
configurePhase = ''
@ -35,6 +36,8 @@ stdenv.mkDerivation {
postInstall = ''
mkdir -p $out/include/keyfinder
cp *.h $out/include/keyfinder
install -m644 *.h $out/include/keyfinder
mkdir -p $out/lib
cp -a lib*.so* $out/lib
'';
}

View file

@ -0,0 +1,11 @@
--- a/setup.py 2014-03-20 22:27:14.000000000 +0100
+++ b/setup.py 2015-07-10 21:18:30.156196111 +0200
@@ -49,7 +49,7 @@
scripts = ['scripts/poezio'],
data_files = [('share/man/man1/', ['data/poezio.1'])],
- install_requires = ['sleekxmpp==1.2.4',
+ install_requires = ['sleekxmpp==1.2.5',
'dnspython3>=1.11.1'],
extras_require = {'OTR plugin': 'python-potr>=1.0',
'Screen autoaway plugin': 'pyinotify==0.9.4'}

View file

@ -0,0 +1,25 @@
diff -ruN a/src/config.py b/src/config.py
--- a/src/config.py 2014-03-20 22:27:05.000000000 +0100
+++ b/src/config.py 2015-07-10 21:24:37.583136078 +0200
@@ -18,6 +18,7 @@
import os
import logging
+import stat
from configparser import RawConfigParser, NoOptionError, NoSectionError
from os import environ, makedirs, path, remove
@@ -279,6 +280,13 @@
copy2(default, options.filename)
elif path.isfile(other):
copy2(other, options.filename)
+
+ # Inside the nixstore, the reference file is readonly, so is the copy.
+ # Make it writable by the user who just created it.
+ if os.path.exists(options.filename):
+ os.chmod(options.filename,
+ os.stat(options.filename).st_mode | stat.S_IWUSR)
+
firstrun = True
try:

View file

@ -2,12 +2,12 @@
stdenv.mkDerivation rec {
name = "firmware-linux-nonfree-${version}";
version = "2015-06-30";
version = "2015-07-12";
src = fetchgit {
url = "http://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/linux-firmware.git";
rev = "ea901a57054441907e9b127ad407a8554532f992";
sha256 = "00899r0gakdy2vpgq5zbhbxrl4kyczg1kybv1h3m2lrk9a0j7v67";
rev = "5e6d7a9d70b562c60471e234f78137020d65ccbf";
sha256 = "06gvjdqpbayfv696hxn9xjkbzddj1hy6z9aahi156lvj96qb9z49";
};
preInstall = ''

View file

@ -1,13 +1,13 @@
{ stdenv, fetchurl, ... } @ args:
import ./generic.nix (args // rec {
version = "4.2-rc1";
modDirVersion = "4.2.0-rc1";
version = "4.2-rc2";
modDirVersion = "4.2.0-rc2";
extraMeta.branch = "4.2";
src = fetchurl {
url = "mirror://kernel/linux/kernel/v4.x/testing/linux-${version}.tar.xz";
sha256 = "0a9zr1jf2c110lvd7wi4jxxk2iw6san31yh8hwlahkkb8kh4wliw";
sha256 = "068g71ns8d2j66hppmnssilf185p33w7argb0r2w9kplqq2ac99w";
};
features.iwlwifi = true;

View file

@ -1,4 +1,4 @@
{ stdenv, fetchurl, ncurses, python, which, groff, gettext, man_db, bc, libiconv }:
{ stdenv, fetchurl, ncurses, python, which, groff, gettext, man_db, bc, libiconv, coreutils }:
stdenv.mkDerivation rec {
name = "fish-${version}";
@ -15,10 +15,12 @@ stdenv.mkDerivation rec {
# Python: Autocompletion generated from manpages and config editing
propagatedBuildInputs = [ python which groff gettext ]
++ stdenv.lib.optional (!stdenv.isDarwin) man_db
++ [ bc ];
++ [ bc coreutils ];
postInstall = ''
sed -i "s|bc|${bc}/bin/bc|" "$out/share/fish/functions/seq.fish"
sed -e "s|bc|${bc}/bin/bc|" \
-e "s|/usr/bin/seq|${coreutils}/bin/seq|" \
-i "$out/share/fish/functions/seq.fish"
sed -i "s|which |${which}/bin/which |" "$out/share/fish/functions/type.fish"
sed -i "s|nroff |${groff}/bin/nroff |" "$out/share/fish/functions/__fish_print_help.fish"
sed -e "s|gettext |${gettext}/bin/gettext |" \

View file

@ -1,17 +1,15 @@
{ stdenv, fetchurl, groff }:
with stdenv.lib;
stdenv.mkDerivation rec {
let version = "51"; in
stdenv.mkDerivation {
name = "mksh-${version}";
version = "R50d";
src = fetchurl {
urls = [
"http://www.mirbsd.org/MirOS/dist/mir/mksh/${name}.tgz"
"http://pub.allbsd.org/MirOS/dist/mir/mksh/${name}.tgz"
"http://www.mirbsd.org/MirOS/dist/mir/mksh/mksh-R${version}.tgz"
"http://pub.allbsd.org/MirOS/dist/mir/mksh/mksh-R${version}.tgz"
];
sha256 = "10prcdffwziksq9sw96c1r09h4kg2zwznybrggzmjfa6l4k8h9m2";
sha256 = "1pyscl3w4aw067a5hb8mczy3z545jz1dwx9n2b09k09xydgsmvlz";
};
buildInputs = [ groff ];
@ -31,7 +29,8 @@ stdenv.mkDerivation rec {
install -D -m 644 dot.mkshrc $out/share/mksh/mkshrc
'';
meta = {
meta = with stdenv.lib; {
inherit version;
description = "MirBSD Korn Shell";
longDescription = ''
The MirBSD Korn Shell is a DFSG-free and OSD-compliant (and OSI
@ -41,7 +40,7 @@ stdenv.mkDerivation rec {
systems.
'';
homepage = "https://www.mirbsd.org/mksh.htm";
license = stdenv.lib.licenses.free;
license = licenses.free;
maintainers = [ maintainers.AndersonTorres ];
platforms = platforms.unix;
};

View file

@ -2,17 +2,17 @@
pythonPackages.buildPythonPackage rec {
name = "obnam-${version}";
version = "1.8";
version = "1.12";
namePrefix = "";
src = fetchurl rec {
url = "http://code.liw.fi/debian/pool/main/o/obnam/obnam_${version}.orig.tar.gz";
sha256 = "0190yz65hfdq69xws4h1izxz59by0b437d7z1l4cf5ixkv16j17p";
url = "http://code.liw.fi/debian/pool/main/o/obnam/obnam_${version}.orig.tar.xz";
sha256 = "09b9j2mygv1dsrq424j535c92wvlbzpwgzcgg7x922dxrnsdsxpr";
};
buildInputs = [ pythonPackages.sphinx attr ];
propagatedBuildInputs = [ pycrypto pythonPackages.paramiko pythonPackages.tracing pythonPackages.ttystatus pythonPackages.cliapp pythonPackages.larch ];
propagatedBuildInputs = [ pycrypto pythonPackages.paramiko pythonPackages.tracing pythonPackages.ttystatus pythonPackages.cliapp pythonPackages.larch pythonPackages.pyyaml ];
doCheck = false;

View file

@ -2,14 +2,14 @@
, asciidoc, xmlto, docbook_xml_dtd_45, docbook_xsl, libxslt
}:
let version = "4.1.1"; in
let version = "4.1.2"; in
stdenv.mkDerivation rec {
name = "btrfs-progs-${version}";
src = fetchurl {
url = "mirror://kernel/linux/kernel/people/kdave/btrfs-progs/btrfs-progs-v${version}.tar.xz";
sha256 = "1d01f2i5fnnhkp184kfv8b9l37v1dmvqwqr22k71x6k2ss7nkwmp";
sha256 = "04ig3gbfq0zccyqrcrl21g1kp1snqxaflb0i09izp2l6l3361nv2";
};
buildInputs = [

View file

@ -2,7 +2,7 @@
, libnetfilter_conntrack, libnl, libpcap, libsodium, liburcu, ncurses, perl
, pkgconfig, zlib }:
let version = "0.5.9-21-g8c75168"; in
let version = "0.5.9-27-g3beaa23"; in
stdenv.mkDerivation {
name = "netsniff-ng-${version}";
@ -10,8 +10,8 @@ stdenv.mkDerivation {
src = fetchFromGitHub rec {
repo = "netsniff-ng";
owner = repo;
rev = "8c75168ed5005f70955dd4ade93dec6abf481852";
sha256 = "10awwwmpm555wl1z07pz20cq1lsy37r36m0aamck9ri5vyq6fdzw";
rev = "3beaa23d4d33b51a392b56f110c8773151ac19cc";
sha256 = "0k6p57zynrs0ffnvrhbcnfkmvrj6ay2bxpj44ggm7bv327ckdzm7";
};
buildInputs = [ bison flex geoip geolite-legacy libcli libnet libnl

View file

@ -2,12 +2,12 @@
stdenv.mkDerivation rec {
name = "tpm-luks-${version}";
version = "0.9pre";
version = "git-2015-07-11";
src = fetchgit {
url = "https://github.com/shpedoikal/tpm-luks/";
rev = "3fa3ea4bbd34b5b02e9271e775a338fa49dc834f";
sha256 = "37a56f05ad492d3128b07b3cb9dbf85ba8a0dd791329323fb398eb1026dfc89c";
url = "https://github.com/momiji/tpm-luks";
rev = "c9c5b7fdddbcdac1cd4d2ea6baddd0617cc88ffa";
sha256 = "fdd451caddb4e51ede3f2406245e1ace57389596e85aa402c9f2606303707539";
};
buildInputs = [ autoreconfHook gawk trousers cryptsetup openssl ];

View file

@ -0,0 +1,34 @@
{ stdenv, fetchFromGitHub, go }:
stdenv.mkDerivation rec {
version = "0.6.0";
name = "xurls-${version}";
src = fetchFromGitHub {
owner = "mvdan";
repo = "xurls";
rev = "v${version}";
sha256 = "0v9qfvvwy0pq7wp5q19y4a61mcc1sj8vkhvhb8bk603gzprfs10z";
};
buildInputs = [ go ];
buildPhase = ''
mkdir -p src/github.com/mvdan
ln -s $(pwd) src/github.com/mvdan/xurls
export GOPATH=$(pwd)
cd cmd/xurls
go build -v
'';
installPhase = ''
mkdir -p $out/bin
mv xurls $out/bin
'';
meta = with stdenv.lib; {
description = "Extract urls from text";
homepage = https://github.com/mvdan/xurls;
maintainers = [ maintainers.koral ];
};
}

View file

@ -2225,6 +2225,8 @@ let
inherit (perlPackages) IOTty;
};
motuclient = python27Packages.motuclient;
mpage = callPackage ../tools/text/mpage { };
mr = callPackage ../applications/version-management/mr { };
@ -3126,6 +3128,8 @@ let
torsocks = callPackage ../tools/security/tor/torsocks.nix { };
tpmmanager = callPackage ../applications/misc/tpmmanager { };
tpm-quote-tools = callPackage ../tools/security/tpm-quote-tools { };
tpm-tools = callPackage ../tools/security/tpm-tools { };
@ -3494,6 +3498,8 @@ let
xtreemfs = callPackage ../tools/filesystems/xtreemfs {};
xurls = callPackage ../tools/text/xurls {};
xvfb_run = callPackage ../tools/misc/xvfb-run { inherit (texFunctions) fontsConf; };
xvkbd = callPackage ../tools/X11/xvkbd {
@ -7043,6 +7049,7 @@ let
libkate = callPackage ../development/libraries/libkate { };
libkeyfinder_0_11 = callPackage ../development/libraries/libkeyfinder/0.11.nix { };
libkeyfinder = callPackage ../development/libraries/libkeyfinder { };
libksba = callPackage ../development/libraries/libksba { };
@ -9025,6 +9032,8 @@ let
seabios = callPackage ../applications/virtualization/seabios { };
cbfstool = callPackage ../applications/virtualization/cbfstool { };
pgpool92 = pgpool.override { postgresql = postgresql92; };
pgpool93 = pgpool.override { postgresql = postgresql93; };
pgpool94 = pgpool.override { postgresql = postgresql94; };
@ -12077,6 +12086,8 @@ let
mutt-kz = callPackage ../applications/networking/mailreaders/mutt-kz { };
notion = callPackage ../applications/window-managers/notion { };
openshift = callPackage ../applications/networking/cluster/openshift { };
panamax_api = callPackage ../applications/networking/cluster/panamax/api {
@ -12301,6 +12312,8 @@ let
plugin-torture = callPackage ../applications/audio/plugin-torture { };
poezio = python3Packages.poezio;
pommed = callPackage ../os-specific/linux/pommed {
inherit (xorg) libXpm;
};

View file

@ -1977,6 +1977,23 @@ let self = _self // overrides; _self = with self; {
};
};
CryptOpenSSLAES = buildPerlPackage rec {
name = "Crypt-OpenSSL-AES-0.02";
src = fetchurl {
url = "mirror://cpan/authors/id/T/TT/TTAR/${name}.tar.gz";
sha256 = "b66fab514edf97fc32f58da257582704a210c2b35e297d5c31b7fa2ffd08e908";
};
NIX_CFLAGS_COMPILE = "-I${pkgs.openssl}/include";
NIX_CFLAGS_LINK = "-L${pkgs.openssl}/lib -lcrypto";
meta = with stdenv.lib; {
homepage = https://metacpan.org/release/Crypt-OpenSSL-AES;
description = "Perl wrapper around OpenSSL's AES library";
license = with licenses; [ artistic1 gpl1Plus ];
maintainers = [ maintainers.rycee ];
platforms = platforms.unix;
};
};
CryptOpenSSLBignum = buildPerlPackage rec {
name = "Crypt-OpenSSL-Bignum-0.04";
src = fetchurl {

View file

@ -2848,6 +2848,25 @@ let
};
};
dnspython3 = buildPythonPackage rec {
name = "dnspython3-${version}";
version = "1.12.0";
disabled = (!isPy3k);
src = pkgs.fetchurl {
url = "https://pypi.python.org/packages/source/d/dnspython3/${name}.zip";
sha256 = "138wxj702vx6zni9g2y8dbgbpin95v6hk23rh2kwfr3q4130jqz9";
};
meta = {
description = "A DNS toolkit for Python 3.x";
homepage = http://www.dnspython.org;
# BSD-like, check http://www.dnspython.org/LICENSE for details
license = licenses.free;
};
};
docker = buildPythonPackage rec {
name = "docker-py-1.1.0";
@ -3820,6 +3839,32 @@ let
};
};
motuclient = buildPythonPackage rec {
name = "motu-client-${version}";
version = "1.0.8";
namePrefix = "";
disabled = !isPy27;
src = pkgs.fetchurl {
url = "https://gitlab.com/lsix/motu-client/repository/archive.tar.gz?ref=${name}";
sha256 = "1d2hbws085hxf5hb1wsdlacy8skwn2sswr1b2xv18fbw5ckbqi8i";
};
meta = {
homepage = https://gitlab.com/lsix/motu-client;
description = "CLI to query oceanographic data to Motu servers";
longDescription = ''
Access data from (motu)[http://sourceforge.net/projects/cls-motu/] servers.
This is a refactored fork of the original release in order to simplify integration,
deployment and packaging. Upstream code can be found at
http://sourceforge.net/projects/cls-motu/ .
'';
license = licenses.lgpl3Plus;
maintainers = [ maintainers.lsix ];
};
};
mwlib-ext = buildPythonPackage rec {
version = "0.13.2";
name = "mwlib.ext-${version}";
@ -7928,6 +7973,25 @@ let
};
};
sleekxmpp = buildPythonPackage rec {
name = "sleekxmpp-${version}";
version = "1.2.5";
disabled = (!isPy3k);
propagatedBuildInputs = with self ; [ dnspython3 pyasn1 ];
src = pkgs.fetchurl {
url = "https://github.com/fritzy/SleekXMPP/archive/${version}.tar.gz";
sha256 = "1hqs2w5d7x532psfqipd2wl1mkmsaak83jvp1rh9rv406fzp9h67";
};
meta = {
description = "XMPP library for Python";
license = licenses.mit;
homepage = "http://sleekxmpp.com/";
};
};
netaddr = buildPythonPackage rec {
name = "netaddr-0.7.5";
@ -16583,5 +16647,31 @@ let
};
};
poezio = buildPythonPackage rec {
name = "poezio-${version}";
version = "0.8.1";
namePrefix = "";
disabled = (!isPy3k);
propagatedBuildInputs = with self ; [ dnspython3 sleekxmpp ];
patches =
let patch_base = ../development/python-modules/poezio ;
in [ "${patch_base}/make_default_config_writable.patch"
"${patch_base}/fix_requirements.patch"
];
src = pkgs.fetchurl {
url = "http://dev.louiz.org/attachments/download/52/${name}.tar.xz";
sha256 = "0n3phh3lc82609ssfvqvd4papvhykd1sf2bm88dggh2x4mypwjff";
};
meta = {
description = "Free console XMPP client";
homepage = http://poez.io;
license = licenses.mit;
maintainers = [ maintainers.lsix ];
};
};
}; in pythonPackages