Compare commits

..

1 Commits

Author SHA1 Message Date
Eelco Dolstra
9f61e1b99f * Mark as stable.
svn path=/nixpkgs/branches/0.9-release/; revision=4650
2006-01-31 17:02:26 +00:00
1788 changed files with 17109 additions and 130102 deletions

31
COPYING
View File

@@ -1,31 +0,0 @@
Copyright (c) 2003-2006 Eelco Dolstra
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
======================================================================
Note: the license above does not apply to the packages built by the
Nix Packages collection, merely to the package descriptions (i.e., Nix
expressions, build scripts, etc.). Also, the license does not apply
to some of the binaries used for bootstrapping Nixpkgs (e.g.,
pkgs/stdenv/linux/tools/bash). It also might not apply to patches
included in Nixpkgs, which may be derivative works of the packages to
which they apply. The aforementioned artifacts are all covered by the
licenses of the respective packages.

2
STABLE
View File

@@ -1 +1 @@
0
1

View File

@@ -1 +1 @@
0.12
0.9

View File

@@ -1 +0,0 @@
import ./pkgs/top-level/all-packages.nix

View File

@@ -1,15 +1,12 @@
# You may need to override this.
docbookxsl = $(HOME)/.nix-profile/xml/xsl/docbook
ENV = SGML_CATALOG_FILES=$(docbookcatalog)
XMLLINT = xmllint --catalogs
XSLTPROC = xsltproc --catalogs \
XMLLINT = $(ENV) xmllint --catalogs
XSLTPROC = $(ENV) xsltproc --catalogs \
--param section.autolabel 1 \
--param section.label.includes.component.label 1 \
--param html.stylesheet \'style.css\' \
--param xref.with.number.and.title 1 \
--param toc.section.depth 3 \
--param admon.style \'\' \
--param callout.graphics.extension \'.gif\'
--param toc.section.depth 3
NEWS_OPTS = \
--stringparam generate.toc "article nop" \

View File

@@ -37,8 +37,4 @@
</xsl:element>
</xsl:template>
<xsl:template match="text()">
<xsl:value-of select="translate(., '‘’“”—', concat(&quot;`'&quot;, '&quot;&quot;-'))" />
</xsl:template>
</xsl:stylesheet>

View File

@@ -1,416 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<article xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Nixpkgs Release Notes</title>
<section><title>Release 0.12 (TBA)</title>
<para></para>
</section>
<section><title>Release 0.11 (September 11, 2007)</title>
<para>This release has the following improvements:
<itemizedlist>
<listitem><para>The standard build environment
(<literal>stdenv</literal>) is now pure on the
<literal>x86_64-linux</literal> and <literal>powerpc-linux</literal>
platforms, just as on <literal>i686-linux</literal>. (Purity means
that building and using the standard environment has no dependencies
outside of the Nix store. For instance, it doesnt require an
external C compiler such as <filename>/usr/bin/gcc</filename>.)
Also, the statically linked binaries used in the bootstrap process
are now automatically reproducible, making it easy to update the
bootstrap tools and to add support for other Linux platforms. See
<filename>pkgs/stdenv/linux/make-bootstrap-tools.nix</filename> for
details.</para></listitem>
<listitem><para>Hook variables in the generic builder are now
executed using the <function>eval</function> shell command. This
has a major advantage: you can write hooks directly in Nix
expressions. For instance, rather than writing a builder like this:
<programlisting>
source $stdenv/setup
postInstall=postInstall
postInstall() {
ln -sf gzip $out/bin/gunzip
ln -sf gzip $out/bin/zcat
}
genericBuild</programlisting>
(the <literal>gzip</literal> builder), you can just add this
attribute to the derivation:
<programlisting>
postInstall = "ln -sf gzip $out/bin/gunzip; ln -sf gzip $out/bin/zcat";</programlisting>
and so a separate build script becomes unnecessary. This should
allow us to get rid of most builders in Nixpkgs.</para></listitem>
<listitem><para>It is now possible to have the generic builder pass
arguments to <command>configure</command> and
<command>make</command> that contain whitespace. Previously, for
example, you could say in a builder,
<programlisting>
configureFlags="CFLAGS=-O0"</programlisting>
but not
<programlisting>
configureFlags="CFLAGS=-O0 -g"</programlisting>
since the <literal>-g</literal> would be interpreted as a separate
argument to <command>configure</command>. Now you can say
<programlisting>
configureFlagsArray=("CFLAGS=-O0 -g")</programlisting>
or similarly
<programlisting>
configureFlagsArray=("CFLAGS=-O0 -g" "LDFLAGS=-L/foo -L/bar")</programlisting>
which does the right thing. Idem for <literal>makeFlags</literal>,
<literal>installFlags</literal>, <literal>checkFlags</literal> and
<literal>distFlags</literal>.</para>
<para>Unfortunately you can't pass arrays to Bash through the
environment, so you can't put the array above in a Nix expression,
e.g.,
<programlisting>
configureFlagsArray = ["CFLAGS=-O0 -g"];</programlisting>
since it would just be flattened to a since string. However, you
<emphasis>can</emphasis> use the inline hooks described above:
<programlisting>
preConfigure = "configureFlagsArray=(\"CFLAGS=-O0 -g\")";</programlisting>
</para></listitem>
<listitem><para>The function <function>fetchurl</function> now has
support for two different kinds of mirroring of files. First, it
has support for <emphasis>content-addressable mirrors</emphasis>.
For example, given the <function>fetchurl</function> call
<programlisting>
fetchurl {
url = http://releases.mozilla.org/<replaceable>...</replaceable>/firefox-2.0.0.6-source.tar.bz2;
sha1 = "eb72f55e4a8bf08e8c6ef227c0ade3d068ba1082";
}</programlisting>
<function>fetchurl</function> will first try to download this file
from <link
xlink:href="http://nix.cs.uu.nl/dist/tarballs/sha1/eb72f55e4a8bf08e8c6ef227c0ade3d068ba1082"/>.
If that file doesnt exist, it will try the original URL. In
general, the “content-addressed” location is
<replaceable>mirror</replaceable><literal>/</literal><replaceable>hash-type</replaceable><literal>/</literal><replaceable>hash</replaceable>.
There is currently only one content-addressable mirror (<link
xlink:href="http://nix.cs.uu.nl/dist/tarballs"/>), but more can be
specified in the <varname>hashedMirrors</varname> attribute in
<filename>pkgs/build-support/fetchurl/mirrors.nix</filename>, or by
setting the <envar>NIX_HASHED_MIRRORS</envar> environment variable
to a whitespace-separated list of URLs.</para>
<para>Second, <function>fetchurl</function> has support for
widely-mirrored distribution sites such as SourceForge or the Linux
kernel archives. Given a URL of the form
<literal>mirror://<replaceable>site</replaceable>/<replaceable>path</replaceable></literal>,
it will try to download <replaceable>path</replaceable> from a
configurable list of mirrors for <replaceable>site</replaceable>.
(This idea was borrowed from Gentoo Linux.) Example:
<programlisting>
fetchurl {
url = mirror://gnu/gcc/gcc-4.2.0/gcc-core-4.2.0.tar.bz2;
sha256 = "0ykhzxhr8857dr97z0j9wyybfz1kjr71xk457cfapfw5fjas4ny1";
}</programlisting>
Currently <replaceable>site</replaceable> can be
<literal>sourceforge</literal>, <literal>gnu</literal> and
<literal>kernel</literal>. The list of mirrors is defined in
<filename>pkgs/build-support/fetchurl/mirrors.nix</filename>. You
can override the list of mirrors for a particular site by setting
the environment variable
<envar>NIX_MIRRORS_<replaceable>site</replaceable></envar>, e.g.
<programlisting>
export NIX_MIRRORS_sourceforge=http://osdn.dl.sourceforge.net/sourceforge/</programlisting>
</para>
</listitem>
<listitem><para>Important updates:
<itemizedlist>
<listitem><para>Glibc 2.5.</para></listitem>
<listitem><para>GCC 4.1.2.</para></listitem>
<listitem><para>Gnome 2.16.3.</para></listitem>
<listitem><para>X11R7.2.</para></listitem>
<listitem><para>Linux 2.6.21.7 and 2.6.22.6.</para></listitem>
<listitem><para>Emacs 22.1.</para></listitem>
</itemizedlist>
</para></listitem>
<listitem><para>Major new packages:
<itemizedlist>
<listitem><para>KDE 3.5.6 Base.</para></listitem>
<listitem><para>Wine 0.9.43.</para></listitem>
<listitem><para>OpenOffice 2.2.1.</para></listitem>
<listitem><para>Many Linux system packages to support
NixOS.</para></listitem>
</itemizedlist>
</para></listitem>
</itemizedlist>
</para>
<para>The following people contributed to this release:
Andres Löh,
Arie Middelkoop,
Armijn Hemel,
Eelco Dolstra,
Marc Weber,
Mart Kolthof,
Martin Bravenboer,
Michael Raskin,
Wouter den Breejen and
Yury G. Kudryashov.
</para>
</section>
<section><title>Release 0.10 (October 12, 2006)</title>
<note><para>This release of Nixpkgs requires <link
xlink:href='http://nix.cs.uu.nl/dist/nix/nix-0.10/'>Nix
0.10</link> or higher.</para></note>
<para>This release has the following improvements:</para>
<itemizedlist>
<listitem><para><filename>pkgs/system/all-packages-generic.nix</filename>
is gone, we now just have
<filename>pkgs/top-level/all-packages.nix</filename> that contains
all available packages. This should cause much less confusion with
users. <filename>all-packages.nix</filename> is a function that by
default returns packages for the current platform, but you can
override this by specifying a different <varname>system</varname>
argument.</para></listitem>
<listitem><para>Certain packages in Nixpkgs are now
user-configurable through a configuration file, i.e., without having
to edit the Nix expressions in Nixpkgs. For instance, the Firefox
provided in the Nixpkgs channel is built without the RealPlayer
plugin (for legal reasons). Previously, you could easily enable
RealPlayer support by editing the call to the Firefox function in
<filename>all-packages.nix</filename>, but such changes are not
respected when Firefox is subsequently updated through the Nixpkgs
channel.</para>
<para>The Nixpkgs configuration file (found in
<filename>~/.nixpkgs/config.nix</filename> or through the
<envar>NIXPKGS_CONFIG</envar> environment variable) is an attribute
set that contains configuration options that
<filename>all-packages.nix</filename> reads and uses for certain
packages. For instance, the following configuration file:
<programlisting>
{
firefox = {
enableRealPlayer = true;
};
}</programlisting>
persistently enables RealPlayer support in the Firefox
build.</para>
<para>(Actually, <literal>firefox.enableRealPlayer</literal> is the
<emphasis>only</emphasis> configuration option currently available,
but more are sure to be added.)</para></listitem>
<listitem><para>Support for new platforms:
<itemizedlist>
<listitem><para><literal>i686-cygwin</literal>, i.e., Windows
(using <link xlink:href="http://www.cygwin.com/">Cygwin</link>).
The standard environment on <literal>i686-cygwin</literal> by
default builds binaries for the Cygwin environment (i.e., it
uses Cygwin tools and produces executables that use the Cygwin
library). However, there is also a standard environment that
produces binaries that use <link
xlink:href="http://www.mingw.org/">MinGW</link>. You can use it
by calling <filename>all-package.nix</filename> with the
<varname>stdenvType</varname> argument set to
<literal>"i686-mingw"</literal>.</para></listitem>
<listitem><para><literal>i686-darwin</literal>, i.e., Mac OS X
on Intel CPUs.</para></listitem>
<listitem><para><literal>powerpc-linux</literal>.</para></listitem>
<listitem><para><literal>x86_64-linux</literal>, i.e., Linux on
64-bit AMD/Intel CPUs. Unlike <literal>i686-linux</literal>,
this platform doesnt have a pure <literal>stdenv</literal>
yet.</para></listitem>
</itemizedlist>
</para>
</listitem>
<listitem><para>The default compiler is now GCC 4.1.1.</para></listitem>
<listitem><para>X11 updated to X.orgs X11R7.1.</para></listitem>
<listitem><para>Notable new packages:
<itemizedlist>
<listitem><para>Opera.</para></listitem>
<listitem><para>Microsoft Visual C++ 2005 Express Edition and
the Windows SDK.</para></listitem>
</itemizedlist>
In total there are now around 809 packages in Nixpkgs.</para>
</listitem>
<listitem><para>It is now <emphasis>much</emphasis> easier to
override the default C compiler and other tools in
<literal>stdenv</literal> for specific packages.
<filename>all-packages.nix</filename> provides two utility
functions for this purpose: <function>overrideGCC</function> and
<function>overrideInStdenv</function>. Both take a
<literal>stdenv</literal> and return an augmented
<literal>stdenv</literal>; the formed changes the C compiler, and
the latter adds additional packages to the front of
<literal>stdenv</literal>s initial <envar>PATH</envar>, allowing
tools to be overriden.</para>
<para>For instance, the package <varname>strategoxt</varname>
doesnt build with the GNU Make in <literal>stdenv</literal>
(version 3.81), so we call it with an augmented
<literal>stdenv</literal> that uses GNU Make 3.80:
<programlisting>
strategoxt = (import ../development/compilers/strategoxt) {
inherit fetchurl pkgconfig sdf aterm;
stdenv = overrideInStdenv stdenv [gnumake380];
};
gnumake380 = <replaceable>...</replaceable>;</programlisting>
Likewise, there are many packages that dont compile with the
default GCC (4.1.1), but thats easily fixed:
<programlisting>
exult = import ../games/exult {
inherit fetchurl SDL SDL_mixer zlib libpng unzip;
stdenv = overrideGCC stdenv gcc34;
};</programlisting>
</para></listitem>
<listitem><para>It has also become much easier to experiment with
changes to the <literal>stdenv</literal> setup script (which notably
contains the generic builder). Since edits to
<filename>pkgs/stdenv/generic/setup.sh</filename> trigger a rebuild
of <emphasis>everything</emphasis>, this was formerly quite painful.
But now <literal>stdenv</literal> contains a function to
“regenerate” <literal>stdenv</literal> with a different setup
script, allowing the use of a different setup script for specific
packages:
<programlisting>
pkg = import <replaceable>...</replaceable> {
stdenv = stdenv.regenerate ./my-setup.sh;
<replaceable>...</replaceable>
}</programlisting>
</para></listitem>
<listitem><para>Packages can now have a human-readable
<emphasis>description</emphasis> field. Package descriptions are
shown by <literal>nix-env -qa --description</literal>. In addition,
theyre shown on the Nixpkgs release page. A description can be
added to a package as follows:
<programlisting>
stdenv.mkDerivation {
name = "exult-1.2";
<replaceable>...</replaceable>
meta = {
description = "A reimplementation of the Ultima VII game engine";
};
}</programlisting>
The <varname>meta</varname> attribute is not passed to the builder,
so changes to the description do not trigger a rebuild. Additional
<varname>meta</varname> attributes may be defined in the future
(such as the URL of the packages homepage, the license,
etc.).</para></listitem>
</itemizedlist>
<para>The following people contributed to this release:
Andres Löh,
Armijn Hemel,
Christof Douma,
Eelco Dolstra,
Eelco Visser,
Mart Kolthof,
Martin Bravenboer,
Merijn de Jonge,
Rob Vermaas and
Roy van den Broek.
</para>
</section>
<?xml version="1.0"?>
<!DOCTYPE book
PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
"http://www.docbook.org/xml/4.3/docbook-xml-4.3.zip"
[
]>
<article><title>Nixpkgs Release Notes</title>
<section><title>Release 0.9 (January 31, 2006)</title>
@@ -421,8 +16,8 @@ some of the more notable changes:</para>
<itemizedlist>
<listitem><para>Distribution files have been moved to <link
xlink:href="http://nix.cs.uu.nl/" />.</para></listitem>
<listitem><para>Distribution files have been moved to <ulink
url="http://nix.cs.uu.nl/" />.</para></listitem>
<listitem><para>The C library on Linux, Glibc, has been updated to
version 2.3.6.</para></listitem>
@@ -437,7 +32,7 @@ some of the more notable changes:</para>
working X server (previously we only had X client libraries). We
use a fully Nixified X server on NixOS.</para></listitem>
<listitem><para>The Sun JDK 5 has been purified, i.e., it doesnt
<listitem><para>The Sun JDK 5 has been purified, i.e., it doesn't
require any non-Nix components such as
<filename>/lib/ld-linux.so.2</filename>. This means that Java
applications such as Eclipse and Azureus can run on
@@ -554,10 +149,9 @@ hashing scheme in Nix 0.8.</para>
<listitem>
<para>Tarballs used by Nixpkgs are now obtained from the same server
that hosts Nixpkgs (<link
xlink:href="http://catamaran.labs.cs.uu.nl/" />). This reduces the
risk of packages being unbuildable due to moved or deleted files on
various servers.</para>
that hosts Nixpkgs (<ulink url="http://catamaran.labs.cs.uu.nl/" />).
This reduces the risk of packages being unbuildable due to moved or
deleted files on various servers.</para>
</listitem>

