mirror of
https://github.com/CHN-beta/nixpkgs.git
synced 2026-01-12 19:00:19 +08:00
Compare commits
1 Commits
backups/mo
...
0.8
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
187d0a22eb |
31
COPYING
31
COPYING
@@ -1,31 +0,0 @@
|
||||
Copyright (c) 2003-2006 Eelco Dolstra
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
======================================================================
|
||||
|
||||
Note: the license above does not apply to the packages built by the
|
||||
Nix Packages collection, merely to the package descriptions (i.e., Nix
|
||||
expressions, build scripts, etc.). Also, the license does not apply
|
||||
to some of the binaries used for bootstrapping Nixpkgs (e.g.,
|
||||
pkgs/stdenv/linux/tools/bash). It also might not apply to patches
|
||||
included in Nixpkgs, which may be derivative works of the packages to
|
||||
which they apply. The aforementioned artifacts are all covered by the
|
||||
licenses of the respective packages.
|
||||
48
NEWS
Normal file
48
NEWS
Normal file
@@ -0,0 +1,48 @@
|
||||
Nix Packages 0.8 (April 11, 2005)
|
||||
|
||||
* This release is mostly to remain synchronised with the changed
|
||||
hashing scheme in Nix 0.8.
|
||||
|
||||
* Notable updates:
|
||||
|
||||
- Adobe Reader 7.0
|
||||
- Various security updates (zlib 1.2.2, etc.)
|
||||
|
||||
|
||||
Nix Packages 0.7 (March 14, 2005)
|
||||
|
||||
* The bootstrap process for the standard build environment on Linux
|
||||
(stdenv-linux) has been improved. It is no longer dependent in its
|
||||
initial bootstrap stages on the system Glibc, GCC, and other tools.
|
||||
Rather, Nixpkgs contains a statically linked bash and curl, and uses
|
||||
that to download other statically linked tools. These are then used
|
||||
to build a Glibc and dynamically linked versions of all other
|
||||
tools.
|
||||
|
||||
This change also makes the bootstrap process faster. For instance,
|
||||
GCC is built only once instead of three times.
|
||||
|
||||
(Contributed by Armijn Hemel.)
|
||||
|
||||
* Tarballs used by Nixpkgs are now obtained from the same server that
|
||||
hosts Nixpkgs (catamaran.labs.cs.uu.nl). This reduces the risk of
|
||||
packages being unbuildable due to moved or deleted files on various
|
||||
servers.
|
||||
|
||||
* There now is a generic mechanism for building Perl modules. See the
|
||||
various Perl modules defined in pkgs/system/all-packages-generic.nix.
|
||||
|
||||
* Notable new packages:
|
||||
|
||||
- Qt 3
|
||||
- MySQL
|
||||
- MythTV
|
||||
- Mono
|
||||
- MonoDevelop (alpha)
|
||||
- Xine
|
||||
|
||||
* Notable updates:
|
||||
|
||||
- GCC 3.4.3
|
||||
- Glibc 2.3.4
|
||||
- GTK 2.6
|
||||
@@ -1 +0,0 @@
|
||||
import ./pkgs/top-level/all-packages.nix
|
||||
41
doc/Makefile
41
doc/Makefile
@@ -1,41 +0,0 @@
|
||||
# You may need to override this.
|
||||
docbookxsl = $(HOME)/.nix-profile/xml/xsl/docbook
|
||||
dblatex = dblatex
|
||||
|
||||
XMLLINT = xmllint --catalogs
|
||||
XSLTPROC = xsltproc --catalogs \
|
||||
--param section.autolabel 1 \
|
||||
--param section.label.includes.component.label 1 \
|
||||
--param html.stylesheet \'style.css\' \
|
||||
--param xref.with.number.and.title 1 \
|
||||
--param toc.section.depth 3 \
|
||||
--param admon.style \'\' \
|
||||
--param callout.graphics.extension \'.gif\'
|
||||
|
||||
NEWS_OPTS = \
|
||||
--stringparam generate.toc "article nop" \
|
||||
--stringparam section.autolabel.max.depth 0 \
|
||||
--stringparam header.rule 0
|
||||
|
||||
all: NEWS.html NEWS.txt manual.html manual.pdf
|
||||
|
||||
NEWS.html: release-notes.xml
|
||||
$(XSLTPROC) --nonet --xinclude --output $@ $(NEWS_OPTS) \
|
||||
$(docbookxsl)/html/docbook.xsl release-notes.xml
|
||||
|
||||
NEWS.txt: release-notes.xml
|
||||
$(XSLTPROC) --nonet --xinclude quote-literals.xsl release-notes.xml | \
|
||||
$(XSLTPROC) --nonet --output $@.tmp.html $(NEWS_OPTS) \
|
||||
$(docbookxsl)/html/docbook.xsl -
|
||||
LANG=en_US w3m -dump $@.tmp.html > $@
|
||||
rm $@.tmp.html
|
||||
|
||||
manual.html: *.xml
|
||||
$(XSLTPROC) --nonet --xinclude --output manual.html \
|
||||
$(docbookxsl)/html/docbook.xsl manual.xml
|
||||
|
||||
manual.pdf: *.xml
|
||||
$(dblatex) \
|
||||
-P doc.collab.show=0 \
|
||||
-P latex.output.revhistory=0 \
|
||||
manual.xml
|
||||
@@ -1,605 +0,0 @@
|
||||
<chapter xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xml:id="chap-conventions">
|
||||
|
||||
<title>Coding conventions</title>
|
||||
|
||||
|
||||
<section><title>Syntax</title>
|
||||
|
||||
<itemizedlist>
|
||||
|
||||
<listitem><para>Use 2 spaces of indentation per indentation level in
|
||||
Nix expressions, 4 spaces in shell scripts.</para></listitem>
|
||||
|
||||
<listitem><para>Do not use tab characters, i.e. configure your
|
||||
editor to use soft tabs. For instance, use <literal>(setq-default
|
||||
indent-tabs-mode nil)</literal> in Emacs. Everybody has different
|
||||
tab settings so it’s asking for trouble.</para></listitem>
|
||||
|
||||
<listitem><para>Use <literal>lowerCamelCase</literal> for variable
|
||||
names, not <literal>UpperCamelCase</literal>. TODO: naming of
|
||||
attributes in
|
||||
<filename>all-packages.nix</filename>?</para></listitem>
|
||||
|
||||
<listitem><para>Function calls with attribute set arguments are
|
||||
written as
|
||||
|
||||
<programlisting>
|
||||
foo {
|
||||
arg = ...;
|
||||
}
|
||||
</programlisting>
|
||||
|
||||
not
|
||||
|
||||
<programlisting>
|
||||
foo
|
||||
{
|
||||
arg = ...;
|
||||
}
|
||||
</programlisting>
|
||||
|
||||
Also fine is
|
||||
|
||||
<programlisting>
|
||||
foo { arg = ...; }
|
||||
</programlisting>
|
||||
|
||||
if it's a short call.</para></listitem>
|
||||
|
||||
<listitem><para>In attribute sets or lists that span multiple lines,
|
||||
the attribute names or list elements should be aligned:
|
||||
|
||||
<programlisting>
|
||||
# A long list.
|
||||
list =
|
||||
[ elem1
|
||||
elem2
|
||||
elem3
|
||||
];
|
||||
|
||||
# A long attribute set.
|
||||
attrs =
|
||||
{ attr1 = short_expr;
|
||||
attr2 =
|
||||
if true then big_expr else big_expr;
|
||||
};
|
||||
|
||||
# Alternatively:
|
||||
attrs = {
|
||||
attr1 = short_expr;
|
||||
attr2 =
|
||||
if true then big_expr else big_expr;
|
||||
};
|
||||
</programlisting>
|
||||
|
||||
</para></listitem>
|
||||
|
||||
<listitem><para>Short lists or attribute sets can be written on one
|
||||
line:
|
||||
|
||||
<programlisting>
|
||||
# A short list.
|
||||
list = [ elem1 elem2 elem3 ];
|
||||
|
||||
# A short set.
|
||||
attrs = { x = 1280; y = 1024; };
|
||||
</programlisting>
|
||||
|
||||
</para></listitem>
|
||||
|
||||
<listitem><para>Breaking in the middle of a function argument can
|
||||
give hard-to-read code, like
|
||||
|
||||
<programlisting>
|
||||
someFunction { x = 1280;
|
||||
y = 1024; } otherArg
|
||||
yetAnotherArg
|
||||
</programlisting>
|
||||
|
||||
(especially if the argument is very large, spanning multiple
|
||||
lines).</para>
|
||||
|
||||
<para>Better:
|
||||
|
||||
<programlisting>
|
||||
someFunction
|
||||
{ x = 1280; y = 1024; }
|
||||
otherArg
|
||||
yetAnotherArg
|
||||
</programlisting>
|
||||
|
||||
or
|
||||
|
||||
<programlisting>
|
||||
let res = { x = 1280; y = 1024; };
|
||||
in someFunction res otherArg yetAnotherArg
|
||||
</programlisting>
|
||||
|
||||
</para></listitem>
|
||||
|
||||
<listitem><para>The bodies of functions, asserts, and withs are not
|
||||
indented to prevent a lot of superfluous indentation levels, i.e.
|
||||
|
||||
<programlisting>
|
||||
{ arg1, arg2 }:
|
||||
assert system == "i686-linux";
|
||||
stdenv.mkDerivation { ...
|
||||
</programlisting>
|
||||
|
||||
not
|
||||
|
||||
<programlisting>
|
||||
{ arg1, arg2 }:
|
||||
assert system == "i686-linux";
|
||||
stdenv.mkDerivation { ...
|
||||
</programlisting>
|
||||
|
||||
</para></listitem>
|
||||
|
||||
<listitem><para>Function formal arguments are written as:
|
||||
|
||||
<programlisting>
|
||||
{ arg1, arg2, arg3 }:
|
||||
</programlisting>
|
||||
|
||||
but if they don't fit on one line they're written as:
|
||||
|
||||
<programlisting>
|
||||
{ arg1, arg2, arg3
|
||||
, arg4, ...
|
||||
, # 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>
|
||||
|
||||
</itemizedlist>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
<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
|
||||
<filename>all-packages.nix</filename>, not
|
||||
<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>
|
||||
@@ -1,21 +0,0 @@
|
||||
<chapter xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xml:id="chap-introduction">
|
||||
|
||||
<title>Introduction</title>
|
||||
|
||||
<para>This manual tells you how to write packages for the Nix Packages
|
||||
collection (Nixpkgs). Thus it’s for packagers and developers who want
|
||||
to add packages to Nixpkgs. End users are kindly referred to the
|
||||
<link xlink:href="http://nixos.org/releases/nix/unstable/manual/">Nix
|
||||
manual</link>.</para>
|
||||
|
||||
<para>This manual does not describe the syntax and semantics of the
|
||||
Nix expression language, which are given in the Nix manual in the
|
||||
<link
|
||||
xlink:href="http://nixos.org/releases/nix/unstable/manual/#chap-writing-nix-expressions">chapter
|
||||
on writing Nix expressions</link>. It only describes the facilities
|
||||
provided by Nixpkgs to make writing packages easier, such as the
|
||||
standard build environment (<literal>stdenv</literal>).</para>
|
||||
|
||||
</chapter>
|
||||
@@ -1,220 +0,0 @@
|
||||
<chapter xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xml:id="chap-language-support">
|
||||
|
||||
<title>Support for specific programming languages</title>
|
||||
|
||||
<para>The <link linkend="chap-stdenv">standard build
|
||||
environment</link> makes it easy to build typical Autotools-based
|
||||
packages with very little code. Any other kind of package can be
|
||||
accomodated by overriding the appropriate phases of
|
||||
<literal>stdenv</literal>. However, there are specialised functions
|
||||
in Nixpkgs to easily build packages for other programming languages,
|
||||
such as Perl or Haskell. These are described in this chapter.</para>
|
||||
|
||||
|
||||
<section xml:id="ssec-language-perl"><title>Perl</title>
|
||||
|
||||
<para>Nixpkgs provides a function <varname>buildPerlPackage</varname>,
|
||||
a generic package builder function for any Perl package that has a
|
||||
standard <varname>Makefile.PL</varname>. It’s implemented in <link
|
||||
xlink:href="https://svn.nixos.org/repos/nix/nixpkgs/trunk/pkgs/development/perl-modules/generic"><filename>pkgs/development/perl-modules/generic</filename></link>.</para>
|
||||
|
||||
<para>Perl packages from CPAN are defined in <link
|
||||
xlink:href="https://svn.nixos.org/repos/nix/nixpkgs/trunk/pkgs/top-level/perl-packages.nix"><filename>pkgs/perl-packages.nix</filename></link>,
|
||||
rather than <filename>pkgs/all-packages.nix</filename>. Most Perl
|
||||
packages are so straight-forward to build that they are defined here
|
||||
directly, rather than having a separate function for each package
|
||||
called from <filename>perl-packages.nix</filename>. However, more
|
||||
complicated packages should be put in a separate file, typically in
|
||||
<filename>pkgs/development/perl-modules</filename>. Here is an
|
||||
example of the former:
|
||||
|
||||
<programlisting>
|
||||
ClassC3 = buildPerlPackage rec {
|
||||
name = "Class-C3-0.21";
|
||||
src = fetchurl {
|
||||
url = "mirror://cpan/authors/id/F/FL/FLORA/${name}.tar.gz";
|
||||
sha256 = "1bl8z095y4js66pwxnm7s853pi9czala4sqc743fdlnk27kq94gz";
|
||||
};
|
||||
};
|
||||
</programlisting>
|
||||
|
||||
Note the use of <literal>mirror://cpan/</literal>, and the
|
||||
<literal>${name}</literal> in the URL definition to ensure that the
|
||||
name attribute is consistent with the source that we’re actually
|
||||
downloading. Perl packages are made available in
|
||||
<filename>all-packages.nix</filename> through the variable
|
||||
<varname>perlPackages</varname>. For instance, if you have a package
|
||||
that needs <varname>ClassC3</varname>, you would typically write
|
||||
|
||||
<programlisting>
|
||||
foo = import ../path/to/foo.nix {
|
||||
inherit stdenv fetchurl ...;
|
||||
inherit (perlPackages) ClassC3;
|
||||
};
|
||||
</programlisting>
|
||||
|
||||
in <filename>all-packages.nix</filename>. You can test building a
|
||||
Perl package as follows:
|
||||
|
||||
<screen>
|
||||
$ nix-build -A perlPackages.ClassC3
|
||||
</screen>
|
||||
|
||||
<varname>buildPerlPackage</varname> adds <literal>perl-</literal> to
|
||||
the start of the name attribute, so the package above is actually
|
||||
called <literal>perl-Class-C3-0.21</literal>. So to install it, you
|
||||
can say:
|
||||
|
||||
<screen>
|
||||
$ nix-env -i perl-Class-C3
|
||||
</screen>
|
||||
|
||||
(Of course you can also install using the attribute name:
|
||||
<literal>nix-env -i -A perlPackages.ClassC3</literal>.)</para>
|
||||
|
||||
<para>So what does <varname>buildPerlPackage</varname> do? It does
|
||||
the following:
|
||||
|
||||
<orderedlist>
|
||||
|
||||
<listitem><para>In the configure phase, it calls <literal>perl
|
||||
Makefile.PL</literal> to generate a Makefile. You can set the
|
||||
variable <varname>makeMakerFlags</varname> to pass flags to
|
||||
<filename>Makefile.PL</filename></para></listitem>
|
||||
|
||||
<listitem><para>It adds the contents of the <envar>PERL5LIB</envar>
|
||||
environment variable to <literal>#! .../bin/perl</literal> line of
|
||||
Perl scripts as <literal>-I<replaceable>dir</replaceable></literal>
|
||||
flags. This ensures that a script can find its
|
||||
dependencies.</para></listitem>
|
||||
|
||||
<listitem><para>In the fixup phase, it writes the propagated build
|
||||
inputs (<varname>propagatedBuildInputs</varname>) to the file
|
||||
<filename>$out/nix-support/propagated-user-env-packages</filename>.
|
||||
<command>nix-env</command> recursively installs all packages listed
|
||||
in this file when you install a package that has it. This ensures
|
||||
that a Perl package can find its dependencies.</para></listitem>
|
||||
|
||||
</orderedlist>
|
||||
|
||||
</para>
|
||||
|
||||
<para><varname>buildPerlPackage</varname> is built on top of
|
||||
<varname>stdenv</varname>, so everything can be customised in the
|
||||
usual way. For instance, the <literal>BerkeleyDB</literal> module has
|
||||
a <varname>preConfigure</varname> hook to generate a configuration
|
||||
file used by <filename>Makefile.PL</filename>:
|
||||
|
||||
<programlisting>
|
||||
{buildPerlPackage, fetchurl, db4}:
|
||||
|
||||
buildPerlPackage rec {
|
||||
name = "BerkeleyDB-0.36";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://cpan/authors/id/P/PM/PMQS/${name}.tar.gz";
|
||||
sha256 = "07xf50riarb60l1h6m2dqmql8q5dij619712fsgw7ach04d8g3z1";
|
||||
};
|
||||
|
||||
preConfigure = ''
|
||||
echo "LIB = ${db4}/lib" > config.in
|
||||
echo "INCLUDE = ${db4}/include" >> config.in
|
||||
'';
|
||||
}
|
||||
</programlisting>
|
||||
|
||||
</para>
|
||||
|
||||
<para>Dependencies on other Perl packages can be specified in the
|
||||
<varname>buildInputs</varname> and
|
||||
<varname>propagatedBuildInputs</varname> attributes. If something is
|
||||
exclusively a build-time dependency, use
|
||||
<varname>buildInputs</varname>; if it’s (also) a runtime dependency,
|
||||
use <varname>propagatedBuildInputs</varname>. For instance, this
|
||||
builds a Perl module that has runtime dependencies on a bunch of other
|
||||
modules:
|
||||
|
||||
<programlisting>
|
||||
ClassC3Componentised = buildPerlPackage rec {
|
||||
name = "Class-C3-Componentised-1.0004";
|
||||
src = fetchurl {
|
||||
url = "mirror://cpan/authors/id/A/AS/ASH/${name}.tar.gz";
|
||||
sha256 = "0xql73jkcdbq4q9m0b0rnca6nrlvf5hyzy8is0crdk65bynvs8q1";
|
||||
};
|
||||
propagatedBuildInputs = [
|
||||
ClassC3 ClassInspector TestException MROCompat
|
||||
];
|
||||
};
|
||||
</programlisting>
|
||||
|
||||
</para>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
<section><title>Python</title>
|
||||
|
||||
<para>
|
||||
Python packages that
|
||||
use <link xlink:href="http://pypi.python.org/pypi/setuptools/"><literal>setuptools</literal></link>,
|
||||
which many Python packages do nowadays, can be built very simply using
|
||||
the <varname>buildPythonPackage</varname> function. This function is
|
||||
implemented
|
||||
in <link xlink:href="https://svn.nixos.org/repos/nix/nixpkgs/trunk/pkgs/development/python-modules/generic/default.nix"><filename>pkgs/development/python-modules/generic/default.nix</filename></link>
|
||||
and works similarly to <varname>buildPerlPackage</varname>. (See
|
||||
<xref linkend="ssec-language-perl"/> for details.)
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Python packages that use <varname>buildPythonPackage</varname> are
|
||||
defined
|
||||
in <link xlink:href="https://svn.nixos.org/repos/nix/nixpkgs/trunk/pkgs/top-level/python-packages.nix"><filename>pkgs/top-level/python-packages.nix</filename></link>.
|
||||
Most of them are simple. For example:
|
||||
|
||||
<programlisting>
|
||||
twisted = buildPythonPackage {
|
||||
name = "twisted-8.1.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = http://tmrc.mit.edu/mirror/twisted/Twisted/8.1/Twisted-8.1.0.tar.bz2;
|
||||
sha256 = "0q25zbr4xzknaghha72mq57kh53qw1bf8csgp63pm9sfi72qhirl";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [ pkgs.ZopeInterface ];
|
||||
|
||||
meta = {
|
||||
homepage = http://twistedmatrix.com/;
|
||||
description = "Twisted, an event-driven networking engine written in Python";
|
||||
license = "MIT";
|
||||
};
|
||||
};
|
||||
</programlisting>
|
||||
</para>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
<section><title>Haskell</title>
|
||||
|
||||
<para>TODO</para>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
<section><title>Java</title>
|
||||
|
||||
<para>TODO; Java support needs lots of improvement</para>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
<section><title>TeX / LaTeX</title>
|
||||
|
||||
<para>* Special support for building TeX documents</para>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
</chapter>
|
||||
@@ -1,39 +0,0 @@
|
||||
<book xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||
|
||||
<info>
|
||||
|
||||
<title>Nixpkgs Manual</title>
|
||||
|
||||
<subtitle>Draft (Version <xi:include href="../VERSION"
|
||||
parse="text" />)</subtitle>
|
||||
|
||||
<author>
|
||||
<personname>
|
||||
<firstname>Eelco</firstname>
|
||||
<surname>Dolstra</surname>
|
||||
</personname>
|
||||
<affiliation>
|
||||
<orgname>Delft University of Technology</orgname>
|
||||
<orgdiv>Department of Software Technology</orgdiv>
|
||||
</affiliation>
|
||||
</author>
|
||||
|
||||
<copyright>
|
||||
<year>2008</year>
|
||||
<year>2009</year>
|
||||
<holder>Eelco Dolstra</holder>
|
||||
</copyright>
|
||||
|
||||
</info>
|
||||
|
||||
<xi:include href="introduction.xml" />
|
||||
<xi:include href="quick-start.xml" />
|
||||
<xi:include href="stdenv.xml" />
|
||||
<xi:include href="meta.xml" />
|
||||
<xi:include href="language-support.xml" />
|
||||
<xi:include href="package-notes.xml" />
|
||||
<xi:include href="coding-conventions.xml" />
|
||||
|
||||
|
||||
</book>
|
||||
238
doc/meta.xml
238
doc/meta.xml
@@ -1,238 +0,0 @@
|
||||
<chapter xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xml:id="chap-meta">
|
||||
|
||||
<title>Meta-attributes</title>
|
||||
|
||||
<para>Nix packages can declare <emphasis>meta-attributes</emphasis>
|
||||
that contain information about a package such as a description, its
|
||||
homepage, its license, and so on. For instance, the GNU Hello package
|
||||
has a <varname>meta</varname> declaration like this:
|
||||
|
||||
<programlisting>
|
||||
meta = {
|
||||
description = "A program that produces a familiar, friendly greeting";
|
||||
longDescription = ''
|
||||
GNU Hello is a program that prints "Hello, world!" when you run it.
|
||||
It is fully customizable.
|
||||
'';
|
||||
homepage = http://www.gnu.org/software/hello/manual/;
|
||||
license = "GPLv3+";
|
||||
};
|
||||
</programlisting>
|
||||
|
||||
</para>
|
||||
|
||||
<para>Meta-attributes are not passed to the builder of the package.
|
||||
Thus, a change to a meta-attribute doesn’t trigger a recompilation of
|
||||
the package. The value of a meta-attribute must a string.</para>
|
||||
|
||||
<para>The meta-attributes of a package can be queried from the
|
||||
command-line using <command>nix-env</command>:
|
||||
|
||||
<screen>
|
||||
$ nix-env -qa hello --meta --xml
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<items>
|
||||
<item attrPath="hello" name="hello-2.3" system="i686-linux">
|
||||
<meta name="description" value="A program that produces a familiar, friendly greeting" />
|
||||
<meta name="homepage" value="http://www.gnu.org/software/hello/manual/" />
|
||||
<meta name="license" value="GPLv3+" />
|
||||
<meta name="longDescription" value="GNU Hello is a program that prints &quot;Hello, world!&quot; when you run it.&#xA;It is fully customizable.&#xA;" />
|
||||
</item>
|
||||
</items>
|
||||
</screen>
|
||||
|
||||
<command>nix-env</command> knows about the
|
||||
<varname>description</varname> field specifically:
|
||||
|
||||
<screen>
|
||||
$ nix-env -qa hello --description
|
||||
hello-2.3 A program that produces a familiar, friendly greeting
|
||||
</screen>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<section><title>Standard meta-attributes</title>
|
||||
|
||||
<para>The following meta-attributes have a standard
|
||||
interpretation:</para>
|
||||
|
||||
<variablelist>
|
||||
|
||||
<varlistentry>
|
||||
<term><varname>description</varname></term>
|
||||
<listitem><para>A short (one-line) description of the package.
|
||||
This is shown by <command>nix-env -q --description</command> and
|
||||
also on the Nixpkgs release pages.</para>
|
||||
|
||||
<para>Don’t include a period at the end. Don’t include newline
|
||||
characters. Capitalise the first character. For brevity, don’t
|
||||
repeat the name of package — just describe what it does.</para>
|
||||
|
||||
<para>Wrong: <literal>"libpng is a library that allows you to decode PNG images."</literal></para>
|
||||
|
||||
<para>Right: <literal>"A library for decoding PNG images"</literal></para>
|
||||
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><varname>longDescription</varname></term>
|
||||
<listitem><para>An arbitrarily long description of the
|
||||
package.</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><varname>homepage</varname></term>
|
||||
<listitem><para>The package’s homepage. Example:
|
||||
<literal>http://www.gnu.org/software/hello/manual/</literal></para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><varname>license</varname></term>
|
||||
<listitem><para>The license for the package. See below for the
|
||||
allowed values.</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><varname>maintainers</varname></term>
|
||||
<listitem><para>A list of names and e-mail addresses of the
|
||||
maintainers of this Nix expression, e.g. <literal>["Alice
|
||||
<alice@example.org>" "Bob <bob@example.com>"]</literal>. If
|
||||
you are the maintainer of multiple packages, you may want to add
|
||||
yourself to <link
|
||||
xlink:href="https://svn.nixos.org/repos/nix/nixpkgs/trunk/pkgs/lib/maintainers.nix"><filename>pkgs/lib/maintainers.nix</filename></link>
|
||||
and write something like <literal>[stdenv.lib.maintainers.alice
|
||||
stdenv.lib.maintainers.bob]</literal>.</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><varname>priority</varname></term>
|
||||
<listitem><para>The <emphasis>priority</emphasis> of the package,
|
||||
used by <command>nix-env</command> to resolve file name conflicts
|
||||
between packages. See the Nix manual page for
|
||||
<command>nix-env</command> for details. Example:
|
||||
<literal>"10"</literal> (a low-priority
|
||||
package).</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
<section xml:id="sec-meta-license"><title>Licenses</title>
|
||||
|
||||
<note><para>This is just a first attempt at standardising the license
|
||||
attribute.</para></note>
|
||||
|
||||
<para>The <varname>meta.license</varname> attribute must be one of the
|
||||
following:
|
||||
|
||||
<variablelist>
|
||||
|
||||
<varlistentry>
|
||||
<term><varname>GPL</varname></term>
|
||||
<listitem><para>GNU General Public License; version not
|
||||
specified.</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><varname>GPLv2</varname></term>
|
||||
<listitem><para>GNU General Public License, version
|
||||
2.</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><varname>GPLv2+</varname></term>
|
||||
<listitem><para>GNU General Public License, version
|
||||
2 or higher.</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><varname>GPLv3</varname></term>
|
||||
<listitem><para>GNU General Public License, version
|
||||
3.</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><varname>GPLv3+</varname></term>
|
||||
<listitem><para>GNU General Public License, version
|
||||
3 or higher.</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><varname>bsd</varname></term>
|
||||
<listitem><para>Catch-all for licenses that are essentially
|
||||
similar to <link
|
||||
xlink:href="http://www.gnu.org/licenses/license-list.html#ModifiedBSD">the
|
||||
original BSD license with the advertising clause removed</link>,
|
||||
i.e. permissive non-copyleft free software licenses. This
|
||||
includes the <link
|
||||
xlink:href="http://www.gnu.org/licenses/license-list.html#X11License">X11
|
||||
(“MIT”) License</link>.</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><varname>free</varname></term>
|
||||
<listitem><para>Catch-all for free software licenses not listed
|
||||
above.</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><varname>free-copyleft</varname></term>
|
||||
<listitem><para>Catch-all for free, copyleft software licenses not
|
||||
listed above.</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><varname>free-non-copyleft</varname></term>
|
||||
<listitem><para>Catch-all for free, non-copyleft software licenses
|
||||
not listed above.</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><varname>unfree-redistributable</varname></term>
|
||||
<listitem><para>Unfree package that can be redistributed in binary
|
||||
form. That is, it’s legal to redistribute the
|
||||
<emphasis>output</emphasis> of the derivation. This means that
|
||||
the package can be included in the Nixpkgs
|
||||
channel.</para>
|
||||
|
||||
<para>Sometimes proprietary software can only be redistributed
|
||||
unmodified. Make sure the builder doesn’t actually modify the
|
||||
original binaries; otherwise we’re breaking the license. For
|
||||
instance, the NVIDIA X11 drivers can be redistributed unmodified,
|
||||
but our builder applies <command>patchelf</command> to make them
|
||||
work. Thus, its license is <varname>unfree</varname> and it
|
||||
cannot be included in the Nixpkgs channel.</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><varname>unfree</varname></term>
|
||||
<listitem><para>Unfree package that cannot be redistributed. You
|
||||
can build it yourself, but you cannot redistribute the output of
|
||||
the derivation. Thus it cannot be included in the Nixpkgs
|
||||
channel.</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><varname>unfree-redistributable-firmware</varname></term>
|
||||
<listitem><para>This package supplies unfree, redistributable
|
||||
firmware. This is a separate value from
|
||||
<varname>unfree-redistributable</varname> because not everybody
|
||||
cares whether firmware is free.</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
</chapter>
|
||||
158
doc/outline.txt
158
doc/outline.txt
@@ -1,158 +0,0 @@
|
||||
- The standard environment
|
||||
|
||||
(Some of this can be moved from the Nix manual)
|
||||
|
||||
- Special attributes
|
||||
|
||||
- Generic builder
|
||||
|
||||
- Helper functions
|
||||
|
||||
- GCC / ld wrapper (+ env vars)
|
||||
|
||||
- Phases (+ how to add phases) and hooks
|
||||
|
||||
- Override functions for stdenv
|
||||
|
||||
- Overriding GCC
|
||||
|
||||
- Overriding the setup script
|
||||
|
||||
- Predefined override functions in all-packages.nix: static binary
|
||||
stdenv, dietlibc stdenv
|
||||
|
||||
- Stdenv bootstrap; how to update the Linux bootstrap binaries
|
||||
|
||||
- Specific platform notes (Linux, Native, Cygwin, Mingw)
|
||||
|
||||
|
||||
- Support for specific languages
|
||||
|
||||
- Perl
|
||||
|
||||
- Generic Perl builder
|
||||
|
||||
- Python
|
||||
|
||||
- Wrapper generation
|
||||
|
||||
- Haskell
|
||||
|
||||
- TODO
|
||||
|
||||
- Java
|
||||
|
||||
- TODO; Java needs lots of improvement
|
||||
|
||||
- TeX/LaTeX
|
||||
|
||||
- Special support for building TeX documents
|
||||
|
||||
|
||||
- Special kinds of applications
|
||||
|
||||
- OpenGL apps
|
||||
|
||||
- Binary-only apps
|
||||
|
||||
- Linux kernel modules
|
||||
|
||||
- Mozilla plugins/extensions
|
||||
|
||||
- X apps
|
||||
|
||||
- KDE apps
|
||||
|
||||
- GConf-based apps
|
||||
|
||||
- Programs that need wrappers
|
||||
|
||||
- makeWrapper etc.
|
||||
|
||||
- Initial ramdisks
|
||||
|
||||
|
||||
- Library functions
|
||||
|
||||
- i.e. in lib/default.nix
|
||||
|
||||
|
||||
- Specific package notes
|
||||
|
||||
- Linux kernel; how to update; feature tests
|
||||
|
||||
- X.org; how to update
|
||||
|
||||
- Gnome; how to update
|
||||
|
||||
- GCC?
|
||||
|
||||
- GHC?
|
||||
|
||||
- ...
|
||||
|
||||
|
||||
- Meta attributes
|
||||
|
||||
- License attr; possible values
|
||||
|
||||
|
||||
- Virtual machine support (for the build farm)
|
||||
|
||||
- vmtools
|
||||
|
||||
- KVM notes
|
||||
|
||||
- Performing a build in a VM
|
||||
|
||||
- In the host FS
|
||||
|
||||
- In a disk image
|
||||
|
||||
- RPM builds
|
||||
|
||||
- RPM image creation
|
||||
|
||||
- Deb builds
|
||||
|
||||
- Deb image creation
|
||||
|
||||
- Debugging VM builds
|
||||
|
||||
|
||||
- Guidelines for Nixpkgs contributions
|
||||
|
||||
- File naming conventions
|
||||
|
||||
- Versioning of packages
|
||||
|
||||
- Tree organisation
|
||||
|
||||
- Variable naming
|
||||
|
||||
- Layout / indentations style
|
||||
|
||||
- Output FS hierarchy (e.g. $out/share/man instead of $out/man)
|
||||
|
||||
|
||||
- Misc
|
||||
|
||||
- Building outside of the Nixpkgs tree
|
||||
|
||||
- Config options
|
||||
|
||||
- Downloading stuff
|
||||
|
||||
- fetchurl
|
||||
|
||||
- mirror:// scheme
|
||||
|
||||
- fetchsvn
|
||||
|
||||
- fetchcvs
|
||||
|
||||
- fetchdarcs
|
||||
|
||||
|
||||
- Appendix: Nixpkgs config options
|
||||
|
||||
@@ -1,242 +0,0 @@
|
||||
<chapter xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xml:id="chap-introduction">
|
||||
|
||||
<title>Package Notes</title>
|
||||
|
||||
<para>This chapter contains information about how to use and maintain
|
||||
the Nix expressions for a number of specific packages, such as the
|
||||
Linux kernel or X.org.</para>
|
||||
|
||||
|
||||
<!--============================================================-->
|
||||
|
||||
<section xml:id="sec-linux-kernel">
|
||||
|
||||
<title>Linux kernel</title>
|
||||
|
||||
<para>The Nix expressions to build the Linux kernel are in <link
|
||||
xlink:href="https://svn.nixos.org/repos/nix/nixpkgs/trunk/pkgs/os-specific/linux/kernel"><filename>pkgs/os-specific/linux/kernel</filename></link>.</para>
|
||||
|
||||
<para>The function that builds the kernel has an argument
|
||||
<varname>kernelPatches</varname> which should be a list of
|
||||
<literal>{name, patch, extraConfig}</literal> attribute sets, where
|
||||
<varname>name</varname> is the name of the patch (which is included in
|
||||
the kernel’s <varname>meta.description</varname> attribute),
|
||||
<varname>patch</varname> is the patch itself (possibly compressed),
|
||||
and <varname>extraConfig</varname> (optional) is a string specifying
|
||||
extra options to be concatenated to the kernel configuration file
|
||||
(<filename>.config</filename>).</para>
|
||||
|
||||
<para>The kernel derivation exports an attribute
|
||||
<varname>features</varname> specifying whether optional functionality
|
||||
is or isn’t enabled. This is used in NixOS to implement
|
||||
kernel-specific behaviour. For instance, if the kernel has the
|
||||
<varname>iwlwifi</varname> feature (i.e. has built-in support for
|
||||
Intel wireless chipsets), then NixOS doesn’t have to build the
|
||||
external <varname>iwlwifi</varname> package:
|
||||
|
||||
<programlisting>
|
||||
modulesTree = [kernel]
|
||||
++ pkgs.lib.optional (!kernel.features ? iwlwifi) kernelPackages.iwlwifi
|
||||
++ ...;
|
||||
</programlisting>
|
||||
|
||||
</para>
|
||||
|
||||
<para>How to add a new (major) version of the Linux kernel to Nixpkgs:
|
||||
|
||||
<orderedlist>
|
||||
|
||||
<listitem>
|
||||
<para>Copy (<command>svn cp</command>) the old Nix expression
|
||||
(e.g. <filename>linux-2.6.21.nix</filename>) to the new one
|
||||
(e.g. <filename>linux-2.6.22.nix</filename>) and update it.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Add the new kernel to <filename>all-packages.nix</filename>
|
||||
(e.g., create an attribute
|
||||
<varname>kernel_2_6_22</varname>).</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Now we’re going to update the kernel configuration. First
|
||||
unpack the kernel. Then for each supported platform
|
||||
(<literal>i686</literal>, <literal>x86_64</literal>,
|
||||
<literal>uml</literal>) do the following:
|
||||
|
||||
<orderedlist>
|
||||
|
||||
<listitem>
|
||||
<para>Make an <command>svn copy</command> from the old
|
||||
config (e.g. <filename>config-2.6.21-i686-smp</filename>) to
|
||||
the new one
|
||||
(e.g. <filename>config-2.6.22-i686-smp</filename>).</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Copy the config file for this platform
|
||||
(e.g. <filename>config-2.6.22-i686-smp</filename>) to
|
||||
<filename>.config</filename> in the kernel source tree.
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Run <literal>make oldconfig
|
||||
ARCH=<replaceable>{i386,x86_64,um}</replaceable></literal>
|
||||
and answer all questions. (For the uml configuration, also
|
||||
add <literal>SHELL=bash</literal>.) Make sure to keep the
|
||||
configuration consistent between platforms (i.e. don’t
|
||||
enable some feature on <literal>i686</literal> and disable
|
||||
it on <literal>x86_64</literal>).
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>If needed you can also run <literal>make
|
||||
menuconfig</literal>:
|
||||
|
||||
<screen>
|
||||
$ nix-env -i ncurses
|
||||
$ export NIX_CFLAGS_LINK=-lncurses
|
||||
$ make menuconfig ARCH=<replaceable>arch</replaceable></screen>
|
||||
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Make sure that
|
||||
<literal>CONFIG_FB_TILEBLITTING</literal> is <emphasis>not
|
||||
set</emphasis> (otherwise <command>fbsplash</command> won't
|
||||
work). This option has a tendency to be enabled as a
|
||||
side-effect of other options. If it is, investigate why
|
||||
(there's probably another option that forces it to be on)
|
||||
and fix it.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Copy <filename>.config</filename> over the new config
|
||||
file (e.g. <filename>config-2.6.22-i686-smp</filename>).</para>
|
||||
</listitem>
|
||||
|
||||
</orderedlist>
|
||||
|
||||
</para>
|
||||
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Test building the kernel: <literal>nix-build -A
|
||||
kernel_2_6_22</literal>. If it compiles, ship it! For extra
|
||||
credit, try booting NixOS with it.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>It may be that the new kernel requires updating the external
|
||||
kernel modules and kernel-dependent packages listed in the
|
||||
<varname>kernelPackagesFor</varname> function in
|
||||
<filename>all-packages.nix</filename> (such as the NVIDIA drivers,
|
||||
AUFS, splashutils, etc.). If the updated packages aren’t
|
||||
backwards compatible with older kernels, you need to keep the
|
||||
older versions and use some conditionals. For example, new
|
||||
kernels require splashutils 1.5 while old kernel require 1.3, so
|
||||
<varname>kernelPackagesFor</varname> says:
|
||||
|
||||
<programlisting>
|
||||
splashutils =
|
||||
if kernel.features ? fbSplash then splashutils_13 else
|
||||
if kernel.features ? fbConDecor then splashutils_15 else
|
||||
null;
|
||||
|
||||
splashutils_13 = ...;
|
||||
splashutils_15 = ...;</programlisting>
|
||||
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
</orderedlist>
|
||||
|
||||
</para>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
<!--============================================================-->
|
||||
|
||||
<section>
|
||||
|
||||
<title>X.org</title>
|
||||
|
||||
<para>The Nix expressions for the X.org packages reside in
|
||||
<filename>pkgs/servers/x11/xorg/default.nix</filename>. This file is
|
||||
automatically generated from lists of tarballs in an X.org release.
|
||||
As such it should not be modified directly; rather, you should modify
|
||||
the lists, the generator script or the file
|
||||
<filename>pkgs/servers/x11/xorg/overrides.nix</filename>, in which you
|
||||
can override or add to the derivations produced by the
|
||||
generator.</para>
|
||||
|
||||
<para>The generator is invoked as follows:
|
||||
|
||||
<screen>
|
||||
$ cd pkgs/servers/x11/xorg
|
||||
$ cat tarballs-7.5.list extra.list old.list \
|
||||
| perl ./generate-expr-from-tarballs.pl
|
||||
</screen>
|
||||
|
||||
For each of the tarballs in the <filename>.list</filename> files, the
|
||||
script downloads it, unpacks it, and searches its
|
||||
<filename>configure.ac</filename> and <filename>*.pc.in</filename>
|
||||
files for dependencies. This information is used to generate
|
||||
<filename>default.nix</filename>. The generator caches downloaded
|
||||
tarballs between runs. Pay close attention to the <literal>NOT FOUND:
|
||||
<replaceable>name</replaceable></literal> messages at the end of the
|
||||
run, since they may indicate missing dependencies. (Some might be
|
||||
optional dependencies, however.)</para>
|
||||
|
||||
<para>A file like <filename>tarballs-7.5.list</filename> contains all
|
||||
tarballs in a X.org release. It can be generated like this:
|
||||
|
||||
<screen>
|
||||
$ export i="mirror://xorg/X11R7.4/src/everything/"
|
||||
$ cat $(PRINT_PATH=1 nix-prefetch-url $i | tail -n 1) \
|
||||
| perl -e 'while (<>) { if (/(href|HREF)="([^"]*.bz2)"/) { print "$ENV{'i'}$2\n"; }; }' \
|
||||
| sort > tarballs-7.4.list
|
||||
</screen>
|
||||
|
||||
<filename>extra.list</filename> contains libraries that aren’t part of
|
||||
X.org proper, but are closely related to it, such as
|
||||
<literal>libxcb</literal>. <filename>old.list</filename> contains
|
||||
some packages that were removed from X.org, but are still needed by
|
||||
some people or by other packages (such as
|
||||
<varname>imake</varname>).</para>
|
||||
|
||||
<para>If the expression for a package requires derivation attributes
|
||||
that the generator cannot figure out automatically (say,
|
||||
<varname>patches</varname> or a <varname>postInstall</varname> hook),
|
||||
you should modify
|
||||
<filename>pkgs/servers/x11/xorg/overrides.nix</filename>.</para>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
<!--============================================================-->
|
||||
|
||||
<section>
|
||||
<title>Gnome</title>
|
||||
<para>* Expression is auto-generated</para>
|
||||
<para>* How to update</para>
|
||||
</section>
|
||||
|
||||
|
||||
<!--============================================================-->
|
||||
|
||||
<section>
|
||||
<title>GCC</title>
|
||||
<para>…</para>
|
||||
</section>
|
||||
|
||||
|
||||
</chapter>
|
||||
@@ -1,240 +0,0 @@
|
||||
<chapter xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xml:id="chap-quick-start">
|
||||
|
||||
<title>Quick Start to Adding a Package</title>
|
||||
|
||||
<para>To add a package to Nixpkgs:
|
||||
|
||||
<orderedlist>
|
||||
|
||||
<listitem>
|
||||
<para>Checkout the Nixpkgs source tree:
|
||||
|
||||
<screen>
|
||||
$ svn checkout https://svn.nixos.org/repos/nix/nixpkgs/trunk nixpkgs
|
||||
$ cd nixpkgs</screen>
|
||||
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Find a good place in the Nixpkgs tree to add the Nix
|
||||
expression for your package. For instance, a library package
|
||||
typically goes into
|
||||
<filename>pkgs/development/libraries/<replaceable>pkgname</replaceable></filename>,
|
||||
while a web browser goes into
|
||||
<filename>pkgs/applications/networking/browsers/<replaceable>pkgname</replaceable></filename>.
|
||||
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>
|
||||
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>In the package directory, create a Nix expression — a piece
|
||||
of code that describes how to build the package. In this case, it
|
||||
should be a <emphasis>function</emphasis> that is called with the
|
||||
package dependencies as arguments, and returns a build of the
|
||||
package in the Nix store. The expression should usually be called
|
||||
<filename>default.nix</filename>.
|
||||
|
||||
<screen>
|
||||
$ emacs pkgs/development/libraries/libfoo/default.nix
|
||||
$ svn add pkgs/development/libraries/libfoo/default.nix</screen>
|
||||
|
||||
</para>
|
||||
|
||||
<para>You can have a look at the existing Nix expressions under
|
||||
<filename>pkgs/</filename> to see how it’s done. Here are some
|
||||
good ones:
|
||||
|
||||
<itemizedlist>
|
||||
|
||||
<listitem>
|
||||
<para>GNU cpio: <link
|
||||
xlink:href="https://svn.nixos.org/repos/nix/nixpkgs/trunk/pkgs/tools/archivers/cpio/default.nix"><filename>pkgs/tools/archivers/cpio/default.nix</filename></link>.
|
||||
The simplest possible package. The generic builder in
|
||||
<varname>stdenv</varname> does everything for you. It has
|
||||
no dependencies beyond <varname>stdenv</varname>.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>GNU Hello: <link
|
||||
xlink:href="https://svn.nixos.org/repos/nix/nixpkgs/trunk/pkgs/applications/misc/hello/ex-2/default.nix"><filename>pkgs/applications/misc/hello/ex-2/default.nix</filename></link>.
|
||||
Also trivial, but it specifies some <varname>meta</varname>
|
||||
attributes which is good practice.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>GNU Multiple Precision arithmetic library (GMP): <link
|
||||
xlink:href="https://svn.nixos.org/repos/nix/nixpkgs/trunk/pkgs/development/libraries/gmp/default.nix"><filename>pkgs/development/libraries/gmp/default.nix</filename></link>.
|
||||
Also done by the generic builder, but has a dependency on
|
||||
<varname>m4</varname>.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Pan, a GTK-based newsreader: <link
|
||||
xlink:href="https://svn.nixos.org/repos/nix/nixpkgs/trunk/pkgs/applications/networking/newsreaders/pan/default.nix"><filename>pkgs/applications/networking/newsreaders/pan/default.nix</filename></link>.
|
||||
Has an optional dependency on <varname>gtkspell</varname>,
|
||||
which is only built if <varname>spellCheck</varname> is
|
||||
<literal>true</literal>.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Apache HTTPD: <link
|
||||
xlink:href="https://svn.nixos.org/repos/nix/nixpkgs/trunk/pkgs/servers/http/apache-httpd/default.nix"><filename>pkgs/servers/http/apache-httpd/default.nix</filename></link>.
|
||||
A bunch of optional features, variable substitutions in the
|
||||
configure flags, a post-install hook, and miscellaneous
|
||||
hackery.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>BitTorrent (wxPython-based): <link
|
||||
xlink:href="https://svn.nixos.org/repos/nix/nixpkgs/trunk/pkgs/tools/networking/p2p/bittorrent/default.nix"><filename>pkgs/tools/networking/p2p/bittorrent/default.nix</filename></link>.
|
||||
Uses an external <link
|
||||
xlink:href="https://svn.nixos.org/repos/nix/nixpkgs/trunk/pkgs/tools/networking/p2p/bittorrent/builder.sh">build
|
||||
script</link>, which can be useful if you have lots of code
|
||||
that you don’t want cluttering up the Nix expression. But
|
||||
external builders are mostly obsolete.
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Thunderbird: <link
|
||||
xlink:href="https://svn.nixos.org/repos/nix/nixpkgs/trunk/pkgs/applications/networking/mailreaders/thunderbird-2.x/default.nix"><filename>pkgs/applications/networking/mailreaders/thunderbird-2.x/default.nix</filename></link>.
|
||||
Lots of dependencies.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>JDiskReport, a Java utility: <link
|
||||
xlink:href="https://svn.nixos.org/repos/nix/nixpkgs/trunk/pkgs/tools/misc/jdiskreport/default.nix"><filename>pkgs/tools/misc/jdiskreport/default.nix</filename></link>
|
||||
(and the <link
|
||||
xlink:href="https://svn.nixos.org/repos/nix/nixpkgs/trunk/pkgs/tools/misc/jdiskreport/builder.sh">builder</link>).
|
||||
Nixpkgs doesn’t have a decent <varname>stdenv</varname> for
|
||||
Java yet so this is pretty ad-hoc.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>XML::Simple, a Perl module: <link
|
||||
xlink:href="https://svn.nixos.org/repos/nix/nixpkgs/trunk/pkgs/top-level/perl-packages.nix"><filename>pkgs/top-level/perl-packages.nix</filename></link>
|
||||
(search for the <varname>XMLSimple</varname> attribute).
|
||||
Most Perl modules are so simple to build that they are
|
||||
defined directly in <filename>perl-packages.nix</filename>;
|
||||
no need to make a separate file for them.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Adobe Reader: <link
|
||||
xlink:href="https://svn.nixos.org/repos/nix/nixpkgs/trunk/pkgs/applications/misc/adobe-reader/default.nix"><filename>pkgs/applications/misc/adobe-reader/default.nix</filename></link>.
|
||||
Shows how binary-only packages can be supported. In
|
||||
particular the <link
|
||||
xlink:href="https://svn.nixos.org/repos/nix/nixpkgs/trunk/pkgs/applications/misc/adobe-reader/builder.sh">builder</link>
|
||||
uses <command>patchelf</command> to set the RUNPATH and ELF
|
||||
interpreter of the executables so that the right libraries
|
||||
are found at runtime.</para>
|
||||
</listitem>
|
||||
|
||||
</itemizedlist>
|
||||
|
||||
</para>
|
||||
|
||||
<para>Some notes:
|
||||
|
||||
<itemizedlist>
|
||||
|
||||
<listitem>
|
||||
<para>All <varname linkend="chap-meta">meta</varname>
|
||||
attributes are optional, but it’s still a good idea to
|
||||
provide at least the <varname>description</varname>,
|
||||
<varname>homepage</varname> and <varname
|
||||
linkend="sec-meta-license">license</varname>.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>You can use <command>nix-prefetch-url</command>
|
||||
<replaceable>url</replaceable> to get the SHA-256 hash of
|
||||
source distributions.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>A list of schemes for <literal>mirror://</literal>
|
||||
URLs can be found in <link
|
||||
xlink:href="https://svn.nixos.org/repos/nix/nixpkgs/trunk/pkgs/build-support/fetchurl/mirrors.nix"><filename>pkgs/build-support/fetchurl/mirrors.nix</filename></link>.</para>
|
||||
</listitem>
|
||||
|
||||
</itemizedlist>
|
||||
|
||||
</para>
|
||||
|
||||
<para>The exact syntax and semantics of the Nix expression
|
||||
language, including the built-in function, are described in the
|
||||
Nix manual in the <link
|
||||
xlink:href="http://nixos.org/releases/nix/unstable/manual/#chap-writing-nix-expressions">chapter
|
||||
on writing Nix expressions</link>.</para>
|
||||
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Add a call to the function defined in the previous step to
|
||||
<link
|
||||
xlink:href="https://svn.nixos.org/repos/nix/nixpkgs/trunk/pkgs/top-level/all-packages.nix"><filename>pkgs/top-level/all-packages.nix</filename></link>
|
||||
with some descriptive name for the variable,
|
||||
e.g. <varname>libfoo</varname>.
|
||||
|
||||
<screen>
|
||||
$ emacs pkgs/top-level/all-packages.nix</screen>
|
||||
|
||||
</para>
|
||||
|
||||
<para>The attributes in that file are sorted by category (like
|
||||
“Development / Libraries”) that more-or-less correspond to the
|
||||
directory structure of Nixpkgs, and then by attribute name.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Test whether the package builds:
|
||||
|
||||
<screen>
|
||||
$ nix-build -A libfoo</screen>
|
||||
|
||||
where <varname>libfoo</varname> should be the variable name
|
||||
defined in the previous step. You may want to add the flag
|
||||
<option>-K</option> to keep the temporary build directory in case
|
||||
something fails. If the build succeeds, a symlink
|
||||
<filename>./result</filename> to the package in the Nix store is
|
||||
created.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>If you want to install the package into your profile
|
||||
(optional), do
|
||||
|
||||
<screen>
|
||||
$ nix-env -f . -iA libfoo</screen>
|
||||
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Optionally commit the new package (<command>svn
|
||||
ci</command>) or send a patch to
|
||||
<literal>nix-dev@cs.uu.nl</literal>.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>If you want the TU Delft build farm to build binaries of the
|
||||
package and make them available in the <link
|
||||
xlink:href="http://nixos.org/releases/nixpkgs/channels/nixpkgs-unstable/"><literal>nixpkgs</literal>
|
||||
channel</link>, add it to <link
|
||||
xlink:href="https://svn.nixos.org/repos/nix/nixpkgs/trunk/pkgs/top-level/release.nix"><filename>pkgs/top-level/release.nix</filename></link>.</para>
|
||||
</listitem>
|
||||
|
||||
</orderedlist>
|
||||
|
||||
</para>
|
||||
|
||||
</chapter>
|
||||
@@ -1,44 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<xsl:stylesheet
|
||||
version="1.0"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:str="http://exslt.org/strings"
|
||||
extension-element-prefixes="str">
|
||||
|
||||
<xsl:output method="xml"/>
|
||||
|
||||
<xsl:template match="function|command|literal|varname|filename|option|quote">`<xsl:apply-templates/>'</xsl:template>
|
||||
|
||||
<xsl:template match="token"><xsl:text> </xsl:text><xsl:apply-templates /><xsl:text>
|
||||
</xsl:text></xsl:template>
|
||||
|
||||
<xsl:template match="screen|programlisting">
|
||||
<screen><xsl:apply-templates select="str:split(., '
')" /></screen>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="section[following::section]">
|
||||
<section>
|
||||
<xsl:apply-templates />
|
||||
<screen><xsl:text>
|
||||
</xsl:text></screen>
|
||||
</section>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="*">
|
||||
<xsl:element name="{name(.)}" namespace="{namespace-uri(.)}">
|
||||
<xsl:copy-of select="namespace::*" />
|
||||
<xsl:for-each select="@*">
|
||||
<xsl:attribute name="{name(.)}" namespace="{namespace-uri(.)}">
|
||||
<xsl:value-of select="."/>
|
||||
</xsl:attribute>
|
||||
</xsl:for-each>
|
||||
<xsl:apply-templates/>
|
||||
</xsl:element>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="text()">
|
||||
<xsl:value-of select="translate(., '‘’“”—', concat("`'", '""-'))" />
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
@@ -1,718 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<article xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
|
||||
<title>Nixpkgs Release Notes</title>
|
||||
|
||||
|
||||
<section><title>Release 0.13 (February 5, 2010)</title>
|
||||
|
||||
<para>As always, there are many changes. Some of the most important
|
||||
updates are:
|
||||
|
||||
<itemizedlist>
|
||||
|
||||
<listitem><para>Glibc 2.9.</para></listitem>
|
||||
|
||||
<listitem><para>GCC 4.3.3.</para></listitem>
|
||||
|
||||
<listitem><para>Linux 2.6.32.</para></listitem>
|
||||
|
||||
<listitem><para>X.org 7.5.</para></listitem>
|
||||
|
||||
<listitem><para>KDE 4.3.4.</para></listitem>
|
||||
|
||||
</itemizedlist>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
<section><title>Release 0.12 (April 24, 2009)</title>
|
||||
|
||||
<para>There are way too many additions to Nixpkgs since the last
|
||||
release to list here: for example, the number of packages on Linux has
|
||||
increased from 1002 to 2159. However, some specific improvements are
|
||||
worth listing:
|
||||
|
||||
<itemizedlist>
|
||||
|
||||
<listitem><para>Nixpkgs now has a manual. In particular, it
|
||||
describes the standard build environment in
|
||||
detail.</para></listitem>
|
||||
|
||||
<listitem><para>Major new packages:
|
||||
|
||||
<itemizedlist>
|
||||
|
||||
<listitem><para>KDE 4.</para></listitem>
|
||||
|
||||
<listitem><para>TeXLive.</para></listitem>
|
||||
|
||||
<listitem><para>VirtualBox.</para></listitem>
|
||||
|
||||
</itemizedlist>
|
||||
|
||||
… and many others.
|
||||
|
||||
</para></listitem>
|
||||
|
||||
<listitem><para>Important updates:
|
||||
|
||||
<itemizedlist>
|
||||
|
||||
<listitem><para>Glibc 2.7.</para></listitem>
|
||||
|
||||
<listitem><para>GCC 4.2.4.</para></listitem>
|
||||
|
||||
<listitem><para>Linux 2.6.25 — 2.6.28.</para></listitem>
|
||||
|
||||
<listitem><para>Firefox 3.</para></listitem>
|
||||
|
||||
<listitem><para>X.org 7.3.</para></listitem>
|
||||
|
||||
</itemizedlist>
|
||||
|
||||
</para></listitem>
|
||||
|
||||
<listitem><para>Support for building derivations in a virtual
|
||||
machine, including RPM and Debian builds in automatically generated
|
||||
VM images. See
|
||||
<filename>pkgs/build-support/vm.default.nix</filename> for
|
||||
details.</para></listitem>
|
||||
|
||||
<listitem><para>Improved support for building Haskell
|
||||
packages.</para></listitem>
|
||||
|
||||
</itemizedlist>
|
||||
|
||||
</para>
|
||||
|
||||
<para>The following people contributed to this release:
|
||||
|
||||
Andres Löh,
|
||||
Arie Middelkoop,
|
||||
Armijn Hemel,
|
||||
Eelco Dolstra,
|
||||
Lluís Batlle,
|
||||
Ludovic Courtès,
|
||||
Marc Weber,
|
||||
Mart Kolthof,
|
||||
Martin Bravenboer,
|
||||
Michael Raskin,
|
||||
Nicolas Pierron,
|
||||
Peter Simons,
|
||||
Pjotr Prins,
|
||||
Rob Vermaas,
|
||||
Sander van der Burg,
|
||||
Tobias Hammerschmidt,
|
||||
Valentin David,
|
||||
Wouter den Breejen and
|
||||
Yury G. Kudryashov.
|
||||
|
||||
In addition, several people contributed patches on the
|
||||
<literal>nix-dev</literal> mailing list.</para>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
<section><title>Release 0.11 (September 11, 2007)</title>
|
||||
|
||||
<para>This release has the following improvements:
|
||||
|
||||
<itemizedlist>
|
||||
|
||||
|
||||
<listitem><para>The standard build environment
|
||||
(<literal>stdenv</literal>) is now pure on the
|
||||
<literal>x86_64-linux</literal> and <literal>powerpc-linux</literal>
|
||||
platforms, just as on <literal>i686-linux</literal>. (Purity means
|
||||
that building and using the standard environment has no dependencies
|
||||
outside of the Nix store. For instance, it doesn’t require an
|
||||
external C compiler such as <filename>/usr/bin/gcc</filename>.)
|
||||
Also, the statically linked binaries used in the bootstrap process
|
||||
are now automatically reproducible, making it easy to update the
|
||||
bootstrap tools and to add support for other Linux platforms. See
|
||||
<filename>pkgs/stdenv/linux/make-bootstrap-tools.nix</filename> for
|
||||
details.</para></listitem>
|
||||
|
||||
|
||||
<listitem><para>Hook variables in the generic builder are now
|
||||
executed using the <function>eval</function> shell command. This
|
||||
has a major advantage: you can write hooks directly in Nix
|
||||
expressions. For instance, rather than writing a builder like this:
|
||||
|
||||
<programlisting>
|
||||
source $stdenv/setup
|
||||
|
||||
postInstall=postInstall
|
||||
postInstall() {
|
||||
ln -sf gzip $out/bin/gunzip
|
||||
ln -sf gzip $out/bin/zcat
|
||||
}
|
||||
|
||||
genericBuild</programlisting>
|
||||
|
||||
(the <literal>gzip</literal> builder), you can just add this
|
||||
attribute to the derivation:
|
||||
|
||||
<programlisting>
|
||||
postInstall = "ln -sf gzip $out/bin/gunzip; ln -sf gzip $out/bin/zcat";</programlisting>
|
||||
|
||||
and so a separate build script becomes unnecessary. This should
|
||||
allow us to get rid of most builders in Nixpkgs.</para></listitem>
|
||||
|
||||
|
||||
<listitem><para>It is now possible to have the generic builder pass
|
||||
arguments to <command>configure</command> and
|
||||
<command>make</command> that contain whitespace. Previously, for
|
||||
example, you could say in a builder,
|
||||
|
||||
<programlisting>
|
||||
configureFlags="CFLAGS=-O0"</programlisting>
|
||||
|
||||
but not
|
||||
|
||||
<programlisting>
|
||||
configureFlags="CFLAGS=-O0 -g"</programlisting>
|
||||
|
||||
since the <literal>-g</literal> would be interpreted as a separate
|
||||
argument to <command>configure</command>. Now you can say
|
||||
|
||||
<programlisting>
|
||||
configureFlagsArray=("CFLAGS=-O0 -g")</programlisting>
|
||||
|
||||
or similarly
|
||||
|
||||
<programlisting>
|
||||
configureFlagsArray=("CFLAGS=-O0 -g" "LDFLAGS=-L/foo -L/bar")</programlisting>
|
||||
|
||||
which does the right thing. Idem for <literal>makeFlags</literal>,
|
||||
<literal>installFlags</literal>, <literal>checkFlags</literal> and
|
||||
<literal>distFlags</literal>.</para>
|
||||
|
||||
<para>Unfortunately you can't pass arrays to Bash through the
|
||||
environment, so you can't put the array above in a Nix expression,
|
||||
e.g.,
|
||||
|
||||
<programlisting>
|
||||
configureFlagsArray = ["CFLAGS=-O0 -g"];</programlisting>
|
||||
|
||||
since it would just be flattened to a since string. However, you
|
||||
<emphasis>can</emphasis> use the inline hooks described above:
|
||||
|
||||
<programlisting>
|
||||
preConfigure = "configureFlagsArray=(\"CFLAGS=-O0 -g\")";</programlisting>
|
||||
|
||||
</para></listitem>
|
||||
|
||||
|
||||
<listitem><para>The function <function>fetchurl</function> now has
|
||||
support for two different kinds of mirroring of files. First, it
|
||||
has support for <emphasis>content-addressable mirrors</emphasis>.
|
||||
For example, given the <function>fetchurl</function> call
|
||||
|
||||
<programlisting>
|
||||
fetchurl {
|
||||
url = http://releases.mozilla.org/<replaceable>...</replaceable>/firefox-2.0.0.6-source.tar.bz2;
|
||||
sha1 = "eb72f55e4a8bf08e8c6ef227c0ade3d068ba1082";
|
||||
}</programlisting>
|
||||
|
||||
<function>fetchurl</function> will first try to download this file
|
||||
from <link
|
||||
xlink:href="http://nixos.org/tarballs/sha1/eb72f55e4a8bf08e8c6ef227c0ade3d068ba1082"/>.
|
||||
If that file doesn’t exist, it will try the original URL. In
|
||||
general, the “content-addressed” location is
|
||||
<replaceable>mirror</replaceable><literal>/</literal><replaceable>hash-type</replaceable><literal>/</literal><replaceable>hash</replaceable>.
|
||||
There is currently only one content-addressable mirror (<link
|
||||
xlink:href="http://nixos.org/tarballs"/>), but more can be
|
||||
specified in the <varname>hashedMirrors</varname> attribute in
|
||||
<filename>pkgs/build-support/fetchurl/mirrors.nix</filename>, or by
|
||||
setting the <envar>NIX_HASHED_MIRRORS</envar> environment variable
|
||||
to a whitespace-separated list of URLs.</para>
|
||||
|
||||
<para>Second, <function>fetchurl</function> has support for
|
||||
widely-mirrored distribution sites such as SourceForge or the Linux
|
||||
kernel archives. Given a URL of the form
|
||||
<literal>mirror://<replaceable>site</replaceable>/<replaceable>path</replaceable></literal>,
|
||||
it will try to download <replaceable>path</replaceable> from a
|
||||
configurable list of mirrors for <replaceable>site</replaceable>.
|
||||
(This idea was borrowed from Gentoo Linux.) Example:
|
||||
<programlisting>
|
||||
fetchurl {
|
||||
url = mirror://gnu/gcc/gcc-4.2.0/gcc-core-4.2.0.tar.bz2;
|
||||
sha256 = "0ykhzxhr8857dr97z0j9wyybfz1kjr71xk457cfapfw5fjas4ny1";
|
||||
}</programlisting>
|
||||
Currently <replaceable>site</replaceable> can be
|
||||
<literal>sourceforge</literal>, <literal>gnu</literal> and
|
||||
<literal>kernel</literal>. The list of mirrors is defined in
|
||||
<filename>pkgs/build-support/fetchurl/mirrors.nix</filename>. You
|
||||
can override the list of mirrors for a particular site by setting
|
||||
the environment variable
|
||||
<envar>NIX_MIRRORS_<replaceable>site</replaceable></envar>, e.g.
|
||||
<programlisting>
|
||||
export NIX_MIRRORS_sourceforge=http://osdn.dl.sourceforge.net/sourceforge/</programlisting>
|
||||
</para>
|
||||
|
||||
</listitem>
|
||||
|
||||
|
||||
<listitem><para>Important updates:
|
||||
|
||||
<itemizedlist>
|
||||
|
||||
<listitem><para>Glibc 2.5.</para></listitem>
|
||||
|
||||
<listitem><para>GCC 4.1.2.</para></listitem>
|
||||
|
||||
<listitem><para>Gnome 2.16.3.</para></listitem>
|
||||
|
||||
<listitem><para>X11R7.2.</para></listitem>
|
||||
|
||||
<listitem><para>Linux 2.6.21.7 and 2.6.22.6.</para></listitem>
|
||||
|
||||
<listitem><para>Emacs 22.1.</para></listitem>
|
||||
|
||||
</itemizedlist>
|
||||
|
||||
</para></listitem>
|
||||
|
||||
|
||||
<listitem><para>Major new packages:
|
||||
|
||||
<itemizedlist>
|
||||
|
||||
<listitem><para>KDE 3.5.6 Base.</para></listitem>
|
||||
|
||||
<listitem><para>Wine 0.9.43.</para></listitem>
|
||||
|
||||
<listitem><para>OpenOffice 2.2.1.</para></listitem>
|
||||
|
||||
<listitem><para>Many Linux system packages to support
|
||||
NixOS.</para></listitem>
|
||||
|
||||
</itemizedlist>
|
||||
|
||||
</para></listitem>
|
||||
|
||||
</itemizedlist>
|
||||
|
||||
</para>
|
||||
|
||||
<para>The following people contributed to this release:
|
||||
|
||||
Andres Löh,
|
||||
Arie Middelkoop,
|
||||
Armijn Hemel,
|
||||
Eelco Dolstra,
|
||||
Marc Weber,
|
||||
Mart Kolthof,
|
||||
Martin Bravenboer,
|
||||
Michael Raskin,
|
||||
Wouter den Breejen and
|
||||
Yury G. Kudryashov.
|
||||
|
||||
</para>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
<section><title>Release 0.10 (October 12, 2006)</title>
|
||||
|
||||
<note><para>This release of Nixpkgs requires <link
|
||||
xlink:href='http://nixos.org/releases/nix/nix-0.10/'>Nix
|
||||
0.10</link> or higher.</para></note>
|
||||
|
||||
<para>This release has the following improvements:</para>
|
||||
|
||||
<itemizedlist>
|
||||
|
||||
<listitem><para><filename>pkgs/system/all-packages-generic.nix</filename>
|
||||
is gone, we now just have
|
||||
<filename>pkgs/top-level/all-packages.nix</filename> that contains
|
||||
all available packages. This should cause much less confusion with
|
||||
users. <filename>all-packages.nix</filename> is a function that by
|
||||
default returns packages for the current platform, but you can
|
||||
override this by specifying a different <varname>system</varname>
|
||||
argument.</para></listitem>
|
||||
|
||||
<listitem><para>Certain packages in Nixpkgs are now
|
||||
user-configurable through a configuration file, i.e., without having
|
||||
to edit the Nix expressions in Nixpkgs. For instance, the Firefox
|
||||
provided in the Nixpkgs channel is built without the RealPlayer
|
||||
plugin (for legal reasons). Previously, you could easily enable
|
||||
RealPlayer support by editing the call to the Firefox function in
|
||||
<filename>all-packages.nix</filename>, but such changes are not
|
||||
respected when Firefox is subsequently updated through the Nixpkgs
|
||||
channel.</para>
|
||||
|
||||
<para>The Nixpkgs configuration file (found in
|
||||
<filename>~/.nixpkgs/config.nix</filename> or through the
|
||||
<envar>NIXPKGS_CONFIG</envar> environment variable) is an attribute
|
||||
set that contains configuration options that
|
||||
<filename>all-packages.nix</filename> reads and uses for certain
|
||||
packages. For instance, the following configuration file:
|
||||
|
||||
<programlisting>
|
||||
{
|
||||
firefox = {
|
||||
enableRealPlayer = true;
|
||||
};
|
||||
}</programlisting>
|
||||
|
||||
persistently enables RealPlayer support in the Firefox
|
||||
build.</para>
|
||||
|
||||
<para>(Actually, <literal>firefox.enableRealPlayer</literal> is the
|
||||
<emphasis>only</emphasis> configuration option currently available,
|
||||
but more are sure to be added.)</para></listitem>
|
||||
|
||||
<listitem><para>Support for new platforms:
|
||||
|
||||
<itemizedlist>
|
||||
|
||||
<listitem><para><literal>i686-cygwin</literal>, i.e., Windows
|
||||
(using <link xlink:href="http://www.cygwin.com/">Cygwin</link>).
|
||||
The standard environment on <literal>i686-cygwin</literal> by
|
||||
default builds binaries for the Cygwin environment (i.e., it
|
||||
uses Cygwin tools and produces executables that use the Cygwin
|
||||
library). However, there is also a standard environment that
|
||||
produces binaries that use <link
|
||||
xlink:href="http://www.mingw.org/">MinGW</link>. You can use it
|
||||
by calling <filename>all-package.nix</filename> with the
|
||||
<varname>stdenvType</varname> argument set to
|
||||
<literal>"i686-mingw"</literal>.</para></listitem>
|
||||
|
||||
<listitem><para><literal>i686-darwin</literal>, i.e., Mac OS X
|
||||
on Intel CPUs.</para></listitem>
|
||||
|
||||
<listitem><para><literal>powerpc-linux</literal>.</para></listitem>
|
||||
|
||||
<listitem><para><literal>x86_64-linux</literal>, i.e., Linux on
|
||||
64-bit AMD/Intel CPUs. Unlike <literal>i686-linux</literal>,
|
||||
this platform doesn’t have a pure <literal>stdenv</literal>
|
||||
yet.</para></listitem>
|
||||
|
||||
</itemizedlist>
|
||||
|
||||
</para>
|
||||
|
||||
</listitem>
|
||||
|
||||
<listitem><para>The default compiler is now GCC 4.1.1.</para></listitem>
|
||||
|
||||
<listitem><para>X11 updated to X.org’s X11R7.1.</para></listitem>
|
||||
|
||||
<listitem><para>Notable new packages:
|
||||
|
||||
<itemizedlist>
|
||||
|
||||
<listitem><para>Opera.</para></listitem>
|
||||
|
||||
<listitem><para>Microsoft Visual C++ 2005 Express Edition and
|
||||
the Windows SDK.</para></listitem>
|
||||
|
||||
</itemizedlist>
|
||||
|
||||
In total there are now around 809 packages in Nixpkgs.</para>
|
||||
|
||||
</listitem>
|
||||
|
||||
|
||||
<listitem><para>It is now <emphasis>much</emphasis> easier to
|
||||
override the default C compiler and other tools in
|
||||
<literal>stdenv</literal> for specific packages.
|
||||
<filename>all-packages.nix</filename> provides two utility
|
||||
functions for this purpose: <function>overrideGCC</function> and
|
||||
<function>overrideInStdenv</function>. Both take a
|
||||
<literal>stdenv</literal> and return an augmented
|
||||
<literal>stdenv</literal>; the formed changes the C compiler, and
|
||||
the latter adds additional packages to the front of
|
||||
<literal>stdenv</literal>’s initial <envar>PATH</envar>, allowing
|
||||
tools to be overriden.</para>
|
||||
|
||||
<para>For instance, the package <varname>strategoxt</varname>
|
||||
doesn’t build with the GNU Make in <literal>stdenv</literal>
|
||||
(version 3.81), so we call it with an augmented
|
||||
<literal>stdenv</literal> that uses GNU Make 3.80:
|
||||
|
||||
<programlisting>
|
||||
strategoxt = (import ../development/compilers/strategoxt) {
|
||||
inherit fetchurl pkgconfig sdf aterm;
|
||||
stdenv = overrideInStdenv stdenv [gnumake380];
|
||||
};
|
||||
|
||||
gnumake380 = <replaceable>...</replaceable>;</programlisting>
|
||||
|
||||
Likewise, there are many packages that don’t compile with the
|
||||
default GCC (4.1.1), but that’s easily fixed:
|
||||
|
||||
<programlisting>
|
||||
exult = import ../games/exult {
|
||||
inherit fetchurl SDL SDL_mixer zlib libpng unzip;
|
||||
stdenv = overrideGCC stdenv gcc34;
|
||||
};</programlisting>
|
||||
|
||||
</para></listitem>
|
||||
|
||||
|
||||
<listitem><para>It has also become much easier to experiment with
|
||||
changes to the <literal>stdenv</literal> setup script (which notably
|
||||
contains the generic builder). Since edits to
|
||||
<filename>pkgs/stdenv/generic/setup.sh</filename> trigger a rebuild
|
||||
of <emphasis>everything</emphasis>, this was formerly quite painful.
|
||||
But now <literal>stdenv</literal> contains a function to
|
||||
“regenerate” <literal>stdenv</literal> with a different setup
|
||||
script, allowing the use of a different setup script for specific
|
||||
packages:
|
||||
|
||||
<programlisting>
|
||||
pkg = import <replaceable>...</replaceable> {
|
||||
stdenv = stdenv.regenerate ./my-setup.sh;
|
||||
<replaceable>...</replaceable>
|
||||
}</programlisting>
|
||||
|
||||
</para></listitem>
|
||||
|
||||
|
||||
<listitem><para>Packages can now have a human-readable
|
||||
<emphasis>description</emphasis> field. Package descriptions are
|
||||
shown by <literal>nix-env -qa --description</literal>. In addition,
|
||||
they’re shown on the Nixpkgs release page. A description can be
|
||||
added to a package as follows:
|
||||
|
||||
<programlisting>
|
||||
stdenv.mkDerivation {
|
||||
name = "exult-1.2";
|
||||
<replaceable>...</replaceable>
|
||||
meta = {
|
||||
description = "A reimplementation of the Ultima VII game engine";
|
||||
};
|
||||
}</programlisting>
|
||||
|
||||
The <varname>meta</varname> attribute is not passed to the builder,
|
||||
so changes to the description do not trigger a rebuild. Additional
|
||||
<varname>meta</varname> attributes may be defined in the future
|
||||
(such as the URL of the package’s homepage, the license,
|
||||
etc.).</para></listitem>
|
||||
|
||||
</itemizedlist>
|
||||
|
||||
|
||||
<para>The following people contributed to this release:
|
||||
|
||||
Andres Löh,
|
||||
Armijn Hemel,
|
||||
Christof Douma,
|
||||
Eelco Dolstra,
|
||||
Eelco Visser,
|
||||
Mart Kolthof,
|
||||
Martin Bravenboer,
|
||||
Merijn de Jonge,
|
||||
Rob Vermaas and
|
||||
Roy van den Broek.
|
||||
|
||||
</para>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
<section><title>Release 0.9 (January 31, 2006)</title>
|
||||
|
||||
<para>There have been zillions of changes since the last release of
|
||||
Nixpkgs. Many packages have been added or updated. The following are
|
||||
some of the more notable changes:</para>
|
||||
|
||||
<itemizedlist>
|
||||
|
||||
<listitem><para>Distribution files have been moved to <link
|
||||
xlink:href="http://nixos.org/" />.</para></listitem>
|
||||
|
||||
<listitem><para>The C library on Linux, Glibc, has been updated to
|
||||
version 2.3.6.</para></listitem>
|
||||
|
||||
<listitem><para>The default compiler is now GCC 3.4.5. GCC 4.0.2 is
|
||||
also available.</para></listitem>
|
||||
|
||||
<listitem><para>The old, unofficial Xlibs has been replaced by the
|
||||
official modularised X11 distribution from X.org, i.e., X11R7.0.
|
||||
X11R7.0 consists of 287 (!) packages, all of which are in Nixpkgs
|
||||
though not all have been tested. It is now possible to build a
|
||||
working X server (previously we only had X client libraries). We
|
||||
use a fully Nixified X server on NixOS.</para></listitem>
|
||||
|
||||
<listitem><para>The Sun JDK 5 has been purified, i.e., it doesn’t
|
||||
require any non-Nix components such as
|
||||
<filename>/lib/ld-linux.so.2</filename>. This means that Java
|
||||
applications such as Eclipse and Azureus can run on
|
||||
NixOS.</para></listitem>
|
||||
|
||||
<listitem><para>Hardware-accelerated OpenGL support, used by games
|
||||
like Quake 3 (which is now built from source).</para></listitem>
|
||||
|
||||
<listitem><para>Improved support for FreeBSD on
|
||||
x86.</para></listitem>
|
||||
|
||||
<listitem><para>Improved Haskell support; e.g., the GHC build is now
|
||||
pure.</para></listitem>
|
||||
|
||||
<listitem><para>Some support for cross-compilation: cross-compiling
|
||||
builds of GCC and Binutils, and cross-compiled builds of the C
|
||||
library uClibc.</para></listitem>
|
||||
|
||||
<listitem><para>Notable new packages:
|
||||
|
||||
<itemizedlist>
|
||||
|
||||
<listitem><para>teTeX, including support for building LaTeX
|
||||
documents using Nix (with automatic dependency
|
||||
determination).</para></listitem>
|
||||
|
||||
<listitem><para>Ruby.</para></listitem>
|
||||
|
||||
<listitem><para>System-level packages to support NixOS,
|
||||
e.g. Grub, GNU <literal>parted</literal> and so
|
||||
on.</para></listitem>
|
||||
|
||||
<listitem><para><literal>ecj</literal>, the Eclipse Compiler for
|
||||
Java, so we finally have a freely distributable compiler that
|
||||
supports Java 5.0.</para></listitem>
|
||||
|
||||
<listitem><para><literal>php</literal>.</para></listitem>
|
||||
|
||||
<listitem><para>The GIMP.</para></listitem>
|
||||
|
||||
<listitem><para>Inkscape.</para></listitem>
|
||||
|
||||
<listitem><para>GAIM.</para></listitem>
|
||||
|
||||
<listitem><para><literal>kdelibs</literal>. This allows us to
|
||||
add KDE-based packages (such as
|
||||
<literal>kcachegrind</literal>).</para></listitem>
|
||||
|
||||
</itemizedlist>
|
||||
|
||||
</para></listitem>
|
||||
|
||||
</itemizedlist>
|
||||
|
||||
<para>The following people contributed to this release:
|
||||
|
||||
Andres Löh,
|
||||
Armijn Hemel,
|
||||
Bogdan Dumitriu,
|
||||
Christof Douma,
|
||||
Eelco Dolstra,
|
||||
Eelco Visser,
|
||||
Mart Kolthof,
|
||||
Martin Bravenboer,
|
||||
Rob Vermaas and
|
||||
Roy van den Broek.
|
||||
|
||||
</para>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
<section><title>Release 0.8 (April 11, 2005)</title>
|
||||
|
||||
<para>This release is mostly to remain synchronised with the changed
|
||||
hashing scheme in Nix 0.8.</para>
|
||||
|
||||
<para>Notable updates:
|
||||
|
||||
<itemizedlist>
|
||||
|
||||
<listitem><para>Adobe Reader 7.0</para></listitem>
|
||||
|
||||
<listitem><para>Various security updates (zlib 1.2.2, etc.)</para></listitem>
|
||||
|
||||
</itemizedlist>
|
||||
|
||||
</para>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
<section><title>Release 0.7 (March 14, 2005)</title>
|
||||
|
||||
<itemizedlist>
|
||||
|
||||
<listitem>
|
||||
|
||||
<para>The bootstrap process for the standard build
|
||||
environment on Linux (stdenv-linux) has been improved. It is no
|
||||
longer dependent in its initial bootstrap stages on the system
|
||||
Glibc, GCC, and other tools. Rather, Nixpkgs contains a statically
|
||||
linked bash and curl, and uses that to download other statically
|
||||
linked tools. These are then used to build a Glibc and dynamically
|
||||
linked versions of all other tools.</para>
|
||||
|
||||
<para>This change also makes the bootstrap process faster. For
|
||||
instance, GCC is built only once instead of three times.</para>
|
||||
|
||||
<para>(Contributed by Armijn Hemel.)</para>
|
||||
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
|
||||
<para>Tarballs used by Nixpkgs are now obtained from the same server
|
||||
that hosts Nixpkgs (<link
|
||||
xlink:href="http://catamaran.labs.cs.uu.nl/" />). This reduces the
|
||||
risk of packages being unbuildable due to moved or deleted files on
|
||||
various servers.</para>
|
||||
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
|
||||
<para>There now is a generic mechanism for building Perl modules.
|
||||
See the various Perl modules defined in
|
||||
pkgs/system/all-packages-generic.nix.</para>
|
||||
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
|
||||
<para>Notable new packages:
|
||||
|
||||
<itemizedlist>
|
||||
|
||||
<listitem><para>Qt 3</para></listitem>
|
||||
<listitem><para>MySQL</para></listitem>
|
||||
<listitem><para>MythTV</para></listitem>
|
||||
<listitem><para>Mono</para></listitem>
|
||||
<listitem><para>MonoDevelop (alpha)</para></listitem>
|
||||
<listitem><para>Xine</para></listitem>
|
||||
|
||||
</itemizedlist>
|
||||
|
||||
</para>
|
||||
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
|
||||
<para>Notable updates:
|
||||
|
||||
<itemizedlist>
|
||||
|
||||
<listitem><para>GCC 3.4.3</para></listitem>
|
||||
<listitem><para>Glibc 2.3.4</para></listitem>
|
||||
<listitem><para>GTK 2.6</para></listitem>
|
||||
|
||||
</itemizedlist>
|
||||
|
||||
</para>
|
||||
|
||||
</listitem>
|
||||
|
||||
</itemizedlist>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
</article>
|
||||
1183
doc/stdenv.xml
1183
doc/stdenv.xml
File diff suppressed because it is too large
Load Diff
283
doc/style.css
283
doc/style.css
@@ -1,283 +0,0 @@
|
||||
/* Copied from http://bakefile.sourceforge.net/, which appears
|
||||
licensed under the GNU GPL. */
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
Basic headers and text:
|
||||
***************************************************************************/
|
||||
|
||||
body
|
||||
{
|
||||
font-family: sans-serif;
|
||||
background: white;
|
||||
margin: 2em 1em 2em 1em;
|
||||
}
|
||||
|
||||
h1,h2,h3
|
||||
{
|
||||
color: #005aa0;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
h1 /* title */
|
||||
{
|
||||
font-size: 200%;
|
||||
}
|
||||
|
||||
h2 /* chapters, appendices, subtitle */
|
||||
{
|
||||
font-size: 180%;
|
||||
}
|
||||
|
||||
/* Extra space between chapters, appendices. */
|
||||
div.chapter > div.titlepage h2, div.appendix > div.titlepage h2
|
||||
{
|
||||
margin-top: 1.5em;
|
||||
}
|
||||
|
||||
div.section > div.titlepage h2 /* sections */
|
||||
{
|
||||
font-size: 150%;
|
||||
margin-top: 1.5em;
|
||||
}
|
||||
|
||||
h3 /* subsections */
|
||||
{
|
||||
font-size: 125%;
|
||||
}
|
||||
|
||||
div.appendix h3
|
||||
{
|
||||
font-size: 150%;
|
||||
margin-top: 1.5em;
|
||||
}
|
||||
|
||||
div.refnamediv h2, div.refsynopsisdiv h2, div.refsection h2 /* refentry parts */
|
||||
{
|
||||
margin-top: 1.4em;
|
||||
font-size: 125%;
|
||||
}
|
||||
|
||||
div.refsection h3
|
||||
{
|
||||
font-size: 110%;
|
||||
}
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
Examples:
|
||||
***************************************************************************/
|
||||
|
||||
div.example
|
||||
{
|
||||
border: 1px solid #6185a0;
|
||||
padding: 6px 6px;
|
||||
margin-left: 1.5em;
|
||||
margin-right: 1.5em;
|
||||
background: #f4f4f8;
|
||||
}
|
||||
|
||||
div.example p.title
|
||||
{
|
||||
margin-top: 0em;
|
||||
}
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
Screen dumps:
|
||||
***************************************************************************/
|
||||
|
||||
pre.screen, pre.programlisting
|
||||
{
|
||||
border: 1px solid #6185a0;
|
||||
padding: 3px 3px;
|
||||
margin-left: 1.5em;
|
||||
margin-right: 1.5em;
|
||||
color: #600000;
|
||||
background: #f4f4f8;
|
||||
font-family: monospace;
|
||||
/* font-size: 90%; */
|
||||
}
|
||||
|
||||
div.example pre.programlisting
|
||||
{
|
||||
border: 0px;
|
||||
padding: 0 0;
|
||||
margin: 0 0 0 0;
|
||||
}
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
Notes, warnings etc:
|
||||
***************************************************************************/
|
||||
|
||||
.note, .warning
|
||||
{
|
||||
border: 1px solid #6185a0;
|
||||
padding: 3px 3px;
|
||||
margin-left: 1.5em;
|
||||
margin-right: 1.5em;
|
||||
margin-bottom: 1em;
|
||||
padding: 0.3em 0.3em 0.3em 0.3em;
|
||||
background: #fffff5;
|
||||
}
|
||||
|
||||
div.note, div.warning
|
||||
{
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
div.note h3, div.warning h3
|
||||
{
|
||||
color: red;
|
||||
font-size: 100%;
|
||||
// margin: 0 0 0 0;
|
||||
padding-right: 0.5em;
|
||||
display: inline;
|
||||
}
|
||||
|
||||
div.note p, div.warning p
|
||||
{
|
||||
margin-bottom: 0em;
|
||||
}
|
||||
|
||||
div.note h3 + p, div.warning h3 + p
|
||||
{
|
||||
display: inline;
|
||||
}
|
||||
|
||||
div.note h3
|
||||
{
|
||||
color: blue;
|
||||
font-size: 100%;
|
||||
}
|
||||
|
||||
div.navfooter *
|
||||
{
|
||||
font-size: 90%;
|
||||
}
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
Links colors and highlighting:
|
||||
***************************************************************************/
|
||||
|
||||
a:link { color: #0048b3; }
|
||||
a:visited { color: #002a6a; }
|
||||
a:hover { background: #ffffcd; }
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
Table of contents:
|
||||
***************************************************************************/
|
||||
|
||||
.toc
|
||||
{
|
||||
font-size: 90%;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
Special elements:
|
||||
***************************************************************************/
|
||||
|
||||
tt, code
|
||||
{
|
||||
color: #400000;
|
||||
}
|
||||
|
||||
.term
|
||||
{
|
||||
font-weight: bold;
|
||||
|
||||
}
|
||||
|
||||
div.variablelist dd p, div.glosslist dd p
|
||||
{
|
||||
margin-top: 0em;
|
||||
}
|
||||
|
||||
div.variablelist dd, div.glosslist dd
|
||||
{
|
||||
margin-left: 1.5em;
|
||||
}
|
||||
|
||||
div.glosslist dt
|
||||
{
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.default
|
||||
{
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.availability
|
||||
{
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.varname
|
||||
{
|
||||
color: #400000;
|
||||
}
|
||||
|
||||
|
||||
div.informaltable table
|
||||
{
|
||||
border: 1px solid #6185a0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
div.informaltable td
|
||||
{
|
||||
border: 0;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
div.informaltable td.default
|
||||
{
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
div.informaltable th
|
||||
{
|
||||
text-align: left;
|
||||
color: #005aa0;
|
||||
border: 0;
|
||||
padding: 5px;
|
||||
background: #fffff5;
|
||||
font-weight: normal;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
td.varname, td.tagname, td.paramname
|
||||
{
|
||||
font-weight: bold;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
div.epigraph
|
||||
{
|
||||
font-style: italic;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
table.productionset table.productionset
|
||||
{
|
||||
font-family: monospace;
|
||||
}
|
||||
|
||||
strong.command
|
||||
{
|
||||
// font-family: monospace;
|
||||
// font-style: italic;
|
||||
// font-weight: normal;
|
||||
color: #400000;
|
||||
}
|
||||
|
||||
div.calloutlist td
|
||||
{
|
||||
padding-bottom: 1em;
|
||||
}
|
||||
55
maintainers/docs/bugs.txt
Normal file
55
maintainers/docs/bugs.txt
Normal file
@@ -0,0 +1,55 @@
|
||||
* If NIX_DEBUG is turned on (set to "1"), autoconf configure scripts
|
||||
may fail to find the correct preprocessor:
|
||||
|
||||
checking how to run the C preprocessor... /lib/cpp
|
||||
|
||||
|
||||
* When building gcc using a Nix gcc, generated libraries link against
|
||||
the libraries of the latter:
|
||||
|
||||
$ ldd /nix/store/3b1d3995c4edbf026be5c73f66f69245-gcc-3.3.3/lib/libstdc++.so
|
||||
...
|
||||
libgcc_s.so.1 => /nix/store/1f19e61d1b7051f1131f78b41b2a0e7e-gcc-3.3.2/lib/libgcc_s.so.1 (0x400de000)
|
||||
(wrong! should be .../3b1d.../lib/libgcc_s...)
|
||||
...
|
||||
|
||||
|
||||
* In libXt:
|
||||
|
||||
/bin/sh ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I. -DXTHREADS -DXUSE_MTSAFE_API -I/nix/store/aadf0bd4a908da11d14f6538503b8408-libX11-6.2.1/include -I/nix/store/ba366e3b944ead64ec9b0490bb615874-xproto-6.6.1/include -I./include/X11 -g -O2 -c -o ActionHook.lo `test -f 'ActionHook.c' || echo './'`ActionHook.c
|
||||
mkdir .libs
|
||||
gcc -DHAVE_CONFIG_H -I. -I. -I. -DXTHREADS -DXUSE_MTSAFE_API -I/nix/store/aadf0bd4a908da11d14f6538503b8408-libX11-6.2.1/include -I/nix/store/ba366e3b944ead64ec9b0490bb615874-xproto-6.6.1/include -I./include/X11 -g -O2 -c ActionHook.c -fPIC -DPIC -o .libs/ActionHook.o
|
||||
In file included from IntrinsicI.h:55,
|
||||
from ActionHook.c:69:
|
||||
include/X11/IntrinsicP.h:54:27: X11/Intrinsic.h: No such file or directory
|
||||
|
||||
|
||||
* Then:
|
||||
|
||||
gcc -DHAVE_CONFIG_H -I. -I. -I. -DXTHREADS -DXUSE_MTSAFE_API -I/nix/store/aadf0bd4a908da11d14f6538503b8408-libX11-6.2.1/include -I/nix/store/ba366e3b944ead64ec9b0490bb615874-xproto-6.6.1/include -I./include -I./include/X11 -g -O2 -c ActionHook.c -fPIC -DPIC -o .libs/ActionHook.o
|
||||
In file included from IntrinsicI.h:55,
|
||||
from ActionHook.c:69:
|
||||
include/X11/IntrinsicP.h:202:25: X11/ObjectP.h: No such file or directory
|
||||
|
||||
(moved to include/X11; should edit include/Makefile.am)
|
||||
|
||||
|
||||
* `ld' on Mac OS X barfs if the timestamp on static libraries has
|
||||
changed (which happens if they are installed through a substitute).
|
||||
|
||||
Typical error:
|
||||
|
||||
/usr/bin/ld: table of contents for archive: libATerm.a is out of
|
||||
date; rerun ranlib(1) (can't load from it)
|
||||
|
||||
Solution: patch ld.
|
||||
|
||||
Non-solution: extend NAR file format to include timestamps. We
|
||||
don't want that because they introduce a source of non-determinism.
|
||||
To catch problems like this one determistically, we should change
|
||||
the timestamp on store objects to 0.
|
||||
|
||||
|
||||
* In gtksourceview-sharp: does the prefix patch cause problems (e.g.,
|
||||
makefile.am says "mimeinfodir should be the same as the gnome
|
||||
prefix")?
|
||||
116
maintainers/docs/classification.txt
Normal file
116
maintainers/docs/classification.txt
Normal file
@@ -0,0 +1,116 @@
|
||||
* 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., doe 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,331 +0,0 @@
|
||||
Setting up a cross compiler with Nix
|
||||
|
||||
"Cross compilation" means compiling a program on one machine for another
|
||||
type of machine. A typical use of cross compilation is to compile programs
|
||||
for embedded devices. These devices often don't have the computing power
|
||||
and memory to compile programs natively.
|
||||
|
||||
For a fully working cross compiler the following are needed:
|
||||
|
||||
* cross binutils: assembler, archiver, linker, etcetera that understand
|
||||
the format of the target system
|
||||
|
||||
* cross compiler: a compiler that can generate binary code and object files
|
||||
for the target platform
|
||||
|
||||
* cross C library: a library to link object files with to create fully
|
||||
functional programs
|
||||
|
||||
Cross compilers are difficult to set up. A lot of people report that they
|
||||
cannot succeed in building a cross toolchain successfully. The answers
|
||||
usually consist of "download this pre-built toolchain", which is equally
|
||||
unhelpful.
|
||||
|
||||
A toolchain is set up in five steps:
|
||||
|
||||
1. build binutils to that can run on the host platform, but generate code
|
||||
for the target platform
|
||||
|
||||
2. build Linux kernel headers for the target platform
|
||||
|
||||
3. build a minimal C only version of GCC, that can run on the host platform
|
||||
and generate code for the target platform
|
||||
|
||||
4. build a C library for the target platform. This includes the dynamic
|
||||
linker, C library, etc.
|
||||
|
||||
5. build a full GCC
|
||||
|
||||
****
|
||||
NB:
|
||||
|
||||
Keep in mind that many programs are not very well suited for cross
|
||||
compilation. Either they are not intended to run on other platforms,
|
||||
because the code is highly platform specific, or the configuration proces
|
||||
is not written with cross compilation in mind.
|
||||
|
||||
Nix will not solve these problems for you!
|
||||
***
|
||||
|
||||
This document describes to set up a cross compiler to generate code for
|
||||
arm-linux with uClibc and runs on i686-linux. The "stdenv" used is the
|
||||
default from the standard Nix packages collection.
|
||||
|
||||
Step 1: build binutils for arm-linux in the stdenv for i686-linux
|
||||
|
||||
---
|
||||
{stdenv, fetchurl, noSysDirs}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "binutils-2.16.1-arm";
|
||||
builder = ./builder.sh;
|
||||
src = fetchurl {
|
||||
url = http://ftp.nluug.nl/gnu/binutils/binutils-2.16.1.tar.bz2;
|
||||
md5 = "6a9d529efb285071dad10e1f3d2b2967";
|
||||
};
|
||||
inherit noSysDirs;
|
||||
configureFlags = "--target=arm-linux";
|
||||
}
|
||||
---
|
||||
|
||||
This will compile binutils that will run on i686-linux, but knows the
|
||||
format used by arm-linux.
|
||||
|
||||
Step 2: build kernel headers for the target architecture
|
||||
|
||||
default.nix for kernel-headers-arm:
|
||||
|
||||
---
|
||||
{stdenv, fetchurl}:
|
||||
|
||||
assert stdenv.system == "i686-linux";
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "linux-headers-2.6.13.4-arm";
|
||||
builder = ./builder.sh;
|
||||
src = fetchurl {
|
||||
url = http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.13.4.tar.bz2;
|
||||
md5 = "94768d7eef90a9d8174639b2a7d3f58d";
|
||||
};
|
||||
}
|
||||
---
|
||||
|
||||
builder.sh for kernel-headers-arm:
|
||||
|
||||
---
|
||||
source $stdenv/setup
|
||||
|
||||
|
||||
buildPhase() {
|
||||
make include/linux/version.h
|
||||
}
|
||||
|
||||
buildPhase=buildPhase
|
||||
|
||||
|
||||
installPhase() {
|
||||
mkdir $out
|
||||
mkdir $out/include
|
||||
#cd $out/include
|
||||
#ln -s asm-arm asm
|
||||
make include/asm ARCH=arm
|
||||
cp -prvd include/linux include/asm include/asm-arm include/asm-generic $out/include
|
||||
echo -n > $out/include/linux/autoconf.h
|
||||
}
|
||||
|
||||
installPhase=installPhase
|
||||
|
||||
|
||||
genericBuild
|
||||
---
|
||||
|
||||
Step 3: build a minimal GCC
|
||||
|
||||
Extra/different parameters include the target platform and the kernel
|
||||
headers argument (this needs a major cleanup, as well as the name, it
|
||||
needs to be different!). Profiled compilers are disabled. The tarball
|
||||
used here is just gcc-core. For some reason it doesn't install nicely
|
||||
if the whole tarball is used (or is this some braino on my side? -- AH).
|
||||
|
||||
Only C is used, because for other languages (such as C++) extra libraries
|
||||
need to be compiled, for which libraries compiled for the target system
|
||||
are needed.
|
||||
|
||||
There is a bit of evilness going on. The cross compiled utilities need
|
||||
to be either copied to or be linked from the output tree of the compiler.
|
||||
(Is this really true? Back this up with arguments! -- AH)
|
||||
|
||||
Symbolic links are not something we want inside the Nix store.
|
||||
|
||||
---
|
||||
{ stdenv, fetchurl, noSysDirs
|
||||
, langC ? true, langCC ? true, langF77 ? false
|
||||
, profiledCompiler ? false
|
||||
, binutilsArm
|
||||
, kernelHeadersArm
|
||||
}:
|
||||
|
||||
assert langC;
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "gcc-4.0.2-arm";
|
||||
builder = ./builder.sh;
|
||||
src = fetchurl {
|
||||
url = ftp://ftp.nluug.nl/pub/gnu/gcc/gcc-4.0.2/gcc-core-4.0.2.tar.bz2;
|
||||
md5 = "f7781398ada62ba255486673e6274b26";
|
||||
#url = ftp://ftp.nluug.nl/pub/gnu/gcc/gcc-4.0.2/gcc-4.0.2.tar.bz2;
|
||||
#md5 = "a659b8388cac9db2b13e056e574ceeb0";
|
||||
};
|
||||
# !!! apply only if noSysDirs is set
|
||||
patches = [./no-sys-dirs.patch ./gcc-inhibit.patch];
|
||||
inherit noSysDirs langC langCC langF77 profiledCompiler;
|
||||
buildInputs = [binutilsArm];
|
||||
inherit kernelHeadersArm binutilsArm;
|
||||
platform = "arm-linux";
|
||||
}
|
||||
---
|
||||
|
||||
The builder.sh for a cross-compiler. Note that the binutils are prefixed
|
||||
with the architecture name, so arm-linux-ld instead of ld, etc. This is
|
||||
necessary because when we cross-compile a lot of programs look for these
|
||||
tools with these specific names. The standard gcc-wrapper does not take this
|
||||
into account yet.
|
||||
|
||||
---
|
||||
source $stdenv/setup
|
||||
|
||||
|
||||
export NIX_FIXINC_DUMMY=$NIX_BUILD_TOP/dummy
|
||||
mkdir $NIX_FIXINC_DUMMY
|
||||
|
||||
|
||||
if test "$noSysDirs" = "1"; then
|
||||
|
||||
if test "$noSysDirs" = "1"; then
|
||||
# Figure out what extra flags to pass to the gcc compilers
|
||||
# being generated to make sure that they use our glibc.
|
||||
if test -e $NIX_GCC/nix-support/orig-glibc; then
|
||||
glibc=$(cat $NIX_GCC/nix-support/orig-glibc)
|
||||
# Ugh. Copied from gcc-wrapper/builder.sh. We can't just
|
||||
# source in $NIX_GCC/nix-support/add-flags, since that
|
||||
# would cause *this* GCC to be linked against the
|
||||
# *previous* GCC. Need some more modularity there.
|
||||
extraCFlags="-B$glibc/lib -isystem $glibc/include"
|
||||
extraLDFlags="-B$glibc/lib -L$glibc/lib -Wl,-s \
|
||||
-Wl,-dynamic-linker,$glibc/lib/ld-linux.so.2"
|
||||
|
||||
# Oh, what a hack. I should be shot for this.
|
||||
# In stage 1, we should link against the previous GCC, but
|
||||
# not afterwards. Otherwise we retain a dependency.
|
||||
# However, ld-wrapper, which adds the linker flags for the
|
||||
# previous GCC, is also used in stage 2/3. We can prevent
|
||||
# it from adding them by NIX_GLIBC_FLAGS_SET, but then
|
||||
# gcc-wrapper will also not add them, thereby causing
|
||||
# stage 1 to fail. So we use a trick to only set the
|
||||
# flags in gcc-wrapper.
|
||||
hook=$(pwd)/ld-wrapper-hook
|
||||
echo "NIX_GLIBC_FLAGS_SET=1" > $hook
|
||||
export NIX_LD_WRAPPER_START_HOOK=$hook
|
||||
fi
|
||||
|
||||
export NIX_EXTRA_CFLAGS=$extraCFlags
|
||||
export NIX_EXTRA_LDFLAGS=$extraLDFlags
|
||||
export CFLAGS=$extraCFlags
|
||||
export CXXFLAGS=$extraCFlags
|
||||
export LDFLAGS=$extraLDFlags
|
||||
fi
|
||||
|
||||
else
|
||||
patches=""
|
||||
fi
|
||||
|
||||
|
||||
preConfigure=preConfigure
|
||||
preConfigure() {
|
||||
|
||||
# Determine the frontends to build.
|
||||
langs="c"
|
||||
if test -n "$langCC"; then
|
||||
langs="$langs,c++"
|
||||
fi
|
||||
if test -n "$langF77"; then
|
||||
langs="$langs,f77"
|
||||
fi
|
||||
|
||||
# Cross compiler evilness
|
||||
ensureDir $out
|
||||
ensureDir $out/arm-linux
|
||||
ensureDir $out/arm-linux/bin
|
||||
ln -s $binutilsArm/arm-linux/bin/as $out/arm-linux/bin/as
|
||||
ln -s $binutilsArm/arm-linux/bin/ld $out/arm-linux/bin/ld
|
||||
ln -s $binutilsArm/arm-linux/bin/ar $out/arm-linux/bin/ar
|
||||
ln -s $binutilsArm/arm-linux/bin/ranlib $out/arm-linux/bin/ranlib
|
||||
|
||||
# Perform the build in a different directory.
|
||||
mkdir ../build
|
||||
cd ../build
|
||||
|
||||
configureScript=../$sourceRoot/configure
|
||||
configureFlags="--enable-languages=$langs --target=$platform --disable-threads --disable-libmudflap --disable-shared --with-headers=$kernelHeadersArm/include --disable-multilib"
|
||||
}
|
||||
|
||||
|
||||
postInstall=postInstall
|
||||
postInstall() {
|
||||
# Remove precompiled headers for now. They are very big and
|
||||
# probably not very useful yet.
|
||||
find $out/include -name "*.gch" -exec rm -rf {} \; -prune
|
||||
|
||||
# Remove `fixincl' to prevent a retained dependency on the
|
||||
# previous gcc.
|
||||
rm -rf $out/libexec/gcc/*/*/install-tools
|
||||
}
|
||||
|
||||
|
||||
#if test -z "$profiledCompiler"; then
|
||||
#makeFlags="bootstrap"
|
||||
#else
|
||||
#makeFlags="profiledbootstrap"
|
||||
#fi
|
||||
|
||||
genericBuild
|
||||
---
|
||||
|
||||
Step 4: build a C library for the target platform.
|
||||
|
||||
The previous steps are enough to compile a C library. In our case we take
|
||||
uClibc. It's intended to be a small sized replacement for glibc. It is widely
|
||||
used in embedded environments.
|
||||
|
||||
...
|
||||
|
||||
Step 5: Build a compiler to link with the newly built C library.
|
||||
|
||||
...
|
||||
|
||||
If we restrict the compiler to just C programs it is relatively easy,
|
||||
since we only need to wrap the GCC we built in the previous step with all
|
||||
the right tools and the right C library. Successfully compiled programs with
|
||||
this compiler and verified to be working on a HP Jornada 820 running Linux
|
||||
are "patch", "make" and "wget".
|
||||
|
||||
If we want to build C++ programs it gets a lot more difficult. GCC has a
|
||||
three step compilation proces. In the first step a simple compiler, called
|
||||
xgcc, that can compile only C programs is built. With that compiler it
|
||||
compiles itself two more times: one time to build a full compiler, and another
|
||||
time to build a full compiler once again with the freshly built compiler from
|
||||
step 2. In the second and third step support for C++ is compiled, if this
|
||||
is configured.
|
||||
|
||||
One of the libraries that has to be built for C++ support step is libstdc++.
|
||||
This library uses xgcc, even when cross compiling, since libstdc++ has to be
|
||||
compiled for arm-linux.
|
||||
|
||||
One of the compiler flags that GCC uses for this compiler is called X_CFLAGS.
|
||||
This is used by the Nix build process to set the dynamic linker, glibc
|
||||
in the case of i686-linux using the default Nix packages collection.
|
||||
|
||||
Obiously, since we need to compile libstc++ for arm-linux with uClibc linking
|
||||
will not be done correctly: you can't link object files built for arm-linux
|
||||
with a glibc built for i686-linux.
|
||||
|
||||
Setting X_CFLAGS to use the uClibc libraries and dynamic linker will fail
|
||||
too. Earlier on in the build process these flags are used to compile important
|
||||
files like libgcc.a by the host system gcc, which does need to be linked
|
||||
to glibc. To make this work correctly you will need to carefully juggle
|
||||
with compilation flags. This is still work in progress for Nix.
|
||||
|
||||
|
||||
---
|
||||
|
||||
After succesfully completing the whole toolchain you can start building
|
||||
packages with the newly built tools. To make everything build correctly
|
||||
you will need a stdenv for your target platform. Setting up this platform
|
||||
will take some effort. Right now there is a very experimental setup for
|
||||
arm-linux, which needs to be cleaned up before it is production ready.
|
||||
|
||||
Please note that many packages are not well suited for cross-compilation.
|
||||
Even though the package itself might be very well portable often the
|
||||
buildscripts are not. One thing that we have seen that causes frequent
|
||||
build failures is the use of the LD variable. This is often set to 'ld'
|
||||
and not $(CROSS)-ld.
|
||||
12
maintainers/docs/todo.txt
Normal file
12
maintainers/docs/todo.txt
Normal file
@@ -0,0 +1,12 @@
|
||||
* Bump freetype to 2.1.7 (but it breaks Pango 1.2.5).
|
||||
|
||||
* Patch development/tools/misc/libtool not to search standard
|
||||
directories for libraries (like setup.sh does now). [do we want
|
||||
this?]
|
||||
|
||||
* In setup.sh: add configureFlagsArray or something
|
||||
|
||||
* Inform freedesktop people that Xaw requires Xpm.
|
||||
|
||||
* After building gcc, filter out references to /tmp/nix... in
|
||||
.../lib/libsupc++.la and .../lib/libstdc++.la
|
||||
@@ -1,27 +0,0 @@
|
||||
Adding uClibc support for a new platform
|
||||
|
||||
Sometimes you want to cross-compile to another architecture, for example an
|
||||
embedded devices. For embedded devices the uClibc C library is popular.
|
||||
In Nixpkgs there is support for uClibc for several architectures but not
|
||||
everything is supported.
|
||||
|
||||
Adding support is not very difficult,
|
||||
|
||||
* Add your architecture to the buildfiles in
|
||||
$nixpkgs/development/tools/misc/binutils-cross
|
||||
|
||||
* Add your architecture to the buildfiles in
|
||||
$nixpkgs/development/compilers/gcc-4.0-cross
|
||||
|
||||
* Add your architecture to the buildfiles in
|
||||
$nixpkgs/os-specific/linux/kernel-headers-cross
|
||||
|
||||
* Add your architecture to the buildfiles in
|
||||
$nixpkgs/development/uclibc
|
||||
|
||||
In the latter directory you will also need a configuration file for uClibc.
|
||||
You can make these by unpacking the uClibc sources and run a "make menuconfig".
|
||||
In the configuration a few things need to be adapted:
|
||||
|
||||
- kernel sources -> need to point at our own kernel headers
|
||||
- install -> needs to point at $out
|
||||
@@ -1,14 +0,0 @@
|
||||
Semi-automatic source information updating using "update-upstream-data.sh" script and "src-{,info-}for-*.nix"
|
||||
|
||||
1. Recognizing when a pre-existing package uses this mechanism.
|
||||
|
||||
Packages using this automatical update mechanism have src-info-for-default.nix and src-for-default.nix next to default.nix. src-info-for-default.nix describes getting the freshest source from upstream web site; src-for-default.nix is a generated file with the current data about used source. Both files define a simple attrSet.
|
||||
|
||||
src-info-for-default.nix (for a file grabbed via http) contains at least downloadPage attribute - it is the page we need to look at to find out the latest version. It also contains baseName that is used for automatical generation of package name containing version. It can contain extra data for trickier cases.
|
||||
|
||||
src-for-default.nix will contain advertisedUrl (raw URL chosen on the site; its change prompts regeneration of source data), url for fetchurl, hash, version retrieved from the download URL and suggested package name.
|
||||
|
||||
2. Updating a package
|
||||
|
||||
nixpkgs/pkgs/build-support/upstream-updater directory contains some scripts. The worker script is called update-upstream-data.sh. This script requires main expression name (e.g. default.nix). It can optionally accpet a second parameter, URL which will be used instead of getting one by parsing the downloadPage (version extraction, mirror URL creation etc. will still be run). After running the script, check src-for-default.nix (or replace default.nix with expression name, if there are seceral expressions in the directory) for new version information.
|
||||
|
||||
@@ -1,57 +0,0 @@
|
||||
#! /bin/sh -e
|
||||
|
||||
distDir=/data/webserver/tarballs
|
||||
|
||||
urls=$(nix-instantiate --eval-only --xml --strict ./eval-release.nix \
|
||||
| grep -A2 'name="urls"' \
|
||||
| grep '<string value=' \
|
||||
| sed 's/.*"\(.*\)".*/\1/' \
|
||||
| sort | uniq)
|
||||
|
||||
for url in $urls; do
|
||||
|
||||
if echo "$url" | grep -q -E "www.cs.uu.nl|nixos.org|.stratego-language.org|java.sun.com|ut2004|linuxq3a|RealPlayer|Adbe|belastingdienst|microsoft|armijn/.nix|sun.com|archive.eclipse.org"; then continue; fi
|
||||
|
||||
base="$(basename "$url")"
|
||||
newPath="$distDir/$base"
|
||||
|
||||
if ! test -e "$newPath"; then
|
||||
|
||||
#if echo $url | grep -q 'mirror://'; then
|
||||
# echo "$fn: skipping mirrored $url"
|
||||
# continue
|
||||
#fi
|
||||
|
||||
echo "downloading $url to $newPath"
|
||||
|
||||
if test -n "$doCopy"; then
|
||||
declare -a res
|
||||
if ! res=($(PRINT_PATH=1 nix-prefetch-url "$url")); then
|
||||
continue
|
||||
fi
|
||||
storePath=${res[1]}
|
||||
cp $storePath "$newPath.tmp.$$"
|
||||
mv -f "$newPath.tmp.$$" "$newPath"
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
if test -n "$doCopy" -a -e "$newPath"; then
|
||||
|
||||
echo "hashing $newPath"
|
||||
|
||||
md5=$(nix-hash --flat --type md5 "$newPath")
|
||||
ln -sfn "../$base" $distDir/md5/$md5
|
||||
|
||||
sha1=$(nix-hash --flat --type sha1 "$newPath")
|
||||
ln -sfn "../$base" $distDir/sha1/$sha1
|
||||
|
||||
sha256=$(nix-hash --flat --type sha256 "$newPath")
|
||||
ln -sfn "../$base" $distDir/sha256/$sha256
|
||||
ln -sfn "../$base" $distDir/sha256/$(nix-hash --type sha256 --to-base32 "$sha256")
|
||||
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
echo DONE
|
||||
@@ -1,57 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
attr=$1
|
||||
|
||||
: ${NIXPKGS=/etc/nixos/nixpkgs}
|
||||
|
||||
tmp=$(mktemp --tmpdir -d nixpkgs-dep-license.XXXXXX)
|
||||
|
||||
exitHandler() {
|
||||
exitCode=$?
|
||||
rm -rf "$tmp"
|
||||
exit $exitCode
|
||||
}
|
||||
|
||||
trap "exitHandler" EXIT
|
||||
|
||||
# fetch the trace and the drvPath of the attribute.
|
||||
nix-instantiate $NIXPKGS -A $attr --show-trace > "$tmp/drvPath" 2> "$tmp/trace" || {
|
||||
cat 1>&2 - "$tmp/trace" <<EOF
|
||||
An error occured while evaluating $attr.
|
||||
EOF
|
||||
exit 1
|
||||
}
|
||||
|
||||
# generate a sed script based on the trace output.
|
||||
sed '
|
||||
\,@:.*:@, {
|
||||
# \1 *.drv file
|
||||
# \2 License terms
|
||||
s,.*@:drv:\(.*\):\(.*\):@.*,s!\1!\1: \2!; t;,
|
||||
s!Str(\\\"\([^,]*\)\\\",\[\])!\1!g
|
||||
b
|
||||
}
|
||||
d
|
||||
' "$tmp/trace" > "$tmp/filter.sed"
|
||||
|
||||
if test $(wc -l "$tmp/filter.sed" | sed 's/ .*//') == 0; then
|
||||
echo 1>&2 "
|
||||
No derivation mentionned in the stack trace. Either your derivation does
|
||||
not use stdenv.mkDerivation or you forgot to use the stdenv adapter named
|
||||
traceDrvLicenses.
|
||||
|
||||
- defaultStdenv = allStdenvs.stdenv;
|
||||
+ defaultStdenv = traceDrvLicenses allStdenvs.stdenv;
|
||||
"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
# remove all dependencies which are using stdenv.mkDerivation
|
||||
echo '
|
||||
d
|
||||
' >> "$tmp/filter.sed"
|
||||
|
||||
nix-store -q --tree $(cat "$tmp/drvPath") | sed -f "$tmp/filter.sed"
|
||||
|
||||
exit 0;
|
||||
28
maintainers/scripts/evacuate-urls.sh
Executable file
28
maintainers/scripts/evacuate-urls.sh
Executable file
@@ -0,0 +1,28 @@
|
||||
#! /bin/sh -e
|
||||
|
||||
find . -name "*.nix" | while read fn; do
|
||||
|
||||
grep -E '^ *url = ' "$fn" | while read line; do
|
||||
|
||||
if oldURL=$(echo "$line" | sed 's^url = \(.*\);^\1^'); then
|
||||
|
||||
if ! echo "$oldURL" | grep -q -E ".cs.uu.nl|.stratego-language.org|java.sun.com|ut2004|linuxq3a|RealPlayer|Adbe"; then
|
||||
base=$(basename $oldURL)
|
||||
newURL="http://catamaran.labs.cs.uu.nl/dist/tarballs/$base"
|
||||
newPath="/mnt/scratchy/eelco/public_html/tarballs/$base"
|
||||
echo "$fn: $oldURL -> $newURL"
|
||||
|
||||
if ! test -e "$newPath"; then
|
||||
curl --fail --location --max-redirs 20 "$oldURL" > "$newPath".tmp
|
||||
mv -f "$newPath".tmp "$newPath"
|
||||
fi
|
||||
|
||||
sed "s^$oldURL^$newURL^" < "$fn" > "$fn".tmp
|
||||
mv -f "$fn".tmp "$fn"
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
done
|
||||
@@ -1,24 +0,0 @@
|
||||
# Evaluate `release.nix' like Hydra would (i.e. call each job
|
||||
# attribute with the expected `system' argument). Too bad
|
||||
# nix-instantiate can't to do this.
|
||||
|
||||
let
|
||||
|
||||
lib = (import ../.. {}).lib;
|
||||
|
||||
rel = removeAttrs (import ../../pkgs/top-level/release.nix) [ "tarball" "xbursttools" ];
|
||||
|
||||
seqList = xs: res: lib.fold (x: xs: lib.seq x xs) res xs;
|
||||
|
||||
strictAttrs = as: seqList (lib.attrValues as) as;
|
||||
|
||||
maybe = as: let y = builtins.tryEval (strictAttrs as); in if y.success then y.value else builtins.trace "FAIL" null;
|
||||
|
||||
call = attrs: lib.flip lib.mapAttrs attrs
|
||||
(n: v: builtins.trace n (
|
||||
if builtins.isFunction v then maybe (v { system = "i686-linux"; })
|
||||
else if builtins.isAttrs v then call v
|
||||
else null
|
||||
));
|
||||
|
||||
in call rel
|
||||
@@ -1,901 +0,0 @@
|
||||
#!/bin/sh
|
||||
# This is actually -*- mode: scheme; coding: utf-8; -*- text.
|
||||
main='(module-ref (resolve-module '\''(gnupdate)) '\'gnupdate')'
|
||||
exec ${GUILE-guile} -L "$PWD" -l "$0" \
|
||||
-c "(apply $main (command-line))" "$@"
|
||||
!#
|
||||
;;; GNUpdate -- Update GNU packages in Nixpkgs.
|
||||
;;; Copyright (C) 2010, 2011 Ludovic Courtès <ludo@gnu.org>
|
||||
;;;
|
||||
;;; This program is free software: you can redistribute it and/or modify
|
||||
;;; it under the terms of the GNU General Public License as published by
|
||||
;;; the Free Software Foundation, either version 3 of the License, or
|
||||
;;; (at your option) any later version.
|
||||
;;;
|
||||
;;; This program is distributed in the hope that it will be useful,
|
||||
;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
;;; GNU General Public License for more details.
|
||||
;;;
|
||||
;;; You should have received a copy of the GNU General Public License
|
||||
;;; along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
(cond-expand (guile-2 #t)
|
||||
(else (error "GNU Guile 2.0 is required")))
|
||||
|
||||
(define-module (gnupdate)
|
||||
#:use-module (sxml ssax)
|
||||
#:use-module (ice-9 popen)
|
||||
#:use-module (ice-9 match)
|
||||
#:use-module (ice-9 rdelim)
|
||||
#:use-module (ice-9 regex)
|
||||
#:use-module (ice-9 vlist)
|
||||
#:use-module (srfi srfi-1)
|
||||
#:use-module (srfi srfi-9)
|
||||
#:use-module (srfi srfi-11)
|
||||
#:use-module (srfi srfi-26)
|
||||
#:use-module (srfi srfi-37)
|
||||
#:use-module (system foreign)
|
||||
#:use-module (rnrs bytevectors)
|
||||
#:export (gnupdate))
|
||||
|
||||
|
||||
;;;
|
||||
;;; SNix.
|
||||
;;;
|
||||
|
||||
(define-record-type <location>
|
||||
(make-location file line column)
|
||||
location?
|
||||
(file location-file)
|
||||
(line location-line)
|
||||
(column location-column))
|
||||
|
||||
(define (->loc line column path)
|
||||
(and line column path
|
||||
(make-location path (string->number line) (string->number column))))
|
||||
|
||||
;; Nix object types visible in the XML output of `nix-instantiate' and
|
||||
;; mapping to S-expressions (we map to sexps, not records, so that we
|
||||
;; can do pattern matching):
|
||||
;;
|
||||
;; at (at varpat attrspat)
|
||||
;; attr (attribute loc name value)
|
||||
;; attrs (attribute-set attributes)
|
||||
;; attrspat (attribute-set-pattern patterns)
|
||||
;; bool #f|#t
|
||||
;; derivation (derivation drv-path out-path attributes)
|
||||
;; ellipsis '...
|
||||
;; expr (snix loc body ...)
|
||||
;; function (function loc at|attrspat|varpat)
|
||||
;; int int
|
||||
;; list list
|
||||
;; null 'null
|
||||
;; path string
|
||||
;; string string
|
||||
;; unevaluated 'unevaluated
|
||||
;; varpat (varpat name)
|
||||
;;
|
||||
;; Initially ATTRIBUTES in `derivation' and `attribute-set' was a promise;
|
||||
;; however, handling `repeated' nodes makes it impossible to do anything
|
||||
;; lazily because the whole SXML tree has to be traversed to maintain the
|
||||
;; list of known derivations.
|
||||
|
||||
(define (xml-element->snix elem attributes body derivations)
|
||||
;; Return an SNix element corresponding to XML element ELEM.
|
||||
|
||||
(define (loc)
|
||||
(->loc (assq-ref attributes 'line)
|
||||
(assq-ref attributes 'column)
|
||||
(assq-ref attributes 'path)))
|
||||
|
||||
(case elem
|
||||
((at)
|
||||
(values `(at ,(car body) ,(cadr body)) derivations))
|
||||
((attr)
|
||||
(let ((name (assq-ref attributes 'name)))
|
||||
(cond ((null? body)
|
||||
(values `(attribute-pattern ,name) derivations))
|
||||
((and (pair? body) (null? (cdr body)))
|
||||
(values `(attribute ,(loc) ,name ,(car body))
|
||||
derivations))
|
||||
(else
|
||||
(error "invalid attribute body" name (loc) body)))))
|
||||
((attrs)
|
||||
(values `(attribute-set ,(reverse body)) derivations))
|
||||
((attrspat)
|
||||
(values `(attribute-set-pattern ,body) derivations))
|
||||
((bool)
|
||||
(values (string-ci=? "true" (assq-ref attributes 'value))
|
||||
derivations))
|
||||
((derivation)
|
||||
(let ((drv-path (assq-ref attributes 'drvPath))
|
||||
(out-path (assq-ref attributes 'outPath)))
|
||||
(if (equal? body '(repeated))
|
||||
(let ((body (vhash-assoc drv-path derivations)))
|
||||
(if (pair? body)
|
||||
(values `(derivation ,drv-path ,out-path ,(cdr body))
|
||||
derivations)
|
||||
(error "no previous occurrence of derivation"
|
||||
drv-path)))
|
||||
(values `(derivation ,drv-path ,out-path ,body)
|
||||
(vhash-cons drv-path body derivations)))))
|
||||
((ellipsis)
|
||||
(values '... derivations))
|
||||
((expr)
|
||||
(values `(snix ,(loc) ,@body) derivations))
|
||||
((function)
|
||||
(values `(function ,(loc) ,body) derivations))
|
||||
((int)
|
||||
(values (string->number (assq-ref attributes 'value))
|
||||
derivations))
|
||||
((list)
|
||||
(values body derivations))
|
||||
((null)
|
||||
(values 'null derivations))
|
||||
((path)
|
||||
(values (assq-ref attributes 'value) derivations))
|
||||
((repeated)
|
||||
(values 'repeated derivations))
|
||||
((string)
|
||||
(values (assq-ref attributes 'value) derivations))
|
||||
((unevaluated)
|
||||
(values 'unevaluated derivations))
|
||||
((varpat)
|
||||
(values `(varpat ,(assq-ref attributes 'name)) derivations))
|
||||
(else (error "unhandled Nix XML element" elem))))
|
||||
|
||||
(define xml->snix
|
||||
;; Return the SNix represention of TREE, an SXML tree as returned by
|
||||
;; parsing the XML output of `nix-instantiate' on Nixpkgs.
|
||||
(let ((parse
|
||||
(ssax:make-parser NEW-LEVEL-SEED
|
||||
(lambda (elem-gi attributes namespaces expected-content
|
||||
seed)
|
||||
(cons '() (cdr seed)))
|
||||
|
||||
FINISH-ELEMENT
|
||||
(lambda (elem-gi attributes namespaces parent-seed
|
||||
seed)
|
||||
(let ((snix (car seed))
|
||||
(derivations (cdr seed)))
|
||||
(let-values (((snix derivations)
|
||||
(xml-element->snix elem-gi
|
||||
attributes
|
||||
snix
|
||||
derivations)))
|
||||
(cons (cons snix (car parent-seed))
|
||||
derivations))))
|
||||
|
||||
CHAR-DATA-HANDLER
|
||||
(lambda (string1 string2 seed)
|
||||
;; Discard inter-node strings, which are blanks.
|
||||
seed))))
|
||||
(lambda (port)
|
||||
;; Discard the second value returned by the parser (the derivation
|
||||
;; vhash).
|
||||
(caar (parse port (cons '() vlist-null))))))
|
||||
|
||||
(define (call-with-package snix proc)
|
||||
(match snix
|
||||
(('attribute _ (and attribute-name (? string?))
|
||||
('derivation _ _ body))
|
||||
;; Ugly pattern matching.
|
||||
(let ((meta
|
||||
(any (lambda (attr)
|
||||
(match attr
|
||||
(('attribute _ "meta" ('attribute-set metas)) metas)
|
||||
(_ #f)))
|
||||
body))
|
||||
(package-name
|
||||
(any (lambda (attr)
|
||||
(match attr
|
||||
(('attribute _ "name" (and name (? string?)))
|
||||
name)
|
||||
(_ #f)))
|
||||
body))
|
||||
(location
|
||||
(any (lambda (attr)
|
||||
(match attr
|
||||
(('attribute loc "name" (? string?))
|
||||
loc)
|
||||
(_ #f)))
|
||||
body))
|
||||
(src
|
||||
(any (lambda (attr)
|
||||
(match attr
|
||||
(('attribute _ "src" src)
|
||||
src)
|
||||
(_ #f)))
|
||||
body)))
|
||||
(proc attribute-name package-name location meta src)))))
|
||||
|
||||
(define (call-with-src snix proc)
|
||||
;; Assume SNIX contains the SNix expression for the value of an `src'
|
||||
;; attribute, as returned by `call-with-package', and call PROC with the
|
||||
;; relevant SRC information, or #f if SNIX doesn't match.
|
||||
(match snix
|
||||
(('derivation _ _ body)
|
||||
(let ((name
|
||||
(any (lambda (attr)
|
||||
(match attr
|
||||
(('attribute _ "name" (and name (? string?)))
|
||||
name)
|
||||
(_ #f)))
|
||||
body))
|
||||
(output-hash
|
||||
(any (lambda (attr)
|
||||
(match attr
|
||||
(('attribute _ "outputHash" (and hash (? string?)))
|
||||
hash)
|
||||
(_ #f)))
|
||||
body))
|
||||
(urls
|
||||
(any (lambda (attr)
|
||||
(match attr
|
||||
(('attribute _ "urls" (and urls (? pair?)))
|
||||
urls)
|
||||
(_ #f)))
|
||||
body)))
|
||||
(proc name output-hash urls)))
|
||||
(_ (proc #f #f #f))))
|
||||
|
||||
(define (src->values snix)
|
||||
(call-with-src snix values))
|
||||
|
||||
(define (attribute-value attribute)
|
||||
;; Return the value of ATTRIBUTE.
|
||||
(match attribute
|
||||
(('attribute _ _ value) value)))
|
||||
|
||||
(define (derivation-source derivation)
|
||||
;; Return the "src" attribute of DERIVATION or #f if not found.
|
||||
(match derivation
|
||||
(('derivation _ _ (attributes ...))
|
||||
(find-attribute-by-name "src" attributes))))
|
||||
|
||||
(define (derivation-output-path derivation)
|
||||
;; Return the output path of DERIVATION.
|
||||
(match derivation
|
||||
(('derivation _ out-path _)
|
||||
out-path)
|
||||
(_ #f)))
|
||||
|
||||
(define (source-output-path src)
|
||||
;; Return the output path of SRC, the "src" attribute of a derivation.
|
||||
(derivation-output-path (attribute-value src)))
|
||||
|
||||
(define (derivation-source-output-path derivation)
|
||||
;; Return the output path of the "src" attribute of DERIVATION or #f if
|
||||
;; DERIVATION lacks an "src" attribute.
|
||||
(and=> (derivation-source derivation) source-output-path))
|
||||
|
||||
(define (open-nixpkgs nixpkgs)
|
||||
(let ((script (string-append nixpkgs
|
||||
"/maintainers/scripts/eval-release.nix")))
|
||||
(open-pipe* OPEN_READ "nix-instantiate"
|
||||
"--strict" "--eval-only" "--xml"
|
||||
script)))
|
||||
|
||||
(define (pipe-failed? pipe)
|
||||
"Close pipe and return its status if it failed."
|
||||
(let ((status (close-pipe pipe)))
|
||||
(if (or (status:term-sig status)
|
||||
(not (= (status:exit-val status) 0)))
|
||||
status
|
||||
#f)))
|
||||
|
||||
(define (nix-prefetch-url url)
|
||||
;; Download URL in the Nix store and return the base32-encoded SHA256 hash
|
||||
;; of the file at URL
|
||||
(let* ((pipe (open-pipe* OPEN_READ "nix-prefetch-url" url))
|
||||
(hash (read-line pipe)))
|
||||
(if (or (pipe-failed? pipe)
|
||||
(eof-object? hash))
|
||||
(values #f #f)
|
||||
(let* ((pipe (open-pipe* OPEN_READ "nix-store" "--print-fixed-path"
|
||||
"sha256" hash (basename url)))
|
||||
(path (read-line pipe)))
|
||||
(if (or (pipe-failed? pipe)
|
||||
(eof-object? path))
|
||||
(values #f #f)
|
||||
(values (string-trim-both hash) (string-trim-both path)))))))
|
||||
|
||||
(define (update-nix-expression file
|
||||
old-version old-hash
|
||||
new-version new-hash)
|
||||
;; Modify FILE in-place. Ugly: we call out to sed(1).
|
||||
(let ((cmd (format #f "sed -i \"~a\" -e 's/~A/~a/g ; s/~A/~A/g'"
|
||||
file
|
||||
(regexp-quote old-version) new-version
|
||||
old-hash
|
||||
(or new-hash "new hash not available, check the log"))))
|
||||
(format #t "running `~A'...~%" cmd)
|
||||
(system cmd)))
|
||||
|
||||
(define (find-attribute-by-name name attributes)
|
||||
;; Return attribute NAME in ATTRIBUTES, a list of SNix attributes, or #f if
|
||||
;; NAME cannot be found.
|
||||
(find (lambda (a)
|
||||
(match a
|
||||
(('attribute _ (? (cut string=? <> name)) _)
|
||||
a)
|
||||
(_ #f)))
|
||||
attributes))
|
||||
|
||||
(define (find-package-by-attribute-name name packages)
|
||||
;; Return the package bound to attribute NAME in PACKAGES, a list of
|
||||
;; packages (SNix attributes), or #f if NAME cannot be found.
|
||||
(find (lambda (package)
|
||||
(match package
|
||||
(('attribute _ (? (cut string=? <> name))
|
||||
('derivation _ _ _))
|
||||
package)
|
||||
(_ #f)))
|
||||
packages))
|
||||
|
||||
(define (stdenv-package packages)
|
||||
;; Return the `stdenv' package from PACKAGES, a list of SNix attributes.
|
||||
(find-package-by-attribute-name "stdenv" packages))
|
||||
|
||||
(define (package-requisites package)
|
||||
;; Return the list of derivations required to build PACKAGE (including that
|
||||
;; of PACKAGE) by recurring into its derivation attributes.
|
||||
(let loop ((snix package)
|
||||
(result '()))
|
||||
(match snix
|
||||
(('attribute _ _ body)
|
||||
(loop body result))
|
||||
(('derivation _ out-path body)
|
||||
(if (any (lambda (d)
|
||||
(match d
|
||||
(('derivation _ (? (cut string=? out-path <>)) _) #t)
|
||||
(_ #f)))
|
||||
result)
|
||||
result
|
||||
(loop body (cons snix result))))
|
||||
((things ...)
|
||||
(fold loop result things))
|
||||
(_ result))))
|
||||
|
||||
(define (package-source-output-path package)
|
||||
;; Return the output path of the "src" derivation of PACKAGE.
|
||||
(derivation-source-output-path (attribute-value package)))
|
||||
|
||||
|
||||
;;;
|
||||
;;; FTP client.
|
||||
;;;
|
||||
|
||||
(define-record-type <ftp-connection>
|
||||
(%make-ftp-connection socket addrinfo)
|
||||
ftp-connection?
|
||||
(socket ftp-connection-socket)
|
||||
(addrinfo ftp-connection-addrinfo))
|
||||
|
||||
(define %ftp-ready-rx
|
||||
(make-regexp "^([0-9]{3}) (.+)$"))
|
||||
|
||||
(define (%ftp-listen port)
|
||||
(let loop ((line (read-line port)))
|
||||
(cond ((eof-object? line) (values line #f))
|
||||
((regexp-exec %ftp-ready-rx line)
|
||||
=>
|
||||
(lambda (match)
|
||||
(values (string->number (match:substring match 1))
|
||||
(match:substring match 2))))
|
||||
(else
|
||||
(loop (read-line port))))))
|
||||
|
||||
(define (%ftp-command command expected-code port)
|
||||
(format port "~A~A~A" command (string #\return) (string #\newline))
|
||||
(let-values (((code message) (%ftp-listen port)))
|
||||
(if (eqv? code expected-code)
|
||||
message
|
||||
(throw 'ftp-error port command code message))))
|
||||
|
||||
(define (%ftp-login user pass port)
|
||||
(let ((command (string-append "USER " user (string #\newline))))
|
||||
(display command port)
|
||||
(let-values (((code message) (%ftp-listen port)))
|
||||
(case code
|
||||
((230) #t)
|
||||
((331) (%ftp-command (string-append "PASS " pass) 230 port))
|
||||
(else (throw 'ftp-error port command code message))))))
|
||||
|
||||
(define (ftp-open host)
|
||||
(catch 'getaddrinfo-error
|
||||
(lambda ()
|
||||
(let* ((ai (car (getaddrinfo host "ftp")))
|
||||
(s (socket (addrinfo:fam ai) (addrinfo:socktype ai)
|
||||
(addrinfo:protocol ai))))
|
||||
(connect s (addrinfo:addr ai))
|
||||
(setvbuf s _IOLBF)
|
||||
(let-values (((code message) (%ftp-listen s)))
|
||||
(if (eqv? code 220)
|
||||
(begin
|
||||
;(%ftp-command "OPTS UTF8 ON" 200 s)
|
||||
(%ftp-login "anonymous" "ludo@example.com" s)
|
||||
(%make-ftp-connection s ai))
|
||||
(begin
|
||||
(format (current-error-port) "FTP to `~a' failed: ~A: ~A~%"
|
||||
host code message)
|
||||
(close s)
|
||||
#f)))))
|
||||
(lambda (key errcode)
|
||||
(format (current-error-port) "failed to resolve `~a': ~a~%"
|
||||
host (gai-strerror errcode))
|
||||
#f)))
|
||||
|
||||
(define (ftp-close conn)
|
||||
(close (ftp-connection-socket conn)))
|
||||
|
||||
(define (ftp-chdir conn dir)
|
||||
(%ftp-command (string-append "CWD " dir) 250
|
||||
(ftp-connection-socket conn)))
|
||||
|
||||
(define (ftp-pasv conn)
|
||||
(define %pasv-rx
|
||||
(make-regexp "([0-9]+),([0-9]+),([0-9]+),([0-9]+),([0-9]+),([0-9]+)"))
|
||||
|
||||
(let ((message (%ftp-command "PASV" 227 (ftp-connection-socket conn))))
|
||||
(cond ((regexp-exec %pasv-rx message)
|
||||
=>
|
||||
(lambda (match)
|
||||
(+ (* (string->number (match:substring match 5)) 256)
|
||||
(string->number (match:substring match 6)))))
|
||||
(else
|
||||
(throw 'ftp-error conn "PASV" 227 message)))))
|
||||
|
||||
|
||||
(define* (ftp-list conn #:optional directory)
|
||||
(define (address-with-port sa port)
|
||||
(let ((fam (sockaddr:fam sa))
|
||||
(addr (sockaddr:addr sa)))
|
||||
(cond ((= fam AF_INET)
|
||||
(make-socket-address fam addr port))
|
||||
((= fam AF_INET6)
|
||||
(make-socket-address fam addr port
|
||||
(sockaddr:flowinfo sa)
|
||||
(sockaddr:scopeid sa)))
|
||||
(else #f))))
|
||||
|
||||
(if directory
|
||||
(ftp-chdir conn directory))
|
||||
|
||||
(let* ((port (ftp-pasv conn))
|
||||
(ai (ftp-connection-addrinfo conn))
|
||||
(s (socket (addrinfo:fam ai) (addrinfo:socktype ai)
|
||||
(addrinfo:protocol ai))))
|
||||
(connect s (address-with-port (addrinfo:addr ai) port))
|
||||
(setvbuf s _IOLBF)
|
||||
|
||||
(dynamic-wind
|
||||
(lambda () #t)
|
||||
(lambda ()
|
||||
(%ftp-command "LIST" 150 (ftp-connection-socket conn))
|
||||
|
||||
(let loop ((line (read-line s))
|
||||
(result '()))
|
||||
(cond ((eof-object? line) (reverse result))
|
||||
((regexp-exec %ftp-ready-rx line)
|
||||
=>
|
||||
(lambda (match)
|
||||
(let ((code (string->number (match:substring match 1))))
|
||||
(if (= 126 code)
|
||||
(reverse result)
|
||||
(throw 'ftp-error conn "LIST" code)))))
|
||||
(else
|
||||
(loop (read-line s)
|
||||
(match (reverse (string-tokenize line))
|
||||
((file _ ... permissions)
|
||||
(let ((type (case (string-ref permissions 0)
|
||||
((#\d) 'directory)
|
||||
(else 'file))))
|
||||
(cons (list file type) result)))
|
||||
((file _ ...)
|
||||
(cons (cons file 'file) result))))))))
|
||||
(lambda ()
|
||||
(close s)
|
||||
(let-values (((code message) (%ftp-listen (ftp-connection-socket conn))))
|
||||
(or (eqv? code 226)
|
||||
(throw 'ftp-error conn "LIST" code message)))))))
|
||||
|
||||
|
||||
;;;
|
||||
;;; GNU.
|
||||
;;;
|
||||
|
||||
(define %ignored-package-attributes
|
||||
;; Attribute name of packages to be ignored.
|
||||
'("bash" "bashReal" "bashInteractive" ;; the full versioned name is incorrect
|
||||
"autoconf213"
|
||||
"automake17x"
|
||||
"automake19x"
|
||||
"automake110x"
|
||||
"bison1875"
|
||||
"bison23"
|
||||
"bison" ;; = 2.3
|
||||
"emacs22"
|
||||
"emacsSnapshot"
|
||||
"gcc295"
|
||||
"gcc33"
|
||||
"gcc34"
|
||||
"gcc40"
|
||||
"gcc41"
|
||||
"gcc42"
|
||||
"gcc43"
|
||||
"gcc44"
|
||||
"gcc45"
|
||||
"gcc45_real"
|
||||
"gcc45_realCross"
|
||||
"glibc25"
|
||||
"glibc27"
|
||||
"glibc29"
|
||||
"guile_1_8"
|
||||
"icecat3Xul" ;; redundant with `icecat'
|
||||
"icecatWrapper"
|
||||
"icecatXulrunner3"
|
||||
))
|
||||
|
||||
(define (gnu? package)
|
||||
;; Return true if PACKAGE (a snix expression) is a GNU package (according
|
||||
;; to a simple heuristic.) Otherwise return #f.
|
||||
(match package
|
||||
(('attribute _ _ ('derivation _ _ body))
|
||||
(any (lambda (attr)
|
||||
(match attr
|
||||
(('attribute _ "meta" ('attribute-set metas))
|
||||
(any (lambda (attr)
|
||||
(match attr
|
||||
(('attribute _ "description" value)
|
||||
(string-prefix? "GNU" value))
|
||||
(('attribute _ "homepage" value)
|
||||
(string-contains value "www.gnu.org"))
|
||||
(_ #f)))
|
||||
metas))
|
||||
(_ #f)))
|
||||
body))
|
||||
(_ #f)))
|
||||
|
||||
(define (gnu-packages packages)
|
||||
(fold (lambda (package gnu)
|
||||
(match package
|
||||
(('attribute _ "emacs23Packages" emacs-packages)
|
||||
;; XXX: Should prepend `emacs23Packages.' to attribute names.
|
||||
(append (gnu-packages emacs-packages) gnu))
|
||||
(('attribute _ attribute-name ('derivation _ _ body))
|
||||
(if (member attribute-name %ignored-package-attributes)
|
||||
gnu
|
||||
(if (gnu? package)
|
||||
(cons package gnu)
|
||||
gnu)))
|
||||
(_ gnu)))
|
||||
'()
|
||||
packages))
|
||||
|
||||
(define (ftp-server/directory project)
|
||||
(define quirks
|
||||
'(("commoncpp2" "ftp.gnu.org" "/gnu/commoncpp" #f)
|
||||
("ucommon" "ftp.gnu.org" "/gnu/commoncpp" #f)
|
||||
("libzrtpcpp" "ftp.gnu.org" "/gnu/ccrtp" #f)
|
||||
("libosip2" "ftp.gnu.org" "/gnu/osip" #f)
|
||||
("libgcrypt" "ftp.gnupg.org" "/gcrypt" #t)
|
||||
("libgpg-error" "ftp.gnupg.org" "/gcrypt" #t)
|
||||
("freefont-ttf" "ftp.gnu.org" "/gnu/freefont" #f)
|
||||
("gnupg" "ftp.gnupg.org" "/gcrypt" #t)
|
||||
("gnu-ghostscript" "ftp.gnu.org" "/gnu/ghostscript" #f)
|
||||
("grub" "alpha.gnu.org" "/gnu" #t)
|
||||
("GNUnet" "ftp.gnu.org" "/gnu/gnunet" #f)
|
||||
("mit-scheme" "ftp.gnu.org" "/gnu/mit-scheme/stable.pkg" #f)
|
||||
("icecat" "ftp.gnu.org" "/gnu/gnuzilla" #f)
|
||||
("source-highlight" "ftp.gnu.org" "/gnu/src-highlite" #f)
|
||||
("TeXmacs" "ftp.texmacs.org" "/TeXmacs/targz" #f)))
|
||||
|
||||
(let ((quirk (assoc project quirks)))
|
||||
(match quirk
|
||||
((_ server directory subdir?)
|
||||
(values server (if (not subdir?)
|
||||
directory
|
||||
(string-append directory "/" project))))
|
||||
(_
|
||||
(values "ftp.gnu.org" (string-append "/gnu/" project))))))
|
||||
|
||||
(define (nixpkgs->gnu-name project)
|
||||
(define quirks
|
||||
'(("gcc-wrapper" . "gcc")
|
||||
("ghostscript" . "gnu-ghostscript") ;; ../ghostscript/gnu-ghoscript-X.Y.tar.gz
|
||||
("gnum4" . "m4")
|
||||
("gnugrep" . "grep")
|
||||
("gnumake" . "make")
|
||||
("gnused" . "sed")
|
||||
("gnutar" . "tar")
|
||||
("gnunet" . "GNUnet") ;; ftp.gnu.org/gnu/gnunet/GNUnet-x.y.tar.gz
|
||||
("mitscheme" . "mit-scheme")
|
||||
("texmacs" . "TeXmacs")))
|
||||
|
||||
(or (assoc-ref quirks project) project))
|
||||
|
||||
(define (releases project)
|
||||
"Return the list of releases of PROJECT as a list of release name/directory
|
||||
pairs. Example: (\"mit-scheme-9.0.1\" . \"/gnu/mit-scheme/stable.pkg/9.0.1\"). "
|
||||
;; TODO: Parse something like fencepost.gnu.org:/gd/gnuorg/packages-ftp.
|
||||
(define release-rx
|
||||
(make-regexp (string-append "^" project
|
||||
"-([0-9]|[^-])*(-src)?\\.tar\\.")))
|
||||
|
||||
(define alpha-rx
|
||||
(make-regexp "^.*-.*[0-9](-|~)?(alpha|beta|rc|cvs|svn|git)-?[0-9\\.]*\\.tar\\."))
|
||||
|
||||
(define (sans-extension tarball)
|
||||
(let ((end (string-contains tarball ".tar")))
|
||||
(substring tarball 0 end)))
|
||||
|
||||
(catch 'ftp-error
|
||||
(lambda ()
|
||||
(let-values (((server directory) (ftp-server/directory project)))
|
||||
(define conn (ftp-open server))
|
||||
|
||||
(let loop ((directories (list directory))
|
||||
(result '()))
|
||||
(if (null? directories)
|
||||
(begin
|
||||
(ftp-close conn)
|
||||
result)
|
||||
(let* ((directory (car directories))
|
||||
(files (ftp-list conn directory))
|
||||
(subdirs (filter-map (lambda (file)
|
||||
(match file
|
||||
((name 'directory . _) name)
|
||||
(_ #f)))
|
||||
files)))
|
||||
(loop (append (map (cut string-append directory "/" <>)
|
||||
subdirs)
|
||||
(cdr directories))
|
||||
(append
|
||||
;; Filter out signatures, deltas, and files which are potentially
|
||||
;; not releases of PROJECT (e.g., in /gnu/guile, filter out
|
||||
;; guile-oops and guile-www; in mit-scheme, filter out
|
||||
;; binaries).
|
||||
(filter-map (lambda (file)
|
||||
(match file
|
||||
((file 'file . _)
|
||||
(and (not (string-suffix? ".sig" file))
|
||||
(regexp-exec release-rx file)
|
||||
(not (regexp-exec alpha-rx file))
|
||||
(let ((s (sans-extension file)))
|
||||
(and (regexp-exec
|
||||
%package-name-rx s)
|
||||
(cons s directory)))))
|
||||
(_ #f)))
|
||||
files)
|
||||
result)))))))
|
||||
(lambda (key subr message . args)
|
||||
(format (current-error-port)
|
||||
"failed to get release list for `~A': ~S ~S~%"
|
||||
project message args)
|
||||
'())))
|
||||
|
||||
(define version-string>?
|
||||
(let ((strverscmp
|
||||
(let ((sym (or (dynamic-func "strverscmp" (dynamic-link))
|
||||
(error "could not find `strverscmp' (from GNU libc)"))))
|
||||
(pointer->procedure int sym (list '* '*)))))
|
||||
(lambda (a b)
|
||||
(> (strverscmp (string->pointer a) (string->pointer b)) 0))))
|
||||
|
||||
(define (latest-release project)
|
||||
"Return (\"FOO-X.Y\" . \"/bar/foo\") or #f."
|
||||
(let ((releases (releases project)))
|
||||
(and (not (null? releases))
|
||||
(fold (lambda (release latest)
|
||||
(if (version-string>? (car release) (car latest))
|
||||
release
|
||||
latest))
|
||||
'("" . "")
|
||||
releases))))
|
||||
|
||||
(define %package-name-rx
|
||||
;; Regexp for a package name, e.g., "foo-X.Y". Since TeXmacs uses
|
||||
;; "TeXmacs-X.Y-src", the `-src' suffix is allowed.
|
||||
(make-regexp "^(.*)-(([0-9]|\\.)+)(-src)?"))
|
||||
|
||||
(define (package/version name+version)
|
||||
"Return the package name and version number extracted from NAME+VERSION."
|
||||
(let ((match (regexp-exec %package-name-rx name+version)))
|
||||
(if (not match)
|
||||
(values name+version #f)
|
||||
(values (match:substring match 1) (match:substring match 2)))))
|
||||
|
||||
(define (file-extension file)
|
||||
(let ((dot (string-rindex file #\.)))
|
||||
(and dot (substring file (+ 1 dot) (string-length file)))))
|
||||
|
||||
(define (packages-to-update gnu-packages)
|
||||
(define (unpack latest)
|
||||
(call-with-values (lambda ()
|
||||
(package/version (car latest)))
|
||||
(lambda (name version)
|
||||
(list name version (cdr latest)))))
|
||||
|
||||
(fold (lambda (pkg result)
|
||||
(call-with-package pkg
|
||||
(lambda (attribute name+version location meta src)
|
||||
(let-values (((name old-version)
|
||||
(package/version name+version)))
|
||||
(let ((latest (latest-release (nixpkgs->gnu-name name))))
|
||||
(if (not latest)
|
||||
(begin
|
||||
(format #t "~A [unknown latest version]~%"
|
||||
name+version)
|
||||
result)
|
||||
(match (unpack latest)
|
||||
((_ (? (cut string=? old-version <>)) _)
|
||||
(format #t "~A [up to date]~%" name+version)
|
||||
result)
|
||||
((project new-version directory)
|
||||
(let-values (((old-name old-hash old-urls)
|
||||
(src->values src)))
|
||||
(format #t "~A -> ~A [~A]~%"
|
||||
name+version (car latest)
|
||||
(and (pair? old-urls) (car old-urls)))
|
||||
(let* ((url (and (pair? old-urls)
|
||||
(car old-urls)))
|
||||
(new-hash (fetch-gnu project directory
|
||||
new-version
|
||||
(if url
|
||||
(file-extension url)
|
||||
"gz"))))
|
||||
(cons (list name attribute
|
||||
old-version old-hash
|
||||
new-version new-hash
|
||||
location)
|
||||
result)))))))))))
|
||||
'()
|
||||
gnu-packages))
|
||||
|
||||
(define (fetch-gnu project directory version archive-type)
|
||||
(let* ((server (ftp-server/directory project))
|
||||
(base (string-append project "-" version ".tar." archive-type))
|
||||
(url (string-append "ftp://" server "/" directory "/" base))
|
||||
(sig (string-append base ".sig"))
|
||||
(sig-url (string-append url ".sig")))
|
||||
(let-values (((hash path) (nix-prefetch-url url)))
|
||||
(pk 'prefetch-url url hash path)
|
||||
(and hash path
|
||||
(begin
|
||||
(false-if-exception (delete-file sig))
|
||||
(system* "wget" sig-url)
|
||||
(if (file-exists? sig)
|
||||
(let ((ret (system* "gpg" "--verify" sig path)))
|
||||
(false-if-exception (delete-file sig))
|
||||
(if (and ret (= 0 (status:exit-val ret)))
|
||||
hash
|
||||
(begin
|
||||
(format (current-error-port)
|
||||
"signature verification failed for `~a'~%"
|
||||
base)
|
||||
(format (current-error-port)
|
||||
"(could be because the public key is not in your keyring)~%")
|
||||
#f)))
|
||||
(begin
|
||||
(format (current-error-port)
|
||||
"no signature for `~a'~%" base)
|
||||
hash)))))))
|
||||
|
||||
|
||||
;;;
|
||||
;;; Main program.
|
||||
;;;
|
||||
|
||||
(define %options
|
||||
;; Specifications of the command-line options.
|
||||
(list (option '(#\h "help") #f #f
|
||||
(lambda (opt name arg result)
|
||||
(format #t "Usage: gnupdate [OPTIONS...]~%")
|
||||
(format #t "GNUpdate -- update Nix expressions of GNU packages in Nixpkgs~%")
|
||||
(format #t "~%")
|
||||
(format #t " -x, --xml=FILE Read XML output of `nix-instantiate'~%")
|
||||
(format #t " from FILE.~%")
|
||||
(format #t " -s, --select=SET Update only packages from SET, which may~%")
|
||||
(format #t " be either `all', `stdenv', or `non-stdenv'.~%")
|
||||
(format #t " -d, --dry-run Don't actually update Nix expressions~%")
|
||||
(format #t " -h, --help Give this help list.~%~%")
|
||||
(format #t "Report bugs to <ludo@gnu.org>~%")
|
||||
(exit 0)))
|
||||
(option '(#\s "select") #t #f
|
||||
(lambda (opt name arg result)
|
||||
(cond ((string-ci=? arg "stdenv")
|
||||
(alist-cons 'filter 'stdenv result))
|
||||
((string-ci=? arg "non-stdenv")
|
||||
(alist-cons 'filter 'non-stdenv result))
|
||||
((string-ci=? arg "all")
|
||||
(alist-cons 'filter #f result))
|
||||
(else
|
||||
(format (current-error-port)
|
||||
"~A: unrecognized selection type~%"
|
||||
arg)
|
||||
(exit 1)))))
|
||||
|
||||
(option '(#\d "dry-run") #f #f
|
||||
(lambda (opt name arg result)
|
||||
(alist-cons 'dry-run #t result)))
|
||||
|
||||
(option '(#\x "xml") #t #f
|
||||
(lambda (opt name arg result)
|
||||
(alist-cons 'xml-file arg result)))))
|
||||
|
||||
(define (gnupdate . args)
|
||||
;; Assume Nixpkgs is under $NIXPKGS or ~/src/nixpkgs.
|
||||
|
||||
(define (nixpkgs->snix xml-file)
|
||||
(format (current-error-port) "evaluating Nixpkgs...~%")
|
||||
(let* ((home (getenv "HOME"))
|
||||
(xml (if xml-file
|
||||
(open-input-file xml-file)
|
||||
(open-nixpkgs (or (getenv "NIXPKGS")
|
||||
(string-append home "/src/nixpkgs")))))
|
||||
(snix (xml->snix xml)))
|
||||
(if (not xml-file)
|
||||
(let ((status (pipe-failed? xml)))
|
||||
(if status
|
||||
(begin
|
||||
(format (current-error-port) "`nix-instantiate' failed: ~A~%"
|
||||
status)
|
||||
(exit 1)))))
|
||||
snix))
|
||||
|
||||
(let* ((opts (args-fold (cdr args) %options
|
||||
(lambda (opt name arg result)
|
||||
(error "unrecognized option `~A'" name))
|
||||
(lambda (operand result)
|
||||
(error "extraneous argument `~A'" operand))
|
||||
'()))
|
||||
(snix (nixpkgs->snix (assoc-ref opts 'xml-file)))
|
||||
(packages (match snix
|
||||
(('snix _ ('attribute-set attributes))
|
||||
attributes)
|
||||
(_ #f)))
|
||||
(stdenv (delay
|
||||
;; The source tarballs that make up stdenv.
|
||||
(filter-map derivation-source-output-path
|
||||
(package-requisites (stdenv-package packages)))))
|
||||
(gnu (gnu-packages packages))
|
||||
(gnu* (case (assoc-ref opts 'filter)
|
||||
;; Filter out packages that are/aren't in `stdenv'. To
|
||||
;; do that reliably, we check whether their "src"
|
||||
;; derivation is a requisite of stdenv.
|
||||
((stdenv)
|
||||
(filter (lambda (p)
|
||||
(member (package-source-output-path p)
|
||||
(force stdenv)))
|
||||
gnu))
|
||||
((non-stdenv)
|
||||
(filter (lambda (p)
|
||||
(not (member (package-source-output-path p)
|
||||
(force stdenv))))
|
||||
gnu))
|
||||
(else gnu)))
|
||||
(updates (packages-to-update gnu*)))
|
||||
|
||||
(format #t "~%~A packages to update...~%" (length updates))
|
||||
(for-each (lambda (update)
|
||||
(match update
|
||||
((name attribute
|
||||
old-version old-hash
|
||||
new-version new-hash
|
||||
location)
|
||||
(if (assoc-ref opts 'dry-run)
|
||||
(format #t "`~a' would be updated from ~a to ~a (~a -> ~a)~%"
|
||||
name old-version new-version
|
||||
old-hash new-hash)
|
||||
(update-nix-expression (location-file location)
|
||||
old-version old-hash
|
||||
new-version new-hash)))
|
||||
(_ #f)))
|
||||
updates)
|
||||
#t))
|
||||
|
||||
;;; Local Variables:
|
||||
;;; eval: (put 'call-with-package 'scheme-indent-function 1)
|
||||
;;; End:
|
||||
@@ -1,13 +0,0 @@
|
||||
#! /bin/sh
|
||||
|
||||
# give absolute path of release.nix as argument
|
||||
hydra_eval_jobs \
|
||||
--argstr system x86_64-linux \
|
||||
--argstr system i686-linux \
|
||||
--argstr system x86_64-darwin \
|
||||
--argstr system i686-darwin \
|
||||
--argstr system i686-cygwin \
|
||||
--argstr system i686-freebsd \
|
||||
--arg officialRelease false \
|
||||
--arg nixpkgs "{ outPath = builtins.storePath ./. ; rev = 1234; }" \
|
||||
$@
|
||||
@@ -1,22 +0,0 @@
|
||||
#! /usr/bin/perl -w
|
||||
|
||||
use strict;
|
||||
|
||||
my %map;
|
||||
open LIST1, "<$ARGV[0]" or die;
|
||||
while (<LIST1>) {
|
||||
/^(\S+)\s+(.*)$/;
|
||||
$map{$1} = $2;
|
||||
}
|
||||
|
||||
open LIST1, "<$ARGV[1]" or die;
|
||||
while (<LIST1>) {
|
||||
/^(\S+)\s+(.*)$/;
|
||||
if (!defined $map{$1}) {
|
||||
print STDERR "missing file: $2\n";
|
||||
next;
|
||||
}
|
||||
print "$2\n";
|
||||
print "$map{$1}\n";
|
||||
}
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
#! /bin/sh
|
||||
|
||||
echo "let pkgs = import /etc/nixos/nixpkgs$2 {}; x = pkgs.callPackage $1 { $3 }; in ${4:-x}" |
|
||||
nix-instantiate --show-trace - |
|
||||
xargs nix-store -r -K
|
||||
@@ -1,84 +0,0 @@
|
||||
|
||||
usage() {
|
||||
echo "
|
||||
$0 <path to unpacked binary distribution directory>
|
||||
|
||||
This program return the list of libraries and where to find them based on
|
||||
your currently installed programs.
|
||||
";
|
||||
exit 1
|
||||
}
|
||||
|
||||
if test $# -ne 1; then
|
||||
usage
|
||||
fi
|
||||
|
||||
binaryDist=$1
|
||||
|
||||
hasBinaries=false
|
||||
for bin in $(find $binaryDist -executable -type f) :; do
|
||||
if test $bin = ":"; then
|
||||
$hasBinaries || \
|
||||
echo "No patchable found in this directory."
|
||||
break
|
||||
fi
|
||||
hasBinaries=true
|
||||
|
||||
echo ""
|
||||
echo "$bin:"
|
||||
hasLibraries=false
|
||||
unset interpreter
|
||||
unset addRPath
|
||||
for lib in $(strings $bin | grep '^\(/\|\)lib.*\.so' | sort | uniq) :; do
|
||||
if test $lib = ":"; then
|
||||
$hasLibraries || \
|
||||
echo " This program is a script or it is statically linked."
|
||||
break
|
||||
fi
|
||||
hasLibraries=true
|
||||
|
||||
echo " $lib:";
|
||||
|
||||
libPath=$lib
|
||||
lib=$(basename $lib)
|
||||
|
||||
#versionLessLib=$(echo $lib | sed 's,[.][.0-9]*$,,')
|
||||
|
||||
libs="$(
|
||||
find /nix/store/*/lib* \( -type f -or -type l \) -name $lib |
|
||||
grep -v '\(bootstrap-tools\|system-path\|user-environment\|extra-utils\)'
|
||||
)"
|
||||
|
||||
echo "$libs" |
|
||||
sed 's,^/nix/store/[a-z0-9]*-\([^/]*\)/.*/\([^/]*\)$, \1 -> \2,' |
|
||||
sort |
|
||||
uniq;
|
||||
|
||||
names=$(
|
||||
echo "$libs" |
|
||||
sed 's,^/nix/store/[a-z0-9]*-\([^/]*\)-[.0-9]*/.*$,\1,' |
|
||||
sort |
|
||||
uniq;
|
||||
)
|
||||
|
||||
if test "$names" = "glibc"; then names="stdenv.glibc"; fi
|
||||
if echo $names | grep -c "gcc" &> /dev/null; then names="stdenv.gcc.gcc"; fi
|
||||
|
||||
if test $lib != $libPath; then
|
||||
interpreter="--interpreter \${$names}/lib/$lib"
|
||||
elif echo $addRPath | grep -c "$names" &> /dev/null; then
|
||||
:
|
||||
else
|
||||
addRPath=${addRPath+$addRPath:}"\${$names}/lib"
|
||||
fi
|
||||
done;
|
||||
$hasLibraries && \
|
||||
echo "
|
||||
Patchelf command:
|
||||
|
||||
patchelf $interpreter \\
|
||||
${addRPath+--set-rpath $addRPath \\
|
||||
} \$out/$bin
|
||||
|
||||
"
|
||||
done;
|
||||
@@ -1,260 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
usage () {
|
||||
echo 1>&2 "
|
||||
usage:
|
||||
$0
|
||||
[--git commit..commit | --git commit]
|
||||
[--svn rev:rev | --svn rev]
|
||||
[--path path[:path]*]
|
||||
[--help]
|
||||
|
||||
This program is used to investigate how any changes inside your nixpkgs
|
||||
repository may hurt. With these kind of information you may choose wisely
|
||||
where you should commit your changes.
|
||||
|
||||
This program adapts it-self to your versionning system to avoid too much
|
||||
effort on your Internet bandwidth. If you need to check more than one
|
||||
commits / revisions, you may use the following commands:
|
||||
|
||||
--git remotes/trunk..master
|
||||
--svn 17670:17677
|
||||
|
||||
Check the differences between each commit separating the first and the
|
||||
last commit.
|
||||
|
||||
--path /etc/nixos/nixpkgs:/tmp/nixpkgs_1:/tmp/nixpkgs_2
|
||||
|
||||
Check the differences between multiple directories containing different
|
||||
versions of nixpkgs.
|
||||
|
||||
All these options exist with one commit / revision argument. Such options
|
||||
are used to compare your \$NIXPKGS path with the specified version.
|
||||
|
||||
If you omit to mention any other commit / revision, then your \$NIXPKGS path
|
||||
is compared with its last update. This command is useful to test code from
|
||||
a dirty repository.
|
||||
|
||||
"
|
||||
|
||||
exit 1;
|
||||
}
|
||||
|
||||
#####################
|
||||
# Process Arguments #
|
||||
#####################
|
||||
|
||||
: ${NIXPKGS=/etc/nixos/nixpkgs/}
|
||||
|
||||
vcs=""
|
||||
gitCommits=""
|
||||
svnRevisions=""
|
||||
pathLocations=""
|
||||
verbose=false
|
||||
|
||||
argfun=""
|
||||
for arg; do
|
||||
if test -z "$argfun"; then
|
||||
case $arg in
|
||||
--git) vcs="git"; argfun="set_gitCommits";;
|
||||
--svn) vcs="svn"; argfun="set_svnRevisions";;
|
||||
--path) vcs="path"; argfun="set_pathLocations";;
|
||||
--verbose) verbose=true;;
|
||||
--help) usage;;
|
||||
*) usage;;
|
||||
esac
|
||||
else
|
||||
case $argfun in
|
||||
set_*)
|
||||
var=$(echo $argfun | sed 's,^set_,,')
|
||||
eval $var=$arg
|
||||
;;
|
||||
esac
|
||||
argfun=""
|
||||
fi
|
||||
done
|
||||
|
||||
if $verbose; then
|
||||
set -x
|
||||
else
|
||||
set +x
|
||||
fi
|
||||
|
||||
############################
|
||||
# Find the repository type #
|
||||
############################
|
||||
|
||||
if test -z "$vcs"; then
|
||||
if test -x "$NIXPKGS/.git"; then
|
||||
if git --git-dir="$NIXPKGS/.git" branch > /dev/null 2>&1; then
|
||||
vcs="git"
|
||||
gitCommits=$(git --git-dir="$NIXPKGS/.git" log -n 1 --pretty=format:%H 2> /dev/null)
|
||||
fi
|
||||
elif test -x "$NIXPKGS/.svn"; then
|
||||
cd "$NIXPKGS"
|
||||
if svn info > /dev/null 2>&1; then
|
||||
vcs="svn";
|
||||
svnRevisions=$(svn info | sed -n 's,Revision: ,,p')
|
||||
fi
|
||||
cd -
|
||||
else
|
||||
usage
|
||||
fi
|
||||
fi
|
||||
|
||||
###############################
|
||||
# Define a storage directory. #
|
||||
###############################
|
||||
|
||||
pkgListDir=""
|
||||
exitCode=1
|
||||
cleanup(){
|
||||
test -e "$pkgListDir" && rm -rf "$pkgListDir"
|
||||
exit $exitCode;
|
||||
}
|
||||
|
||||
trap cleanup EXIT SIGINT SIGQUIT ERR
|
||||
|
||||
pkgListDir=$(mktemp --tmpdir -d rebuild-amount-XXXXXXXX)
|
||||
vcsDir="$pkgListDir/.vcs"
|
||||
|
||||
###########################
|
||||
# Versionning for Dummies #
|
||||
###########################
|
||||
|
||||
path_init() {
|
||||
if test "${pathLocations#*:}" = "$pathLocations"; then
|
||||
pathLocations="$NIXPKGS:$pathLocations"
|
||||
fi
|
||||
pathLocations="${pathLocations}:"
|
||||
}
|
||||
|
||||
path_getNext() {
|
||||
pathLoc="${pathLocations%%:*}"
|
||||
pathLocations="${pathLocations#*:}"
|
||||
}
|
||||
|
||||
path_setPath() {
|
||||
path="$pathLoc"
|
||||
}
|
||||
|
||||
path_setName() {
|
||||
name=$(echo "$pathLoc" | tr '/' '_')
|
||||
}
|
||||
|
||||
################
|
||||
# Git Commands #
|
||||
################
|
||||
|
||||
git_init() {
|
||||
git clone "$NIXPKGS/.git" "$vcsDir" > /dev/null 2>&1
|
||||
if echo "gitCommits" | grep -c "\.\." > /dev/null 2>&1; then
|
||||
gitCommits=$(git --git-dir="$vcsDir/.git" log --reverse --pretty=format:%H $gitCommits 2> /dev/null)
|
||||
else
|
||||
pathLocations="$vcsDir:$NIXPKGS"
|
||||
vcs="path"
|
||||
path_init
|
||||
fi
|
||||
}
|
||||
|
||||
git_getNext() {
|
||||
git --git-dir="$vcsDir/.git" checkout $(echo "$gitCommits" | head -n 1) > /dev/null 2>&1
|
||||
gitCommits=$(echo "$gitCommits" | sed '1 d')
|
||||
}
|
||||
|
||||
git_setPath() {
|
||||
path="$vcsDir"
|
||||
}
|
||||
|
||||
git_setName() {
|
||||
name=$(git --git-dir="$vcsDir/.git" log -n 1 --pretty=format:%H 2> /dev/null)
|
||||
}
|
||||
|
||||
#######################
|
||||
# Subversion Commands #
|
||||
#######################
|
||||
|
||||
svn_init() {
|
||||
cp -r "$NIXPKGS" "$vcsDir" > /dev/null 2>&1
|
||||
if echo "svnRevisions" | grep -c ":" > /dev/null 2>&1; then
|
||||
svnRevisions=$(seq ${svnRevisions%:*} ${svnRevisions#*:})
|
||||
else
|
||||
pathLocations="$vcsDir:$NIXPKGS"
|
||||
vcs="path"
|
||||
path_init
|
||||
fi
|
||||
}
|
||||
|
||||
svn_getNext() {
|
||||
cd "$vcsDir"
|
||||
svn checkout $(echo "$svnRevisions" | head -n 1) > /dev/null 2>&1
|
||||
cd -
|
||||
svnRevisions=$(echo "$svnRevisions" | sed '1 d')
|
||||
}
|
||||
|
||||
svn_setPath() {
|
||||
path="$vcsDir"
|
||||
}
|
||||
|
||||
svn_setName() {
|
||||
name=$(svn info 2> /dev/null | sed -n 's,Revision: ,,p')
|
||||
}
|
||||
|
||||
####################
|
||||
# Logical Commands #
|
||||
####################
|
||||
|
||||
init () { ${vcs}_init; }
|
||||
getNext () { ${vcs}_getNext; }
|
||||
setPath () { ${vcs}_setPath; }
|
||||
setName () { ${vcs}_setName; }
|
||||
|
||||
|
||||
#####################
|
||||
# Check for Rebuild #
|
||||
#####################
|
||||
|
||||
# Generate the list of all derivations that could be build from a nixpkgs
|
||||
# respository. This list of derivation hashes is compared with previous
|
||||
# lists and a brief summary is produced on the output.
|
||||
|
||||
compareNames () {
|
||||
nb=$(diff -y --suppress-common-lines --speed-large-files "$pkgListDir/$1.drvs" "$pkgListDir/$2.drvs" 2> /dev/null | wc -l)
|
||||
echo "$1 -> $2: $nb"
|
||||
}
|
||||
|
||||
echo "Please wait, this may take some minutes ..."
|
||||
|
||||
init
|
||||
first=""
|
||||
oldPrev=""
|
||||
|
||||
prev=""
|
||||
curr=""
|
||||
|
||||
while true; do
|
||||
getNext
|
||||
setPath # set path=...
|
||||
setName # set name=...
|
||||
curr="$name"
|
||||
|
||||
test -z "$curr" && break || true
|
||||
|
||||
nix-instantiate "$path" > "$pkgListDir/$curr.drvs" > /dev/null 2>&1 || true
|
||||
|
||||
if test -n "$prev"; then
|
||||
compareNames "$prev" "$curr"
|
||||
else
|
||||
echo "Number of package to rebuild:"
|
||||
first="$curr"
|
||||
fi
|
||||
oldPrev="$prev"
|
||||
prev="$curr"
|
||||
done
|
||||
|
||||
if test "$first" != "$oldPrev"; then
|
||||
echo "Number of package to rebuild (first -> last):"
|
||||
compareNames "$first" "$curr"
|
||||
fi
|
||||
|
||||
exitCode=0
|
||||
@@ -1,146 +0,0 @@
|
||||
/* Tool to sort attribute sets. Primarily useful for keeping
|
||||
all-packages.nix tidy.
|
||||
|
||||
To compile:
|
||||
|
||||
$ strc -i ../../maintainers/scripts/sort-attrs.str -la stratego-lib
|
||||
|
||||
Typical invocation:
|
||||
|
||||
$ sglr -m -p ~/Dev/nix/src/libexpr/nix.tbl -i all-packages.nix \
|
||||
| implode-asfix --lex \
|
||||
| ../../maintainers/scripts/sort-attrs \
|
||||
| asfix-yield
|
||||
*/
|
||||
|
||||
module sort-attrs
|
||||
|
||||
imports
|
||||
libstratego-lib
|
||||
libstratego-sglr
|
||||
|
||||
|
||||
strategies
|
||||
|
||||
no-wsp = !appl(prod([], cf(opt(layout())), no-attrs()), [])
|
||||
|
||||
|
||||
rules
|
||||
|
||||
list-sep(s): [] -> []
|
||||
list-sep(s): [x | xs] -> [[x | before] | <list-sep(s)> [split | after]]
|
||||
where
|
||||
<split-fetch-keep(s)> xs => (before, split, after)
|
||||
list-sep(s): [x | xs] -> [[x | xs]]
|
||||
where
|
||||
<not(split-fetch-keep(s))> xs
|
||||
|
||||
list-sep-end(s): xs -> [<conc> (before, [split]) | <list-sep-end(s)> after]
|
||||
where
|
||||
<split-fetch-keep(s)> xs => (before, split, after)
|
||||
list-sep-end(s): xs -> [xs]
|
||||
where
|
||||
<not(split-fetch-keep(s))> xs
|
||||
|
||||
|
||||
sort-attrs:
|
||||
appl(p@prod(_, _, attrs([term(cons("Attrs"))])),
|
||||
[ lit("{")
|
||||
, ws1
|
||||
, appl(p2@list(cf(iter-star(sort("Bind")))), attrs)
|
||||
, ws2
|
||||
, lit("}")
|
||||
]
|
||||
) ->
|
||||
appl(p, [lit("{"), <no-wsp>, appl(p2, <concat> attrs'), ws2, lit("}")])
|
||||
where
|
||||
<debug> "found it";
|
||||
<attach-wsp> [ws1 | attrs] => withWSP;
|
||||
<list-sep(starts-section)> withWSP => groups;
|
||||
<length; debug> groups;
|
||||
<map({x', x'', x''', xs', starts, starts': \[x | xs] -> [x''' | xs']
|
||||
where
|
||||
<remove-section-start> x => (x', starts);
|
||||
<map(regularise-empty-lines); if !starts; debug; sortable-section; debug then qsort(compare-attrs) else id end> [x' | xs] => [x'' | xs'];
|
||||
<[] <+ \x -> ["\n\n\n" | x]\ > starts => starts';
|
||||
<prepend-layout> (starts', x'') => x'''
|
||||
\ })> groups => attrs';
|
||||
<debug> "did it"
|
||||
|
||||
|
||||
attach-wsp: [a, b | cs] -> [(a, b) | <attach-wsp> cs]
|
||||
attach-wsp: [] -> []
|
||||
|
||||
|
||||
strategies
|
||||
|
||||
starts-section =
|
||||
?x@(appl(prod([cf(layout())], cf(opt(layout())), no-attrs()), cs), attr);
|
||||
<implode-string; is-substring(!"###")> cs;
|
||||
!x
|
||||
|
||||
rules
|
||||
|
||||
|
||||
sortable-section = ?[s]; !s; explode-string; not(fetch({x: ?x; !(x, 97); geq}))
|
||||
|
||||
|
||||
remove-section-start:
|
||||
(appl(prod([cf(layout())], cf(opt(layout())), no-attrs()), cs), attr) ->
|
||||
((appl(prod([cf(layout())], cf(opt(layout())), no-attrs()), cs'), attr), starts)
|
||||
where
|
||||
!cs;
|
||||
list-sep-end(?10); // separate into lines, keeping the \n
|
||||
map(implode-string);
|
||||
partition(where(is-substring(!"###"))) => (starts, rest);
|
||||
<map(explode-string); concat> rest => cs'
|
||||
|
||||
|
||||
regularise-empty-lines:
|
||||
(appl(prod([cf(layout())], cf(opt(layout())), no-attrs()), cs), attr) ->
|
||||
(appl(prod([cf(layout())], cf(opt(layout())), no-attrs()), cs''), attr)
|
||||
where
|
||||
// separate into lines, keeping the \n
|
||||
// last whitespace is significant, keep
|
||||
<list-sep-end(?10); split-init-last> cs => (init, last);
|
||||
<regularise-empty-lines'> init => cs'; // remove whitespace-only lines
|
||||
<concat> [<explode-string> "\n\n", <concat> cs', last] => cs'' // add one empty line
|
||||
|
||||
/* Dirty hack: *do* keep the first empty line following a non-empty line. !!! order matters */
|
||||
regularise-empty-lines': [] -> []
|
||||
|
||||
regularise-empty-lines': [x, y | xs] -> [x, y | <regularise-empty-lines'> xs]
|
||||
where
|
||||
<fetch-elem(not(?10 <+ ?32))> x;
|
||||
<not(fetch-elem(not(?10 <+ ?32)))> y
|
||||
|
||||
regularise-empty-lines': [x | xs] -> [x | <regularise-empty-lines'> xs]
|
||||
where <fetch-elem(not(?10 <+ ?32))> x
|
||||
|
||||
regularise-empty-lines': [x | xs] -> <regularise-empty-lines'> xs
|
||||
where <not(fetch-elem(not(?10 <+ ?32)))> x
|
||||
|
||||
|
||||
prepend-layout:
|
||||
(text, (appl(prod([cf(layout())], cf(opt(layout())), no-attrs()), cs), attr)) ->
|
||||
(appl(prod([cf(layout())], cf(opt(layout())), no-attrs()), cs''), attr)
|
||||
where
|
||||
<implode-string> cs => cs';
|
||||
<conc-strings; explode-string> (<concat-strings> text, cs') => cs''
|
||||
|
||||
|
||||
compare-attrs:
|
||||
x@
|
||||
( (_, appl(p1@prod(_, _, attrs([term(cons("Bind"))])), [id1 | xs1]))
|
||||
, (_, appl(p2@prod(_, _, attrs([term(cons("Bind"))])), [id2 | xs2]))
|
||||
)
|
||||
-> x
|
||||
where
|
||||
<string-lt> (id1, id2)
|
||||
|
||||
|
||||
strategies
|
||||
|
||||
main = io-wrap(
|
||||
oncetd(sort-attrs)
|
||||
)
|
||||
@@ -1,3 +0,0 @@
|
||||
#! /bin/sh
|
||||
|
||||
nix-instantiate --strict --eval-only --xml --show-trace "$(dirname "$0")"/eval-release.nix 2>&1 > /dev/null
|
||||
@@ -1,13 +0,0 @@
|
||||
{stdenv, fetchurl, perl
|
||||
, bison, flex, glib
|
||||
, pkgconfig, libxml2}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "GStreamer-0.10.10";
|
||||
src = fetchurl {
|
||||
url = http://gstreamer.freedesktop.org/src/gstreamer/gstreamer-0.10.10.tar.bz2;
|
||||
md5 = "6875bf0bd3cf38b9ae1362b9e644e6fc";
|
||||
};
|
||||
|
||||
buildInputs = [perl bison flex glib pkgconfig libxml2];
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
Choose the right CDROM reader syntax for `cd-paranoia'.
|
||||
|
||||
--- abcde-2.3.99.6/abcde 2006-08-05 21:14:00.000000000 +0200
|
||||
+++ abcde-2.3.99.6/abcde 2008-10-29 22:55:38.000000000 +0100
|
||||
@@ -3184,7 +3184,10 @@ if [ -n "$DISCID" ] || [ "$CDROMREADERSY
|
||||
if [ "$CDROMREADERSYNTAX" = "" ]; then
|
||||
for DEFAULT_CDROMREADER in $DEFAULT_CDROMREADERS; do
|
||||
if new_checkexec $DEFAULT_CDROMREADER; then
|
||||
- CDROMREADERSYNTAX=$DEFAULT_CDROMREADER
|
||||
+ case "$DEFAULT_CDROMREADER" in
|
||||
+ cd-paranoia) CDROMREADERSYNTAX=cdparanoia;;
|
||||
+ *) CDROMREADERSYNTAX=$DEFAULT_CDROMREADER;;
|
||||
+ esac
|
||||
break
|
||||
fi
|
||||
done
|
||||
@@ -1,61 +0,0 @@
|
||||
{ stdenv, fetchurl, libcdio, cddiscid, wget, bash, vorbisTools, id3v2, lame
|
||||
, makeWrapper }:
|
||||
|
||||
let version = "2.3.99.6";
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
name = "abcde-${version}";
|
||||
src = fetchurl {
|
||||
url = "mirror://debian/pool/main/a/abcde/abcde_${version}.orig.tar.gz";
|
||||
sha256 = "1wl4ygj1cf1d6g05gwwygsd5g83l039fzi011r30ma5lnm763lyb";
|
||||
};
|
||||
|
||||
# FIXME: This package does not support MP3 encoding (only Ogg),
|
||||
# nor `distmp3', `eject', etc.
|
||||
|
||||
patches = [ ./install.patch ./which.patch ./cd-paranoia.patch ];
|
||||
|
||||
configurePhase = ''
|
||||
sed -i "s|^[[:blank:]]*prefix *=.*$|prefix = $out|g ;
|
||||
s|^[[:blank:]]*etcdir *=.*$|etcdir = $out/etc|g ;
|
||||
s|^[[:blank:]]*INSTALL *=.*$|INSTALL = install -c|g" \
|
||||
"Makefile";
|
||||
|
||||
# We use `cd-paranoia' from GNU libcdio, which contains a hyphen
|
||||
# in its name, unlike Xiph's cdparanoia.
|
||||
sed -i "s|^[[:blank:]]*CDPARANOIA=.*$|CDPARANOIA=cd-paranoia|g ;
|
||||
s|^[[:blank:]]*DEFAULT_CDROMREADERS=.*$|DEFAULT_CDROMREADERS=\"cd-paranoia cdda2wav\"|g" \
|
||||
"abcde"
|
||||
|
||||
substituteInPlace "abcde" \
|
||||
--replace "/etc/abcde.conf" "$out/etc/abcde.conf"
|
||||
'';
|
||||
|
||||
buildInputs = [ makeWrapper ];
|
||||
|
||||
postInstall = ''
|
||||
substituteInPlace "$out/bin/cddb-tool" \
|
||||
--replace '#!/bin/sh' '#!${bash}/bin/sh'
|
||||
substituteInPlace "$out/bin/abcde" \
|
||||
--replace '#!/bin/bash' '#!${bash}/bin/bash'
|
||||
|
||||
wrapProgram "$out/bin/abcde" --prefix PATH ":" \
|
||||
"$out/bin:${libcdio}/bin:${cddiscid}/bin:${wget}/bin:${vorbisTools}/bin:${id3v2}/bin:${lame}/bin"
|
||||
|
||||
wrapProgram "$out/bin/cddb-tool" --prefix PATH ":" \
|
||||
"${wget}/bin"
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = http://www.hispalinux.es/~data/abcde.php;
|
||||
licence = "GPLv2+";
|
||||
description = "A Better CD Encoder (ABCDE)";
|
||||
|
||||
longDescription = ''
|
||||
abcde is a front-end command-line utility (actually, a shell
|
||||
script) that grabs tracks off a CD, encodes them to
|
||||
Ogg/Vorbis, MP3, FLAC, Ogg/Speex and/or MPP/MP+ (Musepack)
|
||||
format, and tags them, all in one go.
|
||||
'';
|
||||
};
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
--- abcde-2.3.3/Makefile~ 2005-08-26 00:43:27.000000000 +0200
|
||||
+++ abcde-2.3.3/Makefile 2008-05-26 22:20:17.000000000 +0200
|
||||
@@ -14,13 +14,13 @@ clean:
|
||||
|
||||
install:
|
||||
$(INSTALL) -d -m 755 $(bindir)
|
||||
- $(INSTALL) -m 755 -o 0 abcde $(bindir)
|
||||
- $(INSTALL) -m 755 -o 0 cddb-tool $(bindir)
|
||||
+ $(INSTALL) -m 755 abcde $(bindir)
|
||||
+ $(INSTALL) -m 755 cddb-tool $(bindir)
|
||||
$(INSTALL) -d -m 755 $(mandir)
|
||||
- $(INSTALL) -m 644 -o 0 abcde.1 $(mandir)
|
||||
- $(INSTALL) -m 644 -o 0 cddb-tool.1 $(mandir)
|
||||
+ $(INSTALL) -m 644 abcde.1 $(mandir)
|
||||
+ $(INSTALL) -m 644 cddb-tool.1 $(mandir)
|
||||
$(INSTALL) -d -m 755 $(etcdir)
|
||||
- $(INSTALL) -m 644 -o 0 abcde.conf $(etcdir)
|
||||
+ $(INSTALL) -m 644 abcde.conf $(etcdir)
|
||||
|
||||
tarball:
|
||||
@cd .. && tar czvf abcde_$(VERSION).orig.tar.gz \
|
||||
@@ -1,16 +0,0 @@
|
||||
Add an alias for `which'.
|
||||
|
||||
--- abcde-2.3.99.6/abcde 2006-08-05 21:14:00.000000000 +0200
|
||||
+++ abcde-2.3.99.6/abcde 2008-10-29 22:49:16.000000000 +0100
|
||||
@@ -15,6 +15,11 @@
|
||||
|
||||
VERSION='2.3.99-$Revision: 222M $'
|
||||
|
||||
+which ()
|
||||
+{
|
||||
+ type -P $1
|
||||
+}
|
||||
+
|
||||
usage ()
|
||||
{
|
||||
echo "This is abcde v$VERSION."
|
||||
@@ -1,31 +0,0 @@
|
||||
{ stdenv, fetchurl, lib, cmake, qt4, qtscriptgenerator, perl, gettext, curl
|
||||
, libxml2, mysql, taglib, taglib_extras, loudmouth , kdelibs, automoc4, phonon
|
||||
, strigi, soprano, qca2, libmtp, liblastfm, libgpod, pkgconfig }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "${pname}-${version}";
|
||||
|
||||
pname = "amarok";
|
||||
version = "2.4.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://kde/stable/${pname}/${version}/src/${name}.tar.bz2";
|
||||
sha256 = "52be0e926d1362828a4bf64e2a174dc009c85f6f33da4ca589f0f09ab9b7085c";
|
||||
};
|
||||
|
||||
QT_PLUGIN_PATH="${qtscriptgenerator}/lib/qt4/plugins";
|
||||
buildInputs = [ cmake qt4 qtscriptgenerator perl stdenv.gcc.libc gettext curl
|
||||
libxml2 mysql taglib taglib_extras loudmouth kdelibs automoc4 phonon strigi
|
||||
soprano qca2 libmtp liblastfm libgpod pkgconfig ];
|
||||
|
||||
postInstall = ''
|
||||
mkdir -p $out/nix-support
|
||||
echo ${qtscriptgenerator} > $out/nix-support/propagated-user-env-packages
|
||||
'';
|
||||
meta = {
|
||||
description = "Popular music player for KDE";
|
||||
license = "GPL";
|
||||
homepage = http://amarok.kde.org;
|
||||
inherit (kdelibs.meta) platforms maintainers;
|
||||
};
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
{ stdenv, fetchgit, fetchgitrevision
|
||||
, lib, cmake, qt4, qtscriptgenerator, perl, gettext, curl
|
||||
, libxml2, mysql, taglib, taglib_extras, loudmouth , kdelibs, automoc4, phonon
|
||||
, strigi, soprano, qca2, libmtp, liblastfm, libgpod, pkgconfig
|
||||
, repository ? "git://git.kde.org/amarok"
|
||||
, branch ? "heads/master"
|
||||
, rev ? fetchgitrevision repository branch
|
||||
, src ? fetchgit {
|
||||
url = repository;
|
||||
rev = rev;
|
||||
}
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "${pname}-${version}";
|
||||
|
||||
pname = "amarok";
|
||||
version = "live";
|
||||
|
||||
inherit src;
|
||||
|
||||
QT_PLUGIN_PATH="${qtscriptgenerator}/lib/qt4/plugins";
|
||||
buildInputs = [ cmake qt4 qtscriptgenerator perl stdenv.gcc.libc gettext curl
|
||||
libxml2 mysql taglib taglib_extras loudmouth kdelibs automoc4 phonon strigi
|
||||
soprano qca2 libmtp liblastfm libgpod pkgconfig ];
|
||||
|
||||
postInstall = ''
|
||||
mkdir -p $out/nix-support
|
||||
echo ${qtscriptgenerator} > $out/nix-support/propagated-user-env-packages
|
||||
'';
|
||||
meta = {
|
||||
description = "Popular music player for KDE";
|
||||
license = "GPL";
|
||||
homepage = http://amarok.kde.org;
|
||||
inherit (kdelibs.meta) maintainers;
|
||||
};
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
{ stdenv, fetchurl, scons, boost, pkgconfig, fftw, librdf_raptor
|
||||
, librdf_rasqal, jackaudio, flac, libsamplerate, alsaLib, libxml2
|
||||
, libxslt, libsndfile, libsigcxx, libusb, cairomm, glib, pango
|
||||
, gtk, glibmm, gtkmm, libgnomecanvas, librdf, liblo, aubio
|
||||
, fftwSinglePrec, libmad }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "ardour-2.8.2";
|
||||
|
||||
# svn is the source to get official releases from their site?
|
||||
# alternative: wget --data-urlencode 'key=7c4b2e1df903aae5ff5cc4077cda801e' http://ardour.org/downloader
|
||||
# but hash is changing ?
|
||||
src = fetchurl {
|
||||
url = http://mawercer.de/~nix/ardour-2.8.2.tar.bz2;
|
||||
sha256 = "1igwv1r6rlybdac24qady5asaf34f9k7kawkkgyvsifhl984m735";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
scons boost pkgconfig fftw librdf_raptor librdf_rasqal jackaudio
|
||||
flac libsamplerate alsaLib libxml2 libxslt libsndfile libsigcxx
|
||||
libusb cairomm glib pango gtk glibmm gtkmm libgnomecanvas librdf
|
||||
liblo aubio fftwSinglePrec libmad
|
||||
];
|
||||
|
||||
buildPhase = ''
|
||||
ensureDir $out
|
||||
export CXX=g++
|
||||
scons PREFIX=$out install
|
||||
'';
|
||||
|
||||
installPhase = ":";
|
||||
|
||||
meta = {
|
||||
description = "Multi-track hard disk recording software";
|
||||
longDescription = ''
|
||||
Also read "The importance of Paying Something" on their homepage, please!
|
||||
'';
|
||||
homepage = http://ardour.org/;
|
||||
license = "GPLv2";
|
||||
maintainers = [ stdenv.lib.maintainers.marcweber ];
|
||||
platforms = stdenv.lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
@@ -1,54 +0,0 @@
|
||||
{ stdenv, fetchurl, pkgconfig, glib, gtk, libmowgli, libmcs
|
||||
, gettext, dbus_glib, libxml2, libmad, xlibs, alsaLib, libogg
|
||||
, libvorbis, libcdio, libcddb, flac, ffmpeg
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "audacious-2.4.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://distfiles.atheme.org/${name}.tgz";
|
||||
sha256 = "03dd0fn17znjbmnc7hiafsg1axiwysk9q4r21s6giy2yfwhi8b30";
|
||||
};
|
||||
|
||||
pluginsSrc = fetchurl {
|
||||
url = "http://distfiles.atheme.org/audacious-plugins-2.4.2.tgz";
|
||||
sha256 = "1a2vbqyamlpvnhr3mm8b5i9304d16c796v2ycw3i396ppjvnhyxz";
|
||||
};
|
||||
|
||||
# `--enable-amidiplug' is to prevent configure from looking in /proc/asound.
|
||||
configureFlags = "--enable-amidiplug";
|
||||
|
||||
buildInputs =
|
||||
[ gettext pkgconfig glib gtk libmowgli libmcs libxml2 dbus_glib
|
||||
libmad xlibs.libXcomposite libogg libvorbis flac alsaLib libcdio
|
||||
libcddb ffmpeg
|
||||
];
|
||||
|
||||
# Here we build bouth audacious and audacious-plugins in one
|
||||
# derivations, since they really expect to be in the same prefix.
|
||||
# This is slighly tricky.
|
||||
builder = builtins.toFile "builder.sh"
|
||||
''
|
||||
# First build audacious.
|
||||
(
|
||||
source $stdenv/setup
|
||||
genericBuild
|
||||
)
|
||||
|
||||
# Then build the plugins.
|
||||
(
|
||||
buildNativeInputs="$out $buildNativeInputs" # to find audacious
|
||||
source $stdenv/setup
|
||||
rm -rfv audacious-*
|
||||
src=$pluginsSrc
|
||||
genericBuild
|
||||
)
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Audacious, a media player forked from the Beep Media Player, which was itself an XMMS fork";
|
||||
homepage = http://audacious-media-player.org/;
|
||||
maintainers = [ stdenv.lib.maintainers.eelco ];
|
||||
};
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
{ stdenv, fetchurl, wxGTK, pkgconfig, gettext, gtk, glib, zlib, perl, intltool,
|
||||
libogg, libvorbis, libmad, alsaLib, libsndfile, libsamplerate, flac, lame,
|
||||
expat, id3lib, ffmpeg
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "1.3.12";
|
||||
name = "audacity-${version}";
|
||||
|
||||
NIX_CFLAGS_COMPILE = "-fPIC -lgtk-x11-2.0 -lglib-2.0 -lgobject-2.0 -lz";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/audacity/audacity-minsrc-${version}-beta.tar.bz2";
|
||||
sha256 = "f0f55839ca3013d2e43e5114c73d195bc34503685aeab683eafca4d1bbf3b768";
|
||||
};
|
||||
buildInputs = [ wxGTK pkgconfig gettext gtk glib zlib intltool perl
|
||||
libogg libvorbis libmad alsaLib libsndfile libsamplerate flac lame
|
||||
expat id3lib ffmpeg];
|
||||
|
||||
configureFlags = [
|
||||
"--with-portmixer=no"
|
||||
];
|
||||
|
||||
dontDisableStatic = true;
|
||||
|
||||
preBuild = ''
|
||||
(cd lib-src ; make portaudio-v19/lib/libportaudio.a ; ln -sf portaudio-v19/lib/.libs/libportaudio.a portaudio-v19/lib/libportaudio.a)
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Sound editor with graphical UI";
|
||||
homepage = http://audacity.sourceforge.net;
|
||||
license = "GPLv2+";
|
||||
platforms = with stdenv.lib.platforms; linux;
|
||||
};
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
{stdenv, fetchurl, gettext, ncurses
|
||||
, gtkGUI ? false
|
||||
, pkgconfig ? null
|
||||
, gtk ? null}:
|
||||
|
||||
assert gtkGUI -> pkgconfig != null && gtk != null;
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "aumix-2.9.1";
|
||||
src = fetchurl {
|
||||
url = "http://www.jpj.net/~trevor/aumix/releases/${name}.tar.bz2";
|
||||
sha256 = "0a8fwyxnc5qdxff8sl2sfsbnvgh6pkij4yafiln0fxgg6bal7knj";
|
||||
};
|
||||
|
||||
buildInputs = [ gettext ncurses ]
|
||||
++ (if gtkGUI then [pkgconfig gtk] else []);
|
||||
|
||||
meta = {
|
||||
description = "Aumix, an audio mixer for X and the console";
|
||||
longDescription = ''
|
||||
Aumix adjusts an audio mixer from X, the console, a terminal,
|
||||
the command line or a script.
|
||||
'';
|
||||
homepage = http://www.jpj.net/~trevor/aumix.html;
|
||||
license = "GPLv2+";
|
||||
|
||||
maintainers = [ stdenv.lib.maintainers.ludo ];
|
||||
platforms = stdenv.lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
{ stdenv, fetchurl, zlib, guile, libart_lgpl, pkgconfig, intltool
|
||||
, gtk, glib, libogg, libvorbis, libgnomecanvas, gettext, perl }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "beast-0.7.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = ftp://beast.gtk.org/pub/beast/v0.7/beast-0.7.1.tar.bz2;
|
||||
sha256 = "0jyl1i1918rsn4296w07fsf6wx3clvad522m3bzgf8ms7gxivg5l";
|
||||
};
|
||||
|
||||
buildInputs =
|
||||
[ zlib guile libart_lgpl pkgconfig intltool gtk glib
|
||||
libogg libvorbis libgnomecanvas gettext
|
||||
];
|
||||
|
||||
patchPhase = ''
|
||||
unset patchPhase; patchPhase
|
||||
sed 's=-DG_DISABLE_DEPRECATED==g' -i `find -type f` # the patches didn't remove all occurences
|
||||
sed 's=/bin/bash=/${stdenv.shell}=g' -i `find -type f`
|
||||
sed 's=/usr/bin/perl=/${perl}/bin/perl=g' -i `find -type f`
|
||||
'';
|
||||
|
||||
patches =
|
||||
[ (fetchurl {
|
||||
url = mirror://gentoo/distfiles/beast-0.7.1-guile-1.8.diff.bz2;
|
||||
sha256 = "dc5194deff4b0a0eec368a69090db682d0c3113044ce2c2ed017ddfec9d3814e";
|
||||
})
|
||||
./patch.patch # patches taken from gentoo
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "BEAST - the Bedevilled Sound Engine";
|
||||
homepage = http://beast.gtk.org;
|
||||
license = ["GPL-2" "LGPL-2.1"];
|
||||
};
|
||||
}
|
||||
@@ -1,187 +0,0 @@
|
||||
Index: beast-0.7.1/shell/Makefile.in
|
||||
===================================================================
|
||||
--- beast-0.7.1.orig/shell/Makefile.in
|
||||
+++ beast-0.7.1/shell/Makefile.in
|
||||
@@ -859,10 +859,7 @@ check-before: check-installation
|
||||
check-installation:
|
||||
@for p in $(bin_PROGRAMS) ; do \
|
||||
pp="$(DESTDIR)$(bindir)/$$p" ; \
|
||||
- echo "TEST: test -x \"$$pp\"" ; \
|
||||
- test -x "$$pp" || \
|
||||
- { echo "Failed to verify installation of executable: $$pp"; \
|
||||
- exit 1 ; } \
|
||||
+ echo "TEST: test -x \"$$pp\" Test disabled" ; \
|
||||
done
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
Index: beast-0.7.1/shell/Makefile.am
|
||||
===================================================================
|
||||
--- beast-0.7.1.orig/shell/Makefile.am
|
||||
+++ beast-0.7.1/shell/Makefile.am
|
||||
@@ -859,10 +859,7 @@ check-before: check-installation
|
||||
check-installation:
|
||||
@for p in $(bin_PROGRAMS) ; do \
|
||||
pp="$(DESTDIR)$(bindir)/$$p" ; \
|
||||
- echo "TEST: test -x \"$$pp\"" ; \
|
||||
- test -x "$$pp" || \
|
||||
- { echo "Failed to verify installation of executable: $$pp"; \
|
||||
- exit 1 ; } \
|
||||
+ echo "TEST: test -x \"$$pp\" Test disabled" ; \
|
||||
done
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
Index: beast-0.7.1/birnet/birnettests.h
|
||||
===================================================================
|
||||
--- beast-0.7.1.orig/birnet/birnettests.h
|
||||
+++ beast-0.7.1/birnet/birnettests.h
|
||||
@@ -27,6 +27,7 @@
|
||||
|
||||
#include <glib.h>
|
||||
#include <string.h>
|
||||
+#include <signal.h>
|
||||
|
||||
BIRNET_EXTERN_C_BEGIN();
|
||||
|
||||
Index: beast-0.7.1/tools/bseloopfuncs.c
|
||||
===================================================================
|
||||
--- beast-0.7.1.orig/tools/bseloopfuncs.c
|
||||
+++ beast-0.7.1/tools/bseloopfuncs.c
|
||||
@@ -21,6 +21,7 @@
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
+#include <signal.h>
|
||||
|
||||
typedef struct {
|
||||
gdouble score;
|
||||
--- beast-0.7.1.orig/bse/Makefile.am 2008-06-01 13:12:28.116708321 +0200
|
||||
+++ beast-0.7.1/bse/Makefile.am 2008-06-01 13:12:40.000000000 +0200
|
||||
@@ -10,7 +10,7 @@
|
||||
# need -I$(top_builddir) for <sfi/sficonfig.h>
|
||||
# need -I$(srcdir) for "bseserver.h" in .genprc.c
|
||||
# need -I. (builddir) for "bsecore.genidl.hh" in bsecore.cc
|
||||
-INCLUDES += -I$(top_srcdir) -I$(top_builddir) -I$(srcdir) -I. $(BSE_CFLAGS) -DG_DISABLE_DEPRECATED -DG_DISABLE_CONST_RETURNS
|
||||
+INCLUDES += -I$(top_srcdir) -I$(top_builddir) -I$(srcdir) -I. $(BSE_CFLAGS) -DG_DISABLE_CONST_RETURNS
|
||||
DEFS += $(strip \
|
||||
$(patsubst %, -DG_LOG_DOMAIN=\"BSE\" -DBSE_COMPILATION, \
|
||||
$(filter $(<F), $(bse_sources) $(bse_sources))) \
|
||||
--- beast-0.7.1.orig/bse/zintern/Makefile.am 2008-06-01 13:14:25.880028999 +0200
|
||||
+++ beast-0.7.1/bse/zintern/Makefile.am 2008-06-01 13:14:38.000000000 +0200
|
||||
@@ -4,7 +4,7 @@
|
||||
## GNU Lesser General Public License version 2 or any later version.
|
||||
include $(top_srcdir)/Makefile.decl
|
||||
|
||||
-INCLUDES += -I$(top_srcdir) -I$(top_builddir) $(BSE_CFLAGS) -DG_DISABLE_DEPRECATED -DG_DISABLE_CONST_RETURNS
|
||||
+INCLUDES += -I$(top_srcdir) -I$(top_builddir) $(BSE_CFLAGS) -DG_DISABLE_CONST_RETURNS
|
||||
|
||||
ZFILE_DEFS = $(strip \
|
||||
wave-mono $(srcdir)/wave-mono.bse \
|
||||
--- a/configure.in 2008-06-01 15:19:46.000000000 +0200
|
||||
+++ b/configure.in 2008-06-01 15:27:45.000000000 +0200
|
||||
@@ -159,39 +159,33 @@
|
||||
dnl # Define package requirements.
|
||||
dnl #
|
||||
dnl ## include acintltool.m4 to provide IT_PROG_INTLTOOL
|
||||
-builtin(include, acintltool.m4)dnl
|
||||
-AC_DEFUN([AC_I18N_REQUIREMENTS],
|
||||
-[
|
||||
- ALL_LINGUAS=`cat "$srcdir/po/LINGUAS" | grep -v '^#' | xargs echo -n `
|
||||
- AC_SUBST(ALL_LINGUAS)
|
||||
- AC_SUBST([CONFIG_STATUS_DEPENDENCIES], ['$(top_srcdir)/po/LINGUAS'])
|
||||
-
|
||||
- dnl # versioned BEAST gettext domain (po/)
|
||||
- BST_GETTEXT_DOMAIN=beast-v$BIN_VERSION # version without -rcZ
|
||||
- AC_SUBST(BST_GETTEXT_DOMAIN)
|
||||
- AC_DEFINE_UNQUOTED(BST_GETTEXT_DOMAIN, "$BST_GETTEXT_DOMAIN", [Versioned BEAST gettext domain])
|
||||
- GETTEXT_PACKAGE=$BST_GETTEXT_DOMAIN
|
||||
- AC_SUBST(GETTEXT_PACKAGE)
|
||||
-
|
||||
- dnl # locale directory for all domains
|
||||
- dnl # (AM_GLIB_DEFINE_LOCALEDIR() could do this if it would do AC_SUBST())
|
||||
- saved_prefix="$prefix"
|
||||
- saved_exec_prefix="$exec_prefix"
|
||||
- test "x$prefix" = xNONE && prefix=$ac_default_prefix
|
||||
- test "x$exec_prefix" = xNONE && exec_prefix=$prefix
|
||||
- if test "x$CATOBJEXT" = "x.mo" ; then
|
||||
- beastlocaledir=`eval echo "${libdir}/locale"`
|
||||
- else
|
||||
- beastlocaledir=`eval echo "${datadir}/locale"`
|
||||
- fi
|
||||
- exec_prefix="$saved_exec_prefix"
|
||||
- prefix="$saved_prefix"
|
||||
- AC_SUBST(beastlocaledir)
|
||||
-
|
||||
- dnl # do gettext checks and prepare for intltool
|
||||
- AM_GLIB_GNU_GETTEXT
|
||||
- IT_PROG_INTLTOOL
|
||||
-])
|
||||
+IT_PROG_INTLTOOL([0.35.0])
|
||||
+
|
||||
+dnl # versioned BEAST gettext domain (po/)
|
||||
+BST_GETTEXT_DOMAIN=beast-v$BIN_VERSION # version without -rcZ
|
||||
+AC_SUBST(BST_GETTEXT_DOMAIN)
|
||||
+AC_DEFINE_UNQUOTED(BST_GETTEXT_DOMAIN, "$BST_GETTEXT_DOMAIN", [Versioned BEAST gettext domain])
|
||||
+GETTEXT_PACKAGE=$BST_GETTEXT_DOMAIN
|
||||
+AC_SUBST(GETTEXT_PACKAGE)
|
||||
+
|
||||
+dnl # locale directory for all domains
|
||||
+dnl # (AM_GLIB_DEFINE_LOCALEDIR() could do this if it would do AC_SUBST())
|
||||
+saved_prefix="$prefix"
|
||||
+saved_exec_prefix="$exec_prefix"
|
||||
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
|
||||
+test "x$exec_prefix" = xNONE && exec_prefix=$prefix
|
||||
+if test "x$CATOBJEXT" = "x.mo" ; then
|
||||
+ beastlocaledir=`eval echo "${libdir}/locale"`
|
||||
+else
|
||||
+ beastlocaledir=`eval echo "${datadir}/locale"`
|
||||
+fi
|
||||
+exec_prefix="$saved_exec_prefix"
|
||||
+prefix="$saved_prefix"
|
||||
+AC_SUBST(beastlocaledir)
|
||||
+
|
||||
+dnl # do gettext checks and prepare for intltool
|
||||
+AM_GLIB_GNU_GETTEXT
|
||||
+
|
||||
AC_DEFUN([AC_SFI_REQUIREMENTS],
|
||||
[
|
||||
dnl # check for GLib libs, libbirnet already provides gthread-2.0 and glib-2.0
|
||||
@@ -570,7 +564,6 @@
|
||||
AC_BIRNET_REQUIREMENTS
|
||||
|
||||
# Check requirement sets
|
||||
-AC_I18N_REQUIREMENTS
|
||||
AC_SFI_REQUIREMENTS
|
||||
AC_BSE_REQUIREMENTS
|
||||
AC_BSESCM_REQUIREMENTS
|
||||
--- a/po/POTFILES.in 2008-06-22 15:12:10.000000000 +0200
|
||||
+++ b/po/POTFILES.in 2008-06-22 15:13:28.000000000 +0200
|
||||
@@ -131,3 +131,29 @@
|
||||
plugins/davxtalstrings.c
|
||||
plugins/freeverb/bsefreeverb.c
|
||||
tools/bsewavetool.cc
|
||||
+
|
||||
+beast-gtk/bstgentypes.c
|
||||
+birnet/birnetcpu.cc
|
||||
+birnet/birnetutils.hh
|
||||
+bse/bsebus.genprc.c
|
||||
+bse/bsebusmodule.genidl.hh
|
||||
+bse/bsecontainer.genprc.c
|
||||
+bse/bsecore.genidl.hh
|
||||
+bse/bseieee754.h
|
||||
+bse/bseladspamodule.c
|
||||
+bse/bseparasite.genprc.c
|
||||
+bse/bsesong.genprc.c
|
||||
+bse/bsesource.genprc.c
|
||||
+bse/bsetrack.genprc.c
|
||||
+plugins/artscompressor.genidl.hh
|
||||
+plugins/bseamplifier.genidl.hh
|
||||
+plugins/bsebalance.genidl.hh
|
||||
+plugins/bsecontribsampleandhold.genidl.hh
|
||||
+plugins/bsenoise.genidl.hh
|
||||
+plugins/bsequantizer.genidl.hh
|
||||
+plugins/bsesummation.genidl.hh
|
||||
+plugins/davbassfilter.genidl.hh
|
||||
+plugins/davchorus.genidl.hh
|
||||
+plugins/standardguspatchenvelope.genidl.hh
|
||||
+plugins/standardsaturator.genidl.hh
|
||||
+tests/latency/bselatencytest.genidl.hh
|
||||
@@ -1,31 +0,0 @@
|
||||
{ fetchurl, stdenv }:
|
||||
|
||||
let version = "0.9";
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
name = "cd-discid-${version}";
|
||||
src = fetchurl {
|
||||
url = "mirror://debian/pool/main/c/cd-discid/cd-discid_${version}.orig.tar.gz";
|
||||
sha256 = "1fx2ky1pb07l1r0bldpw16wdsfzw7a0093ib9v66kmilwy2sq5s9";
|
||||
};
|
||||
|
||||
patches = [ ./install.patch ];
|
||||
|
||||
configurePhase = ''
|
||||
sed -i "s|^[[:blank:]]*prefix *=.*$|prefix = $out|g ;
|
||||
s|^[[:blank:]]*INSTALL *=.*$|INSTALL = install -c|g" \
|
||||
"Makefile";
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = http://lly.org/~rcw/cd-discid/;
|
||||
licence = "GPLv2+";
|
||||
description = "cd-discid, a command-line utility to retrieve a disc's CDDB ID";
|
||||
|
||||
longDescription = ''
|
||||
cd-discid is a backend utility to get CDDB discid information
|
||||
from a CD-ROM disc. It was originally designed for cdgrab (now
|
||||
abcde), but can be used for any purpose requiring CDDB data.
|
||||
'';
|
||||
};
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
--- cd-discid-0.9/Makefile 2003-01-05 21:18:07.000000000 +0100
|
||||
+++ cd-discid-0.9/Makefile 2008-05-26 22:14:56.000000000 +0200
|
||||
@@ -32,9 +32,9 @@ clean:
|
||||
|
||||
install: cd-discid
|
||||
$(INSTALL) -d -m 755 $(bindir)
|
||||
- $(INSTALL) -s -m 755 -o 0 cd-discid $(bindir)
|
||||
+ $(INSTALL) -s -m 755 cd-discid $(bindir)
|
||||
$(INSTALL) -d -m 755 $(mandir)
|
||||
- $(INSTALL) -m 644 -o 0 cd-discid.1 $(mandir)
|
||||
+ $(INSTALL) -m 644 cd-discid.1 $(mandir)
|
||||
|
||||
tarball:
|
||||
@cd .. && tar czvf cd-discid_$(VERSION).orig.tar.gz \
|
||||
@@ -3,13 +3,9 @@
|
||||
stdenv.mkDerivation {
|
||||
name = "cdparanoia-III-alpha9.8";
|
||||
src = fetchurl {
|
||||
url = http://downloads.xiph.org/releases/cdparanoia/cdparanoia-III-alpha9.8.src.tgz;
|
||||
md5 = "7218e778b5970a86c958e597f952f193";
|
||||
url = http://catamaran.labs.cs.uu.nl/dist/tarballs/cdparanoia-III-alpha9.8.src.tgz;
|
||||
md5 = "7218e778b5970a86c958e597f952f193" ;
|
||||
};
|
||||
|
||||
patches = [./fix.patch];
|
||||
|
||||
meta = {
|
||||
homepage = http://xiph.org/paranoia;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
{ stdenv, fetchurl, ncurses, pkgconfig, alsaLib, flac, libmad, ffmpeg, libvorbis, mpc, mp4v2 }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "cmus-${version}";
|
||||
version = "2.3.3";
|
||||
|
||||
configurePhase = "./configure prefix=$out";
|
||||
|
||||
buildInputs = [ ncurses pkgconfig alsaLib flac libmad ffmpeg libvorbis mpc mp4v2 ];
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/cmus/cmus-v${version}.tar.bz2";
|
||||
sha256 = "13hc5d7h2ayjwnip345hc59rpjj9fgrp1i5spjw3s14prdqr733v";
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "cmus is a small, fast and powerful console music player for Linux and *BSD";
|
||||
homepage = http://cmus.sourceforge.net;
|
||||
license = stdenv.lib.licenses.gpl2;
|
||||
};
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
{stdenv, fetchurl, unzip, portaudio }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "espeak-1.44.03";
|
||||
src = fetchurl {
|
||||
url = mirror://sourceforge/espeak/espeak-1.44.03-source.zip;
|
||||
sha256 = "0lnv89xmsq3bax0qpabd0z2adaag7mdl973bkw3gdszidafmfyx4";
|
||||
};
|
||||
|
||||
buildInputs = [ unzip portaudio ];
|
||||
|
||||
patchPhase = ''
|
||||
sed -e s,/bin/ln,ln,g -i src/Makefile
|
||||
sed -e 's,^CXXFLAGS=-O2,CXXFLAGS=-O2 -D PATH_ESPEAK_DATA=\\\"$(DATADIR)\\\",' -i src/Makefile
|
||||
'' + (if portaudio.api_version == 19 then ''
|
||||
cp src/portaudio19.h src/portaudio.h
|
||||
'' else "");
|
||||
|
||||
configurePhase = ''
|
||||
cd src
|
||||
makeFlags="PREFIX=$out"
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Compact open source software speech synthesizer";
|
||||
homepage = http://espeak.sourceforge.net/;
|
||||
license = "GPLv3+";
|
||||
};
|
||||
}
|
||||
@@ -1,24 +1,11 @@
|
||||
{stdenv, fetchurl, libogg}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "flac-1.2.1";
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "flac-1.1.1";
|
||||
src = fetchurl {
|
||||
url = mirror://sourceforge/flac/flac-1.2.1.tar.gz;
|
||||
sha256 = "1pry5lgzfg57pga1zbazzdd55fkgk3v5qy4axvrbny5lrr5s8dcn";
|
||||
url = http://catamaran.labs.cs.uu.nl/dist/tarballs/flac-1.1.1.tar.gz;
|
||||
md5 = "c6ccddccf8ad344065698047c2fc7280" ;
|
||||
};
|
||||
|
||||
buildInputs = [libogg];
|
||||
|
||||
patches = [
|
||||
# Fix for building on GCC 4.3.
|
||||
(fetchurl {
|
||||
url = "http://sources.gentoo.org/viewcvs.py/*checkout*/gentoo-x86/media-libs/flac/files/flac-1.2.1-gcc-4.3-includes.patch?rev=1.1";
|
||||
sha256 = "1m6ql5vyjb2jlp5qiqp6w0drq1m6x6y3i1dnl5ywywl3zd36k0mr";
|
||||
})
|
||||
];
|
||||
|
||||
meta = {
|
||||
homepage = http://flac.sourceforge.net;
|
||||
};
|
||||
buildInputs = [libogg] ;
|
||||
}
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
{stdenv, fetchurl, SDL, SDL_gfx, SDL_image, tremor, flac, mpg123, libmikmod
|
||||
, speex
|
||||
, keymap ? "newdefault"
|
||||
, conf ? "unknown"
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "gmu-0.7.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = http://wejp.k.vu/files/gmu-0.7.2.tar.gz;
|
||||
sha256 = "0gvhwhhlj64lc425wqch4g6v59ldd5i3rxll3zdcrdgk2vkh8nys";
|
||||
};
|
||||
|
||||
buildInputs = [ SDL SDL_gfx SDL_image tremor flac mpg123 libmikmod speex ];
|
||||
|
||||
NIX_LDFLAGS = "-lgcc_s";
|
||||
|
||||
preBuild = ''
|
||||
makeFlags="$makeFlags PREFIX=$out"
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
cp ${keymap}.keymap $out/share/gmu/default.keymap
|
||||
cp gmuinput.${conf}.conf $out/share/gmu/gmuinput.conf
|
||||
ensureDir $out/etc/gmu
|
||||
cp gmu.${conf}.conf $out/etc/gmu/gmu.conf
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = http://wejp.k.vu/projects/gmu;
|
||||
description = "Open source music player for portable gaming consoles and handhelds";
|
||||
license = "GPLv2";
|
||||
};
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
{ stdenv, fetchurl, pkgconfig, libgpod, gtk, glib, gettext, perl, perlXMLParser
|
||||
, libglade, flex, libid3tag, libvorbis, intltool }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "gtkpod-1.0.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = mirror://sourceforge/gtkpod/gtkpod-1.0.0.tar.gz;
|
||||
sha256 = "04jzybs55c27kyp7r9c58prcq0q4ssvj5iggva857f49s1ar826q";
|
||||
};
|
||||
|
||||
buildInputs = [ pkgconfig libgpod gettext perl perlXMLParser gtk libglade flex
|
||||
libid3tag libvorbis intltool ];
|
||||
|
||||
patchPhase = ''
|
||||
sed -i 's/which/type -P/' scripts/*.sh
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "GTK Manager for an Apple ipod";
|
||||
homepage = http://gtkpod.sourceforge.net;
|
||||
license = "GPLv2+";
|
||||
platforms = with stdenv.lib.platforms; linux;
|
||||
};
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
{stdenv, fetchurl, id3lib, groff}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "id3v2-0.1.11";
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/id3v2/${name}.tar.gz";
|
||||
sha256 = "00r6f9yzmkrqa62dnkm8njg5cjzhmy0l17nj1ba15nrrm0mnand4";
|
||||
};
|
||||
|
||||
patches = [ ./id3v2-0.1.11-track-bad-free.patch ];
|
||||
|
||||
buildNativeInputs = [ groff ];
|
||||
buildInputs = [ id3lib ];
|
||||
|
||||
configurePhase = ''
|
||||
export makeFlags=PREFIX=$out
|
||||
'';
|
||||
|
||||
preInstall = ''
|
||||
ensureDir $out/bin $out/man/man1
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "A command line editor for id3v2 tags";
|
||||
homepage = http://id3v2.sourceforge.net/;
|
||||
license = "GPLv2+";
|
||||
};
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
http://sourceforge.net/tracker/index.php?func=detail&aid=1252035&group_id=4193&atid=304193
|
||||
|
||||
diff -up id3v2-0.1.11/id3v2.cpp~ id3v2-0.1.11/id3v2.cpp
|
||||
--- id3v2-0.1.11/id3v2.cpp~ 2004-05-04 21:30:15.000000000 +0300
|
||||
+++ id3v2-0.1.11/id3v2.cpp 2008-01-03 21:22:02.000000000 +0200
|
||||
@@ -423,7 +423,7 @@ int main( int argc, char *argv[])
|
||||
{
|
||||
// check if there is a total track number and if we only have
|
||||
// the track number for this file. In this case combine them.
|
||||
- char *currentTrackNum, *newTrackNum;
|
||||
+ char *currentTrackNum, *newTrackNum = NULL;
|
||||
|
||||
if (pFrame != NULL)
|
||||
{
|
||||
@@ -1,20 +0,0 @@
|
||||
{ stdenv, fetchurl, jackaudio, pkgconfig }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "jackmeter-0.3";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://www.aelius.com/njh/jackmeter/${name}.tar.gz";
|
||||
sha256 = "03siznnq3f0nnqyighgw9qdq1y4bfrrxs0mk6394pza3sz4b6sgp";
|
||||
};
|
||||
|
||||
buildInputs = [ jackaudio pkgconfig ];
|
||||
|
||||
meta = {
|
||||
description = "Console jack loudness meter";
|
||||
homepage = http://www.aelius.com/njh/jackmeter/;
|
||||
license = "GPLv2";
|
||||
maintainers = [ stdenv.lib.maintainers.marcweber ];
|
||||
platforms = stdenv.lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
{ stdenv, fetchurl, fftw, ladspaH, pkgconfig }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "swh-plugins-0.4.15";
|
||||
|
||||
src = fetchurl {
|
||||
url = http://plugin.org.uk/releases/0.4.15/swh-plugins-0.4.15.tar.gz;
|
||||
sha256 = "0h462s4mmqg4iw7zdsihnrmz2vjg0fd49qxw2a284bnryjjfhpnh";
|
||||
};
|
||||
|
||||
buildInputs = [fftw ladspaH pkgconfig];
|
||||
|
||||
postInstall =
|
||||
''
|
||||
ensureDir $out/share/ladspa/
|
||||
ln -sv $out/lib/ladspa $out/share/ladspa/lib
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "LADSPA format audio plugins";
|
||||
};
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
{ stdenv, fetchurl, builderDefs }:
|
||||
|
||||
let
|
||||
src = fetchurl {
|
||||
url = http://www.ladspa.org/ladspa_sdk/ladspa.h.txt;
|
||||
sha256 = "1b908csn85ng9sz5s5d1mqk711cmawain2z8px2ajngihdrynb67";
|
||||
};
|
||||
in
|
||||
let localDefs = builderDefs.passthru.function {
|
||||
buildInputs = [];
|
||||
inherit src;
|
||||
};
|
||||
in with localDefs;
|
||||
let
|
||||
copyFile = fullDepEntry ("
|
||||
ensureDir \$out/include
|
||||
cp ${src} \$out/include/ladspa.h
|
||||
") [minInit defEnsureDir];
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
name = "ladspa.h";
|
||||
builder = writeScript "ladspa.h-builder"
|
||||
(textClosure localDefs [copyFile]);
|
||||
meta = {
|
||||
description = "LADSPA format audio plugins";
|
||||
inherit src;
|
||||
};
|
||||
}
|
||||
@@ -1,17 +1,9 @@
|
||||
{stdenv, fetchurl, nasm}:
|
||||
{stdenv, fetchurl}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "lame-3.98.4";
|
||||
stdenv.mkDerivation {
|
||||
name = "lame-3.96.1";
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/lame/${name}.tar.gz";
|
||||
sha256 = "1j3jywv6ic2cy0x0q1a1h6rcl6xmcs5f58xawjdkl8hpcv3l8cdc";
|
||||
url = http://catamaran.labs.cs.uu.nl/dist/tarballs/lame-3.96.1.tar.gz;
|
||||
md5 = "e1206c46a5e276feca11a7149e2fc6ac" ;
|
||||
};
|
||||
|
||||
buildInputs = [ nasm ];
|
||||
|
||||
configureFlags = [ "--enable-nasm" ];
|
||||
|
||||
# Either disable static, or fix the rpath of 'lame' for it to point
|
||||
# properly to the libmp3lame shared object.
|
||||
dontDisableStatic = true;
|
||||
}
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
{ fetchurl, stdenv, ncurses, pkgconfig, gtk }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "mp3info-0.8.5a";
|
||||
|
||||
src = fetchurl {
|
||||
url = "ftp://ftp.ibiblio.org/pub/linux/apps/sound/mp3-utils/mp3info/${name}.tgz";
|
||||
sha256 = "042f1czcs9n2sbqvg4rsvfwlqib2gk976mfa2kxlfjghx5laqf04";
|
||||
};
|
||||
|
||||
buildInputs = [ ncurses pkgconfig gtk ];
|
||||
|
||||
configurePhase =
|
||||
'' sed -i Makefile \
|
||||
-e "s|^prefix=.*$|prefix=$out|g ;
|
||||
s|/bin/rm|rm|g ;
|
||||
s|/usr/bin/install|install|g"
|
||||
'';
|
||||
|
||||
preInstall =
|
||||
'' ensureDir "$out/bin"
|
||||
ensureDir "$out/man/man1"
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "MP3Info, an MP3 technical info viewer and ID3 1.x tag editor";
|
||||
|
||||
longDescription =
|
||||
'' MP3Info is a little utility used to read and modify the ID3 tags of
|
||||
MP3 files. MP3Info can also display various techincal aspects of an
|
||||
MP3 file including playing time, bit-rate, sampling frequency and
|
||||
other attributes in a pre-defined or user-specifiable output format.
|
||||
'';
|
||||
|
||||
homepage = http://www.ibiblio.org/mp3info/;
|
||||
|
||||
license = "GPLv2+";
|
||||
|
||||
maintainers = [ stdenv.lib.maintainers.ludo ];
|
||||
platforms = stdenv.lib.platforms.unix;
|
||||
};
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
{ fetchurl, stdenv, gettext, libmpcdec, libao }:
|
||||
|
||||
let version = "0.2.4"; in
|
||||
stdenv.mkDerivation rec {
|
||||
name = "mpc123-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/mpc123/version%20${version}/${name}.tar.gz";
|
||||
sha256 = "0sf4pns0245009z6mbxpx7kqy4kwl69bc95wz9v23wgappsvxgy1";
|
||||
};
|
||||
|
||||
patches = [ ./use-gcc.patch ];
|
||||
|
||||
buildInputs = [ gettext libmpcdec libao ];
|
||||
|
||||
installPhase =
|
||||
# XXX: Should install locales too (though there's only 1 available).
|
||||
'' ensureDir "$out/bin"
|
||||
cp -v mpc123 "$out/bin"
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = http://mpc123.sourceforge.net/;
|
||||
|
||||
description = "mpc123, a Musepack (.mpc) audio player";
|
||||
|
||||
license = "GPLv2+";
|
||||
|
||||
maintainers = [ stdenv.lib.maintainers.ludo ];
|
||||
platforms = stdenv.lib.platforms.gnu; # arbitrary choice
|
||||
};
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
Don't worry, just use GCC and everything's gonna be alright.
|
||||
|
||||
--- mpc123-0.2.4/Makefile 2008-03-21 22:14:38.000000000 +0100
|
||||
+++ mpc123-0.2.4/Makefile 2010-01-28 23:26:49.000000000 +0100
|
||||
@@ -17,7 +17,7 @@
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
-CC := $(shell which colorgcc || which cc)
|
||||
+CC := gcc
|
||||
|
||||
TAGSPRG := ctags
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
{stdenv, fetchurl, alsaLib }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "mpg123-1.12.3";
|
||||
|
||||
src = fetchurl {
|
||||
url = mirror://sourceforge/mpg123/mpg123-1.12.3.tar.bz2;
|
||||
sha256 = "1ij689s7jch3d4g0ja3jylaphallc8vgrsrm9b12254phnyy23xf";
|
||||
};
|
||||
|
||||
buildInputs = [ alsaLib ];
|
||||
|
||||
crossAttrs = {
|
||||
configureFlags = if stdenv.cross ? mpg123 then
|
||||
"--with-cpu=${stdenv.cross.mpg123.cpu}" else "";
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "Command-line MP3 player";
|
||||
homepage = http://mpg123.sourceforge.net/;
|
||||
license = "LGPL";
|
||||
};
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
{stdenv, fetchurl, libao, libmad, libid3tag, zlib}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "mpg321-0.2.10";
|
||||
src = fetchurl {
|
||||
url = mirror://sourceforge/mpg321/mpg321-0.2.10.tar.gz;
|
||||
sha256 = "db0c299592b8f1f704f41bd3fc3a2bf138658108588d51af61638c551af1b0d4";
|
||||
};
|
||||
|
||||
buildInputs = [libao libid3tag libmad zlib];
|
||||
|
||||
meta = {
|
||||
description = "Command-line MP3 player.";
|
||||
homepage = http://mpg321.sourceforge.net/;
|
||||
license = "GPLv2";
|
||||
};
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
{ fetchurl, stdenv, pkgconfig, pulseaudio, gtkmm, libsigcxx
|
||||
, libglademm, libcanberra, intltool, gettext }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "pavucontrol-0.9.10";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://0pointer.de/lennart/projects/pavucontrol/${name}.tar.gz";
|
||||
sha256 = "0g2sd9smwwpnyq8yc65dl9z0iafj2rrimi8v58wkxx98vhnnvsby";
|
||||
};
|
||||
|
||||
buildInputs = [ pkgconfig pulseaudio gtkmm libsigcxx libglademm libcanberra
|
||||
intltool gettext ];
|
||||
|
||||
configureFlags = "--disable-lynx";
|
||||
|
||||
meta = {
|
||||
description = "PulseAudio Volume Control";
|
||||
|
||||
longDescription = ''
|
||||
PulseAudio Volume Control (pavucontrol) provides a GTK+
|
||||
graphical user interface to connect to a PulseAudio server and
|
||||
easily control the volume of all clients, sinks, etc.
|
||||
'';
|
||||
|
||||
homepage = http://0pointer.de/lennart/projects/pavucontrol/;
|
||||
|
||||
license = "GPLv2+";
|
||||
|
||||
maintainers = [ stdenv.lib.maintainers.ludo ];
|
||||
platforms = stdenv.lib.platforms.gnu; # arbitrary choice
|
||||
};
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
{ stdenv, fetchurl, qt4, alsaLib, jackaudio }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "qjackctl-0.3.3";
|
||||
|
||||
# some dependencies such as killall have to be installed additionally
|
||||
|
||||
src = fetchurl {
|
||||
url = http://downloads.sourceforge.net/qjackctl/qjackctl-0.3.3.tar.gz;
|
||||
sha256 = "1z9v208fs79ka6ni3p5v5xb0k5y1wqqm2a9cf903387b9p3fhpxj";
|
||||
};
|
||||
|
||||
buildInputs = [ qt4 alsaLib jackaudio ];
|
||||
|
||||
meta = {
|
||||
description = "qt jackd control gui tool";
|
||||
homepage = http://qjackctl.sourceforge.net/;
|
||||
license = "GPL";
|
||||
};
|
||||
}
|
||||
@@ -1,58 +0,0 @@
|
||||
args :
|
||||
let
|
||||
lib = args.lib;
|
||||
fetchurl = args.fetchurl;
|
||||
fullDepEntry = args.fullDepEntry;
|
||||
|
||||
version = lib.attrByPath ["version"] "9.4" args;
|
||||
buildInputs = with args; [gtk glib pkgconfig
|
||||
libXpm gmp gettext libX11 fftw]
|
||||
++ (lib.optional (args ? ruby) args.ruby)
|
||||
++ (lib.optional (args ? mesa) args.mesa)
|
||||
++ (lib.optional (args ? guile) args.guile)
|
||||
++ (lib.optional (args ? libtool) args.libtool)
|
||||
++ (lib.optional (args ? sndlib) args.sndlib)
|
||||
++ (lib.optional (args ? alsaLib) args.alsaLib)
|
||||
++ (lib.optional (args ? jackaudio) args.jackaudio)
|
||||
;
|
||||
configureFlags = ["--with-gtk" "--with-xpm"]
|
||||
++ (lib.optional (args ? ruby) "--with-ruby" )
|
||||
++ (lib.optional (args ? mesa) "--with-gl" )
|
||||
++ (lib.optional (args ? guile) "--with-guile")
|
||||
++ (lib.optional (args ? sndlib) "--with-midi" )
|
||||
++ (lib.optional (args ? alsaLib) "--with-alsa")
|
||||
++ (lib.optional (args ? jackaudio) "--with-jack" )
|
||||
++ [ "--with-fftw" "--htmldir=$out/share/snd/html" "--with-doc-dir=$out/share/snd/html" ]
|
||||
;
|
||||
in
|
||||
rec {
|
||||
src = fetchurl {
|
||||
url = "http://downloads.sourceforge.net/snd/snd-${version}.tar.gz";
|
||||
sha256 = "0zqgfnkvkqxby1k74mwba1r4pb520glcsz5jjmpzm9m41nqnghmm";
|
||||
};
|
||||
|
||||
inherit buildInputs;
|
||||
configureFlags = [];
|
||||
|
||||
/* doConfigure should be specified separately */
|
||||
phaseNames = ["doConfigure" "preBuild" "makeDocsWork"
|
||||
"doMakeInstall" "doForceShare"];
|
||||
|
||||
makeDocsWork = fullDepEntry ''
|
||||
# hackish way to make html docs work
|
||||
h="$out/share/snd/html"; ensureDir "$h"; cp *.html "$h"
|
||||
patch -p1 < ${./doc.patch}
|
||||
sed "s@HTML-DIR@$h@" -i index.scm snd-help.c
|
||||
'' ["defEnsureDir"];
|
||||
|
||||
preBuild = fullDepEntry (''
|
||||
export NIX_LDFLAGS="$NIX_LDFLAGS -L${args.libX11}/lib -lX11"
|
||||
'') ["minInit" "doUnpack" "makeDocsWork"];
|
||||
|
||||
name = "snd-" + version;
|
||||
meta = {
|
||||
description = "Snd sound editor.";
|
||||
homepage = http://ccrma.stanford.edu/software/snd;
|
||||
inherit src;
|
||||
};
|
||||
}
|
||||
@@ -1,62 +0,0 @@
|
||||
diff --git a/index.scm b/index.scm
|
||||
index 2148a58..713939c 100644
|
||||
--- a/index.scm
|
||||
+++ b/index.scm
|
||||
@@ -18,24 +18,7 @@ and if one is found, and the Snd documentation can be found, calls (html-program
|
||||
(lambda (n)
|
||||
;; look for doc on current dir, then html dir, then global dir
|
||||
;; snd.html is what we'll search for
|
||||
- (let ((dir (if (file-exists? "snd.html")
|
||||
- (getcwd)
|
||||
- (if (and (string? (html-dir))
|
||||
- (file-exists? (string-append (html-dir) "/snd.html")))
|
||||
- (html-dir)
|
||||
- (if (file-exists? "/usr/share/doc/snd-9/snd.html")
|
||||
- "/usr/share/doc/snd-9"
|
||||
- (if (file-exists? "/usr/local/share/doc/snd-9/snd.html")
|
||||
- "/usr/local/share/doc/snd-9"
|
||||
- (if (file-exists? "/usr/doc/snd-9/snd.html")
|
||||
- "/usr/doc/snd-9"
|
||||
- (if (file-exists? "/usr/share/doc/snd-8/snd.html")
|
||||
- "/usr/share/doc/snd-8"
|
||||
- (if (file-exists? "/usr/local/share/doc/snd-8/snd.html")
|
||||
- "/usr/local/share/doc/snd-8"
|
||||
- (if (file-exists? "/usr/doc/snd-8/snd.html")
|
||||
- "/usr/doc/snd-8"
|
||||
- #f))))))))))
|
||||
+ (let (dir "HTML-DIR")
|
||||
(if dir
|
||||
(if (or (string=? (html-program) "netscape")
|
||||
(string=? (html-program) "mozilla")
|
||||
diff --git a/snd-help.c b/snd-help.c
|
||||
index a6557e0..a40a02e 100644
|
||||
--- a/snd-help.c
|
||||
+++ b/snd-help.c
|
||||
@@ -3554,26 +3554,7 @@ static char *doc_files[DOC_DIRECTORIES] = {
|
||||
|
||||
static char *html_directory(void)
|
||||
{
|
||||
- int i;
|
||||
- if (mus_file_probe("snd.html"))
|
||||
- return(mus_getcwd());
|
||||
- if (html_dir(ss))
|
||||
- {
|
||||
- bool happy;
|
||||
- char *hd = NULL;
|
||||
- hd = (char *)CALLOC(snd_strlen(html_dir(ss)) + 16, sizeof(char));
|
||||
- sprintf(hd, html_dir(ss), "/snd.html");
|
||||
- happy = mus_file_probe(hd);
|
||||
- FREE(hd);
|
||||
- if (happy) return(copy_string(html_dir(ss)));
|
||||
- }
|
||||
-#ifdef MUS_DEFAULT_DOC_DIR
|
||||
- if (mus_file_probe(MUS_DEFAULT_DOC_DIR "/snd.html"))
|
||||
- return(copy_string(MUS_DEFAULT_DOC_DIR "/snd.html"));
|
||||
-#endif
|
||||
- for (i = 0; i < DOC_DIRECTORIES; i++)
|
||||
- if (mus_file_probe(doc_files[i])) return(copy_string(doc_directories[i]));
|
||||
- return(NULL);
|
||||
+ return (copy_string ("HTML-DIR"));
|
||||
}
|
||||
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
# TODO add plugins having various licenses, see http://www.vamp-plugins.org/download.html
|
||||
|
||||
{ stdenv, fetchurl, libsndfile, qt, fftw, librdf, rubberband
|
||||
, libsamplerate, vampSDK, alsaLib, librdf_raptor, librdf_rasqal
|
||||
, redland, jackaudio, pulseaudio, libmad, libogg, liblo, bzip2 }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "sonic-visualizer-1.6";
|
||||
|
||||
src = fetchurl {
|
||||
url = http://downloads.sourceforge.net/sv1/sonic-visualiser-1.6.tar.bz2;
|
||||
sha256 = "1dbqqa7anii2jnjpfwm4sr83nn4bwmz68xw4n6clycsz5iqk52f5";
|
||||
};
|
||||
|
||||
buildInputs =
|
||||
[ libsndfile qt fftw /* should be fftw3f ??*/ bzip2 librdf rubberband
|
||||
libsamplerate vampSDK alsaLib librdf_raptor librdf_rasqal redland
|
||||
# optional
|
||||
jackaudio
|
||||
# portaudio
|
||||
pulseaudio
|
||||
libmad
|
||||
libogg # ?
|
||||
# fishsound
|
||||
liblo
|
||||
];
|
||||
|
||||
buildPhase = ''
|
||||
qmake -makefile PREFIX=$out && make
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
ensureDir $out/{bin,share/sv}
|
||||
cp sv/sonic-visualiser $out/bin
|
||||
cp -r sv/samples $out/share/sv/samples
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "View and analyse contents of music audio files";
|
||||
homepage = http://www.sonicvisualiser.org/;
|
||||
license = "GPLv2";
|
||||
maintainers = [ stdenv.lib.maintainers.marcweber ];
|
||||
platforms = stdenv.lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
@@ -1,63 +0,0 @@
|
||||
{ fetchurl, stdenv, dpkg, xlibs, qt4, alsaLib, makeWrapper }:
|
||||
|
||||
assert stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux";
|
||||
|
||||
let version = "0.4.9.302"; in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "spotify-${version}";
|
||||
|
||||
src =
|
||||
if stdenv.system == "i686-linux" then
|
||||
fetchurl {
|
||||
url = "http://repository.spotify.com/pool/non-free/s/spotify/spotify-client-qt_${version}.g604b4fb-1_i386.deb";
|
||||
sha256 = "1kw3jfvz8a9v6zl3yh6f51vsick35kmcf7vkbjb6wl0nk1a8q8gg";
|
||||
}
|
||||
else if stdenv.system == "x86_64-linux" then
|
||||
fetchurl {
|
||||
url = "http://repository.spotify.com/pool/non-free/s/spotify/spotify-client-qt_${version}.g604b4fb-1_amd64.deb";
|
||||
sha256 = "1cghs3hwmqnd7g62g1h2bf3yvxgjq8b94vzhp1w9ysb5rswyjkyv";
|
||||
}
|
||||
else throw "Spotify not supported on this platform.";
|
||||
|
||||
buildInputs = [ dpkg makeWrapper ];
|
||||
|
||||
unpackPhase = "true";
|
||||
|
||||
installPhase =
|
||||
''
|
||||
mkdir -p $out
|
||||
dpkg-deb -x $src $out
|
||||
mv $out/usr/* $out/
|
||||
rmdir $out/usr
|
||||
|
||||
patchelf \
|
||||
--interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
|
||||
--set-rpath ${stdenv.lib.makeLibraryPath [ xlibs.libXScrnSaver qt4 alsaLib stdenv.gcc.gcc ]}:${stdenv.gcc.gcc}/lib64 \
|
||||
$out/bin/spotify
|
||||
|
||||
preload=$out/libexec/spotify/libpreload.so
|
||||
mkdir -p $out/libexec/spotify
|
||||
gcc -shared ${./preload.c} -o $preload -ldl -DOUT=\"$out\" -fPIC
|
||||
|
||||
wrapProgram $out/bin/spotify --set LD_PRELOAD $preload
|
||||
''; # */
|
||||
|
||||
dontStrip = true;
|
||||
dontPatchELF = true;
|
||||
|
||||
meta = {
|
||||
homepage = https://www.spotify.com/download/previews/;
|
||||
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.
|
||||
'';
|
||||
};
|
||||
}
|
||||
@@ -1,59 +0,0 @@
|
||||
/* Spotify looks for its theme data in /usr/share/spotify/theme. This
|
||||
LD_PRELOAD library intercepts open() and stat() calls to redirect
|
||||
them to the corresponding location in $out. */
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdlib.h>
|
||||
#include <dlfcn.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <limits.h>
|
||||
|
||||
char themeDir [] = "/usr/share/spotify/theme";
|
||||
char realThemeDir [] = OUT "/share/spotify/theme";
|
||||
|
||||
const char * rewrite(const char * path, char * buf)
|
||||
{
|
||||
if (strncmp(path, themeDir, sizeof(themeDir) - 1) != 0) return path;
|
||||
if (snprintf(buf, PATH_MAX, "%s%s", realThemeDir, path + sizeof(themeDir) - 1) >= PATH_MAX)
|
||||
abort();
|
||||
return buf;
|
||||
}
|
||||
|
||||
int open(const char *path, int flags, ...)
|
||||
{
|
||||
char buf[PATH_MAX];
|
||||
int (*_open) (const char *, int, mode_t) = dlsym(RTLD_NEXT, "open");
|
||||
mode_t mode = 0;
|
||||
if (flags & O_CREAT) {
|
||||
va_list ap;
|
||||
va_start(ap, flags);
|
||||
mode = va_arg(ap, mode_t);
|
||||
va_end(ap);
|
||||
}
|
||||
return _open(rewrite(path, buf), flags, mode);
|
||||
}
|
||||
|
||||
int open64(const char *path, int flags, ...)
|
||||
{
|
||||
char buf[PATH_MAX];
|
||||
int (*_open64) (const char *, int, mode_t) = dlsym(RTLD_NEXT, "open64");
|
||||
mode_t mode = 0;
|
||||
if (flags & O_CREAT) {
|
||||
va_list ap;
|
||||
va_start(ap, flags);
|
||||
mode = va_arg(ap, mode_t);
|
||||
va_end(ap);
|
||||
}
|
||||
return _open64(rewrite(path, buf), flags, mode);
|
||||
}
|
||||
|
||||
int __xstat64(int ver, const char *path, struct stat64 *st)
|
||||
{
|
||||
char buf[PATH_MAX];
|
||||
int (*___xstat64) (int ver, const char *, struct stat64 *) = dlsym(RTLD_NEXT, "__xstat64");
|
||||
return ___xstat64(ver, rewrite(path, buf), st);
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
{stdenv, fetchurl, libogg, libvorbis, libao, pkgconfig, curl, glibc
|
||||
, speex, flac}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "vorbis-tools-1.1.1";
|
||||
src = fetchurl {
|
||||
url = http://downloads.xiph.org/releases/vorbis/vorbis-tools-1.1.1.tar.gz;
|
||||
sha256 = "617b4aa69e600c215b34fa3fd5764bc1d9d205d9d7d9fe7812bde7ec956fcaad";
|
||||
};
|
||||
|
||||
# FIXME: Vorbis-tools expects `libOggFLAC', but this library was
|
||||
# merged with `libFLAC' as of FLAC 1.1.3.
|
||||
buildInputs = [ libogg libvorbis libao pkgconfig curl speex glibc flac ];
|
||||
|
||||
patches = [ ./ogg123-curlopt-mute.patch ];
|
||||
|
||||
meta = {
|
||||
longDescription = ''
|
||||
A set of command-line tools to manipulate Ogg Vorbis audio
|
||||
files, notably the `ogg123' player and the `oggenc' encoder.
|
||||
'';
|
||||
homepage = http://xiph.org/vorbis/;
|
||||
license = "GPLv2";
|
||||
};
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
--- vorbis-tools-1.1.1/ogg123/http_transport.c 2005-06-13 15:11:44.000000000 +0200
|
||||
+++ vorbis-tools-1.1.1/ogg123/http_transport.c 2008-02-12 18:38:41.000000000 +0100
|
||||
@@ -116,7 +116,9 @@ void set_curl_opts (http_private_t *priv
|
||||
if (inputOpts.ProxyTunnel)
|
||||
curl_easy_setopt (handle, CURLOPT_HTTPPROXYTUNNEL, inputOpts.ProxyTunnel);
|
||||
*/
|
||||
+#ifdef CURLOPT_MUTE
|
||||
curl_easy_setopt(handle, CURLOPT_MUTE, 1);
|
||||
+#endif
|
||||
curl_easy_setopt(handle, CURLOPT_ERRORBUFFER, private->error);
|
||||
curl_easy_setopt(handle, CURLOPT_PROGRESSFUNCTION, progress_callback);
|
||||
curl_easy_setopt(handle, CURLOPT_PROGRESSDATA, private);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,21 +0,0 @@
|
||||
{stdenv, fetchurl, alsaLib, esound, libogg, libvorbis, glib, gtk}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "xmms-1.2.10";
|
||||
|
||||
src = fetchurl {
|
||||
url = http://nixos.org/tarballs/xmms-1.2.10.tar.bz2;
|
||||
md5 = "03a85cfc5e1877a2e1f7be4fa1d3f63c";
|
||||
};
|
||||
|
||||
# Patch borrowed from SuSE 10.0 to fix pause/continue on ALSA.
|
||||
patches = [./alsa.patch];
|
||||
|
||||
buildInputs = [alsaLib esound libogg libvorbis glib gtk];
|
||||
|
||||
meta = {
|
||||
description = "A music player very similar to Winamp";
|
||||
homepage = http://www.xmms.org;
|
||||
platforms = stdenv.lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
{stdenv, fetchurl, x11, libjpeg, libpng, libXmu, freetype, pam}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "slim-1.3.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://download.berlios.de/slim/${name}.tar.gz";
|
||||
sha256 = "1f42skdp5k1zrb364s3i0ps5wmx9szz9h192i2dkn9az00jh2mpi";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Allow the paths of the configuration file and theme directory to
|
||||
# be set at runtime.
|
||||
./runtime-paths.patch
|
||||
|
||||
# Fix a bug in slim's PAM support: the "resp" argument to the
|
||||
# conversation function is a pointer to a pointer to an array of
|
||||
# pam_response structures, not a pointer to an array of pointers to
|
||||
# pam_response structures. Of course C can't tell the difference...
|
||||
./pam.patch
|
||||
|
||||
# Don't set PAM_RHOST to "localhost", it confuses ConsoleKit
|
||||
# (which assumes that a non-empty string means a remote session).
|
||||
./pam2.patch
|
||||
];
|
||||
|
||||
buildInputs = [x11 libjpeg libpng libXmu freetype pam];
|
||||
|
||||
NIX_CFLAGS_COMPILE = "-I${freetype}/include/freetype2";
|
||||
|
||||
preBuild = ''
|
||||
substituteInPlace Makefile --replace /usr /no-such-path
|
||||
makeFlagsArray=(CC=gcc CXX=g++ PREFIX=$out MANDIR=$out/share/man CFGDIR=$out/etc USE_PAM=1)
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = http://slim.berlios.de;
|
||||
};
|
||||
}
|
||||
@@ -1,89 +0,0 @@
|
||||
diff -rc slim-1.3.1-orig/app.cpp slim-1.3.1/app.cpp
|
||||
*** slim-1.3.1-orig/app.cpp 2008-09-26 02:54:15.000000000 +0200
|
||||
--- slim-1.3.1/app.cpp 2009-02-17 19:50:06.000000000 +0100
|
||||
***************
|
||||
*** 41,48 ****
|
||||
Panel* panel = *static_cast<Panel**>(appdata_ptr);
|
||||
int result = PAM_SUCCESS;
|
||||
for (int i=0; i<num_msg; i++){
|
||||
! resp[i]->resp=0;
|
||||
! resp[i]->resp_retcode=0;
|
||||
switch(msg[i]->msg_style){
|
||||
case PAM_PROMPT_ECHO_ON:
|
||||
// We assume PAM is asking for the username
|
||||
--- 41,48 ----
|
||||
Panel* panel = *static_cast<Panel**>(appdata_ptr);
|
||||
int result = PAM_SUCCESS;
|
||||
for (int i=0; i<num_msg; i++){
|
||||
! (*resp)[i].resp=0;
|
||||
! (*resp)[i].resp_retcode=0;
|
||||
switch(msg[i]->msg_style){
|
||||
case PAM_PROMPT_ECHO_ON:
|
||||
// We assume PAM is asking for the username
|
||||
***************
|
||||
*** 51,63 ****
|
||||
case Panel::Suspend:
|
||||
case Panel::Halt:
|
||||
case Panel::Reboot:
|
||||
! resp[i]->resp=strdup("root");
|
||||
break;
|
||||
|
||||
case Panel::Console:
|
||||
case Panel::Exit:
|
||||
case Panel::Login:
|
||||
! resp[i]->resp=strdup(panel->GetName().c_str());
|
||||
break;
|
||||
}
|
||||
break;
|
||||
--- 51,63 ----
|
||||
case Panel::Suspend:
|
||||
case Panel::Halt:
|
||||
case Panel::Reboot:
|
||||
! (*resp)[i].resp=strdup("root");
|
||||
break;
|
||||
|
||||
case Panel::Console:
|
||||
case Panel::Exit:
|
||||
case Panel::Login:
|
||||
! (*resp)[i].resp=strdup(panel->GetName().c_str());
|
||||
break;
|
||||
}
|
||||
break;
|
||||
***************
|
||||
*** 73,79 ****
|
||||
|
||||
default:
|
||||
panel->EventHandler(Panel::Get_Passwd);
|
||||
! resp[i]->resp=strdup(panel->GetPasswd().c_str());
|
||||
break;
|
||||
}
|
||||
break;
|
||||
--- 73,79 ----
|
||||
|
||||
default:
|
||||
panel->EventHandler(Panel::Get_Passwd);
|
||||
! (*resp)[i].resp=strdup(panel->GetPasswd().c_str());
|
||||
break;
|
||||
}
|
||||
break;
|
||||
***************
|
||||
*** 89,97 ****
|
||||
}
|
||||
if (result!=PAM_SUCCESS){
|
||||
for (int i=0; i<num_msg; i++){
|
||||
! if (resp[i]->resp==0) continue;
|
||||
! free(resp[i]->resp);
|
||||
! resp[i]->resp=0;
|
||||
};
|
||||
free(*resp);
|
||||
*resp=0;
|
||||
--- 89,97 ----
|
||||
}
|
||||
if (result!=PAM_SUCCESS){
|
||||
for (int i=0; i<num_msg; i++){
|
||||
! if ((*resp)[i].resp==0) continue;
|
||||
! free((*resp)[i].resp);
|
||||
! (*resp)[i].resp=0;
|
||||
};
|
||||
free(*resp);
|
||||
*resp=0;
|
||||
@@ -1,20 +0,0 @@
|
||||
diff -rc slim-1.3.1-orig/app.cpp slim-1.3.1/app.cpp
|
||||
*** slim-1.3.1-orig/app.cpp 2008-09-26 02:54:15.000000000 +0200
|
||||
--- slim-1.3.1/app.cpp 2009-08-17 02:59:37.000000000 +0200
|
||||
***************
|
||||
*** 226,232 ****
|
||||
pam.start("slim");
|
||||
pam.set_item(PAM::Authenticator::TTY, DisplayName);
|
||||
pam.set_item(PAM::Authenticator::Requestor, "root");
|
||||
! pam.set_item(PAM::Authenticator::Host, "localhost");
|
||||
|
||||
}
|
||||
catch(PAM::Exception& e){
|
||||
--- 226,232 ----
|
||||
pam.start("slim");
|
||||
pam.set_item(PAM::Authenticator::TTY, DisplayName);
|
||||
pam.set_item(PAM::Authenticator::Requestor, "root");
|
||||
! pam.set_item(PAM::Authenticator::Host, "");
|
||||
|
||||
}
|
||||
catch(PAM::Exception& e){
|
||||
@@ -1,41 +0,0 @@
|
||||
diff -rc slim-1.2.6-orig/app.cpp slim-1.2.6/app.cpp
|
||||
*** slim-1.2.6-orig/app.cpp Fri Sep 15 23:00:37 2006
|
||||
--- slim-1.2.6/app.cpp Sun Feb 25 17:30:50 2007
|
||||
***************
|
||||
*** 113,119 ****
|
||||
|
||||
// Read configuration and theme
|
||||
cfg = new Cfg;
|
||||
! cfg->readConf(CFGFILE);
|
||||
string themebase = "";
|
||||
string themefile = "";
|
||||
string themedir = "";
|
||||
--- 113,121 ----
|
||||
|
||||
// Read configuration and theme
|
||||
cfg = new Cfg;
|
||||
! char *cfgfile = getenv("SLIM_CFGFILE");
|
||||
! if (!cfgfile) cfgfile = CFGFILE;
|
||||
! cfg->readConf(cfgfile);
|
||||
string themebase = "";
|
||||
string themefile = "";
|
||||
string themedir = "";
|
||||
***************
|
||||
*** 121,127 ****
|
||||
if (testing) {
|
||||
themeName = testtheme;
|
||||
} else {
|
||||
! themebase = string(THEMESDIR) + "/";
|
||||
themeName = cfg->getOption("current_theme");
|
||||
string::size_type pos;
|
||||
if ((pos = themeName.find(",")) != string::npos) {
|
||||
--- 123,131 ----
|
||||
if (testing) {
|
||||
themeName = testtheme;
|
||||
} else {
|
||||
! char *themesdir = getenv("SLIM_THEMESDIR");
|
||||
! if (!themesdir) themesdir = THEMESDIR;
|
||||
! themebase = string(themesdir) + "/";
|
||||
themeName = cfg->getOption("current_theme");
|
||||
string::size_type pos;
|
||||
if ((pos = themeName.find(",")) != string::npos) {
|
||||
@@ -1,18 +0,0 @@
|
||||
{ stdenv, fetchurl, ncurses }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "bvi-1.3.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = http://prdownloads.sourceforge.net/bvi/bvi-1.3.2.src.tar.gz;
|
||||
sha256 = "110wxqnyianqamxq4y53drqqxb9vp4k2fcvic45qggvlqkqhlfgz";
|
||||
};
|
||||
|
||||
buildInputs = [ ncurses ];
|
||||
|
||||
meta = {
|
||||
description = "Hex editor with vim style keybindings";
|
||||
homepage = http://bvi.sourceforge.net/download.html;
|
||||
license = "GPL2";
|
||||
};
|
||||
}
|
||||
7
pkgs/applications/editors/eclipse/builder.sh
Executable file
7
pkgs/applications/editors/eclipse/builder.sh
Executable file
@@ -0,0 +1,7 @@
|
||||
set -e
|
||||
|
||||
. $stdenv/setup
|
||||
|
||||
$unzip/bin/unzip $src
|
||||
mkdir $out
|
||||
mv eclipse $out/
|
||||
@@ -1,153 +1,17 @@
|
||||
{ stdenv, fetchurl, patchelf, makeDesktopItem, makeWrapper
|
||||
, freetype, fontconfig, libX11, libXext, libXrender, zlib
|
||||
, glib, gtk, libXtst, jre
|
||||
# defaulting to this version because not all installable plugins work with 3.5.2 yet
|
||||
# can also be set to "latest"
|
||||
, version ? "3.5.1"
|
||||
}:
|
||||
{fetchurl, stdenv, unzip}:
|
||||
|
||||
/*
|
||||
Note: Eclipse stores various Eclipse instance specific data in ~/.eclipse/*-instance/...
|
||||
The '*' depends on the executable location of Eclipse.
|
||||
let {
|
||||
body =
|
||||
stdenv.mkDerivation {
|
||||
name = "eclipse-sdk-3.0.1";
|
||||
builder = ./builder.sh;
|
||||
src = bindist;
|
||||
inherit unzip;
|
||||
};
|
||||
|
||||
So if an Eclipse dependency such as gtk changes a different Eclipse setup directory will be used and
|
||||
the plugins and update site list and more global settings seem to be gone.
|
||||
|
||||
Staring Eclipse from ~/.nix-profile/bin/eclipse doesn't help.
|
||||
|
||||
So I suggest copying the store path to ~/eclipse and run ~/eclipse/bin/eclipse instead.
|
||||
|
||||
However this still has some drawbacks: If you run nix-collect-garbage the gtk
|
||||
libs the wrapper refers to might be gone. It should be easy for you to
|
||||
replace the imortant lines in the wrapper.
|
||||
|
||||
You can also put this eclipse wrapper script (which was removed from
|
||||
all-packages.nix -r 18458)
|
||||
to your packageOverrides section and use that to run eclipse/eclipse.
|
||||
|
||||
Its parameterized by system because you may want to run both: i686 and x86_64 systems.
|
||||
|
||||
eclipseRunner =
|
||||
pkgs.stdenv.mkDerivation {
|
||||
name = "nix-eclipse-runner-script-${stdenv.system}";
|
||||
|
||||
phases = "installPhase";
|
||||
installPhase = ''
|
||||
ensureDir $out/bin
|
||||
target=$out/bin/nix-run-eclipse-${stdenv.system}
|
||||
cat > $target << EOF
|
||||
#!/bin/sh
|
||||
export PATH=${pkgs.jre}/bin:\$PATH
|
||||
export LD_LIBRARY_PATH=${pkgs.gtkLibs216.glib}/lib:${pkgs.gtkLibs216.gtk}/lib:${pkgs.xlibs.libXtst}/lib
|
||||
# If you run out of XX space try these? -vmargs -Xms512m -Xmx2048m -XX:MaxPermSize=256m
|
||||
eclipse="\$1"; shift
|
||||
exec \$eclipse -vmargs -Xms512m -Xmx2048m -XX:MaxPermSize=256m "\$@"
|
||||
EOF
|
||||
chmod +x $target
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "provide environment to run Eclipse";
|
||||
longDescription = ''
|
||||
Is there one distribution providing support for up to date Eclipse installations?
|
||||
There are various reasons why not.
|
||||
Installing binaries just works. Get Eclipse binaries form eclipse.org/downloads
|
||||
install this wrapper then run Eclipse like this:
|
||||
nix-run-eclipse $PATH_TO_ECLIPSE/eclipse/eclipse
|
||||
and be happy. Everything works including update sites.
|
||||
'';
|
||||
maintainers = [pkgs.lib.maintainers.marcweber];
|
||||
platforms = pkgs.lib.platforms.linux;
|
||||
};
|
||||
bindist =
|
||||
fetchurl {
|
||||
url = http://catamaran.labs.cs.uu.nl/dist/tarballs/eclipse-SDK-3.0.1-linux-gtk.zip;
|
||||
md5 = "d0f743c972adf13e71a43b2dc6c9c55b";
|
||||
};
|
||||
|
||||
*/
|
||||
|
||||
|
||||
let
|
||||
|
||||
v = if version == "latest" then "3.5.2" else version;
|
||||
|
||||
in
|
||||
|
||||
assert stdenv ? glibc;
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "eclipse-${v}";
|
||||
|
||||
src =
|
||||
if v == "3.5.2" then
|
||||
if stdenv.system == "x86_64-linux" then
|
||||
fetchurl {
|
||||
url = http://ftp-stud.fht-esslingen.de/pub/Mirrors/eclipse/eclipse/downloads/drops/R-3.5.2-201002111343/eclipse-SDK-3.5.2-linux-gtk-x86_64.tar.gz;
|
||||
md5 = "54e2ce0660b2b1b0eb4267acf70ea66d";
|
||||
}
|
||||
else
|
||||
fetchurl {
|
||||
url = http://mirror.selfnet.de/eclipse/eclipse/downloads/drops/R-3.5.2-201002111343/eclipse-SDK-3.5.2-linux-gtk.tar.gz;
|
||||
md5 = "bde55a2354dc224cf5f26e5320e72dac";
|
||||
}
|
||||
else if v == "3.5.1" then
|
||||
if stdenv.system == "x86_64-linux" then
|
||||
fetchurl {
|
||||
url = http://ftp.ing.umu.se/mirror/eclipse/eclipse/downloads/drops/R-3.5.1-200909170800/eclipse-SDK-3.5.1-linux-gtk-x86_64.tar.gz;
|
||||
sha256 = "132zd7q9q29h978wnlsfbrlszc85r1wj30yqs2aqbv3l5xgny1kk";
|
||||
}
|
||||
else
|
||||
fetchurl {
|
||||
url = http://mirrors.linux-bg.org/eclipse/eclipse/downloads/drops/R-3.5.1-200909170800/eclipse-SDK-3.5.1-linux-gtk.tar.gz;
|
||||
sha256 = "0a0lpa7gxg91zswpahi6fvg3csl4csvlym4z2ad5cc1d4yvicp56";
|
||||
}
|
||||
else if v == "3.6.1" then
|
||||
if stdenv.system == "x86_64-linux" then
|
||||
fetchurl {
|
||||
url = http://ftp.ing.umu.se/mirror/eclipse/eclipse/downloads/drops/R-3.6.1-201009090800/eclipse-SDK-3.6.1-linux-gtk-x86_64.tar.gz;
|
||||
sha256 = "1cg9rrb5w978sdqbzz9lnli1lds9zhb6wfsj3wp725bqf1i6v9lg";
|
||||
}
|
||||
else
|
||||
fetchurl {
|
||||
url = http://ftp.ing.umu.se/mirror/eclipse/eclipse/downloads/drops/R-3.6.1-201009090800/eclipse-SDK-3.6.1-linux-gtk.tar.gz;
|
||||
sha256 = "0s48rjaswi8m5gan1zlqvfwb4l06x5nslkq41wpkrbyj9ka8gh4x";
|
||||
}
|
||||
else throw "no source for eclipse version ${v} known";
|
||||
|
||||
desktopItem = makeDesktopItem {
|
||||
name = "Eclipse";
|
||||
exec = "eclipse";
|
||||
icon = "eclipse";
|
||||
comment = "Integrated Development Environment";
|
||||
desktopName = "Eclipse IDE";
|
||||
genericName = "Integrated Development Environment";
|
||||
categories = "Application;Development;";
|
||||
};
|
||||
|
||||
buildInputs = [ makeWrapper patchelf ];
|
||||
|
||||
buildCommand = ''
|
||||
# Unpack tarball
|
||||
ensureDir $out
|
||||
tar xfvz $src -C $out
|
||||
|
||||
# Patch binaries
|
||||
interpreter=$(echo ${stdenv.glibc}/lib/ld-linux*.so.2)
|
||||
patchelf --set-interpreter $interpreter $out/eclipse/eclipse
|
||||
patchelf --set-rpath ${freetype}/lib:${fontconfig}/lib:${libX11}/lib:${libXrender}/lib:${zlib}/lib $out/eclipse/libcairo-swt.so
|
||||
|
||||
# Create wrapper script
|
||||
makeWrapper $out/eclipse/eclipse $out/bin/eclipse \
|
||||
--prefix PATH : ${jre}/bin \
|
||||
--prefix LD_LIBRARY_PATH : ${glib}/lib:${gtk}/lib:${libXtst}/lib
|
||||
|
||||
# Create desktop item
|
||||
ensureDir $out/share/applications
|
||||
cp ${desktopItem}/share/applications/* $out/share/applications
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = http://www.eclipse.org/;
|
||||
description = "A extensible multi-language software development environment";
|
||||
longDescription = ''
|
||||
'';
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
{ fetchurl, stdenv }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "ed-1.4";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnu/ed/${name}.tar.gz";
|
||||
sha256 = "1njgcghms1377csldi1yqjhcpghiii6bshdhnjpqp78sxs2xldnv";
|
||||
};
|
||||
|
||||
doCheck = true;
|
||||
|
||||
crossAttrs = {
|
||||
compileFlags = [ "CC=${stdenv.cross.config}-gcc" ];
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "GNU ed, an implementation of the standard Unix editor";
|
||||
|
||||
longDescription = ''
|
||||
GNU ed is a line-oriented text editor. It is used to create,
|
||||
display, modify and otherwise manipulate text files, both
|
||||
interactively and via shell scripts. A restricted version of ed,
|
||||
red, can only edit files in the current directory and cannot
|
||||
execute shell commands. Ed is the "standard" text editor in the
|
||||
sense that it is the original editor for Unix, and thus widely
|
||||
available. For most purposes, however, it is superseded by
|
||||
full-screen editors such as GNU Emacs or GNU Moe.
|
||||
'';
|
||||
|
||||
license = "GPLv3+";
|
||||
|
||||
homepage = http://www.gnu.org/software/ed/;
|
||||
|
||||
maintainers = [ stdenv.lib.maintainers.ludo ];
|
||||
};
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
{ fetchurl, stdenv, ncurses }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "elvis-2.2_0";
|
||||
|
||||
src = fetchurl {
|
||||
url = ftp://ftp.cs.pdx.edu/pub/elvis/elvis-2.2_0.tar.gz;
|
||||
sha256 = "182fj9qzyq6cjq1r849gpam6nq9smwv9f9xwaq84961p56r6d14s";
|
||||
};
|
||||
|
||||
buildInputs = [ ncurses ];
|
||||
|
||||
patchPhase = ''
|
||||
sed -i s/-lcurses/-lncurses/ configure
|
||||
'';
|
||||
|
||||
preConfigure = ''
|
||||
ensureDir $out/share/man/man1
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
ensureDir $out/bin $out/share/elvis $out/share/elvis/doc
|
||||
cp elvis ref elvtags elvfmt $out/bin
|
||||
cp -R data/* $out/share/elvis
|
||||
cp doc/* $out/share/elvis/doc
|
||||
|
||||
ensureDir $out/share/man/man1
|
||||
for a in doc/*.man; do
|
||||
cp $a $out/share/man/man1/`basename $a .man`.1
|
||||
done
|
||||
'';
|
||||
|
||||
configureFlags = "--ioctl=termios";
|
||||
|
||||
meta = {
|
||||
homepage = http://elvis.vi-editor.org/;
|
||||
description = "A vi clone for Unix and other operating systems";
|
||||
license = "free";
|
||||
};
|
||||
}
|
||||
@@ -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.all;
|
||||
};
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
source $stdenv/setup
|
||||
|
||||
# This hook is supposed to be run on Linux. It patches the proper locations of
|
||||
# the crt{1,i,n}.o files into the build to ensure that Emacs is linked with
|
||||
# *our* versions, not the ones found in the system, as it would do by default.
|
||||
# On other platforms, this appears to be unnecessary.
|
||||
preConfigure() {
|
||||
case "${system}" in
|
||||
x86_64-linux) glibclibdir=lib64 ;;
|
||||
i686-linux) glibclibdir=lib ;;
|
||||
*) return;
|
||||
esac
|
||||
|
||||
libc=$(cat ${NIX_GCC}/nix-support/orig-libc)
|
||||
echo "libc: $libc"
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
preBuild="make bootstrap"
|
||||
|
||||
genericBuild
|
||||
@@ -1,62 +0,0 @@
|
||||
{ stdenv, fetchurl, ncurses, x11, libXaw, libXpm, Xaw3d
|
||||
, pkgconfig, gtk, libXft, dbus, libpng, libjpeg, libungif
|
||||
, libtiff, librsvg, texinfo, gconf
|
||||
}:
|
||||
|
||||
assert (gtk != null) -> (pkgconfig != null);
|
||||
assert (libXft != null) -> libpng != null; # probably a bug
|
||||
assert stdenv.isDarwin -> libXaw != null; # fails to link otherwise
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "emacs-23.3";
|
||||
|
||||
builder = ./builder.sh;
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnu/emacs/${name}.tar.bz2";
|
||||
sha256 = "0kfa546qi0idkwk29gclgi13qd8q54pcqgy9qwjknlclszprdp3a";
|
||||
};
|
||||
|
||||
buildInputs =
|
||||
[ ncurses x11 texinfo libXaw Xaw3d libXpm libpng libjpeg libungif
|
||||
libtiff librsvg libXft gconf
|
||||
]
|
||||
++ stdenv.lib.optionals (gtk != null) [ gtk pkgconfig ]
|
||||
++ stdenv.lib.optional stdenv.isLinux dbus;
|
||||
|
||||
configureFlags =
|
||||
stdenv.lib.optionals (gtk != null) [ "--with-x-toolkit=gtk" "--with-xft"]
|
||||
|
||||
# On NixOS, help Emacs find `crt*.o'.
|
||||
++ stdenv.lib.optional (stdenv ? glibc)
|
||||
[ "--with-crt-dir=${stdenv.glibc}/lib" ];
|
||||
|
||||
doCheck = true;
|
||||
|
||||
meta = {
|
||||
description = "GNU Emacs 23.x, the extensible, customizable 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.
|
||||
|
||||
The features of GNU Emacs include: content-sensitive editing modes,
|
||||
including syntax coloring, for a wide variety of file types including
|
||||
plain text, source code, and HTML; complete built-in documentation,
|
||||
including a tutorial for new users; full Unicode support for nearly all
|
||||
human languages and their scripts; highly customizable, using Emacs
|
||||
Lisp code or a graphical interface; a large number of extensions that
|
||||
add other functionality, including a project planner, mail and news
|
||||
reader, debugger interface, calendar, and more. Many of these
|
||||
extensions are distributed with GNU Emacs; others are available
|
||||
separately.
|
||||
'';
|
||||
|
||||
homepage = http://www.gnu.org/software/emacs/;
|
||||
license = "GPLv3+";
|
||||
|
||||
maintainers = [ stdenv.lib.maintainers.ludo stdenv.lib.maintainers.simons ];
|
||||
platforms = stdenv.lib.platforms.all;
|
||||
};
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
source "$stdenv/setup" || exit 1
|
||||
|
||||
unpackPhase && \
|
||||
cd bbdb-*.* && patchPhase && \
|
||||
./configure --prefix="$out" \
|
||||
--with-package-dir="$out/share/emacs/site-lisp" && \
|
||||
make && make install-pkg && \
|
||||
mkdir -p "$out/info" && \
|
||||
make -C texinfo install-pkg && \
|
||||
mv "$out/share/emacs/site-lisp/lisp/bbdb/"* \
|
||||
"$out/share/emacs/site-lisp" && \
|
||||
rm -rf "$out/share/emacs/site-lisp/lisp"
|
||||
@@ -1,21 +0,0 @@
|
||||
{stdenv, fetchurl, emacs, texinfo, ctags}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "bbdb-2.35";
|
||||
|
||||
src = fetchurl {
|
||||
url = http://bbdb.sourceforge.net/bbdb-2.35.tar.gz;
|
||||
sha256 = "3fb1316e2ed74d47ca61187fada550e58797467bd9e8ad67343ed16da769f916";
|
||||
};
|
||||
|
||||
patches = [ ./install-infodir.patch ];
|
||||
|
||||
buildInputs = [emacs texinfo ctags];
|
||||
builder = ./builder.sh;
|
||||
|
||||
meta = {
|
||||
description = "The Insidious Big Brother Database (BBDB), a contact management utility for Emacs";
|
||||
homepage = http://bbdb.sourceforge.net/;
|
||||
license = "GPL";
|
||||
};
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
--- bbdb-2.35/texinfo/Makefile.in 2001-11-20 09:00:12.000000000 +0100
|
||||
+++ bbdb-2.35/texinfo/Makefile.in 2008-02-20 12:07:36.000000000 +0100
|
||||
@@ -27,22 +27,22 @@ all: info bbdb.dvi
|
||||
install-pkg: uninstall-pkg info
|
||||
@if test "x$(SYMLINKS)" = "xno" ; then \
|
||||
for i in `ls bbdb.info* ` ; do \
|
||||
- $(INSTALL_DATA) $$i $(PACKAGEDIR)/info/ ; \
|
||||
+ $(INSTALL_DATA) $$i $(infodir)/ ; \
|
||||
done ; \
|
||||
else \
|
||||
if test "x$(LINKPATH)" = "x" ; then \
|
||||
for i in `ls bbdb.info* ` ; do \
|
||||
- $(LN_S) `pwd`/$$i $(PACKAGEDIR)/info/$$i ; \
|
||||
+ $(LN_S) `pwd`/$$i $(infodir)/$$i ; \
|
||||
done ; \
|
||||
else \
|
||||
for i in `ls bbdb.info* ` ; do \
|
||||
- $(LN_S) $(LINKPATH)/texinfo/$$i $(PACKAGEDIR)/info/$$i ; \
|
||||
+ $(LN_S) $(LINKPATH)/texinfo/$$i $(infodir)/$$i ; \
|
||||
done ; \
|
||||
fi ; \
|
||||
fi
|
||||
|
||||
uninstall-pkg:
|
||||
- -$(RM) $(PACKAGEDIR)/info/bbdb.info*
|
||||
+ -$(RM) $(infodir)/bbdb.info*
|
||||
|
||||
info: bbdb.info
|
||||
@@ -1,48 +0,0 @@
|
||||
{ fetchurl, stdenv, emacs }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "cedet-1.0pre6";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/cedet/${name}.tar.gz";
|
||||
sha256 = "0pvd54rjlba12cxgqibm8v4i8x43r5c239z891lgcbafjvkzpdxb";
|
||||
};
|
||||
|
||||
buildInputs = [ emacs ];
|
||||
|
||||
doCheck = true;
|
||||
checkPhase = "make utest";
|
||||
|
||||
installPhase = ''
|
||||
ensureDir "$out/share/emacs/site-lisp"
|
||||
cp -v */*.el */*/*.el */*.elc */*/*.elc "$out/share/emacs/site-lisp"
|
||||
chmod a-x "$out/share/emacs/site-lisp/"*
|
||||
|
||||
ensureDir "$out/share/info"
|
||||
cp -v */*.info* */*/*.info* "$out/share/info"
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "CEDET, a Collection of Emacs Development Environment Tools";
|
||||
|
||||
longDescription = ''
|
||||
CEDET is a collection of tools written with the end goal of
|
||||
creating an advanced development environment in Emacs.
|
||||
|
||||
Emacs already is a great environment for writing software, but
|
||||
there are additional areas that need improvement. Many new
|
||||
ideas for integrated environments have been developed in newer
|
||||
products, such as JBuilder, Eclipse, or KDevelop. CEDET is a
|
||||
project which brings together several different tools needed to
|
||||
implement advanced features.
|
||||
|
||||
CEDET includes EIEIO (Enhanced Implementation of Emacs
|
||||
Interpreted Objects), Semantic, SRecode, Speedbar, EDE (Emacs
|
||||
Development Environment), and COGRE (COnnected GRaph Editor).
|
||||
'';
|
||||
|
||||
license = "GPLv2+";
|
||||
|
||||
homepage = http://cedet.sourceforge.net/;
|
||||
};
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
source $stdenv/setup
|
||||
|
||||
mkdir -p $out/emacs/site-lisp
|
||||
cp $src $out/emacs/site-lisp/cua.el
|
||||
@@ -1,8 +0,0 @@
|
||||
{stdenv, fetchurl}: stdenv.mkDerivation {
|
||||
name = "cua-mode-2.10";
|
||||
builder = ./builder.sh;
|
||||
src = fetchurl {
|
||||
url = http://nixos.org/tarballs/cua-mode-2.10.el;
|
||||
md5 = "5bf5e43f5f38c8383868c7c6c5baca09";
|
||||
};
|
||||
}
|
||||
@@ -1,48 +0,0 @@
|
||||
{ fetchurl, stdenv, emacs, cedet, jdee, texinfo }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "ecb-2.40";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/ecb/${name}.tar.gz";
|
||||
sha256 = "0gp56ixfgnyk2j1fps4mk1yv1vpz81kivb3gq9f56jw4kdlhjrjs";
|
||||
};
|
||||
|
||||
buildInputs = [ emacs ];
|
||||
propagatedBuildInputs = [ cedet jdee ];
|
||||
propagatedUserEnvPkgs = propagatedBuildInputs;
|
||||
|
||||
patchPhase = ''
|
||||
sed -i "Makefile" \
|
||||
-e 's|CEDET[[:blank:]]*=.*$|CEDET = ${cedet}/share/emacs/site-lisp|g ;
|
||||
s|INSTALLINFO[[:blank:]]*=.*$|INSTALLINFO = ${texinfo}/bin/install-info|g ;
|
||||
s|MAKEINFO[[:blank:]]*=.*$|MAKEINFO = ${texinfo}/bin/makeinfo|g ;
|
||||
s|common/cedet.el|cedet.el|g'
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
ensureDir "$out/share/emacs/site-lisp"
|
||||
cp -rv *.el *.elc ecb-images "$out/share/emacs/site-lisp"
|
||||
|
||||
ensureDir "$out/share/info"
|
||||
cp -v info-help/*.info* "$out/share/info"
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "ECB, the Emacs Code browser";
|
||||
|
||||
longDescription = ''
|
||||
ECB stands for "Emacs Code Browser". While Emacs already has
|
||||
good editing support for many modes, its browsing support is
|
||||
somewhat lacking. That's where ECB comes in: it displays a
|
||||
number of informational windows that allow for easy source code
|
||||
navigation and overview.
|
||||
'';
|
||||
|
||||
license = "GPLv2+";
|
||||
|
||||
homepage = http://ecb.sourceforge.net/;
|
||||
|
||||
maintainers = [ stdenv.lib.maintainers.ludo ];
|
||||
};
|
||||
}
|
||||
@@ -1,61 +0,0 @@
|
||||
{ fetchcvs, stdenv, emacs, w3m, imagemagick, texinfo, autoconf }:
|
||||
|
||||
let date = "2009-07-09"; in
|
||||
stdenv.mkDerivation rec {
|
||||
name = "emacs-w3m-cvs${date}";
|
||||
|
||||
# Get the source from CVS because the previous release (1.4.4) is old and
|
||||
# doesn't work with GNU Emacs 23.
|
||||
src = fetchcvs {
|
||||
inherit date;
|
||||
cvsRoot = ":pserver:anonymous@cvs.namazu.org:/storage/cvsroot";
|
||||
module = "emacs-w3m";
|
||||
sha256 = "ad46592d4fe3cdaadc02ce6d3fb1ac237e200beecd2ad11a04c1395a38a70a0a";
|
||||
};
|
||||
|
||||
buildInputs = [ emacs w3m texinfo autoconf ];
|
||||
|
||||
# XXX: Should we do the same for xpdf/evince, gv, gs, etc.?
|
||||
patchPhase = ''
|
||||
sed -i "w3m.el" \
|
||||
-e 's|defcustom w3m-command nil|defcustom w3m-command "${w3m}/bin/w3m"|g ;
|
||||
s|(w3m-which-command "display")|"${imagemagick}/bin/display"|g'
|
||||
|
||||
sed -i "w3m-image.el" \
|
||||
-e 's|(w3m-which-command "convert")|"${imagemagick}/bin/convert"|g ;
|
||||
s|(w3m-which-command "identify")|"${imagemagick}/bin/identify"|g'
|
||||
'';
|
||||
|
||||
configurePhase = ''
|
||||
autoreconf -vfi && \
|
||||
./configure --prefix="$out" --with-lispdir="$out/share/emacs/site-lisp" \
|
||||
--with-icondir="$out/share/emacs/site-lisp/images/w3m"
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
cd "$out/share/emacs/site-lisp"
|
||||
for i in ChangeLog*
|
||||
do
|
||||
mv -v "$i" "w3m-$i"
|
||||
done
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Emacs-w3m, a simple Emacs interface to the w3m web browser";
|
||||
|
||||
longDescription = ''
|
||||
Emacs/W3 used to be known as the most popular WEB browser on Emacs, but
|
||||
it worked so slowly that we wanted a simple and speedy alternative.
|
||||
|
||||
w3m is a pager with WWW capability, developed by Akinori ITO. Although
|
||||
it is a pager, it can be used as a text-mode WWW browser. Then we
|
||||
developed a simple Emacs interface to w3m.
|
||||
'';
|
||||
|
||||
license = "GPLv2+";
|
||||
|
||||
homepage = http://emacs-w3m.namazu.org/;
|
||||
|
||||
maintainers = [ stdenv.lib.maintainers.ludo ];
|
||||
};
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user