Merge remote-tracking branch 'origin/master' into stdenv-updates.
Conflicts: pkgs/top-level/all-packages.nix
This commit is contained in:
commit
91f2c362de
@ -22,6 +22,8 @@ let
|
|||||||
in
|
in
|
||||||
{ inherit trivial lists strings stringsWithDeps attrsets sources options
|
{ inherit trivial lists strings stringsWithDeps attrsets sources options
|
||||||
properties modules types meta debug maintainers licenses platforms systems;
|
properties modules types meta debug maintainers licenses platforms systems;
|
||||||
|
# Pull in some builtins not included elsewhere.
|
||||||
|
inherit (builtins) pathExists readFile;
|
||||||
}
|
}
|
||||||
# !!! don't include everything at top-level; perhaps only the most
|
# !!! don't include everything at top-level; perhaps only the most
|
||||||
# commonly used functions.
|
# commonly used functions.
|
||||||
|
@ -186,6 +186,12 @@
|
|||||||
url = http://www.mozilla.org/MPL/MPL-1.1.html;
|
url = http://www.mozilla.org/MPL/MPL-1.1.html;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
mpl20 = {
|
||||||
|
shortName = "MPL2.0";
|
||||||
|
fullName = "Mozilla Public License version 2.0";
|
||||||
|
url = https://www.mozilla.org/MPL/2.0;
|
||||||
|
};
|
||||||
|
|
||||||
openssl = {
|
openssl = {
|
||||||
shortName = "openssl";
|
shortName = "openssl";
|
||||||
fullName = "OpenSSL license";
|
fullName = "OpenSSL license";
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
# General list operations.
|
# General list operations.
|
||||||
let
|
let
|
||||||
|
|
||||||
inherit (import ./trivial.nix) deepSeq;
|
inherit (import ./trivial.nix) deepSeq;
|
||||||
|
|
||||||
inc = builtins.add 1;
|
inc = builtins.add 1;
|
||||||
|
|
||||||
dec = n: builtins.sub n 1;
|
dec = n: builtins.sub n 1;
|
||||||
|
|
||||||
inherit (builtins) elemAt;
|
|
||||||
in rec {
|
in rec {
|
||||||
inherit (builtins) head tail length isList add sub lessThan;
|
inherit (builtins) head tail length isList add sub lessThan elemAt;
|
||||||
|
|
||||||
|
|
||||||
# Create a list consisting of a single element. `singleton x' is
|
# Create a list consisting of a single element. `singleton x' is
|
||||||
|
@ -206,9 +206,7 @@ rec {
|
|||||||
in
|
in
|
||||||
work startSet [] [];
|
work startSet [] [];
|
||||||
|
|
||||||
genericClosure =
|
genericClosure = builtins.genericClosure or lazyGenericClosure;
|
||||||
if builtins ? genericClosure then builtins.genericClosure
|
|
||||||
else lazyGenericClosure;
|
|
||||||
|
|
||||||
innerModifySumArgs = f: x: a: b: if b == null then (f a b) // x else
|
innerModifySumArgs = f: x: a: b: if b == null then (f a b) // x else
|
||||||
innerModifySumArgs f x (a // b);
|
innerModifySumArgs f x (a // b);
|
||||||
|
@ -185,8 +185,7 @@ rec {
|
|||||||
) funs;
|
) funs;
|
||||||
|
|
||||||
|
|
||||||
moduleMerge = path: modules:
|
moduleMerge = path: modules_:
|
||||||
let modules_ = modules; in
|
|
||||||
let
|
let
|
||||||
addName = name:
|
addName = name:
|
||||||
if path == "" then name else path + "." + name;
|
if path == "" then name else path + "." + name;
|
||||||
|
@ -11,10 +11,7 @@ with import ./properties.nix;
|
|||||||
|
|
||||||
rec {
|
rec {
|
||||||
|
|
||||||
inherit (lib) isType;
|
isOption = lib.isType "option";
|
||||||
|
|
||||||
|
|
||||||
isOption = isType "option";
|
|
||||||
mkOption = attrs: attrs // {
|
mkOption = attrs: attrs // {
|
||||||
_type = "option";
|
_type = "option";
|
||||||
# name (this is the name of the attributem it is automatically generated by the traversal)
|
# name (this is the name of the attributem it is automatically generated by the traversal)
|
||||||
@ -66,7 +63,7 @@ rec {
|
|||||||
if all opt.check list then
|
if all opt.check list then
|
||||||
opt.merge list
|
opt.merge list
|
||||||
else
|
else
|
||||||
throw "One of option ${name} values has a bad type.";
|
throw "A value of the option `${name}' has a bad type.";
|
||||||
}
|
}
|
||||||
else opt;
|
else opt;
|
||||||
|
|
||||||
@ -77,7 +74,7 @@ rec {
|
|||||||
if opt.check opt.default then
|
if opt.check opt.default then
|
||||||
opt.default
|
opt.default
|
||||||
else
|
else
|
||||||
throw "The default value of option ${name} has a bad type.";
|
throw "The default value of the option `${name}' has a bad type.";
|
||||||
}
|
}
|
||||||
else opt;
|
else opt;
|
||||||
|
|
||||||
@ -275,6 +272,8 @@ rec {
|
|||||||
description = opt.description or (throw "Option ${opt.name}: No description.");
|
description = opt.description or (throw "Option ${opt.name}: No description.");
|
||||||
declarations = map (x: toString x.source) opt.declarations;
|
declarations = map (x: toString x.source) opt.declarations;
|
||||||
#definitions = map (x: toString x.source) opt.definitions;
|
#definitions = map (x: toString x.source) opt.definitions;
|
||||||
|
internal = opt.internal or false;
|
||||||
|
visible = opt.visible or true;
|
||||||
}
|
}
|
||||||
// optionalAttrs (opt ? example) { example = scrubOptionValue opt.example; }
|
// optionalAttrs (opt ? example) { example = scrubOptionValue opt.example; }
|
||||||
// optionalAttrs (opt ? default) { default = scrubOptionValue opt.default; }
|
// optionalAttrs (opt ? default) { default = scrubOptionValue opt.default; }
|
||||||
|
1
nixos/.topmsg
Normal file
1
nixos/.topmsg
Normal file
@ -0,0 +1 @@
|
|||||||
|
improvements to vsftpd module
|
@ -11,6 +11,15 @@ NixOS machine through the configuration file
|
|||||||
effect after you run <command>nixos-rebuild</command>.</para>
|
effect after you run <command>nixos-rebuild</command>.</para>
|
||||||
|
|
||||||
|
|
||||||
|
<!--===============================================================-->
|
||||||
|
|
||||||
|
<section xml:id="sec-configuration-syntax"><title>Configuration syntax</title>
|
||||||
|
|
||||||
|
<para>TODO</para>
|
||||||
|
|
||||||
|
</section>
|
||||||
|
|
||||||
|
|
||||||
<!--===============================================================-->
|
<!--===============================================================-->
|
||||||
|
|
||||||
<section><title>Package management</title>
|
<section><title>Package management</title>
|
||||||
|
@ -1,22 +1,37 @@
|
|||||||
{ pkgs, options
|
{ pkgs, options
|
||||||
# revision can have multiple values: local, HEAD or any revision number.
|
, revision ? "master"
|
||||||
, revision ? "HEAD"
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
with pkgs.lib;
|
with pkgs.lib;
|
||||||
|
|
||||||
let
|
let
|
||||||
|
|
||||||
# To prevent infinite recursion, remove system.path from the
|
# Remove invisible and internal options.
|
||||||
# options. Not sure why this happens.
|
options' = filter (opt: opt.visible && !opt.internal) (optionAttrSetToDocList options);
|
||||||
options_ =
|
|
||||||
options //
|
|
||||||
{ system = removeAttrs options.system ["path"]; };
|
|
||||||
|
|
||||||
optionsXML = builtins.toFile "options.xml" (builtins.unsafeDiscardStringContext
|
# Clean up declaration sites to not refer to the NixOS source tree.
|
||||||
(builtins.toXML (optionAttrSetToDocList options_)));
|
options'' = flip map options' (opt: opt // {
|
||||||
|
declarations = map (fn: stripPrefix fn) opt.declarations;
|
||||||
|
});
|
||||||
|
|
||||||
|
prefix = toString pkgs.path;
|
||||||
|
|
||||||
|
stripPrefix = fn:
|
||||||
|
if substring 0 (stringLength prefix) fn == prefix then
|
||||||
|
substring (add (stringLength prefix) 1) 1000 fn
|
||||||
|
else
|
||||||
|
fn;
|
||||||
|
|
||||||
|
optionsXML = builtins.toFile "options.xml" (builtins.unsafeDiscardStringContext (builtins.toXML options''));
|
||||||
|
|
||||||
optionsDocBook = pkgs.runCommand "options-db.xml" {} ''
|
optionsDocBook = pkgs.runCommand "options-db.xml" {} ''
|
||||||
|
if grep /nixpkgs/nixos/modules ${optionsXML}; then
|
||||||
|
echo "The manual appears to depend on the location of Nixpkgs, which is bad"
|
||||||
|
echo "since this prevents sharing via the NixOS channel. This is typically"
|
||||||
|
echo "caused by an option default that refers to a relative path (see above"
|
||||||
|
echo "for hints about the offending path)."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
${pkgs.libxslt}/bin/xsltproc \
|
${pkgs.libxslt}/bin/xsltproc \
|
||||||
--stringparam revision '${revision}' \
|
--stringparam revision '${revision}' \
|
||||||
-o $out ${./options-to-docbook.xsl} ${optionsXML}
|
-o $out ${./options-to-docbook.xsl} ${optionsXML}
|
||||||
@ -64,9 +79,12 @@ in rec {
|
|||||||
|
|
||||||
cp ${./style.css} $dst/style.css
|
cp ${./style.css} $dst/style.css
|
||||||
|
|
||||||
ensureDir $out/nix-support
|
mkdir -p $out/nix-support
|
||||||
|
echo "nix-build out $out" >> $out/nix-support/hydra-build-products
|
||||||
echo "doc manual $dst manual.html" >> $out/nix-support/hydra-build-products
|
echo "doc manual $dst manual.html" >> $out/nix-support/hydra-build-products
|
||||||
''; # */
|
''; # */
|
||||||
|
|
||||||
|
meta.description = "The NixOS manual in HTML format";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Generate the NixOS manpages.
|
# Generate the NixOS manpages.
|
||||||
@ -87,7 +105,7 @@ in rec {
|
|||||||
./man-pages.xml
|
./man-pages.xml
|
||||||
|
|
||||||
# Generate manpages.
|
# Generate manpages.
|
||||||
ensureDir $out/share/man
|
mkdir -p $out/share/man
|
||||||
xsltproc --nonet --xinclude \
|
xsltproc --nonet --xinclude \
|
||||||
--param man.output.in.separate.dir 1 \
|
--param man.output.in.separate.dir 1 \
|
||||||
--param man.output.base.dir "'$out/share/man/'" \
|
--param man.output.base.dir "'$out/share/man/'" \
|
||||||
|
@ -44,7 +44,7 @@ Wiki</link>.</para>
|
|||||||
<listitem><para>The NixOS manual is available on virtual console 8
|
<listitem><para>The NixOS manual is available on virtual console 8
|
||||||
(press Alt+F8 to access).</para></listitem>
|
(press Alt+F8 to access).</para></listitem>
|
||||||
|
|
||||||
<listitem><para>Login as <literal>root</literal>, empty
|
<listitem><para>Login as <literal>root</literal> and the empty
|
||||||
password.</para></listitem>
|
password.</para></listitem>
|
||||||
|
|
||||||
<listitem><para>If you downloaded the graphical ISO image, you can
|
<listitem><para>If you downloaded the graphical ISO image, you can
|
||||||
@ -89,7 +89,13 @@ $ lvcreate --size 1G --name smalldisk MyVolGroup</screen>
|
|||||||
</para></listitem>
|
</para></listitem>
|
||||||
|
|
||||||
<listitem><para>Mount the target file system on which NixOS should
|
<listitem><para>Mount the target file system on which NixOS should
|
||||||
be installed on <filename>/mnt</filename>.</para></listitem>
|
be installed on <filename>/mnt</filename>, e.g.
|
||||||
|
|
||||||
|
<screen>
|
||||||
|
$ mount /dev/disk/by-label/nixos /mnt
|
||||||
|
</screen>
|
||||||
|
|
||||||
|
</para></listitem>
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
|
|
||||||
@ -97,40 +103,56 @@ $ lvcreate --size 1G --name smalldisk MyVolGroup</screen>
|
|||||||
<filename>/mnt/etc/nixos/configuration.nix</filename> that
|
<filename>/mnt/etc/nixos/configuration.nix</filename> that
|
||||||
specifies the intended configuration of the system. This is
|
specifies the intended configuration of the system. This is
|
||||||
because NixOS has a <emphasis>declarative</emphasis> configuration
|
because NixOS has a <emphasis>declarative</emphasis> configuration
|
||||||
model: you create or edit a description of the configuration that
|
model: you create or edit a description of the desired
|
||||||
you want to be built and activated, and then NixOS takes care of
|
configuration of your system, and then NixOS takes care of making
|
||||||
realising that configuration. The command
|
it happen. The syntax of the NixOS configuration file is
|
||||||
<command>nixos-option</command> can generate an initial
|
described in <xref linkend="sec-configuration-syntax"/>, while a
|
||||||
configuration file for you:
|
list of available configuration options appears in <xref
|
||||||
|
linkend="ch-options"/>. A minimal example is shown in <xref
|
||||||
|
linkend="ex-config"/>.</para>
|
||||||
|
|
||||||
|
<para>The command <command>nixos-generate-config</command> can
|
||||||
|
generate an initial configuration file for you:
|
||||||
|
|
||||||
<screen>
|
<screen>
|
||||||
$ nixos-option --install</screen>
|
$ nixos-generate-config --root /mnt</screen>
|
||||||
|
|
||||||
It tries to figure out the kernel modules necessary for mounting
|
You should then edit
|
||||||
the root device, as well as various other hardware
|
|
||||||
characteristics. However, it doesn’t try to figure out the
|
|
||||||
<option>fileSystems</option> option yet.</para>
|
|
||||||
|
|
||||||
<para>You should edit
|
|
||||||
<filename>/mnt/etc/nixos/configuration.nix</filename> to suit your
|
<filename>/mnt/etc/nixos/configuration.nix</filename> to suit your
|
||||||
needs. The text editors <command>nano</command> and
|
needs:
|
||||||
<command>vim</command> are available.</para>
|
|
||||||
|
|
||||||
<para>You need to specify a root file system in
|
<screen>
|
||||||
<option>fileSystems</option> and the target device for the Grub boot
|
$ nano /mnt/etc/nixos/configuration.nix
|
||||||
loader in <option>boot.loader.grub.device</option>. See
|
</screen>
|
||||||
<xref linkend="ch-options"/> for a list of the available configuration
|
|
||||||
options.</para>
|
|
||||||
|
|
||||||
<note><para>It is very important that you specify in the option
|
The <command>vim</command> text editor is also available.</para>
|
||||||
<option>boot.initrd.kernelModules</option> all kernel modules that
|
|
||||||
are necessary for mounting the root file system, otherwise the
|
<para>You <emphasis>must</emphasis> set the option
|
||||||
installed system will not be able to boot. (If this happens, boot
|
<option>boot.loader.grub.device</option> to specify on which disk
|
||||||
from the CD again, mount the target file system on
|
the GRUB boot loader is to be installed. Without it, NixOS cannot
|
||||||
|
boot.</para>
|
||||||
|
|
||||||
|
<para>Another critical option is <option>fileSystems</option>,
|
||||||
|
specifying the file systems that need to be mounted by NixOS.
|
||||||
|
However, you typically don’t need to set it yourself, because
|
||||||
|
<command>nixos-generate-config</command> sets it automatically in
|
||||||
|
<filename>/mnt/etc/nixos/hardware-configuration.nix</filename>
|
||||||
|
from your currently mounted file systems. (The configuration file
|
||||||
|
<filename>hardware-configuration.nix</filename> is included from
|
||||||
|
<filename>configuration.nix</filename> and will be overwritten by
|
||||||
|
future invocations of <command>nixos-generate-config</command>;
|
||||||
|
thus, you generally should not modify it.)</para>
|
||||||
|
|
||||||
|
<note><para>Depending on your hardware configuration or type of
|
||||||
|
file system, you may need to set the option
|
||||||
|
<option>boot.initrd.kernelModules</option> to include the kernel
|
||||||
|
modules that are necessary for mounting the root file system,
|
||||||
|
otherwise the installed system will not be able to boot. (If this
|
||||||
|
happens, boot from the CD again, mount the target file system on
|
||||||
<filename>/mnt</filename>, fix
|
<filename>/mnt</filename>, fix
|
||||||
<filename>/mnt/etc/nixos/configuration.nix</filename> and rerun
|
<filename>/mnt/etc/nixos/configuration.nix</filename> and rerun
|
||||||
<filename>nixos-install</filename>.) In most cases,
|
<filename>nixos-install</filename>.) In most cases,
|
||||||
<command>nixos-option --install</command> will figure out the
|
<command>nixos-generate-config</command> will figure out the
|
||||||
required modules.</para></note>
|
required modules.</para></note>
|
||||||
|
|
||||||
<para>Examples of real-world NixOS configuration files can be
|
<para>Examples of real-world NixOS configuration files can be
|
||||||
@ -218,7 +240,7 @@ $ fdisk /dev/sda <lineannotation>(or whatever device you want to install on)</li
|
|||||||
$ mkfs.ext4 -L nixos /dev/sda1 <lineannotation>(idem)</lineannotation>
|
$ mkfs.ext4 -L nixos /dev/sda1 <lineannotation>(idem)</lineannotation>
|
||||||
$ mkswap -L swap /dev/sda2 <lineannotation>(idem)</lineannotation>
|
$ mkswap -L swap /dev/sda2 <lineannotation>(idem)</lineannotation>
|
||||||
$ mount LABEL=nixos /mnt
|
$ mount LABEL=nixos /mnt
|
||||||
$ nixos-option --install
|
$ nixos-generate-config
|
||||||
$ nano /mnt/etc/nixos/configuration.nix
|
$ nano /mnt/etc/nixos/configuration.nix
|
||||||
<lineannotation>(in particular, set the fileSystems and swapDevices options)</lineannotation>
|
<lineannotation>(in particular, set the fileSystems and swapDevices options)</lineannotation>
|
||||||
$ nixos-install
|
$ nixos-install
|
||||||
@ -228,8 +250,16 @@ $ reboot</screen>
|
|||||||
<example xml:id='ex-config'><title>NixOS configuration</title>
|
<example xml:id='ex-config'><title>NixOS configuration</title>
|
||||||
<screen>
|
<screen>
|
||||||
{
|
{
|
||||||
|
imports =
|
||||||
|
[ # Include the results of the hardware scan.
|
||||||
|
./hardware-configuration.nix
|
||||||
|
];
|
||||||
|
|
||||||
boot.loader.grub.device = "/dev/sda";
|
boot.loader.grub.device = "/dev/sda";
|
||||||
|
|
||||||
|
# Note: setting fileSystems and swapDevices is generally not
|
||||||
|
# necessary, since nixos-generate-config has set them automatically
|
||||||
|
# in hardware-configuration.nix.
|
||||||
fileSystems."/".device = "/dev/disk/by-label/nixos";
|
fileSystems."/".device = "/dev/disk/by-label/nixos";
|
||||||
|
|
||||||
swapDevices =
|
swapDevices =
|
||||||
|
@ -110,6 +110,23 @@
|
|||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><option>--no-filesystems</option></term>
|
||||||
|
<listitem>
|
||||||
|
<para>Omit everything concerning file system information
|
||||||
|
(which includes swap devices) from the hardware configuration.</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><option>--show-hardware-config</option></term>
|
||||||
|
<listitem>
|
||||||
|
<para>Don't generate <filename>configuration.nix</filename> or
|
||||||
|
<filename>hardware-configuration.nix</filename> and print the
|
||||||
|
hardware configuration to stdout only.</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
</variablelist>
|
</variablelist>
|
||||||
|
|
||||||
</refsection>
|
</refsection>
|
||||||
|
@ -42,7 +42,7 @@
|
|||||||
xlink:href="irc://irc.freenode.net/#nixos">
|
xlink:href="irc://irc.freenode.net/#nixos">
|
||||||
<literal>#nixos</literal> channel on Freenode</link>. Bugs should
|
<literal>#nixos</literal> channel on Freenode</link>. Bugs should
|
||||||
be reported in <link
|
be reported in <link
|
||||||
xlink:href="https://github.com/NixOS/nixos/issues">NixOS’ GitHub
|
xlink:href="https://github.com/NixOS/nixpkgs/issues">NixOS’ GitHub
|
||||||
issue tracker</link>.</para>
|
issue tracker</link>.</para>
|
||||||
|
|
||||||
</preface>
|
</preface>
|
||||||
@ -55,7 +55,7 @@
|
|||||||
<xi:include href="troubleshooting.xml" />
|
<xi:include href="troubleshooting.xml" />
|
||||||
<xi:include href="development.xml" />
|
<xi:include href="development.xml" />
|
||||||
<chapter xml:id="ch-options">
|
<chapter xml:id="ch-options">
|
||||||
<title>List of Options</title>
|
<title>List of options</title>
|
||||||
<xi:include href="options-db.xml" />
|
<xi:include href="options-db.xml" />
|
||||||
</chapter>
|
</chapter>
|
||||||
|
|
||||||
|
@ -125,6 +125,11 @@
|
|||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
|
|
||||||
|
<xsl:template match="attrs[attr[@name = '_type' and string[@value = 'literalExample']]]">
|
||||||
|
<xsl:value-of select="attr[@name = 'text']/string/@value" />
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
|
||||||
<xsl:template match="attrs">
|
<xsl:template match="attrs">
|
||||||
{
|
{
|
||||||
<xsl:for-each select="attr">
|
<xsl:for-each select="attr">
|
||||||
@ -155,8 +160,15 @@
|
|||||||
repository (if it’s a module and we have a revision number),
|
repository (if it’s a module and we have a revision number),
|
||||||
or to the local filesystem. -->
|
or to the local filesystem. -->
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="$revision != 'local' and contains(@value, '/modules/')">
|
<xsl:when test="not(starts-with(@value, '/'))">
|
||||||
<xsl:attribute name="xlink:href">https://github.com/NixOS/nixos/blob/<xsl:value-of select="$revision"/>/modules/<xsl:value-of select="substring-after(@value, '/modules/')"/></xsl:attribute>
|
<xsl:choose>
|
||||||
|
<xsl:when test="$revision = 'local'">
|
||||||
|
<xsl:attribute name="xlink:href">https://github.com/NixOS/nixpkgs/blob/master/<xsl:value-of select="@value"/></xsl:attribute>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:attribute name="xlink:href">https://github.com/NixOS/nixpkgs/blob/<xsl:value-of select="$revision"/>/<xsl:value-of select="@value"/></xsl:attribute>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:when test="$revision != 'local' and contains(@value, 'nixops') and contains(@value, '/nix/')">
|
<xsl:when test="$revision != 'local' and contains(@value, 'nixops') and contains(@value, '/nix/')">
|
||||||
<xsl:attribute name="xlink:href">https://github.com/NixOS/nixops/blob/<xsl:value-of select="$revision"/>/nix/<xsl:value-of select="substring-after(@value, '/nix/')"/></xsl:attribute>
|
<xsl:attribute name="xlink:href">https://github.com/NixOS/nixops/blob/<xsl:value-of select="$revision"/>/nix/<xsl:value-of select="substring-after(@value, '/nix/')"/></xsl:attribute>
|
||||||
@ -169,8 +181,8 @@
|
|||||||
/nix/store/<hash> prefix by the default location of nixos
|
/nix/store/<hash> prefix by the default location of nixos
|
||||||
sources. -->
|
sources. -->
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="contains(@value, '/modules/')">
|
<xsl:when test="not(starts-with(@value, '/'))">
|
||||||
<nixos/modules/<xsl:value-of select="substring-after(@value, '/modules/')"/>>
|
<nixpkgs/<xsl:value-of select="@value"/>>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:when test="contains(@value, 'nixops') and contains(@value, '/nix/')">
|
<xsl:when test="contains(@value, 'nixops') and contains(@value, '/nix/')">
|
||||||
<nixops/<xsl:value-of select="substring-after(@value, '/nix/')"/>>
|
<nixops/<xsl:value-of select="substring-after(@value, '/nix/')"/>>
|
||||||
|
@ -66,7 +66,6 @@ rec {
|
|||||||
# Optionally check wether all config values have corresponding
|
# Optionally check wether all config values have corresponding
|
||||||
# option declarations.
|
# option declarations.
|
||||||
config =
|
config =
|
||||||
let doCheck = optionDefinitions.environment.checkConfigurationOptions; in
|
assert optionDefinitions.environment.checkConfigurationOptions -> pkgs.lib.checkModule "" systemModule;
|
||||||
assert doCheck -> pkgs.lib.checkModule "" systemModule;
|
|
||||||
systemModule.config;
|
systemModule.config;
|
||||||
}
|
}
|
||||||
|
@ -7,8 +7,6 @@ with pkgs.lib;
|
|||||||
|
|
||||||
let
|
let
|
||||||
|
|
||||||
cfg = config.environment;
|
|
||||||
|
|
||||||
extraManpages = pkgs.runCommand "extra-manpages" { buildInputs = [ pkgs.help2man ]; }
|
extraManpages = pkgs.runCommand "extra-manpages" { buildInputs = [ pkgs.help2man ]; }
|
||||||
''
|
''
|
||||||
mkdir -p $out/share/man/man1
|
mkdir -p $out/share/man/man1
|
||||||
@ -87,33 +85,10 @@ in
|
|||||||
system = {
|
system = {
|
||||||
|
|
||||||
path = mkOption {
|
path = mkOption {
|
||||||
default = cfg.systemPackages;
|
internal = true;
|
||||||
description = ''
|
description = ''
|
||||||
The packages you want in the boot environment.
|
The packages you want in the boot environment.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
apply = list: pkgs.buildEnv {
|
|
||||||
name = "system-path";
|
|
||||||
paths = list;
|
|
||||||
inherit (cfg) pathsToLink;
|
|
||||||
ignoreCollisions = true;
|
|
||||||
# !!! Hacky, should modularise.
|
|
||||||
postBuild =
|
|
||||||
''
|
|
||||||
if [ -x $out/bin/update-mime-database -a -w $out/share/mime/packages ]; then
|
|
||||||
$out/bin/update-mime-database -V $out/share/mime
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -x $out/bin/gtk-update-icon-cache -a -f $out/share/icons/hicolor/index.theme ]; then
|
|
||||||
$out/bin/gtk-update-icon-cache $out/share/icons/hicolor
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -x $out/bin/glib-compile-schemas -a -w $out/share/glib-2.0/schemas ]; then
|
|
||||||
$out/bin/glib-compile-schemas $out/share/glib-2.0/schemas
|
|
||||||
fi
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
@ -138,5 +113,27 @@ in
|
|||||||
"/share/man"
|
"/share/man"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
system.path = pkgs.buildEnv {
|
||||||
|
name = "system-path";
|
||||||
|
paths = config.environment.systemPackages;
|
||||||
|
inherit (config.environment) pathsToLink;
|
||||||
|
ignoreCollisions = true;
|
||||||
|
# !!! Hacky, should modularise.
|
||||||
|
postBuild =
|
||||||
|
''
|
||||||
|
if [ -x $out/bin/update-mime-database -a -w $out/share/mime/packages ]; then
|
||||||
|
$out/bin/update-mime-database -V $out/share/mime
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -x $out/bin/gtk-update-icon-cache -a -f $out/share/icons/hicolor/index.theme ]; then
|
||||||
|
$out/bin/gtk-update-icon-cache $out/share/icons/hicolor
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -x $out/bin/glib-compile-schemas -a -w $out/share/glib-2.0/schemas ]; then
|
||||||
|
$out/bin/glib-compile-schemas $out/share/glib-2.0/schemas
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -23,6 +23,8 @@ sub uniq {
|
|||||||
my $outDir = "/etc/nixos";
|
my $outDir = "/etc/nixos";
|
||||||
my $rootDir = ""; # = /
|
my $rootDir = ""; # = /
|
||||||
my $force = 0;
|
my $force = 0;
|
||||||
|
my $noFilesystems = 0;
|
||||||
|
my $showHardwareConfig = 0;
|
||||||
|
|
||||||
for (my $n = 0; $n < scalar @ARGV; $n++) {
|
for (my $n = 0; $n < scalar @ARGV; $n++) {
|
||||||
my $arg = $ARGV[$n];
|
my $arg = $ARGV[$n];
|
||||||
@ -43,6 +45,12 @@ for (my $n = 0; $n < scalar @ARGV; $n++) {
|
|||||||
elsif ($arg eq "--force") {
|
elsif ($arg eq "--force") {
|
||||||
$force = 1;
|
$force = 1;
|
||||||
}
|
}
|
||||||
|
elsif ($arg eq "--no-filesystems") {
|
||||||
|
$noFilesystems = 1;
|
||||||
|
}
|
||||||
|
elsif ($arg eq "--show-hardware-config") {
|
||||||
|
$showHardwareConfig = 1;
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
die "$0: unrecognized argument ‘$arg’\n";
|
die "$0: unrecognized argument ‘$arg’\n";
|
||||||
}
|
}
|
||||||
@ -332,40 +340,48 @@ my $initrdAvailableKernelModules = toNixExpr(uniq @initrdAvailableKernelModules)
|
|||||||
my $kernelModules = toNixExpr(uniq @kernelModules);
|
my $kernelModules = toNixExpr(uniq @kernelModules);
|
||||||
my $modulePackages = toNixExpr(uniq @modulePackages);
|
my $modulePackages = toNixExpr(uniq @modulePackages);
|
||||||
|
|
||||||
$outDir = "$rootDir$outDir";
|
my $fsAndSwap = "";
|
||||||
|
if (!$noFilesystems) {
|
||||||
|
$fsAndSwap = "\n${fileSystems} ";
|
||||||
|
$fsAndSwap .= "swapDevices =" . multiLineList(" ", @swapDevices) . ";\n";
|
||||||
|
}
|
||||||
|
|
||||||
my $fn = "$outDir/hardware-configuration.nix";
|
my $hwConfig = <<EOF;
|
||||||
print STDERR "writing $fn...\n";
|
|
||||||
mkpath($outDir, 0, 0755);
|
|
||||||
|
|
||||||
write_file($fn, <<EOF);
|
|
||||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
# and may be overwritten by future invocations. Please make changes
|
# and may be overwritten by future invocations. Please make changes
|
||||||
# to /etc/nixos/configuration.nix instead.
|
# to /etc/nixos/configuration.nix instead.
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = ${\multiLineList(" ", @imports)};
|
imports =${\multiLineList(" ", @imports)};
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [$initrdAvailableKernelModules ];
|
boot.initrd.availableKernelModules = [$initrdAvailableKernelModules ];
|
||||||
boot.kernelModules = [$kernelModules ];
|
boot.kernelModules = [$kernelModules ];
|
||||||
boot.extraModulePackages = [$modulePackages ];
|
boot.extraModulePackages = [$modulePackages ];
|
||||||
|
$fsAndSwap
|
||||||
${fileSystems} swapDevices = ${\multiLineList(" ", @swapDevices)};
|
|
||||||
|
|
||||||
nix.maxJobs = $cpus;
|
nix.maxJobs = $cpus;
|
||||||
${\join "", (map { " $_\n" } (uniq @attrs))}}
|
${\join "", (map { " $_\n" } (uniq @attrs))}}
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
|
||||||
# Generate a basic configuration.nix, unless one already exists.
|
if ($showHardwareConfig) {
|
||||||
$fn = "$outDir/configuration.nix";
|
print STDOUT $hwConfig;
|
||||||
if ($force || ! -e $fn) {
|
} else {
|
||||||
print STDERR "writing $fn...\n";
|
$outDir = "$rootDir$outDir";
|
||||||
|
|
||||||
my $bootloaderConfig;
|
my $fn = "$outDir/hardware-configuration.nix";
|
||||||
if (-e "/sys/firmware/efi/efivars") {
|
print STDERR "writing $fn...\n";
|
||||||
$bootLoaderConfig = <<EOF;
|
mkpath($outDir, 0, 0755);
|
||||||
|
write_file($fn, $hwConfig);
|
||||||
|
|
||||||
|
# Generate a basic configuration.nix, unless one already exists.
|
||||||
|
$fn = "$outDir/configuration.nix";
|
||||||
|
if ($force || ! -e $fn) {
|
||||||
|
print STDERR "writing $fn...\n";
|
||||||
|
|
||||||
|
my $bootloaderConfig;
|
||||||
|
if (-e "/sys/firmware/efi/efivars") {
|
||||||
|
$bootLoaderConfig = <<EOF;
|
||||||
# Use the gummiboot efi boot loader.
|
# Use the gummiboot efi boot loader.
|
||||||
boot.loader.grub.enable = false;
|
boot.loader.grub.enable = false;
|
||||||
boot.loader.gummiboot.enable = true;
|
boot.loader.gummiboot.enable = true;
|
||||||
@ -374,17 +390,17 @@ if ($force || ! -e $fn) {
|
|||||||
# EFI booting requires kernel >= 3.10
|
# EFI booting requires kernel >= 3.10
|
||||||
boot.kernelPackages = pkgs.linuxPackages_3_10;
|
boot.kernelPackages = pkgs.linuxPackages_3_10;
|
||||||
EOF
|
EOF
|
||||||
} else {
|
} else {
|
||||||
$bootLoaderConfig = <<EOF;
|
$bootLoaderConfig = <<EOF;
|
||||||
# Use the GRUB 2 boot loader.
|
# Use the GRUB 2 boot loader.
|
||||||
boot.loader.grub.enable = true;
|
boot.loader.grub.enable = true;
|
||||||
boot.loader.grub.version = 2;
|
boot.loader.grub.version = 2;
|
||||||
# Define on which hard drive you want to install Grub.
|
# Define on which hard drive you want to install Grub.
|
||||||
# boot.loader.grub.device = "/dev/sda";
|
# boot.loader.grub.device = "/dev/sda";
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
write_file($fn, <<EOF);
|
write_file($fn, <<EOF);
|
||||||
# Edit this configuration file to define what should be installed on
|
# Edit this configuration file to define what should be installed on
|
||||||
# your system. Help is available in the configuration.nix(5) man page
|
# your system. Help is available in the configuration.nix(5) man page
|
||||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||||
@ -397,29 +413,10 @@ EOF
|
|||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.initrd.kernelModules =
|
|
||||||
[ # Specify all kernel modules that are necessary for mounting the root
|
|
||||||
# filesystem.
|
|
||||||
# "xfs" "ata_piix"
|
|
||||||
# fbcon # Uncomment this when EFI booting to see the console before the root partition is mounted
|
|
||||||
];
|
|
||||||
|
|
||||||
$bootLoaderConfig
|
$bootLoaderConfig
|
||||||
# networking.hostName = "nixos"; # Define your hostname.
|
# networking.hostName = "nixos"; # Define your hostname.
|
||||||
# networking.wireless.enable = true; # Enables wireless.
|
# networking.wireless.enable = true; # Enables wireless.
|
||||||
|
|
||||||
# Add filesystem entries for each partition that you want to see
|
|
||||||
# mounted at boot time. This should include at least the root
|
|
||||||
# filesystem.
|
|
||||||
|
|
||||||
# fileSystems."/".device = "/dev/disk/by-label/nixos";
|
|
||||||
|
|
||||||
# fileSystems."/data" = # where you want to mount the device
|
|
||||||
# { device = "/dev/sdb"; # the device
|
|
||||||
# fsType = "ext3"; # the type of the partition
|
|
||||||
# options = "data=journal";
|
|
||||||
# };
|
|
||||||
|
|
||||||
# Select internationalisation properties.
|
# Select internationalisation properties.
|
||||||
# i18n = {
|
# i18n = {
|
||||||
# consoleFont = "lat9w-16";
|
# consoleFont = "lat9w-16";
|
||||||
@ -445,8 +442,9 @@ $bootLoaderConfig
|
|||||||
# services.xserver.desktopManager.kde4.enable = true;
|
# services.xserver.desktopManager.kde4.enable = true;
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
} else {
|
} else {
|
||||||
print STDERR "warning: not overwriting existing $fn\n";
|
print STDERR "warning: not overwriting existing $fn\n";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# workaround for a bug in substituteAll
|
# workaround for a bug in substituteAll
|
||||||
|
@ -109,8 +109,8 @@ fi
|
|||||||
# more conservative.
|
# more conservative.
|
||||||
if [ "$action" != dry-run -a -n "$buildNix" ]; then
|
if [ "$action" != dry-run -a -n "$buildNix" ]; then
|
||||||
echo "building Nix..." >&2
|
echo "building Nix..." >&2
|
||||||
if ! nix-build '<nixos>' -A config.environment.nix -o $tmpDir/nix "${extraBuildFlags[@]}" > /dev/null; then
|
if ! nix-build '<nixpkgs/nixos>' -A config.environment.nix -o $tmpDir/nix "${extraBuildFlags[@]}" > /dev/null; then
|
||||||
if ! nix-build '<nixos>' -A nixFallback -o $tmpDir/nix "${extraBuildFlags[@]}" > /dev/null; then
|
if ! nix-build '<nixpkgs/nixos>' -A nixFallback -o $tmpDir/nix "${extraBuildFlags[@]}" > /dev/null; then
|
||||||
nix-build '<nixpkgs>' -A nixUnstable -o $tmpDir/nix "${extraBuildFlags[@]}" > /dev/null
|
nix-build '<nixpkgs>' -A nixUnstable -o $tmpDir/nix "${extraBuildFlags[@]}" > /dev/null
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@ -139,16 +139,16 @@ fi
|
|||||||
if [ -z "$rollback" ]; then
|
if [ -z "$rollback" ]; then
|
||||||
echo "building the system configuration..." >&2
|
echo "building the system configuration..." >&2
|
||||||
if [ "$action" = switch -o "$action" = boot ]; then
|
if [ "$action" = switch -o "$action" = boot ]; then
|
||||||
nix-env "${extraBuildFlags[@]}" -p "$profile" -f '<nixos>' --set -A system
|
nix-env "${extraBuildFlags[@]}" -p "$profile" -f '<nixpkgs/nixos>' --set -A system
|
||||||
pathToConfig="$profile"
|
pathToConfig="$profile"
|
||||||
elif [ "$action" = test -o "$action" = build -o "$action" = dry-run ]; then
|
elif [ "$action" = test -o "$action" = build -o "$action" = dry-run ]; then
|
||||||
nix-build '<nixos>' -A system -K -k "${extraBuildFlags[@]}" > /dev/null
|
nix-build '<nixpkgs/nixos>' -A system -K -k "${extraBuildFlags[@]}" > /dev/null
|
||||||
pathToConfig=./result
|
pathToConfig=./result
|
||||||
elif [ "$action" = build-vm ]; then
|
elif [ "$action" = build-vm ]; then
|
||||||
nix-build '<nixos>' -A vm -K -k "${extraBuildFlags[@]}" > /dev/null
|
nix-build '<nixpkgs/nixos>' -A vm -K -k "${extraBuildFlags[@]}" > /dev/null
|
||||||
pathToConfig=./result
|
pathToConfig=./result
|
||||||
elif [ "$action" = build-vm-with-bootloader ]; then
|
elif [ "$action" = build-vm-with-bootloader ]; then
|
||||||
nix-build '<nixos>' -A vmWithBootLoader -K -k "${extraBuildFlags[@]}" > /dev/null
|
nix-build '<nixpkgs/nixos>' -A vmWithBootLoader -K -k "${extraBuildFlags[@]}" > /dev/null
|
||||||
pathToConfig=./result
|
pathToConfig=./result
|
||||||
else
|
else
|
||||||
showSyntax
|
showSyntax
|
||||||
|
@ -6,6 +6,8 @@ let
|
|||||||
|
|
||||||
failed = map (x: x.message) (filter (x: !x.assertion) config.assertions);
|
failed = map (x: x.message) (filter (x: !x.assertion) config.assertions);
|
||||||
|
|
||||||
|
showWarnings = res: fold (w: x: builtins.trace "[1;31mwarning: ${w}[0m" x) res config.warnings;
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
@ -13,6 +15,7 @@ in
|
|||||||
options = {
|
options = {
|
||||||
|
|
||||||
assertions = mkOption {
|
assertions = mkOption {
|
||||||
|
internal = true;
|
||||||
default = [];
|
default = [];
|
||||||
example = [ { assertion = false; message = "you can't enable this for that reason"; } ];
|
example = [ { assertion = false; message = "you can't enable this for that reason"; } ];
|
||||||
merge = pkgs.lib.mergeListOption;
|
merge = pkgs.lib.mergeListOption;
|
||||||
@ -23,14 +26,26 @@ in
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
warnings = mkOption {
|
||||||
|
internal = true;
|
||||||
|
default = [];
|
||||||
|
type = types.listOf types.string;
|
||||||
|
example = [ "The `foo' service is deprecated and will go away soon!" ];
|
||||||
|
description = ''
|
||||||
|
This option allows modules to show warnings to users during
|
||||||
|
the evaluation of the system configuration.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
|
|
||||||
# This option is evaluated always. Thus the assertions are checked as well. hacky!
|
# This option is evaluated always. Thus the assertions are checked
|
||||||
environment.systemPackages =
|
# as well. Hacky!
|
||||||
|
environment.systemPackages = showWarnings (
|
||||||
if [] == failed then []
|
if [] == failed then []
|
||||||
else throw "\nFailed assertions:\n${concatStringsSep "\n" (map (x: "- ${x}") failed)}";
|
else throw "\nFailed assertions:\n${concatStringsSep "\n" (map (x: "- ${x}") failed)}");
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -7,30 +7,50 @@ with pkgs.lib;
|
|||||||
options = {
|
options = {
|
||||||
|
|
||||||
system.nixosVersion = mkOption {
|
system.nixosVersion = mkOption {
|
||||||
|
internal = true;
|
||||||
type = types.uniq types.string;
|
type = types.uniq types.string;
|
||||||
description = "NixOS version.";
|
description = "NixOS version.";
|
||||||
};
|
};
|
||||||
|
|
||||||
system.nixosVersionSuffix = mkOption {
|
system.nixosVersionSuffix = mkOption {
|
||||||
|
internal = true;
|
||||||
type = types.uniq types.string;
|
type = types.uniq types.string;
|
||||||
description = "NixOS version suffix.";
|
description = "NixOS version suffix.";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
system.nixosRevision = mkOption {
|
||||||
|
internal = true;
|
||||||
|
type = types.uniq types.string;
|
||||||
|
description = "NixOS Git revision hash.";
|
||||||
|
};
|
||||||
|
|
||||||
system.nixosCodeName = mkOption {
|
system.nixosCodeName = mkOption {
|
||||||
|
internal = true;
|
||||||
type = types.uniq types.string;
|
type = types.uniq types.string;
|
||||||
description = "NixOS release code name.";
|
description = "NixOS release code name.";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
system.defaultChannel = mkOption {
|
||||||
|
internal = true;
|
||||||
|
type = types.uniq types.string;
|
||||||
|
default = https://nixos.org/channels/nixos-unstable;
|
||||||
|
description = "Default NixOS channel to which the root user is subscribed.";
|
||||||
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
|
|
||||||
system.nixosVersion =
|
system.nixosVersion =
|
||||||
mkDefault (builtins.readFile "${toString pkgs.path}/.version" + config.system.nixosVersionSuffix);
|
mkDefault (readFile "${toString pkgs.path}/.version" + config.system.nixosVersionSuffix);
|
||||||
|
|
||||||
system.nixosVersionSuffix =
|
system.nixosVersionSuffix =
|
||||||
let suffixFile = "${toString pkgs.path}/.version-suffix"; in
|
let suffixFile = "${toString pkgs.path}/.version-suffix"; in
|
||||||
mkDefault (if builtins.pathExists suffixFile then builtins.readFile suffixFile else "pre-git");
|
mkDefault (if pathExists suffixFile then readFile suffixFile else "pre-git");
|
||||||
|
|
||||||
|
system.nixosRevision =
|
||||||
|
let fn = "${toString pkgs.path}/.git-revision"; in
|
||||||
|
mkDefault (if pathExists fn then readFile fn else "master");
|
||||||
|
|
||||||
# Note: code names must only increase in alphabetical order.
|
# Note: code names must only increase in alphabetical order.
|
||||||
system.nixosCodeName = "Aardvark";
|
system.nixosCodeName = "Aardvark";
|
||||||
|
@ -130,6 +130,7 @@
|
|||||||
./services/monitoring/dd-agent.nix
|
./services/monitoring/dd-agent.nix
|
||||||
./services/monitoring/graphite.nix
|
./services/monitoring/graphite.nix
|
||||||
./services/monitoring/monit.nix
|
./services/monitoring/monit.nix
|
||||||
|
./services/monitoring/munin.nix
|
||||||
./services/monitoring/nagios/default.nix
|
./services/monitoring/nagios/default.nix
|
||||||
./services/monitoring/smartd.nix
|
./services/monitoring/smartd.nix
|
||||||
./services/monitoring/statsd.nix
|
./services/monitoring/statsd.nix
|
||||||
@ -237,6 +238,7 @@
|
|||||||
./services/x11/window-managers/twm.nix
|
./services/x11/window-managers/twm.nix
|
||||||
./services/x11/window-managers/wmii.nix
|
./services/x11/window-managers/wmii.nix
|
||||||
./services/x11/window-managers/xmonad.nix
|
./services/x11/window-managers/xmonad.nix
|
||||||
|
./services/x11/redshift.nix
|
||||||
./services/x11/xfs.nix
|
./services/x11/xfs.nix
|
||||||
./services/x11/xserver.nix
|
./services/x11/xserver.nix
|
||||||
./system/activation/activation-script.nix
|
./system/activation/activation-script.nix
|
||||||
|
@ -39,7 +39,7 @@ in
|
|||||||
|
|
||||||
# Subscribe the root user to the NixOS channel by default.
|
# Subscribe the root user to the NixOS channel by default.
|
||||||
if [ "$USER" = root -a ! -e $HOME/.nix-channels ]; then
|
if [ "$USER" = root -a ! -e $HOME/.nix-channels ]; then
|
||||||
echo "http://nixos.org/channels/nixos-unstable nixos" > $HOME/.nix-channels
|
echo "${config.system.defaultChannel} nixos" > $HOME/.nix-channels
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Create the per-user garbage collector roots directory.
|
# Create the per-user garbage collector roots directory.
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Global configuration for the SSH client.
|
# Global configuration for the SSH client.
|
||||||
|
|
||||||
{config, pkgs, ...}:
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
with pkgs.lib;
|
with pkgs.lib;
|
||||||
|
|
||||||
@ -31,7 +31,7 @@ in
|
|||||||
setXAuthLocation = mkOption {
|
setXAuthLocation = mkOption {
|
||||||
default = true;
|
default = true;
|
||||||
description = ''
|
description = ''
|
||||||
Whether to set the path to xauth for X11-forwarded connections.
|
Whether to set the path to <command>xauth</command> for X11-forwarded connections.
|
||||||
Pulls in X11 dependency.
|
Pulls in X11 dependency.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
@ -46,10 +46,13 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
assertions = [{ assertion = if cfg.forwardX11 then cfg.setXAuthLocation else true;
|
|
||||||
message = "cannot enable X11 forwarding without setting xauth location";}];
|
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
|
|
||||||
|
assertions = singleton
|
||||||
|
{ assertion = cfg.forwardX11 -> cfg.setXAuthLocation;
|
||||||
|
message = "cannot enable X11 forwarding without setting XAuth location";
|
||||||
|
};
|
||||||
|
|
||||||
environment.etc =
|
environment.etc =
|
||||||
[ { # SSH configuration. Slight duplication of the sshd_config
|
[ { # SSH configuration. Slight duplication of the sshd_config
|
||||||
# generation in the sshd service.
|
# generation in the sshd service.
|
||||||
|
@ -1,110 +1,126 @@
|
|||||||
{pkgs, options, config, ...}:
|
{ config, pkgs, options, ... }:
|
||||||
|
|
||||||
|
with pkgs.lib;
|
||||||
|
|
||||||
let
|
let
|
||||||
|
|
||||||
alias = from: to: {
|
alias = from: to: rename {
|
||||||
|
inherit from to;
|
||||||
name = "Alias";
|
name = "Alias";
|
||||||
msg.use = x: x;
|
use = id;
|
||||||
msg.define = x: x;
|
define = id;
|
||||||
|
visible = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
obsolete = from: to: {
|
obsolete = from: to: rename {
|
||||||
|
inherit from to;
|
||||||
name = "Obsolete name";
|
name = "Obsolete name";
|
||||||
msg.use = x:
|
use = x: builtins.trace "Obsolete option `${showOption from}' is used instead of `${showOption to}'." x;
|
||||||
builtins.trace "Obsolete option `${from}' is used instead of `${to}'." x;
|
define = x: builtins.trace "Obsolete option `${showOption from}' is defined instead of `${showOption to}'." x;
|
||||||
msg.define = x:
|
|
||||||
builtins.trace "Obsolete option `${from}' is defined instead of `${to}'." x;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
deprecated = from: to: {
|
deprecated = from: to: rename {
|
||||||
|
inherit from to;
|
||||||
name = "Deprecated name";
|
name = "Deprecated name";
|
||||||
msg.use = x:
|
use = x: abort "Deprecated option `${showOption from}' is used instead of `${showOption to}'.";
|
||||||
abort "Deprecated option `${from}' is used instead of `${to}'.";
|
define = x: abort "Deprecated option `${showOption from}' is defined instead of `${showOption to}'.";
|
||||||
msg.define = x:
|
|
||||||
abort "Deprecated option `${from}' is defined instead of `${to}'.";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
showOption = concatStringsSep ".";
|
||||||
|
|
||||||
zipModules = list: with pkgs.lib;
|
zipModules = list:
|
||||||
zipAttrsWith (n: v:
|
zipAttrsWith (n: v:
|
||||||
if tail v != [] then
|
if tail v != [] then
|
||||||
if n == "_type" then (head v)
|
if n == "_type" then (head v)
|
||||||
else if n == "extraConfigs" then (concatLists v)
|
else if n == "extraConfigs" then concatLists v
|
||||||
|
else if n == "warnings" then concatLists v
|
||||||
else if n == "description" || n == "apply" then
|
else if n == "description" || n == "apply" then
|
||||||
abort "Cannot rename an option to multiple options."
|
abort "Cannot rename an option to multiple options."
|
||||||
else zipModules v
|
else zipModules v
|
||||||
else head v
|
else head v
|
||||||
) list;
|
) list;
|
||||||
|
|
||||||
rename = statusTemplate: from: to: with pkgs.lib;
|
rename = { from, to, name, use, define, visible ? false }:
|
||||||
let
|
let
|
||||||
status = statusTemplate from to;
|
setTo = setAttrByPath to;
|
||||||
setTo = setAttrByPath (splitString "." to);
|
setFrom = setAttrByPath from;
|
||||||
setFrom = setAttrByPath (splitString "." from);
|
toOf = attrByPath to
|
||||||
toOf = attrByPath (splitString "." to)
|
(abort "Renaming error: option `${showOption to}' does not exists.");
|
||||||
(abort "Renaming error: option `${to}' does not exists.");
|
fromOf = attrByPath from
|
||||||
fromOf = attrByPath (splitString "." from)
|
(abort "Internal error: option `${showOption from}' should be declared.");
|
||||||
(abort "Internal error: option `${from}' should be declared.");
|
|
||||||
in
|
in
|
||||||
[{
|
[ { options = setFrom (mkOption {
|
||||||
options = setFrom (mkOption {
|
description = "${name} of <option>${showOption to}</option>.";
|
||||||
description = "${status.name} of <option>${to}</option>.";
|
apply = x: use (toOf config);
|
||||||
apply = x: status.msg.use (toOf config);
|
inherit visible;
|
||||||
});
|
});
|
||||||
}] ++
|
}
|
||||||
[{
|
{ options = setTo (mkOption {
|
||||||
options = setTo (mkOption {
|
extraConfigs =
|
||||||
extraConfigs =
|
let externalDefs = (fromOf options).definitions; in
|
||||||
let externalDefs = (fromOf options).definitions; in
|
if externalDefs == [] then []
|
||||||
if externalDefs == [] then []
|
else map (def: def.value) (define externalDefs);
|
||||||
else map (def: def.value) (status.msg.define externalDefs);
|
});
|
||||||
});
|
}
|
||||||
}];
|
];
|
||||||
|
|
||||||
|
obsolete' = option: singleton
|
||||||
|
{ options = setAttrByPath option (mkOption {
|
||||||
|
default = null;
|
||||||
|
visible = false;
|
||||||
|
});
|
||||||
|
config.warnings = optional (getAttrFromPath option config != null)
|
||||||
|
"The option `${showOption option}' defined in your configuration no longer has any effect; please remove it.";
|
||||||
|
};
|
||||||
|
|
||||||
in zipModules ([]
|
in zipModules ([]
|
||||||
|
|
||||||
# usage example:
|
# usage example:
|
||||||
# ++ rename alias "services.xserver.slim.theme" "services.xserver.displayManager.slim.theme"
|
# ++ alias [ "services" "xserver" "slim" "theme" ] [ "services" "xserver" "displayManager" "slim" "theme" ]
|
||||||
++ rename obsolete "environment.extraPackages" "environment.systemPackages"
|
++ obsolete [ "environment" "extraPackages" ] [ "environment" "systemPackages" ]
|
||||||
++ rename obsolete "environment.enableBashCompletion" "programs.bash.enableCompletion"
|
++ obsolete [ "environment" "enableBashCompletion" ] [ "programs" "bash" "enableCompletion" ]
|
||||||
|
|
||||||
++ rename obsolete "security.extraSetuidPrograms" "security.setuidPrograms"
|
++ obsolete [ "security" "extraSetuidPrograms" ] [ "security" "setuidPrograms" ]
|
||||||
++ rename obsolete "networking.enableWLAN" "networking.wireless.enable"
|
++ obsolete [ "networking" "enableWLAN" ] [ "networking" "wireless" "enable" ]
|
||||||
++ rename obsolete "networking.enableRT73Firmware" "networking.enableRalinkFirmware"
|
++ obsolete [ "networking" "enableRT73Firmware" ] [ "networking" "enableRalinkFirmware" ]
|
||||||
|
|
||||||
# FIXME: Remove these eventually.
|
# FIXME: Remove these eventually.
|
||||||
++ rename obsolete "boot.systemd.sockets" "systemd.sockets"
|
++ obsolete [ "boot" "systemd" "sockets" ] [ "systemd" "sockets" ]
|
||||||
++ rename obsolete "boot.systemd.targets" "systemd.targets"
|
++ obsolete [ "boot" "systemd" "targets" ] [ "systemd" "targets" ]
|
||||||
++ rename obsolete "boot.systemd.services" "systemd.services"
|
++ obsolete [ "boot" "systemd" "services" ] [ "systemd" "services" ]
|
||||||
|
|
||||||
# Old Grub-related options.
|
# Old Grub-related options.
|
||||||
++ rename obsolete "boot.copyKernels" "boot.loader.grub.copyKernels"
|
++ obsolete [ "boot" "copyKernels" ] [ "boot" "loader" "grub" "copyKernels" ]
|
||||||
++ rename obsolete "boot.extraGrubEntries" "boot.loader.grub.extraEntries"
|
++ obsolete [ "boot" "extraGrubEntries" ] [ "boot" "loader" "grub" "extraEntries" ]
|
||||||
++ rename obsolete "boot.extraGrubEntriesBeforeNixos" "boot.loader.grub.extraEntriesBeforeNixOS"
|
++ obsolete [ "boot" "extraGrubEntriesBeforeNixos" ] [ "boot" "loader" "grub" "extraEntriesBeforeNixOS" ]
|
||||||
++ rename obsolete "boot.grubDevice" "boot.loader.grub.device"
|
++ obsolete [ "boot" "grubDevice" ] [ "boot" "loader" "grub" "device" ]
|
||||||
++ rename obsolete "boot.bootMount" "boot.loader.grub.bootDevice"
|
++ obsolete [ "boot" "bootMount" ] [ "boot" "loader" "grub" "bootDevice" ]
|
||||||
++ rename obsolete "boot.grubSplashImage" "boot.loader.grub.splashImage"
|
++ obsolete [ "boot" "grubSplashImage" ] [ "boot" "loader" "grub" "splashImage" ]
|
||||||
|
|
||||||
++ rename obsolete "boot.initrd.extraKernelModules" "boot.initrd.kernelModules"
|
++ obsolete [ "boot" "initrd" "extraKernelModules" ] [ "boot" "initrd" "kernelModules" ]
|
||||||
|
|
||||||
# OpenSSH
|
# OpenSSH
|
||||||
++ rename obsolete "services.sshd.ports" "services.openssh.ports"
|
++ obsolete [ "services" "sshd" "ports" ] [ "services" "openssh" "ports" ]
|
||||||
++ rename alias "services.sshd.enable" "services.openssh.enable"
|
++ alias [ "services" "sshd" "enable" ] [ "services" "openssh" "enable" ]
|
||||||
++ rename obsolete "services.sshd.allowSFTP" "services.openssh.allowSFTP"
|
++ obsolete [ "services" "sshd" "allowSFTP" ] [ "services" "openssh" "allowSFTP" ]
|
||||||
++ rename obsolete "services.sshd.forwardX11" "services.openssh.forwardX11"
|
++ obsolete [ "services" "sshd" "forwardX11" ] [ "services" "openssh" "forwardX11" ]
|
||||||
++ rename obsolete "services.sshd.gatewayPorts" "services.openssh.gatewayPorts"
|
++ obsolete [ "services" "sshd" "gatewayPorts" ] [ "services" "openssh" "gatewayPorts" ]
|
||||||
++ rename obsolete "services.sshd.permitRootLogin" "services.openssh.permitRootLogin"
|
++ obsolete [ "services" "sshd" "permitRootLogin" ] [ "services" "openssh" "permitRootLogin" ]
|
||||||
++ rename obsolete "services.xserver.startSSHAgent" "services.xserver.startOpenSSHAgent"
|
++ obsolete [ "services" "xserver" "startSSHAgent" ] [ "services" "xserver" "startOpenSSHAgent" ]
|
||||||
|
|
||||||
# KDE
|
# KDE
|
||||||
++ rename deprecated "kde.extraPackages" "environment.kdePackages"
|
++ deprecated [ "kde" "extraPackages" ] [ "environment" "kdePackages" ]
|
||||||
# ++ rename obsolete "environment.kdePackages" "environment.systemPackages" # !!! doesn't work!
|
# ++ obsolete [ "environment" "kdePackages" ] [ "environment" "systemPackages" ] # !!! doesn't work!
|
||||||
|
|
||||||
# Multiple efi bootloaders now
|
# Multiple efi bootloaders now
|
||||||
++ rename obsolete "boot.loader.efi.efibootmgr.enable" "boot.loader.efi.canTouchEfiVariables"
|
++ obsolete [ "boot" "loader" "efi" "efibootmgr" "enable" ] [ "boot" "loader" "efi" "canTouchEfiVariables" ]
|
||||||
|
|
||||||
# NixOS environment changes
|
# NixOS environment changes
|
||||||
# !!! this hardcodes bash, could we detect from config which shell is actually used?
|
# !!! this hardcodes bash, could we detect from config which shell is actually used?
|
||||||
++ rename obsolete "environment.promptInit" "programs.bash.promptInit"
|
++ obsolete [ "environment" "promptInit" ] [ "programs" "bash" "promptInit" ]
|
||||||
|
|
||||||
) # do not add renaming after this.
|
# Options that are obsolete and have no replacement.
|
||||||
|
++ obsolete' [ "boot" "loader" "grub" "bootDevice" ]
|
||||||
|
++ obsolete' [ "boot" "initrd" "luks" "enable" ]
|
||||||
|
|
||||||
|
)
|
||||||
|
@ -60,8 +60,7 @@ with pkgs.lib;
|
|||||||
};
|
};
|
||||||
|
|
||||||
vfolder = mkOption {
|
vfolder = mkOption {
|
||||||
default = ./fuppes/vfolder.cfg;
|
example = literalExample "/etc/fuppes/vfolder.cfg";
|
||||||
example = /etc/fuppes/vfolder.cfg;
|
|
||||||
description = ''
|
description = ''
|
||||||
XML file describing the layout of virtual folder visible by the
|
XML file describing the layout of virtual folder visible by the
|
||||||
client.
|
client.
|
||||||
@ -109,6 +108,8 @@ with pkgs.lib;
|
|||||||
|
|
||||||
services.fuppesd.name = mkDefault config.networking.hostName;
|
services.fuppesd.name = mkDefault config.networking.hostName;
|
||||||
|
|
||||||
|
services.fuppesd.vfolder = mkDefault ./fuppes/vfolder.cfg;
|
||||||
|
|
||||||
security.sudo.enable = true;
|
security.sudo.enable = true;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,18 @@
|
|||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
# TODO: this file needs some additional work - at least you can connect to
|
# TODO: This may file may need additional review, eg which configuartions to
|
||||||
# firebird ..
|
# expose to the user.
|
||||||
# Example how to connect:
|
#
|
||||||
# isql /var/db/firebird/data/your-db.fdb -u sysdba -p <default password>
|
# I only used it to access some simple databases.
|
||||||
|
|
||||||
|
# test:
|
||||||
|
# isql, then type the following commands:
|
||||||
|
# CREATE DATABASE '/var/db/firebird/data/test.fdb' USER 'SYSDBA' PASSWORD 'masterkey';
|
||||||
|
# CONNECT '/var/db/firebird/data/test.fdb' USER 'SYSDBA' PASSWORD 'masterkey';
|
||||||
|
# CREATE TABLE test ( text varchar(100) );
|
||||||
|
# DROP DATABASE;
|
||||||
|
#
|
||||||
|
# Be careful, virtuoso-opensource also provides a different isql command !
|
||||||
|
|
||||||
# There are at least two ways to run firebird. superserver has been choosen
|
# There are at least two ways to run firebird. superserver has been choosen
|
||||||
# however there are no strong reasons to prefer this or the other one AFAIK
|
# however there are no strong reasons to prefer this or the other one AFAIK
|
||||||
@ -18,7 +27,8 @@ let
|
|||||||
|
|
||||||
firebird = cfg.package;
|
firebird = cfg.package;
|
||||||
|
|
||||||
pidFile = "${cfg.pidDir}/firebirdd.pid";
|
dataDir = "${cfg.baseDir}/data";
|
||||||
|
systemDir = "${cfg.baseDir}/system";
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
@ -32,9 +42,9 @@ in
|
|||||||
|
|
||||||
enable = mkOption {
|
enable = mkOption {
|
||||||
default = false;
|
default = false;
|
||||||
description = "
|
description = ''
|
||||||
Whether to enable the firebird super server.
|
Whether to enable the Firebird super server.
|
||||||
";
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
package = mkOption {
|
package = mkOption {
|
||||||
@ -45,29 +55,31 @@ in
|
|||||||
reasons. See comments at the firebirdSuper derivation
|
reasons. See comments at the firebirdSuper derivation
|
||||||
*/
|
*/
|
||||||
|
|
||||||
description = "
|
description = ''
|
||||||
Which firebird derivation to use.
|
Which firebird derivation to use.
|
||||||
";
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
port = mkOption {
|
port = mkOption {
|
||||||
default = "3050";
|
default = "3050";
|
||||||
description = "Port of Firebird.";
|
description = ''
|
||||||
|
Port Firebird uses.
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
user = mkOption {
|
user = mkOption {
|
||||||
default = "firebird";
|
default = "firebird";
|
||||||
description = "User account under which firebird runs.";
|
description = ''
|
||||||
|
User account under which firebird runs.
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
dataDir = mkOption {
|
baseDir = mkOption {
|
||||||
default = "/var/db/firebird/data"; # ubuntu is using /var/lib/firebird/2.1/data/.. ?
|
default = "/var/db/firebird"; # ubuntu is using /var/lib/firebird/2.1/data/.. ?
|
||||||
description = "Location where firebird databases are stored.";
|
description = ''
|
||||||
};
|
Location containing data/ and system/ directories.
|
||||||
|
data/ stores the databases, system/ stores the password database security2.fdb.
|
||||||
pidDir = mkOption {
|
'';
|
||||||
default = "/run/firebird";
|
|
||||||
description = "Location of the file which stores the PID of the firebird server.";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
@ -79,12 +91,10 @@ in
|
|||||||
|
|
||||||
config = mkIf config.services.firebird.enable {
|
config = mkIf config.services.firebird.enable {
|
||||||
|
|
||||||
users.extraUsers.firebird.description = "Firebird server user";
|
environment.systemPackages = [cfg.package];
|
||||||
|
|
||||||
environment.systemPackages = [firebird];
|
|
||||||
|
|
||||||
systemd.services.firebird =
|
systemd.services.firebird =
|
||||||
{ description = "firebird super server";
|
{ description = "Firebird Super-Server";
|
||||||
|
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
|
||||||
@ -92,20 +102,17 @@ in
|
|||||||
# is a better way
|
# is a better way
|
||||||
preStart =
|
preStart =
|
||||||
''
|
''
|
||||||
secureDir="${cfg.dataDir}/../system"
|
|
||||||
|
|
||||||
mkdir -m 0700 -p \
|
mkdir -m 0700 -p \
|
||||||
"${cfg.dataDir}" \
|
"${dataDir}" \
|
||||||
"${cfg.pidDir}" \
|
"${systemDir}" \
|
||||||
/var/log/firebird \
|
/var/log/firebird
|
||||||
"$secureDir"
|
|
||||||
|
|
||||||
if ! test -e "$secureDir/security2.fdb"; then
|
if ! test -e "${systemDir}/security2.fdb"; then
|
||||||
cp ${firebird}/security2.fdb "$secureDir"
|
cp ${firebird}/security2.fdb "${systemDir}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
chown -R ${cfg.user} "${cfg.pidDir}" "${cfg.dataDir}" "$secureDir" /var/log/firebird
|
chown -R ${cfg.user} "${dataDir}" "${systemDir}" /var/log/firebird
|
||||||
chmod -R 700 "${cfg.pidDir}" "${cfg.dataDir}" "$secureDir" /var/log/firebird
|
chmod -R 700 "${dataDir}" "${systemDir}" /var/log/firebird
|
||||||
'';
|
'';
|
||||||
|
|
||||||
serviceConfig.PermissionsStartOnly = true; # preStart must be run as root
|
serviceConfig.PermissionsStartOnly = true; # preStart must be run as root
|
||||||
@ -119,9 +126,9 @@ in
|
|||||||
|
|
||||||
# think about this again - and eventually make it an option
|
# think about this again - and eventually make it an option
|
||||||
environment.etc."firebird/firebird.conf".text = ''
|
environment.etc."firebird/firebird.conf".text = ''
|
||||||
# RootDirectory = Restrict ${cfg.dataDir}
|
# RootDirectory = Restrict ${dataDir}
|
||||||
DatabaseAccess = Restrict ${cfg.dataDir}
|
DatabaseAccess = Restrict ${dataDir}
|
||||||
ExternalFileAccess = Restrict ${cfg.dataDir}
|
ExternalFileAccess = Restrict ${dataDir}
|
||||||
# what is this? is None allowed?
|
# what is this? is None allowed?
|
||||||
UdfAccess = None
|
UdfAccess = None
|
||||||
# "Native" = traditional interbase/firebird, "mixed" is windows only
|
# "Native" = traditional interbase/firebird, "mixed" is windows only
|
||||||
@ -142,8 +149,14 @@ in
|
|||||||
#RemoteAuxPort = 0
|
#RemoteAuxPort = 0
|
||||||
# rsetrict connections to a network card:
|
# rsetrict connections to a network card:
|
||||||
#RemoteBindAddress =
|
#RemoteBindAddress =
|
||||||
# there are some more settings ..
|
# there are some additional settings which should be reviewed
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
users.extraUsers.firebird = {
|
||||||
|
description = "Firebird server user";
|
||||||
|
group = "firebird";
|
||||||
|
uid = config.ids.uids.firebird;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
@ -93,8 +93,8 @@ in
|
|||||||
default = [];
|
default = [];
|
||||||
description = "List of database names and their initial schemas that should be used to create databases on the first startup of MySQL";
|
description = "List of database names and their initial schemas that should be used to create databases on the first startup of MySQL";
|
||||||
example = [
|
example = [
|
||||||
{ name = "foodatabase"; schema = ./foodatabase.sql; }
|
{ name = "foodatabase"; schema = literalExample "./foodatabase.sql"; }
|
||||||
{ name = "bardatabase"; schema = ./bardatabase.sql; }
|
{ name = "bardatabase"; schema = literalExample "./bardatabase.sql"; }
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -86,8 +86,8 @@ in
|
|||||||
default = [];
|
default = [];
|
||||||
description = "List of database names and their initial schemas that should be used to create databases on the first startup of MySQL";
|
description = "List of database names and their initial schemas that should be used to create databases on the first startup of MySQL";
|
||||||
example = [
|
example = [
|
||||||
{ name = "foodatabase"; schema = ./foodatabase.sql; }
|
{ name = "foodatabase"; schema = literalExample "./foodatabase.sql"; }
|
||||||
{ name = "bardatabase"; schema = ./bardatabase.sql; }
|
{ name = "bardatabase"; schema = literalExample "./bardatabase.sql"; }
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -95,14 +95,6 @@ in
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
authMethod = mkOption {
|
|
||||||
default = " ident sameuser ";
|
|
||||||
description = ''
|
|
||||||
How to authorize users.
|
|
||||||
Note: ident needs absolute trust to all allowed client hosts.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
enableTCPIP = mkOption {
|
enableTCPIP = mkOption {
|
||||||
default = false;
|
default = false;
|
||||||
description = ''
|
description = ''
|
||||||
|
@ -52,7 +52,7 @@ in
|
|||||||
|
|
||||||
systemd.services.nix-gc =
|
systemd.services.nix-gc =
|
||||||
{ description = "Nix Garbage Collector";
|
{ description = "Nix Garbage Collector";
|
||||||
serviceConfig.ExecStart = "${config.environment.nix}/bin/nix-collect-garbage ${cfg.options}";
|
script = "exec ${config.environment.nix}/bin/nix-collect-garbage ${cfg.options}";
|
||||||
startAt = optionalString cfg.automatic cfg.dates;
|
startAt = optionalString cfg.automatic cfg.dates;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -11,10 +11,15 @@ let
|
|||||||
|
|
||||||
cfg = config.services.nixosManual;
|
cfg = config.services.nixosManual;
|
||||||
|
|
||||||
|
versionModule =
|
||||||
|
{ system.nixosVersionSuffix = config.system.nixosVersionSuffix;
|
||||||
|
system.nixosRevision = config.system.nixosRevision;
|
||||||
|
};
|
||||||
|
|
||||||
manual = import ../../../doc/manual {
|
manual = import ../../../doc/manual {
|
||||||
inherit (cfg) revision;
|
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
options = (fixMergeModules baseModules
|
revision = config.system.nixosRevision;
|
||||||
|
options = (fixMergeModules ([ versionModule ] ++ baseModules)
|
||||||
(removeAttrs extraArgs ["config" "options"]) // {
|
(removeAttrs extraArgs ["config" "options"]) // {
|
||||||
modules = [ ];
|
modules = [ ];
|
||||||
}).options;
|
}).options;
|
||||||
@ -75,16 +80,6 @@ in
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
services.nixosManual.revision = mkOption {
|
|
||||||
default = "local";
|
|
||||||
type = types.uniq types.string;
|
|
||||||
description = ''
|
|
||||||
Revision of the targeted source file. This value can either be
|
|
||||||
<literal>"local"</literal>, <literal>"HEAD"</literal> or any
|
|
||||||
revision number embedded in a string.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
215
nixos/modules/services/monitoring/munin.nix
Normal file
215
nixos/modules/services/monitoring/munin.nix
Normal file
@ -0,0 +1,215 @@
|
|||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
# TODO: support munin-async
|
||||||
|
# TODO: LWP/Pg perl libs aren't recognized
|
||||||
|
|
||||||
|
# TODO: support fastcgi
|
||||||
|
# http://munin-monitoring.org/wiki/CgiHowto2
|
||||||
|
# spawn-fcgi -s /var/run/munin/fastcgi-graph.sock -U www-data -u munin -g munin /usr/lib/munin/cgi/munin-cgi-graph
|
||||||
|
# spawn-fcgi -s /var/run/munin/fastcgi-html.sock -U www-data -u munin -g munin /usr/lib/munin/cgi/munin-cgi-html
|
||||||
|
# https://paste.sh/vofcctHP#-KbDSXVeWoifYncZmLfZzgum
|
||||||
|
# nginx http://munin.readthedocs.org/en/latest/example/webserver/nginx.html
|
||||||
|
|
||||||
|
|
||||||
|
with pkgs.lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
nodeCfg = config.services.munin-node;
|
||||||
|
cronCfg = config.services.munin-cron;
|
||||||
|
|
||||||
|
muninPlugins = pkgs.stdenv.mkDerivation {
|
||||||
|
name = "munin-available-plugins";
|
||||||
|
buildCommand = ''
|
||||||
|
mkdir -p $out
|
||||||
|
|
||||||
|
cp --preserve=mode ${pkgs.munin}/lib/plugins/* $out/
|
||||||
|
|
||||||
|
for file in $out/*; do
|
||||||
|
case "$file" in
|
||||||
|
plugin.sh) continue;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# read magic makers from the file
|
||||||
|
family=$(sed -nr 's/.*#%#\s+family\s*=\s*(\S+)\s*/\1/p' $file)
|
||||||
|
cap=$(sed -nr 's/.*#%#\s+capabilities\s*=\s*(.+)/\1/p' $file)
|
||||||
|
|
||||||
|
wrapProgram $file \
|
||||||
|
--set PATH "/run/current-system/sw/bin:/run/current-system/sw/sbin" \
|
||||||
|
--set MUNIN_LIBDIR "${pkgs.munin}/lib" \
|
||||||
|
--set MUNIN_PLUGSTATE "/var/run/munin"
|
||||||
|
|
||||||
|
# munin uses markers to tell munin-node-configure what a plugin can do
|
||||||
|
echo "#%# family=$family" >> $file
|
||||||
|
echo "#%# capabilities=$cap" >> $file
|
||||||
|
done
|
||||||
|
|
||||||
|
# NOTE: we disable disktstats because plugin seems to fail and it hangs html generation (100% CPU + memory leak)
|
||||||
|
rm -f $out/diskstats
|
||||||
|
'';
|
||||||
|
buildInputs = [ pkgs.makeWrapper ];
|
||||||
|
};
|
||||||
|
|
||||||
|
muninConf = pkgs.writeText "munin.conf"
|
||||||
|
''
|
||||||
|
dbdir /var/lib/munin
|
||||||
|
htmldir /var/www/munin
|
||||||
|
logdir /var/log/munin
|
||||||
|
rundir /var/run/munin
|
||||||
|
|
||||||
|
${cronCfg.extraGlobalConfig}
|
||||||
|
|
||||||
|
${cronCfg.hosts}
|
||||||
|
'';
|
||||||
|
|
||||||
|
nodeConf = pkgs.writeText "munin-node.conf"
|
||||||
|
''
|
||||||
|
log_level 3
|
||||||
|
log_file Sys::Syslog
|
||||||
|
port 4949
|
||||||
|
host *
|
||||||
|
background 0
|
||||||
|
user root
|
||||||
|
group root
|
||||||
|
host_name ${config.networking.hostName}
|
||||||
|
setsid 0
|
||||||
|
|
||||||
|
# wrapped plugins by makeWrapper being with dots
|
||||||
|
ignore_file ^\.
|
||||||
|
|
||||||
|
allow ^127\.0\.0\.1$
|
||||||
|
|
||||||
|
${nodeCfg.extraConfig}
|
||||||
|
'';
|
||||||
|
in
|
||||||
|
|
||||||
|
{
|
||||||
|
|
||||||
|
options = {
|
||||||
|
|
||||||
|
services.munin-node = {
|
||||||
|
|
||||||
|
enable = mkOption {
|
||||||
|
default = false;
|
||||||
|
description = ''
|
||||||
|
Enable Munin Node agent. Munin node listens on 0.0.0.0 and
|
||||||
|
by default accepts connections only from 127.0.0.1 for security reasons.
|
||||||
|
|
||||||
|
See <link xlink:href='http://munin-monitoring.org/wiki/munin-node.conf' />.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
extraConfig = mkOption {
|
||||||
|
default = "";
|
||||||
|
description = ''
|
||||||
|
<filename>munin-node.conf</filename> extra configuration. See
|
||||||
|
<link xlink:href='http://munin-monitoring.org/wiki/munin-node.conf' />
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
# TODO: add option to add additional plugins
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
services.munin-cron = {
|
||||||
|
|
||||||
|
enable = mkOption {
|
||||||
|
default = false;
|
||||||
|
description = ''
|
||||||
|
Enable munin-cron. Takes care of all heavy lifting to collect data from
|
||||||
|
nodes and draws graphs to html. Runs munin-update, munin-limits,
|
||||||
|
munin-graphs and munin-html in that order.
|
||||||
|
|
||||||
|
HTML output is in <filename>/var/www/munin/</filename>, configure your
|
||||||
|
favourite webserver to serve static files.
|
||||||
|
'';
|
||||||
|
example = literalExample ''
|
||||||
|
services = {
|
||||||
|
munin-node.enable = true;
|
||||||
|
munin-cron = {
|
||||||
|
enable = true;
|
||||||
|
hosts = '''
|
||||||
|
[''${config.networking.hostName}]
|
||||||
|
address localhost
|
||||||
|
''';
|
||||||
|
extraGlobalConfig = '''
|
||||||
|
contact.email.command mail -s "Munin notification for ''${var:host}" someone@example.com
|
||||||
|
''';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
extraGlobalConfig = mkOption {
|
||||||
|
default = "";
|
||||||
|
description = ''
|
||||||
|
<filename>munin.conf</filename> extra global configuration.
|
||||||
|
See <link xlink:href='http://munin-monitoring.org/wiki/munin.conf' />.
|
||||||
|
Useful to setup notifications, see
|
||||||
|
<link xlink:href='http://munin-monitoring.org/wiki/HowToContact' />
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
hosts = mkOption {
|
||||||
|
example = ''
|
||||||
|
[''${config.networking.hostName}]
|
||||||
|
address localhost
|
||||||
|
'';
|
||||||
|
description = ''
|
||||||
|
Definitions of hosts of nodes to collect data from. Needs at least one
|
||||||
|
hosts for cron to succeed. See
|
||||||
|
<link xlink:href='http://munin-monitoring.org/wiki/munin.conf' />
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkMerge [ (mkIf (nodeCfg.enable || cronCfg.enable) {
|
||||||
|
|
||||||
|
environment.systemPackages = [ pkgs.munin ];
|
||||||
|
|
||||||
|
users.extraUsers = [{
|
||||||
|
name = "munin";
|
||||||
|
description = "Munin monitoring user";
|
||||||
|
group = "munin";
|
||||||
|
}];
|
||||||
|
|
||||||
|
users.extraGroups = [{
|
||||||
|
name = "munin";
|
||||||
|
}];
|
||||||
|
|
||||||
|
}) (mkIf nodeCfg.enable {
|
||||||
|
|
||||||
|
systemd.services.munin-node = {
|
||||||
|
description = "Munin node, the agent process";
|
||||||
|
after = [ "network.target" ];
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
path = [ pkgs.munin ];
|
||||||
|
environment.MUNIN_PLUGSTATE = "/var/run/munin";
|
||||||
|
serviceConfig = {
|
||||||
|
ExecStart = "${pkgs.munin}/sbin/munin-node --config ${nodeConf} --servicedir /etc/munin/plugins/";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
system.activationScripts.munin-node = ''
|
||||||
|
echo "updating munin plugins..."
|
||||||
|
|
||||||
|
mkdir -p /etc/munin/plugins
|
||||||
|
rm -rf /etc/munin/plugins/*
|
||||||
|
PATH="/run/current-system/sw/bin:/run/current-system/sw/sbin" ${pkgs.munin}/sbin/munin-node-configure --shell --families contrib,auto,manual --config ${nodeConf} --libdir=${muninPlugins} --servicedir=/etc/munin/plugins 2>/dev/null | ${pkgs.bash}/bin/bash
|
||||||
|
'';
|
||||||
|
|
||||||
|
}) (mkIf cronCfg.enable {
|
||||||
|
|
||||||
|
services.cron.systemCronJobs = [
|
||||||
|
"*/5 * * * * munin ${pkgs.munin}/bin/munin-cron --config ${muninConf}"
|
||||||
|
];
|
||||||
|
|
||||||
|
system.activationScripts.munin-cron = stringAfter [ "users" "groups" ] ''
|
||||||
|
mkdir -p /var/{run,log,www,lib}/munin
|
||||||
|
chown -R munin:munin /var/{run,log,www,lib}/munin
|
||||||
|
'';
|
||||||
|
|
||||||
|
})];
|
||||||
|
}
|
@ -44,7 +44,7 @@ in
|
|||||||
loadDumps = mkOption {
|
loadDumps = mkOption {
|
||||||
default = [];
|
default = [];
|
||||||
description = "Configuration dump that should be loaded on the first startup";
|
description = "Configuration dump that should be loaded on the first startup";
|
||||||
example = [ ./myejabberd.dump ];
|
example = literalExample "[ ./myejabberd.dump ]";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -181,11 +181,11 @@ in
|
|||||||
example = [
|
example = [
|
||||||
{
|
{
|
||||||
hostNames = [ "myhost" "myhost.mydomain.com" "10.10.1.4" ];
|
hostNames = [ "myhost" "myhost.mydomain.com" "10.10.1.4" ];
|
||||||
publicKeyFile = ./pubkeys/myhost_ssh_host_dsa_key.pub;
|
publicKeyFile = literalExample "./pubkeys/myhost_ssh_host_dsa_key.pub";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
hostNames = [ "myhost2" ];
|
hostNames = [ "myhost2" ];
|
||||||
publicKeyFile = ./pubkeys/myhost2_ssh_host_dsa_key.pub;
|
publicKeyFile = literalExample "./pubkeys/myhost2_ssh_host_dsa_key.pub";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
options = {
|
options = {
|
||||||
|
@ -4,12 +4,92 @@ with pkgs.lib;
|
|||||||
|
|
||||||
let
|
let
|
||||||
|
|
||||||
|
/* minimal secure setup:
|
||||||
|
|
||||||
|
enable = true;
|
||||||
|
forceLocalLoginsSSL = true;
|
||||||
|
forceLocalDataSSL = true;
|
||||||
|
userlistDeny = false;
|
||||||
|
localUsers = true;
|
||||||
|
userlist = ["non-root-user" "other-non-root-user"];
|
||||||
|
rsaCertFile = "/var/vsftpd/vsftpd.pem";
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
cfg = config.services.vsftpd;
|
cfg = config.services.vsftpd;
|
||||||
|
|
||||||
inherit (pkgs) vsftpd;
|
inherit (pkgs) vsftpd;
|
||||||
|
|
||||||
yesNoOption = p : name :
|
yesNoOption = nixosName: vsftpdName: default: description: {
|
||||||
"${name}=${if p then "YES" else "NO"}";
|
cfgText = "${vsftpdName}=${if getAttr nixosName cfg then "YES" else "NO"}";
|
||||||
|
|
||||||
|
nixosOption = {
|
||||||
|
name = nixosName;
|
||||||
|
value = mkOption {
|
||||||
|
inherit description default;
|
||||||
|
type = types.bool;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
optionDescription = [
|
||||||
|
|
||||||
|
(yesNoOption "anonymousUser" "anonymous_enable" false ''
|
||||||
|
Whether to enable the anonymous FTP user.
|
||||||
|
'')
|
||||||
|
(yesNoOption "localUsers" "local_enable" false ''
|
||||||
|
Whether to enable FTP for local users.
|
||||||
|
'')
|
||||||
|
(yesNoOption "writeEnable" "write_enable" false ''
|
||||||
|
Whether any write activity is permitted to users.
|
||||||
|
'')
|
||||||
|
(yesNoOption "anonymousUploadEnable" "anon_upload_enable" false ''
|
||||||
|
Whether any uploads are permitted to anonymous users.
|
||||||
|
'')
|
||||||
|
(yesNoOption "anonymousMkdirEnable" "anon_mkdir_write_enable" false ''
|
||||||
|
Whether any uploads are permitted to anonymous users.
|
||||||
|
'')
|
||||||
|
(yesNoOption "chrootlocalUser" "chroot_local_user" false ''
|
||||||
|
Whether local users are confined to their home directory.
|
||||||
|
'')
|
||||||
|
(yesNoOption "userlistEnable" "userlist_enable" false ''
|
||||||
|
Whether users are included.
|
||||||
|
'')
|
||||||
|
(yesNoOption "userlistDeny" "userlist_deny" false ''
|
||||||
|
Specifies whether <option>userlistFile</option> is a list of user
|
||||||
|
names to allow or deny access.
|
||||||
|
The default <literal>false</literal> means whitelist/allow.
|
||||||
|
'')
|
||||||
|
(yesNoOption "forceLocalLoginsSSL" "force_local_logins_ssl" false ''
|
||||||
|
Only applies if <option>sslEnable</option> is true. Non anonymous (local) users
|
||||||
|
must use a secure SSL connection to send a password.
|
||||||
|
'')
|
||||||
|
(yesNoOption "forceLocalDataSSL" "force_local_data_ssl" false ''
|
||||||
|
Only applies if <option>sslEnable</option> is true. Non anonymous (local) users
|
||||||
|
must use a secure SSL connection for sending/receiving data on data connection.
|
||||||
|
'')
|
||||||
|
(yesNoOption "ssl_tlsv1" "ssl_tlsv1" true '' '')
|
||||||
|
(yesNoOption "ssl_sslv2" "ssl_sslv2" false '' '')
|
||||||
|
(yesNoOption "ssl_sslv3" "ssl_sslv3" false '' '')
|
||||||
|
|
||||||
|
{
|
||||||
|
cfgText = if cfg.rsaCertFile == null then ""
|
||||||
|
else ''
|
||||||
|
sslEnable=YES
|
||||||
|
rsa_cert_file=${cfg.rsaCertFile}
|
||||||
|
'';
|
||||||
|
|
||||||
|
nixosOption = {
|
||||||
|
name = "rsaCertFile";
|
||||||
|
value = mkOption {
|
||||||
|
default = null;
|
||||||
|
description = ''
|
||||||
|
rsa certificate file.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
@ -26,52 +106,34 @@ in
|
|||||||
description = "Whether to enable the vsftpd FTP server.";
|
description = "Whether to enable the vsftpd FTP server.";
|
||||||
};
|
};
|
||||||
|
|
||||||
anonymousUser = mkOption {
|
userlist = mkOption {
|
||||||
default = false;
|
default = [];
|
||||||
description = "Whether to enable the anonymous FTP user.";
|
|
||||||
|
description = ''
|
||||||
|
See <option>userlistFile</option>.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
userlistFile = mkOption {
|
||||||
|
default = pkgs.writeText "userlist" (concatMapStrings (x: "${x}\n") cfg.userlist);
|
||||||
|
description = ''
|
||||||
|
Newline separated list of names to be allowed/denied if <option>userlistEnable</option>
|
||||||
|
is <literal>true</literal>. Meaning see <option>userlistDeny</option>.
|
||||||
|
|
||||||
|
The default is a file containing the users from <option>userlist</option>.
|
||||||
|
|
||||||
|
If explicitely set to null userlist_file will not be set in vsftpd's config file.
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
anonymousUserHome = mkOption {
|
anonymousUserHome = mkOption {
|
||||||
default = "/home/ftp";
|
default = "/home/ftp/";
|
||||||
description = "Path to anonymous user data.";
|
description = ''
|
||||||
|
Directory to consider the HOME of the anonymous user.
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
localUsers = mkOption {
|
} // (listToAttrs (catAttrs "nixosOption" optionDescription)) ;
|
||||||
default = false;
|
|
||||||
description = "Whether to enable FTP for local users.";
|
|
||||||
};
|
|
||||||
|
|
||||||
writeEnable = mkOption {
|
|
||||||
default = false;
|
|
||||||
description = "Whether any write activity is permitted to users.";
|
|
||||||
};
|
|
||||||
|
|
||||||
anonymousUploadEnable = mkOption {
|
|
||||||
default = false;
|
|
||||||
description = "Whether any uploads are permitted to anonymous users.";
|
|
||||||
};
|
|
||||||
|
|
||||||
anonymousMkdirEnable = mkOption {
|
|
||||||
default = false;
|
|
||||||
description = "Whether mkdir is permitted to anonymous users.";
|
|
||||||
};
|
|
||||||
|
|
||||||
chrootlocalUser = mkOption {
|
|
||||||
default = false;
|
|
||||||
description = "Whether local users are confined to their home directory.";
|
|
||||||
};
|
|
||||||
|
|
||||||
userlistEnable = mkOption {
|
|
||||||
default = false;
|
|
||||||
description = "Whether users are included.";
|
|
||||||
};
|
|
||||||
|
|
||||||
userlistDeny = mkOption {
|
|
||||||
default = false;
|
|
||||||
description = "Whether users are excluded.";
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -80,6 +142,15 @@ in
|
|||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
|
||||||
|
assertions = [
|
||||||
|
{
|
||||||
|
assertion =
|
||||||
|
(cfg.forceLocalLoginsSSL -> cfg.rsaCertFile != null)
|
||||||
|
&& (cfg.forceLocalDataSSL -> cfg.rsaCertFile != null);
|
||||||
|
message = "vsftpd: If forceLocalLoginsSSL or forceLocalDataSSL is true then a rsaCertFile must be provided!";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
users.extraUsers =
|
users.extraUsers =
|
||||||
[ { name = "vsftpd";
|
[ { name = "vsftpd";
|
||||||
uid = config.ids.uids.vsftpd;
|
uid = config.ids.uids.vsftpd;
|
||||||
@ -99,6 +170,21 @@ in
|
|||||||
gid = config.ids.gids.ftp;
|
gid = config.ids.gids.ftp;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# If you really have to access root via FTP use mkOverride or userlistDeny
|
||||||
|
# = false and whitelist root
|
||||||
|
services.vsftpd.userlist = if cfg.userlistDeny then ["root"] else [];
|
||||||
|
|
||||||
|
environment.etc."vsftpd.conf".text =
|
||||||
|
concatMapStrings (x: "${x.cfgText}\n") optionDescription
|
||||||
|
+ ''
|
||||||
|
${if cfg.userlistFile == null then ""
|
||||||
|
else "userlist_file=${cfg.userlistFile}"}
|
||||||
|
background=NO
|
||||||
|
listen=YES
|
||||||
|
nopriv_user=vsftpd
|
||||||
|
secure_chroot_dir=/var/empty
|
||||||
|
'';
|
||||||
|
|
||||||
jobs.vsftpd =
|
jobs.vsftpd =
|
||||||
{ description = "vsftpd server";
|
{ description = "vsftpd server";
|
||||||
|
|
||||||
@ -107,22 +193,6 @@ in
|
|||||||
|
|
||||||
preStart =
|
preStart =
|
||||||
''
|
''
|
||||||
# !!! Why isn't this generated in the normal way?
|
|
||||||
cat > /etc/vsftpd.conf <<EOF
|
|
||||||
${yesNoOption cfg.anonymousUser "anonymous_enable"}
|
|
||||||
${yesNoOption cfg.localUsers "local_enable"}
|
|
||||||
${yesNoOption cfg.writeEnable "write_enable"}
|
|
||||||
${yesNoOption cfg.anonymousUploadEnable "anon_upload_enable"}
|
|
||||||
${yesNoOption cfg.anonymousMkdirEnable "anon_mkdir_write_enable"}
|
|
||||||
${yesNoOption cfg.chrootlocalUser "chroot_local_user"}
|
|
||||||
${yesNoOption cfg.userlistEnable "userlist_enable"}
|
|
||||||
${yesNoOption cfg.userlistDeny "userlist_deny"}
|
|
||||||
background=NO
|
|
||||||
listen=YES
|
|
||||||
nopriv_user=vsftpd
|
|
||||||
secure_chroot_dir=/var/empty
|
|
||||||
EOF
|
|
||||||
|
|
||||||
${if cfg.anonymousUser then ''
|
${if cfg.anonymousUser then ''
|
||||||
mkdir -p -m 555 ${cfg.anonymousUserHome}
|
mkdir -p -m 555 ${cfg.anonymousUserHome}
|
||||||
chown -R ftp:ftp ${cfg.anonymousUserHome}
|
chown -R ftp:ftp ${cfg.anonymousUserHome}
|
||||||
|
@ -37,14 +37,14 @@ let
|
|||||||
default =
|
default =
|
||||||
''
|
''
|
||||||
<zodb_db main>
|
<zodb_db main>
|
||||||
mount-point /
|
mount-point /
|
||||||
cache-size 30000
|
cache-size 30000
|
||||||
<blobstorage>
|
<blobstorage>
|
||||||
blob-dir /var/lib/zope2/${name}/blobstorage
|
blob-dir /var/lib/zope2/${name}/blobstorage
|
||||||
<filestorage>
|
<filestorage>
|
||||||
path /var/lib/zope2/${name}/filestorage/Data.fs
|
path /var/lib/zope2/${name}/filestorage/Data.fs
|
||||||
</filestorage>
|
</filestorage>
|
||||||
</blobstorage>
|
</blobstorage>
|
||||||
</zodb_db>
|
</zodb_db>
|
||||||
'';
|
'';
|
||||||
type = types.string;
|
type = types.string;
|
||||||
@ -76,14 +76,14 @@ in
|
|||||||
extra =
|
extra =
|
||||||
''
|
''
|
||||||
<zodb_db main>
|
<zodb_db main>
|
||||||
mount-point /
|
mount-point /
|
||||||
cache-size 30000
|
cache-size 30000
|
||||||
<blobstorage>
|
<blobstorage>
|
||||||
blob-dir /var/lib/zope2/plone01/blobstorage
|
blob-dir /var/lib/zope2/plone01/blobstorage
|
||||||
<filestorage>
|
<filestorage>
|
||||||
path /var/lib/zope2/plone01/filestorage/Data.fs
|
path /var/lib/zope2/plone01/filestorage/Data.fs
|
||||||
</filestorage>
|
</filestorage>
|
||||||
</blobstorage>
|
</blobstorage>
|
||||||
</zodb_db>
|
</zodb_db>
|
||||||
'';
|
'';
|
||||||
|
|
||||||
@ -107,32 +107,32 @@ in
|
|||||||
let
|
let
|
||||||
interpreter = pkgs.writeScript "interpreter"
|
interpreter = pkgs.writeScript "interpreter"
|
||||||
''
|
''
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
_interactive = True
|
_interactive = True
|
||||||
if len(sys.argv) > 1:
|
if len(sys.argv) > 1:
|
||||||
_options, _args = __import__("getopt").getopt(sys.argv[1:], 'ic:m:')
|
_options, _args = __import__("getopt").getopt(sys.argv[1:], 'ic:m:')
|
||||||
_interactive = False
|
_interactive = False
|
||||||
for (_opt, _val) in _options:
|
for (_opt, _val) in _options:
|
||||||
if _opt == '-i':
|
if _opt == '-i':
|
||||||
_interactive = True
|
_interactive = True
|
||||||
elif _opt == '-c':
|
elif _opt == '-c':
|
||||||
exec _val
|
exec _val
|
||||||
elif _opt == '-m':
|
elif _opt == '-m':
|
||||||
sys.argv[1:] = _args
|
sys.argv[1:] = _args
|
||||||
_args = []
|
_args = []
|
||||||
__import__("runpy").run_module(
|
__import__("runpy").run_module(
|
||||||
_val, {}, "__main__", alter_sys=True)
|
_val, {}, "__main__", alter_sys=True)
|
||||||
|
|
||||||
if _args:
|
if _args:
|
||||||
sys.argv[:] = _args
|
sys.argv[:] = _args
|
||||||
__file__ = _args[0]
|
__file__ = _args[0]
|
||||||
del _options, _args
|
del _options, _args
|
||||||
execfile(__file__)
|
execfile(__file__)
|
||||||
|
|
||||||
if _interactive:
|
if _interactive:
|
||||||
del _interactive
|
del _interactive
|
||||||
__import__("code").interact(banner="", local=globals())
|
__import__("code").interact(banner="", local=globals())
|
||||||
'';
|
'';
|
||||||
env = pkgs.buildEnv {
|
env = pkgs.buildEnv {
|
||||||
name = "zope2-${name}-env";
|
name = "zope2-${name}-env";
|
||||||
@ -149,73 +149,76 @@ if _interactive:
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
conf = pkgs.writeText "zope2-${name}-conf"
|
conf = pkgs.writeText "zope2-${name}-conf"
|
||||||
''%define INSTANCEHOME ${env}
|
''
|
||||||
instancehome $INSTANCEHOME
|
%define INSTANCEHOME ${env}
|
||||||
%define CLIENTHOME /var/lib/zope2/${name}
|
instancehome $INSTANCEHOME
|
||||||
clienthome $CLIENTHOME
|
%define CLIENTHOME /var/lib/zope2/${name}
|
||||||
|
clienthome $CLIENTHOME
|
||||||
|
|
||||||
debug-mode off
|
debug-mode off
|
||||||
security-policy-implementation C
|
security-policy-implementation C
|
||||||
verbose-security off
|
verbose-security off
|
||||||
default-zpublisher-encoding utf-8
|
default-zpublisher-encoding utf-8
|
||||||
zserver-threads ${toString opts.threads}
|
zserver-threads ${toString opts.threads}
|
||||||
effective-user ${opts.user}
|
effective-user ${opts.user}
|
||||||
|
|
||||||
pid-filename /var/lib/zope2/${name}/pid
|
pid-filename /var/lib/zope2/${name}/pid
|
||||||
lock-filename /var/lib/zope2/${name}/lock
|
lock-filename /var/lib/zope2/${name}/lock
|
||||||
python-check-interval 1000
|
python-check-interval 1000
|
||||||
enable-product-installation off
|
enable-product-installation off
|
||||||
|
|
||||||
<environment>
|
<environment>
|
||||||
zope_i18n_compile_mo_files false
|
zope_i18n_compile_mo_files false
|
||||||
</environment>
|
</environment>
|
||||||
|
|
||||||
<eventlog>
|
<eventlog>
|
||||||
level INFO
|
level INFO
|
||||||
<logfile>
|
<logfile>
|
||||||
path /var/log/zope2/${name}.log
|
path /var/log/zope2/${name}.log
|
||||||
level INFO
|
level INFO
|
||||||
</logfile>
|
</logfile>
|
||||||
</eventlog>
|
</eventlog>
|
||||||
|
|
||||||
<logger access>
|
<logger access>
|
||||||
level WARN
|
level WARN
|
||||||
<logfile>
|
<logfile>
|
||||||
path /var/log/zope2/${name}-Z2.log
|
path /var/log/zope2/${name}-Z2.log
|
||||||
format %(message)s
|
format %(message)s
|
||||||
</logfile>
|
</logfile>
|
||||||
</logger>
|
</logger>
|
||||||
|
|
||||||
<http-server>
|
<http-server>
|
||||||
address ${opts.http_address}
|
address ${opts.http_address}
|
||||||
</http-server>
|
</http-server>
|
||||||
|
|
||||||
<zodb_db temporary>
|
<zodb_db temporary>
|
||||||
<temporarystorage>
|
<temporarystorage>
|
||||||
name temporary storage for sessioning
|
name temporary storage for sessioning
|
||||||
</temporarystorage>
|
</temporarystorage>
|
||||||
mount-point /temp_folder
|
mount-point /temp_folder
|
||||||
container-class Products.TemporaryFolder.TemporaryContainer
|
container-class Products.TemporaryFolder.TemporaryContainer
|
||||||
</zodb_db>
|
</zodb_db>
|
||||||
|
|
||||||
${opts.extra}
|
${opts.extra}
|
||||||
'';
|
'';
|
||||||
ctlScript = pkgs.writeScript "zope2-${name}-ctl-script"
|
ctlScript = pkgs.writeScript "zope2-${name}-ctl-script"
|
||||||
''#!${env}/bin/python
|
''
|
||||||
|
#!${env}/bin/python
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
import plone.recipe.zope2instance.ctl
|
import plone.recipe.zope2instance.ctl
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
sys.exit(plone.recipe.zope2instance.ctl.main(
|
sys.exit(plone.recipe.zope2instance.ctl.main(
|
||||||
["-C", "${conf}"]
|
["-C", "${conf}"]
|
||||||
+ sys.argv[1:]))
|
+ sys.argv[1:]))
|
||||||
'';
|
'';
|
||||||
|
|
||||||
ctl = pkgs.writeScript "zope2-${name}-ctl"
|
ctl = pkgs.writeScript "zope2-${name}-ctl"
|
||||||
''#!${pkgs.bash}/bin/bash -e
|
''
|
||||||
export PYTHONHOME=${env}
|
#!${pkgs.bash}/bin/bash -e
|
||||||
exec ${ctlScript} "$@"
|
export PYTHONHOME=${env}
|
||||||
|
exec ${ctlScript} "$@"
|
||||||
'';
|
'';
|
||||||
in {
|
in {
|
||||||
description = "zope2 ${name} instance";
|
description = "zope2 ${name} instance";
|
||||||
|
51
nixos/modules/services/x11/redshift.nix
Normal file
51
nixos/modules/services/x11/redshift.nix
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
{ config, pkgs, ... }:
|
||||||
|
with pkgs.lib;
|
||||||
|
let
|
||||||
|
cfg = config.services.redshift;
|
||||||
|
|
||||||
|
in {
|
||||||
|
options = {
|
||||||
|
services.redshift.enable = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
example = true;
|
||||||
|
description = "Enable Redshift to change your screen's colour temperature depending on the time of day";
|
||||||
|
};
|
||||||
|
|
||||||
|
services.redshift.latitude = mkOption {
|
||||||
|
description = "Your current latitude";
|
||||||
|
type = types.string;
|
||||||
|
};
|
||||||
|
|
||||||
|
services.redshift.longitude = mkOption {
|
||||||
|
description = "Your current longitude";
|
||||||
|
type = types.string;
|
||||||
|
};
|
||||||
|
|
||||||
|
services.redshift.temperature = {
|
||||||
|
day = mkOption {
|
||||||
|
description = "Colour temperature to use during day time";
|
||||||
|
default = 5500;
|
||||||
|
type = types.int;
|
||||||
|
};
|
||||||
|
night = mkOption {
|
||||||
|
description = "Colour temperature to use during night time";
|
||||||
|
default = 3700;
|
||||||
|
type = types.int;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
systemd.services.redshift = {
|
||||||
|
description = "Redshift colour temperature adjuster";
|
||||||
|
requires = [ "display-manager.service" ];
|
||||||
|
script = ''
|
||||||
|
${pkgs.redshift}/bin/redshift \
|
||||||
|
-l ${cfg.latitude}:${cfg.longitude} \
|
||||||
|
-t ${toString cfg.temperature.day}:${toString cfg.temperature.night}
|
||||||
|
'';
|
||||||
|
environment = { DISPLAY = ":0"; };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
@ -232,8 +232,11 @@ in
|
|||||||
s3tcSupport = mkOption {
|
s3tcSupport = mkOption {
|
||||||
default = false;
|
default = false;
|
||||||
description = ''
|
description = ''
|
||||||
Make S2TC via libtxc_dxtn available to OpenGL drivers. Using
|
Make S3TC(S3 Texture Compression) via libtxc_dxtn available
|
||||||
this library may require a patent license depending on your location.
|
to OpenGL drivers. It is essential for many games to work
|
||||||
|
with FOSS GPU drivers.
|
||||||
|
|
||||||
|
Using this library may require a patent license depending on your location.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -44,8 +44,12 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
description = ''
|
description = ''
|
||||||
Activate the new configuration (i.e., update /etc, make accounts,
|
A set of shell script fragments that are executed when a NixOS
|
||||||
and so on).
|
system configuration is activated. Examples are updating
|
||||||
|
/etc, creating accounts, and so on. Since these are executed
|
||||||
|
every time you boot the system or run
|
||||||
|
<command>nixos-rebuild</command>, it's important that they are
|
||||||
|
idempotent and fast.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
merge = mergeTypedOption "script" builtins.isAttrs (fold mergeAttrs {});
|
merge = mergeTypedOption "script" builtins.isAttrs (fold mergeAttrs {});
|
||||||
|
@ -122,6 +122,7 @@ in
|
|||||||
options = {
|
options = {
|
||||||
|
|
||||||
system.build = mkOption {
|
system.build = mkOption {
|
||||||
|
internal = true;
|
||||||
default = {};
|
default = {};
|
||||||
description = ''
|
description = ''
|
||||||
Attribute set of derivations used to setup the system.
|
Attribute set of derivations used to setup the system.
|
||||||
@ -144,6 +145,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
system.boot.loader.id = mkOption {
|
system.boot.loader.id = mkOption {
|
||||||
|
internal = true;
|
||||||
default = "";
|
default = "";
|
||||||
description = ''
|
description = ''
|
||||||
Id string of the used bootloader.
|
Id string of the used bootloader.
|
||||||
@ -151,6 +153,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
system.boot.loader.kernelFile = mkOption {
|
system.boot.loader.kernelFile = mkOption {
|
||||||
|
internal = true;
|
||||||
default = pkgs.stdenv.platform.kernelTarget;
|
default = pkgs.stdenv.platform.kernelTarget;
|
||||||
type = types.uniq types.string;
|
type = types.uniq types.string;
|
||||||
description = ''
|
description = ''
|
||||||
@ -169,8 +172,8 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
system.extraSystemBuilderCmds = mkOption {
|
system.extraSystemBuilderCmds = mkOption {
|
||||||
default = "";
|
|
||||||
internal = true;
|
internal = true;
|
||||||
|
default = "";
|
||||||
merge = concatStringsSep "\n";
|
merge = concatStringsSep "\n";
|
||||||
description = ''
|
description = ''
|
||||||
This code will be added to the builder creating the system store path.
|
This code will be added to the builder creating the system store path.
|
||||||
|
@ -86,12 +86,6 @@ in
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
# !!! How can we mark options as obsolete?
|
|
||||||
bootDevice = mkOption {
|
|
||||||
default = "";
|
|
||||||
description = "Obsolete.";
|
|
||||||
};
|
|
||||||
|
|
||||||
configurationName = mkOption {
|
configurationName = mkOption {
|
||||||
default = "";
|
default = "";
|
||||||
example = "Stable 2.6.21";
|
example = "Stable 2.6.21";
|
||||||
@ -173,15 +167,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
splashImage = mkOption {
|
splashImage = mkOption {
|
||||||
default =
|
example = literalExample "./my-background.png";
|
||||||
if cfg.version == 1
|
|
||||||
then pkgs.fetchurl {
|
|
||||||
url = http://www.gnome-look.org/CONTENT/content-files/36909-soft-tux.xpm.gz;
|
|
||||||
sha256 = "14kqdx2lfqvh40h6fjjzqgff1mwk74dmbjvmqphi6azzra7z8d59";
|
|
||||||
}
|
|
||||||
# GRUB 1.97 doesn't support gzipped XPMs.
|
|
||||||
else ./winkler-gnu-blue-640x480.png;
|
|
||||||
example = null;
|
|
||||||
description = ''
|
description = ''
|
||||||
Background image used for GRUB. It must be a 640x480,
|
Background image used for GRUB. It must be a 640x480,
|
||||||
14-colour image in XPM format, optionally compressed with
|
14-colour image in XPM format, optionally compressed with
|
||||||
@ -233,30 +219,43 @@ in
|
|||||||
|
|
||||||
###### implementation
|
###### implementation
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkMerge [
|
||||||
|
|
||||||
boot.loader.grub.devices = optional (cfg.device != "") cfg.device;
|
{ boot.loader.grub.splashImage = mkDefault (
|
||||||
|
if cfg.version == 1 then pkgs.fetchurl {
|
||||||
|
url = http://www.gnome-look.org/CONTENT/content-files/36909-soft-tux.xpm.gz;
|
||||||
|
sha256 = "14kqdx2lfqvh40h6fjjzqgff1mwk74dmbjvmqphi6azzra7z8d59";
|
||||||
|
}
|
||||||
|
# GRUB 1.97 doesn't support gzipped XPMs.
|
||||||
|
else ./winkler-gnu-blue-640x480.png);
|
||||||
|
}
|
||||||
|
|
||||||
system.build.installBootLoader =
|
(mkIf cfg.enable {
|
||||||
if cfg.devices == [] then
|
|
||||||
throw "You must set the ‘boot.loader.grub.device’ option to make the system bootable."
|
|
||||||
else
|
|
||||||
"PERL5LIB=${makePerlPath [ pkgs.perlPackages.XMLLibXML pkgs.perlPackages.XMLSAX ]} " +
|
|
||||||
"${pkgs.perl}/bin/perl ${./install-grub.pl} ${grubConfig}";
|
|
||||||
|
|
||||||
system.build.grub = grub;
|
boot.loader.grub.devices = optional (cfg.device != "") cfg.device;
|
||||||
|
|
||||||
# Common attribute for boot loaders so only one of them can be
|
system.build.installBootLoader =
|
||||||
# set at once.
|
if cfg.devices == [] then
|
||||||
system.boot.loader.id = "grub";
|
throw "You must set the ‘boot.loader.grub.device’ option to make the system bootable."
|
||||||
|
else
|
||||||
|
"PERL5LIB=${makePerlPath [ pkgs.perlPackages.XMLLibXML pkgs.perlPackages.XMLSAX ]} " +
|
||||||
|
"${pkgs.perl}/bin/perl ${./install-grub.pl} ${grubConfig}";
|
||||||
|
|
||||||
environment.systemPackages = [ grub ];
|
system.build.grub = grub;
|
||||||
|
|
||||||
boot.loader.grub.extraPrepareConfig =
|
# Common attribute for boot loaders so only one of them can be
|
||||||
concatStrings (mapAttrsToList (n: v: ''
|
# set at once.
|
||||||
${pkgs.coreutils}/bin/cp -pf "${v}" "/boot/${n}"
|
system.boot.loader.id = "grub";
|
||||||
'') config.boot.loader.grub.extraFiles);
|
|
||||||
|
|
||||||
};
|
environment.systemPackages = [ grub ];
|
||||||
|
|
||||||
|
boot.loader.grub.extraPrepareConfig =
|
||||||
|
concatStrings (mapAttrsToList (n: v: ''
|
||||||
|
${pkgs.coreutils}/bin/cp -pf "${v}" "/boot/${n}"
|
||||||
|
'') config.boot.loader.grub.extraFiles);
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -44,12 +44,9 @@ in
|
|||||||
{
|
{
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
boot.initrd.luks.enable = mkOption {
|
|
||||||
default = false;
|
|
||||||
description = "Obsolete.";
|
|
||||||
};
|
|
||||||
|
|
||||||
boot.initrd.luks.mitigateDMAAttacks = mkOption {
|
boot.initrd.luks.mitigateDMAAttacks = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = true;
|
default = true;
|
||||||
description = ''
|
description = ''
|
||||||
Unless enabled, encryption keys can be easily recovered by an attacker with physical
|
Unless enabled, encryption keys can be easily recovered by an attacker with physical
|
||||||
@ -62,6 +59,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
boot.initrd.luks.cryptoModules = mkOption {
|
boot.initrd.luks.cryptoModules = mkOption {
|
||||||
|
type = types.listOf types.string;
|
||||||
default =
|
default =
|
||||||
[ "aes" "aes_generic" "blowfish" "twofish"
|
[ "aes" "aes_generic" "blowfish" "twofish"
|
||||||
"serpent" "cbc" "xts" "lrw" "sha1" "sha256" "sha512"
|
"serpent" "cbc" "xts" "lrw" "sha1" "sha256" "sha512"
|
||||||
@ -142,7 +140,9 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf (luks.devices != []) {
|
config = mkIf (luks.devices != []) {
|
||||||
|
@ -61,7 +61,7 @@ in
|
|||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
|
||||||
environment.systemPackages =
|
environment.systemPackages =
|
||||||
[ pkgs.libvirt ]
|
[ pkgs.libvirt pkgs.netcat-openbsd ]
|
||||||
++ optional cfg.enableKVM pkgs.qemu_kvm;
|
++ optional cfg.enableKVM pkgs.qemu_kvm;
|
||||||
|
|
||||||
boot.kernelModules = [ "tun" ];
|
boot.kernelModules = [ "tun" ];
|
||||||
|
@ -16,7 +16,9 @@ let
|
|||||||
|
|
||||||
|
|
||||||
versionModule =
|
versionModule =
|
||||||
{ system.nixosVersionSuffix = versionSuffix; };
|
{ system.nixosVersionSuffix = versionSuffix;
|
||||||
|
system.nixosRevision = nixpkgs.rev or nixpkgs.shortRev;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
makeIso =
|
makeIso =
|
||||||
@ -73,7 +75,7 @@ let
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
in {
|
in rec {
|
||||||
|
|
||||||
channel =
|
channel =
|
||||||
pkgs.releaseTools.makeSourceTarball {
|
pkgs.releaseTools.makeSourceTarball {
|
||||||
@ -91,6 +93,7 @@ in {
|
|||||||
distPhase = ''
|
distPhase = ''
|
||||||
rm -rf .git
|
rm -rf .git
|
||||||
echo -n $VERSION_SUFFIX > .version-suffix
|
echo -n $VERSION_SUFFIX > .version-suffix
|
||||||
|
echo -n ${nixpkgs.rev or nixpkgs.shortRev} > .git-revision
|
||||||
releaseName=nixos-$VERSION$VERSION_SUFFIX
|
releaseName=nixos-$VERSION$VERSION_SUFFIX
|
||||||
mkdir -p $out/tarballs
|
mkdir -p $out/tarballs
|
||||||
mkdir ../$releaseName
|
mkdir ../$releaseName
|
||||||
@ -106,18 +109,8 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
manual =
|
manual = iso_minimal.x86_64-linux.config.system.build.manual.manual;
|
||||||
(import ./doc/manual {
|
manpages = iso_minimal.x86_64-linux.config.system.build.manual.manpages;
|
||||||
inherit pkgs;
|
|
||||||
options =
|
|
||||||
(import lib/eval-config.nix {
|
|
||||||
modules = [
|
|
||||||
{ fileSystems = [];
|
|
||||||
boot.loader.grub.device = "/dev/sda";
|
|
||||||
} ];
|
|
||||||
}).options;
|
|
||||||
revision = toString (nixpkgs.rev or nixpkgs.shortRev);
|
|
||||||
}).manual;
|
|
||||||
|
|
||||||
|
|
||||||
iso_minimal = pkgs.lib.genAttrs systems (system: makeIso {
|
iso_minimal = pkgs.lib.genAttrs systems (system: makeIso {
|
||||||
|
@ -21,11 +21,12 @@ with import ../lib/testing.nix { inherit system minimal; };
|
|||||||
#mpich = makeTest (import ./mpich.nix);
|
#mpich = makeTest (import ./mpich.nix);
|
||||||
mysql = makeTest (import ./mysql.nix);
|
mysql = makeTest (import ./mysql.nix);
|
||||||
mysql_replication = makeTest (import ./mysql-replication.nix);
|
mysql_replication = makeTest (import ./mysql-replication.nix);
|
||||||
|
munin = makeTest (import ./munin.nix);
|
||||||
nat = makeTest (import ./nat.nix);
|
nat = makeTest (import ./nat.nix);
|
||||||
nfs3 = makeTest (import ./nfs.nix { version = 3; });
|
nfs3 = makeTest (import ./nfs.nix { version = 3; });
|
||||||
#nfs4 = makeTest (import ./nfs.nix { version = 4; });
|
#nfs4 = makeTest (import ./nfs.nix { version = 4; });
|
||||||
openssh = makeTest (import ./openssh.nix);
|
openssh = makeTest (import ./openssh.nix);
|
||||||
partition = makeTest (import ./partition.nix);
|
#partition = makeTest (import ./partition.nix);
|
||||||
printing = makeTest (import ./printing.nix);
|
printing = makeTest (import ./printing.nix);
|
||||||
proxy = makeTest (import ./proxy.nix);
|
proxy = makeTest (import ./proxy.nix);
|
||||||
quake3 = makeTest (import ./quake3.nix);
|
quake3 = makeTest (import ./quake3.nix);
|
||||||
|
31
nixos/tests/munin.nix
Normal file
31
nixos/tests/munin.nix
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
# This test runs basic munin setup with node and cron job running on the same
|
||||||
|
# machine.
|
||||||
|
|
||||||
|
{
|
||||||
|
nodes = {
|
||||||
|
one =
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
{
|
||||||
|
services = {
|
||||||
|
munin-node.enable = true;
|
||||||
|
munin-cron = {
|
||||||
|
enable = true;
|
||||||
|
hosts = ''
|
||||||
|
[${config.networking.hostName}]
|
||||||
|
address localhost
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
testScript = ''
|
||||||
|
startAll;
|
||||||
|
|
||||||
|
$one->waitForUnit("munin-node.service");
|
||||||
|
$one->waitForFile("/var/lib/munin/one/one-uptime-uptime-g.rrd");
|
||||||
|
$one->waitForFile("/var/www/munin/one/index.html");
|
||||||
|
'';
|
||||||
|
}
|
@ -1,28 +1,28 @@
|
|||||||
{ stdenv, fetchurl, pkgconfig, glib, gtk3, libmowgli, libmcs
|
{ stdenv, fetchurl, pkgconfig, glib, gtk3, libmowgli, libmcs
|
||||||
, gettext, dbus_glib, libxml2, libmad, xlibs, alsaLib, libogg
|
, gettext, dbus_glib, libxml2, libmad, xlibs, alsaLib, libogg
|
||||||
, libvorbis, libcdio, libcddb, flac, ffmpeg
|
, libvorbis, libcdio, libcddb, flac, ffmpeg, makeWrapper
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
version = "3.3.4";
|
version = "3.4.1";
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "audacious-${version}";
|
name = "audacious-${version}";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "http://distfiles.audacious-media-player.org/audacious-${version}.tar.bz2";
|
url = "http://distfiles.audacious-media-player.org/audacious-${version}.tar.bz2";
|
||||||
sha256 = "19zw4yj8g4fvxkv0ql8v8vgxzldxl1fzig239zzv88mpnvwxn737";
|
sha256 = "0wf99b0nrk90fyak4gpwi076qnsrmv1j8958cvi57rxig21lvvap";
|
||||||
};
|
};
|
||||||
|
|
||||||
pluginsSrc = fetchurl {
|
pluginsSrc = fetchurl {
|
||||||
url = "http://distfiles.audacious-media-player.org/audacious-plugins-${version}.tar.bz2";
|
url = "http://distfiles.audacious-media-player.org/audacious-plugins-${version}.tar.bz2";
|
||||||
sha256 = "1l5g0zq73qp1hlrf4xsaj0n3hg0asrp7169531jgpncjn15dhvdn";
|
sha256 = "02ivrxs6109nmmz9pkbf9dkm36s2lyp9vfv59sm0acxxd4db71md";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs =
|
buildInputs =
|
||||||
[ gettext pkgconfig glib gtk3 libmowgli libmcs libxml2 dbus_glib
|
[ gettext pkgconfig glib gtk3 libmowgli libmcs libxml2 dbus_glib
|
||||||
libmad xlibs.libXcomposite libogg libvorbis flac alsaLib libcdio
|
libmad xlibs.libXcomposite libogg libvorbis flac alsaLib libcdio
|
||||||
libcddb ffmpeg
|
libcddb ffmpeg makeWrapper
|
||||||
];
|
];
|
||||||
|
|
||||||
# Here we build bouth audacious and audacious-plugins in one
|
# Here we build bouth audacious and audacious-plugins in one
|
||||||
@ -44,7 +44,16 @@ stdenv.mkDerivation {
|
|||||||
src=$pluginsSrc
|
src=$pluginsSrc
|
||||||
genericBuild
|
genericBuild
|
||||||
)
|
)
|
||||||
|
|
||||||
|
(
|
||||||
|
source $stdenv/setup
|
||||||
|
# gsettings schemas for file dialogues
|
||||||
|
for file in "$out"/bin/*; do
|
||||||
|
wrapProgram "$file" --prefix XDG_DATA_DIRS : "$XDG_ADD"
|
||||||
|
done
|
||||||
|
)
|
||||||
'';
|
'';
|
||||||
|
XDG_ADD = gtk3 + "/share";
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
|
@ -1,9 +1,11 @@
|
|||||||
{ fetchurl, stdenv, dpkg, xlibs, qt4, alsaLib, makeWrapper, openssl, freetype, glib, pango, cairo, atk, gdk_pixbuf, gtk, cups, nspr, nss, libpng, GConf, libgcrypt, chromium, sqlite, gst_plugins_base, gstreamer }:
|
{ fetchurl, stdenv, dpkg, xlibs, qt4, alsaLib, makeWrapper, openssl, freetype
|
||||||
|
, glib, pango, cairo, atk, gdk_pixbuf, gtk, cups, nspr, nss, libpng, GConf
|
||||||
|
, libgcrypt, chromium, sqlite, gst_plugins_base, gstreamer, udev }:
|
||||||
|
|
||||||
assert stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux";
|
assert stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux";
|
||||||
|
|
||||||
let
|
let
|
||||||
version = "0.9.1.55";
|
version = "0.9.4.183";
|
||||||
qt4webkit =
|
qt4webkit =
|
||||||
if stdenv.system == "i686-linux" then
|
if stdenv.system == "i686-linux" then
|
||||||
fetchurl {
|
fetchurl {
|
||||||
@ -25,13 +27,13 @@ stdenv.mkDerivation {
|
|||||||
src =
|
src =
|
||||||
if stdenv.system == "i686-linux" then
|
if stdenv.system == "i686-linux" then
|
||||||
fetchurl {
|
fetchurl {
|
||||||
url = "http://repository.spotify.com/pool/non-free/s/spotify/spotify-client_${version}.gbdd3b79.203-1_i386.deb";
|
url = "http://repository.spotify.com/pool/non-free/s/spotify/spotify-client_${version}.g644e24e.428-1_i386.deb";
|
||||||
sha256 = "1sls4gb85700126bbk4sz73ipa2rjcinmpnsi78q0bsdj365y2wc";
|
sha256 = "1wl6v5x8vm74h5lxp8fhvmih8l122aadsf1qxvpk0k3y6mbx0ifa";
|
||||||
}
|
}
|
||||||
else if stdenv.system == "x86_64-linux" then
|
else if stdenv.system == "x86_64-linux" then
|
||||||
fetchurl {
|
fetchurl {
|
||||||
url = "http://repository.spotify.com/pool/non-free/s/spotify/spotify-client_${version}.gbdd3b79.203-1_amd64.deb";
|
url = "http://repository.spotify.com/pool/non-free/s/spotify/spotify-client_${version}.g644e24e.428-1_amd64.deb";
|
||||||
sha256 = "10pzj3p8bjbxh9nnm4qc5s1hn9nh7hgh3vbwm0xblj9rn71wl03y";
|
sha256 = "1yniln6iswrrrny01qr2w5zcvam0vnrvy9mwbnk9i14i2ch0f3fx";
|
||||||
}
|
}
|
||||||
else throw "Spotify not supported on this platform.";
|
else throw "Spotify not supported on this platform.";
|
||||||
|
|
||||||
@ -57,12 +59,15 @@ stdenv.mkDerivation {
|
|||||||
ln -s ${nspr}/lib/libnspr4.so $out/lib/libnspr4.so.0d
|
ln -s ${nspr}/lib/libnspr4.so $out/lib/libnspr4.so.0d
|
||||||
ln -s ${nspr}/lib/libplc4.so $out/lib/libplc4.so.0d
|
ln -s ${nspr}/lib/libplc4.so $out/lib/libplc4.so.0d
|
||||||
|
|
||||||
|
# Work around Spotify trying to open libudev.so.0 (which we don't have)
|
||||||
|
ln -s ${udev}/lib/libudev.so.1 $out/lib/libudev.so.0
|
||||||
|
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
|
|
||||||
ln -s $out/spotify-client/spotify $out/bin/spotify
|
ln -s $out/spotify-client/spotify $out/bin/spotify
|
||||||
patchelf \
|
patchelf \
|
||||||
--interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
|
--interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
|
||||||
--set-rpath $out/lib:$out/spotify-client:${stdenv.lib.makeLibraryPath [ xlibs.libXScrnSaver xlibs.libX11 qt4 alsaLib stdenv.gcc.gcc freetype glib pango cairo atk gdk_pixbuf gtk GConf cups sqlite]}:${stdenv.gcc.gcc}/lib64 \
|
--set-rpath $out/spotify-client/Data:$out/lib:$out/spotify-client:${stdenv.lib.makeLibraryPath [ xlibs.libXScrnSaver xlibs.libX11 qt4 alsaLib stdenv.gcc.gcc freetype glib pango cairo atk gdk_pixbuf gtk GConf cups sqlite]}:${stdenv.gcc.gcc}/lib64 \
|
||||||
$out/spotify-client/spotify
|
$out/spotify-client/spotify
|
||||||
|
|
||||||
dpkg-deb -x ${qt4webkit} ./
|
dpkg-deb -x ${qt4webkit} ./
|
||||||
@ -74,23 +79,20 @@ stdenv.mkDerivation {
|
|||||||
gcc -shared ${./preload.c} -o $preload -ldl -DOUT=\"$out\" -fPIC
|
gcc -shared ${./preload.c} -o $preload -ldl -DOUT=\"$out\" -fPIC
|
||||||
|
|
||||||
wrapProgram $out/bin/spotify --set LD_PRELOAD $preload --prefix LD_LIBRARY_PATH : "${stdenv.lib.makeLibraryPath [ GConf libpng cups libgcrypt sqlite gst_plugins_base gstreamer]}:$out/lib"
|
wrapProgram $out/bin/spotify --set LD_PRELOAD $preload --prefix LD_LIBRARY_PATH : "${stdenv.lib.makeLibraryPath [ GConf libpng cups libgcrypt sqlite gst_plugins_base gstreamer]}:$out/lib"
|
||||||
|
|
||||||
|
# Desktop file
|
||||||
|
mkdir -p "$out/share/applications/"
|
||||||
|
cp "$out/spotify-client/spotify.desktop" "$out/share/applications/"
|
||||||
|
sed -i "s|Icon=.*|Icon=$out/spotify-client/Icons/spotify-linux-512.png|" "$out/share/applications/spotify.desktop"
|
||||||
''; # */
|
''; # */
|
||||||
|
|
||||||
dontStrip = true;
|
dontStrip = true;
|
||||||
dontPatchELF = true;
|
dontPatchELF = true;
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
homepage = https://www.spotify.com/download/previews/;
|
homepage = https://www.spotify.com/;
|
||||||
description = "Spotify for Linux allows you to play music from the Spotify music service";
|
description = "Spotify for Linux allows you to play music from the Spotify music service";
|
||||||
license = "unfree";
|
license = "unfree";
|
||||||
maintainers = [ stdenv.lib.maintainers.eelco ];
|
maintainers = [ stdenv.lib.maintainers.eelco ];
|
||||||
|
|
||||||
longDescription =
|
|
||||||
''
|
|
||||||
Spotify is a digital music streaming service. This package
|
|
||||||
provides the Spotify client for Linux. At present, it does not
|
|
||||||
work with free Spotify accounts; it requires a Premium or
|
|
||||||
Unlimited account.
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -46,11 +46,12 @@ stdenv.mkDerivation rec {
|
|||||||
(append (reverse (mapcar (lambda (x) (concat x "/share/emacs/site-lisp/"))
|
(append (reverse (mapcar (lambda (x) (concat x "/share/emacs/site-lisp/"))
|
||||||
(split-string (getenv "NIX_PROFILES"))))
|
(split-string (getenv "NIX_PROFILES"))))
|
||||||
load-path)))
|
load-path)))
|
||||||
|
|
||||||
|
;; make tramp work for NixOS machines
|
||||||
|
(eval-after-load 'tramp '(add-to-list 'tramp-remote-path "/run/current-system/sw/bin"))
|
||||||
EOF
|
EOF
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
doCheck = true;
|
doCheck = true;
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
|
@ -20,10 +20,10 @@ index 3b61fc0..2206646 100644
|
|||||||
|
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
# add /analyze in order to unconver potential bugs in the source code
|
# add /analyze in order to unconver potential bugs in the source code
|
||||||
diff --git a/src/lib/synergy/CCryptoMode.h b/src/lib/synergy/CCryptoMode.h
|
diff --git a/src/lib/io/CCryptoMode.h b/src/lib/io/CCryptoMode.h
|
||||||
index 9b7e8ad..0d659ac 100644
|
index 9b7e8ad..0d659ac 100644
|
||||||
--- a/src/lib/synergy/CCryptoMode.h
|
--- a/src/lib/io/CCryptoMode.h
|
||||||
+++ b/src/lib/synergy/CCryptoMode.h
|
+++ b/src/lib/io/CCryptoMode.h
|
||||||
@@ -17,9 +17,9 @@
|
@@ -17,9 +17,9 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
@ -37,10 +37,10 @@ index 9b7e8ad..0d659ac 100644
|
|||||||
#include "ECryptoMode.h"
|
#include "ECryptoMode.h"
|
||||||
#include "CString.h"
|
#include "CString.h"
|
||||||
|
|
||||||
diff --git a/src/lib/synergy/CCryptoStream.h b/src/lib/synergy/CCryptoStream.h
|
diff --git a/src/lib/io/CCryptoStream.h b/src/lib/io/CCryptoStream.h
|
||||||
index 104b1f6..09c4dc4 100644
|
index 104b1f6..09c4dc4 100644
|
||||||
--- a/src/lib/synergy/CCryptoStream.h
|
--- a/src/lib/io/CCryptoStream.h
|
||||||
+++ b/src/lib/synergy/CCryptoStream.h
|
+++ b/src/lib/io/CCryptoStream.h
|
||||||
@@ -20,8 +20,8 @@
|
@@ -20,8 +20,8 @@
|
||||||
#include "BasicTypes.h"
|
#include "BasicTypes.h"
|
||||||
#include "CStreamFilter.h"
|
#include "CStreamFilter.h"
|
||||||
|
@ -7,11 +7,11 @@ assert !stdenv.isLinux -> unzip != null;
|
|||||||
with stdenv.lib;
|
with stdenv.lib;
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "synergy-1.4.12";
|
name = "synergy-1.4.15";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "http://synergy.googlecode.com/files/${name}-Source.tar.gz";
|
url = "http://synergy.googlecode.com/files/${name}-Source.tar.gz";
|
||||||
sha256 = "0j884skwqy8r8ckj9a4rlwsbjwb1yrj9wqma1nwhr2inff6hrdim";
|
sha256 = "0l1mxxky9hacyva0npzkgkwg4wkmihzq3abdrds0w5f6is44adv4";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = optional stdenv.isLinux ./cryptopp.patch;
|
patches = optional stdenv.isLinux ./cryptopp.patch;
|
||||||
|
39
pkgs/applications/misc/urlview/default.nix
Normal file
39
pkgs/applications/misc/urlview/default.nix
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
{ stdenv, fetchurl, ncurses, automake111x, autoreconfHook }:
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
version = "0.9";
|
||||||
|
patchLevel = "19";
|
||||||
|
|
||||||
|
name = "urlview-${version}-${patchLevel}";
|
||||||
|
|
||||||
|
urlBase = "mirror://debian/pool/main/u/urlview/";
|
||||||
|
|
||||||
|
src = fetchurl {
|
||||||
|
url = urlBase + "urlview_${version}.orig.tar.gz";
|
||||||
|
sha256 = "746ff540ccf601645f500ee7743f443caf987d6380e61e5249fc15f7a455ed42";
|
||||||
|
};
|
||||||
|
|
||||||
|
buildInputs = [ ncurses automake111x autoreconfHook ];
|
||||||
|
|
||||||
|
preAutoreconf = ''
|
||||||
|
touch NEWS
|
||||||
|
'';
|
||||||
|
|
||||||
|
preConfigure = ''
|
||||||
|
mkdir -p $out/share/man/man1
|
||||||
|
'';
|
||||||
|
|
||||||
|
debianPatches = fetchurl {
|
||||||
|
url = urlBase + "urlview_${version}-${patchLevel}.diff.gz";
|
||||||
|
sha256 = "056883c17756f849fb9235596d274fbc5bc0d944fcc072bdbb13d1e828301585";
|
||||||
|
};
|
||||||
|
|
||||||
|
patches = debianPatches;
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "Extract URLs from text";
|
||||||
|
homepage = http://packages.qa.debian.org/u/urlview.html;
|
||||||
|
licencse = stdenv.lib.licenses.gpl2;
|
||||||
|
platforms = stdenv.lib.platforms.linux;
|
||||||
|
};
|
||||||
|
}
|
@ -18,26 +18,20 @@ stdenv.mkDerivation {
|
|||||||
};
|
};
|
||||||
|
|
||||||
buildInputs =
|
buildInputs =
|
||||||
(if enableGUI then [x11 motif] else []) ++
|
stdenv.lib.optionals enableGUI [x11 motif] ++
|
||||||
(if useT1Lib then [t1lib] else []);
|
stdenv.lib.optional useT1Lib t1lib ++
|
||||||
|
stdenv.lib.optional enablePDFtoPPM freetype;
|
||||||
|
|
||||||
# Debian uses '-fpermissive' to bypass some errors on char* constantness.
|
# Debian uses '-fpermissive' to bypass some errors on char* constantness.
|
||||||
CXXFLAGS = "-O2 -fpermissive";
|
CXXFLAGS = "-O2 -fpermissive";
|
||||||
|
|
||||||
configureFlags =
|
configureFlags = "--enable-a4-paper";
|
||||||
"--infodir=$out/share/info --mandir=$out/share/man --enable-a4-paper"
|
|
||||||
+ (if enablePDFtoPPM then
|
|
||||||
" --with-freetype2-library=${freetype}/lib"
|
|
||||||
+ " --with-freetype2-includes=${freetype}/include/freetype2"
|
|
||||||
else "");
|
|
||||||
|
|
||||||
postInstall = "
|
postInstall = stdenv.lib.optionalString (base14Fonts != null) ''
|
||||||
if test -n \"${base14Fonts}\"; then
|
substituteInPlace $out/etc/xpdfrc \
|
||||||
substituteInPlace $out/etc/xpdfrc \\
|
--replace /usr/local/share/ghostscript/fonts ${base14Fonts} \
|
||||||
--replace /usr/local/share/ghostscript/fonts ${base14Fonts} \\
|
--replace '#fontFile' fontFile
|
||||||
--replace '#fontFile' fontFile
|
'';
|
||||||
fi
|
|
||||||
";
|
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
homepage = "http://www.foolabs.com/xpdf/";
|
homepage = "http://www.foolabs.com/xpdf/";
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
# This file is autogenerated from update.sh in the same directory.
|
# This file is autogenerated from update.sh in the same directory.
|
||||||
{
|
{
|
||||||
dev = {
|
dev = {
|
||||||
version = "31.0.1650.4";
|
version = "32.0.1671.3";
|
||||||
url = "http://commondatastorage.googleapis.com/chromium-browser-official/chromium-31.0.1650.4.tar.xz";
|
url = "http://commondatastorage.googleapis.com/chromium-browser-official/chromium-32.0.1671.3.tar.xz";
|
||||||
sha256 = "1i61izfn06ldxkgdrisdibbn5hrghyjslf81yszpw69k0z87k3lm";
|
sha256 = "0bv86ig3mrd95zh78880bcyh9b8w46s7slxq3mwwmrmqp0s8qaq0";
|
||||||
};
|
};
|
||||||
beta = {
|
beta = {
|
||||||
version = "30.0.1599.66";
|
version = "31.0.1650.26";
|
||||||
url = "http://commondatastorage.googleapis.com/chromium-browser-official/chromium-30.0.1599.66.tar.xz";
|
url = "http://commondatastorage.googleapis.com/chromium-browser-official/chromium-31.0.1650.26.tar.xz";
|
||||||
sha256 = "092ps4y4s544lswrqqk8qij5n7ax4bsfl5vdj5cwfncvsqpjds4g";
|
sha256 = "14jvbjn7nsc4psi7n6rjsb5d930k4jawbgqlx3hkhmkz5nhbrplx";
|
||||||
};
|
};
|
||||||
stable = {
|
stable = {
|
||||||
version = "30.0.1599.66";
|
version = "30.0.1599.101";
|
||||||
url = "http://commondatastorage.googleapis.com/chromium-browser-official/chromium-30.0.1599.66.tar.xz";
|
url = "http://commondatastorage.googleapis.com/chromium-browser-official/chromium-30.0.1599.101.tar.xz";
|
||||||
sha256 = "092ps4y4s544lswrqqk8qij5n7ax4bsfl5vdj5cwfncvsqpjds4g";
|
sha256 = "0bd49k9qpycpp4z230pqwsi22565lzhyq59js34baawjqql6ynfr";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -6,8 +6,8 @@ stdenv.mkDerivation {
|
|||||||
|
|
||||||
src = fetchgit {
|
src = fetchgit {
|
||||||
url = "https://bitbucket.org/portix/dwb.git";
|
url = "https://bitbucket.org/portix/dwb.git";
|
||||||
rev = "4a4c3adb8fbc680a0a2b8c9d3d3a4105c07c2514";
|
rev = "84a8621787baded72e84afdd5cdda278cb81e007";
|
||||||
sha256 = "93e8f2c82609447d54a3c139c153cc66d37d3c6aa8922cd09717caa95fd8b1d5";
|
sha256 = "5a32f3c21ad59b43935a16108244f84d260fafaea9b93d41e8de9ba9089ee7b0";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ pkgconfig makeWrapper libsoup webkit gtk3 gnutls json_c m4 ];
|
buildInputs = [ pkgconfig makeWrapper libsoup webkit gtk3 gnutls json_c m4 ];
|
||||||
@ -21,6 +21,8 @@ stdenv.mkDerivation {
|
|||||||
wrapProgram "$out/bin/dwb" \
|
wrapProgram "$out/bin/dwb" \
|
||||||
--prefix GIO_EXTRA_MODULES : "${glib_networking}/lib/gio/modules" \
|
--prefix GIO_EXTRA_MODULES : "${glib_networking}/lib/gio/modules" \
|
||||||
--prefix XDG_DATA_DIRS : "${gsettings_desktop_schemas}/share:$out/share"
|
--prefix XDG_DATA_DIRS : "${gsettings_desktop_schemas}/share:$out/share"
|
||||||
|
wrapProgram "$out/bin/dwbem" \
|
||||||
|
--prefix GIO_EXTRA_MODULES : "${glib_networking}/lib/gio/modules"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
@ -0,0 +1,4 @@
|
|||||||
|
source $stdenv/setup
|
||||||
|
export PREFIX=$out
|
||||||
|
configureFlags="--plugin-path=$out/lib/mozilla/plugins"
|
||||||
|
genericBuild
|
@ -0,0 +1,31 @@
|
|||||||
|
{ stdenv, fetchurl, pkgconfig, openssl, glib, libX11, gtk3, gettext, intltool }:
|
||||||
|
|
||||||
|
let version = "1.0.2"; in
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
name = "fribid-${version}";
|
||||||
|
builder = ./builder.sh;
|
||||||
|
|
||||||
|
src = fetchurl {
|
||||||
|
url = "https://fribid.se/releases/source/${name}.tar.bz2";
|
||||||
|
sha256 = "d7cd9adf04fedf50b266a5c14ddb427cbb263d3bc160ee0ade03aca9d5356e5c";
|
||||||
|
};
|
||||||
|
|
||||||
|
buildInputs = [ pkgconfig openssl libX11 gtk3 glib gettext intltool ];
|
||||||
|
patches = [
|
||||||
|
./translation-xgettext-to-intltool.patch
|
||||||
|
./plugin-linkfix.patch
|
||||||
|
./emulated-version.patch
|
||||||
|
./ipc-lazytrace.patch
|
||||||
|
];
|
||||||
|
|
||||||
|
passthru.mozillaPlugin = "/lib/mozilla/plugins";
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "A browser plugin to manage Swedish BankID:s";
|
||||||
|
homepage = http://fribid.se;
|
||||||
|
licenses = [ "GPLv2" "MPLv1" ];
|
||||||
|
maintainers = [ stdenv.lib.maintainers.edwtjo ];
|
||||||
|
platforms = with stdenv.lib.platforms; linux;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@
|
|||||||
|
--- a/common/defines.h 2012-11-14 18:02:43.000000000 +0100
|
||||||
|
+++ b/common/defines.h 2013-09-20 19:17:45.669290630 +0200
|
||||||
|
@@ -39,7 +39,7 @@
|
||||||
|
#define RELEASE_TIME 1352912534
|
||||||
|
#define IPCVERSION "10"
|
||||||
|
|
||||||
|
-#define EMULATED_VERSION "4.15.0.14"
|
||||||
|
+#define EMULATED_VERSION "4.17.0.11" // Was 4.15.0.14
|
||||||
|
#define DNSVERSION "2"
|
||||||
|
#define STATUSDOMAIN ".status.fribid.se"
|
||||||
|
|
||||||
|
|
@ -0,0 +1,10 @@
|
|||||||
|
--- a/plugin/ipc.c 2012-11-14 18:02:43.000000000 +0100
|
||||||
|
+++ b/plugin/ipc.c 2013-09-21 08:55:39.960265058 +0200
|
||||||
|
@@ -74,6 +74,7 @@
|
||||||
|
//close(pipeOut[PIPE_READ_END]);
|
||||||
|
|
||||||
|
execvp(mainBinary, (char *const *)argv);
|
||||||
|
+ fprintf(stderr, "Wanted signing executable\t<%s>\n", mainBinary);
|
||||||
|
perror(BINNAME ": Failed to execute main binary");
|
||||||
|
exit(1);
|
||||||
|
} else {
|
@ -0,0 +1,11 @@
|
|||||||
|
--- a/plugin/Makefile 2013-09-18 13:55:11.091652553 +0200
|
||||||
|
+++ b/plugin/Makefile 2013-09-18 13:58:27.513618750 +0200
|
||||||
|
@@ -60,7 +60,7 @@
|
||||||
|
for path in $(NPAPI_PLUGIN_PATHS); do \
|
||||||
|
(../configure --internal--remove-link $(DESTDIR)$$path/libfribidplugin.so $(NPAPI_PLUGIN_LIB) || exit 1) && \
|
||||||
|
install -d $(DESTDIR)$$path && \
|
||||||
|
- ln -sf $(NPAPI_PLUGIN_LIB) $(DESTDIR)$$path/libfribidplugin.so; \
|
||||||
|
+ ln -sf $(DESTDIR)$(NPAPI_PLUGIN_LIB) $(DESTDIR)$$path/libfribidplugin.so; \
|
||||||
|
done
|
||||||
|
|
||||||
|
uninstall:
|
@ -0,0 +1,16 @@
|
|||||||
|
--- a/translations/Makefile 2013-09-18 07:25:16.503800613 +0200
|
||||||
|
+++ b/translations/Makefile 2013-09-18 07:25:29.495869405 +0200
|
||||||
|
@@ -38,7 +38,7 @@
|
||||||
|
all: template.pot $(MOFILES)
|
||||||
|
|
||||||
|
template.pot: $(POTFILES) $(DEFINES)
|
||||||
|
- xgettext -k_ -ktranslatable -d $(DOMAIN) --package-name=$(PACKAGENAME) --package-version=$(PACKAGEVERSION) --copyright-holder='YOUR NAME' -o $@ $(POTFILES)
|
||||||
|
+ intltool-update --gettext-package=$(PACKAGENAME) -o $@ sv
|
||||||
|
|
||||||
|
.po.mo:
|
||||||
|
msgfmt $< -o $@
|
||||||
|
--- a/translations/POTFILES.in 2013-09-16 20:28:56.766106014 +0200
|
||||||
|
+++ b/translations/POTFILES.in 2013-09-18 13:15:05.252689648 +0200
|
||||||
|
@@ -0,0 +1,2 @@
|
||||||
|
+client/gtk.c
|
||||||
|
+client/gtk/sign.glade
|
@ -2,7 +2,7 @@
|
|||||||
, libSM, libX11, libXext, libXcomposite, libXcursor, libXdamage
|
, libSM, libX11, libXext, libXcomposite, libXcursor, libXdamage
|
||||||
, libXfixes, libXi, libXinerama, libXrandr, libXrender
|
, libXfixes, libXi, libXinerama, libXrandr, libXrender
|
||||||
, dbus, dbus_glib, fontconfig, gcc, patchelf
|
, dbus, dbus_glib, fontconfig, gcc, patchelf
|
||||||
, atk, glib, gdk_pixbuf, gtk, pango
|
, atk, glib, gdk_pixbuf, gtk, pango, zlib
|
||||||
}:
|
}:
|
||||||
|
|
||||||
# this package contains the daemon version of dropbox
|
# this package contains the daemon version of dropbox
|
||||||
@ -20,14 +20,14 @@ let
|
|||||||
arch = if stdenv.system == "x86_64-linux" then "x86_64"
|
arch = if stdenv.system == "x86_64-linux" then "x86_64"
|
||||||
else if stdenv.system == "i686-linux" then "x86"
|
else if stdenv.system == "i686-linux" then "x86"
|
||||||
else throw "Dropbox client for: ${stdenv.system} not supported!";
|
else throw "Dropbox client for: ${stdenv.system} not supported!";
|
||||||
|
|
||||||
interpreter = if stdenv.system == "x86_64-linux" then "ld-linux-x86-64.so.2"
|
interpreter = if stdenv.system == "x86_64-linux" then "ld-linux-x86-64.so.2"
|
||||||
else if stdenv.system == "i686-linux" then "ld-linux.so.2"
|
else if stdenv.system == "i686-linux" then "ld-linux.so.2"
|
||||||
else throw "Dropbox client for: ${stdenv.system} not supported!";
|
else throw "Dropbox client for: ${stdenv.system} not supported!";
|
||||||
|
|
||||||
version = "1.4.21";
|
version = "2.4.3";
|
||||||
sha256 = if stdenv.system == "x86_64-linux" then "94073842f4a81feee80bca590e1df73fc3cab47ba879407ceba2de48f30d84e2"
|
sha256 = if stdenv.system == "x86_64-linux" then "0g8iqgc18qbw8fvdjf0fhbal34rvwr5izrf5acfzqjg99dgih81r"
|
||||||
else if stdenv.system == "i686-linux" then "121v92m20l73xjmzng3vmcp4zsp9mlbcfia73f5py5y74kndb2ap"
|
else if stdenv.system == "i686-linux" then "1nhmk319whj6cil6wg9hrfln9bxin3fnf6sxb0zg2ycfpnnqi0la"
|
||||||
else throw "Dropbox client for: ${stdenv.system} not supported!";
|
else throw "Dropbox client for: ${stdenv.system} not supported!";
|
||||||
|
|
||||||
# relative location where the dropbox libraries are stored
|
# relative location where the dropbox libraries are stored
|
||||||
@ -40,7 +40,7 @@ let
|
|||||||
libSM libX11 libXext libXcomposite libXcursor libXdamage
|
libSM libX11 libXext libXcomposite libXcursor libXdamage
|
||||||
libXfixes libXi libXinerama libXrandr libXrender
|
libXfixes libXi libXinerama libXrandr libXrender
|
||||||
atk dbus dbus_glib glib fontconfig gcc gdk_pixbuf
|
atk dbus dbus_glib glib fontconfig gcc gdk_pixbuf
|
||||||
gtk pango
|
gtk pango zlib
|
||||||
];
|
];
|
||||||
|
|
||||||
desktopItem = makeDesktopItem {
|
desktopItem = makeDesktopItem {
|
||||||
|
@ -3,11 +3,11 @@ let
|
|||||||
s = # Generated upstream information
|
s = # Generated upstream information
|
||||||
rec {
|
rec {
|
||||||
baseName="ekrhyper";
|
baseName="ekrhyper";
|
||||||
version="1_4_08022013";
|
version="1_4_30072013";
|
||||||
name="${baseName}-${version}";
|
name="${baseName}-${version}";
|
||||||
hash="0vni5pq1p99428ii3g13chiqxcs8k1fm6jlvg1jqh4qdcs42w7yb";
|
hash="0ashsblm477r7dmq9f33wajkbr29rbyyc919mifdgrrdy6zlc663";
|
||||||
url="http://userpages.uni-koblenz.de/~bpelzer/ekrhyper/ekrh_1_4_08022013.tar.gz";
|
url="http://userpages.uni-koblenz.de/~bpelzer/ekrhyper/ekrh_1_4_30072013.tar.gz";
|
||||||
sha256="0vni5pq1p99428ii3g13chiqxcs8k1fm6jlvg1jqh4qdcs42w7yb";
|
sha256="0ashsblm477r7dmq9f33wajkbr29rbyyc919mifdgrrdy6zlc663";
|
||||||
};
|
};
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
ocaml perl
|
ocaml perl
|
||||||
|
@ -3,11 +3,11 @@ let
|
|||||||
s = # Generated upstream information
|
s = # Generated upstream information
|
||||||
rec {
|
rec {
|
||||||
baseName="eprover";
|
baseName="eprover";
|
||||||
version="1.7";
|
version="1.8";
|
||||||
name="${baseName}-${version}";
|
name="${baseName}-${version}";
|
||||||
hash="1prkgjpg8lajcylz9nj2hfjxl3l42cqbfvilg30z9b5br14l36rh";
|
hash="0bl4dr7k6simwdvdyxhnjkiz4nm5y0nr8bfhc34zk0360i9m6sk3";
|
||||||
url="http://www4.in.tum.de/~schulz/WORK/E_DOWNLOAD/V_1.7/E.tgz";
|
url="http://www4.in.tum.de/~schulz/WORK/E_DOWNLOAD/V_1.8/E.tgz";
|
||||||
sha256="1prkgjpg8lajcylz9nj2hfjxl3l42cqbfvilg30z9b5br14l36rh";
|
sha256="0bl4dr7k6simwdvdyxhnjkiz4nm5y0nr8bfhc34zk0360i9m6sk3";
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
{stdenv, fetchurl, zlib, openssl, tcl, readline, sqlite}:
|
{stdenv, fetchurl, zlib, openssl, tcl, readline, sqlite, withJson ? true}:
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "fossil-1.24";
|
name = "fossil-1.27";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = http://www.fossil-scm.org/download/fossil-src-20121022124804.tar.gz;
|
url = http://www.fossil-scm.org/download/fossil-src-20130911114349.tar.gz;
|
||||||
sha256 = "0gcvcrd368acxd79gh7p7caicgqd0f076n0i2if63mg3b8ivz9im";
|
sha256 = "0n40z8bx2311i11zjx2x15lw3q8vzjwvfqzikrjlqnpal4vzd72f";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ zlib openssl readline sqlite ];
|
buildInputs = [ zlib openssl readline sqlite ];
|
||||||
@ -14,6 +14,7 @@ stdenv.mkDerivation {
|
|||||||
doCheck = true;
|
doCheck = true;
|
||||||
|
|
||||||
checkTarget = "test";
|
checkTarget = "test";
|
||||||
|
configureFlags = if withJson then "--json" else "";
|
||||||
|
|
||||||
preBuild=''
|
preBuild=''
|
||||||
export USER=nonexistent-but-specified-user
|
export USER=nonexistent-but-specified-user
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
{ stdenv, fetchurl, pythonPackages, intltool, libvirt, libxml2Python, curl, python, makeWrapper, virtinst, pyGtkGlade, pythonDBus, gnome_python, gtkvnc}:
|
{ stdenv, fetchurl, pythonPackages, intltool, libvirt, libxml2Python, curl,
|
||||||
|
python, makeWrapper, virtinst, pyGtkGlade, pythonDBus, gnome_python, gtkvnc, vte}:
|
||||||
|
|
||||||
with stdenv.lib;
|
with stdenv.lib;
|
||||||
|
|
||||||
@ -18,7 +19,8 @@ stdenv.mkDerivation rec {
|
|||||||
distutils_extra simplejson readline glance cheetah lockfile httplib2
|
distutils_extra simplejson readline glance cheetah lockfile httplib2
|
||||||
# !!! should libvirt be a build-time dependency? Note that
|
# !!! should libvirt be a build-time dependency? Note that
|
||||||
# libxml2Python is a dependency of libvirt.py.
|
# libxml2Python is a dependency of libvirt.py.
|
||||||
libvirt libxml2Python urlgrabber virtinst pyGtkGlade pythonDBus gnome_python gtkvnc
|
libvirt libxml2Python urlgrabber virtinst pyGtkGlade pythonDBus gnome_python
|
||||||
|
gtkvnc vte
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs =
|
buildInputs =
|
||||||
|
@ -15,10 +15,11 @@ let
|
|||||||
s = # Generated upstream information
|
s = # Generated upstream information
|
||||||
rec {
|
rec {
|
||||||
baseName="compiz";
|
baseName="compiz";
|
||||||
version="0.9.9.0";
|
version="0.9.10.0";
|
||||||
name="compiz-${version}";
|
name="${baseName}-${version}";
|
||||||
url="https://launchpad.net/compiz/0.9.9/${version}/+download/${name}.tar.bz2";
|
hash="0kvjib0ns02cikpsjq5hlf746yjx2gkfh373pvrb25lzv3rs1qax";
|
||||||
sha256="0nxv9lv0zwzs82p2d5g38sbvzbqgfs837xdgwc26lh5wdv31d93s";
|
url="https://launchpad.net/compiz/0.9.10/0.9.10.0/+download/compiz-0.9.10.0.tar.bz2";
|
||||||
|
sha256="0kvjib0ns02cikpsjq5hlf746yjx2gkfh373pvrb25lzv3rs1qax";
|
||||||
};
|
};
|
||||||
buildInputs = [cmake pkgconfig
|
buildInputs = [cmake pkgconfig
|
||||||
libXrender renderproto gtk libwnck pango cairo
|
libXrender renderproto gtk libwnck pango cairo
|
||||||
|
@ -159,7 +159,7 @@ rec {
|
|||||||
|
|
||||||
# Debian.
|
# Debian.
|
||||||
debian = [
|
debian = [
|
||||||
ftp://ftp.au.debian.org/debian/
|
#ftp://ftp.au.debian.org/debian/
|
||||||
ftp://ftp.de.debian.org/debian/
|
ftp://ftp.de.debian.org/debian/
|
||||||
ftp://ftp.es.debian.org/debian/
|
ftp://ftp.es.debian.org/debian/
|
||||||
ftp://ftp.fr.debian.org/debian/
|
ftp://ftp.fr.debian.org/debian/
|
||||||
|
@ -9,6 +9,6 @@ relpath="${path#$server}"
|
|||||||
|
|
||||||
echo "URL: $url" >&2
|
echo "URL: $url" >&2
|
||||||
|
|
||||||
curl -L -k "$url" | sed -re 's/^/-/;s/[hH][rR][eE][fF]=("([^"]*)"|'\''([^'\'']*)'\''|([^"'\'' <>&]+)[ <>&])/\n+\2\3\4\n-/g' | \
|
curl -A 'text/html; text/xhtml; text/xml; */*' -L -k "$url" | sed -re 's/^/-/;s/[hH][rR][eE][fF]=("([^"]*)"|'\''([^'\'']*)'\''|([^"'\'' <>&]+)[ <>&])/\n+\2\3\4\n-/g' | \
|
||||||
sed -e '/^-/d; s/^[+]//; /^#/d;'"s/^\\//$protocol:\\/\\/$server\\//g" | \
|
sed -e '/^-/d; s/^[+]//; /^#/d;'"s/^\\//$protocol:\\/\\/$server\\//g" | \
|
||||||
sed -re 's`^[^:]*$`'"$protocol://$basepath/&\`"
|
sed -re 's`^[^:]*$`'"$protocol://$basepath/&\`"
|
||||||
|
@ -514,7 +514,8 @@ rec {
|
|||||||
|
|
||||||
echo "%_topdir $rpmout" >> $HOME/.rpmmacros
|
echo "%_topdir $rpmout" >> $HOME/.rpmmacros
|
||||||
|
|
||||||
rpmbuild -vv -ta "$srcName"
|
if [ `uname -m` = i686 ]; then extra="--target i686-linux"; fi
|
||||||
|
rpmbuild -vv $extra -ta "$srcName"
|
||||||
|
|
||||||
eval "$postBuild"
|
eval "$postBuild"
|
||||||
'';
|
'';
|
||||||
@ -937,6 +938,32 @@ rec {
|
|||||||
unifiedSystemDir = true;
|
unifiedSystemDir = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
fedora19i386 = {
|
||||||
|
name = "fedora-19-i386";
|
||||||
|
fullName = "Fedora 19 (i386)";
|
||||||
|
packagesList = fetchurl {
|
||||||
|
url = mirror://fedora/linux/releases/19/Everything/i386/os/repodata/b72220bcdefff8b38de1c9029a630db4813e073f88c4b080ca274d133e0460d1-primary.xml.gz;
|
||||||
|
sha256 = "b72220bcdefff8b38de1c9029a630db4813e073f88c4b080ca274d133e0460d1";
|
||||||
|
};
|
||||||
|
urlPrefix = mirror://fedora/linux/releases/19/Everything/i386/os;
|
||||||
|
archs = ["noarch" "i386" "i586" "i686"];
|
||||||
|
packages = commonFedoraPackages ++ [ "cronie" "util-linux" ];
|
||||||
|
unifiedSystemDir = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
fedora19x86_64 = {
|
||||||
|
name = "fedora-19-x86_64";
|
||||||
|
fullName = "Fedora 19 (x86_64)";
|
||||||
|
packagesList = fetchurl {
|
||||||
|
url = mirror://fedora/linux/releases/19/Everything/x86_64/os/repodata/d3f67da6461748f57a06459e6877fd07858828e256f58f032704186a65430fd3-primary.xml.gz;
|
||||||
|
sha256 = "d3f67da6461748f57a06459e6877fd07858828e256f58f032704186a65430fd3";
|
||||||
|
};
|
||||||
|
urlPrefix = mirror://fedora/linux/releases/19/Everything/x86_64/os;
|
||||||
|
archs = ["noarch" "x86_64"];
|
||||||
|
packages = commonFedoraPackages ++ [ "cronie" "util-linux" ];
|
||||||
|
unifiedSystemDir = true;
|
||||||
|
};
|
||||||
|
|
||||||
opensuse103i386 = {
|
opensuse103i386 = {
|
||||||
name = "opensuse-10.3-i586";
|
name = "opensuse-10.3-i586";
|
||||||
fullName = "openSUSE 10.3 (i586)";
|
fullName = "openSUSE 10.3 (i586)";
|
||||||
@ -1026,7 +1053,7 @@ rec {
|
|||||||
|
|
||||||
/* The set of supported Dpkg-based distributions. */
|
/* The set of supported Dpkg-based distributions. */
|
||||||
|
|
||||||
debDistros = {
|
debDistros = rec {
|
||||||
|
|
||||||
# Interestingly, the SHA-256 hashes provided by Ubuntu in
|
# Interestingly, the SHA-256 hashes provided by Ubuntu in
|
||||||
# http://nl.archive.ubuntu.com/ubuntu/dists/{gutsy,hardy}/Release are
|
# http://nl.archive.ubuntu.com/ubuntu/dists/{gutsy,hardy}/Release are
|
||||||
@ -1335,6 +1362,40 @@ rec {
|
|||||||
packages = commonDebPackages ++ [ "diffutils" "libc-bin" ];
|
packages = commonDebPackages ++ [ "diffutils" "libc-bin" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
ubuntu1310i386 = {
|
||||||
|
name = "ubuntu-13.10-saucy-i386";
|
||||||
|
fullName = "Ubuntu 13.10 Saucy (i386)";
|
||||||
|
packagesLists =
|
||||||
|
[ (fetchurl {
|
||||||
|
url = mirror://ubuntu/dists/saucy/main/binary-i386/Packages.bz2;
|
||||||
|
sha256 = "9b35d44a737e6aa7e1cb5e2b52ba0ed8717c8820b3950c2e7ade07024db9c138";
|
||||||
|
})
|
||||||
|
(fetchurl {
|
||||||
|
url = mirror://ubuntu/dists/saucy/universe/binary-i386/Packages.bz2;
|
||||||
|
sha256 = "84ff81ef23bcece68bfc3dd4b0b1fd38e5b81ac90ad48b4e4210396b425da500";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
urlPrefix = mirror://ubuntu;
|
||||||
|
packages = commonDebPackages ++ [ "diffutils" "libc-bin" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
ubuntu1310x86_64 = {
|
||||||
|
name = "ubuntu-13.10-saucy-amd64";
|
||||||
|
fullName = "Ubuntu 13.10 Saucy (amd64)";
|
||||||
|
packagesList =
|
||||||
|
[ (fetchurl {
|
||||||
|
url = mirror://ubuntu/dists/saucy/main/binary-amd64/Packages.bz2;
|
||||||
|
sha256 = "d000968f9653d7c25928002b0850fe2da97607682f63a351eb2c89896a219a12";
|
||||||
|
})
|
||||||
|
(fetchurl {
|
||||||
|
url = mirror://ubuntu/dists/saucy/universe/binary-amd64/Packages.bz2;
|
||||||
|
sha256 = "06ec77f2f5d6ee70ffb805affe3a6b3e8d5b6463fbfe42ba6588295c7e1f65bc";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
urlPrefix = mirror://ubuntu;
|
||||||
|
packages = commonDebPackages ++ [ "diffutils" "libc-bin" ];
|
||||||
|
};
|
||||||
|
|
||||||
debian40i386 = {
|
debian40i386 = {
|
||||||
name = "debian-4.0r9-etch-i386";
|
name = "debian-4.0r9-etch-i386";
|
||||||
fullName = "Debian 4.0r9 Etch (i386)";
|
fullName = "Debian 4.0r9 Etch (i386)";
|
||||||
@ -1380,44 +1441,48 @@ rec {
|
|||||||
};
|
};
|
||||||
|
|
||||||
debian60i386 = {
|
debian60i386 = {
|
||||||
name = "debian-6.0.7-squeeze-i386";
|
name = "debian-6.0.8-squeeze-i386";
|
||||||
fullName = "Debian 6.0.7 Squeeze (i386)";
|
fullName = "Debian 6.0.8 Squeeze (i386)";
|
||||||
packagesList = fetchurl {
|
packagesList = fetchurl {
|
||||||
url = mirror://debian/dists/squeeze/main/binary-i386/Packages.bz2;
|
url = mirror://debian/dists/squeeze/main/binary-i386/Packages.bz2;
|
||||||
sha256 = "a770f26b5fce1a16460b68f135dfe97f4f4a9894b538ece0104a508c83ec65d5";
|
sha256 = "c850339aaf46a4ed4abc7c1789c29ea58c3a152aa173ee004578fda86b28391f";
|
||||||
};
|
};
|
||||||
urlPrefix = mirror://debian;
|
urlPrefix = mirror://debian;
|
||||||
packages = commonDebianPackages;
|
packages = commonDebianPackages;
|
||||||
};
|
};
|
||||||
|
|
||||||
debian60x86_64 = {
|
debian60x86_64 = {
|
||||||
name = "debian-6.0.7-squeeze-amd64";
|
name = "debian-6.0.8-squeeze-amd64";
|
||||||
fullName = "Debian 6.0.7 Squeeze (amd64)";
|
fullName = "Debian 6.0.8 Squeeze (amd64)";
|
||||||
packagesList = fetchurl {
|
packagesList = fetchurl {
|
||||||
url = mirror://debian/dists/squeeze/main/binary-amd64/Packages.bz2;
|
url = mirror://debian/dists/squeeze/main/binary-amd64/Packages.bz2;
|
||||||
sha256 = "b2bb561bde59ac67e07c70aa7c86a33f237436e6891796a93c6ed6ffb032080e";
|
sha256 = "1506ab7de3ad5a2c706183536d2ee88589d7cb922d9e0de36ac062d464082dda";
|
||||||
};
|
};
|
||||||
urlPrefix = mirror://debian;
|
urlPrefix = mirror://debian;
|
||||||
packages = commonDebianPackages;
|
packages = commonDebianPackages;
|
||||||
};
|
};
|
||||||
|
|
||||||
debian70i386 = {
|
# Backward compatibility.
|
||||||
name = "debian-7.1.0-wheezy-i386";
|
debian70i386 = debian7i386;
|
||||||
fullName = "Debian 7.1.0 Wheezy (i386)";
|
debian70x86_64 = debian7x86_64;
|
||||||
|
|
||||||
|
debian7i386 = {
|
||||||
|
name = "debian-7.2-wheezy-i386";
|
||||||
|
fullName = "Debian 7.2 Wheezy (i386)";
|
||||||
packagesList = fetchurl {
|
packagesList = fetchurl {
|
||||||
url = mirror://debian/dists/wheezy/main/binary-i386/Packages.bz2;
|
url = mirror://debian/dists/wheezy/main/binary-i386/Packages.bz2;
|
||||||
sha256 = "c2751c48805b41c3eddd31cfe92ffa46df13a7d6ce7896b8dc5ce4b2f7f329c5";
|
sha256 = "2e80242e323f233c40b3020b0f1a57d12df8a120ee82af88ff7032ba4688f97d";
|
||||||
};
|
};
|
||||||
urlPrefix = mirror://debian;
|
urlPrefix = mirror://debian;
|
||||||
packages = commonDebianPackages;
|
packages = commonDebianPackages;
|
||||||
};
|
};
|
||||||
|
|
||||||
debian70x86_64 = {
|
debian7x86_64 = {
|
||||||
name = "debian-7.1.0-wheezy-amd64";
|
name = "debian-7.2-wheezy-amd64";
|
||||||
fullName = "Debian 7.1.0 Wheezy (amd64)";
|
fullName = "Debian 7.2 Wheezy (amd64)";
|
||||||
packagesList = fetchurl {
|
packagesList = fetchurl {
|
||||||
url = mirror://debian/dists/wheezy/main/binary-amd64/Packages.bz2;
|
url = mirror://debian/dists/wheezy/main/binary-amd64/Packages.bz2;
|
||||||
sha256 = "9b15b4348cadbcf170c9e83d6fbcb64efac2b787ebdfef16ba21dd70dfca0001";
|
sha256 = "adfc4cd3d3b855c73c9e2e12163a33c193f98c9bad25765080fa6136378a6e3b";
|
||||||
};
|
};
|
||||||
urlPrefix = mirror://debian;
|
urlPrefix = mirror://debian;
|
||||||
packages = commonDebianPackages;
|
packages = commonDebianPackages;
|
||||||
@ -1515,6 +1580,7 @@ rec {
|
|||||||
"curl"
|
"curl"
|
||||||
"patch"
|
"patch"
|
||||||
"locales"
|
"locales"
|
||||||
|
"coreutils"
|
||||||
# Needed by checkinstall:
|
# Needed by checkinstall:
|
||||||
"util-linux"
|
"util-linux"
|
||||||
"file"
|
"file"
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
{ stdenv, fetchurl }:
|
{ stdenv, fetchurl }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "man-pages-3.53";
|
name = "man-pages-3.54";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "mirror://kernel/linux/docs/man-pages/${name}.tar.xz";
|
url = "mirror://kernel/linux/docs/man-pages/${name}.tar.xz";
|
||||||
sha256 = "0kzkjfrw65f7bv6laz3jism4yqajmfh3vdq2jb5d6gyp4n14sxnl";
|
sha256 = "0rb75dl9hh4v2s95bcssy12j8qrbd2dmlzry68gphyxk5c7yipbl";
|
||||||
};
|
};
|
||||||
|
|
||||||
preBuild =
|
preBuild =
|
||||||
|
@ -14,10 +14,10 @@ stdenv.mkDerivation {
|
|||||||
sourceRoot = ".";
|
sourceRoot = ".";
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/texmf/fonts/opentype
|
mkdir -p $out/texmf-dist/fonts/opentype
|
||||||
mkdir -p $out/share/fonts/opentype
|
mkdir -p $out/share/fonts/opentype
|
||||||
|
|
||||||
cp *.{OTF,otf} $out/texmf/fonts/opentype/lmmath-regular.otf
|
cp *.{OTF,otf} $out/texmf-dist/fonts/opentype/lmmath-regular.otf
|
||||||
cp *.{OTF,otf} $out/share/fonts/opentype/lmmath-regular.otf
|
cp *.{OTF,otf} $out/share/fonts/opentype/lmmath-regular.otf
|
||||||
|
|
||||||
ln -s $out/texmf* $out/share/
|
ln -s $out/texmf* $out/share/
|
||||||
|
19
pkgs/development/compilers/ats2/default.nix
Normal file
19
pkgs/development/compilers/ats2/default.nix
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
{ stdenv, fetchurl, gmp }:
|
||||||
|
|
||||||
|
let version = "0.0.3"; in stdenv.mkDerivation {
|
||||||
|
name = "ats2-postiats-${version}";
|
||||||
|
|
||||||
|
src = fetchurl {
|
||||||
|
url = "mirror://sourceforge/ats2-lang/ATS2-Postiats-${version}.tgz";
|
||||||
|
sha256 = "0hq63zrmm92j5ffnsmylhhllm8kgjpjkaj4xvzz1zlshz39lijxp";
|
||||||
|
};
|
||||||
|
|
||||||
|
buildInputs = [ gmp ];
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "A statically typed programming language that unifies implementation with formal specification";
|
||||||
|
homepage = http://www.ats-lang.org/;
|
||||||
|
license = stdenv.lib.licenses.gpl3Plus;
|
||||||
|
maintainers = [ stdenv.lib.maintainers.shlevy ];
|
||||||
|
};
|
||||||
|
}
|
@ -1,17 +1,20 @@
|
|||||||
{ cabal, binary, blazeHtml, blazeMarkup, cmdargs, filepath, hjsmin
|
{ cabal, aeson, aesonPretty, binary, blazeHtml, blazeMarkup
|
||||||
, indents, mtl, pandoc, parsec, transformers, unionFind, uniplate
|
, cmdargs, filepath, HTF, indents, languageEcmascript, mtl, pandoc
|
||||||
|
, parsec, text, transformers, unionFind, uniplate
|
||||||
}:
|
}:
|
||||||
|
|
||||||
cabal.mkDerivation (self: {
|
cabal.mkDerivation (self: {
|
||||||
pname = "Elm";
|
pname = "Elm";
|
||||||
version = "0.9.0.2";
|
version = "0.10";
|
||||||
sha256 = "0yr395wsj0spi6h9d6lm5hvdryybpf8i1qpv4gz9dk0bwlyc8iwh";
|
sha256 = "0wwda9w9r3qw7b23bj4qnfj4vgl7zwwnslxmgz3rv0cmxn9klqx2";
|
||||||
isLibrary = true;
|
isLibrary = true;
|
||||||
isExecutable = true;
|
isExecutable = true;
|
||||||
buildDepends = [
|
buildDepends = [
|
||||||
binary blazeHtml blazeMarkup cmdargs filepath hjsmin indents mtl
|
aeson aesonPretty binary blazeHtml blazeMarkup cmdargs filepath
|
||||||
pandoc parsec transformers unionFind uniplate
|
indents languageEcmascript mtl pandoc parsec text transformers
|
||||||
|
unionFind uniplate
|
||||||
];
|
];
|
||||||
|
testDepends = [ HTF ];
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
meta = {
|
meta = {
|
||||||
homepage = "http://elm-lang.org";
|
homepage = "http://elm-lang.org";
|
||||||
|
63
pkgs/development/compilers/ocaml/4.01.0.nix
Normal file
63
pkgs/development/compilers/ocaml/4.01.0.nix
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
{ stdenv, fetchurl, ncurses, x11 }:
|
||||||
|
|
||||||
|
let
|
||||||
|
useX11 = !stdenv.isArm && !stdenv.isMips;
|
||||||
|
useNativeCompilers = !stdenv.isMips;
|
||||||
|
inherit (stdenv.lib) optionals optionalString;
|
||||||
|
in
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
|
||||||
|
name = "ocaml-4.01.0";
|
||||||
|
|
||||||
|
src = fetchurl {
|
||||||
|
url = "http://caml.inria.fr/pub/distrib/ocaml-4.01/${name}.tar.bz2";
|
||||||
|
sha256 = "b1ca708994180236917ae79e17606da5bd334ca6acd6873a550027e1c0ec874a";
|
||||||
|
};
|
||||||
|
|
||||||
|
prefixKey = "-prefix ";
|
||||||
|
configureFlags = ["-no-tk"] ++ optionals useX11 [ "-x11lib" x11 ];
|
||||||
|
buildFlags = "world" + optionalString useNativeCompilers " bootstrap world.opt";
|
||||||
|
buildInputs = [ncurses] ++ optionals useX11 [ x11 ];
|
||||||
|
installTargets = "install" + optionalString useNativeCompilers " installopt";
|
||||||
|
preConfigure = ''
|
||||||
|
CAT=$(type -tp cat)
|
||||||
|
sed -e "s@/bin/cat@$CAT@" -i config/auto-aux/sharpbang
|
||||||
|
'';
|
||||||
|
postBuild = ''
|
||||||
|
mkdir -p $out/include
|
||||||
|
ln -sv $out/lib/ocaml/caml $out/include/caml
|
||||||
|
'';
|
||||||
|
|
||||||
|
passthru = {
|
||||||
|
nativeCompilers = useNativeCompilers;
|
||||||
|
};
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
homepage = http://caml.inria.fr/ocaml;
|
||||||
|
licenses = [ "QPL" /* compiler */ "LGPLv2" /* library */ ];
|
||||||
|
description = "OCaml, the most popular variant of the Caml language";
|
||||||
|
|
||||||
|
longDescription =
|
||||||
|
''
|
||||||
|
OCaml is the most popular variant of the Caml language. From a
|
||||||
|
language standpoint, it extends the core Caml language with a
|
||||||
|
fully-fledged object-oriented layer, as well as a powerful module
|
||||||
|
system, all connected by a sound, polymorphic type system featuring
|
||||||
|
type inference.
|
||||||
|
|
||||||
|
The OCaml system is an industrial-strength implementation of this
|
||||||
|
language, featuring a high-performance native-code compiler (ocamlopt)
|
||||||
|
for 9 processor architectures (IA32, PowerPC, AMD64, Alpha, Sparc,
|
||||||
|
Mips, IA64, HPPA, StrongArm), as well as a bytecode compiler (ocamlc)
|
||||||
|
and an interactive read-eval-print loop (ocaml) for quick development
|
||||||
|
and portability. The OCaml distribution includes a comprehensive
|
||||||
|
standard library, a replay debugger (ocamldebug), lexer (ocamllex) and
|
||||||
|
parser (ocamlyacc) generators, a pre-processor pretty-printer (camlp4)
|
||||||
|
and a documentation generator (ocamldoc).
|
||||||
|
'';
|
||||||
|
|
||||||
|
platforms = stdenv.lib.platforms.linux ++ stdenv.lib.platforms.darwin;
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
66
pkgs/development/compilers/smlnj/default.nix
Normal file
66
pkgs/development/compilers/smlnj/default.nix
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
{ stdenv, fetchurl }:
|
||||||
|
let
|
||||||
|
version = "110.76";
|
||||||
|
baseurl = "http://smlnj.cs.uchicago.edu/dist/working/${version}";
|
||||||
|
|
||||||
|
sources = map fetchurl [
|
||||||
|
{ url = "${baseurl}/config.tgz"; sha256 = "0mx5gib1jq5hl3j6gvkkfh60x2hx146xiisclaz4jgy452ywikj1"; }
|
||||||
|
{ url = "${baseurl}/cm.tgz"; sha256 = "14y1pqqw5p5va3rvpk2jddx2gcm37z5hwp5zdm43z02afscq37jk"; }
|
||||||
|
{ url = "${baseurl}/compiler.tgz"; sha256 = "10gn7cwqzbnh4k3l6brb9hp59k9vz2m9fcaarv2fw1gilfw5a9rj"; }
|
||||||
|
{ url = "${baseurl}/runtime.tgz"; sha256 = "0zqajizayzrlrxm47q492mqgfxya7rwqrq4faafai8qfwga6q27n"; }
|
||||||
|
{ url = "${baseurl}/system.tgz"; sha256 = "0dys0f0cdgnivk1niam9g736c3mzrjf9r29051g0579an8yi8slg"; }
|
||||||
|
{ url = "${baseurl}/MLRISC.tgz"; sha256 = "00n1zk65cwf2kf669mn09lp0ya6bfap1czhyq0nfza409vm4v54x"; }
|
||||||
|
{ url = "${baseurl}/smlnj-lib.tgz"; sha256 = "1mx1vjxbpfgcq6fkmh2qirjfqzn3wcnjf4a9ijr7k2bwgnh99sc1"; }
|
||||||
|
{ url = "${baseurl}/ckit.tgz"; sha256 = "1fqdxs2cgzffj0i9rmzv1aljwnhx98hyvj3c2kivw3ligxp4wly4"; }
|
||||||
|
{ url = "${baseurl}/nlffi.tgz"; sha256 = "08dmvs95xmbas3hx7n0csxxl0d0bmhxg7gav1ay02gy9n8iw3g87"; }
|
||||||
|
{ url = "${baseurl}/cml.tgz"; sha256 = "1qc1hs2k2xmn03ldyz2zf0pzbryd1n4bwix226ch8z9pnfimglyb"; }
|
||||||
|
{ url = "${baseurl}/eXene.tgz"; sha256 = "01z69rgmshh694wkcwrzi72z5d5glpijj7mqxb17yz106xyzmgim"; }
|
||||||
|
{ url = "${baseurl}/ml-lpt.tgz"; sha256 = "13gw4197ivzvd6qcbg5pzclhv1f2jy2c433halh021d60qjv4w4r"; }
|
||||||
|
{ url = "${baseurl}/ml-lex.tgz"; sha256 = "0sqa533zca1l7p79qhkb7lspvhk4k2r3839745sci32fzwy1804x"; }
|
||||||
|
{ url = "${baseurl}/ml-yacc.tgz"; sha256 = "1kzi0dpybd9hkklk460mgbwfkixjhav225kkmwnk3jxby3zgflci"; }
|
||||||
|
{ url = "${baseurl}/ml-burg.tgz"; sha256 = "0kjrba8l0v6jn3g6gv9dvrklpvxx9x57b7czwnrrd33pi28sv7fm"; }
|
||||||
|
{ url = "${baseurl}/pgraph.tgz"; sha256 = "174n22m7zibgk68033qql86kyk6mxjni4j0kcadafs0g2xmh6i6z"; }
|
||||||
|
{ url = "${baseurl}/trace-debug-profile.tgz"; sha256 = "1pq4wwx5ad7zx1306ka06lqwnjv446zz6ndpq6s9ak6ha79f2s9p"; }
|
||||||
|
{ url = "${baseurl}/heap2asm.tgz"; sha256 = "0p91fzwkfr7hng7c026gy5ggl5l9isxpm007iq6ivpjrfjy547wc"; }
|
||||||
|
{ url = "${baseurl}/smlnj-c.tgz"; sha256 = "0vra4gi91w0cjsw3rm162hgz5xsqbr7yds44q7zhs27kccsirpqc"; }
|
||||||
|
{ url = "${baseurl}/boot.x86-unix.tgz"; sha256 = "0qcvdhlvpr02c1ssk4jz6175lb9pkdg7zrfscqz6f7crnsgmc5nx"; }
|
||||||
|
];
|
||||||
|
in stdenv.mkDerivation {
|
||||||
|
name = "smlnj-${version}";
|
||||||
|
|
||||||
|
inherit sources;
|
||||||
|
|
||||||
|
patchPhase = ''
|
||||||
|
sed -i '/PATH=/d' config/_arch-n-opsys base/runtime/config/gen-posix-names.sh
|
||||||
|
echo SRCARCHIVEURL="file:/$TMP" > config/srcarchiveurl
|
||||||
|
'';
|
||||||
|
|
||||||
|
unpackPhase = ''
|
||||||
|
for s in $sources; do
|
||||||
|
b=$(basename $s)
|
||||||
|
cp $s ''${b#*-}
|
||||||
|
done
|
||||||
|
unpackFile config.tgz
|
||||||
|
mkdir base
|
||||||
|
./config/unpack $TMP runtime
|
||||||
|
'';
|
||||||
|
|
||||||
|
buildPhase = ''
|
||||||
|
./config/install.sh
|
||||||
|
'';
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -pv $out
|
||||||
|
cp -rv bin lib $out
|
||||||
|
|
||||||
|
for i in $out/bin/*; do
|
||||||
|
sed -i "2iSMLNJ_HOME=$out/" $i
|
||||||
|
done
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "Standard ML of New Jersey, a compiler";
|
||||||
|
homepage = http://smlnj.org;
|
||||||
|
license = stdenv.lib.licenses.bsd3;
|
||||||
|
};
|
||||||
|
}
|
@ -77,7 +77,8 @@ let
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
in rec {
|
attrs = rec {
|
||||||
|
# If you change much fix indentation
|
||||||
|
|
||||||
# This package has been split because most applications only need dbus.lib
|
# This package has been split because most applications only need dbus.lib
|
||||||
# which serves as an interface to a *system-wide* daemon,
|
# which serves as an interface to a *system-wide* daemon,
|
||||||
@ -114,4 +115,5 @@ in rec {
|
|||||||
docs = dbus_drv "docs" "doc" {
|
docs = dbus_drv "docs" "doc" {
|
||||||
postInstall = ''rm -r "$out/lib"'';
|
postInstall = ''rm -r "$out/lib"'';
|
||||||
};
|
};
|
||||||
}
|
};
|
||||||
|
in attrs.libs // attrs
|
||||||
|
@ -8,6 +8,7 @@ stdenv.mkDerivation rec {
|
|||||||
sha256 = "11xpmsw7m5qn7y8fa2ihhqcislz1bdd83mp99didd5ac84756dlv";
|
sha256 = "11xpmsw7m5qn7y8fa2ihhqcislz1bdd83mp99didd5ac84756dlv";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
buildInputs = [ x11 libXmu libXi ];
|
buildInputs = [ x11 libXmu libXi ];
|
||||||
propagatedBuildInputs = [ mesa_glu ]; # GL/glew.h includes GL/glu.h
|
propagatedBuildInputs = [ mesa_glu ]; # GL/glew.h includes GL/glu.h
|
||||||
|
|
||||||
@ -15,8 +16,9 @@ stdenv.mkDerivation rec {
|
|||||||
sed -i 's|lib64|lib|' config/Makefile.linux
|
sed -i 's|lib64|lib|' config/Makefile.linux
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
buildPhase = "make all";
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
GLEW_DEST=$out make install
|
GLEW_DEST=$out make install.all
|
||||||
mkdir -pv $out/share/doc/glew
|
mkdir -pv $out/share/doc/glew
|
||||||
mkdir -p $out/lib/pkgconfig
|
mkdir -p $out/lib/pkgconfig
|
||||||
cp glew*.pc $out/lib/pkgconfig
|
cp glew*.pc $out/lib/pkgconfig
|
||||||
|
26
pkgs/development/libraries/haskell/HTF/default.nix
Normal file
26
pkgs/development/libraries/haskell/HTF/default.nix
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
{ cabal, aeson, cpphs, Diff, filepath, haskellSrcExts, HUnit
|
||||||
|
, liftedBase, monadControl, mtl, QuickCheck, random, regexCompat
|
||||||
|
, temporary, text, unorderedContainers, xmlgen
|
||||||
|
}:
|
||||||
|
|
||||||
|
cabal.mkDerivation (self: {
|
||||||
|
pname = "HTF";
|
||||||
|
version = "0.11.0.1";
|
||||||
|
sha256 = "0c4z76rsmdck60p7p2ypxx0d0r7k2vcb9viqp2yalyxzaaj7a9f5";
|
||||||
|
isLibrary = true;
|
||||||
|
isExecutable = true;
|
||||||
|
buildDepends = [
|
||||||
|
aeson cpphs Diff haskellSrcExts HUnit liftedBase monadControl mtl
|
||||||
|
QuickCheck random regexCompat text xmlgen
|
||||||
|
];
|
||||||
|
testDepends = [
|
||||||
|
aeson filepath mtl random regexCompat temporary text
|
||||||
|
unorderedContainers
|
||||||
|
];
|
||||||
|
meta = {
|
||||||
|
homepage = "https://github.com/skogsbaer/HTF/";
|
||||||
|
description = "The Haskell Test Framework";
|
||||||
|
license = "LGPL";
|
||||||
|
platforms = self.ghc.meta.platforms;
|
||||||
|
};
|
||||||
|
})
|
@ -2,11 +2,11 @@
|
|||||||
|
|
||||||
cabal.mkDerivation (self: {
|
cabal.mkDerivation (self: {
|
||||||
pname = "Hipmunk";
|
pname = "Hipmunk";
|
||||||
version = "5.2.0.11";
|
version = "5.2.0.12";
|
||||||
sha256 = "0pcbwlq0njgj6dzh8h94gml63wv52f6l9hdas378lm7v8gbizxl7";
|
sha256 = "0gybmwwij6gs3gsklcvck0nc1niyh6pvirnxgrcwclrz94ivpj42";
|
||||||
buildDepends = [ StateVar transformers ];
|
buildDepends = [ StateVar transformers ];
|
||||||
meta = {
|
meta = {
|
||||||
homepage = "http://patch-tag.com/r/felipe/hipmunk/home";
|
homepage = "https://github.com/meteficha/Hipmunk";
|
||||||
description = "A Haskell binding for Chipmunk";
|
description = "A Haskell binding for Chipmunk";
|
||||||
license = "unknown";
|
license = "unknown";
|
||||||
platforms = self.ghc.meta.platforms;
|
platforms = self.ghc.meta.platforms;
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
|
|
||||||
cabal.mkDerivation (self: {
|
cabal.mkDerivation (self: {
|
||||||
pname = "case-insensitive";
|
pname = "case-insensitive";
|
||||||
version = "1.1";
|
version = "1.1.0.1";
|
||||||
sha256 = "1likcqdlhbbk78s887n5g9a4jjxxyh46hj4wc7l7snf6f9ygd5lj";
|
sha256 = "1hwkdkpr88r3s7c8w1msw1pawz8cfi0lwj1z9dcsp0xs788yzapp";
|
||||||
buildDepends = [ deepseq hashable text ];
|
buildDepends = [ deepseq hashable text ];
|
||||||
testDepends = [ HUnit testFramework testFrameworkHunit text ];
|
testDepends = [ HUnit testFramework testFrameworkHunit text ];
|
||||||
meta = {
|
meta = {
|
@ -1,15 +1,10 @@
|
|||||||
{ cabal, deepseq, mtl, parallel, time, fetchurl }:
|
{ cabal, deepseq, mtl, parallel, time }:
|
||||||
|
|
||||||
cabal.mkDerivation (self: {
|
cabal.mkDerivation (self: {
|
||||||
pname = "data-pprint";
|
pname = "data-pprint";
|
||||||
version = "0.2.2";
|
version = "0.2.3";
|
||||||
sha256 = "0cr69qv2j8fmmlir8rzlafcxk1cg3lg1z0zrwkz0lb7idm25fy36";
|
sha256 = "1ygbhn399d4hlrdjmg7gxbr5akydb78p6qa80rv7m6j0fsqzbf6y";
|
||||||
buildDepends = [ deepseq mtl parallel time ];
|
buildDepends = [ deepseq mtl parallel time ];
|
||||||
patches = [ (fetchurl { url = "https://github.com/divipp/ActiveHs-misc/pull/3.patch";
|
|
||||||
sha256 = "0wxvc7cbv4qpjl5zxy41863qpzda2ma75pmnnqx29qyh3rxp7biw";
|
|
||||||
})
|
|
||||||
];
|
|
||||||
patchFlags = "-p2";
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "Prettyprint and compare Data values";
|
description = "Prettyprint and compare Data values";
|
||||||
license = self.stdenv.lib.licenses.bsd3;
|
license = self.stdenv.lib.licenses.bsd3;
|
||||||
|
@ -1,12 +1,10 @@
|
|||||||
{ cabal, lua, mtl }:
|
{ cabal, mtl }:
|
||||||
|
|
||||||
cabal.mkDerivation (self: {
|
cabal.mkDerivation (self: {
|
||||||
pname = "hslua";
|
pname = "hslua";
|
||||||
version = "0.3.7";
|
version = "0.3.7";
|
||||||
sha256 = "1q5s2b7x9idvdvp31yl86mmy476gfq6rg8f0r8faqxrm45jwgv2q";
|
sha256 = "1q5s2b7x9idvdvp31yl86mmy476gfq6rg8f0r8faqxrm45jwgv2q";
|
||||||
buildDepends = [ mtl ];
|
buildDepends = [ mtl ];
|
||||||
pkgconfigDepends = [ lua ];
|
|
||||||
configureFlags = "-fsystem-lua";
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "A Lua language interpreter embedding in Haskell";
|
description = "A Lua language interpreter embedding in Haskell";
|
||||||
license = self.stdenv.lib.licenses.bsd3;
|
license = self.stdenv.lib.licenses.bsd3;
|
||||||
|
@ -0,0 +1,23 @@
|
|||||||
|
{ cabal, dataDefaultClass, Diff, filepath, HUnit, mtl, parsec
|
||||||
|
, QuickCheck, testFramework, testFrameworkHunit
|
||||||
|
, testFrameworkQuickcheck2, uniplate
|
||||||
|
}:
|
||||||
|
|
||||||
|
cabal.mkDerivation (self: {
|
||||||
|
pname = "language-ecmascript";
|
||||||
|
version = "0.15.2";
|
||||||
|
sha256 = "1iszs9f2jryddcz36a6anfyfxpwjhzn49xjqvnd5m6rjdq6y403w";
|
||||||
|
buildDepends = [
|
||||||
|
dataDefaultClass Diff mtl parsec QuickCheck uniplate
|
||||||
|
];
|
||||||
|
testDepends = [
|
||||||
|
dataDefaultClass Diff filepath HUnit mtl parsec QuickCheck
|
||||||
|
testFramework testFrameworkHunit testFrameworkQuickcheck2
|
||||||
|
];
|
||||||
|
meta = {
|
||||||
|
homepage = "http://github.com/jswebtools/language-ecmascript";
|
||||||
|
description = "JavaScript parser and pretty-printer library";
|
||||||
|
license = self.stdenv.lib.licenses.bsd3;
|
||||||
|
platforms = self.ghc.meta.platforms;
|
||||||
|
};
|
||||||
|
})
|
@ -1,19 +1,19 @@
|
|||||||
{ cabal, distributive, doctest, filepath, hashable, HUnit, lens
|
{ cabal, binary, distributive, doctest, filepath, hashable, HUnit
|
||||||
, reflection, semigroupoids, semigroups, simpleReflect, tagged
|
, lens, reflection, semigroupoids, semigroups, simpleReflect
|
||||||
, testFramework, testFrameworkHunit, transformers
|
, tagged, testFramework, testFrameworkHunit, transformers
|
||||||
, unorderedContainers, vector
|
, unorderedContainers, vector
|
||||||
}:
|
}:
|
||||||
|
|
||||||
cabal.mkDerivation (self: {
|
cabal.mkDerivation (self: {
|
||||||
pname = "linear";
|
pname = "linear";
|
||||||
version = "1.3";
|
version = "1.3.1";
|
||||||
sha256 = "0b5qjsbdkqv0h1236lv2nisjh9yz7gc5bd6xv6i8q5jryzs43pi9";
|
sha256 = "1s07qbdi12rc4djk4s0ds5sh79qcqfmgrbwfj1ygskq3ra88qqsa";
|
||||||
buildDepends = [
|
buildDepends = [
|
||||||
distributive hashable reflection semigroupoids semigroups tagged
|
binary distributive hashable reflection semigroupoids semigroups
|
||||||
transformers unorderedContainers vector
|
tagged transformers unorderedContainers vector
|
||||||
];
|
];
|
||||||
testDepends = [
|
testDepends = [
|
||||||
doctest filepath HUnit lens simpleReflect testFramework
|
binary doctest filepath HUnit lens simpleReflect testFramework
|
||||||
testFrameworkHunit
|
testFrameworkHunit
|
||||||
];
|
];
|
||||||
meta = {
|
meta = {
|
||||||
@ -21,5 +21,6 @@ cabal.mkDerivation (self: {
|
|||||||
description = "Linear Algebra";
|
description = "Linear Algebra";
|
||||||
license = self.stdenv.lib.licenses.bsd3;
|
license = self.stdenv.lib.licenses.bsd3;
|
||||||
platforms = self.ghc.meta.platforms;
|
platforms = self.ghc.meta.platforms;
|
||||||
|
maintainers = [ self.stdenv.lib.maintainers.ocharles ];
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
cabal.mkDerivation (self: {
|
cabal.mkDerivation (self: {
|
||||||
pname = "monad-control";
|
pname = "monad-control";
|
||||||
version = "0.3.2.1";
|
version = "0.3.2.2";
|
||||||
sha256 = "17wfdg3a2kkx1jwh7gfgbyx4351b420krsf8syb8l9xrl9gdz5a3";
|
sha256 = "1wwcx2k0nzmjqxf8d8wasnhvdx5q3nxkcyq7vbprkfy85sj7ivxc";
|
||||||
buildDepends = [
|
buildDepends = [
|
||||||
baseUnicodeSymbols transformers transformersBase
|
baseUnicodeSymbols transformers transformersBase
|
||||||
];
|
];
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
|
|
||||||
cabal.mkDerivation (self: {
|
cabal.mkDerivation (self: {
|
||||||
pname = "pandoc-citeproc";
|
pname = "pandoc-citeproc";
|
||||||
version = "0.1.2";
|
version = "0.1.2.1";
|
||||||
sha256 = "055msvrcqjkijkhzws48scpc4z90g0qjjsdcd0fhy309da6vax57";
|
sha256 = "13i4shpbd9swbsrpmkpb7jx79m12z12m9f3x167fs78509dak3iv";
|
||||||
isLibrary = true;
|
isLibrary = true;
|
||||||
isExecutable = true;
|
isExecutable = true;
|
||||||
buildDepends = [
|
buildDepends = [
|
||||||
@ -15,7 +15,9 @@ cabal.mkDerivation (self: {
|
|||||||
pandoc pandocTypes parsec rfc5051 split syb tagsoup texmath text
|
pandoc pandocTypes parsec rfc5051 split syb tagsoup texmath text
|
||||||
time utf8String vector yaml
|
time utf8String vector yaml
|
||||||
];
|
];
|
||||||
testDepends = [ aeson aesonPretty Diff pandoc pandocTypes ];
|
testDepends = [
|
||||||
|
aeson aesonPretty Diff filepath pandoc pandocTypes yaml
|
||||||
|
];
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
meta = {
|
meta = {
|
||||||
description = "Supports using pandoc with citeproc";
|
description = "Supports using pandoc with citeproc";
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
cabal.mkDerivation (self: {
|
cabal.mkDerivation (self: {
|
||||||
pname = "pandoc-types";
|
pname = "pandoc-types";
|
||||||
version = "1.12.2.3";
|
version = "1.12.3";
|
||||||
sha256 = "05xbpsx44sys0rkf2aqs4fcv4bg02ffhicp49jgnjyw9jiynhzzj";
|
sha256 = "1klfplpn2faw9da7xw5h5sx44annc2g7himyzyvb436wjnkjan0j";
|
||||||
buildDepends = [ aeson syb ];
|
buildDepends = [ aeson syb ];
|
||||||
meta = {
|
meta = {
|
||||||
homepage = "http://johnmacfarlane.net/pandoc";
|
homepage = "http://johnmacfarlane.net/pandoc";
|
||||||
|
@ -9,8 +9,8 @@
|
|||||||
|
|
||||||
cabal.mkDerivation (self: {
|
cabal.mkDerivation (self: {
|
||||||
pname = "pandoc";
|
pname = "pandoc";
|
||||||
version = "1.12.0.2";
|
version = "1.12.1";
|
||||||
sha256 = "125vl6l7nd3s3zwkms46y8l5zhg22iwz5387ll9rd2hf6asfpp56";
|
sha256 = "0csyrcfdqv2mc7ngn63lan3c1dd6zy0pb24k0z1lsraqlmmw76nf";
|
||||||
isLibrary = true;
|
isLibrary = true;
|
||||||
isExecutable = true;
|
isExecutable = true;
|
||||||
buildDepends = [
|
buildDepends = [
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
{ cabal, fileLocation, hspec, HUnit, QuickCheck, text, time }:
|
{ cabal, hspec, HUnit, QuickCheck, text, time }:
|
||||||
|
|
||||||
cabal.mkDerivation (self: {
|
cabal.mkDerivation (self: {
|
||||||
pname = "path-pieces";
|
pname = "path-pieces";
|
||||||
version = "0.1.2";
|
version = "0.1.3";
|
||||||
sha256 = "1cxsa8lq1f2jf86iv6f17nraiav8k2vzjxln1y7z45qhcp1sbbaa";
|
sha256 = "03x9kfcaz1zsdpdzs05pcl0hv4hffgsl2js8xiy5slba6n841v4l";
|
||||||
buildDepends = [ text time ];
|
buildDepends = [ text time ];
|
||||||
testDepends = [ fileLocation hspec HUnit QuickCheck text ];
|
testDepends = [ hspec HUnit QuickCheck text ];
|
||||||
meta = {
|
meta = {
|
||||||
description = "Components of paths";
|
description = "Components of paths";
|
||||||
license = self.stdenv.lib.licenses.bsd3;
|
license = self.stdenv.lib.licenses.bsd3;
|
||||||
|
@ -5,8 +5,8 @@
|
|||||||
|
|
||||||
cabal.mkDerivation (self: {
|
cabal.mkDerivation (self: {
|
||||||
pname = "tagstream-conduit";
|
pname = "tagstream-conduit";
|
||||||
version = "0.5.4";
|
version = "0.5.4.1";
|
||||||
sha256 = "1djf66kn3m4sdwmis82f9w2nkmjyrq12zda7ic9pcsvra579868i";
|
sha256 = "1gahdil5jasm6v7gp519ahr2yc7ppysdnmkl21cd4zzn6y1r0gw9";
|
||||||
buildDepends = [
|
buildDepends = [
|
||||||
attoparsec attoparsecConduit blazeBuilder blazeBuilderConduit
|
attoparsec attoparsecConduit blazeBuilder blazeBuilderConduit
|
||||||
caseInsensitive conduit text transformers
|
caseInsensitive conduit text transformers
|
||||||
|
14
pkgs/development/libraries/haskell/text-format/default.nix
Normal file
14
pkgs/development/libraries/haskell/text-format/default.nix
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
{ cabal, doubleConversion, text, time, transformers }:
|
||||||
|
|
||||||
|
cabal.mkDerivation (self: {
|
||||||
|
pname = "text-format";
|
||||||
|
version = "0.3.1.0";
|
||||||
|
sha256 = "13k5a1kfmapd4yckm2vcrwz4vrrf32c2dpisdw0hyvzvmdib3n60";
|
||||||
|
buildDepends = [ doubleConversion text time transformers ];
|
||||||
|
meta = {
|
||||||
|
homepage = "https://github.com/bos/text-format";
|
||||||
|
description = "Text formatting";
|
||||||
|
license = self.stdenv.lib.licenses.bsd3;
|
||||||
|
platforms = self.ghc.meta.platforms;
|
||||||
|
};
|
||||||
|
})
|
@ -1,16 +1,18 @@
|
|||||||
{ cabal, binary, criterion, cryptohash, deepseq, HUnit, maccatcher
|
{ cabal, binary, cryptohash, deepseq, hashable, HUnit, networkInfo
|
||||||
, mersenneRandomPure64, QuickCheck, random, testFramework
|
, QuickCheck, random, testFramework, testFrameworkHunit
|
||||||
, testFrameworkHunit, testFrameworkQuickcheck2, time
|
, testFrameworkQuickcheck2, time
|
||||||
}:
|
}:
|
||||||
|
|
||||||
cabal.mkDerivation (self: {
|
cabal.mkDerivation (self: {
|
||||||
pname = "uuid";
|
pname = "uuid";
|
||||||
version = "1.2.14";
|
version = "1.3.2";
|
||||||
sha256 = "13r2yzhb9nj1h6wfy7w9k59d27z9iza5r4apmf72zby2fi9vdnwy";
|
sha256 = "0kwrb200i41l8ipgwviv934sa2ic2hqvlpj72pmkw4ba50viyc8m";
|
||||||
buildDepends = [ binary cryptohash maccatcher random time ];
|
buildDepends = [
|
||||||
|
binary cryptohash deepseq hashable networkInfo random time
|
||||||
|
];
|
||||||
testDepends = [
|
testDepends = [
|
||||||
criterion deepseq HUnit mersenneRandomPure64 QuickCheck random
|
HUnit QuickCheck random testFramework testFrameworkHunit
|
||||||
testFramework testFrameworkHunit testFrameworkQuickcheck2
|
testFrameworkQuickcheck2
|
||||||
];
|
];
|
||||||
jailbreak = true;
|
jailbreak = true;
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
cabal.mkDerivation (self: {
|
cabal.mkDerivation (self: {
|
||||||
pname = "xdot";
|
pname = "xdot";
|
||||||
version = "0.2.3.1";
|
version = "0.2.4";
|
||||||
sha256 = "1gricrnssxgzaq1z7nnyppmz284nix0m89477x22mal125pkcf7n";
|
sha256 = "0723drp9zs3hrayld99j4fniyvm65fz19hkk4001vpvgjw27dfja";
|
||||||
buildDepends = [ cairo graphviz gtk mtl polyparse text ];
|
buildDepends = [ cairo graphviz gtk mtl polyparse text ];
|
||||||
meta = {
|
meta = {
|
||||||
description = "Parse Graphviz xdot files and interactively view them using GTK and Cairo";
|
description = "Parse Graphviz xdot files and interactively view them using GTK and Cairo";
|
||||||
|
15
pkgs/development/libraries/haskell/xmlgen/default.nix
Normal file
15
pkgs/development/libraries/haskell/xmlgen/default.nix
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
{ cabal, blazeBuilder, filepath, HUnit, hxt, mtl, QuickCheck, text
|
||||||
|
}:
|
||||||
|
|
||||||
|
cabal.mkDerivation (self: {
|
||||||
|
pname = "xmlgen";
|
||||||
|
version = "0.6.2.0";
|
||||||
|
sha256 = "0b6fyg6mlm068f2jjmil52az4hk144pryf1c0wr1gx6ddx9yzjy4";
|
||||||
|
buildDepends = [ blazeBuilder mtl text ];
|
||||||
|
testDepends = [ filepath HUnit hxt QuickCheck text ];
|
||||||
|
meta = {
|
||||||
|
description = "Fast XML generation library";
|
||||||
|
license = self.stdenv.lib.licenses.bsd3;
|
||||||
|
platforms = self.ghc.meta.platforms;
|
||||||
|
};
|
||||||
|
})
|
32
pkgs/development/libraries/jsoncpp/default.nix
Normal file
32
pkgs/development/libraries/jsoncpp/default.nix
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
{ stdenv, fetchurl, scons}:
|
||||||
|
|
||||||
|
let
|
||||||
|
basename = "jsoncpp";
|
||||||
|
version = "0.6.0-rc2";
|
||||||
|
pkgname = "${basename}-src-${version}.tar.gz";
|
||||||
|
in
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
name = "${basename}-${version}";
|
||||||
|
src = fetchurl {
|
||||||
|
url = "mirror://sourceforge/${basename}/${pkgname}";
|
||||||
|
sha256 = "10xj15nziqpwc6r3yznpb49wm4jqc5wakjsmj65v087mcg8r7lfl";
|
||||||
|
};
|
||||||
|
|
||||||
|
buildInputs = [ scons ];
|
||||||
|
|
||||||
|
buildPhase = ''
|
||||||
|
mkdir -p $out
|
||||||
|
scons platform=linux-gcc check
|
||||||
|
'';
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
cp -r include $out
|
||||||
|
cp -r libs/* $out/lib
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
homepage = http://jsoncpp.sourceforge.net;
|
||||||
|
repositories.svn = svn://svn.code.sf.net/p/jsoncpp/code;
|
||||||
|
description = "A simple API to manipulate JSON data in C++";
|
||||||
|
};
|
||||||
|
}
|
@ -1,29 +1,41 @@
|
|||||||
args :
|
{stdenv, fetchurl,
|
||||||
let
|
libtool, libjpeg, openssl, libX11, libXdamage, xproto, damageproto,
|
||||||
lib = args.lib;
|
xextproto, libXext, fixesproto, libXfixes, xineramaproto, libXinerama,
|
||||||
fetchurl = args.fetchurl;
|
libXrandr, randrproto, libXtst, zlib
|
||||||
|
}:
|
||||||
|
|
||||||
version = lib.attrByPath ["version"] "0.9.9" args;
|
assert stdenv.isLinux;
|
||||||
buildInputs = with args; [
|
|
||||||
|
let
|
||||||
|
s = # Generated upstream information
|
||||||
|
rec {
|
||||||
|
baseName="libvncserver";
|
||||||
|
version="0.9.9";
|
||||||
|
name="${baseName}-${version}";
|
||||||
|
hash="1y83z31wbjivbxs60kj8a8mmjmdkgxlvr2x15yz95yy24lshs1ng";
|
||||||
|
url="mirror://sourceforge/project/libvncserver/libvncserver/0.9.9/LibVNCServer-0.9.9.tar.gz";
|
||||||
|
sha256="1y83z31wbjivbxs60kj8a8mmjmdkgxlvr2x15yz95yy24lshs1ng";
|
||||||
|
};
|
||||||
|
buildInputs = [
|
||||||
libtool libjpeg openssl libX11 libXdamage xproto damageproto
|
libtool libjpeg openssl libX11 libXdamage xproto damageproto
|
||||||
xextproto libXext fixesproto libXfixes xineramaproto libXinerama
|
xextproto libXext fixesproto libXfixes xineramaproto libXinerama
|
||||||
libXrandr randrproto libXtst zlib
|
libXrandr randrproto libXtst zlib
|
||||||
];
|
];
|
||||||
in
|
in
|
||||||
rec {
|
stdenv.mkDerivation {
|
||||||
src = fetchurl {
|
inherit (s) name version;
|
||||||
url = "mirror://sourceforge/libvncserver/LibVNCServer-${version}.tar.gz";
|
|
||||||
sha256 = "1y83z31wbjivbxs60kj8a8mmjmdkgxlvr2x15yz95yy24lshs1ng";
|
|
||||||
};
|
|
||||||
|
|
||||||
inherit buildInputs;
|
inherit buildInputs;
|
||||||
configureFlags = [];
|
src = fetchurl {
|
||||||
|
inherit (s) url sha256;
|
||||||
/* doConfigure should be specified separately */
|
};
|
||||||
phaseNames = ["doConfigure" "doMakeInstall"];
|
preConfigure = ''
|
||||||
|
sed -e 's@/usr/include/linux@${stdenv.gcc.libc}/include/linux@g' -i configure
|
||||||
name = "libvncserver-" + version;
|
'';
|
||||||
meta = {
|
meta = {
|
||||||
description = "VNC server library";
|
inherit (s) version;
|
||||||
|
description = "VNC server library";
|
||||||
|
license = stdenv.lib.licenses.gpl2Plus ;
|
||||||
|
maintainers = [stdenv.lib.maintainers.raskin];
|
||||||
|
platforms = stdenv.lib.platforms.linux;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
4
pkgs/development/libraries/libvncserver/default.upstream
Normal file
4
pkgs/development/libraries/libvncserver/default.upstream
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
url http://sourceforge.net/projects/libvncserver/files/libvncserver/
|
||||||
|
SF_version_dir
|
||||||
|
version_link '[.]tar[.][bgx]z[0-9]*/download$'
|
||||||
|
SF_redirect
|
@ -54,7 +54,6 @@ let
|
|||||||
};
|
};
|
||||||
} merge ]); # poppler_drv
|
} merge ]); # poppler_drv
|
||||||
|
|
||||||
in rec {
|
|
||||||
/* We always use cairo in poppler, so we always depend on glib,
|
/* We always use cairo in poppler, so we always depend on glib,
|
||||||
so we always build the glib wrapper (~350kB).
|
so we always build the glib wrapper (~350kB).
|
||||||
We also always build the cpp wrapper (<100kB).
|
We also always build the cpp wrapper (<100kB).
|
||||||
@ -69,4 +68,5 @@ in rec {
|
|||||||
NIX_LDFLAGS = "-lpoppler";
|
NIX_LDFLAGS = "-lpoppler";
|
||||||
postConfigure = "cd qt4";
|
postConfigure = "cd qt4";
|
||||||
};
|
};
|
||||||
}
|
|
||||||
|
in { inherit poppler_glib poppler_qt4; } // poppler_glib
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
x@{builderDefsPackage
|
x@{builderDefsPackage
|
||||||
, plib, freeglut, xproto, libX11, libXext, xextproto, libXi , inputproto
|
, plib, freeglut, xproto, libX11, libXext, xextproto, libXi , inputproto
|
||||||
, libICE, libSM, libXt, libXmu, mesa, boost, zlib, libjpeg , freealut
|
, libICE, libSM, libXt, libXmu, mesa, boost, zlib, libjpeg , freealut
|
||||||
, openscenegraph, openal, expat, cmake
|
, openscenegraph, openal, expat, cmake, apr
|
||||||
, ...}:
|
, ...}:
|
||||||
builderDefsPackage
|
builderDefsPackage
|
||||||
(a :
|
(a :
|
||||||
@ -13,11 +13,11 @@ let
|
|||||||
(builtins.attrNames (builtins.removeAttrs x helperArgNames));
|
(builtins.attrNames (builtins.removeAttrs x helperArgNames));
|
||||||
sourceInfo = rec {
|
sourceInfo = rec {
|
||||||
baseName="simgear";
|
baseName="simgear";
|
||||||
version="2.10.0";
|
version="2.12.0";
|
||||||
name="${baseName}-${version}";
|
name="${baseName}-${version}";
|
||||||
extension="tar.bz2";
|
extension="tar.bz2";
|
||||||
url="http://mirrors.ibiblio.org/pub/mirrors/simgear/ftp/Source/${name}.${extension}";
|
url="http://mirrors.ibiblio.org/pub/mirrors/simgear/ftp/Source/${name}.${extension}";
|
||||||
hash="0pb148hb35p1c5iz0kpiclmswjl9bax9xfm087ldpxsqg9a0sb2q";
|
hash="0spl6afk8rm96ss4lh7zy5561m5m2qgwsnqjyp35jr1gyyrc944f";
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
rec {
|
rec {
|
||||||
|
@ -3,11 +3,11 @@ let
|
|||||||
s = # Generated upstream information
|
s = # Generated upstream information
|
||||||
rec {
|
rec {
|
||||||
baseName="sodium";
|
baseName="sodium";
|
||||||
version="0.3";
|
version="0.4.3";
|
||||||
name="${baseName}-${version}";
|
name="${baseName}-${version}";
|
||||||
hash="0l1p0d7ag186hhs65kifp8jfgf4mm9rngv41bhq35d7d9gw2d2lh";
|
hash="0hk0zca1kpj6xlc2j2qx9qy7287pi0896frmxq5d7qmcwsdf372r";
|
||||||
url="http://download.dnscrypt.org/libsodium/releases/libsodium-0.3.tar.gz";
|
url="http://download.dnscrypt.org/libsodium/releases/libsodium-0.4.3.tar.gz";
|
||||||
sha256="0l1p0d7ag186hhs65kifp8jfgf4mm9rngv41bhq35d7d9gw2d2lh";
|
sha256="0hk0zca1kpj6xlc2j2qx9qy7287pi0896frmxq5d7qmcwsdf372r";
|
||||||
};
|
};
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
];
|
];
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user