View File

@@ -10,6 +10,7 @@ body
{
font-family: sans-serif;
background: white;
margin: 2em 1em 2em 1em;
}
@@ -33,28 +34,16 @@ h2 /* chapters, appendices, subtitle */
div.chapter > div.titlepage h2, div.appendix > div.titlepage h2
{
margin-top: 1.5em;
/* border-top: solid #005aa0; */
}
div.section > div.titlepage h2 /* sections */
div.sect1 h2 /* sections */
{
font-size: 150%;
margin-top: 1.5em;
}
h3 /* subsections */
{
font-size: 125%;
}
div.appendix h3
{
font-size: 150%;
margin-top: 1.5em;
}
div.refnamediv h2, div.refsynopsisdiv h2, div.refsection h2 /* refentry parts */
{
margin-top: 1.4em;
font-size: 125%;
}
@@ -63,23 +52,30 @@ div.refsection h3
font-size: 110%;
}
h3 /* subsections */
{
font-size: 125%;
}
/***************************************************************************
Examples:
Program listings:
***************************************************************************/
div.example
{
border: 1px solid #6185a0;
padding: 6px 6px;
margin-left: 1.5em;
margin-right: 1.5em;
background: #f4f4f8;
margin-left: 3em;
margin-right: 3em;
background: #eeeeee;
}
div.example p.title
pre.programlisting
{
margin-top: 0em;
color: #600000;
font-family: monospace;
}
@@ -87,63 +83,41 @@ div.example p.title
Screen dumps:
***************************************************************************/
pre.screen, pre.programlisting
pre.screen
{
border: 1px solid #6185a0;
padding: 3px 3px;
margin-left: 1.5em;
margin-right: 1.5em;
padding: 6px 6px;
margin-left: 3em;
margin-right: 3em;
color: #600000;
background: #f4f4f8;
background: #eeeeee;
font-family: monospace;
/* font-size: 90%; */
}
div.example pre.programlisting
{
border: 0px;
padding: 0 0;
margin: 0 0 0 0;
}
/***************************************************************************
Notes, warnings etc:
***************************************************************************/
.note, .warning
.note,.warning
{
border: 1px solid #6185a0;
padding: 3px 3px;
margin-left: 1.5em;
margin-right: 1.5em;
margin-top: 1em;
margin-bottom: 1em;
padding: 0.3em 0.3em 0.3em 0.3em;
border: 1px solid #6185a0;
padding: 0px 1em;
background: #fffff5;
}
div.note, div.warning
div.note,div.warning
{
font-style: italic;
}
div.note h3, div.warning h3
div.warning h3
{
color: red;
font-size: 100%;
// margin: 0 0 0 0;
padding-right: 0.5em;
display: inline;
}
div.note p, div.warning p
{
margin-bottom: 0em;
}
div.note h3 + p, div.warning h3 + p
{
display: inline;
}
div.note h3
@@ -193,19 +167,9 @@ tt, code
}
div.variablelist dd p, div.glosslist dd p
div.variablelist dd
{
margin-top: 0em;
}
div.variablelist dd, div.glosslist dd
{
margin-left: 1.5em;
}
div.glosslist dt
{
font-style: italic;
margin-bottom: 1em;
}
.default
@@ -268,16 +232,3 @@ table.productionset table.productionset
{
font-family: monospace;
}
strong.command
{
// font-family: monospace;
// font-style: italic;
// font-weight: normal;
color: #400000;
}
div.calloutlist td
{
padding-bottom: 1em;
}

View File

