Merge remote-tracking branch 'origin/master' into closure-size

This commit is contained in:
Luca Bruno 2015-11-25 21:31:09 +01:00
commit a412927924
659 changed files with 46562 additions and 13611 deletions

View file

@ -33,10 +33,8 @@ For pull-requests, please rebase onto nixpkgs `master`.
* [Manual (NixOS)](https://nixos.org/nixos/manual/)
* [Nix Wiki](https://nixos.org/wiki/)
* [Continuous package builds for unstable/master](https://hydra.nixos.org/jobset/nixos/trunk-combined)
* [Continuous package builds for 14.12 release](https://hydra.nixos.org/jobset/nixos/release-14.12)
* [Continuous package builds for 15.09 release](https://hydra.nixos.org/jobset/nixos/release-15.09)
* [Tests for unstable/master](https://hydra.nixos.org/job/nixos/trunk-combined/tested#tabs-constituents)
* [Tests for 14.12 release](https://hydra.nixos.org/job/nixos/release-14.12/tested#tabs-constituents)
* [Tests for 15.09 release](https://hydra.nixos.org/job/nixos/release-15.09/tested#tabs-constituents)
Communication:

View file

@ -741,7 +741,7 @@ the following arguments are of special significance to the function:
</para>
<para>
In this example only <literal>code.google.com/p/go.net/ipv4</literal> and
<literal>code.google.com/p/go.net/ipv4</literal> will be built.
<literal>code.google.com/p/go.net/ipv6</literal> will be built.
</para>
</callout>
@ -764,7 +764,7 @@ the following arguments are of special significance to the function:
<para>
<varname>propagatedBuildInputs</varname> is where the dependencies of a Go library are
listed. Only libraries should list <varname>propagatedBuildInputs</varname>. If a standalone
program is being build instead, use <varname>buildInputs</varname>. If a library's tests require
program is being built instead, use <varname>buildInputs</varname>. If a library's tests require
additional dependencies that are not propagated, they should be listed in <varname>buildInputs</varname>.
</para>
</callout>

View file

@ -17,10 +17,11 @@ let
systems = import ./systems.nix;
customisation = import ./customisation.nix;
licenses = import ./licenses.nix;
sandbox = import ./sandbox.nix;
in
{ inherit trivial lists strings stringsWithDeps attrsets sources options
modules types meta debug maintainers licenses platforms systems;
modules types meta debug maintainers licenses platforms systems sandbox;
}
# !!! don't include everything at top-level; perhaps only the most
# commonly used functions.

View file

@ -411,7 +411,7 @@ rec {
nixType = x:
if isAttrs x then
if x ? outPath then "derivation"
else "aattrs"
else "attrs"
else if isFunction x then "function"
else if isList x then "list"
else if x == true then "bool"

View file

@ -402,6 +402,11 @@ lib.mapAttrs (n: v: v // { shortName = n; }) rec {
fullName = "TCL/TK License";
};
ufl = {
fullName = "Ubuntu Font License 1.0";
url = http://font.ubuntu.com/ufl/ubuntu-font-licence-1.0.txt;
};
unfree = {
fullName = "Unfree";
free = false;

View file

@ -103,6 +103,7 @@
flosse = "Markus Kohlhase <mail@markus-kohlhase.de>";
fluffynukeit = "Daniel Austin <dan@fluffynukeit.com>";
forkk = "Andrew Okin <forkk@forkk.net>";
fornever = "Friedrich von Never <friedrich@fornever.me>";
fpletz = "Franz Pletz <fpletz@fnordicwalking.de>";
fps = "Florian Paul Schmidt <mista.tapas@gmx.net>";
fridh = "Frederik Rietdijk <fridh@fridh.nl>";
@ -228,6 +229,7 @@
pjones = "Peter Jones <pjones@devalot.com>";
pkmx = "Chih-Mao Chen <pkmx.tw@gmail.com>";
plcplc = "Philip Lykke Carlsen <plcplc@gmail.com>";
Phlogistique = "Noé Rubinstein <noe.rubinstein@gmail.com>";
pmahoney = "Patrick Mahoney <pat@polycrystal.org>";
pmiddend = "Philipp Middendorf <pmidden@secure.mailbox.org>";
prikhi = "Pavan Rikhi <pavan.rikhi@gmail.com>";
@ -253,6 +255,7 @@
romildo = "José Romildo Malaquias <malaquias@gmail.com>";
rszibele = "Richard Szibele <richard_szibele@hotmail.com>";
rushmorem = "Rushmore Mushambi <rushmore@webenchanter.com>";
rvl = "Rodney Lorrimar <dev+nix@rodney.id.au>";
rycee = "Robert Helgesson <robert@rycee.net>";
samuelrivas = "Samuel Rivas <samuelrivas@gmail.com>";
sander = "Sander van der Burg <s.vanderburg@tudelft.nl>";

47
lib/sandbox.nix Normal file
View file

@ -0,0 +1,47 @@
with import ./strings.nix;
/* Helpers for creating lisp S-exprs for the Apple sandbox
lib.sandbox.allowFileRead [ "/usr/bin/file" ];
# => "(allow file-read* (literal \"/usr/bin/file\"))";
lib.sandbox.allowFileRead {
literal = [ "/usr/bin/file" ];
subpath = [ "/usr/lib/system" ];
}
# => "(allow file-read* (literal \"/usr/bin/file\") (subpath \"/usr/lib/system\"))"
*/
let
sexp = tokens: "(" + builtins.concatStringsSep " " tokens + ")";
generateFileList = files:
if builtins.isList files
then concatMapStringsSep " " (x: sexp [ "literal" ''"${x}"'' ]) files
else if builtins.isString files
then generateFileList [ files ]
else concatStringsSep " " (
(map (x: sexp [ "literal" ''"${x}"'' ]) (files.literal or [])) ++
(map (x: sexp [ "subpath" ''"${x}"'' ]) (files.subpath or []))
);
applyToFiles = f: act: files: f "${act} ${generateFileList files}";
genActions = actionName: let
action = feature: sexp [ actionName feature ];
self = {
"${actionName}" = action;
"${actionName}File" = applyToFiles action "file*";
"${actionName}FileRead" = applyToFiles action "file-read*";
"${actionName}FileReadMetadata" = applyToFiles action "file-read-metadata";
"${actionName}DirectoryList" = self."${actionName}FileReadMetadata";
"${actionName}FileWrite" = applyToFiles action "file-write*";
"${actionName}FileWriteMetadata" = applyToFiles action "file-write-metadata";
};
in self;
in
genActions "allow" // genActions "deny" // {
importProfile = derivation: ''
(import "${derivation}")
'';
}

View file

@ -225,4 +225,12 @@ rec {
# Check whether a value is a store path.
isStorePath = x: builtins.substring 0 1 (toString x) == "/" && dirOf (builtins.toPath x) == builtins.storeDir;
# Convert string to int
# Obviously, it is a bit hacky to use fromJSON that way.
toInt = str:
let may_be_int = builtins.fromJSON str; in
if builtins.isInt may_be_int
then may_be_int
else throw "Could not convert ${str} to int.";
}

View file

@ -7,7 +7,7 @@ runTests {
expr = id 1;
expected = 1;
};
testConst = {
expr = const 2 3;
expected = 2;
@ -19,12 +19,12 @@ runTests {
expected = true;
};
*/
testAnd = {
expr = and true false;
expected = false;
};
testFix = {
expr = fix (x: {a = if x ? a then "a" else "b";});
expected = {a = "a";};
@ -67,7 +67,7 @@ runTests {
};
testOverridableDelayableArgsTest = {
expr =
expr =
let res1 = defaultOverridableDelayableArgs id {};
res2 = defaultOverridableDelayableArgs id { a = 7; };
res3 = let x = defaultOverridableDelayableArgs id { a = 7; };
@ -87,7 +87,7 @@ runTests {
in (x2.replace) { a = 10; }; # and override the value by 10
# fixed tests (delayed args): (when using them add some comments, please)
resFixed1 =
resFixed1 =
let x = defaultOverridableDelayableArgs id ( x : { a = 7; c = x.fixed.b; });
y = x.merge (x : { name = "name-${builtins.toString x.fixed.c}"; });
in (y.merge) { b = 10; };
@ -109,5 +109,15 @@ runTests {
expr = sort builtins.lessThan [ 40 2 30 42 ];
expected = [2 30 40 42];
};
testToIntShouldConvertStringToInt = {
expr = toInt "27";
expected = 27;
};
testToIntShouldThrowErrorIfItCouldNotConvertToInt = {
expr = builtins.tryEval (toInt "\"foo\"");
expected = { success = false; value = false; };
};
}

View file

@ -12,8 +12,46 @@ rec {
and = x: y: x && y;
mergeAttrs = x: y: x // y;
# Take a function and evaluate it with its own returned value.
fix = f: let result = f result; in result;
# Compute the fixed point of the given function `f`, which is usually an
# attribute set that expects its final, non-recursive representation as an
# argument:
#
# f = self: { foo = "foo"; bar = "bar"; foobar = self.foo + self.bar; }
#
# Nix evaluates this recursion until all references to `self` have been
# resolved. At that point, the final result is returned and `f x = x` holds:
#
# nix-repl> fix f
# { bar = "bar"; foo = "foo"; foobar = "foobar"; }
#
# See https://en.wikipedia.org/wiki/Fixed-point_combinator for further
# details.
fix = f: let x = f x; in x;
# A variant of `fix` that records the original recursive attribute set in the
# result. This is useful in combination with the `extends` function to
# implement deep overriding. See pkgs/development/haskell-modules/default.nix
# for a concrete example.
fix' = f: let x = f x // { __unfix__ = f; }; in x;
# Modify the contents of an explicitly recursive attribute set in a way that
# honors `self`-references. This is accomplished with a function
#
# g = self: super: { foo = super.foo + " + "; }
#
# that has access to the unmodified input (`super`) as well as the final
# non-recursive representation of the attribute set (`self`). `extends`
# differs from the native `//` operator insofar as that it's applied *before*
# references to `self` are resolved:
#
# nix-repl> fix (extends g f)
# { bar = "bar"; foo = "foo + "; foobar = "foo + bar"; }
#
# The name of the function is inspired by object-oriented inheritance, i.e.
# think of it as an infix operator `g extends f` that mimics the syntax from
# Java. It may seem counter-intuitive to have the "base class" as the second
# argument, but it's nice this way if several uses of `extends` are cascaded.
extends = f: rattrs: self: let super = rattrs self; in super // f self super;
# Flip the order of the arguments of a binary function.
flip = f: a: b: f b a;

View file

@ -1,12 +1,20 @@
{ configuration ? import ./lib/from-env.nix "NIXOS_CONFIG" <nixos-config>
, system ? builtins.currentSystem
, extraModules ? []
# This attribute is used to specify a different nixos version, a different
# system or additional modules which might be set conditionally.
, reEnter ? false
}:
let
reEnterModule = {
config.nixos.path = with (import ../lib); mkIf reEnter (mkForce null);
config.nixos.configuration = configuration;
};
eval = import ./lib/eval-config.nix {
inherit system;
modules = [ configuration ];
modules = [ configuration reEnterModule ] ++ extraModules;
};
inherit (eval) pkgs;
@ -14,14 +22,14 @@ let
# This is for `nixos-rebuild build-vm'.
vmConfig = (import ./lib/eval-config.nix {
inherit system;
modules = [ configuration ./modules/virtualisation/qemu-vm.nix ];
modules = [ configuration reEnterModule ./modules/virtualisation/qemu-vm.nix ] ++ extraModules;
}).config;
# This is for `nixos-rebuild build-vm-with-bootloader'.
vmWithBootLoaderConfig = (import ./lib/eval-config.nix {
inherit system;
modules =
[ configuration
[ configuration reEnterModule
./modules/virtualisation/qemu-vm.nix
{ virtualisation.useBootLoader = true; }
];
@ -30,7 +38,7 @@ let
in
{
inherit (eval) config options;
inherit (eval.config.nixos.reflect) config options;
system = eval.config.system.build.toplevel;

View file

@ -26,6 +26,7 @@ effect after you run <command>nixos-rebuild</command>.</para>
<!-- FIXME: auto-include NixOS module docs -->
<xi:include href="postgresql.xml" />
<xi:include href="nixos.xml" />
<!-- Apache; libvirtd virtualisation -->

View file

@ -55,6 +55,7 @@ let
cp -prd $sources/* . # */
chmod -R u+w .
cp ${../../modules/services/databases/postgresql.xml} configuration/postgresql.xml
cp ${../../modules/misc/nixos.xml} configuration/nixos.xml
ln -s ${optionsDocBook} options-db.xml
echo "${version}" > version
'';

View file

@ -39,8 +39,8 @@ running NixOS system through several other means:
<para>Using NixOps, the NixOS-based cloud deployment tool, which
allows you to provision VirtualBox and EC2 NixOS instances from
declarative specifications. Check out the <link
xlink:href="https://github.com/NixOS/nixops">NixOps
homepage</link> for details.</para>
xlink:href="https://nixos.org/nixops">NixOps homepage</link> for
details.</para>
</listitem>
</itemizedlist>

View file

@ -6,6 +6,26 @@
<title>Unstable</title>
<para>In addition to numerous new and upgraded packages, this release
has the following highlights:</para>
<itemizedlist>
<listitem>
<para>You can now pin a specific version of NixOS in your <filename>configuration.nix</filename>
by setting:
<programlisting>
nixos.path = ./nixpkgs-unstable-2015-12-06/nixos;
</programlisting>
This will make NixOS re-evaluate your configuration with the modules of
the specified NixOS version at the given path. For more details, see
<xref linkend="module-misc-nixos" /></para>
</listitem>
</itemizedlist>
<para>When upgrading from a previous release, please be aware of the
following incompatible changes:</para>
@ -54,6 +74,21 @@ nginx.override {
</para>
</listitem>
<listitem>
<para><command>s3sync</command> is removed, as it hasn't been
developed by upstream for 4 years and only runs with ruby 1.8.
For an actively-developer alternative look at
<command>tarsnap</command> and others.
</para>
</listitem>
<listitem>
<para><command>ruby_1_8</command> has been removed as it's not
supported from upstream anymore and probably contains security
issues.
</para>
</listitem>
</itemizedlist>
</section>

View file

@ -235,6 +235,8 @@
kibana = 211;
xtreemfs = 212;
calibre-server = 213;
heapster = 214;
bepasty = 215;
# When adding a uid, make sure it doesn't match an existing gid. And don't use uids above 399!
@ -448,6 +450,7 @@
#kibana = 211;
xtreemfs = 212;
calibre-server = 213;
bepasty = 215;
# When adding a gid, make sure it doesn't match an existing
# uid. Users and groups with the same name should have equal

View file

@ -0,0 +1,82 @@
{ config, options, lib, ... }:
# This modules is used to inject a different NixOS version as well as its
# argument such that one can pin a specific version with the versionning
# system of the configuration.
let
nixosReentry = import config.nixos.path {
inherit (config.nixos) configuration extraModules;
inherit (config.nixpkgs) system;
reEnter = true;
};
in
with lib;
{
options = {
nixos.path = mkOption {
default = null;
example = literalExample "./nixpkgs-15.09/nixos";
type = types.nullOr types.path;
description = ''
This option give the ability to evaluate the current set of modules
with a different version of NixOS. This option can be used version
the version of NixOS with the configuration without relying on the
<literal>NIX_PATH</literal> environment variable.
'';
};
nixos.system = mkOption {
example = "i686-linux";
type = types.uniq types.str;
description = ''
Name of the system used to compile NixOS.
'';
};
nixos.extraModules = mkOption {
default = [];
example = literalExample "mkIf config.services.openssh.enable [ ./sshd-config.nix ]";
type = types.listOf types.unspecified;
description = ''
Define additional modules which would be loaded to evaluate the
configuration.
'';
};
nixos.configuration = mkOption {
type = types.unspecified;
internal = true;
description = ''
Option used by <filename>nixos/default.nix</filename> to re-inject
the same configuration module as the one used for the current
execution.
'';
};
nixos.reflect = mkOption {
default = { inherit config options; };
type = types.unspecified;
internal = true;
description = ''
Provides <literal>config</literal> and <literal>options</literal>
computed by the module system and given as argument to all
modules. These are used for introspection of options and
configuration by tools such as <literal>nixos-option</literal>.
'';
};
};
config = mkMerge [
(mkIf (config.nixos.path != null) (mkForce {
system.build.toplevel = nixosReentry.system;
system.build.vm = nixosReentry.vm;
nixos.reflect = { inherit (nixosReentry) config options; };
}))
{ meta.maintainers = singleton lib.maintainers.pierron;
meta.doc = ./nixos.xml;
}
];
}

View file

@ -0,0 +1,84 @@
<chapter xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xi="http://www.w3.org/2001/XInclude"
version="5.0"
xml:id="module-misc-nixos">
<title>NixOS Reentry</title>
<!-- FIXME: render nicely -->
<!-- FIXME: source can be added automatically -->
<para><emphasis>Source:</emphasis> <filename>modules/misc/nixos.nix</filename></para>
<!-- FIXME: more stuff, like maintainer? -->
<para>NixOS reentry can be used for both pinning the evaluation to a
specific version of NixOS, and to dynamically add additional modules into
the Module evaluation.</para>
<section><title>NixOS Version Pinning</title>
<para>To pin a specific version of NixOS, you need a version that you can
either clone localy, or that you can fetch remotely.</para>
<para>If you already have a cloned version of NixOS in the directory
<filename>/etc/nixos/nixpkgs-16-03</filename>, then you can specify the
<option>nixos.path</option> with either the path or the relative path of
your NixOS clone. For example, you can add the following to your
<filename>/etc/nixos/configuration.nix</filename> file:
<programlisting>
nixos.path = ./nixpkgs-16-03/nixos;
</programlisting>
</para>
<para>Another option is to fetch a specific version of NixOS, with either
the <literal>fetchTarball</literal> builtin, or the
<literal>pkgs.fetchFromGithub</literal> function and use the result as an
input.
<programlisting>
nixos.path = "${builtins.fetchTarball https://github.com/NixOS/nixpkgs/archive/1f27976e03c15183191d1b4aa1a40d1f14666cd2.tar.gz}/nixos";
</programlisting>
</para>
</section>
<section><title>Adding Module Dynamically</title>
<para>To add additional module, the recommended way is to use statically
known modules in the list of imported arguments as described in <xref
linkend="sec-modularity" />. Unfortunately, this recommended method has
limitation, such that the list of imported files cannot be selected based on
the content of the configuration.
Fortunately, NixOS reentry system can be used as an alternative to register
new imported modules based on the content of the configuration. To do so,
one should define both <option>nixos.path</option> and
<option>nixos.extraModules</option> options.
<programlisting>
nixos.path = &lt;nixos&gt;;
nixos.extraModules =
if config.networking.hostName == "server" then
[ ./server.nix ] else [ ./client.nix ];
</programlisting>
Also note, that the above can be reimplemented in a different way which is
not as expensive, by using <literal>mkIf</literal> at the top each
configuration if both modules are present on the file system (see <xref
linkend="sec-option-definitions" />) and by always inmporting both
modules.</para>
</section>
<section><title>Options</title>
<para>FIXME: auto-generated list of module options.</para>
</section>
</chapter>

View file

@ -52,6 +52,7 @@
./misc/lib.nix
./misc/locate.nix
./misc/meta.nix
./misc/nixos.nix
./misc/nixpkgs.nix
./misc/passthru.nix
./misc/version.nix
@ -189,6 +190,7 @@
./services/mail/spamassassin.nix
./services/misc/apache-kafka.nix
./services/misc/autofs.nix
./services/misc/bepasty.nix
./services/misc/canto-daemon.nix
./services/misc/calibre-server.nix
./services/misc/cpuminer-cryptonight.nix
@ -238,6 +240,8 @@
./services/monitoring/dd-agent.nix
./services/monitoring/grafana.nix
./services/monitoring/graphite.nix
./services/monitoring/heapster.nix
./services/monitoring/longview.nix
./services/monitoring/monit.nix
./services/monitoring/munin.nix
./services/monitoring/nagios.nix

View file

@ -1,7 +1,7 @@
# This module defines the software packages included in the "minimal"
# installation CD. It might be useful elsewhere.
{ config, pkgs, ... }:
{ config, lib, pkgs, ... }:
{
# Include some utilities that are useful for installing or repairing
@ -50,5 +50,5 @@
boot.supportedFilesystems = [ "btrfs" "reiserfs" "vfat" "f2fs" "xfs" "zfs" "ntfs" "cifs" ];
# Configure host id for ZFS to work
networking.hostId = "8425e349";
networking.hostId = lib.mkDefault "8425e349";
}

View file

@ -90,8 +90,8 @@ in
promptInit = mkOption {
default = ''
if test "$TERM" != "dumb"; then
# Provide a nice prompt.
# Provide a nice prompt if the terminal supports it.
if [ "$TERM" != "dumb" -o -n "$INSIDE_EMACS" ]; then
PROMPT_COLOR="1;31m"
let $UID && PROMPT_COLOR="1;32m"
PS1="\n\[\033[$PROMPT_COLOR\][\u@\h:\w]\\$\[\033[0m\] "

View file

@ -27,7 +27,7 @@ in
};
config = mkIf cfg.enable {
environment.systemPackages = [ pkgs.ibus ];
environment.systemPackages = [ pkgs.ibus pkgs.gnome3.dconf ];
gtkPlugins = [ pkgs.ibus ];
qtPlugins = [ pkgs.ibus-qt ];

View file

@ -25,7 +25,7 @@ in
enable = mkOption {
default = false;
description = ''
Whenever to configure Zsh as an interactive shell.
Whether to configure zsh as an interactive shell.
'';
type = types.bool;
};
@ -73,6 +73,14 @@ in
type = types.lines;
};
enableCompletion = mkOption {
default = true;
description = ''
Enable zsh completion for all interactive zsh shells.
'';
type = types.bool;
};
};
};
@ -101,6 +109,13 @@ in
export HISTFILE=$HOME/.zsh_history
setopt HIST_IGNORE_DUPS SHARE_HISTORY HIST_FCNTL_LOCK
# Tell zsh how to find installed completions
for p in ''${(z)NIX_PROFILES}; do
fpath+=($p/share/zsh/site-functions $p/share/zsh/$ZSH_VERSION/functions)
done
${if cfg.enableCompletion then "autoload -U compinit && compinit" else ""}
'';
};
@ -161,7 +176,8 @@ in
environment.etc."zinputrc".source = ./zinputrc;
environment.systemPackages = [ pkgs.zsh ];
environment.systemPackages = [ pkgs.zsh ]
++ optional cfg.enableCompletion pkgs.nix-zsh-completions;
#users.defaultUserShell = mkDefault "/run/current-system/sw/bin/zsh";

View file

@ -512,6 +512,7 @@ in {
wantedBy = [ "multi-user.target" ];
requires = ["kubernetes-setup.service"];
after = [ "network-interfaces.target" "etcd.service" "docker.service" ];
path = [ pkgs.gitMinimal pkgs.openssh ];
script = ''
export PATH="/bin:/sbin:/usr/bin:/usr/sbin:$PATH"
exec ${cfg.package}/bin/kubelet \

View file

@ -5,43 +5,103 @@ with lib;
let
cfg = config.services.influxdb;
influxdbConfig = pkgs.writeText "config.toml" ''
bind-address = "${cfg.bindAddress}"
configOptions = recursiveUpdate {
meta = {
bind-address = ":8088";
commit-timeout = "50ms";
dir = "${cfg.dataDir}/meta";
election-timeout = "1s";
heartbeat-timeout = "1s";
hostname = "localhost";
leader-lease-timeout = "500ms";
retention-autocreate = true;
};
[logging]
level = "info"
file = "stdout"
data = {
dir = "${cfg.dataDir}/data";
wal-dir = "${cfg.dataDir}/wal";
max-wal-size = 104857600;
wal-enable-logging = true;
wal-flush-interval = "10m";
wal-partition-flush-delay = "2s";
};
[admin]
port = ${toString cfg.adminPort}
assets = "${pkgs.influxdb}/share/influxdb/admin"
cluster = {
shard-writer-timeout = "5s";
write-timeout = "5s";
};
[api]
port = ${toString cfg.apiPort}
${cfg.apiExtraConfig}
retention = {
enabled = true;
check-interval = "30m";
};
[input_plugins]
${cfg.inputPluginsConfig}
http = {
enabled = true;
auth-enabled = false;
bind-address = ":8086";
https-enabled = false;
log-enabled = true;
pprof-enabled = false;
write-tracing = false;
};
[raft]
dir = "${cfg.dataDir}/raft"
${cfg.raftConfig}
monitor = {
store-enabled = false;
store-database = "_internal";
store-interval = "10s";
};
[storage]
dir = "${cfg.dataDir}/db"
${cfg.storageConfig}
admin = {
enabled = true;
bind-address = ":8083";
https-enabled = false;
};
[cluster]
${cfg.clusterConfig}
graphite = [{
enabled = false;
}];
[sharding]
${cfg.shardingConfig}
udp = [{
enabled = false;
}];
[wal]
dir = "${cfg.dataDir}/wal"
${cfg.walConfig}
collectd = {
enabled = false;
typesdb = "${pkgs.collectd}/share/collectd/types.db";
database = "collectd_db";
port = 25826;
};
${cfg.extraConfig}
opentsdb = {
enabled = false;
};
continuous_queries = {
enabled = true;
log-enabled = true;
recompute-previous-n = 2;
recompute-no-older-than = "10m";
compute-runs-per-interval = 10;
compute-no-more-than = "2m";
};
hinted-handoff = {
enabled = true;
dir = "${cfg.dataDir}/hh";
max-size = 1073741824;
max-age = "168h";
retry-rate-limit = 0;
retry-interval = "1s";
};
} cfg.extraConfig;
configFile = pkgs.runCommand "config.toml" {
buildInputs = [ pkgs.remarshal ];
} ''
remarshal -if json -of toml \
< ${pkgs.writeText "config.json" (builtins.toJSON configOptions)} \
> $out
'';
in
{
@ -82,124 +142,10 @@ in
type = types.path;
};
bindAddress = mkOption {
default = "127.0.0.1";
description = "Address where influxdb listens";
type = types.str;
};
adminPort = mkOption {
default = 8083;
description = "The port where influxdb admin listens";
type = types.int;
};
apiPort = mkOption {
default = 8086;
description = "The port where influxdb api listens";
type = types.int;
};
apiExtraConfig = mkOption {
default = ''
read-timeout = "5s"
'';
description = "Extra influxdb api configuration";
example = ''
ssl-port = 8084
ssl-cert = /path/to/cert.pem
read-timeout = "5s"
'';
type = types.lines;
};
inputPluginsConfig = mkOption {
default = "";
description = "Configuration of influxdb extra plugins";
example = ''
[input_plugins.graphite]
enabled = true
port = 2003
database = "graphite"
'';
};
raftConfig = mkOption {
default = ''
port = 8090
'';
description = "Influxdb raft configuration";
type = types.lines;
};
storageConfig = mkOption {
default = ''
write-buffer-size = 10000
'';
description = "Influxdb raft configuration";
type = types.lines;
};
clusterConfig = mkOption {
default = ''
protobuf_port = 8099
protobuf_timeout = "2s"
protobuf_heartbeat = "200ms"
protobuf_min_backoff = "1s"
protobuf_max_backoff = "10s"
write-buffer-size = 10000
max-response-buffer-size = 100
concurrent-shard-query-limit = 10
'';
description = "Influxdb cluster configuration";
type = types.lines;
};
leveldbConfig = mkOption {
default = ''
max-open-files = 40
lru-cache-size = "200m"
max-open-shards = 0
point-batch-size = 100
write-batch-size = 5000000
'';
description = "Influxdb leveldb configuration";
type = types.lines;
};
shardingConfig = mkOption {
default = ''
replication-factor = 1
[sharding.short-term]
duration = "7d"
split = 1
[sharding.long-term]
duration = "30d"
split = 1
'';
description = "Influxdb sharding configuration";
type = types.lines;
};
walConfig = mkOption {
default = ''
flush-after = 1000
bookmark-after = 1000
index-after = 1000
requests-per-logfile = 10000
'';
description = "Influxdb write-ahead log configuration";
type = types.lines;
};
extraConfig = mkOption {
default = "";
default = {};
description = "Extra configuration options for influxdb";
type = types.string;
type = types.attrs;
};
};
@ -215,7 +161,7 @@ in
wantedBy = [ "multi-user.target" ];
after = [ "network-interfaces.target" ];
serviceConfig = {
ExecStart = ''${cfg.package}/bin/influxdb -config "${influxdbConfig}"'';
ExecStart = ''${cfg.package}/bin/influxd -config "${configFile}"'';
User = "${cfg.user}";
Group = "${cfg.group}";
PermissionsStartOnly = true;
@ -224,11 +170,6 @@ in
mkdir -m 0770 -p ${cfg.dataDir}
if [ "$(id -u)" = 0 ]; then chown -R ${cfg.user}:${cfg.group} ${cfg.dataDir}; fi
'';
postStart = mkBefore ''
until ${pkgs.curl.bin}/bin/curl -s -o /dev/null 'http://${cfg.bindAddress}:${toString cfg.apiPort}/'; do
sleep 1;
done
'';
};
users.extraUsers = optional (cfg.user == "influxdb") {

View file

@ -0,0 +1,151 @@
{ config, lib, pkgs, ... }:
with lib;
let
gunicorn = pkgs.pythonPackages.gunicorn;
bepasty = pkgs.pythonPackages.bepasty-server;
gevent = pkgs.pythonPackages.gevent;
python = pkgs.pythonPackages.python;
cfg = config.services.bepasty;
user = "bepasty";
group = "bepasty";
default_home = "/var/lib/bepasty";
in
{
options.services.bepasty = {
enable = mkEnableOption "Bepasty servers";
servers = mkOption {
default = {};
description = ''
configure a number of bepasty servers which will be started with
gunicorn.
'';
type = with types ; attrsOf (submodule ({
options = {
bind = mkOption {
type = types.str;
description = ''
Bind address to be used for this server.
'';
example = "0.0.0.0:8000";
default = "127.0.0.1:8000";
};
dataDir = mkOption {
type = types.str;
description = ''
Path to the directory where the pastes will be saved to
'';
default = default_home+"/data";
};
defaultPermissions = mkOption {
type = types.str;
description = ''
default permissions for all unauthenticated accesses.
'';
example = "read,create,delete";
default = "read";
};
extraConfig = mkOption {
type = types.str;
description = ''
Extra configuration for bepasty server to be appended on the
configuration.
see https://bepasty-server.readthedocs.org/en/latest/quickstart.html#configuring-bepasty
for all options.
'';
default = "";
example = ''
PERMISSIONS = {
'myadminsecret': 'admin,list,create,read,delete',
}
MAX_ALLOWED_FILE_SIZE = 5 * 1000 * 1000
'';
};
secretKey = mkOption {
type = types.str;
description = ''
server secret for safe session cookies, must be set.
'';
default = "";
};
workDir = mkOption {
type = types.str;
description = ''
Path to the working directory (used for config and pidfile).
Defaults to the users home directory.
'';
default = default_home;
};
};
}));
};
};
config = mkIf cfg.enable {
environment.systemPackages = [ bepasty ];
# creates gunicorn systemd service for each configured server
systemd.services = mapAttrs' (name: server:
nameValuePair ("bepasty-server-${name}-gunicorn")
({
description = "Bepasty Server ${name}";
wantedBy = [ "multi-user.target" ];
after = [ "network.target" ];
restartIfChanged = true;
environment = {
BEPASTY_CONFIG = "${server.workDir}/bepasty-${name}.conf";
PYTHONPATH= "${bepasty}/lib/${python.libPrefix}/site-packages:${gevent}/lib/${python.libPrefix}/site-packages";
};
serviceConfig = {
Type = "simple";
PrivateTmp = true;
ExecStartPre = assert server.secretKey != ""; pkgs.writeScript "bepasty-server.${name}-init" ''
#!/bin/sh
mkdir -p "${server.workDir}"
mkdir -p "${server.dataDir}"
chown ${user}:${group} "${server.workDir}" "${server.dataDir}"
cat > ${server.workDir}/bepasty-${name}.conf <<EOF
SITENAME="${name}"
STORAGE_FILESYSTEM_DIRECTORY="${server.dataDir}"
SECRET_KEY="${server.secretKey}"
DEFAULT_PERMISSIONS="${server.defaultPermissions}"
${server.extraConfig}
EOF
'';
ExecStart = ''${gunicorn}/bin/gunicorn bepasty.wsgi --name ${name} \
-u ${user} \
-g ${group} \
--workers 3 --log-level=info \
--bind=${server.bind} \
--pid ${server.workDir}/gunicorn-${name}.pid \
-k gevent
'';
};
})
) cfg.servers;
users.extraUsers = [{
uid = config.ids.uids.bepasty;
name = user;
group = group;
home = default_home;
}];
users.extraGroups = [{
name = group;
gid = config.ids.gids.bepasty;
}];
};
}

View file

@ -18,11 +18,13 @@ in {
};
config = mkIf cfg.enable {
systemd.services.devmon = {
systemd.user.services.devmon = {
description = "devmon automatic device mounting daemon";
wantedBy = [ "multi-user.target" ];
path = [ pkgs.udevil ];
wantedBy = [ "default.target" ];
path = [ pkgs.udevil pkgs.procps pkgs.udisks2 pkgs.which ];
serviceConfig.ExecStart = "${pkgs.udevil}/bin/devmon";
};
services.udisks2.enable = true;
};
}

View file

@ -6,9 +6,11 @@ let
cfg = config.services.bosun;
configFile = pkgs.writeText "bosun.conf" ''
tsdbHost = ${cfg.opentsdbHost}
${optionalString (cfg.opentsdbHost !=null) "tsdbHost = ${cfg.opentsdbHost}"}
${optionalString (cfg.influxHost !=null) "influxHost = ${cfg.influxHost}"}
httpListen = ${cfg.listenAddress}
stateFile = ${cfg.stateFile}
ledisDir = ${cfg.ledisDir}
checkFrequency = ${cfg.checkFrequency}
${cfg.extraConfig}
@ -54,10 +56,20 @@ in {
};
opentsdbHost = mkOption {
type = types.string;
type = types.nullOr types.string;
default = "localhost:4242";
description = ''
Host and port of the OpenTSDB database that stores bosun data.
To disable opentsdb you can pass null as parameter.
'';
};
influxHost = mkOption {
type = types.nullOr types.string;
default = null;
example = "localhost:8086";
description = ''
Host and port of the influxdb database.
'';
};
@ -70,13 +82,21 @@ in {
};
stateFile = mkOption {
type = types.string;
type = types.path;
default = "/var/lib/bosun/bosun.state";
description = ''
Path to bosun's state file.
'';
};
ledisDir = mkOption {
type = types.path;
default = "/var/lib/bosun/ledis_data";
description = ''
Path to bosun's ledis data dir
'';
};
checkFrequency = mkOption {
type = types.str;
default = "5m";
@ -103,7 +123,7 @@ in {
};
config = mkIf cfg.enable {
systemd.services.bosun = {
description = "bosun metrics collector (part of Bosun)";
wantedBy = [ "multi-user.target" ];

View file

@ -7,150 +7,37 @@ let
b2s = val: if val then "true" else "false";
cfgFile = pkgs.writeText "grafana.ini" ''
app_name = grafana
app_mode = production
envOptions = {
PATHS_DATA = cfg.dataDir;
PATHS_LOGS = "${cfg.dataDir}/log";
[server]
; protocol (http or https)
protocol = ${cfg.protocol}
; the ip address to bind to, empty will bind to all interfaces
http_addr = ${cfg.addr}
; the http port to use
http_port = ${toString cfg.port}
; The public facing domain name used to access grafana from a browser
domain = ${cfg.domain}
; the full public facing url
root_url = ${cfg.rootUrl}
router_logging = false
; the path relative to the binary where the static (html/js/css) files are placed
static_root_path = ${cfg.staticRootPath}
; enable gzip
enable_gzip = false
; https certs & key file
cert_file = ${cfg.certFile}
cert_key = ${cfg.certKey}
SERVER_PROTOCOL = cfg.protocol;
SERVER_HTTP_ADDR = cfg.addr;
SERVER_HTTP_PORT = cfg.port;
SERVER_DOMAIN = cfg.domain;
SERVER_ROOT_URL = cfg.rootUrl;
SERVER_STATIC_ROOT_PATH = cfg.staticRootPath;
SERVER_CERT_FILE = cfg.certFile;
SERVER_CERT_KEY = cfg.certKey;
[analytics]
# Server reporting, sends usage counters to stats.grafana.org every 24 hours.
# No ip addresses are being tracked, only simple counters to track
# running instances, dashboard and error counts. It is very helpful to us.
# Change this option to false to disable reporting.
reporting_enabled = true
; Google Analytics universal tracking code, only enabled if you specify an id here
google_analytics_ua_id =
DATABASE_TYPE = cfg.database.type;
DATABASE_HOST = cfg.database.host;
DATABASE_NAME = cfg.database.name;
DATABASE_USER = cfg.database.user;
DATABASE_PASSWORD = cfg.database.password;
DATABASE_PATH = cfg.database.path;
[database]
; Either "mysql", "postgres" or "sqlite3", it's your choice
type = ${cfg.database.type}
host = ${cfg.database.host}
name = ${cfg.database.name}
user = ${cfg.database.user}
password = ${cfg.database.password}
; For "postgres" only, either "disable", "require" or "verify-full"
ssl_mode = disable
; For "sqlite3" only
path = ${cfg.database.path}
SECURITY_ADMIN_USER = cfg.security.adminUser;
SECURITY_ADMIN_PASSWORD = cfg.security.adminPassword;
SECURITY_SECRET_KEY = cfg.security.secretKey;
[session]
; Either "memory", "file", "redis", "mysql", default is "memory"
provider = file
; Provider config options
; memory: not have any config yet
; file: session file path, e.g. `data/sessions`
; redis: config like redis server addr, poolSize, password, e.g. `127.0.0.1:6379,100,grafana`
; mysql: go-sql-driver/mysql dsn config string, e.g. `user:password@tcp(127.0.0.1)/database_name`
provider_config = data/sessions
; Session cookie name
cookie_name = grafana_sess
; If you use session in https only, default is false
cookie_secure = false
; Session life time, default is 86400
session_life_time = 86400
; session id hash func, Either "sha1", "sha256" or "md5" default is sha1
session_id_hashfunc = sha1
; Session hash key, default is use random string
session_id_hashkey =
USERS_ALLOW_SIGN_UP = b2s cfg.users.allowSignUp;
USERS_ALLOW_ORG_CREATE = b2s cfg.users.allowOrgCreate;
USERS_AUTO_ASSIGN_ORG = b2s cfg.users.autoAssignOrg;
USERS_AUTO_ASSIGN_ORG_ROLE = cfg.users.autoAssignOrgRole;
[security]
; default admin user, created on startup
admin_user = ${cfg.security.adminUser}
; default admin password, can be changed before first start of grafana, or in profile settings
admin_password = ${cfg.security.adminPassword}
; used for signing
secret_key = ${cfg.security.secretKey}
; Auto-login remember days
login_remember_days = 7
cookie_username = grafana_user
cookie_remember_name = grafana_remember
[users]
; disable user signup / registration
allow_sign_up = ${b2s cfg.users.allowSignUp}
; Allow non admin users to create organizations
allow_org_create = ${b2s cfg.users.allowOrgCreate}
# Set to true to automatically assign new users to the default organization (id 1)
auto_assign_org = ${b2s cfg.users.autoAssignOrg}
; Default role new users will be automatically assigned (if disabled above is set to true)
auto_assign_org_role = ${cfg.users.autoAssignOrgRole}
[auth.anonymous]
; enable anonymous access
enabled = ${b2s cfg.auth.anonymous.enable}
; specify organization name that should be used for unauthenticated users
org_name = Main Org.
; specify role for unauthenticated users
org_role = Viewer
[auth.github]
enabled = false
client_id = some_id
client_secret = some_secret
scopes = user:email
auth_url = https://github.com/login/oauth/authorize
token_url = https://github.com/login/oauth/access_token
[auth.google]
enabled = false
client_id = some_client_id
client_secret = some_client_secret
scopes = https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email
auth_url = https://accounts.google.com/o/oauth2/auth
token_url = https://accounts.google.com/o/oauth2/token
[log]
root_path = data/log
; Either "console", "file", default is "console"
; Use comma to separate multiple modes, e.g. "console, file"
mode = console
; Buffer length of channel, keep it as it is if you don't know what it is.
buffer_len = 10000
; Either "Trace", "Debug", "Info", "Warn", "Error", "Critical", default is "Trace"
level = Info
; For "console" mode only
[log.console]
level =
; For "file" mode only
[log.file]
level =
; This enables automated log rotate(switch of following options), default is true
log_rotate = true
; Max line number of single file, default is 1000000
max_lines = 1000000
; Max size shift of single file, default is 28 means 1 << 28, 256MB
max_lines_shift = 28
; Segment log daily, default is true
daily_rotate = true
; Expired days of log file(delete after max days), default is 7
max_days = 7
[event_publisher]
enabled = false
rabbitmq_url = amqp://localhost/
exchange = grafana_events
'';
AUTH_ANONYMOUS_ENABLE = b2s cfg.auth.anonymous.enable;
} // cfg.extraOptions;
in {
options.services.grafana = {
@ -306,6 +193,16 @@ in {
type = types.bool;
};
};
extraOptions = mkOption {
description = ''
Extra configuration options passed as env variables as specified in
<link xlink:href="http://docs.grafana.org/installation/configuration/">documentation</link>,
but without GF_ prefix
'';
default = {};
type = types.attrsOf types.str;
};
};
config = mkIf cfg.enable {
@ -317,11 +214,15 @@ in {
description = "Grafana Service Daemon";
wantedBy = ["multi-user.target"];
after = ["networking.target"];
environment = mapAttrs' (n: v: nameValuePair "GF_${n}" (toString v)) envOptions;
serviceConfig = {
ExecStart = "${cfg.package}/bin/grafana --config ${cfgFile} web";
ExecStart = "${cfg.package}/bin/grafana -homepath ${cfg.dataDir}";
WorkingDirectory = cfg.dataDir;
User = "grafana";
};
preStart = ''
ln -fs ${cfg.package}/share/grafana/conf ${cfg.dataDir}
'';
};
users.extraUsers.grafana = {
@ -331,7 +232,7 @@ in {
createHome = true;
};
services.grafana.staticRootPath = mkDefault "${cfg.package.out}/share/go/src/github.com/grafana/grafana/public";
services.grafana.staticRootPath = mkDefault "${cfg.package}/share/grafana/public";
};
}

View file

@ -0,0 +1,57 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.heapster;
in {
options.services.heapster = {
enable = mkOption {
description = "Whether to enable heapster monitoring";
default = false;
type = types.bool;
};
source = mkOption {
description = "Heapster metric source";
example = "kubernetes:https://kubernetes.default";
type = types.string;
};
sink = mkOption {
description = "Heapster metic sink";
example = "influxdb:http://localhost:8086";
type = types.string;
};
extraOpts = mkOption {
description = "Heapster extra options";
default = "";
type = types.string;
};
package = mkOption {
description = "Package to use by heapster";
default = pkgs.heapster;
type = types.package;
};
};
config = mkIf cfg.enable {
systemd.services.heapster = {
wantedBy = ["multi-user.target"];
after = ["cadvisor.service" "kube-apiserver.service"];
serviceConfig = {
ExecStart = "${cfg.package}/bin/heapster --source=${cfg.source} --sink=${cfg.sink} ${cfg.extraOpts}";
User = "heapster";
};
};
users.extraUsers = singleton {
name = "heapster";
uid = config.ids.uids.heapster;
description = "Heapster user";
};
};
}

View file

@ -0,0 +1,118 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.longview;
pidFile = "/run/longview.pid";
apacheConf = optionalString (cfg.apacheStatusUrl != "") ''
location ${cfg.apacheStatusUrl}?auto
'';
mysqlConf = optionalString (cfg.mysqlUser != "") ''
username ${cfg.mysqlUser}
password ${cfg.mysqlPassword}
'';
nginxConf = optionalString (cfg.nginxStatusUrl != "") ''
location ${cfg.nginxStatusUrl}
'';
in
{
options = {
services.longview = {
enable = mkOption {
type = types.bool;
default = false;
description = ''
If enabled, system metrics will be sent to Linode LongView.
'';
};
apiKey = mkOption {
type = types.str;
example = "01234567-89AB-CDEF-0123456789ABCDEF";
description = ''
Longview API key. To get this, look in Longview settings which
are found at https://manager.linode.com/longview/.
'';
};
apacheStatusUrl = mkOption {
type = types.str;
default = "";
example = "http://127.0.0.1/server-status";
description = ''
The Apache status page URL. If provided, Longview will
gather statistics from this location. This requires Apache
mod_status to be loaded and enabled.
'';
};
nginxStatusUrl = mkOption {
type = types.str;
default = "";
example = "http://127.0.0.1/nginx_status";
description = ''
The Nginx status page URL. Longview will gather statistics
from this URL. This requires the Nginx stub_status module to
be enabled and configured at the given location.
'';
};
mysqlUser = mkOption {
type = types.str;
default = "";
description = ''
The user for connecting to the MySQL database. If provided,
Longview will connect to MySQL and collect statistics about
queries, etc. This user does not need to have been granted
any extra privileges.
'';
};
mysqlPassword = mkOption {
type = types.str;
description = ''
The password corresponding to mysqlUser. Warning: this is
stored in cleartext in the Nix store!
'';
};
};
};
config = mkIf cfg.enable {
systemd.services.longview =
{ description = "Longview Metrics Collection";
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
serviceConfig.Type = "forking";
serviceConfig.ExecStop = "-${pkgs.coreutils}/bin/kill -TERM $MAINPID";
serviceConfig.ExecReload = "-${pkgs.coreutils}/bin/kill -HUP $MAINPID";
serviceConfig.PIDFile = pidFile;
serviceConfig.ExecStart = "${pkgs.longview}/bin/longview";
};
environment.etc."linode/longview.key" = {
mode = "0400";
text = cfg.apiKey;
};
environment.etc."linode/longview.d/Apache.conf" = {
mode = "0400";
text = apacheConf;
};
environment.etc."linode/longview.d/MySQL.conf" = {
mode = "0400";
text = mysqlConf;
};
environment.etc."linode/longview.d/Nginx.conf" = {
mode = "0400";
text = nginxConf;
};
};
}

View file

@ -10,23 +10,59 @@ let
extip = "EXTIP=\$(${pkgs.curl.bin}/bin/curl -sf \"http://jsonip.com\" | ${pkgs.gawk}/bin/awk -F'\"' '{print $4}')";
i2pSh = pkgs.writeScriptBin "i2pd" ''
toOneZero = b: if b then "1" else "0";
i2pdConf = pkgs.writeText "i2pd.conf" ''
v6 = ${toOneZero cfg.enableIPv6}
unreachable = ${toOneZero cfg.unreachable}
floodfill = ${toOneZero cfg.floodfill}
${if isNull cfg.port then "" else "port = ${toString cfg.port}"}
httpproxyport = ${toString cfg.proxy.httpPort}
socksproxyport = ${toString cfg.proxy.socksPort}
ircaddress = ${cfg.irc.host}
ircport = ${toString cfg.irc.port}
ircdest = ${cfg.irc.dest}
irckeys = ${cfg.irc.keyFile}
eepport = ${toString cfg.eep.port}
${if isNull cfg.sam.port then "" else "--samport=${toString cfg.sam.port}"}
eephost = ${cfg.eep.host}
eepkeys = ${cfg.eep.keyFile}
'';
i2pdTunnelConf = pkgs.writeText "i2pd-tunnels.conf" ''
${flip concatMapStrings
(collect (tun: tun ? port && tun ? destination) cfg.outTunnels)
(tun: let portStr = toString tun.port; in ''
[${tun.name}]
type = client
destination = ${tun.destination}
keys = ${tun.keys}
address = ${tun.address}
port = ${toString tun.port}
'')
}
${flip concatMapStrings
(collect (tun: tun ? port && tun ? host) cfg.outTunnels)
(tun: let portStr = toString tun.port; in ''
[${tun.name}]
type = server
destination = ${tun.destination}
keys = ${tun.keys}
host = ${tun.address}
port = ${tun.port}
inport = ${tun.inPort}
accesslist = ${concatStringSep "," tun.accessList}
'')
}
'';
i2pdSh = pkgs.writeScriptBin "i2pd" ''
#!/bin/sh
${if isNull cfg.extIp then extip else ""}
${pkgs.i2pd}/bin/i2p --log=1 --daemon=0 --service=0 \
--v6=${if cfg.enableIPv6 then "1" else "0"} \
--unreachable=${if cfg.unreachable then "1" else "0"} \
${pkgs.i2pd}/bin/i2pd --log=1 --daemon=0 --service=0 \
--host=${if isNull cfg.extIp then "$EXTIP" else cfg.extIp} \
${if isNull cfg.port then "" else "--port=${toString cfg.port}"} \
--httpproxyport=${toString cfg.proxy.httpPort} \
--socksproxyport=${toString cfg.proxy.socksPort} \
--ircport=${toString cfg.irc.port} \
--ircdest=${cfg.irc.dest} \
--irckeys=${cfg.irc.keyFile} \
--eepport=${toString cfg.eep.port} \
${if isNull cfg.sam.port then "" else "--samport=${toString cfg.sam.port}"} \
--eephost=${cfg.eep.host} \
--eepkeys=${cfg.eep.keyFile}
--conf=${i2pdConf} \
--tunnelscfg=${i2pdTunnelConf}
'';
in
@ -63,11 +99,19 @@ in
'';
};
floodfill = mkOption {
type = types.bool;
default = false;
description = ''
If the router is declared to be unreachable and needs introduction nodes.
'';
};
port = mkOption {
type = with types; nullOr int;
default = null;
description = ''
I2P listen port. If no one is given the router will pick between 9111 and 30777.
I2P listen port. If no one is given the router will pick between 9111 and 30777.
'';
};
@ -107,6 +151,13 @@ in
};
irc = {
host = mkOption {
type = types.str;
default = "127.0.0.1";
description = ''
Address to forward incoming traffic to. 127.0.0.1 by default.
'';
};
dest = mkOption {
type = types.str;
default = "irc.postman.i2p";
@ -163,6 +214,94 @@ in
'';
};
};
outTunnels = mkOption {
default = {};
type = with types; loaOf optionSet;
description = ''
'';
options = [ ({ name, config, ... }: {
options = {
name = mkOption {
type = types.str;
description = "The name of the tunnel.";
};
destination = mkOption {
type = types.str;
description = "Remote endpoint, I2P hostname or b32.i2p address.";
};
keys = mkOption {
type = types.str;
default = name + "-keys.dat";
description = "Keyset used for tunnel identity.";
};
address = mkOption {
type = types.str;
default = "127.0.0.1";
description = "Local bind address for tunnel.";
};
port = mkOption {
type = types.int;
default = 0;
description = "Local tunnel listen port.";
};
};
config = {
name = mkDefault name;
};
}) ];
};
inTunnels = mkOption {
default = {};
type = with types; loaOf optionSet;
description = ''
'';
options = [ ({ name, config, ... }: {
options = {
name = mkOption {
type = types.str;
description = "The name of the tunnel.";
};
keys = mkOption {
type = types.path;
default = name + "-keys.dat";
description = "Keyset used for tunnel identity.";
};
address = mkOption {
type = types.str;
default = "127.0.0.1";
description = "Local service IP address.";
};
port = mkOption {
type = types.int;
default = 0;
description = "Local tunnel listen port.";
};
inPort = mkOption {
type = types.int;
default = 0;
description = "I2P service port. Default to the tunnel's listen port.";
};
accessList = mkOption {
type = with types; listOf str;
default = [];
description = "I2P nodes that are allowed to connect to this service.";
};
};
config = {
name = mkDefault name;
};
}) ];
};
};
};
@ -190,9 +329,8 @@ in
User = "i2pd";
WorkingDirectory = homeDir;
Restart = "on-abort";
ExecStart = "${i2pSh}/bin/i2pd";
ExecStart = "${i2pdSh}/bin/i2pd";
};
};
};
}
#

View file

@ -56,7 +56,7 @@ in
serviceConfig = {
ExecStart = "${pkgs.nix-serve}/bin/nix-serve " +
"--port ${cfg.bindAddress}:${toString cfg.port} ${cfg.extraParams}";
"--listen ${cfg.bindAddress}:${toString cfg.port} ${cfg.extraParams}";
User = "nix-serve";
Group = "nogroup";
};

View file

@ -39,7 +39,7 @@ in
enable = mkOption {
type = types.bool;
default = true;
example = true;
description = "Whether to enable the Vixie cron daemon.";
};

View file

@ -9,7 +9,7 @@ let
homeDir = "/var/lib/transmission";
downloadDir = "${homeDir}/Downloads";
incompleteDir = "${homeDir}/.incomplete";
settingsDir = "${homeDir}/.config/transmission-daemon";
settingsFile = pkgs.writeText "settings.json" (builtins.toJSON fullSettings);
@ -21,7 +21,7 @@ let
else toString ''"${x}"'';
# for users in group "transmission" to have access to torrents
fullSettings = cfg.settings // { umask = 2; };
fullSettings = { download-dir = downloadDir; incomplete-dir = incompleteDir; } // cfg.settings // { umask = 2; };
in
{
options = {
@ -35,7 +35,7 @@ in
Transmission daemon can be controlled via the RPC interface using
transmission-remote or the WebUI (http://localhost:9091/ by default).
Torrents are downloaded to ${homeDir}/Downloads/ by default and are
Torrents are downloaded to ${downloadDir} by default and are
accessible to users in the "transmission" group.
'';
};
@ -83,7 +83,7 @@ in
# 1) Only the "transmission" user and group have access to torrents.
# 2) Optionally update/force specific fields into the configuration file.
serviceConfig.ExecStartPre = ''
${pkgs.stdenv.shell} -c "chmod 770 ${homeDir} && mkdir -p ${settingsDir} ${downloadDir} ${incompleteDir} && rm -f ${settingsDir}/settings.json && cp -f ${settingsFile} ${settingsDir}/settings.json"
${pkgs.stdenv.shell} -c "mkdir -p ${homeDir} ${settingsDir} ${fullSettings.download-dir} ${fullSettings.incomplete-dir} && chmod 770 ${homeDir} ${settingsDir} ${fullSettings.download-dir} ${fullSettings.incomplete-dir} && rm -f ${settingsDir}/settings.json && cp -f ${settingsFile} ${settingsDir}/settings.json"
'';
serviceConfig.ExecStart = "${pkgs.transmission}/bin/transmission-daemon -f --port ${toString config.services.transmission.port}";
serviceConfig.ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";

View file

@ -17,10 +17,10 @@ let
define('DB_HOST', '${config.dbHost}');
define('DB_CHARSET', 'utf8');
$table_prefix = '${config.tablePrefix}';
${config.extraConfig}
if ( !defined('ABSPATH') )
define('ABSPATH', dirname(__FILE__) . '/');
require_once(ABSPATH . 'wp-settings.php');
${config.extraConfig}
'';
# .htaccess to support pretty URLs

View file

@ -108,7 +108,7 @@ in
kdeApps.okular
kdeApps.print-manager
kdeApps.oxygen-icons
(kdeApps.oxygen-icons or kf5.oxygen-icons5)
pkgs.hicolor_icon_theme
plasma5.kde-gtk-config
@ -155,7 +155,7 @@ in
GST_PLUGIN_SYSTEM_PATH_1_0 = [ "/lib/gstreamer-1.0" ];
};
fonts.fonts = [ plasma5.oxygen-fonts ];
fonts.fonts = [ (plasma5.oxygen-fonts or pkgs.noto-fonts) ];
programs.ssh.askPassword = "${plasma5.ksshaskpass}/bin/ksshaskpass";

View file

@ -18,6 +18,14 @@ in
description = "Enable the Xfce desktop environment.";
};
services.xserver.desktopManager.xfce.thunarPlugins = mkOption {
default = [];
type = types.listOf types.package;
example = literalExample "[ pkgs.xfce.thunar-archive-plugin ]";
description = ''
A list of plugin that should be installed with Thunar.
'';
};
};
@ -49,7 +57,7 @@ in
pkgs.xfce.mousepad
pkgs.xfce.ristretto
pkgs.xfce.terminal
pkgs.xfce.thunar
(pkgs.xfce.thunar.override { thunarPlugins = cfg.thunarPlugins; })
pkgs.xfce.xfce4icontheme
pkgs.xfce.xfce4panel
pkgs.xfce.xfce4session

View file

@ -162,7 +162,7 @@ in
gdm.text = ''
auth requisite pam_nologin.so
auth required pam_env.so
auth required pam_env.so envfile=${config.system.build.pamEnvironment}
auth required pam_succeed_if.so uid >= 1000 quiet
auth optional ${gnome3.gnome_keyring}/lib/security/pam_gnome_keyring.so

View file

@ -150,7 +150,7 @@ in
allowNullPassword = true;
startSession = true;
text = ''
auth required pam_env.so
auth required pam_env.so envfile=${config.system.build.pamEnvironment}
auth required pam_permit.so
account required pam_permit.so

View file

@ -18,6 +18,7 @@ let
halt_cmd ${config.systemd.package}/sbin/shutdown -h now
reboot_cmd ${config.systemd.package}/sbin/shutdown -r now
${optionalString (cfg.defaultUser != null) ("default_user " + cfg.defaultUser)}
${optionalString (cfg.defaultUser != null) ("focus_password yes")}
${optionalString cfg.autoLogin "auto_login yes"}
${cfg.extraConfig}
'';
@ -57,8 +58,8 @@ in
theme = mkOption {
type = types.nullOr types.path;
default = pkgs.fetchurl {
url = https://github.com/jagajaga/nixos-slim-theme/archive/1.1.tar.gz;
sha256 = "66c3020a6716130a20c3898567339b990fbd7888a3b7bbcb688f6544d1c05c31";
url = "https://github.com/jagajaga/nixos-slim-theme/archive/2.0.tar.gz";
sha256 = "0lldizhigx7bjhxkipii87y432hlf5wdvamnfxrryf9z7zkfypc8";
};
example = literalExample ''
pkgs.fetchurl {

View file

@ -170,6 +170,15 @@ in rec {
'';
};
onFailure = mkOption {
default = [];
type = types.listOf types.str;
description = ''
A list of one or more units that are activated when
this unit enters the "failed" state.
'';
};
};

View file

@ -199,6 +199,8 @@ let
{ X-Restart-Triggers = toString config.restartTriggers; }
// optionalAttrs (config.description != "") {
Description = config.description;
} // optionalAttrs (config.onFailure != []) {
OnFailure = toString config.onFailure;
};
};
};

View file

@ -58,6 +58,15 @@ let
'';
};
formatOptions = mkOption {
default = "";
type = types.str;
description = ''
If <option>autoFormat</option> option is set specifies
extra options passed to mkfs.
'';
};
autoResize = mkOption {
default = false;
type = types.bool;
@ -81,6 +90,9 @@ let
mountPoint = mkDefault name;
device = mkIf (config.fsType == "tmpfs") (mkDefault config.fsType);
options = mkIf config.autoResize "x-nixos.autoresize";
# -F needed to allow bare block device without partitions
formatOptions = mkIf ((builtins.substring 0 3 config.fsType) == "ext") (mkDefault "-F");
};
};
@ -192,8 +204,6 @@ in
let
mountPoint' = escapeSystemdPath fs.mountPoint;
device' = escapeSystemdPath fs.device;
# -F needed to allow bare block device without partitions
mkfsOpts = optional ((builtins.substring 0 3 fs.fsType) == "ext") "-F";
in nameValuePair "mkfs-${device'}"
{ description = "Initialisation of Filesystem ${fs.device}";
wantedBy = [ "${mountPoint'}.mount" ];
@ -208,7 +218,7 @@ in
type=$(blkid -p -s TYPE -o value "${fs.device}" || true)
if [ -z "$type" ]; then
echo "creating ${fs.fsType} filesystem on ${fs.device}..."
mkfs.${fs.fsType} ${concatStringsSep " " mkfsOpts} "${fs.device}"
mkfs.${fs.fsType} ${fs.formatOptions} "${fs.device}"
fi
'';
unitConfig.RequiresMountsFor = [ "${dirOf fs.device}" ];

View file

@ -2,18 +2,19 @@
with lib;
let cfg = config.powerManagement.scsiLinkPolicy; in
{
###### interface
options = {
powerManagement.scsiLinkPolicy = mkOption {
default = "";
example = "min_power";
type = types.str;
default = null;
type = types.nullOr (types.enum [ "min_power" "max_performance" "medium_power" ]);
description = ''
Configure the SCSI link power management policy. By default,
the kernel configures "max_performance".
SCSI link power management policy. The kernel default is
"max_performance".
'';
};
@ -22,25 +23,10 @@ with lib;
###### implementation
config = mkIf (config.powerManagement.scsiLinkPolicy != "") {
jobs."scsi-link-pm" =
{ description = "SCSI Link Power Management Policy";
startOn = "stopped udevtrigger";
task = true;
unitConfig.ConditionPathIsReadWrite = "/sys/class/scsi_host";
script = ''
shopt -s nullglob
for x in /sys/class/scsi_host/host*/link_power_management_policy; do
echo ${config.powerManagement.scsiLinkPolicy} > $x
done
'';
};
config = mkIf (cfg != null) {
services.udev.extraRules = ''
SUBSYSTEM=="scsi_host", ACTION=="add", KERNEL=="host*", ATTR{link_power_management_policy}="${cfg}"
'';
};
}

View file

@ -31,16 +31,11 @@ in
socketActivation =
mkOption {
type = types.bool;
default = false;
default = true;
description =
''
This option enables docker with socket activation. I.e. docker will
start when first called by client.
Note: This is false by default because systemd lower than 214 that
nixos uses so far, doesn't support SocketGroup option, so socket
created by docker has root group now. This will likely be changed
in future. So set this option explicitly to false if you wish.
'';
};
storageDriver =

View file

@ -276,6 +276,7 @@ in rec {
tests.networkingProxy = callTest tests/networking-proxy.nix {};
tests.nfs3 = callTest tests/nfs.nix { version = 3; };
tests.nfs4 = callTest tests/nfs.nix { version = 4; };
tests.nixosPinVersion = callTest tests/nixos-pin-version.nix {};
tests.nsd = callTest tests/nsd.nix {};
tests.openssh = callTest tests/openssh.nix {};
tests.panamax = hydraJob (import tests/panamax.nix { system = "x86_64-linux"; });
@ -284,6 +285,7 @@ in rec {
tests.proxy = callTest tests/proxy.nix {};
tests.quake3 = callTest tests/quake3.nix {};
tests.runInMachine = callTest tests/run-in-machine.nix {};
tests.sddm = callTest tests/sddm.nix {};
tests.simple = callTest tests/simple.nix {};
tests.tomcat = callTest tests/tomcat.nix {};
tests.udisks2 = callTest tests/udisks2.nix {};

View file

@ -0,0 +1,57 @@
{ system ? builtins.currentSystem }:
with import ../lib/testing.nix { inherit system; };
let
in
pkgs.stdenv.mkDerivation rec {
name = "nixos-pin-version";
src = ../..;
buildInputs = with pkgs; [ nix gnugrep ];
withoutPath = pkgs.writeText "configuration.nix" ''
{
nixos.extraModules = [ ({lib, ...}: { system.nixosRevision = lib.mkForce "ABCDEF"; }) ];
}
'';
withPath = pkgs.writeText "configuration.nix" ''
{
nixos.path = ${src}/nixos ;
nixos.extraModules = [ ({lib, ...}: { system.nixosRevision = lib.mkForce "ABCDEF"; }) ];
}
'';
phases = "buildPhase";
buildPhase = ''
datadir="${pkgs.nix}/share"
export TEST_ROOT=$(pwd)/test-tmp
export NIX_STORE_DIR=$TEST_ROOT/store
export NIX_LOCALSTATE_DIR=$TEST_ROOT/var
export NIX_LOG_DIR=$TEST_ROOT/var/log/nix
export NIX_STATE_DIR=$TEST_ROOT/var/nix
export NIX_DB_DIR=$TEST_ROOT/db
export NIX_CONF_DIR=$TEST_ROOT/etc
export NIX_MANIFESTS_DIR=$TEST_ROOT/var/nix/manifests
export NIX_BUILD_HOOK=
export PAGER=cat
cacheDir=$TEST_ROOT/binary-cache
nix-store --init
export NIX_PATH="nixpkgs=$src:nixos=$src/nixos:nixos-config=${withoutPath}" ;
if test $(nix-instantiate $src/nixos -A config.system.nixosRevision --eval-only) != '"ABCDEF"' ; then :;
else
echo "Unexpected re-entry without the nixos.path option defined.";
exit 1;
fi;
export NIX_PATH="nixpkgs=$src:nixos=$src/nixos:nixos-config=${withPath}" ;
if test $(nix-instantiate $src/nixos -A config.system.nixosRevision --eval-only) = '"ABCDEF"' ; then :;
else
echo "Expected a re-entry when the nixos.path option is defined.";
exit 1;
fi;
touch $out;
'';
}

28
nixos/tests/sddm.nix Normal file
View file

@ -0,0 +1,28 @@
import ./make-test.nix ({ pkgs, ...} : {
name = "sddm";
meta = with pkgs.stdenv.lib.maintainers; {
maintainers = [ ttuegel ];
};
machine = { lib, ... }: {
imports = [ ./common/user-account.nix ];
services.xserver.enable = true;
services.xserver.displayManager.sddm = {
enable = true;
autoLogin = {
enable = true;
user = "alice";
};
};
services.xserver.windowManager.default = "icewm";
services.xserver.windowManager.icewm.enable = true;
services.xserver.desktopManager.default = "none";
};
enableOCR = true;
testScript = { nodes, ... }: ''
startAll;
$machine->waitForWindow("^IceWM ");
'';
})

View file

@ -28,6 +28,6 @@ stdenv.mkDerivation rec {
'';
homepage = http://dashpay.io;
maintainers = with maintainers; [ AndersonTorres ];
platforms = with platforms; unix;
platforms = platforms.unix;
};
}

View file

@ -4,12 +4,12 @@
}:
stdenv.mkDerivation rec {
version = "2.0.5";
version = "2.1.1";
name = "audacity-${version}";
src = fetchurl {
url = "http://audacity.googlecode.com/files/audacity-minsrc-${version}.tar.xz";
sha256 = "0y9bvc3a3zxsk31yg7bha029mzkjiw5i9m86kbyj7x8ps0fm91z2";
url = "https://github.com/audacity/audacity/archive/Audacity-${version}.tar.gz";
sha256 = "15c5ff7ac1c0b19b08f4bdcb0f4988743da2f9ed3fab41d6f07600e67cb9ddb6";
};
# fix with gcc-5 from http://lists.freebsd.org/pipermail/freebsd-ports-bugs/2012-December/245884.html
@ -34,13 +34,13 @@ stdenv.mkDerivation rec {
]; #ToDo: detach sbsms
dontDisableStatic = true;
doCheck = true;
doCheck = false; # Test fails
meta = with stdenv.lib; {
meta = {
description = "Sound editor with graphical UI";
homepage = http://audacity.sourceforge.net;
license = licenses.gpl2Plus;
platforms = platforms.linux;
maintainers = [ maintainers.the-kenny ];
homepage = http://audacityteam.org/;
license = stdenv.lib.licenses.gpl2Plus;
platforms = with stdenv.lib.platforms; linux;
maintainers = with stdenv.lib.maintainers; [ the-kenny ];
};
}

View file

@ -21,6 +21,6 @@ stdenv.mkDerivation rec {
description = "Console-based Audio Visualizer for Alsa";
homepage = https://github.com/karlstav/cava;
maintainers = with maintainers; [offline];
platforms = with platforms; linux;
platforms = platforms.linux;
};
}

View file

@ -0,0 +1,50 @@
{ stdenv, fetchgit, xorg, freetype, alsaLib, libjack2
, lv2, pkgconfig, mesa }:
stdenv.mkDerivation rec {
name = "helm-git-2015-09-11";
src = fetchgit {
url = "https://github.com/mtytel/helm.git";
rev = "ad798d4a0a2e7db52e1a7451176ff198a393cdb4";
sha256 = "0ic4xjikq7s2p53507ykv89844j6sqcd9mh3y59a6wnslr5wq1cw";
};
buildInputs = [
xorg.libX11 xorg.libXcomposite xorg.libXcursor xorg.libXext
xorg.libXinerama xorg.libXrender xorg.libXrandr
freetype alsaLib libjack2 pkgconfig mesa lv2
];
installPhase = ''
mkdir -p $out/bin
mkdir -p $out/lib/lv2
cp -a standalone/builds/linux/build/* $out/bin
cp -a builds/linux/LV2/* $out/lib/lv2/
'';
meta = with stdenv.lib; {
homepage = http://tytel.org/helm;
description = "A free, cross-platform, polyphonic synthesizer";
longDescription = ''
A free, cross-platform, polyphonic synthesizer.
Features:
32 voice polyphony
Interactive visual interface
Powerful modulation system with live visual feedback
Dual oscillators with cross modulation and up to 15 oscillators each
Unison and Harmony mode for oscillators
Oscillator feedback and saturation for waveshaping
12 different waveforms
7 filter types with keytracking
2 monophonic and 1 polyphonic LFO
Step sequencer
Lots of modulation sources including polyphonic aftertouch
Simple arpeggiator
Effects: Formant filter, stutter, delay
'';
license = stdenv.lib.licenses.gpl3;
maintainers = [ maintainers.magnetophon ];
platforms = platforms.linux;
};
}

View file

@ -25,7 +25,7 @@ stdenv.mkDerivation {
'';
homepage = http://www.ibrahimshaath.co.uk/keyfinder/;
license = licenses.gpl3Plus;
platforms = with platforms; linux;
platforms = platforms.linux;
maintainers = with maintainers; [ nckx ];
};

View file

@ -1,5 +1,6 @@
{ stdenv, fetchurl, SDL , alsaLib, gtk, libjack2, ladspaH
, ladspaPlugins, libsamplerate, libsndfile, pkgconfig, libpulseaudio }:
{ stdenv, fetchurl, makeWrapper, SDL , alsaLib, gtk, libjack2, ladspaH
, ladspaPlugins, libsamplerate, libsndfile, pkgconfig, libpulseaudio, lame
, vorbisTools }:
stdenv.mkDerivation rec {
name = "mhwaveedit-${version}";
@ -10,15 +11,19 @@ stdenv.mkDerivation rec {
sha256 = "010rk4mr631s440q9cfgdxx2avgzysr9aq52diwdlbq9cddifli3";
};
buildInputs =
[ SDL alsaLib gtk libjack2 ladspaH libsamplerate libsndfile
pkgconfig libpulseaudio
];
buildInputs = [ SDL alsaLib gtk libjack2 ladspaH libsamplerate libsndfile
pkgconfig libpulseaudio makeWrapper ];
configureFlags = "--with-default-ladspa-path=${ladspaPlugins}/lib/ladspa";
postInstall = ''
wrapProgram $out/bin/mhwaveedit \
--prefix PATH : ${lame}/bin/ \
--prefix PATH : ${vorbisTools}/bin/
'';
meta = with stdenv.lib; {
description = "graphical program for editing, playing and recording sound files";
description = "Graphical program for editing, playing and recording sound files";
homepage = https://gna.org/projects/mhwaveedit;
license = licenses.gpl2Plus;
platforms = platforms.linux;

View file

@ -0,0 +1,60 @@
{ stdenv
, fetchFromGitHub
, qscintilla
, supercollider
, ruby
, cmake
, pkgconfig
, qt48Full
, bash
, makeWrapper
}:
stdenv.mkDerivation rec {
version = "2.8.0";
name = "sonic-pi-${version}";
src = fetchFromGitHub {
owner = "samaaron";
repo = "sonic-pi";
rev = "v${version}";
sha256 = "1yyavgazb6ar7xnmjx460s9p8nh70klaja2yb20nci15k8vngq9h";
};
buildInputs = [
qscintilla
supercollider
ruby
qt48Full
cmake
pkgconfig
bash
makeWrapper
];
meta = {
homepage = http://sonic-pi.net/;
description = "Free live coding synth for everyone originally designed to support computing and music lessons within schools";
license = stdenv.lib.licenses.mit;
maintainers = [ stdenv.lib.maintainers.Phlogistique ];
platforms = stdenv.lib.platforms.linux;
};
dontUseCmakeConfigure = true;
buildPhase = ''
pushd app/server/bin
${ruby}/bin/ruby compile-extensions.rb
popd
pushd app/gui/qt
${bash}/bin/bash rp-build-app
popd
'';
installPhase = ''
cp -r . $out
wrapProgram $out/bin/sonic-pi --prefix PATH : \
${ruby}/bin:${bash}/bin
'';
}

View file

@ -1,8 +1,17 @@
From e9d82bfbc49993a5be2c93f6b72a969630587f26 Mon Sep 17 00:00:00 2001
From: Thomas Tuegel <ttuegel@gmail.com>
Date: Mon, 23 Nov 2015 06:56:28 -0600
Subject: [PATCH 1/2] ignore config mtime
---
src/common/ConfigReader.cpp | 5 -----
1 file changed, 5 deletions(-)
diff --git a/src/common/ConfigReader.cpp b/src/common/ConfigReader.cpp
index 6618455..5356e76 100644
index cfc9940..5bf5a6a 100644
--- a/src/common/ConfigReader.cpp
+++ b/src/common/ConfigReader.cpp
@@ -136,11 +136,6 @@ namespace SDDM {
@@ -138,11 +138,6 @@ namespace SDDM {
QString currentSection = QStringLiteral(IMPLICIT_SECTION);
QFile in(m_path);
@ -14,3 +23,6 @@ index 6618455..5356e76 100644
in.open(QIODevice::ReadOnly);
while (!in.atEnd()) {
--
2.6.3

View file

@ -0,0 +1,26 @@
From 7a18f4cb77c567dec9ad924fcc76c50092de6ee7 Mon Sep 17 00:00:00 2001
From: Thomas Tuegel <ttuegel@gmail.com>
Date: Mon, 23 Nov 2015 06:57:51 -0600
Subject: [PATCH 2/2] fix ConfigReader QStringList corruption
---
src/common/ConfigReader.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/common/ConfigReader.cpp b/src/common/ConfigReader.cpp
index 5bf5a6a..34182e6 100644
--- a/src/common/ConfigReader.cpp
+++ b/src/common/ConfigReader.cpp
@@ -30,7 +30,8 @@
QTextStream &operator>>(QTextStream &str, QStringList &list) {
list.clear();
- foreach(const QStringRef &s, str.readLine().splitRef(QLatin1Char(',')))
+ QString line = str.readLine();
+ foreach(const QStringRef &s, line.splitRef(QLatin1Char(',')))
{
QStringRef trimmed = s.trimmed();
if (!trimmed.isEmpty())
--
2.6.3

View file

@ -14,7 +14,10 @@ stdenv.mkDerivation rec {
sha256 = "0c3q8lpb123m9k5x3i71mm8lmyzhknw77zxh89yfl8qmn6zd61i1";
};
patches = [ ./sddm-ignore-config-mtime.patch ];
patches = [
./0001-ignore-config-mtime.patch
./0002-fix-ConfigReader-QStringList-corruption.patch
];
nativeBuildInputs = [ cmake makeQtWrapper pkgconfig qttools ];

View file

@ -16,11 +16,11 @@ let
};
in stdenv.mkDerivation rec {
name = "atom-${version}";
version = "1.1.0";
version = "1.2.0";
src = fetchurl {
url = "https://github.com/atom/atom/releases/download/v${version}/atom-amd64.deb";
sha256 = "1rbwwwryhcasqgn2y1d9hvi3n4dag50dh1fd9hmkx4h9nmm3mbi0";
sha256 = "05s3kvsz6pzh4gm22aaps1nccp76skfshdzlqwg0qn0ljz58sdqh";
name = "${name}.deb";
};

View file

@ -0,0 +1,63 @@
{ stdenv, fetchurl, buildEnv, gtk, glib, gdk_pixbuf, alsaLib, nss, nspr, gconf
, cups, libgcrypt_1_5, makeWrapper, dbus, udev }:
let
bracketsEnv = buildEnv {
name = "env-brackets";
paths = [
gtk glib gdk_pixbuf stdenv.cc.cc alsaLib nss nspr gconf cups libgcrypt_1_5
dbus udev
];
};
in
stdenv.mkDerivation rec {
name = "brackets-${version}";
version = "1.5";
src = fetchurl {
url = "https://github.com/adobe/brackets/releases/download/release-${version}/Brackets.Release.${version}.64-bit.deb";
sha256 = "1fc8wvh9wbcydd1sw20yfnwlfv7nllb6vrssr6hgn80m7i0zl3db";
name = "${name}.deb";
};
phases = [ "installPhase" ];
buildInputs = [ makeWrapper ];
installPhase = ''
mkdir -p $out
ar p $src data.tar.xz | tar -C $out -xJ
mv $out/usr/* $out/
rmdir $out/usr
ln -sf $out/opt/brackets/brackets $out/bin/brackets
ln -s ${udev}/lib/libudev.so.1 $out/opt/brackets/lib/libudev.so.0
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath "${bracketsEnv}/lib:${bracketsEnv}/lib64" \
$out/opt/brackets/Brackets
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
$out/opt/brackets/Brackets-node
patchelf \
--set-rpath "${bracketsEnv}/lib:${bracketsEnv}/lib64" \
$out/opt/brackets/lib/libcef.so
wrapProgram $out/opt/brackets/brackets \
--prefix LD_LIBRARY_PATH : "${bracketsEnv}/lib:${bracketsEnv}/lib64"
substituteInPlace $out/opt/brackets/brackets.desktop \
--replace "Exec=/opt/brackets/brackets" "Exec=brackets"
mkdir -p $out/share/applications
ln -s $out/opt/brackets/brackets.desktop $out/share/applications/
'';
meta = with stdenv.lib; {
description = "An open source code editor for the web, written in JavaScript, HTML and CSS";
homepage = http://brackets.io/;
license = licenses.mit;
maintainers = [ maintainers.matejc ];
platforms = [ "x86_64-linux" ];
};
}

View file

@ -18,6 +18,6 @@ stdenv.mkDerivation rec {
homepage = http://emacs-jabber.sourceforge.net/;
license = licenses.gpl2Plus;
maintainers = with maintainers; [ astsmtl ];
platforms = with platforms; linux;
platforms = platforms.linux;
};
}

View file

@ -1,7 +1,7 @@
{ stdenv, fetchurl, gtk2, which, pkgconfig, intltool, file }:
let
version = "1.25";
version = "1.26";
in
stdenv.mkDerivation rec {
@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
src = fetchurl {
url = "http://download.geany.org/${name}.tar.bz2";
sha256 = "8ee41da28cead8c94d433e616d7ababa81727c63e9196ca6758ade3af14a49ef";
sha256 = "e38530e87c577e1e9806be3b40e08fb9ee321eb1abc6361ddacdad89c825f90d";
};
buildInputs = [ gtk2 which pkgconfig intltool file ];

View file

@ -212,14 +212,14 @@ in
android-studio = buildAndroidStudio rec {
name = "android-studio-${version}";
version = "1.4.0.10";
build = "141.2288178";
version = "1.5.0.4";
build = "141.2422023";
description = "Android development environment based on IntelliJ IDEA";
license = stdenv.lib.licenses.asl20;
src = fetchurl {
url = "https://dl.google.com/dl/android/studio/ide-zips/${version}" +
"/android-studio-ide-${build}-linux.zip";
sha256 = "04zzzk6xlvzip6klxvs4zz2wyfyn3w9b5jwilzbqjidiz2d3va57";
sha256 = "1sjxs9cq7mdalxmzp6v2gwbg1w8p43c2cp5j4v212w66h5rqv11z";
};
};
@ -237,25 +237,25 @@ in
idea-community = buildIdea rec {
name = "idea-community-${version}";
version = "15.0";
build = "IC-143.381";
version = "15.0.1";
build = "IC-143.382";
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 = "0d39ipwji76gkc7w5bcl7a94kdz5cwmcnwmvq1lzm06v43jjq51s";
sha256 = "1dbwzj12xkv2xw5nrhr779ac24hag0rb96dlagzyxcvc44xigjps";
};
};
idea-ultimate = buildIdea rec {
name = "idea-ultimate-${version}";
version = "15.0";
build = "IU-143.381";
version = "15.0.1";
build = "IU-143.382";
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 = "1hw8hqpzkdlp0ilax6anzjybhmjb40s16jblyplqpah065pc8rja";
sha256 = "0bw6qvsvhw0nabv01bgsbnl78vimnz2kb280jzv0ikmhxranyk0z";
};
};
@ -273,25 +273,25 @@ in
pycharm-community = buildPycharm rec {
name = "pycharm-community-${version}";
version = "5.0";
build = "143.589";
version = "5.0.1";
build = "143.595";
description = "PyCharm Community Edition";
license = stdenv.lib.licenses.asl20;
src = fetchurl {
url = "https://download-cf.jetbrains.com/python/${name}.tar.gz";
sha256 = "01q51m6rpyw296imiglbadzfr0r91wvyrxdid683yl7f5v73wzwh";
url = "https://download.jetbrains.com/python/${name}.tar.gz";
sha256 = "14m3imy64cp2l9pnmknxbjzj3z30rx88r4brz9d5xk5qailjg2wf";
};
};
pycharm-professional = buildPycharm rec {
name = "pycharm-professional-${version}";
version = "5.0";
build = "143.589";
version = "5.0.1";
build = "143.595";
description = "PyCharm Professional Edition";
license = stdenv.lib.licenses.unfree;
src = fetchurl {
url = "https://download-cf.jetbrains.com/python/${name}.tar.gz";
sha256 = "16lwg00dl03gwj4dqihdrn15p1fy8513srw2dslna1w1glfajv06";
url = "https://download.jetbrains.com/python/${name}.tar.gz";
sha256 = "102sfjvchk80911w3qpjsp30wvq73kgpwyqcqdgqxcgm2vqh3183";
};
};

View file

@ -1,15 +1,17 @@
{ stdenv, fetchurl, ncurses, gettext,
pkgconfig, cscope, python, ruby, tcl, perl, luajit
{ stdenv, fetchFromGitHub, ncurses, gettext
, pkgconfig, cscope, python, ruby, tcl, perl, luajit
}:
stdenv.mkDerivation rec {
name = "macvim-${version}";
version = "7.4.648";
version = "7.4.909";
src = fetchurl {
url = "https://github.com/genoma/macvim/archive/g-snapshot-32.tar.gz";
sha256 = "1wqg5sy7krgqg3sj00gb34avg90ga2kbvv09bsxv2267j7agi0iq";
src = fetchFromGitHub {
owner = "macvim-dev";
repo = "macvim";
rev = "75aa7774645adb586ab9010803773bd80e659254";
sha256 = "0k04jimbms6zffh8i8fjm2y51q01m5kga2n4djipd3pxij1qy89y";
};
enableParallelBuilding = true;
@ -54,7 +56,16 @@ stdenv.mkDerivation rec {
makeFlags = ''PREFIX=$(out) CPPFLAGS="-Wno-error"'';
# This is unfortunate, but we need to use the same compiler as XCode,
# but XCode doesn't provide a way to configure the compiler.
#
# If you're willing to modify the system files, you can do this:
# http://hamelot.co.uk/programming/add-gcc-compiler-to-xcode-6/
#
# But we don't have that option.
preConfigure = ''
CC=/usr/bin/clang
DEV_DIR=$(/usr/bin/xcode-select -print-path)/Platforms/MacOSX.platform/Developer
configureFlagsArray+=(
"--with-developer-dir=$DEV_DIR"

View file

@ -1,5 +1,5 @@
diff --git a/src/MacVim/MacVim.xcodeproj/project.pbxproj b/src/MacVim/MacVim.xcodeproj/project.pbxproj
index 1c5ff47..677a2cc 100644
index c384bf7..bf1ce96 100644
--- a/src/MacVim/MacVim.xcodeproj/project.pbxproj
+++ b/src/MacVim/MacVim.xcodeproj/project.pbxproj
@@ -437,6 +437,8 @@
@ -27,44 +27,24 @@ index 1c5ff47..677a2cc 100644
PRODUCT_NAME = MacVim;
VERSIONING_SYSTEM = "apple-generic";
WRAPPER_EXTENSION = app;
diff --git a/src/vimtutor b/src/vimtutor
index 70d9ec7..b565a1a 100755
--- a/src/vimtutor
+++ b/src/vimtutor
@@ -16,7 +16,7 @@ seq="vim vim8 vim75 vim74 vim73 vim72 vim71 vim70 vim7 vim6 vi"
if test "$1" = "-g"; then
# Try to use the GUI version of Vim if possible, it will fall back
# on Vim if Gvim is not installed.
- seq="gvim gvim8 gvim75 gvim74 gvim73 gvim72 gvim71 gvim70 gvim7 gvim6 $seq"
+ seq="mvim gvim gvim8 gvim75 gvim74 gvim73 gvim72 gvim71 gvim70 gvim7 gvim6 $seq"
shift
fi
diff --git a/src/Makefile b/src/Makefile
index 84a93f7..e23196d 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -1306,7 +1306,7 @@ MACVIMGUI_SRC = gui.c gui_beval.c MacVim/gui_macvim.m MacVim/MMBackend.m \
MacVim/MacVim.m
MACVIMGUI_OBJ = objects/gui.o objects/gui_beval.o objects/pty.o \
objects/gui_macvim.o objects/MMBackend.o objects/MacVim.o
-MACVIMGUI_DEFS = -DFEAT_GUI_MACVIM -Wall -Wno-unknown-pragmas -pipe
+MACVIMGUI_DEFS = -DMACOS_X_UNIX -DFEAT_GUI_MACVIM -Wall -Wno-unknown-pragmas -pipe
MACVIMGUI_IPATH =
MACVIMGUI_LIBS_DIR =
MACVIMGUI_LIBS1 = -framework Cocoa -framework Carbon
diff --git a/src/auto/configure b/src/auto/configure
index bc9f074..9b9125e 100755
index cdc0819..8e2fd16 100755
--- a/src/auto/configure
+++ b/src/auto/configure
@@ -2252,7 +2252,7 @@ rm -f conftest.val
as_fn_set_status $ac_retval
} # ac_fn_c_compute_int
-cat >auto/config.log <<_ACEOF
+cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
@@ -2262,7 +2262,7 @@ generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
_ACEOF
-exec 5>>auto/config.log
+exec 5>>config.log
{
cat <<_ASUNAME
## --------- ##
@@ -5377,10 +5377,7 @@ $as_echo "no" >&6; }
@@ -5383,10 +5383,7 @@ $as_echo "no" >&6; }
fi
if test "X$vi_cv_path_mzscheme_pfx" != "X"; then
@ -76,7 +56,7 @@ index bc9f074..9b9125e 100755
MZSCHEME_LIBS="${vi_cv_path_mzscheme_pfx}/lib/libmzscheme3m.a"
MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
elif test -f "${vi_cv_path_mzscheme_pfx}/lib/libracket3m.a"; then
@@ -5716,23 +5713,6 @@ $as_echo ">>> too old; need Perl version 5.003_01 or later <<<" >&6; }
@@ -5731,23 +5728,6 @@ $as_echo ">>> too old; need Perl version 5.003_01 or later <<<" >&6; }
fi
if test "x$MACOSX" = "xyes"; then
@ -100,18 +80,21 @@ index bc9f074..9b9125e 100755
PERL_LIBS=`echo "$PERL_LIBS" | sed -e 's/-arch\ ppc//' -e 's/-arch\ i386//' -e 's/-arch\ x86_64//'`
PERL_CFLAGS=`echo "$PERL_CFLAGS" | sed -e 's/-arch\ ppc//' -e 's/-arch\ i386//' -e 's/-arch\ x86_64//'`
fi
@@ -5926,10 +5906,6 @@ __:
@@ -5954,13 +5934,6 @@ __:
eof
eval "`cd ${PYTHON_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`"
rm -f -- "${tmp_mkf}"
- if test "x$MACOSX" = "xyes" && ${vi_cv_path_python} -c \
- "import sys; sys.exit(${vi_cv_var_python_version} < 2.3)"; then
- vi_cv_path_python_plibs="-framework Python"
- if test "x${vi_cv_path_python}" != "x/usr/bin/python" && test -n "${python_PYTHONFRAMEWORKPREFIX}"; then
- vi_cv_path_python_plibs="-F${python_PYTHONFRAMEWORKPREFIX} -framework Python"
- fi
- else
if test "${vi_cv_var_python_version}" = "1.4"; then
vi_cv_path_python_plibs="${PYTHON_CONFDIR}/libModules.a ${PYTHON_CONFDIR}/libPython.a ${PYTHON_CONFDIR}/libObjects.a ${PYTHON_CONFDIR}/libParser.a"
else
@@ -5937,7 +5913,6 @@ eof
@@ -5979,7 +5952,6 @@ eof
fi
vi_cv_path_python_plibs="${vi_cv_path_python_plibs} ${python_BASEMODLIBS} ${python_LIBS} ${python_SYSLIBS} ${python_LINKFORSHARED}"
vi_cv_path_python_plibs=`echo $vi_cv_path_python_plibs | sed s/-ltermcap//`
@ -119,7 +102,7 @@ index bc9f074..9b9125e 100755
fi
@@ -6004,13 +5979,6 @@ rm -f core conftest.err conftest.$ac_objext \
@@ -6055,13 +6027,6 @@ rm -f core conftest.err conftest.$ac_objext \
$as_echo "no" >&6; }
fi
@ -133,7 +116,7 @@ index bc9f074..9b9125e 100755
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compile and link flags for Python are sane" >&5
$as_echo_n "checking if compile and link flags for Python are sane... " >&6; }
cflags_save=$CFLAGS
@@ -6853,11 +6821,7 @@ $as_echo "$tclver - OK" >&6; };
@@ -6919,11 +6884,7 @@ $as_echo "$tclver - OK" >&6; };
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for location of Tcl include" >&5
$as_echo_n "checking for location of Tcl include... " >&6; }
@ -145,7 +128,7 @@ index bc9f074..9b9125e 100755
TCL_INC=
for try in $tclinc; do
if test -f "$try/tcl.h"; then
@@ -6875,12 +6839,8 @@ $as_echo "<not found>" >&6; }
@@ -6941,12 +6902,8 @@ $as_echo "<not found>" >&6; }
if test -z "$SKIP_TCL"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for location of tclConfig.sh script" >&5
$as_echo_n "checking for location of tclConfig.sh script... " >&6; }
@ -158,7 +141,7 @@ index bc9f074..9b9125e 100755
for try in $tclcnf; do
if test -f $try/tclConfig.sh; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $try/tclConfig.sh" >&5
@@ -7050,10 +7010,6 @@ $as_echo "$rubyhdrdir" >&6; }
@@ -7120,10 +7077,6 @@ $as_echo "$rubyhdrdir" >&6; }
if test -f "$rubylibdir/$librubya"; then
librubyarg="$librubyarg"
RUBY_LIBS="$RUBY_LIBS -L$rubylibdir"
@ -169,41 +152,8 @@ index bc9f074..9b9125e 100755
fi
if test "X$librubyarg" != "X"; then
@@ -14061,7 +14017,7 @@ fi
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-exec 5>>auto/config.log
+exec 5>>config.log
{
echo
sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
@@ -14653,7 +14609,7 @@ if test "$no_create" != yes; then
ac_config_status_args="$ac_config_status_args --quiet"
exec 5>/dev/null
$SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
- exec 5>>auto/config.log
+ exec 5>>config.log
# Use ||, not &&, to avoid exiting from the if with $? = 1, which
# would make configure fail if this is the last instruction.
$ac_cs_success || as_fn_exit 1
diff --git a/src/Makefile b/src/Makefile
index 1c4d104..fff2015 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -1298,7 +1298,7 @@ MACVIMGUI_SRC = gui.c gui_beval.c MacVim/gui_macvim.m MacVim/MMBackend.m \
MacVim/MacVim.m
MACVIMGUI_OBJ = objects/gui.o objects/gui_beval.o objects/pty.o \
objects/gui_macvim.o objects/MMBackend.o objects/MacVim.o
-MACVIMGUI_DEFS = -DFEAT_GUI_MACVIM -Wall -Wno-unknown-pragmas -pipe
+MACVIMGUI_DEFS = -DMACOS_X_UNIX -DFEAT_GUI_MACVIM -Wall -Wno-unknown-pragmas -pipe
MACVIMGUI_IPATH =
MACVIMGUI_LIBS_DIR =
MACVIMGUI_LIBS1 = -framework Cocoa -framework Carbon
diff --git a/src/if_python.c b/src/if_python.c
index b356bf7..b7bfa78 100644
index 1d87cac..9d28df0 100644
--- a/src/if_python.c
+++ b/src/if_python.c
@@ -55,11 +55,7 @@
@ -219,4 +169,63 @@ index b356bf7..b7bfa78 100644
#if !defined(PY_VERSION_HEX) || PY_VERSION_HEX < 0x02050000
# undef PY_SSIZE_T_CLEAN
MACVIMGUI_LIBS1 = -framework Cocoa -framework Carbon
diff --git a/src/if_ruby.c b/src/if_ruby.c
index 1deb83e..ac23878 100644
--- a/src/if_ruby.c
+++ b/src/if_ruby.c
@@ -106,17 +106,9 @@
# define rb_check_type rb_check_type_stub
#endif
-#ifdef FEAT_GUI_MACVIM
-# include <Ruby/ruby.h>
-#else
-# include <ruby.h>
-#endif
+#include <ruby.h>
#ifdef RUBY19_OR_LATER
-# ifdef FEAT_GUI_MACVIM
-# include <Ruby/ruby/encoding.h>
-# else
-# include <ruby/encoding.h>
-# endif
+# include <ruby/encoding.h>
#endif
#undef off_t /* ruby defines off_t as _int64, Mingw uses long */
diff --git a/src/vim.h b/src/vim.h
index 4c93908..edc6bd7 100644
--- a/src/vim.h
+++ b/src/vim.h
@@ -308,18 +308,6 @@
# define UNUSED
#endif
-/* if we're compiling in C++ (currently only KVim), the system
- * headers must have the correct prototypes or nothing will build.
- * conversely, our prototypes might clash due to throw() specifiers and
- * cause compilation failures even though the headers are correct. For
- * a concrete example, gcc-3.2 enforces exception specifications, and
- * glibc-2.2.5 has them in their system headers.
- */
-#if !defined(__cplusplus) && defined(UNIX) \
- && !defined(MACOS_X) /* MACOS_X doesn't yet support osdef.h */
-# include "auto/osdef.h" /* bring missing declarations in */
-#endif
-
#ifdef __EMX__
# define getcwd _getcwd2
# define chdir _chdir2
diff --git a/src/vimtutor b/src/vimtutor
index 70d9ec7..b565a1a 100755
--- a/src/vimtutor
+++ b/src/vimtutor
@@ -16,7 +16,7 @@ seq="vim vim8 vim75 vim74 vim73 vim72 vim71 vim70 vim7 vim6 vi"
if test "$1" = "-g"; then
# Try to use the GUI version of Vim if possible, it will fall back
# on Vim if Gvim is not installed.
- seq="gvim gvim8 gvim75 gvim74 gvim73 gvim72 gvim71 gvim70 gvim7 gvim6 $seq"
+ seq="mvim gvim gvim8 gvim75 gvim74 gvim73 gvim72 gvim71 gvim70 gvim7 gvim6 $seq"
shift
fi

View file

@ -2,15 +2,15 @@
libharu, opencv, vigra, postgresql }:
stdenv.mkDerivation rec {
name = "saga-2.2.1";
name = "saga-2.2.2";
buildInputs = [ gdal wxGTK30 proj libharu opencv vigra postgresql libiodbc lzma jasper ];
enableParallelBuilding = true;
src = fetchurl {
url = "http://sourceforge.net/projects/saga-gis/files/SAGA%20-%202.2/SAGA%202.2.1/saga_2.2.1.tar.gz";
sha256 = "325e0890c28dc19c4ec727f58672be67480b2a4dd6604252c0cc4cc08aad34d0";
url = "http://downloads.sourceforge.net/project/saga-gis/SAGA%20-%202.2/SAGA%202.2.2/saga-2.2.2.tar.gz";
sha256 = "031cd70b7ec248f32f955a9316aefc7f7ab283c5129c49aa4bd748717d20357e";
};
meta = {

View file

@ -1,19 +1,19 @@
{ stdenv, fetchurl, cmake, coin3d, xercesc, ode, eigen, qt4, opencascade, gts
, boost, zlib, python, swig, gfortran, soqt, libf2c, makeWrapper
, matplotlib, pycollada, pyside, pysideShiboken }:
, matplotlib, pycollada, pyside, pysideTools, pysideShiboken }:
stdenv.mkDerivation rec {
name = "freecad-${version}";
version = "0.14.3702";
version = "0.15";
src = fetchurl {
url = "mirror://sourceforge/free-cad/${name}.tar.gz";
sha256 = "1jcx7d3mp2wxkd20qdvr4vlf7h5wb0jgab9dl63sicdz88swy97f";
url = https://github.com/FreeCAD/FreeCAD/archive/0.15.tar.gz;
sha256 = "1vndvywvq86hyhmg629bkn5ag4lk2mg1pl4dq7jvbjvbrczb12fc";
};
buildInputs = [ cmake coin3d xercesc ode eigen qt4 opencascade gts boost
zlib python swig gfortran soqt libf2c makeWrapper matplotlib
pycollada pyside pysideShiboken
pycollada pyside pysideShiboken pysideTools
];
enableParallelBuilding = true;
@ -23,13 +23,16 @@ stdenv.mkDerivation rec {
export NIX_LDFLAGS="-L${gfortran.cc}/lib64 -L${gfortran.cc}/lib $NIX_LDFLAGS";
'';
# Their main() removes PYTHONPATH=, and we rely on it.
preConfigure = ''
sed '/putenv("PYTHONPATH/d' -i src/Main/MainGui.cpp
'';
postInstall = ''
wrapProgram $out/bin/FreeCAD --prefix PYTHONPATH : $PYTHONPATH \
--set COIN_GL_NO_CURRENT_CONTEXT_CHECK 1
'';
patches = [ ./pythonpath.patch ];
meta = with stdenv.lib; {
description = "General purpose Open Source 3D CAD/MCAD/CAx/CAE/PLM modeler";
homepage = http://www.freecadweb.org/;

View file

@ -1,23 +0,0 @@
diff --git a/src/Main/MainGui.cpp b/src/Main/MainGui.cpp
index 03407c5..b029384 100644
--- a/src/Main/MainGui.cpp
+++ b/src/Main/MainGui.cpp
@@ -190,15 +190,15 @@ int main( int argc, char ** argv )
// http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=559846
putenv("LANG=C");
putenv("LC_ALL=C");
- putenv("PYTHONPATH=");
+ //putenv("PYTHONPATH=");
#elif defined(FC_OS_MACOSX)
(void)QLocale::system();
putenv("LANG=C");
putenv("LC_ALL=C");
- putenv("PYTHONPATH=");
+ //putenv("PYTHONPATH=");
#else
setlocale(LC_NUMERIC, "C");
- _putenv("PYTHONPATH=");
+ //_putenv("PYTHONPATH=");
#endif
// Name and Version of the Application

View file

@ -3,7 +3,7 @@
}:
stdenv.mkDerivation rec {
name = "imv";
name = "imv-${version}";
version = "1.0.0";
src = fetchFromGitHub {

View file

@ -0,0 +1,30 @@
{ stdenv, fetchFromGitHub, qt5, exiv2 }:
stdenv.mkDerivation rec {
name = "phototonic-${version}";
version = "1.7";
src = fetchFromGitHub {
repo = "phototonic";
owner = "oferkv";
rev = "v${version}";
sha256 = "1agd3bsrpljd019qrjvlbim5l0bhpx53dhpc0gvyn0wmcdzn92gj";
};
buildInputs = [ qt5.base exiv2 ];
configurePhase = ''
sed -i 's;/usr;;' phototonic.pro
qmake PREFIX=""
'';
installFlags = [ "INSTALL_ROOT=$(out)" ];
meta = with stdenv.lib; {
description = "An image viewer and organizer";
homepage = http://oferkv.github.io/phototonic/;
license = licenses.gpl3;
platforms = platforms.linux;
maintainers = with maintainers; [ pSub ];
};
}

View file

@ -1,5 +1,5 @@
{ fetchurl, stdenv, m4, glibc, gtk3, libexif, libgphoto2, libsoup, libxml2, vala, sqlite
, webkitgtk24x, pkgconfig, gnome3, gst_all_1, which, udev, libraw, glib, json_glib
, webkitgtk24x, 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 }:
@ -37,7 +37,7 @@ stdenv.mkDerivation rec {
buildInputs = [ m4 glibc gtk3 libexif libgphoto2 libsoup libxml2 vala sqlite webkitgtk24x
pkgconfig gst_all_1.gstreamer gst_all_1.gst-plugins-base gnome3.libgee
which udev gnome3.gexiv2 hicolor_icon_theme
which udev libgudev gnome3.gexiv2 hicolor_icon_theme
libraw json_glib gettext desktop_file_utils glib lcms2 gdk_pixbuf librsvg
makeWrapper gnome_doc_utils gnome3.rest
gnome3.defaultIconTheme ];

View file

@ -1,12 +1,12 @@
{ stdenv, fetchurl, cairo, colord, glib, gtk3, gusb, intltool, itstool, libusb
, libxml2, makeWrapper, pkgconfig, saneBackends, systemd, vala }:
let version = "3.19.1"; in
let version = "3.19.2"; in
stdenv.mkDerivation rec {
name = "simple-scan-${version}";
src = fetchurl {
sha256 = "1d2a8cncq36ly60jpz0fzdw1lgxynl6lyrlw0q66yijlxqn81ynr";
sha256 = "08454ky855iaiq5wn9rdbfal3i4fjss5fn5mg6cmags50wy9spsg";
url = "https://launchpad.net/simple-scan/3.19/${version}/+download/${name}.tar.xz";
};
@ -14,6 +14,13 @@ stdenv.mkDerivation rec {
systemd vala ];
nativeBuildInputs = [ intltool itstool makeWrapper pkgconfig ];
configureFlags = [ "--disable-packagekit" ];
preBuild = ''
# Clean up stale generated .c files still referencing packagekit headers:
make clean
'';
enableParallelBuilding = true;
doCheck = true;

View file

@ -1,34 +1,28 @@
a @ { libXt, libX11, libXext, xextproto, xproto, gsl, aalib, zlib, intltool, gettext, perl, ... }:
let
fetchurl = a.fetchurl;
{ stdenv, fetchurl, aalib, gsl, libpng, libX11, xproto, libXext
, xextproto, libXt, zlib, gettext, intltool, perl }:
stdenv.mkDerivation rec {
name = "xaos-${version}";
version = "3.6";
version = a.lib.attrByPath ["version"] "3.6" a;
buildInputs = with a; [
aalib gsl libpng libX11 xproto libXext xextproto
libXt zlib gettext intltool perl
];
in
rec {
src = fetchurl {
url = "mirror://sourceforge/xaos/xaos-${version}.tar.gz";
url = "mirror://sourceforge/xaos/${name}.tar.gz";
sha256 = "15cd1cx1dyygw6g2nhjqq3bsfdj8sj8m4va9n75i0f3ryww3x7wq";
};
inherit buildInputs;
configureFlags = [];
buildInputs = [
aalib gsl libpng libX11 xproto libXext xextproto
libXt zlib gettext intltool perl
];
/* doConfigure should be removed if not needed */
phaseNames = ["preConfigure" "doConfigure" "doMakeInstall"];
preConfigure = a.fullDepEntry (''
preConfigure = ''
sed -e s@/usr/@"$out/"@g -i configure $(find . -name 'Makefile*')
mkdir -p $out/share/locale
'') ["doUnpack" "minInit" "defEnsureDir"];
'';
name = "xaos-" + version;
meta = {
homepage = http://xaos.sourceforge.net/;
description = "Fractal viewer";
license = a.stdenv.lib.licenses.gpl2Plus;
license = stdenv.lib.licenses.gpl2Plus;
};
}

View file

@ -0,0 +1,58 @@
{ kdeApp
, lib
, extra-cmake-modules
, kdoctools
, karchive
, kconfig
, kcrash
, kdbusaddons
, ki18n
, kiconthemes
, khtml
, kio
, kservice
, kpty
, kwidgetsaddons
, libarchive
, p7zip
, unrar
, unzipNLS
, zip
}:
let PATH = lib.makeSearchPath "bin" [
p7zip unrar unzipNLS zip
];
in
kdeApp {
name = "ark";
nativeBuildInputs = [
extra-cmake-modules
kdoctools
];
buildInputs = [
karchive
kconfig
kcrash
kdbusaddons
kiconthemes
kservice
kpty
kwidgetsaddons
libarchive
];
propagatedBuildInputs = [
khtml
ki18n
kio
];
postInstall = ''
wrapQtProgram "$out/bin/ark" \
--prefix PATH : "${PATH}"
'';
meta = {
license = with lib.licenses; [ gpl2 lgpl3 ];
maintainers = [ lib.maintainers.ttuegel ];
};
}

View file

@ -0,0 +1,35 @@
{ kdeApp
, lib
, extra-cmake-modules
, kdoctools
, kconfig
, kio
, ki18n
, kservice
, kfilemetadata
, baloo
, kdelibs4support
}:
kdeApp {
name = "baloo-widgets";
nativeBuildInputs = [
extra-cmake-modules
kdoctools
];
buildInputs = [
kconfig
kservice
];
propagatedBuildInputs = [
baloo
kdelibs4support
kfilemetadata
ki18n
kio
];
meta = {
license = [ lib.licenses.lgpl21 ];
maintainers = [ lib.maintainers.ttuegel ];
};
}

View file

@ -0,0 +1,54 @@
# Maintainer's Notes:
#
# Minor updates:
# 1. Edit ./manifest.sh to point to the updated URL. Upstream sometimes
# releases updates that include only the changed packages; in this case,
# multiple URLs can be provided and the results will be merged.
# 2. Run ./manifest.sh and ./dependencies.sh.
# 3. Build and enjoy.
#
# Major updates:
# We prefer not to immediately overwrite older versions with major updates, so
# make a copy of this directory first. After copying, be sure to delete ./tmp
# if it exists. Then follow the minor update instructions.
{ pkgs, debug ? false }:
let
inherit (pkgs) lib stdenv;
srcs = import ./srcs.nix { inherit (pkgs) fetchurl; inherit mirror; };
mirror = "mirror://kde";
kdeApp = import ./kde-app.nix {
inherit stdenv lib;
inherit debug srcs;
};
packages = self: with self; {
inherit (pkgs.kdeApps_15_08) kdelibs ksnapshot;
ark = callPackage ./ark.nix {};
baloo-widgets = callPackage ./baloo-widgets.nix {};
dolphin = callPackage ./dolphin.nix {};
dolphin-plugins = callPackage ./dolphin-plugins.nix {};
ffmpegthumbs = callPackage ./ffmpegthumbs.nix {};
gpgmepp = callPackage ./gpgmepp.nix {};
gwenview = callPackage ./gwenview.nix {};
kate = callPackage ./kate.nix {};
kdegraphics-thumbnailers = callPackage ./kdegraphics-thumbnailers.nix {};
kgpg = callPackage ./kgpg.nix { inherit (pkgs.kde4) kdepimlibs; };
konsole = callPackage ./konsole.nix {};
libkdcraw = callPackage ./libkdcraw.nix {};
libkexiv2 = callPackage ./libkexiv2.nix {};
libkipi = callPackage ./libkipi.nix {};
okular = callPackage ./okular.nix {};
print-manager = callPackage ./print-manager.nix {};
l10n = pkgs.recurseIntoAttrs (import ./l10n.nix { inherit callPackage lib pkgs; });
};
newScope = scope: pkgs.kf516.newScope ({ inherit kdeApp; } // scope);
in lib.makeScope newScope packages

View file

@ -0,0 +1,31 @@
{ kdeApp
, lib
, extra-cmake-modules
, kdoctools
, kxmlgui
, ki18n
, kio
, kdelibs4support
, dolphin
}:
kdeApp {
name = "dolphin-plugins";
nativeBuildInputs = [
extra-cmake-modules
kdoctools
];
buildInputs = [
kxmlgui
dolphin
];
propagatedBuildInputs = [
kdelibs4support
ki18n
kio
];
meta = {
license = [ lib.licenses.gpl2 ];
maintainers = [ lib.maintainers.ttuegel ];
};
}

View file

@ -0,0 +1,70 @@
{ kdeApp
, lib
, extra-cmake-modules
, kdoctools
, makeQtWrapper
, kinit
, kcmutils
, kcoreaddons
, knewstuff
, ki18n
, kdbusaddons
, kbookmarks
, kconfig
, kio
, kparts
, solid
, kiconthemes
, kcompletion
, ktexteditor
, kwindowsystem
, knotifications
, kactivities
, phonon
, baloo
, baloo-widgets
, kfilemetadata
, kdelibs4support
}:
kdeApp {
name = "dolphin";
nativeBuildInputs = [
extra-cmake-modules
kdoctools
makeQtWrapper
];
buildInputs = [
kinit
kcmutils
kcoreaddons
knewstuff
kdbusaddons
kbookmarks
kconfig
kparts
solid
kiconthemes
kcompletion
knotifications
phonon
baloo-widgets
];
propagatedBuildInputs = [
baloo
kactivities
kdelibs4support
kfilemetadata
ki18n
kio
ktexteditor
kwindowsystem
];
postInstall = ''
wrapQtProgram "$out/bin/dolphin"
'';
meta = {
license = with lib.licenses; [ gpl2 fdl12 ];
maintainers = [ lib.maintainers.ttuegel ];
};
}

View file

@ -0,0 +1,56 @@
#! /usr/bin/env nix-shell
#! nix-shell -i bash -p coreutils findutils gnused nix wget
set -x
# The trailing slash at the end is necessary!
WGET_ARGS='http://download.kde.org/unstable/applications/15.11.80/ -A *.tar.xz'
mkdir tmp; cd tmp
rm -f ../srcs.csv
wget -nH -r -c --no-parent $WGET_ARGS
find . | while read src; do
if [[ -f "${src}" ]]; then
# Sanitize file name
filename=$(basename "$src" | tr '@' '_')
nameVersion="${filename%.tar.*}"
name=$(echo "$nameVersion" | sed -e 's,-[[:digit:]].*,,' | sed -e 's,-opensource-src$,,')
version=$(echo "$nameVersion" | sed -e 's,^\([[:alpha:]][[:alnum:]]*-\)\+,,')
echo "$name,$version,$src,$filename" >>../srcs.csv
fi
done
cat >../srcs.nix <<EOF
# DO NOT EDIT! This file is generated automatically by fetchsrcs.sh
{ fetchurl, mirror }:
{
EOF
gawk -F , "{ print \$1 }" ../srcs.csv | sort | uniq | while read name; do
versions=$(gawk -F , "/^$name,/ { print \$2 }" ../srcs.csv)
latestVersion=$(echo "$versions" | sort -rV | head -n 1)
src=$(gawk -F , "/^$name,$latestVersion,/ { print \$3 }" ../srcs.csv)
filename=$(gawk -F , "/^$name,$latestVersion,/ { print \$4 }" ../srcs.csv)
url="${src:2}"
sha256=$(nix-hash --type sha256 --base32 --flat "$src")
cat >>../srcs.nix <<EOF
$name = {
version = "$latestVersion";
src = fetchurl {
url = "\${mirror}/$url";
sha256 = "$sha256";
name = "$filename";
};
};
EOF
done
echo "}" >>../srcs.nix
rm -f ../srcs.csv
cd ..

View file

@ -0,0 +1,21 @@
{ kdeApp
, lib
, extra-cmake-modules
, ffmpeg
, kio
}:
kdeApp {
name = "ffmpegthumbs";
nativeBuildInputs = [
extra-cmake-modules
];
buildInputs = [
ffmpeg
kio
];
meta = {
license = with lib.licenses; [ gpl2 bsd3 ];
maintainers = [ lib.maintainers.ttuegel ];
};
}

View file

@ -0,0 +1,21 @@
{ kdeApp
, lib
, extra-cmake-modules
, boost
, gpgme
}:
kdeApp {
name = "gpgmepp";
nativeBuildInputs = [
extra-cmake-modules
];
buildInputs = [
boost
gpgme
];
meta = {
license = with lib.licenses; [ lgpl21 bsd3 ];
maintainers = [ lib.maintainers.ttuegel ];
};
}

View file

@ -0,0 +1,44 @@
{ kdeApp
, lib
, extra-cmake-modules
, kdoctools
, makeQtWrapper
, baloo
, exiv2
, kactivities
, kdelibs4support
, kio
, lcms2
, phonon
, qtsvg
, qtx11extras
}:
kdeApp {
name = "gwenview";
nativeBuildInputs = [
extra-cmake-modules
kdoctools
makeQtWrapper
];
buildInputs = [
exiv2
lcms2
phonon
qtsvg
];
propagatedBuildInputs = [
baloo
kactivities
kdelibs4support
kio
qtx11extras
];
postInstall = ''
wrapQtProgram "$out/bin/gwenview"
'';
meta = {
license = with lib.licenses; [ gpl2 fdl12 ];
maintainers = [ lib.maintainers.ttuegel ];
};
}

View file

@ -0,0 +1,69 @@
{ kdeApp
, lib
, extra-cmake-modules
, kdoctools
, qtscript
, kactivities
, kconfig
, kcrash
, kguiaddons
, kiconthemes
, ki18n
, kinit
, kjobwidgets
, kio
, kparts
, ktexteditor
, kwindowsystem
, kxmlgui
, kdbusaddons
, kwallet
, plasma-framework
, kitemmodels
, knotifications
, threadweaver
, knewstuff
, libgit2
}:
kdeApp {
name = "kate";
nativeBuildInputs = [
extra-cmake-modules
kdoctools
];
buildInputs = [
qtscript
kconfig
kcrash
kguiaddons
kiconthemes
kinit
kjobwidgets
kparts
kxmlgui
kdbusaddons
kwallet
kitemmodels
knotifications
threadweaver
knewstuff
libgit2
];
propagatedBuildInputs = [
kactivities
ki18n
kio
ktexteditor
kwindowsystem
plasma-framework
];
postInstall = ''
wrapQtProgram "$out/bin/kate"
wrapQtProgram "$out/bin/kwrite"
'';
meta = {
license = with lib.licenses; [ gpl3 lgpl3 lgpl2 ];
maintainers = [ lib.maintainers.ttuegel ];
};
}

View file

@ -0,0 +1,23 @@
{ stdenv, lib, debug, srcs }:
args:
let
inherit (args) name;
sname = args.sname or name;
inherit (srcs."${sname}") src version;
in
stdenv.mkDerivation (args // {
name = "${name}-${version}";
inherit src;
cmakeFlags =
(args.cmakeFlags or [])
++ [ "-DBUILD_TESTING=OFF" ]
++ lib.optional debug "-DCMAKE_BUILD_TYPE=Debug";
meta = {
platforms = lib.platforms.linux;
homepage = "http://www.kde.org";
} // (args.meta or {});
})

View file

@ -0,0 +1,20 @@
name: args:
{ kdeApp, automoc4, cmake, gettext, kdelibs, perl }:
kdeApp (args // {
sname = "kde-l10n-${name}";
name = "kde-l10n-${name}-qt4";
nativeBuildInputs =
[ automoc4 cmake gettext perl ]
++ (args.nativeBuildInputs or []);
buildInputs =
[ kdelibs ]
++ (args.buildInputs or []);
preConfigure = ''
sed -e 's/add_subdirectory(5)//' -i CMakeLists.txt
${args.preConfigure or ""}
'';
})

View file

@ -0,0 +1,17 @@
name: args:
{ kdeApp, cmake, extra-cmake-modules, gettext, kdoctools }:
kdeApp (args // {
sname = "kde-l10n-${name}";
name = "kde-l10n-${name}-qt5";
nativeBuildInputs =
[ cmake extra-cmake-modules gettext kdoctools ]
++ (args.nativeBuildInputs or []);
preConfigure = ''
sed -e 's/add_subdirectory(4)//' -i CMakeLists.txt
${args.preConfigure or ""}
'';
})

View file

@ -0,0 +1,23 @@
{ kdeApp
, lib
, extra-cmake-modules
, kio
, libkexiv2
, libkdcraw
}:
kdeApp {
name = "kdegraphics-thumbnailers";
nativeBuildInputs = [
extra-cmake-modules
];
buildInputs = [
kio
libkexiv2
libkdcraw
];
meta = {
license = [ lib.licenses.lgpl21 ];
maintainers = [ lib.maintainers.ttuegel ];
};
}

View file

@ -0,0 +1,38 @@
{ kdeApp
, lib
, automoc4
, cmake
, makeWrapper
, perl
, pkgconfig
, boost
, gpgme
, kdelibs
, kdepimlibs
, gnupg
}:
kdeApp {
name = "kgpg";
nativeBuildInputs = [
automoc4
cmake
makeWrapper
perl
pkgconfig
];
buildInputs = [
boost
gpgme
kdelibs
kdepimlibs
];
postInstall = ''
wrapProgram "$out/bin/kgpg" \
--prefix PATH : "${gnupg}/bin"
'';
meta = {
license = [ lib.licenses.gpl2 ];
maintainers = [ lib.maintainers.ttuegel ];
};
}

View file

@ -0,0 +1,68 @@
{ kdeApp
, lib
, extra-cmake-modules
, kdoctools
, makeQtWrapper
, qtscript
, kbookmarks
, kcompletion
, kconfig
, kconfigwidgets
, kcoreaddons
, kguiaddons
, ki18n
, kiconthemes
, kinit
, kdelibs4support
, kio
, knotifications
, knotifyconfig
, kparts
, kpty
, kservice
, ktextwidgets
, kwidgetsaddons
, kwindowsystem
, kxmlgui
}:
kdeApp {
name = "konsole";
nativeBuildInputs = [
extra-cmake-modules
kdoctools
makeQtWrapper
];
buildInputs = [
qtscript
kbookmarks
kcompletion
kconfig
kconfigwidgets
kcoreaddons
kguiaddons
kiconthemes
kinit
kio
knotifications
knotifyconfig
kparts
kpty
kservice
ktextwidgets
kwidgetsaddons
kxmlgui
];
propagatedBuildInputs = [
kdelibs4support
ki18n
kwindowsystem
];
postInstall = ''
wrapQtProgram "$out/bin/konsole"
'';
meta = {
license = with lib.licenses; [ gpl2 lgpl21 fdl12 ];
maintainers = [ lib.maintainers.ttuegel ];
};
}

View file

@ -0,0 +1,29 @@
{ kdeApp
, lib
, automoc4
, cmake
, perl
, pkgconfig
, kdelibs
, libkipi
, libXfixes
}:
kdeApp {
name = "ksnapshot";
nativeBuildInputs = [
automoc4
cmake
perl
pkgconfig
];
buildInputs = [
kdelibs
libkipi
libXfixes
];
meta = {
license = with lib.licenses; [ gpl2 lgpl21 fdl12 ];
maintainers = [ lib.maintainers.ttuegel ];
};
}

View file

@ -0,0 +1,237 @@
{ callPackage, pkgs, lib }:
let
kdeLocale4 = import ./kde-locale-4.nix;
kdeLocale5 = import ./kde-locale-5.nix;
in
lib.mapAttrs (name: attr: pkgs.recurseIntoAttrs attr) {
ar = {
qt4 = callPackage (kdeLocale4 "ar" {}) {};
qt5 = callPackage (kdeLocale5 "ar" {}) {};
};
bg = {
qt4 = callPackage (kdeLocale4 "bg" {}) {};
qt5 = callPackage (kdeLocale5 "bg" {}) {};
};
bs = {
qt4 = callPackage (kdeLocale4 "bs" {}) {};
qt5 = callPackage (kdeLocale5 "bs" {}) {};
};
ca = {
qt4 = callPackage (kdeLocale4 "ca" {}) {};
qt5 = callPackage (kdeLocale5 "ca" {}) {};
};
ca_valencia = {
qt4 = callPackage (kdeLocale4 "ca_valencia" {}) {};
qt5 = callPackage (kdeLocale5 "ca_valencia" {}) {};
};
cs = {
qt4 = callPackage (kdeLocale4 "cs" {}) {};
qt5 = callPackage (kdeLocale5 "cs" {}) {};
};
da = {
qt4 = callPackage (kdeLocale4 "da" {}) {};
qt5 = callPackage (kdeLocale5 "da" {}) {};
};
de = {
qt4 = callPackage (kdeLocale4 "de" {}) {};
qt5 = callPackage (kdeLocale5 "de" {}) {};
};
el = {
qt4 = callPackage (kdeLocale4 "el" {}) {};
qt5 = callPackage (kdeLocale5 "el" {}) {};
};
en_GB = {
qt4 = callPackage (kdeLocale4 "en_GB" {}) {};
qt5 = callPackage (kdeLocale5 "en_GB" {}) {};
};
eo = {
qt4 = callPackage (kdeLocale4 "eo" {}) {};
qt5 = callPackage (kdeLocale5 "eo" {}) {};
};
es = {
qt4 = callPackage (kdeLocale4 "es" {}) {};
qt5 = callPackage (kdeLocale5 "es" {}) {};
};
et = {
qt4 = callPackage (kdeLocale4 "et" {}) {};
qt5 = callPackage (kdeLocale5 "et" {}) {};
};
eu = {
qt4 = callPackage (kdeLocale4 "eu" {}) {};
qt5 = callPackage (kdeLocale5 "eu" {}) {};
};
fa = {
qt4 = callPackage (kdeLocale4 "fa" {}) {};
qt5 = callPackage (kdeLocale5 "fa" {}) {};
};
fi = {
qt4 = callPackage (kdeLocale4 "fi" {}) {};
qt5 = callPackage (kdeLocale5 "fi" {}) {};
};
fr = {
qt4 = callPackage (kdeLocale4 "fr" {}) {};
qt5 = callPackage (kdeLocale5 "fr" {}) {};
};
ga = {
qt4 = callPackage (kdeLocale4 "ga" {}) {};
qt5 = callPackage (kdeLocale5 "ga" {}) {};
};
gl = {
qt4 = callPackage (kdeLocale4 "gl" {}) {};
qt5 = callPackage (kdeLocale5 "gl" {}) {};
};
he = {
qt4 = callPackage (kdeLocale4 "he" {}) {};
qt5 = callPackage (kdeLocale5 "he" {}) {};
};
hi = {
qt4 = callPackage (kdeLocale4 "hi" {}) {};
qt5 = callPackage (kdeLocale5 "hi" {}) {};
};
hr = {
qt4 = callPackage (kdeLocale4 "hr" {}) {};
qt5 = callPackage (kdeLocale5 "hr" {}) {};
};
hu = {
qt4 = callPackage (kdeLocale4 "hu" {}) {};
qt5 = callPackage (kdeLocale5 "hu" {}) {};
};
ia = {
qt4 = callPackage (kdeLocale4 "ia" {}) {};
qt5 = callPackage (kdeLocale5 "ia" {}) {};
};
id = {
qt4 = callPackage (kdeLocale4 "id" {}) {};
qt5 = callPackage (kdeLocale5 "id" {}) {};
};
is = {
qt4 = callPackage (kdeLocale4 "is" {}) {};
qt5 = callPackage (kdeLocale5 "is" {}) {};
};
it = {
qt4 = callPackage (kdeLocale4 "it" {}) {};
qt5 = callPackage (kdeLocale5 "it" {}) {};
};
ja = {
qt4 = callPackage (kdeLocale4 "ja" {}) {};
qt5 = callPackage (kdeLocale5 "ja" {}) {};
};
kk = {
qt4 = callPackage (kdeLocale4 "kk" {}) {};
qt5 = callPackage (kdeLocale5 "kk" {}) {};
};
km = {
qt4 = callPackage (kdeLocale4 "km" {}) {};
qt5 = callPackage (kdeLocale5 "km" {}) {};
};
ko = {
qt4 = callPackage (kdeLocale4 "ko" {}) {};
qt5 = callPackage (kdeLocale5 "ko" {}) {};
};
lt = {
qt4 = callPackage (kdeLocale4 "lt" {}) {};
qt5 = callPackage (kdeLocale5 "lt" {}) {};
};
lv = {
qt4 = callPackage (kdeLocale4 "lv" {}) {};
qt5 = callPackage (kdeLocale5 "lv" {}) {};
};
mr = {
qt4 = callPackage (kdeLocale4 "mr" {}) {};
qt5 = callPackage (kdeLocale5 "mr" {}) {};
};
nb = {
qt4 = callPackage (kdeLocale4 "nb" {}) {};
qt5 = callPackage (kdeLocale5 "nb" {}) {};
};
nds = {
qt4 = callPackage (kdeLocale4 "nds" {}) {};
qt5 = callPackage (kdeLocale5 "nds" {}) {};
};
# TODO: build broken in 15.11.80; re-enable in next release
/*
nl = {
qt4 = callPackage (kdeLocale4 "nl" {}) {};
qt5 = callPackage (kdeLocale5 "nl" {}) {};
};
*/
nn = {
qt4 = callPackage (kdeLocale4 "nn" {}) {};
qt5 = callPackage (kdeLocale5 "nn" {}) {};
};
pa = {
qt4 = callPackage (kdeLocale4 "pa" {}) {};
qt5 = callPackage (kdeLocale5 "pa" {}) {};
};
pl = {
qt4 = callPackage (kdeLocale4 "pl" {}) {};
qt5 = callPackage (kdeLocale5 "pl" {}) {};
};
pt = {
qt4 = callPackage (kdeLocale4 "pt" {}) {};
qt5 = callPackage (kdeLocale5 "pt" {}) {};
};
pt_BR = {
qt4 = callPackage (kdeLocale4 "pt_BR" {}) {};
qt5 = callPackage (kdeLocale5 "pt_BR" {}) {};
};
ro = {
qt4 = callPackage (kdeLocale4 "ro" {}) {};
qt5 = callPackage (kdeLocale5 "ro" {}) {};
};
ru = {
qt4 = callPackage (kdeLocale4 "ru" {}) {};
qt5 = callPackage (kdeLocale5 "ru" {}) {};
};
sk = {
qt4 = callPackage (kdeLocale4 "sk" {}) {};
qt5 = callPackage (kdeLocale5 "sk" {}) {};
};
sl = {
qt4 = callPackage (kdeLocale4 "sl" {}) {};
qt5 = callPackage (kdeLocale5 "sl" {}) {};
};
sr = {
qt4 = callPackage (kdeLocale4 "sr" {}) {};
qt5 = callPackage (kdeLocale5 "sr" {
preConfigure = ''
sed -e 's/add_subdirectory(kdesdk)//' -i 5/sr/data/CMakeLists.txt
'';
}) {};
};
sv = {
qt4 = callPackage (kdeLocale4 "sv" {}) {};
qt5 = callPackage (kdeLocale5 "sv" {}) {};
};
tr = {
qt4 = callPackage (kdeLocale4 "tr" {}) {};
qt5 = callPackage (kdeLocale5 "tr" {}) {};
};
ug = {
qt4 = callPackage (kdeLocale4 "ug" {}) {};
qt5 = callPackage (kdeLocale5 "ug" {}) {};
};
# TODO: build broken in 15.11.80; re-enable in next release
/*
uk = {
qt4 = callPackage (kdeLocale4 "uk" {}) {};
qt5 = callPackage (kdeLocale5 "uk" {}) {};
};
*/
wa = {
qt4 = callPackage (kdeLocale4 "wa" {}) {};
qt5 = callPackage (kdeLocale5 "wa" {}) {};
};
zh_CN = {
qt4 = callPackage (kdeLocale4 "zh_CN" {}) {};
qt5 = callPackage (kdeLocale5 "zh_CN" {}) {};
};
zh_TW = {
qt4 = callPackage (kdeLocale4 "zh_TW" {}) {};
qt5 = callPackage (kdeLocale5 "zh_TW" {}) {};
};
}

View file

@ -0,0 +1,19 @@
{ kdeApp
, lib
, extra-cmake-modules
, libraw
}:
kdeApp {
name = "libkdcraw";
nativeBuildInputs = [
extra-cmake-modules
];
buildInputs = [
libraw
];
meta = {
license = with lib.licenses; [ gpl2 lgpl21 bsd3 ];
maintainers = [ lib.maintainers.ttuegel ];
};
}

View file

@ -0,0 +1,19 @@
{ kdeApp
, lib
, exiv2
, extra-cmake-modules
}:
kdeApp {
name = "libkexiv2";
nativeBuildInputs = [
extra-cmake-modules
];
buildInputs = [
exiv2
];
meta = {
license = with lib.licenses; [ gpl2 lgpl21 bsd3 ];
maintainers = [ lib.maintainers.ttuegel ];
};
}

View file

@ -0,0 +1,22 @@
{ kdeApp
, lib
, extra-cmake-modules
, kconfig
, ki18n
, kservice
, kxmlgui
}:
kdeApp {
name = "libkipi";
nativeBuildInputs = [
extra-cmake-modules
];
buildInputs = [
kconfig ki18n kservice kxmlgui
];
meta = {
license = with lib.licenses; [ gpl2 lgpl21 bsd3 ];
maintainers = [ lib.maintainers.ttuegel ];
};
}

View file

@ -0,0 +1,41 @@
{ kdeApp
, lib
, automoc4
, cmake
, perl
, pkgconfig
, kdelibs
, qimageblitz
, poppler_qt4
, libspectre
, libkexiv2
, djvulibre
, libtiff
, freetype
, ebook_tools
}:
kdeApp {
name = "okular";
nativeBuildInputs = [
automoc4
cmake
perl
pkgconfig
];
buildInputs = [
kdelibs
qimageblitz
poppler_qt4
libspectre
libkexiv2
djvulibre
libtiff
freetype
ebook_tools
];
meta = {
license = with lib.licenses; [ gpl2 lgpl21 fdl12 bsd3 ];
maintainers = [ lib.maintainers.ttuegel ];
};
}

View file

@ -0,0 +1,47 @@
{ kdeApp
, lib
, extra-cmake-modules
, qtdeclarative
, cups
, kconfig
, kconfigwidgets
, kdbusaddons
, kiconthemes
, ki18n
, kcmutils
, kio
, knotifications
, plasma-framework
, kwidgetsaddons
, kwindowsystem
, kitemviews
}:
kdeApp {
name = "print-manager";
nativeBuildInputs = [
extra-cmake-modules
];
buildInputs = [
cups
kconfig
kconfigwidgets
kdbusaddons
kiconthemes
kcmutils
knotifications
kwidgetsaddons
kitemviews
];
propagatedBuildInputs = [
ki18n
kio
kwindowsystem
plasma-framework
qtdeclarative
];
meta = {
license = [ lib.licenses.gpl2 ];
maintainers = [ lib.maintainers.ttuegel ];
};
}

File diff suppressed because it is too large Load diff

View file

@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
src = fetchurl {
url = "https://github.com/kovidgoyal/calibre/releases/download/v${meta.version}/${name}.tar.xz";
sha256 = "0d1sn2wc6h3c5girllsmnqg3jhmkal693ww3j6cj1mz2rraw45xr";
sha256 = "1ffqvnjqmplcpa398809gp4d4l7nqc6k8ky255mdkabfcdvf3kk3";
};
inherit python;
@ -58,7 +58,7 @@ stdenv.mkDerivation rec {
'';
meta = with stdenv.lib; {
version = "2.44.0";
version = "2.44.1";
description = "Comprehensive e-book software";
homepage = http://calibre-ebook.com;
license = licenses.gpl3;

View file

@ -24,6 +24,6 @@ stdenv.mkDerivation rec {
homepage = https://bitbucket.org/melek/dmenu2;
license = stdenv.lib.licenses.mit;
maintainers = with maintainers; [ cstrahan ];
platforms = with platforms; all;
platforms = platforms.all;
};
}

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