commit
c46200d454
@ -0,0 +1,37 @@ |
||||
{ lib, systemdUtils }: |
||||
|
||||
with systemdUtils.lib; |
||||
with systemdUtils.unitOptions; |
||||
with lib; |
||||
|
||||
rec { |
||||
units = with types; |
||||
attrsOf (submodule ({ name, config, ... }: { |
||||
options = concreteUnitOptions; |
||||
config = { unit = mkDefault (systemdUtils.lib.makeUnit name config); }; |
||||
})); |
||||
|
||||
services = with types; attrsOf (submodule [ stage2ServiceOptions unitConfig stage2ServiceConfig ]); |
||||
initrdServices = with types; attrsOf (submodule [ stage1ServiceOptions unitConfig stage1ServiceConfig ]); |
||||
|
||||
targets = with types; attrsOf (submodule [ stage2CommonUnitOptions unitConfig ]); |
||||
initrdTargets = with types; attrsOf (submodule [ stage1CommonUnitOptions unitConfig ]); |
||||
|
||||
sockets = with types; attrsOf (submodule [ stage2SocketOptions unitConfig ]); |
||||
initrdSockets = with types; attrsOf (submodule [ stage1SocketOptions unitConfig ]); |
||||
|
||||
timers = with types; attrsOf (submodule [ stage2TimerOptions unitConfig ]); |
||||
initrdTimers = with types; attrsOf (submodule [ stage1TimerOptions unitConfig ]); |
||||
|
||||
paths = with types; attrsOf (submodule [ stage2PathOptions unitConfig ]); |
||||
initrdPaths = with types; attrsOf (submodule [ stage1PathOptions unitConfig ]); |
||||
|
||||
slices = with types; attrsOf (submodule [ stage2SliceOptions unitConfig ]); |
||||
initrdSlices = with types; attrsOf (submodule [ stage1SliceOptions unitConfig ]); |
||||
|
||||
mounts = with types; listOf (submodule [ stage2MountOptions unitConfig mountConfig ]); |
||||
initrdMounts = with types; listOf (submodule [ stage1MountOptions unitConfig mountConfig ]); |
||||
|
||||
automounts = with types; listOf (submodule [ stage2AutomountOptions unitConfig automountConfig ]); |
||||
initrdAutomounts = with types; attrsOf (submodule [ stage1AutomountOptions unitConfig automountConfig ]); |
||||
} |
@ -1,56 +0,0 @@ |
||||
{ config, lib, pkgs, ... }: |
||||
|
||||
with lib; |
||||
|
||||
{ |
||||
###### interface |
||||
|
||||
options = { |
||||
|
||||
services.openfire = { |
||||
|
||||
enable = mkEnableOption "OpenFire XMPP server"; |
||||
|
||||
usePostgreSQL = mkOption { |
||||
type = types.bool; |
||||
default = true; |
||||
description = " |
||||
Whether you use PostgreSQL service for your storage back-end. |
||||
"; |
||||
}; |
||||
|
||||
}; |
||||
|
||||
}; |
||||
|
||||
|
||||
###### implementation |
||||
|
||||
config = mkIf config.services.openfire.enable { |
||||
|
||||
assertions = singleton |
||||
{ assertion = !(config.services.openfire.usePostgreSQL -> config.services.postgresql.enable); |
||||
message = "OpenFire configured to use PostgreSQL but services.postgresql.enable is not enabled."; |
||||
}; |
||||
|
||||
systemd.services.openfire = { |
||||
description = "OpenFire XMPP server"; |
||||
wantedBy = [ "multi-user.target" ]; |
||||
after = [ "networking.target" ] ++ |
||||
optional config.services.openfire.usePostgreSQL "postgresql.service"; |
||||
path = with pkgs; [ jre openfire coreutils which gnugrep gawk gnused ]; |
||||
script = '' |
||||
export HOME=/tmp |
||||
mkdir /var/log/openfire || true |
||||
mkdir /etc/openfire || true |
||||
for i in ${pkgs.openfire}/conf.inst/*; do |
||||
if ! test -f /etc/openfire/$(basename $i); then |
||||
cp $i /etc/openfire/ |
||||
fi |
||||
done |
||||
openfire start |
||||
''; # */ |
||||
}; |
||||
}; |
||||
|
||||
} |
@ -0,0 +1,417 @@ |
||||
{ lib, config, utils, pkgs, ... }: |
||||
|
||||
with lib; |
||||
|
||||
let |
||||
inherit (utils) systemdUtils escapeSystemdPath; |
||||
inherit (systemdUtils.lib) |
||||
generateUnits |
||||
pathToUnit |
||||
serviceToUnit |
||||
sliceToUnit |
||||
socketToUnit |
||||
targetToUnit |
||||
timerToUnit |
||||
mountToUnit |
||||
automountToUnit; |
||||
|
||||
|
||||
cfg = config.boot.initrd.systemd; |
||||
|
||||
# Copied from fedora |
||||
upstreamUnits = [ |
||||
"basic.target" |
||||
"ctrl-alt-del.target" |
||||
"emergency.service" |
||||
"emergency.target" |
||||
"final.target" |
||||
"halt.target" |
||||
"initrd-cleanup.service" |
||||
"initrd-fs.target" |
||||
"initrd-parse-etc.service" |
||||
"initrd-root-device.target" |
||||
"initrd-root-fs.target" |
||||
"initrd-switch-root.service" |
||||
"initrd-switch-root.target" |
||||
"initrd.target" |
||||
"initrd-udevadm-cleanup-db.service" |
||||
"kexec.target" |
||||
"kmod-static-nodes.service" |
||||
"local-fs-pre.target" |
||||
"local-fs.target" |
||||
"multi-user.target" |
||||
"paths.target" |
||||
"poweroff.target" |
||||
"reboot.target" |
||||
"rescue.service" |
||||
"rescue.target" |
||||
"rpcbind.target" |
||||
"shutdown.target" |
||||
"sigpwr.target" |
||||
"slices.target" |
||||
"sockets.target" |
||||
"swap.target" |
||||
"sysinit.target" |
||||
"sys-kernel-config.mount" |
||||
"syslog.socket" |
||||
"systemd-ask-password-console.path" |
||||
"systemd-ask-password-console.service" |
||||
"systemd-fsck@.service" |
||||
"systemd-halt.service" |
||||
"systemd-hibernate-resume@.service" |
||||
"systemd-journald-audit.socket" |
||||
"systemd-journald-dev-log.socket" |
||||
"systemd-journald.service" |
||||
"systemd-journald.socket" |
||||
"systemd-kexec.service" |
||||
"systemd-modules-load.service" |
||||
"systemd-poweroff.service" |
||||
"systemd-random-seed.service" |
||||
"systemd-reboot.service" |
||||
"systemd-sysctl.service" |
||||
"systemd-tmpfiles-setup-dev.service" |
||||
"systemd-tmpfiles-setup.service" |
||||
"systemd-udevd-control.socket" |
||||
"systemd-udevd-kernel.socket" |
||||
"systemd-udevd.service" |
||||
"systemd-udev-settle.service" |
||||
"systemd-udev-trigger.service" |
||||
"systemd-vconsole-setup.service" |
||||
"timers.target" |
||||
"umount.target" |
||||
|
||||
# TODO: Networking |
||||
# "network-online.target" |
||||
# "network-pre.target" |
||||
# "network.target" |
||||
# "nss-lookup.target" |
||||
# "nss-user-lookup.target" |
||||
# "remote-fs-pre.target" |
||||
# "remote-fs.target" |
||||
] ++ cfg.additionalUpstreamUnits; |
||||
|
||||
upstreamWants = [ |
||||
"sysinit.target.wants" |
||||
]; |
||||
|
||||
enabledUpstreamUnits = filter (n: ! elem n cfg.suppressedUnits) upstreamUnits; |
||||
enabledUnits = filterAttrs (n: v: ! elem n cfg.suppressedUnits) cfg.units; |
||||
|
||||
stage1Units = generateUnits { |
||||
type = "initrd"; |
||||
units = enabledUnits; |
||||
upstreamUnits = enabledUpstreamUnits; |
||||
inherit upstreamWants; |
||||
inherit (cfg) packages package; |
||||
}; |
||||
|
||||
fileSystems = filter utils.fsNeededForBoot config.system.build.fileSystems; |
||||
|
||||
fstab = pkgs.writeText "fstab" (lib.concatMapStringsSep "\n" |
||||
({ fsType, mountPoint, device, options, autoFormat, autoResize, ... }@fs: let |
||||
opts = options ++ optional autoFormat "x-systemd.makefs" ++ optional autoResize "x-systemd.growfs"; |
||||
in "${device} /sysroot${mountPoint} ${fsType} ${lib.concatStringsSep "," opts}") fileSystems); |
||||
|
||||
kernel-name = config.boot.kernelPackages.kernel.name or "kernel"; |
||||
modulesTree = config.system.modulesTree.override { name = kernel-name + "-modules"; }; |
||||
firmware = config.hardware.firmware; |
||||
# Determine the set of modules that we need to mount the root FS. |
||||
modulesClosure = pkgs.makeModulesClosure { |
||||
rootModules = config.boot.initrd.availableKernelModules ++ config.boot.initrd.kernelModules; |
||||
kernel = modulesTree; |
||||
firmware = firmware; |
||||
allowMissing = false; |
||||
}; |
||||
|
||||
initrdBinEnv = pkgs.buildEnv { |
||||
name = "initrd-emergency-env"; |
||||
paths = map getBin cfg.initrdBin; |
||||
pathsToLink = ["/bin" "/sbin"]; |
||||
# Make recovery easier |
||||
postBuild = '' |
||||
ln -s ${cfg.package.util-linux}/bin/mount $out/bin/ |
||||
ln -s ${cfg.package.util-linux}/bin/umount $out/bin/ |
||||
''; |
||||
}; |
||||
|
||||
initialRamdisk = pkgs.makeInitrdNG { |
||||
contents = map (path: { object = path; symlink = ""; }) (subtractLists cfg.suppressedStorePaths cfg.storePaths) |
||||
++ mapAttrsToList (_: v: { object = v.source; symlink = v.target; }) (filterAttrs (_: v: v.enable) cfg.contents); |
||||
}; |
||||
|
||||
in { |
||||
options.boot.initrd.systemd = { |
||||
enable = mkEnableOption ''systemd in initrd. |
||||
|
||||
Note: This is in very early development and is highly |
||||
experimental. Most of the features NixOS supports in initrd are |
||||
not yet supported by the intrd generated with this option. |
||||
''; |
||||
|
||||
package = (mkPackageOption pkgs "systemd" { |
||||
default = "systemdMinimal"; |
||||
}) // { |
||||
visible = false; |
||||
}; |
||||
|
||||
contents = mkOption { |
||||
description = "Set of files that have to be linked into the initrd"; |
||||
example = literalExpression '' |
||||
{ |
||||
"/etc/hostname".text = "mymachine"; |
||||
} |
||||
''; |
||||
visible = false; |
||||
default = {}; |
||||
type = types.attrsOf (types.submodule ({ config, options, name, ... }: { |
||||
options = { |
||||
enable = mkEnableOption "copying of this file to initrd and symlinking it" // { default = true; }; |
||||
|
||||
target = mkOption { |
||||
type = types.path; |
||||
description = '' |
||||
Path of the symlink. |
||||
''; |
||||
default = name; |
||||
}; |
||||
|
||||
text = mkOption { |
||||
default = null; |
||||
type = types.nullOr types.lines; |
||||
description = "Text of the file."; |
||||
}; |
||||
|
||||
source = mkOption { |
||||
type = types.path; |
||||
description = "Path of the source file."; |
||||
}; |
||||
}; |
||||
|
||||
config = { |
||||
source = mkIf (config.text != null) ( |
||||
let name' = "initrd-" + baseNameOf name; |
||||
in mkDerivedConfig options.text (pkgs.writeText name') |
||||
); |
||||
}; |
||||
})); |
||||
}; |
||||
|
||||
storePaths = mkOption { |
||||
description = '' |
||||
Store paths to copy into the initrd as well. |
||||
''; |
||||
type = types.listOf types.singleLineStr; |
||||
default = []; |
||||
}; |
||||
|
||||
suppressedStorePaths = mkOption { |
||||
description = '' |
||||
Store paths specified in the storePaths option that |
||||
should not be copied. |
||||
''; |
||||
type = types.listOf types.singleLineStr; |
||||
default = []; |
||||
}; |
||||
|
||||
emergencyAccess = mkOption { |
||||
type = with types; oneOf [ bool singleLineStr ]; |
||||
visible = false; |
||||
description = '' |
||||
Set to true for unauthenticated emergency access, and false for |
||||
no emergency access. |
||||
|
||||
Can also be set to a hashed super user password to allow |
||||
authenticated access to the emergency mode. |
||||
''; |
||||
default = false; |
||||
}; |
||||
|
||||
initrdBin = mkOption { |
||||
type = types.listOf types.package; |
||||
default = []; |
||||
visible = false; |
||||
description = '' |
||||
Packages to include in /bin for the stage 1 emergency shell. |
||||
''; |
||||
}; |
||||
|
||||
additionalUpstreamUnits = mkOption { |
||||
default = [ ]; |
||||
type = types.listOf types.str; |
||||
visible = false; |
||||
example = [ "debug-shell.service" "systemd-quotacheck.service" ]; |
||||
description = '' |
||||
Additional units shipped with systemd that shall be enabled. |
||||
''; |
||||
}; |
||||
|
||||
suppressedUnits = mkOption { |
||||
default = [ ]; |
||||
type = types.listOf types.str; |
||||
example = [ "systemd-backlight@.service" ]; |
||||
visible = false; |
||||
description = '' |
||||
A list of units to skip when generating system systemd configuration directory. This has |
||||
priority over upstream units, <option>boot.initrd.systemd.units</option>, and |
||||
<option>boot.initrd.systemd.additionalUpstreamUnits</option>. The main purpose of this is to |
||||
prevent a upstream systemd unit from being added to the initrd with any modifications made to it |
||||
by other NixOS modules. |
||||
''; |
||||
}; |
||||
|
||||
units = mkOption { |
||||
description = "Definition of systemd units."; |
||||
default = {}; |
||||
visible = false; |
||||
type = systemdUtils.types.units; |
||||
}; |
||||
|
||||
packages = mkOption { |
||||
default = []; |
||||
visible = false; |
||||
type = types.listOf types.package; |
||||
example = literalExpression "[ pkgs.systemd-cryptsetup-generator ]"; |
||||
description = "Packages providing systemd units and hooks."; |
||||
}; |
||||
|
||||
targets = mkOption { |
||||
default = {}; |
||||
visible = false; |
||||
type = systemdUtils.types.initrdTargets; |
||||
description = "Definition of systemd target units."; |
||||
}; |
||||
|
||||
services = mkOption { |
||||
default = {}; |
||||
type = systemdUtils.types.initrdServices; |
||||
visible = false; |
||||
description = "Definition of systemd service units."; |
||||
}; |
||||
|
||||
sockets = mkOption { |
||||
default = {}; |
||||
type = systemdUtils.types.initrdSockets; |
||||
visible = false; |
||||
description = "Definition of systemd socket units."; |
||||
}; |
||||
|
||||
timers = mkOption { |
||||
default = {}; |
||||
type = systemdUtils.types.initrdTimers; |
||||
visible = false; |
||||
description = "Definition of systemd timer units."; |
||||
}; |
||||
|
||||
paths = mkOption { |
||||
default = {}; |
||||
type = systemdUtils.types.initrdPaths; |
||||
visible = false; |
||||
description = "Definition of systemd path units."; |
||||
}; |
||||
|
||||
mounts = mkOption { |
||||
default = []; |
||||
type = systemdUtils.types.initrdMounts; |
||||
visible = false; |
||||
description = '' |
||||
Definition of systemd mount units. |
||||
This is a list instead of an attrSet, because systemd mandates the names to be derived from |
||||
the 'where' attribute. |
||||
''; |
||||
}; |
||||
|
||||
automounts = mkOption { |
||||
default = []; |
||||
type = systemdUtils.types.automounts; |
||||
visible = false; |
||||
description = '' |
||||
Definition of systemd automount units. |
||||
This is a list instead of an attrSet, because systemd mandates the names to be derived from |
||||
the 'where' attribute. |
||||
''; |
||||
}; |
||||
|
||||
slices = mkOption { |
||||
default = {}; |
||||
type = systemdUtils.types.slices; |
||||
visible = false; |
||||
description = "Definition of slice configurations."; |
||||
}; |
||||
}; |
||||
|
||||
config = mkIf (config.boot.initrd.enable && cfg.enable) { |
||||
system.build = { inherit initialRamdisk; }; |
||||
boot.initrd.systemd = { |
||||
initrdBin = [pkgs.bash pkgs.coreutils pkgs.kmod cfg.package] ++ config.system.fsPackages; |
||||
|
||||
contents = { |
||||
"/init".source = "${cfg.package}/lib/systemd/systemd"; |
||||
"/etc/systemd/system".source = stage1Units; |
||||
|
||||
"/etc/systemd/system.conf".text = '' |
||||
[Manager] |
||||
DefaultEnvironment=PATH=/bin:/sbin |
||||
''; |
||||
|
||||
"/etc/fstab".source = fstab; |
||||
|
||||
"/lib/modules".source = "${modulesClosure}/lib/modules"; |
||||
|
||||
"/etc/modules-load.d/nixos.conf".text = concatStringsSep "\n" config.boot.initrd.kernelModules; |
||||
|
||||
"/etc/passwd".source = "${pkgs.fakeNss}/etc/passwd"; |
||||
"/etc/shadow".text = "root:${if isBool cfg.emergencyAccess then "!" else cfg.emergencyAccess}:::::::"; |
||||
|
||||
"/bin".source = "${initrdBinEnv}/bin"; |
||||
"/sbin".source = "${initrdBinEnv}/sbin"; |
||||
|
||||
"/etc/sysctl.d/nixos.conf".text = "kernel.modprobe = /sbin/modprobe"; |
||||
}; |
||||
|
||||
storePaths = [ |
||||
# TODO: Limit this to the bare necessities |
||||
"${cfg.package}/lib" |
||||
|
||||
"${cfg.package.util-linux}/bin/mount" |
||||
"${cfg.package.util-linux}/bin/umount" |
||||
"${cfg.package.util-linux}/bin/sulogin" |
||||
|
||||
# so NSS can look up usernames |
||||
"${pkgs.glibc}/lib/libnss_files.so" |
||||
]; |
||||
|
||||
targets.initrd.aliases = ["default.target"]; |
||||
units = |
||||
mapAttrs' (n: v: nameValuePair "${n}.path" (pathToUnit n v)) cfg.paths |
||||
// mapAttrs' (n: v: nameValuePair "${n}.service" (serviceToUnit n v)) cfg.services |
||||
// mapAttrs' (n: v: nameValuePair "${n}.slice" (sliceToUnit n v)) cfg.slices |
||||
// mapAttrs' (n: v: nameValuePair "${n}.socket" (socketToUnit n v)) cfg.sockets |
||||
// mapAttrs' (n: v: nameValuePair "${n}.target" (targetToUnit n v)) cfg.targets |
||||
// mapAttrs' (n: v: nameValuePair "${n}.timer" (timerToUnit n v)) cfg.timers |
||||
// listToAttrs (map |
||||
(v: let n = escapeSystemdPath v.where; |
||||
in nameValuePair "${n}.mount" (mountToUnit n v)) cfg.mounts) |
||||
// listToAttrs (map |
||||
(v: let n = escapeSystemdPath v.where; |
||||
in nameValuePair "${n}.automount" (automountToUnit n v)) cfg.automounts); |
||||
|
||||
services.emergency = mkIf (isBool cfg.emergencyAccess && cfg.emergencyAccess) { |
||||
environment.SYSTEMD_SULOGIN_FORCE = "1"; |
||||
}; |
||||
# The unit in /run/systemd/generator shadows the unit in |
||||
# /etc/systemd/system, but will still apply drop-ins from |
||||
# /etc/systemd/system/foo.service.d/ |
||||
# |
||||
# We need IgnoreOnIsolate, otherwise the Requires dependency of |
||||
# a mount unit on its makefs unit causes it to be unmounted when |
||||
# we isolate for switch-root. Use a dummy package so that |
||||
# generateUnits will generate drop-ins instead of unit files. |
||||
packages = [(pkgs.runCommand "dummy" {} '' |
||||
mkdir -p $out/etc/systemd/system |
||||
touch $out/etc/systemd/system/systemd-{makefs,growfs}@.service |
||||
'')]; |
||||
services."systemd-makefs@".unitConfig.IgnoreOnIsolate = true; |
||||
services."systemd-growfs@".unitConfig.IgnoreOnIsolate = true; |
||||
}; |
||||
}; |
||||
} |
@ -0,0 +1,27 @@ |
||||
import ./make-test-python.nix ({ lib, pkgs, ... }: { |
||||
name = "systemd-initrd-simple"; |
||||
|
||||
machine = { pkgs, ... }: { |
||||
boot.initrd.systemd = { |
||||
enable = true; |
||||
emergencyAccess = true; |
||||
}; |
||||
fileSystems = lib.mkVMOverride { |
||||
"/".autoResize = true; |
||||
}; |
||||
}; |
||||
|
||||
testScript = '' |
||||
import subprocess |
||||
|
||||
oldAvail = machine.succeed("df --output=avail / | sed 1d") |
||||
machine.shutdown() |
||||
|
||||
subprocess.check_call(["qemu-img", "resize", "vm-state-machine/machine.qcow2", "+1G"]) |
||||
|
||||
machine.start() |
||||
newAvail = machine.succeed("df --output=avail / | sed 1d") |
||||
|
||||
assert int(oldAvail) < int(newAvail), "File system did not grow" |
||||
''; |
||||
}) |
@ -1,29 +0,0 @@ |
||||
{ lib, stdenv, fetchFromGitHub, libjack2, gtk2, lv2, faust, pkg-config }: |
||||
|
||||
stdenv.mkDerivation { |
||||
version = "unstable-2015-05-21"; |
||||
pname = "foo-yc20"; |
||||
src = fetchFromGitHub { |
||||
owner = "sampov2"; |
||||
repo = "foo-yc20"; |
||||
rev = "edd9d14c91229429b14270a181743e1046160ca8"; |
||||
sha256 = "0i8261n95n4xic766h70xkrpbvw3sag96n1883ahmg6h7yb94avq"; |
||||
}; |
||||
|
||||
nativeBuildInputs = [ pkg-config ]; |
||||
buildInputs = [ libjack2 gtk2 lv2 faust ]; |
||||
|
||||
makeFlags = [ "PREFIX=$(out)" ]; |
||||
|
||||
# remove lv2 until https://github.com/sampov2/foo-yc20/issues/6 is resolved |
||||
postInstallFixup = "rm -rf $out/lib/lv2"; |
||||
|
||||
meta = with lib; { |
||||
broken = true; # see: https://github.com/sampov2/foo-yc20/issues/7 |
||||
description = "A Faust implementation of a 1969 designed Yamaha combo organ, the YC-20"; |
||||
homepage = "https://github.com/sampov2/foo-yc20"; |
||||
license = with licenses; [ bsd3 lgpl21 mpl11 ]; |
||||
maintainers = [ maintainers.magnetophon ]; |
||||
platforms = platforms.linux; |
||||
}; |
||||
} |
@ -1,84 +0,0 @@ |
||||
diff --git a/build/openal.cbd b/build/openal.cbd
|
||||
index d18e62d..74af061 100644
|
||||
--- a/build/openal.cbd
|
||||
+++ b/build/openal.cbd
|
||||
@@ -23,7 +23,7 @@ CFLAGS += ' -DUSE_OPENAL'
|
||||
# --
|
||||
|
||||
do ifplat unix
|
||||
- LDFLAGS += ' `openal-config --libs`'
|
||||
+ LDFLAGS += ' -lopenal'
|
||||
else
|
||||
LDFLAGS += ' -lOpenAL32'
|
||||
done
|
||||
diff --git a/build/alleggl.cbd b/build/alleggl.cbd
|
||||
index e2708ff..e826371 100644
|
||||
--- a/build/alleggl.cbd
|
||||
+++ b/build/alleggl.cbd
|
||||
@@ -22,7 +22,7 @@ CFLAGS += ' -DUSE_ALLEGROGL'
|
||||
|
||||
# --
|
||||
|
||||
-LIBAGL = agl
|
||||
+LIBAGL = alleggl
|
||||
|
||||
ifopt debug LIBAGL = 'agld'
|
||||
|
||||
diff --git a/src/apu.cpp b/src/apu.cpp
|
||||
index af59f1c..893a798 100644
|
||||
--- a/src/apu.cpp
|
||||
+++ b/src/apu.cpp
|
||||
@@ -1930,7 +1930,7 @@ static void amplify(real& sample)
|
||||
gain -= releaseRate;
|
||||
}
|
||||
|
||||
- real output = (1.0 / max(gain, EPSILON));
|
||||
+ real output = (1.0 / MAX(gain, EPSILON));
|
||||
output = fixf(output, apu_agc_gain_floor, apu_agc_gain_ceiling);
|
||||
sample *= output;
|
||||
}
|
||||
diff --git a/src/audio.cpp b/src/audio.cpp
|
||||
index b9650dc..c21c05e 100644
|
||||
--- a/src/audio.cpp
|
||||
+++ b/src/audio.cpp
|
||||
@@ -7,6 +7,7 @@
|
||||
You must read and accept the license prior to use. */
|
||||
|
||||
#include <allegro.h>
|
||||
+#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <vector>
|
||||
@@ -234,7 +235,7 @@ void audio_update(void)
|
||||
const unsigned queuedFrames = (audioQueue.size() / audio_channels);
|
||||
if(queuedFrames > 0) {
|
||||
// Determine how many frames we want to make room for.
|
||||
- const unsigned framesToAdd = min(queuedFrames, audio_buffer_size_frames);
|
||||
+ const unsigned framesToAdd = MIN(queuedFrames, audio_buffer_size_frames);
|
||||
// Make room for the frames in the buffer.
|
||||
const unsigned framesToMove = (audioBufferedFrames - framesToAdd);
|
||||
if(framesToMove > 0) {
|
||||
@@ -258,7 +259,7 @@ void audio_update(void)
|
||||
// Determine how many frames are available in the buffer.
|
||||
const unsigned bufferableFrames = (audio_buffer_size_frames - audioBufferedFrames);
|
||||
// Determine the number of frames to copy to the buffer.
|
||||
- const unsigned framesToCopy = min(queuedFrames, bufferableFrames);
|
||||
+ const unsigned framesToCopy = MIN(queuedFrames, bufferableFrames);
|
||||
|
||||
// Copy frames to the buffer.
|
||||
for(unsigned frame = 0; frame < framesToCopy; frame++) {
|
||||
diff --git a/src/include/common.h b/src/include/common.h
|
||||
index be28795..e2d21d1 100644
|
||||
--- a/src/include/common.h
|
||||
+++ b/src/include/common.h
|
||||
@@ -41,8 +41,10 @@ extern "C" {
|
||||
#define true TRUE
|
||||
#define false FALSE
|
||||
|
||||
+/*
|
||||
#define min(x,y) MIN((x),(y))
|
||||
#define max(x,y) MAX((x),(y))
|
||||
+*/
|
||||
|
||||
#define true_or_false(x) ((x) ? true : false)
|
||||
|
@ -1,34 +0,0 @@ |
||||
{lib, stdenv, fetchurl, allegro, openal, libGLU, libGL, zlib, hawknl, freeglut, libX11, |
||||
libXxf86vm, libXcursor, libXpm }: |
||||
|
||||
stdenv.mkDerivation rec { |
||||
pname = "fakenes"; |
||||
version = "0.5.9-beta3"; |
||||
|
||||
src = fetchurl { |
||||
url = "mirror://sourceforge/fakenes/fakenes-${version}.tar.gz"; |
||||
sha256 = "026h67s4pzc1vma59pmzk02iy379255qbai2q74wln9bxqcpniy4"; |
||||
}; |
||||
|
||||
buildInputs = [ allegro openal libGLU libGL zlib hawknl freeglut libX11 |
||||
libXxf86vm libXcursor libXpm ]; |
||||
|
||||
hardeningDisable = [ "format" ]; |
||||
|
||||
installPhase = '' |
||||
mkdir -p $out/bin |
||||
cp fakenes $out/bin |
||||
''; |
||||
|
||||
NIX_LDFLAGS = "-lX11 -lXxf86vm -lXcursor -lXpm"; |
||||
|
||||
patches = [ ./build.patch ]; |
||||
|
||||
meta = { |
||||
homepage = "http://fakenes.sourceforge.net/"; |
||||
license = lib.licenses.gpl2Plus; |
||||
description = "Portable Open Source NES Emulator"; |
||||
platforms = lib.platforms.linux; |
||||
broken = true; |
||||
}; |
||||
} |
@ -1,41 +0,0 @@ |
||||
{ lib, stdenv |
||||
, fetchurl, qttools, pkg-config |
||||
, minizip, zlib |
||||
, qtbase, qtsvg, qtmultimedia, qtwebkit, qttranslations, qtxmlpatterns |
||||
, rsync, SDL2, xwininfo |
||||
, util-linux |
||||
, xorg |
||||
}: |
||||
|
||||
stdenv.mkDerivation rec { |
||||
pname = "qmc2"; |
||||
version = "0.195"; |
||||
|
||||
src = fetchurl { |
||||
url = "mirror://sourceforge/project/qmc2/qmc2/${version}/${pname}-${version}.tar.gz"; |
||||
sha256 = "1dzmjlfk8pdspns6zg1jmd5fqzg8igd4q38cz4a1vf39lx74svns"; |
||||
}; |
||||
|
||||
preBuild = '' |
||||
patchShebangs scripts |
||||
''; |
||||
|
||||
nativeBuildInputs = [ qttools pkg-config ]; |
||||
buildInputs = [ minizip qtbase qtsvg qtmultimedia qtwebkit |
||||
qttranslations qtxmlpatterns rsync SDL2 |
||||
xwininfo zlib util-linux xorg.libxcb ]; |
||||
|
||||
makeFlags = [ "DESTDIR=$(out)" |
||||
"PREFIX=/" |
||||
"DATADIR=/share/" |
||||
"SYSCONFDIR=/etc" ]; |
||||
|
||||
meta = with lib; { |
||||
description = "A Qt frontend for MAME/MESS"; |
||||
homepage = "https://qmc2.batcom-it.net"; |
||||
license = licenses.gpl2; |
||||
maintainers = [ ]; |
||||
platforms = platforms.linux; |
||||
broken = true; |
||||
}; |
||||
} |
@ -1,54 +0,0 @@ |
||||
{ lib |
||||
, stdenv |
||||
, fetchhg |
||||
, fetchpatch |
||||
, cmake |
||||
, qt4 |
||||
, fftw |
||||
, graphicsmagick_q16 |
||||
, lcms2 |
||||
, lensfun |
||||
, pkg-config |
||||
, libjpeg |
||||
, exiv2 |
||||
, liblqr1 |
||||
}: |
||||
|
||||
stdenv.mkDerivation { |
||||
pname = "photivo"; |
||||
version = "2014-01-25"; |
||||
|
||||
src = fetchhg { |
||||
url = "http://code.google.com/p/photivo/"; |
||||
rev = "d687864489da"; |
||||
sha256 = "0f6y18k7db2ci6xn664zcwm1g1k04sdv7gg1yd5jk41bndjb7z8h"; |
||||
}; |
||||
|
||||
patches = [ |
||||
# Patch fixing build with lensfun >= 0.3, taken from |
||||
# https://www.linuxquestions.org/questions/slackware-14/photivo-4175530230/#post5296578 |
||||
(fetchpatch { |
||||
url = "https://www.linuxquestions.org/questions/attachment.php?attachmentid=17287&d=1420577220"; |
||||
name = "lensfun-0.3.patch"; |
||||
sha256 = "0ys45x4r4bjjlx0zpd5d56rgjz7k8gxili4r4k8zx3zfka4a3zwv"; |
||||
}) |
||||
./gcc6.patch |
||||
]; |
||||
|
||||
postPatch = '' # kinda icky |
||||
sed -e '/("@INSTALL@")/d' \ |
||||
-e s,@INSTALL@,$out/share/photivo, \ |
||||
-i Sources/ptSettings.cpp |
||||
sed '1i#include <math.h>' -i Sources/filters/ptFilter_StdCurve.cpp |
||||
''; |
||||
|
||||
nativeBuildInputs = [ cmake pkg-config ]; |
||||
|
||||
buildInputs = [ qt4 fftw graphicsmagick_q16 lcms2 lensfun libjpeg exiv2 liblqr1 ]; |
||||
|
||||
meta = with lib; { |
||||
platforms = platforms.linux; |
||||
license = licenses.gpl3; |
||||
broken = true; # exiv2 0.27.1 FTBFS |
||||
}; |
||||
} |
@ -1,13 +0,0 @@ |
||||
diff --git c/Sources/ptImage.cpp i/Sources/ptImage.cpp
|
||||
index 9c95093..623c157 100755
|
||||
--- c/Sources/ptImage.cpp
|
||||
+++ i/Sources/ptImage.cpp
|
||||
@@ -5291,7 +5291,7 @@ ptImage* ptImage::Box(const uint16_t MaxRadius, float* Mask) {
|
||||
NewRow = NewRow < 0? -NewRow : NewRow > Height1? Height1_2-NewRow : NewRow ;
|
||||
NewRow *= m_Width;
|
||||
for(j = -IntRadius; j <= IntRadius; j++) {
|
||||
- if (Dist[abs(i)][abs(j)] < Radius) {
|
||||
+ if (Dist[int16_t(abs(i))][int16_t(abs(j))] < Radius) {
|
||||
NewCol = Col+j;
|
||||
NewCol = NewCol < 0? -NewCol : NewCol > Width1? Width1_2-NewCol : NewCol ;
|
||||
|
@ -1,30 +0,0 @@ |
||||
{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config, |
||||
gettext, openssl |
||||
}: |
||||
|
||||
with lib; |
||||
|
||||
stdenv.mkDerivation { |
||||
pname = "notbit"; |
||||
version = "2018-01-09"; |
||||
|
||||
src = fetchFromGitHub { |
||||
owner = "bpeel"; |
||||
repo = "notbit"; |
||||
rev = "8b5d3d2da8ce54abae2536b4d97641d2c798cff3"; |
||||
sha256 = "1623n0lvx42mamvb2vwin5i38hh0nxpxzmkr5188ss2x7m20lmii"; |
||||
}; |
||||
|
||||
nativeBuildInputs = [ autoreconfHook pkg-config ]; |
||||
|
||||
buildInputs = [ openssl gettext ]; |
||||
|
||||
meta = { |
||||
description = "A minimal Bitmessage client"; |
||||
homepage = "https://github.com/bpeel/notbit"; |
||||
license = licenses.mit; |
||||
platforms = platforms.unix; |
||||
maintainers = with maintainers; [ mog ]; |
||||
broken = true; |
||||
}; |
||||
} |
@ -1,100 +0,0 @@ |
||||
diff --git a/data/assets/scene/solarsystem/planets/jupiter/jup310.asset b/data/assets/scene/solarsystem/planets/jupiter/jup310.asset
|
||||
index c15f6d9..1f8ddaf 100755
|
||||
--- a/data/assets/scene/solarsystem/planets/jupiter/jup310.asset
|
||||
+++ b/data/assets/scene/solarsystem/planets/jupiter/jup310.asset
|
||||
@@ -1,8 +1,8 @@
|
||||
-local Kernels = asset.syncedResource({
|
||||
- Name = "Jupiter Spice Kernels (jup310)",
|
||||
- Type = "TorrentSynchronization",
|
||||
- Identifier = "jup310",
|
||||
- Magnet = "magnet:?xt=urn:btih:E8B7D7E136DE1C6249158B254BFC8B9ECE2A0539&dn=jup310.bsp&tr=udp%3a%2f%2ftracker.openbittorrent.com%3a80%2fannounce&tr=udp%3a%2f%2ftracker.publicbt.com%3a80%2fannounce&tr=udp%3a%2f%2ftracker.ccc.de%3a80%2fannounce"
|
||||
-})
|
||||
+-- local Kernels = asset.syncedResource({
|
||||
+-- Name = "Jupiter Spice Kernels (jup310)",
|
||||
+-- Type = "TorrentSynchronization",
|
||||
+-- Identifier = "jup310",
|
||||
+-- Magnet = "magnet:?xt=urn:btih:E8B7D7E136DE1C6249158B254BFC8B9ECE2A0539&dn=jup310.bsp&tr=udp%3a%2f%2ftracker.openbittorrent.com%3a80%2fannounce&tr=udp%3a%2f%2ftracker.publicbt.com%3a80%2fannounce&tr=udp%3a%2f%2ftracker.ccc.de%3a80%2fannounce"
|
||||
+-- })
|
||||
|
||||
-asset.export("Kernels", Kernels .. '/jup310.bsp')
|
||||
+-- asset.export("Kernels", Kernels .. '/jup310.bsp')
|
||||
diff --git a/data/assets/scene/solarsystem/planets/mars/mar097.asset b/data/assets/scene/solarsystem/planets/mars/mar097.asset
|
||||
index e77d67d..8d738a6 100755
|
||||
--- a/data/assets/scene/solarsystem/planets/mars/mar097.asset
|
||||
+++ b/data/assets/scene/solarsystem/planets/mars/mar097.asset
|
||||
@@ -1,8 +1,8 @@
|
||||
-local Kernels = asset.syncedResource({
|
||||
- Name = "Mars Spice Kernels",
|
||||
- Type = "TorrentSynchronization",
|
||||
- Identifier = "mat097",
|
||||
- Magnet = "magnet:?xt=urn:btih:308F326B9AF864294D73042FBBED33B17291E27E&dn=mar097.bsp&tr=udp%3a%2f%2ftracker.openbittorrent.com%3a80%2fannounce&tr=udp%3a%2f%2ftracker.publicbt.com%3a80%2fannounce&tr=udp%3a%2f%2ftracker.ccc.de%3a80%2fannounce"
|
||||
-})
|
||||
+-- local Kernels = asset.syncedResource({
|
||||
+-- Name = "Mars Spice Kernels",
|
||||
+-- Type = "TorrentSynchronization",
|
||||
+-- Identifier = "mat097",
|
||||
+-- Magnet = "magnet:?xt=urn:btih:308F326B9AF864294D73042FBBED33B17291E27E&dn=mar097.bsp&tr=udp%3a%2f%2ftracker.openbittorrent.com%3a80%2fannounce&tr=udp%3a%2f%2ftracker.publicbt.com%3a80%2fannounce&tr=udp%3a%2f%2ftracker.ccc.de%3a80%2fannounce"
|
||||
+-- })
|
||||
|
||||
-asset.export("Kernels", Kernels .. '/mar097.bsp')
|
||||
+-- asset.export("Kernels", Kernels .. '/mar097.bsp')
|
||||
diff --git a/data/assets/scene/solarsystem/planets/neptune/nep081.asset b/data/assets/scene/solarsystem/planets/neptune/nep081.asset
|
||||
index e9c49ce..cfb5fac 100755
|
||||
--- a/data/assets/scene/solarsystem/planets/neptune/nep081.asset
|
||||
+++ b/data/assets/scene/solarsystem/planets/neptune/nep081.asset
|
||||
@@ -1,8 +1,8 @@
|
||||
-local Kernels = asset.syncedResource({
|
||||
- Name = "Neptune Spice Kernels (nep081)",
|
||||
- Type = "TorrentSynchronization",
|
||||
- Identifier = "nep081",
|
||||
- Magnet = "magnet:?xt=urn:btih:A6079CF8D4BF3B6BB38F4F9F633CB7724FF91693&dn=nep081.bsp&tr=udp%3a%2f%2ftracker.openbittorrent.com%3a80%2fannounce&tr=udp%3a%2f%2ftracker.publicbt.com%3a80%2fannounce&tr=udp%3a%2f%2ftracker.ccc.de%3a80%2fannounce"
|
||||
-})
|
||||
+-- local Kernels = asset.syncedResource({
|
||||
+-- Name = "Neptune Spice Kernels (nep081)",
|
||||
+-- Type = "TorrentSynchronization",
|
||||
+-- Identifier = "nep081",
|
||||
+-- Magnet = "magnet:?xt=urn:btih:A6079CF8D4BF3B6BB38F4F9F633CB7724FF91693&dn=nep081.bsp&tr=udp%3a%2f%2ftracker.openbittorrent.com%3a80%2fannounce&tr=udp%3a%2f%2ftracker.publicbt.com%3a80%2fannounce&tr=udp%3a%2f%2ftracker.ccc.de%3a80%2fannounce"
|
||||
+-- })
|
||||
|
||||
-asset.export("Kernels", Kernels .. '/nep081.bsp')
|
||||
+-- asset.export("Kernels", Kernels .. '/nep081.bsp')
|
||||
diff --git a/data/assets/scene/solarsystem/planets/saturn/sat375.asset b/data/assets/scene/solarsystem/planets/saturn/sat375.asset
|
||||
index a55f2ed..f904b3c 100755
|
||||
--- a/data/assets/scene/solarsystem/planets/saturn/sat375.asset
|
||||
+++ b/data/assets/scene/solarsystem/planets/saturn/sat375.asset
|
||||
@@ -1,8 +1,8 @@
|
||||
-local Kernels = asset.syncedResource({
|
||||
- Name = "Saturn Spice Kernels (sat375)",
|
||||
- Type = "TorrentSynchronization",
|
||||
- Identifier = "sat375",
|
||||
- Magnet = "magnet:?xt=urn:btih:79083d2069df389e65d7688bb326c7aaf1953845&dn=sat375.bsp"
|
||||
-})
|
||||
+-- local Kernels = asset.syncedResource({
|
||||
+-- Name = "Saturn Spice Kernels (sat375)",
|
||||
+-- Type = "TorrentSynchronization",
|
||||
+-- Identifier = "sat375",
|
||||
+-- Magnet = "magnet:?xt=urn:btih:79083d2069df389e65d7688bb326c7aaf1953845&dn=sat375.bsp"
|
||||
+-- })
|
||||
|
||||
-asset.export("Kernels", Kernels .. '/sat375.bsp')
|
||||
+-- asset.export("Kernels", Kernels .. '/sat375.bsp')
|
||||
diff --git a/data/assets/scene/solarsystem/planets/uranus/ura111.asset b/data/assets/scene/solarsystem/planets/uranus/ura111.asset
|
||||
index 665d059..8f95f34 100755
|
||||
--- a/data/assets/scene/solarsystem/planets/uranus/ura111.asset
|
||||
+++ b/data/assets/scene/solarsystem/planets/uranus/ura111.asset
|
||||
@@ -1,8 +1,8 @@
|
||||
-local Kernels = asset.syncedResource({
|
||||
- Name = "Uranus Spice Kernels (ura111)",
|
||||
- Type = "TorrentSynchronization",
|
||||
- Identifier = "ura111",
|
||||
- Magnet = "magnet:?xt=urn:btih:26C4903D1A12AE439480F31B45BAEB5781D2B305&dn=ura111.bsp&tr=udp%3a%2f%2ftracker.openbittorrent.com%3a80%2fannounce&tr=udp%3a%2f%2ftracker.publicbt.com%3a80%2fannounce&tr=udp%3a%2f%2ftracker.ccc.de%3a80%2fannounce"
|
||||
-})
|
||||
+-- local Kernels = asset.syncedResource({
|
||||
+-- Name = "Uranus Spice Kernels (ura111)",
|
||||
+-- Type = "TorrentSynchronization",
|
||||
+-- Identifier = "ura111",
|
||||
+-- Magnet = "magnet:?xt=urn:btih:26C4903D1A12AE439480F31B45BAEB5781D2B305&dn=ura111.bsp&tr=udp%3a%2f%2ftracker.openbittorrent.com%3a80%2fannounce&tr=udp%3a%2f%2ftracker.publicbt.com%3a80%2fannounce&tr=udp%3a%2f%2ftracker.ccc.de%3a80%2fannounce"
|
||||
+-- })
|
||||
|
||||
-asset.export("Kernels", Kernels .. '/ura111.bsp')
|
||||
+-- asset.export("Kernels", Kernels .. '/ura111.bsp')
|
@ -1,49 +0,0 @@ |
||||
diff --git a/openspace.cfg b/openspace.cfg
|
||||
index c86830b..e7f89d9 100755
|
||||
--- a/openspace.cfg
|
||||
+++ b/openspace.cfg
|
||||
@@ -2,18 +2,21 @@
|
||||
-- require('scripts/configuration_helper.lua')
|
||||
-- which defines helper functions useful to customize the configuration
|
||||
|
||||
+userdir = os.getenv("HOME") .. "/.openspace/"
|
||||
+os.execute("mkdir -p " .. userdir)
|
||||
+
|
||||
return {
|
||||
-- Determines which SGCT configuration file is loaded, that is, if there rendering
|
||||
-- occurs in a single window, a fisheye projection, or a dome cluster system
|
||||
|
||||
-- A regular 1280x720 window
|
||||
- SGCTConfig = sgct.config.single{},
|
||||
+ -- SGCTConfig = sgct.config.single{},
|
||||
|
||||
-- A regular 1920x1080 window
|
||||
-- SGCTConfig = sgct.config.single{1920, 1080},
|
||||
|
||||
-- A windowed 1920x1080 fullscreen
|
||||
- -- SGCTConfig = sgct.config.single{1920, 1080, border=false, windowPos={0,0}, shared=true, name="WV_OBS_SPOUT1"},
|
||||
+ SGCTConfig = sgct.config.single{1920, 1080, border=false, windowPos={0,0}, shared=true, name="WV_OBS_SPOUT1"},
|
||||
|
||||
-- A 1k fisheye rendering
|
||||
-- SGCTConfig = sgct.config.fisheye{1024, 1024},
|
||||
@@ -53,15 +56,15 @@ return {
|
||||
TASKS = "${DATA}/tasks",
|
||||
WEB = "${DATA}/web",
|
||||
|
||||
- CACHE = "${BASE}/cache",
|
||||
+ CACHE = userdir .. "cache",
|
||||
CONFIG = "${BASE}/config",
|
||||
- DOCUMENTATION = "${BASE}/documentation",
|
||||
- LOGS = "${BASE}/logs",
|
||||
+ DOCUMENTATION = userdir .. "documentation",
|
||||
+ LOGS = userdir .. "logs",
|
||||
MODULES = "${BASE}/modules",
|
||||
SCRIPTS = "${BASE}/scripts",
|
||||
SHADERS = "${BASE}/shaders",
|
||||
- SYNC = "${BASE}/sync",
|
||||
- TESTDIR = "${BASE}/tests"
|
||||
+ SYNC = userdir .. "sync",
|
||||
+ TESTDIR = userdir .. "tests"
|
||||
},
|
||||
Fonts = {
|
||||
Mono = "${FONTS}/Bitstream-Vera-Sans-Mono/VeraMono.ttf",
|
@ -1,91 +0,0 @@ |
||||
diff --git a/include/openspace/util/distanceconversion.h b/include/openspace/util/distanceconversion.h
|
||||
index 80a3a96..7059752 100755
|
||||
--- a/include/openspace/util/distanceconversion.h
|
||||
+++ b/include/openspace/util/distanceconversion.h
|
||||
@@ -159,24 +159,34 @@ constexpr const char* nameForDistanceUnit(DistanceUnit unit, bool pluralForm = f
|
||||
}
|
||||
|
||||
constexpr DistanceUnit distanceUnitFromString(const char* unitName) {
|
||||
+ int result = -1;
|
||||
+
|
||||
int i = 0;
|
||||
for (const char* val : DistanceUnitNamesSingular) {
|
||||
if (ghoul::equal(unitName, val)) {
|
||||
- return static_cast<DistanceUnit>(i);
|
||||
+ result = i;
|
||||
+ break;
|
||||
}
|
||||
++i;
|
||||
}
|
||||
|
||||
- i = 0;
|
||||
- for (const char* val : DistanceUnitNamesPlural) {
|
||||
- if (ghoul::equal(unitName, val)) {
|
||||
- return static_cast<DistanceUnit>(i);
|
||||
+ if (result == -1) {
|
||||
+ i = 0;
|
||||
+ for (const char* val : DistanceUnitNamesPlural) {
|
||||
+ if (ghoul::equal(unitName, val)) {
|
||||
+ result = i;
|
||||
+ break;
|
||||
+ }
|
||||
+ ++i;
|
||||
}
|
||||
- ++i;
|
||||
}
|
||||
|
||||
- ghoul_assert(false, "Unit name is not a valid name");
|
||||
- throw ghoul::MissingCaseException();
|
||||
+ if (result != -1)
|
||||
+ return static_cast<DistanceUnit>(result);
|
||||
+ else {
|
||||
+ ghoul_assert(false, "Unit name is not a valid name");
|
||||
+ throw ghoul::MissingCaseException();
|
||||
+ }
|
||||
}
|
||||
|
||||
|
||||
diff --git a/include/openspace/util/timeconversion.h b/include/openspace/util/timeconversion.h
|
||||
index a36c92a..699bca9 100755
|
||||
--- a/include/openspace/util/timeconversion.h
|
||||
+++ b/include/openspace/util/timeconversion.h
|
||||
@@ -142,23 +142,32 @@ constexpr const char* nameForTimeUnit(TimeUnit unit, bool pluralForm = false) {
|
||||
}
|
||||
|
||||
constexpr TimeUnit timeUnitFromString(const char* unitName) {
|
||||
+ int result = -1;
|
||||
+
|
||||
int i = 0;
|
||||
for (const char* val : TimeUnitNamesSingular) {
|
||||
if (ghoul::equal(unitName, val)) {
|
||||
- return static_cast<TimeUnit>(i);
|
||||
+ result = i;
|
||||
+ break;
|
||||
}
|
||||
++i;
|
||||
}
|
||||
|
||||
- i = 0;
|
||||
- for (const char* val : TimeUnitNamesPlural) {
|
||||
- if (ghoul::equal(unitName, val)) {
|
||||
- return static_cast<TimeUnit>(i);
|
||||
+ if (result == -1) {
|
||||
+ i = 0;
|
||||
+ for (const char* val : TimeUnitNamesPlural) {
|
||||
+ if (ghoul::equal(unitName, val)) {
|
||||
+ result = i;
|
||||
+ break;
|
||||
+ }
|
||||
+ ++i;
|
||||
}
|
||||
- ++i;
|
||||
}
|
||||
|
||||
- throw ghoul::MissingCaseException();
|
||||
+ if (result != -1)
|
||||
+ return static_cast<TimeUnit>(result);
|
||||
+ else
|
||||
+ throw ghoul::MissingCaseException();
|
||||
}
|
||||
|
||||
std::pair<double, std::string> simplifyTime(double seconds,
|
@ -1,90 +0,0 @@ |
||||
{ lib, stdenv, fetchFromGitHub, fetchurl, makeWrapper, cmake |
||||
, curl, boost, gdal, glew, soil |
||||
, libX11, libXi, libXxf86vm, libXcursor, libXrandr, libXinerama }: |
||||
|
||||
stdenv.mkDerivation rec { |
||||
version = "0.11.1"; |
||||
pname = "openspace"; |
||||
|
||||
src = fetchFromGitHub { |
||||
owner = "OpenSpace"; |
||||
repo = "OpenSpace"; |
||||
rev = "a65eea61a1b8807ce3d69e9925e75f8e3dfb085d"; |
||||
sha256 = "0msqixf30r0d41xmfmzkdfw6w9jkx2ph5clq8xiwrg1jc3z9q7nv"; |
||||
fetchSubmodules = true; |
||||
}; |
||||
|
||||
nativeBuildInputs = [ cmake makeWrapper ]; |
||||
buildInputs = [ |
||||
curl boost gdal glew soil |
||||
libX11 libXi libXxf86vm libXcursor libXrandr libXinerama |
||||
]; |
||||
|
||||
glmPlatformH = fetchurl { |
||||
url = "https://raw.githubusercontent.com/g-truc/glm/dd48b56e44d699a022c69155c8672caacafd9e8a/glm/simd/platform.h"; |
||||
sha256 = "0y91hlbgn5va7ijg5mz823gqkq9hqxl00lwmdwnf8q2g086rplzw"; |
||||
}; |
||||
|
||||
# See <https://github.com/g-truc/glm/issues/726> |
||||
prePatch = '' |
||||
cp ${glmPlatformH} ext/sgct/include/glm/simd/platform.h |
||||
cp ${glmPlatformH} ext/ghoul/ext/glm/glm/simd/platform.h |
||||
''; |
||||
|
||||
patches = [ |
||||
# See <https://github.com/opensgct/sgct/issues/13> |
||||
./vrpn.patch |
||||
|
||||
./constexpr.patch |
||||
./config.patch |
||||
|
||||
# WARNING: This patch disables some slow torrents in a very dirty way. |
||||
./assets.patch |
||||
]; |
||||
|
||||
bundle = "$out/usr/share/openspace"; |
||||
|
||||
preConfigure = '' |
||||
cmakeFlagsArray=( |
||||
$cmakeFlagsArray |
||||
"-DCMAKE_BUILD_TYPE=" |
||||
"-DCMAKE_INSTALL_PREFIX=${bundle}" |
||||
) |
||||
''; |
||||
|
||||
preInstall = '' |
||||
mkdir -p $out/bin |
||||
mkdir -p ${bundle} |
||||
''; |
||||
|
||||
postInstall = '' |
||||
cp ext/spice/libSpice.so ${bundle}/lib |
||||
cp ext/ghoul/ext/lua/libLua.so ${bundle}/lib |
||||
''; |
||||
|
||||
postFixup = '' |
||||
for bin in ${bundle}/bin/* |
||||
do |
||||
rpath=$(patchelf --print-rpath $bin) |
||||
patchelf --set-rpath $rpath:${bundle}/lib $bin |
||||
|
||||
name=$(basename $bin) |
||||
makeWrapper $bin $out/bin/$name --run "cd ${bundle}" |
||||
done |
||||
''; |
||||
|
||||
meta = { |
||||
description = "Open-source astrovisualization project"; |
||||
longDescription = '' |
||||
OpenSpace is open source interactive data visualization software |
||||
designed to visualize the entire known universe and portray our |
||||
ongoing efforts to investigate the cosmos. |
||||
|
||||
WARNING: This build is not very usable for now. |
||||
''; |
||||
homepage = "https://www.openspaceproject.com/"; |
||||
license = lib.licenses.mit; |
||||
platforms = lib.platforms.linux; |
||||
broken = true; # fails to build |
||||
}; |
||||
} |
@ -1,13 +0,0 @@ |
||||
diff --git a/ext/sgct/src/deps/vrpn/vrpn_Connection.C b/ext/sgct/src/deps/vrpn/vrpn_Connection.C
|
||||
index d6ffdc5..f90a2b2 100755
|
||||
--- a/ext/sgct/src/deps/vrpn/vrpn_Connection.C
|
||||
+++ b/ext/sgct/src/deps/vrpn/vrpn_Connection.C
|
||||
@@ -2489,7 +2489,7 @@ static int vrpn_start_server(const char *machine, char *server_name, char *args,
|
||||
#if defined(sparc) || defined(FreeBSD) || defined(_AIX) || defined(__ANDROID__)
|
||||
int status; // doesn't exist on sparc_solaris or FreeBSD
|
||||
#else
|
||||
- union wait status;
|
||||
+ int status;
|
||||
#endif
|
||||
|
||||
/* Check to see if they called back yet. */
|
@ -1,34 +0,0 @@ |
||||
{stdenv, fetchurl, cpio}: |
||||
|
||||
# The NCBI package only builds on 32bits - on 64bits it breaks because |
||||
# of position dependent code. Debian packagers have written replacement |
||||
# make files(!). Either we use these, or negotiate a version which can |
||||
# be pushed upstream to NCBI. |
||||
# |
||||
# Another note: you may want the older and deprecated C-libs at ftp://ftp.ncbi.nih.gov/toolbox/ncbi_tools++/2008/Mar_17_2008/NCBI_C_Toolkit/ncbi_c--Mar_17_2008.tar.gz |
||||
|
||||
stdenv.mkDerivation rec { |
||||
pname = "ncbi_tools"; |
||||
version = "Dec_31_2008"; |
||||
src = fetchurl { |
||||
url = "ftp://ftp.ncbi.nih.gov/toolbox/ncbi_tools++/2008/${version}/ncbi_cxx--${version}.tar.gz"; |
||||
sha256 = "1b2v0dcdqn3bysgdkj57sxmd6s0hc9wpnxssviz399g6plhxggbr"; |
||||
}; |
||||
|
||||
configureFlags = [ |
||||
"--without-debug" |
||||
"--with-bin-release" |
||||
"--with-dll" |
||||
"--without-static" |
||||
]; |
||||
buildInputs = [ cpio ]; |
||||
|
||||
meta = { |
||||
description = "NCBI Bioinformatics toolbox (incl. BLAST)"; |
||||
longDescription = "The NCBI Bioinformatics toolsbox, including command-line utilties, libraries and include files. No X11 support"; |
||||
homepage = "http://www.ncbi.nlm.nih.gov/IEB/ToolBox/"; |
||||
license = "GPL"; |
||||
priority = 5; # zlib.so gives a conflict with zlib |
||||
broken = true; |
||||
}; |
||||
} |
@ -1,35 +0,0 @@ |
||||
{ fetchgit, lib, stdenv, smlnj, which }: |
||||
|
||||
stdenv.mkDerivation rec { |
||||
pname = "jonprl"; |
||||
version = "0.1.0"; |
||||
|
||||
src = fetchgit { |
||||
url = "https://github.com/jonsterling/JonPRL.git"; |
||||
deepClone = true; |
||||
rev = "refs/tags/v${version}"; |
||||
sha256 = "0czs13syvnw8fz24d075n4pmsyfs8rs8c7ksmvd7cgb3h55fvp4p"; |
||||
}; |
||||
|
||||
buildInputs = [ smlnj which ]; |
||||
|
||||
installPhase = '' |
||||
mkdir -p "$out/bin" |
||||
cp bin/.heapimg.* "$out/bin/" |
||||
build/mkexec.sh "${smlnj}/bin/sml" "$out" jonprl |
||||
''; |
||||
|
||||
meta = { |
||||
description = "Proof Refinement Logic - Computational Type Theory"; |
||||
longDescription = '' |
||||
An proof refinement logic for computational type theory |
||||
based on Brouwer-realizability & meaning explanations. |
||||
Inspired by Nuprl |
||||
''; |
||||
homepage = "https://github.com/jonsterling/JonPRL"; |
||||
license = lib.licenses.mit; |
||||
maintainers = with lib.maintainers; [ puffnfresh ]; |
||||
platforms = lib.platforms.linux; |
||||
broken = true; |
||||
}; |
||||
} |
@ -1,37 +0,0 @@ |
||||
{ lib, stdenv, fetchFromGitHub, cmake, gmp, mpfr, python2 |
||||
, gperftools, ninja, makeWrapper }: |
||||
|
||||
stdenv.mkDerivation { |
||||
pname = "lean2"; |
||||
version = "2017-07-22"; |
||||
|
||||
src = fetchFromGitHub { |
||||
owner = "leanprover"; |
||||
repo = "lean2"; |
||||
rev = "34dbd6c3ae612186b8f0f80d12fbf5ae7a059ec9"; |
||||
sha256 = "1xv3j487zhh1zf2b4v19xzw63s2sgjhg8d62a0kxxyknfmdf3khl"; |
||||
}; |
||||
|
||||
nativeBuildInputs = [ cmake makeWrapper ninja ]; |
||||
buildInputs = [ gmp mpfr python2 gperftools ]; |
||||
|
||||
preConfigure = '' |
||||
patchShebangs bin/leantags |
||||
cd src |
||||
''; |
||||
|
||||
cmakeFlags = [ "-GNinja" ]; |
||||
|
||||
postInstall = '' |
||||
wrapProgram $out/bin/linja --prefix PATH : $out/bin:${ninja}/bin |
||||
''; |
||||
|
||||
meta = with lib; { |
||||
description = "Automatic and interactive theorem prover (version with HoTT support)"; |
||||
homepage = "http://leanprover.github.io"; |
||||
license = licenses.asl20; |
||||
platforms = platforms.unix; |
||||
maintainers = with maintainers; [ thoughtpolice gebner ]; |
||||
broken = true; |
||||
}; |
||||
} |
@ -1,53 +0,0 @@ |
||||
{lib, stdenv, fetchurl, tcsh, libXaw, libXt, libX11}: |
||||
let |
||||
s = # Generated upstream information |
||||
rec { |
||||
version = "3.3f"; |
||||
name = "otter"; |
||||
url = "https://www.cs.unm.edu/~mccune/otter/otter-${version}.tar.gz"; |
||||
sha256 = "16mc1npl7sk9cmqhrf3ghfmvx29inijw76f1b1lsykllaxjqqb1r"; |
||||
}; |
||||
buildInputs = [ |
||||
tcsh libXaw libXt libX11 |
||||
]; |
||||
in |
||||
stdenv.mkDerivation { |
||||
name = "${s.name}-${s.version}"; |
||||
inherit buildInputs; |
||||
src = fetchurl { |
||||
inherit (s) url sha256; |
||||
}; |
||||
|
||||
hardeningDisable = [ "format" ]; |
||||
|
||||
buildPhase = '' |
||||
find . -name Makefile | xargs sed -i -e "s@/bin/rm@$(type -P rm)@g" |
||||
find . -name Makefile | xargs sed -i -e "s@/bin/mv@$(type -P mv)@g" |
||||
find . -perm -0100 -type f | xargs sed -i -e "s@/bin/csh@$(type -P csh)@g" |
||||
find . -perm -0100 -type f | xargs sed -i -e "s@/bin/rm@$(type -P rm)@g" |
||||
find . -perm -0100 -type f | xargs sed -i -e "s@/bin/mv@$(type -P mv)@g" |
||||
|
||||
sed -i -e "s/^XLIBS *=.*/XLIBS=-lXaw -lXt -lX11/" source/formed/Makefile |
||||
|
||||
make all |
||||
make -C examples all |
||||
make -C examples-mace2 all |
||||
make -C source/formed realclean |
||||
make -C source/formed formed |
||||
''; |
||||
|
||||
installPhase = '' |
||||
mkdir -p "$out"/{bin,share/otter} |
||||
cp bin/* source/formed/formed "$out/bin/" |
||||
cp -r examples examples-mace2 documents README* Legal Changelog Contents index.html "$out/share/otter/" |
||||
''; |
||||
|
||||
meta = { |
||||
inherit (s) version; |
||||
description = "A reliable first-order theorem prover"; |
||||
license = lib.licenses.publicDomain ; |
||||
maintainers = [lib.maintainers.raskin]; |
||||
platforms = lib.platforms.linux; |
||||
broken = true; |
||||
}; |
||||
} |
@ -1,77 +0,0 @@ |
||||
{ lib |
||||
, stdenv |
||||
, fetchFromGitHub |
||||
, pkg-config |
||||
, cmake |
||||
, eigen |
||||
, opencv |
||||
, ceres-solver |
||||
, cgal |
||||
, boost |
||||
, vcg |
||||
, gmp |
||||
, mpfr |
||||
, glog |
||||
, gflags |
||||
, libjpeg_turbo |
||||
}: |
||||
|
||||
stdenv.mkDerivation { |
||||
pname = "openmvs"; |
||||
version = "unstable-2018-05-26"; |
||||
|
||||
src = fetchFromGitHub { |
||||
owner = "cdcseacave"; |
||||
repo = "openmvs"; |
||||
rev = "939033c55b50478339084431aac2c2318041afad"; |
||||
sha256 = "12dgkwwfdp24581y3i41gsd1k9hq0aw917q0ja5s0if4qbmc8pni"; |
||||
}; |
||||
|
||||
buildInputs = [ eigen opencv ceres-solver cgal boost vcg gmp mpfr glog gflags libjpeg_turbo ]; |
||||
|
||||
nativeBuildInputs = [ cmake pkg-config ]; |
||||
|
||||
preConfigure = '' |
||||
cmakeFlagsArray=( |
||||
$cmakeFlagsArray |
||||
"-DCMAKE_CXX_FLAGS=-std=c++11" |
||||
"-DBUILD_SHARED_LIBS=ON" |
||||
"-DBUILD_STATIC_RUNTIME=ON" |
||||
"-DINSTALL_BIN_DIR=$out/bin" |
||||
"-DVCG_DIR=${vcg}" |
||||
"-DCGAL_ROOT=${cgal}/lib/cmake/CGAL" |
||||
"-DCERES_DIR=${ceres-solver}/lib/cmake/Ceres/" |
||||
) |
||||
''; |
||||
|
||||
postFixup = '' |
||||
rp=$(patchelf --print-rpath $out/bin/DensifyPointCloud) |
||||
patchelf --set-rpath $rp:$out/lib/OpenMVS $out/bin/DensifyPointCloud |
||||
|
||||
rp=$(patchelf --print-rpath $out/bin/InterfaceVisualSFM) |
||||
patchelf --set-rpath $rp:$out/lib/OpenMVS $out/bin/InterfaceVisualSFM |
||||
|
||||
rp=$(patchelf --print-rpath $out/bin/ReconstructMesh) |
||||
patchelf --set-rpath $rp:$out/lib/OpenMVS $out/bin/ReconstructMesh |
||||
|
||||
rp=$(patchelf --print-rpath $out/bin/RefineMesh) |
||||
patchelf --set-rpath $rp:$out/lib/OpenMVS $out/bin/RefineMesh |
||||
|
||||
rp=$(patchelf --print-rpath $out/bin/TextureMesh) |
||||
patchelf --set-rpath $rp:$out/lib/OpenMVS $out/bin/TextureMesh |
||||
''; |
||||
|
||||
cmakeDir = "./"; |
||||
|
||||
dontUseCmakeBuildDir = true; |
||||
|
||||
meta = with lib; { |
||||
description = "A library for computer-vision scientists and especially targeted to the Multi-View Stereo reconstruction community"; |
||||
homepage = "http://cdcseacave.github.io/openMVS/"; |
||||
license = licenses.agpl3; |
||||
platforms = platforms.linux; |
||||
maintainers = with maintainers; [ mdaiter ]; |
||||
# 20190414-174115: CMake cannot find CGAL which is passed as build input |
||||
broken = true; |
||||
}; |
||||
} |
@ -1,56 +0,0 @@ |
||||
{ lib, stdenv, fetchurl, perl, gperf, bison, groff |
||||
, pkg-config, libXft, pcre |
||||
, libtomcrypt, libtommath, lz4 }: |
||||
|
||||
stdenv.mkDerivation rec { |
||||
pname = "bitkeeper"; |
||||
version = "7.3.1ce"; |
||||
|
||||
src = fetchurl { |
||||
url = "https://www.bitkeeper.org/downloads/${version}/bk-${version}.src.tar.gz"; |
||||
sha256 = "0l6jwvcg4s1q00vb01hdv58jgv03l8x5mhjl73cwgfiff80zx147"; |
||||
}; |
||||
|
||||
hardeningDisable = [ "fortify" ]; |
||||
|
||||
enableParallelBuilding = true; |
||||
|
||||
nativeBuildInputs = [ pkg-config ]; |
||||
buildInputs = [ |
||||
perl gperf bison groff libXft |
||||
pcre libtomcrypt libtommath lz4 |
||||
]; |
||||
|
||||
postPatch = '' |
||||
substituteInPlace port/unix_platform.sh \ |
||||
--replace /bin/rm rm |
||||
substituteInPlace ./undo.c \ |
||||
--replace /bin/cat cat |
||||
''; |
||||
|
||||
sourceRoot = "bk-${version}/src"; |
||||
buildPhase = '' |
||||
make -j6 V=1 p |
||||
make image |
||||
''; |
||||
|
||||
installPhase = '' |
||||
./utils/bk-* $out/bitkeeper |
||||
mkdir -p $out/bin |
||||
$out/bitkeeper/bk links $out/bin |
||||
chmod g-w $out |
||||
''; |
||||
|
||||
meta = { |
||||
description = "A distributed version control system"; |
||||
longDescription = '' |
||||
BitKeeper is a fast, enterprise-ready, distributed SCM that |
||||
scales up to very large projects and down to tiny ones. |
||||
''; |
||||
homepage = "https://www.bitkeeper.org/"; |
||||
license = lib.licenses.asl20; |
||||
platforms = lib.platforms.linux; |
||||
maintainers = with lib.maintainers; [ wscott thoughtpolice ]; |
||||
broken = true; # seems to fail on recent glibc versions |
||||
}; |
||||
} |
@ -1,58 +0,0 @@ |
||||
{ lib, stdenv |
||||
, fetchFromGitHub |
||||
, openssl_1_0_2 |
||||
, zlib |
||||
, libssh |
||||
, cmake |
||||
, perl |
||||
, pkg-config |
||||
, rustPlatform |
||||
, curl |
||||
, libiconv |
||||
, CoreFoundation |
||||
, Security |
||||
}: |
||||
|
||||
with rustPlatform; |
||||
|
||||
buildRustPackage rec { |
||||
pname = "git-dit"; |
||||
version = "0.4.0"; |
||||
|
||||
src = fetchFromGitHub { |
||||
owner = "neithernut"; |
||||
repo = "git-dit"; |
||||
rev = "v${version}"; |
||||
sha256 = "1sx6sc2dj3l61gbiqz8vfyhw5w4xjdyfzn1ixz0y8ipm579yc7a2"; |
||||
}; |
||||
|
||||
cargoSha256 = "1vbcwl4aii0x4l8w9jhm70vi4s95jr138ly65jpkkv26rl6zjiph"; |
||||
|
||||
nativeBuildInputs = [ |
||||
cmake |
||||
pkg-config |
||||
perl |
||||
]; |
||||
|
||||
buildInputs = [ |
||||
openssl_1_0_2 |
||||
libssh |
||||
zlib |
||||
] ++ lib.optionals (stdenv.isDarwin) [ |
||||
curl |
||||
libiconv |
||||
CoreFoundation |
||||
Security |
||||
]; |
||||
|
||||
meta = with lib; { |
||||
inherit (src.meta) homepage; |
||||
description = "Decentralized Issue Tracking for git"; |
||||
# This has not had a release in years and its cargo vendored dependencies |
||||
# fail to compile. It also depends on an unsupported openssl: |
||||
# https://github.com/NixOS/nixpkgs/issues/77503 |
||||
broken = true; |
||||
license = licenses.gpl2; |
||||
maintainers = with maintainers; [ Profpatsch matthiasbeyer ]; |
||||
}; |
||||
} |
@ -1,51 +0,0 @@ |
||||
{ lib, stdenv, fetchgit, autoconf, sbcl, lispPackages, xdpyinfo, texinfo4 |
||||
, makeWrapper }: |
||||
|
||||
stdenv.mkDerivation { |
||||
pname = "clfswm"; |
||||
version = "unstable-2016-11-12"; |
||||
|
||||
src = fetchgit { |
||||
url = "https://gitlab.common-lisp.net/clfswm/clfswm.git"; |
||||
rev = "3c7721dba6339ebb4f8c8d7ce2341740fa86f837"; |
||||
sha256 = "0hynzh3a1zr719cxfb0k4cvh5lskzs616hwn7p942isyvhwzhynd"; |
||||
}; |
||||
|
||||
buildInputs = [ |
||||
texinfo4 makeWrapper autoconf |
||||
sbcl |
||||
lispPackages.clx |
||||
lispPackages.cl-ppcre |
||||
xdpyinfo |
||||
]; |
||||
|
||||
patches = [ ./require-clx.patch ]; |
||||
|
||||
# Stripping destroys the generated SBCL image |
||||
dontStrip = true; |
||||
|
||||
configurePhase = '' |
||||
substituteInPlace load.lisp --replace \ |
||||
";; (setf *contrib-dir* \"/usr/local/lib/clfswm/\")" \ |
||||
"(setf *contrib-dir* \"$out/lib/clfswm/\")" |
||||
''; |
||||
|
||||
installPhase = '' |
||||
mkdir -pv $out/bin |
||||
make DESTDIR=$out install |
||||
|
||||
# Paths in the compressed image $out/bin/clfswm are not |
||||
# recognized by Nix. Add explicit reference here. |
||||
mkdir $out/nix-support |
||||
echo ${xdpyinfo} ${lispPackages.clx} ${lispPackages.cl-ppcre} > $out/nix-support/depends |
||||
''; |
||||
|
||||
meta = with lib; { |
||||
description = "A(nother) Common Lisp FullScreen Window Manager"; |
||||
homepage = "https://common-lisp.net/project/clfswm/"; |
||||
license = licenses.gpl3; |
||||
maintainers = with maintainers; [ robgssp ]; |
||||
platforms = platforms.linux; |
||||
broken = true; |
||||
}; |
||||
} |
@ -1,13 +0,0 @@ |
||||
diff --git a/load.lisp b/load.lisp
|
||||
index c8c4cf0..8c9ca2e 100644
|
||||
--- a/load.lisp
|
||||
+++ b/load.lisp
|
||||
@@ -111,6 +111,8 @@ from $XDG_CONFIG_HOME/clfswm/clfswmrc")
|
||||
;;;------------------
|
||||
(load-info "Requiring CLX")
|
||||
|
||||
+(require 'clx)
|
||||
+
|
||||
;;; Loading clisp dynamic module. This part needs clisp >= 2.50
|
||||
;;#+(AND CLISP (not CLX))
|
||||
;;(when (fboundp 'require)
|
@ -0,0 +1,24 @@ |
||||
# Provide a /etc/passwd and /etc/group that contain root and nobody. |
||||
# Useful when packaging binaries that insist on using nss to look up |
||||
# username/groups (like nginx). |
||||
# /bin/sh is fine to not exist, and provided by another shim. |
||||
{ symlinkJoin, writeTextDir, runCommand }: |
||||
symlinkJoin { |
||||
name = "fake-nss"; |
||||
paths = [ |
||||
(writeTextDir "etc/passwd" '' |
||||
root:x:0:0:root user:/var/empty:/bin/sh |
||||
nobody:x:65534:65534:nobody:/var/empty:/bin/sh |
||||
'') |
||||
(writeTextDir "etc/group" '' |
||||
root:x:0: |
||||
nobody:x:65534: |
||||
'') |
||||
(writeTextDir "etc/nsswitch.conf" '' |
||||
hosts: files dns |
||||
'') |
||||
(runCommand "var-empty" { } '' |
||||
mkdir -p $out/var/empty |
||||
'') |
||||
]; |
||||
} |
@ -0,0 +1,9 @@ |
||||
{ rustPlatform }: |
||||
|
||||
rustPlatform.buildRustPackage { |
||||
pname = "make-initrd-ng"; |
||||
version = "0.1.0"; |
||||
|
||||
src = ./make-initrd-ng; |
||||
cargoLock.lockFile = ./make-initrd-ng/Cargo.lock; |
||||
} |
@ -0,0 +1,79 @@ |
||||
let |
||||
# Some metadata on various compression programs, relevant to naming |
||||
# the initramfs file and, if applicable, generating a u-boot image |
||||
# from it. |
||||
compressors = import ./initrd-compressor-meta.nix; |
||||
# Get the basename of the actual compression program from the whole |
||||
# compression command, for the purpose of guessing the u-boot |
||||
# compression type and filename extension. |
||||
compressorName = fullCommand: builtins.elemAt (builtins.match "([^ ]*/)?([^ ]+).*" fullCommand) 1; |
||||
in |
||||
{ stdenvNoCC, perl, cpio, ubootTools, lib, pkgsBuildHost, makeInitrdNGTool, patchelf, runCommand, glibc |
||||
# Name of the derivation (not of the resulting file!) |
||||
, name ? "initrd" |
||||
|
||||
# Program used to compress the cpio archive; use "cat" for no compression. |
||||
# This can also be a function which takes a package set and returns the path to the compressor, |
||||
# such as `pkgs: "${pkgs.lzop}/bin/lzop"`. |
||||
, compressor ? "gzip" |
||||
, _compressorFunction ? |
||||
if lib.isFunction compressor then compressor |
||||
else if ! builtins.hasContext compressor && builtins.hasAttr compressor compressors then compressors.${compressor}.executable |
||||
else _: compressor |
||||
, _compressorExecutable ? _compressorFunction pkgsBuildHost |
||||
, _compressorName ? compressorName _compressorExecutable |
||||
, _compressorMeta ? compressors.${_compressorName} or {} |
||||
|
||||
# List of arguments to pass to the compressor program, or null to use its defaults |
||||
, compressorArgs ? null |
||||
, _compressorArgsReal ? if compressorArgs == null then _compressorMeta.defaultArgs or [] else compressorArgs |
||||
|
||||
# Filename extension to use for the compressed initramfs. This is |
||||
# included for clarity, but $out/initrd will always be a symlink to |
||||
# the final image. |
||||
# If this isn't guessed, you may want to complete the metadata above and send a PR :) |
||||
, extension ? _compressorMeta.extension or |
||||
(throw "Unrecognised compressor ${_compressorName}, please specify filename extension") |
||||
|
||||
# List of { object = path_or_derivation; symlink = "/path"; } |
||||
# The paths are copied into the initramfs in their nix store path |
||||
# form, then linked at the root according to `symlink`. |
||||
, contents |
||||
|
||||
# List of uncompressed cpio files to prepend to the initramfs. This |
||||
# can be used to add files in specified paths without them becoming |
||||
# symlinks to store paths. |
||||
, prepend ? [] |
||||
|
||||
# Whether to wrap the initramfs in a u-boot image. |
||||
, makeUInitrd ? stdenvNoCC.hostPlatform.linux-kernel.target == "uImage" |
||||
|
||||
# If generating a u-boot image, the architecture to use. The default |
||||
# guess may not align with u-boot's nomenclature correctly, so it can |
||||
# be overridden. |
||||
# See https://gitlab.denx.de/u-boot/u-boot/-/blob/9bfb567e5f1bfe7de8eb41f8c6d00f49d2b9a426/common/image.c#L81-106 for a list. |
||||
, uInitrdArch ? stdenvNoCC.hostPlatform.linuxArch |
||||
|
||||
# The name of the compression, as recognised by u-boot. |
||||
# See https://gitlab.denx.de/u-boot/u-boot/-/blob/9bfb567e5f1bfe7de8eb41f8c6d00f49d2b9a426/common/image.c#L195-204 for a list. |
||||
# If this isn't guessed, you may want to complete the metadata above and send a PR :) |
||||
, uInitrdCompression ? _compressorMeta.ubootName or |
||||
(throw "Unrecognised compressor ${_compressorName}, please specify uInitrdCompression") |
||||
}: runCommand name { |
||||
compress = "${_compressorExecutable} ${lib.escapeShellArgs _compressorArgsReal}"; |
||||
passthru = { |
||||
compressorExecutableFunction = _compressorFunction; |
||||
compressorArgs = _compressorArgsReal; |
||||
}; |
||||
|
||||
passAsFile = ["contents"]; |
||||
contents = lib.concatMapStringsSep "\n" ({ object, symlink, ... }: "${object}\n${if symlink == null then "" else symlink}") contents + "\n"; |
||||
|
||||
nativeBuildInputs = [makeInitrdNGTool patchelf glibc cpio]; |
||||
} '' |
||||
mkdir ./root |
||||
make-initrd-ng "$contentsPath" ./root |
||||
mkdir "$out" |
||||
(cd root && find * .[^.*] -exec touch -h -d '@1' '{}' +) |
||||
(cd root && find * .[^.*] -print0 | sort -z | cpio -o -H newc -R +0:+0 --reproducible --null | eval -- $compress >> "$out/initrd") |
||||
'' |
@ -0,0 +1,5 @@ |
||||
# This file is automatically @generated by Cargo. |
||||
# It is not intended for manual editing. |
||||
[[package]] |
||||
name = "make-initrd-ng" |
||||
version = "0.1.0" |
@ -0,0 +1,9 @@ |
||||
[package] |
||||
name = "make-initrd-ng" |
||||
version = "0.1.0" |
||||
authors = ["Will Fancher <elvishjerricco@gmail.com>"] |
||||
edition = "2018" |
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html |
||||
|
||||
[dependencies] |
@ -0,0 +1,79 @@ |
||||
# What is this for? |
||||
|
||||
NixOS's traditional initrd is generated by listing the paths that |
||||
should be included in initrd and copying the full runtime closure of |
||||
those paths into the archive. For most things, like almost any |
||||
executable, this involves copying the entirety of huge packages like |
||||
glibc, when only things like the shared library files are needed. To |
||||
solve this, NixOS does a variety of patchwork to edit the files being |
||||
copied in so they only refer to small, patched up paths. For instance, |
||||
executables and their shared library dependencies are copied into an |
||||
`extraUtils` derivation, and every ELF file is patched to refer to |
||||
files in that output. |
||||
|
||||
The problem with this is that it is often difficult to correctly patch |
||||
some things. For instance, systemd bakes the path to the `mount` |
||||
command into the binary, so patchelf is no help. Instead, it's very |
||||
often easier to simply copy the desired files to their original store |
||||
locations in initrd and not copy their entire runtime closure. This |
||||
does mean that it is the burden of the developer to ensure that all |
||||
necessary dependencies are copied in, as closures won't be |
||||
consulted. However, it is rare that full closures are actually |
||||
desirable, so in the traditional initrd, the developer was likely to |
||||
do manual work on patching the dependencies explicitly anyway. |
||||
|
||||
# How it works |
||||
|
||||
This program is similar to its inspiration (`find-libs` from the |
||||
traditional initrd), except that it also handles symlinks and |
||||
directories according to certain rules. As input, it receives a |
||||
sequence of pairs of paths. The first path is an object to copy into |
||||
initrd. The second path (if not empty) is the path to a symlink that |
||||
should be placed in the initrd, pointing to that object. How that |
||||
object is copied depends on its type. |
||||
|
||||
1. A regular file is copied directly to the same absolute path in the |
||||
initrd. |
||||
|
||||
- If it is *also* an ELF file, then all of its direct shared |
||||
library dependencies are also listed as objects to be copied. |
||||
|
||||
2. A directory's direct children are listed as objects to be copied, |
||||
and a directory at the same absolute path in the initrd is created. |
||||
|
||||
3. A symlink's target is listed as an object to be copied. |
||||
|
||||
There are a couple of quirks to mention here. First, the term "object" |
||||
refers to the final file path that the developer intends to have |
||||
copied into initrd. This means any parent directory is not considered |
||||
an object just because its child was listed as an object in the |
||||
program input; instead those intermediate directories are simply |
||||
created in support of the target object. Second, shared libraries, |
||||
directory children, and symlink targets aren't immediately recursed, |
||||
because they simply get listed as objects themselves, and are |
||||
therefore traversed when they themselves are processed. Finally, |
||||
symlinks in the intermediate directories leading to an object are |
||||
preserved, meaning an input object `/a/symlink/b` will just result in |
||||
initrd containing `/a/symlink -> /target/b` and `/target/b`, even if |
||||
`/target` has other children. Preserving symlinks in this manner is |
||||
important for things like systemd. |
||||
|
||||
These rules automate the most important and obviously necessary |
||||
copying that needs to be done in most cases, allowing programs and |
||||
configuration files to go unpatched, while keeping the content of the |
||||
initrd to a minimum. |
||||
|
||||
# Why Rust? |
||||
|
||||
- A prototype of this logic was written in Bash, in an attempt to keep |
||||
with its `find-libs` ancestor, but that program was difficult to |
||||
write, and ended up taking several minutes to run. This program runs |
||||
in less than a second, and the code is substantially easier to work |
||||
with. |
||||
|
||||
- This will not require end users to install a rust toolchain to use |
||||
NixOS, as long as this tool is cached by Hydra. And if you're |
||||
bootstrapping NixOS from source, rustc is already required anyway. |
||||
|
||||
- Rust was favored over Python for its type system, and because if you |
||||
want to go fast, why not go *really fast*? |
@ -0,0 +1,208 @@ |
||||
use std::collections::{HashSet, VecDeque}; |
||||
use std::env; |
||||
use std::ffi::OsStr; |
||||
use std::fs; |
||||
use std::hash::Hash; |
||||
use std::io::{BufReader, BufRead, Error, ErrorKind}; |
||||
use std::os::unix; |
||||
use std::path::{Component, Path, PathBuf}; |
||||
use std::process::{Command, Stdio}; |
||||
|
||||
struct NonRepeatingQueue<T> { |
||||
queue: VecDeque<T>, |
||||
seen: HashSet<T>, |
||||
} |
||||
|
||||
impl<T> NonRepeatingQueue<T> { |
||||
fn new() -> NonRepeatingQueue<T> { |
||||
NonRepeatingQueue { |
||||
queue: VecDeque::new(), |
||||
seen: HashSet::new(), |
||||
} |
||||
} |
||||
} |
||||
|
||||
impl<T: Clone + Eq + Hash> NonRepeatingQueue<T> { |
||||
fn push_back(&mut self, value: T) -> bool { |
||||
if self.seen.contains(&value) { |
||||
false |
||||
} else { |
||||
self.seen.insert(value.clone()); |
||||
self.queue.push_back(value); |
||||
true |
||||
} |
||||
} |
||||
|
||||
fn pop_front(&mut self) -> Option<T> { |
||||
self.queue.pop_front() |
||||
} |
||||
} |
||||
|
||||
fn patch_elf<S: AsRef<OsStr>, P: AsRef<OsStr>>(mode: S, path: P) -> Result<String, Error> { |
||||
let output = Command::new("patchelf") |
||||
.arg(&mode) |
||||
.arg(&path) |
||||
.stderr(Stdio::inherit()) |
||||
.output()?; |
||||
if output.status.success() { |
||||
Ok(String::from_utf8(output.stdout).expect("Failed to parse output")) |
||||
} else { |
||||
Err(Error::new(ErrorKind::Other, format!("failed: patchelf {:?} {:?}", OsStr::new(&mode), OsStr::new(&path)))) |
||||
} |
||||
} |
||||
|
||||
fn copy_file<P: AsRef<Path> + AsRef<OsStr>, S: AsRef<Path>>( |
||||
source: P, |
||||
target: S, |
||||
queue: &mut NonRepeatingQueue<Box<Path>>, |
||||
) -> Result<(), Error> { |
||||
fs::copy(&source, target)?; |
||||
|
||||
if !Command::new("ldd").arg(&source).output()?.status.success() { |
||||
//stdout(Stdio::inherit()).stderr(Stdio::inherit()).
|
||||
println!("{:?} is not dynamically linked. Not recursing.", OsStr::new(&source)); |
||||
return Ok(()); |
||||
} |
||||
|
||||
let rpath_string = patch_elf("--print-rpath", &source)?; |
||||
let needed_string = patch_elf("--print-needed", &source)?; |
||||
// Shared libraries don't have an interpreter
|
||||
if let Ok(interpreter_string) = patch_elf("--print-interpreter", &source) { |
||||
queue.push_back(Box::from(Path::new(&interpreter_string.trim()))); |
||||
} |
||||
|
||||
let rpath = rpath_string.trim().split(":").map(|p| Box::<Path>::from(Path::new(p))).collect::<Vec<_>>(); |
||||
|
||||
for line in needed_string.lines() { |
||||
let mut found = false; |
||||
for path in &rpath { |
||||
let lib = path.join(line); |
||||
if lib.exists() { |
||||
// No need to recurse. The queue will bring it back round.
|
||||
queue.push_back(Box::from(lib.as_path())); |
||||
found = true; |
||||
break; |
||||
} |
||||
} |
||||
if !found { |
||||
// glibc makes it tricky to make this an error because
|
||||
// none of the files have a useful rpath.
|
||||
println!("Warning: Couldn't satisfy dependency {} for {:?}", line, OsStr::new(&source)); |
||||
} |
||||
} |
||||
|
||||
Ok(()) |
||||
} |
||||
|
||||
fn queue_dir<P: AsRef<Path>>( |
||||
source: P, |
||||
queue: &mut NonRepeatingQueue<Box<Path>>, |
||||
) -> Result<(), Error> { |
||||
for entry in fs::read_dir(source)? { |
||||
let entry = entry?; |
||||
// No need to recurse. The queue will bring us back round here on its own.
|
||||
queue.push_back(Box::from(entry.path().as_path())); |
||||
} |
||||
|
||||
Ok(()) |
||||
} |
||||
|
||||
fn handle_path( |
||||
root: &Path, |
||||
p: &Path, |
||||
queue: &mut NonRepeatingQueue<Box<Path>>, |
||||
) -> Result<(), Error> { |
||||
let mut source = PathBuf::new(); |
||||
let mut target = Path::new(root).to_path_buf(); |
||||
let mut iter = p.components().peekable(); |
||||
while let Some(comp) = iter.next() { |
||||
match comp { |
||||
Component::Prefix(_) => panic!("This tool is not meant for Windows"), |
||||
Component::RootDir => { |
||||
target.clear(); |
||||
target.push(root); |
||||
source.clear(); |
||||
source.push("/"); |
||||
} |
||||
Component::CurDir => {} |
||||
Component::ParentDir => { |
||||
// Don't over-pop the target if the path has too many ParentDirs
|
||||
if source.pop() { |
||||
target.pop(); |
||||
} |
||||
} |
||||
Component::Normal(name) => { |
||||
target.push(name); |
||||
source.push(name); |
||||
let typ = fs::symlink_metadata(&source)?.file_type(); |
||||
if typ.is_file() && !target.exists() { |
||||
copy_file(&source, &target, queue)?; |
||||
} else if typ.is_symlink() { |
||||
let link_target = fs::read_link(&source)?; |
||||
|
||||
// Create the link, then push its target to the queue
|
||||
if !target.exists() { |
||||
unix::fs::symlink(&link_target, &target)?; |
||||
} |
||||
source.pop(); |
||||
source.push(link_target); |
||||
while let Some(c) = iter.next() { |
||||
source.push(c); |
||||
} |
||||
let link_target_path = source.as_path(); |
||||
if link_target_path.exists() { |
||||
queue.push_back(Box::from(link_target_path)); |
||||
} |
||||
break; |
||||
} else if typ.is_dir() { |
||||
if !target.exists() { |
||||
fs::create_dir(&target)?; |
||||
} |
||||
|
||||
// Only recursively copy if the directory is the target object
|
||||
if iter.peek().is_none() { |
||||
queue_dir(&source, queue)?; |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
|
||||
Ok(()) |
||||
} |
||||
|
||||
fn main() -> Result<(), Error> { |
||||
let args: Vec<String> = env::args().collect(); |
||||
let input = fs::File::open(&args[1])?; |
||||
let output = &args[2]; |
||||
let out_path = Path::new(output); |
||||
|
||||
let mut queue = NonRepeatingQueue::<Box<Path>>::new(); |
||||
|
||||
let mut lines = BufReader::new(input).lines(); |
||||
while let Some(obj) = lines.next() { |
||||
// Lines should always come in pairs
|
||||
let obj = obj?; |
||||
let sym = lines.next().unwrap()?; |
||||
|
||||
let obj_path = Path::new(&obj); |
||||
queue.push_back(Box::from(obj_path)); |
||||
if !sym.is_empty() { |
||||
println!("{} -> {}", &sym, &obj); |
||||
// We don't care about preserving symlink structure here
|
||||
// nearly as much as for the actual objects.
|
||||
let link_string = format!("{}/{}", output, sym); |
||||
let link_path = Path::new(&link_string); |
||||
let mut link_parent = link_path.to_path_buf(); |
||||
link_parent.pop(); |
||||
fs::create_dir_all(link_parent)?; |
||||
unix::fs::symlink(obj_path, link_path)?; |
||||
} |
||||
} |
||||
while let Some(obj) = queue.pop_front() { |
||||
println!("{:?}", obj); |
||||
handle_path(out_path, &*obj, &mut queue)?; |
||||
} |
||||
|
||||
Ok(()) |
||||
} |
@ -1,7 +0,0 @@ |
||||
{ fetchurl, stdenv, texinfo }: |
||||
|
||||
import ./common.nix { |
||||
inherit fetchurl stdenv texinfo; |
||||
revision = 3; |
||||
sha256 = "0knrpkr74s8yn4xcqxkqpgxmzdmzrvahh1n1csqc1wwd2rb4vnpr"; |
||||
} |
@ -1,6 +1,6 @@ |
||||
{ |
||||
"commit": "f504760b580057f368d85ed6f6c4e78a38968ff4", |
||||
"url": "https://github.com/commercialhaskell/all-cabal-hashes/archive/f504760b580057f368d85ed6f6c4e78a38968ff4.tar.gz", |
||||
"sha256": "0m3w7bawx0qxj2qn3yx1d4j90dq89k5c4604f6z38cxxx0rszmzj", |
||||
"msg": "Update from Hackage at 2022-03-26T03:24:04Z" |
||||
"commit": "a02557e981025a281de13f66204c2cd2e788732f", |
||||
"url": "https://github.com/commercialhaskell/all-cabal-hashes/archive/a02557e981025a281de13f66204c2cd2e788732f.tar.gz", |
||||
"sha256": "0c6jg9s4p65ynkkk0z6p9q4whz5hs1vmbq8zsn7pavxkzwa8ych1", |
||||
"msg": "Update from Hackage at 2022-03-30T19:23:57Z" |
||||
} |
||||
|
@ -0,0 +1,49 @@ |
||||
{ mkXfceDerivation |
||||
, dbus-glib |
||||
, garcon |
||||
, glib |
||||
, gtk3 |
||||
, libX11 |
||||
, libXScrnSaver |
||||
, libXrandr |
||||
, libwnck |
||||
, libxfce4ui |
||||
, libxklavier |
||||
, pam |
||||
, systemd |
||||
, xfconf |
||||
, lib |
||||
}: |
||||
|
||||
mkXfceDerivation { |
||||
category = "apps"; |
||||
pname = "xfce4-screensaver"; |
||||
version = "4.16.0"; |
||||
|
||||
sha256 = "1vblqhhzhv85yd5bz1xg14yli82ys5qrjdcabg3l53glbk61n99p"; |
||||
|
||||
buildInputs = [ |
||||
dbus-glib |
||||
garcon |
||||
glib |
||||
gtk3 |
||||
libX11 |
||||
libXScrnSaver |
||||
libXrandr |
||||
libwnck |
||||
libxfce4ui |
||||
libxklavier |
||||
pam |
||||
systemd |
||||
xfconf |
||||
]; |
||||
|
||||
configureFlags = [ "--without-console-kit" ]; |
||||
|
||||
makeFlags = [ "DBUS_SESSION_SERVICE_DIR=$(out)/etc" ]; |
||||
|
||||
meta = { |
||||
description = "Screensaver for Xfce"; |
||||
maintainers = with lib.maintainers; [ symphorien ]; |
||||
}; |
||||
} |
@ -1,54 +0,0 @@ |
||||
{ fetchFromGitHub, lib, stdenv, gmp, which, flex, bison, makeWrapper |
||||
, autoconf, automake, libtool, jdk, perl }: |
||||
|
||||
stdenv.mkDerivation { |
||||
pname = "aldor"; |
||||
version = "1.2.0"; |
||||
|
||||
src = fetchFromGitHub { |
||||
owner = "aldorlang"; |
||||
repo = "aldor"; |
||||
rev = "15471e75f3d65b93150f414ebcaf59a03054b68d"; |
||||
sha256 = "sha256-phKCghCeM+/QlxjIxfNQySo+5XMRqfOqlS9kgp07YKc="; |
||||
}; |
||||
|
||||
nativeBuildInputs = [ makeWrapper autoconf automake ]; |
||||
buildInputs = [ gmp which flex bison libtool jdk perl ]; |
||||
|
||||
preConfigure = '' |
||||
cd aldor ; |
||||
./autogen.sh ; |
||||
''; |
||||
|
||||
postInstall = '' |
||||
for prog in aldor unicl javagen ; |
||||
do |
||||
wrapProgram $out/bin/$prog --set ALDORROOT $out \ |
||||
--prefix PATH : ${jdk}/bin \ |
||||
--prefix PATH : ${stdenv.cc}/bin ; |
||||
done |
||||
''; |
||||
|
||||
meta = { |
||||
# Please become a maintainer to fix this package |
||||
broken = true; |
||||
homepage = "http://www.aldor.org/"; |
||||
description = "Programming language with an expressive type system"; |
||||
license = lib.licenses.asl20; |
||||
|
||||
longDescription = '' |
||||
Aldor is a programming language with an expressive type system well-suited |
||||
for mathematical computing and which has been used to develop a number of |
||||
computer algebra libraries. Originally known as A#, Aldor was conceived as |
||||
an extension language for the Axiom system, but is now used more in other settings. |
||||
In Aldor, types and functions are first class values that can be constructed |
||||
and manipulated within programs. Pervasive support for dependent types allows |
||||
static checking of dynamic objects. What does this mean for a normal user? Aldor |
||||
solves many difficulties encountered in widely-used object-oriented programming |
||||
languages. It allows programs to use a natural style, combining the more attractive |
||||
and powerful properties of functional, object-oriented and aspect-oriented styles. |
||||
''; |
||||
|
||||
platforms = lib.platforms.linux; |
||||
}; |
||||
} |
@ -1,59 +0,0 @@ |
||||
{lib, stdenv, gcc, glibc, fetchurl, fetchgit, libtool, autoconf, automake, file, gnumake, which, zsh, m4, pkg-config, perl, gnome2, gtk2, pango, sqlite, libxml2, zlib, gmp, smlnj }: |
||||
|
||||
stdenv.mkDerivation { |
||||
pname = "aliceml"; |
||||
version = "1.4-7d44dc8e"; |
||||
|
||||
src = fetchgit { |
||||
url = "https://github.com/aliceml/aliceml"; |
||||
rev = "7d44dc8e4097c6f85888bbf4ff86d51fe05b0a08"; |
||||
sha256 = "1xpvia00cpig0i7qvz29sx7xjic6kd472ng722x4rapz8mjnf8bk"; |
||||
fetchSubmodules = true; |
||||
}; |
||||
|
||||
gecodeSrc = fetchurl { |
||||
url = "http://www.gecode.org/download/gecode-1.3.1.tar.gz"; |
||||
sha256 = "0mgc6llbq166jmlq3alvagqsg3730670zvbwwkdgsqklw70v9355"; |
||||
}; |
||||
|
||||
nativeBuildInputs = [ autoconf automake ]; |
||||
buildInputs = [ |
||||
gcc glibc |
||||
libtool gnumake |
||||
file which zsh m4 gtk2 zlib gmp |
||||
gnome2.libgnomecanvas pango sqlite |
||||
libxml2 pkg-config perl smlnj |
||||
]; |
||||
|
||||
makePatch = ./make.patch; |
||||
seamPatch = ./seam.patch; |
||||
|
||||
phases = [ "unpackPhase" "patchPhase" "configurePhase" "buildPhase" ]; |
||||
|
||||
patchPhase = '' |
||||
sed -i -e "s@wget ..GECODE_URL. -O - | tar xz@tar xf $gecodeSrc@" make/Makefile |
||||
patch -p1 <$makePatch |
||||
patch -p1 <$seamPatch |
||||
''; |
||||
|
||||
configurePhase = '' |
||||
make -C make setup PREFIX="$out" |
||||
''; |
||||
|
||||
buildPhase = '' |
||||
gmp="${gmp.dev}" zlib="${zlib.dev}" PATH=$PATH:`pwd`/seam-support/install/bin make -C make all PREFIX="$out" |
||||
''; |
||||
|
||||
meta = { |
||||
description = "Functional programming language based on Standard ML"; |
||||
longDescription = '' |
||||
Alice ML is a functional programming language based on Standard ML, |
||||
extended with rich support for concurrent, distributed, and constraint |
||||
programming. |
||||
''; |
||||
homepage = "https://www.ps.uni-saarland.de/alice/"; |
||||
license = lib.licenses.mit; |
||||
maintainers = [ lib.maintainers.doublec ]; |
||||
broken = true; |
||||
}; |
||||
} |
@ -1,20 +0,0 @@ |
||||
diff --git a/Makefile b/Makefile
|
||||
index 6a55b06..84a6000 100644
|
||||
--- a/make/Makefile
|
||||
+++ b/make/Makefile
|
||||
@@ -387,6 +387,7 @@ configure-seam-linux64:
|
||||
../sources/configure \
|
||||
--prefix='$(PREFIX)' \
|
||||
--with-warnings=yes \
|
||||
+ --with-zlib='$(zlib)' \
|
||||
--disable-lightning)
|
||||
|
||||
.PHONY: configure-seam-darwin64
|
||||
@@ -434,6 +435,7 @@ configure-alice-ll-linux:
|
||||
(cd $(PWD)/alice/build && \
|
||||
../sources/vm-seam/configure \
|
||||
--prefix='$(PREFIX)' \
|
||||
+ --with-gmp='$(gmp)' \
|
||||
--with-warnings=yes)
|
||||
|
||||
.PHONY: rebuild-alice-ll
|
@ -1,13 +0,0 @@ |
||||
diff --git a/Makefile.cvs b/Makefile.cvs
|
||||
index b59434a..cd1316f 100644
|
||||
--- a/seam/sources/Makefile.cvs
|
||||
+++ b/seam/sources/Makefile.cvs
|
||||
@@ -32,7 +32,7 @@ autotools:
|
||||
aclocal -I .
|
||||
autoconf
|
||||
automake --add-missing
|
||||
- cd libltdl; aclocal; autoconf; automake --add-missing
|
||||
+ cd libltdl; chmod +w *; aclocal; autoconf; automake --add-missing
|
||||
|
||||
lightning:
|
||||
rm -rf lightning
|
@ -1,68 +0,0 @@ |
||||
{ lib, stdenv, fetchgit, cmake, pkg-config, boost, libunwind, libmemcached |
||||
, pcre, libevent, gd, curl, libxml2, icu, flex, bison, openssl, zlib, php |
||||
, expat, libcap, oniguruma, libdwarf, libmcrypt, tbb, gperftools, glog, libkrb5 |
||||
, bzip2, openldap, readline, libelf, uwimap, binutils, cyrus_sasl, pam, libpng |
||||
, libxslt, freetype, gdb, git, perl, libmysqlclient, gmp, libyaml, libedit |
||||
, libvpx, imagemagick, fribidi, gperf, which, ocamlPackages |
||||
}: |
||||
|
||||
stdenv.mkDerivation rec { |
||||
pname = "hhvm"; |
||||
version = "3.23.2"; |
||||
|
||||
# use git version since we need submodules |
||||
src = fetchgit { |
||||
url = "https://github.com/facebook/hhvm.git"; |
||||
rev = "HHVM-${version}"; |
||||
sha256 = "1nic49j8nghx82lgvz0b95r78sqz46qaaqv4nx48p8yrj9ysnd7i"; |
||||
fetchSubmodules = true; |
||||
}; |
||||
|
||||
nativeBuildInputs = [ cmake pkg-config flex bison ]; |
||||
buildInputs = |
||||
[ boost libunwind libmysqlclient libmemcached pcre gdb git perl |
||||
libevent gd curl libxml2 icu openssl zlib php expat libcap |
||||
oniguruma libdwarf libmcrypt tbb gperftools bzip2 openldap readline |
||||
libelf uwimap binutils cyrus_sasl pam glog libpng libxslt libkrb5 |
||||
gmp libyaml libedit libvpx imagemagick fribidi gperf which |
||||
ocamlPackages.ocaml ocamlPackages.ocamlbuild |
||||
]; |
||||
|
||||
patches = [ |
||||
./flexible-array-members-gcc6.patch |
||||
]; |
||||
|
||||
dontUseCmakeBuildDir = true; |
||||
NIX_LDFLAGS = "-lpam -L${pam}/lib"; |
||||
|
||||
# work around broken build system |
||||
NIX_CFLAGS_COMPILE = "-I${freetype.dev}/include/freetype2"; |
||||
|
||||
# the cmake package does not handle absolute CMAKE_INSTALL_INCLUDEDIR correctly |
||||
# (setting it to an absolute path causes include files to go to $out/$out/include, |
||||
# because the absolute path is interpreted with root at $out). |
||||
cmakeFlags = [ "-DCMAKE_INSTALL_INCLUDEDIR=include" ]; |
||||
|
||||
prePatch = '' |
||||
substituteInPlace ./configure \ |
||||
--replace "/usr/bin/env bash" ${stdenv.shell} |
||||
substituteInPlace ./third-party/ocaml/CMakeLists.txt \ |
||||
--replace "/bin/bash" ${stdenv.shell} |
||||
perl -pi -e 's/([ \t(])(isnan|isinf)\(/$1std::$2(/g' \ |
||||
hphp/runtime/base/*.cpp \ |
||||
hphp/runtime/ext/std/*.cpp \ |
||||
hphp/runtime/ext_zend_compat/php-src/main/*.cpp \ |
||||
hphp/runtime/ext_zend_compat/php-src/main/*.h |
||||
sed '1i#include <functional>' -i third-party/mcrouter/src/mcrouter/lib/cycles/Cycles.h |
||||
patchShebangs . |
||||
''; |
||||
|
||||
meta = { |
||||
description = "High-performance JIT compiler for PHP/Hack"; |
||||
homepage = "https://hhvm.com"; |
||||
license = "PHP/Zend"; |
||||
platforms = [ "x86_64-linux" ]; |
||||
maintainers = [ lib.maintainers.thoughtpolice ]; |
||||
broken = true; # Since 2018-04-21, see https://hydra.nixos.org/build/73059373 |
||||
}; |
||||
} |
@ -1,20 +0,0 @@ |
||||
diff --git a/third-party/re2/src/re2/dfa.cc b/third-party/re2/src/re2/dfa.cc
|
||||
index 483f678..3aa3610 100644
|
||||
--- a/third-party/re2/src/re2/dfa.cc
|
||||
+++ b/third-party/re2/src/re2/dfa.cc
|
||||
@@ -101,8 +101,13 @@ class DFA {
|
||||
uint flag_; // Empty string bitfield flags in effect on the way
|
||||
// into this state, along with kFlagMatch if this
|
||||
// is a matching state.
|
||||
- std::atomic<State*> next_[]; // Outgoing arrows from State,
|
||||
- // one per input byte class
|
||||
+// Work around the bug affecting flexible array members in GCC 6.1 and 6.2.
|
||||
+// (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70932)
|
||||
+#if !defined(__clang__) && defined(__GNUC__) && __GNUC__ == 6 && __GNUC_MINOR__ >= 1
|
||||
+ std::atomic<State*> next_[0]; // Outgoing arrows from State, one per input byte class
|
||||
+#else
|
||||
+ std::atomic<State*> next_[]; // Outgoing arrows from State, one per input byte class
|
||||
+#endif
|
||||
};
|
||||
|
||||
enum {
|
@ -1,34 +0,0 @@ |
||||
{ lib, stdenv, fetchurl, xlibsWrapper, ncurses }: |
||||
|
||||
stdenv.mkDerivation ({ |
||||
|
||||
pname = "metaocaml"; |
||||
version = "3.09-alpha-30"; |
||||
|
||||
src = fetchurl { |
||||
url = "http://www.metaocaml.org/dist/old/MetaOCaml_309_alpha_030.tar.gz"; |
||||
sha256 = "0migbn0zwfb7yb24dy7qfqi19sv3drqcv4369xi7xzpds2cs35fd"; |
||||
}; |
||||
|
||||
prefixKey = "-prefix "; |
||||
configureFlags = ["-no-tk" "-x11lib" xlibsWrapper]; |
||||
buildFlags = [ "world" "bootstrap" "world.opt" ]; |
||||
buildInputs = [xlibsWrapper ncurses]; |
||||
installTargets = "install installopt"; |
||||
patchPhase = '' |
||||
CAT=$(type -tp cat) |
||||
sed -e "s@/bin/cat@$CAT@" -i config/auto-aux/sharpbang |
||||
''; |
||||
postBuild = '' |
||||
mkdir -p $out/include |
||||
ln -sv $out/lib/ocaml/caml $out/include/caml |
||||
''; |
||||
|
||||
meta = { |
||||
homepage = "http://www.metaocaml.org/"; |
||||
license = with lib.licenses; [ qpl lgpl2 ]; |
||||
description = "A compiled, type-safe, multi-stage programming language"; |
||||
broken = true; |
||||
}; |
||||
|
||||
}) |
@ -1,64 +0,0 @@ |
||||
{ lib, stdenv, fetchFromGitHub |
||||
, gcc-arm-embedded, binutils-arm-embedded, python2 |
||||
, skipTargets ? [ |
||||
# These targets do not build, for the reasons listed, along with the last version checked. |
||||
# Probably all of the issues with these targets need to be addressed upstream. |
||||
"AG3X" # 3.4.0-rc4: has not specified a valid STM group, must be one of F1, F3, F405, F411 or F7x5. Have you prepared a valid target.mk? |
||||
"ALIENWHOOP" # 3.4.0-rc4: has not specified a valid STM group, must be one of F1, F3, F405, F411 or F7x5. Have you prepared a valid target.mk? |
||||
"FURYF3" # 3.4.0-rc4: flash region overflow |
||||
"OMNINXT" # 3.4.0-rc4: has not specified a valid STM group, must be one of F1, F3, F405, F411 or F7x5. Have you prepared a valid target.mk? |
||||
]}: |
||||
|
||||
stdenv.mkDerivation rec { |
||||
|
||||
pname = "betaflight"; |
||||
version = "3.4.0-rc4"; |
||||
|
||||
src = fetchFromGitHub { |
||||
owner = "betaflight"; |
||||
repo = "betaflight"; |
||||
rev = "8e9e7574481b1abba9354b24f41eb31054943785"; # Always use a commit id here! |
||||
sha256 = "1wyp23p876xbfi9z6gm4xn1nwss3myvrjjjq9pd3s0vf5gkclkg5"; |
||||
}; |
||||
|
||||
nativeBuildInputs = [ |
||||
gcc-arm-embedded binutils-arm-embedded |
||||
python2 |
||||
]; |
||||
|
||||
postPatch = '' |
||||
sed -ri "s/REVISION.*=.*git log.*/REVISION = ${builtins.substring 0 10 src.rev}/" Makefile # Simulate abbrev'd rev. |
||||
sed -ri "s/binary hex/hex/" Makefile # No need for anything besides .hex |
||||
|
||||
substituteInPlace Makefile \ |
||||
--replace "--specs=nano.specs" "" |
||||
''; |
||||
|
||||
enableParallelBuilding = true; |
||||
|
||||
preBuild = '' |
||||
buildFlagsArray=( |
||||
"NOBUILD_TARGETS=${toString skipTargets}" |
||||
"GCC_REQUIRED_VERSION=$(arm-none-eabi-gcc -dumpversion)" |
||||
all |
||||
) |
||||
''; |
||||
|
||||
installPhase = '' |
||||
runHook preInstall |
||||
|
||||
mkdir -p $out |
||||
cp obj/*.hex $out |
||||
|
||||
runHook postInstall |
||||
''; |
||||
|
||||
meta = with lib; { |
||||
description = "Flight controller software (firmware) used to fly multi-rotor craft and fixed wing craft"; |
||||
homepage = "https://github.com/betaflight/betaflight"; |
||||
license = licenses.gpl3; |
||||
maintainers = with maintainers; [ elitak ]; |
||||
broken = true; |
||||
}; |
||||
|
||||
} |
@ -1,56 +0,0 @@ |
||||
{ lib, stdenv, fetchFromGitHub |
||||
, gcc-arm-embedded, binutils-arm-embedded, ruby |
||||
}: |
||||
|
||||
stdenv.mkDerivation rec { |
||||
|
||||
pname = "inav"; |
||||
version = "2.0.0-rc2"; |
||||
|
||||
src = fetchFromGitHub { |
||||
owner = "iNavFlight"; |
||||
repo = "inav"; |
||||
rev = "a8415e89c2956d133d8175827c079bcf3bc3766c"; # Always use a commit id here! |
||||
sha256 = "15zai8qf43b06fmws1sbkmdgip51zp7gkfj7pp9b6gi8giarzq3y"; |
||||
}; |
||||
|
||||
nativeBuildInputs = [ |
||||
gcc-arm-embedded binutils-arm-embedded |
||||
ruby |
||||
]; |
||||
|
||||
postPatch = '' |
||||
sed -ri "s/REVISION.*=.*shell git.*/REVISION = ${builtins.substring 0 10 src.rev}/" Makefile # Simulate abbrev'd rev. |
||||
sed -ri "s/-j *[0-9]+//" Makefile # Eliminate parallel build args in submakes |
||||
sed -ri "s/binary hex/hex/" Makefile # No need for anything besides .hex |
||||
|
||||
substituteInPlace Makefile \ |
||||
--replace "--specs=nano.specs" "" |
||||
''; |
||||
|
||||
enableParallelBuilding = true; |
||||
|
||||
preBuild = '' |
||||
buildFlagsArray=( |
||||
all |
||||
) |
||||
''; |
||||
|
||||
installPhase = '' |
||||
runHook preInstall |
||||
|
||||
mkdir -p $out |
||||
cp obj/*.hex $out |
||||
|
||||
runHook postInstall |
||||
''; |
||||
|
||||
meta = with lib; { |
||||
description = "Navigation-enabled flight control software"; |
||||
homepage = "https://inavflight.github.io"; |
||||
license = licenses.gpl3; |
||||
maintainers = with maintainers; [ elitak ]; |
||||
broken = true; |
||||
}; |
||||
|
||||
} |
File diff suppressed because it is too large
Load Diff
@ -1,46 +0,0 @@ |
||||
{ lib, stdenv, fetchurl, makeWrapper, |
||||
libllvm, gmp, mpfr, readline, bison, flex }: |
||||
|
||||
stdenv.mkDerivation rec { |
||||
baseName="pure"; |
||||
version="0.68"; |
||||
name="${baseName}-${version}"; |
||||
|
||||
src = fetchurl { |
||||
url="https://github.com/agraef/pure-lang/releases/download/${name}/${name}.tar.gz"; |
||||
sha256="0px6x5ivcdbbp2pz5n1r1cwg1syadklhjw8piqhl63n91i4r7iyb"; |
||||
}; |
||||
|
||||
nativeBuildInputs = [ makeWrapper ]; |
||||
buildInputs = [ bison flex ]; |
||||
propagatedBuildInputs = [ libllvm gmp mpfr readline ]; |
||||
NIX_LDFLAGS = "-lLLVMJIT"; |
||||
|
||||
postPatch = '' |
||||
for f in expr.cc matcher.cc printer.cc symtable.cc parserdefs.hh; do |
||||
sed -i '1i\#include <stddef.h>' $f |
||||
done |
||||
''; |
||||
|
||||
configureFlags = [ "--enable-release" ]; |
||||
doCheck = true; |
||||
checkPhase = '' |
||||
LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}${libllvm}/lib make check |
||||
''; |
||||
postInstall = '' |
||||
wrapProgram $out/bin/pure --prefix LD_LIBRARY_PATH : ${libllvm}/lib |
||||
''; |
||||
|
||||
meta = { |
||||
description = "A modern-style functional programming language based on term rewriting"; |
||||
maintainers = with lib.maintainers; |
||||
[ |
||||
raskin |
||||
asppsa |
||||
]; |
||||
platforms = with lib.platforms; |
||||
linux; |
||||
license = lib.licenses.gpl3Plus; |
||||
broken = true; |
||||
}; |
||||
} |
@ -0,0 +1,23 @@ |
||||
{ lib, fetchFromGitHub, buildGoModule }: |
||||
buildGoModule rec { |
||||
pname = "starlark"; |
||||
version = "unstable-2022-03-02"; |
||||
|
||||
src = fetchFromGitHub { |
||||
owner = "google"; |
||||
repo = "starlark-go"; |
||||
rev = "5411bad688d12781515a91cc032645331b4fc302"; |
||||
sha256 = "sha256-JNsGyGlIVMS5w0W4jHVsrPqqNms3Xfpa4n/XcEWqt6I="; |
||||
}; |
||||
|
||||
vendorSha256 = "sha256-lgL5o3MQfZekZ++BNESwV0LeoTxwEZfziQAe99zm4RY="; |
||||
|
||||
ldflags = [ "-s" "-w" ]; |
||||
|
||||
meta = with lib; { |
||||
homepage = "https://github.com/google/starlark-go"; |
||||
description = "An interpreter for Starlark, implemented in Go"; |
||||
license = licenses.bsd3; |
||||
maintainers = with maintainers; [ aaronjheng ]; |
||||
}; |
||||
} |
@ -1,31 +1,41 @@ |
||||
{ rustPlatform, fetchFromGitHub, lib, python3, cmake, llvmPackages, clang, stdenv, darwin }: |
||||
{ rustPlatform, fetchFromGitHub, lib, v8 }: |
||||
|
||||
rustPlatform.buildRustPackage rec { |
||||
pname = "wasmtime"; |
||||
version = "0.21.0"; |
||||
version = "0.35.2"; |
||||
|
||||
src = fetchFromGitHub { |
||||
owner = "bytecodealliance"; |
||||
repo = pname; |
||||
rev = "v${version}"; |
||||
sha256 = "0q7wsnq5zdskxwzsxwm98jfnv2frnwca1dkhwndcn9yyz2gyw57m"; |
||||
sha256 = "sha256-4oZglk7MInLIsvbeCfs4InAcmSmzZp16XL5+8eoYXJk="; |
||||
fetchSubmodules = true; |
||||
}; |
||||
|
||||
cargoSha256 = "1wlig9gls7s1k1swxwhl82vfga30bady8286livxc4y2zp0vb18w"; |
||||
cargoSha256 = "sha256-IqFOw9bGdM3IEoMeqDlxKfLnZvR80PSnwP9kr1tI/h0="; |
||||
|
||||
nativeBuildInputs = [ python3 cmake clang ]; |
||||
buildInputs = [ llvmPackages.libclang ] ++ |
||||
lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security ]; |
||||
LIBCLANG_PATH = "${llvmPackages.libclang.lib}/lib"; |
||||
# This environment variable is required so that when wasmtime tries |
||||
# to run tests by using the rusty_v8 crate, it does not try to |
||||
# download a static v8 build from the Internet, what would break |
||||
# build hermetism. |
||||
RUSTY_V8_ARCHIVE = "${v8}/lib/libv8.a"; |
||||
|
||||
doCheck = true; |
||||
checkFlags = [ |
||||
"--skip=cli_tests::run_cwasm" |
||||
"--skip=commands::compile::test::test_successful_compile" |
||||
"--skip=commands::compile::test::test_aarch64_flags_compile" |
||||
"--skip=commands::compile::test::test_unsupported_flags_compile" |
||||
"--skip=commands::compile::test::test_x64_flags_compile" |
||||
"--skip=commands::compile::test::test_x64_presets_compile" |
||||
"--skip=traps::parse_dwarf_info" |
||||
]; |
||||
|
||||
meta = with lib; { |
||||
description = "Standalone JIT-style runtime for WebAssembly, using Cranelift"; |
||||
homepage = "https://github.com/bytecodealliance/wasmtime"; |
||||
license = licenses.asl20; |
||||
maintainers = [ maintainers.matthewbauer ]; |
||||
platforms = platforms.unix; |
||||
platforms = platforms.linux; |
||||
}; |
||||
} |
||||
|
@ -1,42 +0,0 @@ |
||||
{ lib, stdenv, fetchsvn, pkg-config, mono, dotnetPackages }: |
||||
|
||||
let |
||||
newtonsoft-json = dotnetPackages.NewtonsoftJson; |
||||
in stdenv.mkDerivation { |
||||
pname = "gdata-sharp"; |
||||
version = "2.2.0.0"; |
||||
|
||||
src = fetchsvn { |
||||
url = "http://google-gdata.googlecode.com/svn/trunk/"; |
||||
rev = "1217"; |
||||
sha256 = "0b0rvgg3xsbbg2fdrpz0ywsy9rcahlyfskndaagd3yzm83gi6bhk"; |
||||
}; |
||||
|
||||
nativeBuildInputs = [ pkg-config ]; |
||||
buildInputs = [ mono newtonsoft-json ]; |
||||
|
||||
sourceRoot = "svn-r1217/clients/cs"; |
||||
|
||||
dontStrip = true; |
||||
|
||||
postPatch = '' |
||||
sed -i -e 's#^\(DEFINES=.*\)\(.\)#\1 /r:third_party/Newtonsoft.Json.dll\2#' Makefile |
||||
# carriage return ^ |
||||
''; |
||||
|
||||
makeFlags = [ "PREFIX=$(out)" ]; |
||||
|
||||
meta = with lib; { |
||||
homepage = "https://code.google.com/archive/p/google-gdata/"; |
||||
|
||||
description = "The Google Data APIs"; |
||||
longDescription = '' |
||||
The Google Data APIs provide a simple protocol for reading and writing |
||||
data on the web. |
||||
''; |
||||
|
||||
license = licenses.asl20; |
||||
platforms = platforms.linux; |
||||
broken = true; |
||||
}; |
||||
} |
@ -1,12 +0,0 @@ |
||||
{ callPackage, fetchFromGitHub, autoreconfHook, ... } @ args: |
||||
|
||||
callPackage ./generic.nix (args // { |
||||
version = "1.0"; |
||||
|
||||
src = fetchFromGitHub { |
||||
owner = "arpa2"; |
||||
repo = "gnutls-kdh"; |
||||
rev = "ff3bb36f70a746f28554641d466e124098dfcb25"; |
||||
sha256 = "1rr3p4r145lnprxn8hqyyzh3qkj3idsbqp08g07ndrhqnxq0k0sw"; |
||||
}; |
||||
}) |
@ -1,95 +0,0 @@ |
||||
{ config, lib, stdenv, zlib, lzo, libtasn1, nettle, pkg-config, lzip |
||||
, perl, gmp, autogen, libidn, p11-kit, unbound, libiconv |
||||
, guileBindings ? config.gnutls.guile or false, guile |
||||
, tpmSupport ? true, trousers, nettools, gperftools, gperf, gettext, automake |
||||
, bison, texinfo |
||||
|
||||
# Version dependent args |
||||
, version, src, patches ? [], postPatch ? "", nativeBuildInputs ? [] |
||||
, ...}: |
||||
|
||||
assert guileBindings -> guile != null; |
||||
let |
||||
# XXX: Gnulib's `test-select' fails on FreeBSD: |
||||
# https://hydra.nixos.org/build/2962084/nixlog/1/raw . |
||||
doCheck = !stdenv.isFreeBSD && !stdenv.isDarwin && lib.versionAtLeast version "3.4"; |
||||
in |
||||
stdenv.mkDerivation { |
||||
pname = "gnutls-kdh"; |
||||
inherit version; |
||||
|
||||
inherit src patches; |
||||
|
||||
outputs = [ "bin" "dev" "out" ]; |
||||
|
||||
patchPhase = '' |
||||
# rm -fR ./po |
||||
# substituteInPlace configure "po/Makefile.in" " " |
||||
substituteInPlace doc/manpages/Makefile.in --replace "gnutls_cipher_list.3" " " |
||||
substituteInPlace doc/manpages/Makefile.in --replace "gnutls_cipher_self_test.3" " " |
||||
substituteInPlace doc/manpages/Makefile.in --replace "gnutls_digest_self_test.3" " " |
||||
substituteInPlace doc/manpages/Makefile.in --replace "gnutls_mac_self_test.3" " " |
||||
substituteInPlace doc/manpages/Makefile.in --replace "gnutls_pk_self_test.3" " " |
||||
printf "all: ;\n\ninstall: ;" > "po/Makefile.in" |
||||
printf "all: ;\n\ninstall: ;" > "po/Makefile.in.in" |
||||
''; |
||||
|
||||
postPatch = lib.optionalString (lib.versionAtLeast version "3.4") '' |
||||
sed '2iecho "name constraints tests skipped due to datefudge problems"\nexit 0' \ |
||||
-i tests/cert-tests/name-constraints |
||||
'' + postPatch; |
||||
|
||||
preConfigure = "patchShebangs ."; |
||||
configureFlags = |
||||
lib.optional stdenv.isLinux "--with-default-trust-store-file=/etc/ssl/certs/ca-certificates.crt" |
||||
++ [ |
||||
"--disable-dependency-tracking" |
||||
"--enable-fast-install" |
||||
] ++ lib.optional guileBindings |
||||
[ "--enable-guile" "--with-guile-site-dir=\${out}/share/guile/site" ]; |
||||
|
||||
# Build of the Guile bindings is not parallel-safe. See |
||||
# <https://github.com/arpa2/gnutls-kdh/commit/330995a920037b6030ec0282b51dde3f8b493cad> |
||||
# for the actual fix. Also an apparent race in the generation of |
||||
# systemkey-args.h. |
||||
enableParallelBuilding = false; |
||||
|
||||
buildInputs = [ lzo lzip nettle libtasn1 libidn p11-kit zlib gmp |
||||
autogen gperftools gperf gettext automake bison texinfo ] |
||||
++ lib.optional doCheck nettools |
||||
++ lib.optional (stdenv.isFreeBSD || stdenv.isDarwin) libiconv |
||||
++ lib.optional (tpmSupport && stdenv.isLinux) trousers |
||||
++ [ unbound ] |
||||
++ lib.optional guileBindings guile; |
||||
|
||||
nativeBuildInputs = [ perl pkg-config ] ++ nativeBuildInputs; |
||||
|
||||
#inherit doCheck; |
||||
doCheck = false; |
||||
|
||||
# Fixup broken libtool and pkg-config files |
||||
preFixup = lib.optionalString (!stdenv.isDarwin) '' |
||||
sed ${lib.optionalString tpmSupport "-e 's,-ltspi,-L${trousers}/lib -ltspi,'"} \ |
||||
-e 's,-lz,-L${zlib.out}/lib -lz,' \ |
||||
-e 's,-L${gmp.dev}/lib,-L${gmp.out}/lib,' \ |
||||
-e 's,-lgmp,-L${gmp.out}/lib -lgmp,' \ |
||||
-i $out/lib/*.la "$dev/lib/pkgconfig/gnutls.pc" |
||||
''; |
||||
|
||||
meta = with lib; { |
||||
description = "GnuTLS with additional TLS-KDH ciphers: Kerberos + Diffie-Hellman"; |
||||
|
||||
longDescription = '' |
||||
The ARPA2 project aims to add security. This is an enhanced |
||||
version of GnuTLS, a project that aims to develop a library which |
||||
provides a secure layer, over a reliable transport |
||||
layer. It adds TLS-KDH ciphers: Kerberos + Diffie-Hellman. |
||||
''; |
||||
|
||||
homepage = "https://github.com/arpa2/gnutls-kdh"; |
||||
license = licenses.lgpl21Plus; |
||||
maintainers = with maintainers; [ leenaars ]; |
||||
platforms = platforms.all; |
||||
broken = true; |
||||
}; |
||||
} |
@ -1,29 +0,0 @@ |
||||
{lib, stdenv, fetchurl, pkg-config, gtk2, t1lib, glib, libxml2, popt, gmetadom ? null }: |
||||
|
||||
let |
||||
pname = "gtkmathview"; |
||||
version = "0.8.0"; |
||||
in |
||||
|
||||
stdenv.mkDerivation { |
||||
name = "${pname}-${version}"; |
||||
|
||||
src = fetchurl { |
||||
url = "http://helm.cs.unibo.it/mml-widget/sources/${pname}-${version}.tar.gz"; |
||||
sha256 = "0hwcamf5fi35frg7q6kgisc9v0prqbhsplb2gl55cg3av9sh3hqx"; |
||||
}; |
||||
|
||||
nativeBuildInputs = [ pkg-config ]; |
||||
buildInputs = [ t1lib glib gmetadom libxml2 popt]; |
||||
propagatedBuildInputs = [gtk2 t1lib]; |
||||
|
||||
patches = [ ./gcc-4.3-build-fixes.patch ./gcc-4.4-build-fixes.patch ]; |
||||
|
||||
meta = { |
||||
homepage = "http://helm.cs.unibo.it/mml-widget/"; |
||||
description = "C++ rendering engine for MathML documents"; |
||||
license = lib.licenses.lgpl3Plus; |
||||
maintainers = [ lib.maintainers.roconnor ]; |
||||
broken = true; |
||||
}; |
||||
} |
@ -1,74 +0,0 @@ |
||||
From: Stefano Zacchiroli <zack@upsilon.cc>
|
||||
Date: Fri, 11 Dec 2009 12:58:56 +0100
|
||||
Subject: [PATCH] gcc 4.3 build fixes
|
||||
|
||||
---
|
||||
mathmlps/main.cc | 1 +
|
||||
mathmlsvg/SMS.cc | 1 +
|
||||
mathmlsvg/main.cc | 1 +
|
||||
src/backend/ps/T1_FontDataBase.cc | 2 +-
|
||||
src/engine/mathml/mathVariantAux.cc | 1 +
|
||||
5 files changed, 5 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/mathmlps/main.cc b/mathmlps/main.cc
|
||||
index cc6cd1c..48339af 100644
|
||||
--- a/mathmlps/main.cc
|
||||
+++ b/mathmlps/main.cc
|
||||
@@ -19,6 +19,7 @@
|
||||
#include <config.h>
|
||||
|
||||
#include <cassert>
|
||||
+#include <cstring>
|
||||
#include <fstream>
|
||||
|
||||
#include <popt.h>
|
||||
diff --git a/mathmlsvg/SMS.cc b/mathmlsvg/SMS.cc
|
||||
index a76266e..be7add8 100644
|
||||
--- a/mathmlsvg/SMS.cc
|
||||
+++ b/mathmlsvg/SMS.cc
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
+#include <cstring>
|
||||
#include <sstream>
|
||||
#include "defs.h"
|
||||
#include "AbstractLogger.hh"
|
||||
diff --git a/mathmlsvg/main.cc b/mathmlsvg/main.cc
|
||||
index 259d67e..c49e8ac 100644
|
||||
--- a/mathmlsvg/main.cc
|
||||
+++ b/mathmlsvg/main.cc
|
||||
@@ -19,6 +19,7 @@
|
||||
#include <config.h>
|
||||
|
||||
#include <cassert>
|
||||
+#include <cstring>
|
||||
#include <fstream>
|
||||
|
||||
#include <popt.h>
|
||||
diff --git a/src/backend/ps/T1_FontDataBase.cc b/src/backend/ps/T1_FontDataBase.cc
|
||||
index b6490eb..3dd436c 100644
|
||||
--- a/src/backend/ps/T1_FontDataBase.cc
|
||||
+++ b/src/backend/ps/T1_FontDataBase.cc
|
||||
@@ -19,7 +19,7 @@
|
||||
#include <t1lib.h>
|
||||
#include <config.h>
|
||||
#include <map>
|
||||
-#include <string>
|
||||
+#include <cstring>
|
||||
#include <stdlib.h>
|
||||
#include <iostream>
|
||||
#include <list>
|
||||
diff --git a/src/engine/mathml/mathVariantAux.cc b/src/engine/mathml/mathVariantAux.cc
|
||||
index 736acc1..dcf1826 100644
|
||||
--- a/src/engine/mathml/mathVariantAux.cc
|
||||
+++ b/src/engine/mathml/mathVariantAux.cc
|
||||
@@ -19,6 +19,7 @@
|
||||
#include <config.h>
|
||||
|
||||
#include <cassert>
|
||||
+#include <cstring>
|
||||
|
||||
#include "mathVariantAux.hh"
|
||||
|
||||
--
|
@ -1,21 +0,0 @@ |
||||
From: Stefano Zacchiroli <zack@upsilon.cc>
|
||||
Date: Fri, 11 Dec 2009 13:26:26 +0100
|
||||
Subject: [PATCH] gcc 4.4 build fixes
|
||||
|
||||
---
|
||||
src/common/AbstractLogger.cc | 1 +
|
||||
1 files changed, 1 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/src/common/AbstractLogger.cc b/src/common/AbstractLogger.cc
|
||||
index 6f638fb..c5b7e3d 100644
|
||||
--- a/src/common/AbstractLogger.cc
|
||||
+++ b/src/common/AbstractLogger.cc
|
||||
@@ -19,6 +19,7 @@
|
||||
#include <config.h>
|
||||
|
||||
#include <stdarg.h>
|
||||
+#include <stdio.h>
|
||||
|
||||
#include "AbstractLogger.hh"
|
||||
|
||||
--
|
@ -1,35 +0,0 @@ |
||||
{ lib, stdenv, fetchFromGitHub, pkg-config, directfb, libsigcxx, libxml2, fontconfig }: |
||||
|
||||
# TODO: optional deps: baresip, FusionDale, FusionSound, SaWMan, doxygen, |
||||
# Reflex, Wnn, NLS |
||||
|
||||
stdenv.mkDerivation rec { |
||||
pname = "ilixi"; |
||||
version = "1.0.0"; |
||||
|
||||
src = fetchFromGitHub { |
||||
owner = "ilixi"; |
||||
repo = "ilixi"; |
||||
rev = version; |
||||
sha256 = "05h862r9mhis26v8yf967n86qf8y1gdgfzhbqfsr6pjw1k3v3wdr"; |
||||
}; |
||||
|
||||
nativeBuildInputs = [ pkg-config ]; |
||||
buildInputs = [ directfb libsigcxx libxml2 fontconfig ]; |
||||
|
||||
configureFlags = [ |
||||
"--enable-log-debug" |
||||
"--enable-debug" |
||||
"--enable-trace" |
||||
"--with-examples" |
||||
]; |
||||
|
||||
meta = with lib; { |
||||
description = "Lightweight C++ GUI toolkit for embedded Linux systems"; |
||||
homepage = "https://github.com/ilixi/ilixi"; |
||||
license = licenses.lgpl3; |
||||
platforms = platforms.linux; |
||||
maintainers = [ maintainers.bjornfor ]; |
||||
broken = true; # broken by the directfb 1.6.3 -> 1.7.6 update |
||||
}; |
||||
} |
@ -1,29 +0,0 @@ |
||||
--- libnet-1.1.6.orig/src/libnet_link_linux.c
|
||||
+++ libnet-1.1.6/src/libnet_link_linux.c
|
||||
@@ -30,26 +30,15 @@
|
||||
#include <sys/time.h>
|
||||
|
||||
#include <net/if.h>
|
||||
-#if (__GLIBC__)
|
||||
#include <netinet/if_ether.h>
|
||||
#include <net/if_arp.h>
|
||||
-#else
|
||||
-#include <linux/if_arp.h>
|
||||
-#include <linux/if_ether.h>
|
||||
-#endif
|
||||
|
||||
#if (HAVE_PACKET_SOCKET)
|
||||
#ifndef SOL_PACKET
|
||||
#define SOL_PACKET 263
|
||||
#endif /* SOL_PACKET */
|
||||
-#if __GLIBC__ >= 2 && __GLIBC_MINOR >= 1
|
||||
#include <netpacket/packet.h>
|
||||
#include <net/ethernet.h> /* the L2 protocols */
|
||||
-#else
|
||||
-#include <asm/types.h>
|
||||
-#include <linux/if_packet.h>
|
||||
-#include <linux/if_ether.h> /* The L2 protocols */
|
||||
-#endif
|
||||
#endif /* HAVE_PACKET_SOCKET */
|
||||
|
||||
#include "../include/libnet.h"
|
@ -1,34 +0,0 @@ |
||||
{ lib, stdenv, which, coreutils, fetchzip, qt4 }: |
||||
|
||||
stdenv.mkDerivation rec { |
||||
pname = "qxt"; |
||||
version = "0.6.2"; |
||||
|
||||
src = fetchzip { |
||||
url = "https://bitbucket.org/libqxt/libqxt/get/v${version}.tar.gz"; |
||||
sha256 = "0zmqfn0h8cpky7wgaaxlfh0l89r9r0isi87587kaicyap7a6kxwz"; |
||||
}; |
||||
|
||||
buildInputs = [ qt4 which ]; |
||||
|
||||
patchPhase = '' |
||||
patchShebangs configure |
||||
substituteInPlace configure --replace "/bin/pwd" "${coreutils}/bin/pwd" |
||||
''; |
||||
|
||||
prefixKey = "-prefix "; |
||||
|
||||
meta = { |
||||
homepage = "http://libqxt.org"; |
||||
description = "An extension library for Qt"; |
||||
longDescription = '' |
||||
An extension library for Qt providing a suite of cross-platform utility |
||||
classes to add functionality not readily available in the Qt toolkit by Qt |
||||
Development Frameworks, Nokia. |
||||
''; |
||||
license = lib.licenses.gpl2; |
||||
platforms = lib.platforms.linux; |
||||
maintainers = with lib.maintainers; [ forkk ]; |
||||
broken = true; |
||||
}; |
||||
} |
@ -1,24 +0,0 @@ |
||||
{ lib, stdenv, fetchurl, pkg-config, pure, portaudio, fftw, libsndfile, libsamplerate }: |
||||
|
||||
stdenv.mkDerivation rec { |
||||
pname = "pure-audio"; |
||||
version = "0.6"; |
||||
|
||||
src = fetchurl { |
||||
url = "https://bitbucket.org/purelang/pure-lang/downloads/pure-audio-${version}.tar.gz"; |
||||
sha256 = "c1f2a5da73983efb5a54f86d57ba93713ebed20ff0c72de9b3467f10f2904ee0"; |
||||
}; |
||||
|
||||
nativeBuildInputs = [ pkg-config ]; |
||||
propagatedBuildInputs = [ pure portaudio fftw libsndfile libsamplerate ]; |
||||
makeFlags = [ "libdir=$(out)/lib" "prefix=$(out)/" ]; |
||||
setupHook = ../generic-setup-hook.sh; |
||||
|
||||
meta = { |
||||
description = "A digital audio interface for the Pure programming language"; |
||||
homepage = "http://puredocs.bitbucket.org/pure-audio.html"; |
||||
license = lib.licenses.bsd3; |
||||
platforms = lib.platforms.linux; |
||||
maintainers = with lib.maintainers; [ asppsa ]; |
||||
}; |
||||
} |
@ -1,24 +0,0 @@ |
||||
{ lib, stdenv, fetchurl, pkg-config, pure, avahi }: |
||||
|
||||
stdenv.mkDerivation rec { |
||||
pname = "pure-avahi"; |
||||
version = "0.3"; |
||||
|
||||
src = fetchurl { |
||||
url = "https://bitbucket.org/purelang/pure-lang/downloads/pure-avahi-${version}.tar.gz"; |
||||
sha256 = "5fac8a6e3a54e45648ceb207ee0061b22eac8c4e668b8d53f13eb338b09c9160"; |
||||
}; |
||||
|
||||
nativeBuildInputs = [ pkg-config ]; |
||||
propagatedBuildInputs = [ pure avahi ]; |
||||
makeFlags = [ "libdir=$(out)/lib" "prefix=$(out)/" ]; |
||||
setupHook = ../generic-setup-hook.sh; |
||||
|
||||
meta = { |
||||
description = "A digital audio interface for the Pure programming language"; |
||||
homepage = "http://puredocs.bitbucket.org/pure-avahi.html"; |
||||
license = lib.licenses.lgpl3Plus; |
||||
platforms = lib.platforms.linux; |
||||
maintainers = with lib.maintainers; [ asppsa ]; |
||||
}; |
||||
} |
@ -1,24 +0,0 @@ |
||||
{ lib, stdenv, fetchurl, pkg-config, pure }: |
||||
|
||||
stdenv.mkDerivation rec { |
||||
pname = "pure-csv"; |
||||
version = "1.6"; |
||||
|
||||
src = fetchurl { |
||||
url = "https://bitbucket.org/purelang/pure-lang/downloads/pure-csv-${version}.tar.gz"; |
||||
sha256 = "fe7c4edebe8208c54d5792a9eefaeb28c4a58b9094d161a6dda8126f0823ab3c"; |
||||
}; |
||||
|
||||
nativeBuildInputs = [ pkg-config ]; |
||||
propagatedBuildInputs = [ pure ]; |
||||
makeFlags = [ "libdir=$(out)/lib" "prefix=$(out)/" ]; |
||||
setupHook = ../generic-setup-hook.sh; |
||||
|
||||
meta = { |
||||
description = "Comma Separated Value Interface for the Pure Programming Language"; |
||||
homepage = "http://puredocs.bitbucket.org/pure-csv.html"; |
||||
license = lib.licenses.free; |
||||
platforms = lib.platforms.linux; |
||||
maintainers = with lib.maintainers; [ asppsa ]; |
||||
}; |
||||
} |
@ -1,23 +0,0 @@ |
||||
{ lib, stdenv, fetchurl, pkg-config, pure }: |
||||
|
||||
stdenv.mkDerivation rec { |
||||
pname = "pure-doc"; |
||||
version = "0.7"; |
||||
|
||||
src = fetchurl { |
||||
url = "https://bitbucket.org/purelang/pure-lang/downloads/pure-doc-${version}.tar.gz"; |
||||
sha256 = "cfa880573941f37868269bcc443a09fecd2a141a78556383d2213f6c9f45ddd9"; |
||||
}; |
||||
|
||||
nativeBuildInputs = [ pkg-config ]; |
||||
buildInputs = [ pure ]; |
||||
makeFlags = [ "libdir=$(out)/lib" "prefix=$(out)/" ]; |
||||
|
||||
meta = { |
||||
description = "A simple utility for literate programming and documenting source code written in the Pure programming language"; |
||||
homepage = "http://puredocs.bitbucket.org/pure-doc.html"; |
||||
license = lib.licenses.gpl3Plus; |
||||
platforms = lib.platforms.linux; |
||||
maintainers = with lib.maintainers; [ asppsa ]; |
||||
}; |
||||
} |
@ -1,24 +0,0 @@ |
||||
{ lib, stdenv, fetchurl, pkg-config, pure, fcgi }: |
||||
|
||||
stdenv.mkDerivation rec { |
||||
pname = "pure-fastcgi"; |
||||
version = "0.6"; |
||||
|
||||
src = fetchurl { |
||||
url = "https://bitbucket.org/purelang/pure-lang/downloads/pure-fastcgi-${version}.tar.gz"; |
||||
sha256 = "aa5789cc1e17521c01f349ee82ce2a00500e025b3f8494f89a7ebe165b5aabc7"; |
||||
}; |
||||
|
||||
nativeBuildInputs = [ pkg-config ]; |
||||
propagatedBuildInputs = [ pure fcgi ]; |
||||
makeFlags = [ "libdir=$(out)/lib" "prefix=$(out)/" ]; |
||||
setupHook = ../generic-setup-hook.sh; |
||||
|
||||
meta = { |
||||
description = "Lets you write FastCGI scripts with Pure, to be run by web servers like Apache"; |
||||
homepage = "http://puredocs.bitbucket.org/pure-fastcgi.html"; |
||||
license = lib.licenses.bsd3; |
||||
platforms = lib.platforms.linux; |
||||
maintainers = with lib.maintainers; [ asppsa ]; |
||||
}; |
||||
} |
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue