mirror of
https://github.com/CHN-beta/nixpkgs.git
synced 2026-01-12 19:00:19 +08:00
Compare commits
1 Commits
backups/mo
...
backups/0.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9e3f729c35 |
@@ -1,6 +1,5 @@
|
||||
# You may need to override this.
|
||||
docbookxsl = $(HOME)/.nix-profile/xml/xsl/docbook
|
||||
dblatex = dblatex
|
||||
|
||||
XMLLINT = xmllint --catalogs
|
||||
XSLTPROC = xsltproc --catalogs \
|
||||
@@ -17,7 +16,7 @@ NEWS_OPTS = \
|
||||
--stringparam section.autolabel.max.depth 0 \
|
||||
--stringparam header.rule 0
|
||||
|
||||
all: NEWS.html NEWS.txt manual.html manual.pdf
|
||||
all: NEWS.html NEWS.txt manual.html
|
||||
|
||||
NEWS.html: release-notes.xml
|
||||
$(XSLTPROC) --nonet --xinclude --output $@ $(NEWS_OPTS) \
|
||||
@@ -35,7 +34,4 @@ manual.html: *.xml
|
||||
$(docbookxsl)/html/docbook.xsl manual.xml
|
||||
|
||||
manual.pdf: *.xml
|
||||
$(dblatex) \
|
||||
-P doc.collab.show=0 \
|
||||
-P latex.output.revhistory=0 \
|
||||
manual.xml
|
||||
dblatex 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,6 +1,6 @@
|
||||
<chapter xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xml:id="chap-language-support">
|
||||
xml:id="chap-meta">
|
||||
|
||||
<title>Support for specific programming languages</title>
|
||||
|
||||
@@ -13,7 +13,7 @@ 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>
|
||||
<section><title>Perl</title>
|
||||
|
||||
<para>Nixpkgs provides a function <varname>buildPerlPackage</varname>,
|
||||
a generic package builder function for any Perl package that has a
|
||||
@@ -156,42 +156,7 @@ ClassC3Componentised = buildPerlPackage rec {
|
||||
|
||||
<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>
|
||||
<para>TODO</para>
|
||||
|
||||
</section>
|
||||
|
||||
@@ -217,4 +182,4 @@ twisted = buildPythonPackage {
|
||||
</section>
|
||||
|
||||
|
||||
</chapter>
|
||||
</chapter>
|
||||
@@ -21,10 +21,11 @@
|
||||
|
||||
<copyright>
|
||||
<year>2008</year>
|
||||
<year>2009</year>
|
||||
<holder>Eelco Dolstra</holder>
|
||||
</copyright>
|
||||
|
||||
<date>June 2008</date>
|
||||
|
||||
</info>
|
||||
|
||||
<xi:include href="introduction.xml" />
|
||||
@@ -33,7 +34,6 @@
|
||||
<xi:include href="meta.xml" />
|
||||
<xi:include href="language-support.xml" />
|
||||
<xi:include href="package-notes.xml" />
|
||||
<xi:include href="coding-conventions.xml" />
|
||||
|
||||
|
||||
</book>
|
||||
|
||||
32
doc/meta.xml
32
doc/meta.xml
@@ -96,18 +96,6 @@ interpretation:</para>
|
||||
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,
|
||||
@@ -124,7 +112,7 @@ interpretation:</para>
|
||||
</section>
|
||||
|
||||
|
||||
<section xml:id="sec-meta-license"><title>Licenses</title>
|
||||
<section><title>Licenses</title>
|
||||
|
||||
<note><para>This is just a first attempt at standardising the license
|
||||
attribute.</para></note>
|
||||
@@ -164,18 +152,6 @@ following:
|
||||
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
|
||||
@@ -188,12 +164,6 @@ following:
|
||||
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
|
||||
|
||||
@@ -11,7 +11,7 @@ Linux kernel or X.org.</para>
|
||||
|
||||
<!--============================================================-->
|
||||
|
||||
<section xml:id="sec-linux-kernel">
|
||||
<section>
|
||||
|
||||
<title>Linux kernel</title>
|
||||
|
||||
@@ -170,18 +170,15 @@ splashutils_15 = ...;</programlisting>
|
||||
|
||||
<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>
|
||||
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 or the generator script.</para>
|
||||
|
||||
<para>The generator is invoked as follows:
|
||||
|
||||
<screen>
|
||||
$ cd pkgs/servers/x11/xorg
|
||||
$ cat tarballs-7.5.list extra.list old.list \
|
||||
$ cat tarballs-7.4.list extra.list old.list \
|
||||
| perl ./generate-expr-from-tarballs.pl
|
||||
</screen>
|
||||
|
||||
@@ -195,7 +192,7 @@ tarballs between runs. Pay close attention to the <literal>NOT FOUND:
|
||||
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
|
||||
<para>A file like <filename>tarballs-7.4.list</filename> contains all
|
||||
tarballs in a X.org release. It can be generated like this:
|
||||
|
||||
<screen>
|
||||
@@ -215,8 +212,8 @@ some people or by other packages (such as
|
||||
<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>
|
||||
you should modify the generator script
|
||||
(<varname>generate-expr-from-tarballs.pl</varname>).</para>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<chapter xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xml:id="chap-quick-start">
|
||||
xml:id="chap-overvie">
|
||||
|
||||
<title>Quick Start to Adding a Package</title>
|
||||
|
||||
@@ -25,8 +25,8 @@ $ cd nixpkgs</screen>
|
||||
<filename>pkgs/development/libraries/<replaceable>pkgname</replaceable></filename>,
|
||||
while a web browser goes into
|
||||
<filename>pkgs/applications/networking/browsers/<replaceable>pkgname</replaceable></filename>.
|
||||
See <xref linkend="sec-organisation" /> for some hints on the tree
|
||||
organisation. Create a directory for your package, e.g.
|
||||
See Section XXX for some hints on the tree organisation. Create a
|
||||
directory for your package, e.g.
|
||||
|
||||
<screen>
|
||||
$ svn mkdir pkgs/development/libraries/libfoo</screen>
|
||||
@@ -104,8 +104,8 @@ $ svn add pkgs/development/libraries/libfoo/default.nix</screen>
|
||||
</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>.
|
||||
<para>Firefox: <link
|
||||
xlink:href="https://svn.nixos.org/repos/nix/nixpkgs/trunk/pkgs/applications/networking/browsers/firefox-3/default.nix"><filename>pkgs/applications/networking/browsers/firefox-3/default.nix</filename></link>.
|
||||
Lots of dependencies.</para>
|
||||
</listitem>
|
||||
|
||||
@@ -120,19 +120,20 @@ $ svn add pkgs/development/libraries/libfoo/default.nix</screen>
|
||||
|
||||
<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>
|
||||
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>
|
||||
(search for the <varname>perlXMLSimple</varname>
|
||||
attribute). Most Perl modules are so simple to build that
|
||||
they are defined directly in
|
||||
<filename>all-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>.
|
||||
xlink:href="https://svn.nixos.org/repos/nix/nixpkgs/trunk/pkgs/applications/misc/acrobat-reader/default.nix"><filename>pkgs/applications/misc/acrobat-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>
|
||||
xlink:href="https://svn.nixos.org/repos/nix/nixpkgs/trunk/pkgs/applications/misc/acrobat-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>
|
||||
@@ -147,11 +148,10 @@ $ svn add pkgs/development/libraries/libfoo/default.nix</screen>
|
||||
<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>
|
||||
<para>All <varname>meta</varname> attributes are optional,
|
||||
but it’s still a good idea to provide at least the
|
||||
<varname>description</varname> and
|
||||
<varname>homepage</varname>.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
@@ -230,11 +230,11 @@ $ nix-env -f . -iA libfoo</screen>
|
||||
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>
|
||||
xlink:href="https://svn.nixos.org/repos/nix/nixpkgs/trunk/pkgs/top-level/build-for-release.nix"><filename>pkgs/top-level/build-for-release.nix</filename></link>.</para>
|
||||
</listitem>
|
||||
|
||||
</orderedlist>
|
||||
|
||||
</para>
|
||||
|
||||
</chapter>
|
||||
</chapter>
|
||||
@@ -5,31 +5,6 @@
|
||||
<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
|
||||
|
||||
@@ -470,7 +470,7 @@ Additional file types can be supported by setting the
|
||||
<section><title>The configure phase</title>
|
||||
|
||||
<para>The configure phase prepares the source tree for building. The
|
||||
default <function>configurePhase</function> runs
|
||||
default <function>unpackPhase</function> runs
|
||||
<filename>./configure</filename> (typically an Autoconf-generated
|
||||
script) if it exists.</para>
|
||||
|
||||
@@ -879,7 +879,7 @@ distribution of the package. The default
|
||||
<function>distPhase</function> first calls <command>make
|
||||
dist</command>, then it copies the resulting source tarballs to
|
||||
<filename>$out/tarballs/</filename>. This phase is only executed if
|
||||
the attribute <varname>doDist</varname> is not set.</para>
|
||||
the <varname>doDist</varname> is not set.</para>
|
||||
|
||||
<variablelist>
|
||||
<title>Variables controlling the distribution phase</title>
|
||||
|
||||
49
maintainers/docs/bugs.txt
Normal file
49
maintainers/docs/bugs.txt
Normal file
@@ -0,0 +1,49 @@
|
||||
*** All these bugs should be moved to JIRA (if they still exist) ***
|
||||
|
||||
|
||||
* 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)
|
||||
|
||||
|
||||
* In gtksourceview-sharp: does the prefix patch cause problems (e.g.,
|
||||
makefile.am says "mimeinfodir should be the same as the gnome
|
||||
prefix")?
|
||||
|
||||
|
||||
* fgrep/egrep: these fail if grep is not in the $PATH.
|
||||
|
||||
|
||||
* teTeX: some programs (such as epstopdf) depend on /usr/bin/env, and
|
||||
expect perl to be in the environment.
|
||||
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., does not have a straight-forward executable semantics):
|
||||
|
||||
IF it's related to SGML/XML processing:
|
||||
IF it's a XML DTD:
|
||||
./data/sgml+xml/schemas/xml-dtd
|
||||
ELSE IF it's an XSLT stylesheet (okay, these are executable...):
|
||||
./data/sgml+xml/stylesheets/xslt
|
||||
|
||||
ELSE IF it's a GAME:
|
||||
|
||||
./games
|
||||
|
||||
ELSE:
|
||||
|
||||
./misc
|
||||
101
maintainers/docs/coding-conventions.txt
Normal file
101
maintainers/docs/coding-conventions.txt
Normal file
@@ -0,0 +1,101 @@
|
||||
Some conventions:
|
||||
|
||||
* Directories / file names: lowercase, and use dashes between words,
|
||||
no camel case. I.e., all-packages.nix, not all allPackages.nix or
|
||||
AllPackages.nix.
|
||||
|
||||
* Don't use TABs. Everybody has different TAB settings so it's asking
|
||||
for trouble.
|
||||
|
||||
* Use 2 spaces of indentation per indentation level in Nix
|
||||
expressions, 4 spaces in shell scripts. (Maybe 2 is too low, but
|
||||
for consistency's sake it should be the same. Certainly indentation
|
||||
should be consistent within a single file.)
|
||||
|
||||
* Use lowerCamelCase for variable names, not UpperCamelCase.
|
||||
|
||||
* Function calls with attribute set arguments are written as
|
||||
|
||||
foo {
|
||||
arg = ...;
|
||||
}
|
||||
|
||||
not
|
||||
|
||||
foo
|
||||
{
|
||||
arg = ...;
|
||||
}
|
||||
|
||||
Also fine is
|
||||
|
||||
foo { arg = ...; }
|
||||
|
||||
if it's a short call.
|
||||
|
||||
* In attribute sets or lists that span multiple lines, the attribute
|
||||
names or list elements should be aligned:
|
||||
|
||||
# A long list.
|
||||
list = [
|
||||
elem1
|
||||
elem2
|
||||
elem3
|
||||
];
|
||||
|
||||
# A long attribute set.
|
||||
attrs = {
|
||||
attr1 = short_expr;
|
||||
attr2 =
|
||||
if true then big_expr else big_expr;
|
||||
};
|
||||
|
||||
* Short lists or attribute sets can be written on one line:
|
||||
|
||||
# A short list.
|
||||
list = [ elem1 elem2 elem3 ];
|
||||
|
||||
# A short set.
|
||||
attrs = { x = 1280; y = 1024; };
|
||||
|
||||
* Breaking in the middle of a function argument can give hard-to-read
|
||||
code, like
|
||||
|
||||
someFunction { x = 1280;
|
||||
y = 1024; } otherArg
|
||||
yetAnotherArg
|
||||
|
||||
(especially if the argument is very large, spanning multiple lines).
|
||||
|
||||
Better:
|
||||
|
||||
someFunction
|
||||
{ x = 1280; y = 1024; }
|
||||
otherArg
|
||||
yetAnotherArg
|
||||
|
||||
or
|
||||
|
||||
let res = { x = 1280; y = 1024; };
|
||||
in someFunction res otherArg yetAnotherArg
|
||||
|
||||
* The bodies of functions, asserts, and withs are not indented, so
|
||||
|
||||
assert system == "i686-linux";
|
||||
stdenv.mkDerivation { ...
|
||||
|
||||
not
|
||||
|
||||
assert system == "i686-linux";
|
||||
stdenv.mkDerivation { ...
|
||||
|
||||
* Function formal arguments are written as:
|
||||
|
||||
{arg1, arg2, arg3}:
|
||||
|
||||
but if they don't fit on one line they're written as:
|
||||
|
||||
{ arg1, arg2, arg3
|
||||
, arg4, ...
|
||||
, argN
|
||||
}:
|
||||
31
maintainers/docs/create-new-static-env
Normal file
31
maintainers/docs/create-new-static-env
Normal file
@@ -0,0 +1,31 @@
|
||||
Creating a new static stdenv
|
||||
----------------------------
|
||||
|
||||
When Nix is ported to a new (Linux) platform and you want to have a completely
|
||||
pure setup for the stdenv (for example for NixOS) it is necessary to rebuild
|
||||
the static tools.
|
||||
|
||||
The challenge is that there is no Nix environment yet, for bootstrapping.
|
||||
The first task is to create all the tools that are necessary. For most tools
|
||||
there are ready made Nix expressions.
|
||||
|
||||
|
||||
GCC
|
||||
|
||||
There is an expression gcc-static-3.4. Depending on whether or not you already
|
||||
have an environment built with Nix (x86-linux: yes, rest: not yet) you should
|
||||
set the noSysDirs parameter in all-packages.nix. If there is an environment,
|
||||
leave it, but if the system is still impure (like most systems), set noSysDirs
|
||||
to false.
|
||||
|
||||
bash
|
||||
|
||||
There is an expression for bash-static. Simply build it.
|
||||
|
||||
bzip2
|
||||
|
||||
There is an expression for bzip2-static. Simply build it.
|
||||
|
||||
findutils
|
||||
|
||||
There is an expression for findutils-static. Simply build it.
|
||||
35
maintainers/docs/static-initial-env
Normal file
35
maintainers/docs/static-initial-env
Normal file
@@ -0,0 +1,35 @@
|
||||
Upgrading the standard initial environment
|
||||
|
||||
For Nix on i686-linux we make use of an environment of statically linked
|
||||
tools (see $nixpkgs/stdenv/linux). The first version of these tools were
|
||||
compiled outside of Nix, in an impure environment. They are used as some
|
||||
magical ingredient to make everything work. To keep these tools more in
|
||||
synchronization with the rest of nixpkgs and to make porting of nixpkgs
|
||||
to other platforms easier the static versions are now also built with Nix
|
||||
and nixpkgs.
|
||||
|
||||
The tools can be found in nixpkgs in:
|
||||
|
||||
- shells/bash-static
|
||||
- tools/networking/curl-diet
|
||||
- tools/archivers/gnutar-diet
|
||||
- tools/compression/gzip-diet
|
||||
- tools/compression/bzip2-static
|
||||
- tools/text/gnused-diet
|
||||
- tools/text/diffutils-diet
|
||||
- tools/text/gnupatch-diet
|
||||
- tools/misc/findutils-static
|
||||
|
||||
and
|
||||
- development/compilers/gcc-static-3.4
|
||||
|
||||
Most packages are compiled with dietlibc, an alternate C library, apart
|
||||
from bash and findutils, which are statically linked to glibc. The reason
|
||||
we chose dietlibc has various reasons. First of all, curl cannot be built
|
||||
statically with glibc. If we do, we get a static binary, but it cannot resolve
|
||||
hostnames to IP addresses. glibc dynamically loads functionality at runtime
|
||||
to do resolving. When linking with dietlibc this doesn't happen.
|
||||
|
||||
The static tools are not used as part of the input hashing (see Eelco's
|
||||
PhD thesis, paragraph 5.4.1), so changing them does not change anything and
|
||||
will not force a massive rebuild.
|
||||
12
maintainers/docs/todo.txt
Normal file
12
maintainers/docs/todo.txt
Normal file
@@ -0,0 +1,12 @@
|
||||
* Patch development/tools/misc/libtool not to search standard
|
||||
directories for libraries (like setup.sh does now). [do we want
|
||||
this?]
|
||||
|
||||
* Inform freedesktop people that Xaw requires Xpm.
|
||||
|
||||
* After building gcc, filter out references to /tmp/nix... in
|
||||
.../lib/libsupc++.la and .../lib/libstdc++.la
|
||||
|
||||
* Add gettext to glib propagatedBuildInputs? Glib's `gi18n.h' doesn't
|
||||
seem to like Glibc `libintl.h'; needs the gettext one instead.
|
||||
[Move from libbonoboui]
|
||||
@@ -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;
|
||||
83
maintainers/scripts/evacuate-urls.sh
Executable file
83
maintainers/scripts/evacuate-urls.sh
Executable file
@@ -0,0 +1,83 @@
|
||||
#! /bin/sh -e
|
||||
|
||||
distDir=/data/webserver/dist/tarballs
|
||||
|
||||
find "$1" -name "*.nix" | while read fn; do
|
||||
|
||||
grep -E '^ *url = ' "$fn" | while read line; do
|
||||
|
||||
if url=$(echo "$line" | sed 's^url = \(.*\);^\1^'); then
|
||||
|
||||
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
|
||||
base="$(basename "$url")"
|
||||
newPath="$distDir/$base"
|
||||
|
||||
if test -e "$newPath"; then
|
||||
|
||||
#echo "$fn: checking hash of existing $newPath"
|
||||
hash=$(fgrep -A 1 "$url" "$fn" | grep md5 | sed 's^.*md5 = \"\(.*\)\";.*^\1^')
|
||||
hashType=md5
|
||||
if test -z "$hash"; then
|
||||
hash=$(fgrep -A 1 "$url" "$fn" | grep sha256 | sed 's^.*sha256 = \"\(.*\)\";.*^\1^')
|
||||
hashType="sha256 --base32"
|
||||
if test -n "$hash"; then
|
||||
if test "${#hash}" = 64; then
|
||||
hash=$(nix-hash --to-base32 --type sha256 $hash)
|
||||
fi
|
||||
else
|
||||
hash=$(fgrep -A 1 "$url" "$fn" | grep sha1 | sed 's^.*sha1 = \"\(.*\)\";.*^\1^')
|
||||
hashType="sha1"
|
||||
if test -z "$hash"; then
|
||||
echo "WARNING: $fn: cannot figure out the hash for $url"
|
||||
continue
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
#echo "HASH = $hash"
|
||||
if ! test "$(nix-hash --type $hashType --flat "$newPath")" = "$hash"; then
|
||||
echo "WARNING: $fn: $newPath exists and differs, hash should be $hash!"
|
||||
continue
|
||||
fi
|
||||
|
||||
else
|
||||
|
||||
if echo $url | grep -q 'mirror://'; then
|
||||
#echo "$fn: skipping mirrored $url"
|
||||
continue
|
||||
fi
|
||||
|
||||
echo "$fn: $url -> $newPath"
|
||||
|
||||
if test -n "$doCopy"; then
|
||||
if ! curl --disable-epsv --fail --location --max-redirs 20 --remote-time \
|
||||
"$url" --output "$newPath".tmp; then
|
||||
continue
|
||||
fi
|
||||
mv -f "$newPath".tmp "$newPath"
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
if test -n "$doCopy" -a -e "$newPath"; then
|
||||
|
||||
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
|
||||
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
done
|
||||
|
||||
echo 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,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,3 +0,0 @@
|
||||
#! /bin/sh
|
||||
|
||||
nix-instantiate --strict --eval-only --xml --show-trace "$(dirname "$0")"/eval-release.nix 2>&1 > /dev/null
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchurl, libcdio, cddiscid, wget, bash, vorbisTools, id3v2, lame
|
||||
{ stdenv, fetchurl, libcdio, cddiscid, wget, bash, vorbisTools
|
||||
, makeWrapper }:
|
||||
|
||||
let version = "2.3.99.6";
|
||||
@@ -40,7 +40,7 @@ in
|
||||
--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"
|
||||
"$out/bin:${libcdio}/bin:${cddiscid}/bin:${wget}/bin:${vorbisTools}/bin"
|
||||
|
||||
wrapProgram "$out/bin/cddb-tool" --prefix PATH ":" \
|
||||
"${wget}/bin"
|
||||
@@ -58,4 +58,4 @@ in
|
||||
format, and tags them, all in one go.
|
||||
'';
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -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 ];
|
||||
};
|
||||
}
|
||||
32
pkgs/applications/audio/audacious/player.nix
Normal file
32
pkgs/applications/audio/audacious/player.nix
Normal file
@@ -0,0 +1,32 @@
|
||||
{ stdenv, fetchurl, pkgconfig, glib, gtk, libmowgli
|
||||
, libglade, libmcs, gettext, xlibs, dbus_glib
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "audacious-1.5.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = http://distfiles.atheme.org/audacious-1.5.1.tbz2;
|
||||
sha256 = "1s32pdgx85qkrq15wwmvdw7wbcbxcf3nrhqxi6y72aijqm6fjwnz";
|
||||
};
|
||||
|
||||
buildInputs = [pkgconfig libglade libmcs gettext dbus_glib];
|
||||
|
||||
propagatedBuildInputs = [glib gtk libmowgli libmcs];
|
||||
|
||||
NIX_LDFLAGS = "-rpath ${xlibs.libX11}/lib";
|
||||
|
||||
# Otherwise we barf with "libgcc_s.so.1 must be installed for
|
||||
# pthread_cancel to work" on exit, as it tries to find libgcc_s
|
||||
# dynamically.
|
||||
dontPatchELF = true;
|
||||
|
||||
preBuild = ''
|
||||
ensureDir $out/lib
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Audacious, a media player forked from the Beep Media Player, which was itself an XMMS fork";
|
||||
homepage = http://audacious-media-player.org/;
|
||||
};
|
||||
}
|
||||
33
pkgs/applications/audio/audacious/plugins.nix
Normal file
33
pkgs/applications/audio/audacious/plugins.nix
Normal file
@@ -0,0 +1,33 @@
|
||||
{ stdenv, fetchurl, pkgconfig, audacious, dbus_glib, gettext
|
||||
, libmad, xlibs, alsaLib, taglib, libmpcdec, libogg, libvorbis
|
||||
, libcdio, libcddb
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "audacious-plugins-1.5.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = http://distfiles.atheme.org/audacious-plugins-1.5.1.tbz2;
|
||||
sha256 = "1ki5bd50g4vi4d0qzxynyrgaq2n4cwhbsxln9rwk8ppphvk9pawc";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
pkgconfig audacious dbus_glib gettext libmad
|
||||
xlibs.libXcomposite alsaLib taglib libmpcdec
|
||||
libogg libvorbis libcdio libcddb
|
||||
];
|
||||
|
||||
preBuild = ''
|
||||
makeFlagsArray=(pluginlibdir=$out/lib/audacious)
|
||||
'';
|
||||
|
||||
NIX_LDFLAGS = "-L${audacious}/lib/audacious"; # needed because we override pluginlibdir
|
||||
|
||||
# `--enable-amidiplug' is to prevent configure from looking in /proc/asound.
|
||||
configureFlags = "--enable-amidiplug";
|
||||
|
||||
meta = {
|
||||
description = "Plugins for the Audacious media player";
|
||||
homepage = http://audacious-media-player.org/;
|
||||
};
|
||||
}
|
||||
@@ -1,36 +1,19 @@
|
||||
{ stdenv, fetchurl, wxGTK, pkgconfig, gettext, gtk, glib, zlib, perl, intltool,
|
||||
libogg, libvorbis, libmad, alsaLib, libsndfile, libsamplerate, flac, lame,
|
||||
expat, id3lib, ffmpeg
|
||||
}:
|
||||
{ stdenv, fetchurl, wxGTK, pkgconfig, gettext, gtk, glib, zlib }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "1.3.12";
|
||||
name = "audacity-${version}";
|
||||
stdenv.mkDerivation {
|
||||
name = "audacity-1.3.7";
|
||||
|
||||
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";
|
||||
url = mirror://sourceforge/audacity/audacity-fullsrc-1.3.7.tar.bz2;
|
||||
sha256 = "1kashc6cc6d5g6i59nqcrl795x1jqdh0lpg3msa1wckfj3hpljmy";
|
||||
};
|
||||
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)
|
||||
'';
|
||||
buildInputs = [ wxGTK pkgconfig gettext gtk glib zlib ];
|
||||
|
||||
meta = {
|
||||
description = "Sound editor with graphical UI";
|
||||
homepage = http://audacity.sourceforge.net;
|
||||
license = "GPLv2+";
|
||||
platforms = with stdenv.lib.platforms; linux;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -5,26 +5,22 @@
|
||||
|
||||
assert gtkGUI -> pkgconfig != null && gtk != null;
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "aumix-2.9.1";
|
||||
stdenv.mkDerivation {
|
||||
name = "aumix-2.8";
|
||||
src = fetchurl {
|
||||
url = "http://www.jpj.net/~trevor/aumix/releases/${name}.tar.bz2";
|
||||
sha256 = "0a8fwyxnc5qdxff8sl2sfsbnvgh6pkij4yafiln0fxgg6bal7knj";
|
||||
url = http://www.jpj.net/~trevor/aumix/aumix-2.8.tar.bz2;
|
||||
sha256 = "636eef7f400c2f3df489c0d2fa21507e88692113561e75a40a26c52bc422d7fc";
|
||||
};
|
||||
|
||||
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;
|
||||
license = "GPL";
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,37 +1,36 @@
|
||||
{ stdenv, fetchurl, zlib, guile, libart_lgpl, pkgconfig, intltool
|
||||
, gtk, glib, libogg, libvorbis, libgnomecanvas, gettext, perl }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
args: with args;
|
||||
args.stdenv.mkDerivation {
|
||||
name = "beast-0.7.1";
|
||||
|
||||
src = fetchurl {
|
||||
src = args.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
|
||||
buildInputs =[zlib guile libart_lgpl pkgconfig intltool gtk glib
|
||||
libogg libvorbis libgnomecanvas gettext
|
||||
];
|
||||
];
|
||||
|
||||
inherit bash perl;
|
||||
|
||||
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`
|
||||
sed 's=/bin/bash=/$bash/bin/bash=g' -i `find -type f`
|
||||
sed 's=/usr/bin/perl=/$perl/bin/bash=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
|
||||
];
|
||||
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"];
|
||||
description = "BEAST - the Bedevilled Sound Engine";
|
||||
homepage = http://beast.gtk.org;
|
||||
license = ["GPL-2" "LGPL-2.1"];
|
||||
};
|
||||
}
|
||||
|
||||
6
pkgs/applications/audio/bmp-plugins/musepack/builder.sh
Normal file
6
pkgs/applications/audio/bmp-plugins/musepack/builder.sh
Normal file
@@ -0,0 +1,6 @@
|
||||
source $stdenv/setup
|
||||
|
||||
ensureDir "$out/lib/bmp/Input"
|
||||
installFlags="install libdir=$out/lib/bmp/Input"
|
||||
|
||||
genericBuild
|
||||
11
pkgs/applications/audio/bmp-plugins/musepack/default.nix
Normal file
11
pkgs/applications/audio/bmp-plugins/musepack/default.nix
Normal file
@@ -0,0 +1,11 @@
|
||||
{stdenv, fetchurl, pkgconfig, bmp, libmpcdec, taglib}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "bmp-plugin-musepack-1.2";
|
||||
builder = ./builder.sh;
|
||||
src = fetchurl {
|
||||
url = http://files2.musepack.net/linux/plugins/bmp-musepack-1.2.tar.bz2;
|
||||
md5 = "5fe0c9d341ca37d05c780a478f829a5f";
|
||||
};
|
||||
buildInputs = [pkgconfig bmp libmpcdec taglib];
|
||||
}
|
||||
11
pkgs/applications/audio/bmp-plugins/wma/builder.sh
Normal file
11
pkgs/applications/audio/bmp-plugins/wma/builder.sh
Normal file
@@ -0,0 +1,11 @@
|
||||
source $stdenv/setup
|
||||
|
||||
buildFlags="-f Makefile.bmp"
|
||||
|
||||
installPhase=installPhase
|
||||
installPhase() {
|
||||
ensureDir "$out/lib/bmp/Input"
|
||||
cp libwma.so "$out/lib/bmp/Input"
|
||||
}
|
||||
|
||||
genericBuild
|
||||
11
pkgs/applications/audio/bmp-plugins/wma/default.nix
Normal file
11
pkgs/applications/audio/bmp-plugins/wma/default.nix
Normal file
@@ -0,0 +1,11 @@
|
||||
{stdenv, fetchurl, pkgconfig, bmp}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "bmp-plugin-wma-1.0.5";
|
||||
builder = ./builder.sh;
|
||||
src = fetchurl {
|
||||
url = http://mcmcc.bat.ru/xmms-wma/xmms-wma-1.0.5.tar.bz2;
|
||||
md5 = "5d62a0f969617aeb40096362c7a8a506";
|
||||
};
|
||||
buildInputs = [pkgconfig bmp];
|
||||
}
|
||||
21
pkgs/applications/audio/bmp/default.nix
Normal file
21
pkgs/applications/audio/bmp/default.nix
Normal file
@@ -0,0 +1,21 @@
|
||||
{ stdenv, fetchurl, pkgconfig, alsaLib, esound, libogg, libvorbis, id3lib
|
||||
, glib, gtk, libglade
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "bmp-0.9.7.1";
|
||||
src = fetchurl {
|
||||
url = mirror://sourceforge/beepmp/bmp-0.9.7.1.tar.gz;
|
||||
md5 = "c25d5a8d49cc5851d13d525a20023c4c";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
pkgconfig alsaLib esound libogg libvorbis id3lib libglade
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "Beep Media Player, an XMMS fork";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [glib gtk];
|
||||
}
|
||||
@@ -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+";
|
||||
};
|
||||
}
|
||||
@@ -9,14 +9,6 @@ stdenv.mkDerivation rec {
|
||||
};
|
||||
|
||||
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;
|
||||
|
||||
@@ -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 +1,17 @@
|
||||
{ stdenv, fetchurl, pkgconfig, libgpod, gtk, glib, gettext, perl, perlXMLParser
|
||||
, libglade, flex, libid3tag, libvorbis, intltool }:
|
||||
{ stdenv, fetchurl, pkgconfig, libgpod, gtk, glib, gettext, perl, perlXMLParser, libglade, flex, libid3tag }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "gtkpod-1.0.0";
|
||||
name = "gtkpod-0.99.14";
|
||||
|
||||
src = fetchurl {
|
||||
url = mirror://sourceforge/gtkpod/gtkpod-1.0.0.tar.gz;
|
||||
sha256 = "04jzybs55c27kyp7r9c58prcq0q4ssvj5iggva857f49s1ar826q";
|
||||
url = mirror://sourceforge/gtkpod/gtkpod-0.99.14.tar.gz;
|
||||
sha256 = "0ggcfyhcdlf3br88csdki215k4clxixa192afz6f16k7h8s2iqbk";
|
||||
};
|
||||
|
||||
buildInputs = [ pkgconfig libgpod gettext perl perlXMLParser gtk libglade flex
|
||||
libid3tag libvorbis intltool ];
|
||||
|
||||
patchPhase = ''
|
||||
sed -i 's/which/type -P/' scripts/*.sh
|
||||
'';
|
||||
buildInputs = [ pkgconfig libgpod gettext perl perlXMLParser gtk libglade flex libid3tag];
|
||||
|
||||
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 +1,27 @@
|
||||
{ stdenv, fetchurl, fftw, ladspaH, pkgconfig }:
|
||||
|
||||
args: with args;
|
||||
let localDefs = builderDefs.passthru.function {
|
||||
src =
|
||||
fetchurl {
|
||||
url = http://plugin.org.uk/releases/0.4.15/swh-plugins-0.4.15.tar.gz;
|
||||
sha256 = "0h462s4mmqg4iw7zdsihnrmz2vjg0fd49qxw2a284bnryjjfhpnh";
|
||||
};
|
||||
buildInputs = [fftw ladspaH pkgconfig];
|
||||
configureFlags = [];
|
||||
};
|
||||
in with localDefs;
|
||||
let
|
||||
postInstall = FullDepEntry ("
|
||||
ensureDir \$out/share/ladspa/
|
||||
ln -s \$out/lib/ladspa \$out/share/ladspa/lib
|
||||
") [minInit defEnsureDir];
|
||||
in
|
||||
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";
|
||||
};
|
||||
name = "swh-plugins-0.4.15";
|
||||
builder = writeScript "swh-plugins-0.4.15-builder"
|
||||
(textClosure localDefs [doConfigure doMakeInstall
|
||||
postInstall doForceShare]);
|
||||
meta = {
|
||||
description = "LADSPA format audio plugins";
|
||||
inherit src;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,28 +1,28 @@
|
||||
{ stdenv, fetchurl, builderDefs }:
|
||||
|
||||
args: with args;
|
||||
let
|
||||
src = fetchurl {
|
||||
url = http://www.ladspa.org/ladspa_sdk/ladspa.h.txt;
|
||||
sha256 = "1b908csn85ng9sz5s5d1mqk711cmawain2z8px2ajngihdrynb67";
|
||||
};
|
||||
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 localDefs = builderDefs.passthru.function {
|
||||
buildInputs = [];
|
||||
inherit src;
|
||||
};
|
||||
in with localDefs;
|
||||
let
|
||||
copyFile = fullDepEntry ("
|
||||
ensureDir \$out/include
|
||||
cp ${src} \$out/include/ladspa.h
|
||||
") [minInit defEnsureDir];
|
||||
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;
|
||||
};
|
||||
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.97";
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/lame/${name}.tar.gz";
|
||||
sha256 = "1j3jywv6ic2cy0x0q1a1h6rcl6xmcs5f58xawjdkl8hpcv3l8cdc";
|
||||
url = mirror://sourceforge/lame/lame-3.97.tar.gz ;
|
||||
sha256 = "05xy9lv6m9s013lzlvhxwvr1586c239xaiiwka52k18hs6k388qa";
|
||||
};
|
||||
|
||||
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,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 +1,20 @@
|
||||
{ stdenv, fetchurl, qt4, alsaLib, jackaudio }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "qjackctl-0.3.3";
|
||||
args:
|
||||
args.stdenv.mkDerivation {
|
||||
|
||||
# some dependencies such as killall have to be installed additionally
|
||||
|
||||
src = fetchurl {
|
||||
name = "qjackctl-0.3.3";
|
||||
|
||||
src = args.fetchurl {
|
||||
url = http://downloads.sourceforge.net/qjackctl/qjackctl-0.3.3.tar.gz;
|
||||
sha256 = "1z9v208fs79ka6ni3p5v5xb0k5y1wqqm2a9cf903387b9p3fhpxj";
|
||||
};
|
||||
|
||||
buildInputs = [ qt4 alsaLib jackaudio ];
|
||||
buildInputs =(with args; [qt4 alsaLib jackaudio]);
|
||||
|
||||
meta = {
|
||||
description = "qt jackd control gui tool";
|
||||
homepage = http://qjackctl.sourceforge.net/;
|
||||
license = "GPL";
|
||||
description = "qt jackd control gui tool";
|
||||
homepage = http://qjackctl.sourceforge.net/;
|
||||
license = "GPL";
|
||||
};
|
||||
}
|
||||
|
||||
@@ -2,9 +2,9 @@ args :
|
||||
let
|
||||
lib = args.lib;
|
||||
fetchurl = args.fetchurl;
|
||||
fullDepEntry = args.fullDepEntry;
|
||||
FullDepEntry = args.FullDepEntry;
|
||||
|
||||
version = lib.attrByPath ["version"] "9.4" args;
|
||||
version = lib.getAttr ["version"] "9.4" args;
|
||||
buildInputs = with args; [gtk glib pkgconfig
|
||||
libXpm gmp gettext libX11 fftw]
|
||||
++ (lib.optional (args ? ruby) args.ruby)
|
||||
@@ -38,18 +38,20 @@ rec {
|
||||
phaseNames = ["doConfigure" "preBuild" "makeDocsWork"
|
||||
"doMakeInstall" "doForceShare"];
|
||||
|
||||
makeDocsWork = fullDepEntry ''
|
||||
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 (''
|
||||
preBuild = FullDepEntry (''
|
||||
cp config.log /tmp/snd-config.log
|
||||
export NIX_LDFLAGS="$NIX_LDFLAGS -L${args.libX11}/lib -lX11"
|
||||
|
||||
'') ["minInit" "doUnpack" "makeDocsWork"];
|
||||
|
||||
name = "snd-" + version;
|
||||
name = "Snd-" + version;
|
||||
meta = {
|
||||
description = "Snd sound editor.";
|
||||
homepage = http://ccrma.stanford.edu/software/snd;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "xmms-1.2.10";
|
||||
|
||||
src = fetchurl {
|
||||
url = http://nixos.org/tarballs/xmms-1.2.10.tar.bz2;
|
||||
md5 = "03a85cfc5e1877a2e1f7be4fa1d3f63c";
|
||||
@@ -16,6 +15,5 @@ stdenv.mkDerivation {
|
||||
meta = {
|
||||
description = "A music player very similar to Winamp";
|
||||
homepage = http://www.xmms.org;
|
||||
platforms = stdenv.lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
{stdenv, fetchurl, x11, libjpeg, libpng, libXmu, freetype, pam}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "slim-1.3.2";
|
||||
name = "slim-1.3.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://download.berlios.de/slim/${name}.tar.gz";
|
||||
sha256 = "1f42skdp5k1zrb364s3i0ps5wmx9szz9h192i2dkn9az00jh2mpi";
|
||||
sha256 = "0xqgzvg6h1bd29140mcgg9r16vcmskz7zmym7i7jlz7x9c1a9mxc";
|
||||
};
|
||||
|
||||
patches = [
|
||||
@@ -18,10 +18,6 @@ stdenv.mkDerivation rec {
|
||||
# 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];
|
||||
|
||||
@@ -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,5 +1,4 @@
|
||||
{ stdenv, fetchurl, ncurses }:
|
||||
|
||||
args : with args;
|
||||
stdenv.mkDerivation {
|
||||
name = "bvi-1.3.2";
|
||||
|
||||
@@ -8,11 +7,11 @@ stdenv.mkDerivation {
|
||||
sha256 = "110wxqnyianqamxq4y53drqqxb9vp4k2fcvic45qggvlqkqhlfgz";
|
||||
};
|
||||
|
||||
buildInputs = [ ncurses ];
|
||||
buildInputs = [ncurses];
|
||||
|
||||
meta = {
|
||||
description = "Hex editor with vim style keybindings";
|
||||
homepage = http://bvi.sourceforge.net/download.html;
|
||||
license = "GPL2";
|
||||
description = "hex editor with vim style keybindings";
|
||||
homepage = http://bvi.sourceforge.net/download.html;
|
||||
license = "GPL2";
|
||||
};
|
||||
}
|
||||
|
||||
96
pkgs/applications/editors/eclipse-new/3.3.1.1.nix
Normal file
96
pkgs/applications/editors/eclipse-new/3.3.1.1.nix
Normal file
@@ -0,0 +1,96 @@
|
||||
args: with args; let
|
||||
|
||||
# hint: eclipse -data <dir to save global eclipse settings>
|
||||
|
||||
eclipsePlugin = name : src : stdenv.mkDerivation {
|
||||
inherit src;
|
||||
name = "${name}-eclipse-plugin";
|
||||
phases = "unpackPhase";
|
||||
buildInputs = [ args.unzip ];
|
||||
unpackPhase = ''
|
||||
mkdir tmp; cd tmp
|
||||
unpackFile "$src"
|
||||
[ -d ./eclipse ] || { # if plugin doesn't contain the eclipse directory itself create it (eg viPlugin)
|
||||
mkdir "$TMP/eclipse"
|
||||
mv * "$TMP/eclipse"
|
||||
cd "$TMP"
|
||||
}
|
||||
ensureDir $out;
|
||||
mv eclipse "$out"
|
||||
'';
|
||||
};
|
||||
|
||||
eclipseEnv = {name, eclipse, links}: runCommand name { inherit links eclipse; } ''
|
||||
ensureDir $out/eclipse/links;
|
||||
cp -r "$eclipse/bin" "$out/bin"
|
||||
for f in $eclipse/eclipse/*; do
|
||||
# using ln eclipse doesn't take the correct link folder :-( (TODO)
|
||||
# ln -s "$f" "$out/eclipse/$(basename "$f")"
|
||||
cp -r "$f" "$out/eclipse/$(basename "$f")"
|
||||
done
|
||||
# create links
|
||||
for link in $links; do
|
||||
echo "path=$link" >> "$out/eclipse/links/$(basename "$link").link"
|
||||
done
|
||||
'';
|
||||
|
||||
# mmh, this derivation is superfluous. We could also create them directly
|
||||
# instead of symlinking them into the final env build by buildEnv
|
||||
linkFile = deriv : writeTextFile {
|
||||
name = "${deriv.name}-eclipse-feature-link";
|
||||
destination = "/eclipse/links/${deriv.name}.link";
|
||||
};
|
||||
|
||||
attr = rec {
|
||||
eclipse = import ( ../eclipse-new + "/${version}/eclipse.nix") args; # without any additional plugins, why can't I use ./ instead of ../eclipse-new ?
|
||||
|
||||
plugins = rec {
|
||||
|
||||
viPlugin = { # see its license!
|
||||
plugin = eclipsePlugin "viPlugin_1.15.6" (fetchurl {
|
||||
url = http://www.satokar.com/viplugin/files/viPlugin_1.15.6.zip;
|
||||
sha256 = "0p53q45a754j143pnnp51rjwj7lzawcxfy9xzpjasdic4a2l0f96";
|
||||
# license = "Other/Proprietary License with Free Trial";
|
||||
});
|
||||
};
|
||||
|
||||
# PHP developement
|
||||
emfSdoXsdSDK232 = {
|
||||
plugin = eclipsePlugin "emf-sdo-xsd-SDK-2.3.2" (fetchurl {
|
||||
url = http://eclipsemirror.yoxos.com/eclipse.org/modeling/emf/emf/downloads/drops/2.3.2/R200802051830/emf-sdo-xsd-SDK-2.3.2.zip;
|
||||
sha256 = "1k20fn47x1giwhc80rzkqaw3mn0p3861sjp7aw39842lv2hjwn1c";
|
||||
});
|
||||
};
|
||||
gefSDK332 = {
|
||||
plugin = eclipsePlugin "GEF-SDK-3.3.2" (fetchurl {
|
||||
url = http://ftp-stud.fht-esslingen.de/pub/Mirrors/eclipse/tools/gef/downloads/drops/3.3.2/R200802211602/GEF-SDK-3.3.2.zip;
|
||||
sha256 = "1pk5qlwk0iyvs85s966y96ks8vq1g81fivvbf4lh43155rg0z037";
|
||||
});
|
||||
};
|
||||
wtpSdkR202X = {
|
||||
plugin = eclipsePlugin "wtp-sdk-R-2.0.2-20080223205547" (fetchurl {
|
||||
url = http://ftp.wh2.tu-dresden.de/pub/mirrors/eclipse/webtools/downloads/drops/R2.0/R-2.0.2-20080223205547/wtp-sdk-R-2.0.2-20080223205547.zip;
|
||||
sha256 = "0hmmmqzcd67jir2gmjd0xri5w2434xb2dk21hpgcv2qp0h9hhx0f";
|
||||
});
|
||||
};
|
||||
pdt = {
|
||||
deps = [ wtpSdkR202X gefSDK332 emfSdoXsdSDK232 ];
|
||||
plugin = eclipsePlugin "pdt-runtime-1.0.3" (fetchurl {
|
||||
url = http://sunsite.informatik.rwth-aachen.de:3080/eclipse/tools/pdt/downloads/drops/1.0.3/R200806030000/pdt-runtime-1.0.3.zip;
|
||||
sha256 = "0wd2vc9bqrk5mqj5al2ichm8lxlf7gwifsb9lzv1d896j04ilm96";
|
||||
});
|
||||
};
|
||||
};
|
||||
};
|
||||
pluginToList = a : [ a.plugin ] ++ lib.optionals (a ? deps ) (lib.concatMap pluginToList a.deps);
|
||||
in
|
||||
eclipseEnv {
|
||||
name = "eclipse-${version}-with-plugins";
|
||||
inherit (attr) eclipse;
|
||||
links =
|
||||
# example custom config: eclipse = { plugins = {eclipse, version, plugins } : let p = plugins; in [p.pdt]; };
|
||||
let userChosenPlugins = (getConfig [ "eclipse" "plugins" ] ( {eclipse, version, plugins} : [] ))
|
||||
{ inherit (attr) eclipse plugins; inherit version; };
|
||||
in # concatenate plugins and plugin dependencies
|
||||
(lib.uniqList { inputList = lib.concatMap pluginToList userChosenPlugins; });
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
--- a/build.xml 2008-03-02 14:34:05.000000000 +0100
|
||||
+++ b/build.xml 2008-03-02 14:34:57.000000000 +0100
|
||||
@@ -291,19 +291,6 @@
|
||||
</condition>
|
||||
<property name="bootclasspath" refid="default.bootclasspath" />
|
||||
|
||||
- <!--set the compiler and compiler arguments-->
|
||||
- <!--the default compiler is set to the one used by eclipse rel. eng. -->
|
||||
- <condition property="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter">
|
||||
- <available file="${basedir}/ecj.jar" />
|
||||
- </condition>
|
||||
- <fail message="The Eclipse compiler (ecj.jar) cannot be found.">
|
||||
- <condition>
|
||||
- <not>
|
||||
- <equals arg1="${build.compiler}" arg2="org.eclipse.jdt.core.JDTCompilerAdapter" />
|
||||
- </not>
|
||||
- </condition>
|
||||
- </fail>
|
||||
-
|
||||
<property name="compilerArg" value="-enableJavadoc -encoding ISO-8859-1" />
|
||||
<property name="javacSource" value="1.6" />
|
||||
<property name="javacTarget" value="1.6" />
|
||||
53
pkgs/applications/editors/eclipse-new/3.3.1.1/eclipse.nix
Normal file
53
pkgs/applications/editors/eclipse-new/3.3.1.1/eclipse.nix
Normal file
@@ -0,0 +1,53 @@
|
||||
# Note, if you want to install plugins using the update manager you should
|
||||
# copy the store path to a local directory and chown -R $USER yourcopy
|
||||
# Then start your local copy
|
||||
|
||||
args: with args;
|
||||
let arch = if stdenv.system == "x86_64-linux" then "x86_64"
|
||||
else if stdenv.system == "i686-linux" then "x86"
|
||||
else throw "not supported system";
|
||||
in
|
||||
args.stdenv.mkDerivation rec {
|
||||
name = "eclipse-classic-3.3.1.1";
|
||||
|
||||
unpackPhase = "unzip \$src; set -x ";
|
||||
buildInputs = [ unzip jdk gtk glib libXtst ant makeWrapper];
|
||||
|
||||
|
||||
patches=./build-with-jdk-compiler.patch;
|
||||
|
||||
buildPhase = "./build -os linux -ws gtk -arch ${arch}";
|
||||
|
||||
libraries = [gtk glib libXtst];
|
||||
|
||||
installPhase = "
|
||||
t=\$out/share/${name}
|
||||
ensureDir \$t \$out/bin
|
||||
cd result
|
||||
tar xfz linux-gtk-*.tar.gz
|
||||
mv eclipse \$out
|
||||
"
|
||||
#copied from other eclipse expressions
|
||||
+" rpath=
|
||||
for i in \$libraries; do
|
||||
rpath=\$rpath\${rpath:+:}\$i/lib
|
||||
done
|
||||
find \$out \\( -type f -a -perm +0100 \\) \\
|
||||
-print \\
|
||||
-exec patchelf --interpreter \"$(cat \$NIX_GCC/nix-support/dynamic-linker)\" \\
|
||||
--set-rpath \"\$rpath\" {} \\;
|
||||
|
||||
# Make a wrapper script so that the proper JDK is found.
|
||||
makeWrapper \$out/eclipse/eclipse \$out/bin/eclipse \\
|
||||
--prefix PATH \":\" \"\$jdk/bin\" \\
|
||||
--prefix LD_LIBRARY_PATH \":\" \"\$rpath\"
|
||||
sed -e 's=exec.*=exec \$(dirname $0)/../eclipse/eclipse $@=' -i \$out/bin/eclipse
|
||||
";
|
||||
# using dirname so that eclipse still runs after copying the whole store
|
||||
# directory somewhere else (so that you can use the update manager
|
||||
|
||||
src = args.fetchurl {
|
||||
url = http://mawercer.de/~nix/iyyx4hs1mgh1b1wa78j07pgq9k882m2k-eclipse-sourceBuild-srcIncluded-3.3.1.1.zip;
|
||||
sha256 = "0n56i7ml816f839704qlkgs5ahl0iqgwc80kjq7n7g5rl9a4vhp4";
|
||||
};
|
||||
}
|
||||
22
pkgs/applications/editors/eclipse/build_with_jdk_compiler
Normal file
22
pkgs/applications/editors/eclipse/build_with_jdk_compiler
Normal file
@@ -0,0 +1,22 @@
|
||||
--- a/build.xml 2008-03-02 14:34:05.000000000 +0100
|
||||
+++ b/build.xml 2008-03-02 14:34:57.000000000 +0100
|
||||
@@ -291,19 +291,6 @@
|
||||
</condition>
|
||||
<property name="bootclasspath" refid="default.bootclasspath" />
|
||||
|
||||
- <!--set the compiler and compiler arguments-->
|
||||
- <!--the default compiler is set to the one used by eclipse rel. eng. -->
|
||||
- <condition property="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter">
|
||||
- <available file="${basedir}/ecj.jar" />
|
||||
- </condition>
|
||||
- <fail message="The Eclipse compiler (ecj.jar) cannot be found.">
|
||||
- <condition>
|
||||
- <not>
|
||||
- <equals arg1="${build.compiler}" arg2="org.eclipse.jdt.core.JDTCompilerAdapter" />
|
||||
- </not>
|
||||
- </condition>
|
||||
- </fail>
|
||||
-
|
||||
<property name="compilerArg" value="-enableJavadoc -encoding ISO-8859-1" />
|
||||
<property name="javacSource" value="1.6" />
|
||||
<property name="javacTarget" value="1.6" />
|
||||
40
pkgs/applications/editors/eclipse/builder.sh
Executable file
40
pkgs/applications/editors/eclipse/builder.sh
Executable file
@@ -0,0 +1,40 @@
|
||||
source $stdenv/setup
|
||||
|
||||
unpackFile $src
|
||||
ensureDir $out
|
||||
mv eclipse $out/
|
||||
|
||||
# Set the dynamic linker and RPATH.
|
||||
rpath=
|
||||
for i in $libraries; do
|
||||
rpath=$rpath${rpath:+:}$i/lib
|
||||
done
|
||||
find $out \( -type f -a -perm +0100 \) \
|
||||
-print \
|
||||
-exec patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
|
||||
--set-rpath "$rpath" {} \;
|
||||
|
||||
# Make a wrapper script so that the proper JDK is found.
|
||||
# don't use makeWrapper in order to change the last line.
|
||||
|
||||
ensureDir $out/bin
|
||||
cat >> $out/bin/eclipse << EOF
|
||||
#! /bin/sh -e
|
||||
export PATH=${jdk}/bin\${PATH:+:}\$PATH
|
||||
export LD_LIBRARY_PATH=$rpath\${LD_LIBRARY_PATH:+:}\$LD_LIBRARY_PATH
|
||||
exec \$(dirname $0)/../eclipse/eclipse $@
|
||||
EOF
|
||||
chmod +x $out/bin/eclipse
|
||||
|
||||
ensureDir plugin-working-dir
|
||||
workingdir="$(pwd)/plugin-working-dir"
|
||||
for plugin in $plugins; do
|
||||
if test -e $plugin/install; then
|
||||
cd $workingdir
|
||||
$plugin/install "$out/eclipse"
|
||||
rm -rf $workingdir/*
|
||||
else
|
||||
# assume that it is a file
|
||||
cp $plugin $out/eclipse/plugins
|
||||
fi
|
||||
done
|
||||
@@ -1,153 +1,33 @@
|
||||
{ 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"
|
||||
}:
|
||||
# recommended installation:
|
||||
# nix-build -A eclipsesdk
|
||||
# then cp -r $store-path ~/my-eclipse; chmod -R 777 ~/my-eclipse # ugh! I'm to lazy to assign permissions properly
|
||||
# maybe also using a wrapper such as this (lower values should suffice for most needs)
|
||||
# eclipseWrapper () {
|
||||
# "$@" -vmargs -Xms2048m -Xmx2048m -XX:MaxPermSize=2048m
|
||||
# }
|
||||
#
|
||||
# Why use a local copy? This way it's easier to use the update manager to get plugins :-)
|
||||
|
||||
/*
|
||||
Note: Eclipse stores various Eclipse instance specific data in ~/.eclipse/*-instance/...
|
||||
The '*' depends on the executable location of Eclipse.
|
||||
|
||||
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.
|
||||
{fetchurl, stdenv, jdk, gtk, glib, libXtst, plugins ? []}:
|
||||
|
||||
Staring Eclipse from ~/.nix-profile/bin/eclipse doesn't help.
|
||||
let {
|
||||
body =
|
||||
stdenv.mkDerivation {
|
||||
name = "eclipse-sdk-3.5M6";
|
||||
builder = ./builder.sh;
|
||||
src = bindist;
|
||||
buildInputs = [];
|
||||
inherit jdk plugins;
|
||||
libraries = [gtk glib libXtst];
|
||||
};
|
||||
|
||||
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 =
|
||||
if (stdenv.system == "x86_64-linux") then fetchurl {
|
||||
url = ftp://sunsite.informatik.rwth-aachen.de/pub/mirror/eclipse/S-3.5M6-200903130100/eclipse-SDK-3.5M6-linux-gtk-x86_64.tar.gz;
|
||||
sha256 = "10p4idp5rcdf7xqwfk3kvmjxhi8x1v835m0y4pn9q4nhfb5643pi";
|
||||
} else fetchurl {
|
||||
url = ftp://mirror.micromata.de/eclipse/eclipse/downloads/drops/S-3.5M6-200903130100/eclipse-SDK-3.5M6-linux-gtk.tar.gz;
|
||||
sha256 = "1z8j26b632ydhqrmwgbcqgiq7f1a542jam06z2h62mcbqazrcyah";
|
||||
};
|
||||
|
||||
*/
|
||||
|
||||
|
||||
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 = ''
|
||||
'';
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
18
pkgs/applications/editors/eclipse/eclipse-sdk-3.1.2.nix
Normal file
18
pkgs/applications/editors/eclipse/eclipse-sdk-3.1.2.nix
Normal file
@@ -0,0 +1,18 @@
|
||||
{fetchurl, stdenv, makeWrapper, jdk, gtk, glib, libXtst, plugins ? []}:
|
||||
|
||||
let {
|
||||
body =
|
||||
stdenv.mkDerivation {
|
||||
name = "eclipse-sdk-3.1.2";
|
||||
builder = ./builder.sh;
|
||||
src = bindist;
|
||||
inherit makeWrapper jdk plugins;
|
||||
libraries = [gtk glib libXtst];
|
||||
};
|
||||
|
||||
bindist =
|
||||
fetchurl {
|
||||
url = http://archive.eclipse.org/eclipse/downloads/drops/R-3.1.2-200601181600/eclipse-SDK-3.1.2-linux-gtk.tar.gz;
|
||||
md5 = "ece50ed4d6d48dac839bfe8fa719fcff";
|
||||
};
|
||||
}
|
||||
18
pkgs/applications/editors/eclipse/eclipse-sdk-3.1.nix
Normal file
18
pkgs/applications/editors/eclipse/eclipse-sdk-3.1.nix
Normal file
@@ -0,0 +1,18 @@
|
||||
{fetchurl, stdenv, makeWrapper, jdk, gtk, glib, libXtst}:
|
||||
|
||||
let {
|
||||
body =
|
||||
stdenv.mkDerivation {
|
||||
name = "eclipse-sdk-3.1";
|
||||
builder = ./builder.sh;
|
||||
src = bindist;
|
||||
inherit makeWrapper jdk;
|
||||
libraries = [gtk glib libXtst];
|
||||
};
|
||||
|
||||
bindist =
|
||||
fetchurl {
|
||||
url = http://sunsite.informatik.rwth-aachen.de/eclipse/downloads/drops/R-3.1-200506271435/eclipse-SDK-3.1-linux-gtk.tar.gz;
|
||||
md5 = "0441c11cc5af1e84ed3be322929899e8";
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
source $stdenv/setup
|
||||
|
||||
ensureDir $out
|
||||
cat >> $out/install <<EOF
|
||||
#! /bin/sh
|
||||
|
||||
PLUGIN=$plugin
|
||||
UNZIP=$unzip/bin/unzip
|
||||
ECLIPSE=\$1
|
||||
|
||||
\$UNZIP \$PLUGIN
|
||||
|
||||
if test -e plugins; then
|
||||
cp -prd * \$ECLIPSE
|
||||
else
|
||||
cd *
|
||||
cp -prd * \$ECLIPSE
|
||||
fi
|
||||
EOF
|
||||
|
||||
chmod u+x $out/install
|
||||
10
pkgs/applications/editors/eclipse/plugins/installers/zip.nix
Normal file
10
pkgs/applications/editors/eclipse/plugins/installers/zip.nix
Normal file
@@ -0,0 +1,10 @@
|
||||
{stdenv, unzip, plugin}:
|
||||
|
||||
let {
|
||||
body =
|
||||
stdenv.mkDerivation {
|
||||
name = "eclipse-zip-plugin-installer";
|
||||
builder = ./builder.sh;
|
||||
inherit plugin unzip;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{stdenv, fetchurl}:
|
||||
|
||||
fetchurl {
|
||||
url = http://www.ii.uib.no/~karltk/spoofax/plugins/org.spoofax.editor_0.3.0.jar;
|
||||
md5 = "ff66d229c774f840ec8285f64c0f95bc";
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{stdenv, fetchurl}:
|
||||
|
||||
fetchurl {
|
||||
url = http://nixos.org/tarballs/org.spoofax.editor_0.3.10.jar;
|
||||
md5 = "ff77853e750e19a9b8d380c17ea27f3d";
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{stdenv, fetchurl}:
|
||||
|
||||
fetchurl {
|
||||
url = http://www.ii.uib.no/~karltk/spoofax/plugins/org.spoofax.editor_0.3.11.jar;
|
||||
md5 = "c36941afcb0e538e16fafd594eae128e";
|
||||
}
|
||||
@@ -1,19 +1,14 @@
|
||||
{ fetchurl, stdenv }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "ed-1.4";
|
||||
|
||||
name = "ed-1.2";
|
||||
src = fetchurl {
|
||||
url = "mirror://gnu/ed/${name}.tar.gz";
|
||||
sha256 = "1njgcghms1377csldi1yqjhcpghiii6bshdhnjpqp78sxs2xldnv";
|
||||
sha256 = "1jhw050fzaffjf5qdj1ccn7alngam7yhd5zpzyxvrjphwmkd46kx";
|
||||
};
|
||||
|
||||
doCheck = true;
|
||||
|
||||
crossAttrs = {
|
||||
compileFlags = [ "CC=${stdenv.cross.config}-gcc" ];
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "GNU ed, an implementation of the standard Unix editor";
|
||||
|
||||
@@ -31,7 +26,5 @@ stdenv.mkDerivation rec {
|
||||
license = "GPLv3+";
|
||||
|
||||
homepage = http://www.gnu.org/software/ed/;
|
||||
|
||||
maintainers = [ stdenv.lib.maintainers.ludo ];
|
||||
};
|
||||
}
|
||||
|
||||
13
pkgs/applications/editors/emacs-21/builder.sh
Normal file
13
pkgs/applications/editors/emacs-21/builder.sh
Normal file
@@ -0,0 +1,13 @@
|
||||
source $stdenv/setup
|
||||
|
||||
myglibc=`cat ${NIX_GCC}/nix-support/orig-libc`
|
||||
echo "glibc: $myglibc"
|
||||
|
||||
postConfigure() {
|
||||
cp $myglibc/lib/crt1.o src
|
||||
cp $myglibc/lib/crti.o src
|
||||
cp $myglibc/lib/crtn.o src
|
||||
}
|
||||
postConfigure=postConfigure
|
||||
|
||||
genericBuild
|
||||
41
pkgs/applications/editors/emacs-21/crt.patch
Normal file
41
pkgs/applications/editors/emacs-21/crt.patch
Normal file
@@ -0,0 +1,41 @@
|
||||
Only in emacs-21.3: configure.in~
|
||||
Only in emacs-21.3: patchfile
|
||||
Only in emacs-21.3/src: Makefile.in~
|
||||
diff -rc emacs-orig/src/s/gnu-linux.h emacs-21.3/src/s/gnu-linux.h
|
||||
*** emacs-orig/src/s/gnu-linux.h 2001-09-28 17:50:04.000000000 +0200
|
||||
--- emacs-21.3/src/s/gnu-linux.h 2004-10-06 13:13:19.000000000 +0200
|
||||
***************
|
||||
*** 173,179 ****
|
||||
/* GNU/Linux usually has crt0.o in a non-standard place */
|
||||
#define START_FILES pre-crt0.o /usr/lib/crt0.o
|
||||
#else
|
||||
! #define START_FILES pre-crt0.o /usr/lib/crt1.o /usr/lib/crti.o
|
||||
#endif
|
||||
|
||||
#ifdef __ELF__
|
||||
--- 173,179 ----
|
||||
/* GNU/Linux usually has crt0.o in a non-standard place */
|
||||
#define START_FILES pre-crt0.o /usr/lib/crt0.o
|
||||
#else
|
||||
! #define START_FILES pre-crt0.o crt1.o crti.o
|
||||
#endif
|
||||
|
||||
#ifdef __ELF__
|
||||
***************
|
||||
*** 225,231 ****
|
||||
#else
|
||||
#undef LIB_GCC
|
||||
#define LIB_GCC
|
||||
! #define LIB_STANDARD -lgcc -lc -lgcc /usr/lib/crtn.o
|
||||
#endif
|
||||
|
||||
/* Don't use -g in test compiles in configure.
|
||||
--- 225,231 ----
|
||||
#else
|
||||
#undef LIB_GCC
|
||||
#define LIB_GCC
|
||||
! #define LIB_STANDARD -lgcc -lc -lgcc crtn.o
|
||||
#endif
|
||||
|
||||
/* Don't use -g in test compiles in configure.
|
||||
Only in emacs-21.3/src/s: gnu-linux.h~
|
||||
28
pkgs/applications/editors/emacs-21/default.nix
Normal file
28
pkgs/applications/editors/emacs-21/default.nix
Normal file
@@ -0,0 +1,28 @@
|
||||
{ xawSupport ? true
|
||||
, xpmSupport ? true
|
||||
, xaw3dSupport ? false
|
||||
, stdenv, fetchurl, ncurses, x11, libXaw ? null, libXpm ? null, Xaw3d ? null
|
||||
}:
|
||||
|
||||
assert xawSupport && !xaw3dSupport -> libXaw != null;
|
||||
assert xawSupport && xaw3dSupport -> Xaw3d != null;
|
||||
assert xpmSupport -> libXpm != null;
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "emacs-21.4a";
|
||||
builder = ./builder.sh;
|
||||
src = fetchurl {
|
||||
url = http://nixos.org/tarballs/emacs-21.4a.tar.gz;
|
||||
md5 = "8f9d97cbd126121bd5d97e5e31168a87";
|
||||
};
|
||||
patches = [./crt.patch];
|
||||
buildInputs = [
|
||||
ncurses x11
|
||||
(if xawSupport then if xaw3dSupport then Xaw3d else libXaw else null)
|
||||
(if xpmSupport then libXpm else null)
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "All Hail Emacs, the ultimate editor";
|
||||
};
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
source $stdenv/setup
|
||||
|
||||
preConfigure=preConfigure
|
||||
preConfigure() {
|
||||
libc=$(cat ${NIX_GCC}/nix-support/orig-libc)
|
||||
echo "libc: $libc"
|
||||
|
||||
@@ -16,17 +16,17 @@ 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";
|
||||
|
||||
@@ -42,7 +42,5 @@ stdenv.mkDerivation rec {
|
||||
|
||||
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,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 ];
|
||||
};
|
||||
}
|
||||
40
pkgs/applications/editors/emacs-modes/eieio/default.nix
Normal file
40
pkgs/applications/editors/emacs-modes/eieio/default.nix
Normal file
@@ -0,0 +1,40 @@
|
||||
{ fetchurl, stdenv, emacs }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "eieio-0.17";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/cedet/${name}.tar.gz";
|
||||
sha256 = "0n31z9d47ar10g9xrnzz3nl4pmixw1nkk0kpxaillls7xvjd1zy2";
|
||||
};
|
||||
|
||||
buildInputs = [ emacs ];
|
||||
|
||||
doCheck = false;
|
||||
checkPhase = "make test";
|
||||
|
||||
installPhase = ''
|
||||
ensureDir "$out/share/emacs/site-lisp"
|
||||
cp -v *.el *.elc "$out/share/emacs/site-lisp"
|
||||
chmod a-x "$out/share/emacs/site-lisp/"*
|
||||
|
||||
ensureDir "$out/share/info"
|
||||
cp -v *.info* "$out/share/info"
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "EIEIO: Enhanced Implementation of Emacs Interpreted Objects";
|
||||
|
||||
longDescription = ''
|
||||
This package is now part of CEDET, please upgrade.
|
||||
|
||||
EIEIO is a package which implements a CLOS subset for Emacs. It
|
||||
includes examples which can draw simple tree graphs, and bar
|
||||
charts.
|
||||
'';
|
||||
|
||||
license = "GPLv2+";
|
||||
|
||||
homepage = http://cedet.sourceforge.net/;
|
||||
};
|
||||
}
|
||||
@@ -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 ];
|
||||
};
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
{ stdenv, fetchurl, emacs, texinfo
|
||||
, mpg321, vorbisTools, taglib, mp3info, alsaUtils }:
|
||||
, mpg321, vorbisTools, taglib, alsaUtils }:
|
||||
|
||||
# XXX: EMMS also supports Xine, MPlayer, Jack, etc.
|
||||
|
||||
@@ -36,18 +36,12 @@ stdenv.mkDerivation rec {
|
||||
# Use the libtag info back-end for MP3s since we're building it.
|
||||
sed -i "emms-setup.el" \
|
||||
-e 's|emms-info-mp3info|emms-info-libtag|g'
|
||||
|
||||
# But use mp3info for the tag editor.
|
||||
sed -i "emms-info-mp3info.el" \
|
||||
-e 's|emms-info-mp3info-program-name[[:blank:]]\+"mp3info"|emms-info-mp3info-program-name "${mp3info}/bin/mp3info"|g'
|
||||
sed -i "emms-tag-editor.el" \
|
||||
-e 's|"mp3info"|"${mp3info}/bin/mp3info"|g'
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
ensureDir "$out/bin" && cp emms-print-metadata "$out/bin"
|
||||
'';
|
||||
|
||||
|
||||
meta = {
|
||||
description = "GNU EMMS, The Emacs Multimedia System";
|
||||
|
||||
@@ -63,10 +57,6 @@ stdenv.mkDerivation rec {
|
||||
'';
|
||||
|
||||
homepage = http://www.gnu.org/software/emms/;
|
||||
|
||||
license = "GPLv3+";
|
||||
|
||||
maintainers = [ stdenv.lib.maintainers.ludo ];
|
||||
platforms = stdenv.lib.platforms.gnu;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,25 +1,17 @@
|
||||
{stdenv, fetchurl, emacs}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "haskell-mode-2.8.0";
|
||||
|
||||
name = "haskell-mode-2.4";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://projects.haskell.org/haskellmode-emacs/${name}.tar.gz";
|
||||
sha256 = "1065g4xy3ca72xhqh6hfxs5j3mls82bli8w5rhz1npzyfwlwhkb1";
|
||||
url = "http://www.iro.umontreal.ca/~monnier/elisp/${name}.tar.gz";
|
||||
sha256 = "1s2dd0clwm0qaq7z43vxx437l48c88yrd3z1a6qhbq8aak9y8jc5";
|
||||
};
|
||||
|
||||
|
||||
buildInputs = [emacs];
|
||||
|
||||
|
||||
installPhase = ''
|
||||
ensureDir "$out/share/emacs/site-lisp"
|
||||
cp *.el *.elc *.hs "$out/share/emacs/site-lisp/"
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = "http://projects.haskell.org/haskellmode-emacs/";
|
||||
description = "Haskell mode package for Emacs";
|
||||
|
||||
platforms = stdenv.lib.platforms.unix;
|
||||
maintainers = [ stdenv.lib.maintainers.simons ];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
{stdenv, fetchsvn}:
|
||||
|
||||
let
|
||||
revision = "73";
|
||||
in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "hol_light_mode-${revision}";
|
||||
|
||||
src = fetchsvn {
|
||||
url = http://seanmcl-ocaml-lib.googlecode.com/svn/trunk/workshop/software/emacs;
|
||||
rev = revision;
|
||||
sha256 = "3ca83098960439da149a47e1caff32536601559a77f04822be742a390c67feb7";
|
||||
};
|
||||
|
||||
installPhase = ''
|
||||
DEST=$out/share/emacs/site-lisp
|
||||
ensureDir $DEST
|
||||
cp -a * $DEST
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "A HOL Light mode for emacs";
|
||||
};
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
source $stdenv/setup
|
||||
|
||||
mkdir -p $out/share/emacs/site-lisp
|
||||
cp $src $out/share/emacs/site-lisp/htmlize.el
|
||||
@@ -1,16 +0,0 @@
|
||||
{ stdenv, fetchurl }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "htmlize-1.37";
|
||||
|
||||
builder = ./builder.sh;
|
||||
|
||||
src = fetchurl {
|
||||
url = http://fly.srk.fer.hr/~hniksic/emacs/htmlize.el;
|
||||
sha256 = "17sbhf4r6jh4610x8qb2y0y3hww7w33vfsjqg4vrz99pr29xffry";
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "Convert buffer text and decorations to HTML.";
|
||||
};
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
{ stdenv, fetchurl, emacs }:
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "emacs-jabber";
|
||||
version = "0.8.0";
|
||||
name = "${pname}-${version}";
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/${pname}/${name}.tar.bz2";
|
||||
sha256 = "75e3b7853de4783b8ab8270dcbe6a1e4f576224f77f7463116532e11c6498c26";
|
||||
};
|
||||
buildInputs = [ emacs ];
|
||||
meta = {
|
||||
description = "A Jabber client for Emacs";
|
||||
longDescription = ''
|
||||
jabber.el is a Jabber client for Emacs. It may seem strange to have a
|
||||
chat client in an editor, but consider that chatting is, after all, just
|
||||
a special case of text editing.
|
||||
'';
|
||||
homepage = http://emacs-jabber.sourceforge.net/;
|
||||
license = [ "GPLv2+" ];
|
||||
maintainers = with stdenv.lib.maintainers; [ astsmtl ];
|
||||
platforms = with stdenv.lib.platforms; linux;
|
||||
};
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
Make sure `build.properties' is honored.
|
||||
|
||||
--- jde/build.xml
|
||||
+++ jde/build.xml
|
||||
@@ -14,6 +14,7 @@
|
||||
<property name="project.version" value="2.4.0"/>
|
||||
<property name="config.dir" location="./config"/>
|
||||
|
||||
+ <property file="build.properties"/>
|
||||
|
||||
<!-- everything depends on this initialization target -->
|
||||
<target name="init">
|
||||
@@ -1,18 +0,0 @@
|
||||
JDE insists on seeing CEDET's source tree layout, with various
|
||||
sub-directories (`common', `eieio', etc.). However, the installed CEDET
|
||||
is flat, with everything under ${cedet}/share/emacs/site-lisp.
|
||||
|
||||
--- jde/config/build.el (revision 90)
|
||||
+++ jde/config/build.el (working copy)
|
||||
@@ -50,10 +50,5 @@ PATHS are sub directories under CEDET-DI
|
||||
(jde-make-autoloads-and-compile (expand-file-name "@{build.lisp.dir}")
|
||||
"@{src.lisp.dir}"
|
||||
"@{cedet.dir}"
|
||||
- '("common"
|
||||
- "eieio"
|
||||
- "semantic"
|
||||
- "semantic/bovine"
|
||||
- "speedbar"
|
||||
- )
|
||||
+ '(".")
|
||||
"@{build.lisp.autoload.libname}")
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user