Merge branch 'master' into staging

This commit is contained in:
Vladimír Čunát 2017-02-13 21:57:49 +01:00
commit 8d8c337884
No known key found for this signature in database
GPG Key ID: E747DF1F9575A3AA
156 changed files with 5193 additions and 11560 deletions

View File

@ -87,6 +87,7 @@
cfouche = "Chaddaï Fouché <chaddai.fouche@gmail.com>"; cfouche = "Chaddaï Fouché <chaddai.fouche@gmail.com>";
chaoflow = "Florian Friesdorf <flo@chaoflow.net>"; chaoflow = "Florian Friesdorf <flo@chaoflow.net>";
chattered = "Phil Scott <me@philscotted.com>"; chattered = "Phil Scott <me@philscotted.com>";
changlinli = "Changlin Li <mail@changlinli.com>";
choochootrain = "Hurshal Patel <hurshal@imap.cc>"; choochootrain = "Hurshal Patel <hurshal@imap.cc>";
chris-martin = "Chris Martin <ch.martin@gmail.com>"; chris-martin = "Chris Martin <ch.martin@gmail.com>";
chrisjefferson = "Christopher Jefferson <chris@bubblescope.net>"; chrisjefferson = "Christopher Jefferson <chris@bubblescope.net>";
@ -335,6 +336,7 @@
Nate-Devv = "Nathan Moore <natedevv@gmail.com>"; Nate-Devv = "Nathan Moore <natedevv@gmail.com>";
nathan-gs = "Nathan Bijnens <nathan@nathan.gs>"; nathan-gs = "Nathan Bijnens <nathan@nathan.gs>";
nckx = "Tobias Geerinckx-Rice <tobias.geerinckx.rice@gmail.com>"; nckx = "Tobias Geerinckx-Rice <tobias.geerinckx.rice@gmail.com>";
ndowens = "Nathan Owens <ndowens04@gmail.com>";
nequissimus = "Tim Steinbach <tim@nequissimus.com>"; nequissimus = "Tim Steinbach <tim@nequissimus.com>";
nfjinjing = "Jinjing Wang <nfjinjing@gmail.com>"; nfjinjing = "Jinjing Wang <nfjinjing@gmail.com>";
nhooyr = "Anmol Sethi <anmol@aubble.com>"; nhooyr = "Anmol Sethi <anmol@aubble.com>";
@ -523,6 +525,7 @@
womfoo = "Kranium Gikos Mendoza <kranium@gikos.net>"; womfoo = "Kranium Gikos Mendoza <kranium@gikos.net>";
wscott = "Wayne Scott <wsc9tt@gmail.com>"; wscott = "Wayne Scott <wsc9tt@gmail.com>";
wyvie = "Elijah Rum <elijahrum@gmail.com>"; wyvie = "Elijah Rum <elijahrum@gmail.com>";
xwvvvvwx = "David Terry <davidterry@posteo.de>";
yarr = "Dmitry V. <savraz@gmail.com>"; yarr = "Dmitry V. <savraz@gmail.com>";
yochai = "Yochai <yochai@titat.info>"; yochai = "Yochai <yochai@titat.info>";
yorickvp = "Yorick van Pelt <yorickvanpelt@gmail.com>"; yorickvp = "Yorick van Pelt <yorickvanpelt@gmail.com>";

View File

@ -37,6 +37,10 @@ boot.initrd.luks.devices.crypted.device = "/dev/disk/by-uuid/3f6b0024-3a44-4fde-
fileSystems."/".device = "/dev/mapper/crypted"; fileSystems."/".device = "/dev/mapper/crypted";
</programlisting> </programlisting>
Should grub be used as bootloader, and <filename>/boot</filename> is located
on an encrypted partition, it is necessary to add the following grub option:
<programlisting>boot.loader.grub.enableCryptodisk = true;</programlisting>
</para> </para>
</section> </section>

View File

@ -36,7 +36,10 @@ to set a password, which is retained across invocations of
and /etc/group will be congruent to your NixOS configuration. For instance, and /etc/group will be congruent to your NixOS configuration. For instance,
if you remove a user from users.extraUsers and run nixos-rebuild, the user if you remove a user from users.extraUsers and run nixos-rebuild, the user
account will cease to exist. Also, imperative commands for managing users account will cease to exist. Also, imperative commands for managing users
and groups, such as useradd, are no longer available.</para> and groups, such as useradd, are no longer available. Passwords may still be
assigned by setting the user's <literal>hashedPassword</literal> option. A
hashed password can be generated using <command>mkpasswd -m sha-512</command>
after installing the <literal>mkpasswd</literal> package.</para>
<para>A user ID (uid) is assigned automatically. You can also specify <para>A user ID (uid) is assigned automatically. You can also specify
a uid manually by adding a uid manually by adding

View File

@ -15,6 +15,12 @@ has the following highlights: </para>
xlink:href="https://nixos.org/nixpkgs/manual/#sec-overlays-install">Nixpkgs xlink:href="https://nixos.org/nixpkgs/manual/#sec-overlays-install">Nixpkgs
manual</link> for more information.</para> manual</link> for more information.</para>
</listitem> </listitem>
<listitem>
<para>X.org server uses branch 1.19. Due to ABI incompatibilities,
<literal>ati_unfree</literal> keeps forcing 1.17
and <literal>amdgpu-pro</literal> starts forcing 1.18.</para>
</listitem>
</itemizedlist> </itemizedlist>
<para>The following new services were added since the last release:</para> <para>The following new services were added since the last release:</para>

View File

@ -508,7 +508,7 @@ sub screenshot {
sub getTTYText { sub getTTYText {
my ($self, $tty) = @_; my ($self, $tty) = @_;
my ($status, $out) = $self->execute("fold -w 80 /dev/vcs${tty}"); my ($status, $out) = $self->execute("fold -w\$(stty -F /dev/tty${tty} size | awk '{print \$2}') /dev/vcs${tty}");
return $out; return $out;
} }

View File

@ -64,7 +64,7 @@
cups = 36; cups = 36;
foldingathome = 37; foldingathome = 37;
sabnzbd = 38; sabnzbd = 38;
kdm = 39; #kdm = 39; # dropped in 17.03
ghostone = 40; ghostone = 40;
git = 41; git = 41;
fourstore = 42; fourstore = 42;
@ -333,7 +333,7 @@
#cups = 36; # unused #cups = 36; # unused
#foldingathome = 37; # unused #foldingathome = 37; # unused
#sabnzd = 38; # unused #sabnzd = 38; # unused
#kdm = 39; # unused #kdm = 39; # unused, even before 17.03
ghostone = 40; ghostone = 40;
git = 41; git = 41;
fourstore = 42; fourstore = 42;

View File

@ -259,6 +259,7 @@
./services/misc/felix.nix ./services/misc/felix.nix
./services/misc/folding-at-home.nix ./services/misc/folding-at-home.nix
./services/misc/gammu-smsd.nix ./services/misc/gammu-smsd.nix
./services/misc/geoip-updater.nix
#./services/misc/gitit.nix #./services/misc/gitit.nix
./services/misc/gitlab.nix ./services/misc/gitlab.nix
./services/misc/gitolite.nix ./services/misc/gitolite.nix
@ -293,6 +294,7 @@
./services/misc/siproxd.nix ./services/misc/siproxd.nix
./services/misc/sonarr.nix ./services/misc/sonarr.nix
./services/misc/spice-vdagentd.nix ./services/misc/spice-vdagentd.nix
./services/misc/ssm-agent.nix
./services/misc/sssd.nix ./services/misc/sssd.nix
./services/misc/subsonic.nix ./services/misc/subsonic.nix
./services/misc/sundtek.nix ./services/misc/sundtek.nix
@ -559,7 +561,6 @@
./services/x11/display-managers/auto.nix ./services/x11/display-managers/auto.nix
./services/x11/display-managers/default.nix ./services/x11/display-managers/default.nix
./services/x11/display-managers/gdm.nix ./services/x11/display-managers/gdm.nix
./services/x11/display-managers/kdm.nix
./services/x11/display-managers/lightdm.nix ./services/x11/display-managers/lightdm.nix
./services/x11/display-managers/sddm.nix ./services/x11/display-managers/sddm.nix
./services/x11/display-managers/slim.nix ./services/x11/display-managers/slim.nix

View File

@ -253,6 +253,8 @@ let
"auth sufficient ${pkgs.pam_u2f}/lib/security/pam_u2f.so"} "auth sufficient ${pkgs.pam_u2f}/lib/security/pam_u2f.so"}
${optionalString cfg.usbAuth ${optionalString cfg.usbAuth
"auth sufficient ${pkgs.pam_usb}/lib/security/pam_usb.so"} "auth sufficient ${pkgs.pam_usb}/lib/security/pam_usb.so"}
${let oath = config.security.pam.oath; in optionalString cfg.oathAuth
"auth requisite ${pkgs.oathToolkit}/lib/security/pam_oath.so window=${toString oath.window} usersfile=${toString oath.usersFile} digits=${toString oath.digits}"}
'' + '' +
# Modules in this block require having the password set in PAM_AUTHTOK. # Modules in this block require having the password set in PAM_AUTHTOK.
# pam_unix is marked as 'sufficient' on NixOS which means nothing will run # pam_unix is marked as 'sufficient' on NixOS which means nothing will run
@ -271,8 +273,6 @@ let
"auth sufficient pam_unix.so ${optionalString cfg.allowNullPassword "nullok"} likeauth try_first_pass"} "auth sufficient pam_unix.so ${optionalString cfg.allowNullPassword "nullok"} likeauth try_first_pass"}
${optionalString cfg.otpwAuth ${optionalString cfg.otpwAuth
"auth sufficient ${pkgs.otpw}/lib/security/pam_otpw.so"} "auth sufficient ${pkgs.otpw}/lib/security/pam_otpw.so"}
${let oath = config.security.pam.oath; in optionalString cfg.oathAuth
"auth sufficient ${pkgs.oathToolkit}/lib/security/pam_oath.so window=${toString oath.window} usersfile=${toString oath.usersFile} digits=${toString oath.digits}"}
${optionalString use_ldap ${optionalString use_ldap
"auth sufficient ${pam_ldap}/lib/security/pam_ldap.so use_first_pass"} "auth sufficient ${pam_ldap}/lib/security/pam_ldap.so use_first_pass"}
${optionalString config.services.sssd.enable ${optionalString config.services.sssd.enable

View File

@ -775,7 +775,7 @@ in {
--bind-address=${cfg.proxy.address} \ --bind-address=${cfg.proxy.address} \
${optionalString cfg.verbose "--v=6"} \ ${optionalString cfg.verbose "--v=6"} \
${optionalString cfg.verbose "--log-flush-frequency=1s"} \ ${optionalString cfg.verbose "--log-flush-frequency=1s"} \
${cfg.controllerManager.extraOpts} ${cfg.proxy.extraOpts}
''; '';
WorkingDirectory = cfg.dataDir; WorkingDirectory = cfg.dataDir;
}; };

View File

@ -2,9 +2,7 @@
with lib; with lib;
let let
isBluez4 = config.services.xserver.desktopManager.kde4.enable; bluez-bluetooth = pkgs.bluez;
bluez-bluetooth = if isBluez4 then pkgs.bluez4 else pkgs.bluez;
in in
{ {
@ -38,7 +36,7 @@ in
aliases = [ "dbus-org.bluez.service" ]; aliases = [ "dbus-org.bluez.service" ];
}; };
systemd.user.services.obex = mkIf (!isBluez4) { systemd.user.services.obex = {
aliases = [ "dbus-org.bluez.obex.service" ]; aliases = [ "dbus-org.bluez.obex.service" ];
}; };

View File

@ -0,0 +1,300 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.geoip-updater;
dbBaseUrl = "https://geolite.maxmind.com/download/geoip/database";
randomizedTimerDelaySec = "3600";
# Use writeScriptBin instead of writeScript, so that argv[0] (logged to the
# journal) doesn't include the long nix store path hash. (Prefixing the
# ExecStart= command with '@' doesn't work because we start a shell (new
# process) that creates a new argv[0].)
geoip-updater = pkgs.writeScriptBin "geoip-updater" ''
#!${pkgs.stdenv.shell}
skipExisting=0
debug()
{
echo "<7>$@"
}
info()
{
echo "<6>$@"
}
error()
{
echo "<3>$@"
}
die()
{
error "$@"
exit 1
}
waitNetworkOnline()
{
ret=1
for i in $(seq 6); do
curl_out=$("${pkgs.curl.bin}/bin/curl" \
--silent --fail --show-error --max-time 60 "${dbBaseUrl}" 2>&1)
if [ $? -eq 0 ]; then
debug "Server is reachable (try $i)"
ret=0
break
else
debug "Server is unreachable (try $i): $curl_out"
sleep 10
fi
done
return $ret
}
dbFnameTmp()
{
dburl=$1
echo "${cfg.databaseDir}/.$(basename "$dburl")"
}
dbFnameTmpDecompressed()
{
dburl=$1
echo "${cfg.databaseDir}/.$(basename "$dburl")" | sed 's/\.\(gz\|xz\)$//'
}
dbFname()
{
dburl=$1
echo "${cfg.databaseDir}/$(basename "$dburl")" | sed 's/\.\(gz\|xz\)$//'
}
downloadDb()
{
dburl=$1
curl_out=$("${pkgs.curl.bin}/bin/curl" \
--silent --fail --show-error --max-time 900 -L -o "$(dbFnameTmp "$dburl")" "$dburl" 2>&1)
if [ $? -ne 0 ]; then
error "Failed to download $dburl: $curl_out"
return 1
fi
}
decompressDb()
{
fn=$(dbFnameTmp "$1")
ret=0
case "$fn" in
*.gz)
cmd_out=$("${pkgs.gzip}/bin/gzip" --decompress --force "$fn" 2>&1)
;;
*.xz)
cmd_out=$("${pkgs.xz.bin}/bin/xz" --decompress --force "$fn" 2>&1)
;;
*)
cmd_out=$(echo "File \"$fn\" is neither a .gz nor .xz file")
false
;;
esac
if [ $? -ne 0 ]; then
error "$cmd_out"
ret=1
fi
}
atomicRename()
{
dburl=$1
mv "$(dbFnameTmpDecompressed "$dburl")" "$(dbFname "$dburl")"
}
removeIfNotInConfig()
{
# Arg 1 is the full path of an installed DB.
# If the corresponding database is not specified in the NixOS config we
# remove it.
db=$1
for cdb in ${lib.concatStringsSep " " cfg.databases}; do
confDb=$(echo "$cdb" | sed 's/\.\(gz\|xz\)$//')
if [ "$(basename "$db")" = "$(basename "$confDb")" ]; then
return 0
fi
done
rm "$db"
if [ $? -eq 0 ]; then
debug "Removed $(basename "$db") (not listed in services.geoip-updater.databases)"
else
error "Failed to remove $db"
fi
}
removeUnspecifiedDbs()
{
for f in "${cfg.databaseDir}/"*; do
test -f "$f" || continue
case "$f" in
*.dat|*.mmdb|*.csv)
removeIfNotInConfig "$f"
;;
*)
debug "Not removing \"$f\" (unknown file extension)"
;;
esac
done
}
downloadAndInstall()
{
dburl=$1
if [ "$skipExisting" -eq 1 -a -f "$(dbFname "$dburl")" ]; then
debug "Skipping existing file: $(dbFname "$dburl")"
return 0
fi
downloadDb "$dburl" || return 1
decompressDb "$dburl" || return 1
atomicRename "$dburl" || return 1
info "Updated $(basename "$(dbFname "$dburl")")"
}
for arg in "$@"; do
case "$arg" in
--skip-existing)
skipExisting=1
info "Option --skip-existing is set: not updating existing databases"
;;
*)
error "Unknown argument: $arg";;
esac
done
waitNetworkOnline || die "Network is down (${dbBaseUrl} is unreachable)"
test -d "${cfg.databaseDir}" || die "Database directory (${cfg.databaseDir}) doesn't exist"
debug "Starting update of GeoIP databases in ${cfg.databaseDir}"
all_ret=0
for db in ${lib.concatStringsSep " \\\n " cfg.databases}; do
downloadAndInstall "${dbBaseUrl}/$db" || all_ret=1
done
removeUnspecifiedDbs || all_ret=1
if [ $all_ret -eq 0 ]; then
info "Completed GeoIP database update in ${cfg.databaseDir}"
else
error "Completed GeoIP database update in ${cfg.databaseDir}, with error(s)"
fi
# Hack to work around systemd journal race:
# https://github.com/systemd/systemd/issues/2913
sleep 2
exit $all_ret
'';
in
{
options = {
services.geoip-updater = {
enable = mkOption {
default = false;
type = types.bool;
description = ''
Whether to enable periodic downloading of GeoIP databases from
maxmind.com. You might want to enable this if you, for instance, use
ntopng or Wireshark.
'';
};
interval = mkOption {
type = types.str;
default = "weekly";
description = ''
Update the GeoIP databases at this time / interval.
The format is described in
<citerefentry><refentrytitle>systemd.time</refentrytitle>
<manvolnum>7</manvolnum></citerefentry>.
To prevent load spikes on maxmind.com, the timer interval is
randomized by an additional delay of ${randomizedTimerDelaySec}
seconds. Setting a shorter interval than this is not recommended.
'';
};
databaseDir = mkOption {
type = types.path;
default = "/var/lib/geoip-databases";
description = ''
Directory that will contain GeoIP databases.
'';
};
databases = mkOption {
type = types.listOf types.str;
default = [
"GeoLiteCountry/GeoIP.dat.gz"
"GeoIPv6.dat.gz"
"GeoLiteCity.dat.xz"
"GeoLiteCityv6-beta/GeoLiteCityv6.dat.gz"
"asnum/GeoIPASNum.dat.gz"
"asnum/GeoIPASNumv6.dat.gz"
"GeoLite2-Country.mmdb.gz"
"GeoLite2-City.mmdb.gz"
];
description = ''
Which GeoIP databases to update. The full URL is ${dbBaseUrl}/ +
<literal>the_database</literal>.
'';
};
};
};
config = mkIf cfg.enable {
assertions = [
{ assertion = (builtins.filter
(x: builtins.match ".*\.(gz|xz)$" x == null) cfg.databases) == [];
message = ''
services.geoip-updater.databases supports only .gz and .xz databases.
Current value:
${toString cfg.databases}
Offending element(s):
${toString (builtins.filter (x: builtins.match ".*\.(gz|xz)$" x == null) cfg.databases)};
'';
}
];
systemd.timers.geoip-updater =
{ description = "GeoIP Updater Timer";
partOf = [ "geoip-updater.service" ];
wantedBy = [ "timers.target" ];
timerConfig.OnCalendar = cfg.interval;
timerConfig.Persistent = "true";
timerConfig.RandomizedDelaySec = randomizedTimerDelaySec;
};
systemd.services.geoip-updater = {
description = "GeoIP Updater";
after = [ "network-online.target" "nss-lookup.target" ];
wants = [ "network-online.target" ];
preStart = ''
mkdir -p "${cfg.databaseDir}"
chmod 755 "${cfg.databaseDir}"
chown nobody:root "${cfg.databaseDir}"
'';
serviceConfig = {
ExecStart = "${geoip-updater}/bin/geoip-updater";
User = "nobody";
PermissionsStartOnly = true;
};
};
systemd.services.geoip-updater-setup = {
description = "GeoIP Updater Setup";
after = [ "network-online.target" "nss-lookup.target" ];
wants = [ "network-online.target" ];
wantedBy = [ "multi-user.target" ];
conflicts = [ "geoip-updater.service" ];
preStart = ''
mkdir -p "${cfg.databaseDir}"
chmod 755 "${cfg.databaseDir}"
chown nobody:root "${cfg.databaseDir}"
'';
serviceConfig = {
ExecStart = "${geoip-updater}/bin/geoip-updater --skip-existing";
User = "nobody";
PermissionsStartOnly = true;
# So it won't be (needlessly) restarted:
RemainAfterExit = true;
};
};
};
}