@@ -1,6 +1,3 @@
*** 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:
@@ -37,6 +34,22 @@ include/X11/IntrinsicP.h:202:25: X11/ObjectP.h: No such file or directory
(moved to include/X11; should edit include/Makefile.am)
* `ld' on Mac OS X barfs if the timestamp on static libraries has
changed (which happens if they are installed through a substitute).
Typical error:
/usr/bin/ld: table of contents for archive: libATerm.a is out of
date; rerun ranlib(1) (can't load from it)
Solution: patch ld.
Non-solution: extend NAR file format to include timestamps. We
don't want that because they introduce a source of non-determinism.
To catch problems like this one determistically, we should change
the timestamp on store objects to 0.
* In gtksourceview-sharp: does the prefix patch cause problems (e.g.,
makefile.am says "mimeinfodir should be the same as the gnome
prefix")?

View File

@@ -1,97 +0,0 @@
Some conventions:
* 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
}:

View File

@@ -1,31 +0,0 @@
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.

View File

@@ -20,9 +20,6 @@ The tools can be found in nixpkgs in:
- 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

View File

@@ -2,6 +2,8 @@
directories for libraries (like setup.sh does now). [do we want
this?]
* In setup.sh: add configureFlagsArray or something
* Inform freedesktop people that Xaw requires Xpm.
* After building gcc, filter out references to /tmp/nix... in

View File

@@ -1,76 +1,31 @@
#! /bin/sh -e
distDir=/data/webserver/dist/tarballs
find "$1" -name "*.nix" | while read fn; do
find . -name "*.nix" | while read fn; do
grep -E '^ *url = ' "$fn" | while read line; do
if url=$(echo "$line" | sed 's^url = \(.*\);^\1^'); then
if oldURL=$(echo "$line" | sed 's^url = \(.*\);^\1^'); then
if ! echo "$url" | grep -q -E "www.cs.uu.nl|nix.cs.uu.nl|.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 ! echo "$oldURL" | grep -q -E "www.cs.uu.nl|nix.cs.uu.nl|.stratego-language.org|java.sun.com|ut2004|linuxq3a|RealPlayer|Adbe"; then
base=$(basename $oldURL)
newURL="http://nix.cs.uu.nl/dist/tarballs/$base"
newPath="/data/webserver/dist/tarballs/$base"
echo "$fn: $oldURL -> $newURL"
if test -e "$newPath"; then
# if test -e "$newPath"; then
# echo "WARNING: $newPath exists!"
# else
if ! test -e "$newPath"; then
curl --fail --location --max-redirs 20 "$oldURL" > "$newPath".tmp
mv -f "$newPath".tmp "$newPath"
#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
sed "s^$oldURL^$newURL^" < "$fn" > "$fn".tmp
mv -f "$fn".tmp "$fn"
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
@@ -78,6 +33,4 @@ find "$1" -name "*.nix" | while read fn; do
done
done
echo DONE
done

View File

@@ -1,22 +0,0 @@
#! /usr/bin/perl -w
use strict;
my %map;
open LIST1, "<$ARGV[0]" or die;
while (<LIST1>) {
/^(\S+)\s+(.*)$/;
$map{$1} = $2;
}
open LIST1, "<$ARGV[1]" or die;
while (<LIST1>) {
/^(\S+)\s+(.*)$/;
if (!defined $map{$1}) {
print STDERR "missing file: $2\n";
next;
}
print "$2\n";
print "$map{$1}\n";
}

View File

@@ -1,146 +0,0 @@
/* Tool to sort attribute sets. Primarily useful for keeping
all-packages.nix tidy.
To compile:
$ strc -i ../../maintainers/scripts/sort-attrs.str -la stratego-lib
Typical invocation:
$ sglr -m -p ~/Dev/nix/src/libexpr/nix.tbl -i all-packages.nix \
| implode-asfix --lex \
| ../../maintainers/scripts/sort-attrs \
| asfix-yield
*/
module sort-attrs
imports
libstratego-lib
libstratego-sglr
strategies
no-wsp = !appl(prod([], cf(opt(layout())), no-attrs()), [])
rules
list-sep(s): [] -> []
list-sep(s): [x | xs] -> [[x | before] | <list-sep(s)> [split | after]]
where
<split-fetch-keep(s)> xs => (before, split, after)
list-sep(s): [x | xs] -> [[x | xs]]
where
<not(split-fetch-keep(s))> xs
list-sep-end(s): xs -> [<conc> (before, [split]) | <list-sep-end(s)> after]
where
<split-fetch-keep(s)> xs => (before, split, after)
list-sep-end(s): xs -> [xs]
where
<not(split-fetch-keep(s))> xs
sort-attrs:
appl(p@prod(_, _, attrs([term(cons("Attrs"))])),
[ lit("{")
, ws1
, appl(p2@list(cf(iter-star(sort("Bind")))), attrs)
, ws2
, lit("}")
]
) ->
appl(p, [lit("{"), <no-wsp>, appl(p2, <concat> attrs'), ws2, lit("}")])
where
<debug> "found it";
<attach-wsp> [ws1 | attrs] => withWSP;
<list-sep(starts-section)> withWSP => groups;
<length; debug> groups;
<map({x', x'', x''', xs', starts, starts': \[x | xs] -> [x''' | xs']
where
<remove-section-start> x => (x', starts);
<map(regularise-empty-lines); if !starts; debug; sortable-section; debug then qsort(compare-attrs) else id end> [x' | xs] => [x'' | xs'];
<[] <+ \x -> ["\n\n\n" | x]\ > starts => starts';
<prepend-layout> (starts', x'') => x'''
\ })> groups => attrs';
<debug> "did it"
attach-wsp: [a, b | cs] -> [(a, b) | <attach-wsp> cs]
attach-wsp: [] -> []
strategies
starts-section =
?x@(appl(prod([cf(layout())], cf(opt(layout())), no-attrs()), cs), attr);
<implode-string; is-substring(!"###")> cs;
!x
rules
sortable-section = ?[s]; !s; explode-string; not(fetch({x: ?x; !(x, 97); geq}))
remove-section-start:
(appl(prod([cf(layout())], cf(opt(layout())), no-attrs()), cs), attr) ->
((appl(prod([cf(layout())], cf(opt(layout())), no-attrs()), cs'), attr), starts)
where
!cs;
list-sep-end(?10); // separate into lines, keeping the \n
map(implode-string);
partition(where(is-substring(!"###"))) => (starts, rest);
<map(explode-string); concat> rest => cs'
regularise-empty-lines:
(appl(prod([cf(layout())], cf(opt(layout())), no-attrs()), cs), attr) ->
(appl(prod([cf(layout())], cf(opt(layout())), no-attrs()), cs''), attr)
where
// separate into lines, keeping the \n
// last whitespace is significant, keep
<list-sep-end(?10); split-init-last> cs => (init, last);
<regularise-empty-lines'> init => cs'; // remove whitespace-only lines
<concat> [<explode-string> "\n\n", <concat> cs', last] => cs'' // add one empty line
/* Dirty hack: *do* keep the first empty line following a non-empty line. !!! order matters */
regularise-empty-lines': [] -> []
regularise-empty-lines': [x, y | xs] -> [x, y | <regularise-empty-lines'> xs]
where
<fetch-elem(not(?10 <+ ?32))> x;
<not(fetch-elem(not(?10 <+ ?32)))> y
regularise-empty-lines': [x | xs] -> [x | <regularise-empty-lines'> xs]
where <fetch-elem(not(?10 <+ ?32))> x
regularise-empty-lines': [x | xs] -> <regularise-empty-lines'> xs
where <not(fetch-elem(not(?10 <+ ?32)))> x
prepend-layout:
(text, (appl(prod([cf(layout())], cf(opt(layout())), no-attrs()), cs), attr)) ->
(appl(prod([cf(layout())], cf(opt(layout())), no-attrs()), cs''), attr)
where
<implode-string> cs => cs';
<conc-strings; explode-string> (<concat-strings> text, cs') => cs''
compare-attrs:
x@
( (_, appl(p1@prod(_, _, attrs([term(cons("Bind"))])), [id1 | xs1]))
, (_, appl(p2@prod(_, _, attrs([term(cons("Bind"))])), [id2 | xs2]))
)
-> x
where
<string-lt> (id1, id2)
strategies
main = io-wrap(
oncetd(sort-attrs)
)

View File

@@ -1,35 +0,0 @@
args: with args;
let localDefs = builderDefs {
src =
fetchurl {
url = mirror://sourceforge/audacity/audacity-src-1.3.3.tar.gz;
sha256 = "17bjc2rnqspg1mbay4b1hhgg08iadapwf6w98gbv3r84rv1mhgls";
};
buildInputs =[(wxGTK null) libogg libvorbis libsndfile libmad pkgconfig gtk
gettext glib];
} null;
in with localDefs;
let
postInstall = FullDepEntry ("
old_rpath=$(patchelf --print-rpath \$out/bin/audacity);
patchelf --set-rpath \$old_rpath:${gtk}/lib:${glib}/lib \$out/bin/audacity;
") [minInit];
preBuild = FullDepEntry ("
sed -e '/\\/usr\\/local\\/lib\\/ladspa/awxGetApp()."+
"AddUniquePathToPathList(wxGetenv(wxT(\"HOME\"))+"+
"wxT(\"/.ladspa-plugins\"), pathList);'
") [minInit];
in
stdenv.mkDerivation {
name = "audacity-1.3.3";
builder = writeScript "audacity-1.3.3-builder"
(textClosure localDefs [addInputs (doDump "0") (noDepEntry "echo \$PATH; ar --version") doConfigure preBuild doMakeInstall postInstall doForceShare]);
meta = {
description = "Audacity sound editor.";
homepage = http://audacity.sourceforge.net;
};
}

View File

@@ -1,6 +0,0 @@
source $stdenv/setup
ensureDir "$out/lib/bmp/Input"
installFlags="install libdir=$out/lib/bmp/Input"
genericBuild

View File

@@ -1,11 +0,0 @@
{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];
}

View File

@@ -1,11 +0,0 @@
source $stdenv/setup
buildFlags="-f Makefile.bmp"
installPhase=installPhase
installPhase() {
ensureDir "$out/lib/bmp/Input"
cp libwma.so "$out/lib/bmp/Input"
}
genericBuild

View File

@@ -1,11 +0,0 @@
{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];
}

View File

@@ -1,21 +0,0 @@
{ 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];
}

View File

@@ -3,13 +3,9 @@
stdenv.mkDerivation {
name = "cdparanoia-III-alpha9.8";
src = fetchurl {
url = http://downloads.xiph.org/releases/cdparanoia/cdparanoia-III-alpha9.8.src.tgz;
md5 = "7218e778b5970a86c958e597f952f193";
url = http://nix.cs.uu.nl/dist/tarballs/cdparanoia-III-alpha9.8.src.tgz;
md5 = "7218e778b5970a86c958e597f952f193" ;
};
patches = [./fix.patch];
meta = {
homepage = http://xiph.org/paranoia;
};
}

View File

@@ -1,19 +1,11 @@
args: with args;
let
flacFun = version: hash:
stdenv.mkDerivation rec {
name = "flac-${version}";
src = fetchurl ({
url = "http://downloads.xiph.org/releases/flac/${name}.tar.gz";
} // hash);
buildInputs = [libogg];
meta = {
homepage = http://flac.sourceforge.net;
};
};
in
stdenv.lib.listOfListsToAttrs [
[ "default" (flacFun "1.2.1" { sha256 = "1pry5lgzfg57pga1zbazzdd55fkgk3v5qy4axvrbny5lrr5s8dcn"; }) ]
[ "1.2.1" (flacFun "1.2.1" { sha256 = "1pry5lgzfg57pga1zbazzdd55fkgk3v5qy4axvrbny5lrr5s8dcn"; }) ]
[ "1.1.2" (flacFun "1.1.2" { md5 = "2bfc127cdda02834d0491ab531a20960"; }) ]
]
{stdenv, fetchurl, libogg}:
stdenv.mkDerivation {
name = "flac-1.1.1";
src = fetchurl {
url = http://nix.cs.uu.nl/dist/tarballs/flac-1.1.1.tar.gz;
md5 = "c6ccddccf8ad344065698047c2fc7280" ;
};
buildInputs = [libogg] ;
}

View File

@@ -1,28 +0,0 @@
args: with args;
let localDefs = builderDefs {
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 = [];
} null;
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";
builder = writeScript "swh-plugins-0.4.15-builder"
(textClosure localDefs [doConfigure doMakeInstall
postInstall doForceShare]);
meta = {
description = "
LADSPA format audio plugins.
";
};
}

View File

@@ -1,29 +0,0 @@
args: with args;
let
src =
fetchurl {
url = http://www.ladspa.org/ladspa_sdk/ladspa.h.txt;
sha256 = "1b908csn85ng9sz5s5d1mqk711cmawain2z8px2ajngihdrynb67";
};
in
let localDefs = builderDefs {
buildInputs = [];
inherit src;
} null;
in with localDefs;
let
copyFile = FullDepEntry ("
ensureDir \$out/include
cp ${src} \$out/include/ladspa.h
") [minInit defEnsureDir];
in
stdenv.mkDerivation {
name = "ladspa.h";
builder = writeScript "ladspa.h-builder"
(textClosure localDefs [copyFile]);
meta = {
description = "
LADSPA format audio plugins.
";
};
}

View File

@@ -1,9 +1,9 @@
{stdenv, fetchurl}:
stdenv.mkDerivation {
name = "lame-3.97";
name = "lame-3.96.1";
src = fetchurl {
url = mirror://sourceforge/lame/lame-3.97.tar.gz ;
sha256 = "05xy9lv6m9s013lzlvhxwvr1586c239xaiiwka52k18hs6k388qa";
url = http://nix.cs.uu.nl/dist/tarballs/lame-3.96.1.tar.gz;
md5 = "e1206c46a5e276feca11a7149e2fc6ac" ;
};
}

View File

@@ -1,36 +0,0 @@
args : with args;
let localDefs = builderDefs {
src =
fetchurl {
url = ftp://ccrma-ftp.stanford.edu/pub/Lisp/snd-9.4.tar.gz;
sha256 = "0zqgfnkvkqxby1k74mwba1r4pb520glcsz5jjmpzm9m41nqnghmm";
};
buildInputs = [gtk glib pkgconfig libXpm gmp gettext]
++ (lib.optional (args ? ruby) args.ruby)
++ (lib.optional (args ? mesa) args.mesa)
++ (lib.optional (args ? guile) args.guile)
++ (lib.optional (args ? libtool) args.libtool)
++ (lib.optional (args ? sndlib) args.sndlib)
;
configureFlags = ["--with-gtk" "--with-xpm"]
++ (lib.optional (args ? ruby) "--with-ruby" )
++ (lib.optional (args ? mesa) "--with-gl" )
++ (lib.optional (args ? guile) "--with-guile")
++ (lib.optional (args ? sndlib) "--with-midi" )
;
} null; /* null is a terminator for sumArgs */
in with localDefs;
let preBuild = FullDepEntry ("
cp config.log /tmp/snd-config.log
") [minInit doUnpack];
in
stdenv.mkDerivation rec {
name = "Snd-9.4";
builder = writeScript (name + "-builder")
(textClosure localDefs [doConfigure preBuild doMakeInstall doForceShare]);
meta = {
description = "Snd sound editor.";
homepage = http://ccrma.stanford.edu/software/snd;
};
}

View File

@@ -4,16 +4,11 @@ stdenv.mkDerivation {
name = "xmms-1.2.10";
src = fetchurl {
url = http://nix.cs.uu.nl/dist/tarballs/xmms-1.2.10.tar.bz2;
md5 = "03a85cfc5e1877a2e1f7be4fa1d3f63c";
md5 = "03a85cfc5e1877a2e1f7be4fa1d3f63c" ;
};
# Patch borrowed from SuSE 10.0 to fix pause/continue on ALSA.
patches = [./alsa.patch];
buildInputs = [alsaLib esound libogg libvorbis glib gtk];
meta = {
description = "A music player very similar to Winamp";
homepage = http://www.xmms.org;
};
}

View File

@@ -1,27 +0,0 @@
{stdenv, fetchurl, x11, libjpeg, libpng, libXmu, freetype, pam}:
stdenv.mkDerivation {
name = "slim-1.2.6";
src = fetchurl {
url = http://download.berlios.de/slim/slim-1.2.6.tar.gz;
sha256 = "0plcmm955rnv67sx67ka6dccanr4rfzwzvsj6lnr8kqdip4522jg";
};
patches = [
# Allow the paths of the configuration file and theme directory to
# be set at runtime.
./runtime-paths.patch
# PAM support from
# http://developer.berlios.de/patch/?func=detailpatch&patch_id=1979&group_id=2663
./pam.patch
];
buildInputs = [x11 libjpeg libpng libXmu freetype pam];
NIX_CFLAGS_COMPILE = "-I${freetype}/include/freetype2";
preBuild = "
substituteInPlace Makefile --replace /usr /no-such-path
makeFlagsArray=(CC=gcc CXX=g++ PREFIX=$out MANDIR=$out/share/man CFGDIR=$out/etc)
";
meta = {
homepage = http://slim.berlios.de;
};
}

View File

@@ -1,369 +0,0 @@
diff -rc slim-1.2.6-orig/app.cpp slim-1.2.6/app.cpp
*** slim-1.2.6-orig/app.cpp 2006-09-15 23:00:37.000000000 +0200
--- slim-1.2.6/app.cpp 2007-06-05 12:45:58.000000000 +0200
***************
*** 25,30 ****
--- 25,68 ----
#include "app.h"
#include "numlock.h"
+ #ifdef USE_PAM
+ #include <security/pam_appl.h>
+ #include <security/pam_misc.h>
+ #include <string>
+
+ pam_handle_t* pamh;
+ char const* PAM_service = "slim"; // <----- Change this, if the patch gets accepted upstream
+ string password;
+
+ int conv(int num_msg, const struct pam_message **msg,
+ struct pam_response **resp, void *appdata_ptr){
+ *resp = (struct pam_response *) calloc(num_msg, sizeof(struct pam_response));
+ for (int i=0; i<num_msg; i++){
+ resp[i]->resp_retcode=0;
+ switch(msg[i]->msg_style){
+ case PAM_PROMPT_ECHO_ON:
+ // We assume PAM is asking for the username
+ // As we should have given that already, this should never happen
+ cerr << APPNAME << ": PAM send an unexpected PAM_PROMPT_ECHO_ON" << endl;
+ cerr << APPNAME << ": " << msg[i]->msg << endl;
+ break;
+
+ case PAM_PROMPT_ECHO_OFF:
+ // We assume PAM is asking for the password
+ resp[i]->resp=x_strdup(password.c_str());
+ break;
+
+ case PAM_ERROR_MSG:
+ case PAM_TEXT_INFO:
+ // We simply right these to the log
+ // TODO: Maybe we should simply ignore them
+ cerr << APPNAME << ": " << msg[i]->msg << endl;
+ break;
+ }
+ }
+ return PAM_SUCCESS;
+ }
+ #endif
extern App* LoginApp;
***************
*** 133,138 ****
--- 171,209 ----
}
}
+ #ifdef USE_PAM
+ int last_result;
+ struct pam_conv pam_conversation = {
+ conv,
+ NULL
+ };
+
+ // Start the PAM session
+ if ((last_result=pam_start(PAM_service, NULL, &pam_conversation, &pamh))!=PAM_SUCCESS){
+ cerr << APPNAME << ": " << pam_strerror(pamh, last_result) << endl;
+ exit(ERR_EXIT);
+ }
+
+ // Setup some PAM items
+ if ((last_result=pam_set_item(pamh, PAM_TTY, DisplayName))!=PAM_SUCCESS){
+ cerr << APPNAME << ": " << pam_strerror(pamh, last_result) << endl;
+ pam_end(pamh, last_result);
+ exit(ERR_EXIT);
+ }
+ char* pam_ruser = "root\0"; // <---- We already checked for this in the constructor
+ if ((last_result=pam_set_item(pamh, PAM_RUSER, pam_ruser))!=PAM_SUCCESS){
+ cerr << APPNAME << ": " << pam_strerror(pamh, last_result) << endl;
+ pam_end(pamh, last_result);
+ exit(ERR_EXIT);
+ }
+ char* pam_rhost = "localhost\0"; // <---- This might not entirely correct
+ if ((last_result=pam_set_item(pamh, PAM_RHOST, pam_rhost))!=PAM_SUCCESS){
+ cerr << APPNAME << ": " << pam_strerror(pamh, last_result) << endl;
+ pam_end(pamh, last_result);
+ exit(ERR_EXIT);
+ }
+ #endif
+
bool loaded = false;
while (!loaded) {
themedir = themebase + themeName;
***************
*** 313,318 ****
--- 384,421 ----
struct passwd *pw;
pid_t pid;
+ #ifdef USE_PAM
+ int last_result;
+ switch ((last_result=pam_setcred(pamh, PAM_ESTABLISH_CRED | PAM_SILENT))){
+ case PAM_SUCCESS:
+ // Credentials was established successfully
+ break;
+
+ case PAM_CRED_ERR:
+ case PAM_CRED_EXPIRED:
+ case PAM_CRED_UNAVAIL:
+ case PAM_USER_UNKNOWN:
+ // Credentials couldn't be established
+ cerr << APPNAME << ": " << pam_strerror(pamh, last_result) << endl;
+ return;
+
+ case PAM_BUF_ERR:
+ case PAM_SYSTEM_ERR:
+ default:
+ // System error -> bail out!
+ last_result=pam_setcred(pamh, PAM_DELETE_CRED);
+ pam_end(pamh, last_result);
+ exit(ERR_EXIT);
+ }
+
+ if ((last_result=pam_open_session(pamh, PAM_SILENT))!=PAM_SUCCESS){
+ cerr << APPNAME << ": " << pam_strerror(pamh, last_result) << endl;
+ pam_setcred(pamh, PAM_DELETE_CRED);
+ // TODO: Do we need more serious actions?
+ return;
+ }
+ #endif
+
pw = LoginPanel->GetInput()->GetPasswdStruct();
if(pw == 0)
return;
***************
*** 320,325 ****
--- 423,433 ----
// Create new process
pid = fork();
if(pid == 0) {
+ #ifdef USE_PAM
+ // Close the child's copy of the PAM-handle
+ pam_end(pamh, PAM_SUCCESS | PAM_DATA_SILENT);
+ #endif
+
// Login process starts here
SwitchUser Su(pw, cfg, DisplayName);
string session = LoginPanel->getSession();
***************
*** 355,361 ****
}
}
! // Close all clients
KillAllClients(False);
KillAllClients(True);
--- 463,477 ----
}
}
! #ifdef USE_PAM
! if ((last_result=pam_close_session(pamh, PAM_SILENT))!=PAM_SUCCESS){
! cerr << APPNAME << ": " << pam_strerror(pamh, last_result) << endl;
! last_result=pam_setcred(pamh, PAM_DELETE_CRED);
! // TODO: Do we need more serious actions?
! }
! #endif
!
! // Close all clients
KillAllClients(False);
KillAllClients(True);
***************
*** 382,387 ****
--- 498,510 ----
// Stop alarm clock
alarm(0);
+ #ifdef USE_PAM
+ int last_result;
+ if ((last_result=pam_end(pamh, PAM_SUCCESS))!=PAM_SUCCESS){
+ cerr << APPNAME << ": " << pam_strerror(pamh, last_result) << endl;
+ }
+ #endif
+
// Write message
LoginPanel->Message((char*)cfg->getOption("reboot_msg").c_str());
sleep(3);
***************
*** 398,403 ****
--- 521,533 ----
// Stop alarm clock
alarm(0);
+ #ifdef USE_PAM
+ int last_result;
+ if ((last_result=pam_end(pamh, PAM_SUCCESS))!=PAM_SUCCESS){
+ cerr << APPNAME << ": " << pam_strerror(pamh, last_result) << endl;
+ }
+ #endif
+
// Write message
LoginPanel->Message((char*)cfg->getOption("shutdown_msg").c_str());
sleep(3);
***************
*** 433,438 ****
--- 563,575 ----
void App::Exit() {
+ #ifdef USE_PAM
+ int last_result;
+ if ((last_result=pam_end(pamh, PAM_SUCCESS))!=PAM_SUCCESS){
+ cerr << APPNAME << ": " << pam_strerror(pamh, last_result) << endl;
+ }
+ #endif
+
if (testing) {
char* testmsg = "This is a test message :-)";
LoginPanel->Message(testmsg);
***************
*** 453,458 ****
--- 590,602 ----
}
void App::RestartServer() {
+ #ifdef USE_PAM
+ int last_result;
+ if ((last_result=pam_end(pamh, PAM_SUCCESS))!=PAM_SUCCESS){
+ cerr << APPNAME << ": " << pam_strerror(pamh, last_result) << endl;
+ }
+ #endif
+
StopServer();
RemoveLock();
Run();
Only in slim-1.2.6/: app.cpp~
diff -rc slim-1.2.6-orig/input.cpp slim-1.2.6/input.cpp
*** slim-1.2.6-orig/input.cpp 2006-09-15 23:00:37.000000000 +0200
--- slim-1.2.6/input.cpp 2007-06-05 12:45:58.000000000 +0200
***************
*** 12,17 ****
--- 12,25 ----
#include "input.h"
#include <cstdlib>
+ #ifdef USE_PAM
+ #include <security/pam_appl.h>
+ #include <string>
+
+ extern pam_handle_t* pamh;
+ extern string password;
+ #endif
+
Input::Input(Cfg* c) {
NameBuffer[0] = '\0';
PasswdBuffer[0] = '\0';
***************
*** 100,106 ****
--- 108,126 ----
struct passwd* Input::GetPasswdStruct() {
+ #ifdef USE_PAM
+ int last_result;
+ char* username=NULL;
+
+ if ((last_result=pam_get_item(pamh, PAM_USER, (const void**)&username))!=PAM_SUCCESS){
+ cerr << APPNAME << ": " << pam_strerror(pamh, last_result) << endl;
+ pam_end(pamh, last_result);
+ exit(ERR_EXIT);
+ }
+ struct passwd* pw = getpwnam(username);
+ #else
struct passwd* pw = getpwnam(NameBuffer);
+ #endif
endpwent();
if (pw->pw_shell[0] == '\0') {
setusershell();
***************
*** 183,188 ****
--- 203,240 ----
}
int Input::Correct() {
+ #ifdef USE_PAM
+ int last_result;
+
+ // Store the password in global variables accessible
+ // by the PAM-conversation function
+ password=PasswdBuffer;
+
+ // Set the username in PAM
+ if ((last_result=pam_set_item(pamh, PAM_USER, NameBuffer))!=PAM_SUCCESS){
+ cerr << APPNAME << ": " << pam_strerror(pamh, last_result) << endl;
+ pam_end(pamh, last_result);
+ exit(ERR_EXIT);
+ }
+
+ // Authenticate the user
+ if ((last_result=pam_authenticate(pamh, PAM_DISALLOW_NULL_AUTHTOK))!=PAM_SUCCESS){
+ cerr << APPNAME << ": " << pam_strerror(pamh, last_result) << endl;
+ if (last_result==PAM_ABORT){
+ pam_end(pamh, last_result);
+ exit(ERR_EXIT);
+ }
+ return 0;
+ }
+
+ // Check the health of the account
+ if ((last_result=pam_acct_mgmt(pamh, PAM_SILENT))!=PAM_SUCCESS){
+ cerr << APPNAME << ": " << pam_strerror(pamh, last_result) << endl;
+ return 0;
+ }
+
+ return 1;
+ #else
char *unencrypted, *encrypted, *correct;
struct passwd *pw;
***************
*** 197,203 ****
if(sp)
correct = sp->sp_pwdp;
else
! #endif
correct = pw->pw_passwd;
if(correct == 0 || correct[0] == '\0')
--- 249,255 ----
if(sp)
correct = sp->sp_pwdp;
else
! #endif /* HAVE_SHADOW */
correct = pw->pw_passwd;
if(correct == 0 || correct[0] == '\0')
***************
*** 207,212 ****
--- 259,265 ----
encrypted = crypt(unencrypted, correct);
memset(unencrypted, 0, strlen (unencrypted));
return (strcmp(encrypted, correct) == 0);
+ #endif /* USE_PAM */
}
diff -rc slim-1.2.6-orig/Makefile slim-1.2.6/Makefile
*** slim-1.2.6-orig/Makefile 2006-09-15 23:00:37.000000000 +0200
--- slim-1.2.6/Makefile 2007-06-05 12:45:58.000000000 +0200
***************
*** 6,13 ****
CXX=/usr/bin/g++
CC=/usr/bin/gcc
CFLAGS=-I. -I/usr/X11R6/include -I/usr/include/freetype2 -I/usr/include/freetype2/config -I/usr/include/libpng12 -I/usr/include
! LDFLAGS=-L/usr/X11R6/lib -lXft -lX11 -lfreetype -lXrender -lfontconfig -lpng12 -lz -lm -lcrypt -lXmu -lpng -ljpeg
! CUSTOM=-DHAVE_SHADOW
PREFIX=/usr
CFGDIR=/etc
MANDIR=/usr/man
--- 6,13 ----
CXX=/usr/bin/g++
CC=/usr/bin/gcc
CFLAGS=-I. -I/usr/X11R6/include -I/usr/include/freetype2 -I/usr/include/freetype2/config -I/usr/include/libpng12 -I/usr/include
! LDFLAGS=-L/usr/X11R6/lib -lXft -lX11 -lfreetype -lXrender -lfontconfig -lpng12 -lz -lm -lcrypt -lXmu -lpng -ljpeg -lpam
! CUSTOM=-DHAVE_SHADOW -DUSE_PAM
PREFIX=/usr
CFGDIR=/etc
MANDIR=/usr/man

View File

@@ -1,41 +0,0 @@
diff -rc slim-1.2.6-orig/app.cpp slim-1.2.6/app.cpp
*** slim-1.2.6-orig/app.cpp Fri Sep 15 23:00:37 2006
--- slim-1.2.6/app.cpp Sun Feb 25 17:30:50 2007
***************
*** 113,119 ****
// Read configuration and theme
cfg = new Cfg;
! cfg->readConf(CFGFILE);
string themebase = "";
string themefile = "";
string themedir = "";
--- 113,121 ----
// Read configuration and theme
cfg = new Cfg;
! char *cfgfile = getenv("SLIM_CFGFILE");
! if (!cfgfile) cfgfile = CFGFILE;
! cfg->readConf(cfgfile);
string themebase = "";
string themefile = "";
string themedir = "";
***************
*** 121,127 ****
if (testing) {
themeName = testtheme;
} else {
! themebase = string(THEMESDIR) + "/";
themeName = cfg->getOption("current_theme");
string::size_type pos;
if ((pos = themeName.find(",")) != string::npos) {
--- 123,131 ----
if (testing) {
themeName = testtheme;
} else {
! char *themesdir = getenv("SLIM_THEMESDIR");
! if (!themesdir) themesdir = THEMESDIR;
! themebase = string(themesdir) + "/";
themeName = cfg->getOption("current_theme");
string::size_type pos;
if ((pos = themeName.find(",")) != string::npos) {

View File

@@ -1,17 +0,0 @@
args : with args;
stdenv.mkDerivation {
name = "bvi-1.3.2";
src = fetchurl {
url = http://prdownloads.sourceforge.net/bvi/bvi-1.3.2.src.tar.gz;
sha256 = "110wxqnyianqamxq4y53drqqxb9vp4k2fcvic45qggvlqkqhlfgz";
};
buildInputs = [ncurses];
meta = {
description = "hex editor with vim style keybindings";
homepage = http://bvi.sourceforge.net/download.html;
license = "GPL2";
};
}

View File

@@ -1,33 +1,37 @@
source $stdenv/setup
source $makeWrapper
unpackFile $src
ensureDir $out
mv eclipse $out/
# Unpack the jars that contain .so files.
#echo "unpacking some jars..."
#for i in $(find $out -name "*.linux*.jar"); do
# echo $i
# cd $(dirname $i) && $jdk/bin/jar -x < $i
# rm $i
#done
# Set the dynamic linker and RPATH.
rpath=
for i in $libraries; do
rpath=$rpath${rpath:+:}$i/lib
done
glibc=$(cat $NIX_GCC/nix-support/orig-glibc)
find $out \( -type f -a -perm +0100 \) \
-print \
-exec patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
-exec patchelf --interpreter $glibc/lib/ld-linux.so.* \
--set-rpath "$rpath" {} \;
#find $out \( -type f -a -name "*.so*" \) \
# -print \
# -exec patchelf --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"
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
for i in $plugins; do
cp $i $out/eclipse/plugins
done

View File

@@ -1,22 +1 @@
{fetchurl, stdenv, makeWrapper, jdk, gtk, glib, libXtst, plugins ? []}:
let {
body =
stdenv.mkDerivation {
name = "eclipse-sdk-3.3.3.1";
builder = ./builder.sh;
src = bindist;
buildInputs = [makeWrapper];
inherit jdk plugins;
libraries = [gtk glib libXtst];
};
bindist =
if (stdenv.system == "x86_64-linux") then fetchurl {
url = "http://ftp-stud.fht-esslingen.de/pub/Mirrors/eclipse/eclipse/downloads/drops/R-3.3.1.1-200710231652/eclipse-SDK-3.3.1.1-linux-gtk-x86_64.tar.gz";
sha256 = "3fec49e95c45b56ad77b2bd15616af9d1fa6c3b338d4c70b497ecdc974c0b030";
} else fetchurl {
url = http://ftp-stud.fht-esslingen.de/pub/Mirrors/eclipse/eclipse/downloads/drops/R-3.3.1.1-200710231652/eclipse-SDK-3.3.1.1-linux-gtk.tar.gz;
sha256 = "409e47745c92ff8ea8b2037104ec90c2f8ce3edb3563fdb312d55e1bbd2ada01";
};
}
import ./eclipse-sdk-3.1.1.nix

View File

@@ -3,7 +3,7 @@
let {
body =
stdenv.mkDerivation {
name = "eclipse-sdk-3.1.2";
name = "eclipse-sdk-3.1.1";
builder = ./builder.sh;
src = bindist;
inherit makeWrapper jdk plugins;
@@ -12,7 +12,7 @@ let {
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";
url = http://nix.cs.uu.nl/dist/tarballs/eclipse-SDK-3.1.1-linux-gtk.tar.gz;
md5 = "a2ae61431657e2ed247867b9a9948290";
};
}

View File

@@ -12,7 +12,7 @@ let {
bindist =
fetchurl {
url = http://sunsite.informatik.rwth-aachen.de/eclipse/downloads/drops/R-3.1-200506271435/eclipse-SDK-3.1-linux-gtk.tar.gz;
url = http://nix.cs.uu.nl/dist/tarballs/eclipse-SDK-3.1-linux-gtk.tar.gz;
md5 = "0441c11cc5af1e84ed3be322929899e8";
};
}

View File

@@ -1,21 +0,0 @@
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

View File

@@ -1,10 +0,0 @@
{stdenv, unzip, plugin}:
let {
body =
stdenv.mkDerivation {
name = "eclipse-zip-plugin-installer";
builder = ./builder.sh;
inherit plugin unzip;
};
}

View File

@@ -1,6 +1,6 @@
{stdenv, fetchurl}:
fetchurl {
url = http://www.ii.uib.no/~karltk/spoofax/plugins/org.spoofax.editor_0.3.0.jar;
url = http://nix.cs.uu.nl/dist/tarballs/org.spoofax.editor_0.3.0.jar;
md5 = "ff66d229c774f840ec8285f64c0f95bc";
}

View File

@@ -1,6 +0,0 @@
{stdenv, fetchurl}:
fetchurl {
url = http://nix.cs.uu.nl/dist/tarballs/org.spoofax.editor_0.3.10.jar;
md5 = "ff77853e750e19a9b8d380c17ea27f3d";
}

View File

@@ -1,6 +1,6 @@
{stdenv, fetchurl}:
fetchurl {
url = http://www.ii.uib.no/~karltk/spoofax/plugins/org.spoofax.editor_0.3.11.jar;
md5 = "c36941afcb0e538e16fafd594eae128e";
url = http://nix.cs.uu.nl/dist/tarballs/org.spoofax.editor_0.3.10.jar;
md5 = "ff77853e750e19a9b8d380c17ea27f3d";
}

View File

@@ -1,6 +1,6 @@
source $stdenv/setup
myglibc=`cat ${NIX_GCC}/nix-support/orig-libc`
myglibc=`cat ${NIX_GCC}/nix-support/orig-glibc`
echo "glibc: $myglibc"
postConfigure() {

View File

@@ -0,0 +1,34 @@
{ xawSupport ? true
, xpmSupport ? true
, xaw3dSupport ? false
, gtkGUI ? false
, xftSupport ? false
, stdenv, fetchurl, x11, libXaw ? null, libXpm ? null, Xaw3d ? null
, pkgconfig ? null, gtk ? null, libXft ? null, libpng ? null
}:
assert xawSupport -> libXaw != null;
assert xpmSupport -> libXpm != null;
assert xaw3dSupport -> Xaw3d != null;
assert gtkGUI -> pkgconfig != null && gtk != null;
assert xftSupport -> libXft != null && libpng != null; # libpng = probably a bug
stdenv.mkDerivation {
name = "emacs-22.0.50-pre-xft";
builder = ./builder.sh;
src = fetchurl {
url = http://nix.cs.uu.nl/dist/tarballs/emacs-22.0.50-pre-xft.tar.bz2;
md5 = "4f96ada6f18513aeb70adc27b7ac862f";
};
patches = [./crt.patch];
buildInputs = [
x11
(if xawSupport then libXaw else null)
(if xpmSupport then libXpm else null)
(if xaw3dSupport then Xaw3d else null)
]
++ (if gtkGUI then [pkgconfig gtk] else [])
++ (if xftSupport then [libXft libpng] else []);
configureFlags =
if gtkGUI then ["--with-x-toolkit=gtk" "--with-xft"] else [];
}

View File

@@ -1,6 +1,6 @@
source $stdenv/setup
myglibc=`cat ${NIX_GCC}/nix-support/orig-libc`
myglibc=`cat ${NIX_GCC}/nix-support/orig-glibc`
echo "glibc: $myglibc"
postConfigure() {

View File

@@ -4,7 +4,6 @@
, gtkGUI ? false
, stdenv, fetchurl, x11, libXaw ? null, libXpm ? null, Xaw3d ? null
, pkgconfig ? null, gtk ? null
, ncurses
}:
assert xawSupport && !xaw3dSupport -> libXaw != null;
@@ -13,15 +12,15 @@ assert xpmSupport -> libXpm != null;
assert gtkGUI -> pkgconfig != null && gtk != null;
stdenv.mkDerivation {
name = "emacs-22.1";
name = "emacs-22.0.50-pre20051207";
builder = ./builder.sh;
src = fetchurl {
url = mirror://gnu/emacs/emacs-22.1.tar.gz;
sha256 = "1l1y3il98pq3cz464p244wz2d3nga5lq8fkw5pwp5r97f7pkpi0y";
url = http://nix.cs.uu.nl/dist/tarballs/emacs-22.0.50-pre20051207.tar.bz2;
md5 = "011d40367015691e4319ddc65b4e7843";
};
patches = [./crt.patch];
buildInputs = [
ncurses x11
x11
(if xawSupport then if xaw3dSupport then Xaw3d else libXaw else null)
(if xpmSupport then libXpm else null)
] ++ (if gtkGUI then [pkgconfig gtk] else []);

View File

@@ -0,0 +1,4 @@
source $stdenv/setup
mkdir -p $out/emacs/site-lisp
cp $src $out/emacs/site-lisp/cua.el

View File

@@ -0,0 +1,8 @@
{stdenv, fetchurl}: stdenv.mkDerivation {
name = "cua-mode-2.10";
builder = ./builder.sh;
src = fetchurl {
url = http://nix.cs.uu.nl/dist/tarballs/cua-mode-2.10.el;
md5 = "5bf5e43f5f38c8383868c7c6c5baca09";
};
}

View File

@@ -0,0 +1,6 @@
source $stdenv/setup
mkdir -p $out/emacs/site-lisp
tar zxvf $src
cp haskell-mode*/*.el $out/emacs/site-lisp
cp haskell-mode*/*.hs $out/emacs/site-lisp

View File

@@ -0,0 +1,8 @@
{stdenv, fetchurl}: stdenv.mkDerivation {
name = "haskell-mode-1.45";
builder = ./builder.sh;
src = fetchurl {
url = http://nix.cs.uu.nl/dist/tarballs/haskell-mode-1.45.tar.gz;
md5 = "c609998580cdb9ca8888c7d47d22ca3b";
};
}

View File

@@ -0,0 +1,7 @@
source $stdenv/setup
mkdir -p $out/emacs/site-lisp
cd $out/emacs/site-lisp
tar xvfz $src
mv nxml-mode-*/* .
rmdir nxml-mode-*

View File

@@ -0,0 +1,8 @@
{stdenv, fetchurl}: stdenv.mkDerivation {
name = "nxml-mode-20041004";
builder = ./builder.sh;
src = fetchurl {
url = http://nix.cs.uu.nl/dist/tarballs/nxml-mode-20041004.tar.gz;
md5 = "ac137024cf337d6f11d8ab278d39b4db";
};
}

View File

@@ -1,20 +0,0 @@
source $stdenv/setup
preConfigure=preConfigure
preConfigure() {
libc=$(cat ${NIX_GCC}/nix-support/orig-libc)
echo "libc: $libc"
substituteInPlace src/s/gnu-linux.h \
--replace /usr/lib/crt1.o $libc/lib/crt1.o \
--replace /usr/lib/crti.o $libc/lib/crti.o \
--replace /usr/lib/crtn.o $libc/lib/crtn.o
for i in Makefile.in ./src/Makefile.in ./lib-src/Makefile.in ./leim/Makefile.in ./admin/unidata/Makefile; do
substituteInPlace $i --replace /bin/pwd pwd
done
}
preBuild="make bootstrap"
genericBuild

View File

@@ -1,50 +0,0 @@
{ xawSupport ? true
, xpmSupport ? true
, xaw3dSupport ? false
, gtkGUI ? false
, xftSupport ? false
, stdenv, fetchurl, ncurses, x11, libXaw ? null, libXpm ? null, Xaw3d ? null
, pkgconfig ? null, gtk ? null, libXft ? null
, libpng, libjpeg, libungif, libtiff
}:
assert xawSupport -> libXaw != null;
assert xpmSupport -> libXpm != null;
assert xaw3dSupport -> Xaw3d != null;
assert gtkGUI -> pkgconfig != null && gtk != null;
assert xftSupport -> libXft != null && libpng != null; # libpng = probably a bug
stdenv.mkDerivation {
name = "emacs-23.0.0.1-pre20070705";
builder = ./builder.sh;
src = fetchurl {
url = http://debs.peadrop.com/pool/edgy/backports/emacs-snapshot_20070705.orig.tar.gz;
sha256 = "1blybacpsxha2v24kj482wl3g1z93rwddfc8rsqsk6dr6f5kdj5q";
};
# patches = [
# ./crt.patch
# ];
buildInputs = [
ncurses x11
(if xawSupport then libXaw else null)
(if xpmSupport then libXpm else null)
(if xaw3dSupport then Xaw3d else null)
libpng libjpeg libungif libtiff # maybe not strictly required?
]
++ (if gtkGUI then [pkgconfig gtk] else [])
++ (if xftSupport then [libXft] else []);
configureFlags = "
${if gtkGUI then "--with-gtk --enable-font-backend --with-xft" else ""}
";
meta = {
description = "Emacs with Unicode, GTK and Xft support (23.x alpha)";
homepage = http://www.emacswiki.org/cgi-bin/wiki/XftGnuEmacs;
license = "GPL";
};
}

View File

@@ -0,0 +1,13 @@
source $stdenv/setup
myglibc=`cat ${NIX_GCC}/nix-support/orig-glibc`
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

View 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~

View File

@@ -1,7 +1,7 @@
{ xawSupport ? true
, xpmSupport ? true
, xaw3dSupport ? false
, stdenv, fetchurl, ncurses, x11, libXaw ? null, libXpm ? null, Xaw3d ? null
, stdenv, fetchurl, x11, libXaw ? null, libXpm ? null, Xaw3d ? null
}:
assert xawSupport && !xaw3dSupport -> libXaw != null;
@@ -17,12 +17,8 @@ stdenv.mkDerivation {
};
patches = [./crt.patch];
buildInputs = [
ncurses x11
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";
};
}

View File

@@ -0,0 +1,4 @@
source $stdenv/setup
mkdir -p $out/emacs/site-lisp
cp $src $out/emacs/site-lisp/cua.el

View File

@@ -0,0 +1,8 @@
{stdenv, fetchurl}: stdenv.mkDerivation {
name = "cua-mode-2.10";
builder = ./builder.sh;
src = fetchurl {
url = http://nix.cs.uu.nl/dist/tarballs/cua-mode-2.10.el;
md5 = "5bf5e43f5f38c8383868c7c6c5baca09";
};
}

View File

@@ -0,0 +1,6 @@
source $stdenv/setup
mkdir -p $out/emacs/site-lisp
tar zxvf $src
cp haskell-mode*/*.el $out/emacs/site-lisp
cp haskell-mode*/*.hs $out/emacs/site-lisp

View File

@@ -0,0 +1,8 @@
{stdenv, fetchurl}: stdenv.mkDerivation {
name = "haskell-mode-1.45";
builder = ./builder.sh;
src = fetchurl {
url = http://nix.cs.uu.nl/dist/tarballs/haskell-mode-1.45.tar.gz;
md5 = "c609998580cdb9ca8888c7d47d22ca3b";
};
}

View File

@@ -0,0 +1,7 @@
source $stdenv/setup
mkdir -p $out/emacs/site-lisp
cd $out/emacs/site-lisp
tar xvfz $src
mv nxml-mode-*/* .
rmdir nxml-mode-*

View File

@@ -0,0 +1,8 @@
{stdenv, fetchurl}: stdenv.mkDerivation {
name = "nxml-mode-20041004";
builder = ./builder.sh;
src = fetchurl {
url = http://nix.cs.uu.nl/dist/tarballs/nxml-mode-20041004.tar.gz;
md5 = "ac137024cf337d6f11d8ab278d39b4db";
};
}

View File

@@ -1,13 +0,0 @@
{stdenv, fetchurl} :
stdenv.mkDerivation {
name = "joe-3.3";
src = fetchurl {
url = mirror://sourceforge/joe-editor/joe-3.3.tar.gz;
md5 = "02221716679c039c5da00c275d61dbf4";
};
meta = {
homepage = http://joe-editor.sourceforge.net;
};
}

View File

@@ -1,15 +1,10 @@
{stdenv, fetchurl, ncurses, gettext}:
{stdenv, fetchurl, ncurses}:
stdenv.mkDerivation {
name = "nano-2.0.6";
name = "nano-1.2.4";
src = fetchurl {
url = mirror://gnu/nano/nano-2.0.6.tar.gz;
sha256 = "0p2xfs4jzj7dvp208qdrxij7x8gbwxgnrdm7zafgpbbg1bvxh40d";
};
buildInputs = [ncurses gettext];
configureFlags = "--enable-tiny";
meta = {
homepage = http://www.nano-editor.org;
url = http://nix.cs.uu.nl/dist/tarballs/nano-1.2.4.tar.gz;
md5 = "2c513310ec5e8b63abaecaf48670ac7a";
};
buildInputs = [ncurses];
}

View File

@@ -7,7 +7,7 @@ stdenv.mkDerivation {
builder = ./builder.sh;
src = fetchurl {
url = http://nl.nedit.org/ftp/v5_5/nedit-5.5-src.tar.bz2;
url = http://nix.cs.uu.nl/dist/tarballs/nedit-5.5-src.tar.bz2;
md5 = "48cb3dce52d44988f3a4d7c6f47b6bbe";
};
patches = [./dynamic.patch];
@@ -15,9 +15,5 @@ stdenv.mkDerivation {
inherit motif;
buildInputs = [x11 motif libXpm];
buildFlags = if stdenv.system == "i686-linux" then "linux" else "";
meta = {
homepage = http://www.nedit.org;
};
makeFlags = if stdenv.system == "i686-linux" then "linux" else "";
}

View File

@@ -1,19 +1,17 @@
{stdenv, fetchurl, ncurses}:
{stdenv, fetchurl, ncurses, dietgcc}:
stdenv.mkDerivation {
name = "vim-7.0";
name = "vim-6.3";
src = fetchurl {
url = ftp://ftp.vim.org/pub/vim/unix/vim-7.0.tar.bz2;
md5 = "4ca69757678272f718b1041c810d82d8";
url = http://nix.cs.uu.nl/dist/tarballs/vim-6.3.tar.bz2;
md5 = "821fda8f14d674346b87e3ef9cb96389";
};
inherit ncurses;
buildInputs = [ncurses];
NIX_GCC = dietgcc;
NIX_GLIBC_FLAGS_SET=1;
NIX_CFLAGS_COMPILE="-D_BSD_SOURCE=1";
meta = {
homepage = http://www.vim.org;
};
}

View File

@@ -0,0 +1,9 @@
source $stdenv/setup
postInstall=postInstall
postInstall() {
ln -s $out/bin/vim $out/bin/vi
}
genericBuild

View File

@@ -1,72 +0,0 @@
# TODO tidy up eg The patchelf code is patching gvim even if you don't build it..
# but I have gvim with python support now :) - Marc
args:
let edf = args.lib.enableDisableFeature; in
( args.mkDerivationByConfiguration {
# most interpreters aren't tested yet.. (see python for example how to do it)
flagConfig = {
mandatory = { cfgOption = "--enable-gui=auto --with-features=${args.features}";
buildInputs = ["ncurses" "pkgconfig"];
};
X11 = { buildInputs = [ "libX11" "libXext" "libSM" "libXpm" "libXt" "libXaw" "libXau" "libXmu" ]; };
} // edf "darwin" "darwin" { } #Disable Darwin (Mac OS X) support.
// edf "xsmp" "xsmp" { } #Disable XSMP session management
// edf "xsmp_interact" "xsmp_interact" { } #Disable XSMP interaction
// edf "mzscheme" "mzschemeinterp" { } #Include MzScheme interpreter.
// edf "perl" "perlinterp" { } #Include Perl interpreter.
// edf "python" "pythoninterp" { pass = "python"; } #Include Python interpreter.
// edf "tcl" "tclinterp" { } #Include Tcl interpreter.
// edf "ruby" "rubyinterp" { } #Include Ruby interpreter.
// edf "cscope" "cscope" { } #Include cscope interface.
// edf "workshop" "workshop" { } #Include Sun Visual Workshop support.
// edf "netbeans" "netbeans" { } #Disable NetBeans integration support.
// edf "sniff" "sniff" { } #Include Sniff interface.
// edf "multibyte" "multibyte" { } #Include multibyte editing support.
// edf "hangulinput" "hangulinput" { } #Include Hangul input support.
// edf "xim" "xim" { pass = "xim"; } #Include XIM input support.
// edf "fontset" "fontset" { } #Include X fontset output support.
#--enable-gui=OPTS X11 GUI default=auto OPTS=auto/no/gtk/gtk2/gnome/gnome2/motif/athena/neXtaw/photon/carbon
/*
// edf "gtk_check" "gtk_check" { } #If auto-select GUI, check for GTK default=yes
// edf "gtk2_check" "gtk2_check" { } #If GTK GUI, check for GTK+ 2 default=yes
// edf "gnome_check" "gnome_check" { } #If GTK GUI, check for GNOME default=no
// edf "motif_check" "motif_check" { } #If auto-select GUI, check for Motif default=yes
// edf "athena_check" "athena_check" { } #If auto-select GUI, check for Athena default=yes
// edf "nextaw_check" "nextaw_check" { } #If auto-select GUI, check for neXtaw default=yes
// edf "carbon_check" "carbon_check" { } #If auto-select GUI, check for Carbon default=yes
// edf "gtktest" "gtktest" { } #Do not try to compile and run a test GTK program
*/
// edf "acl" "acl" { } #Don't check for ACL support.
// edf "gpm" "gpm" { } #Don't use gpm (Linux mouse daemon).
// edf "nls" "nls" { } #Don't support NLS (gettext()).
;
optionals = ["python"];
extraAttrs = co : {
name = "vim_configurable-7.1";
src = args.fetchurl {
url = ftp://ftp.nluug.nl/pub/editors/vim/unix/vim-7.1.tar.bz2;
sha256 = "0w6gy49gdbw7hby5rjkjpa7cdvc0z5iajsm4j1h8108rvfam22kz";
};
postInstall = "
rpath=`patchelf --print-rpath \$out/bin/vim`;
for i in $\buildInputs; do
echo adding \$i/lib
rpath=\$rpath:\$i/lib
done
echo \$buildInputs
echo \$rpath
patchelf --set-rpath \$rpath \$out/bin/{vim,gvim}
";
meta = {
description = "The most popular clone of the VI editor";
homepage = "www.vim.org";
};
};
} ) args

View File

@@ -1,64 +1,14 @@
args:
let
defList = [];
#stdenv and fetchurl are added automatically
getVal = (args.lib.getValue args defList);
check = args.lib.checkFlag args;
reqsList = [
["gtkGUI" "glib" "gtk" "pkgconfig" "libXpm" "libXext" "x11Support"]
["athenaGUI" "libXau" "libXt" "libXaw" "libXpm" "libXext" "x11Support"]
["x11Support" "libX11"]
["hugeFeatures"]
["pythonSupport" "python"]
["perlSupport" "perl"]
["tclSupport" "tcl"]
["true" "ncurses"]
["false" "libSM"]
];
nameSuffixes = [
"hugeFeatures" "-huge"
"x11Support" "-X11"
"pythonSupport" "-python"
"perlSupport" "-perl"
"tclSupport" "-tcl"
"ximSupport" "-xim"
];
configFlags = [
"true" " "
"x11Support" " --enable-gui=auto "
"hugeFeatures" "--with-features=huge --enable-cscope --enable-multibyte --enable-xsmp "
"pythonSupport" " --enable-pythoninterp "
"perlSupport" " --enable-perlinterp "
"tclSupport" " --enable-tclinterp "
"ximSupport" " --enable-xim "
];
buildInputsNames = args.lib.filter (x: (null!=getVal x))
(args.lib.uniqList {inputList =
(args.lib.concatLists (map
(x:(if (x==[]) then [] else builtins.tail x))
reqsList));});
in
assert args.lib.checkReqs args defList reqsList;
args.stdenv.mkDerivation {
name = args.lib.condConcat "vim-7.1" nameSuffixes check;
{stdenv, fetchurl, ncurses}:
src = args.fetchurl {
url = ftp://ftp.nluug.nl/pub/editors/vim/unix/vim-7.1.tar.bz2;
sha256 = "0w6gy49gdbw7hby5rjkjpa7cdvc0z5iajsm4j1h8108rvfam22kz";
stdenv.mkDerivation {
name = "vim-6.3";
builder = ./builder.sh;
src = fetchurl {
url = http://nix.cs.uu.nl/dist/tarballs/vim-6.3.tar.bz2;
md5 = "821fda8f14d674346b87e3ef9cb96389";
};
inherit (args) ncurses;
buildInputs = args.lib.filter (x: (x!=null)) (map getVal buildInputsNames);
postInstall = "ln -s $out/bin/vim $out/bin/vi";
preBuild="touch src/auto/link.sed";
configureFlags = args.lib.condConcat "" configFlags check;
NIX_LDFLAGS = "-lpthread -lutil";
meta = {
description = "The most popular clone of the VI editor";
homepage = http://www.vim.org;
};
inherit ncurses;
buildInputs = [ncurses];
}

View File

@@ -1,26 +0,0 @@
args: with args;
stdenv.mkDerivation (rec {
name = "ImageMagick-6.3.8-5";
src = fetchurl {
url = "ftp://ftp.imagemagick.org/pub/ImageMagick/${name}.tar.bz2";
sha256 = "0lsvi2z5b5zam6yvjzsyjpa36rg1c0kczifz73k9b4v8zz9a9vfl";
};
configureFlags = " --with-dots --with-gs-font-dir="+ ghostscript +
"/share/ghostscript/fonts --with-gslib " +(
if args ? tetex then " --with-frozenpaths " else ""
);
buildInputs = [bzip2 freetype ghostscript graphviz libjpeg libpng
libtiff libX11 libxml2 zlib libtool] ++ (if args ? tetex then [args.tetex] else [])
++ (if args ? librsvg then [args.librsvg] else []);
meta = {
homepage = http://www.imagemagick.org;
};
} // (if args ? tetex then {
preConfigure = "
export DVIDecodeDelegate=${args.tetex}/bin/dvips
";
} else {}))

View File

@@ -1,16 +0,0 @@
{stdenv, fetchurl, python, boost, pkgconfig, imagemagick}:
stdenv.mkDerivation {
name = "PythonMagick-0.7";
src = fetchurl {
url = http://www.imagemagick.org/download/python/PythonMagick-0.7.tar.gz;
sha256 = "1553kyzdcysii2qhbpbgs0icmfpm6s2lp3zchgs73cxfnfym8lz1";
};
buildInputs = [python boost pkgconfig imagemagick];
meta = {
homepage = http://www.imagemagick.org/script/api.php;
};
}

View File

@@ -1,16 +0,0 @@
{stdenv, fetchurl, gtk, pkgconfig, glib, perl, perlXMLParser, libxml2, gettext, python, libxml2Python, docbook5, docbook_xsl, libxslt }:
stdenv.mkDerivation {
name = "dia-0.96";
src = fetchurl {
url = http://ftp.gnome.org.nyud.net:8080/pub/gnome/sources/dia/0.96/dia-0.96.1.tar.bz2;
md5 = "7b81b22baa2df55efe4845865dddc7b6";
};
buildInputs = [gtk glib perl pkgconfig perlXMLParser libxml2 gettext python libxml2Python docbook5 libxslt docbook_xsl];
meta = {
description = "Gnome Diagram drawing software.";
homepage = http://www.gnome.org/projects/dia;
};
}

View File

@@ -1,17 +0,0 @@
args: with args;
stdenv.mkDerivation {
name = "djview4-4.1-2";
src = fetchurl {
url = mirror://sf/djvu/djview4-4.1-2.tar.gz;
sha256 = "10k0h892kab3n8xypw6vsnvhwil410hvvqj375pwiss4vlm5isv1";
};
buildInputs = [djvulibre qt4];
meta = {
homepage = http://djvu.sourceforge.net/djview4.html;
description = "A new portable DjVu viewer and browser plugin";
license = "GPL2";
};
}

View File

@@ -1,27 +0,0 @@
args: with args;
assert fltk.flag_set_gl;
stdenv.mkDerivation {
name ="openexr_viewers-1.0.1";
src = fetchurl {
url = "http://download.savannah.nongnu.org/releases/openexr/openexr_viewers-1.0.1.tar.gz";
sha256 = "1w5qbcdp7sw48z1wk2v07f7p14vqqb1m2ncxyxnbkm9f4ab0ymg6";
};
inherit fltk mesa;
configurePhase = "
# don't know why.. adding these flags it works
#export CXXFLAGS=`fltk-config --use-gl --cxxflags --ldflags`
./configure --prefix=\$out --with-fltk-config=\$fltk/bin/fltk-config";
buildInputs = [openexr fltk pkgconfig mesa which openexr_ctl];
meta = {
description = "tool to view OpenEXR images";
homepage = http://openexr.com;
license = "BSD-like";
};
}

View File

@@ -23,8 +23,4 @@ stdenv.mkDerivation {
];
inherit monoDLLFixer gtksharp sqlite libgnomeui;
meta = {
homepage = http://f-spot.org;
};
}

View File

@@ -1,30 +0,0 @@
{stdenv, fetchurl, x11, imlib2, libjpeg, libpng}:
let
giblib = stdenv.mkDerivation {
name = "giblib-1.2.4";
src = fetchurl {
url = http://linuxbrit.co.uk/downloads/giblib-1.2.4.tar.gz;
sha256 = "1b4bmbmj52glq0s898lppkpzxlprq9aav49r06j2wx4dv3212rhp";
};
buildInputs = [x11 imlib2];
};
in
stdenv.mkDerivation {
name = "feh-1.3.4";
src = fetchurl {
url = http://linuxbrit.co.uk/downloads/feh-1.3.4.tar.gz;
sha256 = "091iz2id5z80vn2qxg0ipwncv5bv8i9ifw2q15ja9zazq6xz5fc1";
};
buildInputs = [x11 imlib2 giblib libjpeg libpng];
meta = {
description = "A light-weight image viewer";
homepage = http://linuxbrit.co.uk/feh/;
};
}

View File

@@ -1,29 +1,13 @@
{ stdenv, fetchurl, pkgconfig, gtk, libgtkhtml, freetype
, fontconfig, libart_lgpl, libtiff, libjpeg, libpng, libexif, zlib, perl
, perlXMLParser, python, pygtk, gettext, xlibs
}:
{stdenv, fetchurl, pkgconfig, gtk, libgtkhtml, glib, pango, atk, freetype, fontconfig, libart_lgpl, libtiff, libjpeg, libpng, libexif, zlib, perl, perlXMLParser, python, pygtk}:
stdenv.mkDerivation {
name = "gimp-2.4.4";
name = "gimp-2.3.6";
src = fetchurl {
url = ftp://ftp.gtk.org/pub/gimp/v2.4/gimp-2.4.4.tar.bz2;
sha256 = "1mnl30b4p7c2lxi68z3fhwmganhwppyiw7r0m3r90vnakcawfnfh";
url = http://nix.cs.uu.nl/dist/tarballs/gimp-2.3.6.tar.bz2;
md5 = "ce8ad77f4eb47abb868e6b4eb1f97943" ;
};
buildInputs = [
pkgconfig gtk libgtkhtml freetype fontconfig
libart_lgpl libtiff libjpeg libpng libexif zlib perl
perlXMLParser python pygtk gettext
];
buildInputs = [ pkgconfig gtk libgtkhtml glib pango atk freetype fontconfig libart_lgpl libtiff libjpeg libpng libexif zlib perl perlXMLParser python pygtk] ;
configureFlags = [ "--disable-print" ];
# "screenshot" needs this.
NIX_LDFLAGS = "-rpath ${xlibs.libX11}/lib";
meta = {
description = "The GNU Image Manipulation Program";
homepage = http://www.gimp.org/;
license = "GPL";
};
}

View File

@@ -1,22 +0,0 @@
args : with args;
let localDefs = builderDefs {
src = /* put a fetchurl here */
fetchurl {
url = http://prdownloads.sourceforge.net/jocr/gocr-0.44.tar.gz;
sha256 = "0kvb7cbk6z5n4g0hhbwpdk2f3819yfamwsmkwanj99yhni6p5mr0";
};
buildInputs = [];
configureFlags = [];
} null; /* null is a terminator for sumArgs */
in with localDefs;
stdenv.mkDerivation rec {
name = "gocr";
builder = writeScript (name + "-builder")
(textClosure localDefs [doConfigure doMakeInstall doForceShare doPropagate]);
meta = {
description = "
GPL Optical Character Recognition
";
};
}

View File

@@ -6,17 +6,12 @@ assert pkgconfig != null && gtk != null && libpng != null;
# !!! assert libpng == gtk.libpng;
stdenv.mkDerivation {
name = "gqview-2.1.5";
name = "gqview-2.1.1";
src = fetchurl {
url = mirror://sourceforge/gqview/gqview-2.1.5.tar.gz;
md5 = "4644187d9b14b1dc11ac3bb146f262ea";
url = http://nix.cs.uu.nl/dist/tarballs/gqview-2.1.1.tar.gz;
md5 = "2cd110305cfe4c530fcd6e34bb52e1f2";
};
buildInputs = [pkgconfig gtk libpng];
meta = {
description = "A fast image viewer";
homepage = http://gqview.sourceforge.net;
};
}

View File

@@ -1,19 +1,31 @@
args: with args;
{ stdenv, fetchurl, pkgconfig,
perl, perlXMLParser,
gtk, libXft, fontconfig,
libpng,
zlib, popt,
boehmgc,
libxml2, libxslt,
glib,
gtkmm, glibmm, libsigcxx
}:
stdenv.mkDerivation rec {
name = "inkscape-0.45.1";
stdenv.mkDerivation {
name = "inkscape-0.42.2";
src = fetchurl {
url = "mirror://sf/inkscape/${name}.tar.gz";
sha256 = "1y0b9bm8chn6a2ip99dj4dhg0188yn67v571ha0x38wrlmvn4k0d";
url = http://nix.cs.uu.nl/dist/tarballs/inkscape-0.42.2.tar.bz2;
md5 = "a27172087018e850e92e97e52b5dad08";
};
buildInputs = [
pkgconfig perl perlXMLParser gtk libXft fontconfig libpng zlib popt boehmgc
libxml2 libxslt glib gtkmm glibmm libsigcxx lcms boost gettext
pkgconfig
perl perlXMLParser
gtk libXft fontconfig
libpng
zlib popt
boehmgc
libxml2 libxslt
glib
gtkmm glibmm libsigcxx
];
meta = {
homepage = http://www.inkscape.org;
};
}

View File

@@ -1,12 +0,0 @@
source $stdenv/setup
patchPhase=patchPhase
patchPhase() {
sed -e "s@-ljpeg6b@-ljpeg@" configure > configure.patched
mv configure.patched configure
chmod u+x configure
}
genericBuild
ln -s $KDEDIR/share/mimelnk $out/share

View File

@@ -1,23 +0,0 @@
{stdenv, fetchurl, libX11, libXext, libSM, kdelibs, qt, libjpeg, libungif, libpng, libtiff, imlib, arts, expat, perl}:
stdenv.mkDerivation {
name = "kuickshow-0.8.5";
builder = ./builder.sh;
src = fetchurl {
url = mirror://sourceforge/kuickshow/kuickshow-0.8.5.tgz;
md5 = "7a95852a0670b18859a1e6789b256ebd";
};
configureFlags = "
--with-imlib-config=${imlib}/bin
--with-extra-includes=${libjpeg}/include
--with-extra-libs=${libjpeg}/lib
--x-includes=${libX11}/include
--x-libraries=${libX11}/lib";
buildInputs = [kdelibs libX11 libXext libSM qt libjpeg libungif libpng libtiff imlib arts expat perl];
inherit libjpeg;
KDEDIR = kdelibs;
}

View File

@@ -1,35 +0,0 @@
{stdenv, fetchurl, autoconf, automake, gettext, libtool, cvs, wxGTK, gtk,
pkgconfig, libxml2, zip, libpng, libjpeg, shebangfix, perl, freetype}:
stdenv.mkDerivation {
name = "xaralx-0.7r1766";
src = fetchurl {
url = http://downloads2.xara.com/opensource/XaraLX-0.7r1766.tar.bz2;
sha256 = "1rcl7hqvcai586jky7hvzxhnq8q0ka2rsmgiq5ijwclgr5d4ah7n";
};
buildInputs = [automake autoconf gettext libtool cvs wxGTK gtk pkgconfig libxml2 zip libpng libjpeg shebangfix perl];
inherit freetype libpng libjpeg libxml2;
configureFlags = "--with-wx-config --disable-svnversion --disable-international";
patches = [./gtk_cflags.patch];
# Why do I need to add library path for freetype ?
installPhase = "
make install
ensureDir \$out/lib
mv \$out/{bin,lib}/XaraLX
cat >> \$out/bin/XaraLX << EOF
#!/bin/sh
LD_LIBRARY_PATH=\$freetype/lib:\$libpng/lib:\$libjpeg/lib:\$libxml2/lib:
\$out/lib/XaraLX \"\\$@\"
EOF
chmod +x \$out/bin/XaraLX
";
patchPhase = "
find . -iname \"*.pl\" | xargs shebangfix;
unset patchPhase; patchPhase
";
}

View File

@@ -1,20 +0,0 @@
diff -rc XaraLX-0.7r1766/Makefile.in XaraLX-0.7r1766.new/Makefile.in
*** XaraLX-0.7r1766/Makefile.in 2007-01-31 13:43:04.000000000 +0100
--- XaraLX-0.7r1766.new/Makefile.in 2007-05-15 00:19:36.000000000 +0200
***************
*** 256,262 ****
@DARWIN_LINK_TRUE@XaraLX_SOURCES = Kernel/*.o wxOil/*.o tools/*.o wxXtra/*.o
@DARWIN_LINK_FALSE@XaraLX_LDSOURCE = -Wl,--start-group $(XaraLX_SOURCES) -Wl,--end-group
@DARWIN_LINK_TRUE@XaraLX_LDSOURCE = $(XaraLX_SOURCES)
! XaraLX_LDFLAGS = --debug -L$(srcdir)/$(CDRAW_LIB_DIR) $(WX_LIBS) $(LIBS) $(LIBXML2_LIBS) -lCDraw
UNZIP = unzip
ACLOCAL_AMFLAGS = -I m4
all: all-recursive
--- 256,262 ----
@DARWIN_LINK_TRUE@XaraLX_SOURCES = Kernel/*.o wxOil/*.o tools/*.o wxXtra/*.o
@DARWIN_LINK_FALSE@XaraLX_LDSOURCE = -Wl,--start-group $(XaraLX_SOURCES) -Wl,--end-group
@DARWIN_LINK_TRUE@XaraLX_LDSOURCE = $(XaraLX_SOURCES)
! XaraLX_LDFLAGS = --debug -L$(srcdir)/$(CDRAW_LIB_DIR) $(GTK_LIBS) $(WX_LIBS) $(LIBS) $(LIBXML2_LIBS) -lCDraw
UNZIP = unzip
ACLOCAL_AMFLAGS = -I m4
all: all-recursive

View File

@@ -1,22 +0,0 @@
source $stdenv/setup
makeFlags="XAWLIB=-lXaw3d BINDIR=$out/bin XAPPLOADDIR=$out/etc/X11/app-defaults LIBDIR=$out/lib/X11 XFIGDOCDIR=$out/share/doc/xfig MANPATH=$out/man"
preBuild=preBuild
preBuild() {
echo "#define XAW3D" >> Imakefile.tmp
echo "#define XAW3D1_5E" >> Imakefile.tmp
cat Imakefile >> Imakefile.tmp
mv Imakefile.tmp Imakefile
xmkmf
}
installCommand=myInstall
myInstall() {
make install.all $makeFlags
wrapProgram $out/bin/xfig \
--set XAPPLRESDIR $out/etc/X11/app-defaults
}
genericBuild

View File

@@ -1,22 +0,0 @@
{ stdenv, fetchurl, makeWrapper, imake
, x11, libXpm, libXmu, libXi, libXp, Xaw3d, libpng, libjpeg}:
stdenv.mkDerivation {
name = "xfig-3.2.5-pre-alpha-5";
src = fetchurl {
url = http://xfig.org/software/xfig/3.2.5-alpha/xfig.3.2.5-alpha5.full.tar.gz;
md5 = "7547b66232569e3c12e4a0639bd92629";
};
builder = ./builder.sh;
buildInputs = [imake x11 libXpm libXmu libXi libXp Xaw3d libpng libjpeg makeWrapper];
NIX_CFLAGS_COMPILE = "-I${libXpm}/include/X11";
meta = {
description = "An interactive drawing tool for X11";
homepage = http://xfig.org;
};
}

View File

@@ -1,39 +0,0 @@
args : with args; let localDefs = builderDefs (args // {
src = /* put a fetchurl here */
fetchurl {
url = http://www.jwz.org/xscreensaver/xscreensaver-5.04.tar.gz;
sha256 = "1mx6zc6rvb6pr9wb6mv4ljiii9ybw0dshd74aclf7rlmfx4hn86i";
};
useConfig = true;
reqsList = [
["true" "libX11" "gtk" "pkgconfig" "bc" "perl" "intltool" "libXmu"]
["GL" "mesa"]
["GUI" "gtk" "libxml2" "libglade"]
["jpeg" "libjpeg"]
["false"]
];
configFlags = [
"GL" " --with-gl "
"gdkpixbuf" " --with-pixbuf "
"DPMS" " --with-dpms "
"true" (" --with-x-app-defaults=\$out/share/xscreensaver/app-defaults "+
" --with-hackdir=\$out/share/xscreensaver-hacks ")
];
}) null; /* null is a terminator for sumArgs */
in with localDefs;
let
preConfigure = FullDepEntry ("
sed -e 's%@GTK_DATADIR@%@datadir@% ; s%@PO_DATADIR@%@datadir@%' "+
"-i driver/Makefile.in po/Makefile.in.in;
") [minInit doUnpack];
in
stdenv.mkDerivation rec {
name = "xscreensaver-"+version;
builder = writeScript (name + "-builder")
(textClosure localDefs [preConfigure doConfigure doMakeInstall doForceShare doPropagate]);
meta = {
description = "
The X screensaver daemon. Run xscreensaver-demo to configure.
";
};
}

View File

@@ -1,28 +0,0 @@
args: with args;
stdenv.mkDerivation {
name = "jedit-4.2";
src = fetchurl {
url = mirror://sf/jedit/jedit42source.tar.gz;
sha256 = "1ckqghsw2r30kfkqfgjl4k47gdwpz8c1h85haw0y0ymq4rqh798j";
};
phases = "unpackPhase buildPhase";
buildPhase = "
sed -i 's/\\<SplashScreen\\>/org.gjt.sp.jedit.gui.SplashScreen/g' org/gjt/sp/jedit/GUIUtilities.java
ant dist
ensureDir $out/lib
cp jedit.jar $out/lib
ensureDir \$out/lib/modes
cp modes/catalog \$out/lib/modes
";
buildInputs = [ant];
meta = {
description = "really nice programmers editor written in Java. Give it a try";
homepage = http://www.jedit.org;
license = "GPL";
};
}

View File

@@ -1,18 +0,0 @@
args: with args;
stdenv.mkDerivation {
name = jedit.name+"_startscript";
java = jre+"/bin/java";
jeditjar = jedit+"/lib/jedit.jar";
phases = "buildPhase";
buildPhase = "
ensureDir \$out/bin
cat > \$out/bin/${jedit.name} << EOF
#!/bin/sh
exec $java -jar $jeditjar \\$*
EOF
chmod +x \$out/bin/${jedit.name}
";
}

View File

@@ -13,17 +13,16 @@ tar xvf AdobeReader/ILINXR.TAR -C $out
rm $out/Reader/intellinux/plug_ins/PPKLite.api
if test -n "$fastStart"; then
echo "removing plugins..."
rm -v $(ls $out/Reader/intellinux/plug_ins/*.api | grep -v SearchFind)
rm $out/Reader/intellinux/plug_ins/*.api
fi
glibc=$(cat $NIX_GCC/nix-support/orig-glibc)
fullPath=
for i in $libPath; do
fullPath=$fullPath${fullPath:+:}$i/lib
done
patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
patchelf --interpreter $glibc/lib/ld-linux.so.* \
--set-rpath $fullPath \
$out/Reader/intellinux/bin/acroread
substituteInPlace $out/bin/acroread --replace /lib:/usr/lib /no-such-path --replace /bin/pwd pwd

View File

@@ -4,22 +4,16 @@
, fastStart ? false
}:
assert stdenv.system == "i686-linux";
stdenv.mkDerivation {
name = "acrobat-reader-7.0.9";
name = "acrobat-reader-7.0.1";
builder = ./builder.sh;
src = fetchurl {
url = http://ardownload.adobe.com/pub/adobe/reader/unix/7x/7.0.9/enu/AdobeReader_enu-7.0.9-1.i386.tar.gz;
sha256 = "0qs8v57gamkk243f44yqxic93izf0bn2d9l4wwbqqy1jv5s125hy";
url = http://ardownload.adobe.com/pub/adobe/reader/unix/7x/7.0/enu/AdbeRdr701_linux_enu.tar.gz;
md5 = "79e5a40aca6b49f7015cb1694876f87a";
};
libPath = [
libXt libXp libXext libX11 glib pango atk gtk libstdcpp5 zlib
(if xineramaSupport then libXinerama else null)
];
inherit fastStart;
meta = {
homepage = http://www.adobe.com/products/reader;
};
}

View File

@@ -1,58 +0,0 @@
args:
( args.mkDerivationByConfiguration {
flagConfig = {
mandatory = { implies = [ "no_oss" "no_sun_audio" ]; };
# are these options of interest? We'll see
#--disable-fftw disable usage of FFTW
#--enable-debug enable debugging
#--disable-cpu-clip disable tricky cpu specific clipper
alsa = { cfgOption = "--enable-alsa"; buildInputs = "alsa"; };
no_alsa = { cfgOption = "--disable-alsa"; };
libao = { cfgOption = "--enable-libao"; buildInputs = "libao"; };
no_libao = { cfgOption = "--disable-libao"; };
#oss = { cfgOption = "--enable-oss"; buildInputs = "oss"; };
no_oss = { cfgOption = "--disable-oss"; };
#sun_audio = { cfgOption = "--enable-sun-audio"; buildInputs = "sun_audio"; };
no_sun_audio = { cfgOption = "--disable-sun_audio"; };
# These options should be autodetected by the configure script
/*
--without-sndfile Don't try to use libsndfile
--without-ogg Don't try to use Ogg Vorbis
--without-flac Don't try to use FLAC
--without-ffmpeg Don't try to use ffmpeg
--without-mad Don't try to use MAD (MP3 Audio Decoder)
--without-lame Don't try to use LAME (LAME Ain't an MP3 Encoder)
--without-amr-wb Don't try to use amr-wb
--without-amr-nb Don't try to use amr-nb
--without-samplerate Don't try to use libsamplerate (aka Secret Rabbit
Code)
--without-ladspa Don't try to use LADSPA
--with-ladspa-path Default search path for LADSPA plugins
*/
};
optionals = [ "libsndfile" "libogg" "flac" "ffmpeg" "libmad" "lame"
/* "amr-wb" "amr-nb" */
"libsamplerate" /* "ladspa" */ ];
extraAttrs = co : {
name = "sox-14.0.0";
src = args.fetchurl {
url = mirror://sourceforge/sox/sox-14.0.0.tar.gz;
sha256 = "1l7v04nlvb96y0w9crvm6nq8g50yxp3bkv6nb1c205s982inlalc";
};
meta = {
description = "Sample Rate Converter for audio";
homepage = http://www.mega-nerd.com/SRC/index.html;
# you can choose one of the following licenses:
license = [ "GPL"
{ url=http://www.mega-nerd.com/SRC/libsamplerate-cul.pdf;
name="libsamplerate Commercial Use License";
} ];
};
};
} ) args

Some files were not shown because too many files have changed in this diff Show More