mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-25 20:34:52 +03:00
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
|
||||
{ inherit trivial lists strings stringsWithDeps attrsets sources options
|
||||
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
|
||||
# commonly used functions.
|
||||
|
@ -186,6 +186,12 @@
|
||||
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 = {
|
||||
shortName = "openssl";
|
||||
fullName = "OpenSSL license";
|
||||
|
@ -1,14 +1,14 @@
|
||||
# General list operations.
|
||||
let
|
||||
|
||||
inherit (import ./trivial.nix) deepSeq;
|
||||
|
||||
inc = builtins.add 1;
|
||||
|
||||
dec = n: builtins.sub n 1;
|
||||
|
||||
inherit (builtins) elemAt;
|
||||
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
|
||||
|
@ -206,9 +206,7 @@ rec {
|
||||
in
|
||||
work startSet [] [];
|
||||
|
||||
genericClosure =
|
||||
if builtins ? genericClosure then builtins.genericClosure
|
||||
else lazyGenericClosure;
|
||||
genericClosure = builtins.genericClosure or lazyGenericClosure;
|
||||
|
||||
innerModifySumArgs = f: x: a: b: if b == null then (f a b) // x else
|
||||
innerModifySumArgs f x (a // b);
|
||||
|
@ -185,8 +185,7 @@ rec {
|
||||
) funs;
|
||||
|
||||
|
||||
moduleMerge = path: modules:
|
||||
let modules_ = modules; in
|
||||
moduleMerge = path: modules_:
|
||||
let
|
||||
addName = name:
|
||||
if path == "" then name else path + "." + name;
|
||||
|
@ -11,10 +11,7 @@ with import ./properties.nix;
|
||||
|
||||
rec {
|
||||
|
||||
inherit (lib) isType;
|
||||
|
||||
|
||||
isOption = isType "option";
|
||||
isOption = lib.isType "option";
|
||||
mkOption = attrs: attrs // {
|
||||
_type = "option";
|
||||
# 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
|
||||
opt.merge list
|
||||
else
|
||||
throw "One of option ${name} values has a bad type.";
|
||||
throw "A value of the option `${name}' has a bad type.";
|
||||
}
|
||||
else opt;
|
||||
|
||||
@ -77,7 +74,7 @@ rec {
|
||||
if opt.check opt.default then
|
||||
opt.default
|
||||
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;
|
||||
|
||||
@ -275,6 +272,8 @@ rec {
|
||||
description = opt.description or (throw "Option ${opt.name}: No description.");
|
||||
declarations = map (x: toString x.source) opt.declarations;
|
||||
#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 ? 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>
|
||||
|
||||
|
||||
<!--===============================================================-->
|
||||
|
||||
<section xml:id="sec-configuration-syntax"><title>Configuration syntax</title>
|
||||
|
||||
<para>TODO</para>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
<!--===============================================================-->
|
||||
|
||||
<section><title>Package management</title>
|
||||
|
@ -1,22 +1,37 @@
|
||||
{ pkgs, options
|
||||
# revision can have multiple values: local, HEAD or any revision number.
|
||||
, revision ? "HEAD"
|
||||
, revision ? "master"
|
||||
}:
|
||||
|
||||
with pkgs.lib;
|
||||
|
||||
let
|
||||
|
||||
# To prevent infinite recursion, remove system.path from the
|
||||
# options. Not sure why this happens.
|
||||
options_ =
|
||||
options //
|
||||
{ system = removeAttrs options.system ["path"]; };
|
||||
# Remove invisible and internal options.
|
||||
options' = filter (opt: opt.visible && !opt.internal) (optionAttrSetToDocList options);
|
||||
|
||||
optionsXML = builtins.toFile "options.xml" (builtins.unsafeDiscardStringContext
|
||||
(builtins.toXML (optionAttrSetToDocList options_)));
|
||||
# Clean up declaration sites to not refer to the NixOS source tree.
|
||||
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" {} ''
|
||||
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 \
|
||||
--stringparam revision '${revision}' \
|
||||
-o $out ${./options-to-docbook.xsl} ${optionsXML}
|
||||
@ -64,9 +79,12 @@ in rec {
|
||||
|
||||
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
|
||||
''; # */
|
||||
|
||||
meta.description = "The NixOS manual in HTML format";
|
||||
};
|
||||
|
||||
# Generate the NixOS manpages.
|
||||
@ -87,7 +105,7 @@ in rec {
|
||||
./man-pages.xml
|
||||
|
||||
# Generate manpages.
|
||||
ensureDir $out/share/man
|
||||
mkdir -p $out/share/man
|
||||
xsltproc --nonet --xinclude \
|
||||
--param man.output.in.separate.dir 1 \
|
||||
--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
|
||||
(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>
|
||||
|
||||
<listitem><para>If you downloaded the graphical ISO image, you can
|
||||
@ -89,7 +89,13 @@ $ lvcreate --size 1G --name smalldisk MyVolGroup</screen>
|
||||
</para></listitem>
|
||||
|
||||
<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>
|
||||
|
||||
@ -97,40 +103,56 @@ $ lvcreate --size 1G --name smalldisk MyVolGroup</screen>
|
||||
<filename>/mnt/etc/nixos/configuration.nix</filename> that
|
||||
specifies the intended configuration of the system. This is
|
||||
because NixOS has a <emphasis>declarative</emphasis> configuration
|
||||
model: you create or edit a description of the configuration that
|
||||
you want to be built and activated, and then NixOS takes care of
|
||||
realising that configuration. The command
|
||||
<command>nixos-option</command> can generate an initial
|
||||
configuration file for you:
|
||||
model: you create or edit a description of the desired
|
||||
configuration of your system, and then NixOS takes care of making
|
||||
it happen. The syntax of the NixOS configuration file is
|
||||
described in <xref linkend="sec-configuration-syntax"/>, while a
|
||||
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>
|
||||
$ nixos-option --install</screen>
|
||||
$ nixos-generate-config --root /mnt</screen>
|
||||
|
||||
It tries to figure out the kernel modules necessary for mounting
|
||||
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
|
||||
You should then edit
|
||||
<filename>/mnt/etc/nixos/configuration.nix</filename> to suit your
|
||||
needs. The text editors <command>nano</command> and
|
||||
<command>vim</command> are available.</para>
|
||||
needs:
|
||||
|
||||
<para>You need to specify a root file system in
|
||||
<option>fileSystems</option> and the target device for the Grub boot
|
||||
loader in <option>boot.loader.grub.device</option>. See
|
||||
<xref linkend="ch-options"/> for a list of the available configuration
|
||||
options.</para>
|
||||
<screen>
|
||||
$ nano /mnt/etc/nixos/configuration.nix
|
||||
</screen>
|
||||
|
||||
<note><para>It is very important that you specify in the option
|
||||
<option>boot.initrd.kernelModules</option> all 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
|
||||
The <command>vim</command> text editor is also available.</para>
|
||||
|
||||
<para>You <emphasis>must</emphasis> set the option
|
||||
<option>boot.loader.grub.device</option> to specify on which disk
|
||||
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/etc/nixos/configuration.nix</filename> and rerun
|
||||
<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>
|
||||
|
||||
<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>
|
||||
$ mkswap -L swap /dev/sda2 <lineannotation>(idem)</lineannotation>
|
||||
$ mount LABEL=nixos /mnt
|
||||
$ nixos-option --install
|
||||
$ nixos-generate-config
|
||||
$ nano /mnt/etc/nixos/configuration.nix
|
||||
<lineannotation>(in particular, set the fileSystems and swapDevices options)</lineannotation>
|
||||
$ nixos-install
|
||||
@ -228,8 +250,16 @@ $ reboot</screen>
|
||||
<example xml:id='ex-config'><title>NixOS configuration</title>
|
||||
<screen>
|
||||
{
|
||||
imports =
|
||||
[ # Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
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";
|
||||
|
||||
swapDevices =
|
||||
|
@ -110,6 +110,23 @@
|
||||
</listitem>
|
||||
</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>
|
||||
|
||||
</refsection>
|
||||
|
@ -42,7 +42,7 @@
|
||||
xlink:href="irc://irc.freenode.net/#nixos">
|
||||
<literal>#nixos</literal> channel on Freenode</link>. Bugs should
|
||||
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>
|
||||
|
||||
</preface>
|
||||
@ -55,7 +55,7 @@
|
||||
<xi:include href="troubleshooting.xml" />
|
||||
<xi:include href="development.xml" />
|
||||
<chapter xml:id="ch-options">
|
||||
<title>List of Options</title>
|
||||
<title>List of options</title>
|
||||
<xi:include href="options-db.xml" />
|
||||
</chapter>
|
||||
|
||||
|
@ -125,6 +125,11 @@
|
||||
</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:for-each select="attr">
|
||||
@ -155,8 +160,15 @@
|
||||
repository (if it’s a module and we have a revision number),
|
||||
or to the local filesystem. -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="$revision != 'local' and contains(@value, '/modules/')">
|
||||
<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:when test="not(starts-with(@value, '/'))">
|
||||
<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 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>
|
||||
@ -169,8 +181,8 @@
|
||||
/nix/store/<hash> prefix by the default location of nixos
|
||||
sources. -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="contains(@value, '/modules/')">
|
||||
<nixos/modules/<xsl:value-of select="substring-after(@value, '/modules/')"/>>
|
||||
<xsl:when test="not(starts-with(@value, '/'))">
|
||||
<nixpkgs/<xsl:value-of select="@value"/>>
|
||||
</xsl:when>
|
||||
<xsl:when test="contains(@value, 'nixops') and contains(@value, '/nix/')">
|
||||
<nixops/<xsl:value-of select="substring-after(@value, '/nix/')"/>>
|
||||
|
@ -66,7 +66,6 @@ rec {
|
||||
# Optionally check wether all config values have corresponding
|
||||
# option declarations.
|
||||
config =
|
||||
let doCheck = optionDefinitions.environment.checkConfigurationOptions; in
|
||||
assert doCheck -> pkgs.lib.checkModule "" systemModule;
|
||||
assert optionDefinitions.environment.checkConfigurationOptions -> pkgs.lib.checkModule "" systemModule;
|
||||
systemModule.config;
|
||||
}
|
||||
|
@ -7,8 +7,6 @@ with pkgs.lib;
|
||||
|
||||
let
|
||||
|
||||
cfg = config.environment;
|
||||
|
||||
extraManpages = pkgs.runCommand "extra-manpages" { buildInputs = [ pkgs.help2man ]; }
|
||||
''
|
||||
mkdir -p $out/share/man/man1
|
||||
@ -87,33 +85,10 @@ in
|
||||
system = {
|
||||
|
||||
path = mkOption {
|
||||
default = cfg.systemPackages;
|
||||
internal = true;
|
||||
description = ''
|
||||
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"
|
||||
];
|
||||
|
||||
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 $rootDir = ""; # = /
|
||||
my $force = 0;
|
||||
my $noFilesystems = 0;
|
||||
my $showHardwareConfig = 0;
|
||||
|
||||
for (my $n = 0; $n < scalar @ARGV; $n++) {
|
||||
my $arg = $ARGV[$n];
|
||||
@ -43,6 +45,12 @@ for (my $n = 0; $n < scalar @ARGV; $n++) {
|
||||
elsif ($arg eq "--force") {
|
||||
$force = 1;
|
||||
}
|
||||
elsif ($arg eq "--no-filesystems") {
|
||||
$noFilesystems = 1;
|
||||
}
|
||||
elsif ($arg eq "--show-hardware-config") {
|
||||
$showHardwareConfig = 1;
|
||||
}
|
||||
else {
|
||||
die "$0: unrecognized argument ‘$arg’\n";
|
||||
}
|
||||
@ -332,40 +340,48 @@ my $initrdAvailableKernelModules = toNixExpr(uniq @initrdAvailableKernelModules)
|
||||
my $kernelModules = toNixExpr(uniq @kernelModules);
|
||||
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";
|
||||
print STDERR "writing $fn...\n";
|
||||
mkpath($outDir, 0, 0755);
|
||||
|
||||
write_file($fn, <<EOF);
|
||||
my $hwConfig = <<EOF;
|
||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = ${\multiLineList(" ", @imports)};
|
||||
imports =${\multiLineList(" ", @imports)};
|
||||
|
||||
boot.initrd.availableKernelModules = [$initrdAvailableKernelModules ];
|
||||
boot.kernelModules = [$kernelModules ];
|
||||
boot.extraModulePackages = [$modulePackages ];
|
||||
|
||||
${fileSystems} swapDevices = ${\multiLineList(" ", @swapDevices)};
|
||||
|
||||
$fsAndSwap
|
||||
nix.maxJobs = $cpus;
|
||||
${\join "", (map { " $_\n" } (uniq @attrs))}}
|
||||
EOF
|
||||
|
||||
|
||||
# Generate a basic configuration.nix, unless one already exists.
|
||||
$fn = "$outDir/configuration.nix";
|
||||
if ($force || ! -e $fn) {
|
||||
print STDERR "writing $fn...\n";
|
||||
if ($showHardwareConfig) {
|
||||
print STDOUT $hwConfig;
|
||||
} else {
|
||||
$outDir = "$rootDir$outDir";
|
||||
|
||||
my $bootloaderConfig;
|
||||
if (-e "/sys/firmware/efi/efivars") {
|
||||
$bootLoaderConfig = <<EOF;
|
||||
my $fn = "$outDir/hardware-configuration.nix";
|
||||
print STDERR "writing $fn...\n";
|
||||
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.
|
||||
boot.loader.grub.enable = false;
|
||||
boot.loader.gummiboot.enable = true;
|
||||
@ -374,17 +390,17 @@ if ($force || ! -e $fn) {
|
||||
# EFI booting requires kernel >= 3.10
|
||||
boot.kernelPackages = pkgs.linuxPackages_3_10;
|
||||
EOF
|
||||
} else {
|
||||
$bootLoaderConfig = <<EOF;
|
||||
} else {
|
||||
$bootLoaderConfig = <<EOF;
|
||||
# Use the GRUB 2 boot loader.
|
||||
boot.loader.grub.enable = true;
|
||||
boot.loader.grub.version = 2;
|
||||
# Define on which hard drive you want to install Grub.
|
||||
# boot.loader.grub.device = "/dev/sda";
|
||||
EOF
|
||||
}
|
||||
}
|
||||
|
||||
write_file($fn, <<EOF);
|
||||
write_file($fn, <<EOF);
|
||||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
@ -397,29 +413,10 @@ EOF
|
||||
./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
|
||||
# networking.hostName = "nixos"; # Define your hostname.
|
||||
# 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.
|
||||
# i18n = {
|
||||
# consoleFont = "lat9w-16";
|
||||
@ -445,8 +442,9 @@ $bootLoaderConfig
|
||||
# services.xserver.desktopManager.kde4.enable = true;
|
||||
}
|
||||
EOF
|
||||
} else {
|
||||
print STDERR "warning: not overwriting existing $fn\n";
|
||||
} else {
|
||||
print STDERR "warning: not overwriting existing $fn\n";
|
||||
}
|
||||
}
|
||||
|
||||
# workaround for a bug in substituteAll
|
||||
|
@ -109,8 +109,8 @@ fi
|
||||
# more conservative.
|
||||
if [ "$action" != dry-run -a -n "$buildNix" ]; then
|
||||
echo "building Nix..." >&2
|
||||
if ! nix-build '<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 config.environment.nix -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
|
||||
fi
|
||||
fi
|
||||
@ -139,16 +139,16 @@ fi
|
||||
if [ -z "$rollback" ]; then
|
||||
echo "building the system configuration..." >&2
|
||||
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"
|
||||
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
|
||||
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
|
||||
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
|
||||
else
|
||||
showSyntax
|
||||
|
@ -6,6 +6,8 @@ let
|
||||
|
||||
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
|
||||
|
||||
{
|
||||
@ -13,6 +15,7 @@ in
|
||||
options = {
|
||||
|
||||
assertions = mkOption {
|
||||
internal = true;
|
||||
default = [];
|
||||
example = [ { assertion = false; message = "you can't enable this for that reason"; } ];
|
||||
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 = {
|
||||
|
||||
# This option is evaluated always. Thus the assertions are checked as well. hacky!
|
||||
environment.systemPackages =
|
||||
# This option is evaluated always. Thus the assertions are checked
|
||||
# as well. Hacky!
|
||||
environment.systemPackages = showWarnings (
|
||||
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 = {
|
||||
|
||||
system.nixosVersion = mkOption {
|
||||
internal = true;
|
||||
type = types.uniq types.string;
|
||||
description = "NixOS version.";
|
||||
};
|
||||
|
||||
system.nixosVersionSuffix = mkOption {
|
||||
internal = true;
|
||||
type = types.uniq types.string;
|
||||
description = "NixOS version suffix.";
|
||||
};
|
||||
|
||||
system.nixosRevision = mkOption {
|
||||
internal = true;
|
||||
type = types.uniq types.string;
|
||||
description = "NixOS Git revision hash.";
|
||||
};
|
||||
|
||||
system.nixosCodeName = mkOption {
|
||||
internal = true;
|
||||
type = types.uniq types.string;
|
||||
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 = {
|
||||
|
||||
system.nixosVersion =
|
||||
mkDefault (builtins.readFile "${toString pkgs.path}/.version" + config.system.nixosVersionSuffix);
|
||||
mkDefault (readFile "${toString pkgs.path}/.version" + config.system.nixosVersionSuffix);
|
||||
|
||||
system.nixosVersionSuffix =
|
||||
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.
|
||||
system.nixosCodeName = "Aardvark";
|
||||
|
@ -130,6 +130,7 @@
|
||||
./services/monitoring/dd-agent.nix
|
||||
./services/monitoring/graphite.nix
|
||||
./services/monitoring/monit.nix
|
||||
./services/monitoring/munin.nix
|
||||
./services/monitoring/nagios/default.nix
|
||||
./services/monitoring/smartd.nix
|
||||
./services/monitoring/statsd.nix
|
||||
@ -237,6 +238,7 @@
|
||||
./services/x11/window-managers/twm.nix
|
||||
./services/x11/window-managers/wmii.nix
|
||||
./services/x11/window-managers/xmonad.nix
|
||||
./services/x11/redshift.nix
|
||||
./services/x11/xfs.nix
|
||||
./services/x11/xserver.nix
|
||||
./system/activation/activation-script.nix
|
||||
|
@ -39,7 +39,7 @@ in
|
||||
|
||||
# Subscribe the root user to the NixOS channel by default.
|
||||
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
|
||||
|
||||
# Create the per-user garbage collector roots directory.
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Global configuration for the SSH client.
|
||||
|
||||
{config, pkgs, ...}:
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
with pkgs.lib;
|
||||
|
||||
@ -31,7 +31,7 @@ in
|
||||
setXAuthLocation = mkOption {
|
||||
default = true;
|
||||
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.
|
||||
'';
|
||||
};
|
||||
@ -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 = {
|
||||
|
||||
assertions = singleton
|
||||
{ assertion = cfg.forwardX11 -> cfg.setXAuthLocation;
|
||||
message = "cannot enable X11 forwarding without setting XAuth location";
|
||||
};
|
||||
|
||||
environment.etc =
|
||||
[ { # SSH configuration. Slight duplication of the sshd_config
|
||||
# generation in the sshd service.
|
||||
|
@ -1,110 +1,126 @@
|
||||
{pkgs, options, config, ...}:
|
||||
{ config, pkgs, options, ... }:
|
||||
|
||||
with pkgs.lib;
|
||||
|
||||
let
|
||||
|
||||
alias = from: to: {
|
||||
alias = from: to: rename {
|
||||
inherit from to;
|
||||
name = "Alias";
|
||||
msg.use = x: x;
|
||||
msg.define = x: x;
|
||||
use = id;
|
||||
define = id;
|
||||
visible = true;
|
||||
};
|
||||
|
||||
obsolete = from: to: {
|
||||
obsolete = from: to: rename {
|
||||
inherit from to;
|
||||
name = "Obsolete name";
|
||||
msg.use = x:
|
||||
builtins.trace "Obsolete option `${from}' is used instead of `${to}'." x;
|
||||
msg.define = x:
|
||||
builtins.trace "Obsolete option `${from}' is defined instead of `${to}'." x;
|
||||
use = x: builtins.trace "Obsolete option `${showOption from}' is used instead of `${showOption to}'." x;
|
||||
define = x: builtins.trace "Obsolete option `${showOption from}' is defined instead of `${showOption to}'." x;
|
||||
};
|
||||
|
||||
deprecated = from: to: {
|
||||
deprecated = from: to: rename {
|
||||
inherit from to;
|
||||
name = "Deprecated name";
|
||||
msg.use = x:
|
||||
abort "Deprecated option `${from}' is used instead of `${to}'.";
|
||||
msg.define = x:
|
||||
abort "Deprecated option `${from}' is defined instead of `${to}'.";
|
||||
use = x: abort "Deprecated option `${showOption from}' is used instead of `${showOption to}'.";
|
||||
define = x: abort "Deprecated option `${showOption from}' is defined instead of `${showOption to}'.";
|
||||
};
|
||||
|
||||
showOption = concatStringsSep ".";
|
||||
|
||||
zipModules = list: with pkgs.lib;
|
||||
zipModules = list:
|
||||
zipAttrsWith (n: v:
|
||||
if tail v != [] then
|
||||
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
|
||||
abort "Cannot rename an option to multiple options."
|
||||
else zipModules v
|
||||
else head v
|
||||
) list;
|
||||
|
||||
rename = statusTemplate: from: to: with pkgs.lib;
|
||||
rename = { from, to, name, use, define, visible ? false }:
|
||||
let
|
||||
status = statusTemplate from to;
|
||||
setTo = setAttrByPath (splitString "." to);
|
||||
setFrom = setAttrByPath (splitString "." from);
|
||||
toOf = attrByPath (splitString "." to)
|
||||
(abort "Renaming error: option `${to}' does not exists.");
|
||||
fromOf = attrByPath (splitString "." from)
|
||||
(abort "Internal error: option `${from}' should be declared.");
|
||||
setTo = setAttrByPath to;
|
||||
setFrom = setAttrByPath from;
|
||||
toOf = attrByPath to
|
||||
(abort "Renaming error: option `${showOption to}' does not exists.");
|
||||
fromOf = attrByPath from
|
||||
(abort "Internal error: option `${showOption from}' should be declared.");
|
||||
in
|
||||
[{
|
||||
options = setFrom (mkOption {
|
||||
description = "${status.name} of <option>${to}</option>.";
|
||||
apply = x: status.msg.use (toOf config);
|
||||
});
|
||||
}] ++
|
||||
[{
|
||||
options = setTo (mkOption {
|
||||
extraConfigs =
|
||||
let externalDefs = (fromOf options).definitions; in
|
||||
if externalDefs == [] then []
|
||||
else map (def: def.value) (status.msg.define externalDefs);
|
||||
});
|
||||
}];
|
||||
[ { options = setFrom (mkOption {
|
||||
description = "${name} of <option>${showOption to}</option>.";
|
||||
apply = x: use (toOf config);
|
||||
inherit visible;
|
||||
});
|
||||
}
|
||||
{ options = setTo (mkOption {
|
||||
extraConfigs =
|
||||
let externalDefs = (fromOf options).definitions; in
|
||||
if externalDefs == [] then []
|
||||
else map (def: def.value) (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 ([]
|
||||
|
||||
# usage example:
|
||||
# ++ rename alias "services.xserver.slim.theme" "services.xserver.displayManager.slim.theme"
|
||||
++ rename obsolete "environment.extraPackages" "environment.systemPackages"
|
||||
++ rename obsolete "environment.enableBashCompletion" "programs.bash.enableCompletion"
|
||||
# ++ alias [ "services" "xserver" "slim" "theme" ] [ "services" "xserver" "displayManager" "slim" "theme" ]
|
||||
++ obsolete [ "environment" "extraPackages" ] [ "environment" "systemPackages" ]
|
||||
++ obsolete [ "environment" "enableBashCompletion" ] [ "programs" "bash" "enableCompletion" ]
|
||||
|
||||
++ rename obsolete "security.extraSetuidPrograms" "security.setuidPrograms"
|
||||
++ rename obsolete "networking.enableWLAN" "networking.wireless.enable"
|
||||
++ rename obsolete "networking.enableRT73Firmware" "networking.enableRalinkFirmware"
|
||||
++ obsolete [ "security" "extraSetuidPrograms" ] [ "security" "setuidPrograms" ]
|
||||
++ obsolete [ "networking" "enableWLAN" ] [ "networking" "wireless" "enable" ]
|
||||
++ obsolete [ "networking" "enableRT73Firmware" ] [ "networking" "enableRalinkFirmware" ]
|
||||
|
||||
# FIXME: Remove these eventually.
|
||||
++ rename obsolete "boot.systemd.sockets" "systemd.sockets"
|
||||
++ rename obsolete "boot.systemd.targets" "systemd.targets"
|
||||
++ rename obsolete "boot.systemd.services" "systemd.services"
|
||||
++ obsolete [ "boot" "systemd" "sockets" ] [ "systemd" "sockets" ]
|
||||
++ obsolete [ "boot" "systemd" "targets" ] [ "systemd" "targets" ]
|
||||
++ obsolete [ "boot" "systemd" "services" ] [ "systemd" "services" ]
|
||||
|
||||
# Old Grub-related options.
|
||||
++ rename obsolete "boot.copyKernels" "boot.loader.grub.copyKernels"
|
||||
++ rename obsolete "boot.extraGrubEntries" "boot.loader.grub.extraEntries"
|
||||
++ rename obsolete "boot.extraGrubEntriesBeforeNixos" "boot.loader.grub.extraEntriesBeforeNixOS"
|
||||
++ rename obsolete "boot.grubDevice" "boot.loader.grub.device"
|
||||
++ rename obsolete "boot.bootMount" "boot.loader.grub.bootDevice"
|
||||
++ rename obsolete "boot.grubSplashImage" "boot.loader.grub.splashImage"
|
||||
++ obsolete [ "boot" "copyKernels" ] [ "boot" "loader" "grub" "copyKernels" ]
|
||||
++ obsolete [ "boot" "extraGrubEntries" ] [ "boot" "loader" "grub" "extraEntries" ]
|
||||
++ obsolete [ "boot" "extraGrubEntriesBeforeNixos" ] [ "boot" "loader" "grub" "extraEntriesBeforeNixOS" ]
|
||||
++ obsolete [ "boot" "grubDevice" ] [ "boot" "loader" "grub" "device" ]
|
||||
++ obsolete [ "boot" "bootMount" ] [ "boot" "loader" "grub" "bootDevice" ]
|
||||
++ obsolete [ "boot" "grubSplashImage" ] [ "boot" "loader" "grub" "splashImage" ]
|
||||
|
||||
++ rename obsolete "boot.initrd.extraKernelModules" "boot.initrd.kernelModules"
|
||||
++ obsolete [ "boot" "initrd" "extraKernelModules" ] [ "boot" "initrd" "kernelModules" ]
|
||||
|
||||
# OpenSSH
|
||||
++ rename obsolete "services.sshd.ports" "services.openssh.ports"
|
||||
++ rename alias "services.sshd.enable" "services.openssh.enable"
|
||||
++ rename obsolete "services.sshd.allowSFTP" "services.openssh.allowSFTP"
|
||||
++ rename obsolete "services.sshd.forwardX11" "services.openssh.forwardX11"
|
||||
++ rename obsolete "services.sshd.gatewayPorts" "services.openssh.gatewayPorts"
|
||||
++ rename obsolete "services.sshd.permitRootLogin" "services.openssh.permitRootLogin"
|
||||
++ rename obsolete "services.xserver.startSSHAgent" "services.xserver.startOpenSSHAgent"
|
||||
++ obsolete [ "services" "sshd" "ports" ] [ "services" "openssh" "ports" ]
|
||||
++ alias [ "services" "sshd" "enable" ] [ "services" "openssh" "enable" ]
|
||||
++ obsolete [ "services" "sshd" "allowSFTP" ] [ "services" "openssh" "allowSFTP" ]
|
||||
++ obsolete [ "services" "sshd" "forwardX11" ] [ "services" "openssh" "forwardX11" ]
|
||||
++ obsolete [ "services" "sshd" "gatewayPorts" ] [ "services" "openssh" "gatewayPorts" ]
|
||||
++ obsolete [ "services" "sshd" "permitRootLogin" ] [ "services" "openssh" "permitRootLogin" ]
|
||||
++ obsolete [ "services" "xserver" "startSSHAgent" ] [ "services" "xserver" "startOpenSSHAgent" ]
|
||||
|
||||
# KDE
|
||||
++ rename deprecated "kde.extraPackages" "environment.kdePackages"
|
||||
# ++ rename obsolete "environment.kdePackages" "environment.systemPackages" # !!! doesn't work!
|
||||
++ deprecated [ "kde" "extraPackages" ] [ "environment" "kdePackages" ]
|
||||
# ++ obsolete [ "environment" "kdePackages" ] [ "environment" "systemPackages" ] # !!! doesn't work!
|
||||
|
||||
# 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
|
||||
# !!! 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 {
|
||||
default = ./fuppes/vfolder.cfg;
|
||||
example = /etc/fuppes/vfolder.cfg;
|
||||
example = literalExample "/etc/fuppes/vfolder.cfg";
|
||||
description = ''
|
||||
XML file describing the layout of virtual folder visible by the
|
||||
client.
|
||||
@ -109,6 +108,8 @@ with pkgs.lib;
|
||||
|
||||
services.fuppesd.name = mkDefault config.networking.hostName;
|
||||
|
||||
services.fuppesd.vfolder = mkDefault ./fuppes/vfolder.cfg;
|
||||
|
||||
security.sudo.enable = true;
|
||||
};
|
||||
}
|
||||
|
@ -1,9 +1,18 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
# TODO: this file needs some additional work - at least you can connect to
|
||||
# firebird ..
|
||||
# Example how to connect:
|
||||
# isql /var/db/firebird/data/your-db.fdb -u sysdba -p <default password>
|
||||
# TODO: This may file may need additional review, eg which configuartions to
|
||||
# expose to the user.
|
||||
#
|
||||
# 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
|
||||
# however there are no strong reasons to prefer this or the other one AFAIK
|
||||
@ -18,7 +27,8 @@ let
|
||||
|
||||
firebird = cfg.package;
|
||||
|
||||
pidFile = "${cfg.pidDir}/firebirdd.pid";
|
||||
dataDir = "${cfg.baseDir}/data";
|
||||
systemDir = "${cfg.baseDir}/system";
|
||||
|
||||
in
|
||||
|
||||
@ -32,9 +42,9 @@ in
|
||||
|
||||
enable = mkOption {
|
||||
default = false;
|
||||
description = "
|
||||
Whether to enable the firebird super server.
|
||||
";
|
||||
description = ''
|
||||
Whether to enable the Firebird super server.
|
||||
'';
|
||||
};
|
||||
|
||||
package = mkOption {
|
||||
@ -45,29 +55,31 @@ in
|
||||
reasons. See comments at the firebirdSuper derivation
|
||||
*/
|
||||
|
||||
description = "
|
||||
description = ''
|
||||
Which firebird derivation to use.
|
||||
";
|
||||
'';
|
||||
};
|
||||
|
||||
port = mkOption {
|
||||
default = "3050";
|
||||
description = "Port of Firebird.";
|
||||
description = ''
|
||||
Port Firebird uses.
|
||||
'';
|
||||
};
|
||||
|
||||
user = mkOption {
|
||||
default = "firebird";
|
||||
description = "User account under which firebird runs.";
|
||||
description = ''
|
||||
User account under which firebird runs.
|
||||
'';
|
||||
};
|
||||
|
||||
dataDir = mkOption {
|
||||
default = "/var/db/firebird/data"; # ubuntu is using /var/lib/firebird/2.1/data/.. ?
|
||||
description = "Location where firebird databases are stored.";
|
||||
};
|
||||
|
||||
pidDir = mkOption {
|
||||
default = "/run/firebird";
|
||||
description = "Location of the file which stores the PID of the firebird server.";
|
||||
baseDir = mkOption {
|
||||
default = "/var/db/firebird"; # ubuntu is using /var/lib/firebird/2.1/data/.. ?
|
||||
description = ''
|
||||
Location containing data/ and system/ directories.
|
||||
data/ stores the databases, system/ stores the password database security2.fdb.
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
@ -79,12 +91,10 @@ in
|
||||
|
||||
config = mkIf config.services.firebird.enable {
|
||||
|
||||
users.extraUsers.firebird.description = "Firebird server user";
|
||||
|
||||
environment.systemPackages = [firebird];
|
||||
environment.systemPackages = [cfg.package];
|
||||
|
||||
systemd.services.firebird =
|
||||
{ description = "firebird super server";
|
||||
{ description = "Firebird Super-Server";
|
||||
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
|
||||
@ -92,20 +102,17 @@ in
|
||||
# is a better way
|
||||
preStart =
|
||||
''
|
||||
secureDir="${cfg.dataDir}/../system"
|
||||
|
||||
mkdir -m 0700 -p \
|
||||
"${cfg.dataDir}" \
|
||||
"${cfg.pidDir}" \
|
||||
/var/log/firebird \
|
||||
"$secureDir"
|
||||
"${dataDir}" \
|
||||
"${systemDir}" \
|
||||
/var/log/firebird
|
||||
|
||||
if ! test -e "$secureDir/security2.fdb"; then
|
||||
cp ${firebird}/security2.fdb "$secureDir"
|
||||
if ! test -e "${systemDir}/security2.fdb"; then
|
||||
cp ${firebird}/security2.fdb "${systemDir}"
|
||||
fi
|
||||
|
||||
chown -R ${cfg.user} "${cfg.pidDir}" "${cfg.dataDir}" "$secureDir" /var/log/firebird
|
||||
chmod -R 700 "${cfg.pidDir}" "${cfg.dataDir}" "$secureDir" /var/log/firebird
|
||||
chown -R ${cfg.user} "${dataDir}" "${systemDir}" /var/log/firebird
|
||||
chmod -R 700 "${dataDir}" "${systemDir}" /var/log/firebird
|
||||
'';
|
||||
|
||||
serviceConfig.PermissionsStartOnly = true; # preStart must be run as root
|
||||
@ -119,9 +126,9 @@ in
|
||||
|
||||
# think about this again - and eventually make it an option
|
||||
environment.etc."firebird/firebird.conf".text = ''
|
||||
# RootDirectory = Restrict ${cfg.dataDir}
|
||||
DatabaseAccess = Restrict ${cfg.dataDir}
|
||||
ExternalFileAccess = Restrict ${cfg.dataDir}
|
||||
# RootDirectory = Restrict ${dataDir}
|
||||
DatabaseAccess = Restrict ${dataDir}
|
||||
ExternalFileAccess = Restrict ${dataDir}
|
||||
# what is this? is None allowed?
|
||||
UdfAccess = None
|
||||
# "Native" = traditional interbase/firebird, "mixed" is windows only
|
||||
@ -142,8 +149,14 @@ in
|
||||
#RemoteAuxPort = 0
|
||||
# rsetrict connections to a network card:
|
||||
#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 = [];
|
||||
description = "List of database names and their initial schemas that should be used to create databases on the first startup of MySQL";
|
||||
example = [
|
||||
{ name = "foodatabase"; schema = ./foodatabase.sql; }
|
||||
{ name = "bardatabase"; schema = ./bardatabase.sql; }
|
||||
{ name = "foodatabase"; schema = literalExample "./foodatabase.sql"; }
|
||||
{ name = "bardatabase"; schema = literalExample "./bardatabase.sql"; }
|
||||
];
|
||||
};
|
||||
|
||||
|
@ -86,8 +86,8 @@ in
|
||||
default = [];
|
||||
description = "List of database names and their initial schemas that should be used to create databases on the first startup of MySQL";
|
||||
example = [
|
||||
{ name = "foodatabase"; schema = ./foodatabase.sql; }
|
||||
{ name = "bardatabase"; schema = ./bardatabase.sql; }
|
||||
{ name = "foodatabase"; schema = literalExample "./foodatabase.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 {
|
||||
default = false;
|
||||
description = ''
|
||||
|
@ -52,7 +52,7 @@ in
|
||||
|
||||
systemd.services.nix-gc =
|
||||
{ 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;
|
||||
};
|
||||
|
||||
|
@ -11,10 +11,15 @@ let
|
||||
|
||||
cfg = config.services.nixosManual;
|
||||
|
||||
versionModule =
|
||||
{ system.nixosVersionSuffix = config.system.nixosVersionSuffix;
|
||||
system.nixosRevision = config.system.nixosRevision;
|
||||
};
|
||||
|
||||
manual = import ../../../doc/manual {
|
||||
inherit (cfg) revision;
|
||||
inherit pkgs;
|
||||
options = (fixMergeModules baseModules
|
||||
revision = config.system.nixosRevision;
|
||||
options = (fixMergeModules ([ versionModule ] ++ baseModules)
|
||||
(removeAttrs extraArgs ["config" "options"]) // {
|
||||
modules = [ ];
|
||||
}).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 {
|
||||
default = [];
|
||||
description = "Configuration dump that should be loaded on the first startup";
|
||||
example = [ ./myejabberd.dump ];
|
||||
example = literalExample "[ ./myejabberd.dump ]";
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -181,11 +181,11 @@ in
|
||||
example = [
|
||||
{
|
||||
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" ];
|
||||
publicKeyFile = ./pubkeys/myhost2_ssh_host_dsa_key.pub;
|
||||
publicKeyFile = literalExample "./pubkeys/myhost2_ssh_host_dsa_key.pub";
|
||||
}
|
||||
];
|
||||
options = {
|
||||
|
@ -4,12 +4,92 @@ with pkgs.lib;
|
||||
|
||||
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;
|
||||
|
||||
inherit (pkgs) vsftpd;
|
||||
|
||||
yesNoOption = p : name :
|
||||
"${name}=${if p then "YES" else "NO"}";
|
||||
yesNoOption = nixosName: vsftpdName: default: description: {
|
||||
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
|
||||
|
||||
@ -26,52 +106,34 @@ in
|
||||
description = "Whether to enable the vsftpd FTP server.";
|
||||
};
|
||||
|
||||
anonymousUser = mkOption {
|
||||
default = false;
|
||||
description = "Whether to enable the anonymous FTP user.";
|
||||
userlist = mkOption {
|
||||
default = [];
|
||||
|
||||
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 {
|
||||
default = "/home/ftp";
|
||||
description = "Path to anonymous user data.";
|
||||
default = "/home/ftp/";
|
||||
description = ''
|
||||
Directory to consider the HOME of the anonymous user.
|
||||
'';
|
||||
};
|
||||
|
||||
localUsers = mkOption {
|
||||
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.";
|
||||
};
|
||||
|
||||
};
|
||||
} // (listToAttrs (catAttrs "nixosOption" optionDescription)) ;
|
||||
|
||||
};
|
||||
|
||||
@ -80,6 +142,15 @@ in
|
||||
|
||||
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 =
|
||||
[ { name = "vsftpd";
|
||||
uid = config.ids.uids.vsftpd;
|
||||
@ -99,6 +170,21 @@ in
|
||||
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 =
|
||||
{ description = "vsftpd server";
|
||||
|
||||
@ -107,22 +193,6 @@ in
|
||||
|
||||
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 ''
|
||||
mkdir -p -m 555 ${cfg.anonymousUserHome}
|
||||
chown -R ftp:ftp ${cfg.anonymousUserHome}
|
||||
|
@ -37,14 +37,14 @@ let
|
||||
default =
|
||||
''
|
||||
<zodb_db main>
|
||||
mount-point /
|
||||
cache-size 30000
|
||||
<blobstorage>
|
||||
blob-dir /var/lib/zope2/${name}/blobstorage
|
||||
<filestorage>
|
||||
path /var/lib/zope2/${name}/filestorage/Data.fs
|
||||
</filestorage>
|
||||
</blobstorage>
|
||||
mount-point /
|
||||
cache-size 30000
|
||||
<blobstorage>
|
||||
blob-dir /var/lib/zope2/${name}/blobstorage
|
||||
<filestorage>
|
||||
path /var/lib/zope2/${name}/filestorage/Data.fs
|
||||
</filestorage>
|
||||
</blobstorage>
|
||||
</zodb_db>
|
||||
'';
|
||||
type = types.string;
|
||||
@ -76,14 +76,14 @@ in
|
||||
extra =
|
||||
''
|
||||
<zodb_db main>
|
||||
mount-point /
|
||||
cache-size 30000
|
||||
<blobstorage>
|
||||
blob-dir /var/lib/zope2/plone01/blobstorage
|
||||
<filestorage>
|
||||
path /var/lib/zope2/plone01/filestorage/Data.fs
|
||||
</filestorage>
|
||||
</blobstorage>
|
||||
mount-point /
|
||||
cache-size 30000
|
||||
<blobstorage>
|
||||
blob-dir /var/lib/zope2/plone01/blobstorage
|
||||
<filestorage>
|
||||
path /var/lib/zope2/plone01/filestorage/Data.fs
|
||||
</filestorage>
|
||||
</blobstorage>
|
||||
</zodb_db>
|
||||
'';
|
||||
|
||||
@ -107,32 +107,32 @@ in
|
||||
let
|
||||
interpreter = pkgs.writeScript "interpreter"
|
||||
''
|
||||
import sys
|
||||
import sys
|
||||
|
||||
_interactive = True
|
||||
if len(sys.argv) > 1:
|
||||
_options, _args = __import__("getopt").getopt(sys.argv[1:], 'ic:m:')
|
||||
_interactive = False
|
||||
for (_opt, _val) in _options:
|
||||
if _opt == '-i':
|
||||
_interactive = True
|
||||
elif _opt == '-c':
|
||||
exec _val
|
||||
elif _opt == '-m':
|
||||
sys.argv[1:] = _args
|
||||
_args = []
|
||||
__import__("runpy").run_module(
|
||||
_val, {}, "__main__", alter_sys=True)
|
||||
_interactive = True
|
||||
if len(sys.argv) > 1:
|
||||
_options, _args = __import__("getopt").getopt(sys.argv[1:], 'ic:m:')
|
||||
_interactive = False
|
||||
for (_opt, _val) in _options:
|
||||
if _opt == '-i':
|
||||
_interactive = True
|
||||
elif _opt == '-c':
|
||||
exec _val
|
||||
elif _opt == '-m':
|
||||
sys.argv[1:] = _args
|
||||
_args = []
|
||||
__import__("runpy").run_module(
|
||||
_val, {}, "__main__", alter_sys=True)
|
||||
|
||||
if _args:
|
||||
sys.argv[:] = _args
|
||||
__file__ = _args[0]
|
||||
del _options, _args
|
||||
execfile(__file__)
|
||||
if _args:
|
||||
sys.argv[:] = _args
|
||||
__file__ = _args[0]
|
||||
del _options, _args
|
||||
execfile(__file__)
|
||||
|
||||
if _interactive:
|
||||
del _interactive
|
||||
__import__("code").interact(banner="", local=globals())
|
||||
if _interactive:
|
||||
del _interactive
|
||||
__import__("code").interact(banner="", local=globals())
|
||||
'';
|
||||
env = pkgs.buildEnv {
|
||||
name = "zope2-${name}-env";
|
||||
@ -149,73 +149,76 @@ if _interactive:
|
||||
'';
|
||||
};
|
||||
conf = pkgs.writeText "zope2-${name}-conf"
|
||||
''%define INSTANCEHOME ${env}
|
||||
instancehome $INSTANCEHOME
|
||||
%define CLIENTHOME /var/lib/zope2/${name}
|
||||
clienthome $CLIENTHOME
|
||||
''
|
||||
%define INSTANCEHOME ${env}
|
||||
instancehome $INSTANCEHOME
|
||||
%define CLIENTHOME /var/lib/zope2/${name}
|
||||
clienthome $CLIENTHOME
|
||||
|
||||
debug-mode off
|
||||
security-policy-implementation C
|
||||
verbose-security off
|
||||
default-zpublisher-encoding utf-8
|
||||
zserver-threads ${toString opts.threads}
|
||||
effective-user ${opts.user}
|
||||
debug-mode off
|
||||
security-policy-implementation C
|
||||
verbose-security off
|
||||
default-zpublisher-encoding utf-8
|
||||
zserver-threads ${toString opts.threads}
|
||||
effective-user ${opts.user}
|
||||
|
||||
pid-filename /var/lib/zope2/${name}/pid
|
||||
lock-filename /var/lib/zope2/${name}/lock
|
||||
python-check-interval 1000
|
||||
enable-product-installation off
|
||||
pid-filename /var/lib/zope2/${name}/pid
|
||||
lock-filename /var/lib/zope2/${name}/lock
|
||||
python-check-interval 1000
|
||||
enable-product-installation off
|
||||
|
||||
<environment>
|
||||
zope_i18n_compile_mo_files false
|
||||
</environment>
|
||||
<environment>
|
||||
zope_i18n_compile_mo_files false
|
||||
</environment>
|
||||
|
||||
<eventlog>
|
||||
level INFO
|
||||
<logfile>
|
||||
path /var/log/zope2/${name}.log
|
||||
level INFO
|
||||
</logfile>
|
||||
</eventlog>
|
||||
<eventlog>
|
||||
level INFO
|
||||
<logfile>
|
||||
path /var/log/zope2/${name}.log
|
||||
level INFO
|
||||
</logfile>
|
||||
</eventlog>
|
||||
|
||||
<logger access>
|
||||
level WARN
|
||||
<logfile>
|
||||
path /var/log/zope2/${name}-Z2.log
|
||||
format %(message)s
|
||||
</logfile>
|
||||
</logger>
|
||||
<logger access>
|
||||
level WARN
|
||||
<logfile>
|
||||
path /var/log/zope2/${name}-Z2.log
|
||||
format %(message)s
|
||||
</logfile>
|
||||
</logger>
|
||||
|
||||
<http-server>
|
||||
address ${opts.http_address}
|
||||
</http-server>
|
||||
<http-server>
|
||||
address ${opts.http_address}
|
||||
</http-server>
|
||||
|
||||
<zodb_db temporary>
|
||||
<temporarystorage>
|
||||
name temporary storage for sessioning
|
||||
</temporarystorage>
|
||||
mount-point /temp_folder
|
||||
container-class Products.TemporaryFolder.TemporaryContainer
|
||||
</zodb_db>
|
||||
<zodb_db temporary>
|
||||
<temporarystorage>
|
||||
name temporary storage for sessioning
|
||||
</temporarystorage>
|
||||
mount-point /temp_folder
|
||||
container-class Products.TemporaryFolder.TemporaryContainer
|
||||
</zodb_db>
|
||||
|
||||
${opts.extra}
|
||||
${opts.extra}
|
||||
'';
|
||||
ctlScript = pkgs.writeScript "zope2-${name}-ctl-script"
|
||||
''#!${env}/bin/python
|
||||
''
|
||||
#!${env}/bin/python
|
||||
|
||||
import sys
|
||||
import plone.recipe.zope2instance.ctl
|
||||
import sys
|
||||
import plone.recipe.zope2instance.ctl
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.exit(plone.recipe.zope2instance.ctl.main(
|
||||
["-C", "${conf}"]
|
||||
+ sys.argv[1:]))
|
||||
if __name__ == '__main__':
|
||||
sys.exit(plone.recipe.zope2instance.ctl.main(
|
||||
["-C", "${conf}"]
|
||||
+ sys.argv[1:]))
|
||||
'';
|
||||
|
||||
ctl = pkgs.writeScript "zope2-${name}-ctl"
|
||||
''#!${pkgs.bash}/bin/bash -e
|
||||
export PYTHONHOME=${env}
|
||||
exec ${ctlScript} "$@"
|
||||
''
|
||||
#!${pkgs.bash}/bin/bash -e
|
||||
export PYTHONHOME=${env}
|
||||
exec ${ctlScript} "$@"
|
||||
'';
|
||||
in {
|
||||
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 {
|
||||
default = false;
|
||||
description = ''
|
||||
Make S2TC via libtxc_dxtn available to OpenGL drivers. Using
|
||||
this library may require a patent license depending on your location.
|
||||
Make S3TC(S3 Texture Compression) via libtxc_dxtn available
|
||||
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 = ''
|
||||
Activate the new configuration (i.e., update /etc, make accounts,
|
||||
and so on).
|
||||
A set of shell script fragments that are executed when a NixOS
|
||||
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 {});
|
||||
|
@ -122,6 +122,7 @@ in
|
||||
options = {
|
||||
|
||||
system.build = mkOption {
|
||||
internal = true;
|
||||
default = {};
|
||||
description = ''
|
||||
Attribute set of derivations used to setup the system.
|
||||
@ -144,6 +145,7 @@ in
|
||||
};
|
||||
|
||||
system.boot.loader.id = mkOption {
|
||||
internal = true;
|
||||
default = "";
|
||||
description = ''
|
||||
Id string of the used bootloader.
|
||||
@ -151,6 +153,7 @@ in
|
||||
};
|
||||
|
||||
system.boot.loader.kernelFile = mkOption {
|
||||
internal = true;
|
||||
default = pkgs.stdenv.platform.kernelTarget;
|
||||
type = types.uniq types.string;
|
||||
description = ''
|
||||
@ -169,8 +172,8 @@ in
|
||||
};
|
||||
|
||||
system.extraSystemBuilderCmds = mkOption {
|
||||
default = "";
|
||||
internal = true;
|
||||
default = "";
|
||||
merge = concatStringsSep "\n";
|
||||
description = ''
|
||||
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 {
|
||||
default = "";
|
||||
example = "Stable 2.6.21";
|
||||
@ -173,15 +167,7 @@ in
|
||||
};
|
||||
|
||||
splashImage = mkOption {
|
||||
default =
|
||||
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;
|
||||
example = literalExample "./my-background.png";
|
||||
description = ''
|
||||
Background image used for GRUB. It must be a 640x480,
|
||||
14-colour image in XPM format, optionally compressed with
|
||||
@ -233,30 +219,43 @@ in
|
||||
|
||||
###### 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 =
|
||||
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}";
|
||||
(mkIf cfg.enable {
|
||||
|
||||
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
|
||||
# set at once.
|
||||
system.boot.loader.id = "grub";
|
||||
system.build.installBootLoader =
|
||||
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}";
|
||||
|
||||
environment.systemPackages = [ grub ];
|
||||
system.build.grub = grub;
|
||||
|
||||
boot.loader.grub.extraPrepareConfig =
|
||||
concatStrings (mapAttrsToList (n: v: ''
|
||||
${pkgs.coreutils}/bin/cp -pf "${v}" "/boot/${n}"
|
||||
'') config.boot.loader.grub.extraFiles);
|
||||
# Common attribute for boot loaders so only one of them can be
|
||||
# set at once.
|
||||
system.boot.loader.id = "grub";
|
||||
|
||||
};
|
||||
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 = {
|
||||
boot.initrd.luks.enable = mkOption {
|
||||
default = false;
|
||||
description = "Obsolete.";
|
||||
};
|
||||
|
||||
boot.initrd.luks.mitigateDMAAttacks = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = ''
|
||||
Unless enabled, encryption keys can be easily recovered by an attacker with physical
|
||||
@ -62,6 +59,7 @@ in
|
||||
};
|
||||
|
||||
boot.initrd.luks.cryptoModules = mkOption {
|
||||
type = types.listOf types.string;
|
||||
default =
|
||||
[ "aes" "aes_generic" "blowfish" "twofish"
|
||||
"serpent" "cbc" "xts" "lrw" "sha1" "sha256" "sha512"
|
||||
@ -142,7 +140,9 @@ in
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
config = mkIf (luks.devices != []) {
|
||||
|
@ -61,7 +61,7 @@ in
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
environment.systemPackages =
|
||||
[ pkgs.libvirt ]
|
||||
[ pkgs.libvirt pkgs.netcat-openbsd ]
|
||||
++ optional cfg.enableKVM pkgs.qemu_kvm;
|
||||
|
||||
boot.kernelModules = [ "tun" ];
|
||||
|
@ -16,7 +16,9 @@ let
|
||||
|
||||
|
||||
versionModule =
|
||||
{ system.nixosVersionSuffix = versionSuffix; };
|
||||
{ system.nixosVersionSuffix = versionSuffix;
|
||||
system.nixosRevision = nixpkgs.rev or nixpkgs.shortRev;
|
||||
};
|
||||
|
||||
|
||||
makeIso =
|
||||
@ -73,7 +75,7 @@ let
|
||||
};
|
||||
|
||||
|
||||
in {
|
||||
in rec {
|
||||
|
||||
channel =
|
||||
pkgs.releaseTools.makeSourceTarball {
|
||||
@ -91,6 +93,7 @@ in {
|
||||
distPhase = ''
|
||||
rm -rf .git
|
||||
echo -n $VERSION_SUFFIX > .version-suffix
|
||||
echo -n ${nixpkgs.rev or nixpkgs.shortRev} > .git-revision
|
||||
releaseName=nixos-$VERSION$VERSION_SUFFIX
|
||||
mkdir -p $out/tarballs
|
||||
mkdir ../$releaseName
|
||||
@ -106,18 +109,8 @@ in {
|
||||
};
|
||||
|
||||
|
||||
manual =
|
||||
(import ./doc/manual {
|
||||
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;
|
||||
manual = iso_minimal.x86_64-linux.config.system.build.manual.manual;
|
||||
manpages = iso_minimal.x86_64-linux.config.system.build.manual.manpages;
|
||||
|
||||
|
||||
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);
|
||||
mysql = makeTest (import ./mysql.nix);
|
||||
mysql_replication = makeTest (import ./mysql-replication.nix);
|
||||
munin = makeTest (import ./munin.nix);
|
||||
nat = makeTest (import ./nat.nix);
|
||||
nfs3 = makeTest (import ./nfs.nix { version = 3; });
|
||||
#nfs4 = makeTest (import ./nfs.nix { version = 4; });
|
||||
openssh = makeTest (import ./openssh.nix);
|
||||
partition = makeTest (import ./partition.nix);
|
||||
#partition = makeTest (import ./partition.nix);
|
||||
printing = makeTest (import ./printing.nix);
|
||||
proxy = makeTest (import ./proxy.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
|
||||
, gettext, dbus_glib, libxml2, libmad, xlibs, alsaLib, libogg
|
||||
, libvorbis, libcdio, libcddb, flac, ffmpeg
|
||||
, libvorbis, libcdio, libcddb, flac, ffmpeg, makeWrapper
|
||||
}:
|
||||
|
||||
let
|
||||
version = "3.3.4";
|
||||
version = "3.4.1";
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
name = "audacious-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://distfiles.audacious-media-player.org/audacious-${version}.tar.bz2";
|
||||
sha256 = "19zw4yj8g4fvxkv0ql8v8vgxzldxl1fzig239zzv88mpnvwxn737";
|
||||
sha256 = "0wf99b0nrk90fyak4gpwi076qnsrmv1j8958cvi57rxig21lvvap";
|
||||
};
|
||||
|
||||
pluginsSrc = fetchurl {
|
||||
url = "http://distfiles.audacious-media-player.org/audacious-plugins-${version}.tar.bz2";
|
||||
sha256 = "1l5g0zq73qp1hlrf4xsaj0n3hg0asrp7169531jgpncjn15dhvdn";
|
||||
sha256 = "02ivrxs6109nmmz9pkbf9dkm36s2lyp9vfv59sm0acxxd4db71md";
|
||||
};
|
||||
|
||||
buildInputs =
|
||||
[ gettext pkgconfig glib gtk3 libmowgli libmcs libxml2 dbus_glib
|
||||
libmad xlibs.libXcomposite libogg libvorbis flac alsaLib libcdio
|
||||
libcddb ffmpeg
|
||||
libcddb ffmpeg makeWrapper
|
||||
];
|
||||
|
||||
# Here we build bouth audacious and audacious-plugins in one
|
||||
@ -44,7 +44,16 @@ stdenv.mkDerivation {
|
||||
src=$pluginsSrc
|
||||
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;
|
||||
|
||||
|
@ -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";
|
||||
|
||||
let
|
||||
version = "0.9.1.55";
|
||||
version = "0.9.4.183";
|
||||
qt4webkit =
|
||||
if stdenv.system == "i686-linux" then
|
||||
fetchurl {
|
||||
@ -25,13 +27,13 @@ stdenv.mkDerivation {
|
||||
src =
|
||||
if stdenv.system == "i686-linux" then
|
||||
fetchurl {
|
||||
url = "http://repository.spotify.com/pool/non-free/s/spotify/spotify-client_${version}.gbdd3b79.203-1_i386.deb";
|
||||
sha256 = "1sls4gb85700126bbk4sz73ipa2rjcinmpnsi78q0bsdj365y2wc";
|
||||
url = "http://repository.spotify.com/pool/non-free/s/spotify/spotify-client_${version}.g644e24e.428-1_i386.deb";
|
||||
sha256 = "1wl6v5x8vm74h5lxp8fhvmih8l122aadsf1qxvpk0k3y6mbx0ifa";
|
||||
}
|
||||
else if stdenv.system == "x86_64-linux" then
|
||||
fetchurl {
|
||||
url = "http://repository.spotify.com/pool/non-free/s/spotify/spotify-client_${version}.gbdd3b79.203-1_amd64.deb";
|
||||
sha256 = "10pzj3p8bjbxh9nnm4qc5s1hn9nh7hgh3vbwm0xblj9rn71wl03y";
|
||||
url = "http://repository.spotify.com/pool/non-free/s/spotify/spotify-client_${version}.g644e24e.428-1_amd64.deb";
|
||||
sha256 = "1yniln6iswrrrny01qr2w5zcvam0vnrvy9mwbnk9i14i2ch0f3fx";
|
||||
}
|
||||
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/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
|
||||
|
||||
ln -s $out/spotify-client/spotify $out/bin/spotify
|
||||
patchelf \
|
||||
--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
|
||||
|
||||
dpkg-deb -x ${qt4webkit} ./
|
||||
@ -74,23 +79,20 @@ stdenv.mkDerivation {
|
||||
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"
|
||||
|
||||
# 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;
|
||||
dontPatchELF = true;
|
||||
|
||||
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";
|
||||
license = "unfree";
|
||||
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/"))
|
||||
(split-string (getenv "NIX_PROFILES"))))
|
||||
load-path)))
|
||||
|
||||
;; make tramp work for NixOS machines
|
||||
(eval-after-load 'tramp '(add-to-list 'tramp-remote-path "/run/current-system/sw/bin"))
|
||||
EOF
|
||||
'';
|
||||
|
||||
|
||||
|
||||
doCheck = true;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
@ -20,10 +20,10 @@ index 3b61fc0..2206646 100644
|
||||
|
||||
if (WIN32)
|
||||
# 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
|
||||
--- a/src/lib/synergy/CCryptoMode.h
|
||||
+++ b/src/lib/synergy/CCryptoMode.h
|
||||
--- a/src/lib/io/CCryptoMode.h
|
||||
+++ b/src/lib/io/CCryptoMode.h
|
||||
@@ -17,9 +17,9 @@
|
||||
|
||||
#pragma once
|
||||
@ -37,10 +37,10 @@ index 9b7e8ad..0d659ac 100644
|
||||
#include "ECryptoMode.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
|
||||
--- a/src/lib/synergy/CCryptoStream.h
|
||||
+++ b/src/lib/synergy/CCryptoStream.h
|
||||
--- a/src/lib/io/CCryptoStream.h
|
||||
+++ b/src/lib/io/CCryptoStream.h
|
||||
@@ -20,8 +20,8 @@
|
||||
#include "BasicTypes.h"
|
||||
#include "CStreamFilter.h"
|
||||
|
@ -7,11 +7,11 @@ assert !stdenv.isLinux -> unzip != null;
|
||||
with stdenv.lib;
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "synergy-1.4.12";
|
||||
name = "synergy-1.4.15";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://synergy.googlecode.com/files/${name}-Source.tar.gz";
|
||||
sha256 = "0j884skwqy8r8ckj9a4rlwsbjwb1yrj9wqma1nwhr2inff6hrdim";
|
||||
url = "http://synergy.googlecode.com/files/${name}-Source.tar.gz";
|
||||
sha256 = "0l1mxxky9hacyva0npzkgkwg4wkmihzq3abdrds0w5f6is44adv4";
|
||||
};
|
||||
|
||||
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 =
|
||||
(if enableGUI then [x11 motif] else []) ++
|
||||
(if useT1Lib then [t1lib] else []);
|
||||
stdenv.lib.optionals enableGUI [x11 motif] ++
|
||||
stdenv.lib.optional useT1Lib t1lib ++
|
||||
stdenv.lib.optional enablePDFtoPPM freetype;
|
||||
|
||||
# Debian uses '-fpermissive' to bypass some errors on char* constantness.
|
||||
CXXFLAGS = "-O2 -fpermissive";
|
||||
|
||||
configureFlags =
|
||||
"--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 "");
|
||||
configureFlags = "--enable-a4-paper";
|
||||
|
||||
postInstall = "
|
||||
if test -n \"${base14Fonts}\"; then
|
||||
substituteInPlace $out/etc/xpdfrc \\
|
||||
--replace /usr/local/share/ghostscript/fonts ${base14Fonts} \\
|
||||
--replace '#fontFile' fontFile
|
||||
fi
|
||||
";
|
||||
postInstall = stdenv.lib.optionalString (base14Fonts != null) ''
|
||||
substituteInPlace $out/etc/xpdfrc \
|
||||
--replace /usr/local/share/ghostscript/fonts ${base14Fonts} \
|
||||
--replace '#fontFile' fontFile
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = "http://www.foolabs.com/xpdf/";
|
||||
|
@ -1,18 +1,18 @@
|
||||
# This file is autogenerated from update.sh in the same directory.
|
||||
{
|
||||
dev = {
|
||||
version = "31.0.1650.4";
|
||||
url = "http://commondatastorage.googleapis.com/chromium-browser-official/chromium-31.0.1650.4.tar.xz";
|
||||
sha256 = "1i61izfn06ldxkgdrisdibbn5hrghyjslf81yszpw69k0z87k3lm";
|
||||
version = "32.0.1671.3";
|
||||
url = "http://commondatastorage.googleapis.com/chromium-browser-official/chromium-32.0.1671.3.tar.xz";
|
||||
sha256 = "0bv86ig3mrd95zh78880bcyh9b8w46s7slxq3mwwmrmqp0s8qaq0";
|
||||
};
|
||||
beta = {
|
||||
version = "30.0.1599.66";
|
||||
url = "http://commondatastorage.googleapis.com/chromium-browser-official/chromium-30.0.1599.66.tar.xz";
|
||||
sha256 = "092ps4y4s544lswrqqk8qij5n7ax4bsfl5vdj5cwfncvsqpjds4g";
|
||||
version = "31.0.1650.26";
|
||||
url = "http://commondatastorage.googleapis.com/chromium-browser-official/chromium-31.0.1650.26.tar.xz";
|
||||
sha256 = "14jvbjn7nsc4psi7n6rjsb5d930k4jawbgqlx3hkhmkz5nhbrplx";
|
||||
};
|
||||
stable = {
|
||||
version = "30.0.1599.66";
|
||||
url = "http://commondatastorage.googleapis.com/chromium-browser-official/chromium-30.0.1599.66.tar.xz";
|
||||
sha256 = "092ps4y4s544lswrqqk8qij5n7ax4bsfl5vdj5cwfncvsqpjds4g";
|
||||
version = "30.0.1599.101";
|
||||
url = "http://commondatastorage.googleapis.com/chromium-browser-official/chromium-30.0.1599.101.tar.xz";
|
||||
sha256 = "0bd49k9qpycpp4z230pqwsi22565lzhyq59js34baawjqql6ynfr";
|
||||
};
|
||||
}
|
||||
|
@ -6,8 +6,8 @@ stdenv.mkDerivation {
|
||||
|
||||
src = fetchgit {
|
||||
url = "https://bitbucket.org/portix/dwb.git";
|
||||
rev = "4a4c3adb8fbc680a0a2b8c9d3d3a4105c07c2514";
|
||||
sha256 = "93e8f2c82609447d54a3c139c153cc66d37d3c6aa8922cd09717caa95fd8b1d5";
|
||||
rev = "84a8621787baded72e84afdd5cdda278cb81e007";
|
||||
sha256 = "5a32f3c21ad59b43935a16108244f84d260fafaea9b93d41e8de9ba9089ee7b0";
|
||||
};
|
||||
|
||||
buildInputs = [ pkgconfig makeWrapper libsoup webkit gtk3 gnutls json_c m4 ];
|
||||
@ -21,6 +21,8 @@ stdenv.mkDerivation {
|
||||
wrapProgram "$out/bin/dwb" \
|
||||
--prefix GIO_EXTRA_MODULES : "${glib_networking}/lib/gio/modules" \
|
||||
--prefix XDG_DATA_DIRS : "${gsettings_desktop_schemas}/share:$out/share"
|
||||
wrapProgram "$out/bin/dwbem" \
|
||||
--prefix GIO_EXTRA_MODULES : "${glib_networking}/lib/gio/modules"
|
||||
'';
|
||||
|
||||
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
|
||||
, libXfixes, libXi, libXinerama, libXrandr, libXrender
|
||||
, 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
|
||||
@ -20,14 +20,14 @@ let
|
||||
arch = if stdenv.system == "x86_64-linux" then "x86_64"
|
||||
else if stdenv.system == "i686-linux" then "x86"
|
||||
else throw "Dropbox client for: ${stdenv.system} not supported!";
|
||||
|
||||
|
||||
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 throw "Dropbox client for: ${stdenv.system} not supported!";
|
||||
|
||||
version = "1.4.21";
|
||||
sha256 = if stdenv.system == "x86_64-linux" then "94073842f4a81feee80bca590e1df73fc3cab47ba879407ceba2de48f30d84e2"
|
||||
else if stdenv.system == "i686-linux" then "121v92m20l73xjmzng3vmcp4zsp9mlbcfia73f5py5y74kndb2ap"
|
||||
version = "2.4.3";
|
||||
sha256 = if stdenv.system == "x86_64-linux" then "0g8iqgc18qbw8fvdjf0fhbal34rvwr5izrf5acfzqjg99dgih81r"
|
||||
else if stdenv.system == "i686-linux" then "1nhmk319whj6cil6wg9hrfln9bxin3fnf6sxb0zg2ycfpnnqi0la"
|
||||
else throw "Dropbox client for: ${stdenv.system} not supported!";
|
||||
|
||||
# relative location where the dropbox libraries are stored
|
||||
@ -40,7 +40,7 @@ let
|
||||
libSM libX11 libXext libXcomposite libXcursor libXdamage
|
||||
libXfixes libXi libXinerama libXrandr libXrender
|
||||
atk dbus dbus_glib glib fontconfig gcc gdk_pixbuf
|
||||
gtk pango
|
||||
gtk pango zlib
|
||||
];
|
||||
|
||||
desktopItem = makeDesktopItem {
|
||||
|
@ -3,11 +3,11 @@ let
|
||||
s = # Generated upstream information
|
||||
rec {
|
||||
baseName="ekrhyper";
|
||||
version="1_4_08022013";
|
||||
version="1_4_30072013";
|
||||
name="${baseName}-${version}";
|
||||
hash="0vni5pq1p99428ii3g13chiqxcs8k1fm6jlvg1jqh4qdcs42w7yb";
|
||||
url="http://userpages.uni-koblenz.de/~bpelzer/ekrhyper/ekrh_1_4_08022013.tar.gz";
|
||||
sha256="0vni5pq1p99428ii3g13chiqxcs8k1fm6jlvg1jqh4qdcs42w7yb";
|
||||
hash="0ashsblm477r7dmq9f33wajkbr29rbyyc919mifdgrrdy6zlc663";
|
||||
url="http://userpages.uni-koblenz.de/~bpelzer/ekrhyper/ekrh_1_4_30072013.tar.gz";
|
||||
sha256="0ashsblm477r7dmq9f33wajkbr29rbyyc919mifdgrrdy6zlc663";
|
||||
};
|
||||
buildInputs = [
|
||||
ocaml perl
|
||||
|
@ -3,11 +3,11 @@ let
|
||||
s = # Generated upstream information
|
||||
rec {
|
||||
baseName="eprover";
|
||||
version="1.7";
|
||||
version="1.8";
|
||||
name="${baseName}-${version}";
|
||||
hash="1prkgjpg8lajcylz9nj2hfjxl3l42cqbfvilg30z9b5br14l36rh";
|
||||
url="http://www4.in.tum.de/~schulz/WORK/E_DOWNLOAD/V_1.7/E.tgz";
|
||||
sha256="1prkgjpg8lajcylz9nj2hfjxl3l42cqbfvilg30z9b5br14l36rh";
|
||||
hash="0bl4dr7k6simwdvdyxhnjkiz4nm5y0nr8bfhc34zk0360i9m6sk3";
|
||||
url="http://www4.in.tum.de/~schulz/WORK/E_DOWNLOAD/V_1.8/E.tgz";
|
||||
sha256="0bl4dr7k6simwdvdyxhnjkiz4nm5y0nr8bfhc34zk0360i9m6sk3";
|
||||
};
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
|
@ -1,11 +1,11 @@
|
||||
{stdenv, fetchurl, zlib, openssl, tcl, readline, sqlite}:
|
||||
{stdenv, fetchurl, zlib, openssl, tcl, readline, sqlite, withJson ? true}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "fossil-1.24";
|
||||
name = "fossil-1.27";
|
||||
|
||||
src = fetchurl {
|
||||
url = http://www.fossil-scm.org/download/fossil-src-20121022124804.tar.gz;
|
||||
sha256 = "0gcvcrd368acxd79gh7p7caicgqd0f076n0i2if63mg3b8ivz9im";
|
||||
url = http://www.fossil-scm.org/download/fossil-src-20130911114349.tar.gz;
|
||||
sha256 = "0n40z8bx2311i11zjx2x15lw3q8vzjwvfqzikrjlqnpal4vzd72f";
|
||||
};
|
||||
|
||||
buildInputs = [ zlib openssl readline sqlite ];
|
||||
@ -14,6 +14,7 @@ stdenv.mkDerivation {
|
||||
doCheck = true;
|
||||
|
||||
checkTarget = "test";
|
||||
configureFlags = if withJson then "--json" else "";
|
||||
|
||||
preBuild=''
|
||||
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;
|
||||
|
||||
@ -18,7 +19,8 @@ stdenv.mkDerivation rec {
|
||||
distutils_extra simplejson readline glance cheetah lockfile httplib2
|
||||
# !!! should libvirt be a build-time dependency? Note that
|
||||
# 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 =
|
||||
|
@ -15,10 +15,11 @@ let
|
||||
s = # Generated upstream information
|
||||
rec {
|
||||
baseName="compiz";
|
||||
version="0.9.9.0";
|
||||
name="compiz-${version}";
|
||||
url="https://launchpad.net/compiz/0.9.9/${version}/+download/${name}.tar.bz2";
|
||||
sha256="0nxv9lv0zwzs82p2d5g38sbvzbqgfs837xdgwc26lh5wdv31d93s";
|
||||
version="0.9.10.0";
|
||||
name="${baseName}-${version}";
|
||||
hash="0kvjib0ns02cikpsjq5hlf746yjx2gkfh373pvrb25lzv3rs1qax";
|
||||
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
|
||||
libXrender renderproto gtk libwnck pango cairo
|
||||
|
@ -159,7 +159,7 @@ rec {
|
||||
|
||||
# Debian.
|
||||
debian = [
|
||||
ftp://ftp.au.debian.org/debian/
|
||||
#ftp://ftp.au.debian.org/debian/
|
||||
ftp://ftp.de.debian.org/debian/
|
||||
ftp://ftp.es.debian.org/debian/
|
||||
ftp://ftp.fr.debian.org/debian/
|
||||
|
@ -9,6 +9,6 @@ relpath="${path#$server}"
|
||||
|
||||
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 -re 's`^[^:]*$`'"$protocol://$basepath/&\`"
|
||||
|
@ -514,7 +514,8 @@ rec {
|
||||
|
||||
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"
|
||||
'';
|
||||
@ -937,6 +938,32 @@ rec {
|
||||
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 = {
|
||||
name = "opensuse-10.3-i586";
|
||||
fullName = "openSUSE 10.3 (i586)";
|
||||
@ -1026,7 +1053,7 @@ rec {
|
||||
|
||||
/* The set of supported Dpkg-based distributions. */
|
||||
|
||||
debDistros = {
|
||||
debDistros = rec {
|
||||
|
||||
# Interestingly, the SHA-256 hashes provided by Ubuntu in
|
||||
# http://nl.archive.ubuntu.com/ubuntu/dists/{gutsy,hardy}/Release are
|
||||
@ -1335,6 +1362,40 @@ rec {
|
||||
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 = {
|
||||
name = "debian-4.0r9-etch-i386";
|
||||
fullName = "Debian 4.0r9 Etch (i386)";
|
||||
@ -1380,44 +1441,48 @@ rec {
|
||||
};
|
||||
|
||||
debian60i386 = {
|
||||
name = "debian-6.0.7-squeeze-i386";
|
||||
fullName = "Debian 6.0.7 Squeeze (i386)";
|
||||
name = "debian-6.0.8-squeeze-i386";
|
||||
fullName = "Debian 6.0.8 Squeeze (i386)";
|
||||
packagesList = fetchurl {
|
||||
url = mirror://debian/dists/squeeze/main/binary-i386/Packages.bz2;
|
||||
sha256 = "a770f26b5fce1a16460b68f135dfe97f4f4a9894b538ece0104a508c83ec65d5";
|
||||
sha256 = "c850339aaf46a4ed4abc7c1789c29ea58c3a152aa173ee004578fda86b28391f";
|
||||
};
|
||||
urlPrefix = mirror://debian;
|
||||
packages = commonDebianPackages;
|
||||
};
|
||||
|
||||
debian60x86_64 = {
|
||||
name = "debian-6.0.7-squeeze-amd64";
|
||||
fullName = "Debian 6.0.7 Squeeze (amd64)";
|
||||
name = "debian-6.0.8-squeeze-amd64";
|
||||
fullName = "Debian 6.0.8 Squeeze (amd64)";
|
||||
packagesList = fetchurl {
|
||||
url = mirror://debian/dists/squeeze/main/binary-amd64/Packages.bz2;
|
||||
sha256 = "b2bb561bde59ac67e07c70aa7c86a33f237436e6891796a93c6ed6ffb032080e";
|
||||
sha256 = "1506ab7de3ad5a2c706183536d2ee88589d7cb922d9e0de36ac062d464082dda";
|
||||
};
|
||||
urlPrefix = mirror://debian;
|
||||
packages = commonDebianPackages;
|
||||
};
|
||||
|
||||
debian70i386 = {
|
||||
name = "debian-7.1.0-wheezy-i386";
|
||||
fullName = "Debian 7.1.0 Wheezy (i386)";
|
||||
# Backward compatibility.
|
||||
debian70i386 = debian7i386;
|
||||
debian70x86_64 = debian7x86_64;
|
||||
|
||||
debian7i386 = {
|
||||
name = "debian-7.2-wheezy-i386";
|
||||
fullName = "Debian 7.2 Wheezy (i386)";
|
||||
packagesList = fetchurl {
|
||||
url = mirror://debian/dists/wheezy/main/binary-i386/Packages.bz2;
|
||||
sha256 = "c2751c48805b41c3eddd31cfe92ffa46df13a7d6ce7896b8dc5ce4b2f7f329c5";
|
||||
sha256 = "2e80242e323f233c40b3020b0f1a57d12df8a120ee82af88ff7032ba4688f97d";
|
||||
};
|
||||
urlPrefix = mirror://debian;
|
||||
packages = commonDebianPackages;
|
||||
};
|
||||
|
||||
debian70x86_64 = {
|
||||
name = "debian-7.1.0-wheezy-amd64";
|
||||
fullName = "Debian 7.1.0 Wheezy (amd64)";
|
||||
debian7x86_64 = {
|
||||
name = "debian-7.2-wheezy-amd64";
|
||||
fullName = "Debian 7.2 Wheezy (amd64)";
|
||||
packagesList = fetchurl {
|
||||
url = mirror://debian/dists/wheezy/main/binary-amd64/Packages.bz2;
|
||||
sha256 = "9b15b4348cadbcf170c9e83d6fbcb64efac2b787ebdfef16ba21dd70dfca0001";
|
||||
sha256 = "adfc4cd3d3b855c73c9e2e12163a33c193f98c9bad25765080fa6136378a6e3b";
|
||||
};
|
||||
urlPrefix = mirror://debian;
|
||||
packages = commonDebianPackages;
|
||||
@ -1515,6 +1580,7 @@ rec {
|
||||
"curl"
|
||||
"patch"
|
||||
"locales"
|
||||
"coreutils"
|
||||
# Needed by checkinstall:
|
||||
"util-linux"
|
||||
"file"
|
||||
|
@ -1,11 +1,11 @@
|
||||
{ stdenv, fetchurl }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "man-pages-3.53";
|
||||
name = "man-pages-3.54";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://kernel/linux/docs/man-pages/${name}.tar.xz";
|
||||
sha256 = "0kzkjfrw65f7bv6laz3jism4yqajmfh3vdq2jb5d6gyp4n14sxnl";
|
||||
sha256 = "0rb75dl9hh4v2s95bcssy12j8qrbd2dmlzry68gphyxk5c7yipbl";
|
||||
};
|
||||
|
||||
preBuild =
|
||||
|
@ -14,10 +14,10 @@ stdenv.mkDerivation {
|
||||
sourceRoot = ".";
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/texmf/fonts/opentype
|
||||
mkdir -p $out/texmf-dist/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
|
||||
|
||||
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
|
||||
, indents, mtl, pandoc, parsec, transformers, unionFind, uniplate
|
||||
{ cabal, aeson, aesonPretty, binary, blazeHtml, blazeMarkup
|
||||
, cmdargs, filepath, HTF, indents, languageEcmascript, mtl, pandoc
|
||||
, parsec, text, transformers, unionFind, uniplate
|
||||
}:
|
||||
|
||||
cabal.mkDerivation (self: {
|
||||
pname = "Elm";
|
||||
version = "0.9.0.2";
|
||||
sha256 = "0yr395wsj0spi6h9d6lm5hvdryybpf8i1qpv4gz9dk0bwlyc8iwh";
|
||||
version = "0.10";
|
||||
sha256 = "0wwda9w9r3qw7b23bj4qnfj4vgl7zwwnslxmgz3rv0cmxn9klqx2";
|
||||
isLibrary = true;
|
||||
isExecutable = true;
|
||||
buildDepends = [
|
||||
binary blazeHtml blazeMarkup cmdargs filepath hjsmin indents mtl
|
||||
pandoc parsec transformers unionFind uniplate
|
||||
aeson aesonPretty binary blazeHtml blazeMarkup cmdargs filepath
|
||||
indents languageEcmascript mtl pandoc parsec text transformers
|
||||
unionFind uniplate
|
||||
];
|
||||
testDepends = [ HTF ];
|
||||
doCheck = false;
|
||||
meta = {
|
||||
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
|
||||
# which serves as an interface to a *system-wide* daemon,
|
||||
@ -114,4 +115,5 @@ in rec {
|
||||
docs = dbus_drv "docs" "doc" {
|
||||
postInstall = ''rm -r "$out/lib"'';
|
||||
};
|
||||
}
|
||||
};
|
||||
in attrs.libs // attrs
|
||||
|
@ -8,6 +8,7 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "11xpmsw7m5qn7y8fa2ihhqcislz1bdd83mp99didd5ac84756dlv";
|
||||
};
|
||||
|
||||
|
||||
buildInputs = [ x11 libXmu libXi ];
|
||||
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
|
||||
'';
|
||||
|
||||
buildPhase = "make all";
|
||||
installPhase = ''
|
||||
GLEW_DEST=$out make install
|
||||
GLEW_DEST=$out make install.all
|
||||
mkdir -pv $out/share/doc/glew
|
||||
mkdir -p $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: {
|
||||
pname = "Hipmunk";
|
||||
version = "5.2.0.11";
|
||||
sha256 = "0pcbwlq0njgj6dzh8h94gml63wv52f6l9hdas378lm7v8gbizxl7";
|
||||
version = "5.2.0.12";
|
||||
sha256 = "0gybmwwij6gs3gsklcvck0nc1niyh6pvirnxgrcwclrz94ivpj42";
|
||||
buildDepends = [ StateVar transformers ];
|
||||
meta = {
|
||||
homepage = "http://patch-tag.com/r/felipe/hipmunk/home";
|
||||
homepage = "https://github.com/meteficha/Hipmunk";
|
||||
description = "A Haskell binding for Chipmunk";
|
||||
license = "unknown";
|
||||
platforms = self.ghc.meta.platforms;
|
||||
|
@ -4,8 +4,8 @@
|
||||
|
||||
cabal.mkDerivation (self: {
|
||||
pname = "case-insensitive";
|
||||
version = "1.1";
|
||||
sha256 = "1likcqdlhbbk78s887n5g9a4jjxxyh46hj4wc7l7snf6f9ygd5lj";
|
||||
version = "1.1.0.1";
|
||||
sha256 = "1hwkdkpr88r3s7c8w1msw1pawz8cfi0lwj1z9dcsp0xs788yzapp";
|
||||
buildDepends = [ deepseq hashable text ];
|
||||
testDepends = [ HUnit testFramework testFrameworkHunit text ];
|
||||
meta = {
|
@ -1,15 +1,10 @@
|
||||
{ cabal, deepseq, mtl, parallel, time, fetchurl }:
|
||||
{ cabal, deepseq, mtl, parallel, time }:
|
||||
|
||||
cabal.mkDerivation (self: {
|
||||
pname = "data-pprint";
|
||||
version = "0.2.2";
|
||||
sha256 = "0cr69qv2j8fmmlir8rzlafcxk1cg3lg1z0zrwkz0lb7idm25fy36";
|
||||
version = "0.2.3";
|
||||
sha256 = "1ygbhn399d4hlrdjmg7gxbr5akydb78p6qa80rv7m6j0fsqzbf6y";
|
||||
buildDepends = [ deepseq mtl parallel time ];
|
||||
patches = [ (fetchurl { url = "https://github.com/divipp/ActiveHs-misc/pull/3.patch";
|
||||
sha256 = "0wxvc7cbv4qpjl5zxy41863qpzda2ma75pmnnqx29qyh3rxp7biw";
|
||||
})
|
||||
];
|
||||
patchFlags = "-p2";
|
||||
meta = {
|
||||
description = "Prettyprint and compare Data values";
|
||||
license = self.stdenv.lib.licenses.bsd3;
|
||||
|
@ -1,12 +1,10 @@
|
||||
{ cabal, lua, mtl }:
|
||||
{ cabal, mtl }:
|
||||
|
||||
cabal.mkDerivation (self: {
|
||||
pname = "hslua";
|
||||
version = "0.3.7";
|
||||
sha256 = "1q5s2b7x9idvdvp31yl86mmy476gfq6rg8f0r8faqxrm45jwgv2q";
|
||||
buildDepends = [ mtl ];
|
||||
pkgconfigDepends = [ lua ];
|
||||
configureFlags = "-fsystem-lua";
|
||||
meta = {
|
||||
description = "A Lua language interpreter embedding in Haskell";
|
||||
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
|
||||
, reflection, semigroupoids, semigroups, simpleReflect, tagged
|
||||
, testFramework, testFrameworkHunit, transformers
|
||||
{ cabal, binary, distributive, doctest, filepath, hashable, HUnit
|
||||
, lens, reflection, semigroupoids, semigroups, simpleReflect
|
||||
, tagged, testFramework, testFrameworkHunit, transformers
|
||||
, unorderedContainers, vector
|
||||
}:
|
||||
|
||||
cabal.mkDerivation (self: {
|
||||
pname = "linear";
|
||||
version = "1.3";
|
||||
sha256 = "0b5qjsbdkqv0h1236lv2nisjh9yz7gc5bd6xv6i8q5jryzs43pi9";
|
||||
version = "1.3.1";
|
||||
sha256 = "1s07qbdi12rc4djk4s0ds5sh79qcqfmgrbwfj1ygskq3ra88qqsa";
|
||||
buildDepends = [
|
||||
distributive hashable reflection semigroupoids semigroups tagged
|
||||
transformers unorderedContainers vector
|
||||
binary distributive hashable reflection semigroupoids semigroups
|
||||
tagged transformers unorderedContainers vector
|
||||
];
|
||||
testDepends = [
|
||||
doctest filepath HUnit lens simpleReflect testFramework
|
||||
binary doctest filepath HUnit lens simpleReflect testFramework
|
||||
testFrameworkHunit
|
||||
];
|
||||
meta = {
|
||||
@ -21,5 +21,6 @@ cabal.mkDerivation (self: {
|
||||
description = "Linear Algebra";
|
||||
license = self.stdenv.lib.licenses.bsd3;
|
||||
platforms = self.ghc.meta.platforms;
|
||||
maintainers = [ self.stdenv.lib.maintainers.ocharles ];
|
||||
};
|
||||
})
|
||||
|
@ -2,8 +2,8 @@
|
||||
|
||||
cabal.mkDerivation (self: {
|
||||
pname = "monad-control";
|
||||
version = "0.3.2.1";
|
||||
sha256 = "17wfdg3a2kkx1jwh7gfgbyx4351b420krsf8syb8l9xrl9gdz5a3";
|
||||
version = "0.3.2.2";
|
||||
sha256 = "1wwcx2k0nzmjqxf8d8wasnhvdx5q3nxkcyq7vbprkfy85sj7ivxc";
|
||||
buildDepends = [
|
||||
baseUnicodeSymbols transformers transformersBase
|
||||
];
|
||||
|
@ -6,8 +6,8 @@
|
||||
|
||||
cabal.mkDerivation (self: {
|
||||
pname = "pandoc-citeproc";
|
||||
version = "0.1.2";
|
||||
sha256 = "055msvrcqjkijkhzws48scpc4z90g0qjjsdcd0fhy309da6vax57";
|
||||
version = "0.1.2.1";
|
||||
sha256 = "13i4shpbd9swbsrpmkpb7jx79m12z12m9f3x167fs78509dak3iv";
|
||||
isLibrary = true;
|
||||
isExecutable = true;
|
||||
buildDepends = [
|
||||
@ -15,7 +15,9 @@ cabal.mkDerivation (self: {
|
||||
pandoc pandocTypes parsec rfc5051 split syb tagsoup texmath text
|
||||
time utf8String vector yaml
|
||||
];
|
||||
testDepends = [ aeson aesonPretty Diff pandoc pandocTypes ];
|
||||
testDepends = [
|
||||
aeson aesonPretty Diff filepath pandoc pandocTypes yaml
|
||||
];
|
||||
doCheck = false;
|
||||
meta = {
|
||||
description = "Supports using pandoc with citeproc";
|
||||
|
@ -2,8 +2,8 @@
|
||||
|
||||
cabal.mkDerivation (self: {
|
||||
pname = "pandoc-types";
|
||||
version = "1.12.2.3";
|
||||
sha256 = "05xbpsx44sys0rkf2aqs4fcv4bg02ffhicp49jgnjyw9jiynhzzj";
|
||||
version = "1.12.3";
|
||||
sha256 = "1klfplpn2faw9da7xw5h5sx44annc2g7himyzyvb436wjnkjan0j";
|
||||
buildDepends = [ aeson syb ];
|
||||
meta = {
|
||||
homepage = "http://johnmacfarlane.net/pandoc";
|
||||
|
@ -9,8 +9,8 @@
|
||||
|
||||
cabal.mkDerivation (self: {
|
||||
pname = "pandoc";
|
||||
version = "1.12.0.2";
|
||||
sha256 = "125vl6l7nd3s3zwkms46y8l5zhg22iwz5387ll9rd2hf6asfpp56";
|
||||
version = "1.12.1";
|
||||
sha256 = "0csyrcfdqv2mc7ngn63lan3c1dd6zy0pb24k0z1lsraqlmmw76nf";
|
||||
isLibrary = true;
|
||||
isExecutable = true;
|
||||
buildDepends = [
|
||||
|
@ -1,11 +1,11 @@
|
||||
{ cabal, fileLocation, hspec, HUnit, QuickCheck, text, time }:
|
||||
{ cabal, hspec, HUnit, QuickCheck, text, time }:
|
||||
|
||||
cabal.mkDerivation (self: {
|
||||
pname = "path-pieces";
|
||||
version = "0.1.2";
|
||||
sha256 = "1cxsa8lq1f2jf86iv6f17nraiav8k2vzjxln1y7z45qhcp1sbbaa";
|
||||
version = "0.1.3";
|
||||
sha256 = "03x9kfcaz1zsdpdzs05pcl0hv4hffgsl2js8xiy5slba6n841v4l";
|
||||
buildDepends = [ text time ];
|
||||
testDepends = [ fileLocation hspec HUnit QuickCheck text ];
|
||||
testDepends = [ hspec HUnit QuickCheck text ];
|
||||
meta = {
|
||||
description = "Components of paths";
|
||||
license = self.stdenv.lib.licenses.bsd3;
|
||||
|
@ -5,8 +5,8 @@
|
||||
|
||||
cabal.mkDerivation (self: {
|
||||
pname = "tagstream-conduit";
|
||||
version = "0.5.4";
|
||||
sha256 = "1djf66kn3m4sdwmis82f9w2nkmjyrq12zda7ic9pcsvra579868i";
|
||||
version = "0.5.4.1";
|
||||
sha256 = "1gahdil5jasm6v7gp519ahr2yc7ppysdnmkl21cd4zzn6y1r0gw9";
|
||||
buildDepends = [
|
||||
attoparsec attoparsecConduit blazeBuilder blazeBuilderConduit
|
||||
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
|
||||
, mersenneRandomPure64, QuickCheck, random, testFramework
|
||||
, testFrameworkHunit, testFrameworkQuickcheck2, time
|
||||
{ cabal, binary, cryptohash, deepseq, hashable, HUnit, networkInfo
|
||||
, QuickCheck, random, testFramework, testFrameworkHunit
|
||||
, testFrameworkQuickcheck2, time
|
||||
}:
|
||||
|
||||
cabal.mkDerivation (self: {
|
||||
pname = "uuid";
|
||||
version = "1.2.14";
|
||||
sha256 = "13r2yzhb9nj1h6wfy7w9k59d27z9iza5r4apmf72zby2fi9vdnwy";
|
||||
buildDepends = [ binary cryptohash maccatcher random time ];
|
||||
version = "1.3.2";
|
||||
sha256 = "0kwrb200i41l8ipgwviv934sa2ic2hqvlpj72pmkw4ba50viyc8m";
|
||||
buildDepends = [
|
||||
binary cryptohash deepseq hashable networkInfo random time
|
||||
];
|
||||
testDepends = [
|
||||
criterion deepseq HUnit mersenneRandomPure64 QuickCheck random
|
||||
testFramework testFrameworkHunit testFrameworkQuickcheck2
|
||||
HUnit QuickCheck random testFramework testFrameworkHunit
|
||||
testFrameworkQuickcheck2
|
||||
];
|
||||
jailbreak = true;
|
||||
doCheck = false;
|
||||
|
@ -2,8 +2,8 @@
|
||||
|
||||
cabal.mkDerivation (self: {
|
||||
pname = "xdot";
|
||||
version = "0.2.3.1";
|
||||
sha256 = "1gricrnssxgzaq1z7nnyppmz284nix0m89477x22mal125pkcf7n";
|
||||
version = "0.2.4";
|
||||
sha256 = "0723drp9zs3hrayld99j4fniyvm65fz19hkk4001vpvgjw27dfja";
|
||||
buildDepends = [ cairo graphviz gtk mtl polyparse text ];
|
||||
meta = {
|
||||
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 :
|
||||
let
|
||||
lib = args.lib;
|
||||
fetchurl = args.fetchurl;
|
||||
{stdenv, fetchurl,
|
||||
libtool, libjpeg, openssl, libX11, libXdamage, xproto, damageproto,
|
||||
xextproto, libXext, fixesproto, libXfixes, xineramaproto, libXinerama,
|
||||
libXrandr, randrproto, libXtst, zlib
|
||||
}:
|
||||
|
||||
version = lib.attrByPath ["version"] "0.9.9" args;
|
||||
buildInputs = with args; [
|
||||
assert stdenv.isLinux;
|
||||
|
||||
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
|
||||
xextproto libXext fixesproto libXfixes xineramaproto libXinerama
|
||||
libXrandr randrproto libXtst zlib
|
||||
];
|
||||
in
|
||||
rec {
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/libvncserver/LibVNCServer-${version}.tar.gz";
|
||||
sha256 = "1y83z31wbjivbxs60kj8a8mmjmdkgxlvr2x15yz95yy24lshs1ng";
|
||||
};
|
||||
|
||||
stdenv.mkDerivation {
|
||||
inherit (s) name version;
|
||||
inherit buildInputs;
|
||||
configureFlags = [];
|
||||
|
||||
/* doConfigure should be specified separately */
|
||||
phaseNames = ["doConfigure" "doMakeInstall"];
|
||||
|
||||
name = "libvncserver-" + version;
|
||||
src = fetchurl {
|
||||
inherit (s) url sha256;
|
||||
};
|
||||
preConfigure = ''
|
||||
sed -e 's@/usr/include/linux@${stdenv.gcc.libc}/include/linux@g' -i configure
|
||||
'';
|
||||
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
|
||||
|
||||
in rec {
|
||||
/* We always use cairo in poppler, so we always depend on glib,
|
||||
so we always build the glib wrapper (~350kB).
|
||||
We also always build the cpp wrapper (<100kB).
|
||||
@ -69,4 +68,5 @@ in rec {
|
||||
NIX_LDFLAGS = "-lpoppler";
|
||||
postConfigure = "cd qt4";
|
||||
};
|
||||
}
|
||||
|
||||
in { inherit poppler_glib poppler_qt4; } // poppler_glib
|
||||
|
@ -1,7 +1,7 @@
|
||||
x@{builderDefsPackage
|
||||
, plib, freeglut, xproto, libX11, libXext, xextproto, libXi , inputproto
|
||||
, libICE, libSM, libXt, libXmu, mesa, boost, zlib, libjpeg , freealut
|
||||
, openscenegraph, openal, expat, cmake
|
||||
, openscenegraph, openal, expat, cmake, apr
|
||||
, ...}:
|
||||
builderDefsPackage
|
||||
(a :
|
||||
@ -13,11 +13,11 @@ let
|
||||
(builtins.attrNames (builtins.removeAttrs x helperArgNames));
|
||||
sourceInfo = rec {
|
||||
baseName="simgear";
|
||||
version="2.10.0";
|
||||
version="2.12.0";
|
||||
name="${baseName}-${version}";
|
||||
extension="tar.bz2";
|
||||
url="http://mirrors.ibiblio.org/pub/mirrors/simgear/ftp/Source/${name}.${extension}";
|
||||
hash="0pb148hb35p1c5iz0kpiclmswjl9bax9xfm087ldpxsqg9a0sb2q";
|
||||
hash="0spl6afk8rm96ss4lh7zy5561m5m2qgwsnqjyp35jr1gyyrc944f";
|
||||
};
|
||||
in
|
||||
rec {
|
||||
|
@ -3,11 +3,11 @@ let
|
||||
s = # Generated upstream information
|
||||
rec {
|
||||
baseName="sodium";
|
||||
version="0.3";
|
||||
version="0.4.3";
|
||||
name="${baseName}-${version}";
|
||||
hash="0l1p0d7ag186hhs65kifp8jfgf4mm9rngv41bhq35d7d9gw2d2lh";
|
||||
url="http://download.dnscrypt.org/libsodium/releases/libsodium-0.3.tar.gz";
|
||||
sha256="0l1p0d7ag186hhs65kifp8jfgf4mm9rngv41bhq35d7d9gw2d2lh";
|
||||
hash="0hk0zca1kpj6xlc2j2qx9qy7287pi0896frmxq5d7qmcwsdf372r";
|
||||
url="http://download.dnscrypt.org/libsodium/releases/libsodium-0.4.3.tar.gz";
|
||||
sha256="0hk0zca1kpj6xlc2j2qx9qy7287pi0896frmxq5d7qmcwsdf372r";
|
||||
};
|
||||
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