View File

@ -528,8 +528,8 @@ in {
if [ "${cfg.databaseHost}" = "127.0.0.1" ]; then if [ "${cfg.databaseHost}" = "127.0.0.1" ]; then
if ! test -e "${cfg.statePath}/db-created"; then if ! test -e "${cfg.statePath}/db-created"; then
psql postgres -c "CREATE ROLE gitlab WITH LOGIN NOCREATEDB NOCREATEROLE NOCREATEUSER ENCRYPTED PASSWORD '${cfg.databasePassword}'" psql postgres -c "CREATE ROLE ${cfg.databaseUsername} WITH LOGIN NOCREATEDB NOCREATEROLE NOCREATEUSER ENCRYPTED PASSWORD '${cfg.databasePassword}'"
${config.services.postgresql.package}/bin/createdb --owner gitlab gitlab || true ${config.services.postgresql.package}/bin/createdb --owner ${cfg.databaseUsername} ${cfg.databaseName} || true
touch "${cfg.statePath}/db-created" touch "${cfg.statePath}/db-created"
fi fi
fi fi

View File

@ -0,0 +1,45 @@
{ config, pkgs, lib, ... }:
with lib;
let
cfg = config.services.ssm-agent;
# The SSM agent doesn't pay attention to our /etc/os-release yet, and the lsb-release tool
# in nixpkgs doesn't seem to work properly on NixOS, so let's just fake the two fields SSM
# looks for. See https://github.com/aws/amazon-ssm-agent/issues/38 for upstream fix.
fake-lsb-release = pkgs.writeScriptBin "lsb_release" ''
#!${pkgs.stdenv.shell}
case "$1" in
-i) echo "nixos";;
-r) echo "${config.system.nixosVersion}";;
esac
'';
in {
options.services.ssm-agent = {
enable = mkEnableOption "AWS SSM agent";
package = mkOption {
type = types.path;
description = "The SSM agent package to use";
default = pkgs.ssm-agent;
};
};
config = mkIf cfg.enable {
systemd.services.ssm-agent = {
inherit (cfg.package.meta) description;
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
path = [ fake-lsb-release ];
serviceConfig = {
ExecStart = "${cfg.package.bin}/bin/agent";
KillMode = "process";
Restart = "on-failure";
RestartSec = "15min";
};
};
};
}

View File

