1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-21 13:10:33 +00:00

Merge recent master into p/stdenv

Merged just before the pypi update, as it seems to cause problems on Hydra.
This commit is contained in:
Vladimír Čunát 2014-06-09 19:07:20 +02:00
commit 5a98b9f514
274 changed files with 8267 additions and 2509 deletions

View file

@ -1,7 +1,7 @@
Nixpkgs is a collection of packages for [Nix](http://nixos.org/nix/) package
manager. Nixpkgs also includes [NixOS](http://nixos.org/nixos/) linux distribution source code.
* [NixOS installation instructions](http://nixos.org/nixos/manual/#installing-nixos)
* [NixOS installation instructions](http://nixos.org/nixos/manual/#ch-installation)
* [Manual (How to write packages for Nix)](http://nixos.org/nixpkgs/manual/)
* [Manual (NixOS)](http://nixos.org/nixos/manual/)
* [Continuous build](http://hydra.nixos.org/jobset/nixos/trunk-combined)

View file

@ -14,6 +14,7 @@
AndersonTorres = "Anderson Torres <torres.anderson.85@gmail.com>";
andres = "Andres Loeh <ksnixos@andres-loeh.de>";
antono = "Antono Vasiljev <self@antono.info>";
arobyn = "Alexei Robyn <shados@shados.net>";
astsmtl = "Alexander Tsamutali <astsmtl@yandex.ru>";
aszlig = "aszlig <aszlig@redmoonstudios.org>";
bbenoist = "Baptist BENOIST <return_0@live.com>";
@ -29,9 +30,10 @@
coconnor = "Corey O'Connor <coreyoconnor@gmail.com>";
coroa = "Jonas Hörsch <jonas@chaoflow.net>";
cstrahan = "Charles Strahan <charles.c.strahan@gmail.com>";
ederoyd46 = "Matthew Brown <matt@ederoyd.co.uk>";
edwtjo = "Edward Tjörnhammar <ed@cflags.cc>";
eelco = "Eelco Dolstra <eelco.dolstra@logicblox.com>";
emery = "Emery Hemingawy <emery@vfemail.net>";
emery = "Emery Hemingway <emery@vfemail.net>";
ertes = "Ertugrul Söylemez <ertesx@gmx.de>";
falsifian = "James Cook <james.cook@utoronto.ca>";
fuuzetsu = "Mateusz Kowalczyk <fuuzetsu@fuuzetsu.co.uk>";
@ -43,6 +45,7 @@
iElectric = "Domen Kozar <domen@dev.si>";
iyzsong = "Song Wenwu <iyzsong@gmail.com>";
jcumming = "Jack Cummings <jack@mudshark.org>";
joelteon = "Joel Taylor <me@joelt.io>";
jwiegley = "John Wiegley <johnw@newartisans.com>";
kkallio = "Karn Kallio <tierpluspluslists@gmail.com>";
ktosiek = "Tomasz Kontusz <tomasz.kontusz@gmail.com>";
@ -64,6 +67,7 @@
pierron = "Nicolas B. Pierron <nixos@nbp.name>";
piotr = "Piotr Pietraszkiewicz <ppietrasa@gmail.com>";
pkmx = "Chih-Mao Chen <pkmx.tw@gmail.com>";
plcplc = "Philip Lykke Carlsen <plcplc@gmail.com>";
pSub = "Pascal Wittmann <mail@pascal-wittmann.de>";
qknight = "Joachim Schiele <js@lastlog.de>";
raskin = "Michael Raskin <7c6f434c@mail.ru>";

View file

@ -39,7 +39,37 @@ This will check out the latest NixOS sources to
and the Nixpkgs sources to
<filename><replaceable>/my/sources</replaceable>/nixpkgs</filename>.
(The NixOS source tree lives in a subdirectory of the Nixpkgs
repository.) If you want to rebuild your system using your (modified)
repository.)</para>
<para>Its often inconvenient to develop directly on the master
branch, since if somebody has just committed (say) a change to GCC,
then the binary cache may not have caught up yet and youll have to
rebuild everything from source. So you may want to create a local
branch based on your current NixOS version:
<screen>
$ nixos-version
14.04.273.ea1952b (Baboon)
$ git checkout -b local ea1952b
</screen>
Or, to base your local branch on the latest version available in the
NixOS channel:
<screen>
$ curl -sI http://nixos.org/channels/nixos-unstable/ | grep Location
Location: http://releases.nixos.org/nixos/unstable/nixos-14.10pre43986.acaf4a6/
$ git checkout -b local acaf4a6
</screen>
You can then use <command>git rebase</command> to sync your local
branch with the upstream branch, and use <command>git
cherry-pick</command> to copy commits from your local branch to the
upstream branch.</para>
<para>If you want to rebuild your system using your (modified)
sources, you need to tell <command>nixos-rebuild</command> about them
using the <option>-I</option> flag:

View file

@ -509,7 +509,7 @@ in {
message = "uids and gids must be unique!";
}
{ assertion = cfg.mutableUsers || (nonUidUsers == {});
message = "When mutableUsers is false, no uid can be null";
message = "When mutableUsers is false, no uid can be null: ${toString (attrNames nonUidUsers)}";
}
{ assertion = cfg.mutableUsers || (nonGidGroups == {});
message = "When mutableUsers is false, no gid can be null";

View file

@ -131,6 +131,8 @@
starbound = 120;
hydra = 122;
spiped = 123;
teamspeak = 124;
influxdb = 125;
# When adding a uid, make sure it doesn't match an existing gid. And don't use uids above 399!
@ -236,6 +238,8 @@
grsecurity = 121;
hydra = 122;
spiped = 123;
teamspeak = 124;
influxdb = 125;
# When adding a gid, make sure it doesn't match an existing uid. And don't use gids above 399!

View file

@ -98,6 +98,7 @@
./services/databases/postgresql.nix
./services/databases/virtuoso.nix
./services/databases/monetdb.nix
./services/databases/influxdb.nix
./services/desktops/accountservice.nix
./services/desktops/geoclue2.nix
./services/desktops/gnome3/at-spi2-core.nix
@ -222,6 +223,7 @@
./services/networking/syncthing.nix
./services/networking/ssh/lshd.nix
./services/networking/ssh/sshd.nix
./services/networking/teamspeak3.nix
./services/networking/tftpd.nix
./services/networking/unbound.nix
./services/networking/vsftpd.nix
@ -253,6 +255,7 @@
./services/ttys/agetty.nix
./services/ttys/kmscon.nix
./services/web-servers/apache-httpd/default.nix
./services/web-servers/fcgiwrap.nix
./services/web-servers/jboss/default.nix
./services/web-servers/lighttpd/default.nix
./services/web-servers/lighttpd/cgit.nix
@ -314,11 +317,13 @@
./tasks/filesystems/vfat.nix
./tasks/filesystems/xfs.nix
./tasks/filesystems/zfs.nix
./tasks/encrypted-devices.nix
./tasks/kbd.nix
./tasks/lvm.nix
./tasks/network-interfaces.nix
./tasks/scsi-link-power-management.nix
./tasks/swraid.nix
./tasks/trackpoint.nix
./testing/service-runner.nix
./virtualisation/container-config.nix
./virtualisation/containers.nix

View file

@ -126,6 +126,16 @@ in {
Extra configuration. Overrides any other cofiguration.
'';
};
configFile = mkOption {
type = types.string;
default = "/var/lib/couchdb/couchdb.ini";
description = ''
Custom configuration file. File needs to be readable and writable
from couchdb user/group.
'';
};
};
};
@ -146,11 +156,13 @@ in {
mkdir -p `dirname ${cfg.logFile}`;
mkdir -p ${cfg.databaseDir};
mkdir -p ${cfg.viewIndexDir};
touch ${cfg.configFile}
if [ "$(id -u)" = 0 ]; then
chown ${cfg.user}:${cfg.group} `dirname ${cfg.uriFile}`
chown ${cfg.user}:${cfg.group} ${cfg.uriFile}
chown ${cfg.user}:${cfg.group} ${cfg.databaseDir}
chown ${cfg.user}:${cfg.group} ${cfg.viewIndexDir}
chown ${cfg.user}:${cfg.group} ${cfg.configFile}
fi
'';
@ -158,7 +170,7 @@ in {
PermissionsStartOnly = true;
User = cfg.user;
Group = cfg.group;
ExecStart = "${cfg.package}/bin/couchdb -a ${configFile} -a ${pkgs.writeText "couchdb-extra.ini" cfg.extraConfig}";
ExecStart = "${cfg.package}/bin/couchdb -a ${configFile} -a ${pkgs.writeText "couchdb-extra.ini" cfg.extraConfig} -a ${cfg.configFile}";
};
};

View file

@ -0,0 +1,241 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.influxdb;
influxdbConfig = pkgs.writeText "config.toml" ''
bind-address = "${cfg.bindAddress}"
[logging]
level = "info"
file = "stdout"
[admin]
port = ${toString cfg.adminPort}
assets = "${pkgs.influxdb}/share/influxdb/admin"
[api]
port = ${toString cfg.apiPort}
${cfg.apiExtraConfig}
[input_plugins]
${cfg.inputPluginsConfig}
[raft]
dir = "${cfg.dataDir}/raft"
${cfg.raftConfig}
[storage]
dir = "${cfg.dataDir}/db"
${cfg.storageConfig}
[cluster]
${cfg.clusterConfig}
[sharding]
${cfg.shardingConfig}
[wal]
dir = "${cfg.dataDir}/wal"
${cfg.walConfig}
${cfg.extraConfig}
'';
in
{
###### interface
options = {
services.influxdb = {
enable = mkOption {
default = false;
description = "Whether to enable the influxdb server";
type = types.uniq types.bool;
};
package = mkOption {
default = pkgs.influxdb;
description = "Which influxdb derivation to use";
type = types.package;
};
user = mkOption {
default = "influxdb";
description = "User account under which influxdb runs";
type = types.string;
};
group = mkOption {
default = "influxdb";
description = "Group under which influxdb runs";
type = types.string;
};
dataDir = mkOption {
default = "/var/db/influxdb";
description = "Data directory for influxd data files.";
type = types.path;
};
bindAddress = mkOption {
default = "127.0.0.1";
description = "Address where influxdb listens";
type = types.str;
};
adminPort = mkOption {
default = 8083;
description = "The port where influxdb admin listens";
type = types.int;
};
apiPort = mkOption {
default = 8086;
description = "The port where influxdb api listens";
type = types.int;
};
apiExtraConfig = mkOption {
default = ''
read-timeout = "5s"
'';
description = "Extra influxdb api configuration";
example = ''
ssl-port = 8084
ssl-cert = /path/to/cert.pem
read-timeout = "5s"
'';
type = types.lines;
};
inputPluginsConfig = mkOption {
default = "";
description = "Configuration of influxdb extra plugins";
example = ''
[input_plugins.graphite]
enabled = true
port = 2003
database = "graphite"
'';
};
raftConfig = mkOption {
default = ''
port = 8090
'';
description = "Influxdb raft configuration";
type = types.lines;
};
storageConfig = mkOption {
default = ''
write-buffer-size = 10000
'';
description = "Influxdb raft configuration";
type = types.lines;
};
clusterConfig = mkOption {
default = ''
protobuf_port = 8099
protobuf_timeout = "2s"
protobuf_heartbeat = "200ms"
protobuf_min_backoff = "1s"
protobuf_max_backoff = "10s"
write-buffer-size = 10000
max-response-buffer-size = 100
concurrent-shard-query-limit = 10
'';
description = "Influxdb cluster configuration";
type = types.lines;
};
leveldbConfig = mkOption {
default = ''
max-open-files = 40
lru-cache-size = "200m"
max-open-shards = 0
point-batch-size = 100
write-batch-size = 5000000
'';
description = "Influxdb leveldb configuration";
type = types.lines;
};
shardingConfig = mkOption {
default = ''
replication-factor = 1
[sharding.short-term]
duration = "7d"
split = 1
[sharding.long-term]
duration = "30d"
split = 1
'';
description = "Influxdb sharding configuration";
type = types.lines;
};
walConfig = mkOption {
default = ''
flush-after = 1000
bookmark-after = 1000
index-after = 1000
requests-per-logfile = 10000
'';
description = "Influxdb write-ahead log configuration";
type = types.lines;
};
extraConfig = mkOption {
default = "";
description = "Extra configuration options for influxdb";
type = types.string;
};
};
};
###### implementation
config = mkIf config.services.influxdb.enable {
systemd.services.influxdb = {
description = "InfluxDB Server";
wantedBy = [ "multi-user.target" ];
after = [ "network-interfaces.target" ];
serviceConfig = {
ExecStart = ''${cfg.package}/bin/influxdb -config "${influxdbConfig}"'';
User = "${cfg.user}";
Group = "${cfg.group}";
PermissionsStartOnly = true;
};
preStart = ''
mkdir -m 0770 -p ${cfg.dataDir}
if [ "$(id -u)" = 0 ]; then chown -R ${cfg.user}:${cfg.group} ${cfg.dataDir}; fi
'';
};
users.extraUsers = optional (cfg.user == "influxdb") {
name = "influxdb";
uid = config.ids.uids.influxdb;
description = "Influxdb daemon user";
};
users.extraGroups = optional (cfg.group == "influxdb") {
name = "influxdb";
gid = config.ids.gids.influxdb;
};
};
}

View file

@ -5,6 +5,8 @@ with lib;
let
pkg = if config.hardware.sane.snapshot then pkgs.saneBackendsGit else pkgs.saneBackends;
backends = [ pkg ] ++ config.hardware.sane.extraBackends;
saneConfig = pkgs.mkSaneConfig { paths = backends; };
in
@ -26,6 +28,12 @@ in
description = "Use a development snapshot of SANE scanner drivers.";
};
hardware.sane.extraBackends = mkOption {
type = types.listOf types.path;
default = [];
description = "Packages providing extra SANE backends to enable.";
};
};
@ -33,8 +41,12 @@ in
config = mkIf config.hardware.sane.enable {
environment.systemPackages = [ pkg ];
services.udev.packages = [ pkg ];
environment.systemPackages = backends;
environment.variables = {
SANE_CONFIG_DIR = mkDefault "${saneConfig}/etc/sane.d";
LD_LIBRARY_PATH = [ "${saneConfig}/lib/sane" ];
};
services.udev.packages = backends;
users.extraGroups."scanner".gid = config.ids.gids.scanner;

View file

@ -12,7 +12,7 @@ let
name = "graphite-config";
paths = lists.filter (el: el != null) [
(writeTextOrNull "carbon.conf" cfg.carbon.config)
(writeTextOrNull "storage-agregation.conf" cfg.carbon.storageAggregation)
(writeTextOrNull "storage-aggregation.conf" cfg.carbon.storageAggregation)
(writeTextOrNull "storage-schemas.conf" cfg.carbon.storageSchemas)
(writeTextOrNull "blacklist.conf" cfg.carbon.blacklist)
(writeTextOrNull "whitelist.conf" cfg.carbon.whitelist)

View file

@ -69,8 +69,8 @@ in
};
graphitePort = mkOption {
description = "Port of Graphite server";
default = config.services.graphite.web.port;
description = "Port of Graphite server (i.e. carbon-cache).";
default = 2003;
type = types.uniq types.int;
};

View file

@ -18,9 +18,9 @@ let
knownHosts = map (h: getAttr h cfg.knownHosts) (attrNames cfg.knownHosts);
knownHostsFile = pkgs.writeText "ssh_known_hosts" (
flip concatMapStrings knownHosts (h:
"${concatStringsSep "," h.hostNames} ${readFile h.publicKeyFile}"
)
flip concatMapStrings knownHosts (h: ''
${concatStringsSep "," h.hostNames} ${if h.publicKey != null then h.publicKey else readFile h.publicKeyFile}
'')
);
userOptions = {
@ -39,7 +39,7 @@ let
};
keyFiles = mkOption {
type = types.listOf types.unspecified;
type = types.listOf types.path;
default = [];
description = ''
A list of files each containing one OpenSSH public key that should be
@ -182,7 +182,7 @@ in
};
authorizedKeysFiles = mkOption {
type = types.listOf types.unspecified;
type = types.listOf types.str;
default = [];
description = "Files from with authorized keys are read.";
};
@ -218,7 +218,18 @@ in
the host's ssh service.
'';
};
publicKey = mkOption {
default = null;
type = types.nullOr types.str;
description = ''
The public key data for the host. You can fetch a public key
from a running SSH server with the <command>ssh-keyscan</command>
command.
'';
};
publicKeyFile = mkOption {
default = null;
type = types.nullOr types.path;
description = ''
The path to the public key file for the host. The public
key file is read at build time and saved in the Nix store.
@ -367,7 +378,12 @@ in
'';
assertions = [{ assertion = if cfg.forwardX11 then cfgc.setXAuthLocation else true;
message = "cannot enable X11 forwarding without setting xauth location";}];
message = "cannot enable X11 forwarding without setting xauth location";}]
++ flip mapAttrsToList cfg.knownHosts (name: data: {
assertion = (data.publicKey == null && data.publicKeyFile != null) ||
(data.publicKey != null && data.publicKeyFile == null);
message = "knownHost ${name} must contain either a publicKey or publicKeyFile";
});
};

View file

@ -0,0 +1,142 @@
{ config, pkgs, ... }:
with pkgs.lib;
let
ts3 = pkgs.teamspeak_server;
cfg = config.services.teamspeak3;
user = "teamspeak";
group = "teamspeak";
in
{
###### interface
options = {
services.teamspeak3 = {
enable = mkOption {
type = types.bool;
default = false;
description = ''
Whether to run the Teamspeak3 voice communication server daemon.
'';
};
dataDir = mkOption {
type = types.path;
default = "/var/lib/teamspeak3-server";
description = ''
Directory to store TS3 database and other state/data files.
'';
};
logPath = mkOption {
type = types.path;
default = "/var/log/teamspeak3-server/";
description = ''
Directory to store log files in.
'';
};
voiceIP = mkOption {
type = types.str;
default = "0.0.0.0";
description = ''
IP on which the server instance will listen for incoming voice connections. Defaults to any IP.
'';
};
defaultVoicePort = mkOption {
type = types.int;
default = 9987;
description = ''
Default UDP port for clients to connect to virtual servers - used for first virtual server, subsequent ones will open on incrementing port numbers by default.
'';
};
fileTransferIP = mkOption {
type = types.str;
default = "0.0.0.0";
description = ''
IP on which the server instance will listen for incoming file transfer connections. Defaults to any IP.
'';
};
fileTransferPort = mkOption {
type = types.int;
default = 30033;
description = ''
TCP port opened for file transfers.
'';
};
queryIP = mkOption {
type = types.str;
default = "0.0.0.0";
description = ''
IP on which the server instance will listen for incoming ServerQuery connections. Defaults to any IP.
'';
};
queryPort = mkOption {
type = types.int;
default = 10011;
description = ''
TCP port opened for ServerQuery connections.
'';
};
};
};
###### implementation
config = mkIf cfg.enable {
users.extraUsers.teamspeak =
{ name = "teamspeak";
description = "Teamspeak3 voice communication server daemon";
group = group;
uid = config.ids.uids.teamspeak;
};
users.extraGroups.teamspeak =
{ name = "teamspeak";
gid = config.ids.gids.teamspeak;
};
systemd.services.teamspeak3-server = {
description = "Teamspeak3 voice communication server daemon";
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
preStart = ''
mkdir -p ${cfg.dataDir}
mkdir -p ${cfg.logPath}
chown ${user}:${group} ${cfg.dataDir}
chown ${user}:${group} ${cfg.logPath}
'';
serviceConfig =
{ ExecStart = ''
${ts3}/bin/ts3server \
dbsqlpath=${ts3}/lib/teamspeak/sql/ logpath=${cfg.logPath} \
voice_ip=${cfg.voiceIP} default_voice_port=${toString cfg.defaultVoicePort} \
filetransfer_ip=${cfg.fileTransferIP} filetransfer_port=${toString cfg.fileTransferPort} \
query_ip=${cfg.queryIP} query_port=${toString cfg.queryPort}
'';
WorkingDirectory = cfg.dataDir;
User = user;
Group = group;
PermissionsStartOnly = true; # preStart needs to run with root permissions
};
};
};
}

View file

@ -18,25 +18,25 @@ let
"forward-zone:\n name: .\n" +
concatMapStrings (x: " forward-addr: ${x}\n") cfg.forwardAddresses;
confFile = pkgs.writeText "unbound.conf"
''
server:
directory: "${stateDir}"
username: ${username}
# make sure unbound can access entropy from inside the chroot.
# e.g. on linux the use these commands (on BSD, devfs(8) is used):
# mount --bind -n /dev/random /etc/unbound/dev/random
# and mount --bind -n /dev/log /etc/unbound/dev/log
chroot: "${stateDir}"
# logfile: "${stateDir}/unbound.log" #uncomment to use logfile.
pidfile: "${stateDir}/unbound.pid"
verbosity: 1 # uncomment and increase to get more logging.
# listen on all interfaces, answer queries from the local subnet.
confFile = pkgs.writeText "unbound.conf" ''
server:
directory: "${stateDir}"
username: ${username}
# make sure unbound can access entropy from inside the chroot.
# e.g. on linux the use these commands (on BSD, devfs(8) is used):
# mount --bind -n /dev/random /etc/unbound/dev/random
# and mount --bind -n /dev/log /etc/unbound/dev/log
chroot: "${stateDir}"
# logfile: "${stateDir}/unbound.log" #uncomment to use logfile.
pidfile: "${stateDir}/unbound.pid"
verbosity: 1 # uncomment and increase to get more logging.
${interfaces}
${access}
${forward}
${cfg.extraConfig}
'';
${forward}
${cfg.extraConfig}
'';
in
@ -45,74 +45,61 @@ in
###### interface
options = {
services.unbound = {
enable = mkOption {
default = false;
description = "
Whether to enable the Unbound domain name server.
";
default = false;
description = "Whether to enable the Unbound domain name server.";
};
allowedAccess = mkOption {
default = ["127.0.0.0/24"];
description = "
What networks are allowed to use us as a resolver.
";
default = ["127.0.0.0/24"];
description = "What networks are allowed to use unbound as a resolver.";
};
interfaces = mkOption {
default = [ "127.0.0.0" "::1" ];
description = "
What addresses the server should listen to.
";
default = [ "127.0.0.1" "::1" ];
description = "What addresses the server should listen on.";
};
forwardAddresses = mkOption {
default = [ ];
description = "
What servers to forward the queries to.
";
default = [ ];
description = "What servers to forward queries to.";
};
extraConfig = mkOption {
default = "";
description = "
Extra unbound config
";
default = "";
description = "Extra lines of unbound config.";
};
};
};
###### implementation
config = mkIf cfg.enable {
environment.systemPackages = [ pkgs.unbound ];
users.extraUsers = singleton {
name = username;
uid = config.ids.uids.unbound;
description = "unbound daemon user";
home = stateDir;
createHome = true;
};
systemd.services.unbound = {
description="Unbound recursive Domain Name Server";
after = [ "network.target" ];
before = [ "nss-lookup.target" ];
wants = [" nss-lookup.target" ];
wantedBy = [ "multi-user.target" ];
path = [ pkgs.unbound ];
serviceConfig.ExecStart = "${pkgs.unbound}/sbin/unbound -d -c ${confFile}";
};
};
###### implementation
config = mkIf config.services.unbound.enable {
environment.systemPackages = [ pkgs.unbound ];
users.extraUsers = singleton
{ name = username;
uid = config.ids.uids.unbound;
description = "unbound daemon user";
home = "/tmp";
};
jobs.unbound =
{ description = "Unbound name server job";
preStart =
''
${pkgs.coreutils}/bin/mkdir -p ${stateDir}
'';
daemonType = "fork";
exec = "${pkgs.unbound}/sbin/unbound -c ${confFile}";
};
};
}

