Merge remote-tracking branch 'upstream/master' into hardened-stdenv
This commit is contained in:
commit
bc21db3692
@ -89,7 +89,7 @@ packages via <literal>packageOverrides</literal></title>
|
||||
|
||||
<para>You can define a function called
|
||||
<varname>packageOverrides</varname> in your local
|
||||
<filename>~/.nixpkgs/config</filename> to overide nix packages. It
|
||||
<filename>~/.nixpkgs/config.nix</filename> to overide nix packages. It
|
||||
must be a function that takes pkgs as an argument and return modified
|
||||
set of packages.
|
||||
|
||||
|
@ -42,5 +42,37 @@ and scalable.";
|
||||
<para>Please check in the <filename>Gemfile</filename>, <filename>Gemfile.lock</filename> and the <filename>gemset.nix</filename> so future updates can be run easily.
|
||||
</para>
|
||||
|
||||
<para>Resulting derivations also have two helpful items, <literal>env</literal> and <literal>wrapper</literal>. The first one allows one to quickly drop into
|
||||
<command>nix-shell</command> with the specified environment present. E.g. <command>nix-shell -A sensu.env</command> would give you an environment with Ruby preset
|
||||
so it has all the libraries necessary for <literal>sensu</literal> in its paths. The second one can be used to make derivations from custom Ruby scripts which have
|
||||
<filename>Gemfile</filename>s with their dependencies specified. It is a derivation with <command>ruby</command> wrapped so it can find all the needed dependencies.
|
||||
For example, to make a derivation <literal>my-script</literal> for a <filename>my-script.rb</filename> (which should be placed in <filename>bin</filename>) you should
|
||||
run <command>bundix</command> as specified above and then use <literal>bundlerEnv</literal> lile this:</para>
|
||||
|
||||
<programlisting>
|
||||
<![CDATA[let env = bundlerEnv {
|
||||
name = "my-script-env";
|
||||
|
||||
inherit ruby;
|
||||
gemfile = ./Gemfile;
|
||||
lockfile = ./Gemfile.lock;
|
||||
gemset = ./gemset.nix;
|
||||
};
|
||||
|
||||
in stdenv.mkDerivation {
|
||||
name = "my-script";
|
||||
|
||||
buildInputs = [ env.wrapper ];
|
||||
|
||||
script = ./my-script.rb;
|
||||
|
||||
buildCommand = ''
|
||||
mkdir -p $out/bin
|
||||
install -D -m755 $script $out/bin/my-script
|
||||
patchShebangs $out/bin/my-script
|
||||
'';
|
||||
}]]>
|
||||
</programlisting>
|
||||
|
||||
</section>
|
||||
|
||||
|
@ -69,6 +69,7 @@
|
||||
coconnor = "Corey O'Connor <coreyoconnor@gmail.com>";
|
||||
codsl = "codsl <codsl@riseup.net>";
|
||||
codyopel = "Cody Opel <codyopel@gmail.com>";
|
||||
colemickens = "Cole Mickens <cole.mickens@gmail.com>";
|
||||
copumpkin = "Dan Peebles <pumpkingod@gmail.com>";
|
||||
coroa = "Jonas Hörsch <jonas@chaoflow.net>";
|
||||
couchemar = "Andrey Pavlov <couchemar@yandex.ru>";
|
||||
@ -95,6 +96,7 @@
|
||||
eduarrrd = "Eduard Bachmakov <e.bachmakov@gmail.com>";
|
||||
edwtjo = "Edward Tjörnhammar <ed@cflags.cc>";
|
||||
eelco = "Eelco Dolstra <eelco.dolstra@logicblox.com>";
|
||||
ehegnes = "Eric Hegnes <eric.hegnes@gmail.com>";
|
||||
ehmry = "Emery Hemingway <emery@vfemail.net>";
|
||||
eikek = "Eike Kettner <eike.kettner@posteo.de>";
|
||||
elasticdog = "Aaron Bull Schaefer <aaron@elasticdog.com>";
|
||||
@ -141,6 +143,7 @@
|
||||
iand675 = "Ian Duncan <ian@iankduncan.com>";
|
||||
ianwookim = "Ian-Woo Kim <ianwookim@gmail.com>";
|
||||
iElectric = "Domen Kozar <domen@dev.si>";
|
||||
igsha = "Igor Sharonov <igor.sharonov@gmail.com>";
|
||||
ikervagyok = "Balázs Lengyel <ikervagyok@gmail.com>";
|
||||
iyzsong = "Song Wenwu <iyzsong@gmail.com>";
|
||||
j-keck = "Jürgen Keck <jhyphenkeck@gmail.com>";
|
||||
@ -185,6 +188,7 @@
|
||||
lowfatcomputing = "Andreas Wagner <andreas.wagner@lowfatcomputing.org>";
|
||||
lsix = "Lancelot SIX <lsix@lancelotsix.com>";
|
||||
ludo = "Ludovic Courtès <ludo@gnu.org>";
|
||||
lukasepple = "Lukas Epple <post@lukasepple.de>";
|
||||
lukego = "Luke Gorrie <luke@snabb.co>";
|
||||
luispedro = "Luis Pedro Coelho <luis@luispedro.org>";
|
||||
lw = "Sergey Sofeychuk <lw@fmap.me>";
|
||||
@ -221,6 +225,7 @@
|
||||
nathan-gs = "Nathan Bijnens <nathan@nathan.gs>";
|
||||
nckx = "Tobias Geerinckx-Rice <tobias.geerinckx.rice@gmail.com>";
|
||||
nequissimus = "Tim Steinbach <tim@nequissimus.com>";
|
||||
nfjinjing = "Jinjing Wang <nfjinjing@gmail.com>";
|
||||
nico202 = "Nicolò Balzarotti <anothersms@gmail.com>";
|
||||
notthemessiah = "Brian Cohen <brian.cohen.88@gmail.com>";
|
||||
np = "Nicolas Pouillard <np.nix@nicolaspouillard.fr>";
|
||||
@ -277,6 +282,7 @@
|
||||
rushmorem = "Rushmore Mushambi <rushmore@webenchanter.com>";
|
||||
rvl = "Rodney Lorrimar <dev+nix@rodney.id.au>";
|
||||
rvlander = "Gaëtan André <rvlander@gaetanandre.eu>";
|
||||
ryantm = "Ryan Mulligan <ryan@ryantm.com>";
|
||||
rycee = "Robert Helgesson <robert@rycee.net>";
|
||||
samuelrivas = "Samuel Rivas <samuelrivas@gmail.com>";
|
||||
sander = "Sander van der Burg <s.vanderburg@tudelft.nl>";
|
||||
|
@ -93,7 +93,7 @@ rec {
|
||||
|
||||
# derivation is a reserved keyword.
|
||||
package = mkOptionType {
|
||||
name = "derivation";
|
||||
name = "package";
|
||||
check = x: isDerivation x || isStorePath x;
|
||||
merge = loc: defs:
|
||||
let res = mergeOneOption loc defs;
|
||||
|
@ -41,6 +41,7 @@ nixos.path = ./nixpkgs-unstable-2015-12-06/nixos;
|
||||
|
||||
<itemizedlist>
|
||||
<listitem><para><literal>services/monitoring/longview.nix</literal></para></listitem>
|
||||
<listitem><para><literal>services/networking/pdnsd.nix</literal></para></listitem>
|
||||
<listitem><para><literal>services/web-apps/pump.io.nix</literal></para></listitem>
|
||||
<listitem><para><literal>services/security/haka.nix</literal></para></listitem>
|
||||
</itemizedlist>
|
||||
@ -168,10 +169,34 @@ fileSystems."/example" = {
|
||||
options = [ "noatime" "compress=lzo" "space_cache" "autodefrag" ];
|
||||
};
|
||||
</programlisting>
|
||||
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>CUPS, installed by <literal>services.printing</literal> module, now
|
||||
has its data directory in <filename>/var/lib/cups</filename>. Old
|
||||
configurations from <filename>/etc/cups</filename> are moved there
|
||||
automatically, but there might be problems. Also configuration options
|
||||
<literal>services.printing.cupsdConf</literal> and
|
||||
<literal>services.printing.cupsdFilesConf</literal> were removed
|
||||
because they had been allowing one to override configuration variables
|
||||
required for CUPS to work at all on NixOS. For most use cases,
|
||||
<literal>services.printing.extraConf</literal> and new option
|
||||
<literal>services.printing.extraFilesConf</literal> should be enough;
|
||||
if you encounter a situation when they are not, please file a bug.</para>
|
||||
|
||||
<para>There are also Gutenprint improvements; in particular, a new option
|
||||
<literal>services.printing.gutenprint</literal> is added to enable automatic
|
||||
updating of Gutenprint PPMs; it's greatly recommended to enable it instead
|
||||
of adding <literal>gutenprint</literal> to the <literal>drivers</literal> list.
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><literal>services.xserver.vaapiDrivers</literal> has been removed. Use
|
||||
<literal>services.hardware.opengl.extraPackages{,32}</literal> instead. You can
|
||||
also specify VDPAU drivers there.</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
|
||||
|
||||
|
@ -129,6 +129,14 @@ with lib;
|
||||
|
||||
};
|
||||
|
||||
cache32Bit = mkOption {
|
||||
default = false;
|
||||
type = types.bool;
|
||||
description = ''
|
||||
Generate system fonts cache for 32-bit applications.
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
@ -231,12 +239,19 @@ with lib;
|
||||
"${pkgs.fontconfig}/etc/fonts/fonts.conf";
|
||||
|
||||
environment.etc."fonts/${pkgs.fontconfig.configVersion}/conf.d/00-nixos.conf".text =
|
||||
''
|
||||
let
|
||||
cache = fontconfig: pkgs.makeFontsCache { inherit fontconfig; fontDirectories = config.fonts.fonts; };
|
||||
in ''
|
||||
<?xml version='1.0'?>
|
||||
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
|
||||
<fontconfig>
|
||||
<!-- Font directories -->
|
||||
${concatStringsSep "\n" (map (font: "<dir>${font}</dir>") config.fonts.fonts)}
|
||||
<!-- Pre-generated font caches -->
|
||||
<cachedir>${cache pkgs.fontconfig}</cachedir>
|
||||
${optionalString (pkgs.stdenv.isx86_64 && config.fonts.fontconfig.cache32Bit) ''
|
||||
<cachedir>${cache pkgs.pkgsi686Linux.fontconfig}</cachedir>
|
||||
''}
|
||||
</fontconfig>
|
||||
'';
|
||||
|
||||
|
@ -22,7 +22,7 @@ with lib;
|
||||
###### implementation
|
||||
|
||||
config = mkIf config.hardware.enableAllFirmware {
|
||||
hardware.firmware = [ pkgs.firmwareLinuxNonfree ];
|
||||
hardware.firmware = [ pkgs.firmwareLinuxNonfree pkgs.intel2200BGFirmware ];
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -23,7 +23,7 @@
|
||||
|
||||
config = lib.mkIf config.networking.enableIntel2200BGFirmware {
|
||||
|
||||
hardware.enableAllFirmware = true;
|
||||
hardware.firmware = [ pkgs.intel2200BGFirmware ];
|
||||
|
||||
};
|
||||
|
||||
|
@ -10,7 +10,7 @@ let
|
||||
|
||||
videoDrivers = config.services.xserver.videoDrivers;
|
||||
|
||||
makePackage = p: p.buildEnv {
|
||||
makePackage = p: pkgs.buildEnv {
|
||||
name = "mesa-drivers+txc-${p.mesa_drivers.version}";
|
||||
paths =
|
||||
[ p.mesa_drivers
|
||||
@ -19,6 +19,16 @@ let
|
||||
];
|
||||
};
|
||||
|
||||
package = pkgs.buildEnv {
|
||||
name = "opengl-drivers";
|
||||
paths = [ cfg.package ] ++ cfg.extraPackages;
|
||||
};
|
||||
|
||||
package32 = pkgs.buildEnv {
|
||||
name = "opengl-drivers-32bit";
|
||||
paths = [ cfg.package32 ] ++ cfg.extraPackages32;
|
||||
};
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
@ -75,11 +85,32 @@ in
|
||||
internal = true;
|
||||
description = ''
|
||||
The package that provides the 32-bit OpenGL implementation on
|
||||
64-bit systems. Used when <option>driSupport32Bit</option> is
|
||||
64-bit systems. Used when <option>driSupport32Bit</option> is
|
||||
set.
|
||||
'';
|
||||
};
|
||||
|
||||
hardware.opengl.extraPackages = mkOption {
|
||||
type = types.listOf types.package;
|
||||
default = [];
|
||||
example = literalExample "with pkgs; [ vaapiIntel libvdpau-va-gl vaapiVdpau ]";
|
||||
description = ''
|
||||
Additional packages to add to OpenGL drivers. This can be used
|
||||
to add additional VA-API/VDPAU drivers.
|
||||
'';
|
||||
};
|
||||
|
||||
hardware.opengl.extraPackages32 = mkOption {
|
||||
type = types.listOf types.package;
|
||||
default = [];
|
||||
example = literalExample "with pkgs; [ vaapiIntel libvdpau-va-gl vaapiVdpau ]";
|
||||
description = ''
|
||||
Additional packages to add to 32-bit OpenGL drivers on
|
||||
64-bit systems. Used when <option>driSupport32Bit</option> is
|
||||
set. This can be used to add additional VA-API/VDPAU drivers.
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
@ -91,11 +122,11 @@ in
|
||||
|
||||
system.activationScripts.setup-opengl =
|
||||
''
|
||||
ln -sfn ${cfg.package} /run/opengl-driver
|
||||
ln -sfn ${package} /run/opengl-driver
|
||||
${if pkgs.stdenv.isi686 then ''
|
||||
ln -sfn opengl-driver /run/opengl-driver-32
|
||||
'' else if cfg.driSupport32Bit then ''
|
||||
ln -sfn ${cfg.package32} /run/opengl-driver-32
|
||||
ln -sfn ${package32} /run/opengl-driver-32
|
||||
'' else ''
|
||||
rm -f /run/opengl-driver-32
|
||||
''}
|
||||
|
@ -74,7 +74,7 @@ let cfg = config.system.autoUpgrade; in
|
||||
serviceConfig.Type = "oneshot";
|
||||
|
||||
environment = config.nix.envVars //
|
||||
{ inherit (config.environment.sessionVariables) NIX_PATH SSL_CERT_FILE;
|
||||
{ inherit (config.environment.sessionVariables) NIX_PATH;
|
||||
HOME = "/root";
|
||||
};
|
||||
|
||||
|
@ -248,6 +248,10 @@
|
||||
matrix-synapse = 224;
|
||||
rspamd = 225;
|
||||
rmilter = 226;
|
||||
cfdyndns = 227;
|
||||
gammu-smsd = 228;
|
||||
pdnsd = 229;
|
||||
octoprint = 230;
|
||||
|
||||
# When adding a uid, make sure it doesn't match an existing gid. And don't use uids above 399!
|
||||
|
||||
@ -473,6 +477,9 @@
|
||||
matrix-synapse = 224;
|
||||
rspamd = 225;
|
||||
rmilter = 226;
|
||||
cfdyndns = 227;
|
||||
pdnsd = 229;
|
||||
octoprint = 230;
|
||||
|
||||
# When adding a gid, make sure it doesn't match an existing
|
||||
# uid. Users and groups with the same name should have equal
|
||||
|
@ -201,6 +201,7 @@
|
||||
./services/misc/bepasty.nix
|
||||
./services/misc/canto-daemon.nix
|
||||
./services/misc/calibre-server.nix
|
||||
./services/misc/cfdyndns.nix
|
||||
./services/misc/cpuminer-cryptonight.nix
|
||||
./services/misc/cgminer.nix
|
||||
./services/misc/confd.nix
|
||||
@ -211,6 +212,7 @@
|
||||
./services/misc/etcd.nix
|
||||
./services/misc/felix.nix
|
||||
./services/misc/folding-at-home.nix
|
||||
./services/misc/gammu-smsd.nix
|
||||
#./services/misc/gitit.nix
|
||||
./services/misc/gitlab.nix
|
||||
./services/misc/gitolite.nix
|
||||
@ -227,6 +229,7 @@
|
||||
./services/misc/nix-gc.nix
|
||||
./services/misc/nixos-manual.nix
|
||||
./services/misc/nix-ssh-serve.nix
|
||||
./services/misc/octoprint.nix
|
||||
./services/misc/parsoid.nix
|
||||
./services/misc/phd.nix
|
||||
./services/misc/plex.nix
|
||||
@ -340,6 +343,7 @@
|
||||
./services/networking/openntpd.nix
|
||||
./services/networking/openvpn.nix
|
||||
./services/networking/ostinato.nix
|
||||
./services/networking/pdnsd.nix
|
||||
./services/networking/polipo.nix
|
||||
./services/networking/prayer.nix
|
||||
./services/networking/privoxy.nix
|
||||
|
@ -165,7 +165,6 @@ in
|
||||
script = "exec venus-planet ${configFile}";
|
||||
serviceConfig.User = "${cfg.user}";
|
||||
serviceConfig.Group = "${cfg.group}";
|
||||
environment.SSL_CERT_FILE = "/etc/ssl/certs/ca-certificates.crt";
|
||||
startAt = cfg.dates;
|
||||
};
|
||||
|
||||
|
@ -77,6 +77,7 @@ with lib;
|
||||
(mkRenamedOptionModule [ "services" "xserver" "driSupport32Bit" ] [ "hardware" "opengl" "driSupport32Bit" ])
|
||||
(mkRenamedOptionModule [ "services" "xserver" "s3tcSupport" ] [ "hardware" "opengl" "s3tcSupport" ])
|
||||
(mkRenamedOptionModule [ "hardware" "opengl" "videoDrivers" ] [ "services" "xserver" "videoDrivers" ])
|
||||
(mkRenamedOptionModule [ "services" "xserver" "vaapiDrivers" ] [ "hardware" "opengl" "extraPackages" ])
|
||||
|
||||
(mkRenamedOptionModule [ "services" "mysql55" ] [ "services" "mysql" ])
|
||||
|
||||
@ -99,6 +100,8 @@ with lib;
|
||||
(mkRemovedOptionModule [ "services" "syslog-ng" "listenToJournal" ])
|
||||
(mkRemovedOptionModule [ "ec2" "metadata" ])
|
||||
(mkRemovedOptionModule [ "services" "openvpn" "enable" ])
|
||||
(mkRemovedOptionModule [ "services" "printing" "cupsFilesConf" ])
|
||||
(mkRemovedOptionModule [ "services" "printing" "cupsdConf" ])
|
||||
|
||||
];
|
||||
}
|
||||
|
@ -64,12 +64,6 @@ in
|
||||
# CentOS/Fedora compatibility.
|
||||
environment.etc."pki/tls/certs/ca-bundle.crt".source = caCertificates;
|
||||
|
||||
environment.sessionVariables =
|
||||
{ SSL_CERT_FILE = "/etc/ssl/certs/ca-certificates.crt";
|
||||
# FIXME: unneeded - remove eventually.
|
||||
GIT_SSL_CAINFO = "/etc/ssl/certs/ca-certificates.crt";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -37,6 +37,7 @@ in
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.slurm-llnl;
|
||||
defaultText = "pkgs.slurm-llnl";
|
||||
example = literalExample "pkgs.slurm-llnl-full";
|
||||
description = ''
|
||||
The packge to use for slurm binaries.
|
||||
|
@ -92,11 +92,12 @@ in {
|
||||
type = with types; attrsOf str;
|
||||
description = ''
|
||||
Additional environment variables to be passed to the jenkins process.
|
||||
As a base environment, jenkins receives NIX_PATH, SSL_CERT_FILE and
|
||||
GIT_SSL_CAINFO from <option>environment.sessionVariables</option>,
|
||||
NIX_REMOTE is set to "daemon" and JENKINS_HOME is set to
|
||||
the value of <option>services.jenkins.home</option>. This option has
|
||||
precedence and can be used to override those mentioned variables.
|
||||
As a base environment, jenkins receives NIX_PATH from
|
||||
<option>environment.sessionVariables</option>, NIX_REMOTE is set to
|
||||
"daemon" and JENKINS_HOME is set to the value of
|
||||
<option>services.jenkins.home</option>.
|
||||
This option has precedence and can be used to override those
|
||||
mentioned variables.
|
||||
'';
|
||||
};
|
||||
|
||||
@ -136,11 +137,7 @@ in {
|
||||
environment =
|
||||
let
|
||||
selectedSessionVars =
|
||||
lib.filterAttrs (n: v: builtins.elem n
|
||||
[ "NIX_PATH"
|
||||
"SSL_CERT_FILE"
|
||||
"GIT_SSL_CAINFO"
|
||||
])
|
||||
lib.filterAttrs (n: v: builtins.elem n [ "NIX_PATH" ])
|
||||
config.environment.sessionVariables;
|
||||
in
|
||||
selectedSessionVars //
|
||||
|
70
nixos/modules/services/misc/cfdyndns.nix
Normal file
70
nixos/modules/services/misc/cfdyndns.nix
Normal file
@ -0,0 +1,70 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.services.cfdyndns;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
services.cfdyndns = {
|
||||
enable = mkEnableOption "Cloudflare Dynamic DNS Client";
|
||||
|
||||
email = mkOption {
|
||||
type = types.str;
|
||||
description = ''
|
||||
The email address to use to authenticate to CloudFlare.
|
||||
'';
|
||||
};
|
||||
|
||||
apikey = mkOption {
|
||||
type = types.str;
|
||||
description = ''
|
||||
The API Key to use to authenticate to CloudFlare.
|
||||
'';
|
||||
};
|
||||
|
||||
records = mkOption {
|
||||
default = [];
|
||||
example = [ "host.tld" ];
|
||||
type = types.listOf types.str;
|
||||
description = ''
|
||||
The records to update in CloudFlare.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
systemd.services.cfdyndns = {
|
||||
description = "CloudFlare Dynamic DNS Client";
|
||||
after = [ "network.target" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
startAt = "5 minutes";
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
User = config.ids.uids.cfdyndns;
|
||||
Group = config.ids.gids.cfdyndns;
|
||||
ExecStart = "/bin/sh -c '${pkgs.cfdyndns}/bin/cfdyndns'";
|
||||
};
|
||||
environment = {
|
||||
CLOUDFLARE_EMAIL="${cfg.email}";
|
||||
CLOUDFLARE_APIKEY="${cfg.apikey}";
|
||||
CLOUDFLARE_RECORDS="${concatStringsSep "," cfg.records}";
|
||||
};
|
||||
};
|
||||
|
||||
users.extraUsers = {
|
||||
cfdyndns = {
|
||||
group = "cfdyndns";
|
||||
uid = config.ids.uids.cfdyndns;
|
||||
};
|
||||
};
|
||||
|
||||
users.extraGroups = {
|
||||
cfdyndns = {
|
||||
gid = config.ids.gids.cfdyndns;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
253
nixos/modules/services/misc/gammu-smsd.nix
Normal file
253
nixos/modules/services/misc/gammu-smsd.nix
Normal file
@ -0,0 +1,253 @@
|
||||
{ pkgs, lib, config, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.services.gammu-smsd;
|
||||
|
||||
configFile = pkgs.writeText "gammu-smsd.conf" ''
|
||||
[gammu]
|
||||
Device = ${cfg.device.path}
|
||||
Connection = ${cfg.device.connection}
|
||||
SynchronizeTime = ${if cfg.device.synchronizeTime then "yes" else "no"}
|
||||
LogFormat = ${cfg.log.format}
|
||||
${if (cfg.device.pin != null) then "PIN = ${cfg.device.pin}" else ""}
|
||||
${cfg.extraConfig.gammu}
|
||||
|
||||
|
||||
[smsd]
|
||||
LogFile = ${cfg.log.file}
|
||||
Service = ${cfg.backend.service}
|
||||
|
||||
${optionalString (cfg.backend.service == "files") ''
|
||||
InboxPath = ${cfg.backend.files.inboxPath}
|
||||
OutboxPath = ${cfg.backend.files.outboxPath}
|
||||
SentSMSPath = ${cfg.backend.files.sentSMSPath}
|
||||
ErrorSMSPath = ${cfg.backend.files.errorSMSPath}
|
||||
''}
|
||||
|
||||
${optionalString (cfg.backend.service == "sql" && cfg.backend.sql.driver == "sqlite") ''
|
||||
Driver = ${cfg.backend.sql.driver}
|
||||
DBDir = ${cfg.backend.sql.database}
|
||||
''}
|
||||
|
||||
${optionalString (cfg.backend.service == "sql" && cfg.backend.sql.driver == "native_pgsql") (
|
||||
with cfg.backend; ''
|
||||
Driver = ${sql.driver}
|
||||
${if (sql.database!= null) then "Database = ${sql.database}" else ""}
|
||||
${if (sql.host != null) then "Host = ${sql.host}" else ""}
|
||||
${if (sql.user != null) then "User = ${sql.user}" else ""}
|
||||
${if (sql.password != null) then "Password = ${sql.password}" else ""}
|
||||
'')}
|
||||
|
||||
${cfg.extraConfig.smsd}
|
||||
'';
|
||||
|
||||
initDBDir = "share/doc/gammu/examples/sql";
|
||||
|
||||
gammuPackage = with cfg.backend; (pkgs.gammu.override {
|
||||
dbiSupport = (service == "sql" && sql.driver == "sqlite");
|
||||
postgresSupport = (service == "sql" && sql.driver == "native_pgsql");
|
||||
});
|
||||
|
||||
in {
|
||||
options = {
|
||||
services.gammu-smsd = {
|
||||
|
||||
enable = mkEnableOption "gammu-smsd daemon";
|
||||
|
||||
user = mkOption {
|
||||
type = types.str;
|
||||
default = "smsd";
|
||||
description = "User that has access to the device";
|
||||
};
|
||||
|
||||
device = {
|
||||
path = mkOption {
|
||||
type = types.path;
|
||||
description = "Device node or address of the phone";
|
||||
example = "/dev/ttyUSB2";
|
||||
};
|
||||
|
||||
group = mkOption {
|
||||
type = types.str;
|
||||
default = "root";
|
||||
description = "Owner group of the device";
|
||||
example = "dialout";
|
||||
};
|
||||
|
||||
connection = mkOption {
|
||||
type = types.str;
|
||||
default = "at";
|
||||
description = "Protocol which will be used to talk to the phone";
|
||||
};
|
||||
|
||||
synchronizeTime = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = "Whether to set time from computer to the phone during starting connection";
|
||||
};
|
||||
|
||||
pin = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
description = "PIN code for the simcard";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
log = {
|
||||
file = mkOption {
|
||||
type = types.str;
|
||||
default = "syslog";
|
||||
description = "Path to file where information about communication will be stored";
|
||||
};
|
||||
|
||||
format = mkOption {
|
||||
type = types.enum [ "nothing" "text" "textall" "textalldate" "errors" "errorsdate" "binary" ];
|
||||
default = "errors";
|
||||
description = "Determines what will be logged to the LogFile";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
extraConfig = {
|
||||
gammu = mkOption {
|
||||
type = types.lines;
|
||||
default = "";
|
||||
description = "Extra config lines to be added into [gammu] section";
|
||||
};
|
||||
|
||||
|
||||
smsd = mkOption {
|
||||
type = types.lines;
|
||||
default = "";
|
||||
description = "Extra config lines to be added into [smsd] section";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
backend = {
|
||||
service = mkOption {
|
||||
type = types.enum [ "null" "files" "sql" ];
|
||||
default = "null";
|
||||
description = "Service to use to store sms data.";
|
||||
};
|
||||
|
||||
files = {
|
||||
inboxPath = mkOption {
|
||||
type = types.path;
|
||||
default = "/var/spool/sms/inbox/";
|
||||
description = "Where the received SMSes are stored";
|
||||
};
|
||||
|
||||
outboxPath = mkOption {
|
||||
type = types.path;
|
||||
default = "/var/spool/sms/outbox/";
|
||||
description = "Where SMSes to be sent should be placed";
|
||||
};
|
||||
|
||||
sentSMSPath = mkOption {
|
||||
type = types.path;
|
||||
default = "/var/spool/sms/sent/";
|
||||
description = "Where the transmitted SMSes are placed";
|
||||
};
|
||||
|
||||
errorSMSPath = mkOption {
|
||||
type = types.path;
|
||||
default = "/var/spool/sms/error/";
|
||||
description = "Where SMSes with error in transmission is placed";
|
||||
};
|
||||
};
|
||||
|
||||
sql = {
|
||||
driver = mkOption {
|
||||
type = types.enum [ "native_mysql" "native_pgsql" "odbc" "dbi" ];
|
||||
description = "DB driver to use";
|
||||
};
|
||||
|
||||
sqlDialect = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
description = "SQL dialect to use (odbc driver only)";
|
||||
};
|
||||
|
||||
database = mkOption {
|
||||
type = types.str;
|
||||
default = null;
|
||||
description = "Database name to store sms data";
|
||||
};
|
||||
|
||||
host = mkOption {
|
||||
type = types.str;
|
||||
default = "localhost";
|
||||
description = "Database server address";
|
||||
};
|
||||
|
||||
user = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
description = "User name used for connection to the database";
|
||||
};
|
||||
|
||||
password = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
description = "User password used for connetion to the database";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
users.extraUsers.${cfg.user} = {
|
||||
description = "gammu-smsd user";
|
||||
uid = config.ids.uids.gammu-smsd;
|
||||
extraGroups = [ "${cfg.device.group}" ];
|
||||
};
|
||||
|
||||
environment.systemPackages = with cfg.backend; [ gammuPackage ]
|
||||
++ optionals (service == "sql" && sql.driver == "sqlite") [ pkgs.sqlite ];
|
||||
|
||||
systemd.services.gammu-smsd = {
|
||||
description = "gammu-smsd daemon";
|
||||
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
|
||||
wants = with cfg.backend; [ ]
|
||||
++ optionals (service == "sql" && sql.driver == "native_pgsql") [ "postgresql.service" ];
|
||||
|
||||
preStart = with cfg.backend;
|
||||
|
||||
optionalString (service == "files") (with files; ''
|
||||
mkdir -m 755 -p ${inboxPath} ${outboxPath} ${sentSMSPath} ${errorSMSPath}
|
||||
chown ${cfg.user} -R ${inboxPath}
|
||||
chown ${cfg.user} -R ${outboxPath}
|
||||
chown ${cfg.user} -R ${sentSMSPath}
|
||||
chown ${cfg.user} -R ${errorSMSPath}
|
||||
'')
|
||||
+ optionalString (service == "sql" && sql.driver == "sqlite") ''
|
||||
cat "${gammuPackage}/${initDBDir}/sqlite.sql" \
|
||||
| ${pkgs.sqlite}/bin/sqlite3 ${sql.database}
|
||||
''
|
||||
+ (let execPsql = extraArgs: concatStringsSep " " [
|
||||
(optionalString (sql.password != null) "PGPASSWORD=${sql.password}")
|
||||
"${config.services.postgresql.package}/bin/psql"
|
||||
(optionalString (sql.host != null) "-h ${sql.host}")
|
||||
(optionalString (sql.user != null) "-U ${sql.user}")
|
||||
"$extraArgs"
|
||||
"${sql.database}"
|
||||
]; in optionalString (service == "sql" && sql.driver == "native_pgsql") ''
|
||||
echo '\i '"${gammuPackage}/${initDBDir}/pgsql.sql" | ${execPsql ""}
|
||||
'');
|
||||
|
||||
serviceConfig = {
|
||||
User = "${cfg.user}";
|
||||
Group = "${cfg.device.group}";
|
||||
PermissionsStartOnly = true;
|
||||
ExecStart = "${gammuPackage}/bin/gammu-smsd -c ${configFile}";
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
}
|
@ -61,6 +61,7 @@ in {
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.matrix-synapse;
|
||||
defaultText = "pkgs.matrix-synapse";
|
||||
description = ''
|
||||
Overridable attribute of the matrix synapse server package to use.
|
||||
'';
|
||||
|
118
nixos/modules/services/misc/octoprint.nix
Normal file
118
nixos/modules/services/misc/octoprint.nix
Normal file
@ -0,0 +1,118 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
|
||||
cfg = config.services.octoprint;
|
||||
|
||||
cfgUpdate = pkgs.writeText "octoprint-config.yaml" (builtins.toJSON {
|
||||
plugins.cura.cura_engine = "${pkgs.curaengine}/bin/CuraEngine";
|
||||
server.host = cfg.host;
|
||||
server.port = cfg.port;
|
||||
webcam.ffmpeg = "${pkgs.ffmpeg}/bin/ffmpeg";
|
||||
});
|
||||
|
||||
pluginsEnv = pkgs.python.buildEnv.override {
|
||||
extraLibs = cfg.plugins pkgs.octoprint-plugins;
|
||||
};
|
||||
|
||||
in
|
||||
{
|
||||
##### interface
|
||||
|
||||
options = {
|
||||
|
||||
services.octoprint = {
|
||||
|
||||
enable = mkEnableOption "OctoPrint, web interface for 3D printers";
|
||||
|
||||
host = mkOption {
|
||||
type = types.str;
|
||||
default = "0.0.0.0";
|
||||
description = ''
|
||||
Host to bind OctoPrint to.
|
||||
'';
|
||||
};
|
||||
|
||||
port = mkOption {
|
||||
type = types.int;
|
||||
default = 5000;
|
||||
description = ''
|
||||
Port to bind OctoPrint to.
|
||||
'';
|
||||
};
|
||||
|
||||
user = mkOption {
|
||||
type = types.str;
|
||||
default = "octoprint";
|
||||
description = "User for the daemon.";
|
||||
};
|
||||
|
||||
group = mkOption {
|
||||
type = types.str;
|
||||
default = "octoprint";
|
||||
description = "Group for the daemon.";
|
||||
};
|
||||
|
||||
stateDir = mkOption {
|
||||
type = types.path;
|
||||
default = "/var/lib/octoprint";
|
||||
description = "State directory of the daemon.";
|
||||
};
|
||||
|
||||
plugins = mkOption {
|
||||
default = plugins: [];
|
||||
example = literalExample "plugins: [ m3d-fio ]";
|
||||
description = "Additional plugins.";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
##### implementation
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
users.extraUsers = optionalAttrs (cfg.user == "octoprint") (singleton
|
||||
{ name = "octoprint";
|
||||
group = cfg.group;
|
||||
uid = config.ids.uids.octoprint;
|
||||
});
|
||||
|
||||
users.extraGroups = optionalAttrs (cfg.group == "octoprint") (singleton
|
||||
{ name = "octoprint";
|
||||
gid = config.ids.gids.octoprint;
|
||||
});
|
||||
|
||||
systemd.services.octoprint = {
|
||||
description = "OctoPrint, web interface for 3D printers";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "network.target" ];
|
||||
path = [ pluginsEnv ];
|
||||
environment.PYTHONPATH = makeSearchPath pkgs.python.sitePackages [ pluginsEnv ];
|
||||
|
||||
preStart = ''
|
||||
mkdir -p "${cfg.stateDir}"
|
||||
if [ -e "${cfg.stateDir}/config.yaml" ]; then
|
||||
${pkgs.yaml-merge}/bin/yaml-merge "${cfg.stateDir}/config.yaml" "${cfgUpdate}" > "${cfg.stateDir}/config.yaml.tmp"
|
||||
mv "${cfg.stateDir}/config.yaml.tmp" "${cfg.stateDir}/config.yaml"
|
||||
else
|
||||
cp "${cfgUpdate}" "${cfg.stateDir}/config.yaml"
|
||||
chmod 600 "${cfg.stateDir}/config.yaml"
|
||||
fi
|
||||
chown -R ${cfg.user}:${cfg.group} "${cfg.stateDir}"
|
||||
'';
|
||||
|
||||
serviceConfig = {
|
||||
ExecStart = "${pkgs.octoprint}/bin/octoprint -b ${cfg.stateDir}";
|
||||
User = cfg.user;
|
||||
Group = cfg.group;
|
||||
PermissionsStartOnly = true;
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
}
|
@ -58,6 +58,7 @@ in
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.plex;
|
||||
defaultText = "pkgs.plex";
|
||||
description = ''
|
||||
The Plex package to use. Plex subscribers may wish to use their own
|
||||
package here, pointing to subscriber-only server versions.
|
||||
|
@ -34,6 +34,15 @@ in {
|
||||
type = bool;
|
||||
};
|
||||
|
||||
package = mkOption {
|
||||
default = pkgs.collectd;
|
||||
defaultText = "pkgs.collectd";
|
||||
description = ''
|
||||
Which collectd package to use.
|
||||
'';
|
||||
type = package;
|
||||
};
|
||||
|
||||
user = mkOption {
|
||||
default = "collectd";
|
||||
description = ''
|
||||
|
@ -183,7 +183,6 @@ in {
|
||||
Restart = "always";
|
||||
RestartSec = 2;
|
||||
};
|
||||
environment.SSL_CERT_FILE = "/etc/ssl/certs/ca-certificates.crt";
|
||||
restartTriggers = [ pkgs.dd-agent ddConf diskConfig networkConfig postgresqlConfig nginxConfig mongoConfig ];
|
||||
};
|
||||
|
||||
|
@ -33,6 +33,7 @@ in
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.consul;
|
||||
defaultText = "pkgs.consul";
|
||||
description = ''
|
||||
The package used for the Consul agent and CLI.
|
||||
'';
|
||||
|
@ -127,7 +127,6 @@ in
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "network.target" ];
|
||||
|
||||
environment.SSL_CERT_FILE = "/etc/ssl/certs/ca-certificates.crt";
|
||||
serviceConfig = {
|
||||
# Uncomment this if too many problems occur:
|
||||
# Type = "forking";
|
||||
|
@ -32,6 +32,7 @@ in {
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.ejabberd;
|
||||
defaultText = "pkgs.ejabberd";
|
||||
description = "ejabberd server package to use";
|
||||
};
|
||||
|
||||
|
93
nixos/modules/services/networking/pdnsd.nix
Normal file
93
nixos/modules/services/networking/pdnsd.nix
Normal file
@ -0,0 +1,93 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.services.pdnsd;
|
||||
pdnsd = pkgs.pdnsd;
|
||||
pdnsdUser = "pdnsd";
|
||||
pdnsdGroup = "pdnsd";
|
||||
pdnsdConf = pkgs.writeText "pdnsd.conf"
|
||||
''
|
||||
global {
|
||||
run_as=${pdnsdUser};
|
||||
cache_dir="${cfg.cacheDir}";
|
||||
${cfg.globalConfig}
|
||||
}
|
||||
|
||||
server {
|
||||
${cfg.serverConfig}
|
||||
}
|
||||
${cfg.extraConfig}
|
||||
'';
|
||||
in
|
||||
|
||||
{ options =
|
||||
{ services.pdnsd =
|
||||
{ enable = mkEnableOption "pdnsd";
|
||||
|
||||
cacheDir = mkOption {
|
||||
type = types.str;
|
||||
default = "/var/cache/pdnsd";
|
||||
description = "Directory holding the pdnsd cache";
|
||||
};
|
||||
|
||||
globalConfig = mkOption {
|
||||
type = types.lines;
|
||||
default = "";
|
||||
description = ''
|
||||
Global configuration that should be added to the global directory
|
||||
of <literal>pdnsd.conf</literal>.
|
||||
'';
|
||||
};
|
||||
|
||||
serverConfig = mkOption {
|
||||
type = types.lines;
|
||||
default = "";
|
||||
description = ''
|
||||
Server configuration that should be added to the server directory
|
||||
of <literal>pdnsd.conf</literal>.
|
||||
'';
|
||||
};
|
||||
|
||||
extraConfig = mkOption {
|
||||
type = types.lines;
|
||||
default = "";
|
||||
description = ''
|
||||
Extra configuration directives that should be added to
|
||||
<literal>pdnsd.conf</literal>.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
users.extraUsers = singleton {
|
||||
name = pdnsdUser;
|
||||
uid = config.ids.uids.pdnsd;
|
||||
group = pdnsdGroup;
|
||||
description = "pdnsd user";
|
||||
};
|
||||
|
||||
users.extraGroups = singleton {
|
||||
name = pdnsdGroup;
|
||||
gid = config.ids.gids.pdnsd;
|
||||
};
|
||||
|
||||
systemd.services.pdnsd =
|
||||
{ wantedBy = [ "multi-user.target" ];
|
||||
after = [ "network.target" ];
|
||||
preStart =
|
||||
''
|
||||
mkdir -p "${cfg.cacheDir}"
|
||||
touch "${cfg.cacheDir}/pdnsd.cache"
|
||||
chown -R ${pdnsdUser}:${pdnsdGroup} "${cfg.cacheDir}"
|
||||
'';
|
||||
description = "pdnsd";
|
||||
serviceConfig =
|
||||
{
|
||||
ExecStart = "${pdnsd}/bin/pdnsd -c ${pdnsdConf}";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
@ -26,6 +26,7 @@ in
|
||||
|
||||
extraOptions = mkOption {
|
||||
type = types.string;
|
||||
default = "";
|
||||
description = ''
|
||||
Additional command line arguments to pass to tlsdated.
|
||||
'';
|
||||
|
@ -16,6 +16,11 @@ let
|
||||
"forward-zone:\n name: .\n" +
|
||||
concatMapStrings (x: " forward-addr: ${x}\n") cfg.forwardAddresses;
|
||||
|
||||
rootTrustAnchorFile = "${stateDir}/root.key";
|
||||
|
||||
trustAnchor = optionalString cfg.enableRootTrustAnchor
|
||||
"auto-trust-anchor-file: ${rootTrustAnchorFile}";
|
||||
|
||||
confFile = pkgs.writeText "unbound.conf" ''
|
||||
server:
|
||||
directory: "${stateDir}"
|
||||
@ -24,6 +29,7 @@ let
|
||||
pidfile: ""
|
||||
${interfaces}
|
||||
${access}
|
||||
${trustAnchor}
|
||||
${cfg.extraConfig}
|
||||
${forward}
|
||||
'';
|
||||
@ -38,28 +44,39 @@ in
|
||||
services.unbound = {
|
||||
|
||||
enable = mkOption {
|
||||
default = false;
|
||||
description = "Whether to enable the Unbound domain name server.";
|
||||
default = false;
|
||||
type = types.bool;
|
||||
description = "Whether to enable the Unbound domain name server.";
|
||||
};
|
||||
|
||||
allowedAccess = mkOption {
|
||||
default = ["127.0.0.0/24"];
|
||||
description = "What networks are allowed to use unbound as a resolver.";
|
||||
default = ["127.0.0.0/24"];
|
||||
type = types.listOf types.str;
|
||||
description = "What networks are allowed to use unbound as a resolver.";
|
||||
};
|
||||
|
||||
interfaces = mkOption {
|
||||
default = [ "127.0.0.1" "::1" ];
|
||||
description = "What addresses the server should listen on.";
|
||||
default = [ "127.0.0.1" "::1" ];
|
||||
type = types.listOf types.str;
|
||||
description = "What addresses the server should listen on.";
|
||||
};
|
||||
|
||||
forwardAddresses = mkOption {
|
||||
default = [ ];
|
||||
description = "What servers to forward queries to.";
|
||||
default = [ ];
|
||||
type = types.listOf types.str;
|
||||
description = "What servers to forward queries to.";
|
||||
};
|
||||
|
||||
enableRootTrustAnchor = mkOption {
|
||||
default = true;
|
||||
type = types.bool;
|
||||
description = "Use and update root trust anchor for DNSSEC validation.";
|
||||
};
|
||||
|
||||
extraConfig = mkOption {
|
||||
default = "";
|
||||
description = "Extra lines of unbound config.";
|
||||
default = "";
|
||||
type = types.str;
|
||||
description = "Extra lines of unbound config.";
|
||||
};
|
||||
|
||||
};
|
||||
@ -88,9 +105,10 @@ in
|
||||
|
||||
preStart = ''
|
||||
mkdir -m 0755 -p ${stateDir}/dev/
|
||||
cp ${confFile} ${stateDir}/unbound.conf
|
||||
chown unbound ${stateDir}
|
||||
touch ${stateDir}/dev/random
|
||||
cp ${confFile} ${stateDir}/unbound.conf
|
||||
${pkgs.unbound}/bin/unbound-anchor -a ${rootTrustAnchorFile}
|
||||
chown unbound ${stateDir} ${rootTrustAnchorFile}
|
||||
touch ${stateDir}/dev/random
|
||||
${pkgs.utillinux}/bin/mount --bind -n /dev/random ${stateDir}/dev/random
|
||||
'';
|
||||
|
||||
|
@ -4,10 +4,13 @@ with lib;
|
||||
|
||||
let
|
||||
|
||||
inherit (pkgs) cups cups_filters;
|
||||
inherit (pkgs) cups cups-pk-helper cups_filters gutenprint;
|
||||
|
||||
cfg = config.services.printing;
|
||||
|
||||
avahiEnabled = config.services.avahi.enable;
|
||||
polkitEnabled = config.security.polkit.enable;
|
||||
|
||||
additionalBackends = pkgs.runCommand "additional-cups-backends" { }
|
||||
''
|
||||
mkdir -p $out
|
||||
@ -30,12 +33,75 @@ let
|
||||
# cupsd.conf tells cupsd to use this tree.
|
||||
bindir = pkgs.buildEnv {
|
||||
name = "cups-progs";
|
||||
paths = cfg.drivers;
|
||||
pathsToLink = [ "/lib/cups" "/share/cups" "/bin" "/etc/cups" ];
|
||||
paths =
|
||||
[ cups additionalBackends cups_filters pkgs.ghostscript ]
|
||||
++ optional cfg.gutenprint gutenprint
|
||||
++ cfg.drivers;
|
||||
pathsToLink = [ "/lib/cups" "/share/cups" "/bin" ];
|
||||
postBuild = cfg.bindirCmds;
|
||||
ignoreCollisions = true;
|
||||
};
|
||||
|
||||
writeConf = name: text: pkgs.writeTextFile {
|
||||
inherit name text;
|
||||
destination = "/etc/cups/${name}";
|
||||
};
|
||||
|
||||
cupsFilesFile = writeConf "cups-files.conf" ''
|
||||
SystemGroup root wheel
|
||||
|
||||
ServerBin ${bindir}/lib/cups
|
||||
DataDir ${bindir}/share/cups
|
||||
|
||||
AccessLog syslog
|
||||
ErrorLog syslog
|
||||
PageLog syslog
|
||||
|
||||
TempDir ${cfg.tempDir}
|
||||
|
||||
# User and group used to run external programs, including
|
||||
# those that actually send the job to the printer. Note that
|
||||
# Udev sets the group of printer devices to `lp', so we want
|
||||
# these programs to run as `lp' as well.
|
||||
User cups
|
||||
Group lp
|
||||
|
||||
${cfg.extraFilesConf}
|
||||
'';
|
||||
|
||||
cupsdFile = writeConf "cupsd.conf" ''
|
||||
${concatMapStrings (addr: ''
|
||||
Listen ${addr}
|
||||
'') cfg.listenAddresses}
|
||||
Listen /var/run/cups/cups.sock
|
||||
|
||||
SetEnv PATH ${bindir}/lib/cups/filter:${bindir}/bin
|
||||
|
||||
DefaultShared ${if cfg.defaultShared then "Yes" else "No"}
|
||||
|
||||
Browsing ${if cfg.browsing then "Yes" else "No"}
|
||||
|
||||
WebInterface ${if cfg.webInterface then "Yes" else "No"}
|
||||
|
||||
${cfg.extraConf}
|
||||
'';
|
||||
|
||||
browsedFile = writeConf "cups-browsed.conf" cfg.browsedConf;
|
||||
|
||||
rootdir = pkgs.buildEnv {
|
||||
name = "cups-progs";
|
||||
paths = [
|
||||
cupsFilesFile
|
||||
cupsdFile
|
||||
(writeConf "client.conf" cfg.clientConf)
|
||||
(writeConf "snmp.conf" cfg.snmpConf)
|
||||
] ++ optional avahiEnabled browsedFile
|
||||
++ optional cfg.gutenprint gutenprint
|
||||
++ cfg.drivers;
|
||||
pathsToLink = [ "/etc/cups" ];
|
||||
ignoreCollisions = true;
|
||||
};
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
@ -96,25 +162,11 @@ in
|
||||
'';
|
||||
};
|
||||
|
||||
cupsdConf = mkOption {
|
||||
type = types.lines;
|
||||
default = "";
|
||||
example =
|
||||
''
|
||||
BrowsePoll cups.example.com
|
||||
LogLevel debug
|
||||
'';
|
||||
description = ''
|
||||
The contents of the configuration file of the CUPS daemon
|
||||
(<filename>cupsd.conf</filename>).
|
||||
'';
|
||||
};
|
||||
|
||||
cupsFilesConf = mkOption {
|
||||
extraFilesConf = mkOption {
|
||||
type = types.lines;
|
||||
default = "";
|
||||
description = ''
|
||||
The contents of the configuration file of the CUPS daemon
|
||||
Extra contents of the configuration file of the CUPS daemon
|
||||
(<filename>cups-files.conf</filename>).
|
||||
'';
|
||||
};
|
||||
@ -171,8 +223,18 @@ in
|
||||
'';
|
||||
};
|
||||
|
||||
gutenprint = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Whether to enable Gutenprint drivers for CUPS. This includes auto-updating
|
||||
Gutenprint PPD files.
|
||||
'';
|
||||
};
|
||||
|
||||
drivers = mkOption {
|
||||
type = types.listOf types.path;
|
||||
default = [];
|
||||
example = literalExample "[ pkgs.splix ]";
|
||||
description = ''
|
||||
CUPS drivers to use. Drivers provided by CUPS, cups-filters, Ghostscript
|
||||
@ -204,15 +266,10 @@ in
|
||||
description = "CUPS printing services";
|
||||
};
|
||||
|
||||
environment.systemPackages = [ cups ];
|
||||
environment.systemPackages = [ cups ] ++ optional polkitEnabled cups-pk-helper;
|
||||
environment.etc."cups".source = "/var/lib/cups";
|
||||
|
||||
environment.etc."cups/client.conf".text = cfg.clientConf;
|
||||
environment.etc."cups/cups-files.conf".text = cfg.cupsFilesConf;
|
||||
environment.etc."cups/cupsd.conf".text = cfg.cupsdConf;
|
||||
environment.etc."cups/cups-browsed.conf".text = cfg.browsedConf;
|
||||
environment.etc."cups/snmp.conf".text = cfg.snmpConf;
|
||||
|
||||
services.dbus.packages = [ cups ];
|
||||
services.dbus.packages = [ cups ] ++ optional polkitEnabled cups-pk-helper;
|
||||
|
||||
# Cups uses libusb to talk to printers, and does not use the
|
||||
# linux kernel driver. If the driver is not in a black list, it
|
||||
@ -230,19 +287,35 @@ in
|
||||
|
||||
preStart =
|
||||
''
|
||||
mkdir -m 0755 -p /etc/cups
|
||||
mkdir -m 0700 -p /var/cache/cups
|
||||
mkdir -m 0700 -p /var/spool/cups
|
||||
mkdir -m 0755 -p ${cfg.tempDir}
|
||||
'';
|
||||
|
||||
restartTriggers =
|
||||
[ config.environment.etc."cups/cups-files.conf".source
|
||||
config.environment.etc."cups/cupsd.conf".source
|
||||
];
|
||||
mkdir -m 0755 -p /var/lib/cups
|
||||
# Backwards compatibility
|
||||
if [ ! -L /etc/cups ]; then
|
||||
mv /etc/cups/* /var/lib/cups
|
||||
rmdir /etc/cups
|
||||
ln -s /var/lib/cups /etc/cups
|
||||
fi
|
||||
# First, clean existing symlinks
|
||||
if [ -n "$(ls /var/lib/cups)" ]; then
|
||||
for i in /var/lib/cups/*; do
|
||||
[ -L "$i" ] && rm "$i"
|
||||
done
|
||||
fi
|
||||
# Then, populate it with static files
|
||||
cd ${rootdir}/etc/cups
|
||||
for i in *; do
|
||||
[ ! -e "/var/lib/cups/$i" ] && ln -s "${rootdir}/etc/cups/$i" "/var/lib/cups/$i"
|
||||
done
|
||||
${optionalString cfg.gutenprint ''
|
||||
${gutenprint}/bin/cups-genppdupdate
|
||||
''}
|
||||
'';
|
||||
};
|
||||
|
||||
systemd.services.cups-browsed = mkIf config.services.avahi.enable
|
||||
systemd.services.cups-browsed = mkIf avahiEnabled
|
||||
{ description = "CUPS Remote Printer Discovery";
|
||||
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
@ -255,54 +328,13 @@ in
|
||||
|
||||
serviceConfig.ExecStart = "${cups_filters}/bin/cups-browsed";
|
||||
|
||||
restartTriggers =
|
||||
[ config.environment.etc."cups/cups-browsed.conf".source
|
||||
];
|
||||
restartTriggers = [ browsedFile ];
|
||||
};
|
||||
|
||||
services.printing.drivers =
|
||||
[ cups pkgs.ghostscript pkgs.cups_filters additionalBackends
|
||||
pkgs.perl pkgs.coreutils pkgs.gnused pkgs.bc pkgs.gawk pkgs.gnugrep
|
||||
];
|
||||
|
||||
services.printing.cupsFilesConf =
|
||||
''
|
||||
SystemGroup root wheel
|
||||
|
||||
ServerBin ${bindir}/lib/cups
|
||||
DataDir ${bindir}/share/cups
|
||||
|
||||
AccessLog syslog
|
||||
ErrorLog syslog
|
||||
PageLog syslog
|
||||
|
||||
TempDir ${cfg.tempDir}
|
||||
|
||||
# User and group used to run external programs, including
|
||||
# those that actually send the job to the printer. Note that
|
||||
# Udev sets the group of printer devices to `lp', so we want
|
||||
# these programs to run as `lp' as well.
|
||||
User cups
|
||||
Group lp
|
||||
'';
|
||||
|
||||
services.printing.cupsdConf =
|
||||
services.printing.extraConf =
|
||||
''
|
||||
LogLevel info
|
||||
|
||||
${concatMapStrings (addr: ''
|
||||
Listen ${addr}
|
||||
'') cfg.listenAddresses}
|
||||
Listen /var/run/cups/cups.sock
|
||||
|
||||
SetEnv PATH ${bindir}/lib/cups/filter:${bindir}/bin:${bindir}/sbin
|
||||
|
||||
DefaultShared ${if cfg.defaultShared then "Yes" else "No"}
|
||||
|
||||
Browsing ${if cfg.browsing then "Yes" else "No"}
|
||||
|
||||
WebInterface ${if cfg.webInterface then "Yes" else "No"}
|
||||
|
||||
DefaultAuthType Basic
|
||||
|
||||
<Location />
|
||||
@ -343,8 +375,6 @@ in
|
||||
Order deny,allow
|
||||
</Limit>
|
||||
</Policy>
|
||||
|
||||
${cfg.extraConf}
|
||||
'';
|
||||
|
||||
security.pam.services.cups = {};
|
||||
|
@ -59,6 +59,7 @@ in
|
||||
|
||||
package = mkOption {
|
||||
default = pkgs.haka;
|
||||
defaultText = "pkgs.haka";
|
||||
type = types.package;
|
||||
description = "
|
||||
Which Haka derivation to use.
|
||||
|
@ -370,6 +370,7 @@ rec {
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.owncloud70;
|
||||
defaultText = "pkgs.owncloud70";
|
||||
example = literalExample "pkgs.owncloud70";
|
||||
description = ''
|
||||
PostgreSQL package to use.
|
||||
|
@ -76,8 +76,6 @@ in
|
||||
|
||||
environment.systemPackages =
|
||||
[
|
||||
pkgs.qt4 # qtconfig is the only way to set Qt 4 theme
|
||||
|
||||
kde5.frameworkintegration
|
||||
kde5.kinit
|
||||
|
||||
@ -103,16 +101,12 @@ in
|
||||
kde5.plasma-workspace
|
||||
kde5.plasma-workspace-wallpapers
|
||||
|
||||
kde5.ark
|
||||
kde5.dolphin
|
||||
kde5.dolphin-plugins
|
||||
kde5.ffmpegthumbs
|
||||
kde5.gwenview
|
||||
kde5.kate
|
||||
kde5.kdegraphics-thumbnailers
|
||||
kde5.kio-extras
|
||||
kde5.konsole
|
||||
kde5.okular
|
||||
kde5.print-manager
|
||||
|
||||
# Oxygen icons moved to KDE Frameworks 5.16 and later.
|
||||
|
@ -16,13 +16,6 @@ let
|
||||
cfg = config.services.xserver;
|
||||
xorg = pkgs.xorg;
|
||||
|
||||
vaapiDrivers = pkgs.buildEnv {
|
||||
name = "vaapi-drivers";
|
||||
paths = cfg.vaapiDrivers;
|
||||
# We only want /lib/dri, but with a single input path, we need "/" for it to work
|
||||
pathsToLink = [ "/" ];
|
||||
};
|
||||
|
||||
fontconfig = config.fonts.fontconfig;
|
||||
xresourcesXft = pkgs.writeText "Xresources-Xft" ''
|
||||
${optionalString (fontconfig.dpi != 0) ''Xft.dpi: ${toString fontconfig.dpi}''}
|
||||
@ -104,8 +97,6 @@ let
|
||||
${xorg.xrdb}/bin/xrdb -merge ~/.Xdefaults
|
||||
fi
|
||||
|
||||
export LIBVA_DRIVERS_PATH=${vaapiDrivers}/lib/dri
|
||||
|
||||
# Speed up application start by 50-150ms according to
|
||||
# http://kdemonkey.blogspot.nl/2008/04/magic-trick.html
|
||||
rm -rf $HOME/.compose-cache
|
||||
|
@ -216,15 +216,6 @@ in
|
||||
'';
|
||||
};
|
||||
|
||||
vaapiDrivers = mkOption {
|
||||
type = types.listOf types.path;
|
||||
default = [ ];
|
||||
example = literalExample "[ pkgs.vaapiIntel pkgs.vaapiVdpau ]";
|
||||
description = ''
|
||||
Packages providing libva acceleration drivers.
|
||||
'';
|
||||
};
|
||||
|
||||
startGnuPGAgent = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
|
@ -157,12 +157,6 @@ in
|
||||
after = [ "ip-up.target" ];
|
||||
wants = [ "ip-up.target" ];
|
||||
|
||||
environment = {
|
||||
GIT_SSL_CAINFO = "/etc/ssl/certs/ca-certificates.crt";
|
||||
OPENSSL_X509_CERT_FILE = "/etc/ssl/certs/ca-certificates.crt";
|
||||
SSL_CERT_FILE = "/etc/ssl/certs/ca-certificates.crt";
|
||||
};
|
||||
|
||||
path = [ pkgs.e2fsprogs ];
|
||||
description = "Windows Azure Agent Service";
|
||||
unitConfig.ConditionPathExists = "/etc/waagent.conf";
|
||||
|
@ -23,7 +23,7 @@ in
|
||||
postVM =
|
||||
''
|
||||
mkdir -p $out
|
||||
${pkgs.vmTools.qemu}/bin/qemu-img convert -f raw -O vpc $diskImage $out/disk.vhd
|
||||
${pkgs.vmTools.qemu}/bin/qemu-img convert -f raw -O vpc -o subformat=fixed $diskImage $out/disk.vhd
|
||||
rm $diskImage
|
||||
'';
|
||||
diskImageBase = "nixos-image-${config.system.nixosLabel}-${pkgs.stdenv.system}.raw";
|
||||
|
29
pkgs/applications/audio/iannix/default.nix
Normal file
29
pkgs/applications/audio/iannix/default.nix
Normal file
@ -0,0 +1,29 @@
|
||||
{ stdenv, fetchFromGitHub, alsaLib, pkgconfig, qt5
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "iannix-${version}";
|
||||
version = "2016-01-31";
|
||||
src = fetchFromGitHub {
|
||||
owner = "iannix";
|
||||
repo = "IanniX";
|
||||
rev = "f84becdcbe154b20a53aa2622068cb8f6fda0755";
|
||||
sha256 = "184ydb9f1303v332k5k3f1ki7cb6nkxhh6ij0yn72v7dp7figrgj";
|
||||
};
|
||||
|
||||
buildInputs = [ alsaLib pkgconfig qt5.qtbase qt5.qtscript ];
|
||||
|
||||
configurePhase = ''qmake PREFIX=/'';
|
||||
|
||||
installFlags = [ "INSTALL_ROOT=$(out)" ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = {
|
||||
description = "Graphical open-source sequencer,";
|
||||
homepage = http://www.iannix.org/;
|
||||
license = stdenv.lib.licenses.lgpl3;
|
||||
platforms = stdenv.lib.platforms.linux;
|
||||
maintainers = [ stdenv.lib.maintainers.nico202 ];
|
||||
};
|
||||
}
|
@ -2,11 +2,11 @@
|
||||
|
||||
pythonPackages.buildPythonPackage rec {
|
||||
name = "mopidy-spotify-${version}";
|
||||
version = "2.2.0";
|
||||
version = "2.3.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/mopidy/mopidy-spotify/archive/v${version}.tar.gz";
|
||||
sha256 = "0wrrkkrin92ad9k1rwgjbyv2whwrb5b66nmmykxxp6bqcdgdyl5i";
|
||||
sha256 = "0g105kb27q1p8ssrbxkxcjgx9jkqnd9kk5smw8sjcx6f3b23wrwx";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [ mopidy pythonPackages.pyspotify ];
|
||||
|
@ -16,11 +16,11 @@ let
|
||||
};
|
||||
in stdenv.mkDerivation rec {
|
||||
name = "atom-${version}";
|
||||
version = "1.4.3";
|
||||
version = "1.5.3";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/atom/atom/releases/download/v${version}/atom-amd64.deb";
|
||||
sha256 = "15ix5ww3ny5ylgmmxpkc32li6af2vc4a2p6aymx9c472fra0c41x";
|
||||
sha256 = "101fz4c5pj7yp7fg7kg7vcpqjzpwfrbxdyb6va5liip1llg1i2z3";
|
||||
name = "${name}.deb";
|
||||
};
|
||||
|
||||
@ -51,7 +51,7 @@ in stdenv.mkDerivation rec {
|
||||
description = "A hackable text editor for the 21st Century";
|
||||
homepage = https://atom.io/;
|
||||
license = licenses.mit;
|
||||
maintainers = [ maintainers.offline ];
|
||||
maintainers = [ maintainers.offline maintainers.nequissimus ];
|
||||
platforms = [ "x86_64-linux" ];
|
||||
};
|
||||
}
|
||||
|
@ -21,8 +21,8 @@ let
|
||||
version = "2015-11-06";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
sha256 = "0f9r0wnr9ajcdd6as24igmch0n8s1annycb9f4k0vg6fngwaypy9";
|
||||
rev = "04781d37ce5af3f580376dc721bd3b89c434966b";
|
||||
sha256 = "090pyf1n5asaw1m2l9bsbdv3zd753aq1plb0w0drbc2k43ds7k3g";
|
||||
rev = "a9c7c6fd20fa35e0ad3e0e98901ca12dfca9c25c";
|
||||
repo = "libvterm";
|
||||
owner = "neovim";
|
||||
};
|
||||
@ -60,10 +60,10 @@ let
|
||||
|
||||
neovim = stdenv.mkDerivation rec {
|
||||
name = "neovim-${version}";
|
||||
version = "0.1.1";
|
||||
version = "0.1.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
sha256 = "0crswjslp687yp1cpn7nmm0j2sccqhcxryzxv1s81cgpai0fzf60";
|
||||
sha256 = "128aznp2gj08bdz05ri8mqday7wcsy9yz7dw7vdgzk0pk23vjz89";
|
||||
rev = "v${version}";
|
||||
repo = "neovim";
|
||||
owner = "neovim";
|
||||
|
@ -27,6 +27,8 @@ stdenv.mkDerivation rec {
|
||||
|
||||
#configureFlags = [ "--disable-print" ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
# "screenshot" needs this.
|
||||
NIX_LDFLAGS = "-rpath ${xorg.libX11}/lib"
|
||||
+ stdenv.lib.optionalString stdenv.isDarwin " -lintl";
|
||||
|
38
pkgs/applications/graphics/glabels/default.nix
Normal file
38
pkgs/applications/graphics/glabels/default.nix
Normal file
@ -0,0 +1,38 @@
|
||||
{ stdenv, fetchFromGitHub, autoconf, automake, barcode, gnome3
|
||||
, gtk3, gtk_doc, libxml2, librsvg , libtool, libe-book
|
||||
, intltool, itstool, makeWrapper, pkgconfig, which
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "glabels-${version}";
|
||||
version = "3.2.1";
|
||||
src = fetchFromGitHub {
|
||||
owner = "jimevins";
|
||||
repo = "glabels";
|
||||
rev = "glabels-3_2_1";
|
||||
sha256 = "1y6gz0v9si3cvdzhakbgkyc94fajg19rmykfgnc37alrc21vs9zg";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
autoconf automake barcode gtk3 gtk_doc gnome3.yelp_tools
|
||||
gnome3.gnome_common gnome3.gsettings_desktop_schemas
|
||||
intltool itstool libxml2 librsvg libe-book libtool
|
||||
makeWrapper pkgconfig
|
||||
];
|
||||
|
||||
preFixup = ''
|
||||
rm "$out/share/icons/hicolor/icon-theme.cache"
|
||||
wrapProgram "$out/bin/glabels-3" \
|
||||
--prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH"
|
||||
'';
|
||||
|
||||
preConfigure = "./autogen.sh";
|
||||
|
||||
meta = {
|
||||
description = "Create labels and business cards";
|
||||
homepage = http://glabels.org/;
|
||||
license = stdenv.lib.licenses.gpl2;
|
||||
platforms = stdenv.lib.platforms.unix;
|
||||
maintainers = [ stdenv.lib.maintainers.nico202 ];
|
||||
};
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
{ stdenv, fetchurl, pkgconfig, perl, perlXMLParser, gtk, libXft
|
||||
, libpng, zlib, popt, boehmgc, libxml2, libxslt, glib, gtkmm
|
||||
, glibmm, libsigcxx, lcms, boost, gettext, makeWrapper, intltool
|
||||
, gsl, python, pyxml, lxml, poppler, imagemagick, libwpg, librevenge
|
||||
, gsl, python, numpy, pyxml, lxml, poppler, imagemagick, libwpg, librevenge
|
||||
, libvisio, libcdr, libexif, unzip
|
||||
, boxMakerPlugin ? false # boxmaker plugin
|
||||
}:
|
||||
@ -37,7 +37,7 @@ stdenv.mkDerivation rec {
|
||||
propagatedBuildInputs = [
|
||||
# Python is used at run-time to execute scripts, e.g., those from
|
||||
# the "Effects" menu.
|
||||
python pyxml lxml
|
||||
python pyxml numpy lxml
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
@ -66,7 +66,7 @@ stdenv.mkDerivation rec {
|
||||
for i in "$out/bin/"*
|
||||
do
|
||||
wrapProgram "$i" --prefix PYTHONPATH : \
|
||||
"$(toPythonPath ${pyxml}):$(toPythonPath ${lxml})" \
|
||||
"$(toPythonPath ${pyxml}):$(toPythonPath ${lxml}):$(toPythonPath ${numpy})" \
|
||||
--prefix PATH : ${python}/bin || \
|
||||
exit 2
|
||||
done
|
||||
|
@ -1,5 +1,8 @@
|
||||
{ stdenv, fetchurl, python, pkgconfig, cmake, bluez, libusb1, curl
|
||||
, libiconv, gettext, sqlite }:
|
||||
, libiconv, gettext, sqlite
|
||||
, dbiSupport ? false, libdbi ? null, libdbiDrivers ? null
|
||||
, postgresSupport ? false, postgresql ? null
|
||||
}:
|
||||
|
||||
with stdenv.lib;
|
||||
|
||||
@ -14,13 +17,15 @@ stdenv.mkDerivation rec {
|
||||
|
||||
patches = [ ./bashcomp-dir.patch ];
|
||||
|
||||
buildInputs = [ python pkgconfig cmake bluez libusb1 curl gettext sqlite libiconv ];
|
||||
buildInputs = [ python pkgconfig cmake bluez libusb1 curl gettext sqlite libiconv ]
|
||||
++ optionals dbiSupport [ libdbi libdbiDrivers ]
|
||||
++ optionals postgresSupport [ postgresql ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = {
|
||||
homepage = "http://wammu.eu/gammu/";
|
||||
description = "Command line utility and library to control mobil phones";
|
||||
description = "Command line utility and library to control mobile phones";
|
||||
license = licenses.gpl2;
|
||||
platforms = platforms.linux;
|
||||
maintainers = [ maintainers.coroa ];
|
||||
|
@ -11,14 +11,15 @@ pythonPackages.buildPythonPackage rec {
|
||||
};
|
||||
|
||||
propagatedBuildInputs = with pythonPackages; [
|
||||
atomicwrites
|
||||
configobj
|
||||
vobject
|
||||
argparse
|
||||
pyyaml
|
||||
];
|
||||
|
||||
buildInputs = with pythonPackages; [
|
||||
pkgs.vdirsyncer
|
||||
pyyaml
|
||||
];
|
||||
|
||||
meta = {
|
||||
|
@ -1,12 +1,12 @@
|
||||
{ stdenv, fetchurl, ncurses }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "1.0.4";
|
||||
version = "1.0.5";
|
||||
name = "mdp-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/visit1985/mdp/archive/${version}.tar.gz";
|
||||
sha256 = "1wvys3sb0ki7zz5b0y4bl9x6jdj7h88lxsf8vap95k1sj2ymanlm";
|
||||
sha256 = "0ckd9k5571zc7pzxdx84gv8k103d5qp49f2i477a395fy2pnq4m8";
|
||||
};
|
||||
|
||||
makeFlags = "PREFIX=$(out)";
|
||||
|
@ -0,0 +1,113 @@
|
||||
From 73ff28c3ee5b737303871268a5487db0fcffc0f6 Mon Sep 17 00:00:00 2001
|
||||
From: Nikolay Amiantov <ab@fmap.me>
|
||||
Date: Wed, 17 Feb 2016 14:37:31 +0300
|
||||
Subject: [PATCH 1/2] Don't use static library
|
||||
|
||||
---
|
||||
octoprint_m3dfio/__init__.py | 67 +-----------------------------------------
|
||||
shared library source/Makefile | 6 ++--
|
||||
2 files changed, 5 insertions(+), 68 deletions(-)
|
||||
|
||||
diff --git a/octoprint_m3dfio/__init__.py b/octoprint_m3dfio/__init__.py
|
||||
index 5e5369b..9f59768 100644
|
||||
--- a/octoprint_m3dfio/__init__.py
|
||||
+++ b/octoprint_m3dfio/__init__.py
|
||||
@@ -764,72 +764,7 @@ class M3DFioPlugin(
|
||||
# Set file locations
|
||||
self.setFileLocations()
|
||||
|
||||
- # Check if running on Linux
|
||||
- if platform.uname()[0].startswith("Linux") :
|
||||
-
|
||||
- # Check if running on a Raspberry Pi
|
||||
- if platform.uname()[4].startswith("armv6l") and self.getCpuHardware() == "BCM2708" :
|
||||
-
|
||||
- # Set shared library
|
||||
- self.sharedLibrary = ctypes.cdll.LoadLibrary(self._basefolder.replace('\\', '/') + "/static/libraries/preprocessor_arm1176jzf-s.so")
|
||||
-
|
||||
- # Otherwise check if running on a Raspberry Pi 2
|
||||
- elif platform.uname()[4].startswith("armv7l") and self.getCpuHardware() == "BCM2709" :
|
||||
-
|
||||
- # Set shared library
|
||||
- self.sharedLibrary = ctypes.cdll.LoadLibrary(self._basefolder.replace('\\', '/') + "/static/libraries/preprocessor_arm_cortex-a7.so")
|
||||
-
|
||||
- # Otherwise check if running on an ARM7 device
|
||||
- elif platform.uname()[4].startswith("armv7") :
|
||||
-
|
||||
- # Set shared library
|
||||
- self.sharedLibrary = ctypes.cdll.LoadLibrary(self._basefolder.replace('\\', '/') + "/static/libraries/preprocessor_arm7.so")
|
||||
-
|
||||
- # Otherwise check if using an i386 or x86-64 device
|
||||
- elif platform.uname()[4].endswith("86") or platform.uname()[4].endswith("64") :
|
||||
-
|
||||
- # Check if Python is running as 32-bit
|
||||
- if platform.architecture()[0].startswith("32") :
|
||||
-
|
||||
- # Set shared library
|
||||
- self.sharedLibrary = ctypes.cdll.LoadLibrary(self._basefolder.replace('\\', '/') + "/static/libraries/preprocessor_i386.so")
|
||||
-
|
||||
- # Otherwise check if Python is running as 64-bit
|
||||
- elif platform.architecture()[0].startswith("64") :
|
||||
-
|
||||
- # Set shared library
|
||||
- self.sharedLibrary = ctypes.cdll.LoadLibrary(self._basefolder.replace('\\', '/') + "/static/libraries/preprocessor_x86-64.so")
|
||||
-
|
||||
- # Otherwise check if running on Windows and using an i386 or x86-64 device
|
||||
- elif platform.uname()[0].startswith("Windows") and (platform.uname()[4].endswith("86") or platform.uname()[4].endswith("64")) :
|
||||
-
|
||||
- # Check if Python is running as 32-bit
|
||||
- if platform.architecture()[0].startswith("32") :
|
||||
-
|
||||
- # Set shared library
|
||||
- self.sharedLibrary = ctypes.cdll.LoadLibrary(self._basefolder.replace('\\', '/') + "/static/libraries/preprocessor_i386.dll")
|
||||
-
|
||||
- # Otherwise check if Python is running as 64-bit
|
||||
- elif platform.architecture()[0].startswith("64") :
|
||||
-
|
||||
- # Set shared library
|
||||
- self.sharedLibrary = ctypes.cdll.LoadLibrary(self._basefolder.replace('\\', '/') + "/static/libraries/preprocessor_x86-64.dll")
|
||||
-
|
||||
- # Otherwise check if running on OS X and using an i386 or x86-64 device
|
||||
- elif platform.uname()[0].startswith("Darwin") and (platform.uname()[4].endswith("86") or platform.uname()[4].endswith("64")) :
|
||||
-
|
||||
- # Check if Python is running as 32-bit
|
||||
- if platform.architecture()[0].startswith("32") :
|
||||
-
|
||||
- # Set shared library
|
||||
- self.sharedLibrary = ctypes.cdll.LoadLibrary(self._basefolder.replace('\\', '/') + "/static/libraries/preprocessor_i386.dylib")
|
||||
-
|
||||
- # Otherwise check if Python is running as 64-bit
|
||||
- elif platform.architecture()[0].startswith("64") :
|
||||
-
|
||||
- # Set shared library
|
||||
- self.sharedLibrary = ctypes.cdll.LoadLibrary(self._basefolder.replace('\\', '/') + "/static/libraries/preprocessor_x86-64.dylib")
|
||||
-
|
||||
+ self.sharedLibrary = ctypes.cdll.LoadLibrary(self._basefolder.replace('\\', '/') + "/../../../libpreprocessor.so")
|
||||
# Check if shared library was set
|
||||
if self.sharedLibrary :
|
||||
|
||||
diff --git a/shared library source/Makefile b/shared library source/Makefile
|
||||
index 4062a91..89dab71 100644
|
||||
--- a/shared library source/Makefile
|
||||
+++ b/shared library source/Makefile
|
||||
@@ -58,13 +58,15 @@ ifeq ($(TARGET_PLATFORM), OSX64)
|
||||
CFLAGS = -fPIC -m64 -stdlib=libc++ -O3 -Wl,-install_name,$(PROG)$(VER)
|
||||
endif
|
||||
|
||||
+PROG = lib$(LIBRARY_NAME).so
|
||||
+CC = g++
|
||||
SRCS = preprocessor.cpp gcode.cpp vector.cpp
|
||||
-CFLAGS += -Wall -std=c++11 -fvisibility=hidden -shared
|
||||
+CFLAGS = -O3 -fPIC -Wall -std=c++11 -fvisibility=hidden -shared
|
||||
|
||||
all: $(PROG)
|
||||
|
||||
$(PROG): $(SRCS)
|
||||
- $(CC) $(CFLAGS) -o ../octoprint_m3dfio/static/libraries/$(PROG) $(SRCS)
|
||||
+ $(CC) $(CFLAGS) -o $(PROG) $(SRCS)
|
||||
|
||||
clean:
|
||||
rm -f ../octoprint_m3dfio/static/libraries/$(PROG)
|
||||
--
|
||||
2.7.0
|
||||
|
@ -0,0 +1,57 @@
|
||||
From b99fc3fd012765c5b3d8ac7a3f64762af5121b4a Mon Sep 17 00:00:00 2001
|
||||
From: Nikolay Amiantov <ab@fmap.me>
|
||||
Date: Wed, 17 Feb 2016 15:47:34 +0300
|
||||
Subject: [PATCH 2/2] Try to create connection several times if printer is not
|
||||
yet available
|
||||
|
||||
---
|
||||
octoprint_m3dfio/__init__.py | 25 ++++++++++++++++++++++---
|
||||
1 file changed, 22 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/octoprint_m3dfio/__init__.py b/octoprint_m3dfio/__init__.py
|
||||
index 9f59768..e7d97eb 100644
|
||||
--- a/octoprint_m3dfio/__init__.py
|
||||
+++ b/octoprint_m3dfio/__init__.py
|
||||
@@ -3421,8 +3421,16 @@ class M3DFioPlugin(
|
||||
# Set updated port
|
||||
currentPort = self.getPort()
|
||||
|
||||
- # Re-connect
|
||||
- connection = serial.Serial(currentPort, currentBaudrate)
|
||||
+ # Re-connect; wait for the device to be available
|
||||
+ connection = None
|
||||
+ for i in range(1, 5):
|
||||
+ try:
|
||||
+ connection = serial.Serial(currentPort, currentBaudrate)
|
||||
+ break
|
||||
+ except OSError:
|
||||
+ time.sleep(1)
|
||||
+ if connection is None:
|
||||
+ raise Exception("Couldn't reconnect to the printer")
|
||||
|
||||
# Check if getting EEPROM was successful
|
||||
if self.getEeprom(connection) :
|
||||
@@ -6799,8 +6807,19 @@ class M3DFioPlugin(
|
||||
# Set state to connecting
|
||||
comm_instance._log("Connecting to: " + str(port))
|
||||
|
||||
+ # Create a connection
|
||||
+ connection = None
|
||||
+ for i in range(1, 5):
|
||||
+ try:
|
||||
+ connection = serial.Serial(str(port), baudrate)
|
||||
+ # If printer has just power-cycled it may not yet be ready
|
||||
+ except OSError:
|
||||
+ time.sleep(1)
|
||||
+ if connection is None:
|
||||
+ raise Exception("Couldn't reconnect to the printer")
|
||||
+
|
||||
# Return connection
|
||||
- return serial.Serial(str(port), baudrate)
|
||||
+ return connection
|
||||
|
||||
# Disable sleep
|
||||
def disableSleep(self) :
|
||||
--
|
||||
2.7.0
|
||||
|
43
pkgs/applications/misc/octoprint/default.nix
Normal file
43
pkgs/applications/misc/octoprint/default.nix
Normal file
@ -0,0 +1,43 @@
|
||||
{ stdenv, fetchFromGitHub, pythonPackages }:
|
||||
|
||||
pythonPackages.buildPythonPackage rec {
|
||||
name = "OctoPrint-${version}";
|
||||
version = "1.2.9";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "foosel";
|
||||
repo = "OctoPrint";
|
||||
rev = version;
|
||||
sha256 = "00hhq52jqwykhk3p57mn9kkcjbjz6g9mcrp96vx8lqzhw42m3a86";
|
||||
};
|
||||
|
||||
# We need old Tornado
|
||||
propagatedBuildInputs = with pythonPackages; [
|
||||
awesome-slugify flask_assets watchdog rsa requests2 pkginfo pylru
|
||||
semantic-version flask_principal sarge tornado_4_0_1 werkzeug netaddr flaskbabel
|
||||
netifaces psutil pyserial flask_login pyyaml sockjs-tornado
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
# Jailbreak dependencies
|
||||
sed -i \
|
||||
-e 's,rsa==,rsa>=,g' \
|
||||
-e 's,sockjs-tornado==,sockjs-tornado>=,g' \
|
||||
-e 's,Flask-Principal==,Flask-Principal>=,g' \
|
||||
-e 's,werkzeug==,werkzeug>=,g' \
|
||||
-e 's,netaddr==,netaddr>=,g' \
|
||||
-e 's,requests==,requests>=,g' \
|
||||
-e 's,netifaces==,netifaces>=,g' \
|
||||
-e 's,psutil==,psutil>=,g' \
|
||||
-e 's,PyYAML==,PyYAML>=,g' \
|
||||
setup.py
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = http://octoprint.org/;
|
||||
description = "The snappy web interface for your 3D printer";
|
||||
platforms = platforms.all;
|
||||
license = licenses.agpl3;
|
||||
maintainers = with maintainers; [ abbradar ];
|
||||
};
|
||||
}
|
83
pkgs/applications/misc/octoprint/plugins.nix
Normal file
83
pkgs/applications/misc/octoprint/plugins.nix
Normal file
@ -0,0 +1,83 @@
|
||||
{ stdenv, fetchFromGitHub, octoprint, pythonPackages }:
|
||||
|
||||
let
|
||||
buildPlugin = args: pythonPackages.buildPythonPackage (args // {
|
||||
buildInputs = (args.buildInputs or []) ++ [ octoprint ];
|
||||
});
|
||||
in {
|
||||
|
||||
m3d-fio = buildPlugin rec {
|
||||
name = "M3D-Fio-${version}";
|
||||
version = "0.26";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "donovan6000";
|
||||
repo = "M3D-Fio";
|
||||
rev = "V${version}";
|
||||
sha256 = "1dl8m0cxp2vzla2a729r3jrq5ahxkj10pygp7m9bblj5nn2s0rll";
|
||||
};
|
||||
|
||||
patches = [
|
||||
./0001-Don-t-use-static-library.patch
|
||||
./0002-Try-to-create-connection-several-times-if-printer-is.patch
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
(
|
||||
cd 'shared library source'
|
||||
make
|
||||
install -Dm755 libpreprocessor.so $out/lib/libpreprocessor.so
|
||||
)
|
||||
rm -rf $out/${pythonPackages.python.sitePackages}/octoprint_m3dfio/static/libraries
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = https://github.com/donovan6000/M3D-Fio;
|
||||
description = " OctoPrint plugin for the Micro 3D printer";
|
||||
platforms = platforms.all;
|
||||
license = licenses.gpl3;
|
||||
maintainers = with maintainers; [ abbradar ];
|
||||
};
|
||||
};
|
||||
|
||||
titlestatus = buildPlugin rec {
|
||||
name = "OctoPrint-TitleStatus-${version}";
|
||||
version = "0.0.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "MoonshineSG";
|
||||
repo = "OctoPrint-TitleStatus";
|
||||
rev = version;
|
||||
sha256 = "0rfbpxbcmadyihcrynh6bjywy3yqnzsnjn3yiwifisbrjgpm6sfw";
|
||||
};
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = https://github.com/MoonshineSG/OctoPrint-TitleStatus;
|
||||
description = "Show printers status in window title";
|
||||
platforms = platforms.all;
|
||||
license = licenses.agpl3;
|
||||
maintainers = with maintainers; [ abbradar ];
|
||||
};
|
||||
};
|
||||
|
||||
stlviewer = buildPlugin rec {
|
||||
name = "OctoPrint-STLViewer-${version}";
|
||||
version = "0.3.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "jneilliii";
|
||||
repo = "OctoPrint-STLViewer";
|
||||
rev = "v${version}";
|
||||
sha256 = "1a6sa8pw9ay7x27pfwr3nzb22x3jaw0c9vwyz4mrj76zkiw6svfi";
|
||||
};
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = https://github.com/jneilliii/Octoprint-STLViewer;
|
||||
description = "A simple stl viewer tab for OctoPrint";
|
||||
platforms = platforms.all;
|
||||
license = licenses.agpl3;
|
||||
maintainers = with maintainers; [ abbradar ];
|
||||
};
|
||||
};
|
||||
|
||||
}
|
36
pkgs/applications/misc/openbrf/default.nix
Normal file
36
pkgs/applications/misc/openbrf/default.nix
Normal file
@ -0,0 +1,36 @@
|
||||
{ stdenv, fetchFromGitHub, qt4, vcg, glew }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "openbrf-2016-01-09";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "cfcohen";
|
||||
repo = "openbrf";
|
||||
rev = "c18d7431e1d499cee11586f4a035fb5fdc0d3330";
|
||||
sha256 = "0laikpz0ljz7l5fgapwj09ygizmvj1iywnpfgfd0i14j46s134xb";
|
||||
};
|
||||
|
||||
buildInputs = [ qt4 vcg glew ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
postPatch = ''
|
||||
sed -i 's,^VCGLIB .*,VCGLIB = ${vcg}/include,' openBrf.pro
|
||||
'';
|
||||
|
||||
configurePhase = ''
|
||||
qmake PREFIX=$out openBrf.pro
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
install -Dm755 openBrf $out/bin/openBrf
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "A tool to edit resource files (BRF)";
|
||||
homepage = https://github.com/cfcohen/openbrf;
|
||||
maintainers = with stdenv.lib.maintainers; [ abbradar ];
|
||||
license = licenses.free;
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
@ -80,7 +80,7 @@ let
|
||||
wvName = "Widevine Content Decryption Module";
|
||||
wvDescription = "Playback of encrypted HTML audio/video content";
|
||||
wvMimeTypes = "application/x-ppapi-widevine-cdm";
|
||||
wvModule = "$widevine/lib/libwidevinecdmadapter.so";
|
||||
wvModule = "@widevine@/lib/libwidevinecdmadapter.so";
|
||||
wvInfo = "#${wvName}#${wvDescription};${wvMimeTypes}";
|
||||
in ''
|
||||
flashVersion="$(
|
||||
|
@ -21,6 +21,6 @@ stdenv.mkDerivation rec {
|
||||
platforms = platforms.linux;
|
||||
maintainers = [ maintainers.urkud ];
|
||||
description = "KDE Webkit browser";
|
||||
homepage = http://rekonq.sourceforge.net;
|
||||
homepage = https://rekonq.kde.org/;
|
||||
};
|
||||
}
|
||||
|
@ -62,7 +62,6 @@ stdenv.mkDerivation rec {
|
||||
--prefix "PATH" : "$out/share/panamax-api/bin:${env.ruby}/bin:$PATH" \
|
||||
--prefix "HOME" : "$out/share/panamax-api" \
|
||||
--prefix "GEM_HOME" : "${env}/${env.ruby.gemPath}" \
|
||||
--prefix "SSL_CERT_FILE" : /etc/ssl/certs/ca-certificates.crt \
|
||||
--prefix "GEM_PATH" : "$out/share/panamax-api:${bundler}/${env.ruby.gemPath}"
|
||||
'';
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchurl, makeWrapper, jre, pythonPackages
|
||||
{ stdenv, fetchzip, makeWrapper, jre, pythonPackages
|
||||
, mesosSupport ? true, mesos
|
||||
}:
|
||||
|
||||
@ -6,11 +6,11 @@ with stdenv.lib;
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "spark-${version}";
|
||||
version = "1.4.0";
|
||||
version = "1.6.0";
|
||||
|
||||
src = fetchurl {
|
||||
src = fetchzip {
|
||||
url = "mirror://apache/spark/${name}/${name}-bin-cdh4.tgz";
|
||||
sha256 = "1w60xzzg9mcymin1pmqwx1mvcqmdpfyxhd2dmw5alhnrzi21ycxi";
|
||||
sha256 = "0waq8xx4bjj1yvfbadv1gdvz8s4kh5zasicv2n5623ld6lj7zgad";
|
||||
};
|
||||
|
||||
buildInputs = [ makeWrapper jre pythonPackages.python pythonPackages.numpy ]
|
||||
@ -18,9 +18,13 @@ stdenv.mkDerivation rec {
|
||||
|
||||
untarDir = "${name}-bin-cdh4";
|
||||
installPhase = ''
|
||||
mkdir -p $out/{lib/${untarDir}/conf,bin}
|
||||
mkdir -p $out/{lib/${untarDir}/conf,bin,/share/java}
|
||||
mv * $out/lib/${untarDir}
|
||||
|
||||
sed -e 's/INFO, console/WARN, console/' < \
|
||||
$out/lib/${untarDir}/conf/log4j.properties.template > \
|
||||
$out/lib/${untarDir}/conf/log4j.properties
|
||||
|
||||
cat > $out/lib/${untarDir}/conf/spark-env.sh <<- EOF
|
||||
export JAVA_HOME="${jre}"
|
||||
export SPARK_HOME="$out/lib/${untarDir}"
|
||||
@ -33,6 +37,7 @@ stdenv.mkDerivation rec {
|
||||
for n in $(find $out/lib/${untarDir}/bin -type f ! -name "*.*"); do
|
||||
makeWrapper "$n" "$out/bin/$(basename $n)"
|
||||
done
|
||||
ln -s $out/lib/${untarDir}/lib/spark-assembly-*.jar $out/share/java
|
||||
'';
|
||||
|
||||
meta = {
|
||||
|
30
pkgs/applications/networking/dyndns/cfdyndns/default.nix
Normal file
30
pkgs/applications/networking/dyndns/cfdyndns/default.nix
Normal file
@ -0,0 +1,30 @@
|
||||
{ stdenv, fetchFromGitHub, rustPlatform, makeWrapper, openssl }:
|
||||
|
||||
with rustPlatform;
|
||||
|
||||
buildRustPackage rec {
|
||||
name = "cfdyndns-${version}";
|
||||
version = "0.0.1";
|
||||
src = fetchFromGitHub {
|
||||
owner = "colemickens";
|
||||
repo = "cfdyndns";
|
||||
rev = "v${version}";
|
||||
sha256 = "1mcdjykrgh0jq6k6y664lai8sbgzk6j7k0r944f43vg63d1jql5b";
|
||||
};
|
||||
|
||||
depsSha256 = "0whs3fgmpb6g1mjajs3qs9g613x5dal4x6ghzzkpl73a9pgydkpn";
|
||||
|
||||
buildInputs = [ makeWrapper openssl ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp -p target/release/cfdyndns $out/bin/
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "CloudFlare Dynamic DNS Client";
|
||||
homepage = https://github.com/colemickens/cfdyndns;
|
||||
license = stdenv.lib.licenses.mit;
|
||||
maintainers = with maintainers; [ colemickens ];
|
||||
};
|
||||
}
|
@ -5,11 +5,11 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "ricochet-${version}";
|
||||
version = "1.1.1";
|
||||
version = "1.1.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/ricochet-im/ricochet/archive/v${version}.tar.gz";
|
||||
sha256 = "0y79igzgl9xn00981zcyxdlks7vnqxhb4rq3x8gwxm0yr98p39ms";
|
||||
sha256 = "1szb5vmlqal0vhan87kgbks184f7xbfay1hr3d3vm8r1lvcjjfkr";
|
||||
};
|
||||
|
||||
desktopItem = makeDesktopItem {
|
||||
|
@ -40,11 +40,7 @@ let
|
||||
} // removeAttrs attrs [ "name" "sha256" ]);
|
||||
|
||||
in mkTkabber (main // {
|
||||
postPatch = ''
|
||||
substituteInPlace login.tcl --replace \
|
||||
"custom::defvar loginconf(sslcacertstore) \"\"" \
|
||||
"custom::defvar loginconf(sslcacertstore) \$env(SSL_CERT_FILE)"
|
||||
'' + optionalString (theme != null) ''
|
||||
postPatch = optionalString (theme != null) ''
|
||||
themePath="$out/share/doc/tkabber/examples/xrdb/${theme}.xrdb"
|
||||
sed -i '/^if.*load_default_xrdb/,/^}$/ {
|
||||
s@option readfile \(\[fullpath [^]]*\]\)@option readfile "'"$themePath"'"@
|
||||
|
@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/lwindolf/${pname}/releases/download/v${version}/${name}.tar.bz2";
|
||||
sha256 = "0wpinar2cxyzq2j7ff7lznc08f0n6qjdm9aavsarbgdpaf2s1xvq";
|
||||
sha256 = "0xyy0qm3h22b69if2hmg36jzvvljxb1w0zy2m2a28kdqfzpa6m8g";
|
||||
};
|
||||
|
||||
buildInputs = with gst_all_1; [
|
||||
@ -27,8 +27,6 @@ stdenv.mkDerivation rec {
|
||||
makeWrapper
|
||||
];
|
||||
|
||||
patches = [ ./liferea-fix-notification-header-location.patch ];
|
||||
|
||||
preFixup = ''
|
||||
for f in "$out"/bin/*; do
|
||||
wrapProgram "$f" \
|
||||
|
@ -1,12 +0,0 @@
|
||||
diff -Naur a/src/notification/libnotify.c b/src/notification/libnotify.c
|
||||
--- a/src/notification/libnotify.c 2016-01-28 19:33:19.000000000 +0100
|
||||
+++ b/src/notification/libnotify.c 2016-02-01 19:20:39.167580131 +0100
|
||||
@@ -40,7 +40,7 @@
|
||||
#include "ui/feed_list_view.h"
|
||||
#include "ui/ui_tray.h"
|
||||
|
||||
-#include "notification/notification.h"
|
||||
+#include "../notification.h"
|
||||
|
||||
static gboolean supports_actions = FALSE;
|
||||
static gboolean supports_append = FALSE;
|
@ -1,13 +1,15 @@
|
||||
{stdenv, fetchurl, makeWrapper, gettext, python3, python3Packages, rsync, cron, openssh, sshfsFuse, encfs }:
|
||||
{stdenv, fetchFromGitHub, makeWrapper, gettext, python3, python3Packages, rsync, cron, openssh, sshfsFuse, encfs }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "1.1.6";
|
||||
version = "1.1.12";
|
||||
|
||||
name = "backintime-common-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://launchpad.net/backintime/1.1/${version}/+download/backintime-${version}.tar.gz";
|
||||
sha256 = "04yw1v6h959mmvc67mhh0km7vkxjzb7j1mniv5xfjdy27ryii1ig";
|
||||
src = fetchFromGitHub {
|
||||
owner = "bit-team";
|
||||
repo = "backintime";
|
||||
rev = "v${version}";
|
||||
sha256 = "0n3x48wa8aa7i8fff85h3b5h3xpabk51ld0ymy3pkqh0krfgs59a";
|
||||
};
|
||||
|
||||
buildInputs = [ makeWrapper gettext python3 python3Packages.dbus python3Packages.keyring openssh cron rsync sshfsFuse encfs ];
|
||||
@ -28,7 +30,7 @@ stdenv.mkDerivation rec {
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = https://launchpad.net/backintime;
|
||||
homepage = https://github.com/bit-team/backintime;
|
||||
description = "Simple backup tool for Linux";
|
||||
license = stdenv.lib.licenses.gpl2;
|
||||
maintainers = [ stdenv.lib.maintainers.DamienCassou ];
|
||||
|
@ -1,12 +0,0 @@
|
||||
diff -ru -x '*~' git-1.9.2-orig/git-send-email.perl git-1.9.2/git-send-email.perl
|
||||
--- git-1.9.2-orig/git-send-email.perl 2014-04-09 21:09:34.000000000 +0200
|
||||
+++ git-1.9.2/git-send-email.perl 2014-04-16 18:35:05.861132282 +0200
|
||||
@@ -1094,6 +1094,8 @@
|
||||
return;
|
||||
}
|
||||
|
||||
+ $smtp_ssl_cert_path //= $ENV{'SSL_CERT_FILE'};
|
||||
+
|
||||
if (!defined $smtp_ssl_cert_path) {
|
||||
# use the OpenSSL defaults
|
||||
return (SSL_verify_mode => SSL_VERIFY_PEER());
|
@ -26,8 +26,6 @@ stdenv.mkDerivation {
|
||||
patches = [
|
||||
./docbook2texi.patch
|
||||
./symlinks-in-bin.patch
|
||||
./cert-path.patch
|
||||
./ssl-cert-file.patch
|
||||
];
|
||||
|
||||
buildInputs = [curl openssl zlib expat gettext cpio makeWrapper libiconv]
|
||||
@ -87,6 +85,10 @@ stdenv.mkDerivation {
|
||||
-e 's| perl -e| ${perl}/bin/perl -e|g' \
|
||||
$out/libexec/git-core/{git-am,git-submodule}
|
||||
|
||||
# Fix references to gettext.
|
||||
substituteInPlace $out/libexec/git-core/git-sh-i18n \
|
||||
--replace 'gettext.sh' '${gettext}/bin/gettext.sh'
|
||||
|
||||
# gzip (and optionally bzip2, xz, zip) are runtime dependencies for
|
||||
# gitweb.cgi, need to patch so that it's found
|
||||
sed -i -e "s|'compressor' => \['gzip'|'compressor' => ['${gzip}/bin/gzip'|" \
|
||||
|
@ -1,13 +0,0 @@
|
||||
This patch adds support for the OpenSSL SSL_CERT_FILE environment variable.
|
||||
GIT_SSL_CAINFO still takes precedence.
|
||||
|
||||
--- git-orig/http.c.orig 2014-11-25 23:27:56.000000000 +0100
|
||||
+++ git-orig/http.c 2014-11-25 23:28:48.000000000 +0100
|
||||
@@ -433,6 +433,7 @@
|
||||
#if LIBCURL_VERSION_NUM >= 0x070908
|
||||
set_from_env(&ssl_capath, "GIT_SSL_CAPATH");
|
||||
#endif
|
||||
+ set_from_env(&ssl_cainfo, "SSL_CERT_FILE");
|
||||
set_from_env(&ssl_cainfo, "GIT_SSL_CAINFO");
|
||||
|
||||
set_from_env(&user_agent, "GIT_HTTP_USER_AGENT");
|
@ -1,11 +1,11 @@
|
||||
# `-B@out@/bin' forces gcc to use ld-wrapper.sh when calling ld.
|
||||
# `-B@out@/bin' forces cc to use ld-wrapper.sh when calling ld.
|
||||
export NIX_CFLAGS_COMPILE="-B@out@/bin/ $NIX_CFLAGS_COMPILE"
|
||||
|
||||
if [ -e @out@/nix-support/libc-cflags ]; then
|
||||
export NIX_CFLAGS_COMPILE="$(cat @out@/nix-support/libc-cflags) $NIX_CFLAGS_COMPILE"
|
||||
fi
|
||||
|
||||
if [ -e @out@/nix-support/gcc-cflags ]; then
|
||||
if [ -e @out@/nix-support/cc-cflags ]; then
|
||||
export NIX_CFLAGS_COMPILE="$(cat @out@/nix-support/cc-cflags) $NIX_CFLAGS_COMPILE"
|
||||
fi
|
||||
|
||||
@ -17,7 +17,7 @@ if [ -e @out@/nix-support/libc-ldflags ]; then
|
||||
export NIX_LDFLAGS+=" $(cat @out@/nix-support/libc-ldflags)"
|
||||
fi
|
||||
|
||||
if [ -e @out@/nix-support/gcc-ldflags ]; then
|
||||
if [ -e @out@/nix-support/cc-ldflags ]; then
|
||||
export NIX_LDFLAGS+=" $(cat @out@/nix-support/cc-ldflags)"
|
||||
fi
|
||||
|
||||
|
@ -1,4 +1,8 @@
|
||||
#! @shell@ -e
|
||||
path_backup="$PATH"
|
||||
if [ -n "@coreutils@" ]; then
|
||||
PATH="@coreutils@/bin:@gnugrep@/bin"
|
||||
fi
|
||||
|
||||
if [ -n "$NIX_CC_WRAPPER_START_HOOK" ]; then
|
||||
source "$NIX_CC_WRAPPER_START_HOOK"
|
||||
@ -141,4 +145,5 @@ if [ -n "$NIX_CC_WRAPPER_EXEC_HOOK" ]; then
|
||||
source "$NIX_CC_WRAPPER_EXEC_HOOK"
|
||||
fi
|
||||
|
||||
PATH="$path_backup"
|
||||
exec @prog@ ${extraBefore[@]} "${params[@]}" "${extraAfter[@]}"
|
||||
|
@ -9,13 +9,14 @@
|
||||
, cc ? null, libc ? null, binutils ? null, coreutils ? null, shell ? stdenv.shell
|
||||
, zlib ? null, extraPackages ? [], extraBuildCommands ? ""
|
||||
, dyld ? null # TODO: should this be a setup-hook on dyld?
|
||||
, isGNU ? false, isClang ? cc.isClang or false
|
||||
, isGNU ? false, isClang ? cc.isClang or false, gnugrep ? null
|
||||
}:
|
||||
|
||||
with stdenv.lib;
|
||||
|
||||
assert nativeTools -> nativePrefix != "";
|
||||
assert !nativeTools -> cc != null && binutils != null && coreutils != null;
|
||||
assert !nativeTools ->
|
||||
cc != null && binutils != null && coreutils != null && gnugrep != null;
|
||||
assert !nativeLibc -> libc != null;
|
||||
|
||||
# For ghdl (the vhdl language provider to gcc) we need zlib in the wrapper.
|
||||
@ -37,9 +38,11 @@ stdenv.mkDerivation {
|
||||
|
||||
inherit cc shell;
|
||||
libc = if nativeLibc then null else libc;
|
||||
binutils = if nativeTools then null else binutils;
|
||||
# The wrapper scripts use 'cat', so we may need coreutils.
|
||||
coreutils = if nativeTools then null else coreutils;
|
||||
binutils = if nativeTools then "" else binutils;
|
||||
# The wrapper scripts use 'cat' and 'grep', so we may need coreutils
|
||||
# and gnugrep.
|
||||
coreutils = if nativeTools then "" else coreutils;
|
||||
gnugrep = if nativeTools then "" else gnugrep;
|
||||
|
||||
passthru = { inherit nativeTools nativeLibc nativePrefix isGNU isClang; };
|
||||
|
||||
|
@ -1,4 +1,8 @@
|
||||
#! @shell@ -e
|
||||
path_backup="$PATH"
|
||||
if [ -n "@coreutils@" ]; then
|
||||
PATH="@coreutils@/bin"
|
||||
fi
|
||||
|
||||
if [ -n "$NIX_GNAT_WRAPPER_START_HOOK" ]; then
|
||||
source "$NIX_GNAT_WRAPPER_START_HOOK"
|
||||
@ -100,4 +104,5 @@ if [ -n "$NIX_GNAT_WRAPPER_EXEC_HOOK" ]; then
|
||||
source "$NIX_GNAT_WRAPPER_EXEC_HOOK"
|
||||
fi
|
||||
|
||||
PATH="$path_backup"
|
||||
exec @prog@ ${extraBefore[@]} "${params[@]}" ${extraAfter[@]}
|
||||
|
@ -1,4 +1,8 @@
|
||||
#! @shell@ -e
|
||||
path_backup="$PATH"
|
||||
if [ -n "@coreutils@" ]; then
|
||||
PATH="@coreutils@/bin"
|
||||
fi
|
||||
|
||||
if [ -n "$NIX_LD_WRAPPER_START_HOOK" ]; then
|
||||
source "$NIX_LD_WRAPPER_START_HOOK"
|
||||
@ -163,4 +167,5 @@ if [ -n "$NIX_LD_WRAPPER_EXEC_HOOK" ]; then
|
||||
source "$NIX_LD_WRAPPER_EXEC_HOOK"
|
||||
fi
|
||||
|
||||
PATH="$path_backup"
|
||||
exec @prog@ ${extraBefore[@]} "${params[@]}" ${extra[@]}
|
||||
|
@ -267,7 +267,9 @@ EOF
|
||||
|
||||
let
|
||||
|
||||
baseJson = writeText "${name}-config.json" (builtins.toJSON {
|
||||
baseName = baseNameOf name;
|
||||
|
||||
baseJson = writeText "${baseName}-config.json" (builtins.toJSON {
|
||||
created = "1970-01-01T00:00:01Z";
|
||||
architecture = "amd64";
|
||||
os = "linux";
|
||||
@ -277,11 +279,11 @@ EOF
|
||||
layer = (if runAsRoot == null
|
||||
then mkPureLayer { inherit baseJson contents extraCommands; }
|
||||
else mkRootLayer { inherit baseJson fromImage fromImageName fromImageTag contents runAsRoot diskSize extraCommands; });
|
||||
depsTarball = mkTarball { name = "${name}-deps";
|
||||
depsTarball = mkTarball { name = "${baseName}-deps";
|
||||
drv = layer;
|
||||
onlyDeps = true; };
|
||||
|
||||
result = runCommand "${name}.tar.gz" {
|
||||
result = runCommand "${baseName}.tar.gz" {
|
||||
buildInputs = [ jshon ];
|
||||
|
||||
imageName = name;
|
||||
|
@ -5,79 +5,79 @@ url=$1
|
||||
rev=$2
|
||||
expHash=$3
|
||||
|
||||
hashType=$NIX_HASH_ALGO
|
||||
if test -z "$hashType"; then
|
||||
hashType=sha256
|
||||
fi
|
||||
if test -z "$hashFormat"; then
|
||||
hashFormat=--base32
|
||||
hashType="${NIX_HASH_ALGO:-sha256}"
|
||||
hashFormat=${hashFormat:-"--base32"}
|
||||
rev="${rev:-tip}"
|
||||
|
||||
LOG() {
|
||||
echo "$@" >&2
|
||||
}
|
||||
|
||||
die() {
|
||||
LOG "$@"
|
||||
exit 1
|
||||
}
|
||||
|
||||
if [[ -z "$url" || "$url" == "--help" ]]; then
|
||||
die "Usage: nix-prefetch-hg URL [rev [EXPECTED-HASH]]"
|
||||
fi
|
||||
|
||||
if test -z "$url"; then
|
||||
echo "syntax: nix-prefetch-hg URL [rev [EXPECTED-HASH]]" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test "$fetchSubrepos" == 1; then
|
||||
if [[ "${fetchSubrepos:-0}" == 1 ]]; then
|
||||
subrepoClause=S
|
||||
else
|
||||
subrepoClause=
|
||||
fi
|
||||
|
||||
test -n "$rev" || rev="tip"
|
||||
|
||||
|
||||
# If the hash was given, a file with that hash may already be in the
|
||||
# store.
|
||||
if test -n "$expHash"; then
|
||||
if [[ -n "$expHash" ]]; then
|
||||
finalPath=$(nix-store --print-fixed-path --recursive "$hashType" "$expHash" hg-archive)
|
||||
if ! nix-store --check-validity "$finalPath" 2> /dev/null; then
|
||||
finalPath=
|
||||
fi
|
||||
hash=$expHash
|
||||
hash="$expHash"
|
||||
fi
|
||||
|
||||
|
||||
# If we don't know the hash or a path with that hash doesn't exist,
|
||||
# download the file and add it to the store.
|
||||
if test -z "$finalPath"; then
|
||||
if [[ -z "$finalPath" ]]; then
|
||||
|
||||
tmpPath="$(mktemp -d "${TMPDIR:-/tmp}/hg-checkout-tmp-XXXXXXXX")"
|
||||
trap "rm -rf \"$tmpPath\"" EXIT
|
||||
cleanup() { x=$?; rm -rf "$tmpPath"; exit $x; }; trap cleanup EXIT
|
||||
|
||||
tmpArchive="$tmpPath/hg-archive"
|
||||
|
||||
# Perform the checkout.
|
||||
if [[ $url != /* ]]; then
|
||||
tmpClone=$tmpPath/hg-clone
|
||||
hg clone -q -y -U "$url" $tmpClone >&2
|
||||
if [[ "$url" != /* ]]; then
|
||||
tmpClone="$tmpPath/hg-clone"
|
||||
hg clone -q -y -U "$url" "$tmpClone" >&2
|
||||
else
|
||||
tmpClone=$url
|
||||
fi
|
||||
hg archive -q$subrepoClause -y -r "$rev" --cwd $tmpClone $tmpArchive
|
||||
rm -f $tmpArchive/.hg_archival.txt
|
||||
hg archive -q$subrepoClause -y -r "$rev" --cwd "$tmpClone" "$tmpArchive"
|
||||
rm -f "$tmpArchive/.hg_archival.txt"
|
||||
|
||||
echo "hg revision is $(cd $tmpClone; hg id -r "$rev" -i)"
|
||||
LOG "hg revision is $(cd "$tmpClone"; hg id -r "$rev" -i)"
|
||||
|
||||
# Compute the hash.
|
||||
hash=$(nix-hash --type $hashType $hashFormat $tmpArchive)
|
||||
if ! test -n "$QUIET"; then echo "hash is $hash" >&2; fi
|
||||
hash=$(nix-hash --type "$hashType" "$hashFormat" "$tmpArchive")
|
||||
if [[ -z "$QUIET" ]]; then LOG "hash is $hash"; fi
|
||||
|
||||
# Add the downloaded file to the Nix store.
|
||||
finalPath=$(nix-store --add-fixed --recursive "$hashType" $tmpArchive)
|
||||
finalPath=$(nix-store --add-fixed --recursive "$hashType" "$tmpArchive")
|
||||
|
||||
if test -n "$expHash" -a "$expHash" != "$hash"; then
|
||||
echo "hash mismatch for URL \`$url'"
|
||||
exit 1
|
||||
if [[ -n "$expHash" && "$expHash" != "$hash" ]]; then
|
||||
die "ERROR: hash mismatch for URL \`$url'"
|
||||
fi
|
||||
|
||||
|
||||
fi
|
||||
|
||||
if ! test -n "$QUIET"; then echo "path is $finalPath" >&2; fi
|
||||
if [[ -z "$QUIET" ]]; then LOG "path is $finalPath"; fi
|
||||
|
||||
echo $hash
|
||||
echo "$hash"
|
||||
|
||||
if test -n "$PRINT_PATH"; then
|
||||
echo $finalPath
|
||||
if [[ -n "$PRINT_PATH" ]]; then
|
||||
echo "$finalPath"
|
||||
fi
|
||||
|
@ -333,4 +333,10 @@ rec {
|
||||
ftp://ftp.halifax.rwth-aachen.de/pub/OpenBSD/
|
||||
ftp://mirror.switch.ch/pub/OpenBSD/
|
||||
];
|
||||
|
||||
# Steam Runtime mirrors
|
||||
steamrt = [
|
||||
http://repo.steampowered.com/steamrt/
|
||||
https://abbradar.net/steamrt/
|
||||
];
|
||||
}
|
||||
|
@ -1,12 +1,12 @@
|
||||
# `-B@out@/bin' forces gcc to use ld-wrapper.sh when calling ld.
|
||||
# `-B@out@/bin' forces cc to use ld-wrapper.sh when calling ld.
|
||||
export NIX_CFLAGS_COMPILE="-B@out@/bin/ $NIX_CFLAGS_COMPILE"
|
||||
|
||||
if test -e @out@/nix-support/libc-cflags; then
|
||||
export NIX_CFLAGS_COMPILE="$(cat @out@/nix-support/libc-cflags) $NIX_CFLAGS_COMPILE"
|
||||
fi
|
||||
|
||||
if test -e @out@/nix-support/gcc-cflags; then
|
||||
export NIX_CFLAGS_COMPILE="$(cat @out@/nix-support/gcc-cflags) $NIX_CFLAGS_COMPILE"
|
||||
if test -e @out@/nix-support/cc-cflags; then
|
||||
export NIX_CFLAGS_COMPILE="$(cat @out@/nix-support/cc-cflags) $NIX_CFLAGS_COMPILE"
|
||||
fi
|
||||
|
||||
if test -e @out@/nix-support/gnat-cflags; then
|
||||
@ -17,8 +17,8 @@ if test -e @out@/nix-support/libc-ldflags; then
|
||||
export NIX_LDFLAGS="$NIX_LDFLAGS $(cat @out@/nix-support/libc-ldflags)"
|
||||
fi
|
||||
|
||||
if test -e @out@/nix-support/gcc-ldflags; then
|
||||
export NIX_LDFLAGS="$NIX_LDFLAGS $(cat @out@/nix-support/gcc-ldflags)"
|
||||
if test -e @out@/nix-support/cc-ldflags; then
|
||||
export NIX_LDFLAGS="$NIX_LDFLAGS $(cat @out@/nix-support/cc-ldflags)"
|
||||
fi
|
||||
|
||||
if test -e @out@/nix-support/libc-ldflags-before; then
|
||||
|
@ -45,7 +45,7 @@ else
|
||||
if [ -n "$langVhdl" ]; then
|
||||
gccLDFlags="$gccLDFlags -L$zlib/lib"
|
||||
fi
|
||||
echo "$gccLDFlags" > $out/nix-support/gcc-ldflags
|
||||
echo "$gccLDFlags" > $out/nix-support/cc-ldflags
|
||||
|
||||
# GCC shows $gcc/lib in `gcc -print-search-dirs', but not
|
||||
# $gcc/lib64 (even though it does actually search there...)..
|
||||
@ -63,7 +63,7 @@ else
|
||||
gnatCFlags="-aI$basePath/adainclude -aO$basePath/adalib"
|
||||
echo "$gnatCFlags" > $out/nix-support/gnat-cflags
|
||||
fi
|
||||
echo "$gccCFlags" > $out/nix-support/gcc-cflags
|
||||
echo "$gccCFlags" > $out/nix-support/cc-cflags
|
||||
|
||||
gccPath="$gcc/bin"
|
||||
# On Illumos/Solaris we might prefer native ld
|
||||
|
@ -16,8 +16,6 @@ stdenv.mkDerivation {
|
||||
outputHashMode = "recursive";
|
||||
outputHash = sha256;
|
||||
|
||||
SSL_CERT_FILE = "${cacert}/etc/ssl/certs/ca-bundle.crt";
|
||||
|
||||
impureEnvVars = [ "http_proxy" "https_proxy" "ftp_proxy" "all_proxy" "no_proxy" ];
|
||||
preferLocalBuild = true;
|
||||
}
|
||||
|
@ -27,5 +27,7 @@ updateSourceDateEpoch() {
|
||||
postUnpackHooks+=(_updateSourceDateEpochFromSourceRoot)
|
||||
|
||||
_updateSourceDateEpochFromSourceRoot() {
|
||||
updateSourceDateEpoch "$sourceRoot"
|
||||
if [ -n "$sourceRoot" ]; then
|
||||
updateSourceDateEpoch "$sourceRoot"
|
||||
fi
|
||||
}
|
||||
|
@ -118,15 +118,16 @@ rec {
|
||||
name = name_;
|
||||
outputHashAlgo = hashAlgo;
|
||||
outputHash = hash;
|
||||
preferLocalBuild = true;
|
||||
builder = writeScript "restrict-message" ''
|
||||
source ${stdenv}/setup
|
||||
cat <<_EOF_
|
||||
source ${stdenv}/setup
|
||||
cat <<_EOF_
|
||||
|
||||
***
|
||||
${msg}
|
||||
***
|
||||
***
|
||||
${msg}
|
||||
***
|
||||
|
||||
_EOF_
|
||||
_EOF_
|
||||
'';
|
||||
};
|
||||
|
||||
|
@ -1,10 +1,10 @@
|
||||
# Autogenerated by maintainers/scripts/gnome.sh update
|
||||
|
||||
fetchurl: {
|
||||
name = "eog-3.18.1";
|
||||
name = "eog-3.18.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = mirror://gnome/sources/eog/3.18/eog-3.18.1.tar.xz;
|
||||
sha256 = "7b7bb47a680518701e2e724c8632fcf12dcb3c3e45ce1f2bdd4c4ace325793a7";
|
||||
url = mirror://gnome/sources/eog/3.18/eog-3.18.2.tar.xz;
|
||||
sha256 = "dc2d16e3754cad12703261fe586e7599c4df2e39282f6c28681a514f749fe636";
|
||||
};
|
||||
}
|
||||
|
@ -10,8 +10,8 @@ mkDerivation {
|
||||
version = "0.16";
|
||||
src = fetchgit {
|
||||
url = "https://github.com/elm-lang/elm-compiler";
|
||||
sha256 = "696413b69fa5e66f878ed189094be5f74dfaced42121c82ac88bbab1c2bb9861";
|
||||
rev = "cb1bad3b6ebaa02d5af47e9b98eab7d475a3a48d";
|
||||
sha256 = "b3bcdca469716f3a4195469549a9e9bc53a6030aff132ec620b9c93958a5ffe6";
|
||||
rev = "df86c1c9b3cf06de3ccb78f26b4d2fac0129ce5a";
|
||||
};
|
||||
isLibrary = true;
|
||||
isExecutable = true;
|
||||
|
@ -8,8 +8,8 @@ mkDerivation {
|
||||
version = "0.16";
|
||||
src = fetchgit {
|
||||
url = "https://github.com/elm-lang/elm-make";
|
||||
sha256 = "bae1206c8066fb4e191345a3da79b89a5ec488929370b210203c8b4dcb35cebc";
|
||||
rev = "e3bfc3e3d04c9b47e18fac289c796caec88d4fef";
|
||||
sha256 = "fc0a6ed08b236dfab43e9af73f8e83a3b88a155695a9671a2b291dc596a75116";
|
||||
rev = "54e0b33fea0cd72400ac6a3dec7643bf1b900741";
|
||||
};
|
||||
isLibrary = false;
|
||||
isExecutable = true;
|
||||
|
@ -8,8 +8,8 @@ mkDerivation {
|
||||
version = "0.16";
|
||||
src = fetchgit {
|
||||
url = "https://github.com/elm-lang/elm-reactor";
|
||||
sha256 = "dbf881808ff00772d464675f1dd88a40273569ab0e9298805133a3b8f3ed4f26";
|
||||
rev = "ff4ad13ea6b55c63b2d2099b738fd1d5ec2d29b4";
|
||||
sha256 = "55605b8443dad20c78e297ce35a603cb107b0c1e57bf1c4710faaebc60396de0";
|
||||
rev = "b03166296d11e240fa04cdb748e1f3c4af7afc83";
|
||||
};
|
||||
isLibrary = false;
|
||||
isExecutable = true;
|
||||
|
@ -14,6 +14,7 @@ for pkg, ver in $elm_packages
|
||||
end
|
||||
|
||||
File.open("release.nix", 'w') do |file|
|
||||
file.puts "{ callPackage }:"
|
||||
file.puts "{"
|
||||
file.puts " version = \"#{$elm_version}\";"
|
||||
file.puts " packages = {"
|
||||
|
@ -71,8 +71,10 @@ let version = "4.9.3";
|
||||
# The GNAT Makefiles did not pay attention to CFLAGS_FOR_TARGET for its
|
||||
# target libraries and tools.
|
||||
++ optional langAda ../gnat-cflags.patch
|
||||
++ optional langFortran ../gfortran-driving.patch;
|
||||
|
||||
++ optional langFortran ../gfortran-driving.patch
|
||||
# The NXConstStr.patch can be removed at 4.9.4
|
||||
++ optional stdenv.isDarwin ../gfortran-darwin-NXConstStr.patch;
|
||||
|
||||
javaEcj = fetchurl {
|
||||
# The `$(top_srcdir)/ecj.jar' file is automatically picked up at
|
||||
# `configure' time.
|
||||
|
@ -24,7 +24,7 @@ if test "$noSysDirs" = "1"; then
|
||||
# Figure out what extra flags to pass to the gcc compilers
|
||||
# being generated to make sure that they use our glibc.
|
||||
extraFlags="$(cat $NIX_CC/nix-support/libc-cflags)"
|
||||
extraLDFlags="$(cat $NIX_CC/nix-support/libc-ldflags) $(cat $NIX_CC/nix-support/libc-ldflags-before)"
|
||||
extraLDFlags="$(cat $NIX_CC/nix-support/libc-ldflags) $(cat $NIX_CC/nix-support/libc-ldflags-before || true)"
|
||||
|
||||
# Use *real* header files, otherwise a limits.h is generated
|
||||
# that does not include Glibc's limits.h (notably missing
|
||||
|
@ -0,0 +1,27 @@
|
||||
From 82f81877458ea372176eabb5de36329431dce99b Mon Sep 17 00:00:00 2001
|
||||
From: Iain Sandoe <iain@codesourcery.com>
|
||||
Date: Sat, 21 Dec 2013 00:30:18 +0000
|
||||
Subject: [PATCH] don't try to mark local symbols as no-dead-strip
|
||||
|
||||
---
|
||||
gcc/config/darwin.c | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c
|
||||
index 40804b8..0080299 100644
|
||||
--- a/gcc/config/darwin.c
|
||||
+++ b/gcc/config/darwin.c
|
||||
@@ -1259,6 +1259,11 @@ darwin_encode_section_info (tree decl, rtx rtl, int first ATTRIBUTE_UNUSED)
|
||||
void
|
||||
darwin_mark_decl_preserved (const char *name)
|
||||
{
|
||||
+ /* Actually we shouldn't mark any local symbol this way, but for now
|
||||
+ this only happens with ObjC meta-data. */
|
||||
+ if (darwin_label_is_anonymous_local_objc_name (name))
|
||||
+ return;
|
||||
+
|
||||
fprintf (asm_out_file, "\t.no_dead_strip ");
|
||||
assemble_name (asm_out_file, name);
|
||||
fputc ('\n', asm_out_file);
|
||||
--
|
||||
2.2.1
|
@ -23,6 +23,7 @@
|
||||
, ghc, gmp
|
||||
, jailbreak-cabal
|
||||
|
||||
, runCommand
|
||||
, nodejs, stdenv, filepath, HTTP, HUnit, mtl, network, QuickCheck, random, stm
|
||||
, time
|
||||
, zlib, aeson, attoparsec, bzlib, hashable
|
||||
@ -37,7 +38,7 @@
|
||||
, coreutils
|
||||
, libiconv
|
||||
|
||||
, ghcjsBoot ? import ./ghcjs-boot.nix { inherit fetchgit; }
|
||||
, ghcjsBoot ? import ./ghcjs-boot.nix { inherit fetchgit runCommand; }
|
||||
, shims ? import ./shims.nix { inherit fetchFromGitHub; }
|
||||
}:
|
||||
let version = "0.2.0"; in
|
||||
@ -100,10 +101,14 @@ mkDerivation (rec {
|
||||
sed -i -e 's@ \(a\|b\)/boot/[^/]\+@ \1@g' $patch
|
||||
done
|
||||
'';
|
||||
# We build with --quick so we can build stage 2 packages separately.
|
||||
# This is necessary due to: https://github.com/haskell/cabal/commit/af19fb2c2d231d8deff1cb24164a2bf7efb8905a
|
||||
# Cabal otherwise fails to build: http://hydra.nixos.org/build/31824079/nixlog/1/raw
|
||||
postInstall = ''
|
||||
PATH=$out/bin:$PATH LD_LIBRARY_PATH=${gmp}/lib:${stdenv.cc}/lib64:$LD_LIBRARY_PATH \
|
||||
env -u GHC_PACKAGE_PATH $out/bin/ghcjs-boot \
|
||||
--dev \
|
||||
--quick \
|
||||
--with-cabal ${cabal-install}/bin/cabal \
|
||||
--with-gmp-includes ${gmp}/include \
|
||||
--with-gmp-libraries ${gmp}/lib
|
||||
@ -111,7 +116,7 @@ mkDerivation (rec {
|
||||
passthru = {
|
||||
isGhcjs = true;
|
||||
nativeGhc = ghc;
|
||||
inherit nodejs;
|
||||
inherit nodejs ghcjsBoot;
|
||||
};
|
||||
|
||||
homepage = "https://github.com/ghcjs/ghcjs";
|
||||
|
@ -1,7 +1,35 @@
|
||||
{ fetchgit }:
|
||||
fetchgit {
|
||||
url = git://github.com/ghcjs/ghcjs-boot.git;
|
||||
rev = "97dea5c4145bf80a1e7cffeb1ecd4d0ecacd5a2f";
|
||||
sha256 = "1cgjzm595l2dx6fibzbkyv23bp1857qia0hb9d8aghf006al558j";
|
||||
fetchSubmodules = true;
|
||||
}
|
||||
{ runCommand, fetchgit }:
|
||||
|
||||
let
|
||||
src = fetchgit {
|
||||
url = git://github.com/ghcjs/ghcjs-boot.git;
|
||||
rev = "97dea5c4145bf80a1e7cffeb1ecd4d0ecacd5a2f";
|
||||
sha256 = "1cgjzm595l2dx6fibzbkyv23bp1857qia0hb9d8aghf006al558j";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
in
|
||||
|
||||
# we remove the patches so ghcjs-boot doesn't try to apply them again.
|
||||
runCommand "${src.name}-patched" {} ''
|
||||
cp -r ${src} $out
|
||||
chmod -R +w $out
|
||||
|
||||
# Make the patches be relative their corresponding package's directory.
|
||||
# See: https://github.com/ghcjs/ghcjs-boot/pull/12
|
||||
for patch in $out/patches/*.patch; do
|
||||
echo ">> fixing patch: $patch"
|
||||
sed -i -e 's@ \(a\|b\)/boot/[^/]\+@ \1@g' $patch
|
||||
done
|
||||
|
||||
for package in $(cd $out/boot; echo *); do
|
||||
patch=$out/patches/$package.patch
|
||||
if [[ -e $patch ]]; then
|
||||
echo ">> patching package: $package"
|
||||
pushd $out/boot/$package
|
||||
patch -p1 < $patch
|
||||
rm $patch
|
||||
popd
|
||||
fi
|
||||
done
|
||||
''
|
||||
|
@ -2,6 +2,6 @@
|
||||
fetchFromGitHub {
|
||||
owner = "ghcjs";
|
||||
repo = "shims";
|
||||
rev = "45f44f5f027ec03264b61b8049951e765cc0b23a";
|
||||
sha256 = "090pz4rzwlcrjavbbzxhf6c7rq7rzmr10g89hmhw4c65c4fyyykp";
|
||||
rev = "4df1808d03117ddcd45f276f0ddd85c73e59506a";
|
||||
sha256 = "0nay4pmq3yqqvpz23709i3729840idpcc2ii2jd0xvaj1z61adda";
|
||||
}
|
||||
|
@ -1,16 +1,16 @@
|
||||
{ stdenv, fetchurl, makeWrapper, jre, unzip }:
|
||||
{ stdenv, fetchurl, makeWrapper, jre, unzip, which }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "1.0.0-rc-1036";
|
||||
version = "1.0.0";
|
||||
name = "kotlin-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/JetBrains/kotlin/releases/download/build-${version}/kotlin-compiler-${version}.zip";
|
||||
sha256 = "8d72ff925678a2172fbbefcb6f0c5a195a300dccf240e5add16c3e8d86e13d67";
|
||||
sha256 = "0dp5mab35sv3nsgj488ibyn6x6xw2rka76s7kygbhqhjc429kpgy";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [ jre ] ;
|
||||
buildInputs = [ makeWrapper unzip ] ;
|
||||
buildInputs = [ makeWrapper unzip which ] ;
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
|
@ -7,54 +7,53 @@ in
|
||||
|
||||
with import ./lib.nix { inherit pkgs; };
|
||||
|
||||
self: super: {
|
||||
self: super:
|
||||
# The stage 2 packages. Regenerate with ./ghcjs/gen-stage2.rb
|
||||
let stage2 =
|
||||
(import ./ghcjs/stage2.nix {
|
||||
inherit (self) callPackage;
|
||||
inherit (self.ghc) ghcjsBoot;
|
||||
}); in stage2 // {
|
||||
|
||||
old-time = overrideCabal stage2.old-time (drv: {
|
||||
postPatch = ''
|
||||
${pkgs.autoconf}/bin/autoreconf --install --force --verbose
|
||||
'';
|
||||
});
|
||||
|
||||
# LLVM is not supported on this GHC; use the latest one.
|
||||
inherit (pkgs) llvmPackages;
|
||||
|
||||
inherit (pkgs.haskell.packages.ghc7103) jailbreak-cabal alex happy gtk2hs-buildtools rehoo hoogle;
|
||||
|
||||
# This is the list of packages that are built into a booted ghcjs installation
|
||||
# This is the list of the Stage 1 packages that are built into a booted ghcjs installation
|
||||
# It can be generated with the command:
|
||||
# nix-shell -p haskell.packages.ghcjs.ghc --command "ghcjs-pkg list | sed -n 's/^ \(.*\)-\([0-9.]*\)$/\1_\2/ p' | sed 's/\./_/g' | sed 's/-\(.\)/\U\1/' | sed 's/^\([^_]*\)\(.*\)$/\1 = null;/'"
|
||||
Cabal = null;
|
||||
aeson = null;
|
||||
array = null;
|
||||
async = null;
|
||||
attoparsec = null;
|
||||
base = null;
|
||||
binary = null;
|
||||
rts = null;
|
||||
bytestring = null;
|
||||
case-insensitive = null;
|
||||
containers = null;
|
||||
deepseq = null;
|
||||
directory = null;
|
||||
dlist = null;
|
||||
extensible-exceptions = null;
|
||||
filepath = null;
|
||||
ghc-prim = null;
|
||||
ghcjs-base = null;
|
||||
ghcjs-prim = null;
|
||||
hashable = null;
|
||||
integer-gmp = null;
|
||||
mtl = null;
|
||||
old-locale = null;
|
||||
old-time = null;
|
||||
parallel = null;
|
||||
pretty = null;
|
||||
primitive = null;
|
||||
process = null;
|
||||
scientific = null;
|
||||
stm = null;
|
||||
syb = null;
|
||||
template-haskell = null;
|
||||
text = null;
|
||||
time = null;
|
||||
transformers = null;
|
||||
unix = null;
|
||||
unordered-containers = null;
|
||||
vector = null;
|
||||
|
||||
# Don't set integer-simple to null!
|
||||
# GHCJS uses integer-gmp, so any package expression that depends on
|
||||
# integer-simple is wrong.
|
||||
#integer-simple = null;
|
||||
|
||||
# These packages are core libraries in GHC 7.10.x, but not here.
|
||||
bin-package-db = null;
|
||||
@ -105,7 +104,7 @@ self: super: {
|
||||
}) {};
|
||||
|
||||
ghcjs-dom = overrideCabal super.ghcjs-dom (drv: {
|
||||
libraryHaskellDepends =
|
||||
libraryHaskellDepends = [ self.ghcjs-base ] ++
|
||||
removeLibraryHaskellDepends [
|
||||
"glib" "gtk" "gtk3" "webkitgtk" "webkitgtk3"
|
||||
] drv.libraryHaskellDepends;
|
||||
|
@ -36,6 +36,7 @@
|
||||
, testDepends ? [], testHaskellDepends ? [], testSystemDepends ? []
|
||||
, testTarget ? ""
|
||||
, broken ? false
|
||||
, preCompileBuildDriver ? "", postCompileBuildDriver ? ""
|
||||
, preUnpack ? "", postUnpack ? ""
|
||||
, patches ? [], patchPhase ? "", prePatch ? "", postPatch ? ""
|
||||
, preConfigure ? "", postConfigure ? ""
|
||||
@ -57,6 +58,7 @@ let
|
||||
concatStringsSep enableFeature optionalAttrs toUpper;
|
||||
|
||||
isGhcjs = ghc.isGhcjs or false;
|
||||
nativeGhc = if isGhcjs then ghc.nativeGhc else ghc;
|
||||
|
||||
newCabalFileUrl = "http://hackage.haskell.org/package/${pname}-${version}/revision/${revision}.cabal";
|
||||
newCabalFile = fetchurl {
|
||||
@ -124,7 +126,8 @@ let
|
||||
|
||||
ghcEnv = ghc.withPackages (p: haskellBuildInputs);
|
||||
|
||||
setupCommand = if isGhcjs then "${ghc.nodejs}/bin/node ./Setup.jsexe/all.js" else "./Setup";
|
||||
setupBuilder = if isGhcjs then "${nativeGhc}/bin/ghc" else ghcCommand;
|
||||
setupCommand = "./Setup";
|
||||
ghcCommand = if isGhcjs then "ghcjs" else "ghc";
|
||||
ghcCommandCaps = toUpper ghcCommand;
|
||||
|
||||
@ -200,7 +203,7 @@ stdenv.mkDerivation ({
|
||||
done
|
||||
|
||||
echo setupCompileFlags: $setupCompileFlags
|
||||
${ghcCommand} $setupCompileFlags --make -o Setup -odir $TMPDIR -hidir $TMPDIR $i
|
||||
${setupBuilder} $setupCompileFlags --make -o Setup -odir $TMPDIR -hidir $TMPDIR $i
|
||||
|
||||
runHook postCompileBuildDriver
|
||||
'';
|
||||
@ -296,6 +299,8 @@ stdenv.mkDerivation ({
|
||||
;
|
||||
|
||||
}
|
||||
// optionalAttrs (preCompileBuildDriver != "") { inherit preCompileBuildDriver; }
|
||||
// optionalAttrs (postCompileBuildDriver != "") { inherit postCompileBuildDriver; }
|
||||
// optionalAttrs (preUnpack != "") { inherit preUnpack; }
|
||||
// optionalAttrs (postUnpack != "") { inherit postUnpack; }
|
||||
// optionalAttrs (configureFlags != []) { inherit configureFlags; }
|
||||
|
53
pkgs/development/haskell-modules/ghcjs/gen-stage2.rb
Normal file
53
pkgs/development/haskell-modules/ghcjs/gen-stage2.rb
Normal file
@ -0,0 +1,53 @@
|
||||
#!/usr/bin/env ruby
|
||||
|
||||
require 'pathname'
|
||||
|
||||
# from boot.yaml in ghcjs/ghcjs
|
||||
stage2_packages = [
|
||||
"boot/async",
|
||||
"boot/aeson",
|
||||
"boot/attoparsec",
|
||||
"boot/case-insensitive",
|
||||
"boot/dlist",
|
||||
"boot/extensible-exceptions",
|
||||
"boot/hashable",
|
||||
"boot/mtl",
|
||||
"boot/old-time",
|
||||
"boot/parallel",
|
||||
"boot/scientific",
|
||||
"boot/stm",
|
||||
"boot/syb",
|
||||
"boot/text",
|
||||
"boot/unordered-containers",
|
||||
"boot/vector",
|
||||
"ghcjs/ghcjs-base",
|
||||
# not listed under stage2, but needed when "quick booting".
|
||||
"boot/cabal/Cabal"
|
||||
]
|
||||
|
||||
nixpkgs = File.expand_path("../../../../..", __FILE__)
|
||||
boot = `nix-build #{nixpkgs} -A haskell.packages.ghcjs.ghc.ghcjsBoot`.chomp
|
||||
|
||||
out = "".dup
|
||||
out << "{ ghcjsBoot, callPackage }:\n"
|
||||
out << "\n"
|
||||
out << "{\n"
|
||||
|
||||
stage2_packages.each do |package|
|
||||
name = Pathname.new(package).basename
|
||||
nix = `cabal2nix file://#{boot}/#{package} --jailbreak`
|
||||
nix.sub!(/src =.*?$/, "src = \"${ghcjsBoot}/#{package}\";")
|
||||
nix.sub!("libraryHaskellDepends", "doCheck = false;\n libraryHaskellDepends")
|
||||
# cabal2nix somehow generates the deps for 'text' as if it had selected flag
|
||||
# 'integer-simple' (despite not passing the flag within the generated
|
||||
# expression). We want integer-gmp instead.
|
||||
nix.gsub!(/integer-simple/, "integer-gmp")
|
||||
nix = nix.split("\n").join("\n ")
|
||||
|
||||
out << " #{name} = callPackage\n"
|
||||
out << " (#{nix}) {};\n"
|
||||
end
|
||||
|
||||
out << "}"
|
||||
|
||||
puts out
|
344
pkgs/development/haskell-modules/ghcjs/stage2.nix
Normal file
344
pkgs/development/haskell-modules/ghcjs/stage2.nix
Normal file
@ -0,0 +1,344 @@
|
||||
{ ghcjsBoot, callPackage }:
|
||||
|
||||
{
|
||||
async = callPackage
|
||||
({ mkDerivation, base, HUnit, stdenv, stm, test-framework
|
||||
, test-framework-hunit
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "async";
|
||||
version = "2.0.1.6";
|
||||
src = "${ghcjsBoot}/boot/async";
|
||||
doCheck = false;
|
||||
libraryHaskellDepends = [ base stm ];
|
||||
testHaskellDepends = [
|
||||
base HUnit test-framework test-framework-hunit
|
||||
];
|
||||
jailbreak = true;
|
||||
homepage = "https://github.com/simonmar/async";
|
||||
description = "Run IO operations asynchronously and wait for their results";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
}) {};
|
||||
aeson = callPackage
|
||||
({ mkDerivation, attoparsec, base, bytestring, containers, deepseq
|
||||
, dlist, ghc-prim, hashable, HUnit, mtl, QuickCheck, scientific
|
||||
, stdenv, syb, template-haskell, test-framework
|
||||
, test-framework-hunit, test-framework-quickcheck2, text, time
|
||||
, transformers, unordered-containers, vector
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "aeson";
|
||||
version = "0.9.0.1";
|
||||
src = "${ghcjsBoot}/boot/aeson";
|
||||
doCheck = false;
|
||||
libraryHaskellDepends = [
|
||||
attoparsec base bytestring containers deepseq dlist ghc-prim
|
||||
hashable mtl scientific syb template-haskell text time transformers
|
||||
unordered-containers vector
|
||||
];
|
||||
testHaskellDepends = [
|
||||
attoparsec base bytestring containers ghc-prim HUnit QuickCheck
|
||||
template-haskell test-framework test-framework-hunit
|
||||
test-framework-quickcheck2 text time unordered-containers vector
|
||||
];
|
||||
jailbreak = true;
|
||||
homepage = "https://github.com/bos/aeson";
|
||||
description = "Fast JSON parsing and encoding";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
}) {};
|
||||
attoparsec = callPackage
|
||||
({ mkDerivation, array, base, bytestring, containers, deepseq
|
||||
, QuickCheck, quickcheck-unicode, scientific, stdenv
|
||||
, test-framework, test-framework-quickcheck2, text, transformers
|
||||
, vector
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "attoparsec";
|
||||
version = "0.13.0.1";
|
||||
src = "${ghcjsBoot}/boot/attoparsec";
|
||||
doCheck = false;
|
||||
libraryHaskellDepends = [
|
||||
array base bytestring containers deepseq scientific text
|
||||
transformers
|
||||
];
|
||||
testHaskellDepends = [
|
||||
array base bytestring containers deepseq QuickCheck
|
||||
quickcheck-unicode scientific test-framework
|
||||
test-framework-quickcheck2 text transformers vector
|
||||
];
|
||||
jailbreak = true;
|
||||
homepage = "https://github.com/bos/attoparsec";
|
||||
description = "Fast combinator parsing for bytestrings and text";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
}) {};
|
||||
case-insensitive = callPackage
|
||||
({ mkDerivation, base, bytestring, deepseq, hashable, HUnit, stdenv
|
||||
, test-framework, test-framework-hunit, text
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "case-insensitive";
|
||||
version = "1.2.0.4";
|
||||
src = "${ghcjsBoot}/boot/case-insensitive";
|
||||
doCheck = false;
|
||||
libraryHaskellDepends = [ base bytestring deepseq hashable text ];
|
||||
testHaskellDepends = [
|
||||
base bytestring HUnit test-framework test-framework-hunit text
|
||||
];
|
||||
jailbreak = true;
|
||||
homepage = "https://github.com/basvandijk/case-insensitive";
|
||||
description = "Case insensitive string comparison";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
}) {};
|
||||
dlist = callPackage
|
||||
({ mkDerivation, base, Cabal, deepseq, QuickCheck, stdenv }:
|
||||
mkDerivation {
|
||||
pname = "dlist";
|
||||
version = "0.7.1.1";
|
||||
src = "${ghcjsBoot}/boot/dlist";
|
||||
doCheck = false;
|
||||
libraryHaskellDepends = [ base deepseq ];
|
||||
testHaskellDepends = [ base Cabal QuickCheck ];
|
||||
jailbreak = true;
|
||||
homepage = "https://github.com/spl/dlist";
|
||||
description = "Difference lists";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
}) {};
|
||||
extensible-exceptions = callPackage
|
||||
({ mkDerivation, base, stdenv }:
|
||||
mkDerivation {
|
||||
pname = "extensible-exceptions";
|
||||
version = "0.1.1.4";
|
||||
src = "${ghcjsBoot}/boot/extensible-exceptions";
|
||||
doCheck = false;
|
||||
libraryHaskellDepends = [ base ];
|
||||
jailbreak = true;
|
||||
description = "Extensible exceptions";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
}) {};
|
||||
hashable = callPackage
|
||||
({ mkDerivation, base, bytestring, ghc-prim, HUnit, integer-gmp
|
||||
, QuickCheck, random, stdenv, test-framework, test-framework-hunit
|
||||
, test-framework-quickcheck2, text, unix
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "hashable";
|
||||
version = "1.2.3.2";
|
||||
src = "${ghcjsBoot}/boot/hashable";
|
||||
doCheck = false;
|
||||
libraryHaskellDepends = [
|
||||
base bytestring ghc-prim integer-gmp text
|
||||
];
|
||||
testHaskellDepends = [
|
||||
base bytestring ghc-prim HUnit QuickCheck random test-framework
|
||||
test-framework-hunit test-framework-quickcheck2 text unix
|
||||
];
|
||||
jailbreak = true;
|
||||
homepage = "http://github.com/tibbe/hashable";
|
||||
description = "A class for types that can be converted to a hash value";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
}) {};
|
||||
mtl = callPackage
|
||||
({ mkDerivation, base, stdenv, transformers }:
|
||||
mkDerivation {
|
||||
pname = "mtl";
|
||||
version = "2.2.1";
|
||||
src = "${ghcjsBoot}/boot/mtl";
|
||||
doCheck = false;
|
||||
libraryHaskellDepends = [ base transformers ];
|
||||
jailbreak = true;
|
||||
homepage = "http://github.com/ekmett/mtl";
|
||||
description = "Monad classes, using functional dependencies";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
}) {};
|
||||
old-time = callPackage
|
||||
({ mkDerivation, base, old-locale, stdenv }:
|
||||
mkDerivation {
|
||||
pname = "old-time";
|
||||
version = "1.1.0.3";
|
||||
src = "${ghcjsBoot}/boot/old-time";
|
||||
doCheck = false;
|
||||
libraryHaskellDepends = [ base old-locale ];
|
||||
jailbreak = true;
|
||||
description = "Time library";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
}) {};
|
||||
parallel = callPackage
|
||||
({ mkDerivation, array, base, containers, deepseq, stdenv }:
|
||||
mkDerivation {
|
||||
pname = "parallel";
|
||||
version = "3.2.0.6";
|
||||
src = "${ghcjsBoot}/boot/parallel";
|
||||
doCheck = false;
|
||||
libraryHaskellDepends = [ array base containers deepseq ];
|
||||
jailbreak = true;
|
||||
description = "Parallel programming library";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
}) {};
|
||||
scientific = callPackage
|
||||
({ mkDerivation, array, base, bytestring, deepseq, ghc-prim
|
||||
, hashable, integer-gmp, QuickCheck, smallcheck, stdenv, tasty
|
||||
, tasty-ant-xml, tasty-hunit, tasty-quickcheck, tasty-smallcheck
|
||||
, text
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "scientific";
|
||||
version = "0.3.3.8";
|
||||
src = "${ghcjsBoot}/boot/scientific";
|
||||
doCheck = false;
|
||||
libraryHaskellDepends = [
|
||||
array base bytestring deepseq ghc-prim hashable integer-gmp text
|
||||
];
|
||||
testHaskellDepends = [
|
||||
base bytestring QuickCheck smallcheck tasty tasty-ant-xml
|
||||
tasty-hunit tasty-quickcheck tasty-smallcheck text
|
||||
];
|
||||
jailbreak = true;
|
||||
homepage = "https://github.com/basvandijk/scientific";
|
||||
description = "Numbers represented using scientific notation";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
}) {};
|
||||
stm = callPackage
|
||||
({ mkDerivation, array, base, stdenv }:
|
||||
mkDerivation {
|
||||
pname = "stm";
|
||||
version = "2.4.4";
|
||||
src = "${ghcjsBoot}/boot/stm";
|
||||
doCheck = false;
|
||||
libraryHaskellDepends = [ array base ];
|
||||
jailbreak = true;
|
||||
description = "Software Transactional Memory";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
}) {};
|
||||
syb = callPackage
|
||||
({ mkDerivation, base, containers, HUnit, mtl, stdenv }:
|
||||
mkDerivation {
|
||||
pname = "syb";
|
||||
version = "0.5.1";
|
||||
src = "${ghcjsBoot}/boot/syb";
|
||||
doCheck = false;
|
||||
libraryHaskellDepends = [ base ];
|
||||
testHaskellDepends = [ base containers HUnit mtl ];
|
||||
jailbreak = true;
|
||||
homepage = "http://www.cs.uu.nl/wiki/GenericProgramming/SYB";
|
||||
description = "Scrap Your Boilerplate";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
}) {};
|
||||
text = callPackage
|
||||
({ mkDerivation, array, base, binary, bytestring, deepseq, directory
|
||||
, ghc-prim, HUnit, integer-gmp, QuickCheck, quickcheck-unicode
|
||||
, random, stdenv, test-framework, test-framework-hunit
|
||||
, test-framework-quickcheck2
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "text";
|
||||
version = "1.2.1.1";
|
||||
src = "${ghcjsBoot}/boot/text";
|
||||
doCheck = false;
|
||||
libraryHaskellDepends = [
|
||||
array base binary bytestring deepseq ghc-prim integer-gmp
|
||||
];
|
||||
testHaskellDepends = [
|
||||
array base binary bytestring deepseq directory ghc-prim HUnit
|
||||
integer-gmp QuickCheck quickcheck-unicode random test-framework
|
||||
test-framework-hunit test-framework-quickcheck2
|
||||
];
|
||||
jailbreak = true;
|
||||
homepage = "https://github.com/bos/text";
|
||||
description = "An efficient packed Unicode text type";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
}) {};
|
||||
unordered-containers = callPackage
|
||||
({ mkDerivation, base, ChasingBottoms, containers, deepseq, hashable
|
||||
, HUnit, QuickCheck, stdenv, test-framework, test-framework-hunit
|
||||
, test-framework-quickcheck2
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "unordered-containers";
|
||||
version = "0.2.5.1";
|
||||
src = "${ghcjsBoot}/boot/unordered-containers";
|
||||
doCheck = false;
|
||||
libraryHaskellDepends = [ base deepseq hashable ];
|
||||
testHaskellDepends = [
|
||||
base ChasingBottoms containers hashable HUnit QuickCheck
|
||||
test-framework test-framework-hunit test-framework-quickcheck2
|
||||
];
|
||||
jailbreak = true;
|
||||
homepage = "https://github.com/tibbe/unordered-containers";
|
||||
description = "Efficient hashing-based container types";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
}) {};
|
||||
vector = callPackage
|
||||
({ mkDerivation, base, deepseq, ghc-prim, primitive, QuickCheck
|
||||
, random, stdenv, template-haskell, test-framework
|
||||
, test-framework-quickcheck2, transformers
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "vector";
|
||||
version = "0.11.0.0";
|
||||
src = "${ghcjsBoot}/boot/vector";
|
||||
doCheck = false;
|
||||
libraryHaskellDepends = [ base deepseq ghc-prim primitive ];
|
||||
testHaskellDepends = [
|
||||
base QuickCheck random template-haskell test-framework
|
||||
test-framework-quickcheck2 transformers
|
||||
];
|
||||
jailbreak = true;
|
||||
homepage = "https://github.com/haskell/vector";
|
||||
description = "Efficient Arrays";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
}) {};
|
||||
ghcjs-base = callPackage
|
||||
({ mkDerivation, aeson, array, attoparsec, base, bytestring
|
||||
, containers, deepseq, directory, dlist, ghc-prim, ghcjs-prim
|
||||
, hashable, HUnit, integer-gmp, primitive, QuickCheck
|
||||
, quickcheck-unicode, random, scientific, stdenv, test-framework
|
||||
, test-framework-hunit, test-framework-quickcheck2, text, time
|
||||
, transformers, unordered-containers, vector
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "ghcjs-base";
|
||||
version = "0.2.0.0";
|
||||
src = "${ghcjsBoot}/ghcjs/ghcjs-base";
|
||||
doCheck = false;
|
||||
libraryHaskellDepends = [
|
||||
aeson attoparsec base bytestring containers deepseq dlist ghc-prim
|
||||
ghcjs-prim hashable integer-gmp primitive scientific text time
|
||||
transformers unordered-containers vector
|
||||
];
|
||||
testHaskellDepends = [
|
||||
array base bytestring deepseq directory ghc-prim ghcjs-prim HUnit
|
||||
primitive QuickCheck quickcheck-unicode random test-framework
|
||||
test-framework-hunit test-framework-quickcheck2 text
|
||||
];
|
||||
jailbreak = true;
|
||||
homepage = "http://github.com/ghcjs/ghcjs-base";
|
||||
description = "base library for GHCJS";
|
||||
license = stdenv.lib.licenses.mit;
|
||||
}) {};
|
||||
Cabal = callPackage
|
||||
({ mkDerivation, array, base, binary, bytestring, containers
|
||||
, deepseq, directory, extensible-exceptions, filepath, HUnit
|
||||
, old-time, pretty, process, QuickCheck, regex-posix, stdenv
|
||||
, test-framework, test-framework-hunit, test-framework-quickcheck2
|
||||
, time, unix
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "Cabal";
|
||||
version = "1.22.4.0";
|
||||
src = "${ghcjsBoot}/boot/cabal/Cabal";
|
||||
doCheck = false;
|
||||
libraryHaskellDepends = [
|
||||
array base binary bytestring containers deepseq directory filepath
|
||||
pretty process time unix
|
||||
];
|
||||
testHaskellDepends = [
|
||||
base bytestring containers directory extensible-exceptions filepath
|
||||
HUnit old-time process QuickCheck regex-posix test-framework
|
||||
test-framework-hunit test-framework-quickcheck2 unix
|
||||
];
|
||||
jailbreak = true;
|
||||
homepage = "http://www.haskell.org/cabal/";
|
||||
description = "A framework for packaging Haskell software";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
}) {};
|
||||
}
|
38
pkgs/development/interpreters/love/0.10.nix
Normal file
38
pkgs/development/interpreters/love/0.10.nix
Normal file
@ -0,0 +1,38 @@
|
||||
{ stdenv, fetchFromBitbucket, pkgconfig, SDL2, mesa, openal, luajit,
|
||||
libdevil, freetype, physfs, libmodplug, mpg123, libvorbis, libogg,
|
||||
libtheora, which, autoconf, automake, libtool
|
||||
}:
|
||||
|
||||
let
|
||||
pname = "love";
|
||||
version = "0.10.1";
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "${pname}-${version}";
|
||||
src = fetchFromBitbucket {
|
||||
owner = "rude";
|
||||
repo = "love";
|
||||
rev = "${version}";
|
||||
sha256 = "10a2kkyx7x9jkcj9xrqgmvp0b6gbapjqjx9fib9f6a0nbz0xaswj";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
pkgconfig SDL2 mesa openal luajit libdevil freetype physfs libmodplug mpg123
|
||||
libvorbis libogg libtheora autoconf which libtool automake
|
||||
];
|
||||
|
||||
preConfigure = "$shell ./platform/unix/automagic";
|
||||
|
||||
configureFlags = [
|
||||
"--with-lua=luajit"
|
||||
];
|
||||
|
||||
meta = {
|
||||
homepage = "http://love2d.org";
|
||||
description = "A Lua-based 2D game engine/scripting language";
|
||||
license = stdenv.lib.licenses.zlib;
|
||||
platforms = stdenv.lib.platforms.linux;
|
||||
maintainers = [ stdenv.lib.maintainers.raskin ];
|
||||
};
|
||||
}
|
@ -65,8 +65,24 @@ let
|
||||
"${bundler}/${ruby.gemPath}" \
|
||||
${shellEscape (toString envPaths)}
|
||||
'' + lib.optionalString (postBuild != null) postBuild;
|
||||
passthru = {
|
||||
passthru = rec {
|
||||
inherit ruby bundler meta gems;
|
||||
|
||||
wrappedRuby = stdenv.mkDerivation {
|
||||
name = "wrapped-ruby-${name}";
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
buildCommand = ''
|
||||
mkdir -p $out/bin
|
||||
for i in ${ruby}/bin/*; do
|
||||
makeWrapper "$i" $out/bin/$(basename "$i") \
|
||||
--set BUNDLE_GEMFILE ${confFiles}/Gemfile \
|
||||
--set BUNDLE_PATH ${bundlerEnv}/${ruby.gemPath} \
|
||||
--set GEM_HOME ${bundlerEnv}/${ruby.gemPath} \
|
||||
--set GEM_PATH ${bundlerEnv}/${ruby.gemPath}
|
||||
done
|
||||
'';
|
||||
};
|
||||
|
||||
env = let
|
||||
irbrc = builtins.toFile "irbrc" ''
|
||||
if !(ENV["OLD_IRBRC"].nil? || ENV["OLD_IRBRC"].empty?)
|
||||
@ -77,12 +93,8 @@ let
|
||||
'';
|
||||
in stdenv.mkDerivation {
|
||||
name = "interactive-${name}-environment";
|
||||
nativeBuildInputs = [ ruby bundlerEnv ];
|
||||
nativeBuildInputs = [ wrappedRuby bundlerEnv ];
|
||||
shellHook = ''
|
||||
export BUNDLE_GEMFILE=${confFiles}/Gemfile
|
||||
export BUNDLE_PATH=${bundlerEnv}/${ruby.gemPath}
|
||||
export GEM_HOME=${bundlerEnv}/${ruby.gemPath}
|
||||
export GEM_PATH=${bundlerEnv}/${ruby.gemPath}
|
||||
export OLD_IRBRC="$IRBRC"
|
||||
export IRBRC=${irbrc}
|
||||
'';
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchurl, pkgconfig, audiofile, libcap
|
||||
{ stdenv, fetchurl, fetchpatch, pkgconfig, audiofile, libcap
|
||||
, openglSupport ? false, mesa ? null
|
||||
, alsaSupport ? true, alsaLib ? null
|
||||
, x11Support ? true, xlibsWrapper ? null, libXrandr ? null
|
||||
@ -60,34 +60,49 @@ stdenv.mkDerivation rec {
|
||||
"--without-x"
|
||||
] ++ stdenv.lib.optional alsaSupport "--with-alsa-prefix=${alsaLib}/lib");
|
||||
|
||||
# Fix a build failure on OS X Mavericks
|
||||
# Ticket: https://bugzilla.libsdl.org/show_bug.cgi?id=2085
|
||||
patches = stdenv.lib.optional stdenv.isDarwin [ (fetchurl {
|
||||
url = "http://bugzilla-attachments.libsdl.org/attachment.cgi?id=1320";
|
||||
sha1 = "3137feb503a89a8d606405373905b92dcf7e293b";
|
||||
}) ];
|
||||
patches = [
|
||||
# Fix window resizing issues, e.g. for xmonad
|
||||
# Ticket: http://bugzilla.libsdl.org/show_bug.cgi?id=1430
|
||||
(fetchpatch {
|
||||
name = "fix_window_resizing.diff";
|
||||
url = "https://bugs.debian.org/cgi-bin/bugreport.cgi?msg=10;filename=fix_window_resizing.diff;att=2;bug=665779";
|
||||
sha256 = "1z35azc73vvi19pzi6byck31132a8w1vzrghp1x3hy4a4f9z4gc6";
|
||||
})
|
||||
# Fix drops of keyboard events for SDL_EnableUNICODE
|
||||
(fetchpatch {
|
||||
url = "http://hg.libsdl.org/SDL/raw-rev/0aade9c0203f";
|
||||
sha256 = "1y9izncjlqvk1mkz1pkl9lrk9s452cmg2izjjlqqrhbn8279xy50";
|
||||
})
|
||||
# Ignore insane joystick axis events
|
||||
(fetchpatch {
|
||||
url = "http://hg.libsdl.org/SDL/raw-rev/95abff7adcc2";
|
||||
sha256 = "0i8x0kx0pw12ld5bfxhyzs466y3c0n9dscw1ijhq1b96r72xyhqq";
|
||||
})
|
||||
# Workaround X11 bug to allow changing gamma
|
||||
# Ticket: https://bugs.freedesktop.org/show_bug.cgi?id=27222
|
||||
(fetchpatch {
|
||||
url = "http://pkgs.fedoraproject.org/cgit/rpms/SDL.git/plain/SDL-1.2.15-x11-Bypass-SetGammaRamp-when-changing-gamma.patch?id=04a3a7b1bd88c2d5502292fad27e0e02d084698d";
|
||||
sha256 = "0x52s4328kilyq43i7psqkqg7chsfwh0aawr50j566nzd7j51dlv";
|
||||
})
|
||||
# Fix a build failure on OS X Mavericks
|
||||
# Ticket: https://bugzilla.libsdl.org/show_bug.cgi?id=2085
|
||||
(fetchpatch {
|
||||
url = "http://hg.libsdl.org/SDL/raw-rev/e9466ead70e5";
|
||||
sha256 = "0mpwdi09h89df2wxqw87m1rdz7pr46k0w6alk691k8kwv970z6pl";
|
||||
})
|
||||
(fetchpatch {
|
||||
url = "http://hg.libsdl.org/SDL/raw-rev/bbfb41c13a87";
|
||||
sha256 = "1336g7waaf1c8yhkz11xbs500h8bmvabh4h437ax8l1xdwcppfxv";
|
||||
})
|
||||
];
|
||||
|
||||
crossAttrs =stdenv.lib.optionalAttrs (stdenv.cross.libc == "libSystem") {
|
||||
patches = let
|
||||
f = rev: sha256: fetchurl {
|
||||
url = "http://hg.libsdl.org/SDL/raw-rev/${rev}";
|
||||
inherit sha256;
|
||||
};
|
||||
in [
|
||||
(f "e9466ead70e5" "0ygir3k83d0vxp7s3k48jn3j8n2bnv9wm6613wpx3ybnjrxabrip")
|
||||
(f "bbfb41c13a87" "17v29ybjifvka19m8qf14rjc43nfdwk9v9inaizznarhb17amlnv")
|
||||
];
|
||||
postPatch = ''
|
||||
sed -i -e 's/ *-fpascal-strings//' configure
|
||||
'';
|
||||
};
|
||||
|
||||
passthru = {inherit openglSupport;};
|
||||
passthru = { inherit openglSupport; };
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "A cross-platform multimedia library";
|
||||
homepage = http://www.libsdl.org/;
|
||||
maintainers = with maintainers; [ lovek323 ];
|
||||
platforms = platforms.unix;
|
||||
license = licenses.lgpl21;
|
||||
};
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user