@ -25,12 +25,12 @@ in
package = mkOption { package = mkOption {
type = types.package; type = types.package;
default = pkgs.kde4.quasselDaemon; default = pkgs.quasselDaemon_qt5;
defaultText = "pkgs.kde4.quasselDaemon"; defaultText = "pkgs.quasselDaemon_qt5";
description = '' description = ''
The package of the quassel daemon. The package of the quassel daemon.
''; '';
example = literalExample "pkgs.quasselDaemon"; example = literalExample "pkgs.quasselDaemon_qt5";
}; };
interfaces = mkOption { interfaces = mkOption {

View File

@ -18,9 +18,8 @@ in
# determines the default: later modules (if enabled) are preferred. # determines the default: later modules (if enabled) are preferred.
# E.g., if KDE is enabled, it supersedes xterm. # E.g., if KDE is enabled, it supersedes xterm.
imports = [ imports = [
./none.nix ./xterm.nix ./xfce.nix ./kde4.nix ./kde5.nix ./none.nix ./xterm.nix ./xfce.nix ./kde5.nix ./lumina.nix
./lumina.nix ./lxqt.nix ./enlightenment.nix ./gnome3.nix ./lxqt.nix ./enlightenment.nix ./gnome3.nix ./kodi.nix
./kodi.nix
]; ];
options = { options = {

View File

@ -1,199 +0,0 @@
{ config, lib, pkgs, ... }:
with lib;
let
xcfg = config.services.xserver;
cfg = xcfg.desktopManager.kde4;
xorg = pkgs.xorg;
kde_workspace = config.services.xserver.desktopManager.kde4.kdeWorkspacePackage;
# Disable Nepomuk and Strigi by default. As of KDE 4.7, they don't
# really work very well (e.g. searching files often fails to find
# files), segfault sometimes and consume significant resources.
# They can be re-enabled in the KDE System Settings under "Desktop
# Search".
disableNepomuk = pkgs.writeTextFile
{ name = "nepomuk-config";
destination = "/share/config/nepomukserverrc";
text =
''
[Basic Settings]
Start Nepomuk=false
[Service-nepomukstrigiservice]
autostart=false
'';
};
phononBackends = {
gstreamer = [
pkgs.phonon-backend-gstreamer
pkgs.gst_all.gstPluginsBase
pkgs.gst_all.gstPluginsGood
pkgs.gst_all.gstPluginsUgly
pkgs.gst_all.gstPluginsBad
pkgs.gst_all.gstFfmpeg # for mp3 playback
pkgs.gst_all.gstreamer # needed?
];
vlc = [pkgs.phonon-backend-vlc];
};
phononBackendPackages = flip concatMap cfg.phononBackends
(name: attrByPath [name] (throw "unknown phonon backend `${name}'") phononBackends);
in
{
options = {
services.xserver.desktopManager.kde4 = {
enable = mkOption {
type = types.bool;
default = false;
description = "Enable the KDE 4 desktop environment.";
};
phononBackends = mkOption {
type = types.listOf types.str;
default = ["gstreamer"];
example = ["gstreamer" "vlc"];
description = "Which phonon multimedia backend kde should use";
};
kdeWorkspacePackage = mkOption {
internal = true;
default = pkgs.kde4.kde_workspace;
defaultText = "pkgs.kde4.kde_workspace";
type = types.package;
description = "Custom kde-workspace, used for NixOS rebranding.";
};
enablePIM = mkOption {
type = types.bool;
default = true;
description = "Whether to enable PIM support. Note that enabling this pulls in Akonadi and MariaDB as dependencies.";
};
enableNepomuk = mkOption {
type = types.bool;
default = false;
description = "Whether to enable Nepomuk (deprecated).";
};
};
};
config = mkIf (xcfg.enable && cfg.enable) {
# If KDE 4 is enabled, make it the default desktop manager (unless
# overridden by the user's configuration).
# !!! doesn't work yet ("Multiple definitions. Only one is allowed
# for this option.")
# services.xserver.desktopManager.default = mkOverride 900 "kde4";
services.xserver.desktopManager.session = singleton
{ name = "kde4";
bgSupport = true;
start =
''
# The KDE icon cache is supposed to update itself
# automatically, but it uses the timestamp on the icon
# theme directory as a trigger. Since in Nix the
# timestamp is always the same, this doesn't work. So as
# a workaround, nuke the icon cache on login. This isn't
# perfect, since it may require logging out after
# installing new applications to update the cache.
# See http://lists-archives.org/kde-devel/26175-what-when-will-icon-cache-refresh.html
rm -fv $HOME/.kde/cache-*/icon-cache.kcache
# Qt writes a weird libraryPath line to
# ~/.config/Trolltech.conf that causes the KDE plugin
# paths of previous KDE invocations to be searched.
# Obviously using mismatching KDE libraries is potentially
# disastrous, so here we nuke references to the Nix store
# in Trolltech.conf. A better solution would be to stop
# Qt from doing this wackiness in the first place.
if [ -e $HOME/.config/Trolltech.conf ]; then
sed -e '/nix\\store\|nix\/store/ d' -i $HOME/.config/Trolltech.conf
fi
# Load PulseAudio module for routing support.
# See http://colin.guthr.ie/2009/10/so-how-does-the-kde-pulseaudio-support-work-anyway/
${optionalString config.hardware.pulseaudio.enable ''
${getBin config.hardware.pulseaudio.package}/bin/pactl load-module module-device-manager "do_routing=1"
''}
# Start KDE.
exec ${kde_workspace}/bin/startkde
'';
};
security.setuidOwners = singleton
{ program = "kcheckpass";
source = "${kde_workspace}/lib/kde4/libexec/kcheckpass";
owner = "root";
group = "root";
setuid = true;
};
environment.systemPackages =
[ pkgs.kde4.kdelibs
pkgs.kde4.kde_baseapps # Splitted kdebase
kde_workspace
pkgs.kde4.kde_runtime
pkgs.kde4.konsole
pkgs.kde4.kate
pkgs.kde4.kde_wallpapers # contains kdm's default background
pkgs.kde4.oxygen_icons
# Starts KDE's Polkit authentication agent.
pkgs.kde4.polkit_kde_agent
# Miscellaneous runtime dependencies.
pkgs.kde4.qt4 # needed for qdbus
pkgs.shared_mime_info
xorg.xmessage # so that startkde can show error messages
xorg.xset # used by startkde, non-essential
xorg.xauth # used by kdesu
]
++ optionals cfg.enablePIM
[ pkgs.kde4.kdepim_runtime
pkgs.kde4.akonadi
pkgs.mysql # used by akonadi
]
++ (if cfg.enableNepomuk then
[ pkgs.shared_desktop_ontologies # used by nepomuk
pkgs.strigi # used by nepomuk
pkgs.virtuoso # to enable Nepomuk to find Virtuoso
] else
[ disableNepomuk ])
++ optional config.hardware.pulseaudio.enable pkgs.kde4.kmix # Perhaps this should always be enabled
++ optional config.hardware.bluetooth.enable pkgs.kde4.bluedevil
++ optional config.networking.networkmanager.enable pkgs.kde4.plasma-nm
++ phononBackendPackages;
environment.pathsToLink = [ "/share" ];
environment.profileRelativeEnvVars = mkIf (elem "gstreamer" cfg.phononBackends) {
GST_PLUGIN_SYSTEM_PATH = [ "/lib/gstreamer-0.10" ];
};
environment.etc = singleton
{ source = "${pkgs.xkeyboard_config}/etc/X11/xkb";
target = "X11/xkb";
};
# Enable helpful DBus services.
services.udisks2.enable = true;
services.upower.enable = config.powerManagement.enable;
security.pam.services.kde = { allowNullPassword = true; };
};
}

View File

@ -50,10 +50,6 @@ in
}) })
(mkIf (xcfg.enable && cfg.enable) { (mkIf (xcfg.enable && cfg.enable) {
warnings = optional config.services.xserver.desktopManager.kde4.enable
"KDE 4 should not be enabled at the same time as KDE 5";
services.xserver.desktopManager.session = singleton { services.xserver.desktopManager.session = singleton {
name = "kde5"; name = "kde5";
bgSupport = true; bgSupport = true;

View File

@ -32,6 +32,9 @@ let
'' ''
#! ${pkgs.bash}/bin/bash #! ${pkgs.bash}/bin/bash
# Handle being called by SDDM.
if test "''${1:0:1}" = / ; then eval exec $1 $2 ; fi
${optionalString cfg.displayManager.logToJournal '' ${optionalString cfg.displayManager.logToJournal ''
if [ -z "$_DID_SYSTEMD_CAT" ]; then if [ -z "$_DID_SYSTEMD_CAT" ]; then
_DID_SYSTEMD_CAT=1 exec ${config.systemd.package}/bin/systemd-cat -t xsession -- "$0" "$@" _DID_SYSTEMD_CAT=1 exec ${config.systemd.package}/bin/systemd-cat -t xsession -- "$0" "$@"
@ -55,9 +58,6 @@ let
fi fi
''} ''}
# Handle being called by kdm.
if test "''${1:0:1}" = /; then eval exec "$1"; fi
# Start PulseAudio if enabled. # Start PulseAudio if enabled.
${optionalString (config.hardware.pulseaudio.enable) '' ${optionalString (config.hardware.pulseaudio.enable) ''
${optionalString (!config.hardware.pulseaudio.systemWide) ${optionalString (!config.hardware.pulseaudio.systemWide)

View File

@ -1,158 +0,0 @@
{ config, lib, pkgs, ... }:
with lib;
let
dmcfg = config.services.xserver.displayManager;
cfg = dmcfg.kdm;
inherit (pkgs.kde4) kdebase_workspace;
defaultConfig =
''
[Shutdown]
HaltCmd=${config.systemd.package}/sbin/shutdown -h now
RebootCmd=${config.systemd.package}/sbin/shutdown -r now
${optionalString (config.system.boot.loader.id == "grub") ''
BootManager=${if config.boot.loader.grub.version == 2 then "Grub2" else "Grub"}
''}
[X-*-Core]
Xrdb=${pkgs.xorg.xrdb}/bin/xrdb
SessionsDirs=${dmcfg.session.desktops}
Session=${dmcfg.session.script}
FailsafeClient=${pkgs.xterm}/bin/xterm
[X-:*-Core]
ServerCmd=${dmcfg.xserverBin} ${toString dmcfg.xserverArgs}
# KDM calls `rm' somewhere to clean up some temporary directory.
SystemPath=${pkgs.coreutils}/bin
# The default timeout (15) is too short in a heavily loaded boot process.
ServerTimeout=60
# Needed to prevent the X server from dying on logout and not coming back:
TerminateServer=true
${optionalString (cfg.setupScript != "")
''
Setup=${cfg.setupScript}
''}
[X-*-Greeter]
HiddenUsers=root,${concatStringsSep "," dmcfg.hiddenUsers}
PluginsLogin=${kdebase_workspace}/lib/kde4/kgreet_classic.so
${optionalString (cfg.themeDirectory != null)
''
UseTheme=true
Theme=${cfg.themeDirectory}
''
}
${optionalString (cfg.enableXDMCP)
''
[Xdmcp]
Enable=true
''}
'';
kdmrc = pkgs.runCommand "kdmrc"
{ config = defaultConfig + cfg.extraConfig;
preferLocalBuild = true;
}
''
echo "$config" > $out
# The default kdmrc would add "-nolisten tcp", and we already
# have that managed by nixos. Hence the grep.
cat ${kdebase_workspace}/share/config/kdm/kdmrc | grep -v nolisten >> $out
'';
in
{
###### interface
options = {
services.xserver.displayManager.kdm = {
enable = mkOption {
type = types.bool;
default = false;
description = ''
Whether to enable the KDE display manager.
'';
};
enableXDMCP = mkOption {
type = types.bool;
default = false;
description = ''
Whether to enable XDMCP, which allows remote logins.
'';
};
themeDirectory = mkOption {
type = types.nullOr types.str;
default = null;
description = ''
The path to a KDM theme directory. This theme
will be used by the KDM greeter.
'';
};
setupScript = mkOption {
type = types.lines;
default = "";
description = ''
The path to a KDM setup script. This script is run as root just
before KDM starts. Can be used for setting up
monitors with xrandr, for example.
'';
};
extraConfig = mkOption {
type = types.lines;
default = "";
description = ''
Options appended to <filename>kdmrc</filename>, the
configuration file of KDM.
'';
};
};
};
###### implementation
config = mkIf cfg.enable {
services.xserver.displayManager.slim.enable = false;
services.xserver.displayManager.job =
{ execCmd =
''
mkdir -m 0755 -p /var/lib/kdm
chown kdm /var/lib/kdm
${(optionalString (config.system.boot.loader.id == "grub" && config.system.build.grub != null) "PATH=${config.system.build.grub}/sbin:$PATH ") +
"KDEDIRS=/run/current-system/sw exec ${kdebase_workspace}/bin/kdm -config ${kdmrc} -nodaemon -logfile /dev/stderr"}
'';
logsXsession = true;
};
security.pam.services.kde = { allowNullPassword = true; startSession = true; };
users.extraUsers = singleton
{ name = "kdm";
uid = config.ids.uids.kdm;
description = "KDM user";
};
environment.systemPackages =
[ pkgs.kde4.kde_wallpapers ]; # contains kdm's default background
};
}

View File

@ -459,6 +459,8 @@ in
knownVideoDrivers; knownVideoDrivers;
in optional (driver != null) ({ inherit name; modules = []; driverName = name; } // driver)); in optional (driver != null) ({ inherit name; modules = []; driverName = name; } // driver));
nixpkgs.config.xorg = optionalAttrs (elem "vboxvideo" cfg.videoDrivers) { abiCompat = "1.18"; };
assertions = assertions =
[ { assertion = config.security.polkit.enable; [ { assertion = config.security.polkit.enable;
message = "X11 requires Polkit to be enabled (security.polkit.enable = true)."; message = "X11 requires Polkit to be enabled (security.polkit.enable = true).";

View File

@ -45,6 +45,9 @@ let
ln -s ${kernelPath} $out/kernel ln -s ${kernelPath} $out/kernel
ln -s ${config.system.modulesTree} $out/kernel-modules ln -s ${config.system.modulesTree} $out/kernel-modules
${optionalString (pkgs.stdenv.platform.kernelDTB or false) ''
ln -s ${config.boot.kernelPackages.kernel}/dtbs $out/dtbs
''}
echo -n "$kernelParams" > $out/kernel-params echo -n "$kernelParams" > $out/kernel-params

View File

@ -53,12 +53,14 @@ let
inherit (args) devices; inherit (args) devices;
inherit (efi) canTouchEfiVariables; inherit (efi) canTouchEfiVariables;
inherit (cfg) inherit (cfg)
version extraConfig extraPerEntryConfig extraEntries forceInstall version extraConfig extraPerEntryConfig extraEntries forceInstall useOSProber
extraEntriesBeforeNixOS extraPrepareConfig configurationLimit copyKernels extraEntriesBeforeNixOS extraPrepareConfig configurationLimit copyKernels
default fsIdentifier efiSupport efiInstallAsRemovable gfxmodeEfi gfxmodeBios; default fsIdentifier efiSupport efiInstallAsRemovable gfxmodeEfi gfxmodeBios;
path = (makeBinPath ([ path = (makeBinPath ([
pkgs.coreutils pkgs.gnused pkgs.gnugrep pkgs.findutils pkgs.diffutils pkgs.btrfs-progs pkgs.coreutils pkgs.gnused pkgs.gnugrep pkgs.findutils pkgs.diffutils pkgs.btrfs-progs
pkgs.utillinux ] ++ (if cfg.efiSupport && (cfg.version == 2) then [pkgs.efibootmgr ] else []) pkgs.utillinux ]
++ (optional (cfg.efiSupport && (cfg.version == 2)) pkgs.efibootmgr)
++ (optionals cfg.useOSProber [pkgs.busybox pkgs.os-prober])
)) + ":" + (makeSearchPathOutput "bin" "sbin" [ )) + ":" + (makeSearchPathOutput "bin" "sbin" [
pkgs.mdadm pkgs.utillinux pkgs.mdadm pkgs.utillinux
]); ]);
@ -265,6 +267,14 @@ in
''; '';
}; };
useOSProber = mkOption {
default = false;
type = types.bool;
description = ''
If set to true, append entries for other OSs detected by os-prober.
'';
};
splashImage = mkOption { splashImage = mkOption {
type = types.nullOr types.path; type = types.nullOr types.path;
example = literalExample "./my-background.png"; example = literalExample "./my-background.png";

View File

@ -256,8 +256,6 @@ else {
# grub-reboot sets a one-time saved entry, which we process here and # grub-reboot sets a one-time saved entry, which we process here and
# then delete. # then delete.
if [ \"\${next_entry}\" ]; then if [ \"\${next_entry}\" ]; then
# FIXME: KDM expects the next line to be present.
set default=\"\${saved_entry}\"
set default=\"\${next_entry}\" set default=\"\${next_entry}\"
set next_entry= set next_entry=
save_env next_entry save_env next_entry
@ -426,10 +424,17 @@ if ($extraPrepareConfig ne "") {
system((get("shell"), "-c", $extraPrepareConfig)); system((get("shell"), "-c", $extraPrepareConfig));
} }
# Atomically update the GRUB config. # write the GRUB config.
my $confFile = $grubVersion == 1 ? "$bootPath/grub/menu.lst" : "$bootPath/grub/grub.cfg"; my $confFile = $grubVersion == 1 ? "$bootPath/grub/menu.lst" : "$bootPath/grub/grub.cfg";
my $tmpFile = $confFile . ".tmp"; my $tmpFile = $confFile . ".tmp";
writeFile($tmpFile, $conf); writeFile($tmpFile, $conf);
# Append entries detected by os-prober
if (get("useOSProber") eq "true") {
system(get("shell"), "-c", "pkgdatadir=$grub/share/grub $grub/etc/grub.d/30_os-prober >> $tmpFile");
}
# Atomically switch to the new config
rename $tmpFile, $confFile or die "cannot rename $tmpFile to $confFile\n"; rename $tmpFile, $confFile or die "cannot rename $tmpFile to $confFile\n";

View File

@ -61,12 +61,13 @@ addEntry() {
local kernel=$(readlink -f $path/kernel) local kernel=$(readlink -f $path/kernel)
local initrd=$(readlink -f $path/initrd) local initrd=$(readlink -f $path/initrd)
local dtb_path=$(readlink -f $path/kernel-modules/dtbs)
if test -n "@copyKernels@"; then if test -n "@copyKernels@"; then
copyToKernelsDir $kernel; kernel=$result copyToKernelsDir $kernel; kernel=$result
copyToKernelsDir $initrd; initrd=$result copyToKernelsDir $initrd; initrd=$result
fi fi
echo $(readlink -f $path) > $outdir/$generation-system echo $(readlink -f $path) > $outdir/$generation-system
echo $(readlink -f $path/init) > $outdir/$generation-init echo $(readlink -f $path/init) > $outdir/$generation-init
cp $path/kernel-params $outdir/$generation-cmdline.txt cp $path/kernel-params $outdir/$generation-cmdline.txt
@ -80,6 +81,11 @@ addEntry() {
copyForced $kernel /boot/kernel7.img copyForced $kernel /boot/kernel7.img
fi fi
copyForced $initrd /boot/initrd copyForced $initrd /boot/initrd
for dtb in $dtb_path/bcm*.dtb; do
dst="/boot/$(basename $dtb)"
copyForced $dtb "$dst"
filesCopied[$dst]=1
done
cp "$(readlink -f "$path/init")" /boot/nixos-init cp "$(readlink -f "$path/init")" /boot/nixos-init
echo "`cat $path/kernel-params` init=$path/init" >/boot/cmdline.txt echo "`cat $path/kernel-params` init=$path/init" >/boot/cmdline.txt
@ -108,8 +114,8 @@ copyForced $fwdir/start_cd.elf /boot/start_cd.elf
copyForced $fwdir/start_db.elf /boot/start_db.elf copyForced $fwdir/start_db.elf /boot/start_db.elf
copyForced $fwdir/start_x.elf /boot/start_x.elf copyForced $fwdir/start_x.elf /boot/start_x.elf
# Remove obsolete files from /boot/old. # Remove obsolete files from /boot and /boot/old.
for fn in /boot/old/*linux* /boot/old/*initrd*; do for fn in /boot/old/*linux* /boot/old/*initrd-initrd* /boot/bcm*.dtb; do
if ! test "${filesCopied[$fn]}" = 1; then if ! test "${filesCopied[$fn]}" = 1; then
rm -vf -- "$fn" rm -vf -- "$fn"
fi fi

View File

@ -33,7 +33,7 @@ in
boot.loader.raspberryPi.version = mkOption { boot.loader.raspberryPi.version = mkOption {
default = 2; default = 2;
type = types.enum [ 1 2 ]; type = types.enum [ 1 2 3 ];
description = '' description = ''
''; '';
}; };

View File

@ -123,15 +123,6 @@ let kernel = config.boot.kernelPackages.kernel; in
users.extraUsers.root.initialHashedPassword = mkOverride 150 ""; users.extraUsers.root.initialHashedPassword = mkOverride 150 "";
services.xserver.displayManager.logToJournal = true; services.xserver.displayManager.logToJournal = true;
# Bump kdm's X server start timeout to account for heavily loaded
# VM host systems.
services.xserver.displayManager.kdm.extraConfig =
''
[X-:*-Core]
ServerTimeout=240
'';
}; };
} }

View File

@ -23,7 +23,7 @@ in
postVM = postVM =
'' ''
mkdir -p $out mkdir -p $out
${pkgs.vmTools.qemu-220}/bin/qemu-img convert -f raw -O vpc $diskImage $out/disk.vhd ${pkgs.vmTools.qemu-220}/bin/qemu-img convert -f raw -o subformat=fixed -O vpc $diskImage $out/disk.vhd
rm $diskImage rm $diskImage
''; '';
diskImageBase = "nixos-image-${config.system.nixosLabel}-${pkgs.stdenv.system}.raw"; diskImageBase = "nixos-image-${config.system.nixosLabel}-${pkgs.stdenv.system}.raw";

View File

@ -22,6 +22,10 @@ in {
}; };
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
# This service doesn't run if docker isn't running, and unlike potentially remote services like e.g., postgresql, docker has
# to be running locally so `docker.enable` will always be set if the ECS agent is enabled.
virtualisation.docker.enable = true;
systemd.services.ecs-agent = { systemd.services.ecs-agent = {
inherit (cfg.package.meta) description; inherit (cfg.package.meta) description;
after = [ "network.target" ]; after = [ "network.target" ];

View File

@ -440,7 +440,7 @@ in
${if cfg.writableStore then "/nix/.ro-store" else "/nix/store"} = ${if cfg.writableStore then "/nix/.ro-store" else "/nix/store"} =
{ device = "store"; { device = "store";
fsType = "9p"; fsType = "9p";
options = [ "trans=virtio" "version=9p2000.L" "veryloose" ]; options = [ "trans=virtio" "version=9p2000.L" "cache=loose" ];
neededForBoot = true; neededForBoot = true;
}; };
"/tmp" = mkIf config.boot.tmpOnTmpfs "/tmp" = mkIf config.boot.tmpOnTmpfs
@ -453,7 +453,7 @@ in
"/tmp/xchg" = "/tmp/xchg" =
{ device = "xchg"; { device = "xchg";
fsType = "9p"; fsType = "9p";
options = [ "trans=virtio" "version=9p2000.L" "veryloose" ]; options = [ "trans=virtio" "version=9p2000.L" "cache=loose" ];
neededForBoot = true; neededForBoot = true;
}; };
"/tmp/shared" = "/tmp/shared" =

View File

@ -72,7 +72,6 @@ in rec {
(all nixos.tests.ecryptfs) (all nixos.tests.ecryptfs)
(all nixos.tests.ipv6) (all nixos.tests.ipv6)
(all nixos.tests.i3wm) (all nixos.tests.i3wm)
(all nixos.tests.kde4)
(all nixos.tests.kde5) (all nixos.tests.kde5)
#(all nixos.tests.lightdm) #(all nixos.tests.lightdm)
(all nixos.tests.login) (all nixos.tests.login)

View File

@ -255,7 +255,6 @@ in rec {
tests.influxdb = callTest tests/influxdb.nix {}; tests.influxdb = callTest tests/influxdb.nix {};
tests.ipv6 = callTest tests/ipv6.nix {}; tests.ipv6 = callTest tests/ipv6.nix {};
tests.jenkins = callTest tests/jenkins.nix {}; tests.jenkins = callTest tests/jenkins.nix {};
tests.kde4 = callTest tests/kde4.nix {};
tests.kde5 = callTest tests/kde5.nix {}; tests.kde5 = callTest tests/kde5.nix {};
tests.keymap = callSubTests tests/keymap.nix {}; tests.keymap = callSubTests tests/keymap.nix {};
tests.initrdNetwork = callTest tests/initrd-network.nix {}; tests.initrdNetwork = callTest tests/initrd-network.nix {};
@ -284,6 +283,7 @@ in rec {
tests.leaps = callTest tests/leaps.nix { }; tests.leaps = callTest tests/leaps.nix { };
tests.nsd = callTest tests/nsd.nix {}; tests.nsd = callTest tests/nsd.nix {};
tests.openssh = callTest tests/openssh.nix {}; tests.openssh = callTest tests/openssh.nix {};
tests.pam-oath-login = callTest tests/pam-oath-login.nix {};
#tests.panamax = hydraJob (import tests/panamax.nix { system = "x86_64-linux"; }); #tests.panamax = hydraJob (import tests/panamax.nix { system = "x86_64-linux"; });
tests.peerflix = callTest tests/peerflix.nix {}; tests.peerflix = callTest tests/peerflix.nix {};
tests.postgresql = callTest tests/postgresql.nix {}; tests.postgresql = callTest tests/postgresql.nix {};

View File

@ -1,70 +0,0 @@
import ./make-test.nix ({ pkgs, ... }: {
name = "kde4";
meta = with pkgs.stdenv.lib.maintainers; {
maintainers = [ domenkozar eelco chaoflow ];
};
machine =
{ config, pkgs, ... }:
{ imports = [ ./common/user-account.nix ];
virtualisation.memorySize = 1024;
services.xserver.enable = true;
services.httpd.enable = true;
services.httpd.adminAddr = "foo@example.org";
services.httpd.documentRoot = "${pkgs.valgrind.doc}/share/doc/valgrind/html";
services.xserver.displayManager.kdm.enable = true;
services.xserver.displayManager.kdm.extraConfig =
''
[X-:0-Core]
AutoLoginEnable=true
AutoLoginUser=alice
AutoLoginPass=foobar
'';
services.xserver.desktopManager.kde4.enable = true;
# Include most of KDE. We don't really test these here, but at
# least they should build.
environment.systemPackages =
[ pkgs.kde4.kdemultimedia
pkgs.kde4.kdegraphics
pkgs.kde4.kdeutils
pkgs.kde4.kdegames
#pkgs.kde4.kdeedu
pkgs.kde4.kdeaccessibility
pkgs.kde4.kdeadmin
pkgs.kde4.kdenetwork
pkgs.kde4.kdetoys
pkgs.kde4.kdewebdev
pkgs.xorg.xmessage
];
};
testScript = ''
$machine->waitUntilSucceeds("pgrep plasma-desktop");
$machine->succeed("xauth merge ~alice/.Xauthority");
$machine->waitForWindow(qr/plasma-desktop/);
# Check that logging in has given the user ownership of devices.
$machine->succeed("getfacl /dev/snd/timer | grep -q alice");
$machine->execute("su - alice -c 'DISPLAY=:0.0 kwrite /var/log/messages &'");
$machine->waitForWindow(qr/messages.*KWrite/);
$machine->execute("su - alice -c 'DISPLAY=:0.0 konqueror http://localhost/ &'");
$machine->waitForWindow(qr/Valgrind.*Konqueror/);
$machine->execute("su - alice -c 'DISPLAY=:0.0 gwenview ${pkgs.kde4.kde_wallpapers}/share/wallpapers/Hanami/contents/images/1280x1024.jpg &'");
$machine->waitForWindow(qr/Gwenview/);
$machine->sleep(10);
$machine->screenshot("screen");
'';
})

View File

@ -0,0 +1,126 @@
import ./make-test.nix ({ pkgs, latestKernel ? false, ... }:
let
oathSnakeoilSecret = "cdd4083ef8ff1fa9178c6d46bfb1a3";
# With HOTP mode the password is calculated based on a counter of
# how many passwords have been made. In this env, we'll always be on
# the 0th counter, so the password is static.
#
# Generated in nix-shell -p oathToolkit
# via: oathtool -v -d6 -w10 cdd4083ef8ff1fa9178c6d46bfb1a3
# and picking a the first 4:
oathSnakeOilPassword1 = "143349";
oathSnakeOilPassword2 = "801753";
oathSnakeOilPassword3 = "019933";
oathSnakeOilPassword4 = "403895";
alicePassword = "foobar";
# Generated via: mkpasswd -m sha-512 and passing in "foobar"
hashedAlicePassword = "$6$MsMrE1q.1HrCgTS$Vq2e/uILzYjSN836TobAyN9xh9oi7EmCmucnZID25qgPoibkw8qTCugiAPnn4eCGvn1A.7oEBFJaaGUaJsQQY.";
in
{
name = "pam-oath-login";
machine =
{ config, pkgs, lib, ... }:
{
security.pam.oath = {
enable = true;
};
users.extraUsers.alice = {
isNormalUser = true;
name = "alice";
uid = 1000;
hashedPassword = hashedAlicePassword;
extraGroups = [ "wheel" ];
createHome = true;
home = "/home/alice";
};
systemd.services.setupOathSnakeoilFile = {
wantedBy = [ "default.target" ];
before = [ "default.target" ];
unitConfig = {
type = "oneshot";
RemainAfterExit = true;
};
script = ''
touch /etc/users.oath
chmod 600 /etc/users.oath
chown root /etc/users.oath
echo "HOTP/E/6 alice - ${oathSnakeoilSecret}" > /etc/users.oath
'';
};
};
testScript =
''
$machine->waitForUnit('multi-user.target');
$machine->waitUntilSucceeds("pgrep -f 'agetty.*tty1'");
$machine->screenshot("postboot");
subtest "Invalid password", sub {
$machine->fail("pgrep -f 'agetty.*tty2'");
$machine->sendKeys("alt-f2");
$machine->waitUntilSucceeds("[ \$(fgconsole) = 2 ]");
$machine->waitForUnit('getty@tty2.service');
$machine->waitUntilSucceeds("pgrep -f 'agetty.*tty2'");
$machine->waitUntilTTYMatches(2, "login: ");
$machine->sendChars("alice\n");
$machine->waitUntilTTYMatches(2, "login: alice");
$machine->waitUntilSucceeds("pgrep login");
$machine->waitUntilTTYMatches(2, "One-time password");
$machine->sendChars("${oathSnakeOilPassword1}\n");
$machine->waitUntilTTYMatches(2, "Password: ");
$machine->sendChars("blorg\n");
$machine->waitUntilTTYMatches(2, "Login incorrect");
};
subtest "Invalid oath token", sub {
$machine->fail("pgrep -f 'agetty.*tty3'");
$machine->sendKeys("alt-f3");
$machine->waitUntilSucceeds("[ \$(fgconsole) = 3 ]");
$machine->waitForUnit('getty@tty3.service');
$machine->waitUntilSucceeds("pgrep -f 'agetty.*tty3'");
$machine->waitUntilTTYMatches(3, "login: ");
$machine->sendChars("alice\n");
$machine->waitUntilTTYMatches(3, "login: alice");
$machine->waitUntilSucceeds("pgrep login");
$machine->waitUntilTTYMatches(3, "One-time password");
$machine->sendChars("000000\n");
$machine->waitUntilTTYMatches(3, "Login incorrect");
$machine->waitUntilTTYMatches(3, "login:");
};
subtest "Happy path (both passwords are mandatory to get us in)", sub {
$machine->fail("pgrep -f 'agetty.*tty4'");
$machine->sendKeys("alt-f4");
$machine->waitUntilSucceeds("[ \$(fgconsole) = 4 ]");
$machine->waitForUnit('getty@tty4.service');
$machine->waitUntilSucceeds("pgrep -f 'agetty.*tty4'");
$machine->waitUntilTTYMatches(4, "login: ");
$machine->sendChars("alice\n");
$machine->waitUntilTTYMatches(4, "login: alice");
$machine->waitUntilSucceeds("pgrep login");
$machine->waitUntilTTYMatches(4, "One-time password");
$machine->sendChars("${oathSnakeOilPassword2}\n");
$machine->waitUntilTTYMatches(4, "Password: ");
$machine->sendChars("${alicePassword}\n");
$machine->waitUntilSucceeds("pgrep -u alice bash");
$machine->sendChars("touch done4\n");
$machine->waitForFile("/home/alice/done4");
};
'';
})

View File

@ -8,16 +8,16 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "audacious-${version}"; name = "audacious-${version}";
version = "3.8"; version = "3.8.2";
src = fetchurl { src = fetchurl {
url = "http://distfiles.audacious-media-player.org/audacious-${version}-gtk3.tar.bz2"; url = "http://distfiles.audacious-media-player.org/audacious-${version}-gtk3.tar.bz2";
sha256 = "0rpdzf9pb52lcswxypwh4nq3qkjzliw42v39nm5rlwwxdq6bm99q"; sha256 = "1g08xprc9q0lyw3knq723j7xr7i15f8v1x1j3k5wvi8jv21bvijf";
}; };
pluginsSrc = fetchurl { pluginsSrc = fetchurl {
url = "http://distfiles.audacious-media-player.org/audacious-plugins-${version}-gtk3.tar.bz2"; url = "http://distfiles.audacious-media-player.org/audacious-plugins-${version}-gtk3.tar.bz2";
sha256 = "0j9svdqdjvj5spx1vfp0m63xh8xwk8naqsikdxfxbb68xk33rxb9"; sha256 = "1vqcxwqinlwb2l0kkrarg33sw1brjzrnq5jbhzrql6z6x95h4jbq";
}; };
nativeBuildInputs = [ nativeBuildInputs = [

View File

@ -10,23 +10,23 @@
}: }:
let let
version = "3.8.1"; version = "3.8.2";
sources = { sources = {
"audacious-${version}" = fetchurl { "audacious-${version}" = fetchurl {
url = "http://distfiles.audacious-media-player.org/audacious-${version}.tar.bz2"; url = "http://distfiles.audacious-media-player.org/audacious-${version}.tar.bz2";
sha256 = "1k9blmgqia0df18l39bd2bbcwmjfxak6bd286vcd9zzmjhqs4qdc"; sha256 = "14xyvmxdax0aj1gqcz8z23cjcavsysyh6b3lkiczkv4vrqf4gwdx";
}; };
"audacious-plugins-${version}" = fetchurl { "audacious-plugins-${version}" = fetchurl {
url = "http://distfiles.audacious-media-player.org/audacious-plugins-${version}.tar.bz2"; url = "http://distfiles.audacious-media-player.org/audacious-plugins-${version}.tar.bz2";
sha256 = "0f16ivcp8nd83r781hnw1qgbs9hi2b2v22zwv7c3sw3jq1chb70h"; sha256 = "1m7xln93zc4qvb1fi83icyd5x2r6azqlvs5nigjz8az3l2kzrknp";
}; };
}; };
in in
stdenv.mkDerivation { stdenv.mkDerivation {
inherit version; inherit version;
name = "audacious-${version}"; name = "audacious-qt5-${version}";
sourceFiles = lib.attrValues sources; sourceFiles = lib.attrValues sources;
sourceRoots = lib.attrNames sources; sourceRoots = lib.attrNames sources;

View File

@ -5,12 +5,12 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "ingen-unstable-${rev}"; name = "ingen-unstable-${rev}";
rev = "2016-10-29"; rev = "2017-01-18";
src = fetchgit { src = fetchgit {
url = "http://git.drobilla.net/cgit.cgi/ingen.git"; url = "http://git.drobilla.net/cgit.cgi/ingen.git";
rev = "fd147d0b888090bfb897505852c1f25dbdf77e18"; rev = "02ae3e9d8bf3f6a5e844706721aad8c0ac9f4340";
sha256 = "1qmg79962my82c43vyrv5sxbqci9c7gc2s9bwaaqd0fcf08xcz1z"; sha256 = "15s8nrzn68hc2s6iw0zshbz3lfnsq0mr6gflq05xm911b7xbp74k";
}; };
buildInputs = [ buildInputs = [

View File

@ -6,7 +6,9 @@ assert stdenv.system == "x86_64-linux";
let let
# Please update the stable branch! # Please update the stable branch!
version = "1.0.48.103.g15edf1ec-94"; # Latest version number can be found at:
# http://repository-origin.spotify.com/pool/non-free/s/spotify-client/
version = "1.0.49.125.g72ee7853-83";
deps = [ deps = [
alsaLib alsaLib
@ -51,7 +53,7 @@ stdenv.mkDerivation {
src = src =
fetchurl { fetchurl {
url = "http://repository-origin.spotify.com/pool/non-free/s/spotify-client/spotify-client_${version}_amd64.deb"; url = "http://repository-origin.spotify.com/pool/non-free/s/spotify-client/spotify-client_${version}_amd64.deb";
sha256 = "0rpwxgxv2ihfhlri98k4n87ynlcp569gm9q6hd8jg0vd2jgji8b3"; sha256 = "1sqi79yj503y4b7pfvr6xi0i8g7hj01hkhn0vpkc3y3jz5c0ih9g";
}; };
buildInputs = [ dpkg makeWrapper ]; buildInputs = [ dpkg makeWrapper ];

View File

@ -5,8 +5,8 @@ stdenv.mkDerivation (rec {
src = fetchgit { src = fetchgit {
url = "https://github.com/ProofGeneral/PG.git"; url = "https://github.com/ProofGeneral/PG.git";
rev = "64ca55b1593fff8cfffab89c51d7e92c1a68dc27"; rev = "4bcac92df46da9e68b5e3d565bb118fb63b4feb4";
sha256 = "1gz13fagxf0w2zgp7qd0w328qiv97295jwq7ra8vj61pdfi8xklj"; sha256 = "143anwll7mij6iskf3jbbbfzmkp2vnp0q329zpsl2l6v3wk2vv64";
}; };
buildInputs = [ emacs texinfo perl which ] ++ stdenv.lib.optional enableDoc texLive; buildInputs = [ emacs texinfo perl which ] ++ stdenv.lib.optional enableDoc texLive;

View File

@ -4,12 +4,12 @@ with stdenv.lib;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "kakoune-nightly-${version}"; name = "kakoune-nightly-${version}";
version = "2016-12-30"; version = "2017-02-09";
src = fetchFromGitHub { src = fetchFromGitHub {
repo = "kakoune"; repo = "kakoune";
owner = "mawww"; owner = "mawww";
rev = "76c58aa022a896dc170c207ff821992ee354d934"; rev = "9ba1665e58ee84b6596d89e6ef75f7c32e7c6c14";
sha256 = "0hgpcp6444cyg4bm0a9ypywjwfh19qpqpfr5w0wcd2y3clnsvsdz"; sha256 = "1l25mzq64a481qlsyh25rzp5rzajrkx4dq29677z85lnjqn30wbi";
}; };
buildInputs = [ ncurses boost asciidoc docbook_xsl libxslt ]; buildInputs = [ ncurses boost asciidoc docbook_xsl libxslt ];

View File

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, ncurses, texinfo, tetex, perl, ghostscript }: { stdenv, fetchFromGitHub, ncurses, texinfo, texlive, perl, ghostscript }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
rev = version; rev = version;
sha256 = "05inzhlqlf4ka22q78q389pr34bsb4lgp1i5qh550vjkb2cvbdfp"; sha256 = "05inzhlqlf4ka22q78q389pr34bsb4lgp1i5qh550vjkb2cvbdfp";
}; };
buildInputs = [ ncurses tetex texinfo perl ghostscript ]; buildInputs = [ ncurses texlive.combined.scheme-medium texinfo perl ghostscript ];
dontBuild = true; dontBuild = true;
installPhase = '' installPhase = ''
substituteInPlace src/makefile --replace "CC=c99" "cc=gcc" substituteInPlace src/makefile --replace "CC=c99" "cc=gcc"
@ -20,14 +20,15 @@ stdenv.mkDerivation rec {
cd src && make && cd .. cd src && make && cd ..
make PREFIX=$out install make PREFIX=$out install
''; '';
meta = { meta = {
description = "The nice editor"; description = "The nice editor";
homepage = https://github.com/vigna/ne; homepage = https://github.com/vigna/ne;
longDescription = '' longDescription = ''
ne is a free (GPL'd) text editor based on the POSIX standard that runs (we hope) on almost any ne is a free (GPL'd) text editor based on the POSIX standard that runs
UN*X machine. ne is easy to use for the beginner, but powerful and fully configurable for the wizard, (we hope) on almost any UN*X machine. ne is easy to use for the beginner,
and most sparing in its resource usage. See the manual for some highlights of ne's features. but powerful and fully configurable for the wizard, and most sparing in its
resource usage. See the manual for some highlights of ne's features.
''; '';
license = stdenv.lib.licenses.gpl3; license = stdenv.lib.licenses.gpl3;
platforms = stdenv.lib.platforms.unix; platforms = stdenv.lib.platforms.unix;

View File

@ -11,11 +11,11 @@
with lib; with lib;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "blender-2.78a"; name = "blender-2.78b";
src = fetchurl { src = fetchurl {
url = "http://download.blender.org/source/${name}.tar.gz"; url = "http://download.blender.org/source/${name}.tar.gz";
sha256 = "1byf1klrvm8fdw2libx7wldz2i6lblp9nih6y58ydh00paqi8jh1"; sha256 = "0wgrqwznih6c19y2fpvrk3k6qsaxsy3g7xja87rb4hq7r7j8x22d";
}; };
buildInputs = buildInputs =

View File

@ -1,49 +1,97 @@
{ {
stdenv, stdenv,
cmake, cmake, doxygen, pkgconfig, autoreconfHook,
curl, curl,
fetchgit, fetchgit,
grantlee, grantlee,
libdivecomputer,
libgit2, libgit2,
libmarble-ssrf, libusb,
libssh2, libssh2,
libxml2, libxml2,
libxslt, libxslt,
libzip, libzip,
pkgconfig, qtbase, qtconnectivity, qtquickcontrols, qtscript, qtsvg, qttools, qtwebkit,
qtbase,
qtconnectivity,
qttools,
qtwebkit,
sqlite sqlite
}: }:
stdenv.mkDerivation rec { let
version = "4.5.97"; version = "4.6.0";
libmarble = stdenv.mkDerivation rec {
name = "libmarble-ssrf-${version}";
src = fetchgit {
url = "git://git.subsurface-divelog.org/marble";
rev = "refs/tags/v${version}";
sha256 = "1dm2hdk6y36ls7pxbzkqmyc46hdy2cd5f6pkxa6nfrbhvk5f31zd";
};
buildInputs = [ qtbase qtquickcontrols qtscript qtwebkit ];
nativeBuildInputs = [ doxygen pkgconfig cmake ];
enableParallelBuilding = true;
cmakeFlags = [
"-DQTONLY=TRUE"
"-DQT5BUILD=ON"
"-DBUILD_MARBLE_TESTS=NO"
"-DWITH_DESIGNER_PLUGIN=NO"
"-DBUILD_MARBLE_APPS=NO"
];
meta = with stdenv.lib; {
description = "Qt library for a slippy map with patches from the Subsurface project";
homepage = http://subsurface-divelog.org;
license = licenses.lgpl21;
maintainers = with maintainers; [ mguentner ];
platforms = platforms.all;
};
};
libdc = stdenv.mkDerivation rec {
name = "libdivecomputer-ssrf-${version}";
src = fetchgit {
url = "git://subsurface-divelog.org/libdc";
rev = "refs/tags/v${version}";
sha256 = "0s82c8bvqph9c9chwzd76iwrw968w7lgjm3pj4hmad1jim67bs6n";
};
nativeBuildInputs = [ autoreconfHook ];
enableParallelBuilding = true;
meta = with stdenv.lib; {
homepage = http://www.libdivecomputer.org;
description = "A cross-platform and open source library for communication with dive computers from various manufacturers";
maintainers = with maintainers; [ mguentner ];
license = licenses.lgpl21;
platforms = platforms.all;
};
};
in stdenv.mkDerivation rec {
name = "subsurface-${version}"; name = "subsurface-${version}";
src = fetchgit { src = fetchgit {
sha256 = "035ywhicadmr9sh7zhfxsvpchwa9sywccacbspfam39n2hpyqnmm"; url = "git://git.subsurface-divelog.org/subsurface";
url = "git://git.subsurface-divelog.org/subsurface"; rev = "refs/tags/v${version}";
rev = "72bcb6481f3b935444d7868a74599dda133f9b43"; sha256 = "1rk5n52p6cnyjrgi7ybhmvh7y31zxrjny0mqpnc1wql69f90h94c";
branchName = "master";
}; };
buildInputs = [ qtbase libdivecomputer libmarble-ssrf libxslt buildInputs = [
libzip libxml2 grantlee qtwebkit qttools libdc libmarble
qtconnectivity libgit2 libssh2 curl ]; curl grantlee libgit2 libssh2 libusb libxml2 libxslt libzip
nativeBuildInputs = [ pkgconfig cmake ]; qtbase qtconnectivity qtsvg qttools qtwebkit
];
nativeBuildInputs = [ cmake pkgconfig ];
#enableParallelBuilding = true; # fatal error: ui_mainwindow.h: No such file or directory enableParallelBuilding = true;
# hack incoming... cmakeFlags = [
preConfigure = '' "-DMARBLE_LIBRARIES=${libmarble}/lib/libssrfmarblewidget.so"
marble_libs=$(echo $(echo $CMAKE_LIBRARY_PATH | grep -o "/nix/store/[[:alnum:]]*-libmarble-ssrf-[a-zA-Z0-9\-]*/lib")/libssrfmarblewidget.so) "-DNO_PRINTING=OFF"
cmakeFlags="$cmakeFlags -DCMAKE_BUILD_TYPE=Debug \ ];
-DMARBLE_LIBRARIES=$marble_libs \
-DNO_PRINTING=OFF"
'';
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "Subsurface is an open source divelog program that runs on Windows, Mac and Linux"; description = "Subsurface is an open source divelog program that runs on Windows, Mac and Linux";
@ -55,8 +103,7 @@ stdenv.mkDerivation rec {
''; '';
homepage = https://subsurface-divelog.org; homepage = https://subsurface-divelog.org;
license = licenses.gpl2; license = licenses.gpl2;
maintainers = [ maintainers.mguentner ]; maintainers = with maintainers; [ mguentner ];
platforms = platforms.all; platforms = platforms.all;
}; };
} }

View File

@ -0,0 +1,20 @@
{pkgs, stdenv, xorg, fetchurl }:
stdenv.mkDerivation rec {
name = "worker";
version = "3.8.5";
src = fetchurl {
url = "http://www.boomerangsworld.de/cms/worker/downloads/${name}-${version}.tar.gz";
sha256 = "1xy02jdf60wg2jycinl6682xg4zvphdj80f8xgs26ip45iqgkmvw";
};
buildInputs = with pkgs; [ xorg.libX11 ];
meta = with stdenv.lib; {
description = "a two-pane file manager with advanced file manipulation features";
homepage = "http://www.boomerangsworld.de/cms/worker/index.html";
license = licenses.gpl2;
maintainers = [ maintainers.ndowens ];
};
}

View File

@ -1,22 +1,38 @@
{ stdenv, fetchzip, makeWrapper, jre, pythonPackages { stdenv, fetchzip, makeWrapper, jre, pythonPackages
, mesosSupport ? true, mesos , mesosSupport ? true, mesos
, version
}: }:
let
versionMap = {
"1.6.0" = {
hadoopVersion = "cdh4";
sparkSha256 = "19ycx1r8g82vkvzmn9wxkssmv2damrg72yfmrgzpc6xyh071g91c";
};
"2.1.0" = {
hadoopVersion = "hadoop2.4";
sparkSha256 = "0pbsmbjwijsfgbnm56kgwnmnlqkz3w010ma0d7vzlkdklj40vqn2";
};
};
in
with versionMap.${version};
with stdenv.lib; with stdenv.lib;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "spark-${version}";
version = "1.6.0"; name = "spark-${version}";
src = fetchzip { src = fetchzip {
url = "mirror://apache/spark/${name}/${name}-bin-cdh4.tgz"; url = "mirror://apache/spark/${name}/${name}-bin-${hadoopVersion}.tgz";
sha256 = "19ycx1r8g82vkvzmn9wxkssmv2damrg72yfmrgzpc6xyh071g91c"; sha256 = sparkSha256;
}; };
buildInputs = [ makeWrapper jre pythonPackages.python pythonPackages.numpy ] buildInputs = [ makeWrapper jre pythonPackages.python pythonPackages.numpy ]
++ optional mesosSupport mesos; ++ optional mesosSupport mesos;
untarDir = "${name}-bin-cdh4"; untarDir = "${name}-bin-${hadoopVersion}";
installPhase = '' installPhase = ''
mkdir -p $out/{lib/${untarDir}/conf,bin,/share/java} mkdir -p $out/{lib/${untarDir}/conf,bin,/share/java}
mv * $out/lib/${untarDir} mv * $out/lib/${untarDir}

View File

@ -0,0 +1,31 @@
{ stdenv, fetchFromGitHub, buildGoPackage }:
buildGoPackage rec {
name = "${pname}-${version}";
pname = "amazon-ssm-agent";
version = "2.0.633.0";
goPackagePath = "github.com/aws/${pname}";
subPackages = [ "agent" ];
src = fetchFromGitHub {
rev = "v${version}";
owner = "aws";
repo = pname;
sha256 = "10arshfn2k3m3zzgw8b3xc6ywd0ss73746nq5srh2jir7mjzi4xv";
};
preBuild = ''
mv go/src/${goPackagePath}/vendor strange-vendor
mv strange-vendor/src go/src/${goPackagePath}/vendor
'';
meta = with stdenv.lib; {
description = "Agent to enable remote management of your Amazon EC2 instance configuration";
homepage = "https://github.com/aws/amazon-ssm-agent";
license = licenses.asl20;
platforms = platforms.linux;
maintainers = with maintainers; [ copumpkin ];
};
}

View File

@ -0,0 +1,31 @@
{ stdenv, lib, fetchFromGitHub, wrapPython }:
with lib;
stdenv.mkDerivation rec {
name = "droopy-${version}";
version = "20160830";
src = fetchFromGitHub {
owner = "stackp";
repo = "Droopy";
rev = "7a9c7bc46c4ff8b743755be86a9b29bd1a8ba1d9";
sha256 = "03i1arwyj9qpfyyvccl21lbpz3rnnp1hsadvc0b23nh1z2ng9sff";
};
nativeBuildInputs = [ wrapPython ];
installPhase = ''
install -vD droopy $out/bin/droopy
install -vD -m 644 man/droopy.1 $out/share/man/man1/droopy.1
wrapPythonPrograms
'';
meta = {
description = "Mini Web server that let others upload files to your computer";
homepage = http://stackp.online.fr/droopy;
license = licenses.bsd3;
maintainers = maintainers.profpatsch;
};
}

View File

@ -2,7 +2,7 @@
, ldns, pythonPackages , ldns, pythonPackages
# Test requirements # Test requirements
, xvfb_run, dnsutils , xvfb_run
, enableJingle ? true, farstream ? null, gst_plugins_bad ? null , enableJingle ? true, farstream ? null, gst_plugins_bad ? null
, libnice ? null , libnice ? null
@ -63,9 +63,8 @@ stdenv.mkDerivation rec {
}$GST_PLUGIN_PATH"'" }$GST_PLUGIN_PATH"'"
}' scripts/gajim.in }' scripts/gajim.in
sed -i -e 's/return helpers.is_in_path('"'"'drill.*/return True/' \ # requires network access
src/features_window.py echo "" > test/integration/test_resolver.py
sed -i -e "s|'drill'|'${ldns}/bin/drill'|" src/common/resolver.py
# We want to run tests in installCheckPhase rather than checkPhase to test # We want to run tests in installCheckPhase rather than checkPhase to test
# whether the *installed* version of Gajim works rather than just whether it # whether the *installed* version of Gajim works rather than just whether it
@ -83,19 +82,20 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ nativeBuildInputs = [
autoreconfHook pythonPackages.wrapPython intltool pkgconfig autoreconfHook pythonPackages.wrapPython intltool pkgconfig
# Test dependencies # Test dependencies
xvfb_run dnsutils xvfb_run
]; ];
autoreconfPhase = '' autoreconfPhase = ''
sed -e 's/which/type -P/;s,\./configure,:,' autogen.sh | bash sed -e 's/which/type -P/;s,\./configure,:,' autogen.sh | bash
''; '';
propagatedBuildInputs = [ propagatedBuildInputs = with pythonPackages; [
pythonPackages.pygobject2 pythonPackages.pyGtkGlade libasyncns
pythonPackages.pyasn1 pygobject2 pyGtkGlade
pythonPackages.pyxdg pyasn1
pythonPackages.nbxmpp pyxdg
pythonPackages.pyopenssl pythonPackages.dbus-python nbxmpp
pyopenssl dbus-python
] ++ optional enableE2E pythonPackages.pycrypto ] ++ optional enableE2E pythonPackages.pycrypto
++ optional enableRST pythonPackages.docutils ++ optional enableRST pythonPackages.docutils
++ optional enableNotifications pythonPackages.notify ++ optional enableNotifications pythonPackages.notify

View File

@ -2,15 +2,15 @@
buildGoPackage rec { buildGoPackage rec {
name = "ipfs-${version}"; name = "ipfs-${version}";
version = "0.4.4"; version = "0.4.5";
rev = "d905d485192616abaea25f7e721062a9e1093ab9"; rev = "2cb68b2210ba883bcd38a429ed62b7f832f8c064";
goPackagePath = "github.com/ipfs/go-ipfs"; goPackagePath = "github.com/ipfs/go-ipfs";
extraSrcPaths = [ extraSrcPaths = [
(fetchgx { (fetchgx {
inherit name src; inherit name src;
sha256 = "0mm1rs2mbs3rmxfcji5yal9ai3v1w75kk05bfyhgzmcjvi6lwpyb"; sha256 = "0lq4najagdcga0zfprccprjy94nq46ja2gajij2pycag0wcc538d";
}) })
]; ];
@ -18,7 +18,7 @@ buildGoPackage rec {
owner = "ipfs"; owner = "ipfs";
repo = "go-ipfs"; repo = "go-ipfs";
inherit rev; inherit rev;
sha256 = "06iq7fmq7p0854aqrnmd0f0jvnxy9958wvw7ibn754fdfii9l84l"; sha256 = "087478rdj9cfl8hfrhrbb8rdlh7b1ixdj127vvkgn2k3mlz6af47";
}; };
meta = with stdenv.lib; { meta = with stdenv.lib; {

View File

@ -5,11 +5,11 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "skrooge-${version}"; name = "skrooge-${version}";
version = "2.6.0"; version = "2.7.0";
src = fetchurl { src = fetchurl {
url = "http://download.kde.org/stable/skrooge/${name}.tar.xz"; url = "http://download.kde.org/stable/skrooge/${name}.tar.xz";
sha256 = "13sd669rx66fpk9pm72nr2y69k2h4mcs4b904i9xm41i0fiy6szp"; sha256 = "1xrh9nal122rzlv4m0x8qah6zpqb6891al3351piarpk2xgjgj4x";
}; };
nativeBuildInputs = [ cmake ecm makeQtWrapper ]; nativeBuildInputs = [ cmake ecm makeQtWrapper ];

View File

@ -0,0 +1,49 @@
{ stdenv, fetchurl, jre, makeWrapper }:
let
version = "1.12.15";
jarName = "bfg-${version}.jar";
mavenUrl = "http://central.maven.org/maven2/com/madgag/bfg/${version}/${jarName}";
in
stdenv.mkDerivation {
inherit version jarName;
name = "bfg-repo-cleaner";
src = fetchurl {
url = mavenUrl;
sha256 = "17dh25jambkk55khknlhy8wa9s1i1xmh9hdgj72j1lzyl0ag42ik";
};
buildInputs = [ jre makeWrapper ];
phases = "installPhase";
installPhase = ''
mkdir -p $out/share/java
mkdir -p $out/bin
cp $src $out/share/java/$jarName
makeWrapper "${jre}/bin/java" $out/bin/bfg --add-flags "-cp $out/share/java/$jarName com.madgag.git.bfg.cli.Main"
'';
meta = with stdenv.lib; {
homepage = "https://rtyley.github.io/bfg-repo-cleaner/";
# Descriptions taken with minor modification from the homepage of bfg-repo-cleaner
description = "Removes large or troublesome blobs in a git repository like git-filter-branch does, but faster";
longDescription = ''
The BFG is a simpler, faster alternative to git-filter-branch for
cleansing bad data out of your Git repository history, in particular removing
crazy big files and removing passwords, credentials, and other private data.
The git-filter-branch command is enormously powerful and can do things
that the BFG can't - but the BFG is much better for the tasks above, because
it's faster (10-720x), simpler (dedicated to just removing things), and
beautiful (can use Scala instead of bash to script customizations).
'';
license = licenses.gpl3;
maintainers = [ maintainers.changlinli ];
platforms = platforms.unix;
downloadPage = "https://mvnrepository.com/artifact/com.madgag/bfg/${version}";
};
}

View File

@ -22,6 +22,8 @@ in
rec { rec {
# Try to keep this generally alphabetized # Try to keep this generally alphabetized
bfg-repo-cleaner = callPackage ./bfg-repo-cleaner { };
bitbucket-server-cli = callPackage ./bitbucket-server-cli { }; bitbucket-server-cli = callPackage ./bitbucket-server-cli { };
darcsToGit = callPackage ./darcs-to-git { }; darcsToGit = callPackage ./darcs-to-git { };

View File

@ -1,11 +1,11 @@
{ stdenv, fetchurl, qmakeHook, qtscript }: { stdenv, fetchurl, qmakeHook, qtscript }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "smplayer-17.1.0"; name = "smplayer-17.2.0";
src = fetchurl { src = fetchurl {
url = "mirror://sourceforge/smplayer/${name}.tar.bz2"; url = "mirror://sourceforge/smplayer/${name}.tar.bz2";
sha256 = "0wgw940gxf3gqh6xzxvz037ipvr1xcw86gf0myvpb4lkwqh5jds0"; sha256 = "05nqwpyh3zlyzip7chs711sz97cgijb92h44cd5aqbwbx06hihdd";
}; };
buildInputs = [ qtscript ]; buildInputs = [ qtscript ];

View File

@ -1,12 +1,12 @@
{ stdenv, fetchurl, qmakeHook, qtscript, qtwebkit }: { stdenv, fetchurl, qmakeHook, qtscript, qtwebkit }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
version = "16.7.2"; version = "17.1.0";
name = "smtube-${version}"; name = "smtube-${version}";
src = fetchurl { src = fetchurl {
url = "mirror://sourceforge/smtube/SMTube/${version}/${name}.tar.bz2"; url = "mirror://sourceforge/smtube/SMTube/${version}/${name}.tar.bz2";
sha256 = "0k64hc6grn4nlp739b0w5fznh0k9xx9qdwx6s7w3fb5m5pfkdrmm"; sha256 = "1kg45qkr7nvchy9ih24vlbpkn6vd8v8qw5xqsjhjpjkizcmzaa61";
}; };
makeFlags = [ makeFlags = [

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, pkgconfig, intltool, file, desktop_file_utils, { stdenv, fetchurl, fetchpatch, pkgconfig, intltool, file, desktop_file_utils,
enchant, gnome3, gst_all_1, hicolor_icon_theme, libsigcxx, libxmlxx, enchant, gnome3, gst_all_1, hicolor_icon_theme, libsigcxx, libxmlxx,
xdg_utils, isocodes, wrapGAppsHook xdg_utils, isocodes, wrapGAppsHook
}: }:
@ -16,6 +16,13 @@ stdenv.mkDerivation rec {
sha256 = "087rxignjawby4z3lwnh9m6pcjphl3a0jf7gfp83h92mzcq79b4g"; sha256 = "087rxignjawby4z3lwnh9m6pcjphl3a0jf7gfp83h92mzcq79b4g";
}; };
patches = [
(fetchpatch {
url = "https://sources.debian.net/data/main/s/subtitleeditor/0.53.0-2/debian/patches/03-fix-build-gstreamermm-1.8.0.patch";
sha256 = "0di2i34id5dqnd3glibhifair1kdfnv8ay3k64lirad726ardw2c";
})
];
nativeBuildInputs = [ nativeBuildInputs = [
pkgconfig pkgconfig
intltool intltool

View File

@ -4,7 +4,14 @@
let let
version = virtualbox.version; version = virtualbox.version;
xserverVListFunc = builtins.elemAt (stdenv.lib.splitString "." xorg.xorgserver.version); xserverVListFunc = builtins.elemAt (stdenv.lib.splitString "." xorg.xorgserver.version);
xserverABI = xserverVListFunc 0 + xserverVListFunc 1;
# Forced to 1.18 in <nixpkgs/nixos/modules/services/x11/xserver.nix>
# as it even fails to build otherwise. Still, override this even here,
# in case someone does just a standalone build
# (not via videoDrivers = ["vboxvideo"]).
# It's likely to work again in some future update.
xserverABI = let abi = xserverVListFunc 0 + xserverVListFunc 1;
in if abi == "119" then "118" else abi;
in in
stdenv.mkDerivation { stdenv.mkDerivation {

View File

@ -130,7 +130,7 @@ rec {
echo "mounting Nix store..." echo "mounting Nix store..."
mkdir -p /fs${storeDir} mkdir -p /fs${storeDir}
mount -t 9p store /fs${storeDir} -o trans=virtio,version=9p2000.L,veryloose mount -t 9p store /fs${storeDir} -o trans=virtio,version=9p2000.L,cache=loose
mkdir -p /fs/tmp /fs/run /fs/var mkdir -p /fs/tmp /fs/run /fs/var
mount -t tmpfs -o "mode=1777" none /fs/tmp mount -t tmpfs -o "mode=1777" none /fs/tmp
@ -139,7 +139,7 @@ rec {
echo "mounting host's temporary directory..." echo "mounting host's temporary directory..."
mkdir -p /fs/tmp/xchg mkdir -p /fs/tmp/xchg
mount -t 9p xchg /fs/tmp/xchg -o trans=virtio,version=9p2000.L,veryloose mount -t 9p xchg /fs/tmp/xchg -o trans=virtio,version=9p2000.L,cache=loose
mkdir -p /fs/proc mkdir -p /fs/proc
mount -t proc none /fs/proc mount -t proc none /fs/proc

View File

@ -1,4 +1,4 @@
{ lib, stdenv, fetchurl, patchelf, perl, ncurses, expat, python26, python27, zlib { lib, stdenv, fetchurl, patchelf, perl, ncurses, expat, python27, zlib
, xorg, gtk2, glib, fontconfig, freetype, unixODBC, alsaLib, glibc , xorg, gtk2, glib, fontconfig, freetype, unixODBC, alsaLib, glibc
}: }:
@ -85,13 +85,6 @@ let
in { in {
cudatoolkit5 = common {
version = "5.5.22";
url = http://developer.download.nvidia.com/compute/cuda/5_5/rel/installers/cuda_5.5.22_linux_64.run;
sha256 = "b997e1dbe95704e0e806e0cedc5fd370a385351fef565c7bae0917baf3a29aa4";
python = python26;
};
cudatoolkit6 = common { cudatoolkit6 = common {
version = "6.0.37"; version = "6.0.37";
url = http://developer.download.nvidia.com/compute/cuda/6_0/rel/installers/cuda_6.0.37_linux_64.run; url = http://developer.download.nvidia.com/compute/cuda/6_0/rel/installers/cuda_6.0.37_linux_64.run;

View File

@ -46,7 +46,7 @@ stdenv.mkDerivation {
meta = { meta = {
description = "A c, c++, objective-c, and objective-c++ frontend for the llvm compiler"; description = "A c, c++, objective-c, and objective-c++ frontend for the llvm compiler";
homepage = http://llvm.org/; homepage = http://llvm.org/;
license = stdenv.lib.licenses.bsd3; license = stdenv.lib.licenses.ncsa;
platforms = stdenv.lib.platforms.all; platforms = stdenv.lib.platforms.all;
}; };
} }

View File

@ -23,7 +23,7 @@ stdenv.mkDerivation {
meta = { meta = {
description = "A set of modular code for creating linker tools"; description = "A set of modular code for creating linker tools";
homepage = http://llvm.org/; homepage = http://llvm.org/;
license = stdenv.lib.licenses.bsd3; license = stdenv.lib.licenses.ncsa;
platforms = stdenv.lib.platforms.all; platforms = stdenv.lib.platforms.all;
}; };
} }

View File

@ -37,7 +37,7 @@ stdenv.mkDerivation {
meta = { meta = {
description = "A next-generation high-performance debugger"; description = "A next-generation high-performance debugger";
homepage = http://llvm.org/; homepage = http://llvm.org/;
license = stdenv.lib.licenses.bsd3; license = stdenv.lib.licenses.ncsa;
platforms = stdenv.lib.platforms.all; platforms = stdenv.lib.platforms.all;
}; };
} }

View File

@ -67,7 +67,7 @@ in stdenv.mkDerivation rec {
meta = { meta = {
description = "Collection of modular and reusable compiler and toolchain technologies"; description = "Collection of modular and reusable compiler and toolchain technologies";
homepage = http://llvm.org/; homepage = http://llvm.org/;
license = stdenv.lib.licenses.bsd3; license = stdenv.lib.licenses.ncsa;
maintainers = with stdenv.lib.maintainers; [ lovek323 raskin viric ]; maintainers = with stdenv.lib.maintainers; [ lovek323 raskin viric ];
platforms = stdenv.lib.platforms.all; platforms = stdenv.lib.platforms.all;
}; };

View File

@ -19,7 +19,7 @@ stdenv.mkDerivation {
meta = { meta = {
description = "A polyhedral optimizer for llvm"; description = "A polyhedral optimizer for llvm";
homepage = http://llvm.org/; homepage = http://llvm.org/;
license = stdenv.lib.licenses.bsd3; license = stdenv.lib.licenses.ncsa;
platforms = stdenv.lib.platforms.all; platforms = stdenv.lib.platforms.all;
}; };
} }

View File

@ -47,7 +47,7 @@ in stdenv.mkDerivation {
meta = { meta = {
description = "A c, c++, objective-c, and objective-c++ frontend for the llvm compiler"; description = "A c, c++, objective-c, and objective-c++ frontend for the llvm compiler";
homepage = http://llvm.org/; homepage = http://llvm.org/;
license = stdenv.lib.licenses.bsd3; license = stdenv.lib.licenses.ncsa;
platforms = stdenv.lib.platforms.all; platforms = stdenv.lib.platforms.all;
}; };
} }

View File

@ -40,7 +40,7 @@ stdenv.mkDerivation rec {
meta = { meta = {
homepage = http://libcxx.llvm.org/; homepage = http://libcxx.llvm.org/;
description = "A new implementation of the C++ standard library, targeting C++11"; description = "A new implementation of the C++ standard library, targeting C++11";
license = "BSD"; license = with stdenv.lib.licenses; [ ncsa mit ];
platforms = stdenv.lib.platforms.unix; platforms = stdenv.lib.platforms.unix;
}; };
} }

View File

@ -52,7 +52,7 @@ in stdenv.mkDerivation {
meta = { meta = {
homepage = http://libcxxabi.llvm.org/; homepage = http://libcxxabi.llvm.org/;
description = "A new implementation of low level support for a standard C++ library"; description = "A new implementation of low level support for a standard C++ library";
license = "BSD"; license = with stdenv.lib.licenses; [ ncsa mit ];
maintainers = with stdenv.lib.maintainers; [ vlstill ]; maintainers = with stdenv.lib.maintainers; [ vlstill ];
platforms = stdenv.lib.platforms.unix; platforms = stdenv.lib.platforms.unix;
}; };

View File

@ -23,7 +23,7 @@ stdenv.mkDerivation {
meta = { meta = {
description = "A set of modular code for creating linker tools"; description = "A set of modular code for creating linker tools";
homepage = http://llvm.org/; homepage = http://llvm.org/;
license = stdenv.lib.licenses.bsd3; license = stdenv.lib.licenses.ncsa;
platforms = stdenv.lib.platforms.all; platforms = stdenv.lib.platforms.all;
}; };
} }

View File

@ -37,7 +37,7 @@ stdenv.mkDerivation {
meta = { meta = {
description = "A next-generation high-performance debugger"; description = "A next-generation high-performance debugger";
homepage = http://llvm.org/; homepage = http://llvm.org/;
license = stdenv.lib.licenses.bsd3; license = stdenv.lib.licenses.ncsa;
platforms = stdenv.lib.platforms.all; platforms = stdenv.lib.platforms.all;
broken = true; broken = true;
}; };

View File

@ -72,7 +72,7 @@ in stdenv.mkDerivation rec {
meta = { meta = {
description = "Collection of modular and reusable compiler and toolchain technologies"; description = "Collection of modular and reusable compiler and toolchain technologies";
homepage = http://llvm.org/; homepage = http://llvm.org/;
license = stdenv.lib.licenses.bsd3; license = stdenv.lib.licenses.ncsa;
maintainers = with stdenv.lib.maintainers; [ lovek323 raskin viric ]; maintainers = with stdenv.lib.maintainers; [ lovek323 raskin viric ];
platforms = stdenv.lib.platforms.all; platforms = stdenv.lib.platforms.all;
}; };

View File

@ -19,7 +19,7 @@ stdenv.mkDerivation {
meta = { meta = {
description = "A polyhedral optimizer for llvm"; description = "A polyhedral optimizer for llvm";
homepage = http://llvm.org/; homepage = http://llvm.org/;
license = stdenv.lib.licenses.bsd3; license = stdenv.lib.licenses.ncsa;
platforms = stdenv.lib.platforms.all; platforms = stdenv.lib.platforms.all;
}; };
} }

View File

@ -49,7 +49,7 @@ let
meta = { meta = {
description = "A c, c++, objective-c, and objective-c++ frontend for the llvm compiler"; description = "A c, c++, objective-c, and objective-c++ frontend for the llvm compiler";
homepage = http://llvm.org/; homepage = http://llvm.org/;
license = stdenv.lib.licenses.bsd3; license = stdenv.lib.licenses.ncsa;
platforms = stdenv.lib.platforms.all; platforms = stdenv.lib.platforms.all;
}; };
}; };

View File

@ -36,7 +36,7 @@ stdenv.mkDerivation rec {
meta = { meta = {
homepage = http://libcxx.llvm.org/; homepage = http://libcxx.llvm.org/;
description = "A new implementation of the C++ standard library, targeting C++11"; description = "A new implementation of the C++ standard library, targeting C++11";
license = "BSD"; license = with stdenv.lib.licenses; [ ncsa mit ];
platforms = stdenv.lib.platforms.unix; platforms = stdenv.lib.platforms.unix;
}; };
} }

View File

@ -40,7 +40,7 @@ stdenv.mkDerivation {
meta = { meta = {
homepage = http://libcxxabi.llvm.org/; homepage = http://libcxxabi.llvm.org/;
description = "A new implementation of low level support for a standard C++ library"; description = "A new implementation of low level support for a standard C++ library";
license = "BSD"; license = with stdenv.lib.licenses; [ ncsa mit ];
maintainers = with stdenv.lib.maintainers; [ vlstill ]; maintainers = with stdenv.lib.maintainers; [ vlstill ];
platforms = stdenv.lib.platforms.unix; platforms = stdenv.lib.platforms.unix;
}; };

View File

@ -43,7 +43,7 @@ stdenv.mkDerivation {
meta = { meta = {
description = "A next-generation high-performance debugger"; description = "A next-generation high-performance debugger";
homepage = http://llvm.org/; homepage = http://llvm.org/;
license = stdenv.lib.licenses.bsd3; license = stdenv.lib.licenses.ncsa;
platforms = stdenv.lib.platforms.all; platforms = stdenv.lib.platforms.all;
}; };
} }

View File

@ -83,7 +83,7 @@ in stdenv.mkDerivation rec {
meta = { meta = {
description = "Collection of modular and reusable compiler and toolchain technologies"; description = "Collection of modular and reusable compiler and toolchain technologies";
homepage = http://llvm.org/; homepage = http://llvm.org/;
license = stdenv.lib.licenses.bsd3; license = stdenv.lib.licenses.ncsa;
maintainers = with stdenv.lib.maintainers; [ lovek323 raskin viric ]; maintainers = with stdenv.lib.maintainers; [ lovek323 raskin viric ];
platforms = stdenv.lib.platforms.all; platforms = stdenv.lib.platforms.all;
}; };

View File

@ -60,7 +60,7 @@ let
meta = { meta = {
description = "A c, c++, objective-c, and objective-c++ frontend for the llvm compiler"; description = "A c, c++, objective-c, and objective-c++ frontend for the llvm compiler";
homepage = http://llvm.org/; homepage = http://llvm.org/;
license = stdenv.lib.licenses.bsd3; license = stdenv.lib.licenses.ncsa;
platforms = stdenv.lib.platforms.all; platforms = stdenv.lib.platforms.all;
}; };
}; };

View File

@ -33,7 +33,7 @@ stdenv.mkDerivation rec {
meta = { meta = {
homepage = http://libcxx.llvm.org/; homepage = http://libcxx.llvm.org/;
description = "A new implementation of the C++ standard library, targeting C++11"; description = "A new implementation of the C++ standard library, targeting C++11";
license = "BSD"; license = with stdenv.lib.licenses; [ ncsa mit ];
platforms = stdenv.lib.platforms.unix; platforms = stdenv.lib.platforms.unix;
}; };
} }

View File

@ -40,7 +40,7 @@ stdenv.mkDerivation {
meta = { meta = {
homepage = http://libcxxabi.llvm.org/; homepage = http://libcxxabi.llvm.org/;
description = "A new implementation of low level support for a standard C++ library"; description = "A new implementation of low level support for a standard C++ library";
license = "BSD"; license = with stdenv.lib.licenses; [ ncsa mit ];
maintainers = with stdenv.lib.maintainers; [ vlstill ]; maintainers = with stdenv.lib.maintainers; [ vlstill ];
platforms = stdenv.lib.platforms.unix; platforms = stdenv.lib.platforms.unix;
}; };

View File

@ -44,7 +44,7 @@ stdenv.mkDerivation {
meta = { meta = {
description = "A next-generation high-performance debugger"; description = "A next-generation high-performance debugger";
homepage = http://llvm.org/; homepage = http://llvm.org/;
license = stdenv.lib.licenses.bsd3; license = stdenv.lib.licenses.ncsa;
platforms = stdenv.lib.platforms.all; platforms = stdenv.lib.platforms.all;
}; };
} }

View File

@ -85,7 +85,7 @@ in stdenv.mkDerivation rec {
meta = { meta = {
description = "Collection of modular and reusable compiler and toolchain technologies"; description = "Collection of modular and reusable compiler and toolchain technologies";
homepage = http://llvm.org/; homepage = http://llvm.org/;
license = stdenv.lib.licenses.bsd3; license = stdenv.lib.licenses.ncsa;
maintainers = with stdenv.lib.maintainers; [ lovek323 raskin viric ]; maintainers = with stdenv.lib.maintainers; [ lovek323 raskin viric ];
platforms = stdenv.lib.platforms.all; platforms = stdenv.lib.platforms.all;
}; };

View File

@ -49,7 +49,7 @@ let
meta = { meta = {
description = "A c, c++, objective-c, and objective-c++ frontend for the llvm compiler"; description = "A c, c++, objective-c, and objective-c++ frontend for the llvm compiler";
homepage = http://llvm.org/; homepage = http://llvm.org/;
license = stdenv.lib.licenses.bsd3; license = stdenv.lib.licenses.ncsa;
platforms = stdenv.lib.platforms.all; platforms = stdenv.lib.platforms.all;
}; };
}; };

View File

@ -33,7 +33,7 @@ stdenv.mkDerivation rec {
meta = { meta = {
homepage = http://libcxx.llvm.org/; homepage = http://libcxx.llvm.org/;
description = "A new implementation of the C++ standard library, targeting C++11"; description = "A new implementation of the C++ standard library, targeting C++11";
license = "BSD"; license = with stdenv.lib.licenses; [ ncsa mit ];
platforms = stdenv.lib.platforms.unix; platforms = stdenv.lib.platforms.unix;
}; };
} }

View File

@ -40,7 +40,7 @@ stdenv.mkDerivation {
meta = { meta = {
homepage = http://libcxxabi.llvm.org/; homepage = http://libcxxabi.llvm.org/;
description = "A new implementation of low level support for a standard C++ library"; description = "A new implementation of low level support for a standard C++ library";
license = "BSD"; license = with stdenv.lib.licenses; [ ncsa mit ];
maintainers = with stdenv.lib.maintainers; [ vlstill ]; maintainers = with stdenv.lib.maintainers; [ vlstill ];
platforms = stdenv.lib.platforms.unix; platforms = stdenv.lib.platforms.unix;
}; };

View File

@ -50,7 +50,7 @@ stdenv.mkDerivation {
meta = { meta = {
description = "A next-generation high-performance debugger"; description = "A next-generation high-performance debugger";
homepage = http://llvm.org/; homepage = http://llvm.org/;
license = stdenv.lib.licenses.bsd3; license = stdenv.lib.licenses.ncsa;
platforms = stdenv.lib.platforms.all; platforms = stdenv.lib.platforms.all;
}; };
} }

View File

@ -117,7 +117,7 @@ in stdenv.mkDerivation rec {
meta = { meta = {
description = "Collection of modular and reusable compiler and toolchain technologies"; description = "Collection of modular and reusable compiler and toolchain technologies";
homepage = http://llvm.org/; homepage = http://llvm.org/;
license = stdenv.lib.licenses.bsd3; license = stdenv.lib.licenses.ncsa;
maintainers = with stdenv.lib.maintainers; [ lovek323 raskin viric ]; maintainers = with stdenv.lib.maintainers; [ lovek323 raskin viric ];
platforms = stdenv.lib.platforms.all; platforms = stdenv.lib.platforms.all;
}; };

View File

@ -1,11 +1,26 @@
{ stdenv, fetchurl, which, coq, ssreflect }: { stdenv, fetchurl, which, coq, ssreflect }:
stdenv.mkDerivation { let param =
name = "coq${coq.coq-version}-coquelicot-2.1.1"; let
src = fetchurl { v2_1_1 = {
version = "2.1.1";
url = https://gforge.inria.fr/frs/download.php/file/35429/coquelicot-2.1.1.tar.gz; url = https://gforge.inria.fr/frs/download.php/file/35429/coquelicot-2.1.1.tar.gz;
sha256 = "1wxds73h26q03r2xiw8shplh97rsbim2i2s0r7af0fa490bp44km"; sha256 = "1wxds73h26q03r2xiw8shplh97rsbim2i2s0r7af0fa490bp44km";
}; };
v2_1_2 = {
version = "2.1.2";
url = https://gforge.inria.fr/frs/download.php/file/36320/coquelicot-2.1.2.tar.gz;
sha256 = "09q9xbzyndx8i68hn3ir4pmzgqd1q33qpk3xghf2l849g8w3q5an";
};
in {
"8.4" = v2_1_1;
"8.5" = v2_1_2;
"8.6" = v2_1_2;
}."${coq.coq-version}"; in
stdenv.mkDerivation {
name = "coq${coq.coq-version}-coquelicot-${param.version}";
src = fetchurl { inherit (param) url sha256; };
nativeBuildInputs = [ which ]; nativeBuildInputs = [ which ];
buildInputs = [ coq ]; buildInputs = [ coq ];

View File

@ -1,11 +1,11 @@
{ stdenv, fetchurl, which, coq, coquelicot, flocq, mathcomp }: { stdenv, fetchurl, which, coq, coquelicot, flocq, mathcomp }:
stdenv.mkDerivation { stdenv.mkDerivation {
name = "coq-interval-${coq.coq-version}-2.2.1"; name = "coq${coq.coq-version}-interval-3.1.1";
src = fetchurl { src = fetchurl {
url = https://gforge.inria.fr/frs/download.php/file/35431/interval-2.2.1.tar.gz; url = https://gforge.inria.fr/frs/download.php/file/36342/interval-3.1.1.tar.gz;
sha256 = "1i6v7da9mf6907sa803xa0llsf9lj4akxbrl8rma6gsdgff2d78n"; sha256 = "0jzkb0xykiz9bfaminy9yd88b5w0gxcpw506yaaqmnmb43gdksyf";
}; };
nativeBuildInputs = [ which ]; nativeBuildInputs = [ which ];

View File

@ -1,20 +1,11 @@
{ callPackage, fetchurl, coq }: { callPackage, fetchurl, coq }:
let param = let param =
let v16 = { {
version = "1.6";
url = http://ssr.msr-inria.inria.fr/FTP/mathcomp-1.6.tar.gz;
sha256 = "0adr556032r1jkvphbpfvrrv041qk0yqb7a1xnbam52ji0mdl2w8";
}; v161 = {
version = "1.6.1"; version = "1.6.1";
url = https://github.com/math-comp/math-comp/archive/mathcomp-1.6.1.tar.gz; url = https://github.com/math-comp/math-comp/archive/mathcomp-1.6.1.tar.gz;
sha256 = "1j9ylggjzrxz1i2hdl2yhsvmvy5z6l4rprwx7604401080p5sgjw"; sha256 = "1j9ylggjzrxz1i2hdl2yhsvmvy5z6l4rprwx7604401080p5sgjw";
}; in }; in
{
"8.4" = v16;
"8.5" = v16;
"8.6" = v161;
}."${coq.coq-version}"; in
callPackage ./generic.nix { callPackage ./generic.nix {
name = "coq${coq.coq-version}-mathcomp-${param.version}"; name = "coq${coq.coq-version}-mathcomp-${param.version}";

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, coq, ssreflect, ncurses, which { stdenv, fetchurl, coq, ncurses, which
, graphviz, withDoc ? false , graphviz, withDoc ? false
, src, name , src, name
}: }:
@ -10,7 +10,7 @@ stdenv.mkDerivation {
nativeBuildInputs = stdenv.lib.optionals withDoc [ graphviz ]; nativeBuildInputs = stdenv.lib.optionals withDoc [ graphviz ];
buildInputs = [ coq.ocaml coq.findlib coq.camlp5 ncurses which ]; buildInputs = [ coq.ocaml coq.findlib coq.camlp5 ncurses which ];
propagatedBuildInputs = [ coq ssreflect ]; propagatedBuildInputs = [ coq ];
enableParallelBuilding = true; enableParallelBuilding = true;
@ -24,9 +24,6 @@ stdenv.mkDerivation {
installPhase = '' installPhase = ''
make -f Makefile.coq COQLIB=$out/lib/coq/${coq.coq-version}/ install make -f Makefile.coq COQLIB=$out/lib/coq/${coq.coq-version}/ install
rm -fr $out/lib/coq/${coq.coq-version}/user-contrib/mathcomp/ssreflect*
rm -fr $out/lib/coq/${coq.coq-version}/user-contrib/ssrmatching.cmi
rm -fr $out/share/coq/${coq.coq-version}/user-contrib/mathcomp/ssreflect*
'' + stdenv.lib.optionalString withDoc '' '' + stdenv.lib.optionalString withDoc ''
make -f Makefile.coq install-doc DOCDIR=$out/share/coq/${coq.coq-version}/ make -f Makefile.coq install-doc DOCDIR=$out/share/coq/${coq.coq-version}/
''; '';

View File

@ -1,20 +1,11 @@
{ callPackage, fetchurl, coq }: { callPackage, fetchurl, coq }:
let param = let param =
let v16 = { {
version = "1.6";
url = http://ssr.msr-inria.inria.fr/FTP/mathcomp-1.6.tar.gz;
sha256 = "0adr556032r1jkvphbpfvrrv041qk0yqb7a1xnbam52ji0mdl2w8";
}; v161 = {
version = "1.6.1"; version = "1.6.1";
url = https://github.com/math-comp/math-comp/archive/mathcomp-1.6.1.tar.gz; url = https://github.com/math-comp/math-comp/archive/mathcomp-1.6.1.tar.gz;
sha256 = "1j9ylggjzrxz1i2hdl2yhsvmvy5z6l4rprwx7604401080p5sgjw"; sha256 = "1j9ylggjzrxz1i2hdl2yhsvmvy5z6l4rprwx7604401080p5sgjw";
}; in }; in
{
"8.4" = v16;
"8.5" = v16;
"8.6" = v161;
}."${coq.coq-version}"; in
callPackage ./generic.nix { callPackage ./generic.nix {
name = "coq${coq.coq-version}-ssreflect-${param.version}"; name = "coq${coq.coq-version}-ssreflect-${param.version}";

View File

@ -139,9 +139,9 @@ self: super: {
# https://github.com/techtangents/ablist/issues/1 # https://github.com/techtangents/ablist/issues/1
ABList = dontCheck super.ABList; ABList = dontCheck super.ABList;
# https://github.com/haskell/vector/issues/47 # sse2 flag due to https://github.com/haskell/vector/issues/47.
# https://github.com/haskell/vector/issues/138 # dontCheck due to https://github.com/haskell/vector/issues/138
vector = doJailbreak (if pkgs.stdenv.isi686 then appendConfigureFlag super.vector "--ghc-options=-msse2" else super.vector); vector = dontCheck (if pkgs.stdenv.isi686 then appendConfigureFlag super.vector "--ghc-options=-msse2" else super.vector);
# Fix Darwin build. # Fix Darwin build.
halive = if pkgs.stdenv.isDarwin halive = if pkgs.stdenv.isDarwin
@ -392,7 +392,6 @@ self: super: {
# https://ghc.haskell.org/trac/ghc/ticket/9625 # https://ghc.haskell.org/trac/ghc/ticket/9625
vty = dontCheck super.vty; vty = dontCheck super.vty;
vty_5_15 = dontCheck super.vty_5_15;
# https://github.com/vincenthz/hs-crypto-pubkey/issues/20 # https://github.com/vincenthz/hs-crypto-pubkey/issues/20
crypto-pubkey = dontCheck super.crypto-pubkey; crypto-pubkey = dontCheck super.crypto-pubkey;
@ -472,11 +471,6 @@ self: super: {
preConfigure = "sed -i -e 's,time .* < 1.6,time >= 1.5,' -e 's,haddock-library >= 1.1 && < 1.3,haddock-library >= 1.1,' pandoc.cabal"; preConfigure = "sed -i -e 's,time .* < 1.6,time >= 1.5,' -e 's,haddock-library >= 1.1 && < 1.3,haddock-library >= 1.1,' pandoc.cabal";
}); });
# Requires bower-json >= 1.0.0.1 && < 1.1
purescript_0_10_5 = super.purescript_0_10_5.overrideScope (self: super: {
bower-json = self.bower-json_1_0_0_1;
});
# https://github.com/tych0/xcffib/issues/37 # https://github.com/tych0/xcffib/issues/37
xcffib = dontCheck super.xcffib; xcffib = dontCheck super.xcffib;
@ -497,41 +491,6 @@ self: super: {
# https://github.com/anton-k/csound-expression-dynamic/issues/1 # https://github.com/anton-k/csound-expression-dynamic/issues/1
csound-expression-dynamic = dontHaddock super.csound-expression-dynamic; csound-expression-dynamic = dontHaddock super.csound-expression-dynamic;
# Packages of the diagrams ecosystem that require:
# diagrams-core ==1.4.*
# diagrams-lib ==1.4.*
# optparse-applicative ==0.13.*
diagrams_1_4 = super.diagrams_1_4.overrideScope (self: super: {
diagrams-contrib = self.diagrams-contrib_1_4_0_1;
diagrams-core = self.diagrams-core_1_4;
diagrams-lib = self.diagrams-lib_1_4_0_1;
diagrams-svg = self.diagrams-svg_1_4_1;
optparse-applicative = self.optparse-applicative_0_13_0_0;
});
diagrams-contrib_1_4_0_1 = super.diagrams-contrib_1_4_0_1.overrideScope (self: super: {
diagrams-core = self.diagrams-core_1_4;
diagrams-lib = self.diagrams-lib_1_4_0_1;
});
diagrams-lib_1_4_0_1 = super.diagrams-lib_1_4_0_1.overrideScope (self: super: {
diagrams-core = self.diagrams-core_1_4;
optparse-applicative = self.optparse-applicative_0_13_0_0;
});
diagrams-pgf = super.diagrams-pgf.overrideScope (self: super: {
diagrams-core = self.diagrams-core_1_4;
diagrams-lib = self.diagrams-lib_1_4_0_1;
optparse-applicative = self.optparse-applicative_0_13_0_0;
});
diagrams-rasterific_1_4 = super.diagrams-rasterific_1_4.overrideScope (self: super: {
diagrams-core = self.diagrams-core_1_4;
diagrams-lib = self.diagrams-lib_1_4_0_1;
optparse-applicative = self.optparse-applicative_0_13_0_0;
});
diagrams-svg_1_4_1 = super.diagrams-svg_1_4_1.overrideScope (self: super: {
diagrams-core = self.diagrams-core_1_4;
diagrams-lib = self.diagrams-lib_1_4_0_1;
optparse-applicative = self.optparse-applicative_0_13_0_0;
});
# Test suite won't compile against tasty-hunit 0.9.x. # Test suite won't compile against tasty-hunit 0.9.x.
zlib = dontCheck super.zlib; zlib = dontCheck super.zlib;
@ -743,16 +702,8 @@ self: super: {
''; '';
}); });
# The most current version needs some packages to build that are not in LTS 7.x. # https://github.com/commercialhaskell/stack/issues/3001
stack = super.stack.overrideScope (self: super: { stack = doJailbreak super.stack;
http-client = self.http-client_0_5_5;
http-client-tls = self.http-client-tls_0_3_3_1;
http-conduit = self.http-conduit_2_2_3;
optparse-applicative = dontCheck self.optparse-applicative_0_13_0_0;
criterion = super.criterion.override { inherit (super) optparse-applicative; };
aeson = self.aeson_1_0_2_1;
hpack = self.hpack_0_15_0;
});
# The latest Hoogle needs versions not yet in LTS Haskell 7.x. # The latest Hoogle needs versions not yet in LTS Haskell 7.x.
hoogle = super.hoogle.override { haskell-src-exts = self.haskell-src-exts_1_19_1; }; hoogle = super.hoogle.override { haskell-src-exts = self.haskell-src-exts_1_19_1; };
@ -776,9 +727,6 @@ self: super: {
# Needs new version. # Needs new version.
haskell-src-exts-simple = super.haskell-src-exts-simple.override { haskell-src-exts = self.haskell-src-exts_1_19_1; }; haskell-src-exts-simple = super.haskell-src-exts-simple.override { haskell-src-exts = self.haskell-src-exts_1_19_1; };
# Test suite fails a QuickCheck property.
optparse-applicative_0_13_0_0 = dontCheck super.optparse-applicative_0_13_0_0;
# https://github.com/Philonous/hs-stun/pull/1 # https://github.com/Philonous/hs-stun/pull/1
# Remove if a version > 0.1.0.1 ever gets released. # Remove if a version > 0.1.0.1 ever gets released.
stunclient = overrideCabal super.stunclient (drv: { stunclient = overrideCabal super.stunclient (drv: {
@ -800,9 +748,8 @@ self: super: {
# https://github.com/bos/math-functions/issues/25 # https://github.com/bos/math-functions/issues/25
math-functions = dontCheck super.math-functions; math-functions = dontCheck super.math-functions;
# http-api-data_0.3.x requires QuickCheck > 2.9, but overriding that version # broken test suite
# is hard because of transitive dependencies, so we just disable tests. servant-server = dontCheck super.servant-server;
http-api-data_0_3_5 = dontCheck super.http-api-data_0_3_5;
# Fix build for latest versions of servant and servant-client. # Fix build for latest versions of servant and servant-client.
servant_0_10 = super.servant_0_10.overrideScope (self: super: { servant_0_10 = super.servant_0_10.overrideScope (self: super: {
@ -824,7 +771,7 @@ self: super: {
owner = "haskell-servant"; owner = "haskell-servant";
repo = "servant"; repo = "servant";
rev = "v${ver}"; rev = "v${ver}";
sha256 = "0fynv77m7rk79pdp535c2a2bd44csgr32zb4wqavbalr7grpxg4q"; sha256 = "09kjinnarf9q9l8irs46gcrai8bprq39n8pj43bmdv47hl38csa0";
}}/doc"; }}/doc";
buildInputs = with pkgs.pythonPackages; [ sphinx recommonmark sphinx_rtd_theme ]; buildInputs = with pkgs.pythonPackages; [ sphinx recommonmark sphinx_rtd_theme ];
makeFlags = "html"; makeFlags = "html";
@ -842,16 +789,9 @@ self: super: {
# https://github.com/plow-technologies/servant-auth/issues/20 # https://github.com/plow-technologies/servant-auth/issues/20
servant-auth = dontCheck super.servant-auth; servant-auth = dontCheck super.servant-auth;
servant-auth-server = super.servant-auth-server.overrideScope (self: super: {
jose = super.jose_0_5_0_2;
});
# https://github.com/pontarius/pontarius-xmpp/issues/105 # https://github.com/pontarius/pontarius-xmpp/issues/105
pontarius-xmpp = dontCheck super.pontarius-xmpp; pontarius-xmpp = dontCheck super.pontarius-xmpp;
# Use proper store-core version.
store_0_3 = super.store_0_3.overrideScope (self: super: { store-core = self.store-core_0_3; });
# https://github.com/bmillwood/applicative-quoters/issues/6 # https://github.com/bmillwood/applicative-quoters/issues/6
applicative-quoters = doJailbreak super.applicative-quoters; applicative-quoters = doJailbreak super.applicative-quoters;
@ -885,22 +825,36 @@ self: super: {
# https://github.com/josefs/STMonadTrans/issues/4 # https://github.com/josefs/STMonadTrans/issues/4
STMonadTrans = dontCheck super.STMonadTrans; STMonadTrans = dontCheck super.STMonadTrans;
socket_0_7_0_0 = super.socket_0_7_0_0.overrideScope (self: super: { QuickCheck = self.QuickCheck_2_9_2; });
# requires most recent vty
brick = super.brick.overrideScope (self: super: { vty = self.vty_5_15; });
turtle_1_3_1 = super.turtle_1_3_1.overrideScope (self: super: {
optparse-applicative = self.optparse-applicative_0_13_0_0;
});
# No upstream issue tracker # No upstream issue tracker
hspec-expectations-pretty-diff = dontCheck super.hspec-expectations-pretty-diff; hspec-expectations-pretty-diff = dontCheck super.hspec-expectations-pretty-diff;
lentil = super.lentil.overrideScope (self: super: { lentil = super.lentil.overrideScope (self: super: {
pipes = self.pipes_4_3_2; pipes = self.pipes_4_3_2;
optparse-applicative = self.optparse-applicative_0_13_0_0;
# https://github.com/roelvandijk/terminal-progress-bar/issues/14 # https://github.com/roelvandijk/terminal-progress-bar/issues/14
terminal-progress-bar = doJailbreak self.terminal-progress-bar_0_1_1; terminal-progress-bar = doJailbreak self.terminal-progress-bar_0_1_1;
}); });
# https://github.com/basvandijk/lifted-base/issues/34
lifted-base = doJailbreak super.lifted-base;
# https://github.com/aslatter/parsec/issues/68
parsec = doJailbreak super.parsec;
# Don't depend on chell-quickcheck, which doesn't compile due to restricting
# QuickCheck to versions ">=2.3 && <2.9".
system-filepath = dontCheck super.system-filepath;
# https://github.com/basvandijk/case-insensitive/issues/24
case-insensitive = doJailbreak super.case-insensitive;
# https://github.com/hvr/uuid/issues/28
uuid-types = doJailbreak super.uuid-types;
uuid = doJailbreak super.uuid;
# https://github.com/hspec/hspec/issues/307
hspec-contrib = dontCheck super.hspec-contrib;
# https://github.com/ekmett/lens/issues/713
lens = disableCabalFlag super.lens "test-doctests";
} }

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,20 +1,24 @@
{ stdenv, fetchFromGitHub, sqlite, readline, asciidoc, SDL, SDL_gfx }: { stdenv, fetchFromGitHub, sqlite, readline, asciidoc, SDL, SDL_gfx }:
stdenv.mkDerivation { let
name = "jimtcl-0.76"; makeSDLFlags = map (p: "-I${stdenv.lib.getDev p}/include/SDL");
in stdenv.mkDerivation rec {
name = "jimtcl-${version}";
version = "0.77";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "msteveb"; owner = "msteveb";
repo = "jimtcl"; repo = "jimtcl";
rev = "51f65c6d38fbf86e1f0b036ad336761fd2ab7fa0"; rev = version;
sha256 = "00ldal1w9ysyfmx28xdcaz81vaazr1fqixxb2abk438yfpp1i9hq"; sha256 = "06d9gdgvi6cwd6pjg3xig0kkjqm6kgq3am8yq1xnksyz2n09f0kp";
}; };
buildInputs = [ buildInputs = [
sqlite readline asciidoc SDL SDL_gfx sqlite readline asciidoc SDL SDL_gfx
]; ];
NIX_CFLAGS_COMPILE = [ "-I${SDL.dev}/include/SDL" ]; NIX_CFLAGS_COMPILE = makeSDLFlags [ SDL SDL_gfx ];
configureFlags = [ configureFlags = [
"--with-ext=oo" "--with-ext=oo"

View File

@ -5,7 +5,7 @@
let let
pname = "love"; pname = "love";
version = "0.10.1"; version = "0.10.2";
in in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
owner = "rude"; owner = "rude";
repo = "love"; repo = "love";
rev = "${version}"; rev = "${version}";
sha256 = "10a2kkyx7x9jkcj9xrqgmvp0b6gbapjqjx9fib9f6a0nbz0xaswj"; sha256 = "19yfmlcx6w8yi4ndm5lni8lrsvnn77bxw5py0dc293nzzlaqa9ym";
}; };
buildInputs = [ buildInputs = [

View File

@ -1,228 +0,0 @@
{ stdenv, fetchurl, zlib ? null, zlibSupport ? true, bzip2, includeModules ? false
, sqlite, tcl, tk, xlibsWrapper, openssl, readline, db, ncurses, gdbm, self, callPackage
# For the Python package set
, pkgs, packageOverrides ? (self: super: {})
}:
assert zlibSupport -> zlib != null;
with stdenv.lib;
let
majorVersion = "2.6";
minorVersion = "9";
minorVersionSuffix = "";
pythonVersion = majorVersion;
version = "${majorVersion}.${minorVersion}${minorVersionSuffix}";
libPrefix = "python${majorVersion}";
src = fetchurl {
url = "https://www.python.org/ftp/python/${majorVersion}.${minorVersion}/Python-${version}.tar.xz";
sha256 = "0hbfs2691b60c7arbysbzr0w9528d5pl8a4x7mq5psh6a2cvprya";
};
patches =
[ # Look in C_INCLUDE_PATH and LIBRARY_PATH for stuff.
./search-path.patch
# Python recompiles a Python if the mtime stored *in* the
# pyc/pyo file differs from the mtime of the source file. This
# doesn't work in Nix because Nix changes the mtime of files in
# the Nix store to 1. So treat that as a special case.
./nix-store-mtime.patch
# http://bugs.python.org/issue10013
./python2.6-fix-parallel-make.patch
];
preConfigure = ''
# Purity.
for i in /usr /sw /opt /pkg; do
substituteInPlace ./setup.py --replace $i /no-such-path
done
'' + optionalString (stdenv ? cc && stdenv.cc.libc != null) ''
for i in Lib/plat-*/regen; do
substituteInPlace $i --replace /usr/include/ ${stdenv.cc.libc}/include/
done
'' + optionalString stdenv.isCygwin ''
# On Cygwin, `make install' tries to read this Makefile.
mkdir -p $out/lib/python${majorVersion}/config
touch $out/lib/python${majorVersion}/config/Makefile
mkdir -p $out/include/python${majorVersion}
touch $out/include/python${majorVersion}/pyconfig.h
'';
configureFlags = "--enable-shared --with-threads --enable-unicode=ucs4";
buildInputs =
optional (stdenv ? cc && stdenv.cc.libc != null) stdenv.cc.libc ++
[ bzip2 openssl ]++ optionals includeModules [ db openssl ncurses gdbm readline xlibsWrapper tcl tk sqlite ]
++ optional zlibSupport zlib;
mkPaths = paths: {
C_INCLUDE_PATH = makeSearchPathOutput "dev" "include" paths;
LIBRARY_PATH = makeLibraryPath paths;
};
# Build the basic Python interpreter without modules that have
# external dependencies.
python = stdenv.mkDerivation {
name = "python${if includeModules then "" else "-minimal"}-${version}";
pythonVersion = majorVersion;
inherit majorVersion version src patches buildInputs preConfigure
configureFlags;
inherit (mkPaths buildInputs) C_INCLUDE_PATH LIBRARY_PATH;
NIX_CFLAGS_COMPILE = optionalString stdenv.isDarwin "-msse2";
setupHook = ./setup-hook.sh;
postInstall =
''
# needed for some packages, especially packages that backport
# functionality to 2.x from 3.x
for item in $out/lib/python${majorVersion}/test/*; do
if [[ "$item" != */test_support.py* ]]; then
rm -rf "$item"
fi
done
touch $out/lib/python${majorVersion}/test/__init__.py
ln -s $out/lib/python${majorVersion}/pdb.py $out/bin/pdb
ln -s $out/lib/python${majorVersion}/pdb.py $out/bin/pdb${majorVersion}
mv $out/share/man/man1/{python.1,python2.6.1}
ln -s $out/share/man/man1/{python2.6.1,python.1}
paxmark E $out/bin/python${majorVersion}
# Python on Nix is not manylinux1 compatible. https://github.com/NixOS/nixpkgs/issues/18484
echo "manylinux1_compatible=False" >> $out/lib/${libPrefix}/_manylinux.py
${ optionalString includeModules "$out/bin/python ./setup.py build_ext"}
'';
passthru = let
pythonPackages = callPackage ../../../../../top-level/python-packages.nix {python=self; overrides=packageOverrides;};
in rec {
inherit libPrefix;
inherit zlibSupport;
isPy2 = true;
isPy26 = true;
buildEnv = callPackage ../../wrapper.nix { python = self; };
withPackages = import ../../with-packages.nix { inherit buildEnv pythonPackages;};
pkgs = pythonPackages;
executable = libPrefix;
sitePackages = "lib/${libPrefix}/site-packages";
interpreter = "${self}/bin/${executable}";
};
enableParallelBuilding = true;
meta = {
homepage = "http://python.org";
description = "A high-level dynamically-typed programming language";
longDescription = ''
Python is a remarkably powerful dynamic programming language that
is used in a wide variety of application domains. Some of its key
distinguishing features include: clear, readable syntax; strong
introspection capabilities; intuitive object orientation; natural
expression of procedural code; full modularity, supporting
hierarchical packages; exception-based error handling; and very
high level dynamic data types.
'';
license = stdenv.lib.licenses.psfl;
platforms = stdenv.lib.platforms.all;
maintainers = with stdenv.lib.maintainers; [ chaoflow domenkozar ];
# If you want to use Python 2.6, remove "broken = true;" at your own
# risk. Python 2.6 has known security vulnerabilities is not receiving
# security updates as of October 2013.
broken = true;
};
};
# This function builds a Python module included in the main Python
# distribution in a separate derivation.
buildInternalPythonModule =
{ moduleName
, internalName ? "_" + moduleName
, deps
}:
if includeModules then null else stdenv.mkDerivation rec {
name = "python-${moduleName}-${python.version}";
inherit src patches preConfigure configureFlags;
buildInputs = [ python ] ++ deps;
inherit (mkPaths buildInputs) C_INCLUDE_PATH LIBRARY_PATH;
buildPhase =
''
substituteInPlace setup.py --replace 'self.extensions = extensions' \
'self.extensions = [ext for ext in self.extensions if ext.name in ["${internalName}"]]'
python ./setup.py build_ext
[ -z "$(find build -name '*_failed.so' -print)" ]
'';
installPhase =
''
dest=$out/lib/${python.libPrefix}/site-packages
mkdir -p $dest
cp -p $(find . -name "*.${if stdenv.isCygwin then "dll" else "so"}") $dest/
'';
};
# The Python modules included in the main Python distribution, built
# as separate derivations.
modules = {
bsddb = buildInternalPythonModule {
moduleName = "bsddb";
deps = [ db ];
};
crypt = buildInternalPythonModule {
moduleName = "crypt";
internalName = "crypt";
deps = optional (stdenv ? glibc) stdenv.glibc;
};
curses = buildInternalPythonModule {
moduleName = "curses";
deps = [ ncurses ];
};
curses_panel = buildInternalPythonModule {
moduleName = "curses_panel";
deps = [ ncurses modules.curses ];
};
gdbm = buildInternalPythonModule {
moduleName = "gdbm";
internalName = "gdbm";
deps = [ gdbm ];
};
sqlite3 = buildInternalPythonModule {
moduleName = "sqlite3";
deps = [ sqlite ];
};
tkinter = buildInternalPythonModule {
moduleName = "tkinter";
deps = [ tcl tk xlibsWrapper ];
};
readline = buildInternalPythonModule {
moduleName = "readline";
internalName = "readline";
deps = [ readline ];
};
};
in python // { inherit modules; }

View File

@ -1,12 +0,0 @@
diff -ru -x '*~' Python-2.7.1-orig/Python/import.c Python-2.7.1/Python/import.c
--- Python-2.7.1-orig/Python/import.c 2010-05-20 20:37:55.000000000 +0200
+++ Python-2.7.1/Python/import.c 2011-01-04 15:55:11.000000000 +0100
@@ -751,7 +751,7 @@
return NULL;
}
pyc_mtime = PyMarshal_ReadLongFromFile(fp);
- if (pyc_mtime != mtime) {
+ if (pyc_mtime != mtime && mtime != 1) {
if (Py_VerboseFlag)
PySys_WriteStderr("# %s has bad mtime\n", cpathname);
fclose(fp);

View File

@ -1,37 +0,0 @@
diff -up Python-2.7/Makefile.pre.in.fix-parallel-make Python-2.7/Makefile.pre.in
--- Python-2.7/Makefile.pre.in.fix-parallel-make 2010-07-22 15:01:39.567996932 -0400
+++ Python-2.7/Makefile.pre.in 2010-07-22 15:47:02.437998509 -0400
@@ -207,6 +207,7 @@ SIGNAL_OBJS= @SIGNAL_OBJS@
##########################################################################
# Grammar
+GRAMMAR_STAMP= $(srcdir)/grammar-stamp
GRAMMAR_H= $(srcdir)/Include/graminit.h
GRAMMAR_C= $(srcdir)/Python/graminit.c
GRAMMAR_INPUT= $(srcdir)/Grammar/Grammar
@@ -530,10 +531,24 @@ Modules/getpath.o: $(srcdir)/Modules/get
Modules/python.o: $(srcdir)/Modules/python.c
$(MAINCC) -c $(PY_CFLAGS) -o $@ $(srcdir)/Modules/python.c
+# GNU "make" interprets rules with two dependents as two copies of the rule.
+#
+# In a parallel build this can lead to pgen being run twice, once for each of
+# GRAMMAR_H and GRAMMAR_C, leading to race conditions in which the compiler
+# reads a partially-overwritten copy of one of these files, leading to syntax
+# errors (or linker errors if the fragment happens to be syntactically valid C)
+#
+# See http://www.gnu.org/software/hello/manual/automake/Multiple-Outputs.html
+# for more information
+#
+# Introduce ".grammar-stamp" as a contrived single output from PGEN to avoid
+# this:
+$(GRAMMAR_H) $(GRAMMAR_C): $(GRAMMAR_STAMP)
-$(GRAMMAR_H) $(GRAMMAR_C): $(PGEN) $(GRAMMAR_INPUT)
+$(GRAMMAR_STAMP): $(PGEN) $(GRAMMAR_INPUT)
-@$(INSTALL) -d Include
-$(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
+ touch $(GRAMMAR_STAMP)
$(PGEN): $(PGENOBJS)
$(CC) $(OPT) $(LDFLAGS) $(PGENOBJS) $(LIBS) -o $(PGEN)

View File

@ -1,27 +0,0 @@
diff -rc Python-2.4.4-orig/setup.py Python-2.4.4/setup.py
*** Python-2.4.4-orig/setup.py 2006-10-08 19:41:25.000000000 +0200
--- Python-2.4.4/setup.py 2007-05-27 16:04:54.000000000 +0200
***************
*** 279,288 ****
# Check for AtheOS which has libraries in non-standard locations
if platform == 'atheos':
lib_dirs += ['/system/libs', '/atheos/autolnk/lib']
- lib_dirs += os.getenv('LIBRARY_PATH', '').split(os.pathsep)
inc_dirs += ['/system/include', '/atheos/autolnk/include']
- inc_dirs += os.getenv('C_INCLUDE_PATH', '').split(os.pathsep)
# OSF/1 and Unixware have some stuff in /usr/ccs/lib (like -ldb)
if platform in ['osf1', 'unixware7', 'openunix8']:
lib_dirs += ['/usr/ccs/lib']
--- 279,289 ----
# Check for AtheOS which has libraries in non-standard locations
if platform == 'atheos':
lib_dirs += ['/system/libs', '/atheos/autolnk/lib']
inc_dirs += ['/system/include', '/atheos/autolnk/include']
+ lib_dirs += os.getenv('LIBRARY_PATH', '').split(os.pathsep)
+ inc_dirs += os.getenv('C_INCLUDE_PATH', '').split(os.pathsep)
+
# OSF/1 and Unixware have some stuff in /usr/ccs/lib (like -ldb)
if platform in ['osf1', 'unixware7', 'openunix8']:
lib_dirs += ['/usr/ccs/lib']

View File

@ -1,15 +0,0 @@
addPythonPath() {
addToSearchPathWithCustomDelimiter : PYTHONPATH $1/lib/python2.6/site-packages
}
toPythonPath() {
local paths="$1"
local result=
for i in $paths; do
p="$i/lib/python2.6/site-packages"
result="${result}${result:+:}$p"
done
echo $result
}
envHooks+=(addPythonPath)

View File

@ -1,18 +0,0 @@
# This file was generated and will be overwritten by ./generate.sh
{ stdenv, fetchurl, lib }:
stdenv.mkDerivation rec {
name = "python26-docs-html-2.6.8";
src = fetchurl {
url = http://docs.python.org/ftp/python/doc/2.6.8/python-2.6.8-docs-html.tar.bz2;
sha256 = "09kznik9ahmnrqw9gkr7mjv3b3zr258f2fm27n12hrrwwsaszkni";
};
installPhase = ''
mkdir -p $out/share/doc/python26
cp -R ./ $out/share/doc/python26/html
'';
meta = {
maintainers = [ lib.maintainers.chaoflow ];
};
}

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