View file

@ -0,0 +1,49 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.fcgiwrap;
in {
options = {
services.fcgiwrap = {
enable = mkOption {
type = types.bool;
default = false;
description = "Whether to enable fcgiwrap, a server for running CGI applications over FastCGI.";
};
preforkProcesses = mkOption {
type = types.int;
default = 1;
description = "Number of processes to prefork.";
};
bindSocket = mkOption {
type = types.string;
default = "unix:/run/fcgiwrap.sock";
description = ''
Socket to bind to. Valid socket URLs are:
unix:/path/to/socket for Unix sockets
tcp:dot.ted.qu.ad:port for IPv4 sockets
tcp6:[ipv6_addr]:port for IPv6 sockets
'';
};
};
};
config = mkIf cfg.enable {
systemd.services.fcgiwrap = {
after = [ "nss-user-lookup.target" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
ExecStart = "${pkgs.fcgiwrap}/sbin/fcgiwrap -c ${builtins.toString cfg.preforkProcesses} -s ${cfg.bindSocket}";
};
};
};
}

View file

@ -119,6 +119,8 @@ in
startOn = "started network-interfaces";
stopOn = "stopping network-interfaces";
daemonType = "daemon";
preStart =
''
# Create the base directory
@ -327,10 +329,12 @@ in
done
''
else ""}
${pkgs.su}/bin/su -s ${pkgs.bash}/bin/sh ${cfg.user} -c 'CATALINA_BASE=${cfg.baseDir} JAVA_HOME=${pkgs.jdk} JAVA_OPTS="${cfg.javaOpts}" CATALINA_OPTS="${cfg.catalinaOpts}" ${tomcat}/bin/startup.sh'
'';
script = ''
${pkgs.su}/bin/su -s ${pkgs.bash}/bin/sh ${cfg.user} -c 'CATALINA_BASE=${cfg.baseDir} JAVA_HOME=${pkgs.jdk} JAVA_OPTS="${cfg.javaOpts}" CATALINA_OPTS="${cfg.catalinaOpts}" ${tomcat}/bin/startup.sh'
'';
postStop =
''
echo "Stopping tomcat..."

View file

@ -94,6 +94,9 @@ in {
# Let gnome-control-center find gnome-shell search providers
export GNOME_SEARCH_PROVIDERS_DIR=${config.system.path}/share/gnome-shell/search-providers/
# Let nautilus find extensions
export NAUTILUS_EXTENSION_DIR=${config.system.path}/lib/nautilus/extensions-3.0/
# Update user dirs as described in http://freedesktop.org/wiki/Software/xdg-user-dirs/
${pkgs.xdg-user-dirs}/bin/xdg-user-dirs-update
@ -149,6 +152,7 @@ in {
gnome3.gnome-music
gnome3.gnome-tweak-tool
gnome3.gnome-photos
gnome3.nautilus-sendto
] config.environment.gnome3.excludePackages);
# Needed for themes and backgrounds

View file

@ -60,12 +60,12 @@ touch /etc/fstab # to shut up mount
touch /etc/mtab # to shut up mke2fs
touch /etc/initrd-release
mkdir -p /proc
mount -t proc none /proc
mount -t proc proc /proc
mkdir -p /sys
mount -t sysfs none /sys
mount -t devtmpfs -o "size=@devSize@" none /dev
mount -t sysfs sysfs /sys
mount -t devtmpfs -o "size=@devSize@" devtmpfs /dev
mkdir -p /run
mount -t tmpfs -o "mode=0755,size=@runSize@" none /run
mount -t tmpfs -o "mode=0755,size=@runSize@" tmpfs /run
# Process the kernel command line.

View file

@ -36,9 +36,9 @@ mount -n -o remount,rw /
# stage 1, we need to do that here.
if [ ! -e /proc/1 ]; then
mkdir -m 0755 -p /proc
mount -n -t proc none /proc
mount -n -t proc proc /proc
mkdir -m 0755 -p /dev
mount -t devtmpfs none /dev
mount -t devtmpfs devtmpfs /dev
fi
@ -82,9 +82,9 @@ done
# More special file systems, initialise required directories.
mkdir -m 0755 /dev/shm
mount -t tmpfs -o "rw,nosuid,nodev,size=@devShmSize@" none /dev/shm
mount -t tmpfs -o "rw,nosuid,nodev,size=@devShmSize@" tmpfs /dev/shm
mkdir -m 0755 -p /dev/pts
[ -e /proc/bus/usb ] && mount -t usbfs none /proc/bus/usb # UML doesn't have USB by default
[ -e /proc/bus/usb ] && mount -t usbfs usbfs /proc/bus/usb # UML doesn't have USB by default
mkdir -m 01777 -p /tmp
mkdir -m 0755 -p /var /var/log /var/lib /var/db
mkdir -m 0755 -p /nix/var
@ -114,16 +114,17 @@ rm -rf /nix/var/nix/gcroots/tmp /nix/var/nix/temproots
if ! mountpoint -q /run; then
rm -rf /run
mkdir -m 0755 -p /run
mount -t tmpfs -o "mode=0755,size=@runSize@" none /run
mount -t tmpfs -o "mode=0755,size=@runSize@" tmpfs /run
fi
# Create a ramfs on /run/keys to hold secrets that shouldn't be
# written to disk (generally used for NixOps, harmless elsewhere).
if ! mountpoint -q /run/keys; then
rm -rf /run/keys
mkdir -m 0750 /run/keys
mkdir /run/keys
mount -t ramfs ramfs /run/keys
chown 0:96 /run/keys
mount -t ramfs none /run/keys
chmod 0750 /run/keys
fi
mkdir -m 0755 -p /run/lock
@ -152,7 +153,7 @@ fi
# Create /var/setuid-wrappers as a tmpfs.
rm -rf /var/setuid-wrappers
mkdir -m 0755 -p /var/setuid-wrappers
mount -t tmpfs -o "mode=0755" none /var/setuid-wrappers
mount -t tmpfs -o "mode=0755" tmpfs /var/setuid-wrappers
# Run the script that performs all configuration activation that does

View file

@ -0,0 +1,69 @@
{ config, pkgs, modulesPath, ... }:
with pkgs.lib;
let
fileSystems = attrValues config.fileSystems ++ config.swapDevices;
encDevs = filter (dev: dev.encrypted.enable) fileSystems;
keyedEncDevs = filter (dev: dev.encrypted.keyFile != null) encDevs;
isIn = needle: haystack: filter (p: p == needle) haystack != [];
anyEncrypted =
fold (j: v: v || j.encrypted.enable) false encDevs;
encryptedFSOptions = {
encrypted = {
enable = mkOption {
default = false;
type = types.bool;
description = "The block device is backed by an encrypted one, adds this device as a initrd luks entry";
};
blkDev = mkOption {
default = null;
example = "/dev/sda1";
type = types.uniq (types.nullOr types.string);
description = "Location of the backing encrypted device";
};
label = mkOption {
default = null;
example = "rootfs";
type = types.uniq (types.nullOr types.string);
description = "Label of the backing encrypted device";
};
keyFile = mkOption {
default = null;
example = "/root/.swapkey";
type = types.uniq (types.nullOr types.string);
description = "File system location of keyfile";
};
};
};
in
{
options = {
fileSystems = mkOption {
options = [encryptedFSOptions];
};
swapDevices = mkOption {
options = [encryptedFSOptions];
};
};
config = mkIf anyEncrypted {
boot.initrd = {
luks = {
devices =
map (dev: { name = dev.encrypted.label; device = dev.encrypted.blkDev; } ) encDevs;
cryptoModules = [ "aes" "sha256" "sha1" "xts" ];
};
postMountCommands =
concatMapStrings (dev: "cryptsetup luksOpen --key-file ${dev.encrypted.keyFile} ${dev.encrypted.label};\n") keyedEncDevs;
};
};
}

View file

@ -0,0 +1,66 @@
{ config, lib, pkgs, ... }:
with lib;
{
###### interface
options = {
hardware.trackpoint = {
enable = mkOption {
default = false;
type = types.bool;
description = ''
Enable sensitivity and speed configuration for trackpoints.
'';
};
sensitivity = mkOption {
default = 128;
example = 255;
type = types.int;
description = ''
Configure the trackpoint sensitivity. By default, the kernel
configures 128.
'';
};
speed = mkOption {
default = 97;
example = 255;
type = types.int;
description = ''
Configure the trackpoint sensitivity. By default, the kernel
configures 97.
'';
};
};
};
###### implementation
config = mkIf config.hardware.trackpoint.enable {
jobs.trackpoint =
{ description = "Initialize trackpoint";
startOn = "started udev";
task = true;
script = ''
echo -n ${toString config.hardware.trackpoint.sensitivity} \
> /sys/devices/platform/i8042/serio1/sensitivity
echo -n ${toString config.hardware.trackpoint.speed} \
> /sys/devices/platform/i8042/serio1/speed
'';
};
};
}

View file

