mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-22 14:45:27 +00:00
Merging from trunk. I had to do two manual merges, quite trivial I think.
svn path=/nixpkgs/branches/stdenv-updates/; revision=18472
This commit is contained in:
commit
e85500987b
|
@ -152,6 +152,52 @@ stdenv.mkDerivation { ...
|
|||
, # Some comment...
|
||||
argN
|
||||
}:
|
||||
</programlisting>
|
||||
|
||||
</para></listitem>
|
||||
|
||||
<listitem><para>Functions should list their expected arguments as
|
||||
precisely as possible. That is, write
|
||||
|
||||
<programlisting>
|
||||
{ stdenv, fetchurl, perl }: <replaceable>...</replaceable>
|
||||
</programlisting>
|
||||
|
||||
instead of
|
||||
|
||||
<programlisting>
|
||||
args: with args; <replaceable>...</replaceable>
|
||||
</programlisting>
|
||||
|
||||
or
|
||||
|
||||
<programlisting>
|
||||
{ stdenv, fetchurl, perl, ... }: <replaceable>...</replaceable>
|
||||
</programlisting>
|
||||
|
||||
</para>
|
||||
|
||||
<para>For functions that are truly generic in the number of
|
||||
arguments (such as wrappers around <varname>mkDerivation</varname>)
|
||||
that have some required arguments, you should write them using an
|
||||
<literal>@</literal>-pattern:
|
||||
|
||||
<programlisting>
|
||||
{ stdenv, doCoverageAnalysis ? false, ... } @ args:
|
||||
|
||||
stdenv.mkDerivation (args // {
|
||||
<replaceable>...</replaceable> if doCoverageAnalysis then "bla" else "" <replaceable>...</replaceable>
|
||||
})
|
||||
</programlisting>
|
||||
|
||||
instead of
|
||||
|
||||
<programlisting>
|
||||
args:
|
||||
|
||||
args.stdenv.mkDerivation (args // {
|
||||
<replaceable>...</replaceable> if args ? doCoverageAnalysis && args.doCoverageAnalysis then "bla" else "" <replaceable>...</replaceable>
|
||||
})
|
||||
</programlisting>
|
||||
|
||||
</para></listitem>
|
||||
|
@ -161,7 +207,80 @@ stdenv.mkDerivation { ...
|
|||
</section>
|
||||
|
||||
|
||||
<section><title>File naming and organisation</title>
|
||||
<section><title>Package naming</title>
|
||||
|
||||
<para>In Nixpkgs, there are generally three different names associated with a package:
|
||||
|
||||
<itemizedlist>
|
||||
|
||||
<listitem><para>The <varname>name</varname> attribute of the
|
||||
derivation (excluding the version part). This is what most users
|
||||
see, in particular when using
|
||||
<command>nix-env</command>.</para></listitem>
|
||||
|
||||
<listitem><para>The variable name used for the instantiated package
|
||||
in <filename>all-packages.nix</filename>, and when passing it as a
|
||||
dependency to other functions. This is what Nix expression authors
|
||||
see. It can also be used when installing using <command>nix-env
|
||||
-iA</command>.</para></listitem>
|
||||
|
||||
<listitem><para>The filename for (the directory containing) the Nix
|
||||
expression.</para></listitem>
|
||||
|
||||
</itemizedlist>
|
||||
|
||||
Most of the time, these are the same. For instance, the package
|
||||
<literal>e2fsprogs</literal> has a <varname>name</varname> attribute
|
||||
<literal>"e2fsprogs-<replaceable>version</replaceable>"</literal>, is
|
||||
bound to the variable name <varname>e2fsprogs</varname> in
|
||||
<filename>all-packages.nix</filename>, and the Nix expression is in
|
||||
<filename>pkgs/os-specific/linux/e2fsprogs/default.nix</filename>.
|
||||
However, identifiers in the Nix language don’t allow certain
|
||||
characters (e.g. dashes), so sometimes a different variable name
|
||||
should be used. For instance, the
|
||||
<literal>module-init-tools</literal> package is bound to the
|
||||
<literal>module_init_tools</literal> variable in
|
||||
<filename>all-packages.nix</filename>.</para>
|
||||
|
||||
<para>There are a few naming guidelines:
|
||||
|
||||
<itemizedlist>
|
||||
|
||||
<listitem><para>Generally, try to stick to the upstream package
|
||||
name.</para></listitem>
|
||||
|
||||
<listitem><para>Don’t use uppercase letters in the
|
||||
<literal>name</literal> attribute — e.g.,
|
||||
<literal>"mplayer-1.0rc2"</literal> instead of
|
||||
<literal>"MPlayer-1.0rc2"</literal>.</para></listitem>
|
||||
|
||||
<listitem><para>The version part of the <literal>name</literal>
|
||||
attribute <emphasis>must</emphasis> start with a digit (following a
|
||||
dash) — e.g., <literal>"hello-0.3-pre-r3910"</literal> instead of
|
||||
<literal>"hello-svn-r3910"</literal>, as the latter would be seen as
|
||||
a package named <literal>hello-svn</literal> by
|
||||
<command>nix-env</command>.</para></listitem>
|
||||
|
||||
<listitem><para>Dashes in the package name should be changed to
|
||||
underscores in variable names, rather than to camel case — e.g.,
|
||||
<varname>module_init_tools</varname> instead of
|
||||
<varname>moduleInitTools</varname>.</para></listitem>
|
||||
|
||||
<listitem><para>If there are multiple versions of a package, this
|
||||
should be reflected in the variable names in
|
||||
<filename>all-packages.nix</filename>,
|
||||
e.g. <varname>hello_0_3</varname> and <varname>hello_0_4</varname>.
|
||||
If there is an obvious “default” version, make an attribute like
|
||||
<literal>hello = hello_0_4;</literal>.</para></listitem>
|
||||
|
||||
</itemizedlist>
|
||||
|
||||
</para>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
<section xml:id="sec-organisation"><title>File naming and organisation</title>
|
||||
|
||||
<para>Names of files and directories should be in lowercase, with
|
||||
dashes between words — not in camel case. For instance, it should be
|
||||
|
@ -169,7 +288,318 @@ dashes between words — not in camel case. For instance, it should be
|
|||
<filename>allPackages.nix</filename> or
|
||||
<filename>AllPackages.nix</filename>.</para>
|
||||
|
||||
<section><title>Hierachy</title>
|
||||
|
||||
<para>Each package should be stored in its own directory somewhere in
|
||||
the <filename>pkgs/</filename> tree, i.e. in
|
||||
<filename>pkgs/<replaceable>category</replaceable>/<replaceable>subcategory</replaceable>/<replaceable>...</replaceable>/<replaceable>pkgname</replaceable></filename>.
|
||||
Below are some rules for picking the right category for a package.
|
||||
Many packages fall under several categories; what matters is the
|
||||
<emphasis>primary</emphasis> purpose of a package. For example, the
|
||||
<literal>libxml2</literal> package builds both a library and some
|
||||
tools; but it’s a library foremost, so it goes under
|
||||
<filename>pkgs/development/libraries</filename>.</para>
|
||||
|
||||
<para>When in doubt, consider refactoring the
|
||||
<filename>pkgs/</filename> tree, e.g. creating new categories or
|
||||
splitting up an existing category.</para>
|
||||
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>If it’s used to support <emphasis>software development</emphasis>:</term>
|
||||
<listitem>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>If it’s a <emphasis>library</emphasis> used by other packages:</term>
|
||||
<listitem>
|
||||
<para><filename>development/libraries</filename> (e.g. <filename>libxml2</filename>)</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>If it’s a <emphasis>compiler</emphasis>:</term>
|
||||
<listitem>
|
||||
<para><filename>development/compilers</filename> (e.g. <filename>gcc</filename>)</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>If it’s an <emphasis>interpreter</emphasis>:</term>
|
||||
<listitem>
|
||||
<para><filename>development/interpreters</filename> (e.g. <filename>guile</filename>)</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>If it’s a (set of) development <emphasis>tool(s)</emphasis>:</term>
|
||||
<listitem>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>If it’s a <emphasis>parser generator</emphasis> (including lexers):</term>
|
||||
<listitem>
|
||||
<para><filename>development/tools/parsing</filename> (e.g. <filename>bison</filename>, <filename>flex</filename>)</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>If it’s a <emphasis>build manager</emphasis>:</term>
|
||||
<listitem>
|
||||
<para><filename>development/tools/build-managers</filename> (e.g. <filename>gnumake</filename>)</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>Else:</term>
|
||||
<listitem>
|
||||
<para><filename>development/tools/misc</filename> (e.g. <filename>binutils</filename>)</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>Else:</term>
|
||||
<listitem>
|
||||
<para><filename>development/misc</filename></para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>If it’s a (set of) <emphasis>tool(s)</emphasis>:</term>
|
||||
<listitem>
|
||||
<para>(A tool is a relatively small program, especially one intented
|
||||
to be used non-interactively.)</para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>If it’s for <emphasis>networking</emphasis>:</term>
|
||||
<listitem>
|
||||
<para><filename>tools/networking</filename> (e.g. <filename>wget</filename>)</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>If it’s for <emphasis>text processing</emphasis>:</term>
|
||||
<listitem>
|
||||
<para><filename>tools/text</filename> (e.g. <filename>diffutils</filename>)</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>If it’s a <emphasis>system utility</emphasis>, i.e.,
|
||||
something related or essential to the operation of a
|
||||
system:</term>
|
||||
<listitem>
|
||||
<para><filename>tools/system</filename> (e.g. <filename>cron</filename>)</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>If it’s an <emphasis>archiver</emphasis> (which may
|
||||
include a compression function):</term>
|
||||
<listitem>
|
||||
<para><filename>tools/archivers</filename> (e.g. <filename>zip</filename>, <filename>tar</filename>)</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>If it’s a <emphasis>compression</emphasis> program:</term>
|
||||
<listitem>
|
||||
<para><filename>tools/compression</filename> (e.g. <filename>gzip</filename>, <filename>bzip2</filename>)</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>If it’s a <emphasis>security</emphasis>-related program:</term>
|
||||
<listitem>
|
||||
<para><filename>tools/security</filename> (e.g. <filename>nmap</filename>, <filename>gnupg</filename>)</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>Else:</term>
|
||||
<listitem>
|
||||
<para><filename>tools/misc</filename></para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>If it’s a <emphasis>shell</emphasis>:</term>
|
||||
<listitem>
|
||||
<para><filename>shells</filename> (e.g. <filename>bash</filename>)</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>If it’s a <emphasis>server</emphasis>:</term>
|
||||
<listitem>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>If it’s a web server:</term>
|
||||
<listitem>
|
||||
<para><filename>servers/http</filename> (e.g. <filename>apache-httpd</filename>)</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>If it’s an implementation of the X Windowing System:</term>
|
||||
<listitem>
|
||||
<para><filename>servers/x11</filename> (e.g. <filename>xorg</filename> — this includes the client libraries and programs)</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>Else:</term>
|
||||
<listitem>
|
||||
<para><filename>servers/misc</filename></para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>If it’s a <emphasis>desktop environment</emphasis>
|
||||
(including <emphasis>window managers</emphasis>):</term>
|
||||
<listitem>
|
||||
<para><filename>desktops</filename> (e.g. <filename>kde</filename>, <filename>gnome</filename>, <filename>enlightenment</filename>)</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>If it’s an <emphasis>application</emphasis>:</term>
|
||||
<listitem>
|
||||
<para>A (typically large) program with a distinct user
|
||||
interface, primarily used interactively.</para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>If it’s a <emphasis>version management system</emphasis>:</term>
|
||||
<listitem>
|
||||
<para><filename>applications/version-management</filename> (e.g. <filename>subversion</filename>)</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>If it’s for <emphasis>video playback / editing</emphasis>:</term>
|
||||
<listitem>
|
||||
<para><filename>applications/video</filename> (e.g. <filename>vlc</filename>)</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>If it’s for <emphasis>graphics viewing / editing</emphasis>:</term>
|
||||
<listitem>
|
||||
<para><filename>applications/graphics</filename> (e.g. <filename>gimp</filename>)</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>If it’s for <emphasis>networking</emphasis>:</term>
|
||||
<listitem>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>If it’s a <emphasis>mailreader</emphasis>:</term>
|
||||
<listitem>
|
||||
<para><filename>applications/networking/mailreaders</filename> (e.g. <filename>thunderbird</filename>)</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>If it’s a <emphasis>newsreader</emphasis>:</term>
|
||||
<listitem>
|
||||
<para><filename>applications/networking/newsreaders</filename> (e.g. <filename>pan</filename>)</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>If it’s a <emphasis>web browser</emphasis>:</term>
|
||||
<listitem>
|
||||
<para><filename>applications/networking/browsers</filename> (e.g. <filename>firefox</filename>)</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>Else:</term>
|
||||
<listitem>
|
||||
<para><filename>applications/networking/misc</filename></para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>Else:</term>
|
||||
<listitem>
|
||||
<para><filename>applications/misc</filename></para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>If it’s <emphasis>data</emphasis> (i.e., does not have a
|
||||
straight-forward executable semantics):</term>
|
||||
<listitem>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>If it’s a <emphasis>font</emphasis>:</term>
|
||||
<listitem>
|
||||
<para><filename>data/fonts</filename></para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>If it’s related to <emphasis>SGML/XML processing</emphasis>:</term>
|
||||
<listitem>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>If it’s an <emphasis>XML DTD</emphasis>:</term>
|
||||
<listitem>
|
||||
<para><filename>data/sgml+xml/schemas/xml-dtd</filename> (e.g. <filename>docbook</filename>)</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>If it’s an <emphasis>XSLT stylesheet</emphasis>:</term>
|
||||
<listitem>
|
||||
<para>(Okay, these are executable...)</para>
|
||||
<para><filename>data/sgml+xml/stylesheets/xslt</filename> (e.g. <filename>docbook-xsl</filename>)</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>If it’s a <emphasis>game</emphasis>:</term>
|
||||
<listitem>
|
||||
<para><filename>games</filename></para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>Else:</term>
|
||||
<listitem>
|
||||
<para><filename>misc</filename></para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
|
||||
</section>
|
||||
|
||||
<section><title>Versioning</title>
|
||||
|
||||
<para>Because every version of a package in Nixpkgs creates a
|
||||
potential maintenance burden, old versions of a package should not be
|
||||
kept unless there is a good reason to do so. For instance, Nixpkgs
|
||||
contains several versions of GCC because other packages don’t build
|
||||
with the latest version of GCC. Other examples are having both the
|
||||
latest stable and latest pre-release version of a package, or to keep
|
||||
several major releases of an application that differ significantly in
|
||||
functionality.</para>
|
||||
|
||||
<para>If there is only one version of a package, its Nix expression
|
||||
should be named <filename>e2fsprogs/default.nix</filename>. If there
|
||||
are multiple versions, this should be reflected in the filename,
|
||||
e.g. <filename>e2fsprogs/1.41.8.nix</filename> and
|
||||
<filename>e2fsprogs/1.41.9.nix</filename>. The version in the
|
||||
filename should leave out unnecessary detail. For instance, if we
|
||||
keep the latest Firefox 2.0.x and 3.5.x versions in Nixpkgs, they
|
||||
should be named <filename>firefox/2.0.nix</filename> and
|
||||
<filename>firefox/3.5.nix</filename>, respectively (which, at a given
|
||||
point, might contain versions <literal>2.0.0.20</literal> and
|
||||
<literal>3.5.4</literal>). If a version requires many auxiliary
|
||||
files, you can use a subdirectory for each version,
|
||||
e.g. <filename>firefox/2.0/default.nix</filename> and
|
||||
<filename>firefox/3.5/default.nix</filename>.</para>
|
||||
|
||||
<para>All versions of a package <emphasis>must</emphasis> be included
|
||||
in <filename>all-packages.nix</filename> to make sure that they
|
||||
evaluate correctly.</para>
|
||||
|
||||
</section>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
</chapter>
|
||||
</chapter>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<chapter xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xml:id="chap-meta">
|
||||
xml:id="chap-language-support">
|
||||
|
||||
<title>Support for specific programming languages</title>
|
||||
|
||||
|
|
|
@ -25,8 +25,8 @@ $ cd nixpkgs</screen>
|
|||
<filename>pkgs/development/libraries/<replaceable>pkgname</replaceable></filename>,
|
||||
while a web browser goes into
|
||||
<filename>pkgs/applications/networking/browsers/<replaceable>pkgname</replaceable></filename>.
|
||||
See Section XXX for some hints on the tree organisation. Create a
|
||||
directory for your package, e.g.
|
||||
See <xref linkend="sec-organisation" /> for some hints on the tree
|
||||
organisation. Create a directory for your package, e.g.
|
||||
|
||||
<screen>
|
||||
$ svn mkdir pkgs/development/libraries/libfoo</screen>
|
||||
|
|
|
@ -1,116 +0,0 @@
|
|||
* Classification scheme for packages
|
||||
|
||||
- many packages fall under several categories; what matters is the
|
||||
*primary* purpose of a package. For example, the libxml2 package
|
||||
builds both a library and some tools; but it's a library foremost,
|
||||
so it goes under ./development/libraries.
|
||||
|
||||
- when in doubt, refactor.
|
||||
|
||||
IF it's used to support SOFTWARE DEVELOPMENT:
|
||||
|
||||
IF it's a LIBRARY used by other packages:
|
||||
IF it's directly related to GTK:
|
||||
./development/libraries/gtk+
|
||||
ELSE
|
||||
./development/libraries
|
||||
(e.g., libxml2)
|
||||
ELSE IF it's a COMPILER:
|
||||
./development/compilers
|
||||
(e.g., gcc)
|
||||
ELSE IF it's an INTERPRETER:
|
||||
./development/interpreters
|
||||
ELSE IF it's a development TOOL (or set of):
|
||||
IF it's a PARSER GENERATOR (incl. lexers):
|
||||
./development/tools/parsing
|
||||
(e.g., bison, flex)
|
||||
ELSE IF it's a BUILD MANAGER:
|
||||
./development/tools/build-managers
|
||||
(e.g., gnumake
|
||||
ELSE
|
||||
./development/tools/misc
|
||||
(e.g., binutils)
|
||||
ELSE
|
||||
./development/misc
|
||||
|
||||
ELSE IF it's a TOOL (or set of):
|
||||
# a tool is a relatively *small* program, esp. one intented to be
|
||||
# used non-interactively
|
||||
|
||||
IF it's for NETWORKING:
|
||||
./tools/networking
|
||||
(e.g., wget)
|
||||
ELSE IF it's for TEXT PROCESSING:
|
||||
./tools/text
|
||||
(e.g., diffutils)
|
||||
ELSE IF it's a SYSTEM utility, i.e., something related or essential
|
||||
to the operation of a system:
|
||||
./tools/system
|
||||
(e.g., init)
|
||||
ELSE IF it's an ARCHIVER (which may include a compression function):
|
||||
./tools/archivers
|
||||
(e.g., zip, tar)
|
||||
ELSE IF it's a COMPRESSION program:
|
||||
./tools/compression
|
||||
(e.g., gzip, bzip2)
|
||||
ELSE IF it's a SECURITY program:
|
||||
./tools/security
|
||||
(e.g., nmap, gnupg)
|
||||
ELSE
|
||||
./tools/misc
|
||||
|
||||
ELSE IF it's a SHELL:
|
||||
|
||||
./shells
|
||||
|
||||
ELSE IF it's a SERVER:
|
||||
|
||||
IF it's a HTTP server:
|
||||
./servers/http
|
||||
(e.g., apache)
|
||||
IF it's a X11 server:
|
||||
./servers/x11
|
||||
(e.g., xfree86)
|
||||
ELSE
|
||||
./servers/misc
|
||||
|
||||
ELSE IF it's a DESKTOP ENVIRONMENT (incl. WINDOW MANAGERS):
|
||||
|
||||
./desktops
|
||||
(e.g., kde, gnome, fvwm)
|
||||
|
||||
ELSE IF it's an APPLICATION:
|
||||
# a (typically large) program with a distinct user interface,
|
||||
# primarily used interactively
|
||||
|
||||
IF it's a VERSION MANAGEMENT system:
|
||||
./applications/version-management
|
||||
ELSE IF it's for VIDEO playback/etc:
|
||||
./applications/video
|
||||
ELSE IF it's for GRAPHICS viewing/editing/etc:
|
||||
./applications/graphics
|
||||
ELSE IF it's for NETWORKING:
|
||||
IF it's a MAILREADER:
|
||||
./applications/networking/mailreaders
|
||||
IF it's a NEWSREADER:
|
||||
./applications/networking/newsreaders
|
||||
ELSE
|
||||
./applications/networking/misc
|
||||
ELSE
|
||||
./applications/misc
|
||||
|
||||
ELSE IF it's DATA (i.e., does not have a straight-forward executable semantics):
|
||||
|
||||
IF it's related to SGML/XML processing:
|
||||
IF it's a XML DTD:
|
||||
./data/sgml+xml/schemas/xml-dtd
|
||||
ELSE IF it's an XSLT stylesheet (okay, these are executable...):
|
||||
./data/sgml+xml/stylesheets/xslt
|
||||
|
||||
ELSE IF it's a GAME:
|
||||
|
||||
./games
|
||||
|
||||
ELSE:
|
||||
|
||||
./misc
|
|
@ -1,12 +0,0 @@
|
|||
source $stdenv/setup
|
||||
|
||||
myglibc=`cat ${NIX_GCC}/nix-support/orig-libc`
|
||||
echo "glibc: $myglibc"
|
||||
|
||||
postConfigure() {
|
||||
cp $myglibc/lib/crt1.o src
|
||||
cp $myglibc/lib/crti.o src
|
||||
cp $myglibc/lib/crtn.o src
|
||||
}
|
||||
|
||||
genericBuild
|
|
@ -1,41 +0,0 @@
|
|||
Only in emacs-21.3: configure.in~
|
||||
Only in emacs-21.3: patchfile
|
||||
Only in emacs-21.3/src: Makefile.in~
|
||||
diff -rc emacs-orig/src/s/gnu-linux.h emacs-21.3/src/s/gnu-linux.h
|
||||
*** emacs-orig/src/s/gnu-linux.h 2001-09-28 17:50:04.000000000 +0200
|
||||
--- emacs-21.3/src/s/gnu-linux.h 2004-10-06 13:13:19.000000000 +0200
|
||||
***************
|
||||
*** 173,179 ****
|
||||
/* GNU/Linux usually has crt0.o in a non-standard place */
|
||||
#define START_FILES pre-crt0.o /usr/lib/crt0.o
|
||||
#else
|
||||
! #define START_FILES pre-crt0.o /usr/lib/crt1.o /usr/lib/crti.o
|
||||
#endif
|
||||
|
||||
#ifdef __ELF__
|
||||
--- 173,179 ----
|
||||
/* GNU/Linux usually has crt0.o in a non-standard place */
|
||||
#define START_FILES pre-crt0.o /usr/lib/crt0.o
|
||||
#else
|
||||
! #define START_FILES pre-crt0.o crt1.o crti.o
|
||||
#endif
|
||||
|
||||
#ifdef __ELF__
|
||||
***************
|
||||
*** 225,231 ****
|
||||
#else
|
||||
#undef LIB_GCC
|
||||
#define LIB_GCC
|
||||
! #define LIB_STANDARD -lgcc -lc -lgcc /usr/lib/crtn.o
|
||||
#endif
|
||||
|
||||
/* Don't use -g in test compiles in configure.
|
||||
--- 225,231 ----
|
||||
#else
|
||||
#undef LIB_GCC
|
||||
#define LIB_GCC
|
||||
! #define LIB_STANDARD -lgcc -lc -lgcc crtn.o
|
||||
#endif
|
||||
|
||||
/* Don't use -g in test compiles in configure.
|
||||
Only in emacs-21.3/src/s: gnu-linux.h~
|
|
@ -1,28 +0,0 @@
|
|||
{ xawSupport ? true
|
||||
, xpmSupport ? true
|
||||
, xaw3dSupport ? false
|
||||
, stdenv, fetchurl, ncurses, x11, libXaw ? null, libXpm ? null, Xaw3d ? null
|
||||
}:
|
||||
|
||||
assert xawSupport && !xaw3dSupport -> libXaw != null;
|
||||
assert xawSupport && xaw3dSupport -> Xaw3d != null;
|
||||
assert xpmSupport -> libXpm != null;
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "emacs-21.4a";
|
||||
builder = ./builder.sh;
|
||||
src = fetchurl {
|
||||
url = http://nixos.org/tarballs/emacs-21.4a.tar.gz;
|
||||
md5 = "8f9d97cbd126121bd5d97e5e31168a87";
|
||||
};
|
||||
patches = [./crt.patch];
|
||||
buildInputs = [
|
||||
ncurses x11
|
||||
(if xawSupport then if xaw3dSupport then Xaw3d else libXaw else null)
|
||||
(if xpmSupport then libXpm else null)
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "All Hail Emacs, the ultimate editor";
|
||||
};
|
||||
}
|
|
@ -1,27 +0,0 @@
|
|||
source $stdenv/setup
|
||||
|
||||
preConfigure() {
|
||||
libc=$(cat ${NIX_GCC}/nix-support/orig-libc)
|
||||
echo "libc: $libc"
|
||||
|
||||
case "${system}" in
|
||||
x86_64-*) glibclibdir=lib64 ;;
|
||||
*) glibclibdir=lib ;;
|
||||
esac
|
||||
|
||||
for i in src/s/*.h src/m/*.h; do
|
||||
substituteInPlace $i \
|
||||
--replace /usr/${glibclibdir}/crt1.o $libc/${glibclibdir}/crt1.o \
|
||||
--replace /usr/${glibclibdir}/crti.o $libc/${glibclibdir}/crti.o \
|
||||
--replace /usr/${glibclibdir}/crtn.o $libc/${glibclibdir}/crtn.o \
|
||||
--replace /usr/lib/crt1.o $libc/${glibclibdir}/crt1.o \
|
||||
--replace /usr/lib/crti.o $libc/${glibclibdir}/crti.o \
|
||||
--replace /usr/lib/crtn.o $libc/${glibclibdir}/crtn.o
|
||||
done
|
||||
|
||||
for i in Makefile.in ./src/Makefile.in ./lib-src/Makefile.in ./leim/Makefile.in; do
|
||||
substituteInPlace $i --replace /bin/pwd pwd
|
||||
done
|
||||
}
|
||||
|
||||
genericBuild
|
|
@ -1,48 +0,0 @@
|
|||
{ xawSupport ? true
|
||||
, xpmSupport ? true
|
||||
, xaw3dSupport ? false
|
||||
, gtkGUI ? false
|
||||
, stdenv, fetchurl, x11, libXaw ? null, libXpm ? null, Xaw3d ? null
|
||||
, pkgconfig ? null, gtk ? null
|
||||
, ncurses
|
||||
}:
|
||||
|
||||
assert xawSupport && !xaw3dSupport -> libXaw != null;
|
||||
assert xawSupport && xaw3dSupport -> Xaw3d != null;
|
||||
assert xpmSupport -> libXpm != null;
|
||||
assert gtkGUI -> pkgconfig != null && gtk != null;
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "emacs-22.3";
|
||||
|
||||
builder = ./builder.sh;
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnu/emacs/${name}.tar.gz";
|
||||
sha256 = "05hd89bchcpwzcx5la0alcp0wb7xywvnf98dxrshrqlfvccvgnbv";
|
||||
};
|
||||
|
||||
buildInputs = [ncurses x11]
|
||||
++ stdenv.lib.optional xawSupport (if xaw3dSupport then Xaw3d else libXaw)
|
||||
++ stdenv.lib.optional xpmSupport libXpm
|
||||
++ stdenv.lib.optionals gtkGUI [pkgconfig gtk];
|
||||
|
||||
configureFlags =
|
||||
stdenv.lib.optional gtkGUI "--with-x-toolkit=gtk";
|
||||
|
||||
meta = {
|
||||
description = "GNU Emacs, *the* text editor";
|
||||
|
||||
longDescription = ''
|
||||
GNU Emacs is an extensible, customizable text editor—and more.
|
||||
At its core is an interpreter for Emacs Lisp, a dialect of the
|
||||
Lisp programming language with extensions to support text
|
||||
editing.
|
||||
'';
|
||||
|
||||
homepage = http://www.gnu.org/software/emacs/;
|
||||
license = "GPLv3+";
|
||||
|
||||
platforms = stdenv.lib.platforms.linux; # GTK & co. are needed.
|
||||
};
|
||||
}
|
|
@ -12,12 +12,12 @@ composableDerivation.composableDerivation {} {
|
|||
"-DWITH_INTERNAL_SQLITE3=TRUE"
|
||||
];
|
||||
|
||||
name = "qgis-${version}";
|
||||
name = "qgis-1.0.1-2";
|
||||
|
||||
# src = args.fetchsvn { url=https://svn.qgis.org/repos/qgis/trunk/qgis;
|
||||
# md5="ac0560e0a2d4e6258c8639f1e9b56df3"; rev="7704"; };
|
||||
src = fetchurl {
|
||||
url = "http://download.osgeo.org/qgis/src/qgis_${version}.tar.gz";
|
||||
url = "http://download.osgeo.org/qgis/src/qgis_1.0.1-2.tar.gz";
|
||||
sha256 = "07yyic9sn1pz20wjk7k560jwqz6b19rhf2gawybz38xq1f8rjwd4";
|
||||
};
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ rec {
|
|||
++ (lib.optional externalPurple2 "postInstall")
|
||||
;
|
||||
|
||||
name = "carrier-" + version;
|
||||
name = "carrier-2.5.0";
|
||||
meta = {
|
||||
description = "Carrier - PidginIM GUI fork with user-friendly development model";
|
||||
homepage = http://funpidgin.sf.net;
|
||||
|
|
|
@ -1,19 +1,24 @@
|
|||
args : with args;
|
||||
{ stdenv, fetchurl, aspell, qt4, zlib, sox, libX11, xproto, libSM, libICE, qca2 }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "psi-0.12.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = mirror://sourceforge/psi/psi-0.12.1.tar.bz2;
|
||||
url = "mirror://sourceforge/psi/${name}.tar.bz2";
|
||||
sha256 = "0zi71fcia9amcasa6zrvfyghdpqa821iv2rkj53bq5dyvfm2y0m8";
|
||||
};
|
||||
|
||||
buildInputs = [aspell qt4 zlib sox libX11 xproto libSM libICE qca2];
|
||||
|
||||
NIX_CFLAGS_COMPILE="-I${qca2}/include/QtCrypto";
|
||||
|
||||
NIX_LDFLAGS="-lqca";
|
||||
|
||||
configureFlags = [ " --with-zlib-inc=${zlib}/include "
|
||||
" --disable-bundled-qca" ];
|
||||
configureFlags =
|
||||
[ " --with-zlib-inc=${zlib}/include "
|
||||
" --disable-bundled-qca"
|
||||
];
|
||||
|
||||
name = "psi-" + version;
|
||||
meta = {
|
||||
description = "Psi, an XMPP (Jabber) client";
|
||||
};
|
|
@ -16,7 +16,7 @@ rec {
|
|||
/* doConfigure should be specified separately */
|
||||
phaseNames = ["installPythonPackage" (makeManyWrappers ''$out/bin/*'' ''--prefix PYTHONPATH : $(toPythonPath $out)'')];
|
||||
|
||||
name = "codeville-" + version;
|
||||
name = "codeville-0.8.0";
|
||||
meta = {
|
||||
description = "Codeville - RCS with powerful merge.";
|
||||
};
|
||||
|
|
|
@ -20,7 +20,7 @@ rec {
|
|||
autoconf -I .
|
||||
'') ["minInit" "addInputs" "doUnpack"];
|
||||
|
||||
name = "monotone-viz-" + version;
|
||||
name = "monotone-viz-mtn-head";
|
||||
meta = {
|
||||
description = "Monotone commit tree visualizer";
|
||||
maintainers = [args.lib.maintainers.raskin];
|
||||
|
|
|
@ -38,7 +38,7 @@ rec {
|
|||
ln -s $fullOut/static $out/share/viewmtn/
|
||||
'') ["minInit" "defEnsureDir" "addInputs" "doUnpack"];
|
||||
|
||||
name = "viewmtn-" + version;
|
||||
name = "viewmtn-0.10";
|
||||
meta = {
|
||||
description = "Monotone web interface";
|
||||
};
|
||||
|
|
|
@ -13,11 +13,11 @@ args : with args;
|
|||
let
|
||||
doCopy = fullDepEntry ("
|
||||
ensureDir \$out/share/qemu-images
|
||||
cp linux-${version}.img \$out/share/qemu-images/
|
||||
cp linux-0.2.img \$out/share/qemu-images/
|
||||
") [minInit doUnpack defEnsureDir];
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
name = "QEmu-Linux-Image-"+version;
|
||||
name = "QEmu-Linux-Image-0.2";
|
||||
builder = writeScript (name + "-builder")
|
||||
(textClosure localDefs [doCopy doForceShare doPropagate]);
|
||||
meta = {
|
||||
|
|
|
@ -373,10 +373,6 @@ let inherit (builtins) head tail trace; in
|
|||
/*debug = x:(trace x x);
|
||||
debugX = x:(trace (toXML x) x);*/
|
||||
|
||||
replaceScriptVar = file: name: value: "sed -e 's`^${name}=.*`${name}='\\''${value}'\\''`' -i ${file}";
|
||||
replaceInScript = file: l: concatStringsSep "\n" ((pairMap (replaceScriptVar file) l));
|
||||
replaceScripts = l: concatStringsSep "\n" (pairMap replaceInScript l);
|
||||
doReplaceScripts = fullDepEntry (replaceScripts (attrByPath ["shellReplacements"] [] args)) ["minInit"];
|
||||
makeNest = x: if x == defNest.text then x else "startNest\n" + x + "\nstopNest\n";
|
||||
textClosure = a: steps: textClosureMap makeNest a (["defNest"] ++ steps);
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ expHash=$3
|
|||
|
||||
hashType=$NIX_HASH_ALGO
|
||||
if test -z "$hashType"; then
|
||||
hashType=md5
|
||||
hashType=sha256
|
||||
fi
|
||||
|
||||
if test -z "$url"; then
|
||||
|
@ -36,15 +36,19 @@ if test -z "$finalPath"; then
|
|||
trap "rm -rf $tmpPath" EXIT
|
||||
|
||||
# Perform the checkout.
|
||||
git clone --depth 1 "$url" $tmpFile
|
||||
git clone "$url" $tmpFile 1>&2
|
||||
if test -n "$rev"; then
|
||||
cd $tmpFile
|
||||
echo $tmpFile
|
||||
git checkout $rev
|
||||
echo $tmpFile >&2
|
||||
git checkout $rev 1>&2
|
||||
fi
|
||||
# Allow doing additional processing before .git removal
|
||||
eval "$NIX_PREFETCH_GIT_CHECKOUT_HOOK"
|
||||
find $tmpFile -name .git\* | xargs rm -rf
|
||||
if test "$NIX_PREFETCH_GIT_LEAVE_DOT_GIT" != 1
|
||||
then
|
||||
echo "removing \`.git'..." >&2
|
||||
rm -rf .git
|
||||
fi
|
||||
|
||||
# Compute the hash.
|
||||
hash=$(nix-hash --type $hashType $hashFormat $tmpFile)
|
||||
|
|
9
pkgs/build-support/fetchhg/builder.sh
Normal file
9
pkgs/build-support/fetchhg/builder.sh
Normal file
|
@ -0,0 +1,9 @@
|
|||
source $stdenv/setup
|
||||
|
||||
header "getting $url${tag:+ ($tag)} into $out"
|
||||
|
||||
hg clone ${tag:+-r "$tag"} "$url" "$out"
|
||||
|
||||
rm -rf "$out/.hg"
|
||||
|
||||
stopNest
|
|
@ -1,7 +1,8 @@
|
|||
{stdenv, mercurial, nix}: {url, tag ? null, md5}:
|
||||
|
||||
# TODO: statically check if mercurial as the https support if the url starts woth https.
|
||||
stdenv.mkDerivation {
|
||||
name = "fetchdarcs";
|
||||
name = "fetchhg";
|
||||
builder = ./builder.sh;
|
||||
buildInputs = [mercurial nix];
|
||||
|
||||
|
|
|
@ -1,6 +1,3 @@
|
|||
# Argh, this thing is duplicated (more-or-less) in Nix (in corepkgs).
|
||||
# Need to find a way to combine them.
|
||||
|
||||
{stdenv, curl}: # Note that `curl' may be `null', in case of the native stdenv.
|
||||
|
||||
let
|
||||
|
|
|
@ -22,10 +22,18 @@ rec {
|
|||
|
||||
sf = sourceforge;
|
||||
|
||||
# GNU.
|
||||
# GNU (http://www.gnu.org/prep/ftp.html).
|
||||
gnu = [
|
||||
# This one redirects to a (supposedly) nearby and (supposedly) up-to-date
|
||||
# mirror.
|
||||
http://ftpmirror.gnu.org/
|
||||
|
||||
http://ftp.nluug.nl/pub/gnu/
|
||||
http://mirrors.kernel.org/gnu/
|
||||
ftp://mirror.cict.fr/gnu/
|
||||
ftp://ftp.cs.tu-berlin.de/pub/gnu/
|
||||
ftp://ftp.chg.ru/pub/gnu/
|
||||
|
||||
http://ftp.gnu.org/pub/gnu/
|
||||
];
|
||||
|
||||
|
@ -209,6 +217,7 @@ rec {
|
|||
http://ftp.funet.fi/pub/linux/mirrors/opensuse/
|
||||
http://ftp5.gwdg.de/pub/opensuse/
|
||||
http://ftp.opensuse.org/pub/opensuse/
|
||||
http://ftp5.gwdg.de/pub/opensuse/discontinued/
|
||||
];
|
||||
|
||||
# Gnome (see http://ftp.gnome.org/pub/GNOME/MIRRORS).
|
||||
|
|
|
@ -36,6 +36,32 @@ stdenv.mkDerivation (
|
|||
|
||||
preConfigurePhases = "autoconfPhase";
|
||||
postPhases = "finalPhase";
|
||||
|
||||
# Autoconfiscate the sources.
|
||||
autoconfPhase = ''
|
||||
export VERSION=${version}
|
||||
export VERSION_SUFFIX=${versionSuffix}
|
||||
|
||||
# `svn-revision' is set for backwards compatibility with the old
|
||||
# Nix buildfarm. (Stratego/XT's autoxt uses it. We should
|
||||
# update it eventually.)
|
||||
echo ${versionSuffix} | sed -e s/pre// > svn-revision
|
||||
|
||||
eval "$preAutoconf"
|
||||
|
||||
if test -x ./bootstrap; then ./bootstrap
|
||||
elif test -x ./bootstrap.sh; then ./bootstrap.sh
|
||||
elif test -x ./autogen.sh; then ./autogen.sh
|
||||
elif test -x ./autogen ; then ./autogen
|
||||
elif test -x ./reconf; then ./reconf
|
||||
elif test -f ./configure.in || test -f ./configure.ac; then
|
||||
autoreconf --install --force --verbose
|
||||
else
|
||||
echo "No bootstrap, bootstrap.sh, configure.in or configure.ac. Assuming this is not an GNU Autotools package."
|
||||
fi
|
||||
|
||||
eval "$postAutoconf"
|
||||
'';
|
||||
}
|
||||
|
||||
# Then, the caller-supplied attributes.
|
||||
|
@ -64,42 +90,18 @@ stdenv.mkDerivation (
|
|||
|
||||
nextPostUnpack = if args ? postUnpack then args.postUnpack else "";
|
||||
|
||||
# Autoconfiscate the sources.
|
||||
autoconfPhase = ''
|
||||
export VERSION=${version}
|
||||
export VERSION_SUFFIX=${versionSuffix}
|
||||
|
||||
# `svn-revision' is set for backwards compatibility with the old
|
||||
# Nix buildfarm. (Stratego/XT's autoxt uses it. We should
|
||||
# update it eventually.)
|
||||
echo ${versionSuffix} | sed -e s/pre// > svn-revision
|
||||
|
||||
eval "$preAutoconf"
|
||||
|
||||
if test -f ./bootstrap; then ./bootstrap
|
||||
elif test -f ./bootstrap.sh; then ./bootstrap.sh
|
||||
elif test -f ./reconf; then ./reconf
|
||||
elif test -f ./configure.in || test -f ./configure.ac; then
|
||||
autoreconf --install --force --verbose
|
||||
else
|
||||
echo "No bootstrap, bootstrap.sh, configure.in or configure.ac. Assuming this is not an GNU Autotools package."
|
||||
fi
|
||||
|
||||
eval "$postAutoconf"
|
||||
'';
|
||||
|
||||
# Cause distPhase to copy tar.bz2 in addition to tar.gz.
|
||||
tarballs = "*.tar.gz *.tar.bz2";
|
||||
tarballs = "*.tar.gz *.tar.bz2 *.tar.xz";
|
||||
|
||||
finalPhase = ''
|
||||
for i in $out/tarballs/*; do
|
||||
for i in "$out/tarballs/"*; do
|
||||
echo "file source-dist $i" >> $out/nix-support/hydra-build-products
|
||||
done
|
||||
|
||||
# Try to figure out the release name.
|
||||
releaseName=$( (cd $out/tarballs && ls) | head -n 1 | sed -e 's^\.[a-z].*^^')
|
||||
test -n "$releaseName" && (echo "$releaseName" >> $out/nix-support/hydra-release-name)
|
||||
''; # */
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
inherit src;
|
||||
|
|
71
pkgs/build-support/trivial-builders.nix
Normal file
71
pkgs/build-support/trivial-builders.nix
Normal file
|
@ -0,0 +1,71 @@
|
|||
{ stdenv, lndir }:
|
||||
|
||||
rec {
|
||||
|
||||
# Run the shell command `buildCommand' to produce a store path named
|
||||
# `name'. The attributes in `env' are added to the environment
|
||||
# prior to running the command.
|
||||
runCommand = name: env: buildCommand:
|
||||
stdenv.mkDerivation ({
|
||||
inherit name buildCommand;
|
||||
} // env);
|
||||
|
||||
|
||||
# Create a single file.
|
||||
writeTextFile =
|
||||
{ name # the name of the derivation
|
||||
, text
|
||||
, executable ? false # run chmod +x ?
|
||||
, destination ? "" # relative path appended to $out eg "/bin/foo"
|
||||
}:
|
||||
runCommand name {inherit text executable; }
|
||||
''
|
||||
n=$out${destination}
|
||||
mkdir -p "$(dirname "$n")"
|
||||
echo -n "$text" > "$n"
|
||||
(test -n "$executable" && chmod +x "$n") || true
|
||||
'';
|
||||
|
||||
|
||||
# Shorthands for `writeTextFile'.
|
||||
writeText = name: text: writeTextFile {inherit name text;};
|
||||
writeScript = name: text: writeTextFile {inherit name text; executable = true;};
|
||||
writeScriptBin = name: text: writeTextFile {inherit name text; executable = true; destination = "/bin/${name}";};
|
||||
|
||||
|
||||
# Create a forest of symlinks to the files in `paths'.
|
||||
symlinkJoin = name: paths:
|
||||
runCommand name { inherit paths; }
|
||||
''
|
||||
mkdir -p $out
|
||||
for i in $paths; do
|
||||
${lndir}/bin/lndir $i $out
|
||||
done
|
||||
'';
|
||||
|
||||
|
||||
# Make a package that just contains a setup hook with the given contents.
|
||||
makeSetupHook = script:
|
||||
runCommand "hook" {}
|
||||
''
|
||||
ensureDir $out/nix-support
|
||||
cp ${script} $out/nix-support/setup-hook
|
||||
'';
|
||||
|
||||
|
||||
# Write the references (i.e. the runtime dependencies in the Nix store) of `path' to a file.
|
||||
writeReferencesToFile = path: runCommand "runtime-deps"
|
||||
{
|
||||
exportReferencesGraph = ["graph" path];
|
||||
}
|
||||
''
|
||||
touch $out
|
||||
while read path; do
|
||||
echo $path >> $out
|
||||
read dummy
|
||||
read nrRefs
|
||||
for ((i = 0; i < nrRefs; i++)); do read ref; done
|
||||
done < graph
|
||||
'';
|
||||
|
||||
}
|
|
@ -252,15 +252,6 @@ rec {
|
|||
'';
|
||||
|
||||
|
||||
modifyDerivation = f: attrs:
|
||||
let attrsCleaned = removeAttrs attrs ["meta" "passthru" "outPath" "drvPath"];
|
||||
newDrv = derivation (attrsCleaned // (f attrs));
|
||||
in newDrv //
|
||||
{ meta = if attrs ? meta then attrs.meta else {};
|
||||
passthru = if attrs ? passthru then attrs.passthru else {};
|
||||
};
|
||||
|
||||
|
||||
/* Run a derivation in a Linux virtual machine (using Qemu/KVM). By
|
||||
default, there is no disk image; the root filesystem is a tmpfs,
|
||||
and /nix/store is shared with the host (via the CIFS protocol to
|
||||
|
@ -282,7 +273,7 @@ rec {
|
|||
`run-vm' will be left behind in the temporary build directory
|
||||
that allows you to boot into the VM and debug it interactively. */
|
||||
|
||||
runInLinuxVM = modifyDerivation (attrs: {
|
||||
runInLinuxVM = drv: lib.overrideDerivation drv (attrs: {
|
||||
builder = "${bash}/bin/sh";
|
||||
args = ["-e" (vmRunCommand qemuCommandLinux)];
|
||||
origArgs = attrs.args;
|
||||
|
@ -317,7 +308,7 @@ rec {
|
|||
- Reboot to shutdown the machine (because Qemu doesn't seem
|
||||
capable of a APM/ACPI VM shutdown).
|
||||
*/
|
||||
runInGenericVM = modifyDerivation (attrs: {
|
||||
runInGenericVM = drv: lib.overrideDerivation drv (attrs: {
|
||||
system = "i686-linux";
|
||||
builder = "${bash}/bin/sh";
|
||||
args = ["-e" (vmRunCommand qemuCommandGeneric)];
|
||||
|
|
|
@ -18,7 +18,7 @@ args : with args; with builderDefs;
|
|||
});
|
||||
in with localDefs;
|
||||
stdenv.mkDerivation rec {
|
||||
name = "clearlyU-12-"+version;
|
||||
name = "clearlyU-12-1.9";
|
||||
builder = writeScript (name + "-builder")
|
||||
(textClosure localDefs
|
||||
[doInstall doForceShare doPropagate]);
|
||||
|
|
|
@ -16,7 +16,7 @@ args : with args; with builderDefs;
|
|||
});
|
||||
in with localDefs;
|
||||
stdenv.mkDerivation rec {
|
||||
name = "junicode-"+version;
|
||||
name = "junicode-0.6.15";
|
||||
builder = writeScript (name + "-builder")
|
||||
(textClosure localDefs
|
||||
[doInstall doForceShare doPropagate]);
|
||||
|
|
|
@ -8,7 +8,7 @@ rec{
|
|||
buildInputs = [];
|
||||
phaseNames = ["doUnpack" "installFonts"];
|
||||
|
||||
name = "linux-libertine-" + version;
|
||||
name = "linux-libertine-2.7";
|
||||
meta = {
|
||||
description = "Linux Libertine Fonts";
|
||||
homepage = http://linuxlibertine.sf.net;
|
||||
|
|
|
@ -15,7 +15,7 @@ rec {
|
|||
ScaleToEm(1000);
|
||||
'';
|
||||
|
||||
name = "linux-libertine-" + version;
|
||||
name = "linux-libertine-2.7";
|
||||
meta = {
|
||||
description = "Linux Libertine Fonts";
|
||||
homepage = http://linuxlibertine.sf.net;
|
||||
|
|
|
@ -1,32 +0,0 @@
|
|||
args : with args;
|
||||
rec {
|
||||
src = fetchurl {
|
||||
url = http://ftp.de.debian.org/debian/pool/main/l/lmodern/lmodern_0.92.orig.tar.gz;
|
||||
sha256 = "0ak3n7fsi2va94gsn0pfmyby2b4g7wz9h5a0prpbx24ax1xwinls";
|
||||
};
|
||||
|
||||
buildInputs = [];
|
||||
configureFlags = [];
|
||||
|
||||
/* doConfigure should be specified separately */
|
||||
phaseNames = ["doCopy"];
|
||||
|
||||
doCopy = fullDepEntry(''
|
||||
ensureDir $out/share/texmf/fonts/enc
|
||||
ensureDir $out/share/texmf/fonts/map
|
||||
ensureDir $out/share/texmf/fonts/type1/public/lm
|
||||
ensureDir $out/share/texmf/dvips/lm
|
||||
ensureDir $out/share/texmf/dvipdfm/config
|
||||
|
||||
cp -r ./* $out/share/texmf/
|
||||
|
||||
cp dvips/lm/*.enc $out/share/texmf/fonts/enc
|
||||
cp dvips/lm/*.map $out/share/texmf/fonts/map
|
||||
cp dvips/lm/*.map $out/share/texmf/dvipdfm/config
|
||||
'') ["minInit" "defEnsureDir" "doUnpack"];
|
||||
|
||||
name = "lmodern-" + version;
|
||||
meta = {
|
||||
description = "Latin Modern font";
|
||||
};
|
||||
}
|
|
@ -1,25 +1,21 @@
|
|||
args : with args;
|
||||
rec {
|
||||
{ stdenv, fetchurl }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "lmodern-1.010x";
|
||||
|
||||
src = fetchurl {
|
||||
url = http://ftp.de.debian.org/debian/pool/main/l/lmodern/lmodern_1.010x.orig.tar.gz;
|
||||
sha256 = "0nwxj1ng7rvnp16jxcs25hbc5in65mdk4a3g3rlaq91i5qpq7mxj";
|
||||
};
|
||||
|
||||
buildInputs = [];
|
||||
configureFlags = [];
|
||||
|
||||
/* doConfigure should be specified separately */
|
||||
phaseNames = ["doCopy"];
|
||||
|
||||
doCopy = fullDepEntry(''
|
||||
installPhase = ''
|
||||
ensureDir $out/share/texmf/
|
||||
ensureDir $out/share/fonts/
|
||||
|
||||
cp -r ./* $out/share/texmf/
|
||||
cp -r fonts/{opentype,type1} $out/share/fonts/
|
||||
'') ["minInit" "defEnsureDir" "doUnpack"];
|
||||
'';
|
||||
|
||||
name = "lmodern-" + version;
|
||||
meta = {
|
||||
description = "Latin Modern font";
|
||||
};
|
|
@ -15,7 +15,7 @@ args : with args; with builderDefs;
|
|||
});
|
||||
in with localDefs;
|
||||
stdenv.mkDerivation rec {
|
||||
name = "wqy-zenhei-"+version;
|
||||
name = "wqy-zenhei-0.4.23-1";
|
||||
builder = writeScript (name + "-builder")
|
||||
(textClosure localDefs
|
||||
[doInstall doForceShare doPropagate]);
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
diff -r 21cae7efdcc6 src/cmd/cgo/main.go
|
||||
--- a/src/cmd/cgo/main.go Sat Nov 14 12:23:24 2009 -0800
|
||||
+++ b/src/cmd/cgo/main.go Sun Nov 15 00:00:09 2009 +0100
|
||||
@@ -52,6 +52,9 @@
|
||||
fatal("unknown architecture %s", arch)
|
||||
}
|
||||
|
||||
+ // Define the language of gcc error messages.
|
||||
+ os.Setenv("LC_ALL", "C");
|
||||
+
|
||||
p := openProg(input);
|
||||
for _, cref := range p.Crefs {
|
||||
// Convert C.ulong to C.unsigned long, etc.
|
76
pkgs/development/compilers/go/default.nix
Normal file
76
pkgs/development/compilers/go/default.nix
Normal file
|
@ -0,0 +1,76 @@
|
|||
{stdenv, fetchhg, bison, glibc, ed, which, bash, makeWrapper, ...}:
|
||||
|
||||
let
|
||||
version = "2009-11-12";
|
||||
md5 = "66e5803c8dc2855b339151918b6b0de5";
|
||||
in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "Go-" + version;
|
||||
|
||||
# No tarball yet.
|
||||
src = fetchhg {
|
||||
url = https://go.googlecode.com/hg/;
|
||||
tag = "release." + version;
|
||||
inherit md5;
|
||||
};
|
||||
|
||||
buildInputs = [ bison glibc ed which bash makeWrapper ];
|
||||
|
||||
patches = [
|
||||
./disable-system-dependent-tests.patch
|
||||
./cgo-set-local-to-match-gcc-error-messages.patch
|
||||
];
|
||||
|
||||
prePatch = ''
|
||||
patchShebangs ./ # replace /bin/bash
|
||||
# only for 386 build
|
||||
# !!! substituteInPlace does not seems to be effective.
|
||||
sed -i 's,/lib/ld-linux.so.2,${glibc}/lib/ld-linux.so.2,' src/cmd/8l/asm.c
|
||||
sed -i 's,/usr/share/zoneinfo/,${glibc}/share/zoneinfo/,' src/pkg/time/zoneinfo.go
|
||||
'';
|
||||
|
||||
GOOS = "linux";
|
||||
GOARCH = "386";
|
||||
|
||||
installPhase = ''
|
||||
ensureDir "$out/bin"
|
||||
export GOROOT="$(pwd)/"
|
||||
export GOBIN="$out/bin"
|
||||
export PATH="$GOBIN:$PATH"
|
||||
cd ./src
|
||||
./all.bash
|
||||
cd -
|
||||
|
||||
# Handle Libraries and make them availabale under /share/go.
|
||||
export GOLIB="pkg/"$GOOS"_"$GOARCH
|
||||
ensureDir "$out/lib/go/$GOLIB"
|
||||
cp -r ./$GOLIB $out/lib/go/pkg/
|
||||
|
||||
# this line set $AS $CC $GC $LD
|
||||
source ./src/Make.$GOARCH
|
||||
|
||||
# Wrap the compiler and the linker to define the location of the
|
||||
# libraries.
|
||||
wrapProgram "$out/bin/$GC" \
|
||||
--add-flags "-I" \
|
||||
--add-flags "$out/lib/go/$GOLIB"
|
||||
|
||||
wrapProgram "$out/bin/$LD" \
|
||||
--set "GOROOT" "$out/lib/go/" \
|
||||
--set "GOOS" "$GOOS" \
|
||||
--set "GOARCH" "$GOARCH"
|
||||
|
||||
# Copy the emacs configuration for Go files.
|
||||
ensureDir "$out/share/emacs/site-lisp"
|
||||
cp ./misc/emacs/* $out/share/emacs/site-lisp/ # */
|
||||
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = http://golang.org/;
|
||||
description = "The Go Programming language";
|
||||
license = "BSD";
|
||||
maintainers = with stdenv.lib.maintainers; [ pierron ];
|
||||
};
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
diff -r cb140bac9ab0 src/pkg/Makefile
|
||||
--- a/src/pkg/Makefile Thu Nov 12 14:55:26 2009 -0800
|
||||
+++ b/src/pkg/Makefile Mon Nov 16 11:50:34 2009 +0100
|
||||
@@ -100,12 +100,15 @@
|
||||
|
||||
NOTEST=\
|
||||
debug/proc\
|
||||
+ exec\
|
||||
go/ast\
|
||||
go/doc\
|
||||
go/token\
|
||||
hash\
|
||||
image\
|
||||
+ log\
|
||||
malloc\
|
||||
+ os\
|
||||
rand\
|
||||
runtime\
|
||||
syscall\
|
||||
diff -r cb140bac9ab0 src/run.bash
|
||||
--- a/src/run.bash Thu Nov 12 14:55:26 2009 -0800
|
||||
+++ b/src/run.bash Mon Nov 16 11:50:34 2009 +0100
|
||||
@@ -69,7 +69,3 @@
|
||||
./timing.sh -test
|
||||
) || exit $?
|
||||
|
||||
-(xcd ../test
|
||||
-./run
|
||||
-) || exit $?
|
||||
-
|
|
@ -1,21 +0,0 @@
|
|||
|
||||
args : with args;
|
||||
rec {
|
||||
src = fetchurl {
|
||||
url = http://www.cs.indiana.edu/~aghuloum/ikarus/ikarus-0.0.3.tar.gz;
|
||||
sha256 = "0d4vqwqfnj39l0gar2di021kcf6bfpkc6g40yapkmxm6sxpdcvjv";
|
||||
};
|
||||
|
||||
buildInputs = [gmp];
|
||||
configureFlags = [];
|
||||
|
||||
/* doConfigure should be specified separately */
|
||||
phaseNames = ["doConfigure" "doMakeInstall"];
|
||||
|
||||
name = "ikarus-" + version;
|
||||
meta = {
|
||||
description = "Ikarus - a Scheme compiler, aiming at R6RS";
|
||||
homepage = http://www.cs.indiana.edu/~aghuloum/ikarus/;
|
||||
license = "GPL3";
|
||||
};
|
||||
}
|
18
pkgs/development/compilers/ikarus/default.nix
Normal file
18
pkgs/development/compilers/ikarus/default.nix
Normal file
|
@ -0,0 +1,18 @@
|
|||
{ stdenv, fetchurl, gmp }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "ikarus-0.0.3";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://www.cs.indiana.edu/~aghuloum/ikarus/${name}.tar.gz";
|
||||
sha256 = "0d4vqwqfnj39l0gar2di021kcf6bfpkc6g40yapkmxm6sxpdcvjv";
|
||||
};
|
||||
|
||||
buildInputs = [ gmp ];
|
||||
|
||||
meta = {
|
||||
description = "Ikarus - a Scheme compiler, aiming at R6RS";
|
||||
homepage = http://www.cs.indiana.edu/~aghuloum/ikarus/;
|
||||
license = "GPL3";
|
||||
};
|
||||
}
|
|
@ -27,7 +27,7 @@ let
|
|||
") [ addInputs minInit doUnpack defEnsureDir];
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
name = "Qi-"+version;
|
||||
name = "Qi-9.1";
|
||||
builder = writeScript (name + "-builder")
|
||||
(textClosure localDefs [allBuild doForceShare doPropagate]);
|
||||
meta = {
|
||||
|
|
|
@ -41,11 +41,11 @@ rec {
|
|||
|
||||
|
||||
strategoxt = stdenv.mkDerivation rec {
|
||||
name = "strategoxt-0.18pre20033";
|
||||
name = "strategoxt-0.18pre20227";
|
||||
|
||||
src = fetchurl {
|
||||
url = "ftp://ftp.strategoxt.org/pub/stratego/StrategoXT/strategoxt-0.18pre20033.tar.gz";
|
||||
sha256 = "070052cff1fd27b2ca4bed8b6aa0238574a18922b21feae2506e6df5d2201c1c";
|
||||
url = "http://hydra.nixos.org/build/124117/download/1/strategoxt-0.18pre20227.tar.gz";
|
||||
sha256 = "c2c7a68f76c6dfaf470ed9f7bad71cddebb620b709f20b01231c3a6fd93d8150";
|
||||
};
|
||||
|
||||
buildInputs = [pkgconfig aterm sdf getopt];
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
args: import ./default.nix {
|
||||
args = args;
|
||||
sha256 = "d43862606284e659ec3acba9cddea53b772f9afb67d12aa36391d26fe1a05ad8";
|
||||
}
|
|
@ -1,16 +1,16 @@
|
|||
{args, sha256}: with args;
|
||||
{ stdenv, fetchurl }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "swi-prolog-${version}";
|
||||
name = "swi-prolog-5.6.51";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://gollem.science.uva.nl/cgi-bin/nph-download/SWI-Prolog/pl-${version}.tar.gz";
|
||||
inherit sha256;
|
||||
url = "http://gollem.science.uva.nl/cgi-bin/nph-download/SWI-Prolog/pl-5.6.51.tar.gz";
|
||||
sha256 = "d43862606284e659ec3acba9cddea53b772f9afb67d12aa36391d26fe1a05ad8";
|
||||
};
|
||||
|
||||
meta = {
|
||||
homepage = http://www.swi-prolog.org/;
|
||||
description = "A Prolog compiler and interpreter.";
|
||||
description = "A Prolog compiler and interpreter";
|
||||
license = "LGPL";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -7,18 +7,20 @@
|
|||
else stdenv.mkDerivation)
|
||||
|
||||
rec {
|
||||
name = "guile-1.9.4"; # This is an alpha release!
|
||||
name = "guile-1.9.5"; # This is an alpha release!
|
||||
src = fetchurl {
|
||||
url = "ftp://alpha.gnu.org/gnu/guile/${name}.tar.gz";
|
||||
sha256 = "1p136fb0s46q1cycfsnd7nny14ji43xva58cz39szvq36p9kjbbg";
|
||||
sha256 = "0plzdpm22fk2n5m1pjjlckfvksy13aj7n45lx1nw4334i87d6sll";
|
||||
};
|
||||
|
||||
/* 1.9.5 has funny directory names, which contain "GNU Guile"! */
|
||||
|
||||
buildInputs = [ makeWrapper gawk readline libtool libunistring pkgconfig ];
|
||||
propagatedBuildInputs = [ gmp boehmgc ];
|
||||
|
||||
patches =
|
||||
stdenv.lib.optionals (coverageAnalysis != null)
|
||||
[ ./gcov-file-name.patch ./disable-gc-sensitive-tests.patch ];
|
||||
stdenv.lib.optional (coverageAnalysis != null)
|
||||
./disable-gc-sensitive-tests.patch;
|
||||
|
||||
postInstall = ''
|
||||
wrapProgram $out/bin/guile-snarf --prefix PATH : "${gawk}/bin"
|
||||
|
|
|
@ -1,42 +0,0 @@
|
|||
This patch arranges so that we don't end up, with profiling builds, with a
|
||||
file named `<stdout>.gcov' since that confuses lcov:
|
||||
|
||||
<stdout>:cannot open source file
|
||||
geninfo: ERROR: cannot read <stdout>.gcov!
|
||||
|
||||
--- guile/libguile/c-tokenize.c 2009-09-13 13:05:15.000000000 +0200
|
||||
+++ guile/libguile/c-tokenize.c 2009-10-28 16:24:15.000000000 +0100
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
-#line 3 "<stdout>"
|
||||
+#line 3 "c-tokenize.c"
|
||||
|
||||
#define YY_INT_ALIGNED short int
|
||||
|
||||
@@ -616,7 +616,7 @@ int cookie_was_last = 0;
|
||||
#define IS_COOKIE cookie_was_last = 1
|
||||
#define IS_NOT_COOKIE cookie_was_last = 0
|
||||
|
||||
-#line 620 "<stdout>"
|
||||
+#line 620 "c-tokenize.c"
|
||||
|
||||
#define INITIAL 0
|
||||
|
||||
@@ -799,7 +799,7 @@ YY_DECL
|
||||
#line 65 "./c-tokenize.lex"
|
||||
|
||||
|
||||
-#line 803 "<stdout>"
|
||||
+#line 803 "c-tokenize.c"
|
||||
|
||||
if ( !(yy_init) )
|
||||
{
|
||||
@@ -1235,7 +1235,7 @@ YY_RULE_SETUP
|
||||
#line 181 "./c-tokenize.lex"
|
||||
ECHO;
|
||||
YY_BREAK
|
||||
-#line 1239 "<stdout>"
|
||||
+#line 1239 "c-tokenize.c"
|
||||
case YY_STATE_EOF(INITIAL):
|
||||
yyterminate();
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
args: with args;
|
||||
{ stdenv, fetchurl, aspell, pkgconfig, glib }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "enchant-" + version;
|
||||
name = "enchant-1.3.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://www.abisource.com/downloads/enchant/${version}/${name}.tar.gz";
|
||||
url = "http://www.abisource.com/downloads/enchant/1.3.0/${name}.tar.gz";
|
||||
sha256 = "1vwqwsadnp4rf8wj7d4rglvszjzlcli0jyxh06h8inka1sm1al76";
|
||||
};
|
||||
|
|
@ -29,7 +29,7 @@ args : with args;
|
|||
};
|
||||
in with localDefs;
|
||||
stdenv.mkDerivation rec {
|
||||
name = "libdbi-"+version;
|
||||
name = "libdbi-0.8.2-1";
|
||||
builder = writeScript (name + "-builder")
|
||||
(textClosure localDefs [doConfigure doMakeInstall doForceShare doPropagate]);
|
||||
meta = {
|
||||
|
|
|
@ -11,7 +11,7 @@ args : with args;
|
|||
};
|
||||
in with localDefs;
|
||||
stdenv.mkDerivation rec {
|
||||
name = "libdbi-"+version;
|
||||
name = "libdbi-0.8.2";
|
||||
builder = writeScript (name + "-builder")
|
||||
(textClosure localDefs [doConfigure doMakeInstall doForceShare doPropagate]);
|
||||
meta = {
|
||||
|
|
|
@ -11,7 +11,7 @@ args : with args;
|
|||
};
|
||||
in with localDefs;
|
||||
stdenv.mkDerivation rec {
|
||||
name = "libextractor-"+version;
|
||||
name = "libextractor-0.5.18";
|
||||
builder = writeScript (name + "-builder")
|
||||
(textClosure localDefs [doConfigure doMakeInstall doForceShare doPropagate]);
|
||||
meta = {
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
args: with args;
|
||||
{ stdenv, fetchurl, mediastreamer }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "libjingle-" + version;
|
||||
src = fetchurl {
|
||||
url = "mirror://sf/tapioca-voip/${name}.tar.gz";
|
||||
sha256 = "1x5l2jwxpkyxvnq0cagq40p6x61v23vxngnnsxr15lyh1zwzk1yj";
|
||||
};
|
||||
name = "libjingle-0.3.11";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/tapioca-voip/${name}.tar.gz";
|
||||
sha256 = "1x5l2jwxpkyxvnq0cagq40p6x61v23vxngnnsxr15lyh1zwzk1yj";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [ mediastreamer ];
|
||||
}
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
args: with args;
|
||||
{ stdenv, fetchurl, autoconf, automake, libtool
|
||||
, pkgconfig, alsaLib, ffmpeg, speex, ortp }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "mediastreamer2-" + version;
|
||||
name = "mediastreamer2-2.2.0-cvs20080207";
|
||||
|
||||
# This url is not related to mediastreamer. fetchcvs doesn't work on my laptop,
|
||||
# so I've created cvs snapshot and put it to my server.
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
args: with args;
|
||||
{ stdenv, fetchurl, ilbc, mediastreamer, pkgconfig }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "msilbc-" + version;
|
||||
name = "msilbc-2.0.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://download.savannah.gnu.org/releases/linphone/plugins/sources/${name}.tar.gz";
|
||||
sha256 = "0ifydb7qmpync56l4hbrp36n5wrb7gadb76isp643s6wsg7l743j";
|
||||
|
@ -9,6 +11,7 @@ stdenv.mkDerivation rec {
|
|||
patchPhase = "sed -i /MS_FILTER_SET_FMTP/d ilbc.c";
|
||||
|
||||
propagatedBuildInputs = [ilbc mediastreamer];
|
||||
|
||||
buildInputs = [pkgconfig];
|
||||
|
||||
buildPhase = ''
|
||||
|
@ -17,8 +20,8 @@ stdenv.mkDerivation rec {
|
|||
cc `pkg-config --libs mediastreamer` -shared -pthread -o libilbc.so
|
||||
'';
|
||||
|
||||
installPhase = "
|
||||
ensureDir \${out}/lib/mediastreamer/plugins
|
||||
cp libilbc.so \${out}/lib/mediastreamer/plugins
|
||||
";
|
||||
installPhase = ''
|
||||
ensureDir $out/lib/mediastreamer/plugins
|
||||
cp libilbc.so $out/lib/mediastreamer/plugins
|
||||
'';
|
||||
}
|
|
@ -1,10 +1,7 @@
|
|||
args: with args;
|
||||
|
||||
let name = "redland-${version}";
|
||||
in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
inherit name;
|
||||
stdenv.mkDerivation rec {
|
||||
name = "redland-1.0.8";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sf/librdf/${name}.tar.gz";
|
||||
|
|
|
@ -1,10 +1,7 @@
|
|||
args: with args;
|
||||
|
||||
let name = "redland-${version}";
|
||||
in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
inherit name;
|
||||
stdenv.mkDerivation rec {
|
||||
name = "redland-1.0.9";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sf/librdf/${name}.tar.gz";
|
||||
|
@ -21,13 +18,13 @@ stdenv.mkDerivation {
|
|||
configureFlags = "--with-threads --with-bdb=${bdb}";
|
||||
|
||||
patchPhase =
|
||||
''
|
||||
sed -e 1s@/usr@${perl}@ -i utils/touch-mtime.pl
|
||||
''
|
||||
sed -e 1s@/usr@${perl}@ -i utils/touch-mtime.pl
|
||||
|
||||
# Redland 1.0.9 uses an internal pre-processor symbol SQLITE_API
|
||||
# that collides with a symbol of the same name in sqlite 3.6.19.
|
||||
# This is a quick fix for the problem. A real solution needs to be
|
||||
# implemented upstream, though.
|
||||
find . -type f -exec sed -i -e 's/SQLITE_API/REDLAND_SQLITE_API/g' {} \;
|
||||
'';
|
||||
# Redland 1.0.9 uses an internal pre-processor symbol SQLITE_API
|
||||
# that collides with a symbol of the same name in sqlite 3.6.19.
|
||||
# This is a quick fix for the problem. A real solution needs to be
|
||||
# implemented upstream, though.
|
||||
find . -type f -exec sed -i -e 's/SQLITE_API/REDLAND_SQLITE_API/g' {} \;
|
||||
'';
|
||||
}
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
args: with args;
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "tk-${version}";
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/tcl/tk${version}-src.tar.gz";
|
||||
sha256 = "0cciavzd05bpm5yfppid0s0vsf8kabwia9620vgvi26sv1gjgwhb";
|
||||
};
|
||||
postInstall = ''
|
||||
echo -e '#! /bin/sh \n $( readlink -f $( type -tP wish${builtins.substring 0 3 version}) ) "$@"' >$out/bin/wish
|
||||
chmod a+x $out/bin/wish
|
||||
'';
|
||||
configureFlags="--with-tcl=${tcl}/lib";
|
||||
preConfigure = "cd unix";
|
||||
|
||||
buildInputs = [tcl x11];
|
||||
inherit tcl;
|
||||
}
|
|
@ -1,18 +0,0 @@
|
|||
args: with args;
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "tk-${version}";
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/tcl/tk${version}-src.tar.gz";
|
||||
sha256 = "065cbs82a8nklmj4867744skb3l3mqv14s8jwribk2wazzdb0mqp";
|
||||
};
|
||||
postInstall = ''
|
||||
echo -e '#! /bin/sh \n $( readlink -f $( type -tP wish${__substring 0 3 version}) ) "$@"' >$out/bin/wish
|
||||
chmod a+x $out/bin/wish
|
||||
'';
|
||||
configureFlags="--with-tcl=${tcl}/lib";
|
||||
preConfigure = "cd unix";
|
||||
|
||||
buildInputs = [tcl x11];
|
||||
inherit tcl;
|
||||
}
|
|
@ -1,17 +1,22 @@
|
|||
args: with args;
|
||||
{ stdenv, fetchurl, tcl, x11 }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "tk-${version}";
|
||||
name = "tk-8.5.7";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/tcl/tk${version}-src.tar.gz";
|
||||
url = "mirror://sourceforge/tcl/tk8.5.7-src.tar.gz";
|
||||
sha256 = "0c5gsy3nlwl0wn9swz4k4v7phy7nzjl317gca1jykgf4jz9nwdnr";
|
||||
};
|
||||
|
||||
postInstall = ''
|
||||
ln -s $out/bin/wish* $out/bin/wish
|
||||
'';
|
||||
configureFlags="--with-tcl=${tcl}/lib";
|
||||
|
||||
configureFlags = "--with-tcl=${tcl}/lib";
|
||||
|
||||
preConfigure = "cd unix";
|
||||
|
||||
buildInputs = [tcl x11];
|
||||
|
||||
inherit tcl;
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@ args: with args;
|
|||
let inherit (args.composableDerivation) composableDerivation wwf; in
|
||||
composableDerivation {} {
|
||||
|
||||
name = "xapian-bindings-${version}";
|
||||
name = "xapian-bindings-1.0.14";
|
||||
|
||||
src = fetchurl {
|
||||
url = http://oligarchy.co.uk/xapian/1.0.14/xapian-bindings-1.0.14.tar.gz;
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
args: with args;
|
||||
{ stdenv, fetchurl, zlib }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "xapian-${version}";
|
||||
name = "xapian-1.0.14";
|
||||
|
||||
src = fetchurl {
|
||||
url = http://oligarchy.co.uk/xapian/1.0.14/xapian-core-1.0.14.tar.gz;
|
||||
|
@ -10,8 +11,8 @@ stdenv.mkDerivation {
|
|||
buildInputs = [zlib];
|
||||
|
||||
meta = {
|
||||
description = "Xapian Probabilistic Information Retrieval library";
|
||||
homepage = "http://xapian.org";
|
||||
license = "GPLv2";
|
||||
description = "Xapian Probabilistic Information Retrieval library";
|
||||
homepage = "http://xapian.org";
|
||||
license = "GPLv2";
|
||||
};
|
||||
}
|
16
pkgs/development/python-modules/flup/default.nix
Normal file
16
pkgs/development/python-modules/flup/default.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
{ stdenv, fetchurl, python, setuptools }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "flup-r2311";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://www.saddi.com/software/flup/dist/${name}.tar.gz";
|
||||
sha256 = "15wyn6d6wla1ag91yxmlh9b4m0w1i0c2lm8ka4qfv4ijqcqakdx3";
|
||||
};
|
||||
|
||||
buildInputs = [ python setuptools ];
|
||||
|
||||
meta = {
|
||||
description = "FastCGI Python module set";
|
||||
};
|
||||
}
|
|
@ -1,18 +0,0 @@
|
|||
args : with args;
|
||||
rec {
|
||||
src = fetchurl {
|
||||
url = http://www.saddi.com/software/flup/dist/flup-r2311.tar.gz;
|
||||
sha256 = "15wyn6d6wla1ag91yxmlh9b4m0w1i0c2lm8ka4qfv4ijqcqakdx3";
|
||||
};
|
||||
|
||||
buildInputs = [python setuptools];
|
||||
configureFlags = [];
|
||||
|
||||
/* doConfigure should be specified separately */
|
||||
phaseNames = ["addInputs" "createPythonInstallationTarget" (doDump "0") "installPythonPackage"];
|
||||
|
||||
name = "flup-" + version;
|
||||
meta = {
|
||||
description = "FastCGI Python module set";
|
||||
};
|
||||
}
|
|
@ -1,4 +1,5 @@
|
|||
args : with args;
|
||||
args : with args;
|
||||
|
||||
rec {
|
||||
src = fetchurl {
|
||||
url = mirror://debian/pool/main/p/python-qt4/python-qt4_4.3.3.orig.tar.gz;
|
||||
|
@ -12,7 +13,7 @@ rec {
|
|||
phaseNames = ["doPythonConfigure" "doMakeInstall"];
|
||||
extraPythonConfigureCommand = ''echo yes | \'';
|
||||
|
||||
name = "python-qt-" + version;
|
||||
name = "python-qt-4.3.3";
|
||||
meta = {
|
||||
description = "Qt bindings for Python";
|
||||
license = "GPL";
|
||||
|
|
|
@ -11,7 +11,7 @@ rec {
|
|||
/* doConfigure should be specified separately */
|
||||
phaseNames = ["doPythonConfigure" "doMakeInstall"];
|
||||
|
||||
name = "python-sip-" + version;
|
||||
name = "python-sip-4.7.4";
|
||||
meta = {
|
||||
description = "Python/C++ bindings generator";
|
||||
};
|
||||
|
|
|
@ -34,7 +34,7 @@ rec {
|
|||
cd ..
|
||||
'') ["minInit" "doMake" "defEnsureDir" "addInputs"];
|
||||
|
||||
name = "xxdiff-" + version;
|
||||
name = "xxdiff-3.2";
|
||||
meta = {
|
||||
description = "Interactive merge tool";
|
||||
};
|
||||
|
|
|
@ -20,7 +20,7 @@ args : with args;
|
|||
};
|
||||
in with localDefs;
|
||||
stdenv.mkDerivation rec {
|
||||
name = "construo-"+version;
|
||||
name = "construo-0.2.2";
|
||||
builder = writeScript (name + "-builder")
|
||||
(textClosure localDefs ["preConfigure" "doConfigure" "doMakeInstall" "doForceShare" "doPropagate"]);
|
||||
meta = {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
args: with args;
|
||||
let localDefs = builderDefs.passthru.function {
|
||||
buildInputs =[mesa (wxGTK null) libX11 xproto];
|
||||
buildInputs =[mesa wxGTK libX11 xproto];
|
||||
src =
|
||||
fetchurl {
|
||||
url = http://www.piettes.com/fallingsandgame/fsg-src-4.4.tar.gz;
|
||||
|
|
|
@ -8,7 +8,7 @@ stdenv.mkDerivation {
|
|||
sha256 = "1756y01rkvd3f1pkj88jqh83fqcfl2fy0c48mcq53pjzln9ycv8c";
|
||||
};
|
||||
|
||||
buildInputs = [gtk glib pkgconfig mesa (wxGTK null) libX11 xproto];
|
||||
buildInputs = [gtk glib pkgconfig mesa wxGTK libX11 xproto];
|
||||
|
||||
/*
|
||||
# One day Unicode will overcome?
|
||||
|
|
33
pkgs/games/jamp/default.nix
Normal file
33
pkgs/games/jamp/default.nix
Normal file
|
@ -0,0 +1,33 @@
|
|||
a :
|
||||
let
|
||||
s = import ./src-for-default.nix;
|
||||
buildInputs = with a; [
|
||||
mesa SDL SDL_mixer SDL_image
|
||||
|
||||
];
|
||||
in
|
||||
rec {
|
||||
src = a.fetchUrlFromSrcInfo s;
|
||||
|
||||
inherit (s) name;
|
||||
inherit buildInputs;
|
||||
configureFlags = [];
|
||||
|
||||
preBuild = a.fullDepEntry (''
|
||||
sed -e "s@/usr/games@$out/bin@g" -i Makefile
|
||||
sed -e "s@/usr/@$out/@g" -i Makefile
|
||||
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${a.SDL}/include/SDL"
|
||||
'') ["minInit" "addInputs" "doUnpack"];
|
||||
|
||||
/* doConfigure should be removed if not needed */
|
||||
phaseNames = ["preBuild" "doMakeInstall"];
|
||||
|
||||
meta = {
|
||||
description = "A physics-based game";
|
||||
maintainers = [
|
||||
a.lib.maintainers.raskin
|
||||
];
|
||||
platforms = with a.lib.platforms;
|
||||
linux ++ darwin;
|
||||
};
|
||||
}
|
9
pkgs/games/jamp/src-for-default.nix
Normal file
9
pkgs/games/jamp/src-for-default.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
rec {
|
||||
version="1.0.2";
|
||||
name="jamp-1.0.2";
|
||||
hash="13cjggyx63wmlcvpyllmd7aknfd4vzhxnwm030mas7z3h6wcsmk7";
|
||||
url="http://perre.noud.ch/jamp/download.php?file=jamp-${version}.tar.gz";
|
||||
advertisedUrl="http://perre.noud.ch/jamp/download.php?file=jamp-1.0.2.tar.gz";
|
||||
|
||||
|
||||
}
|
4
pkgs/games/jamp/src-info-for-default.nix
Normal file
4
pkgs/games/jamp/src-info-for-default.nix
Normal file
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
downloadPage = "http://perre.noud.ch/jamp/";
|
||||
baseName = "jamp";
|
||||
}
|
|
@ -30,7 +30,7 @@ EOF
|
|||
});
|
||||
in with localDefs;
|
||||
stdenv.mkDerivation rec {
|
||||
name = "space-orbit-"+version;
|
||||
name = "space-orbit-1.01";
|
||||
builder = writeScript (name + "-builder")
|
||||
(textClosure localDefs
|
||||
[ customBuild doForceShare doPropagate]);
|
||||
|
|
|
@ -15,7 +15,7 @@ rec {
|
|||
|
||||
/* Return an attribute from nested attribute sets. For instance
|
||||
["x" "y"] applied to some set e returns e.x.y, if it exists. The
|
||||
default value is returned otherwise. */
|
||||
default value is returned otherwise. */
|
||||
attrByPath = attrPath: default: e:
|
||||
let attr = head attrPath;
|
||||
in
|
||||
|
@ -200,7 +200,7 @@ rec {
|
|||
|
||||
/* Does the same as the update operator '//' except that attributes are
|
||||
merged until the given pedicate is verified. The predicate should
|
||||
except 3 arguments which are the path to reach the attribute, a part of
|
||||
accept 3 arguments which are the path to reach the attribute, a part of
|
||||
the first attribute set and a part of the second attribute set. When
|
||||
the predicate is verified, the value of the first attribute set is
|
||||
replaced by the value of the second attribute set.
|
||||
|
|
61
pkgs/lib/customisation.nix
Normal file
61
pkgs/lib/customisation.nix
Normal file
|
@ -0,0 +1,61 @@
|
|||
let lib = import ./default.nix; in
|
||||
|
||||
rec {
|
||||
|
||||
|
||||
/* `overrideDerivation drv f' takes a derivation (i.e., the result
|
||||
of a call to the builtin function `derivation') and returns a new
|
||||
derivation in which the attributes of the original are overriden
|
||||
according to the function `f'. The function `f' is called with
|
||||
the original derivation attributes.
|
||||
|
||||
`overrideDerivation' allows certain "ad-hoc" customisation
|
||||
scenarios (e.g. in ~/.nixpkgs/config.nix). For instance, if you
|
||||
want to "patch" the derivation returned by a package function in
|
||||
Nixpkgs to build another version than what the function itself
|
||||
provides, you can do something like this:
|
||||
|
||||
mySed = overrideDerivation pkgs.gnused (oldAttrs: {
|
||||
name = "sed-4.2.2-pre";
|
||||
src = fetchurl {
|
||||
url = ftp://alpha.gnu.org/gnu/sed/sed-4.2.2-pre.tar.bz2;
|
||||
sha256 = "11nq06d131y4wmf3drm0yk502d2xc6n5qy82cg88rb9nqd2lj41k";
|
||||
};
|
||||
patches = [];
|
||||
});
|
||||
|
||||
For another application, see build-support/vm, where this
|
||||
function is used to build arbitrary derivations inside a QEMU
|
||||
virtual machine. */
|
||||
|
||||
overrideDerivation = drv: f:
|
||||
let
|
||||
# Filter out special attributes.
|
||||
attrs = removeAttrs drv ["meta" "passthru" "outPath" "drvPath"];
|
||||
newDrv = derivation (attrs // (f drv));
|
||||
in newDrv //
|
||||
{ meta = if drv ? meta then drv.meta else {};
|
||||
passthru = if drv ? passthru then drv.passthru else {};
|
||||
};
|
||||
|
||||
|
||||
# usage: (you can use override multiple times)
|
||||
# let d = makeOverridable stdenv.mkDerivation { name = ..; buildInputs; }
|
||||
# noBuildInputs = d.override { buildInputs = []; }
|
||||
# additionalBuildInputs = d.override ( args : args // { buildInputs = args.buildInputs ++ [ additional ]; } )
|
||||
makeOverridable = f: origArgs: f origArgs //
|
||||
{ override = newArgs:
|
||||
makeOverridable f (origArgs // (if builtins.isFunction newArgs then newArgs origArgs else newArgs));
|
||||
deepOverride = newArgs:
|
||||
makeOverridable f ((lib.mapAttrs (deepOverride newArgs) origArgs) // newArgs);
|
||||
origArgs = origArgs;
|
||||
};
|
||||
|
||||
|
||||
deepOverride = newArgs: name: x: if builtins.isAttrs x then (
|
||||
if x ? deepOverride then (x.deepOverride newArgs) else
|
||||
if x ? override then (x.override newArgs) else
|
||||
x) else x;
|
||||
|
||||
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
let lib = import ./default.nix;
|
||||
|
||||
inherit (builtins) trace attrNamesToStr isAttrs isFunction isList head substring attrNames;
|
||||
inherit (builtins) trace attrNamesToStr isAttrs isFunction isList isInt isString head substring attrNames;
|
||||
|
||||
in
|
||||
|
||||
|
@ -37,7 +37,10 @@ rec {
|
|||
else if x == true then "x is boolean true"
|
||||
else if x == false then "x is boolean false"
|
||||
else if x == null then "x is null"
|
||||
else "x is probably a string `${substring 0 50 x}...'";
|
||||
else if isInt x then "x is an integer `${toString x}'"
|
||||
else if isString x then "x is a string `${substring 0 50 x}...'"
|
||||
else "x is probably a path `${substring 0 50 (toString x)}'";
|
||||
|
||||
# trace the arguments passed to function and its result
|
||||
traceCall = n : f : a : let t = n2 : x : traceShowValMarked "${n} ${n2}:" x; in t "result" (f (t "arg 1" a));
|
||||
traceCall2 = n : f : a : b : let t = n2 : x : traceShowValMarked "${n} ${n2}:" x; in t "result" (f (t "arg 1" a) (t "arg 2" b));
|
||||
|
|
|
@ -16,6 +16,7 @@ let
|
|||
maintainers = import ./maintainers.nix;
|
||||
platforms = import ./platforms.nix;
|
||||
systems = import ./systems.nix;
|
||||
customisation = import ./customisation.nix;
|
||||
|
||||
in
|
||||
{ inherit trivial lists strings stringsWithDeps attrsets sources options
|
||||
|
@ -26,3 +27,4 @@ in
|
|||
// trivial // lists // strings // stringsWithDeps // attrsets // sources
|
||||
// properties // options // types // meta // debug // misc // modules
|
||||
// systems
|
||||
// customisation
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
eelco = "Eelco Dolstra <e.dolstra@tudelft.nl>";
|
||||
ludo = "Ludovic Courtès <ludo@gnu.org>";
|
||||
marcweber = "Marc Weber <marco-oweber@gmx.de>";
|
||||
pierron = "Nicolas B. Pierron <nixos@nbp.name>";
|
||||
raskin = "Michael Raskin <7c6f434c@mail.ru>";
|
||||
sander = "Sander van der Burg <s.vanderburg@tudelft.nl>";
|
||||
viric = "Lluís Batlle i Rossell <viriketo@gmail.com>";
|
||||
|
|
|
@ -9,23 +9,6 @@ with import ./strings.nix;
|
|||
|
||||
rec {
|
||||
|
||||
|
||||
# accumulates / merges all attr sets until null is fed.
|
||||
# example: sumArgs id { a = 'a'; x = 'x'; } { y = 'y'; x = 'X'; } null
|
||||
# result : { a = 'a'; x = 'X'; y = 'Y'; }
|
||||
innerSumArgs = f : x : y : (if y == null then (f x)
|
||||
else (innerSumArgs f (x // y)));
|
||||
sumArgs = f : innerSumArgs f {};
|
||||
|
||||
# Advanced sumArgs version. Hm, twice as slow, I'm afraid.
|
||||
# composedArgs id (x:x//{a="b";}) (x:x//{b=x.a + "c";}) null;
|
||||
# {a="b" ; b="bc";};
|
||||
innerComposedArgs = f : x : y : (if y==null then (f x)
|
||||
else (if (builtins.isAttrs y) then
|
||||
(innerComposedArgs f (x//y))
|
||||
else (innerComposedArgs f (y x))));
|
||||
composedArgs = f: innerComposedArgs f {};
|
||||
|
||||
defaultMergeArg = x : y: if builtins.isAttrs y then
|
||||
y
|
||||
else
|
||||
|
@ -105,14 +88,6 @@ rec {
|
|||
# }
|
||||
composedArgsAndFun = f: foldArgs defaultMerge f {};
|
||||
|
||||
# example a = pairMap (x : y : x + y) ["a" "b" "c" "d"];
|
||||
# result: ["ab" "cd"]
|
||||
innerPairMap = acc: f: l:
|
||||
if l == [] then acc else
|
||||
innerPairMap (acc ++ [(f (head l)(head (tail l)))])
|
||||
f (tail (tail l));
|
||||
pairMap = innerPairMap [];
|
||||
|
||||
|
||||
# shortcut for attrByPath ["name"] default attrs
|
||||
maybeAttr = name: default: attrs:
|
||||
|
@ -321,12 +296,6 @@ rec {
|
|||
flattenAttrs = set : map ( attr : builtins.getAttr attr set) (attrNames set);
|
||||
mapIf = cond : f : fold ( x : l : if (cond x) then [(f x)] ++ l else l) [];
|
||||
|
||||
# pick attrs subset_attr_names and apply f
|
||||
subsetmap = f : attrs : subset_attr_names :
|
||||
listToAttrs (fold ( attr : r : if hasAttr attr attrs
|
||||
then r ++ [ ( nameValuePair attr ( f (getAttr attr attrs) ) ) ] else r ) []
|
||||
subset_attr_names );
|
||||
|
||||
# prepareDerivationArgs tries to make writing configurable derivations easier
|
||||
# example:
|
||||
# prepareDerivationArgs {
|
||||
|
|
|
@ -17,7 +17,7 @@ postInstall = fullDepEntry (''
|
|||
'') [minInit doMakeInstall];
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
name = "atheros-"+version;
|
||||
name = "atheros-0.9.4";
|
||||
builder = writeScript (name + "-builder")
|
||||
(textClosure localDefs [doMakeInstall
|
||||
postInstall doForceShare doPropagate]);
|
||||
|
|
22
pkgs/os-specific/linux/jfsrec/default.nix
Normal file
22
pkgs/os-specific/linux/jfsrec/default.nix
Normal file
|
@ -0,0 +1,22 @@
|
|||
{ stdenv, fetchurl, boost }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "jfsrec-pre-svn-7";
|
||||
|
||||
src = fetchurl {
|
||||
url = http://downloads.sourceforge.net/jfsrec/jfsrec-svn-7.tar.gz;
|
||||
sha256 = "163z6ljr05vw2k5mj4fim2nlg4khjyibrii95370pvn474mg28vg";
|
||||
};
|
||||
|
||||
buildInputs = [ boost ];
|
||||
|
||||
preConfigure =
|
||||
''
|
||||
sed -e '/[#]include [<]config.h[>]/a\#include <string.h>' -i src/unicode_to_utf8.cpp
|
||||
cat src/unicode_to_utf8.cpp
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "JFS recovery tool";
|
||||
};
|
||||
}
|
|
@ -1,23 +0,0 @@
|
|||
args : with args;
|
||||
rec {
|
||||
src = fetchurl {
|
||||
url = http://downloads.sourceforge.net/jfsrec/jfsrec-svn-7.tar.gz;
|
||||
sha256 = "163z6ljr05vw2k5mj4fim2nlg4khjyibrii95370pvn474mg28vg";
|
||||
};
|
||||
|
||||
buildInputs = [boost];
|
||||
configureFlags = [];
|
||||
|
||||
doFixInc = fullDepEntry (''
|
||||
sed -e '/[#]include [<]config.h[>]/a\#include <string.h>' -i src/unicode_to_utf8.cpp
|
||||
cat src/unicode_to_utf8.cpp
|
||||
'') ["minInit" "doUnpack"];
|
||||
|
||||
/* doConfigure should be specified separately */
|
||||
phaseNames = ["doFixInc" "doConfigure" "doMakeInstall"];
|
||||
|
||||
name = "jfsrec-" + version;
|
||||
meta = {
|
||||
description = "JFS recovery tool";
|
||||
};
|
||||
}
|
|
@ -1,37 +1,28 @@
|
|||
args : with args;
|
||||
rec {
|
||||
name = "kqemu-"+version;
|
||||
{ stdenv, fetchurl, kernel, perl }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "kqemu-1.4.0pre1";
|
||||
|
||||
src = fetchurl {
|
||||
url = http://www.nongnu.org/qemu/kqemu-1.4.0pre1.tar.gz;
|
||||
url = "http://www.nongnu.org/qemu/${name}.tar.gz";
|
||||
sha256 = "14dlmawn3gia1j401ag5si5k1a1vav7jpv86rl37p1hwmr7fihxs";
|
||||
};
|
||||
|
||||
buildInputs = [perl];
|
||||
|
||||
configureFlags = [''--PREFIx=$out'' ''--kernel-path=$(ls -d ${kernel}/lib/modules/*/build)''];
|
||||
debugStep = fullDepEntry (''
|
||||
cat config-host.mak
|
||||
'') ["minInit"];
|
||||
preConfigure = fullDepEntry (''
|
||||
|
||||
preConfigure = ''
|
||||
sed -e '/#include/i#include <linux/sched.h>' -i kqemu-linux.c
|
||||
|
||||
sed -e 's/memset/mymemset/g; s/memcpy/mymemcpy/g; s/void [*]my/static void *my/g' -i common/kern
|
||||
sed -e 's/`uname -r`/'"$(basename ${kernel}/lib/modules/*)"'/' -i install.sh
|
||||
sed -e '/kernel_path=/akernel_path=$out$kernel_path' -i install.sh
|
||||
sed -e '/depmod/d' -i install.sh
|
||||
cat install.sh
|
||||
'') ["minInit" "doUnpack"];
|
||||
fixInc = {
|
||||
text = ''
|
||||
sed -e '/#include/i#include <linux/sched.h>' -i kqemu-linux.c
|
||||
'';
|
||||
deps = ["minInit" "doUnpack"];
|
||||
};
|
||||
fixMemFunc = {
|
||||
text=''
|
||||
sed -e 's/memset/mymemset/g; s/memcpy/mymemcpy/g; s/void [*]my/static void *my/g' -i common/kernel.c
|
||||
'';
|
||||
deps = ["minInit" "doUnpack"];
|
||||
};
|
||||
phaseNames = ["fixInc" "fixMemFunc" "preConfigure" "doConfigure" "debugStep" "doMakeInstall"];
|
||||
|
||||
''; # */
|
||||
|
||||
meta = {
|
||||
description = " Kernel module for Qemu acceleration ";
|
||||
description = "Kernel module for Qemu acceleration";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ args : with args; with builderDefs;
|
|||
}) // args);
|
||||
in with localDefs;
|
||||
stdenv.mkDerivation rec {
|
||||
name = "dict-"+version;
|
||||
name = "dict-1.9.15";
|
||||
builder = writeScript (name + "-builder")
|
||||
(textClosure localDefs
|
||||
[doConfigure doMakeInstall doForceShare doPropagate]);
|
||||
|
|
|
@ -12,7 +12,7 @@ rec {
|
|||
/* doConfigure should be specified separately */
|
||||
phaseNames = ["doConfigure" "doMakeInstall"];
|
||||
|
||||
name = "bind-" + version;
|
||||
name = "bind-9.5.0";
|
||||
meta = {
|
||||
description = "ISC BIND: a domain name server";
|
||||
};
|
||||
|
|
|
@ -1,22 +0,0 @@
|
|||
args : with args;
|
||||
rec {
|
||||
src = fetchurl {
|
||||
url = http://linux.schottelius.org/gpm/archives/gpm-1.20.6.tar.lzma;
|
||||
sha256 = "13w61bh9nyjaa0n5a7qq1rvbqxjbxpqz5qmdmqqpqgrd2jlviar7";
|
||||
};
|
||||
|
||||
buildInputs = [lzma flex bison ncurses];
|
||||
configureFlags = [];
|
||||
|
||||
/* doConfigure should be specified separately */
|
||||
phaseNames = ["preConfigure" "doConfigure" "doMakeInstall"];
|
||||
|
||||
preConfigure = fullDepEntry (''
|
||||
sed -e 's/[$](MKDIR)/mkdir -p /' -i doc/Makefile.in
|
||||
'') ["addInputs" "doUnpack" "minInit"];
|
||||
|
||||
name = "gpm-" + version;
|
||||
meta = {
|
||||
description = "Mouse daemon";
|
||||
};
|
||||
}
|
22
pkgs/servers/gpm/default.nix
Normal file
22
pkgs/servers/gpm/default.nix
Normal file
|
@ -0,0 +1,22 @@
|
|||
{ stdenv, fetchurl, flex, bison, ncurses }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "gpm-1.20.6";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://www.nico.schottelius.org/software/gpm/archives/${name}.tar.bz2";
|
||||
sha256 = "1990i19ddzn8gg5xwm53yn7d0mya885f48sd2hyvr7dvzyaw7ch8";
|
||||
};
|
||||
|
||||
buildInputs = [ flex bison ncurses ];
|
||||
|
||||
preConfigure =
|
||||
''
|
||||
sed -e 's/[$](MKDIR)/mkdir -p /' -i doc/Makefile.in
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = http://www.nico.schottelius.org/software/gpm/;
|
||||
description = "A daemon that provides mouse support on the Linux console";
|
||||
};
|
||||
}
|
|
@ -1,11 +1,11 @@
|
|||
{stdenv, fetchurl, apacheAnt, jdk, unzip}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "axis2-1.5";
|
||||
name = "axis2-1.5.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = http://apache.mirror.easycolocate.nl/ws/axis2/1_5/axis2-1.5-bin.zip;
|
||||
sha256 = "0f0a471xfsjx7s3i9awhajl1kli8y8pd8aiki7cwb9n4g467rwmc";
|
||||
url = http://www.bizdirusa.com/mirrors/apache/ws/axis2/1_5_1/axis2-1.5.1-bin.zip;
|
||||
sha256 = "04zcn9g4r7pxfpp5g5rpjjlddr5mibqmsz4lfbkz2vjf3jrldgy5";
|
||||
};
|
||||
|
||||
buildInputs = [ unzip apacheAnt jdk ];
|
||||
|
|
|
@ -100,7 +100,7 @@
|
|||
[ args.zlib xorg.xf86bigfontproto xorg.glproto args.mesa xorg.xf86driproto
|
||||
xorg.compositeproto xorg.scrnsaverproto xorg.resourceproto
|
||||
xorg.xineramaproto xorg.dri2proto xorg.xf86dgaproto xorg.dmxproto
|
||||
xorg.libdmx xorg.xf86vidmodeproto
|
||||
xorg.libdmx xorg.xf86vidmodeproto xorg.libXext
|
||||
];
|
||||
propagatedBuildInputs =
|
||||
[ xorg.libpciaccess xorg.inputproto xorg.xextproto xorg.randrproto ];
|
||||
|
|
|
@ -1,15 +1,10 @@
|
|||
{stdenv, fetchurl, fetchsvn, expat, erlang, zlib, openssl, pam}:
|
||||
{stdenv, fetchurl, expat, erlang, zlib, openssl, pam, lib}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "ejabberd-2.0.5";
|
||||
#src = fetchurl {
|
||||
# url = http://www.process-one.net/downloads/ejabberd/2.0.5/ejabberd-2.0.5.tar.gz;
|
||||
# sha256 = "130rjl93l54c7p4glsfn3j7xwpwdyinhj6pp1di3mdx2mzi91vrp";
|
||||
#};
|
||||
src = fetchsvn {
|
||||
url = http://svn.process-one.net/ejabberd/trunk;
|
||||
rev = "2666";
|
||||
sha256 = "c927ddc08c9cd748db93f48bcae96f9bd1c36e1ce107c9b4774e5423574ab7cb";
|
||||
name = "ejabberd-2.1.0";
|
||||
src = fetchurl {
|
||||
url = http://www.process-one.net/downloads/ejabberd/2.1.0/ejabberd-2.1.0.tar.gz;
|
||||
sha256 = "16gn5ag3zyv578bqbz134l13cy1gl1xfa5y7dnqxgpr9gkdyrp5q";
|
||||
};
|
||||
buildInputs = [ expat erlang zlib openssl pam ];
|
||||
patchPhase = ''
|
||||
|
@ -24,5 +19,6 @@ stdenv.mkDerivation rec {
|
|||
description = "Open-source XMPP application server written in Erlang";
|
||||
license = "GPLv2";
|
||||
homepage = http://www.ejabberd.im;
|
||||
maintainers = [ lib.maintainers.sander ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
args: with args;
|
||||
stdenv.mkDerivation {
|
||||
name = "zsh-4.3.4";
|
||||
|
||||
src = fetchurl {
|
||||
url = mirror://sourceforge/zsh/zsh-4.3.4.tar.bz2;
|
||||
sha256 = "1inypy60h7hir8hwidid85pbajrb5w09fl222p0h4fnsn0nf583g";
|
||||
};
|
||||
|
||||
configureFlags = "--with-tcsetpgrp --enable-maildir-support --enable-multibyte";
|
||||
|
||||
buildInputs = [ncurses coreutils];
|
||||
}
|
|
@ -1,22 +0,0 @@
|
|||
args: with args;
|
||||
let documentation = fetchurl {
|
||||
url = mirror://sourceforge/zsh/zsh-4.3.5-doc.tar.bz2;
|
||||
sha256 = "0jf35xibp8wfka7rdk9q8spkwprlhjx1sp7vp6img8wks12cvlkx";
|
||||
};
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
name = "zsh-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = mirror://sourceforge/zsh/zsh-4.3.5.tar.bz2;
|
||||
sha256 = "0191j3liflkjrj39i2yrs3ab9jcx4zd93rirx3j17dymfgqlvrzb";
|
||||
};
|
||||
configureFlags = "--with-tcsetpgrp --enable-maildir-support --enable-multibyte";
|
||||
|
||||
postInstall = ''
|
||||
ensureDir $out/share/
|
||||
tar xf ${documentation} -C $out/share
|
||||
'';
|
||||
|
||||
buildInputs = [ncurses coreutils];
|
||||
}
|
|
@ -1,19 +0,0 @@
|
|||
args: with args;
|
||||
# cvs does include docs
|
||||
# the cvs snapshot is updated occasionally. see bleedingEdgeRepos
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "zsh-${version}";
|
||||
|
||||
src = sourceByName "zsh";
|
||||
configureFlags = "--with-tcsetpgrp --enable-maildir-support --enable-multibyte";
|
||||
|
||||
preConfigure = "autoconf; autoheader";
|
||||
|
||||
postInstall = ''
|
||||
ensureDir $out/share/
|
||||
cp -R Doc $out/share
|
||||
'';
|
||||
|
||||
buildInputs = [ncurses coreutils autoconf yodl ];
|
||||
}
|
|
@ -1,9 +1,16 @@
|
|||
args: with args;
|
||||
let documentation = fetchurl {
|
||||
{ stdenv, fetchurl, ncurses, coreutils }:
|
||||
|
||||
let
|
||||
|
||||
version = "4.3.9";
|
||||
|
||||
documentation = fetchurl {
|
||||
url = "mirror://sourceforge/zsh/zsh-${version}-doc.tar.bz2";
|
||||
sha256 = "0rc19q5r8x2yln7synpqzxngm7g4g6idrpgc1i0jsawc48m7dbhm";
|
||||
};
|
||||
|
||||
in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "zsh-${version}";
|
||||
|
||||
|
@ -11,6 +18,7 @@ stdenv.mkDerivation {
|
|||
url = "mirror://sourceforge/zsh/zsh-${version}.tar.bz2";
|
||||
sha256 = "1aw28c5w83vl2ckbvf6ljj00s36icyrnxcm1r6q63863dmn6vpcg";
|
||||
};
|
||||
|
||||
configureFlags = "--with-tcsetpgrp --enable-maildir-support --enable-multibyte";
|
||||
|
||||
postInstall = ''
|
|
@ -211,4 +211,20 @@ rec {
|
|||
# `keepBuildTree' adapter as well.
|
||||
(cleanupBuildTree (keepBuildTree stdenv));
|
||||
|
||||
|
||||
/* Replace the meta.maintainers field of a derivation. This is useful
|
||||
when you want to fork to update some packages without disturbing other
|
||||
developers.
|
||||
|
||||
e.g.: in all-packages.nix:
|
||||
|
||||
# remove all maintainers.
|
||||
defaultStdenv = replaceMaintainersField allStdenvs.stdenv pkgs [];
|
||||
*/
|
||||
replaceMaintainersField = stdenv: pkgs: maintainers: stdenv //
|
||||
{ mkDerivation = args:
|
||||
pkgs.lib.recursiveUpdate
|
||||
(stdenv.mkDerivation args)
|
||||
{ meta.maintainers = maintainers; };
|
||||
};
|
||||
}
|
||||
|
|
|
@ -38,6 +38,7 @@ let {
|
|||
shell = msysShell;
|
||||
path = [
|
||||
(make + "/bin")
|
||||
(tar + "/bin")
|
||||
(binutils + "/bin")
|
||||
(gccFull + "/bin")
|
||||
(mingwRuntimeBin + "/bin")
|
||||
|
@ -77,7 +78,7 @@ let {
|
|||
* binutils is on the path because it contains dlltool, which
|
||||
* is invoked on the PATH by some packages.
|
||||
*/
|
||||
initialPath = [make binutils gccFull mingwRuntimeSrc w32apiSrc msys];
|
||||
initialPath = [make tar binutils gccFull mingwRuntimeSrc w32apiSrc msys];
|
||||
gcc = gccFull;
|
||||
shell = msysShell;
|
||||
inherit curl;
|
||||
|
@ -152,7 +153,7 @@ let {
|
|||
src =
|
||||
fetchurlInit1 {
|
||||
url = ftp://ftp.strategoxt.org/pub/mingw/msys-1.0.11.tar.gz;
|
||||
md5 = "85ce547934797019d2d642ec3b53934b";
|
||||
sha256 = "08qp4jk279i66q6ngksg58fx3cfv1r6p5n394h2kfrs56qs9zvz4";
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -179,6 +180,12 @@ let {
|
|||
inherit fetchurl;
|
||||
};
|
||||
|
||||
tar =
|
||||
(import ./pkgs).tar {
|
||||
stdenv = stdenvInit2;
|
||||
inherit fetchurl;
|
||||
};
|
||||
|
||||
binutils =
|
||||
(import ./pkgs).binutils {
|
||||
stdenv = stdenvInit2;
|
||||
|
|
|
@ -28,6 +28,20 @@ rec {
|
|||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* Tar
|
||||
*/
|
||||
tar = {stdenv, fetchurl} :
|
||||
stdenv.mkDerivation {
|
||||
name = "mingw-tar";
|
||||
builder = ./bin-builder.sh;
|
||||
src =
|
||||
fetchurl {
|
||||
url = ftp://ftp.strategoxt.org/pub/mingw/tar-1.22-1-msys-1.0.11-bin.tar.gz;
|
||||
sha256 = "17rbv159g56q3bp8rh5vzv8hw8clxs7vk731cgqg0vy1fzls6yfq";
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* GCC. Binary
|
||||
*/
|
||||
|
@ -111,13 +125,13 @@ rec {
|
|||
*/
|
||||
pkgconfigBin = {stdenv, fetchurl} :
|
||||
stdenv.mkDerivation {
|
||||
name = "pkgconfig-0.20";
|
||||
name = "pkgconfig-0.23";
|
||||
builder = ./pkgconfig-builder.sh;
|
||||
setupHook = ../../../development/tools/misc/pkgconfig/setup-hook.sh;
|
||||
src =
|
||||
fetchurl {
|
||||
url = http://www.cs.uu.nl/people/martin/pkg-config-0.20-bin.tar.gz;
|
||||
md5 = "71f9595a022619b8e8b0f7853790c4c7";
|
||||
url = ftp://ftp.strategoxt.org/pub/mingw/pkg-config-0.23.tar.gz;
|
||||
sha256 = "1vab3rdnw16nhma1bln41bbrn6phbpcv9wiz79map8y5znaiv6mq";
|
||||
};
|
||||
};
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -14,7 +14,7 @@ args : with args; with builderDefs;
|
|||
});
|
||||
in with localDefs;
|
||||
stdenv.mkDerivation rec {
|
||||
name = "x11vnc-"+version;
|
||||
name = "x11vnc-0.9.3";
|
||||
builder = writeScript (name + "-builder")
|
||||
(textClosure localDefs
|
||||
[doConfigure doMakeInstall doForceShare doPropagate]);
|
||||
|
|
|
@ -15,7 +15,7 @@ args : with args; with builderDefs.passthru.function {src="";};
|
|||
}) // args); /* null is a terminator for sumArgs */
|
||||
in with localDefs;
|
||||
stdenv.mkDerivation rec {
|
||||
name = "x2vnc-"+version;
|
||||
name = "x2vnc-1.7.2";
|
||||
builder = writeScript (name + "-builder")
|
||||
(textClosure localDefs
|
||||
[doConfigure doCreatePrefix doMakeInstall doForceShare doPropagate]);
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
args: with args;
|
||||
{ stdenv, fetchurl }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "sharutils-" + version;
|
||||
name = "sharutils-4.6.3";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnu/sharutils/REL-${version}/${name}.tar.bz2";
|
||||
url = "mirror://gnu/sharutils/REL-4.6.3/${name}.tar.bz2";
|
||||
sha256 = "1sirrzas8llcsd8gnh56pns39wa1f803vff1kmy5islfi1p9vqk8";
|
||||
};
|
||||
|
||||
|
|
|
@ -1,21 +1,19 @@
|
|||
args : with args;
|
||||
rec {
|
||||
{ stdenv, fetchurl, glib, readline, bison, flex, pkgconfig }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "mdbtools-0.6pre1";
|
||||
|
||||
src = fetchurl {
|
||||
url = http://prdownloads.sourceforge.net/mdbtools/mdbtools-0.6pre1.tar.gz;
|
||||
sha256 = "1lz33lmqifjszad7rl1r7rpxbziprrm5rkb27wmswyl5v98dqsbi";
|
||||
};
|
||||
|
||||
buildInputs = [glib readline bison flex pkgconfig];
|
||||
configureFlags = [];
|
||||
|
||||
preConfigure = fullDepEntry (''
|
||||
preConfigure = ''
|
||||
sed -e 's@static \(GHashTable [*]mdb_backends;\)@\1@' -i src/libmdb/backend.c
|
||||
'') ["doUnpack" "minInit"];
|
||||
'';
|
||||
|
||||
/* doConfigure should be specified separately */
|
||||
phaseNames = ["preConfigure" "doConfigure" "doMakeInstall"];
|
||||
|
||||
name = "mdbtools-" + version;
|
||||
meta = {
|
||||
description = ".mdb (MS Access) format tools";
|
||||
};
|
|
@ -1,18 +0,0 @@
|
|||
args : with args;
|
||||
rec {
|
||||
src = fetchurl {
|
||||
url = http://alioth.debian.org/frs/download.php/2332/minicom-2.3.tar.gz;
|
||||
sha256 = "1ysn0crdhvwyvdlbw0ms5nq06xy2pd2glwjs53p384byl3ac7jra";
|
||||
};
|
||||
|
||||
buildInputs = [ncurses];
|
||||
configureFlags = [ "--sysconfdir=/etc" ];
|
||||
|
||||
/* doConfigure should be specified separately */
|
||||
phaseNames = [ "doConfigure" "doMakeInstall"];
|
||||
|
||||
name = "minicom-" + version;
|
||||
meta = {
|
||||
description = "Serial console";
|
||||
};
|
||||
}
|
18
pkgs/tools/misc/minicom/default.nix
Normal file
18
pkgs/tools/misc/minicom/default.nix
Normal file
|
@ -0,0 +1,18 @@
|
|||
{ stdenv, fetchurl, ncurses }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "minicom-2.3";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://alioth.debian.org/frs/download.php/2332/${name}.tar.gz";
|
||||
sha256 = "1ysn0crdhvwyvdlbw0ms5nq06xy2pd2glwjs53p384byl3ac7jra";
|
||||
};
|
||||
|
||||
buildInputs = [ncurses];
|
||||
|
||||
configureFlags = [ "--sysconfdir=/etc" ];
|
||||
|
||||
meta = {
|
||||
description = "Serial console";
|
||||
};
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue