Merge branch 'master' into staging-next

This commit is contained in:
Jan Tojnar 2019-12-03 16:51:48 +01:00
commit 30fae2883e
No known key found for this signature in database
GPG Key ID: 7FAB2A15F7A607A4
144 changed files with 1463 additions and 927 deletions

View File

@ -6121,6 +6121,16 @@
githubId = 307899;
name = "Gurkan Gur";
};
servalcatty = {
email = "servalcat@pm.me";
github = "servalcatty";
githubid = 51969817;
name = "Serval";
keys = [{
longkeyid = "rsa4096/0x4A2AAAA382F8294C";
fingerprint = "A317 37B3 693C 921B 480C C629 4A2A AAA3 82F8 294C";
}];
};
sfrijters = {
email = "sfrijters@gmail.com";
github = "sfrijters";
@ -7664,6 +7674,12 @@
githubId = 50867187;
name = "Rakesh Gupta";
};
mlatus = {
email = "wqseleven@gmail.com";
github = "Ninlives";
githubId = 17873203;
name = "mlatus";
};
waiting-for-dev = {
email = "marc@lamarciana.com";
github = "waiting-for-dev";

View File

@ -380,7 +380,10 @@
</para>
<para>
If you need to configure networking for your machine the configuration
options are described in <xref linkend="sec-networking"/>.
options are described in <xref linkend="sec-networking"/>. In particular,
while wifi is supported on the installation image, it is not enabled by
default in the configuration generated by
<command>nixos-generate-config</command>.
</para>
<para>
Another critical option is <option>fileSystems</option>, specifying the

View File

@ -199,6 +199,21 @@
This has led to drastically reduced closed sizes for some rust crates since development dependencies are now in the <literal>lib</literal> output.
</para>
</listitem>
<listitem>
<para>
The packages <literal>openobex</literal> and <literal>obexftp</literal>
are no loger installed when enabling bluetooth via
<option>hardware.bluetooth.enable</option>.
</para>
</listitem>
<listitem>
<para>
The <literal>dump1090</literal> derivation has been changed to use FlightAware's dump1090
as its upstream. However, this version does not have an internal webserver anymore. The
assets in the <literal>share/dump1090</literal> directory of the derivation can be used
in conjunction with an external webserver to replace this functionality.
</para>
</listitem>
</itemizedlist>
</section>
@ -221,6 +236,12 @@
release announcement</link> for more information.
</para>
</listitem>
<listitem>
<para>
<literal>PRETTY_NAME</literal> in <literal>/etc/os-release</literal>
now uses the short rather than full version string.
</para>
</listitem>
</itemizedlist>
</section>
</section>

View File

@ -92,7 +92,7 @@ in
VERSION="${cfg.version} (${cfg.codeName})"
VERSION_CODENAME=${toLower cfg.codeName}
VERSION_ID="${cfg.version}"
PRETTY_NAME="NixOS ${cfg.version} (${cfg.codeName})"
PRETTY_NAME="NixOS ${cfg.release} (${cfg.codeName})"
LOGO="nix-snowflake"
HOME_URL="https://nixos.org/"
DOCUMENTATION_URL="https://nixos.org/nixos/manual/index.html"

View File

@ -722,6 +722,7 @@
./services/networking/tvheadend.nix
./services/networking/unbound.nix
./services/networking/unifi.nix
./services/networking/v2ray.nix
./services/networking/vsftpd.nix
./services/networking/wakeonlan.nix
./services/networking/websockify.nix

View File

@ -72,7 +72,7 @@ in {
};
};
environment.systemPackages = [ bluez-bluetooth pkgs.openobex pkgs.obexftp ];
environment.systemPackages = [ bluez-bluetooth ];
environment.etc = singleton {
source = pkgs.writeText "main.conf" (generators.toINI { } cfg.config + optionalString (cfg.extraConfig != null) cfg.extraConfig);

View File

@ -0,0 +1,81 @@
{ config, lib, pkgs, ... }:
with lib;
{
options = {
services.v2ray = {
enable = mkOption {
type = types.bool;
default = false;
description = ''
Whether to run v2ray server.
Either <literal>configFile</literal> or <literal>config</literal> must be specified.
'';
};
configFile = mkOption {
type = types.nullOr types.str;
default = null;
example = "/etc/v2ray/config.json";
description = ''
The absolute path to the configuration file.
Either <literal>configFile</literal> or <literal>config</literal> must be specified.
See <link xlink:href="https://v2ray.com/en/configuration/overview.html"/>.
'';
};
config = mkOption {
type = types.nullOr (types.attrsOf types.unspecified);
default = null;
example = {
inbounds = [{
port = 1080;
listen = "127.0.0.1";
protocol = "http";
}];
outbounds = [{
protocol = "freedom";
}];
};
description = ''
The configuration object.
Either `configFile` or `config` must be specified.
See <link xlink:href="https://v2ray.com/en/configuration/overview.html"/>.
'';
};
};
};
config = let
cfg = config.services.v2ray;
configFile = if cfg.configFile != null
then cfg.configFile
else (pkgs.writeText "v2ray.json" (builtins.toJSON cfg.config));
in mkIf cfg.enable {
assertions = [
{
assertion = (cfg.configFile == null) != (cfg.config == null);
message = "Either but not both `configFile` and `config` should be specified for v2ray.";
}
];
systemd.services.v2ray = {
description = "v2ray Daemon";
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
path = [ pkgs.v2ray ];
script = ''
exec v2ray -config ${configFile}
'';
};
};
}

View File

@ -159,7 +159,7 @@ in
# Override GSettings schemas
environment.sessionVariables.NIX_GSETTINGS_OVERRIDES_DIR = "${nixos-gsettings-desktop-schemas}/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas";
environment.sessionVariables.GNOME_SESSION_DEBUG = optionalString cfg.debug "1";
environment.sessionVariables.GNOME_SESSION_DEBUG = mkIf cfg.debug "1";
# Settings from elementary-default-settings
environment.sessionVariables.GTK_CSD = "1";

View File

@ -169,7 +169,7 @@ in
++ lib.optional (cfg.phononBackend == "vlc") libsForQt5.phonon-backend-vlc
# Optional hardware support features
++ lib.optionals config.hardware.bluetooth.enable [ bluedevil bluez-qt ]
++ lib.optionals config.hardware.bluetooth.enable [ bluedevil bluez-qt openobex obexftp ]
++ lib.optional config.networking.networkmanager.enable plasma-nm
++ lib.optional config.hardware.pulseaudio.enable plasma-pa
++ lib.optional config.powerManagement.enable powerdevil

View File

@ -1,7 +1,7 @@
{ system ? builtins.currentSystem, config ? { }
, pkgs ? import ../.. { inherit system config; } }:
with import ../lib/testing.nix { inherit system pkgs; };
with import ../lib/testing-python.nix { inherit system pkgs; };
with pkgs.lib;
let
@ -24,11 +24,16 @@ let
};
testScript = ''
startAll;
$machine->waitForUnit("mysql.service");
$machine->waitForUnit("phpfpm-matomo.service");
$machine->waitForUnit("nginx.service");
$machine->succeed("curl -sSfL http://localhost/ | grep '<title>Matomo[^<]*Installation'");
start_all()
machine.wait_for_unit("mysql.service")
machine.wait_for_unit("phpfpm-matomo.service")
machine.wait_for_unit("nginx.service")
# without the grep the command does not produce valid utf-8 for some reason
with subtest("welcome screen loads"):
machine.succeed(
"curl -sSfL http://localhost/ | grep '<title>Matomo[^<]*Installation'"
)
'';
};
in {

View File

@ -1,4 +1,4 @@
import ./make-test.nix ({ pkgs, lib, ... }: {
import ./make-test-python.nix ({ pkgs, lib, ... }: {
name = "mediawiki";
meta.maintainers = [ lib.maintainers.aanderse ];
@ -11,9 +11,11 @@ import ./make-test.nix ({ pkgs, lib, ... }: {
};
testScript = ''
startAll;
start_all()
$machine->waitForUnit('phpfpm-mediawiki.service');
$machine->succeed('curl -L http://localhost/') =~ /MediaWiki has been installed/ or die;
machine.wait_for_unit("phpfpm-mediawiki.service")
page = machine.succeed("curl -L http://localhost/")
assert "MediaWiki has been installed" in page
'';
})

View File

@ -1,4 +1,4 @@
import ./make-test.nix ({ pkgs, ...} : {
import ./make-test-python.nix ({ pkgs, ...} : {
name = "openarena";
meta = with pkgs.stdenv.lib.maintainers; {
maintainers = [ tomfitzhenry ];
@ -23,14 +23,19 @@ import ./make-test.nix ({ pkgs, ...} : {
testScript =
''
$machine->waitForUnit("openarena.service");
$machine->waitUntilSucceeds("ss --numeric --udp --listening | grep -q 27960");
machine.wait_for_unit("openarena.service")
machine.wait_until_succeeds("ss --numeric --udp --listening | grep -q 27960")
# The log line containing 'resolve address' is last and only message that occurs after
# the server starts accepting clients.
$machine->waitUntilSucceeds("journalctl -u openarena.service | grep 'resolve address: dpmaster.deathmask.net'");
machine.wait_until_succeeds(
"journalctl -u openarena.service | grep 'resolve address: dpmaster.deathmask.net'"
)
# Check it's possible to join the server.
$machine->succeed("echo -n -e '\\xff\\xff\\xff\\xffgetchallenge' | socat - UDP4-DATAGRAM:127.0.0.1:27960 | grep -q challengeResponse");
# Can't use substring match instead of grep because the output is not utf-8
machine.succeed(
"echo -n -e '\\xff\\xff\\xff\\xffgetchallenge' | socat - UDP4-DATAGRAM:127.0.0.1:27960 | grep -q challengeResponse"
)
'';
})

View File

@ -28,7 +28,7 @@ let
in
import ./make-test.nix ({ lib, ... }@args: {
import ./make-test-python.nix ({ lib, ... }@args: {
name = "radicale";
meta.maintainers = with lib.maintainers; [ aneeshusa infinisil ];
@ -64,43 +64,59 @@ in
newSystem = nodes.${nodeName}.config.system.build.toplevel;
in "${newSystem}/bin/switch-to-configuration test";
in ''
# Check Radicale 1 functionality
$radicale->succeed('${switchToConfig "radicale1"} >&2');
$radicale->waitForUnit('radicale.service');
$radicale->waitForOpenPort(${port});
$radicale->succeed('curl --fail http://${user}:${password}@localhost:${port}/someuser/calendar.ics/');
with subtest("Check Radicale 1 functionality"):
radicale.succeed(
"${switchToConfig "radicale1"} >&2"
)
radicale.wait_for_unit("radicale.service")
radicale.wait_for_open_port(${port})
radicale.succeed(
"curl --fail http://${user}:${password}@localhost:${port}/someuser/calendar.ics/"
)
# Export data in Radicale 2 format
$radicale->succeed('systemctl stop radicale');
$radicale->succeed('ls -al /tmp/collections');
$radicale->fail('ls -al /tmp/collections-new');
# Radicale exits immediately after exporting storage
$radicale->succeed('${switchToConfig "radicale1_export"} >&2');
$radicale->waitUntilFails('systemctl status radicale');
$radicale->succeed('ls -al /tmp/collections');
$radicale->succeed('ls -al /tmp/collections-new');
with subtest("Export data in Radicale 2 format"):
radicale.succeed("systemctl stop radicale")
radicale.succeed("ls -al /tmp/collections")
radicale.fail("ls -al /tmp/collections-new")
# Verify data in Radicale 2 format
$radicale->succeed('rm -r /tmp/collections/${user}');
$radicale->succeed('mv /tmp/collections-new/collection-root /tmp/collections');
$radicale->succeed('${switchToConfig "radicale2_verify"} >&2');
$radicale->waitUntilFails('systemctl status radicale');
my ($retcode, $logs) = $radicale->execute('journalctl -u radicale -n 10');
if ($retcode != 0 || index($logs, 'Verifying storage') == -1) {
die "Radicale 2 didn't verify storage"
}
if (index($logs, 'failed') != -1 || index($logs, 'exception') != -1) {
die "storage verification failed"
}
with subtest("Radicale exits immediately after exporting storage"):
radicale.succeed(
"${switchToConfig "radicale1_export"} >&2"
)
radicale.wait_until_fails("systemctl status radicale")
radicale.succeed("ls -al /tmp/collections")
radicale.succeed("ls -al /tmp/collections-new")
# Check Radicale 2 functionality
$radicale->succeed('${switchToConfig "radicale2"} >&2');
$radicale->waitForUnit('radicale.service');
$radicale->waitForOpenPort(${port});
my ($retcode, $output) = $radicale->execute('curl --fail http://${user}:${password}@localhost:${port}/someuser/calendar.ics/');
if ($retcode != 0 || index($output, 'VCALENDAR') == -1) {
die "Could not read calendar from Radicale 2"
}
$radicale->succeed('curl --fail http://${user}:${password}@localhost:${port}/.web/');
with subtest("Verify data in Radicale 2 format"):
radicale.succeed("rm -r /tmp/collections/${user}")
radicale.succeed("mv /tmp/collections-new/collection-root /tmp/collections")
radicale.succeed(
"${switchToConfig "radicale2_verify"} >&2"
)
radicale.wait_until_fails("systemctl status radicale")
(retcode, logs) = radicale.execute("journalctl -u radicale -n 10")
assert (
retcode == 0 and "Verifying storage" in logs
), "Radicale 2 didn't verify storage"
assert (
"failed" not in logs and "exception" not in logs
), "storage verification failed"
with subtest("Check Radicale 2 functionality"):
radicale.succeed(
"${switchToConfig "radicale2"} >&2"
)
radicale.wait_for_unit("radicale.service")
radicale.wait_for_open_port(${port})
(retcode, output) = radicale.execute(
"curl --fail http://${user}:${password}@localhost:${port}/someuser/calendar.ics/"
)
assert (
retcode == 0 and "VCALENDAR" in output
), "Could not read calendar from Radicale 2"
radicale.succeed("curl --fail http://${user}:${password}@localhost:${port}/.web/")
'';
})

View File

@ -1,4 +1,4 @@
import ./make-test.nix ({ pkgs, ...} : {
import ./make-test-python.nix ({ pkgs, ...} : {
name = "xrdp";
meta = with pkgs.stdenv.lib.maintainers; {
maintainers = [ volth ];
@ -21,25 +21,27 @@ import ./make-test.nix ({ pkgs, ...} : {
};
};
testScript = { ... }: ''
startAll;
testScript = { nodes, ... }: let
user = nodes.client.config.users.users.alice;
in ''
start_all()
$client->waitForX;
$client->waitForFile("/home/alice/.Xauthority");
$client->succeed("xauth merge ~alice/.Xauthority");
client.wait_for_x()
client.wait_for_file("${user.home}/.Xauthority")
client.succeed("xauth merge ${user.home}/.Xauthority")
$client->sleep(5);
client.sleep(5)
$client->execute("xterm &");
$client->sleep(1);
$client->sendChars("xfreerdp /cert-tofu /w:640 /h:480 /v:127.0.0.1 /u:alice /p:foobar\n");
$client->sleep(5);
$client->screenshot("localrdp");
client.execute("xterm &")
client.sleep(1)
client.send_chars("xfreerdp /cert-tofu /w:640 /h:480 /v:127.0.0.1 /u:${user.name} /p:${user.password}\n")
client.sleep(5)
client.screenshot("localrdp")
$client->execute("xterm &");
$client->sleep(1);
$client->sendChars("xfreerdp /cert-tofu /w:640 /h:480 /v:server /u:alice /p:foobar\n");
$client->sleep(5);
$client->screenshot("remoterdp");
client.execute("xterm &")
client.sleep(1)
client.send_chars("xfreerdp /cert-tofu /w:640 /h:480 /v:server /u:${user.name} /p:${user.password}\n")
client.sleep(5)
client.screenshot("remoterdp")
'';
})

View File

@ -19,7 +19,7 @@
python3.pkgs.buildPythonApplication rec {
pname = "lollypop";
version = "1.2.5";
version = "1.2.16";
format = "other";
doCheck = false;
@ -28,7 +28,7 @@ python3.pkgs.buildPythonApplication rec {
url = "https://gitlab.gnome.org/World/lollypop";
rev = "refs/tags/${version}";
fetchSubmodules = true;
sha256 = "148p3ab7nnfz13hgjkx1cf2ahq9mgl72csrl35xy6d0nkfqbfr8r";
sha256 = "0rl4a5npjh5sm3kih11cs2j7ik894nlygllbw4j5pn9n9v66x51w";
};
nativeBuildInputs = [
@ -84,10 +84,10 @@ python3.pkgs.buildPythonApplication rec {
];
meta = with lib; {
changelog = "https://gitlab.gnome.org/World/lollypop/tags/${version}";
description = "A modern music player for GNOME";
homepage = https://wiki.gnome.org/Apps/Lollypop;
license = licenses.gpl3Plus;
changelog = "https://gitlab.gnome.org/World/lollypop/tags/${version}";
maintainers = with maintainers; [ worldofpeace ];
platforms = platforms.linux;
};

View File

@ -4,11 +4,11 @@
}:
stdenv.mkDerivation rec {
name = "snd-19.8";
name = "snd-19.9";
src = fetchurl {
url = "mirror://sourceforge/snd/${name}.tar.gz";
sha256 = "0cdf3940cjvf5kls5l1zjll9wgg152xzlxs0jmpsq1kml12qa67b";
sha256 = "13s8fahpsjygjdrcwmprcrz23ny3klaj2rh2xzdv3bfs69gxvhys";
};
nativeBuildInputs = [ pkgconfig ];

View File

@ -20,11 +20,11 @@ let
in stdenv.mkDerivation rec {
pname = "nano";
version = "4.5";
version = "4.6";
src = fetchurl {
url = "mirror://gnu/nano/${pname}-${version}.tar.xz";
sha256 = "0czmz1yq8s5qcxcmfjdxzg9nkhbmlc9q1nz04jvf57fdbs7w7mfy";
sha256 = "1s98jsvkfar6qmd5n5l1n1k59623dnc93ciyvlhxjkvpad0kmb4v";
};
nativeBuildInputs = [ texinfo ] ++ optional enableNls gettext;

View File

@ -38,7 +38,7 @@ perlPackages.buildPerlPackage rec {
ListMoreUtils
HTMLParser
ProcProcessTable
Log4Perl
LogLog4perl
TryTiny
DataUUID
DateCalc

View File

@ -25,6 +25,16 @@ stdenv.mkDerivation rec {
url = "https://gitlab.com/inkscape/inkscape/commit/e831b034746f8dc3c3c1b88372751f6dcb974831.diff";
sha256 = "096rdyi6ppjq1h9jwwsm9hb99nggfrfinik8rm23jkn4h2zl01zf";
})
(fetchpatch {
name = "inkscape-poppler_0_82_compat.patch";
url = "https://gitlab.com/inkscape/inkscape/commit/835b6bb62be565efab986d5a3f30a672ad56c7eb.patch";
sha256 = "02c6sxi2w52b885vr3pgani6kvxp9gdqqk2jgiykkdzv70hhrnm7";
})
(fetchpatch {
name = "inkscape-poppler_0_83_compat.patch";
url = "https://gitlab.com/inkscape/inkscape/commit/b5360a807b12d4e8318475ffd0464b84882788b5.patch";
sha256 = "1p44rr2q2i3zkd1y1j7xgdcbgx8yvlq6hq92im8s0bkjby6p5cpz";
})
];
# Inkscape hits the ARGMAX when linking on macOS. It appears to be

View File

@ -1,6 +1,6 @@
{ stdenv, fetchFromGitHub, fetchpatch, ftgl, glew, asciidoc
, cmake, ninja, libGLU, libGL, zlib, python, expat, libxml2, libsigcxx, libuuid, freetype
, libpng, boost, doxygen, cairomm, pkgconfig, imagemagick, libjpeg, libtiff
, libpng, boost, doxygen, cairomm, pkgconfig, libjpeg, libtiff
, gettext, intltool, perl, gtkmm2, glibmm, gtkglext, pangox_compat, libXmu }:
stdenv.mkDerivation rec {
@ -33,7 +33,7 @@ stdenv.mkDerivation rec {
buildInputs = [
libGLU libGL zlib python expat libxml2 libsigcxx libuuid freetype libpng
boost cairomm imagemagick libjpeg libtiff
boost cairomm libjpeg libtiff
ftgl glew gtkmm2 glibmm gtkglext pangox_compat libXmu
];

View File

@ -27,6 +27,7 @@ with python3.pkgs; buildPythonApplication rec {
requests
urllib3
flask
flask-admin
flask-api
flask-bootstrap
flask-paginate

View File

@ -7,7 +7,7 @@
stdenv.mkDerivation rec {
pname = "dbeaver-ce";
version = "6.2.5";
version = "6.3.0";
desktopItem = makeDesktopItem {
name = "dbeaver";
@ -30,7 +30,7 @@ stdenv.mkDerivation rec {
src = fetchurl {
url = "https://dbeaver.io/files/${version}/dbeaver-ce-${version}-linux.gtk.x86_64.tar.gz";
sha256 = "1bg5cq7ivf263mjr8g9qwdhp9x0gm04nqiya4fyw0k33yiab85zn";
sha256 = "07j2r2kfjhfv8zzzzp5qj3ppx4vv7llpx4lwip6bnjfkh80ny22a";
};
installPhase = ''

View File

@ -1,4 +1,4 @@
{ stdenv, pkgs, makeWrapper
{ stdenv, pkgs, makeWrapper, pango
, glib, gnome2, gnome3, gtk2-x11, gtkspell2, poppler
, pkgconfig, intltool, autoreconfHook, wrapGAppsHook
}:
@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
pkgconfig intltool autoreconfHook makeWrapper wrapGAppsHook
];
buildInputs = [
glib gnome2.gtksourceview gnome2.pango gtk2-x11 gtkspell2 poppler
glib gnome2.gtksourceview pango gtk2-x11 gtkspell2 poppler
gnome3.adwaita-icon-theme
];

View File

@ -1,5 +1,5 @@
{ stdenv, lib, fetchFromGitHub, makeWrapper, cmake, pkgconfig
, boost, cereal, curl, eigen, expat, glew, libpng, tbb, wxGTK30
, boost, cereal, curl, eigen, expat, glew, libpng, tbb, wxGTK31
, gtest, nlopt, xorg, makeDesktopItem
}:
let
@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
glew
libpng
tbb
wxGTK30
wxGTK31
xorg.libX11
] ++ checkInputs;
@ -65,7 +65,6 @@ stdenv.mkDerivation rec {
cmakeFlags = [
"-DSLIC3R_FHS=1"
"-DSLIC3R_WX_STABLE=1" # necessary when compiling against wxGTK 3.0
];
postInstall = ''

View File

@ -1,8 +1,12 @@
{ GConf
, alsaLib
, at-spi2-atk
, at-spi2-core
, atk
, buildFHSUserEnv
, cairo
, common-updater-scripts
, coreutils
, cups
, dbus
, expat
@ -29,15 +33,19 @@
, libnotify
, libpciaccess
, libpng12
, libuuid
, libxcb
, nspr
, nss
, pango
, pciutils
, pulseaudio
, runtimeShell
, stdenv
, udev
, wrapGAppsHook
, writeScript
, file
}:
let
@ -45,6 +53,7 @@ let
GConf
alsaLib
at-spi2-atk
at-spi2-core
atk
cairo
cups
@ -71,6 +80,7 @@ let
libnotify
libpciaccess
libpng12
libuuid
libxcb
nspr
nss
@ -82,58 +92,96 @@ let
];
libPath = lib.makeLibraryPath libs;
stretchly =
stdenv.mkDerivation rec {
pname = "stretchly";
version = "0.21.0";
src = fetchurl {
url = "https://github.com/hovancik/stretchly/releases/download/v${version}/stretchly-${version}.tar.xz";
sha256 = "1gyyr22xq8s4miiacs8wqhp7lxnwvkvlwhngnq8671l62s6iyjzl";
};
nativeBuildInputs = [
wrapGAppsHook
coreutils
];
buildInputs = libs;
dontPatchELF = true;
dontBuild = true;
dontConfigure = true;
installPhase = ''
mkdir -p $out/bin $out/lib/stretchly
cp -r ./* $out/lib/stretchly/
ln -s $out/lib/stretchly/stretchly $out/bin/
'';
preFixup = ''
patchelf --set-rpath "${libPath}" $out/lib/stretchly/libffmpeg.so
patchelf --set-rpath "${libPath}" $out/lib/stretchly/libEGL.so
patchelf --set-rpath "${libPath}" $out/lib/stretchly/libGLESv2.so
patchelf --set-rpath "${libPath}" $out/lib/stretchly/swiftshader/libEGL.so
patchelf --set-rpath "${libPath}" $out/lib/stretchly/swiftshader/libGLESv2.so
patchelf \
--set-rpath "$out/lib/stretchly:${libPath}" \
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
$out/lib/stretchly/stretchly
patchelf \
--set-rpath "$out/lib/stretchly:${libPath}" \
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
$out/lib/stretchly/chrome-sandbox
'';
meta = with stdenv.lib; {
description = "A break time reminder app";
longDescription = ''
stretchly is a cross-platform electron app that reminds you to take
breaks when working on your computer. By default, it runs in your tray
and displays a reminder window containing an idea for a microbreak for 20
seconds every 10 minutes. Every 30 minutes, it displays a window
containing an idea for a longer 5 minute break.
'';
homepage = https://hovancik.net/stretchly;
downloadPage = https://hovancik.net/stretchly/downloads/;
license = licenses.bsd2;
maintainers = with maintainers; [ cdepillabout ];
platforms = platforms.linux;
};
};
in
stdenv.mkDerivation rec {
pname = "stretchly";
version = "0.19.1";
buildFHSUserEnv {
inherit (stretchly) meta;
src = fetchurl {
url = "https://github.com/hovancik/stretchly/releases/download/v${version}/stretchly-${version}.tar.xz";
sha256 = "1q2wxfqs8qv9b1rfh5lhmyp3rrgdl05m6ihsgkxlgp0yzi07afz8";
};
name = "stretchly";
nativeBuildInputs = [
wrapGAppsHook
targetPkgs = pkgs: [
stretchly
];
buildInputs = libs;
runScript = "stretchly";
dontPatchELF = true;
dontBuild = true;
dontConfigure = true;
passthru = {
updateScript = writeScript "update-stretchly" ''
#!${runtimeShell}
installPhase = ''
mkdir -p $out/bin $out/lib/stretchly
cp -r ./* $out/lib/stretchly/
ln -s $out/lib/stretchly/libffmpeg.so $out/lib/
ln -s $out/lib/stretchly/libnode.so $out/lib/
ln -s $out/lib/stretchly/stretchly $out/bin/
'';
set -eu -o pipefail
preFixup = ''
patchelf --set-rpath "${libPath}" $out/lib/stretchly/libffmpeg.so
patchelf --set-rpath "${libPath}" $out/lib/stretchly/libnode.so
# get the latest release version
latest_version=$(curl -s https://api.github.com/repos/hovancik/stretchly/releases/latest | jq --raw-output .tag_name | sed -e 's/^v//')
patchelf \
--set-rpath "$out/lib/stretchly:${libPath}" \
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
$out/lib/stretchly/stretchly
'';
echo "updating to $latest_version..."
meta = with stdenv.lib; {
description = "A break time reminder app";
longDescription = ''
stretchly is a cross-platform electron app that reminds you to take
breaks when working on your computer. By default, it runs in your tray
and displays a reminder window containing an idea for a microbreak for 20
seconds every 10 minutes. Every 30 minutes, it displays a window
containing an idea for a longer 5 minute break.
${common-updater-scripts}/bin/update-source-version stretchly.passthru.stretchlyWrapped "$latest_version"
'';
homepage = https://hovancik.net/stretchly;
downloadPage = https://hovancik.net/stretchly/downloads/;
license = licenses.bsd2;
maintainers = with maintainers; [ cdepillabout ];
platforms = platforms.linux;
stretchlyWrapped = stretchly;
};
}

View File

@ -65,4 +65,9 @@ in rec {
version = "1.14.1";
sha256 = "0ikd8qwrjh8s1sc95g18sm0q6p33swz2m1rjd8zw34mb2w9jv76n";
};
kops_1_15 = mkKops {
version = "1.15.0";
sha256 = "0sjas8pn0njl767b1y15g7cci2q3kxkxwmgr0wvs7vi3n1s1sf9d";
};
}

View File

@ -112,8 +112,8 @@ in rec {
terraform_0_11-full = terraform_0_11.full;
terraform_0_12 = pluggable (generic {
version = "0.12.16";
sha256 = "10r9vra4d3lyms9cvl0g1ij6ldcfi3vjrqsmd52isrmlmjdzm8nk";
version = "0.12.17";
sha256 = "1pmvjbmzws5qjzz34dw0fcb6p36vafqs0h8i87g7lmhckb9bqihv";
patches = [ ./provider-path.patch ];
passthru = { inherit plugins; };
});

View File

@ -2,12 +2,12 @@
let
pname = "ssb-patchwork";
version = "3.16.2";
name = "${pname}-${version}";
version = "3.17.1";
name = "Patchwork-${version}";
src = fetchurl {
url = "https://github.com/ssbc/patchwork/releases/download/v${version}/${pname}-${version}-x86_64.AppImage";
sha256 = "0hi9ysmwhiiww82a3mqdd2b1anj7qa41b46f6zb3q9d0b8nmvlz4";
url = "https://github.com/ssbc/patchwork/releases/download/v${version}/${name}.AppImage";
sha256 = "06wcgdcagmh80nr8nyrnz83wgq7j8r96hn3ccka7nmn02pdgvp3k";
};
binary = appimageTools.wrapType2 {

View File

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, pantheon, vala, python3, python2, pkgconfig, libxml2, meson, ninja, gtk3, gnome3, glib, webkitgtk
{ stdenv, fetchFromGitHub, pantheon, vala, python3, python2, pkgconfig, libxml2, meson, ninja, gtk3, gnome3, glib, webkitgtk, libgee
, gobject-introspection, sqlite, poppler, poppler_utils, html2text, curl, gnugrep, coreutils, bash, unzip, unar, wrapGAppsHook }:
stdenv.mkDerivation rec {
@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
pantheon.elementary-icon-theme
pantheon.granite
glib
gnome3.libgee
libgee
gtk3
html2text
poppler

View File

@ -1,23 +1,22 @@
{ stdenv, fetchurl
, libX11, glib, xorg, fontconfig, freetype
, zlib, libpng12, libICE, libXrender, cups }:
, zlib, libpng12, libICE, libXrender, cups
, alsaLib, atk, cairo, dbus, expat
, gdk-pixbuf, gtk2-x11, lzma, pango, zotero
, sqlite, libuuid, qt5, dpkg }:
let
bits = if stdenv.hostPlatform.system == "x86_64-linux" then "x86_64"
else "x86";
version = "10.1.0.5672";
in stdenv.mkDerivation rec{
stdenv.mkDerivation rec{
pname = "wpsoffice";
inherit version;
version = "11.1.0.8865";
src = fetchurl {
name = "${pname}-${version}.tar.xz";
url = "http://kdl.cc.ksosoft.com/wps-community/download/a21/wps-office_${version}~a21_${bits}.tar.xz";
sha256 = if bits == "x86_64" then
"0mi3n9kplf82gd0g2m0np957agy53p4g1qh81pbban49r4n0ajcz" else
"1dk400ap5qwdhjvn8lnk602f5akayr391fkljxdkrpn5xac01m97";
url = "https://wdl1.cache.wps.cn/wps/download/ep/Linux2019/8865/wps-office_11.1.0.8865_amd64.deb";
sha256 = "0pxx3j02cm8d08iakg30azjvl3a50y4avyrf08ddgaavqnvkypfj";
};
unpackCmd = "dpkg -x $src .";
sourceRoot = ".";
nativeBuildInputs = [ qt5.wrapQtAppsHook dpkg ];
meta = {
description = "Office program originally named Kingsoft Office";
@ -25,20 +24,44 @@ in stdenv.mkDerivation rec{
platforms = [ "i686-linux" "x86_64-linux" ];
hydraPlatforms = [];
license = stdenv.lib.licenses.unfreeRedistributable;
maintainers = [ stdenv.lib.maintainers.mlatus ];
};
libPath = stdenv.lib.makeLibraryPath [
libPath = with xorg; stdenv.lib.makeLibraryPath [
libX11
libpng12
glib
xorg.libSM
xorg.libXext
libSM
libXext
fontconfig
zlib
freetype
libICE
cups
libXrender
libxcb
alsaLib
atk
cairo
dbus.daemon.lib
expat
fontconfig.lib
gdk-pixbuf
gtk2-x11
lzma
pango
zotero
sqlite
libuuid
libXcomposite
libXcursor
libXdamage
libXfixes
libXi
libXrandr
libXScrnSaver
libXtst
];
dontPatchELF = true;
@ -49,32 +72,27 @@ in stdenv.mkDerivation rec{
installPhase = ''
prefix=$out/opt/kingsoft/wps-office
mkdir -p $prefix
cp -r . $prefix
mkdir -p $out
cp -r opt $out
cp -r usr/* $out
# Avoid forbidden reference error due use of patchelf
rm -r $PWD
rm -r *
mkdir $out/bin
for i in wps wpp et; do
for i in wps wpp et wpspdf; do
patchelf \
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--force-rpath --set-rpath "$prefix/office6:$libPath" \
--force-rpath --set-rpath "$(patchelf --print-rpath $prefix/office6/$i):${stdenv.cc.cc.lib}/lib64:${libPath}" \
$prefix/office6/$i
substitute $prefix/$i $out/bin/$i \
substituteInPlace $out/bin/$i \
--replace /opt/kingsoft/wps-office $prefix
chmod +x $out/bin/$i
substituteInPlace $prefix/resource/applications/wps-office-$i.desktop \
--replace /usr/bin $out/bin
done
# China fonts
mkdir -p $prefix/resource/fonts/wps-office $out/etc/fonts/conf.d
ln -s $prefix/fonts/* $prefix/resource/fonts/wps-office
ln -s $prefix/fontconfig/*.conf $out/etc/fonts/conf.d
ln -s $prefix/resource $out/share
for i in $out/share/applications/*;do
substituteInPlace $i \
--replace /usr/bin $out/bin \
--replace /opt/kingsoft/wps-office $prefix
done
'';
}

View File

@ -1,21 +1,31 @@
{ stdenv, fetchFromGitHub, pkgconfig, libusb, rtl-sdr }:
{ stdenv
, fetchFromGitHub
, pkgconfig
, libbladeRF
, libusb
, ncurses
, rtl-sdr
}:
stdenv.mkDerivation rec {
pname = "dump1090";
version = "2014-10-31";
version = "3.7.2";
src = fetchFromGitHub {
owner = "MalcolmRobb";
owner = "flightaware";
repo = pname;
rev = "bff92c4ad772a0a8d433f788d39dae97e00e4dbe";
sha256 = "06aaj9gpz5v4qzvnp8xf18wdfclp0jvn3hflls79ly46gz2dh9hy";
rev = "v${version}";
sha256 = "0vlv9bd805kid202xxkrnl51rh02cyrl055gbcqlqgk51j5rrq8w";
};
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ libusb rtl-sdr ];
makeFlags = [ "PREFIX=$(out)" ];
buildInputs = [
libbladeRF
libusb
ncurses
rtl-sdr
];
installPhase = ''
mkdir -p $out/bin $out/share
@ -25,8 +35,8 @@ stdenv.mkDerivation rec {
meta = with stdenv.lib; {
description = "A simple Mode S decoder for RTLSDR devices";
homepage = https://github.com/MalcolmRobb/dump1090;
license = licenses.bsd3;
homepage = "https://github.com/flightaware/dump1090";
license = licenses.gpl2Plus;
platforms = platforms.linux;
maintainers = with maintainers; [ earldouglas ];
};

View File

@ -31,6 +31,7 @@ let
"8.9.1" = "1xrq6mkhpq994bncmnijf8jwmwn961kkpl4mwwlv7j3dgnysrcv2";
"8.10.0" = "138jw94wp4mg5dgjc2asn8ng09ayz1mxdznq342n0m469j803gzg";
"8.10.1" = "072v2zkjzf7gj48137wpr3c9j0hg9pdhlr5l8jrgrwynld8fp7i4";
"8.10.2" = "0znxmpy71bfw0p6x47i82jf5k7v41zbz9bdpn901ysn3ir8l3wrz";
}.${version};
coq-version = stdenv.lib.versions.majorMinor version;
versionAtLeast = stdenv.lib.versionAtLeast coq-version;

View File

@ -1,6 +1,6 @@
{ stdenv, fetchFromGitHub, git, gnupg }:
let version = "1.12.0"; in
let version = "2.0.1"; in
stdenv.mkDerivation {
pname = "yadm";
inherit version;
@ -11,7 +11,7 @@ stdenv.mkDerivation {
owner = "TheLocehiliosan";
repo = "yadm";
rev = version;
sha256 = "0873jgks7dpfkj5km1jchxdrhf7lia70p0f8zsrh9p4crj5f4pc6";
sha256 = "0knz2p0xyid65z6gdmjqfcqljqilxhqi02v4n6n4akl2i12kk193";
};
dontConfigure = true;

View File

@ -2,7 +2,7 @@
buildGoPackage rec {
pname = "distribution";
version = "2.6.2";
version = "2.7.1";
rev = "v${version}";
goPackagePath = "github.com/docker/distribution";
@ -11,7 +11,7 @@ buildGoPackage rec {
owner = "docker";
repo = "distribution";
inherit rev;
sha256 = "0nj4xd72mik4pj8g065cqb0yjmgpj5ppsqf2k5ibz9f68c39c00b";
sha256 = "1nx8b5a68rn81alp8wkkw6qd5v32mgf0fk23mxm60zdf63qk1nzw";
};
meta = with stdenv.lib; {

View File

@ -1,16 +1,16 @@
{ fetchFromGitHub, fetchpatch, stdenv, autoreconfHook }:
{ fetchFromGitHub, fetchpatch, stdenv, autoreconfHook, pkg-config }:
with stdenv.lib;
stdenv.mkDerivation {
pname = "i3blocks";
version = "unstable-2019-02-07";
version = "1.5";
src = fetchFromGitHub {
owner = "vivien";
repo = "i3blocks";
rev = "ec050e79ad8489a6f8deb37d4c20ab10729c25c3";
sha256 = "1fx4230lmqa5rpzph68dwnpcjfaaqv5gfkradcr85hd1z8d1qp1b";
rev = "3417602a2d8322bc866861297f535e1ef80b8cb0";
sha256 = "0v8mwnm8qzpv6xnqvrk43s4b9iyld4naqzbaxk4ldq1qkhai0wsv";
};
patches = [
@ -22,7 +22,7 @@ stdenv.mkDerivation {
})
];
nativeBuildInputs = [ autoreconfHook ];
nativeBuildInputs = [ autoreconfHook pkg-config ];
meta = {
description = "A flexible scheduler for your i3bar blocks";

View File

@ -18,7 +18,7 @@
stdenv.mkDerivation rec {
pname = "elementary-calculator";
version = "1.5.3";
version = "1.5.4";
repoName = "calculator";
@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
owner = "elementary";
repo = repoName;
rev = version;
sha256 = "0ibnj3zm93p8ghiy8gbbm0vlig9mnqjsvvp1cpw62dnap0qixdcg";
sha256 = "0053bdzn5viqlni6qg6q39nma6bsddmhnafa0mzggiv8l4qasbrx";
};
passthru = {

View File

@ -25,22 +25,21 @@
stdenv.mkDerivation rec {
pname = "elementary-calendar";
version = "unstable-2019-10-29";
version = "5.0.3";
repoName = "calendar";
src = fetchFromGitHub {
owner = "elementary";
repo = repoName;
rev = "7d201fc5ea9e8dc25c46427397594fcab2016ed6"; # needed for libical 2.0 compat
sha256 = "11bqf3nxrj1sfd0qq5h0jsmimc6mwkd2g7q9ycizn9x5ak2gb8xi";
rev = version;
sha256 = "1dqcmh585fjib4m8bs7qy23fv429s7q9nbcqnn0vvmy1n36fic4m";
};
passthru = {
updateScript = pantheon.updateScript {
inherit repoName;
attrPath = pname;
versionPolicy = "master";
};
};

View File

@ -19,7 +19,7 @@
stdenv.mkDerivation rec {
pname = "elementary-videos";
version = "2.6.3";
version = "2.7.0";
repoName = "videos";
@ -27,7 +27,7 @@ stdenv.mkDerivation rec {
owner = "elementary";
repo = repoName;
rev = version;
sha256 = "1ncm8kh6dcy83p8pmpilnk03b4dx3b1jm8w13izq2dkglfgdwvqx";
sha256 = "1b6dqqmxa83fwlh9r0v918ikxd3mnwk0j5xssw1wk5l7q72s43w7";
};
passthru = {

View File

@ -15,24 +15,15 @@
stdenv.mkDerivation rec {
pname = "switchboard-plug-mouse-touchpad";
version = "2.3.0";
version = "2.3.1";
src = fetchFromGitHub {
owner = "elementary";
repo = pname;
rev = version;
sha256 = "1cg69nbdf4mcr16mi71aw9j8877lyj8yxjfk9bd3sml8f4fh7mmr";
sha256 = "1974zdr5w3xd882gi95fp7axgilfni1sclsr750qm32yhl7d9bfn";
};
patches = [
./hardcode-settings-daemon-gsettings.patch
];
postPatch = ''
substituteInPlace src/Views/Clicking.vala \
--subst-var-by GSD_GSETTINGS ${glib.getSchemaPath elementary-settings-daemon}
'';
passthru = {
updateScript = pantheon.updateScript {
repoName = pname;
@ -51,6 +42,7 @@ stdenv.mkDerivation rec {
granite
gtk3
libgee
elementary-settings-daemon
switchboard
];

View File

@ -1,76 +0,0 @@
diff --git a/src/Views/Clicking.vala b/src/Views/Clicking.vala
index cc4431b..d12ddfe 100644
--- a/src/Views/Clicking.vala
+++ b/src/Views/Clicking.vala
@@ -123,42 +123,39 @@ public class MouseTouchpad.ClickingView : Granite.SimpleSettingsPage {
content_area.attach (hold_scale, 3, 3);
content_area. attach (hold_help, 1, 4, 3);
- var xsettings_schema = SettingsSchemaSource.get_default ().lookup (
- "org.gnome.settings-daemon.plugins.xsettings",
- true
- );
-
- if (xsettings_schema != null) {
- var primary_paste_switch = new Gtk.Switch ();
- primary_paste_switch.halign = Gtk.Align.START;
+ SettingsSchemaSource daemon_schema_source = new SettingsSchemaSource.from_directory ("@GSD_GSETTINGS@", null, true);
+ SettingsSchema xsettings_schema = daemon_schema_source.lookup ("org.gnome.settings-daemon.plugins.xsettings", false);
- var primary_paste_help = new Gtk.Label (
- _("Middle or three-finger clicking on an input will paste any selected text")
- );
- primary_paste_help.margin_bottom = 18;
- primary_paste_help.wrap = true;
- primary_paste_help.xalign = 0;
- primary_paste_help.get_style_context ().add_class (Gtk.STYLE_CLASS_DIM_LABEL);
-
- content_area.attach (new SettingLabel (_("Middle click paste:")), 0, 5);
- content_area.attach (primary_paste_switch, 1, 5);
- content_area.attach (primary_paste_help, 1, 6, 3);
-
- var xsettings = new GLib.Settings ("org.gnome.settings-daemon.plugins.xsettings");
- primary_paste_switch.notify["active"].connect (() => {
- on_primary_paste_switch_changed (primary_paste_switch, xsettings);
- });
+ var primary_paste_switch = new Gtk.Switch ();
+ primary_paste_switch.halign = Gtk.Align.START;
- var current_value = xsettings.get_value ("overrides").lookup_value (
- "Gtk/EnablePrimaryPaste",
- VariantType.INT32
- );
- if (current_value != null) {
- primary_paste_switch.active = current_value.get_int32 () == 1;
- }
+ var primary_paste_help = new Gtk.Label (
+ _("Middle or three-finger clicking on an input will paste any selected text")
+ );
+ primary_paste_help.margin_bottom = 18;
+ primary_paste_help.wrap = true;
+ primary_paste_help.xalign = 0;
+ primary_paste_help.get_style_context ().add_class (Gtk.STYLE_CLASS_DIM_LABEL);
+
+ content_area.attach (new SettingLabel (_("Middle click paste:")), 0, 5);
+ content_area.attach (primary_paste_switch, 1, 5);
+ content_area.attach (primary_paste_help, 1, 6, 3);
+
+ var xsettings = new GLib.Settings.full (xsettings_schema, null, null);
+ primary_paste_switch.notify["active"].connect (() => {
+ on_primary_paste_switch_changed (primary_paste_switch, xsettings);
+ });
+
+ var current_value = xsettings.get_value ("overrides").lookup_value (
+ "Gtk/EnablePrimaryPaste",
+ VariantType.INT32
+ );
+ if (current_value != null) {
+ primary_paste_switch.active = current_value.get_int32 () == 1;
}
- var daemon_settings = new GLib.Settings ("org.gnome.settings-daemon.peripherals.mouse");
+ SettingsSchema daemon_schema = daemon_schema_source.lookup ("org.gnome.settings-daemon.peripherals.mouse", false);
+ var daemon_settings = new GLib.Settings.full (daemon_schema, null, null);
daemon_settings.bind ("double-click", double_click_speed_adjustment, "value", SettingsBindFlags.DEFAULT);
var a11y_mouse_settings = new GLib.Settings ("org.gnome.desktop.a11y.mouse");

View File

@ -36,24 +36,16 @@ stdenv.mkDerivation rec {
granite
gtk3
libgee
gala
wingpanel
plank
switchboard
];
patches = [
./backgrounds.patch # Having https://github.com/elementary/switchboard-plug-pantheon-shell/issues/166 would make this patch uneeded
./hardcode-gsettings.patch
];
postPatch = ''
substituteInPlace src/Views/Appearance.vala \
--subst-var-by GALA_GSETTINGS_PATH ${glib.getSchemaPath gala}
substituteInPlace src/Views/HotCorners.vala \
--subst-var-by GALA_GSETTINGS_PATH ${glib.getSchemaPath gala}
substituteInPlace src/Views/Appearance.vala \
--subst-var-by WINGPANEL_GSETTINGS_PATH ${glib.getSchemaPath wingpanel}
'';
meta = with stdenv.lib; {
description = "Switchboard Desktop Plug";
homepage = https://github.com/elementary/switchboard-plug-pantheon-shell;

View File

@ -1,39 +0,0 @@
diff --git a/src/Views/Appearance.vala b/src/Views/Appearance.vala
index c8300cc..fc48a0e 100644
--- a/src/Views/Appearance.vala
+++ b/src/Views/Appearance.vala
@@ -66,10 +66,16 @@ public class Appearance : Gtk.Grid {
attach (text_size_label, 0, 2);
attach (text_size_modebutton, 1, 2);
- var animations_settings = new Settings (ANIMATIONS_SCHEMA);
+ SettingsSchemaSource gala_schema_source = new SettingsSchemaSource.from_directory ("@GALA_GSETTINGS_PATH@", SettingsSchemaSource.get_default (), true);
+ SettingsSchema animations_schema = gala_schema_source.lookup (ANIMATIONS_SCHEMA, false);
+
+ var animations_settings = new Settings.full (animations_schema, null, null);
animations_settings.bind (ANIMATIONS_KEY, animations_switch, "active", SettingsBindFlags.DEFAULT);
- var panel_settings = new Settings (PANEL_SCHEMA);
+ SettingsSchemaSource panel_schema_source = new SettingsSchemaSource.from_directory ("@WINGPANEL_GSETTINGS_PATH@", SettingsSchemaSource.get_default (), true);
+ SettingsSchema panel_schema = panel_schema_source.lookup (PANEL_SCHEMA, false);
+
+ var panel_settings = new GLib.Settings.full (panel_schema, null, null);
panel_settings.bind (TRANSLUCENCY_KEY, translucency_switch, "active", SettingsBindFlags.DEFAULT);
var interface_settings = new Settings (INTERFACE_SCHEMA);
diff --git a/src/Views/HotCorners.vala b/src/Views/HotCorners.vala
index 481e7c5..d102d03 100644
--- a/src/Views/HotCorners.vala
+++ b/src/Views/HotCorners.vala
@@ -30,7 +30,10 @@ public class HotCorners : Gtk.Grid {
row_spacing = 24;
halign = Gtk.Align.CENTER;
- behavior_settings = new GLib.Settings ("org.pantheon.desktop.gala.behavior");
+
+ SettingsSchemaSource gala_schema_source = new SettingsSchemaSource.from_directory ("@GALA_GSETTINGS_PATH@", SettingsSchemaSource.get_default (), true);
+ SettingsSchema behavior_schema = gala_schema_source.lookup ("org.pantheon.desktop.gala.behavior", false);
+ behavior_settings = new GLib.Settings.full (behavior_schema, null, null);
custom_command_revealer = new Gtk.Revealer ();

View File

@ -43,6 +43,8 @@ stdenv.mkDerivation rec {
buildInputs = [
dbus
elementary-dpms-helper
elementary-settings-daemon
glib
granite
gtk3
@ -56,21 +58,8 @@ stdenv.mkDerivation rec {
src = ./dpms-helper-exec.patch;
elementary_dpms_helper = elementary-dpms-helper;
})
./hardcode-gsettings.patch
];
postPatch = ''
substituteInPlace src/MainView.vala \
--subst-var-by DPMS_HELPER_GSETTINGS_PATH ${glib.getSchemaPath elementary-dpms-helper}
substituteInPlace src/MainView.vala \
--subst-var-by GSD_GSETTINGS_PATH ${glib.getSchemaPath elementary-settings-daemon}
'';
PKG_CONFIG_SWITCHBOARD_2_0_PLUGSDIR = "${placeholder "out"}/lib/switchboard";
PKG_CONFIG_DBUS_1_SYSTEM_BUS_SERVICES_DIR = "${placeholder "out"}/share/dbus-1/system-services";
PKG_CONFIG_DBUS_1_SYSCONFDIR = "${placeholder "out"}/etc";
PKG_CONFIG_POLKIT_GOBJECT_1_POLICYDIR = "${placeholder "out"}/share/polkit-1/actions";
meta = with stdenv.lib; {
description = "Switchboard Power Plug";
homepage = https://github.com/elementary/switchboard-plug-power;

View File

@ -1,20 +0,0 @@
diff --git a/src/MainView.vala b/src/MainView.vala
index 1654e68..ad8fed9 100644
--- a/src/MainView.vala
+++ b/src/MainView.vala
@@ -46,8 +46,13 @@ public class Power.MainView : Gtk.Grid {
var label_size = new Gtk.SizeGroup (Gtk.SizeGroupMode.HORIZONTAL);
- settings = new GLib.Settings ("org.gnome.settings-daemon.plugins.power");
- elementary_dpms_settings = new GLib.Settings ("io.elementary.dpms");
+ SettingsSchemaSource gsd_sss = new SettingsSchemaSource.from_directory ("@GSD_GSETTINGS_PATH@", null, true);
+ SettingsSchema gsd_schema = gsd_sss.lookup ("org.gnome.settings-daemon.plugins.power", false);
+ settings = new GLib.Settings.full (gsd_schema, null, null);
+
+ SettingsSchemaSource dpms_sss = new SettingsSchemaSource.from_directory ("@DPMS_HELPER_GSETTINGS_PATH@", null, true);
+ SettingsSchema elementary_dpms_schema = dpms_sss.lookup ("io.elementary.dpms", false);
+ elementary_dpms_settings = new GLib.Settings.full (elementary_dpms_schema, null, null);
battery = new Battery ();
power_supply = new PowerSupply ();

View File

@ -48,21 +48,13 @@ stdenv.mkDerivation rec {
libgee
polkit
switchboard
lightlocker
zeitgeist
];
patches = [
./hardcode-gsettings.patch
];
postPatch = ''
chmod +x meson/post_install.py
patchShebangs meson/post_install.py
substituteInPlace src/Views/LockPanel.vala \
--subst-var-by LIGHTLOCKER_GSETTINGS_PATH ${glib.getSchemaPath lightlocker}
substituteInPlace src/Views/FirewallPanel.vala \
--subst-var-by SWITCHBOARD_SEC_PRIV_GSETTINGS_PATH ${glib.makeSchemaPath "$out" "${pname}-${version}"}
'';
meta = with stdenv.lib; {

View File

@ -1,33 +0,0 @@
diff --git a/src/Views/FirewallPanel.vala b/src/Views/FirewallPanel.vala
index 0335c29..481b1c8 100644
--- a/src/Views/FirewallPanel.vala
+++ b/src/Views/FirewallPanel.vala
@@ -49,7 +49,11 @@ public class SecurityPrivacy.FirewallPanel : Granite.SimpleSettingsPage {
}
construct {
- settings = new Settings ("io.elementary.switchboard.security-privacy");
+ SettingsSchemaSource sss = new SettingsSchemaSource.from_directory ("@SWITCHBOARD_SEC_PRIV_GSETTINGS_PATH@", SettingsSchemaSource.get_default (), true);
+ SettingsSchema security_privacy_schema = sss.lookup ("io.elementary.switchboard.security-privacy", false);
+
+ settings = new Settings.full (security_privacy_schema, null, null);
+
disabled_rules = new Gee.HashMap<string, UFWHelpers.Rule> ();
load_disabled_rules ();
diff --git a/src/Views/LockPanel.vala b/src/Views/LockPanel.vala
index 4f523f9..7135a83 100644
--- a/src/Views/LockPanel.vala
+++ b/src/Views/LockPanel.vala
@@ -30,7 +30,10 @@ public class SecurityPrivacy.LockPanel : Granite.SimpleSettingsPage {
}
construct {
- locker = new Settings ("apps.light-locker");
+ SettingsSchemaSource sss = new SettingsSchemaSource.from_directory ("@LIGHTLOCKER_GSETTINGS_PATH@", SettingsSchemaSource.get_default (), true);
+ SettingsSchema locker_schema = sss.lookup ("apps.light-locker", false);
+
+ locker = new Settings.full (locker_schema, null, null);
var lock_suspend_label = new Gtk.Label (_("Lock on suspend:"));
var lock_suspend_switch = new Gtk.Switch ();

View File

@ -1,4 +1,6 @@
{ makeWrapper
{ wrapGAppsHook
, glib
, lib
, symlinkJoin
, switchboard
, switchboardPlugs
@ -11,13 +13,22 @@ in
symlinkJoin {
name = "${switchboard.name}-with-plugs";
paths = [ switchboard ] ++ selectedPlugs;
paths = [
switchboard
] ++ selectedPlugs;
buildInputs = [ makeWrapper ];
buildInputs = [
wrapGAppsHook
glib
] ++ (lib.forEach selectedPlugs (x: x.buildInputs))
++ selectedPlugs;
postBuild = ''
wrapProgram $out/bin/io.elementary.switchboard \
--set SWITCHBOARD_PLUGS_PATH "$out/lib/switchboard"
make_glib_find_gsettings_schemas
gappsWrapperArgs+=(--set SWITCHBOARD_PLUGS_PATH "$out/lib/switchboard")
wrapGAppsHook
'';
inherit (switchboard) meta;

View File

@ -1,11 +1,14 @@
{ stdenv
, fetchFromGitHub
, pantheon
, meson
, ninja
, gettext
}:
stdenv.mkDerivation rec {
pname = "elementary-wallpapers";
version = "5.4";
version = "5.5.0";
repoName = "wallpapers";
@ -13,9 +16,15 @@ stdenv.mkDerivation rec {
owner = "elementary";
repo = repoName;
rev = version;
sha256 = "1ihvv9v8m5f2n2v3bgg769l52wbg241zgp3d45q6phk7p8s1gz3s";
sha256 = "0c63nds2ylqgcp39s13mfwhipgyw8cirn0bhybp291l5g86ii6s3";
};
nativeBuildInputs = [
gettext
meson
ninja
];
passthru = {
updateScript = pantheon.updateScript {
inherit repoName;
@ -23,14 +32,6 @@ stdenv.mkDerivation rec {
};
};
dontBuild = true;
dontConfigure = true;
installPhase = ''
mkdir -p $out/share/backgrounds/elementary
cp -av *.jpg $out/share/backgrounds/elementary
'';
meta = with stdenv.lib; {
description = "Collection of wallpapers for elementary";
homepage = https://github.com/elementary/wallpapers;

View File

@ -26,7 +26,7 @@
stdenv.mkDerivation rec {
pname = "wingpanel-applications-menu";
version = "2.4.4";
version = "2.5.0";
repoName = "applications-menu";
@ -34,7 +34,7 @@ stdenv.mkDerivation rec {
owner = "elementary";
repo = repoName;
rev = version;
sha256 = "09ssxn264v6nzrxgk529kpdxq5j3b14z8mbwq0gni1bgjcla773d";
sha256 = "1zry9xvcljsn5fnl8qs21x7q8rpwv0sxvp2dmnx3ddqnvj4q2m7d";
};
passthru = {
@ -73,13 +73,10 @@ stdenv.mkDerivation rec {
"--sysconfdir=${placeholder "out"}/etc"
];
PKG_CONFIG_WINGPANEL_2_0_INDICATORSDIR = "${placeholder "out"}/lib/wingpanel";
PKG_CONFIG_SWITCHBOARD_2_0_PLUGSDIR = "${placeholder "out"}/lib/switchboard";
patches = [
(substituteAll {
src = ./bc.patch;
exec = "${bc}/bin/bc";
src = ./fix-paths.patch;
bc = "${bc}/bin/bc";
})
];

View File

@ -0,0 +1,24 @@
diff --git a/src/synapse-plugins/calculator-plugin.vala b/src/synapse-plugins/calculator-plugin.vala
index 18ca3af..f5d1076 100644
--- a/src/synapse-plugins/calculator-plugin.vala
+++ b/src/synapse-plugins/calculator-plugin.vala
@@ -44,9 +44,7 @@ namespace Synapse {
_("Calculator"),
_("Calculate basic expressions."),
"accessories-calculator",
- register_plugin,
- Environment.find_program_in_path ("bc") != null,
- _("bc is not installed")
+ register_plugin
);
}
@@ -87,7 +85,7 @@ namespace Synapse {
if (matched) {
Pid pid;
int read_fd, write_fd;
- string[] argv = {"bc", "-l"};
+ string[] argv = {"@bc@", "-l"};
string? solution = null;
try {

View File

@ -16,13 +16,13 @@
stdenv.mkDerivation rec {
pname = "wingpanel-indicator-bluetooth";
version = "2.1.3";
version = "2.1.4";
src = fetchFromGitHub {
owner = "elementary";
repo = pname;
rev = version;
sha256 = "04ggakf7qp4q0kah5xksbwjn78wpdrp9kdgkj6ibzsb97ngn70g9";
sha256 = "05v3qy4rxi4l3g1ql99vcjylb01hz3galh19c2jc3lqc1mf1z1j1";
};
passthru = {
@ -48,8 +48,6 @@ stdenv.mkDerivation rec {
wingpanel
];
PKG_CONFIG_WINGPANEL_2_0_INDICATORSDIR = "${placeholder "out"}/lib/wingpanel";
postPatch = ''
chmod +x meson/post_install.py
patchShebangs meson/post_install.py

View File

@ -35,13 +35,13 @@ in
stdenv.mkDerivation rec {
pname = "wingpanel-indicator-datetime";
version = "2.2.0";
version = "2.2.1";
src = fetchFromGitHub {
owner = "elementary";
repo = pname;
rev = version;
sha256 = "1whdx0vgm0qbbzsw8dg2liz3cbh3ad5ybkriy4lmx5ynyhpbz0sx";
sha256 = "0y8lfrrkzcj8nw94jqawbxr4jz41ac0z539kkr3n3x0qmx72md2y";
};
passthru = {

View File

@ -14,13 +14,13 @@
stdenv.mkDerivation rec {
pname = "wingpanel-indicator-notifications";
version = "2.1.2";
version = "2.1.3";
src = fetchFromGitHub {
owner = "elementary";
repo = pname;
rev = version;
sha256 = "1960s3xcsx6yjlnk0csf1m66s1z1sj5rym9b2fy7pm2nan47z3ld";
sha256 = "1lx023z7xxlgwh0br48fw5w7xw673p2sqxwl1gz9f54xx7rv81py";
};
passthru = {
@ -44,8 +44,6 @@ stdenv.mkDerivation rec {
wingpanel
];
PKG_CONFIG_WINGPANEL_2_0_INDICATORSDIR = "${placeholder "out"}/lib/wingpanel";
meta = with stdenv.lib; {
description = "Notifications Indicator for Wingpanel";
homepage = https://github.com/elementary/wingpanel-indicator-notifications;

View File

@ -14,13 +14,13 @@
stdenv.mkDerivation rec {
pname = "wingpanel-indicator-session";
version = "2.2.5";
version = "2.2.6";
src = fetchFromGitHub {
owner = "elementary";
repo = pname;
rev = version;
sha256 = "0lqh9g6qq09m744gncspm79lbwx1vjl1d6j2szwcq9f0jdm01pm5";
sha256 = "0pzknbm0hg4kf2izfg1mcmyildfzwyq1hh0xhlq16gsmakq4ld26";
};
passthru = {
@ -44,8 +44,6 @@ stdenv.mkDerivation rec {
wingpanel
];
PKG_CONFIG_WINGPANEL_2_0_INDICATORSDIR = "${placeholder "out"}/lib/wingpanel";
meta = with stdenv.lib; {
description = "Session Indicator for Wingpanel";
homepage = https://github.com/elementary/wingpanel-indicator-session;

View File

@ -18,13 +18,13 @@
stdenv.mkDerivation rec {
pname = "wingpanel-indicator-sound";
version = "2.1.3";
version = "2.1.4";
src = fetchFromGitHub {
owner = "elementary";
repo = pname;
rev = version;
sha256 = "0lgjl969c7s31nszh6d4pr1vsxfdsizplsihvd8r02mm1mlxmsda";
sha256 = "00r3dqkyp7k34xwn12l0dbzfmz70084lblxchykmk77pgzid2a0b";
};
passthru = {
@ -52,8 +52,6 @@ stdenv.mkDerivation rec {
wingpanel
];
PKG_CONFIG_WINGPANEL_2_0_INDICATORSDIR = "${placeholder "out"}/lib/wingpanel";
postPatch = ''
chmod +x meson/post_install.py
patchShebangs meson/post_install.py

View File

@ -1,5 +1,6 @@
{ lib
, makeWrapper
, wrapGAppsHook
, glib
, symlinkJoin
, wingpanel
, wingpanelIndicators
@ -13,17 +14,27 @@ in
symlinkJoin {
name = "${wingpanel.name}-with-indicators";
paths = [ wingpanel ] ++ selectedIndicators;
paths = [
wingpanel
] ++ selectedIndicators;
buildInputs = [ makeWrapper ];
buildInputs = [
glib
wrapGAppsHook
] ++ (lib.forEach selectedIndicators (x: x.buildInputs))
++ selectedIndicators;
# We have to set SWITCHBOARD_PLUGS_PATH because wingpanel-applications-menu
# has a plugin to search switchboard settings
postBuild = ''
wrapProgram $out/bin/wingpanel \
--set WINGPANEL_INDICATORS_PATH "$out/lib/wingpanel" \
--set SWITCHBOARD_PLUGS_PATH "${switchboard-with-plugs}/lib/switchboard" \
--suffix XDG_DATA_DIRS : ${lib.concatMapStringsSep ":" (indicator: ''${indicator}/share/gsettings-schemas/${indicator.name}'') selectedIndicators}
make_glib_find_gsettings_schemas
gappsWrapperArgs+=(
--set WINGPANEL_INDICATORS_PATH "$out/lib/wingpanel"
--set SWITCHBOARD_PLUGS_PATH "${switchboard-with-plugs}/lib/switchboard"
)
wrapGAppsHook
'';
inherit (wingpanel) meta;

View File

@ -17,7 +17,7 @@
stdenv.mkDerivation rec {
pname = "elementary-capnet-assist";
version = "2.2.3";
version = "2.2.4";
repoName = "capnet-assist";
@ -25,7 +25,7 @@ stdenv.mkDerivation rec {
owner = "elementary";
repo = repoName;
rev = version;
sha256 = "15cnwimkmmsb4rwvgm8bizcsn1krsj6k3qc88izn79is75y6wwji";
sha256 = "0yz827gs1qv6csgv4v993rjmqzc6dbymbvznsy45ghlh19l4l7j1";
};
passthru = {

View File

@ -114,7 +114,26 @@ EOF
function get_latest_tag ( ) {
repo_name="$1"
curl --silent --show-error --fail -X GET "https://api.github.com/repos/elementary/$repo_name/releases/latest" | jq -r '.tag_name'
OAUTH_TOKEN=$(printenv OAUTH_TOKEN)
if [ -n "$OAUTH_TOKEN" ]; then
curl \
--silent \
--show-error \
--fail \
-X GET \
--header "Authorization: token $OAUTH_TOKEN" \
"https://api.github.com/repos/elementary/$repo_name/releases/latest" \
| jq -r '.tag_name'
else
curl \
--silent \
--show-error \
--fail \
-X GET \
"https://api.github.com/repos/elementary/$repo_name/releases/latest" \
| jq -r '.tag_name'
fi
}
#

View File

@ -1,6 +1,6 @@
{ stdenv, lib, fetchFromGitHub, fetchurl, makeWrapper
, coreutils, git, gmp, nettools, openssl_1_0_2, readline, tzdata, libxml2, libyaml
, boehmgc, libatomic_ops, pcre, libevent, libiconv, llvm, clang, which, zlib
, boehmgc, libatomic_ops, pcre, libevent, libiconv, llvm, clang, which, zlib, pkgconfig
, callPackage }:
# We need multiple binaries as a given binary isn't always able to build
@ -38,8 +38,14 @@ let
'';
};
generic = { version, sha256, binary, doCheck ? true }:
let compiler = stdenv.mkDerivation rec {
commonBuildInputs = extraBuildInputs: [
boehmgc libatomic_ops pcre libevent libyaml zlib libxml2 openssl_1_0_2
] ++ extraBuildInputs
++ stdenv.lib.optionals stdenv.isDarwin [ libiconv ];
generic = ({ version, sha256, binary, doCheck ? true, extraBuildInputs ? [] }:
lib.fix (compiler: stdenv.mkDerivation {
pname = "crystal";
inherit doCheck version;
@ -72,14 +78,9 @@ let
--replace '`hostname`' '`${nettools}/bin/hostname`'
'';
buildInputs = [
boehmgc libatomic_ops pcre libevent libyaml
llvm zlib openssl_1_0_2
] ++ stdenv.lib.optionals stdenv.isDarwin [
libiconv
];
buildInputs = commonBuildInputs extraBuildInputs;
nativeBuildInputs = [ binary makeWrapper which ];
nativeBuildInputs = [ binary makeWrapper which pkgconfig llvm ];
makeFlags = [
"CRYSTAL_CONFIG_VERSION=${version}"
@ -91,10 +92,13 @@ let
FLAGS = [
"--release"
"--no-debug"
"--single-module" # needed for deterministic builds
];
# This makes sure we don't keep depending on the previous version of
# crystal used to build this one.
CRYSTAL_LIBRARY_PATH = "${placeholder "out"}/lib/crystal";
# We *have* to add `which` to the PATH or crystal is unable to build stuff
# later if which is not available.
installPhase = ''
@ -102,9 +106,11 @@ let
install -Dm755 .build/crystal $out/bin/crystal
wrapProgram $out/bin/crystal \
--suffix PATH : ${lib.makeBinPath [ clang which ]} \
--suffix PATH : ${lib.makeBinPath [ pkgconfig clang which ]} \
--suffix CRYSTAL_PATH : lib:$out/lib/crystal \
--suffix LIBRARY_PATH : ${lib.makeLibraryPath buildInputs}
--suffix CRYSTAL_LIBRARY_PATH : ${
lib.makeLibraryPath (commonBuildInputs extraBuildInputs)
}
install -dm755 $out/lib/crystal
cp -r src/* $out/lib/crystal/
@ -147,7 +153,7 @@ let
maintainers = with maintainers; [ manveru david50407 peterhoeg ];
platforms = builtins.attrNames archs;
};
}; in compiler;
}));
in rec {
binaryCrystal_0_26 = genericBinary {
@ -219,6 +225,14 @@ in rec {
binary = crystal_0_30;
};
crystal_0_32 = generic {
version = "255bfc5fa925b95b72e34b26ad997fb2b3f83059";
sha256 = "1dgk36cj5lwhs1c4zp0s1c9hjk0h3vljq6zwhlnzkl1xs7cgzim1";
doCheck = false; # 5 checks are failing now
binary = crystal_0_31;
extraBuildInputs = [ readline ];
};
crystal = crystal_0_31;
crystal2nix = callPackage ./crystal2nix.nix {};

View File

@ -0,0 +1,220 @@
args@
{ version
, sha256
, url ? ""
, name ? ""
, developerProgram ? false
, runPatches ? []
, addOpenGLRunpath
, alsaLib
, expat
, fetchurl
, fontconfig
, freetype
, gcc
, gdk-pixbuf
, glib
, glibc
, gtk2
, lib
, makeWrapper
, ncurses5
, perl
, python27
, requireFile
, stdenv
, unixODBC
, xorg
, zlib
}:
stdenv.mkDerivation rec {
pname = "cudatoolkit";
inherit version runPatches;
dontPatchELF = true;
dontStrip = true;
src =
if developerProgram then
requireFile {
message = ''
This nix expression requires that ${args.name} is already part of the store.
Register yourself to NVIDIA Accelerated Computing Developer Program, retrieve the CUDA toolkit
at https://developer.nvidia.com/cuda-toolkit, and run the following command in the download directory:
nix-prefetch-url file://\$PWD/${args.name}
'';
inherit (args) name sha256;
}
else
fetchurl {
inherit (args) url sha256;
};
outputs = [ "out" "lib" "doc" ];
nativeBuildInputs = [ perl makeWrapper addOpenGLRunpath ];
buildInputs = [ gdk-pixbuf ]; # To get $GDK_PIXBUF_MODULE_FILE via setup-hook
runtimeDependencies = [
ncurses5 expat python27 zlib glibc
xorg.libX11 xorg.libXext xorg.libXrender xorg.libXt xorg.libXtst xorg.libXi xorg.libXext
gtk2 glib fontconfig freetype unixODBC alsaLib
];
rpath = "${stdenv.lib.makeLibraryPath runtimeDependencies}:${stdenv.cc.cc.lib}/lib64";
unpackPhase = ''
sh $src --keep --noexec
${lib.optionalString (lib.versionOlder version "10.1") ''
cd pkg/run_files
sh cuda-linux*.run --keep --noexec
sh cuda-samples*.run --keep --noexec
mv pkg ../../$(basename $src)
cd ../..
rm -rf pkg
for patch in $runPatches; do
sh $patch --keep --noexec
mv pkg $(basename $patch)
done
''}
'';
installPhase = ''
runHook preInstall
mkdir $out
${lib.optionalString (lib.versionOlder version "10.1") ''
cd $(basename $src)
export PERL5LIB=.
perl ./install-linux.pl --prefix="$out"
cd ..
for patch in $runPatches; do
cd $(basename $patch)
perl ./install_patch.pl --silent --accept-eula --installdir="$out"
cd ..
done
''}
${lib.optionalString (lib.versionAtLeast version "10.1") ''
cd pkg/builds/cuda-toolkit
mv * $out/
''}
rm $out/tools/CUDA_Occupancy_Calculator.xls # FIXME: why?
${lib.optionalString (lib.versionOlder version "10.1") ''
# let's remove the 32-bit libraries, they confuse the lib64->lib mover
rm -rf $out/lib
''}
# Remove some cruft.
${lib.optionalString ((lib.versionAtLeast version "7.0") && (lib.versionOlder version "10.1"))
"rm $out/bin/uninstall*"}
# Fixup path to samples (needed for cuda 6.5 or else nsight will not find them)
if [ -d "$out"/cuda-samples ]; then
mv "$out"/cuda-samples "$out"/samples
fi
# Change the #error on GCC > 4.9 to a #warning.
sed -i $out/include/host_config.h -e 's/#error\(.*unsupported GNU version\)/#warning\1/'
# Fix builds with newer glibc version
sed -i "1 i#define _BITS_FLOATN_H" "$out/include/host_defines.h"
# Ensure that cmake can find CUDA.
mkdir -p $out/nix-support
echo "cmakeFlags+=' -DCUDA_TOOLKIT_ROOT_DIR=$out'" >> $out/nix-support/setup-hook
# Move some libraries to the lib output so that programs that
# depend on them don't pull in this entire monstrosity.
mkdir -p $lib/lib
mv -v $out/lib64/libcudart* $lib/lib/
# Remove OpenCL libraries as they are provided by ocl-icd and driver.
rm -f $out/lib64/libOpenCL*
${lib.optionalString (lib.versionAtLeast version "10.1") ''
mv $out/lib64 $out/lib
''}
# Set compiler for NVCC.
wrapProgram $out/bin/nvcc \
--prefix PATH : ${gcc}/bin
# nvprof do not find any program to profile if LD_LIBRARY_PATH is not set
wrapProgram $out/bin/nvprof \
--prefix LD_LIBRARY_PATH : $out/lib
'' + lib.optionalString (lib.versionOlder version "8.0") ''
# Hack to fix building against recent Glibc/GCC.
echo "NIX_CFLAGS_COMPILE+=' -D_FORCE_INLINES'" >> $out/nix-support/setup-hook
'' + ''
runHook postInstall
'';
postInstall = ''
for b in nvvp nsight; do
wrapProgram "$out/bin/$b" \
--set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE"
done
'';
preFixup = ''
while IFS= read -r -d ''$'\0' i; do
if ! isELF "$i"; then continue; fi
echo "patching $i..."
if [[ ! $i =~ \.so ]]; then
patchelf \
--set-interpreter "''$(cat $NIX_CC/nix-support/dynamic-linker)" $i
fi
if [[ $i =~ libcudart ]]; then
rpath2=
else
rpath2=$rpath:$lib/lib:$out/jre/lib/amd64/jli:$out/lib:$out/lib64:$out/nvvm/lib:$out/nvvm/lib64
fi
patchelf --set-rpath "$rpath2" --force-rpath $i
done < <(find $out $lib $doc -type f -print0)
'';
# Set RPATH so that libcuda and other libraries in
# /run/opengl-driver(-32)/lib can be found. See the explanation in
# addOpenGLRunpath. Don't try to figure out which libraries really need
# it, just patch all (but not the stubs libraries). Note that
# --force-rpath prevents changing RPATH (set above) to RUNPATH.
postFixup = ''
addOpenGLRunpath --force-rpath {$out,$lib}/lib/lib*.so
'';
# cuda-gdb doesn't run correctly when not using sandboxing, so
# temporarily disabling the install check. This should be set to true
# when we figure out how to get `cuda-gdb --version` to run correctly
# when not using sandboxing.
doInstallCheck = false;
postInstallCheck = let
in ''
# Smoke test binaries
pushd $out/bin
for f in *; do
case $f in
crt) continue;;
nvcc.profile) continue;;
nsight_ee_plugins_manage.sh) continue;;
uninstall_cuda_toolkit_6.5.pl) continue;;
computeprof|nvvp|nsight) continue;; # GUIs don't feature "--version"
*) echo "Executing '$f --version':"; ./$f --version;;
esac
done
popd
'';
passthru = {
cc = gcc;
majorVersion = lib.versions.majorMinor version;
};
meta = with stdenv.lib; {
description = "A compiler for NVIDIA GPUs, math libraries, and tools";
homepage = "https://developer.nvidia.com/cuda-toolkit";
platforms = [ "x86_64-linux" ];
license = licenses.unfree;
};
}

View File

@ -1,210 +1,15 @@
{ lib, stdenv, makeWrapper, fetchurl, requireFile, perl, ncurses5, expat, python27, zlib
, gcc48, gcc49, gcc5, gcc6, gcc7
, xorg, gtk2, gdk-pixbuf, glib, fontconfig, freetype, unixODBC, alsaLib, glibc
, addOpenGLRunpath
{ lib
, callPackage
, fetchurl
, gcc48
, gcc49
, gcc5
, gcc6
, gcc7
}:
let
common =
args@{ gcc, version, sha256
, url ? ""
, name ? ""
, developerProgram ? false
, python ? python27
, runPatches ? []
}:
stdenv.mkDerivation rec {
pname = "cudatoolkit";
inherit version runPatches;
dontPatchELF = true;
dontStrip = true;
src =
if developerProgram then
requireFile {
message = ''
This nix expression requires that ${args.name} is already part of the store.
Register yourself to NVIDIA Accelerated Computing Developer Program, retrieve the CUDA toolkit
at https://developer.nvidia.com/cuda-toolkit, and run the following command in the download directory:
nix-prefetch-url file://\$PWD/${args.name}
'';
inherit (args) name sha256;
}
else
fetchurl {
inherit (args) url sha256;
};
outputs = [ "out" "lib" "doc" ];
nativeBuildInputs = [ perl makeWrapper addOpenGLRunpath ];
buildInputs = [ gdk-pixbuf ]; # To get $GDK_PIXBUF_MODULE_FILE via setup-hook
runtimeDependencies = [
ncurses5 expat python zlib glibc
xorg.libX11 xorg.libXext xorg.libXrender xorg.libXt xorg.libXtst xorg.libXi xorg.libXext
gtk2 glib fontconfig freetype unixODBC alsaLib
];
rpath = "${stdenv.lib.makeLibraryPath runtimeDependencies}:${stdenv.cc.cc.lib}/lib64";
unpackPhase = ''
sh $src --keep --noexec
${lib.optionalString (lib.versionOlder version "10.1") ''
cd pkg/run_files
sh cuda-linux*.run --keep --noexec
sh cuda-samples*.run --keep --noexec
mv pkg ../../$(basename $src)
cd ../..
rm -rf pkg
for patch in $runPatches; do
sh $patch --keep --noexec
mv pkg $(basename $patch)
done
''}
'';
installPhase = ''
runHook preInstall
mkdir $out
${lib.optionalString (lib.versionOlder version "10.1") ''
cd $(basename $src)
export PERL5LIB=.
perl ./install-linux.pl --prefix="$out"
cd ..
for patch in $runPatches; do
cd $(basename $patch)
perl ./install_patch.pl --silent --accept-eula --installdir="$out"
cd ..
done
''}
${lib.optionalString (lib.versionAtLeast version "10.1") ''
cd pkg/builds/cuda-toolkit
mv * $out/
''}
rm $out/tools/CUDA_Occupancy_Calculator.xls # FIXME: why?
${lib.optionalString (lib.versionOlder version "10.1") ''
# let's remove the 32-bit libraries, they confuse the lib64->lib mover
rm -rf $out/lib
''}
# Remove some cruft.
${lib.optionalString ((lib.versionAtLeast version "7.0") && (lib.versionOlder version "10.1"))
"rm $out/bin/uninstall*"}
# Fixup path to samples (needed for cuda 6.5 or else nsight will not find them)
if [ -d "$out"/cuda-samples ]; then
mv "$out"/cuda-samples "$out"/samples
fi
# Change the #error on GCC > 4.9 to a #warning.
sed -i $out/include/host_config.h -e 's/#error\(.*unsupported GNU version\)/#warning\1/'
# Fix builds with newer glibc version
sed -i "1 i#define _BITS_FLOATN_H" "$out/include/host_defines.h"
# Ensure that cmake can find CUDA.
mkdir -p $out/nix-support
echo "cmakeFlags+=' -DCUDA_TOOLKIT_ROOT_DIR=$out'" >> $out/nix-support/setup-hook
# Move some libraries to the lib output so that programs that
# depend on them don't pull in this entire monstrosity.
mkdir -p $lib/lib
mv -v $out/lib64/libcudart* $lib/lib/
# Remove OpenCL libraries as they are provided by ocl-icd and driver.
rm -f $out/lib64/libOpenCL*
${lib.optionalString (lib.versionAtLeast version "10.1") ''
mv $out/lib64 $out/lib
''}
# Set compiler for NVCC.
wrapProgram $out/bin/nvcc \
--prefix PATH : ${gcc}/bin
# nvprof do not find any program to profile if LD_LIBRARY_PATH is not set
wrapProgram $out/bin/nvprof \
--prefix LD_LIBRARY_PATH : $out/lib
'' + lib.optionalString (lib.versionOlder version "8.0") ''
# Hack to fix building against recent Glibc/GCC.
echo "NIX_CFLAGS_COMPILE+=' -D_FORCE_INLINES'" >> $out/nix-support/setup-hook
'' + ''
runHook postInstall
'';
postInstall = ''
for b in nvvp nsight; do
wrapProgram "$out/bin/$b" \
--set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE"
done
'';
preFixup = ''
while IFS= read -r -d ''$'\0' i; do
if ! isELF "$i"; then continue; fi
echo "patching $i..."
if [[ ! $i =~ \.so ]]; then
patchelf \
--set-interpreter "''$(cat $NIX_CC/nix-support/dynamic-linker)" $i
fi
if [[ $i =~ libcudart ]]; then
rpath2=
else
rpath2=$rpath:$lib/lib:$out/jre/lib/amd64/jli:$out/lib:$out/lib64:$out/nvvm/lib:$out/nvvm/lib64
fi
patchelf --set-rpath "$rpath2" --force-rpath $i
done < <(find $out $lib $doc -type f -print0)
'';
# Set RPATH so that libcuda and other libraries in
# /run/opengl-driver(-32)/lib can be found. See the explanation in
# addOpenGLRunpath. Don't try to figure out which libraries really need
# it, just patch all (but not the stubs libraries). Note that
# --force-rpath prevents changing RPATH (set above) to RUNPATH.
postFixup = ''
addOpenGLRunpath --force-rpath {$out,$lib}/lib/lib*.so
'';
# cuda-gdb doesn't run correctly when not using sandboxing, so
# temporarily disabling the install check. This should be set to true
# when we figure out how to get `cuda-gdb --version` to run correctly
# when not using sandboxing.
doInstallCheck = false;
postInstallCheck = let
in ''
# Smoke test binaries
pushd $out/bin
for f in *; do
case $f in
crt) continue;;
nvcc.profile) continue;;
nsight_ee_plugins_manage.sh) continue;;
uninstall_cuda_toolkit_6.5.pl) continue;;
computeprof|nvvp|nsight) continue;; # GUIs don't feature "--version"
*) echo "Executing '$f --version':"; ./$f --version;;
esac
done
popd
'';
passthru = {
cc = gcc;
majorVersion = lib.versions.majorMinor version;
};
meta = with stdenv.lib; {
description = "A compiler for NVIDIA GPUs, math libraries, and tools";
homepage = "https://developer.nvidia.com/cuda-toolkit";
platforms = [ "x86_64-linux" ];
license = licenses.unfree;
};
};
common = callPackage ./common.nix;
in rec {
cudatoolkit_6 = common {
version = "6.0.37";

View File

@ -1080,6 +1080,7 @@ self: super: {
# The test suite is broken. Break out of "base-compat >=0.9.3 && <0.10, hspec >=2.4.4 && <2.5".
haddock-library = doJailbreak (dontCheck super.haddock-library);
haddock-library_1_8_0 = doJailbreak super.haddock-library_1_8_0;
# Generate shell completion.
cabal2nix = generateOptparseApplicativeCompletion "cabal2nix" super.cabal2nix;

View File

@ -80,6 +80,7 @@ self: super: {
optparse-applicative = self.optparse-applicative_0_15_1_0;
pandoc = self.pandoc_2_8_0_1;
pandoc-types = self.pandoc-types_1_20;
prettyprinter = self.prettyprinter_1_5_1;
primitive = dontCheck super.primitive_0_7_0_0; # evaluating the test suite gives an infinite recursion
regex-base = self.regex-base_0_94_0_0;
regex-pcre-builtin = self.regex-pcre-builtin_0_95_1_1_8_43;

View File

@ -46,7 +46,7 @@ with pkgs;
inherit hasDistutilsCxxPatch pythonForBuild;
};
in rec {
in {
python27 = callPackage ./cpython/2.7 {
self = python27;

View File

@ -14,6 +14,7 @@
, taggedLayout ? ((enableRelease && enableDebug) || (enableSingleThreaded && enableMultiThreaded) || (enableShared && enableStatic))
, patches ? []
, mpi ? null
, extraB2Args ? []
# Attributes inherit from specific versions
, version, src
@ -92,7 +93,8 @@ let
++ optional (mpi != null || stdenv.hostPlatform != stdenv.buildPlatform) "--user-config=user-config.jam"
++ optionals (stdenv.hostPlatform.libc == "msvcrt") [
"threadapi=win32"
]);
] ++ extraB2Args
);
in

View File

@ -27,7 +27,8 @@ stdenv.mkDerivation rec {
++ stdenv.lib.optional stdenv.isDarwin gettext
++ stdenv.lib.optional enableCapabilities libcap;
configureFlags = [ "--with-libgpg-error-prefix=${libgpgerror.dev}" ];
configureFlags = [ "--with-libgpg-error-prefix=${libgpgerror.dev}" ]
++ stdenv.lib.optional stdenv.hostPlatform.isMusl "--disable-asm";
# Make sure libraries are correct for .pc and .la files
# Also make sure includes are fixed for callers who don't use libgpgcrypt-config

View File

@ -28,13 +28,8 @@ stdenv.mkDerivation (rec {
NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isLinux "-lgcc_s";
configureFlags =
# We use `isLinux` here only to avoid mass rebuilds for Darwin, where
# disabling udev happens automatically. Remove `isLinux` at next big change!
stdenv.lib.optional (stdenv.isLinux && !enableSystemd) "--disable-udev";
preFixup = stdenv.lib.optionalString enableSystemd ''
sed 's,-ludev,-L${systemd.lib}/lib -ludev,' -i $out/lib/libusb-1.0.la
preFixup = stdenv.lib.optionalString stdenv.isLinux ''
sed 's,-ludev,-L${stdenv.lib.getLib systemd}/lib -ludev,' -i $out/lib/libusb-1.0.la
'';
meta = with stdenv.lib; {

View File

@ -3,14 +3,14 @@
# Based on https://projects.archlinux.org/svntogit/packages.git/tree/trunk/PKGBUILD
stdenv.mkDerivation rec {
pname = "live555";
version = "2019.10.20";
version = "2019.11.22";
src = fetchurl { # the upstream doesn't provide a stable URL
urls = [
"mirror://sourceforge/slackbuildsdirectlinks/live.${version}.tar.gz"
"https://download.videolan.org/contrib/live555/live.${version}.tar.gz"
];
sha256 = "085csq31s4kak0sym5y170f82wp542bg1ff3kycanvs8w4d4n9j4";
sha256 = "144y2wsfpaclkj7srx85f3y3parzn7vbjmzc2afc62wdsb9gn46d";
};
postPatch = ''

View File

@ -12,11 +12,11 @@ let
in
stdenv.mkDerivation rec {
name = "poppler-${suffix}-${version}";
version = "0.81.0"; # beware: updates often break cups-filters build
version = "0.83.0"; # beware: updates often break cups-filters build
src = fetchurl {
url = "${meta.homepage}/poppler-${version}.tar.xz";
sha256 = "00pykc7nym3xg0wc60awv0i35zwdfyn0igb6jrnb6rsv0c5h4b91";
sha256 = "16vr1g5qsqwyxfnyikqw37i04x9zpp45far2x90c7qbijw6nap38";
};
outputs = [ "out" "dev" ];

View File

@ -1,14 +1,14 @@
{ stdenv, fetchurl
, amtk, gnome3, gtk3, gtksourceview4, libuchardet, libxml2, pkgconfig }:
let
version = "4.2.0";
version = "4.2.1";
pname = "tepl";
in stdenv.mkDerivation {
name = "${pname}-${version}";
src = fetchurl {
url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
sha256 = "1kcwcr72dv3xwi2ni579c9raa0cnbazfnmy6mgapzn6dir1d8fc8";
sha256 = "0vib1ljgqwy2fhiwq8z3pcd68qy7v72l4f35p1d1w1k9z8sy677k";
};
nativeBuildInputs = [

View File

@ -6,14 +6,15 @@ let param =
if stdenv.lib.versionAtLeast ocaml.version "4.02" then {
version = "0.8.5";
sha256 = "1mhckvdcxkikbzgvy24kjz4265l15b86a6swz7m3ynbgvqdcfzqn";
buildInputs = [ dune ];
nativeBuildInputs = [ dune ];
propagatedBuildInputs = [ uuidm ];
buildPhase = "dune build -p alcotest";
inherit (dune) installPhase;
} else {
version = "0.7.2";
sha256 = "1qgsz2zz5ky6s5pf3j3shc4fjc36rqnjflk8x0wl1fcpvvkr52md";
buildInputs = [ ocamlbuild topkg ];
buildInputs = [ topkg ];
nativeBuildInputs = [ ocamlbuild ];
inherit (topkg) buildPhase installPhase;
};
in
@ -27,7 +28,8 @@ stdenv.mkDerivation rec {
inherit (param) sha256;
};
buildInputs = [ ocaml findlib ] ++ param.buildInputs;
nativeBuildInputs = [ ocaml findlib ] ++ (param.nativeBuildInputs or []);
buildInputs = [ findlib ] ++ (param.buildInputs or []);
propagatedBuildInputs = [ cmdliner astring fmt result ]
++ (param.propagatedBuildInputs or []);

View File

@ -25,7 +25,8 @@ stdenv.mkDerivation rec {
inherit (param) sha256;
};
buildInputs = [ ocaml findlib ocamlbuild ounit topkg ];
buildInputs = [ findlib ounit topkg ];
nativeBuildInputs = [ ocaml findlib ocamlbuild ];
propagatedBuildInputs = [ result cstruct zarith ] ++ param.propagatedBuildInputs;
buildPhase = "${topkg.run} build --tests true";

View File

@ -10,7 +10,8 @@ stdenv.mkDerivation rec {
sha256 = "1s10iqx8rgnxr5n93lf4blwirjf8nlm272yg5sipr7lsr35v49wc";
};
buildInputs = [ ocaml findlib ocamlbuild topkg ];
nativeBuildInputs = [ ocaml findlib ocamlbuild ];
buildInputs = [ findlib topkg ];
propagatedBuildInputs = [ astring fmt fpath logs rresult ];
inherit (topkg) buildPhase installPhase;

View File

@ -25,8 +25,8 @@ stdenv.mkDerivation rec {
inherit (param) sha256;
};
nativeBuildInputs = [ ocamlbuild topkg ];
buildInputs = [ ocaml findlib ];
nativeBuildInputs = [ ocaml ocamlbuild findlib ];
buildInputs = [ topkg ];
propagatedBuildInputs = [ result ];
inherit (topkg) buildPhase installPhase;

View File

@ -1,22 +1,20 @@
{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, ocb-stubblr }:
{ lib, fetchurl, buildDunePackage }:
stdenv.mkDerivation {
name = "ocaml${ocaml.version}-cpuid-0.1.0";
buildDunePackage rec {
pname = "cpuid";
version = "0.1.2";
minimumOCamlVersion = "4.03";
src = fetchurl {
url = https://github.com/pqwy/cpuid/releases/download/v0.1.0/cpuid-0.1.0.tbz;
sha256 = "08k2558a3dnxn8msgpz8c93sfn0y027ganfdi2yvql0fp1ixv97p";
url = "https://github.com/pqwy/cpuid/releases/download/v${version}/cpuid-v${version}.tbz";
sha256 = "08ng4mva6qblb5ipkrxbr0my7ndkc4qwcbswkqgbgir864s74m93";
};
buildInputs = [ ocaml findlib ocamlbuild topkg ocb-stubblr ];
inherit (topkg) buildPhase installPhase;
meta = {
homepage = https://github.com/pqwy/cpuid;
description = "Detect CPU features from OCaml";
license = stdenv.lib.licenses.isc;
maintainers = [ stdenv.lib.maintainers.vbgl ];
inherit (ocaml.meta) platforms;
license = lib.licenses.isc;
maintainers = [ lib.maintainers.vbgl ];
};
}

View File

@ -8,7 +8,8 @@ stdenv.mkDerivation {
sha256 = "1zj9azcxcn6skmb69ykgmi9z8c50yskwg03wqgh87lypgjdcz060";
};
buildInputs = [ ocaml findlib ocamlbuild topkg cmdliner ];
nativeBuildInputs = [ ocaml findlib ocamlbuild ];
buildInputs = [ findlib topkg cmdliner ];
propagatedBuildInputs = [ result uchar ];
inherit (topkg) buildPhase installPhase;

View File

@ -10,7 +10,8 @@ stdenv.mkDerivation {
sha256 = "1176dcmxb11fnw49b7yysvkjh0kpzx4s48lmdn5psq9vshp5c29w";
};
buildInputs = [ ocaml findlib ocamlbuild topkg ];
buildInputs = [ findlib topkg ];
nativeBuildInputs = [ ocaml findlib ocamlbuild ];
propagatedBuildInputs = [ uutf ];
inherit (topkg) buildPhase installPhase;

View File

@ -18,7 +18,8 @@ stdenv.mkDerivation rec {
sha256 = "1lkhr7i44xw4kpfbhgj3rbqy3dv5bfm4kyrbl8a9rfafddcxlwss";
};
buildInputs = [ ocaml findlib ocamlbuild topkg fmt cmdliner lwt ];
nativeBuildInputs = [ ocaml findlib ocamlbuild ];
buildInputs = [ findlib topkg fmt cmdliner lwt ];
propagatedBuildInputs = [ result ];
buildPhase = "${topkg.run} build --with-js_of_ocaml false";

View File

@ -11,7 +11,9 @@ stdenv.mkDerivation {
sha256 = "058d83hmxd5mjccxdm3ydchmhk2lca5jdg82jg0klsigmf4ida6v";
};
buildInputs = [ ocaml findlib ocamlbuild ];
nativeBuildInputs = [ ocaml findlib ocamlbuild ];
buildInputs = [ findlib ];
configurePlatforms = [];
createFindlibDestdir = true;

View File

@ -23,7 +23,8 @@ stdenv.mkDerivation {
inherit (param) sha256;
};
buildInputs = [ ocaml findlib ocamlbuild topkg ]
nativeBuildInputs = [ ocaml findlib ocamlbuild ];
buildInputs = [ findlib topkg ]
++ stdenv.lib.optional jsooSupport js_of_ocaml;
buildPhase = "${topkg.buildPhase} --with-js_of_ocaml ${boolToString jsooSupport}";

View File

@ -1,11 +1,19 @@
{ stdenv, fetchurl, fetchpatch, ocaml, findlib, ocamlbuild, topkg
, cpuid, ocb-stubblr, sexplib
, cstruct, zarith, ppx_sexp_conv, ppx_deriving
, cstruct, zarith, ppx_sexp_conv, ppx_deriving, writeScriptBin
, cstruct-lwt ? null
}:
with stdenv.lib;
let withLwt = cstruct-lwt != null; in
let
withLwt = cstruct-lwt != null;
# the build system will call 'cc' with no way to override
# this is wrong when we're cross-compiling, so insert a wrapper
cc-wrapper = writeScriptBin "cc" ''
set -e
$CC "$@"
'';
in
stdenv.mkDerivation rec {
name = "ocaml${ocaml.version}-nocrypto-${version}";
@ -43,8 +51,9 @@ stdenv.mkDerivation rec {
})
];
buildInputs = [ ocaml findlib ocamlbuild topkg cpuid ocb-stubblr ];
propagatedBuildInputs = [ cstruct ppx_deriving ppx_sexp_conv sexplib zarith ] ++ optional withLwt cstruct-lwt;
nativeBuildInputs = [ ocaml findlib ocamlbuild cc-wrapper ];
buildInputs = [ ocamlbuild findlib topkg cpuid ocb-stubblr ppx_deriving ];
propagatedBuildInputs = [ cstruct ppx_sexp_conv sexplib zarith ] ++ optional withLwt cstruct-lwt;
buildPhase = "${topkg.buildPhase} --with-lwt ${boolToString withLwt}";
inherit (topkg) installPhase;

View File

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, fetchpatch, ocaml, findlib }:
{ stdenv, lib, fetchFromGitHub, fetchpatch, ocaml, findlib, withStatic ? false }:
stdenv.mkDerivation rec {
version = "1.1";
@ -14,12 +14,14 @@ stdenv.mkDerivation rec {
url = "https://github.com/ocaml/num/commit/6d4c6d476c061298e6385e8a0864f083194b9307.patch";
sha256 = "18zlvb5n327q8y3c52js5dvyy29ssld1l53jqng8m9w1k24ypi0b";
})
];
] ++ lib.optional withStatic ./enable-static.patch;
buildInputs = [ ocaml findlib ];
nativeBuildInputs = [ ocaml findlib ];
buildInputs = [ ocaml findlib ];
createFindlibDestdir = true;
meta = {
description = "Legacy Num library for arbitrary-precision integer and rational arithmetic";
license = stdenv.lib.licenses.lgpl21;

View File

@ -0,0 +1,12 @@
diff -u a/src/Makefile b/src/Makefile
--- a/src/Makefile
+++ b/src/Makefile
@@ -45,7 +45,7 @@
endif
libnums.$(A): $(COBJS)
- $(OCAMLMKLIB) -oc nums $(COBJS)
+ $(OCAMLMKLIB) -custom -oc nums $(COBJS)
nums.cma: $(CMOS)
$(OCAMLMKLIB) -o nums -oc nums -linkall $(CMOS)

View File

@ -1,4 +1,4 @@
{stdenv, fetchurl, ocaml, findlib, lablgtk}:
{stdenv, fetchurl, ocaml, findlib, lablgtk ? null}:
stdenv.mkDerivation rec {
pname = "ocamlgraph";
@ -16,7 +16,8 @@ stdenv.mkDerivation rec {
postPatch = ''
sed -i 's@$(DESTDIR)$(OCAMLLIB)/ocamlgraph@$(DESTDIR)/lib/ocaml/${ocaml.version}/site-lib/ocamlgraph@' Makefile.in
sed -i 's@OCAMLFINDDEST := -destdir $(DESTDIR)@@' Makefile.in
sed -i 's@+lablgtk2@${lablgtk}/lib/ocaml/${ocaml.version}/site-lib/lablgtk2 -I ${lablgtk}/lib/ocaml/${ocaml.version}/site-lib/stublibs@' configure Makefile.in editor/Makefile
${stdenv.lib.optionalString (lablgtk != null)
"sed -i 's@+lablgtk2@${lablgtk}/lib/ocaml/${ocaml.version}/site-lib/lablgtk2 -I ${lablgtk}/lib/ocaml/${ocaml.version}/site-lib/stublibs@' configure Makefile.in editor/Makefile"}
'';
createFindlibDestdir = true;

View File

@ -15,6 +15,8 @@ stdenv.mkDerivation rec {
installFlags = [ "LIBDIR=$(OCAMLFIND_DESTDIR)" ];
patches = [ ./optional-static.patch ];
meta = {
description = "Parser and printer for the opam file syntax";
license = stdenv.lib.licenses.lgpl21;

View File

@ -0,0 +1,13 @@
diff -u a/Makefile b/Makefile
--- a/Makefile
+++ b/Makefile
@@ -1,1 +1,5 @@
-TARGETS = opam-file-format.cma opam-file-format.cmxa opam-file-format.cmxs
+TARGETS = opam-file-format.cma opam-file-format.cmxa
+
+ifeq "$(NATDYNLINK)" "true"
+TARGETS = $(TARGETS) opam-file-format.cmxs
+endif
all: $(TARGETS)

View File

@ -14,7 +14,9 @@ stdenv.mkDerivation {
sha256 = "0hbd2sqdz75lv5ax82yhsfdk1dlcvq12xpys6n85ysmrl0c3d3lk";
});
buildInputs = [ ocaml findlib ocamlbuild ];
nativeBuildInputs = [ ocaml findlib ocamlbuild ];
buildInputs = [ findlib ];
configurePlatforms = [];
dontAddPrefix = true;

View File

@ -37,6 +37,7 @@ in
inherit (param) sha256;
};
nativeBuildInputs = [ ocaml findlib ];
buildInputs = [ ocaml findlib ];
createFindlibDestdir = true;

View File

@ -9,7 +9,8 @@ stdenv.mkDerivation rec {
sha256 = "1fxq57xy1ajzfdnvv5zfm7ap2nf49znw5f9gbi4kb9vds942ij27";
};
buildInputs = [ ocaml findlib ocamlbuild topkg js_of_ocaml ];
nativeBuildInputs = [ ocaml findlib ocamlbuild ];
buildInputs = [ findlib topkg js_of_ocaml ];
propagatedBuildInputs = [ result ];

View File

@ -21,7 +21,8 @@ stdenv.mkDerivation rec {
sha256 = "02wv4lia583imn3sfci4nqv6ac5nzig5j3yfdnlqa0q8bp9rfc6g";
};
buildInputs = [ ocaml ocamlbuild findlib topkg ppx_sexp_conv ppx_cstruct ]
nativeBuildInputs = [ ocaml ocamlbuild findlib ];
buildInputs = [ findlib topkg ppx_sexp_conv ppx_cstruct ]
++ optionals doCheck [ ounit cstruct-unix ];
propagatedBuildInputs = [ cstruct-sexp nocrypto result x509 ] ++
optional withLwt lwt;

View File

@ -29,7 +29,7 @@ stdenv.mkDerivation rec {
sha256 = "1df61vw6v5bg2mys045682ggv058yqkqb67w7r2gz85crs04d5fw";
};
buildInputs = [ ocaml findlib ocamlbuild ];
nativeBuildInputs = [ ocaml findlib ocamlbuild ];
propagatedBuildInputs = [ result ];
buildPhase = "${run} build";

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, opaline }:
{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, opaline, withShared ? true }:
stdenv.mkDerivation {
name = "ocaml${ocaml.version}-uchar-0.0.2";
@ -8,9 +8,11 @@ stdenv.mkDerivation {
sha256 = "1w2saw7zanf9m9ffvz2lvcxvlm118pws2x1wym526xmydhqpyfa7";
};
buildInputs = [ ocaml ocamlbuild findlib opaline ];
buildPhase = "ocaml pkg/build.ml native=true native-dynlink=true";
nativeBuildInputs = [ ocaml ocamlbuild findlib opaline ];
buildInputs = [ findlib ocaml ocamlbuild opaline ];
buildPhase = "ocaml pkg/build.ml native=true native-dynlink=${if withShared then "true" else "false"}";
installPhase = "opaline -libdir $OCAMLFIND_DESTDIR";
configurePlatforms = [];
meta = {
description = "Compatibility library for OCamls Uchar module";

View File

@ -8,7 +8,9 @@ stdenv.mkDerivation rec {
sha256 = "1ivxb3hxn9bk62rmixx6px4fvn52s4yr1bpla7rgkcn8981v45r8";
};
buildInputs = [ ocaml findlib ocamlbuild topkg cmdliner ];
nativeBuildInputs = [ ocaml findlib ocamlbuild ];
configurePlatforms = [];
buildInputs = [ topkg cmdliner ];
inherit (topkg) buildPhase installPhase;

View File

@ -13,7 +13,8 @@ stdenv.mkDerivation rec {
sha256 = "1nx1rly3qj23jzn9yk3x6fwqimcxjd84kv5859vvhdg56psq26p6";
};
buildInputs = [ ocaml findlib ocamlbuild topkg cmdliner ];
nativeBuildInputs = [ ocaml ocamlbuild findlib ];
buildInputs = [ findlib topkg cmdliner ];
propagatedBuildInputs = [ uchar ];
inherit (topkg) buildPhase installPhase;

View File

@ -6,7 +6,7 @@ let
version = "1.7.0";
url = "https://github.com/ocaml-community/yojson/releases/download/${version}/yojson-${version}.tbz";
sha256 = "08llz96if8bcgnaishf18si76cv11zbkni0aldb54k3cn7ipiqvd";
buildInputs = [ dune ];
nativeBuildInputs = [ dune ];
extra = { inherit (dune) installPhase; };
} else rec {
version = "1.2.3";
@ -29,9 +29,10 @@ stdenv.mkDerivation ({
inherit (param) url sha256;
};
buildInputs = [ ocaml findlib ] ++ (param.buildInputs or []);
propagatedBuildInputs = [ cppo easy-format biniou ];
nativeBuildInputs = [ ocaml findlib ] ++ (param.nativeBuildInputs or []);
propagatedNativeBuildInputs = [ cppo ];
propagatedBuildInputs = [ easy-format biniou ];
configurePlatforms = [];
meta = with stdenv.lib; {
description = "An optimized parsing and printing library for the JSON format";

View File

@ -6,9 +6,9 @@
let source =
if stdenv.lib.versionAtLeast ocaml.version "4.02"
then {
version = "1.9.1";
url = https://github.com/ocaml/Zarith/archive/release-1.9.1.tar.gz;
sha256 = "0pfa271476dic5pvn6kxz3dfswxs6kqm2cxmhdx5xq2ayca05gj9";
version = "1.9";
url = https://github.com/ocaml/Zarith/archive/release-1.9.tar.gz;
sha256 = "1xrqcaj5gp52xp4ybpnblw8ciwlgrr0zi7rg7hnk8x83isjkpmwx";
} else {
version = "1.3";
url = http://forge.ocamlcore.org/frs/download.php/1471/zarith-1.3.tgz;
@ -26,9 +26,8 @@ stdenv.mkDerivation rec {
propagatedBuildInputs = [ gmp ];
patchPhase = "patchShebangs ./z_pp.pl";
configurePhase = ''
./configure -installdir $out/lib/ocaml/${ocaml.version}/site-lib
'';
dontAddPrefix = true;
configureFlags = [ "-installdir ${placeholder "out"}/lib/ocaml/${ocaml.version}/site-lib" ];
preInstall = "mkdir -p $out/lib/ocaml/${ocaml.version}/site-lib/stublibs";

View File

@ -1,6 +1,8 @@
{ lib
, buildPythonPackage
, fetchPypi
, python
, isPy3k
, msrest
, azure-common
}:
@ -20,6 +22,10 @@ buildPythonPackage rec {
azure-common
];
postInstall = lib.optionalString isPy3k ''
rm -rf $out/${python.sitePackages}/azure/__init__.py
'';
# has no tests
doCheck = false;
@ -27,6 +33,6 @@ buildPythonPackage rec {
description = "This is the Microsoft Azure Log Analytics Client Library";
homepage = "https://github.com/Azure/azure-sdk-for-python";
license = licenses.mit;
maintainers = with maintainers; [ mwilsoninsight ];
maintainers = with maintainers; [ mwilsoninsight jonringer ];
};
}

View File

@ -5,13 +5,13 @@
}:
buildPythonPackage rec {
version = "0.1.0";
version = "0.3.0";
pname = "azure-mgmt-appconfiguration";
disabled = isPy27;
src = fetchPypi {
inherit pname version;
sha256 = "0z2f0rbv7drdxihny479bv80bnhgvx8gb2pr0jvbaslll6d6rxig";
sha256 = "1igl3ikdwcz7d2zcja5nm2qjysjh53vgwzcc96lylypmq6z4aq1s";
extension = "zip";
};

View File

@ -7,13 +7,13 @@
}:
buildPythonPackage rec {
version = "9.0.0";
version = "10.0.0";
pname = "azure-mgmt-compute";
src = fetchPypi {
inherit pname version;
extension = "zip";
sha256 = "06795ccb7377eaa3864819a1c63b9bfe9957a58814c65025aef89e9cd81190fc";
sha256 = "1s3bx6knxw5dxycp43yimvgrh0i19drzd09asglcwz2x5mr3bpyg";
};
postInstall = if isPy3k then "" else ''

View File

@ -5,13 +5,13 @@
}:
buildPythonPackage rec {
version = "0.2.1";
version = "0.3.0";
pname = "azure-mgmt-imagebuilder";
disabled = isPy27;
src = fetchPypi {
inherit pname version;
sha256 = "0mwlvy4x5nr3hsz7wdpdhpzwarzzwz4225bfpd68hr0pcjgzspky";
sha256 = "0r4sxr3pbcci5qif1ip1lrix3cryj0b3asqch3zds4q705jiakc4";
extension = "zip";
};

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