@ -31,7 +31,7 @@ EOF
}
my $ensureUniqueName = 0;
my $extraConfig = "";
my $extraConfig;
GetOptions(
"help" => sub { showHelp() },
@ -190,7 +190,7 @@ elsif ($action eq "update") {
# FIXME: may want to be more careful about clobbering the existing
# configuration.nix.
writeNixOSConfig $nixosConfigFile if defined $extraConfig;
writeNixOSConfig $nixosConfigFile if (defined $extraConfig && $extraConfig ne "");
system("nix-env", "-p", "$profileDir/system",
"-I", "nixos-config=$nixosConfigFile", "-f", "<nixpkgs/nixos>",

View file

@ -221,6 +221,7 @@ in rec {
tests.installer.rebuildCD = forAllSystems (system: (import tests/installer.nix { inherit system; }).rebuildCD.test);
tests.installer.separateBoot = forAllSystems (system: (import tests/installer.nix { inherit system; }).separateBoot.test);
tests.installer.simple = forAllSystems (system: (import tests/installer.nix { inherit system; }).simple.test);
tests.influxdb = callTest tests/influxdb.nix {};
tests.ipv6 = callTest tests/ipv6.nix {};
tests.jenkins = callTest tests/jenkins.nix {};
tests.kde4 = callTest tests/kde4.nix {};

34
nixos/tests/influxdb.nix Normal file
View file

@ -0,0 +1,34 @@
# This test runs influxdb and checks if influxdb is up and running
import ./make-test.nix {
nodes = {
one = { config, pkgs, ... }: {
services.influxdb.enable = true;
};
};
testScript = ''
startAll;
$one->waitForUnit("influxdb.service");
# Check if admin interface is avalible
$one->waitUntilSucceeds("curl -f 127.0.0.1:8083");
# create database
$one->succeed(q~
curl -X POST 'http://localhost:8086/db?u=root&p=root' \
-d '{"name": "test"}'
~);
# write some points and run simple query
$one->succeed(q~
curl -X POST 'http://localhost:8086/db/test/series?u=root&p=root' \
-d '[{"name":"foo","columns":["val"],"points":[[6666]]}]'
~);
$one->succeed(q~
curl -G 'http://localhost:8086/db/test/series?u=root&p=root' \
--data-urlencode 'q=select * from foo limit 1' | grep 6666
~);
'';
}

View file

@ -147,6 +147,9 @@ let
or die "bad `hello' output";
''}
# Wait for hard disks to appear in /dev
$machine->succeed("udevadm settle");
# Partition the disk.
${createPartitions}

View file

@ -69,6 +69,7 @@ stdenv.mkDerivation rec {
++ stdenv.lib.optional (withTaglib && !withKDE4 && withDevices) udisks2;
unpackPhase = "tar -xvf $src";
sourceRoot = "cantata-1.3.4";
# Qt4 is implicit when KDE is switched off.
cmakeFlags = stdenv.lib.flatten [

View file

@ -1,28 +1,17 @@
{ stdenv, fetchurl, builderDefs }:
{ runCommand, fetchurl }:
let
let
src = fetchurl {
url = http://www.ladspa.org/ladspa_sdk/ladspa.h.txt;
sha256 = "1b908csn85ng9sz5s5d1mqk711cmawain2z8px2ajngihdrynb67";
};
in
let localDefs = builderDefs.passthru.function {
buildInputs = [];
inherit src;
};
in with localDefs;
let
copyFile = fullDepEntry ("
mkdir -p \$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;
};
}
runCommand "ladspa.h"
{ meta.description = "LADSPA format audio plugins"; }
''
mkdir -p $out/include
cp ${src} $out/include/ladspa.h
''

View file

@ -1,4 +1,4 @@
{ stdenv, fetchurl, pkgconfig, glib, ncurses, mpd_clientlib }:
{ stdenv, fetchurl, pkgconfig, glib, ncurses, mpd_clientlib, libintlOrEmpty }:
stdenv.mkDerivation rec {
version = "0.21";
@ -9,7 +9,10 @@ stdenv.mkDerivation rec {
sha256 = "648e846e305c867cb937dcb467393c2f5a30bf460bdf77b63de7af69fba1fd07";
};
buildInputs = [ pkgconfig glib ncurses mpd_clientlib ];
buildInputs = [ pkgconfig glib ncurses mpd_clientlib ]
++ libintlOrEmpty;
NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin "-lintl";
meta = with stdenv.lib; {
description = "Curses-based interface for MPD (music player daemon)";

View file

@ -6,7 +6,9 @@
assert stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux";
let
version = "0.9.4.183";
version = if stdenv.system == "i686-linux"
then "0.9.4.183.g644e24e.428"
else "0.9.10.17.g4129e1c.78";
qt4webkit =
if stdenv.system == "i686-linux" then
@ -65,13 +67,13 @@ stdenv.mkDerivation {
src =
if stdenv.system == "i686-linux" then
fetchurl {
url = "http://repository.spotify.com/pool/non-free/s/spotify/spotify-client_${version}.g644e24e.428-1_i386.deb";
url = "http://repository.spotify.com/pool/non-free/s/spotify/spotify-client_${version}-1_i386.deb";
sha256 = "1wl6v5x8vm74h5lxp8fhvmih8l122aadsf1qxvpk0k3y6mbx0ifa";
}
else if stdenv.system == "x86_64-linux" then
fetchurl {
url = "http://repository.spotify.com/pool/non-free/s/spotify/spotify-client_${version}.g644e24e.428-1_amd64.deb";
sha256 = "1yniln6iswrrrny01qr2w5zcvam0vnrvy9mwbnk9i14i2ch0f3fx";
url = "http://repository.spotify.com/pool/non-free/s/spotify/spotify-client_${version}-1_amd64.deb";
sha256 = "1a4vn2ij3nghnc0fq3nsyb95gwhaw4zabdq6jd52hxz8iv31pn1z";
}
else throw "Spotify not supported on this platform.";
@ -89,13 +91,22 @@ stdenv.mkDerivation {
# Work around Spotify referring to a specific minor version of
# OpenSSL.
mkdir $out/lib
ln -s ${openssl}/lib/libssl.so $out/lib/libssl.so.0.9.8
ln -s ${openssl}/lib/libcrypto.so $out/lib/libcrypto.so.0.9.8
ln -s ${nss}/lib/libnss3.so $out/lib/libnss3.so.1d
ln -s ${nss}/lib/libnssutil3.so $out/lib/libnssutil3.so.1d
ln -s ${nss}/lib/libsmime3.so $out/lib/libsmime3.so.1d
${if stdenv.system == "x86_64-linux" then ''
ln -s ${openssl}/lib/libssl.so $out/lib/libssl.so.1.0.0
ln -s ${openssl}/lib/libcrypto.so $out/lib/libcrypto.so.1.0.0
ln -s ${nspr}/lib/libnspr4.so $out/lib/libnspr4.so
ln -s ${nspr}/lib/libplc4.so $out/lib/libplc4.so
'' else ''
ln -s ${openssl}/lib/libssl.so $out/lib/libssl.so.0.9.8
ln -s ${openssl}/lib/libcrypto.so $out/lib/libcrypto.so.0.9.8
ln -s ${nspr}/lib/libnspr4.so $out/lib/libnspr4.so.0d
ln -s ${nspr}/lib/libplc4.so $out/lib/libplc4.so.0d
''}
# Work around Spotify trying to open libudev.so.0 (which we don't have)
ln -s ${udev}/lib/libudev.so.1 $out/lib/libudev.so.0

View file

@ -0,0 +1,101 @@
{ stdenv, fetchurl, ncurses, pkgconfig, texinfo, libxml2, gnutls
}:
stdenv.mkDerivation rec {
emacsName = "emacs-24.3";
name = "${emacsName}-mac-4.8";
#builder = ./builder.sh;
src = fetchurl {
url = "mirror://gnu/emacs/${emacsName}.tar.xz";
sha256 = "1385qzs3bsa52s5rcncbrkxlydkw0ajzrvfxgv8rws5fx512kakh";
};
macportSrc = fetchurl {
url = "ftp://ftp.math.s.chiba-u.ac.jp/emacs/${name}.tar.gz";
sha256 = "194y341zrpjp75mc3099kjc0inr1d379wwsnav257bwsc967h8yx";
};
buildInputs = [ ncurses pkgconfig texinfo libxml2 gnutls ];
postUnpack = ''
mv $emacsName $name
tar xzf $macportSrc
mv $name $emacsName
'';
preConfigure = ''
patch -p0 < patch-mac
# The search for 'tputs' will fail because it's in ncursesw within the
# ncurses package, yet Emacs' configure script only looks in ncurses.
# Further, we need to make sure that the -L option occurs before mention
# of the library, so that it finds it within the Nix store.
sed -i 's/tinfo ncurses/tinfo ncursesw/' configure
ncurseslib=$(echo ${ncurses}/lib | sed 's#/#\\/#g')
sed -i "s/OLIBS=\$LIBS/OLIBS=\"-L$ncurseslib \$LIBS\"/" configure
sed -i 's/LIBS="\$LIBS_TERMCAP \$LIBS"/LIBS="\$LIBS \$LIBS_TERMCAP"/' configure
configureFlagsArray=(
LDFLAGS=-L${ncurses}/lib
--with-xml2=yes
--with-gnutls=yes
--with-mac
--enable-mac-app=$out/Applications
)
makeFlagsArray=(
CFLAGS=-O3
LDFLAGS="-O3 -L${ncurses}/lib"
);
'';
postInstall = ''
cat >$out/share/emacs/site-lisp/site-start.el <<EOF
;; nixos specific load-path
(when (getenv "NIX_PROFILES")
(setq load-path
(append (reverse
(mapcar (lambda (x) (concat x "/share/emacs/site-lisp/"))
(split-string (getenv "NIX_PROFILES"))))
load-path)))
;; make tramp work for NixOS machines
(eval-after-load 'tramp
'(add-to-list 'tramp-remote-path "/run/current-system/sw/bin"))
EOF
'';
doCheck = true;
meta = with stdenv.lib; {
description = "GNU Emacs 24, the extensible, customizable text editor";
homepage = http://www.gnu.org/software/emacs/;
license = licenses.gpl3Plus;
maintainers = with maintainers; [ jwiegley ];
platforms = platforms.darwin;
longDescription = ''
GNU Emacs is an extensible, customizable text editorand 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.
This is "Mac port" addition to GNU Emacs 24. This provides a native
GUI support for Mac OS X 10.4 - 10.9. Note that Emacs 23 and later
already contain the official GUI support via the NS (Cocoa) port for
Mac OS X 10.4 and later. So if it is good enough for you, then you
don't need to try this.
'';
};
}

View file

@ -0,0 +1,24 @@
{ stdenv, fetchurl, emacs, unzip }:
stdenv.mkDerivation {
name = "sbt-mode-2014-06-05";
src = fetchurl {
url = "https://github.com/hvesalai/sbt-mode/archive/676f22d9658989de401d299ed0250db9b911574d.zip";
sha256 = "0b8qrr3yp48ggl757d3a6bz633mbf4zxqpcwsh47b1ckiwa3nb2h";
};
buildInputs = [ unzip emacs ];
installPhase = ''
mkdir -p "$out/share/emacs/site-lisp"
cp -v *.el *.elc "$out/share/emacs/site-lisp/"
'';
meta = {
homepage = "https://github.com/hvesalai/scala-mode2";
description = "An Emacs mode for editing Scala code";
license = "permissive";
};
}

View file

@ -0,0 +1,24 @@
{ stdenv, fetchurl, emacs, unzip }:
stdenv.mkDerivation {
name = "scala-mode2-2014-06-05";
src = fetchurl {
url = "https://github.com/hvesalai/scala-mode2/archive/af2dc30226c890ff7d49d727450f8006b90781df.zip";
sha256 = "1jj08li9lfg5291jzj170wa3cmyf3g2a0j80cy5307l0mdawp9vx";
};
buildInputs = [ unzip emacs ];
installPhase = ''
mkdir -p "$out/share/emacs/site-lisp"
cp -v *.el *.elc "$out/share/emacs/site-lisp/"
'';
meta = {
homepage = "https://github.com/hvesalai/scala-mode2";
description = "An Emacs mode for editing Scala code";
license = "permissive";
};
}

View file

@ -64,27 +64,27 @@ let
in {
idea_community_1312 = buildIdea rec {
idea_community_1313 = buildIdea rec {
name = "idea-community-${version}";
version = "13.1.2";
build = "IC-135.690";
version = "13.1.3";
build = "IC-135.909";
description = "IntelliJ IDEA 13 Community Edition";
license = stdenv.lib.licenses.asl20.shortName;
src = fetchurl {
url = "http://download-ln.jetbrains.com/idea/ideaIC-${version}.tar.gz";
sha256 = "59fde67bf23e4638edd4b5ada133ac1c61c3132dea936eb7de7ee5ea259cc102";
sha256 = "62ed937ef68df16eef4d32772b6510835527f95020db1c76643f17ed2c067b51";
};
};
idea_ultimate_1312 = buildIdea rec {
idea_ultimate_1313 = buildIdea rec {
name = "idea-ultimate-${version}";
version = "13.1.2";
build = "IU-135.690";
version = "13.1.3";
build = "IU-135.909";
description = "IntelliJ IDEA 13 Ultimate Edition";
license = stdenv.lib.licenses.unfree;
src = fetchurl {
url = "http://download-ln.jetbrains.com/idea/ideaIU-${version}.tar.gz";
sha256 = "ccbaed495e2f099c92d1f747a59d7af9f9d41d75cf10e8a299d11825d78685ad";
sha256 = "6d99e49a63a197e19381a85535ab424a7832653db8cceb3bca7d53615ec7a53d";
};
};

View file

@ -11,7 +11,7 @@ composableDerivation {
else stdenv ).mkDerivation;
} (fix: {
name = "vim_configurable-7.4.23";
name = "vim_configurable-7.4.316";
enableParallelBuilding = true; # test this
@ -21,8 +21,8 @@ composableDerivation {
# latest release
args.fetchhg {
url = "https://vim.googlecode.com/hg/";
tag = "v7-4-131";
sha256 = "1akr0i4pykbrkqwrglm0dfn5nwpncb9pgg4h7fl6a8likbr5f3wb";
tag = "v7-4-316";
sha256 = "0scxx33p1ky0wihk04xqpd6rygp1crm0hx446zbjwbsjj6xxn7sx";
};
"vim-nox" =
@ -35,16 +35,13 @@ composableDerivation {
}.src;
};
prePatch = "cd src";
# if darwin support is enabled, we want to make sure we're not building with
# OS-installed python framework
preConfigure
= stdenv.lib.optionalString
(stdenv.isDarwin && (config.vim.darwin or true)) ''
# TODO: we should find a better way of doing this as, if the configure
# file changes, we need to change these line numbers
sed -i "5641,5644d" src/auto/configure
sed -i "5648d" src/auto/configure
'';
patches = stdenv.lib.optionals
(stdenv.isDarwin && (config.vim.darwin or true))
[ ./python_framework.patch ];
configureFlags
= [ "--enable-gui=${args.gui}" "--with-features=${args.features}" ];
@ -53,8 +50,6 @@ composableDerivation {
= [ ncurses pkgconfig gtk libX11 libXext libSM libXpm libXt libXaw libXau
libXmu glib libICE ];
prePatch = "cd src";
# most interpreters aren't tested yet.. (see python for example how to do it)
flags = {
ftNix = {

View file

@ -3,12 +3,12 @@
stdenv.mkDerivation rec {
name = "vim-${version}";
version = "7.4.131";
version = "7.4.316";
src = fetchhg {
url = "https://vim.googlecode.com/hg/";
tag = "v7-4-131";
sha256 = "1akr0i4pykbrkqwrglm0dfn5nwpncb9pgg4h7fl6a8likbr5f3wb";
tag = "v7-4-316";
sha256 = "0scxx33p1ky0wihk04xqpd6rygp1crm0hx446zbjwbsjj6xxn7sx";
};
enableParallelBuilding = true;

View file

@ -0,0 +1,93 @@
{ stdenv, stdenvAdapters, gccApple, fetchFromGitHub, ncurses, gettext,
pkgconfig, cscope, python, ruby, tcl, perl, luajit
}:
let inherit (stdenvAdapters.overrideGCC stdenv gccApple) mkDerivation;
in mkDerivation rec {
name = "macvim-${version}";
version = "7.4-73";
src = fetchFromGitHub {
owner = "b4winckler";
repo = "macvim";
rev = "snapshot-73";
sha256 = "0zv82y2wz8b482khkgbl08cnxq3pv5bm37c71wgfa0fzy3h12gcj";
};
enableParallelBuilding = true;
buildInputs = [
gettext ncurses pkgconfig luajit ruby tcl perl python
];
patches = [ ./macvim.patch ];
postPatch = ''
substituteInPlace src/MacVim/mvim --replace "# VIM_APP_DIR=/Applications" "VIM_APP_DIR=$out/Applications"
# Don't create custom icons.
substituteInPlace src/MacVim/icons/Makefile --replace '$(MAKE) -C makeicns' ""
substituteInPlace src/MacVim/icons/make_icons.py --replace "dont_create = False" "dont_create = True"
# Full path to xcodebuild
substituteInPlace src/Makefile --replace "xcodebuild" "/usr/bin/xcodebuild"
'';
configureFlags = [
#"--enable-cscope" # TODO: cscope doesn't build on Darwin yet
"--enable-fail-if-missing"
"--with-features=huge"
"--enable-gui=macvim"
"--enable-multibyte"
"--enable-nls"
"--enable-luainterp=dynamic"
"--enable-pythoninterp=dynamic"
"--enable-perlinterp=dynamic"
"--enable-rubyinterp=dynamic"
"--enable-tclinterp=yes"
"--with-luajit"
"--with-lua-prefix=${luajit}"
"--with-ruby-command=${ruby}/bin/ruby"
"--with-tclsh=${tcl}/bin/tclsh"
"--with-tlib=ncurses"
"--with-compiledby=Nix"
];
preConfigure = ''
DEV_DIR=$(/usr/bin/xcode-select -print-path)/Platforms/MacOSX.platform/Developer
configureFlagsArray+=(
"--with-developer-dir=$DEV_DIR"
)
'';
postInstall = ''
ensureDir $out/Applications
cp -r src/MacVim/build/Release/MacVim.app $out/Applications
rm $out/bin/{Vimdiff,Vimtutor,Vim,ex,rVim,rview,view}
cp src/MacVim/mvim $out/bin
cp src/vimtutor $out/bin
for prog in "vimdiff" "vi" "vim" "ex" "rvim" "rview" "view"; do
ln -s $out/bin/mvim $out/bin/$prog
done
# Fix rpaths
exe="$out/Applications/MacVim.app/Contents/MacOS/Vim"
libperl=$(dirname $(find ${perl} -name "libperl.dylib"))
install_name_tool -add_rpath ${luajit}/lib $exe
install_name_tool -add_rpath ${tcl}/lib $exe
install_name_tool -add_rpath ${python}/lib $exe
install_name_tool -add_rpath $libperl $exe
install_name_tool -add_rpath ${ruby}/lib $exe
'';
meta = with stdenv.lib; {
description = "Vim - the text editor - for Mac OS X";
homepage = https://github.com/b4winckler/macvim;
maintainers = with maintainers; [ cstrahan ];
platforms = platforms.darwin;
};
}

View file

@ -0,0 +1,159 @@
diff --git a/src/vimtutor b/src/vimtutor
index 70d9ec7..b565a1a 100755
--- a/src/vimtutor
+++ b/src/vimtutor
@@ -16,7 +16,7 @@ seq="vim vim8 vim75 vim74 vim73 vim72 vim71 vim70 vim7 vim6 vi"
if test "$1" = "-g"; then
# Try to use the GUI version of Vim if possible, it will fall back
# on Vim if Gvim is not installed.
- seq="gvim gvim8 gvim75 gvim74 gvim73 gvim72 gvim71 gvim70 gvim7 gvim6 $seq"
+ seq="mvim gvim gvim8 gvim75 gvim74 gvim73 gvim72 gvim71 gvim70 gvim7 gvim6 $seq"
shift
fi
diff --git a/src/auto/configure b/src/auto/configure
index bc9f074..9b9125e 100755
--- a/src/auto/configure
+++ b/src/auto/configure
@@ -2252,7 +2252,7 @@ rm -f conftest.val
as_fn_set_status $ac_retval
} # ac_fn_c_compute_int
-cat >auto/config.log <<_ACEOF
+cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
@@ -2262,7 +2262,7 @@ generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
_ACEOF
-exec 5>>auto/config.log
+exec 5>>config.log
{
cat <<_ASUNAME
## --------- ##
@@ -5377,10 +5377,7 @@ $as_echo "no" >&6; }
fi
if test "X$vi_cv_path_mzscheme_pfx" != "X"; then
- if test "x$MACOSX" = "xyes"; then
- MZSCHEME_LIBS="-framework Racket"
- MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
- elif test -f "${vi_cv_path_mzscheme_pfx}/lib/libmzscheme3m.a"; then
+ if test -f "${vi_cv_path_mzscheme_pfx}/lib/libmzscheme3m.a"; then
MZSCHEME_LIBS="${vi_cv_path_mzscheme_pfx}/lib/libmzscheme3m.a"
MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
elif test -f "${vi_cv_path_mzscheme_pfx}/lib/libracket3m.a"; then
@@ -5716,23 +5713,6 @@ $as_echo ">>> too old; need Perl version 5.003_01 or later <<<" >&6; }
fi
if test "x$MACOSX" = "xyes"; then
- dir=/System/Library/Perl
- darwindir=$dir/darwin
- if test -d $darwindir; then
- PERL=/usr/bin/perl
- else
- dir=/System/Library/Perl/5.8.1
- darwindir=$dir/darwin-thread-multi-2level
- if test -d $darwindir; then
- PERL=/usr/bin/perl
- fi
- fi
- if test -n "$PERL"; then
- PERL_DIR="$dir"
- PERL_CFLAGS="-DFEAT_PERL -I$darwindir/CORE"
- PERL_OBJ="objects/if_perl.o objects/if_perlsfio.o $darwindir/auto/DynaLoader/DynaLoader.a"
- PERL_LIBS="-L$darwindir/CORE -lperl"
- fi
PERL_LIBS=`echo "$PERL_LIBS" | sed -e 's/-arch\ ppc//' -e 's/-arch\ i386//' -e 's/-arch\ x86_64//'`
PERL_CFLAGS=`echo "$PERL_CFLAGS" | sed -e 's/-arch\ ppc//' -e 's/-arch\ i386//' -e 's/-arch\ x86_64//'`
fi
@@ -5926,10 +5906,6 @@ __:
eof
eval "`cd ${PYTHON_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`"
rm -f -- "${tmp_mkf}"
- if test "x$MACOSX" = "xyes" && ${vi_cv_path_python} -c \
- "import sys; sys.exit(${vi_cv_var_python_version} < 2.3)"; then
- vi_cv_path_python_plibs="-framework Python"
- else
if test "${vi_cv_var_python_version}" = "1.4"; then
vi_cv_path_python_plibs="${PYTHON_CONFDIR}/libModules.a ${PYTHON_CONFDIR}/libPython.a ${PYTHON_CONFDIR}/libObjects.a ${PYTHON_CONFDIR}/libParser.a"
else
@@ -5937,7 +5913,6 @@ eof
fi
vi_cv_path_python_plibs="${vi_cv_path_python_plibs} ${python_BASEMODLIBS} ${python_LIBS} ${python_SYSLIBS} ${python_LINKFORSHARED}"
vi_cv_path_python_plibs=`echo $vi_cv_path_python_plibs | sed s/-ltermcap//`
- fi
fi
@@ -6004,13 +5979,6 @@ rm -f core conftest.err conftest.$ac_objext \
$as_echo "no" >&6; }
fi
- if test -n "$MACSDK"; then
- PYTHON_CFLAGS=
- PYTHON_LIBS=-framework Python
- PYTHON_CONFDIR=
- PYTHON_GETPATH_CFLAGS=
- fi
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compile and link flags for Python are sane" >&5
$as_echo_n "checking if compile and link flags for Python are sane... " >&6; }
cflags_save=$CFLAGS
@@ -6853,11 +6821,7 @@ $as_echo "$tclver - OK" >&6; };
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for location of Tcl include" >&5
$as_echo_n "checking for location of Tcl include... " >&6; }
- if test "x$MACOSX" != "xyes"; then
tclinc="$tclloc/include $tclloc/include/tcl $tclloc/include/tcl$tclver /usr/local/include /usr/local/include/tcl$tclver /usr/include /usr/include/tcl$tclver"
- else
- tclinc="/System/Library/Frameworks/Tcl.framework/Headers"
- fi
TCL_INC=
for try in $tclinc; do
if test -f "$try/tcl.h"; then
@@ -6875,12 +6839,8 @@ $as_echo "<not found>" >&6; }
if test -z "$SKIP_TCL"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for location of tclConfig.sh script" >&5
$as_echo_n "checking for location of tclConfig.sh script... " >&6; }
- if test "x$MACOSX" != "xyes"; then
tclcnf=`echo $tclinc | sed s/include/lib/g`
tclcnf="$tclcnf `echo $tclinc | sed s/include/lib64/g`"
- else
- tclcnf="/System/Library/Frameworks/Tcl.framework"
- fi
for try in $tclcnf; do
if test -f $try/tclConfig.sh; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $try/tclConfig.sh" >&5
@@ -7050,10 +7010,6 @@ $as_echo "$rubyhdrdir" >&6; }
if test -f "$rubylibdir/$librubya"; then
librubyarg="$librubyarg"
RUBY_LIBS="$RUBY_LIBS -L$rubylibdir"
- elif test -d "/System/Library/Frameworks/Ruby.framework"; then
- RUBY_LIBS="-framework Ruby"
- RUBY_CFLAGS="-DRUBY_VERSION=$rubyversion"
- librubyarg=
fi
if test "X$librubyarg" != "X"; then
@@ -14061,7 +14017,7 @@ fi
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-exec 5>>auto/config.log
+exec 5>>config.log
{
echo
sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
@@ -14653,7 +14609,7 @@ if test "$no_create" != yes; then
ac_config_status_args="$ac_config_status_args --quiet"
exec 5>/dev/null
$SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
- exec 5>>auto/config.log
+ exec 5>>config.log
# Use ||, not &&, to avoid exiting from the if with $? = 1, which
# would make configure fail if this is the last instruction.
$ac_cs_success || as_fn_exit 1

View file

@ -0,0 +1,23 @@
diff --git a/src/auto/configure b/src/auto/configure
index a9755a0..4a0e2a4 100755
--- a/auto/configure
+++ b/auto/configure
@@ -5638,10 +5638,6 @@ __:
eof
eval "`cd ${PYTHON_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`"
rm -f -- "${tmp_mkf}"
- if test "x$MACOSX" = "xyes" && ${vi_cv_path_python} -c \
- "import sys; sys.exit(${vi_cv_var_python_version} < 2.3)"; then
- vi_cv_path_python_plibs="-framework Python"
- else
if test "${vi_cv_var_python_version}" = "1.4"; then
vi_cv_path_python_plibs="${PYTHON_CONFDIR}/libModules.a ${PYTHON_CONFDIR}/libPython.a ${PYTHON_CONFDIR}/libObjects.a ${PYTHON_CONFDIR}/libParser.a"
else
@@ -5649,7 +5645,6 @@ eof
fi
vi_cv_path_python_plibs="${vi_cv_path_python_plibs} ${python_BASEMODLIBS} ${python_LIBS} ${python_SYSLIBS} ${python_LINKFORSHARED}"
vi_cv_path_python_plibs=`echo $vi_cv_path_python_plibs | sed s/-ltermcap//`
- fi
fi

View file

@ -1,22 +1,23 @@
{ stdenv, makeWrapper, fetchurl, x11, imlib2, libjpeg, libpng, giblib
{ stdenv, makeWrapper, fetchurl, x11, imlib2, libjpeg, libpng
, libXinerama, curl }:
stdenv.mkDerivation rec {
name = "feh-2.11";
name = "feh-2.12";
src = fetchurl {
url = "http://feh.finalrewind.org/${name}.tar.bz2";
sha256 = "1y41ixsp5nhvb29hhiyh8g1g28lc0kki619skgxcv5iisc93dk4x";
sha256 = "0ckhidmsms2l5jycp0qf71jzmb3bpbhjq3bcgfpvfvszah7pmq30";
};
buildInputs = [makeWrapper x11 imlib2 giblib libjpeg libpng libXinerama curl ];
buildInputs = [makeWrapper x11 imlib2 libjpeg libpng libXinerama curl];
preBuild = ''
makeFlags="PREFIX=$out"
'';
postInstall = ''
wrapProgram "$out/bin/feh" --prefix PATH : "${libjpeg}/bin"
wrapProgram "$out/bin/feh" --prefix PATH : "${libjpeg}/bin" \
--add-flags '--theme=feh'
'';
meta = {

View file

@ -35,13 +35,14 @@ stdenv.mkDerivation rec {
description = "Geeqie, a lightweight GTK+ based image viewer";
longDescription =
'' Geeqie is a lightweight GTK+ based image viewer for Unix like
operating systems. It features: EXIF, IPTC and XMP metadata
browsing and editing interoperability; easy integration with other
software; geeqie works on files and directories, there is no need to
import images; fast preview for many raw image formats; tools for
image comparison, sorting and managing photo collection. Geeqie was
initially based on GQview.
''
Geeqie is a lightweight GTK+ based image viewer for Unix like
operating systems. It features: EXIF, IPTC and XMP metadata
browsing and editing interoperability; easy integration with other
software; geeqie works on files and directories, there is no need to
import images; fast preview for many raw image formats; tools for
image comparison, sorting and managing photo collection. Geeqie was
initially based on GQview.
'';
license = "GPLv2+";

View file

@ -0,0 +1,27 @@
{ stdenv }:
{ paths }:
with stdenv.lib;
let installSanePath = path: ''
find "${path}/lib/sane" -not -type d -maxdepth 1 | while read backend; do
ln -s $backend $out/lib/sane/$(basename $backend)
done
find "${path}/etc/sane.d" -not -type d -maxdepth 1 | while read conf; do
ln -s $conf $out/etc/sane.d/$(basename $conf)
done
find "${path}/etc/sane.d/dll.d" -not -type d -maxdepth 1 | while read conf; do
ln -s $conf $out/etc/sane.d/dll.d/$(basename $conf)
done
'';
in
stdenv.mkDerivation {
name = "sane-config";
phases = "installPhase";
installPhase = ''
mkdir -p $out/etc/sane.d $out/etc/sane.d/dll.d $out/lib/sane
'' + concatMapStrings installSanePath paths;
}

View file

@ -0,0 +1,42 @@
{ stdenv, fetchurl, unzip, mono, avrgcclibc, avrdude, gtk, xdg_utils }:
stdenv.mkDerivation rec {
name = "avrdudess-2.2.20140102";
src = fetchurl {
url = "http://blog.zakkemble.co.uk/download/avrdudess_20140102.zip";
sha256 = "18llpvjsfhypzijrvfbzmcg3g141f307mzsrg11wcdxh9syxqak6";
};
buildInputs = [ unzip ];
phases = [ "buildPhase" ];
buildPhase = ''
mkdir -p "$out/avrdudess"
mkdir -p "$out/bin"
unzip "$src" -d "$out/avrdudess"
cat >> "$out/bin/avrdudess" << __EOF__
#!${stdenv.shell}
export LD_LIBRARY_PATH="${gtk}/lib:${mono}/lib"
# We need PATH from user env for xdg-open to find its tools, which
# typically depend on the currently running desktop environment.
export PATH="${avrgcclibc}/bin:${avrdude}/bin:${xdg_utils}/bin:\$PATH"
# avrdudess must have its resource files in its current working directory
cd $out/avrdudess && exec ${mono}/bin/mono "$out/avrdudess/avrdudess.exe" "\$@"
__EOF__
chmod a+x "$out/bin/"*
'';
meta = with stdenv.lib; {
description = "GUI for AVRDUDE (AVR microcontroller programmer)";
homepage = https://github.com/zkemble/AVRDUDESS;
license = licenses.gpl3;
platforms = platforms.linux;
maintainers = [ maintainers.bjornfor ];
};
}

View file

@ -0,0 +1,35 @@
{ stdenv, fetchurl
, intltool, pkgconfig, gtk
}:
stdenv.mkDerivation rec {
name = "galculator-${version}";
version = "2.1.3";
src = fetchurl {
url = "http://downloads.sourceforge.net/galculator/${name}.tar.gz";
sha256 = "12m7dldjk10lpkdxk7zpk98n32ci65zmxidghihb7n1m3rhp3q17";
};
buildInputs = [ intltool pkgconfig gtk ];
meta = {
description = "A GTK 2/3 algebraic and RPN calculator";
longDescription = ''
galculator is a GTK 2 / GTK 3 based calculator. Its main features include:
- Algebraic, RPN (Reverse Polish Notation), Formula Entry and Paper modes;
- Basic and Scientific Modes
- Decimal, hexadecimal, octal and binary number base
- Radiant, degree and grad support
- User defined constants and functions
- A bunch of common functions
- Binary arithmetic of configurable bit length and signedness
- Quad-precision floating point arithmetic, and 112-bit binary arithmetic
'';
homepage = http://galculator.sourceforge.net/;
license = stdenv.lib.licenses.gpl2Plus;
maintainers = [ stdenv.lib.maintainers.AndersonTorres ];
};
}

View file

@ -0,0 +1,75 @@
{ stdenv, fetchgit, ocaml, mupdf, lablgl, mesa
, libX11, libXext, gtk3, freetype, zlib, openjpeg
, jbig2dec, libjpeg, ncurses }:
stdenv.mkDerivation {
name = "llpp-2014-05-26";
src = fetchgit {
url = "git://repo.or.cz/llpp.git";
rev = "902143de64d86b5714b3a59d2cc7085083b87249";
sha256 = "038xl4gbvm57na2lz1fw36sf43zaxq407zi2d53985vc33677j9s";
};
buildInputs = [ ocaml mupdf lablgl mesa libX11 libXext gtk3
freetype jbig2dec libjpeg openjpeg zlib ncurses ];
# The build phase was extracted from buildall.sh, because that script
# fetched the dependencies on its own.
buildPhase = ''
ccopt="-O"
ccopt="$ccopt -I ${jbig2dec}/include"
ccopt="$ccopt -I ${libjpeg}/include"
ccopt="$ccopt -I ${freetype}/include"
ccopt="$ccopt -I ${openjpeg}/include"
ccopt="$ccopt -I ${zlib}/include"
ccopt="$ccopt -I ${mupdf}/include"
ccopt="$ccopt -include ${freetype}/include/ft2build.h"
ccopt="$ccopt -D_GNU_SOURCE"
cclib="$cclib -lmupdf"
cclib="$cclib -lz -ljpeg -lopenjp2 -ljbig2dec -lfreetype -lpthread"
cclib="$cclib -lX11"
cclib="$cclib -lfreetype"
comp=ocamlc.opt
cmsuf=cmo
sh mkhelp.sh keystoml.ml KEYS > help.ml
$comp -c -o link.o -ccopt "$ccopt" link.c
$comp -c -o help.$cmsuf help.ml
$comp -c -o utils.$cmsuf utils.ml
$comp -c -o wsi.cmi wsi.mli
$comp -c -o wsi.$cmsuf wsi.ml
$comp -c -o parser.$cmsuf parser.ml
$comp -c -o main.$cmsuf -I ${lablgl}/lib/ocaml/4.01.0/site-lib/lablgl main.ml
$comp -custom -o llpp \
-I ${lablgl}/lib/ocaml/4.01.0/site-lib/lablgl \
str.cma unix.cma lablgl.cma \
link.o \
-cclib "$cclib" \
help.cmo \
utils.cmo \
parser.cmo \
wsi.cmo \
main.cmo
'';
# Binary fails with 'No bytecode file specified.' if stripped.
dontStrip = true;
installPhase = ''
install -d $out/bin
install llpp llppac $out/bin
'';
meta = {
homepage = http://repo.or.cz/w/llpp.git;
description = "A MuPDF based PDF pager written in OCaml";
platforms = stdenv.lib.platforms.linux;
maintainers = [ stdenv.lib.maintainers.pSub ];
license = "GPL";
};
}

View file

@ -1,30 +1,53 @@
{ stdenv, fetchurl, fetchpatch, pkgconfig, zlib, freetype, libjpeg, jbig2dec, openjpeg
, libX11, libXext }:
stdenv.mkDerivation rec {
name = "mupdf-1.3";
name = "mupdf-1.4";
src = fetchurl {
url = "http://mupdf.com/download/archive/${name}-source.tar.gz";
sha256 = "0y247nka5gkr1ajn47jrlp5rcnf6h4ff7dfsprma3h4wxqdv7a5b";
sha256 = "08pc6fv42sb9k9dzjs8ph32nixzrzmr08yxh7arkpsdm42asp2q1";
};
patches = [(fetchpatch {
name = "CVE-2014-2013.patch";
url = "http://git.ghostscript.com/?p=mupdf.git;a=commitdiff_plain;"
+ "h=60dabde18d7fe12b19da8b509bdfee9cc886aafc";
sha256 = "0p721f3g2djz9fy6rcgj83c20f5k257wg2d0yvvmp02m7sp06l0g";
})];
buildInputs = [ pkgconfig zlib freetype libjpeg jbig2dec openjpeg libX11 libXext ];
enableParallelBuilding = true;
my_soname = "libmupdf.so.1.3";
my_soname_js_none = "libmupdf-js-none.so.1.3";
preBuild = ''
export makeFlags="prefix=$out build=release"
export makeFlags="prefix=$out build=release XCFLAGS=-fpic"
export NIX_CFLAGS_COMPILE=" $NIX_CFLAGS_COMPILE -I$(echo ${openjpeg}/include/openjpeg-*) "
# Copied from Gentoo ebuild
rm -rf thirdparty
sed -e "\$a\$(MUPDF_LIB): \$(MUPDF_JS_NONE_LIB)" \
-e "\$a\\\t\$(QUIET_LINK) \$(CC) \$(LDFLAGS) --shared -Wl,-soname -Wl,${my_soname} -Wl,--no-undefined -o \$@ \$^ \$(MUPDF_JS_NONE_LIB) \$(LIBS)" \
-e "/^MUPDF_LIB :=/s:=.*:= \$(OUT)/${my_soname}:" \
-e "\$a\$(MUPDF_JS_NONE_LIB):" \
-e "\$a\\\t\$(QUIET_LINK) \$(CC) \$(LDFLAGS) --shared -Wl,-soname -Wl,${my_soname_js_none} -Wl,--no-undefined -o \$@ \$^ \$(LIBS)" \
-e "/^MUPDF_JS_NONE_LIB :=/s:=.*:= \$(OUT)/${my_soname_js_none}:" \
-i Makefile
sed -e "s/libopenjpeg1/libopenjp2/" -i Makerules
'';
postInstall = ''
ln -s ${my_soname} $out/lib/libmupdf.so
mkdir -p "$out/lib/pkgconfig"
cat >"$out/lib/pkgconfig/mupdf.pc" <<EOF
prefix=$out
libdir=$out/lib
includedir=$out/include
Name: mupdf
Description: Library for rendering PDF documents
Requires: freetype2 libopenjp2 libcrypto
Version: 1.3
Libs: -L$out/lib -lmupdf
Cflags: -I$out/include
EOF
mkdir -p $out/share/applications
cat > $out/share/applications/mupdf.desktop <<EOF
[Desktop Entry]

View file

@ -0,0 +1,69 @@
{ stdenv, fetchhg, fetchurl, pythonPackages, curl }:
let
getmodel = name: sha256: {
src = fetchurl {
url = "http://iupr1.cs.uni-kl.de/~tmb/ocropus-models/${name}";
inherit sha256;
};
inherit name;
};
models = [
(getmodel "en-default.pyrnn.gz"
"1xyi3k3p81mfw0491gb1haisazfyi2i18f1wjs1m34ak39qfqjdp")
(getmodel "en-uw3-linerel-2.cmodel.gz"
"0zdw0db2znxxd4h7aa09506nkbxd1cfqacxzyzlx42bjn951wcpw")
(getmodel "en-mixed-3.ngraphs.gz"
"1fqw7pxmjwapirp9xv3b0gn9pk53q4740qn5dw4wxfxk9dpp9lr4")
(getmodel "en-space.model.gz"
"0w5hnjm6rz5iiw1p2yixj147ifq11s9jfzrxk4v4xxmcyn365096")
(getmodel "en-mixed.lineest.gz"
"0skrziksn3zb3g8588y7jd10pnl2pzrby0119ac0awapzzg9vkvw")
(getmodel "uw3unlv.pyrnn.gz"
"0g08q9cjxxx3mg1jn4654nalxr56y2jq1h33pwxrj5lrckr7grb9")
(getmodel "en-uw3unlv-perchar.cmodel.gz"
"1izvm0wkb2vh58hjp59fw97drv17zdzrw6mz3aanrg5ax6fnfadk")
(getmodel "gradient.lineest.gz"
"1bw9hj9byjxi31rjh2xiysnx8c72jz0npxa54xgjwsqg7ihl8jzw")
(getmodel "en-mixed-round1.lineest.gz"
"1fjkygyrg4ng7kx4iqa4yhgvmw1zq72p3q5p0hcb2xxhqc04vx7c")
(getmodel "frakant.pyrnn.gz"
"0i1k95f2a8qlc6m7qq11pmjfcimyrjsfjvv20nrs2ygp9pwskmxp")
(getmodel "fraktur.pyrnn.gz"
"1wlwvxn91ilgmlri1hj81arl3mbzxc24ycdnkf5icq4hdi4c6y8b")
];
in
pythonPackages.buildPythonPackage rec {
name = "ocropus-${version}";
version = "20130905";
src = fetchhg {
url = "https://code.google.com/p/ocropus.ocropy";
tag = "a6e0fbd820ce";
sha256 = "1s0v0gd6psfjp6lghwl2dj49h18mgf2n2z8hqzw8430nzhglnlvr";
};
patches = [ ./display.patch ];
propagatedBuildInputs = with pythonPackages; [ curl numpy scipy pillow
matplotlib beautifulsoup4 pygtk lxml ];
enableParallelBuilding = true;
preConfigure = with stdenv.lib; ''
${concatStrings (map (x: "ln -s ${x.src} models/${x.name};") models)}
sed -i 's|/usr/local|'$out'|' ocrolib/common.py
sed -i 's|/usr/local|'$out'|' ocrolib/default.py
${pythonPackages.python}/bin/${pythonPackages.python.executable} setup.py download_models
'';
meta = with stdenv.lib; {
description = "Open source document analysis and OCR system";
license = licenses.asl20;
homepage = https://code.google.com/p/ocropus/;
maintainers = with maintainers; [ iElectric viric ];
platforms = platforms.linux;
};
}

View file

@ -0,0 +1,17 @@
http://code.google.com/p/ocropus/issues/detail?id=365
diff --git a/setup.py b/setup.py
index c6ade25..a2ad6bf 100644
--- a/setup.py
+++ b/setup.py
@@ -8,7 +8,10 @@ assert sys.version_info[0]==2 and sys.version_info[1]>=7,\
from distutils.core import setup, Extension, Command
from distutils.command.install_data import install_data
+import matplotlib
+matplotlib.use('Agg')
from ocrolib import default
+
modeldir = "models/"
modelfiles = default.installable
modelprefix = "http://iupr1.cs.uni-kl.de/~tmb/ocropus-models/"

View file

@ -1,5 +1,6 @@
{ stdenv, fetchurl, perlSupport, libX11, libXt, libXft, ncurses, perl,
fontconfig, freetype, pkgconfig, libXrender, gdkPixbufSupport, gdk_pixbuf }:
fontconfig, freetype, pkgconfig, libXrender, gdkPixbufSupport, gdk_pixbuf,
unicode3Support }:
let
name = "rxvt-unicode";
@ -9,7 +10,7 @@ in
stdenv.mkDerivation (rec {
name = "${n}${if perlSupport then "-with-perl" else ""}";
name = "${n}${if perlSupport then "-with-perl" else ""}${if unicode3Support then "-with-unicode3" else ""}";
src = fetchurl {
url = "http://dist.schmorp.de/rxvt-unicode/Attic/rxvt-unicode-${version}.tar.bz2";
@ -24,12 +25,15 @@ stdenv.mkDerivation (rec {
outputs = [ "out" "terminfo" ];
patches = [ ./rxvt-unicode-9.06-font-width.patch ];
patches = [
./rxvt-unicode-9.06-font-width.patch
./rxvt-unicode-256-color-resources.patch
];
preConfigure =
''
mkdir -p $terminfo/share/terminfo
configureFlags="--with-terminfo=$terminfo/share/terminfo --enable-256-color ${if perlSupport then "--enable-perl" else "--disable-perl"}";
configureFlags="--with-terminfo=$terminfo/share/terminfo --enable-256-color ${if perlSupport then "--enable-perl" else "--disable-perl"} ${if unicode3Support then "--enable-unicode3" else "--disable-unicode3"}";
export TERMINFO=$terminfo/share/terminfo # without this the terminfo won't be compiled by tic, see man tic
NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${freetype}/include/freetype2"
NIX_LDFLAGS="$NIX_LDFLAGS -lfontconfig -lXrender "

View file

@ -0,0 +1,255 @@
diff --git a/src/xdefaults.C b/src/xdefaults.C
index 23b6822..382f3b1 100644
--- a/src/xdefaults.C
+++ b/src/xdefaults.C
@@ -155,6 +155,250 @@ optList[] = {
RSTRG (Rs_color + minCOLOR + 5, "color5", "color"),
RSTRG (Rs_color + minCOLOR + 6, "color6", "color"),
RSTRG (Rs_color + minCOLOR + 7, "color7", "color"),
+ // 88 xterm colors
+ RSTRG (Rs_color + minCOLOR + 16, "color16", "color"),
+ RSTRG (Rs_color + minCOLOR + 17, "color17", "color"),
+ RSTRG (Rs_color + minCOLOR + 18, "color18", "color"),
+ RSTRG (Rs_color + minCOLOR + 19, "color19", "color"),
+ RSTRG (Rs_color + minCOLOR + 20, "color20", "color"),
+ RSTRG (Rs_color + minCOLOR + 21, "color21", "color"),
+ RSTRG (Rs_color + minCOLOR + 22, "color22", "color"),
+ RSTRG (Rs_color + minCOLOR + 23, "color23", "color"),
+ RSTRG (Rs_color + minCOLOR + 24, "color24", "color"),
+ RSTRG (Rs_color + minCOLOR + 25, "color25", "color"),
+ RSTRG (Rs_color + minCOLOR + 26, "color26", "color"),
+ RSTRG (Rs_color + minCOLOR + 27, "color27", "color"),
+ RSTRG (Rs_color + minCOLOR + 28, "color28", "color"),
+ RSTRG (Rs_color + minCOLOR + 29, "color29", "color"),
+ RSTRG (Rs_color + minCOLOR + 30, "color30", "color"),
+ RSTRG (Rs_color + minCOLOR + 31, "color31", "color"),
+ RSTRG (Rs_color + minCOLOR + 32, "color32", "color"),
+ RSTRG (Rs_color + minCOLOR + 33, "color33", "color"),
+ RSTRG (Rs_color + minCOLOR + 34, "color34", "color"),
+ RSTRG (Rs_color + minCOLOR + 35, "color35", "color"),
+ RSTRG (Rs_color + minCOLOR + 36, "color36", "color"),
+ RSTRG (Rs_color + minCOLOR + 37, "color37", "color"),
+ RSTRG (Rs_color + minCOLOR + 38, "color38", "color"),
+ RSTRG (Rs_color + minCOLOR + 39, "color39", "color"),
+ RSTRG (Rs_color + minCOLOR + 40, "color40", "color"),
+ RSTRG (Rs_color + minCOLOR + 41, "color41", "color"),
+ RSTRG (Rs_color + minCOLOR + 42, "color42", "color"),
+ RSTRG (Rs_color + minCOLOR + 43, "color43", "color"),
+ RSTRG (Rs_color + minCOLOR + 44, "color44", "color"),
+ RSTRG (Rs_color + minCOLOR + 45, "color45", "color"),
+ RSTRG (Rs_color + minCOLOR + 46, "color46", "color"),
+ RSTRG (Rs_color + minCOLOR + 47, "color47", "color"),
+ RSTRG (Rs_color + minCOLOR + 48, "color48", "color"),
+ RSTRG (Rs_color + minCOLOR + 49, "color49", "color"),
+ RSTRG (Rs_color + minCOLOR + 50, "color50", "color"),
+ RSTRG (Rs_color + minCOLOR + 51, "color51", "color"),
+ RSTRG (Rs_color + minCOLOR + 52, "color52", "color"),
+ RSTRG (Rs_color + minCOLOR + 53, "color53", "color"),
+ RSTRG (Rs_color + minCOLOR + 54, "color54", "color"),
+ RSTRG (Rs_color + minCOLOR + 55, "color55", "color"),
+ RSTRG (Rs_color + minCOLOR + 56, "color56", "color"),
+ RSTRG (Rs_color + minCOLOR + 57, "color57", "color"),
+ RSTRG (Rs_color + minCOLOR + 58, "color58", "color"),
+ RSTRG (Rs_color + minCOLOR + 59, "color59", "color"),
+ RSTRG (Rs_color + minCOLOR + 60, "color60", "color"),
+ RSTRG (Rs_color + minCOLOR + 61, "color61", "color"),
+ RSTRG (Rs_color + minCOLOR + 62, "color62", "color"),
+ RSTRG (Rs_color + minCOLOR + 63, "color63", "color"),
+ RSTRG (Rs_color + minCOLOR + 64, "color64", "color"),
+ RSTRG (Rs_color + minCOLOR + 65, "color65", "color"),
+ RSTRG (Rs_color + minCOLOR + 66, "color66", "color"),
+ RSTRG (Rs_color + minCOLOR + 67, "color67", "color"),
+ RSTRG (Rs_color + minCOLOR + 68, "color68", "color"),
+ RSTRG (Rs_color + minCOLOR + 69, "color69", "color"),
+ RSTRG (Rs_color + minCOLOR + 70, "color70", "color"),
+ RSTRG (Rs_color + minCOLOR + 71, "color71", "color"),
+ RSTRG (Rs_color + minCOLOR + 72, "color72", "color"),
+ RSTRG (Rs_color + minCOLOR + 73, "color73", "color"),
+ RSTRG (Rs_color + minCOLOR + 74, "color74", "color"),
+ RSTRG (Rs_color + minCOLOR + 75, "color75", "color"),
+ RSTRG (Rs_color + minCOLOR + 76, "color76", "color"),
+ RSTRG (Rs_color + minCOLOR + 77, "color77", "color"),
+ RSTRG (Rs_color + minCOLOR + 78, "color78", "color"),
+ RSTRG (Rs_color + minCOLOR + 79, "color79", "color"),
+ RSTRG (Rs_color + minCOLOR + 80, "color80", "color"),
+ RSTRG (Rs_color + minCOLOR + 81, "color81", "color"),
+ RSTRG (Rs_color + minCOLOR + 82, "color82", "color"),
+ RSTRG (Rs_color + minCOLOR + 83, "color83", "color"),
+ RSTRG (Rs_color + minCOLOR + 84, "color84", "color"),
+ RSTRG (Rs_color + minCOLOR + 85, "color85", "color"),
+ RSTRG (Rs_color + minCOLOR + 86, "color86", "color"),
+ RSTRG (Rs_color + minCOLOR + 87, "color87", "color"),
+#if USE_256_COLORS
+ // 256 xterm colors
+ RSTRG (Rs_color + minCOLOR + 88, "color88", "color"),
+ RSTRG (Rs_color + minCOLOR + 89, "color89", "color"),
+ RSTRG (Rs_color + minCOLOR + 90, "color90", "color"),
+ RSTRG (Rs_color + minCOLOR + 91, "color91", "color"),
+ RSTRG (Rs_color + minCOLOR + 92, "color92", "color"),
+ RSTRG (Rs_color + minCOLOR + 93, "color93", "color"),
+ RSTRG (Rs_color + minCOLOR + 94, "color94", "color"),
+ RSTRG (Rs_color + minCOLOR + 95, "color95", "color"),
+ RSTRG (Rs_color + minCOLOR + 96, "color96", "color"),
+ RSTRG (Rs_color + minCOLOR + 97, "color97", "color"),
+ RSTRG (Rs_color + minCOLOR + 98, "color98", "color"),
+ RSTRG (Rs_color + minCOLOR + 99, "color99", "color"),
+ RSTRG (Rs_color + minCOLOR + 100, "color100", "color"),
+ RSTRG (Rs_color + minCOLOR + 101, "color101", "color"),
+ RSTRG (Rs_color + minCOLOR + 102, "color102", "color"),
+ RSTRG (Rs_color + minCOLOR + 103, "color103", "color"),
+ RSTRG (Rs_color + minCOLOR + 104, "color104", "color"),
+ RSTRG (Rs_color + minCOLOR + 105, "color105", "color"),
+ RSTRG (Rs_color + minCOLOR + 106, "color106", "color"),
+ RSTRG (Rs_color + minCOLOR + 107, "color107", "color"),
+ RSTRG (Rs_color + minCOLOR + 108, "color108", "color"),
+ RSTRG (Rs_color + minCOLOR + 109, "color109", "color"),
+ RSTRG (Rs_color + minCOLOR + 110, "color110", "color"),
+ RSTRG (Rs_color + minCOLOR + 111, "color111", "color"),
+ RSTRG (Rs_color + minCOLOR + 112, "color112", "color"),
+ RSTRG (Rs_color + minCOLOR + 113, "color113", "color"),
+ RSTRG (Rs_color + minCOLOR + 114, "color114", "color"),
+ RSTRG (Rs_color + minCOLOR + 115, "color115", "color"),
+ RSTRG (Rs_color + minCOLOR + 116, "color116", "color"),
+ RSTRG (Rs_color + minCOLOR + 117, "color117", "color"),
+ RSTRG (Rs_color + minCOLOR + 118, "color118", "color"),
+ RSTRG (Rs_color + minCOLOR + 119, "color119", "color"),
+ RSTRG (Rs_color + minCOLOR + 120, "color120", "color"),
+ RSTRG (Rs_color + minCOLOR + 121, "color121", "color"),
+ RSTRG (Rs_color + minCOLOR + 122, "color122", "color"),
+ RSTRG (Rs_color + minCOLOR + 123, "color123", "color"),
+ RSTRG (Rs_color + minCOLOR + 124, "color124", "color"),
+ RSTRG (Rs_color + minCOLOR + 125, "color125", "color"),
+ RSTRG (Rs_color + minCOLOR + 126, "color126", "color"),
+ RSTRG (Rs_color + minCOLOR + 127, "color127", "color"),
+ RSTRG (Rs_color + minCOLOR + 128, "color128", "color"),
+ RSTRG (Rs_color + minCOLOR + 129, "color129", "color"),
+ RSTRG (Rs_color + minCOLOR + 130, "color130", "color"),
+ RSTRG (Rs_color + minCOLOR + 131, "color131", "color"),
+ RSTRG (Rs_color + minCOLOR + 132, "color132", "color"),
+ RSTRG (Rs_color + minCOLOR + 133, "color133", "color"),
+ RSTRG (Rs_color + minCOLOR + 134, "color134", "color"),
+ RSTRG (Rs_color + minCOLOR + 135, "color135", "color"),
+ RSTRG (Rs_color + minCOLOR + 136, "color136", "color"),
+ RSTRG (Rs_color + minCOLOR + 137, "color137", "color"),
+ RSTRG (Rs_color + minCOLOR + 138, "color138", "color"),
+ RSTRG (Rs_color + minCOLOR + 139, "color139", "color"),
+ RSTRG (Rs_color + minCOLOR + 140, "color140", "color"),
+ RSTRG (Rs_color + minCOLOR + 141, "color141", "color"),
+ RSTRG (Rs_color + minCOLOR + 142, "color142", "color"),
+ RSTRG (Rs_color + minCOLOR + 143, "color143", "color"),
+ RSTRG (Rs_color + minCOLOR + 144, "color144", "color"),
+ RSTRG (Rs_color + minCOLOR + 145, "color145", "color"),
+ RSTRG (Rs_color + minCOLOR + 146, "color146", "color"),
+ RSTRG (Rs_color + minCOLOR + 147, "color147", "color"),
+ RSTRG (Rs_color + minCOLOR + 148, "color148", "color"),
+ RSTRG (Rs_color + minCOLOR + 149, "color149", "color"),
+ RSTRG (Rs_color + minCOLOR + 150, "color150", "color"),
+ RSTRG (Rs_color + minCOLOR + 151, "color151", "color"),
+ RSTRG (Rs_color + minCOLOR + 152, "color152", "color"),
+ RSTRG (Rs_color + minCOLOR + 153, "color153", "color"),
+ RSTRG (Rs_color + minCOLOR + 154, "color154", "color"),
+ RSTRG (Rs_color + minCOLOR + 155, "color155", "color"),
+ RSTRG (Rs_color + minCOLOR + 156, "color156", "color"),
+ RSTRG (Rs_color + minCOLOR + 157, "color157", "color"),
+ RSTRG (Rs_color + minCOLOR + 158, "color158", "color"),
+ RSTRG (Rs_color + minCOLOR + 159, "color159", "color"),
+ RSTRG (Rs_color + minCOLOR + 160, "color160", "color"),
+ RSTRG (Rs_color + minCOLOR + 161, "color161", "color"),
+ RSTRG (Rs_color + minCOLOR + 162, "color162", "color"),
+ RSTRG (Rs_color + minCOLOR + 163, "color163", "color"),
+ RSTRG (Rs_color + minCOLOR + 164, "color164", "color"),
+ RSTRG (Rs_color + minCOLOR + 165, "color165", "color"),
+ RSTRG (Rs_color + minCOLOR + 166, "color166", "color"),
+ RSTRG (Rs_color + minCOLOR + 167, "color167", "color"),
+ RSTRG (Rs_color + minCOLOR + 168, "color168", "color"),
+ RSTRG (Rs_color + minCOLOR + 169, "color169", "color"),
+ RSTRG (Rs_color + minCOLOR + 170, "color170", "color"),
+ RSTRG (Rs_color + minCOLOR + 171, "color171", "color"),
+ RSTRG (Rs_color + minCOLOR + 172, "color172", "color"),
+ RSTRG (Rs_color + minCOLOR + 173, "color173", "color"),
+ RSTRG (Rs_color + minCOLOR + 174, "color174", "color"),
+ RSTRG (Rs_color + minCOLOR + 175, "color175", "color"),
+ RSTRG (Rs_color + minCOLOR + 176, "color176", "color"),
+ RSTRG (Rs_color + minCOLOR + 177, "color177", "color"),
+ RSTRG (Rs_color + minCOLOR + 178, "color178", "color"),
+ RSTRG (Rs_color + minCOLOR + 179, "color179", "color"),
+ RSTRG (Rs_color + minCOLOR + 180, "color180", "color"),
+ RSTRG (Rs_color + minCOLOR + 181, "color181", "color"),
+ RSTRG (Rs_color + minCOLOR + 182, "color182", "color"),
+ RSTRG (Rs_color + minCOLOR + 183, "color183", "color"),
+ RSTRG (Rs_color + minCOLOR + 184, "color184", "color"),
+ RSTRG (Rs_color + minCOLOR + 185, "color185", "color"),
+ RSTRG (Rs_color + minCOLOR + 186, "color186", "color"),
+ RSTRG (Rs_color + minCOLOR + 187, "color187", "color"),
+ RSTRG (Rs_color + minCOLOR + 188, "color188", "color"),
+ RSTRG (Rs_color + minCOLOR + 189, "color189", "color"),
+ RSTRG (Rs_color + minCOLOR + 190, "color190", "color"),
+ RSTRG (Rs_color + minCOLOR + 191, "color191", "color"),
+ RSTRG (Rs_color + minCOLOR + 192, "color192", "color"),
+ RSTRG (Rs_color + minCOLOR + 193, "color193", "color"),
+ RSTRG (Rs_color + minCOLOR + 194, "color194", "color"),
+ RSTRG (Rs_color + minCOLOR + 195, "color195", "color"),
+ RSTRG (Rs_color + minCOLOR + 196, "color196", "color"),
+ RSTRG (Rs_color + minCOLOR + 197, "color197", "color"),
+ RSTRG (Rs_color + minCOLOR + 198, "color198", "color"),
+ RSTRG (Rs_color + minCOLOR + 199, "color199", "color"),
+ RSTRG (Rs_color + minCOLOR + 200, "color200", "color"),
+ RSTRG (Rs_color + minCOLOR + 201, "color201", "color"),
+ RSTRG (Rs_color + minCOLOR + 202, "color202", "color"),
+ RSTRG (Rs_color + minCOLOR + 203, "color203", "color"),
+ RSTRG (Rs_color + minCOLOR + 204, "color204", "color"),
+ RSTRG (Rs_color + minCOLOR + 205, "color205", "color"),
+ RSTRG (Rs_color + minCOLOR + 206, "color206", "color"),
+ RSTRG (Rs_color + minCOLOR + 207, "color207", "color"),
+ RSTRG (Rs_color + minCOLOR + 208, "color208", "color"),
+ RSTRG (Rs_color + minCOLOR + 209, "color209", "color"),
+ RSTRG (Rs_color + minCOLOR + 210, "color210", "color"),
+ RSTRG (Rs_color + minCOLOR + 211, "color211", "color"),
+ RSTRG (Rs_color + minCOLOR + 212, "color212", "color"),
+ RSTRG (Rs_color + minCOLOR + 213, "color213", "color"),
+ RSTRG (Rs_color + minCOLOR + 214, "color214", "color"),
+ RSTRG (Rs_color + minCOLOR + 215, "color215", "color"),
+ RSTRG (Rs_color + minCOLOR + 216, "color216", "color"),
+ RSTRG (Rs_color + minCOLOR + 217, "color217", "color"),
+ RSTRG (Rs_color + minCOLOR + 218, "color218", "color"),
+ RSTRG (Rs_color + minCOLOR + 219, "color219", "color"),
+ RSTRG (Rs_color + minCOLOR + 220, "color220", "color"),
+ RSTRG (Rs_color + minCOLOR + 221, "color221", "color"),
+ RSTRG (Rs_color + minCOLOR + 222, "color222", "color"),
+ RSTRG (Rs_color + minCOLOR + 223, "color223", "color"),
+ RSTRG (Rs_color + minCOLOR + 224, "color224", "color"),
+ RSTRG (Rs_color + minCOLOR + 225, "color225", "color"),
+ RSTRG (Rs_color + minCOLOR + 226, "color226", "color"),
+ RSTRG (Rs_color + minCOLOR + 227, "color227", "color"),
+ RSTRG (Rs_color + minCOLOR + 228, "color228", "color"),
+ RSTRG (Rs_color + minCOLOR + 229, "color229", "color"),
+ RSTRG (Rs_color + minCOLOR + 230, "color230", "color"),
+ RSTRG (Rs_color + minCOLOR + 231, "color231", "color"),
+ RSTRG (Rs_color + minCOLOR + 232, "color232", "color"),
+ RSTRG (Rs_color + minCOLOR + 233, "color233", "color"),
+ RSTRG (Rs_color + minCOLOR + 234, "color234", "color"),
+ RSTRG (Rs_color + minCOLOR + 235, "color235", "color"),
+ RSTRG (Rs_color + minCOLOR + 236, "color236", "color"),
+ RSTRG (Rs_color + minCOLOR + 237, "color237", "color"),
+ RSTRG (Rs_color + minCOLOR + 238, "color238", "color"),
+ RSTRG (Rs_color + minCOLOR + 239, "color239", "color"),
+ RSTRG (Rs_color + minCOLOR + 240, "color240", "color"),
+ RSTRG (Rs_color + minCOLOR + 241, "color241", "color"),
+ RSTRG (Rs_color + minCOLOR + 242, "color242", "color"),
+ RSTRG (Rs_color + minCOLOR + 243, "color243", "color"),
+ RSTRG (Rs_color + minCOLOR + 244, "color244", "color"),
+ RSTRG (Rs_color + minCOLOR + 245, "color245", "color"),
+ RSTRG (Rs_color + minCOLOR + 246, "color246", "color"),
+ RSTRG (Rs_color + minCOLOR + 247, "color247", "color"),
+ RSTRG (Rs_color + minCOLOR + 248, "color248", "color"),
+ RSTRG (Rs_color + minCOLOR + 249, "color249", "color"),
+ RSTRG (Rs_color + minCOLOR + 250, "color250", "color"),
+ RSTRG (Rs_color + minCOLOR + 251, "color251", "color"),
+ RSTRG (Rs_color + minCOLOR + 252, "color252", "color"),
+ RSTRG (Rs_color + minCOLOR + 253, "color253", "color"),
+ RSTRG (Rs_color + minCOLOR + 254, "color254", "color"),
+ RSTRG (Rs_color + minCOLOR + 255, "color255", "color"),
+#endif
RSTRG (Rs_color + minBrightCOLOR + 0, "color8", "color"),
RSTRG (Rs_color + minBrightCOLOR + 1, "color9", "color"),
RSTRG (Rs_color + minBrightCOLOR + 2, "color10", "color"),

View file

@ -2,17 +2,16 @@
let
name = "vifm-${version}";
version = "0.7.6";
version = "0.7.7";
in stdenv.mkDerivation {
inherit name;
src = fetchurl {
url="mirror://sourceforge/project/vifm/vifm/${name}.tar.bz2";
sha256 ="03v50hmgfvrci5fz31zmklmp6ix7qpqnhvm6639wbk3g5mcrh5w6";
url = "mirror://sourceforge/project/vifm/vifm/${name}.tar.bz2";
sha256 = "1lflmkd5q7qqi9d44py0y41pcx5bsadkihn3gc0x5cka04f2gh0d";
};
#phaseNames = ["doConfigure" "doMakeInstall"];
buildInputs = [ utillinux ncurses file libX11 ];
meta = {

View file

@ -1,4 +1,4 @@
{ callPackage, pkgs, fetchurl }:
{ callPackage, pkgs, fetchurl, useMupdf }:
rec {
inherit (pkgs) stdenv;
@ -12,6 +12,10 @@ rec {
zathura_pdf_poppler = callPackage ./pdf-poppler { };
zathura_pdf_mupdf = callPackage ./pdf-mupdf {
gtk = pkgs.gtk3;
};
zathura_djvu = callPackage ./djvu {
gtk = pkgs.gtk3;
};
@ -27,9 +31,9 @@ rec {
name = "zathura-${zathura_core.version}";
plugins_path = stdenv.lib.makeSearchPath "lib" [
zathura_pdf_poppler
zathura_djvu
zathura_ps
(if useMupdf then zathura_pdf_mupdf else zathura_pdf_poppler)
];
builder = ./builder.sh;

View file

@ -0,0 +1,17 @@
--- zathura-pdf-mupdf-0.2.6/config.mk
+++ zathura-pdf-mupdf-0.2.6/config.mk
@@ -32,10 +32,11 @@
OPENSSL_INC ?= $(shell pkg-config --cflags libcrypto)
OPENSSL_LIB ?= $(shell pkg-config --libs libcrypto)
-MUPDF_LIB ?= -lmupdf -lmupdf-js-none
+MUPDF_INC ?= $(shell pkg-config --cflags mupdf)
+MUPDF_LIB ?= $(shell pkg-config --libs mupdf)
-INCS = ${GTK_INC} ${GIRARA_INC} ${OPENSSL_INC} ${ZATHURA_INC}
-LIBS = ${GTK_LIB} ${GIRARA_LIB} ${MUPDF_LIB} ${OPENSSL_LIB} -ljbig2dec -lopenjp2 -ljpeg
+INCS = ${GTK_INC} ${GIRARA_INC} ${OPENSSL_INC} ${ZATHURA_INC} ${MUPDF_INC}
+LIBS = ${GTK_LIB} ${GIRARA_LIB} ${OPENSSL_LIB} ${MUPDF_LIB} -ljbig2dec -ljpeg
# flags
CFLAGS += -std=c99 -fPIC -pedantic -Wall -Wno-format-zero-length $(INCS)

View file

@ -0,0 +1,29 @@
{ stdenv, fetchurl, pkgconfig, zathura_core, gtk, girara, mupdf, openssl, openjpeg, libjpeg, jbig2dec }:
stdenv.mkDerivation rec {
version = "0.2.6";
name = "zathura-pdf-mupdf-${version}";
src = fetchurl {
url = "http://pwmt.org/projects/zathura/plugins/download/${name}.tar.gz";
sha256 = "5df94b6f906008b5f3bca770a552da6d2917d6b8d3e4b3049cb7001302041b20";
};
buildInputs = [ pkgconfig zathura_core gtk girara openssl mupdf openjpeg libjpeg jbig2dec ];
makeFlags = "PREFIX=$(out) PLUGINDIR=$(out)/lib";
preConfigure = "patch -p1 < ${./config.patch}";
meta = {
homepage = http://pwmt.org/projects/zathura/;
description = "A zathura PDF plugin (mupdf)";
longDescription = ''
The zathura-pdf-mupdf plugin adds PDF support to zathura by
using the mupdf rendering library.
'';
license = stdenv.lib.licenses.zlib;
platforms = stdenv.lib.platforms.linux;
# maintainers = [ ];
};
}

View file

@ -1,4 +1,4 @@
{ stdenv, fetchurl, pkgconfig, zathura_core, girara, poppler, gettext }:
{ stdenv, fetchurl, pkgconfig, zathura_core, girara, poppler }:
stdenv.mkDerivation rec {
version = "0.2.5";
@ -9,16 +9,16 @@ stdenv.mkDerivation rec {
sha256 = "1b0chsds8iwjm4g629p6a67nb6wgra65pw2vvngd7g35dmcjgcv0";
};
buildInputs = [ pkgconfig poppler gettext zathura_core girara ];
buildInputs = [ pkgconfig poppler zathura_core girara ];
makeFlags = "PREFIX=$(out) PLUGINDIR=$(out)/lib";
meta = {
homepage = http://pwmt.org/projects/zathura/;
description = "A zathura PDF plugin";
description = "A zathura PDF plugin (poppler)";
longDescription = ''
The zathura-pdf-poppler plugin adds PDF support to zathura by
using the poppler rendering engine.
using the poppler rendering library.
'';
license = stdenv.lib.licenses.zlib;
platforms = stdenv.lib.platforms.linux;

View file

@ -2,12 +2,12 @@
m4, glib_networking, gsettings_desktop_schemas }:
stdenv.mkDerivation {
name = "dwb-2014-05-23";
name = "dwb-2014-06-03";
src = fetchgit {
url = "https://bitbucket.org/portix/dwb.git";
rev = "813457c0cb6603d3b7a548fc97a8298a7fac34fa";
sha256 = "1fywnf3yp6p84hap40nb9vrz1gswgnhppygmi1gzjzz3bphwf5pr";
rev = "d00af56c1e60978060f1b2077f3d49995b98c54f";
sha256 = "02bs9nbgk8ghaxywhqd8mii4lik748dssn551m00i1305p6q1cjj";
};
buildInputs = [ pkgconfig makeWrapper gsettings_desktop_schemas libsoup webkit gtk3 gnutls json_c m4 ];

View file

@ -1,59 +1,96 @@
{ stdenv
, fetchurl
, libtool
, libXext
, libSM
, libICE
, libX11
, libXft
, libXau
, libXdmcp
, libXrender
, freetype
, fontconfig
, openssl
}:
{ stdenv, fetchurl, libtool, xlibs, freetype, fontconfig, openssl, glib
, mesa, gstreamer, gst_plugins_base, dbus, alsaLib, zlib, libuuid
, libxml2, libxslt, sqlite, libogg, libvorbis, xz, libcanberra
, makeWrapper, libredirect, xkeyboard_config }:
let
version = "1.94.407";
version = "2.2.1107";
rpath = stdenv.lib.makeSearchPath "lib" [
stdenv.glibc
stdenv.gcc.gcc
libtool
libXext
libSM
libICE
libX11
libXft
libXau
libXdmcp
libXrender
xlibs.libXext
xlibs.libSM
xlibs.libICE
xlibs.libX11
xlibs.libXft
xlibs.libXau
xlibs.libXdmcp
xlibs.libXrender
xlibs.libXfixes
xlibs.libXcomposite
xlibs.libxcb
xlibs.libXi
freetype
fontconfig
openssl
];
glib
mesa
gstreamer
gst_plugins_base
dbus
alsaLib
zlib
libuuid
libxml2
libxslt
sqlite
libogg
libvorbis
xz
libcanberra
] + ":${stdenv.gcc.gcc}/lib${stdenv.lib.optionalString stdenv.is64bit "64"}";
src = fetchurl {
url = "http://downloads.hipchat.com/linux/arch/hipchat-${version}-i686.pkg.tar.xz";
sha256 = "0kyjpa2ir066zqkvs1zmnx6kvl8v4jfl8h7bw110cgigwmiplk7k";
};
in stdenv.mkDerivation {
src =
if stdenv.system == "x86_64-linux" then
fetchurl {
url = "http://downloads.hipchat.com/linux/arch/x86_64/hipchat-${version}-x86_64.pkg.tar.xz";
sha256 = "0lf780pxbh40m2i48cki072lrm75924cz3zgkmaxddmar3y13bwa";
}
else if stdenv.system == "i686-linux" then
fetchurl {
url = "http://downloads.hipchat.com/linux/arch/i686/hipchat-${version}-i686.pkg.tar.xz";
sha256 = "1k33670rpigdpy9jcacryc1i05ykp5yffcplmbm5q29ng54cn0zv";
}
else
throw "HipChat is not supported on ${stdenv.system}";
in
stdenv.mkDerivation {
name = "hipchat-${version}";
inherit src;
buildInputs = [ makeWrapper ];
buildCommand = ''
tar xf ${src}
mkdir -p $out
mv opt/HipChat/lib $out
mv opt/HipChat/bin $out
mkdir -p $out/libexec/hipchat/bin
d=$out/libexec/hipchat/lib
rm -rfv opt/HipChat/lib/{libstdc++*,libz*,libuuid*,libxml2*,libxslt*,libsqlite*,libogg*,libvorbis*,liblzma*,libcanberra.*,libcanberra-*}
mv opt/HipChat/lib/ $d
mv usr/share $out
patchShebangs $out/bin
for file in $(find $out/lib -type f); do
patchelf --set-interpreter ${stdenv.glibc}/lib/ld-linux.so.2 $file || true
patchelf --set-rpath ${rpath}:$out/lib $file || true
for file in $(find $d -type f); do
patchelf --set-interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" $file || true
patchelf --set-rpath ${rpath}:\$ORIGIN $file || true
done
substituteInPlace $out/share/applications/hipchat.desktop \
--replace /opt/HipChat/bin $out/bin
makeWrapper $d/hipchat.bin $out/bin/hipchat \
--set HIPCHAT_LD_LIBRARY_PATH '"$LD_LIBRARY_PATH"' \
--set HIPCHAT_QT_PLUGIN_PATH '"$QT_PLUGIN_PATH"' \
--set LD_PRELOAD "${libredirect}/lib/libredirect.so" \
--set NIX_REDIRECTS /usr/share/X11/xkb=${xkeyboard_config}/share/X11/xkb
mv opt/HipChat/bin/linuxbrowserlaunch $out/libexec/hipchat/bin/
'';
meta = {

View file

@ -0,0 +1,99 @@
{ stdenv, fetchurl, makeWrapper }:
let
version = "3.0.10.3";
arch = if stdenv.is64bit then "amd64" else "x86";
libDir = if stdenv.is64bit then "lib64" else "lib";
in
stdenv.mkDerivation {
name = "teamspeak-server-${version}";
src = fetchurl {
urls = [
"http://dl.4players.de/ts/releases/${version}/teamspeak3-server_linux-${arch}-${version}.tar.gz"
"http://teamspeak.gameserver.gamed.de/ts3/releases/${version}/teamspeak3-server_linux-${arch}-${version}.tar.gz"
];
sha256 = if stdenv.is64bit
then "9606dd5c0c3677881b1aab833cb99f4f12ba08cc77ef4a97e9e282d9e10b0702"
else "8b8921e0df04bf74068a51ae06d744f25d759a8c267864ceaf7633eb3f81dbe5";
};
buildInputs = [ makeWrapper ];
buildPhase =
''
mv ts3server_linux_${arch} ts3server
echo "patching ts3server"
patchelf \
--interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
--set-rpath $(cat $NIX_GCC/nix-support/orig-gcc)/${libDir} \
--force-rpath \
ts3server
'';
installPhase =
''
# Delete unecessary libraries - these are provided by nixos.
#rm *.so*
# Install files.
mkdir -p $out/lib/teamspeak
mv * $out/lib/teamspeak/
# Make a symlink to the binary from bin.
mkdir -p $out/bin/
ln -s $out/lib/teamspeak/ts3server $out/bin/ts3server
wrapProgram $out/lib/teamspeak/ts3server --prefix LD_LIBRARY_PATH : $out/lib/teamspeak
'';
dontStrip = true;
dontPatchELF = true;
meta = {
description = "TeamSpeak voice communication server";
homepage = http://teamspeak.com/;
license = stdenv.lib.licenses.unfreeRedistributable;
platforms = stdenv.lib.platforms.linux;
maintainers = [ stdenv.lib.maintainers.arobyn ];
};
}
/*
License issues:
Date: Mon, 10 Dec 2007 19:55:16 -0500
From: TeamSpeak Sales <sales@tritoncia.com>
To: 'Marc Weber' <marco-oweber@gmx.de>
Subject: RE: teamspeak on nix?
Yes, that would be fine. As long as you are not renting servers or selling
TeamSpeak then you are more than welcome to distribute it.
Thank you,
TeamSpeak Sales Team
________________________________
e-Mail: sales@tritoncia.com
TeamSpeak: http://www.TeamSpeak.com
Account Login: https://sales.TritonCIA.com/users
-----Original Message-----
From: Marc Weber [mailto:marco-oweber@gmx.de]
Sent: Monday, December 10, 2007 5:03 PM
To: sales@tritoncia.com
Subject: teamspeak on nix?
Hello,
nix is very young software distribution system (http://nix.cs.uu.nl/)
I'd like to ask wether you permit us to add teamspeak (server/ client?)
Sincerly
Marc Weber (small nix contributor)
*/

View file

@ -3,14 +3,14 @@
, pythonPackages, cacert, cmake, makeWrapper }:
stdenv.mkDerivation rec {
rev = "02eed97d977567b0fb16cfeeaeebb863eab1e509";
rev = "70d2b0ad8eb7854932d24c007a05b8627f751205";
version = "1.0-rev${rev}";
name = "weechat-${version}";
src = fetchgit {
inherit rev;
url = "git://github.com/weechat/weechat.git";
sha256 = "0nk0p9chvn0h2pzq9793k2dz8h5iplz0zwqzyds55fbmsgzz51g2";
sha256 = "1k7kcrq46anq87r14sq3vrhij8acn6id7zxyhn0qnjj2wqgrjp5i";
};
buildInputs =

View file

@ -1,10 +1,10 @@
{ fetchurl, stdenv, ant }:
stdenv.mkDerivation rec {
name = "jmeter-2.10";
name = "jmeter-2.11";
src = fetchurl {
url = "http://ftp.unicamp.br/pub/apache//jmeter/binaries/apache-${name}.tgz";
sha256 = "1ygm0h02sllh4mfl5imj46v80wnbs1x7n88gfjm523ixmgsa0fvy";
sha256 = "1fr3sw06qncb6yygcf2lbnkxma4v1dbigpf39ajrm0isxbpyv944";
};
installPhase = ''

View file

@ -33,6 +33,5 @@ stdenv.mkDerivation rec {
[doScons doForceShare doPropagate]);
meta = {
description = "Linux DC++ - Direct Connect client";
inherit src;
};
}

View file

@ -1,18 +1,20 @@
{ stdenv, fetchurl, ncurses, zlib, bzip2, sqlite, pkgconfig, glib, gnutls }:
stdenv.mkDerivation rec {
let
version = "1.19.1";
in
stdenv.mkDerivation {
name = "ncdc-${version}";
version = "1.19";
src = fetchurl {
url = "http://dev.yorhel.nl/download/ncdc-1.19.tar.gz";
sha256 = "1wgvqwfxq9kc729h2r528n55821w87sfbm4h21mr6pvkpfw30hf2";
url = "http://dev.yorhel.nl/download/ncdc-${version}.tar.gz";
sha256 = "0iwx4b3x207sw11qqjfynpwnhryhixjzbgcy9l9zfisa8f0k7cm6";
};
buildInputs = [ ncurses zlib bzip2 sqlite pkgconfig glib gnutls ];
meta = {
description = "modern and lightweight direct connect client with a friendly ncurses interface";
description = "Modern and lightweight direct connect client with a friendly ncurses interface";
homepage = http://dev.yorhel.nl/ncdc;
license = stdenv.lib.licenses.mit;
platforms = stdenv.lib.platforms.linux; # arbitrary

View file

@ -2,30 +2,25 @@
stdenv.mkDerivation rec {
name = "syncthing-${version}";
version = "0.8.5";
version = "0.8.11";
src = fetchgit {
url = "git://github.com/calmh/syncthing.git";
rev = "refs/tags/v${version}";
sha256 = "0525fvar5c22sxg7737ajny80srds1adhi73a8yr12wsjnsqfi6x";
sha256 = "16dl9sqwhv0n1602pmi10d5j7z2196ijhvz4rfx7732210qbkpnn";
};
buildInputs = [ go ];
patches = [ ./upnp.patch ];
buildPhase = ''
mkdir -p "./dependencies/src/github.com/calmh/syncthing"
cp -r "./auto" "./dependencies/src/github.com/calmh/syncthing"
cp -r "./buffers" "./dependencies/src/github.com/calmh/syncthing"
cp -r "./cid" "./dependencies/src/github.com/calmh/syncthing"
cp -r "./discover" "./dependencies/src/github.com/calmh/syncthing"
cp -r "./files" "./dependencies/src/github.com/calmh/syncthing"
cp -r "./lamport" "./dependencies/src/github.com/calmh/syncthing"
cp -r "./protocol" "./dependencies/src/github.com/calmh/syncthing"
cp -r "./scanner" "./dependencies/src/github.com/calmh/syncthing"
cp -r "./mc" "./dependencies/src/github.com/calmh/syncthing"
cp -r "./xdr" "./dependencies/src/github.com/calmh/syncthing"
cp -r "./upnp" "./dependencies/src/github.com/calmh/syncthing"
for a in auto buffers cid discover files lamport protocol scanner \
logger beacon config xdr upnp model osutil versioner; do
cp -r "./$a" "./dependencies/src/github.com/calmh/syncthing"
done
export GOPATH="`pwd`/Godeps/_workspace:`pwd`/dependencies"

View file

@ -0,0 +1,28 @@
Trying to fix upnp for miniupnpd:
https://github.com/calmh/syncthing/issues/211
diff --git a/upnp/upnp.go b/upnp/upnp.go
index 9de719a..9c85b23 100644
--- a/upnp/upnp.go
+++ b/upnp/upnp.go
@@ -60,14 +60,12 @@ func Discover() (*IGD, error) {
return nil, err
}
- search := []byte(`
-M-SEARCH * HTTP/1.1
-Host: 239.255.255.250:1900
-St: urn:schemas-upnp-org:device:InternetGatewayDevice:1
-Man: "ssdp:discover"
-Mx: 3
-
-`)
+ search := []byte("M-SEARCH * HTTP/1.1\r\n" +
+"Host: 239.255.255.250:1900\r\n" +
+"St: urn:schemas-upnp-org:device:InternetGatewayDevice:1\r\n" +
+"Man: \"ssdp:discover\"\r\n" +
+"Mx: 3\r\n" +
+"\r\n")
_, err = socket.WriteTo(search, ssdp)
if err != nil {

View file

@ -7,11 +7,11 @@
with stdenv.lib;
stdenv.mkDerivation rec {
name = "znc-1.2";
name = "znc-1.4";
src = fetchurl {
url = "http://znc.in/releases/${name}.tar.gz";
sha256 = "07bh306wl5494sqsgz4a526wvyrylkc8vpnbr5pkxwjg90mcv8nr";
sha256 = "0lkv58pq4d5lzcyx8v8anzinx0sx0zw0js4jij13jb8qxp88zsc6";
};
buildInputs = [ openssl pkgconfig ]

View file

@ -0,0 +1,24 @@
{ stdenv, fetchurl, pkgconfig, cmake, glib, qt4, boost, libsigrok
, libsigrokdecode, libserialport, libzip, udev, libusb1, libftdi
}:
stdenv.mkDerivation rec {
name = "pulseview-0.2.0";
src = fetchurl {
url = "http://sigrok.org/download/source/pulseview/${name}.tar.gz";
sha256 = "1pf1dgwd9j586nqmni6gqf3qxrsmawcmi9wzqfzqkjci18xd7dgy";
};
buildInputs = [ pkgconfig cmake glib qt4 boost libsigrok
libsigrokdecode libserialport libzip udev libusb1 libftdi
];
meta = with stdenv.lib; {
description = "Qt-based LA/scope/MSO GUI for sigrok (a signal analysis software suite)";
homepage = http://sigrok.org/;
license = licenses.gpl3Plus;
platforms = platforms.linux;
maintainers = [ maintainers.bjornfor ];
};
}

View file

@ -0,0 +1,40 @@
{stdenv, fetchurl, pkgconfig, ocaml, findlib, camlp5, ncurses, lablgtk ? null}:
stdenv.mkDerivation (rec {
name = "prooftree-${version}";
version = "0.12";
src = fetchurl {
url = "http://askra.de/software/prooftree/releases/prooftree-${version}.tar.gz";
sha256 = "08yp66j05pdkdpv9xkfqymqy82mir5xbwfh9mkzhh219xkps4b4m";
};
buildInputs = [ pkgconfig ocaml findlib camlp5 ncurses lablgtk ];
dontAddPrefix = true;
configureFlags = [ "--prefix" "$(out)" ];
meta = {
description = "Prooftree is a program for proof-tree visualization";
longDescription = ''
Prooftree is a program for proof-tree visualization during interactive
proof development in a theorem prover. It is currently being developed
for Coq and Proof General. Prooftree helps against getting lost between
different subgoals in interactive proof development. It clearly shows
where the current subgoal comes from and thus helps in developing the
right plan for solving it.
Prooftree uses different colors for the already proven subgoals, the
current branch in the proof and the still open subgoals. Sequent texts
are not displayed in the proof tree itself, but they are shown as a
tool-tip when the mouse rests over a sequent symbol. Long proof commands
are abbreviated in the tree display, but show up in full length as
tool-tip. Both, sequents and proof commands, can be shown in the display
below the tree (on single click) or in a separate window (on double or
shift-click).
'';
homepage = http://askra.de/software/prooftree;
platforms = stdenv.lib.platforms.unix;
maintainers = [ stdenv.lib.maintainers.jwiegley ];
};
})

View file

@ -10,7 +10,7 @@
let
version = "1.9.3";
version = "1.9.4";
svn = subversionClient.override { perlBindings = true; };
@ -21,7 +21,7 @@ stdenv.mkDerivation {
src = fetchurl {
url = "https://www.kernel.org/pub/software/scm/git/git-${version}.tar.xz";
sha256 = "0pyhqwy9g875frf1qyfjj6rz64qhlyvr29n7pljzcy536x9qcczn";
sha256 = "1shxa49lsxn81qpfi60wh7rn5ci4zjgljvr0qczdmnqzd8w1zyvb";
};
patches = [ ./docbook2texi.patch ./symlinks-in-bin.patch ./cert-path.patch ];

View file

@ -1,11 +1,11 @@
{ stdenv, fetchurl, ncurses, asciidoc, xmlto, docbook_xsl, docbook_xml_dtd_45 }:
stdenv.mkDerivation rec {
name = "tig-1.2.1";
name = "tig-2.0.2";
src = fetchurl {
url = "http://jonas.nitro.dk/tig/releases/${name}.tar.gz";
sha256 = "0i19lc6dd3vdpkdd8q07xii2c4mcpiwmg55av81jyhx0y82x425p";
sha256 = "0gi7iqiij37b0d3izxymxaw5ns2mv1y7qfic0fhl7xj4s2rz075r";
};
buildInputs = [ ncurses asciidoc xmlto docbook_xsl ];

View file

@ -0,0 +1,100 @@
# Handbrake normally uses its own copies of the libraries it uses, for better
# control over library patches.
#
# This derivation patches HB so it doesn't do that. The relevant patches
# are added to the Nix packages and proposed upstream instead. In several cases
# upstream already incorporated these patches.
# This has the benefits of providing improvements to other packages,
# making licenses more clear and reducing compile time/install size.
#
# For compliance, the unfree codec faac is optionally spliced out.
#
# Only tested on Linux
#
# TODO: package and use libappindicator
{ stdenv, config, fetchurl,
python, pkgconfig, yasm,
autoconf, automake, libtool, m4,
libass, libsamplerate, fribidi, libxml2, bzip2,
libogg, libtheora, libvorbis, libdvdcss, a52dec, fdk_aac,
lame, faac, ffmpeg, libdvdread, libdvdnav, libbluray,
mp4v2, mpeg2dec, x264, libmkv,
fontconfig, freetype,
glib, gtk, webkitgtk, intltool, libnotify,
gst_all_1, dbus_glib, udev,
useGtk ? true,
useWebKitGtk ? false # This prevents ghb from starting in my tests
}:
stdenv.mkDerivation rec {
version = "0.9.9";
name = "handbrake-${version}";
# ToDo: doesn't work (yet)
allowUnfree = false; # config.allowUnfree or false;
buildInputsX = stdenv.lib.optionals useGtk [
glib gtk intltool libnotify
gst_all_1.gstreamer gst_all_1.gst-plugins-base dbus_glib udev
] ++ stdenv.lib.optionals useWebKitGtk [ webkitgtk ];
# Did not test compiling with it
unfreeInputs = stdenv.lib.optional allowUnfree faac;
nativeBuildInputs = [ python pkgconfig yasm autoconf automake libtool m4 ];
buildInputs = [
fribidi fontconfig freetype
libass libsamplerate libxml2 bzip2
libogg libtheora libvorbis libdvdcss a52dec libmkv fdk_aac
lame ffmpeg libdvdread libdvdnav libbluray mp4v2 mpeg2dec x264
] ++ buildInputsX ++ unfreeInputs;
src = fetchurl {
name = "HandBrake-${version}.tar.bz2";
url = "http://handbrake.fr/rotation.php?file=HandBrake-${version}.tar.bz2";
sha256 = "1crmm1c32vx60jfl2bqzg59q4qqx6m83b08snp7h1njc21sdf7d7";
};
patches = stdenv.lib.optional (! allowUnfree) ./disable-unfree.patch;
preConfigure = ''
# Fake wget to prevent downloads
mkdir wget
echo "#!/bin/sh" > wget/wget
echo "echo ===== Not fetching \$*" >> wget/wget
echo "exit 1" >> wget/wget
chmod +x wget/wget
export PATH=$PATH:$PWD/wget
# Force using nixpkgs dependencies
sed -i '/MODULES += contrib/d' make/include/main.defs
sed -i '/PKG_CONFIG_PATH=/d' gtk/module.rules
# disable faac if non-free
if [ -z "$allowUnfree" ]; then
rm libhb/encfaac.c
fi
'';
configureFlags = "--enable-fdk-aac ${if useGtk then "--disable-gtk-update-checks" else "--disable-gtk"}";
preBuild = ''
cd build
'';
meta = {
homepage = http://handbrake.fr/;
description = "A tool for ripping DVDs into video files";
longDescription = ''
Handbrake is a versatile transcoding DVD ripper. This package
provides the cli HandbrakeCLI and the GTK+ version ghb.
The faac library is disabled if you're compiling free-only.
'';
license = stdenv.lib.licenses.gpl2;
maintainers = [ stdenv.lib.maintainers.wmertens ];
# Not tested on anything else
platforms = stdenv.lib.platforms.linux;
};
}

View file

@ -0,0 +1,101 @@
diff -ru HandBrake-0.9.9-orig/gtk/configure.ac HandBrake-0.9.9/gtk/configure.ac
--- HandBrake-0.9.9-orig/gtk/configure.ac 2014-05-02 22:50:00.047305795 +0200
+++ HandBrake-0.9.9/gtk/configure.ac 2014-05-02 22:48:57.119304020 +0200
@@ -203,7 +203,7 @@
;;
esac
-HB_LIBS="-lhb -la52 -lmkv -lavresample -lavformat -lavcodec -lavutil -ldvdnav -ldvdread -lfaac -lmp3lame -lmpeg2 -lvorbis -lvorbisenc -logg -lsamplerate -lx264 -lmp4v2 -lswscale -ltheoraenc -ltheoradec -lz -lbz2 -lpthread -lbluray -lass -lfontconfig -lfreetype -lxml2"
+HB_LIBS="-lhb -la52 -lmkv -lavresample -lavformat -lavcodec -lavutil -ldvdnav -ldvdread -lmp3lame -lmpeg2 -lvorbis -lvorbisenc -logg -lsamplerate -lx264 -lmp4v2 -lswscale -ltheoraenc -ltheoradec -lz -lbz2 -lpthread -lbluray -lass -lfontconfig -lfreetype -lxml2"
if test "x$use_fdk_aac" = "xyes" ; then
HB_LIBS+=" -lfdk-aac"
diff -ru HandBrake-0.9.9-orig/gtk/src/preset_xlat.c HandBrake-0.9.9/gtk/src/preset_xlat.c
--- HandBrake-0.9.9-orig/gtk/src/preset_xlat.c 2014-05-02 22:50:00.043305794 +0200
+++ HandBrake-0.9.9/gtk/src/preset_xlat.c 2014-05-02 22:42:20.987292846 +0200
@@ -260,7 +260,6 @@
static value_map_t acodec_xlat[] =
{
- {"AAC (faac)", "faac"},
{"AC3 Passthru", "ac3"},
{"MP3 (lame)", "lame"},
{"Vorbis (vorbis)", "vorbis"},
diff -ru HandBrake-0.9.9-orig/gtk/src/presets.c HandBrake-0.9.9/gtk/src/presets.c
--- HandBrake-0.9.9-orig/gtk/src/presets.c 2014-05-02 22:50:00.043305794 +0200
+++ HandBrake-0.9.9/gtk/src/presets.c 2014-05-02 22:42:41.283293419 +0200
@@ -2029,8 +2029,6 @@
static value_map_t acodec_xlat_compat[] =
{
- {"AAC (CoreAudio)", "faac"},
- {"HE-AAC (CoreAudio)", "faac"},
{"AC3 (ffmpeg)", "ac3"},
{"AC3", "ac3"},
{"MP3 Passthru", "mp3pass"},
diff -ru HandBrake-0.9.9-orig/libhb/common.c HandBrake-0.9.9/libhb/common.c
--- HandBrake-0.9.9-orig/libhb/common.c 2014-05-02 22:50:00.047305795 +0200
+++ HandBrake-0.9.9/libhb/common.c 2014-05-02 22:37:24.679284489 +0200
@@ -126,7 +126,6 @@
{ "AAC (CoreAudio)", "ca_aac", HB_ACODEC_CA_AAC, HB_MUX_MP4|HB_MUX_MKV },
{ "HE-AAC (CoreAudio)", "ca_haac", HB_ACODEC_CA_HAAC, HB_MUX_MP4|HB_MUX_MKV },
#endif
- { "AAC (faac)", "faac", HB_ACODEC_FAAC, HB_MUX_MP4|HB_MUX_MKV },
#ifdef USE_FDK_AAC
{ "AAC (FDK)", "fdk_aac", HB_ACODEC_FDK_AAC, HB_MUX_MP4|HB_MUX_MKV },
{ "HE-AAC (FDK)", "fdk_haac", HB_ACODEC_FDK_HAAC, HB_MUX_MP4|HB_MUX_MKV },
diff -ru HandBrake-0.9.9-orig/libhb/common.h HandBrake-0.9.9/libhb/common.h
--- HandBrake-0.9.9-orig/libhb/common.h 2014-05-02 22:50:00.047305795 +0200
+++ HandBrake-0.9.9/libhb/common.h 2014-05-02 22:39:37.839288245 +0200
@@ -945,7 +945,6 @@
extern hb_work_object_t hb_decavcodeca;
extern hb_work_object_t hb_decavcodecv;
extern hb_work_object_t hb_declpcm;
-extern hb_work_object_t hb_encfaac;
extern hb_work_object_t hb_enclame;
extern hb_work_object_t hb_encvorbis;
extern hb_work_object_t hb_muxer;
diff -ru HandBrake-0.9.9-orig/libhb/hb.c HandBrake-0.9.9/libhb/hb.c
--- HandBrake-0.9.9-orig/libhb/hb.c 2014-05-02 22:50:00.047305795 +0200
+++ HandBrake-0.9.9/libhb/hb.c 2014-05-02 22:39:02.287287242 +0200
@@ -487,7 +487,6 @@
hb_register( &hb_decavcodeca );
hb_register( &hb_decavcodecv );
hb_register( &hb_declpcm );
- hb_register( &hb_encfaac );
hb_register( &hb_enclame );
hb_register( &hb_encvorbis );
hb_register( &hb_muxer );
@@ -588,7 +587,6 @@
hb_register( &hb_decavcodeca );
hb_register( &hb_decavcodecv );
hb_register( &hb_declpcm );
- hb_register( &hb_encfaac );
hb_register( &hb_enclame );
hb_register( &hb_encvorbis );
hb_register( &hb_muxer );
diff -ru HandBrake-0.9.9-orig/libhb/module.defs HandBrake-0.9.9/libhb/module.defs
--- HandBrake-0.9.9-orig/libhb/module.defs 2014-05-02 22:50:00.047305795 +0200
+++ HandBrake-0.9.9/libhb/module.defs 2014-05-02 22:39:25.727287903 +0200
@@ -95,7 +95,7 @@
LIBHB.lib = $(LIBHB.build/)hb.lib
LIBHB.dll.libs = $(foreach n, \
- a52 ass avcodec avformat avutil avresample dvdnav dvdread faac \
+ a52 ass avcodec avformat avutil avresample dvdnav dvdread \
fontconfig freetype mkv mpeg2 mp3lame mp4v2 \
ogg samplerate swscale theora vorbis vorbisenc x264 xml2 bluray, \
$(CONTRIB.build/)lib/lib$(n).a )
Only in HandBrake-0.9.9: libhb-orig
diff -ru HandBrake-0.9.9orig/test/module.defs HandBrake-0.9.9/test/module.defs
--- HandBrake-0.9.9-orig/test/module.defs 2014-05-02 23:15:10.575348401 +0200
+++ HandBrake-0.9.9/test/module.defs 2014-05-02 23:17:00.523351502 +0200
@@ -14,7 +14,7 @@
TEST.libs = $(LIBHB.a)
TEST.GCC.l = \
- a52 ass avcodec avformat avutil avresample dvdnav dvdread faac \
+ a52 ass avcodec avformat avutil avresample dvdnav dvdread \
fontconfig freetype fribidi mkv mpeg2 mp3lame mp4v2 ogg \
samplerate swscale theoraenc theoradec vorbis vorbisenc x264 \
bluray xml2 bz2 z

View file

@ -0,0 +1,45 @@
{ stdenv, fetchurl, desktop_file_utils, enchant, gnome, gstreamer, gstreamermm,
gst_plugins_base, gst_plugins_good, intltool, hicolor_icon_theme,
libsigcxx, libxmlxx, makeWrapper, xdg_utils, pkgconfig } :
let
ver_maj = "0.41";
ver_min = "0";
in
stdenv.mkDerivation rec {
name = "subtitle-editor-${ver_maj}.${ver_min}";
buildInputs = [
desktop_file_utils enchant gnome.gtk gnome.gtkmm gstreamer gstreamermm
gst_plugins_base gst_plugins_good intltool hicolor_icon_theme libsigcxx libxmlxx
makeWrapper xdg_utils pkgconfig
];
src = fetchurl {
url = "http://download.gna.org/subtitleeditor/${ver_maj}/subtitleeditor-${ver_maj}.${ver_min}.tar.gz";
md5 = "3c21ccd8296001dcb1a02c62396db1b6";
};
doCheck = true;
postInstall = ''
wrapProgram "$out/bin/subtitleeditor" --prefix \
GST_PLUGIN_SYSTEM_PATH ":" "$GST_PLUGIN_SYSTEM_PATH" \
'';
meta = {
description = "GTK+2 application to edit video subtitles";
longDescription = ''
Subtitle Editor is a GTK+2 tool to edit subtitles for GNU/Linux/*BSD. It can be
used for new subtitles or as a tool to transform, edit, correct and refine
existing subtitle. This program also shows sound waves, which makes it easier
to synchronise subtitles to voices.
'';
homepage = http://home.gna.org/subtitleeditor;
license = stdenv.lib.licenses.gpl3;
maintainers = stdenv.lib.maintainers.plcplc;
platforms = stdenv.lib.platforms.linux;
};
}

View file

@ -1,12 +1,13 @@
# generic builder for Cabal packages
{ stdenv, fetchurl, lib, pkgconfig, ghc, Cabal, jailbreakCabal, glibcLocales
, gnugrep, coreutils
, gnugrep, coreutils, hscolour
, enableLibraryProfiling ? false
, enableSharedLibraries ? false
, enableSharedExecutables ? false
, enableStaticLibraries ? true
, enableCheckPhase ? stdenv.lib.versionOlder "7.4" ghc.version
, enableHyperlinkSource ? true
, extension ? (self : super : {})
}:
@ -50,6 +51,7 @@ assert !enableStaticLibraries -> versionOlder "7.7" ghc.version;
propagatedBuildInputs = filter (y : ! (y == null)) x.propagatedBuildInputs;
propagatedUserEnvPkgs = filter (y : ! (y == null)) x.propagatedUserEnvPkgs;
doCheck = enableCheckPhase && x.doCheck;
hyperlinkSource = enableHyperlinkSource && x.hyperlinkSource;
};
defaults =
@ -92,6 +94,7 @@ assert !enableStaticLibraries -> versionOlder "7.7" ghc.version;
buildInputs = [ghc Cabal] ++ self.extraBuildInputs;
extraBuildInputs = self.buildTools ++
(optionals self.doCheck self.testDepends) ++
(optional self.hyperlinkSource hscolour) ++
(if self.pkgconfigDepends == [] then [] else [pkgconfig]) ++
(if self.isLibrary then [] else self.buildDepends ++ self.extraLibraries ++ self.pkgconfigDepends);
@ -140,6 +143,9 @@ assert !enableStaticLibraries -> versionOlder "7.7" ghc.version;
# and run any regression test suites the package might have
doCheck = enableCheckPhase;
# pass the '--hyperlink-source' flag to ./Setup haddock
hyperlinkSource = enableHyperlinkSource;
# abort the build if the configure phase detects that the package
# depends on multiple versions of the same build input
strictConfigurePhase = true;
@ -197,6 +203,9 @@ assert !enableStaticLibraries -> versionOlder "7.7" ghc.version;
${optionalString (self.enableSharedExecutables && self.stdenv.isLinux) ''
configureFlags+=" --ghc-option=-optl=-Wl,-rpath=$out/lib/${ghc.ghc.name}/${self.pname}-${self.version}";
''}
${optionalString (self.enableSharedExecutables && self.stdenv.isDarwin) ''
configureFlags+=" --ghc-option=-optl=-Wl,-headerpad_max_install_names";
''}
echo "configure flags: $extraConfigureFlags $configureFlags"
./Setup configure --verbose --prefix="$out" --libdir='$prefix/lib/$compiler' \
@ -219,7 +228,8 @@ assert !enableStaticLibraries -> versionOlder "7.7" ghc.version;
./Setup build ${self.buildTarget}
export GHC_PACKAGE_PATH=$(${ghc.GHCPackages})
test -n "$noHaddock" || ./Setup haddock --html --hoogle
test -n "$noHaddock" || ./Setup haddock --html --hoogle \
${optionalString self.hyperlinkSource "--hyperlink-source"}
eval "$postBuild"
'';
@ -256,6 +266,13 @@ assert !enableStaticLibraries -> versionOlder "7.7" ghc.version;
ln -s $out/nix-support/propagated-native-build-inputs $out/nix-support/propagated-user-env-packages
fi
${optionalString (self.enableSharedExecutables && self.isExecutable && self.stdenv.isDarwin) ''
for exe in $out/bin/* ; do
install_name_tool -add_rpath \
$out/lib/${ghc.ghc.name}/${self.pname}-${self.version} $exe
done
''}
eval "$postInstall"
'';

View file

@ -1,9 +1,9 @@
source $stdenv/setup
header "getting $url${tag:+ ($tag)} into $out"
hg clone --insecure ${tag:+-r "$tag"} "$url" "$out"
hg clone --insecure "$url" hg-clone
rm -rf "$out/.hg"
hg archive -q -y ${tag:+-r "$tag"} --cwd hg-clone $out
rm -f $out/.hg_archival.txt
stopNest

View file

@ -0,0 +1,14 @@
{ stdenv }:
stdenv.mkDerivation {
name = "libredirect-0";
unpackPhase = "cp ${./libredirect.c} libredirect.c";
buildPhase =
''
gcc -Wall -std=c99 -O3 -shared libredirect.c -o libredirect.so -fPIC -ldl
'';
installPhase = "mkdir -p $out/lib; cp libredirect.so $out/lib";
}

View file

@ -0,0 +1,104 @@
#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>
#include <string.h>
#define MAX_REDIRECTS 128
static int nrRedirects = 0;
static char * from[MAX_REDIRECTS];
static char * to[MAX_REDIRECTS];
// FIXME: might run too late.
static void init() __attribute__((constructor));
static void init()
{
char * spec = getenv("NIX_REDIRECTS");
if (!spec) return;
unsetenv("NIX_REDIRECTS");
char * spec2 = malloc(strlen(spec) + 1);
strcpy(spec2, spec);
char * pos = spec2, * eq;
while ((eq = strchr(pos, '='))) {
*eq = 0;
from[nrRedirects] = pos;
pos = eq + 1;
to[nrRedirects] = pos;
nrRedirects++;
if (nrRedirects == MAX_REDIRECTS) break;
char * end = strchr(pos, ':');
if (!end) break;
*end = 0;
pos = end + 1;
}
}
static const char * rewrite(const char * path, char * buf)
{
for (int n = 0; n < nrRedirects; ++n) {
int len = strlen(from[n]);
if (strncmp(path, from[n], len) != 0) continue;
if (snprintf(buf, PATH_MAX, "%s%s", to[n], path + len) >= PATH_MAX)
abort();
return buf;
}
return path;
}
/* The following set of Glibc library functions is very incomplete -
it contains only what we needed for programs in Nixpkgs. Just add
more functions as needed. */
int open(const char * path, int flags, ...)
{
int (*open_real) (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);
}
char buf[PATH_MAX];
return open_real(rewrite(path, buf), flags, mode);
}
int open64(const char * path, int flags, ...)
{
int (*open64_real) (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);
}
char buf[PATH_MAX];
return open64_real(rewrite(path, buf), flags, mode);
}
FILE * fopen(const char * path, const char * mode)
{
FILE * (*fopen_real) (const char *, const char *) = dlsym(RTLD_NEXT, "fopen");
char buf[PATH_MAX];
return fopen_real(rewrite(path, buf), mode);
}
int __xstat(int ver, const char * path, struct stat * st)
{
int (*__xstat_real) (int ver, const char *, struct stat *) = dlsym(RTLD_NEXT, "__xstat");
char buf[PATH_MAX];
return __xstat_real(ver, rewrite(path, buf), st);
}

View file

@ -0,0 +1,22 @@
{ stdenv, fetchurl }:
stdenv.mkDerivation {
name = "lohit-fonts-20140220";
src = fetchurl {
url = https://fedorahosted.org/releases/l/o/lohit/lohit-ttf-20140220.tar.gz;
sha256 = "1rmgr445hw1n851ywy28csfvswz1i6hnc8mzp88qw2xk9j4dn32d";
};
installPhase = ''
mkdir -p $out/share/fonts/truetype
cp *.ttf $out/share/fonts/truetype
'';
meta = with stdenv.lib; {
homepage = https://fedorahosted.org/lohit/;
description = "Fonts for 21 Indian languages";
license = licenses.ofl;
maintainers = [ maintainers.ttuegel ];
platforms = platforms.all;
};
}

View file

@ -0,0 +1,59 @@
{stdenv, fetchurl, unzip}:
stdenv.mkDerivation rec {
name = "nafees";
srcs = [(fetchurl {
url = "http://www.cle.org.pk/Downloads/localization/fonts/NafeesNastaleeq/Nafees_Nastaleeq_v1.02.zip";
sha256 = "1h1k5d74pg2gs782910v7i9rz2633wdacy34ds7ybxbpjiz6pqix";
})
(fetchurl {
url = "http://www.cle.org.pk/Downloads/localization/fonts/NafeesRiqa/Nafees_Riqa_v1.0.zip";
sha256 = "1liismsyaj69y40vs9a9db4l95n25n8vnjnx7sbk70nxppwngd8i";
})
(fetchurl {
url = "http://www.cle.org.pk/Downloads/localization/fonts/NafeesNaskh/Nafees_Naskh_v2.01.zip";
sha256 = "1qbbj6w6bvrlymv7z6ld609yhp0l2f27z14180w5n8kzzl720vly";
})
(fetchurl {
url = "http://www.cle.org.pk/Downloads/localization/fonts/NafeesTahreerNaskh/Nafees_Tahreer_Naskh_v1.0.zip";
sha256 = "006l87drbi4zh52kpvn8wl9wbwm9srfn406rzsnf4gv0spzhqrxl";
})
(fetchurl {
url = "http://www.cle.org.pk/Downloads/localization/fonts/NafeesPakistaniNaskh/Nafees_Pakistani_Naskh_v2.01.zip";
sha256 = "1i5ip60gq1cgc9fc96kvlahdpia8dxdgcisglvbm2d212bz0s5nb";
})
];
buildInputs = [unzip];
sourceRoot = ".";
installPhase = ''
mkdir -p $out/share/fonts/truetype
cp *.ttf $out/share/fonts/truetype
# cp $riqa/*.ttf $out/share/fonts/truetype
'';
meta = {
description = "OpenType Urdu font from the Center for Research in Urdu Language Processing";
longDescription = '' The Nafees font family is developed according
to calligraphic rules, following the style of Syed Nafees
Al-Hussaini (Nafees Raqam) one of the finest calligraphers of
Pakistan '';
homepage = "http://www.cle.org.pk/software/localization.htm";
# Used to be GPLv2. The license distributed with the fonts looks
# more like a modified BSD, but still contains the GPLv2 embedded
# font exception, and some not-for-resale language.
license = "unknown";
platforms = stdenv.lib.platforms.all;
maintainers = [ "Daniel Bergey <bergey@teallabs.org>" ];
};
}

View file

@ -0,0 +1,22 @@
{ stdenv, fetchurl, glib, pkgconfig, gnome3, intltool
, gobjectIntrospection, makeWrapper }:
stdenv.mkDerivation rec {
name = "nautilus-sendto-${version}";
version = "3.8.1";
src = fetchurl {
url = "mirror://gnome/sources/nautilus-sendto/3.8/${name}.tar.xz";
sha256 = "03fa46bff271acdbdedab6243b2a84e5ed3daa19c81b69d087b3e852c8fe5dab";
};
buildInputs = [ glib pkgconfig gobjectIntrospection intltool makeWrapper ];
meta = with stdenv.lib; {
description = "Integrates Evolution and Pidgin into the Nautilus file manager";
maintainers = with maintainers; [ lethalman ];
license = licenses.gpl2;
platforms = platforms.linux;
};
}

View file

@ -171,6 +171,8 @@ rec {
gnome-photos = callPackage ./apps/gnome-photos { };
nautilus-sendto = callPackage ./apps/nautilus-sendto { };
# scrollkeeper replacement
rarian = callPackage ./desktop/rarian { };

View file

@ -0,0 +1,22 @@
{ stdenv, fetchurl, glib, pkgconfig, gnome3, intltool
, gobjectIntrospection, makeWrapper }:
stdenv.mkDerivation rec {
name = "nautilus-sendto-${version}";
version = "3.8.1";
src = fetchurl {
url = "mirror://gnome/sources/nautilus-sendto/3.8/${name}.tar.xz";
sha256 = "03fa46bff271acdbdedab6243b2a84e5ed3daa19c81b69d087b3e852c8fe5dab";
};
buildInputs = [ glib pkgconfig gobjectIntrospection intltool makeWrapper ];
meta = with stdenv.lib; {
description = "Integrates Evolution and Pidgin into the Nautilus file manager";
maintainers = with maintainers; [ lethalman ];
license = licenses.gpl2;
platforms = platforms.linux;
};
}

View file

@ -15,12 +15,12 @@ stdenv.mkDerivation rec {
};
buildInputs = [ gnome3.gtk gnome3.gsettings_desktop_schemas gnome3.vte appdata-tools
gnome3.dconf itstool ncurses makeWrapper ];
gnome3.dconf itstool ncurses makeWrapper gnome3.nautilus ];
nativeBuildInputs = [ pkgconfig intltool gnome_doc_utils which libuuid libxml2 desktop_file_utils ];
# FIXME: enable for gnome3
configureFlags = [ "--disable-search-provider" "--without-nautilus-extension" "--disable-migration" ];
configureFlags = [ "--disable-search-provider" "--disable-migration" ];
preFixup = ''
for f in "$out/libexec/gnome-terminal-server"; do

View file

@ -21,6 +21,8 @@ stdenv.mkDerivation rec {
--prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:$out/share:$GSETTINGS_SCHEMAS_PATH"
'';
patches = [ ./extension_dir.patch ];
meta = with stdenv.lib; {
platforms = platforms.linux;
};

View file

@ -0,0 +1,24 @@
diff --git a/libnautilus-private/nautilus-module.c b/libnautilus-private/nautilus-module.c
index 6273a76..4adcc8a 100644
--- a/libnautilus-private/nautilus-module.c
+++ b/libnautilus-private/nautilus-module.c
@@ -242,11 +242,17 @@ void
nautilus_module_setup (void)
{
static gboolean initialized = FALSE;
+ const gchar* extensiondir = NULL;
if (!initialized) {
initialized = TRUE;
-
- load_module_dir (NAUTILUS_EXTENSIONDIR);
+
+ extensiondir = g_getenv ("NAUTILUS_EXTENSION_DIR");
+ if (extensiondir == NULL) {
+ extensiondir = NAUTILUS_EXTENSIONDIR;
+ }
+
+ load_module_dir (extensiondir);
eel_debug_call_at_shutdown (free_module_objects);
}

View file

@ -203,6 +203,8 @@ rec {
gnome-photos = callPackage ./apps/gnome-photos { };
nautilus-sendto = callPackage ./apps/nautilus-sendto { };
# scrollkeeper replacement
rarian = callPackage ./desktop/rarian { };

View file

@ -1,7 +1,15 @@
{ kde, kdelibs, libarchive, bzip2, kde_baseapps, lzma, qjson }:
{ makeWrapper, kde, kdelibs, libarchive, bzip2, kde_baseapps, lzma, qjson
, unzip }:
kde {
buildInputs = [ kdelibs kde_baseapps libarchive bzip2 lzma qjson ];
buildInputs = [
makeWrapper kdelibs kde_baseapps libarchive bzip2 lzma qjson
];
postInstall = ''
wrapProgram $out/bin/ark \
--prefix PATH ":" "${unzip}/bin"
'';
meta = {
description = "KDE Archiving Tool";

View file

@ -0,0 +1,71 @@
source $stdenv/setup
export CXXFLAGS="-m32"
tar zxvf "$gecodeSrc"
cd gecode-1.3.1
./configure --prefix="$out" --disable-minimodel --disable-examples
make
make install
cd ..
PKG_CONFIG_PATH=$PKG_CONFIG_PATH:"$out"/lib/pkgconfig
tar zxvf "$seamSrc"
cd seam-1.4
./configure --prefix="$out" --with-zlib=$zlib
make
make install
cd ..
PATH=$PATH:"$out"/bin
tar zxvf "$aliceSrc"
cd alice-1.4
sed -i -e 's/bin\/bash/usr\/bin\/env bash/g' bin/alicerun.in
sed -i -e 's/bin\/bash/usr\/bin\/env bash/g' bin/aliceremote
./configure --prefix="$out" --with-gmp=$gmp
make
make install
cd ..
tar zxvf "$aliceGecodeSrc"
cd alice-gecode-1.4
make compiledll MUST_GENERATE=no
make installdll MUST_GENERATE=no
cd ..
tar zxvf "$aliceRegexSrc"
cd alice-regex-1.4
make compiledll MUST_GENERATE=no
make installdll MUST_GENERATE=no
cd ..
tar zxvf "$aliceSqliteSrc"
cd alice-sqlite-1.4
make compiledll MUST_GENERATE=no
make installdll MUST_GENERATE=no
cd ..
tar zxvf "$aliceXmlSrc"
cd alice-xml-1.4
make compiledll MUST_GENERATE=no
make installdll MUST_GENERATE=no
cd ..
tar zxvf "$aliceGtkSrc"
cd alice-gtk-1.4
sed -i -e 's/PRIVATE_GTK_LEAVE_PENDING/PRIVATE_GTK_HAS_POINTER/g' NativeGtk.cc
sed -i -e 's/bin\/bash/usr\/bin\/env bash/g' myinstall
make compiledll MUST_GENERATE=no
make installdll MUST_GENERATE=no
cd ..
tar zxvf "$aliceRuntimeSrc"
cd alice-runtime-1.4
./configure --prefix="$out"
make
make install
cd ..

View file

@ -0,0 +1,70 @@
{stdenv, fetchurl, pkgsi686Linux, libtool, gnumake381, autoconf, automake111x, file, which, zsh, m4, pkgconfig, perl}:
stdenv.mkDerivation {
name = "aliceml-1.4";
aliceSrc = fetchurl {
url = http://www.ps.uni-saarland.de/alice/download/sources/alice-1.4.tar.gz;
sha256 = "1ay8r26g7xm9zlrlpigp6y1zmrl93hzkndb5phx7651wx8j2183r";
};
aliceGecodeSrc = fetchurl {
url = http://www.ps.uni-saarland.de/alice/download/sources/alice-gecode-1.4.tar.gz;
sha256 = "0yklpsqnm3wwzfz4vvv69dmm7q7pzpl3z7iw7wg33klng85cidl6";
};
aliceGtkSrc = fetchurl {
url = http://www.ps.uni-saarland.de/alice/download/sources/alice-gtk-1.4.tar.gz;
sha256 = "0zx4ks0pk5wgbcsflcmn0kbpa9j7pjbsc19d1s3jgp4rwb24m1an";
};
aliceRegexSrc = fetchurl {
url = http://www.ps.uni-saarland.de/alice/download/sources/alice-regex-1.4.tar.gz;
sha256 = "0myjzh3295awamghs4c88ypaa41m8sxh5jys876yq6flslw41s02";
};
aliceRuntimeSrc = fetchurl {
url = http://www.ps.uni-saarland.de/alice/download/sources/alice-runtime-1.4.tar.gz;
sha256 = "1cbca71vh16l2h0zjvhgzzs0rzq99nc8nx9a97yzw595355nq57f";
};
aliceSqliteSrc = fetchurl {
url = http://www.ps.uni-saarland.de/alice/download/sources/alice-sqlite-1.4.tar.gz;
sha256 = "0554xbx8zgqmpb7x06d7xvhlbk7bxmc237khgjs6yjcy53yf366b";
};
aliceXmlSrc = fetchurl {
url = http://www.ps.uni-saarland.de/alice/download/sources/alice-xml-1.4.tar.gz;
sha256 = "058a815a0vajjvjlsmd4ryx2bc71q6zwvyjg2c0v1gba2v3pddm0";
};
seamSrc = fetchurl {
url = http://www.ps.uni-saarland.de/alice/download/sources/seam-1.4.tar.gz;
sha256 = "1iz98jdv914whaw426d5406shlqgxqwpy3fbyb472x7d3lfra2dz";
};
gecodeSrc = fetchurl {
url = http://www.gecode.org/download/gecode-1.3.1.tar.gz;
sha256 = "0mgc6llbq166jmlq3alvagqsg3730670zvbwwkdgsqklw70v9355";
};
zlib = pkgsi686Linux.zlib;
gmp = pkgsi686Linux.gmp;
buildInputs = [
stdenv pkgsi686Linux.gcc34 pkgsi686Linux.glibc
libtool gnumake381 autoconf automake111x pkgsi686Linux.zlib
file which zsh pkgsi686Linux.gmp m4 pkgsi686Linux.gnome.gtk
pkgsi686Linux.gnome.libgnomecanvas pkgsi686Linux.pango pkgsi686Linux.sqlite
pkgsi686Linux.libxml2 pkgsi686Linux.lightning pkgconfig perl
];
builder = ./builder.sh;
meta = {
homepage = http://www.ps.uni-saarland.de/alice/;
description = "Alice ML is a functional programming language based on Standard ML, extended with rich support for concurrent, distributed, and constraint programming.";
license = "BSD";
};
}

View file

@ -1,17 +1,7 @@
{ stdenv, fetchurl, devSnapshot ? false }:
{ stdenv, fetchurl }:
let
stableVersion = "4.8.0.6";
devVersion = "4.9.0rc1";
version = if devSnapshot then devVersion else stableVersion;
srcRelease = fetchurl {
url = "http://code.call-cc.org/releases/4.8.0/chicken-${stableVersion}.tar.gz";
sha256 = "0an6l09y9pa6r4crkn33w6l4j6nwhvk6fibx2ajv6h0pfl2jqkd5";
};
srcDev = fetchurl {
url = "http://code.call-cc.org/dev-snapshots/2014/04/17/chicken-${devVersion}.tar.gz";
sha256 = "168f5ib02hh6cnilsrfg103ijhlg4j0z0fgs7i55kzd4aggy1w42";
};
version = "4.9.0";
platform = with stdenv;
if isDarwin then "macosx"
else if isCygwin then "cygwin"
@ -22,9 +12,10 @@ in
stdenv.mkDerivation {
name = "chicken-${version}";
src = if devSnapshot
then srcDev
else srcRelease;
src = fetchurl {
url = "http://code.call-cc.org/releases/4.9.0/chicken-${version}.tar.gz";
sha256 = "08jaavr3lhs0z2q9k7b7w8l3fsxpms58zxg8nyk8674p54cbwaig";
};
buildFlags = "PLATFORM=${platform} PREFIX=$(out) VARDIR=$(out)/var/lib";
installFlags = "PLATFORM=${platform} PREFIX=$(out) VARDIR=$(out)/var/lib";

View file

@ -2,11 +2,11 @@
stdenv.mkDerivation rec {
name = "compcert-${version}";
version = "2.2";
version = "2.3pl2";
src = fetchurl {
url = "http://compcert.inria.fr/release/${name}.tgz";
sha256 = "0zhqx9mixlsycckl6wq6yrd795byj1jz7m4njcgfv29cx33j1nrk";
sha256 = "1cq4my646ll1mszs5mbzwk4vp8l8qnsc96fpcv2pl35aw5i6jqm8";
};
buildInputs = [ coq ocaml ];

View file

@ -24,6 +24,10 @@ cabal.mkDerivation (self: {
unorderedContainers yaml
];
doCheck = false;
preConfigure = ''
rm -f Setup.hs
echo -e "import Distribution.Simple\nmain=defaultMain\n" > Setup.hs
'';
meta = {
homepage = "http://elm-lang.org";
description = "The Elm language module";

View file

@ -1,5 +1,7 @@
{ stdenv, fetchurl, noSysDirs
, langC ? true, langCC ? true, langFortran ? false
, langObjC ? stdenv.isDarwin
, langObjCpp ? stdenv.isDarwin
, langJava ? false
, langAda ? false
, langVhdl ? false
@ -352,6 +354,8 @@ stdenv.mkDerivation ({
++ optional langAda "ada"
++ optional langVhdl "vhdl"
++ optional langGo "go"
++ optional langObjC "objc"
++ optional langObjCpp "obj-c++"
++ optionals crossDarwin [ "objc" "obj-c++" ]
)
)
@ -490,7 +494,7 @@ stdenv.mkDerivation ({
else null;
passthru =
{ inherit langC langCC langAda langFortran langVhdl langGo enableMultilib version; };
{ inherit langC langCC langObjC langObjCpp langAda langFortran langVhdl langGo enableMultilib version; };
inherit enableParallelBuilding;

View file

@ -7,11 +7,11 @@ let
in
stdenv.mkDerivation {
name = "go-1.2.1";
name = "go-1.2.2";
src = fetchurl {
url = http://go.googlecode.com/files/go1.2.1.src.tar.gz;
sha1 = "6a4b9991eddd8039438438d6aa25126ab7e07f2f";
url = https://storage.googleapis.com/golang/go1.2.2.src.tar.gz;
sha1 = "3ce0ac4db434fc1546fec074841ff40dc48c1167";
};
buildInputs = [ bison glibc bash makeWrapper ];

View file

@ -47,7 +47,7 @@ stdenv.mkDerivation rec {
find . -name 'config' -type f | while read i; do
sed -i "s@libMonoPosixHelper.so@$out/lib/libMonoPosixHelper.so@g" $i
sed -i "s@libX11.so.6@${libX11}/lib/libX11.so.6@g" $i
sed -i '2 i\<dllmap dll="gdiplus.dll" target="${libgdiplus}/lib/libgdiplus.so" os="!windows"/>' $i
sed -i "s@/.*libgdiplus.so@${libgdiplus}/lib/libgdiplus.so@g" $i
done
'';

View file

@ -0,0 +1,41 @@
# Binaries provided by Open Dylan to be used to bootstrap from source.
# The binaries can also be used as is.
{stdenv, fetchurl, patchelf, boehmgc, gnused, gcc, makeWrapper}:
stdenv.mkDerivation {
name = "opendylan-2013.2";
src = if stdenv.system == "x86_64-linux" then fetchurl {
url = http://opendylan.org/downloads/opendylan/2013.2/opendylan-2013.2-x86_64-linux.tar.bz2;
sha256 = "035brbw3hm7zrs593q4zc42yglj1gmmkw3b1r7zzlw3ks4i2lg7h";
}
else if stdenv.system == "i686-linux" then fetchurl {
url = http://opendylan.org/downloads/opendylan/2013.2/opendylan-2013.2-x86-linux.tar.bz2;
sha256 = "0c61ihvblcsjrw6ncr8x8ylhskcrqs8pajs4mg5di36cvqw12nq5";
}
else throw "platform ${stdenv.system} not supported.";
buildInputs = [ patchelf boehmgc gnused makeWrapper ];
buildCommand = ''
mkdir -p "$out"
tar --strip-components=1 -xjf "$src" -C "$out"
interpreter="$(cat "$NIX_GCC"/nix-support/dynamic-linker)"
for a in "$out"/bin/*; do
patchelf --set-interpreter "$interpreter" "$a"
patchelf --set-rpath "$out/lib:${boehmgc}/lib" "$a"
done
for a in "$out"/lib/*.so; do
patchelf --set-rpath "$out/lib:${boehmgc}/lib" "$a"
done
sed -i -e "s|\-lgc|\-L${boehmgc}\/lib -lgc|" $out/lib/config.jam
wrapProgram $out/bin/dylan-compiler --suffix PATH : ${gcc}/bin
'';
meta = {
homepage = http://opendylan.org;
description = "Dylan is a multi-paradigm functional and object-oriented programming language.";
license = "MIT";
};
}

View file

@ -0,0 +1,37 @@
# Build Open Dylan from source using the binary builds to bootstrap.
{stdenv, fetchgit, patchelf, boehmgc, mps, gnused, opendylan-bootstrap, autoconf, automake, perl, makeWrapper, gcc }:
stdenv.mkDerivation {
name = "opendylan-2013.2";
src = fetchgit {
url = https://github.com/dylan-lang/opendylan;
rev = "ce9b14dab6cb9ffedc69fae8c6df524c0c79abd3";
sha256 = "cec80980b838ac2581dfb6282e25d208e720d475256b75e24b23dbd30b09d21f";
fetchSubmodules = true;
};
buildInputs = (if stdenv.system == "i686-linux" then [ mps ] else [ boehmgc ]) ++ [
opendylan-bootstrap boehmgc gnused autoconf automake perl makeWrapper
] ;
preConfigure = if stdenv.system == "i686-linux" then ''
mkdir -p $TMPDIR/mps
tar --strip-components=1 -xf ${mps.src} -C $TMPDIR/mps
./autogen.sh
''
else ''
./autogen.sh
'';
configureFlags = if stdenv.system == "i686-linux" then "--with-mps=$(TMPDIR)/mps" else "--with-gc=${boehmgc}";
buildPhase = "make 3-stage-bootstrap";
postInstall = "wrapProgram $out/bin/dylan-compiler --suffix PATH : ${gcc}/bin";
meta = {
homepage = http://opendylan.org;
description = "Dylan is a multi-paradigm functional and object-oriented programming language.";
license = "MIT";
};
}

View file

@ -32,6 +32,5 @@ stdenv.mkDerivation rec {
(textClosure localDefs [allBuild doForceShare doPropagate]);
meta = {
description = "Qi - next generation on top of Common Lisp";
inherit src;
};
}

View file

@ -4,11 +4,11 @@ let
s= # Generated upstream information
rec {
baseName="sbcl";
version="1.1.16";
version="1.2.0";
name="${baseName}-${version}";
hash="04631klj02crs82b1i21rpddcgh9x6nnarj5avavy9c7zgvr8cnw";
url="mirror://sourceforge/project/sbcl/sbcl/1.1.16/sbcl-1.1.16-source.tar.bz2";
sha256="04631klj02crs82b1i21rpddcgh9x6nnarj5avavy9c7zgvr8cnw";
hash="13k20sys1v4lvgis8cnbczww6zs93rw176vz07g4jx06418k53x2";
url="mirror://sourceforge/project/sbcl/sbcl/1.2.0/sbcl-1.2.0-source.tar.bz2";
sha256="13k20sys1v4lvgis8cnbczww6zs93rw176vz07g4jx06418k53x2";
};
buildInputs = with a; [
clisp makeWrapper

View file

@ -1,14 +1,14 @@
{ stdenv, fetchurl, erlang, rebar, makeWrapper, coreutils }:
let
version = "0.13.2";
version = "0.13.3";
in
stdenv.mkDerivation {
name = "elixir-${version}";
src = fetchurl {
url = "https://github.com/elixir-lang/elixir/archive/v${version}.tar.gz";
sha256 = "13mflf35lj2vbv32s5n982x7k5k55dsn9mx9rf3vkqgfsy7zx4ds";
sha256 = "17nb8qfyjc67g62x10l2gq0z1501xa4wry906br0w2rm8bf4j8rf";
};
buildInputs = [ erlang rebar makeWrapper ];

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