Merge master into staging-next

This commit is contained in:
Frederik Rietdijk 2020-04-25 07:52:04 +02:00
commit 5c70040db2
213 changed files with 7448 additions and 5725 deletions

5
.github/CODEOWNERS vendored
View file

@ -55,9 +55,6 @@
# NixOS integration test driver
/nixos/lib/test-driver @tfc
# New NixOS modules
/nixos/modules/module-list.nix @Infinisil
# Python-related code and docs
/maintainers/scripts/update-python-libraries @FRidh
/pkgs/top-level/python-packages.nix @FRidh @jonringer
@ -67,7 +64,7 @@
# Haskell
/pkgs/development/compilers/ghc @cdepillabout
/pkgs/development/haskell-modules @cdepillabout @infinisil
/pkgs/development/haskell-modules @cdepillabout
/pkgs/development/haskell-modules/default.nix @cdepillabout
/pkgs/development/haskell-modules/generic-builder.nix @cdepillabout
/pkgs/development/haskell-modules/hoogle.nix @cdepillabout

View file

@ -110,8 +110,6 @@ haskell.compiler.ghc844 ghc-8.4.4
haskell.compiler.ghc863Binary ghc-8.6.3-binary
haskell.compiler.ghc865 ghc-8.6.5
haskell.compiler.integer-simple.ghc865 ghc-8.6.5
haskell.compiler.ghc881 ghc-8.8.1
haskell.compiler.integer-simple.ghc881 ghc-8.8.1
haskell.compiler.ghc882 ghc-8.8.2
haskell.compiler.integer-simple.ghc882 ghc-8.8.2
haskell.compiler.ghc883 ghc-8.8.3

View file

@ -524,12 +524,6 @@ lib.mapAttrs (n: v: v // { shortName = n; }) {
fullName = "Microsoft Public License";
};
msrla = {
fullName = "Microsoft Research License Agreement";
url = "http://research.microsoft.com/en-us/projects/pex/msr-la.txt";
free = false;
};
nasa13 = spdx {
spdxId = "NASA-1.3";
fullName = "NASA Open Source Agreement 1.3";

View file

@ -7184,6 +7184,12 @@
githubId = 1414088;
name = "Spencer Whitt";
};
squalus = {
email = "squalus@tuta.io";
github = "squalus";
githubId = 36899624;
name = "squalus";
};
srghma = {
email = "srghma@gmail.com";
github = "srghma";

View file

@ -38,6 +38,6 @@ with lib.maintainers; {
vdemeester
zowoq
];
scope = "Maintain Podman related packages and modules.";
scope = "Maintain Podman and CRI-O related packages and modules.";
};
}

View file

@ -45,6 +45,11 @@
There is a new module for Podman(<varname>virtualisation.podman</varname>), a drop-in replacement for the Docker command line.
</para>
</listitem>
<listitem>
<para>
The new <varname>virtualisation.containers</varname> module manages configuration shared by the CRI-O and Podman modules.
</para>
</listitem>
</itemizedlist>
</section>

View file

@ -6,8 +6,8 @@ let
cfg = config.qt5;
isQGnome = cfg.platformTheme == "gnome" && cfg.style == "adwaita";
isQtStyle = cfg.platformTheme == "gtk2" && cfg.style != "adwaita";
isQGnome = cfg.platformTheme == "gnome" && builtins.elem cfg.style ["adwaita" "adwaita-dark"];
isQtStyle = cfg.platformTheme == "gtk2" && !(builtins.elem cfg.style ["adwaita" "adwaita-dark"]);
packages = if isQGnome then [ pkgs.qgnomeplatform pkgs.adwaita-qt ]
else if isQtStyle then [ pkgs.libsForQt5.qtstyleplugins ]
@ -55,6 +55,7 @@ in
style = mkOption {
type = types.enum [
"adwaita"
"adwaita-dark"
"cleanlooks"
"gtk2"
"motif"
@ -71,6 +72,7 @@ in
<variablelist>
<varlistentry>
<term><literal>adwaita</literal></term>
<term><literal>adwaita-dark</literal></term>
<listitem><para>Use Adwaita Qt style with
<link xlink:href="https://github.com/FedoraQt/adwaita-qt">adwaita</link>
</para></listitem>

View file

@ -225,7 +225,7 @@ in {
Restart = "always";
RestartSec = 2;
};
restartTriggers = [ datadogPkg ] ++ attrNames etcfiles;
restartTriggers = [ datadogPkg ] ++ map (x: x.source) (attrValues etcfiles);
} attrs;
in {
datadog-agent = makeService {

View file

@ -1073,7 +1073,7 @@ in
systemd.services.systemd-networkd = {
wantedBy = [ "multi-user.target" ];
restartTriggers = attrNames unitFiles;
restartTriggers = map (x: x.source) (attrValues unitFiles);
# prevent race condition with interface renaming (#39069)
requires = [ "systemd-udev-settle.service" ];
after = [ "systemd-udev-settle.service" ];

View file

@ -593,6 +593,9 @@ in
each other's limit. The value may be specified in the following
units: s, min, h, ms, us. To turn off any kind of rate limiting,
set either value to 0.
See <option>services.journald.rateLimitBurst</option> for important
considerations when setting this value.
'';
};
@ -604,6 +607,19 @@ in
interval) that is applied to all messages generated on the system.
This rate limiting is applied per-service, so that two services
which log do not interfere with each other's limit.
Note that the effective rate limit is multiplied by a factor derived
from the available free disk space for the journal as described on
<link xlink:href="https://www.freedesktop.org/software/systemd/man/journald.conf.html">
journald.conf(5)</link>.
Note that the total amount of logs stored is limited by journald settings
such as <literal>SystemMaxUse</literal>, which defaults to a 4 GB cap.
It is thus recommended to compute what period of time that you will be
able to store logs for when an application logs at full burst rate.
With default settings for log lines that are 100 Bytes long, this can
amount to just a few hours.
'';
};

View file

@ -30,7 +30,7 @@ in
type = types.bool;
default = false;
description = ''
This option enables the common libpod container configuration module.
This option enables the common /etc/containers configuration module.
'';
};
@ -89,35 +89,10 @@ in
'';
};
libpod = mkOption {
default = {};
description = "Libpod configuration";
type = types.submodule {
options = {
extraConfig = mkOption {
type = types.lines;
default = "";
description = ''
Extra configuration that should be put in the libpod.conf
configuration file
'';
};
};
};
};
};
config = lib.mkIf cfg.enable {
environment.etc."containers/libpod.conf".text = ''
cni_plugin_dir = ["${pkgs.cni-plugins}/bin/"]
cni_config_dir = "/etc/cni/net.d/"
'' + cfg.libpod.extraConfig;
environment.etc."containers/registries.conf".source = toTOML "registries.conf" {
registries = lib.mapAttrs (n: v: { registries = v; }) cfg.registries;
};

View file

@ -6,6 +6,14 @@ let
cfg = config.virtualisation.cri-o;
in
{
imports = [
(mkRenamedOptionModule [ "virtualisation" "cri-o" "registries" ] [ "virtualisation" "containers" "registries" "search" ])
];
meta = {
maintainers = lib.teams.podman.members;
};
options.virtualisation.cri-o = {
enable = mkEnableOption "Container Runtime Interface for OCI (CRI-O)";
@ -32,17 +40,11 @@ in
default = "/pause";
description = "Pause command to be executed";
};
registries = mkOption {
type = types.listOf types.str;
default = [ "docker.io" "quay.io" ];
description = "Registries to be configured for unqualified image pull";
};
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs;
[ cri-o cri-tools conmon cni-plugins iptables runc utillinux ];
[ cri-o cri-tools conmon iptables runc utillinux ];
environment.etc."crictl.yaml".text = ''
runtime-endpoint: unix:///var/run/crio/crio.sock
'';
@ -53,9 +55,10 @@ in
[crio.image]
pause_image = "${cfg.pauseImage}"
pause_command = "${cfg.pauseCommand}"
registries = [
${concatMapStringsSep ", " (x: "\"" + x + "\"") cfg.registries}
]
[crio.network]
plugin_dirs = ["${pkgs.cni-plugins}/bin/"]
network_dir = "/etc/cni/net.d/"
[crio.runtime]
conmon = "${pkgs.conmon}/bin/conmon"
@ -81,7 +84,7 @@ in
}
'';
# Enable common container configuration, this will create policy.json
# Enable common /etc/containers configuration
virtualisation.containers.enable = true;
systemd.services.crio = {

View file

@ -54,6 +54,25 @@ in
'';
};
libpod = mkOption {
default = {};
description = "Libpod configuration";
type = types.submodule {
options = {
extraConfig = mkOption {
type = types.lines;
default = "";
description = ''
Extra configuration that should be put in the libpod.conf
configuration file
'';
};
};
};
};
};
config = lib.mkIf cfg.enable {
@ -66,13 +85,19 @@ in
pkgs.slirp4netns # User-mode networking for unprivileged namespaces
pkgs.fuse-overlayfs # CoW for images, much faster than default vfs
pkgs.utillinux # nsenter
pkgs.cni-plugins # Networking plugins
pkgs.iptables
]
++ lib.optional cfg.dockerCompat dockerCompat;
environment.etc."containers/libpod.conf".text = ''
cni_plugin_dir = ["${pkgs.cni-plugins}/bin/"]
cni_config_dir = "/etc/cni/net.d/"
'' + cfg.libpod.extraConfig;
environment.etc."cni/net.d/87-podman-bridge.conflist".source = copyFile "${pkgs.podman.src}/cni/87-podman-bridge.conflist";
# Enable common /etc/containers configuration
virtualisation.containers.enable = true;
};

View file

@ -29,7 +29,7 @@ let
boot.loader.grub.splashImage = null;
''}
boot.loader.grub.extraConfig = "serial; terminal_output.serial";
boot.loader.grub.extraConfig = "serial; terminal_output serial";
${if grubUseEfi then ''
boot.loader.grub.device = "nodev";
boot.loader.grub.efiSupport = true;

View file

@ -10,21 +10,51 @@ import ./make-test-python.nix (
nodes = {
podman =
{ pkgs, ... }:
{
virtualisation.podman.enable = true;
{
virtualisation.podman.enable = true;
virtualisation.containers.users = [
"alice"
];
users.users.alice = {
isNormalUser = true;
home = "/home/alice";
description = "Alice Foobar";
};
};
};
testScript = ''
start_all()
import shlex
def su_cmd(cmd):
cmd = shlex.quote(cmd)
return f"su alice -l -c {cmd}"
podman.wait_for_unit("sockets.target")
podman.succeed("tar cv --files-from /dev/null | podman import - scratchimg")
podman.succeed(
"podman run -d --name=sleeping -v /nix/store:/nix/store -v /run/current-system/sw/bin:/bin scratchimg /bin/sleep 10"
)
podman.succeed("podman ps | grep sleeping")
podman.succeed("podman stop sleeping")
start_all()
with subtest("Run container as root"):
podman.succeed("tar cv --files-from /dev/null | podman import - scratchimg")
podman.succeed(
"podman run -d --name=sleeping -v /nix/store:/nix/store -v /run/current-system/sw/bin:/bin scratchimg /bin/sleep 10"
)
podman.succeed("podman ps | grep sleeping")
podman.succeed("podman stop sleeping")
with subtest("Run container rootless"):
podman.succeed(su_cmd("tar cv --files-from /dev/null | podman import - scratchimg"))
podman.succeed(
su_cmd(
"podman run -d --name=sleeping -v /nix/store:/nix/store -v /run/current-system/sw/bin:/bin scratchimg /bin/sleep 10"
)
)
podman.succeed(su_cmd("podman ps | grep sleeping"))
podman.succeed(su_cmd("podman stop sleeping"))
'';
}
)

View file

@ -91,7 +91,7 @@ let
'';
meta = with stdenv.lib; {
homepage = "http://www.clementine-player.org";
homepage = "https://www.clementine-player.org";
description = "A multiplatform music player";
license = licenses.gpl3Plus;
platforms = platforms.linux;
@ -130,7 +130,7 @@ let
'';
enableParallelBuilding = true;
meta = with stdenv.lib; {
homepage = "http://www.clementine-player.org";
homepage = "https://www.clementine-player.org";
description = "Spotify integration for Clementine";
# The blob itself is Apache-licensed, although libspotify is unfree.
license = licenses.asl20;

View file

@ -0,0 +1,56 @@
{ cmake
, pkg-config
, alsaLib
, boost
, curl
, fetchFromGitHub
, ffmpeg
, lame
, libev
, libmicrohttpd
, ncurses
, pulseaudio
, stdenv
, taglib
, systemdSupport ? stdenv.isLinux, systemd
}:
stdenv.mkDerivation rec {
pname = "musikcube";
version = "0.90.1";
src = fetchFromGitHub {
owner = "clangen";
repo = pname;
rev = version;
sha256 = "1ff2cgbllrl2pl5zfbf0cd9qbf6hqpwr395sa1k245ar4f1rfwpg";
};
# https://github.com/clangen/musikcube/issues/339
patches = [ ./dont-strip.patch ];
nativeBuildInputs = [
cmake
pkg-config
];
buildInputs = [
alsaLib
boost
curl
ffmpeg
lame
libev
libmicrohttpd
ncurses
pulseaudio
taglib
] ++ stdenv.lib.optional systemdSupport systemd;
meta = with stdenv.lib; {
description = "A fully functional terminal-based music player, library, and streaming audio server";
homepage = "https://musikcube.com/";
maintainers = [ maintainers.aanderse ];
license = licenses.bsd3;
platforms = platforms.all;
};
}

View file

@ -0,0 +1,14 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a3e02666..7c43c7e6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -370,9 +370,3 @@ endif()
# they don't yet exist!
add_custom_target(postbuild ALL DEPENDS musikcube musikcubed)
add_custom_command(TARGET postbuild POST_BUILD COMMAND cmake .)
-
-# strip binaries in release mode
-if (CMAKE_BUILD_TYPE MATCHES Release)
- message(STATUS "stripping binaries...")
- add_custom_command(TARGET postbuild POST_BUILD COMMAND "${CMAKE_SOURCE_DIR}/strip-nix.sh")
-endif()

View file

@ -2,16 +2,16 @@
rustPlatform.buildRustPackage rec {
pname = "spotify-tui";
version = "0.17.1";
version = "0.18.0";
src = fetchFromGitHub {
owner = "Rigellute";
repo = "spotify-tui";
rev = "v${version}";
sha256 = "1gsddjinxmglm05hhphclax08d9pig1f0wjjs3bbcq096fydxgfs";
sha256 = "15icg332iyacdn4ydr4nivblayg4xkcnjh4f0sjnhj4q173v8fq2";
};
cargoSha256 = "1y398ypckk3gw1sfzf97xzwf5d5z3kxlcpn3bccmsfr59kvkf661";
cargoSha256 = "0rw8pj74k88rvcr18837g356lwsn2vdq384yma9df462xd2cw823";
nativeBuildInputs = [ pkgconfig ] ++ stdenv.lib.optionals stdenv.isLinux [ python3 ];
buildInputs = [ openssl ]

View file

@ -3,12 +3,12 @@
, libGLU, lv2, gtk2, cairo, pango, fftwFloat, zita-convolver }:
stdenv.mkDerivation rec {
version = "20200114";
version = "20200411";
pname = "x42-plugins";
src = fetchurl {
url = "https://gareus.org/misc/x42-plugins/${pname}-${version}.tar.xz";
sha256 = "02f8wnsl9wg7pgf4sshr0hdjfjkwln870ffgjmb01nqk37v7hiyn";
sha256 = "0y6778l2zc80kvp31mqw3vkcyi7g613jxn3g3lxqfa31i617gh6j";
};
nativeBuildInputs = [ pkgconfig ];
@ -26,8 +26,8 @@ stdenv.mkDerivation rec {
patchPhase = ''
patchShebangs ./stepseq.lv2/gridgen.sh
patchShebangs ./matrixmixer.lv2/genttl.sh #TODO: remove at next update, see https://github.com/x42/matrixmixer.lv2/issues/2
patchShebangs ./matrixmixer.lv2/genhead.sh #TODO: remove at next update, see https://github.com/x42/matrixmixer.lv2/issues/2
patchShebangs ./matrixmixer.lv2/genttl.sh
patchShebangs ./matrixmixer.lv2/genhead.sh
sed -i 's|/usr/include/zita-convolver.h|${zita-convolver}/include/zita-convolver.h|g' ./convoLV2/Makefile
'';

View file

@ -164,12 +164,120 @@ env NIXPKGS_ALLOW_BROKEN=1 nix-instantiate --show-trace ../../../../ -A emacsPac
ivy-rtags = fix-rtags super.ivy-rtags;
mandoku = super.mandoku.overrideAttrs (attrs: {
# searches for Git at build time
nativeBuildInputs =
(attrs.nativeBuildInputs or []) ++ [ external.git ];
});
mandoku-tls = super.mandoku-tls.overrideAttrs (attrs: {
# searches for Git at build time
nativeBuildInputs =
(attrs.nativeBuildInputs or []) ++ [ external.git ];
});
magit = super.magit.overrideAttrs (attrs: {
# searches for Git at build time
nativeBuildInputs =
(attrs.nativeBuildInputs or []) ++ [ external.git ];
});
magit-circleci = super.magit-circleci.overrideAttrs (attrs: {
# searches for Git at build time
nativeBuildInputs =
(attrs.nativeBuildInputs or []) ++ [ external.git ];
});
magit-diff-flycheck = super.magit-diff-flycheck.overrideAttrs (attrs: {
# searches for Git at build time
nativeBuildInputs =
(attrs.nativeBuildInputs or []) ++ [ external.git ];
});
magit-find-file = super.magit-find-file.overrideAttrs (attrs: {
# searches for Git at build time
nativeBuildInputs =
(attrs.nativeBuildInputs or []) ++ [ external.git ];
});
magit-gh-pulls = super.magit-gh-pulls.overrideAttrs (attrs: {
# searches for Git at build time
nativeBuildInputs =
(attrs.nativeBuildInputs or []) ++ [ external.git ];
});
magit-imerge = super.magit-imerge.overrideAttrs (attrs: {
# searches for Git at build time
nativeBuildInputs =
(attrs.nativeBuildInputs or []) ++ [ external.git ];
});
magit-lfs = super.magit-lfs.overrideAttrs (attrs: {
# searches for Git at build time
nativeBuildInputs =
(attrs.nativeBuildInputs or []) ++ [ external.git ];
});
magit-org-todos = super.magit-org-todos.overrideAttrs (attrs: {
# searches for Git at build time
nativeBuildInputs =
(attrs.nativeBuildInputs or []) ++ [ external.git ];
});
magit-p4 = super.magit-p4.overrideAttrs (attrs: {
# searches for Git at build time
nativeBuildInputs =
(attrs.nativeBuildInputs or []) ++ [ external.git ];
});
magit-patch-changelog = super.magit-patch-changelog.overrideAttrs (attrs: {
# searches for Git at build time
nativeBuildInputs =
(attrs.nativeBuildInputs or []) ++ [ external.git ];
});
magit-rbr = super.magit-rbr.overrideAttrs (attrs: {
# searches for Git at build time
nativeBuildInputs =
(attrs.nativeBuildInputs or []) ++ [ external.git ];
});
magit-reviewboard = super.magit-reviewboard.overrideAttrs (attrs: {
# searches for Git at build time
nativeBuildInputs =
(attrs.nativeBuildInputs or []) ++ [ external.git ];
});
magit-stgit = super.magit-stgit.overrideAttrs (attrs: {
# searches for Git at build time
nativeBuildInputs =
(attrs.nativeBuildInputs or []) ++ [ external.git ];
});
magit-tbdiff = super.magit-tbdiff.overrideAttrs (attrs: {
# searches for Git at build time
nativeBuildInputs =
(attrs.nativeBuildInputs or []) ++ [ external.git ];
});
magit-topgit = super.magit-topgit.overrideAttrs (attrs: {
# searches for Git at build time
nativeBuildInputs =
(attrs.nativeBuildInputs or []) ++ [ external.git ];
});
magit-vcsh = super.magit-vcsh.overrideAttrs (attrs: {
# searches for Git at build time
nativeBuildInputs =
(attrs.nativeBuildInputs or []) ++ [ external.git ];
});
magit-gerrit = super.magit-gerrit.overrideAttrs (attrs: {
# searches for Git at build time
nativeBuildInputs =
(attrs.nativeBuildInputs or []) ++ [ external.git ];
});
magit-annex = super.magit-annex.overrideAttrs (attrs: {
# searches for Git at build time
nativeBuildInputs =
@ -206,12 +314,24 @@ env NIXPKGS_ALLOW_BROKEN=1 nix-instantiate --show-trace ../../../../ -A emacsPac
(attrs.nativeBuildInputs or []) ++ [ external.git ];
});
kapacitor = super.kapacitor.overrideAttrs (attrs: {
# searches for Git at build time
nativeBuildInputs =
(attrs.nativeBuildInputs or []) ++ [ external.git ];
});
kubernetes = super.kubernetes.overrideAttrs (attrs: {
# searches for Git at build time
nativeBuildInputs =
(attrs.nativeBuildInputs or []) ++ [ external.git ];
});
kubernetes-evil = super.kubernetes-evil.overrideAttrs (attrs: {
# searches for Git at build time
nativeBuildInputs =
(attrs.nativeBuildInputs or []) ++ [ external.git ];
});
# upstream issue: missing file header
mhc = super.mhc.override {
inherit (self.melpaPackages) calfw;

View file

@ -62,7 +62,7 @@ stdenv.mkDerivation rec {
description = "A minimal Markdown reading & writing app";
homepage = "https://typora.io";
license = licenses.unfree;
maintainers = with maintainers; [ jensbin worldofpeace ];
maintainers = with maintainers; [ jensbin ];
platforms = [ "x86_64-linux"];
};
}

View file

@ -41,6 +41,13 @@ with python3.pkgs; buildPythonApplication rec {
checkInputs = [ pytest glibcLocales ];
LC_ALL = "en_US.UTF-8";
postPatch = ''
sed -i \
-e "s/Invalid value for \"ics\"/Invalid value for \\\'ics\\\'/" \
-e "s/Invalid value for \"\[ICS\]\"/Invalid value for \\\'\[ICS\]\\\'/" \
tests/cli_test.py
'';
postInstall = ''
# zsh completion
install -D misc/__khal $out/share/zsh/site-functions/__khal

View file

@ -20,14 +20,14 @@
with python3Packages;
buildPythonApplication rec {
pname = "kitty";
version = "0.17.2";
version = "0.17.3";
format = "other";
src = fetchFromGitHub {
owner = "kovidgoyal";
repo = "kitty";
rev = "v${version}";
sha256 = "0xiwz89ynhh8aj0c9jbqfsxf129hnzs0gz4bzcparnjisq2sh3cq";
sha256 = "1nx8gjavq8kc656ayh3wign1f68b46jbnmy8zyks25wg0p9gid8l";
};
buildInputs = [

View file

@ -1,5 +1,5 @@
{ buildPythonApplication, lib, fetchFromGitHub, fetchpatch
, wrapGAppsHook, gobject-introspection, gnome-desktop, libnotify, libgnome-keyring, pango
, wrapGAppsHook, gobject-introspection, glib-networking, gnome-desktop, libnotify, libgnome-keyring, pango
, gdk-pixbuf, atk, webkitgtk, gst_all_1
, dbus-python, evdev, pyyaml, pygobject3, requests, pillow
, xrandr, pciutils, psmisc, glxinfo, vulkan-tools, xboxdrv, pulseaudio, p7zip, xgamma
@ -40,8 +40,9 @@ in buildPythonApplication rec {
sha256 = "1g093g0difnkjmnm91p20issdsxn9ri4c56zzddj5wfrbmhwdfag";
};
nativeBuildInputs = [ wrapGAppsHook ];
buildInputs = [
wrapGAppsHook gobject-introspection gnome-desktop libnotify libgnome-keyring pango
gobject-introspection glib-networking gnome-desktop libnotify libgnome-keyring pango
gdk-pixbuf atk webkitgtk
] ++ gstDeps;

View file

@ -0,0 +1,94 @@
{ stdenv, mkChromiumDerivation, channel, enableWideVine }:
with stdenv.lib;
mkChromiumDerivation (base: rec {
name = "chromium-browser";
packageName = "chromium";
buildTargets = [ "mksnapshot" "chrome_sandbox" "chrome" ];
outputs = ["out" "sandbox"];
sandboxExecutableName = "__chromium-suid-sandbox";
installPhase = ''
mkdir -p "$libExecPath"
cp -v "$buildPath/"*.pak "$buildPath/"*.bin "$libExecPath/"
cp -v "$buildPath/icudtl.dat" "$libExecPath/"
cp -vLR "$buildPath/locales" "$buildPath/resources" "$libExecPath/"
cp -v "$buildPath/chrome" "$libExecPath/$packageName"
# Swiftshader
# See https://stackoverflow.com/a/4264351/263061 for the find invocation.
if [ -n "$(find "$buildPath/swiftshader/" -maxdepth 1 -name '*.so' -print -quit)" ]; then
echo "Swiftshader files found; installing"
mkdir -p "$libExecPath/swiftshader"
cp -v "$buildPath/swiftshader/"*.so "$libExecPath/swiftshader/"
else
echo "Swiftshader files not found"
fi
mkdir -p "$sandbox/bin"
cp -v "$buildPath/chrome_sandbox" "$sandbox/bin/${sandboxExecutableName}"
mkdir -vp "$out/share/man/man1"
cp -v "$buildPath/chrome.1" "$out/share/man/man1/$packageName.1"
for icon_file in chrome/app/theme/chromium/product_logo_*[0-9].png; do
num_and_suffix="''${icon_file##*logo_}"
icon_size="''${num_and_suffix%.*}"
expr "$icon_size" : "^[0-9][0-9]*$" || continue
logo_output_prefix="$out/share/icons/hicolor"
logo_output_path="$logo_output_prefix/''${icon_size}x''${icon_size}/apps"
mkdir -vp "$logo_output_path"
cp -v "$icon_file" "$logo_output_path/$packageName.png"
done
# Install Desktop Entry
install -D chrome/installer/linux/common/desktop.template \
$out/share/applications/chromium-browser.desktop
substituteInPlace $out/share/applications/chromium-browser.desktop \
--replace "@@MENUNAME@@" "Chromium" \
--replace "@@PACKAGE@@" "chromium" \
--replace "Exec=/usr/bin/@@USR_BIN_SYMLINK_NAME@@" "Exec=chromium"
# Append more mime types to the end
sed -i '/^MimeType=/ s,$,x-scheme-handler/webcal;x-scheme-handler/mailto;x-scheme-handler/about;x-scheme-handler/unknown,' \
$out/share/applications/chromium-browser.desktop
# See https://github.com/NixOS/nixpkgs/issues/12433
sed -i \
-e '/\[Desktop Entry\]/a\' \
-e 'StartupWMClass=chromium-browser' \
$out/share/applications/chromium-browser.desktop
'';
passthru = { inherit sandboxExecutableName; };
requiredSystemFeatures = [ "big-parallel" ];
meta = {
description = "An open source web browser from Google, with dependencies on Google web services removed";
longDescription = ''
Chromium is an open source web browser from Google that aims to build a
safer, faster, and more stable way for all Internet users to experience
the web. It has a minimalist user interface and provides the vast majority
of source code for Google Chrome (which has some additional features).
'';
homepage = https://github.com/Eloston/ungoogled-chromium;
maintainers = with maintainers; [ squalus ];
# Overview of the maintainer roles:
# nixos-unstable:
# - TODO: Need a new maintainer for x86_64 [0]
# - @thefloweringash: aarch64
# - @primeos: Provisional maintainer (x86_64)
# Stable channel:
# - TODO (need someone to test backports [0])
# [0]: https://github.com/NixOS/nixpkgs/issues/78450
license = if enableWideVine then licenses.unfree else licenses.bsd3;
platforms = platforms.linux;
hydraPlatforms = if channel == "stable" then ["aarch64-linux" "x86_64-linux"] else [];
timeout = 172800; # 48 hours
};
})

View file

@ -0,0 +1,361 @@
{ stdenv, llvmPackages, gnChromium, ninja, which, nodejs, fetchpatch, gnutar
# default dependencies
, bzip2, flac, speex, libopus
, libevent, expat, libjpeg, snappy
, libpng, libcap
, xdg_utils, yasm, minizip, libwebp
, libusb1, pciutils, nss, re2, zlib
, python2Packages, perl, pkgconfig
, nspr, systemd, kerberos
, utillinux, alsaLib
, bison, gperf
, glib, gtk3, dbus-glib
, glibc
, libXScrnSaver, libXcursor, libXtst, libGLU, libGL
, protobuf, speechd, libXdamage, cups
, ffmpeg, libxslt, libxml2, at-spi2-core
, jre
# optional dependencies
, libgcrypt ? null # gnomeSupport || cupsSupport
, libva ? null # useVaapi
, libdrm ? null, wayland ? null, mesa_drivers ? null, libxkbcommon ? null # useOzone
# package customization
, useVaapi ? false
, useOzone ? false
, gnomeSupport ? false, gnome ? null
, gnomeKeyringSupport ? false, libgnome-keyring3 ? null
, proprietaryCodecs ? true
, cupsSupport ? true
, pulseSupport ? false, libpulseaudio ? null
, ungoogled-chromium
, ungoogled ? false
, upstream-info
}:
buildFun:
with stdenv.lib;
# see http://www.linuxfromscratch.org/blfs/view/cvs/xsoft/chromium.html
let
# The additional attributes for creating derivations based on the chromium
# source tree.
extraAttrs = buildFun base;
githubPatch = commit: sha256: fetchpatch {
url = "https://github.com/chromium/chromium/commit/${commit}.patch";
inherit sha256;
};
mkGnFlags =
let
# Serialize Nix types into GN types according to this document:
# https://chromium.googlesource.com/chromium/src/+/master/tools/gn/docs/language.md
mkGnString = value: "\"${escape ["\"" "$" "\\"] value}\"";
sanitize = value:
if value == true then "true"
else if value == false then "false"
else if isList value then "[${concatMapStringsSep ", " sanitize value}]"
else if isInt value then toString value
else if isString value then mkGnString value
else throw "Unsupported type for GN value `${value}'.";
toFlag = key: value: "${key}=${sanitize value}";
in attrs: concatStringsSep " " (attrValues (mapAttrs toFlag attrs));
gnSystemLibraries = [
"flac" "libwebp" "libxslt" "yasm" "opus" "snappy" "libpng"
# "zlib" # version 77 reports unresolved dependency on //third_party/zlib:zlib_config
# "libjpeg" # fails with multiple undefined references to chromium_jpeg_*
# "re2" # fails with linker errors
# "ffmpeg" # https://crbug.com/731766
# "harfbuzz-ng" # in versions over 63 harfbuzz and freetype are being built together
# so we can't build with one from system and other from source
];
opusWithCustomModes = libopus.override {
withCustomModes = true;
};
defaultDependencies = [
bzip2 flac speex opusWithCustomModes
libevent expat libjpeg snappy
libpng libcap
xdg_utils yasm minizip libwebp
libusb1 re2 zlib
ffmpeg libxslt libxml2
# harfbuzz # in versions over 63 harfbuzz and freetype are being built together
# so we can't build with one from system and other from source
];
# build paths and release info
packageName = extraAttrs.packageName or extraAttrs.name;
buildType = "Release";
buildPath = "out/${buildType}";
libExecPath = "$out/libexec/${packageName}";
versionRange = min-version: upto-version:
let inherit (upstream-info) version;
result = versionAtLeast version min-version && versionOlder version upto-version;
stable-version = (import ./upstream-info.nix).stable.version;
in if versionAtLeast stable-version upto-version
then warn "chromium: stable version ${stable-version} is newer than a patchset bounded at ${upto-version}. You can safely delete it."
result
else result;
ungoogler =
let versionEntry = (import ./ungoogled-src.nix)."${upstream-info.version}";
in ungoogled-chromium {
inherit (versionEntry) rev sha256;
};
base = rec {
name = "${packageName}-unwrapped-${version}";
inherit (upstream-info) channel version;
inherit packageName buildType buildPath;
src = upstream-info.main;
nativeBuildInputs = [
ninja which python2Packages.python perl pkgconfig
python2Packages.ply python2Packages.jinja2 nodejs
gnutar
] ++ optional (versionAtLeast version "83") python2Packages.setuptools;
buildInputs = defaultDependencies ++ [
nspr nss systemd
utillinux alsaLib
bison gperf kerberos
glib gtk3 dbus-glib
libXScrnSaver libXcursor libXtst libGLU libGL
pciutils protobuf speechd libXdamage at-spi2-core
jre
] ++ optional gnomeKeyringSupport libgnome-keyring3
++ optionals gnomeSupport [ gnome.GConf libgcrypt ]
++ optionals cupsSupport [ libgcrypt cups ]
++ optional useVaapi libva
++ optional pulseSupport libpulseaudio
++ optionals useOzone [ libdrm wayland mesa_drivers libxkbcommon ];
patches = [
./patches/nix_plugin_paths_68.patch
./patches/remove-webp-include-69.patch
./patches/no-build-timestamps.patch
./patches/widevine-79.patch
./patches/dont-use-ANGLE-by-default.patch
# Unfortunately, chromium regularly breaks on major updates and
# then needs various patches backported in order to be compiled with GCC.
# Good sources for such patches and other hints:
# - https://gitweb.gentoo.org/repo/gentoo.git/plain/www-client/chromium/
# - https://git.archlinux.org/svntogit/packages.git/tree/trunk?h=packages/chromium
# - https://github.com/chromium/chromium/search?q=GCC&s=committer-date&type=Commits
#
# ++ optionals (channel == "dev") [ ( githubPatch "<patch>" "0000000000000000000000000000000000000000000000000000000000000000" ) ]
# ++ optional (versionRange "68" "72") ( githubPatch "<patch>" "0000000000000000000000000000000000000000000000000000000000000000" )
] ++ optionals (useVaapi) ([
# source: https://aur.archlinux.org/cgit/aur.git/tree/vaapi-fix.patch?h=chromium-vaapi
./patches/vaapi-fix.patch
] ++ optionals (versionRange "81" "82") [
(githubPatch "5b2ff215473e0526b5b24aeff4ad90d369b21c75" "0n00vh8wfpn2ay5fqsxcsx0zadnv7mihm72bcvnrfzh75nzbg902")
(githubPatch "98e343ab369e4262511b5fce547728e3e5eefba8" "00wwp653jk0k0yvix00vr7ymgck9dj7fxjwx4nc67ynn84dh6064")
]);
postPatch = ''
# We want to be able to specify where the sandbox is via CHROME_DEVEL_SANDBOX
substituteInPlace sandbox/linux/suid/client/setuid_sandbox_host.cc \
--replace \
'return sandbox_binary;' \
'return base::FilePath(GetDevelSandboxPath());'
substituteInPlace services/audio/audio_sandbox_hook_linux.cc \
--replace \
'/usr/share/alsa/' \
'${alsaLib}/share/alsa/' \
--replace \
'/usr/lib/x86_64-linux-gnu/gconv/' \
'${glibc}/lib/gconv/' \
--replace \
'/usr/share/locale/' \
'${glibc}/share/locale/'
sed -i -e 's@"\(#!\)\?.*xdg-@"\1${xdg_utils}/bin/xdg-@' \
chrome/browser/shell_integration_linux.cc
sed -i -e '/lib_loader.*Load/s!"\(libudev\.so\)!"${systemd.lib}/lib/\1!' \
device/udev_linux/udev?_loader.cc
sed -i -e '/libpci_loader.*Load/s!"\(libpci\.so\)!"${pciutils}/lib/\1!' \
gpu/config/gpu_info_collector_linux.cc
sed -i -re 's/([^:])\<(isnan *\()/\1std::\2/g' \
chrome/browser/ui/webui/engagement/site_engagement_ui.cc
sed -i -e '/#include/ {
i #include <algorithm>
:l; n; bl
}' gpu/config/gpu_control_list.cc
# Allow to put extensions into the system-path.
sed -i -e 's,/usr,/run/current-system/sw,' chrome/common/chrome_paths.cc
patchShebangs .
# use our own nodejs
mkdir -p third_party/node/linux/node-linux-x64/bin
ln -s $(which node) third_party/node/linux/node-linux-x64/bin/node
# remove unused third-party
# in third_party/crashpad third_party/zlib contains just a header-adapter
for lib in ${toString gnSystemLibraries}; do
find -type f -path "*third_party/$lib/*" \
\! -path "*third_party/crashpad/crashpad/third_party/zlib/*" \
\! -path "*third_party/$lib/chromium/*" \
\! -path "*third_party/$lib/google/*" \
\! -path "*base/third_party/icu/*" \
\! -path "*base/third_party/libevent/*" \
\! -regex '.*\.\(gn\|gni\|isolate\|py\)' \
-delete
done
'' + optionalString stdenv.isAarch64 ''
substituteInPlace build/toolchain/linux/BUILD.gn \
--replace 'toolprefix = "aarch64-linux-gnu-"' 'toolprefix = ""'
'' + optionalString stdenv.cc.isClang ''
mkdir -p third_party/llvm-build/Release+Asserts/bin
ln -s ${stdenv.cc}/bin/clang third_party/llvm-build/Release+Asserts/bin/clang
ln -s ${stdenv.cc}/bin/clang++ third_party/llvm-build/Release+Asserts/bin/clang++
ln -s ${llvmPackages.llvm}/bin/llvm-ar third_party/llvm-build/Release+Asserts/bin/llvm-ar
'' + optionalString ungoogled ''
${ungoogler}/utils/prune_binaries.py . ${ungoogler}/pruning.list || echo "some errors"
${ungoogler}/utils/patches.py . ${ungoogler}/patches
${ungoogler}/utils/domain_substitution.py apply -r ${ungoogler}/domain_regex.list -f ${ungoogler}/domain_substitution.list -c ./ungoogled-domsubcache.tar.gz .
'';
gnFlags = mkGnFlags ({
linux_use_bundled_binutils = false;
use_lld = false;
use_gold = true;
gold_path = "${stdenv.cc}/bin";
is_debug = false;
proprietary_codecs = false;
use_sysroot = false;
use_gnome_keyring = gnomeKeyringSupport;
use_gio = gnomeSupport;
# ninja: error: '../../native_client/toolchain/linux_x86/pnacl_newlib/bin/x86_64-nacl-objcopy',
# needed by 'nacl_irt_x86_64.nexe', missing and no known rule to make it
enable_nacl = false;
# Enabling the Widevine component here doesn't affect whether we can
# redistribute the chromium package; the Widevine component is either
# added later in the wrapped -wv build or downloaded from Google.
enable_widevine = true;
use_cups = cupsSupport;
treat_warnings_as_errors = false;
is_clang = stdenv.cc.isClang;
clang_use_chrome_plugins = false;
blink_symbol_level = 0;
fieldtrial_testing_like_official_build = true;
# Google API keys, see:
# http://www.chromium.org/developers/how-tos/api-keys
# Note: These are for NixOS/nixpkgs use ONLY. For your own distribution,
# please get your own set of keys.
google_api_key = "AIzaSyDGi15Zwl11UNe6Y-5XW_upsfyw31qwZPI";
google_default_client_id = "404761575300.apps.googleusercontent.com";
google_default_client_secret = "9rIFQjfnkykEmqb6FfjJQD1D";
} // optionalAttrs proprietaryCodecs {
# enable support for the H.264 codec
proprietary_codecs = true;
enable_hangout_services_extension = true;
ffmpeg_branding = "Chrome";
} // optionalAttrs useVaapi {
use_vaapi = true;
} // optionalAttrs pulseSupport {
use_pulseaudio = true;
link_pulseaudio = true;
} // optionalAttrs useOzone {
use_ozone = true;
ozone_platform_gbm = false;
use_xkbcommon = true;
use_glib = true;
use_gtk = true;
use_system_libwayland = true;
use_system_minigbm = true;
use_system_libdrm = true;
system_wayland_scanner_path = "${wayland}/bin/wayland-scanner";
} // optionalAttrs ungoogled {
closure_compile = false;
enable_hangout_services_extension = false;
enable_mdns = false;
enable_nacl_nonsfi = false;
enable_one_click_signin = false;
enable_reading_list = false;
enable_remoting = false;
enable_reporting = false;
enable_service_discovery = false;
exclude_unwind_tables = true;
google_api_key = "";
google_default_client_id = "";
google_default_client_secret = "";
optimize_webui = false;
safe_browsing_mode = 0;
use_official_google_api_keys = false;
use_unofficial_version_number = false;
} // (extraAttrs.gnFlags or {}));
configurePhase = ''
runHook preConfigure
# This is to ensure expansion of $out.
libExecPath="${libExecPath}"
python build/linux/unbundle/replace_gn_files.py \
--system-libraries ${toString gnSystemLibraries}
${gnChromium}/bin/gn gen --args=${escapeShellArg gnFlags} out/Release | tee gn-gen-outputs.txt
# Fail if `gn gen` contains a WARNING.
grep -o WARNING gn-gen-outputs.txt && echo "Found gn WARNING, exiting nix build" && exit 1
runHook postConfigure
'';
# Don't spam warnings about unknown warning options. This is useful because
# our Clang is always older than Chromium's and the build logs have a size
# of approx. 25 MB without this option (and this saves e.g. 66 %).
NIX_CFLAGS_COMPILE = "-Wno-unknown-warning-option";
buildPhase = let
# Build paralelism: on Hydra the build was frequently running into memory
# exhaustion, and even other users might be running into similar issues.
# -j is halved to avoid memory problems, and -l is slightly increased
# so that the build gets slight preference before others
# (it will often be on "critical path" and at risk of timing out)
buildCommand = target: ''
ninja -C "${buildPath}" \
-j$(( ($NIX_BUILD_CORES+1) / 2 )) -l$(( $NIX_BUILD_CORES+1 )) \
"${target}"
(
source chrome/installer/linux/common/installer.include
PACKAGE=$packageName
MENUNAME="Chromium"
process_template chrome/app/resources/manpage.1.in "${buildPath}/chrome.1"
)
'';
targets = extraAttrs.buildTargets or [];
commands = map buildCommand targets;
in concatStringsSep "\n" commands;
postFixup = ''
# Make sure that libGLESv2 is found by dlopen (if using EGL).
chromiumBinary="$libExecPath/$packageName"
origRpath="$(patchelf --print-rpath "$chromiumBinary")"
patchelf --set-rpath "${libGL}/lib:$origRpath" "$chromiumBinary"
'';
};
# Remove some extraAttrs we supplied to the base attributes already.
in stdenv.mkDerivation (base // removeAttrs extraAttrs [
"name" "gnFlags" "buildTargets"
])

View file

@ -0,0 +1,205 @@
{ newScope, config, stdenv, llvmPackages_9, llvmPackages_10
, makeWrapper, ed
, glib, gtk3, gnome3, gsettings-desktop-schemas, gn, fetchgit
, libva ? null
, gcc, nspr, nss, patchelfUnstable, runCommand
, lib
# package customization
, channel ? "stable"
, gnomeSupport ? false, gnome ? null
, gnomeKeyringSupport ? false
, proprietaryCodecs ? true
, enablePepperFlash ? false
, enableWideVine ? false
, ungoogled ? true
, useVaapi ? false # test video on radeon, before enabling this
, useOzone ? false
, cupsSupport ? true
, pulseSupport ? config.pulseaudio or stdenv.isLinux
, commandLineArgs ? ""
}:
let
llvmPackages = if channel == "dev"
then llvmPackages_10
else llvmPackages_9;
stdenv = llvmPackages.stdenv;
callPackage = newScope chromium;
chromium = {
inherit stdenv llvmPackages;
upstream-info = (callPackage ./update.nix {}).getChannel channel;
mkChromiumDerivation = callPackage ./common.nix ({
inherit gnome gnomeSupport gnomeKeyringSupport proprietaryCodecs cupsSupport pulseSupport useVaapi useOzone ungoogled;
gnChromium = gn;
} // lib.optionalAttrs (channel == "dev") {
# TODO: Remove after we can update gn for the stable channel (backward incompatible changes):
gnChromium = gn.overrideAttrs (oldAttrs: {
version = "2020-03-23";
src = fetchgit {
url = "https://gn.googlesource.com/gn";
rev = "5ed3c9cc67b090d5e311e4bd2aba072173e82db9";
sha256 = "00y2d35wvqmx9glaqhfb62wdgbfpwr77v0934nnvh9ks71vnsjqy";
};
});
});
browser = callPackage ./browser.nix { inherit channel enableWideVine; };
plugins = callPackage ./plugins.nix {
inherit enablePepperFlash;
};
ungoogled-chromium = callPackage ./ungoogled.nix {};
};
mkrpath = p: "${lib.makeSearchPathOutput "lib" "lib64" p}:${lib.makeLibraryPath p}";
widevineCdm = let upstream-info = chromium.upstream-info; in stdenv.mkDerivation {
name = "chrome-widevine-cdm";
# The .deb file for Google Chrome
src = upstream-info.binary;
nativeBuildInputs = [ patchelfUnstable ];
phases = [ "unpackPhase" "patchPhase" "installPhase" "checkPhase" ];
unpackCmd = let
widevineCdmPath =
if upstream-info.channel == "stable" then
"./opt/google/chrome/WidevineCdm"
else if upstream-info.channel == "beta" then
"./opt/google/chrome-beta/WidevineCdm"
else if upstream-info.channel == "dev" then
"./opt/google/chrome-unstable/WidevineCdm"
else
throw "Unknown chromium channel.";
in ''
# Extract just WidevineCdm from upstream's .deb file
ar p "$src" data.tar.xz | tar xJ "${widevineCdmPath}"
# Move things around so that we don't have to reference a particular
# chrome-* directory later.
mv "${widevineCdmPath}" ./
# unpackCmd wants a single output directory; let it take WidevineCdm/
rm -rf opt
'';
doCheck = true;
checkPhase = ''
! find -iname '*.so' -exec ldd {} + | grep 'not found'
'';
PATCH_RPATH = mkrpath [ gcc.cc glib nspr nss ];
patchPhase = ''
patchelf --set-rpath "$PATCH_RPATH" _platform_specific/linux_x64/libwidevinecdm.so
'';
installPhase = ''
mkdir -p $out/WidevineCdm
cp -a * $out/WidevineCdm/
'';
meta = {
platforms = [ "x86_64-linux" ];
license = lib.licenses.unfree;
};
};
suffix = if channel != "stable" then "-" + channel else "";
sandboxExecutableName = chromium.browser.passthru.sandboxExecutableName;
version = chromium.browser.version;
# We want users to be able to enableWideVine without rebuilding all of
# chromium, so we have a separate derivation here that copies chromium
# and adds the unfree WidevineCdm.
chromiumWV = let browser = chromium.browser; in if enableWideVine then
runCommand (browser.name + "-wv") { version = browser.version; }
''
mkdir -p $out
cp -a ${browser}/* $out/
chmod u+w $out/libexec/chromium
cp -a ${widevineCdm}/WidevineCdm $out/libexec/chromium/
''
else browser;
in stdenv.mkDerivation {
name = "chromium${suffix}-${version}";
inherit version;
buildInputs = [
makeWrapper ed
# needed for GSETTINGS_SCHEMAS_PATH
gsettings-desktop-schemas glib gtk3
# needed for XDG_ICON_DIRS
gnome3.adwaita-icon-theme
];
outputs = ["out" "sandbox"];
buildCommand = let
browserBinary = "${chromiumWV}/libexec/chromium/chromium";
getWrapperFlags = plugin: "$(< \"${plugin}/nix-support/wrapper-flags\")";
libPath = stdenv.lib.makeLibraryPath ([]
++ stdenv.lib.optional useVaapi libva
);
in with stdenv.lib; ''
mkdir -p "$out/bin"
eval makeWrapper "${browserBinary}" "$out/bin/chromium" \
--add-flags ${escapeShellArg (escapeShellArg commandLineArgs)} \
${concatMapStringsSep " " getWrapperFlags chromium.plugins.enabled}
ed -v -s "$out/bin/chromium" << EOF
2i
if [ -x "/run/wrappers/bin/${sandboxExecutableName}" ]
then
export CHROME_DEVEL_SANDBOX="/run/wrappers/bin/${sandboxExecutableName}"
else
export CHROME_DEVEL_SANDBOX="$sandbox/bin/${sandboxExecutableName}"
fi
'' + lib.optionalString (libPath != "") ''
# To avoid loading .so files from cwd, LD_LIBRARY_PATH here must not
# contain an empty section before or after a colon.
export LD_LIBRARY_PATH="\$LD_LIBRARY_PATH\''${LD_LIBRARY_PATH:+:}${libPath}"
'' + ''
# libredirect causes chromium to deadlock on startup
export LD_PRELOAD="\$(echo -n "\$LD_PRELOAD" | tr ':' '\n' | grep -v /lib/libredirect\\\\.so$ | tr '\n' ':')"
export XDG_DATA_DIRS=$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH\''${XDG_DATA_DIRS:+:}\$XDG_DATA_DIRS
.
w
EOF
ln -sv "${chromium.browser.sandbox}" "$sandbox"
ln -s "$out/bin/chromium" "$out/bin/chromium-browser"
mkdir -p "$out/share"
for f in '${chromium.browser}'/share/*; do # hello emacs */
ln -s -t "$out/share/" "$f"
done
'';
inherit (chromium.browser) packageName;
meta = chromium.browser.meta;
passthru = {
inherit (chromium) upstream-info browser;
mkDerivation = chromium.mkChromiumDerivation;
inherit sandboxExecutableName;
};
}

View file

@ -0,0 +1,26 @@
A field trial currently enables the passthrough command decoder, which causes
gl_factory.cc to try kGLImplementationEGLANGLE first, which causes Chromium to fail
to load libGLESv2.so on NixOS. It somehow does not try kGLImplementationDesktopGL,
and so there is no GL support at all.
Revert to using the validating command decoder, which prevents gl_factory.cc
from touching allowed_impls, allowing it to successfully use kGLImplementationDesktopGL.
diff --git a/ui/gl/gl_utils.cc b/ui/gl/gl_utils.cc
index 697cbed5fe2d..8419bdb21a2f 100644
--- a/ui/gl/gl_utils.cc
+++ b/ui/gl/gl_utils.cc
@@ -71,9 +71,10 @@ bool UsePassthroughCommandDecoder(const base::CommandLine* command_line) {
} else if (switch_value == kCmdDecoderValidatingName) {
return false;
} else {
- // Unrecognized or missing switch, use the default.
- return base::FeatureList::IsEnabled(
- features::kDefaultPassthroughCommandDecoder);
+ // Ignore the field trial that enables it; disable it until
+ // gl_factory.cc kGLImplementationEGLANGLE issues are sorted
+ // out on NixOS.
+ return false;
}
}
}

View file

@ -0,0 +1,61 @@
diff --git a/chrome/common/chrome_paths.cc b/chrome/common/chrome_paths.cc
index f4e119d..d9775bd 100644
--- a/chrome/common/chrome_paths.cc
+++ b/chrome/common/chrome_paths.cc
@@ -68,21 +68,14 @@ static base::LazyInstance<base::FilePath>
g_invalid_specified_user_data_dir = LAZY_INSTANCE_INITIALIZER;
// Gets the path for internal plugins.
-bool GetInternalPluginsDirectory(base::FilePath* result) {
-#if defined(OS_MACOSX)
- // If called from Chrome, get internal plugins from a subdirectory of the
- // framework.
- if (base::mac::AmIBundled()) {
- *result = chrome::GetFrameworkBundlePath();
- DCHECK(!result->empty());
- *result = result->Append("Internet Plug-Ins");
- return true;
- }
- // In tests, just look in the module directory (below).
-#endif
-
- // The rest of the world expects plugins in the module directory.
- return base::PathService::Get(base::DIR_MODULE, result);
+bool GetInternalPluginsDirectory(base::FilePath* result,
+ const std::string& ident) {
+ std::string full_env = std::string("NIX_CHROMIUM_PLUGIN_PATH_") + ident;
+ const char* value = getenv(full_env.c_str());
+ if (value == NULL)
+ return base::PathService::Get(base::DIR_MODULE, result);
+ else
+ *result = base::FilePath(value);
}
// Gets the path for bundled implementations of components. Note that these
@@ -272,7 +265,7 @@ bool PathProvider(int key, base::FilePath* result) {
create_dir = true;
break;
case chrome::DIR_INTERNAL_PLUGINS:
- if (!GetInternalPluginsDirectory(&cur))
+ if (!GetInternalPluginsDirectory(&cur, "ALL"))
return false;
break;
case chrome::DIR_COMPONENTS:
@@ -280,7 +273,7 @@ bool PathProvider(int key, base::FilePath* result) {
return false;
break;
case chrome::DIR_PEPPER_FLASH_PLUGIN:
- if (!GetInternalPluginsDirectory(&cur))
+ if (!GetInternalPluginsDirectory(&cur, "PEPPERFLASH"))
return false;
cur = cur.Append(kPepperFlashBaseDirectory);
break;
@@ -358,7 +351,7 @@ bool PathProvider(int key, base::FilePath* result) {
cur = cur.DirName();
}
#else
- if (!GetInternalPluginsDirectory(&cur))
+ if (!GetInternalPluginsDirectory(&cur, "PNACL"))
return false;
#endif
cur = cur.Append(FILE_PATH_LITERAL("pnacl"));

View file

@ -0,0 +1,17 @@
--- chromium-70.0.3538.67/build/compute_build_timestamp.py.orig 2018-11-02 16:00:34.368933077 +0200
+++ chromium-70.0.3538.67/build/compute_build_timestamp.py 2018-11-08 04:06:21.658105129 +0200
@@ -94,6 +94,14 @@
'build_type', help='The type of build', choices=('official', 'default'))
args = argument_parser.parse_args()
+ # I don't trust LASTCHANGE magic, and I definelly want something deterministic here
+ SOURCE_DATE_EPOCH = os.getenv("SOURCE_DATE_EPOCH", None)
+ if SOURCE_DATE_EPOCH is not None:
+ print(SOURCE_DATE_EPOCH)
+ return 0
+ else:
+ raise RuntimeError("SOURCE_DATE_EPOCH not set")
+
# The mtime of the revision in build/util/LASTCHANGE is stored in a file
# next to it. Read it, to get a deterministic time close to "now".
# That date is then modified as described at the top of the file so that

View file

@ -0,0 +1,11 @@
--- a/third_party/blink/renderer/platform/image-encoders/image_encoder.cc
+++ b/third_party/blink/renderer/platform/image-encoders/image_encoder.cc
@@ -13,7 +13,7 @@
#include "jpeglib.h" // for JPEG_MAX_DIMENSION
-#include "third_party/libwebp/src/webp/encode.h" // for WEBP_MAX_DIMENSION
+#define WEBP_MAX_DIMENSION 16383
namespace blink {

View file

@ -0,0 +1,74 @@
--- a/media/gpu/vaapi/vaapi_video_decode_accelerator.cc
+++ b/media/gpu/vaapi/vaapi_video_decode_accelerator.cc
@@ -641,6 +641,7 @@ void VaapiVideoDecodeAccelerator::AssignPictureBuffers(
// |vpp_vaapi_wrapper_| for VaapiPicture to DownloadFromSurface() the VA's
// internal decoded frame.
if (buffer_allocation_mode_ != BufferAllocationMode::kNone &&
+ buffer_allocation_mode_ != BufferAllocationMode::kWrapVdpau &&
!vpp_vaapi_wrapper_) {
vpp_vaapi_wrapper_ = VaapiWrapper::Create(
VaapiWrapper::kVideoProcess, VAProfileNone,
@@ -665,7 +666,8 @@ void VaapiVideoDecodeAccelerator::AssignPictureBuffers(
PictureBuffer buffer = buffers[i];
buffer.set_size(requested_pic_size_);
std::unique_ptr<VaapiPicture> picture = vaapi_picture_factory_->Create(
- (buffer_allocation_mode_ == BufferAllocationMode::kNone)
+ ((buffer_allocation_mode_ == BufferAllocationMode::kNone) ||
+ (buffer_allocation_mode_ == BufferAllocationMode::kWrapVdpau))
? vaapi_wrapper_
: vpp_vaapi_wrapper_,
make_context_current_cb_, bind_image_cb_, buffer);
@@ -1093,6 +1095,12 @@ VaapiVideoDecodeAccelerator::GetSupportedProfiles() {
VaapiVideoDecodeAccelerator::BufferAllocationMode
VaapiVideoDecodeAccelerator::DecideBufferAllocationMode() {
+ // NVIDIA blobs use VDPAU
+ if (VaapiWrapper::GetImplementationType() == VAImplementation::kNVIDIAVDPAU) {
+ LOG(INFO) << "VA-API driver on VDPAU backend";
+ return BufferAllocationMode::kWrapVdpau;
+ }
+
// TODO(crbug.com/912295): Enable a better BufferAllocationMode for IMPORT
// |output_mode_| as well.
if (output_mode_ == VideoDecodeAccelerator::Config::OutputMode::IMPORT)
@@ -1105,7 +1113,7 @@ VaapiVideoDecodeAccelerator::DecideBufferAllocationMode() {
// depends on the bitstream and sometimes it's not enough to cover the amount
// of frames needed by the client pipeline (see b/133733739).
// TODO(crbug.com/911754): Enable for VP9 Profile 2.
- if (IsGeminiLakeOrLater() &&
+ if (false && IsGeminiLakeOrLater() &&
(profile_ == VP9PROFILE_PROFILE0 || profile_ == VP8PROFILE_ANY)) {
// Add one to the reference frames for the one being currently egressed, and
// an extra allocation for both |client_| and |decoder_|, see
--- a/media/gpu/vaapi/vaapi_video_decode_accelerator.h
+++ b/media/gpu/vaapi/vaapi_video_decode_accelerator.h
@@ -204,6 +204,7 @@ class MEDIA_GPU_EXPORT VaapiVideoDecodeAccelerator
// Using |client_|s provided PictureBuffers and as many internally
// allocated.
kNormal,
+ kWrapVdpau,
};
// Decides the concrete buffer allocation mode, depending on the hardware
--- a/media/gpu/vaapi/vaapi_wrapper.cc
+++ b/media/gpu/vaapi/vaapi_wrapper.cc
@@ -131,6 +131,9 @@ media::VAImplementation VendorStringToImplementationType(
} else if (base::StartsWith(va_vendor_string, "Intel iHD driver",
base::CompareCase::SENSITIVE)) {
return media::VAImplementation::kIntelIHD;
+ } else if (base::StartsWith(va_vendor_string, "Splitted-Desktop Systems VDPAU",
+ base::CompareCase::SENSITIVE)) {
+ return media::VAImplementation::kNVIDIAVDPAU;
}
return media::VAImplementation::kOther;
}
--- a/media/gpu/vaapi/vaapi_wrapper.h
+++ b/media/gpu/vaapi/vaapi_wrapper.h
@@ -79,6 +79,7 @@ enum class VAImplementation {
kIntelIHD,
kOther,
kInvalid,
+ kNVIDIAVDPAU,
};
// This class handles VA-API calls and ensures proper locking of VA-API calls

View file

@ -0,0 +1,13 @@
diff --git a/third_party/widevine/cdm/BUILD.gn b/third_party/widevine/cdm/BUILD.gn
index ed0e2f5208b..5b431a030d5 100644
--- a/third_party/widevine/cdm/BUILD.gn
+++ b/third_party/widevine/cdm/BUILD.gn
@@ -14,7 +14,7 @@ buildflag_header("buildflags") {
flags = [
"ENABLE_WIDEVINE=$enable_widevine",
- "BUNDLE_WIDEVINE_CDM=$bundle_widevine_cdm",
+ "BUNDLE_WIDEVINE_CDM=true",
"ENABLE_WIDEVINE_CDM_COMPONENT=$enable_widevine_cdm_component",
]
}

View file

@ -0,0 +1,93 @@
{ stdenv, gcc
, jshon
, glib
, nspr
, nss
, fetchzip
, patchelfUnstable
, enablePepperFlash ? false
, upstream-info
}:
with stdenv.lib;
let
mkrpath = p: "${makeSearchPathOutput "lib" "lib64" p}:${makeLibraryPath p}";
# Generate a shell fragment that emits flags appended to the
# final makeWrapper call for wrapping the browser's main binary.
#
# Note that this is shell-escaped so that only the variable specified
# by the "output" attribute is substituted.
mkPluginInfo = { output ? "out", allowedVars ? [ output ]
, flags ? [], envVars ? {}
}: let
shSearch = ["'"] ++ map (var: "@${var}@") allowedVars;
shReplace = ["'\\''"] ++ map (var: "'\"\${${var}}\"'") allowedVars;
# We need to triple-escape "val":
# * First because makeWrapper doesn't do any quoting of its arguments by
# itself.
# * Second because it's passed to the makeWrapper call separated by IFS but
# not by the _real_ arguments, for example the Widevine plugin flags
# contain spaces, so they would end up as separate arguments.
# * Third in order to be correctly quoted for the "echo" call below.
shEsc = val: "'${replaceStrings ["'"] ["'\\''"] val}'";
mkSh = val: "'${replaceStrings shSearch shReplace (shEsc val)}'";
mkFlag = flag: ["--add-flags" (shEsc flag)];
mkEnvVar = key: val: ["--set" (shEsc key) (shEsc val)];
envList = mapAttrsToList mkEnvVar envVars;
quoted = map mkSh (flatten ((map mkFlag flags) ++ envList));
in ''
mkdir -p "''$${output}/nix-support"
echo ${toString quoted} > "''$${output}/nix-support/wrapper-flags"
'';
flash = stdenv.mkDerivation rec {
pname = "flashplayer-ppapi";
version = "32.0.0.344";
src = fetchzip {
url = "https://fpdownload.adobe.com/pub/flashplayer/pdc/${version}/flash_player_ppapi_linux.x86_64.tar.gz";
sha256 = "05ijlgsby9zxx0qs6f3vav1z0p6xr1cg6idl4akxvfmsl6hn6hkq";
stripRoot = false;
};
patchPhase = ''
chmod +x libpepflashplayer.so
patchelf --set-rpath "${mkrpath [ gcc.cc ]}" libpepflashplayer.so
'';
doCheck = true;
checkPhase = ''
! find -iname '*.so' -exec ldd {} + | grep 'not found'
'';
installPhase = ''
flashVersion="$(
"${jshon}/bin/jshon" -F manifest.json -e version -u
)"
install -vD libpepflashplayer.so "$out/lib/libpepflashplayer.so"
${mkPluginInfo {
allowedVars = [ "out" "flashVersion" ];
flags = [
"--ppapi-flash-path=@out@/lib/libpepflashplayer.so"
"--ppapi-flash-version=@flashVersion@"
];
}}
'';
dontStrip = true;
meta = {
license = stdenv.lib.licenses.unfree;
maintainers = with stdenv.lib.maintainers; [ taku0 ];
platforms = platforms.x86_64;
};
};
in {
enabled = optional enablePepperFlash flash;
}

View file

@ -0,0 +1,6 @@
{
"81.0.4044.92" = {
rev = "81.0.4044.92-2";
sha256 = "071a33idn2zcix6z8skn7y85mhb9w5s0bh0fvrjm269y7cmjrh3l";
};
}

View file

@ -0,0 +1,42 @@
{ stdenv
, fetchFromGitHub
, python3Packages
, makeWrapper
, patch
}:
{ rev
, sha256
}:
stdenv.mkDerivation rec {
name = "ungoogled-chromium-${version}";
version = rev;
src = fetchFromGitHub {
owner = "Eloston";
repo = "ungoogled-chromium";
inherit rev sha256;
};
dontBuild = true;
buildInputs = [
python3Packages.python
patch
];
nativeBuildInputs = [
makeWrapper
];
patchPhase = ''
sed -i '/chromium-widevine/d' patches/series
'';
installPhase = ''
mkdir $out
cp -R * $out/
wrapProgram $out/utils/patches.py --add-flags "apply" --prefix PATH : "${patch}/bin"
'';
}

View file

@ -0,0 +1,271 @@
let maybePkgs = import ../../../../../. {}; in
{ stdenv ? maybePkgs.stdenv
, runCommand ? maybePkgs.runCommand
, fetchurl ? maybePkgs.fetchurl
, writeText ? maybePkgs.writeText
, curl ? maybePkgs.curl
, cacert ? maybePkgs.cacert
, nix ? maybePkgs.nix
}:
let
inherit (stdenv) lib;
sources = if builtins.pathExists ./upstream-info.nix
then import ./upstream-info.nix
else {};
bucketURL = "https://commondatastorage.googleapis.com/"
+ "chromium-browser-official";
mkVerURL = version: "${bucketURL}/chromium-${version}.tar.xz";
debURL = "https://dl.google.com/linux/chrome/deb/pool/main/g";
getDebURL = channelName: version: arch: mirror: let
packageSuffix = if channelName == "dev" then "unstable" else channelName;
packageName = "google-chrome-${packageSuffix}";
in "${mirror}/${packageName}/${packageName}_${version}-1_${arch}.deb";
# Untrusted mirrors, don't try to update from them!
debMirrors = [
"http://95.31.35.30/chrome/pool/main/g"
"http://mirror.pcbeta.com/google/chrome/deb/pool/main/g"
"http://repo.fdzh.org/chrome/deb/pool/main/g"
];
in {
getChannel = channel: let
chanAttrs = builtins.getAttr channel sources;
in {
inherit channel;
inherit (chanAttrs) version;
main = fetchurl {
url = mkVerURL chanAttrs.version;
inherit (chanAttrs) sha256;
};
binary = fetchurl (let
mkUrls = arch: let
mkURLForMirror = getDebURL channel chanAttrs.version arch;
in map mkURLForMirror ([ debURL ] ++ debMirrors);
in if stdenv.is64bit && chanAttrs ? sha256bin64 then {
urls = mkUrls "amd64";
sha256 = chanAttrs.sha256bin64;
} else if !stdenv.is64bit && chanAttrs ? sha256bin32 then {
urls = mkUrls "i386";
sha256 = chanAttrs.sha256bin32;
} else throw "No Chrome plugins are available for your architecture.");
};
update = let
csv2nix = name: src: import (runCommand "${name}.nix" {
src = builtins.fetchurl src;
} ''
esc() { echo "\"$(echo "$1" | sed -e 's/"\\$/\\&/')\""; } # ohai emacs "
IFS=, read -r -a headings <<< "$(head -n1 "$src")"
echo "[" > "$out"
tail -n +2 "$src" | while IFS=, read -r -a line; do
echo " {"
for idx in "''${!headings[@]}"; do
echo " $(esc "''${headings[idx]}") = $(esc ''${line[$idx]});"
done
echo " }"
done >> "$out"
echo "]" >> "$out"
'');
channels = lib.fold lib.recursiveUpdate {} (map (attrs: {
${attrs.os}.${attrs.channel} = attrs // {
history = let
drvName = "omahaproxy-${attrs.os}.${attrs.channel}-info";
history = csv2nix drvName "http://omahaproxy.appspot.com/history";
cond = h: attrs.os == h.os && attrs.channel == h.channel
&& lib.versionOlder h.version attrs.current_version;
# Note that this is a *reverse* sort!
sorter = a: b: lib.versionOlder b.version a.version;
sorted = builtins.sort sorter (lib.filter cond history);
in map (lib.flip removeAttrs ["os" "channel"]) sorted;
version = attrs.current_version;
};
}) (csv2nix "omahaproxy-info" "http://omahaproxy.appspot.com/all?csv=1"));
/*
XXX: This is essentially the same as:
builtins.tryEval (builtins.fetchurl url)
... except that tryEval on fetchurl isn't working and doesn't catch
errors for fetchurl, so we go for a different approach.
We only have fixed-output derivations that can have networking access, so
we abuse SHA1 and its weaknesses to forge a fixed-output derivation which
is not so fixed, because it emits different contents that have the same
SHA1 hash.
Using this method, we can distinguish whether the URL is available or
whether it's not based on the actual content.
So let's use tryEval as soon as it's working with fetchurl in Nix.
*/
tryFetch = url: let
# SHA1 hash collisions from https://shattered.io/static/shattered.pdf:
collisions = runCommand "sha1-collisions" {
outputs = [ "out" "good" "bad" ];
base64 = ''
QlpoOTFBWSZTWbL5V5MABl///////9Pv///v////+/////HDdK739/677r+W3/75rUNr4
Aa/AAAAAAACgEVTRtQDQAaA0AAyGmjTQGmgAAANGgAaMIAYgGgAABo0AAAAAADQAIAGQ0
MgDIGmjQA0DRk0AaMQ0DQAGIANGgAAGRoNGQMRpo0GIGgBoGQAAIAGQ0MgDIGmjQA0DRk
0AaMQ0DQAGIANGgAAGRoNGQMRpo0GIGgBoGQAAIAGQ0MgDIGmjQA0DRk0AaMQ0DQAGIAN
GgAAGRoNGQMRpo0GIGgBoGQAAIAGQ0MgDIGmjQA0DRk0AaMQ0DQAGIANGgAAGRoNGQMRp
o0GIGgBoGQAABVTUExEZATTICnkxNR+p6E09JppoyamjGhkm0ammIyaekbUejU9JiGnqZ
qaaDxJ6m0JkZMQ2oaYmJ6gxqMyE2TUzJqfItligtJQJfYbl9Zy9QjQuB5mHQRdSSXCCTH
MgmSDYmdOoOmLTBJWiCpOhMQYpQlOYpJjn+wQUJSTCEpOMekaFaaNB6glCC0hKEJdHr6B
mUIHeph7YxS8WJYyGwgWnMTFJBDFSxSCCYljiEk7HZgJzJVDHJxMgY6tCEIIWgsKSlSZ0
S8GckoIIF+551Ro4RCw260VCEpWJSlpWx/PMrLyVoyhWMAneDilBcUIeZ1j6NCkus0qUC
Wnahhk5KT4GpWMh3vm2nJWjTL9Qg+84iExBJhNKpbV9tvEN265t3fu/TKkt4rXFTsV+Nc
upJXhOhOhJMQQktrqt4K8mSh9M2DAO2X7uXGVL9YQxUtzQmS7uBndL7M6R7vX869VxqPu
renSuHYNq1yTXOfNWLwgvKlRlFYqLCs6OChDp0HuTzCWscmGudLyqUuwVGG75nmyZhKpJ
yOE/pOZyHyrZxGM51DYIN+Jc8yVJgAykxKCEtW55MlfudLg3KG6TtozalunXrroSxUpVL
StWrWLFihMnVpkyZOrQnUrE6xq1CGtJlbAb5ShMbV1CZgqlKC0wCFCpMmUKSEkvFLaZC8
wHOCVAlvzaJQ/T+XLb5Dh5TNM67p6KZ4e4ZSGyVENx2O27LzrTIteAreTkMZpW95GS0CE
JYhMc4nToTJ0wQhKEyddaLb/rTqmgJSlkpnALxMhlNmuKEpkEkqhKUoEq3SoKUpIQcDgW
lC0rYahMmLuPQ0fHqZaF4v2W8IoJ2EhMhYmSw7qql27WJS+G4rUplToFi2rSv0NSrVvDU
pltQ8Lv6F8pXyxmFBSxiLSxglNC4uvXVKmAtusXy4YXGX1ixedEvXF1aX6t8adYnYCpC6
rW1ZzdZYlCCxKEv8vpbqdSsXl8v1jCQv0KEPxPTa/5rtWSF1dSgg4z4KjfIMNtgwWoWLE
sRhKxsSA9ji7V5LRPwtumeQ8V57UtFSPIUmtQdOQfseI2Ly1DMtk4Jl8n927w34zrWG6P
i4jzC82js/46Rt2IZoadWxOtMInS2xYmcu8mOw9PLYxQ4bdfFw3ZPf/g2pzSwZDhGrZAl
9lqky0W+yeanadC037xk496t0Dq3ctfmqmjgie8ln9k6Q0K1krb3dK9el4Xsu44LpGcen
r2eQZ1s1IhOhnE56WnXf0BLWn9Xz15fMkzi4kpVxiTKGEpffErEEMvEeMZhUl6yD1SdeJ
YbxzGNM3ak2TAaglLZlDCVnoM6wV5DRrycwF8Zh/fRsdmhkMfAO1duwknrsFwrzePWeMw
l107DWzymxdQwiSXx/lncnn75jL9mUzw2bUDqj20LTgtawxK2SlQg1CCZDQMgSpEqLjRM
sykM9zbSIUqil0zNk7Nu+b5J0DKZlhl9CtpGKgX5uyp0idoJ3we9bSrY7PupnUL5eWiDp
V5mmnNUhOnYi8xyClkLbNmAXyoWk7GaVrM2umkbpqHDzDymiKjetgzTocWNsJ2E0zPcfh
t46J4ipaXGCfF7fuO0a70c82bvqo3HceIcRlshgu73seO8BqlLIap2z5jTOY+T2ucCnBt
Atva3aHdchJg9AJ5YdKHz7LoA3VKmeqxAlFyEnQLBxB2PAhAZ8KvmuR6ELXws1Qr13Nd1
i4nsp189jqvaNzt+0nEnIaniuP1+/UOZdyfoZh57ku8sYHKdvfW/jYSUks+0rK+qtte+p
y8jWL9cOJ0fV8rrH/t+85/p1z2N67p/ZsZ3JmdyliL7lrNxZUlx0MVIl6PxXOUuGOeArW
3vuEvJ2beoh7SGyZKHKbR2bBWO1d49JDIcVM6lQtu9UO8ec8pOnXmkcponBPLNM2CwZ9k
NC/4ct6rQkPkQHMcV/8XckU4UJCy+VeTA==
'';
} ''
echo "$base64" | base64 -d | tar xj
mv good.pdf "$good"
mv bad.pdf "$bad"
touch "$out"
'';
cacheVal = let
urlHash = builtins.hashString "sha256" url;
timeSlice = builtins.currentTime / 600;
in "${urlHash}-${toString timeSlice}";
in {
success = import (runCommand "check-success" {
result = stdenv.mkDerivation {
name = "tryfetch-${cacheVal}";
inherit url;
outputHash = "d00bbe65d80f6d53d5c15da7c6b4f0a655c5a86a";
outputHashMode = "flat";
outputHashAlgo = "sha1";
nativeBuildInputs = [ curl ];
preferLocalBuild = true;
inherit (collisions) good bad;
buildCommand = ''
if SSL_CERT_FILE="${cacert}/etc/ssl/certs/ca-bundle.crt" \
curl -s -L -f -I "$url" > /dev/null; then
cp "$good" "$out"
else
cp "$bad" "$out"
fi
'';
impureEnvVars = lib.fetchers.proxyImpureEnvVars;
};
inherit (collisions) good;
} ''
if cmp -s "$result" "$good"; then
echo true > "$out"
else
echo false > "$out"
fi
'');
value = builtins.fetchurl url;
};
fetchLatest = channel: let
result = tryFetch (mkVerURL channel.version);
in if result.success then result.value else fetchLatest (channel // {
version = if channel.history != []
then (lib.head channel.history).version
else throw "Unfortunately there's no older version than " +
"${channel.version} available for channel " +
"${channel.channel} on ${channel.os}.";
history = lib.tail channel.history;
});
getHash = path: import (runCommand "gethash.nix" {
inherit path;
nativeBuildInputs = [ nix ];
} ''
sha256="$(nix-hash --flat --base32 --type sha256 "$path")"
echo "\"$sha256\"" > "$out"
'');
isLatest = channel: version: let
ourVersion = sources.${channel}.version or null;
in if ourVersion == null then false
else lib.versionOlder version sources.${channel}.version
|| version == sources.${channel}.version;
# We only support GNU/Linux right now.
linuxChannels = let
genLatest = channelName: channel: let
newUpstream = {
inherit (channel) version;
sha256 = getHash (fetchLatest channel);
};
keepOld = let
oldChannel = sources.${channelName};
in {
inherit (oldChannel) version sha256;
} // lib.optionalAttrs (oldChannel ? sha256bin32) {
inherit (oldChannel) sha256bin32;
} // lib.optionalAttrs (oldChannel ? sha256bin64) {
inherit (oldChannel) sha256bin64;
};
in if isLatest channelName channel.version then keepOld else newUpstream;
in lib.mapAttrs genLatest channels.linux;
getLinuxFlash = channelName: channel: let
inherit (channel) version;
fetchArch = arch: tryFetch (getDebURL channelName version arch debURL);
packages = lib.genAttrs ["i386" "amd64"] fetchArch;
isNew = arch: attr: !(builtins.hasAttr attr channel)
&& packages.${arch}.success;
in channel // lib.optionalAttrs (isNew "i386" "sha256bin32") {
sha256bin32 = getHash (packages.i386.value);
} // lib.optionalAttrs (isNew "amd64" "sha256bin64") {
sha256bin64 = getHash (packages.amd64.value);
};
newChannels = lib.mapAttrs getLinuxFlash linuxChannels;
dumpAttrs = indent: attrs: let
mkVal = val: if lib.isAttrs val then dumpAttrs (indent + 1) val
else "\"${lib.escape ["$" "\\" "\""] (toString val)}\"";
mkIndent = level: lib.concatStrings (builtins.genList (_: " ") level);
mkAttr = key: val: "${mkIndent (indent + 1)}${key} = ${mkVal val};\n";
attrLines = lib.mapAttrsToList mkAttr attrs;
in "{\n" + (lib.concatStrings attrLines) + (mkIndent indent) + "}";
in writeText "chromium-new-upstream-info.nix" ''
# This file is autogenerated from update.sh in the same directory.
${dumpAttrs 0 newChannels}
'';
}

View file

@ -0,0 +1,4 @@
#!/bin/sh -e
cd "$(dirname "$0")"
sp="$(nix-build --builders "" -Q --no-out-link update.nix -A update)"
cat "$sp" > upstream-info.nix

View file

@ -0,0 +1,18 @@
# This file is autogenerated from update.sh in the same directory.
{
beta = {
sha256 = "0i0szd749ihb08rxnsmsbxq75b6x952wpk94jwc0ncv6gb83zkx2";
sha256bin64 = "1y70kmfz9nv507b0zdda7zfk2ac9qh9m2gq00aphdmzd0al7skj8";
version = "81.0.4044.92";
};
dev = {
sha256 = "1rydvjmv62zj95sf0fgsyipqz2hphbxm60y8q0813wq9ym35d4yy";
sha256bin64 = "1m6740lw7xjjp1lplwp9ii4d3l7dfa9jrv5bysm4ar5pb9kywrai";
version = "83.0.4100.3";
};
stable = {
sha256 = "0i0szd749ihb08rxnsmsbxq75b6x952wpk94jwc0ncv6gb83zkx2";
sha256bin64 = "1ig899cpahw1xfhdff5xj6w4k8jja5smxvrcbw6b0jcjmawdrf72";
version = "81.0.4044.92";
};
}

View file

@ -37,6 +37,6 @@ buildGoPackage rec {
homepage = "https://github.com/containernetworking/plugins";
license = licenses.asl20;
platforms = platforms.linux;
maintainers = with maintainers; [ cstrahan saschagrunert ];
maintainers = with maintainers; [ cstrahan ] ++ teams.podman.members;
};
}

View file

@ -2,13 +2,13 @@
buildGoModule rec {
pname = "helm";
version = "3.1.2";
version = "3.1.3";
src = fetchFromGitHub {
owner = "helm";
repo = "helm";
rev = "v${version}";
sha256 = "0pg5cwgyfb4isy2fn233kj3bdn0i8qqp90yzix0khs5maalpnrk1";
sha256 = "1j6pr1a9ff32bnjq9rncllmfpraip5r2fj3zsljw5jq68x5wamdc";
};
modSha256 = "0618zzi4x37ahsrazsr82anghhfva8yaryzb3p5d737p3ixbiyv8";

View file

@ -6,8 +6,6 @@ buildGoPackage rec {
goPackagePath = "github.com/StackExchange/dnscontrol";
goDeps = ./deps.nix;
src = fetchFromGitHub {
owner = "StackExchange";
repo = pname;
@ -15,9 +13,7 @@ buildGoPackage rec {
sha256 = "1j8i4k7bqkqmi6dmc9fxfab49a7qigig72rlbga902lw336p6cc7";
};
postInstall = ''
rm $bin/bin/{build,convertzone,generate,validate}
'';
subPackages = [ "." ];
meta = with stdenv.lib; {
description = "Synchronize your DNS to multiple providers from a simple DSL";

File diff suppressed because it is too large Load diff

View file

@ -41,7 +41,7 @@ in stdenv.mkDerivation rec {
meta = with stdenv.lib; {
description = "Free and Open Source messaging and emailing app that combines common web applications into one";
homepage = "http://rambox.pro";
homepage = "https://rambox.pro";
license = licenses.mit;
maintainers = with maintainers; [ gnidorah ma27 ];
platforms = ["i686-linux" "x86_64-linux"];

View file

@ -23,7 +23,7 @@ let
else "");
in stdenv.mkDerivation rec {
pname = "signal-desktop";
version = "1.33.1"; # Please backport all updates to the stable channel.
version = "1.33.3"; # Please backport all updates to the stable channel.
# All releases have a limited lifetime and "expire" 90 days after the release.
# When releases "expire" the application becomes unusable until an update is
# applied. The expiration date for the current release can be extracted with:
@ -33,7 +33,7 @@ in stdenv.mkDerivation rec {
src = fetchurl {
url = "https://updates.signal.org/desktop/apt/pool/main/s/signal-desktop/signal-desktop_${version}_amd64.deb";
sha256 = "0p9ak0cmk9b77dzbw4y2xmxqg211y62n7ckggwf7bcg48wzj0jy7";
sha256 = "1brw1hidmrznb55cb794yvgzin7sf3cxnffivmag4vf2a2vcvf4y";
};
nativeBuildInputs = [

View file

@ -19,12 +19,12 @@ with lib;
mkDerivation rec {
pname = "telegram-desktop";
version = "2.0.1";
version = "2.1.0";
# Telegram-Desktop with submodules
src = fetchurl {
url = "https://github.com/telegramdesktop/tdesktop/releases/download/v${version}/tdesktop-${version}-full.tar.gz";
sha256 = "0g3jw4can9gmp48s3b8s1w8n9xi54i142y74fszxf9jyq5drzlff";
sha256 = "0l5917w90z9pg1al1hzcycb4yxv03vc88jg958ifl9nlvz1arll6";
};
postPatch = ''

View file

@ -1,4 +1,4 @@
{ stdenv, lib, fetchurl, autoreconfHook, pkgconfig, texinfo
{ stdenv, lib, fetchurl, fetchpatch, autoreconfHook, pkgconfig, texinfo
, netcat-gnu, gnutls, gsasl, libidn2, Security
, withKeyring ? true, libsecret ? null
, systemd ? null }:
@ -16,8 +16,13 @@ in stdenv.mkDerivation rec {
sha256 = "1rarck61mz3mwg0l30vjj6j9fq6gc7gic0r1c1ppwpq2izj57jzc";
};
# the 2nd patch should go when 1.8.9 is released
patches = [
./paths.patch
(fetchpatch {
url = "https://github.com/marlam/msmtp-mirror/commit/c78f24347ec996c7a3830b48403bf3736afca071.patch";
sha256 = "0d4sc2f5838jriv65wahpgvwckkzqhdk3hs660fyg80si2i0l1bx";
})
];
buildInputs = [ gnutls gsasl libidn2 ]

View file

@ -1,9 +1,9 @@
{ lib
, fetchFromGitHub
, python3
, python3Packages
}:
python3.pkgs.buildPythonApplication rec {
python3Packages.buildPythonApplication rec {
pname = "stig";
# This project has a different concept for pre release / alpha,
# Read the project's README for details: https://github.com/rndusr/stig#stig
@ -26,7 +26,7 @@ python3.pkgs.buildPythonApplication rec {
--replace "urwidtrees>=1.0.3dev0" "urwidtrees"
'';
propagatedBuildInputs = with python3.pkgs; [
propagatedBuildInputs = with python3Packages; [
urwid
urwidtrees
aiohttp
@ -38,17 +38,23 @@ python3.pkgs.buildPythonApplication rec {
setproctitle
];
checkInputs = with python3.pkgs; [
checkInputs = with python3Packages; [
asynctest
pytest
pytestCheckHook
];
# test_string__month_day_hour_minute_second fails on darwin
checkPhase = ''
LC_ALL=en_US.utf8 pytest tests \
--deselect=tests/client_test/ttypes_test.py::TestTimestamp::test_string__month_day_hour_minute_second
dontUseSetuptoolsCheck = true;
preCheck = ''
export LC_ALL=C
'';
pytestFlagsArray = [
"tests"
# test_string__month_day_hour_minute_second fails on darwin
"--deselect=tests/client_test/ttypes_test.py::TestTimestamp::test_string__month_day_hour_minute_second"
];
meta = with lib; {
description = "TUI and CLI for the BitTorrent client Transmission";
homepage = "https://github.com/rndusr/stig";

View file

@ -1,84 +0,0 @@
From a6d8bd67416c848f9bf52f4746bda34216ae9993 Mon Sep 17 00:00:00 2001
From: worldofpeace <worldofpeace@protonmail.ch>
Date: Sun, 19 Apr 2020 12:48:59 -0400
Subject: [PATCH] Revert "Add patch"
This reverts commit c44127936b785afda0e914da4c1dc1e66a0ac97b.
---
src/Application.vala | 49 --------------------------------------------
1 file changed, 49 deletions(-)
diff --git a/src/Application.vala b/src/Application.vala
index 43d52fbc..82a9ebe5 100644
--- a/src/Application.vala
+++ b/src/Application.vala
@@ -127,66 +127,17 @@ public class Planner : Gtk.Application {
utils.apply_theme_changed ();
- // Set Theme and Icon
Gtk.Settings.get_default ().set_property ("gtk-icon-theme-name", "elementary");
Gtk.Settings.get_default ().set_property ("gtk-theme-name", "elementary");
- // Path Theme
- var command = new Granite.Services.SimpleCommand (".", "echo $DESKTOP_SESSION");
- command.run ();
- command.output_changed.connect ((text) => {
- print ("DESKTOP_SESSION: %s\n".printf (text));
- });
-
- if (get_os_info ("PRETTY_NAME") == null || get_os_info ("PRETTY_NAME").index_of ("elementary") == -1) {
- string CSS = """
- window decoration {
- box-shadow: none;
- margin: 1px;
- }
- """;
-
- var _provider = new Gtk.CssProvider ();
- _provider.load_from_data (CSS, CSS.length);
-
- Gtk.StyleContext.add_provider_for_screen (
- Gdk.Screen.get_default (), _provider,
- Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION
- );
- }
-
// Set shortcut
string quick_add_shortcut = settings.get_string ("quick-add-shortcut");
if (quick_add_shortcut == "") {
quick_add_shortcut = "<Primary>Tab";
settings.set_string ("quick-add-shortcut", quick_add_shortcut);
}
-
utils.set_quick_add_shortcut (quick_add_shortcut);
}
-
- public string get_os_info (string field) {
- string return_value = "";
- var file = File.new_for_path ("/etc/os-release");
- try {
- var osrel = new Gee.HashMap<string, string> ();
- var dis = new DataInputStream (file.read ());
- string line;
- // Read lines until end of file (null) is reached
- while ((line = dis.read_line (null)) != null) {
- var osrel_component = line.split ("=", 2);
- if (osrel_component.length == 2) {
- osrel[osrel_component[0]] = osrel_component[1].replace ("\"", "");
- }
- }
-
- return_value = osrel[field];
- } catch (Error e) {
- warning ("Couldn't read os-release file, assuming elementary OS");
- }
-
- return return_value;
- }
public override int command_line (ApplicationCommandLine command_line) {
bool silence_mode = false;
--
2.25.1

View file

@ -21,25 +21,15 @@
stdenv.mkDerivation rec {
pname = "elementary-planner";
version = "2.3.2";
version = "2.3.3";
src = fetchFromGitHub {
owner = "alainm23";
repo = "planner";
rev = version;
sha256 = "1kjk1zafx71zmax3whzpx6mzl037wlxri30bl2k9y9rg3fd09arr";
sha256 = "1jc668hg26vb1q50abm6k566v9qimgs9skkwmlgi5h37vxm3ai1x";
};
patches = [
# Revert a patch the works around some stylesheet issues:
# https://github.com/alainm23/planner/issues/268
# https://github.com/alainm23/planner/issues/303
# The don't seem to be a problem with Pantheon on NixOS
# and for some reason produce the opposite effect with
# pantheon's stylesheet.
./0001-Revert-Add-patch.patch
];
nativeBuildInputs = [
desktop-file-utils
meson

View file

@ -116,7 +116,7 @@ mkDerivation rec {
];
platforms = platforms.linux;
description = "Desktop Publishing (DTP) and Layout program for Linux";
homepage = "http://www.scribus.net";
homepage = "https://www.scribus.net";
# There are a lot of licenses... https://github.com/scribusproject/scribus/blob/20508d69ca4fc7030477db8dee79fd1e012b52d2/COPYING#L15-L19
license = with licenses; [
bsd3

View file

@ -0,0 +1,58 @@
{ stdenv, fetchurl, python3Packages, zlib, bash, coreutils }:
let
pythonPackages = python3Packages;
inherit (pythonPackages) python;
in
pythonPackages.buildPythonApplication rec {
pname = "quast";
version = "5.0.2";
src = fetchurl {
url = "https://github.com/ablab/quast/releases/download/${pname}_${version}/${pname}-${version}.tar.gz";
sha256 = "13ml8qywbb4cc7wf2x7z5mz1rjqg51ab8wkizwcg4f6c40zgif6d";
};
pythonPath = with pythonPackages; [ simplejson joblib setuptools matplotlib ];
nativeBuildInputs = [ coreutils ];
buildInputs = [ zlib ] ++ pythonPath;
dontConfigure = true;
dontBuild = true;
installPhase = ''
substituteInPlace quast_libs/bedtools/Makefile \
--replace "/bin/bash" "${bash}/bin/bash"
mkdir -p "$out/${python.sitePackages}"
export PYTHONPATH="$out/${python.sitePackages}:$PYTHONPATH"
${python.interpreter} setup.py install \
--install-lib=$out/${python.sitePackages} \
--prefix="$out"
'';
postFixup = ''
for file in $(find $out -type f -type f -perm /0111); do
old_rpath=$(patchelf --print-rpath $file) && \
patchelf --set-rpath $old_rpath:${stdenv.cc.cc.lib}/lib $file || true
done
# Link to the master program
ln -s $out/bin/quast.py $out/bin/quast
'';
dontPatchELF = true;
# Tests need to download data files, so manual run after packaging is needed
doCheck = false;
meta = with stdenv.lib ; {
description = "Evaluates genome assemblies by computing various metrics";
homepage = "https://github.com/ablab/quast";
license = licenses.gpl2;
maintainers = [ maintainers.bzizou ];
platforms = platforms.all;
};
}

View file

@ -43,7 +43,7 @@ stdenv.mkDerivation rec {
meta = {
description = "Verification for C and Java programs via separation logic";
homepage = "http://people.cs.kuleuven.be/~bart.jacobs/verifast/";
license = stdenv.lib.licenses.msrla;
license = stdenv.lib.licenses.mit;
platforms = [ "x86_64-linux" ];
maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
};

View file

@ -24,7 +24,7 @@ rustPlatform.buildRustPackage rec {
meta = with stdenv.lib; {
description = "Unit-aware calculator";
homepage = "http://rink.tiffnix.com";
homepage = "https://rink.tiffnix.com";
license = with licenses; [ mpl20 gpl3 ];
maintainers = with maintainers; [ sb0 filalex77 ];
};

View file

@ -28,7 +28,7 @@ python3Packages.buildPythonApplication rec {
doCheck = false; # Tests depend on Google Cloud credentials at ${HOME}/gcloud-service-key.json
meta = with stdenv.lib; {
homepage = "http://snakemake.bitbucket.io";
homepage = "https://snakemake.bitbucket.io";
license = licenses.mit;
description = "Python-based execution environment for make-like workflows";
longDescription = ''

View file

@ -3,11 +3,11 @@
buildPythonApplication rec {
pname = "MAVProxy";
version = "1.8.18";
version = "1.8.19";
src = fetchPypi {
inherit pname version;
sha256 = "1fi4m3591wws5cq43q8aljf91mzs6i9yhn9rimhpfrskbyf9knvm";
sha256 = "1rbq2nm01212rp5xbl8p8kjl2mpgfppkwjsq3lnfw1v6g0m4359h";
};
propagatedBuildInputs = [

View file

@ -4,7 +4,7 @@ stdenv.mkDerivation rec {
name = "tla-1.3.5";
src = fetchurl {
url = "ftp://ftp.gnu.org/old-gnu/gnu-arch/" + name + ".tar.gz";
url = "https://ftp.gnu.org/old-gnu/gnu-arch/" + name + ".tar.gz";
sha256 = "01mfzj1i6p4s8191cgd5850hds1zls88hkf9rb6qx1vqjv585aj0";
};

View file

@ -2,13 +2,13 @@
stdenv.mkDerivation rec {
pname = "diff-so-fancy";
version = "1.2.7";
version = "1.3.0";
src = fetchFromGitHub {
owner = "so-fancy";
repo = "diff-so-fancy";
rev = "v${version}";
sha256 = "0y5cp236gi6h7llzai5d27086l4zz58mz1zs01r97xnnmjs9vw21";
sha256 = "0aavxahzha2mms4vdwysk79pa6wzswpfwgsq2hwaxnaf66maahfl";
};
# Perl is needed here for patchShebangs

View file

@ -57,7 +57,7 @@ in buildGoPackage rec {
description = ''Open Container Initiative-based implementation of the
Kubernetes Container Runtime Interface'';
license = licenses.asl20;
maintainers = with maintainers; [ saschagrunert ];
maintainers = with maintainers; [ ] ++ teams.podman.members;
platforms = platforms.linux;
};
}

View file

@ -1,5 +1,5 @@
{ stdenv, rustPlatform, fetchgit, runCommand, symlinkJoin
, pkgconfig, minijail, dtc, libusb1, libcap
{ stdenv, lib, rustPlatform, fetchgit, runCommand, symlinkJoin
, pkgconfig, minijail, dtc, libusb1, libcap, linux
}:
let
@ -53,7 +53,7 @@ in
./default-seccomp-policy-dir.diff
];
cargoSha256 = "1s9nfgfqk140hg08i0xzylnrgrx84dqss0vnvhxnydwy9q03nk7r";
cargoSha256 = "0lhivwvdihslwp81i3sa5q88p5hr83bzkvklrcgf6x73arwk8kdz";
nativeBuildInputs = [ pkgconfig ];
@ -73,13 +73,17 @@ in
cp seccomp/${arch}/* $out/share/policy/
'';
CROSVM_CARGO_TEST_KERNEL_BINARY =
lib.optionalString (stdenv.buildPlatform == stdenv.hostPlatform)
"${linux}/${stdenv.hostPlatform.platform.kernelTarget}";
passthru = {
inherit adhdSrc;
src = crosvmSrc;
updateScript = ./update.py;
};
meta = with stdenv.lib; {
meta = with lib; {
description = "A secure virtual machine monitor for KVM";
homepage = "https://chromium.googlesource.com/chromiumos/platform/crosvm/";
maintainers = with maintainers; [ qyliss ];

View file

@ -17,7 +17,7 @@ components = ['chromiumos/platform/crosvm', 'chromiumos/third_party/adhd']
git_root = 'https://chromium.googlesource.com/'
manifest_versions = f'{git_root}chromiumos/manifest-versions'
buildspecs_url = f'{manifest_versions}/+/refs/heads/master/paladin/buildspecs/'
buildspecs_url = f'{manifest_versions}/+/refs/heads/master/full/buildspecs/'
# CrOS version numbers look like this:
# [<chrome-major-version>.]<tip-build>.<branch-build>.<branch-branch-build>

View file

@ -1,19 +1,23 @@
{
"version": "79.12607.0.0-rc4",
"version": "81.12871.0.0-rc1",
"components": {
"chromiumos/platform/crosvm": {
"url": "https://chromium.googlesource.com/chromiumos/platform/crosvm",
"rev": "cfb7db44eb9e5a0bca9a22bfb985252ef74ab251",
"date": "2019-10-17T23:22:08+00:00",
"sha256": "0gm1ggyzh9qfizm36jmh71c3anygxj1840cm94h71kzg9kiw0330",
"fetchSubmodules": false
"rev": "8b8c01e1ad31718932491e4aee63f56109a138e2",
"date": "2020-01-25T02:28:10+00:00",
"sha256": "1qmf1k06pwynh15c3nr9m6v90z2pkk930xniwvlvbvnazrk4rllg",
"fetchSubmodules": false,
"deepClone": false,
"leaveDotGit": false
},
"chromiumos/third_party/adhd": {
"url": "https://chromium.googlesource.com/chromiumos/third_party/adhd",
"rev": "a8df1c52bde3bfd2aebc1d7adcd6f195eb212cb1",
"date": "2019-10-17T18:53:18+00:00",
"sha256": "1hyvnvwr5ka9zw4h7hhl6fpsfl2acp3zy4wr5qrw8s1cn8ljr9vy",
"fetchSubmodules": false
"rev": "f361d5b02623274723bff251dafa1e2a2887b013",
"date": "2020-01-23T18:37:46+00:00",
"sha256": "1p8iwjwgmcgmzri03ik2jaid8l0ch0bzn6z9z64dix1hlrvrlliw",
"fetchSubmodules": false,
"deepClone": false,
"leaveDotGit": false
}
}
}

View file

@ -9,6 +9,7 @@
, libseccomp
, systemd
, go-md2man
, nixosTests
}:
buildGoPackage rec {
@ -45,6 +46,8 @@ buildGoPackage rec {
MANDIR=$man/share/man make install.man
'';
passthru.tests.podman = nixosTests.podman;
meta = with stdenv.lib; {
homepage = "https://podman.io/";
description = "A program for managing pods, containers and container images";

View file

@ -19,10 +19,9 @@ with stdenv.lib;
let
python = python3;
buildType = "release";
# Remember to change the extpackRev and version in extpack.nix and
# guest-additions/default.nix as well.
main = "59f8f5774473f593e3eb5940e2a337e0674bcd9854164b2578fd43f896260c99";
version = "6.1.4";
# Use maintainers/scripts/update.nix to update the version and all related hashes or
# change the hashes in extpack.nix and guest-additions/default.nix as well manually.
version = "6.1.6";
iasl' = iasl.overrideAttrs (old: rec {
inherit (old) pname;
@ -39,7 +38,7 @@ in stdenv.mkDerivation {
src = fetchurl {
url = "https://download.virtualbox.org/virtualbox/${version}/VirtualBox-${version}.tar.bz2";
sha256 = main;
sha256 = "b031c30d770f28c5f884071ad933e8c1f83e65b93aaba03a4012077c1d90a54f";
};
outputs = [ "out" "modsrc" ];
@ -108,6 +107,10 @@ in stdenv.mkDerivation {
postPatch = ''
sed -i -e 's|/sbin/ifconfig|${nettools}/bin/ifconfig|' \
src/VBox/HostDrivers/adpctl/VBoxNetAdpCtl.cpp
'' + optionalString headless ''
# Fix compile error in version 6.1.6
substituteInPlace src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-x11-stubs.cpp \
--replace PSHCLFORMATDATA PSHCLFORMATS
'';
# first line: ugly hack, and it isn't yet clear why it's a problem
@ -216,6 +219,7 @@ in stdenv.mkDerivation {
passthru = {
inherit version; # for guest additions
inherit extensionPack; # for inclusion in profile to prevent gc
updateScript = ./update.sh;
};
meta = {

View file

@ -12,7 +12,7 @@ fetchurl rec {
# Manually sha256sum the extensionPack file, must be hex!
# Thus do not use `nix-prefetch-url` but instead plain old `sha256sum`.
# Checksums can also be found at https://www.virtualbox.org/download/hashes/${version}/SHA256SUMS
let value = "3b73798d776ff223ea8025b1a45001762f8d4e5bcd1ea61449773c1249935800";
let value = "80b96b4b51a502141f6a8981f1493ade08a00762622c39e48319e5b122119bf3";
in assert (builtins.stringLength value) == 64; value;
meta = {

View file

@ -26,7 +26,7 @@ in stdenv.mkDerivation rec {
src = fetchurl {
url = "http://download.virtualbox.org/virtualbox/${version}/VBoxGuestAdditions_${version}.iso";
sha256 = "e2846a7576cce1b92a7c0744f41eaac750248d6e31dfca5c45d5766648b394c7";
sha256 = "bcde4691dea7de93b65a10a43dda2b8f52e570f820992ad281c9bb5c8dede181";
};
KERN_DIR = "${kernel.dev}/lib/modules/${kernel.modDirVersion}/build";

View file

@ -1,85 +0,0 @@
#!/usr/bin/env nix-shell
#!nix-shell -i python3 -p python3
import os
import re
import json
import urllib.request
from distutils.version import LooseVersion
UPSTREAM_INFO_FILE = os.path.join(
os.path.dirname(os.path.abspath(__file__)),
"upstream-info.json"
)
def fetch_latest_version():
url = "http://download.virtualbox.org/virtualbox/LATEST.TXT"
return urllib.request.urlopen(url).read().strip().decode()
def load_upstream_info():
try:
with open(UPSTREAM_INFO_FILE, 'r') as fp:
return json.load(fp)
except FileNotFoundError:
return {'version': "0"}
def save_upstream_info(contents):
remark = "Generated using update.py from the same directory."
contents['__NOTE'] = remark
data = json.dumps(contents, indent=2, sort_keys=True)
with open(UPSTREAM_INFO_FILE, 'w') as fp:
fp.write(data + "\n")
def fetch_file_table(version):
url = "http://download.virtualbox.org/virtualbox/{}/SHA256SUMS"
url = url.format(version)
result = {}
for line in urllib.request.urlopen(url):
sha, name = line.rstrip().split()
result[name.lstrip(b'*').decode()] = sha.decode()
return result
def update_to_version(version):
extpack_start = 'Oracle_VM_VirtualBox_Extension_Pack-'
version_re = version.replace('.', '\\.')
attribute_map = {
'extpack': r'^' + extpack_start + r'[^-]+-[^.]+.vbox-extpack$',
'extpackRev': r'^' + extpack_start + r'[^-]+-([^.]+).vbox-extpack$',
'main': r'^VirtualBox-' + version_re + r'.tar.bz2$',
'guest': r'^VBoxGuestAdditions_' + version_re + r'.iso$',
}
table = fetch_file_table(version)
new_attrs = {'version': version}
for attr, searchexpr in attribute_map.items():
result = [re.search(searchexpr, key) for key in table.keys()]
filtered = filter(lambda m: m is not None, result)
found = [m.groups()[0] if len(m.groups()) > 0 else table[m.group(0)]
for m in filtered if m is not None]
if len(found) == 0:
msg = "No package found for attribute {}".format(attr)
raise AssertionError(msg)
elif len(found) != 1:
msg = "More than one package found for attribute {}: ".format(attr)
msg += ', '.join(found)
raise AssertionError(msg)
else:
new_attrs[attr] = found[0]
return new_attrs
info = load_upstream_info()
latest = fetch_latest_version()
if LooseVersion(info['version']) < LooseVersion(latest):
print("Updating to version {}...".format(latest), end="", flush=True)
new_attrs = update_to_version(latest)
save_upstream_info(new_attrs)
print(" done.")
else:
print("Version {} is already the latest one.".format(info['version']))

View file

@ -0,0 +1,44 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl common-updater-scripts nix-prefetch-scripts jq
set -xeuo pipefail
nixpkgs="$(git rev-parse --show-toplevel)"
attr=virtualbox
oldVersion="$(nix-instantiate --eval -E "with import $nixpkgs {}; $attr.version or (builtins.parseDrvName $attr.name).version" | tr -d '"')"
latestVersion="$(curl -sS https://download.virtualbox.org/virtualbox/LATEST.TXT)"
function fileShaSum() {
echo "$1" | grep -w $2 | cut -f1 -d' '
}
function oldHash() {
nix-instantiate --eval --strict -A "$1.drvAttrs.outputHash" | tr -d '"'
}
function nixFile() {
nix-instantiate --eval --strict -A "${1}.meta.position" | sed -re 's/^"(.*):[0-9]+"$/\1/'
}
if [ ! "$oldVersion" = "$latestVersion" ]; then
shaSums=$(curl -sS https://download.virtualbox.org/virtualbox/$latestVersion/SHA256SUMS)
virtualBoxShaSum=$(fileShaSum "$shaSums" "VirtualBox-$latestVersion.tar.bz2")
extpackShaSum=$(fileShaSum "$shaSums" "Oracle_VM_VirtualBox_Extension_Pack-$latestVersion.vbox-extpack")
guestAdditionsShaSum=$(fileShaSum "$shaSums" "*VBoxGuestAdditions_$latestVersion.iso")
virtualboxNixFile=$(nixFile ${attr})
extpackNixFile=$(nixFile ${attr}Extpack)
guestAdditionsNixFile=$(nixFile linuxPackages.${attr}GuestAdditions)
extpackOldShaSum=$(oldHash ${attr}Extpack)
guestAdditionsOldShaSum=$(oldHash linuxPackages.${attr}GuestAdditions.src)
update-source-version $attr $latestVersion $virtualBoxShaSum
sed -i -e 's|value = "'$extpackOldShaSum'"|value = "'$extpackShaSum'"|' $extpackNixFile
sed -i -e 's|sha256 = "'$guestAdditionsOldShaSum'"|sha256 = "'$guestAdditionsShaSum'"|' $guestAdditionsNixFile
git add $virtualboxNixFile $extpackNixFile $guestAdditionsNixFile
git commit -m "$attr: ${oldVersion} -> ${latestVersion}"
else
echo "$attr is already up-to-date"
fi

View file

@ -14,8 +14,8 @@ let
baseWrapper = writeShellScriptBin "sway" ''
set -o errexit
if [ ! "$_SWAY_WRAPPER_ALREADY_EXECUTED" ]; then
export _SWAY_WRAPPER_ALREADY_EXECUTED=1
${extraSessionCommands}
export _SWAY_WRAPPER_ALREADY_EXECUTED=1
fi
if [ "$DBUS_SESSION_BUS_ADDRESS" ]; then
export DBUS_SESSION_BUS_ADDRESS

View file

@ -4,7 +4,8 @@ let
runCommand' = runLocal: stdenv: name: env: buildCommand:
stdenv.mkDerivation ({
inherit name buildCommand;
name = lib.strings.sanitizeDerivationName name;
inherit buildCommand;
passAsFile = [ "buildCommand" ];
}
// (lib.optionalAttrs runLocal {

View file

@ -1,4 +1,4 @@
{ stdenv, makeWrapper, coreutils, gnused, gnugrep, diffutils, nix, git }:
{ stdenv, makeWrapper, coreutils, gnused, gnugrep, diffutils, nix, git, jq }:
stdenv.mkDerivation {
name = "common-updater-scripts";
@ -12,7 +12,7 @@ stdenv.mkDerivation {
cp ${./scripts}/* $out/bin
for f in $out/bin/*; do
wrapProgram $f --prefix PATH : ${stdenv.lib.makeBinPath [ coreutils gnused gnugrep nix diffutils git ]}
wrapProgram $f --prefix PATH : ${stdenv.lib.makeBinPath [ coreutils gnused gnugrep nix diffutils git jq ]}
done
'';
}

View file

@ -0,0 +1,86 @@
#!/usr/bin/env bash
set -e
scriptName=mark-broken # do not use the .wrapped name
die() {
echo "$scriptName: error: $1" >&2
exit 1
}
usage() {
echo "Usage: $scriptName <attr> [--new-value=<new-value>]"
}
args=()
for arg in "$@"; do
case $arg in
--new-value=*)
newValue="${arg#*=}"
;;
--help)
usage
exit 0
;;
--*)
echo "$scriptName: Unknown argument: $arg"
usage
exit 1
;;
*)
args["${#args[*]}"]=$arg
;;
esac
done
attr=${args[0]}
if (( "${#args[*]}" < 1 )); then
echo "$scriptName: Too few arguments"
usage
exit 1
fi
if (( "${#args[*]}" > 1 )); then
echo "$scriptName: Too many arguments"
usage
exit 1
fi
if [ -z $newValue ]; then
newValue="true"
fi
nixFile=$(nix-instantiate --eval --json -E "with import ./. {}; (builtins.unsafeGetAttrPos \"description\" $attr.meta).file" | jq -r .)
if [[ ! -f "$nixFile" ]]; then
die "Couldn't evaluate 'builtins.unsafeGetAttrPos \"description\" $attr.meta' to locate the .nix file!"
fi
# Insert broken attribute
sed -i.bak "$nixFile" -r \
-e "/^\s*broken\s*=.*$/d" \
-e "s/(\s*)meta\s*=.*\{/&\n\1 broken = $newValue;/"
if cmp -s "$nixFile" "$nixFile.bak"; then
mv "$nixFile.bak" "$nixFile"
die "Failed to mark the package as broken! Does it have a meta attribute?"
fi
if [[ "$newValue" == "true" ]]; then
# broken should evaluate to true in any case now
markedSuccessfully=$(nix-instantiate --eval -E "with import ./. {}; $attr.meta.broken" || true)
if [[ ! "$markedSuccessfully" == "true" ]]; then
mv "$nixFile.bak" "$nixFile"
die "Couldn't verify the broken attribute to be set correctly, restoring backup!"
fi
else
# we can not check if broken evaluates to the correct value, but we can check that it does evaluate
if ! nix-instantiate --eval -E "with import ./. {}; $attr.meta.broken" >/dev/null; then
mv "$nixFile.bak" "$nixFile"
die "Couldn't verify the broken attribute to be set correctly, restoring backup!"
fi
fi
rm -f "$nixFile.bak"
rm -f "$attr.fetchlog"

View file

@ -1,4 +1,4 @@
# Based upon https://src.fedoraproject.org/rpms/twitter-twemoji-fonts/tree/454acad50ba584d9602ccd4238fc5e585abc15c9
# Based upon https://src.fedoraproject.org/rpms/twitter-twemoji-fonts
# The main difference is that we use “Twitter Color Emoji” name (which is recognized by upstream fontconfig)
{ stdenv
@ -15,14 +15,14 @@
}:
let
version = "12.1.2";
version = "12.1.5";
twemojiSrc = fetchFromGitHub {
name = "twemoji";
owner = "twitter";
repo = "twemoji";
rev = "v${version}";
sha256 = "0vzmlp83vnk4njcfkn03jcc1vkg2rf12zf5kj3p3a373xr4ds1zn";
hash = "sha256-qb3bLiUgtA8QQ13u928kvM+3qwmQpyjUk0EPKja1kSk=";
};
in
@ -54,10 +54,10 @@ stdenv.mkDerivation rec {
];
patches = [
# ImageMagick -> GrahphicsMagick
# ImageMagick -> GraphicsMagick
(fetchpatch {
url = "https://src.fedoraproject.org/rpms/twitter-twemoji-fonts/raw/3bc176c10ced2824fe03da5ff561e22a36bf8ccd/f/noto-emoji-use-gm.patch";
sha256 = "0yfmfzaaiq5163c06172g4r734aysiqyv1s28siv642vqzsqh4i2";
url = "https://src.fedoraproject.org/rpms/twitter-twemoji-fonts/raw/07778605d50696f6aa929020e82611a01d254c90/f/noto-emoji-use-gm.patch";
sha256 = "sha256-kyJwT1SKS1vnXxvPTiIMK6TRHMp1ZOSlb6rodL4Jbxs=";
})
];
@ -114,7 +114,9 @@ stdenv.mkDerivation rec {
# In twemoji source
## Artwork is Creative Commons Attribution 4.0 International
## Non-artwork is MIT
# In Fedora twitter-twemoji-fonts source
## spec files are MIT: https://fedoraproject.org/wiki/Licensing:Main#License_of_Fedora_SPEC_Files
license = with licenses; [ asl20 ofl cc-by-40 mit ];
maintainers = with maintainers; [ jtojnar ];
maintainers = with maintainers; [ jtojnar emily ];
};
}

View file

@ -3,11 +3,11 @@
stdenv.mkDerivation rec {
pname = "file-roller";
version = "3.36.1";
version = "3.36.2";
src = fetchurl {
url = "mirror://gnome/sources/file-roller/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
sha256 = "0p22jxcagamvp08xfglz4cz1sp8w4p101npw0ggrkhh7vm8yb9bh";
sha256 = "1lkb0m8ys13sy3b6c1kj3cqrqf5d1dqvhbp8spz8v9yjv3d7z3r6";
};
LANG = "en_US.UTF-8"; # postinstall.py

View file

@ -1,27 +1,34 @@
{ stdenv, fetchFromGitHub, glib, gettext }:
{ stdenv
, fetchFromGitHub
, glib
, gettext
}:
stdenv.mkDerivation rec {
pname = "gnome-shell-dash-to-dock-unstable";
version = "2020-03-19";
version = "2020-04-20";
src = fetchFromGitHub {
owner = "micheleg";
repo = "dash-to-dock";
# rev = "extensions.gnome.org-v" + version;
rev = "8c94a8d6db47ebc1273e690f4e0ba5e592f7f268";
sha256 = "7nNfxAINqOIJCgYXYaPck2EJ1IOmzt6AkfDFknZ8GaI=";
rev = "1788f31b049b622f78d0e65c56bef76169022ca9";
sha256 = "M3tlRbQ1PjKvNrKNtg0+CBEtzLSFQYauXJXQojdkHuk=";
};
nativeBuildInputs = [
glib gettext
glib
gettext
];
makeFlags = [ "INSTALLBASE=$(out)/share/gnome-shell/extensions" ];
makeFlags = [
"INSTALLBASE=${placeholder "out"}/share/gnome-shell/extensions"
];
meta = with stdenv.lib; {
description = "A dock for the Gnome Shell";
license = licenses.gpl2;
maintainers = with maintainers; [ eperuffo ];
homepage = "https://micheleg.github.io/dash-to-dock/";
license = licenses.gpl2;
maintainers = with maintainers; [ eperuffo jtojnar ];
};
}

View file

@ -1,10 +1,13 @@
import argparse
import math
import json
import requests
import sys
def version_to_list(version):
return list(map(int, version.split('.')))
return list(map(int, version.split(".")))
def odd_unstable(version_str, selected):
version = version_to_list(version_str)
@ -14,47 +17,58 @@ def odd_unstable(version_str, selected):
even = version[1] % 2 == 0
prerelease = (version[1] >= 90 and version[1] < 100) or (version[1] >= 900 and version[1] < 1000)
stable = even and not prerelease
if selected == 'stable':
if selected == "stable":
return stable
else:
return True
def no_policy(version, selected):
return True
version_policies = {
'odd-unstable': odd_unstable,
'none': no_policy,
"odd-unstable": odd_unstable,
"none": no_policy,
}
def make_version_policy(version_predicate, selected):
return lambda version: version_predicate(version, selected)
parser = argparse.ArgumentParser(description='Find latest version for a GNOME package by crawling their release server.')
parser.add_argument('package-name', help='Name of the directory in https://ftp.gnome.org/pub/GNOME/sources/ containing the package.')
parser.add_argument('version-policy', help='Policy determining which versions are considered stable. For most GNOME packages, odd minor versions are unstable but there are exceptions.', choices=version_policies.keys(), nargs='?', default='odd-unstable')
parser.add_argument('requested-release', help='Most of the time, we will want to update to stable version but sometimes it is useful to test.', choices=['stable', 'unstable'], nargs='?', default='stable')
def make_version_policy(version_predicate, selected, upper_bound):
if not upper_bound:
upper_bound = [math.inf, math.inf]
else:
upper_bound = version_to_list(upper_bound)
return lambda version: version_predicate(version, selected) and version_to_list(version) < upper_bound
if __name__ == '__main__':
parser = argparse.ArgumentParser(description="Find latest version for a GNOME package by crawling their release server.")
parser.add_argument("package-name", help="Name of the directory in https://ftp.gnome.org/pub/GNOME/sources/ containing the package.")
parser.add_argument("version-policy", help="Policy determining which versions are considered stable. For most GNOME packages, odd minor versions are unstable but there are exceptions.", choices=version_policies.keys(), nargs="?", default="odd-unstable")
parser.add_argument("requested-release", help="Most of the time, we will want to update to stable version but sometimes it is useful to test.", choices=["stable", "unstable"], nargs="?", default="stable")
parser.add_argument("--upper-bound", dest="upper-bound", help="Only look for versions older than this one (useful for pinning dependencies).")
if __name__ == "__main__":
args = parser.parse_args()
package_name = getattr(args, 'package-name')
requested_release = getattr(args, 'requested-release')
version_predicate = version_policies[getattr(args, 'version-policy')]
version_policy = make_version_policy(version_predicate, requested_release)
package_name = getattr(args, "package-name")
requested_release = getattr(args, "requested-release")
upper_bound = getattr(args, "upper-bound")
version_predicate = version_policies[getattr(args, "version-policy")]
version_policy = make_version_policy(version_predicate, requested_release, upper_bound)
# The structure of cache.json: https://gitlab.gnome.org/Infrastructure/sysadmin-bin/blob/master/ftpadmin#L762
cache = json.loads(requests.get('https://ftp.gnome.org/pub/GNOME/sources/{}/cache.json'.format(package_name)).text)
cache = json.loads(requests.get(f"https://ftp.gnome.org/pub/GNOME/sources/{package_name}/cache.json").text)
if type(cache) != list or cache[0] != 4:
print('Unknown format of cache.json file.', file=sys.stderr)
print("Unknown format of cache.json file.", file=sys.stderr)
sys.exit(1)
versions = cache[2][package_name]
versions = sorted(filter(version_policy, versions), key=version_to_list)
if len(versions) == 0:
print('No versions matched.', file=sys.stderr)
print("No versions matched.", file=sys.stderr)
sys.exit(1)
print(versions[-1])

View file

@ -1,8 +1,18 @@
{ stdenv, lib, writeScript, python3, common-updater-scripts }:
{ packageName, attrPath ? packageName, versionPolicy ? "odd-unstable" }:
{ stdenv, pkgs, lib, writeScript, python3, common-updater-scripts }:
{ packageName, attrPath ? packageName, versionPolicy ? "odd-unstable", freeze ? false }:
let
python = python3.withPackages (p: [ p.requests ]);
upperBoundFlag =
let
package = lib.getAttrFromPath (lib.splitString "." attrPath) pkgs;
packageVersion = lib.getVersion package;
versionComponents = lib.versions.splitVersion packageVersion;
minorVersion = lib.versions.minor packageVersion;
minorAvailable = builtins.length versionComponents > 1 && builtins.match "[0-9]+" minorVersion != null;
nextMinor = builtins.fromJSON minorVersion + 1;
upperBound = "${lib.versions.major packageVersion}.${builtins.toString nextMinor}";
in lib.optionalString (minorAvailable && freeze) ''--upper-bound="${upperBound}"'';
updateScript = writeScript "gnome-update-script" ''
#!${stdenv.shell}
set -o errexit
@ -10,7 +20,7 @@ let
attr_path="$2"
version_policy="$3"
PATH=${lib.makeBinPath [ common-updater-scripts python ]}
latest_tag=$(python "${./find-latest-version.py}" "$package_name" "$version_policy" "stable")
latest_tag=$(python "${./find-latest-version.py}" "$package_name" "$version_policy" "stable" ${upperBoundFlag})
update-source-version "$attr_path" "$latest_tag"
'';
in [ updateScript packageName attrPath versionPolicy ]

View file

@ -4,13 +4,13 @@
stdenv.mkDerivation rec {
pname = "switchboard-plug-pantheon-shell";
version = "2.8.3";
version = "2.8.4";
src = fetchFromGitHub {
owner = "elementary";
repo = pname;
rev = version;
sha256 = "0ypyppxx51l3r3fgxrvjdwnz33lpbfh1bf27fww9fx9520wixnx8";
sha256 = "1nnsv745inbdqk3xnbcaqmj87vr3kzh5hazbh8v3ib33cpi7wy88";
};
passthru = {

View file

@ -4,7 +4,7 @@
let
fetchElmDeps = import ./fetchElmDeps.nix { inherit stdenv lib fetchurl; };
hsPkgs = haskell.packages.ghc881.override {
hsPkgs = haskell.packages.ghc883.override {
overrides = self: super: with haskell.lib;
let elmPkgs = rec {
elm = overrideCabal (self.callPackage ./packages/elm.nix { }) (drv: {
@ -28,7 +28,7 @@ let
`package/nix/build.sh`
*/
elm-format = justStaticExecutables (overrideCabal (self.callPackage ./packages/elm-format.nix {}) (drv: {
# GHC 8.8.1 support
# GHC 8.8.3 support
# https://github.com/avh4/elm-format/pull/640
patches = [(
fetchpatch {
@ -39,7 +39,7 @@ let
# Tests are failing after upgrade to ghc881.
# Cause is probably just a minor change in stdout output
# see https://github.com/avh4/elm-format/pull/640
doCheck = false;
# doCheck = false;
jailbreak = true;
}));

View file

@ -28,7 +28,7 @@ mkDerivation {
quickcheck-io split tasty tasty-golden tasty-hunit tasty-quickcheck
text
];
homepage = "http://elm-lang.org";
homepage = "https://elm-lang.org";
description = "Instrumentation library for Elm";
license = stdenv.lib.licenses.bsd3;
}

View file

@ -73,7 +73,7 @@ let
'';
# Splicer will pull out correct variations
libDeps = platform: stdenv.lib.optional enableTerminfo [ ncurses ]
libDeps = platform: stdenv.lib.optional enableTerminfo ncurses
++ [libffi]
++ stdenv.lib.optional (!enableIntegerSimple) gmp
++ stdenv.lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows) libiconv;
@ -160,10 +160,10 @@ stdenv.mkDerivation (rec {
"--with-system-libffi"
"--with-ffi-includes=${targetPackages.libffi.dev}/include"
"--with-ffi-libraries=${targetPackages.libffi.out}/lib"
] ++ stdenv.lib.optional (targetPlatform == hostPlatform && !enableIntegerSimple) [
] ++ stdenv.lib.optionals (targetPlatform == hostPlatform && !enableIntegerSimple) [
"--with-gmp-includes=${targetPackages.gmp.dev}/include"
"--with-gmp-libraries=${targetPackages.gmp.out}/lib"
] ++ stdenv.lib.optional (targetPlatform == hostPlatform && hostPlatform.libc != "glibc" && !targetPlatform.isWindows) [
] ++ stdenv.lib.optionals (targetPlatform == hostPlatform && hostPlatform.libc != "glibc" && !targetPlatform.isWindows) [
"--with-iconv-includes=${libiconv}/include"
"--with-iconv-libraries=${libiconv}/lib"
] ++ stdenv.lib.optionals (targetPlatform != hostPlatform) [
@ -176,7 +176,7 @@ stdenv.mkDerivation (rec {
"--disable-large-address-space"
];
# Make sure we never relax`$PATH` and hooks support for compatability.
# Make sure we never relax`$PATH` and hooks support for compatibility.
strictDeps = true;
# Dont add -liconv to LDFLAGS automatically so that GHC will add it itself.

View file

@ -186,7 +186,7 @@ stdenv.mkDerivation (rec {
"--disable-large-address-space"
];
# Make sure we never relax`$PATH` and hooks support for compatability.
# Make sure we never relax`$PATH` and hooks support for compatibility.
strictDeps = true;
# Dont add -liconv to LDFLAGS automatically so that GHC will add it itself.

View file

@ -185,7 +185,7 @@ stdenv.mkDerivation (rec {
"--disable-large-address-space"
];
# Make sure we never relax`$PATH` and hooks support for compatability.
# Make sure we never relax`$PATH` and hooks support for compatibility.
strictDeps = true;
# Dont add -liconv to LDFLAGS automatically so that GHC will add it itself.

View file

@ -1,236 +0,0 @@
{ stdenv, pkgsBuildTarget, targetPackages
# build-tools
, bootPkgs
, autoconf, automake, coreutils, fetchurl, perl, python3, m4, sphinx
, bash
, libiconv ? null, ncurses
, # GHC can be built with system libffi or a bundled one.
libffi ? null
, useLLVM ? !stdenv.targetPlatform.isx86 || stdenv.targetPlatform.isiOS
, # LLVM is conceptually a run-time-only depedendency, but for
# non-x86, we need LLVM to bootstrap later stages, so it becomes a
# build-time dependency too.
buildLlvmPackages, llvmPackages
, # If enabled, GHC will be built with the GPL-free but slower integer-simple
# library instead of the faster but GPLed integer-gmp library.
enableIntegerSimple ? !(stdenv.lib.any (stdenv.lib.meta.platformMatch stdenv.hostPlatform) gmp.meta.platforms), gmp
, # If enabled, use -fPIC when compiling static libs.
enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform
, # Whether to build dynamic libs for the standard library (on the target
# platform). Static libs are always built.
enableShared ? !stdenv.targetPlatform.isWindows && !stdenv.targetPlatform.useiOSPrebuilt
, # Whetherto build terminfo.
enableTerminfo ? !stdenv.targetPlatform.isWindows
, # What flavour to build. An empty string indicates no
# specific flavour and falls back to ghc default values.
ghcFlavour ? stdenv.lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform)
(if useLLVM then "perf-cross" else "perf-cross-ncg")
, # Whether to disable the large address space allocator
# necessary fix for iOS: https://www.reddit.com/r/haskell/comments/4ttdz1/building_an_osxi386_to_iosarm64_cross_compiler/d5qvd67/
disableLargeAddressSpace ? stdenv.targetPlatform.isDarwin && stdenv.targetPlatform.isAarch64
}:
assert !enableIntegerSimple -> gmp != null;
let
inherit (stdenv) buildPlatform hostPlatform targetPlatform;
inherit (bootPkgs) ghc;
# TODO(@Ericson2314) Make unconditional
targetPrefix = stdenv.lib.optionalString
(targetPlatform != hostPlatform)
"${targetPlatform.config}-";
buildMK = ''
BuildFlavour = ${ghcFlavour}
ifneq \"\$(BuildFlavour)\" \"\"
include mk/flavours/\$(BuildFlavour).mk
endif
DYNAMIC_GHC_PROGRAMS = ${if enableShared then "YES" else "NO"}
INTEGER_LIBRARY = ${if enableIntegerSimple then "integer-simple" else "integer-gmp"}
'' + stdenv.lib.optionalString (targetPlatform != hostPlatform) ''
Stage1Only = ${if targetPlatform.system == hostPlatform.system then "NO" else "YES"}
CrossCompilePrefix = ${targetPrefix}
HADDOCK_DOCS = NO
BUILD_SPHINX_HTML = NO
BUILD_SPHINX_PDF = NO
'' + stdenv.lib.optionalString enableRelocatedStaticLibs ''
GhcLibHcOpts += -fPIC
GhcRtsHcOpts += -fPIC
'' + stdenv.lib.optionalString targetPlatform.useAndroidPrebuilt ''
EXTRA_CC_OPTS += -std=gnu99
'';
# Splicer will pull out correct variations
libDeps = platform: stdenv.lib.optional enableTerminfo ncurses
++ [libffi]
++ stdenv.lib.optional (!enableIntegerSimple) gmp
++ stdenv.lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows) libiconv;
toolsForTarget = [
pkgsBuildTarget.targetPackages.stdenv.cc
] ++ stdenv.lib.optional useLLVM buildLlvmPackages.llvm;
targetCC = builtins.head toolsForTarget;
# ld.gold is disabled for musl libc due to https://sourceware.org/bugzilla/show_bug.cgi?id=23856
# see #84670 and #49071 for more background.
useLdGold = targetPlatform.isLinux && !(targetPlatform.useLLVM or false) && !targetPlatform.isMusl;
in
stdenv.mkDerivation (rec {
version = "8.8.1";
name = "${targetPrefix}ghc-${version}";
src = fetchurl {
url = "https://downloads.haskell.org/ghc/${version}/ghc-${version}-src.tar.xz";
sha256 = "06kj4fhvijinjafiy4s873n60qly323rdlz9bmc79nhlp3cq72lh";
};
enableParallelBuilding = true;
outputs = [ "out" "doc" ];
postPatch = "patchShebangs .";
# GHC is a bit confused on its cross terminology.
preConfigure = ''
for env in $(env | grep '^TARGET_' | sed -E 's|\+?=.*||'); do
export "''${env#TARGET_}=''${!env}"
done
# GHC is a bit confused on its cross terminology, as these would normally be
# the *host* tools.
export CC="${targetCC}/bin/${targetCC.targetPrefix}cc"
export CXX="${targetCC}/bin/${targetCC.targetPrefix}cxx"
# Use gold to work around https://sourceware.org/bugzilla/show_bug.cgi?id=16177
export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld${stdenv.lib.optionalString useLdGold ".gold"}"
export AS="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}as"
export AR="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}ar"
export NM="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}nm"
export RANLIB="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}ranlib"
export READELF="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}readelf"
export STRIP="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}strip"
echo -n "${buildMK}" > mk/build.mk
sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure
'' + stdenv.lib.optionalString (!stdenv.isDarwin) ''
export NIX_LDFLAGS+=" -rpath $out/lib/ghc-${version}"
'' + stdenv.lib.optionalString stdenv.isDarwin ''
export NIX_LDFLAGS+=" -no_dtrace_dof"
'' + stdenv.lib.optionalString targetPlatform.useAndroidPrebuilt ''
sed -i -e '5i ,("armv7a-unknown-linux-androideabi", ("e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64", "cortex-a8", ""))' llvm-targets
'' + stdenv.lib.optionalString targetPlatform.isMusl ''
echo "patching llvm-targets for musl targets..."
echo "Cloning these existing '*-linux-gnu*' targets:"
grep linux-gnu llvm-targets | sed 's/^/ /'
echo "(go go gadget sed)"
sed -i 's,\(^.*linux-\)gnu\(.*\)$,\0\n\1musl\2,' llvm-targets
echo "llvm-targets now contains these '*-linux-musl*' targets:"
grep linux-musl llvm-targets | sed 's/^/ /'
echo "And now patching to preserve '-musleabi' as done with '-gnueabi'"
# (aclocal.m4 is actual source, but patch configure as well since we don't re-gen)
for x in configure aclocal.m4; do
substituteInPlace $x \
--replace '*-android*|*-gnueabi*)' \
'*-android*|*-gnueabi*|*-musleabi*)'
done
'';
# TODO(@Ericson2314): Always pass "--target" and always prefix.
configurePlatforms = [ "build" "host" ]
++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
# `--with` flags for libraries needed for RTS linker
configureFlags = [
"--datadir=$doc/share/doc/ghc"
"--with-curses-includes=${ncurses.dev}/include" "--with-curses-libraries=${ncurses.out}/lib"
] ++ stdenv.lib.optionals (libffi != null) ["--with-system-libffi" "--with-ffi-includes=${targetPackages.libffi.dev}/include" "--with-ffi-libraries=${targetPackages.libffi.out}/lib"
] ++ stdenv.lib.optionals (targetPlatform == hostPlatform && !enableIntegerSimple) [
"--with-gmp-includes=${targetPackages.gmp.dev}/include" "--with-gmp-libraries=${targetPackages.gmp.out}/lib"
] ++ stdenv.lib.optionals (targetPlatform == hostPlatform && hostPlatform.libc != "glibc" && !targetPlatform.isWindows) [
"--with-iconv-includes=${libiconv}/include" "--with-iconv-libraries=${libiconv}/lib"
] ++ stdenv.lib.optionals (targetPlatform != hostPlatform) [
"--enable-bootstrap-with-devel-snapshot"
] ++ stdenv.lib.optionals useLdGold [
"CFLAGS=-fuse-ld=gold"
"CONF_GCC_LINKER_OPTS_STAGE1=-fuse-ld=gold"
"CONF_GCC_LINKER_OPTS_STAGE2=-fuse-ld=gold"
] ++ stdenv.lib.optionals (disableLargeAddressSpace) [
"--disable-large-address-space"
];
# Make sure we never relax`$PATH` and hooks support for compatability.
strictDeps = true;
# Dont add -liconv to LDFLAGS automatically so that GHC will add it itself.
dontAddExtraLibs = true;
nativeBuildInputs = [
perl autoconf automake m4 python3 sphinx
ghc bootPkgs.alex bootPkgs.happy bootPkgs.hscolour
];
# For building runtime libs
depsBuildTarget = toolsForTarget;
buildInputs = [ perl bash ] ++ (libDeps hostPlatform);
propagatedBuildInputs = [ targetPackages.stdenv.cc ]
++ stdenv.lib.optional useLLVM llvmPackages.llvm;
depsTargetTarget = map stdenv.lib.getDev (libDeps targetPlatform);
depsTargetTargetPropagated = map (stdenv.lib.getOutput "out") (libDeps targetPlatform);
# required, because otherwise all symbols from HSffi.o are stripped, and
# that in turn causes GHCi to abort
stripDebugFlags = [ "-S" ] ++ stdenv.lib.optional (!targetPlatform.isDarwin) "--keep-file-symbols";
checkTarget = "test";
hardeningDisable = [ "format" ] ++ stdenv.lib.optional stdenv.targetPlatform.isMusl "pie";
postInstall = ''
# Install the bash completion file.
install -D -m 444 utils/completion/ghc.bash $out/share/bash-completion/completions/${targetPrefix}ghc
# Patch scripts to include "readelf" and "cat" in $PATH.
for i in "$out/bin/"*; do
test ! -h $i || continue
egrep --quiet '^#!' <(head -n 1 $i) || continue
sed -i -e '2i export PATH="$PATH:${stdenv.lib.makeBinPath [ targetPackages.stdenv.cc.bintools coreutils ]}"' $i
done
'';
passthru = {
inherit bootPkgs targetPrefix;
inherit llvmPackages;
inherit enableShared;
# Our Cabal compiler name
haskellCompilerName = "ghc-${version}";
};
meta = {
homepage = "http://haskell.org/ghc";
description = "The Glasgow Haskell Compiler";
maintainers = with stdenv.lib.maintainers; [ marcweber andres peti ];
inherit (ghc.meta) license platforms;
};
} // stdenv.lib.optionalAttrs targetPlatform.useAndroidPrebuilt {
dontStrip = true;
dontPatchELF = true;
noAuditTmpdir = true;
})

View file

@ -73,7 +73,7 @@ let
'';
# Splicer will pull out correct variations
libDeps = platform: stdenv.lib.optional enableTerminfo [ ncurses ]
libDeps = platform: stdenv.lib.optional enableTerminfo ncurses
++ [libffi]
++ stdenv.lib.optional (!enableIntegerSimple) gmp
++ stdenv.lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows) libiconv;
@ -160,10 +160,10 @@ stdenv.mkDerivation (rec {
"--with-system-libffi"
"--with-ffi-includes=${targetPackages.libffi.dev}/include"
"--with-ffi-libraries=${targetPackages.libffi.out}/lib"
] ++ stdenv.lib.optional (targetPlatform == hostPlatform && !enableIntegerSimple) [
] ++ stdenv.lib.optionals (targetPlatform == hostPlatform && !enableIntegerSimple) [
"--with-gmp-includes=${targetPackages.gmp.dev}/include"
"--with-gmp-libraries=${targetPackages.gmp.out}/lib"
] ++ stdenv.lib.optional (targetPlatform == hostPlatform && hostPlatform.libc != "glibc" && !targetPlatform.isWindows) [
] ++ stdenv.lib.optionals (targetPlatform == hostPlatform && hostPlatform.libc != "glibc" && !targetPlatform.isWindows) [
"--with-iconv-includes=${libiconv}/include"
"--with-iconv-libraries=${libiconv}/lib"
] ++ stdenv.lib.optionals (targetPlatform != hostPlatform) [
@ -176,7 +176,7 @@ stdenv.mkDerivation (rec {
"--disable-large-address-space"
];
# Make sure we never relax`$PATH` and hooks support for compatability.
# Make sure we never relax`$PATH` and hooks support for compatibility.
strictDeps = true;
# Dont add -liconv to LDFLAGS automatically so that GHC will add it itself.

View file

@ -176,7 +176,7 @@ stdenv.mkDerivation (rec {
"--disable-large-address-space"
];
# Make sure we never relax`$PATH` and hooks support for compatability.
# Make sure we never relax`$PATH` and hooks support for compatibility.
strictDeps = true;
# Dont add -liconv to LDFLAGS automatically so that GHC will add it itself.

View file

@ -1,42 +1,44 @@
{stdenv, fetchFromGitHub, cmake, which, m4, python, bison, flex, llvmPackages,
testedTargets ? ["sse2"] # the default test target is sse4, but that is not supported by all Hydra agents
{ stdenv, fetchFromGitHub
, cmake, which, m4, python3, bison, flex, llvmPackages
# the default test target is sse4, but that is not supported by all Hydra agents
, testedTargets ? [ "sse2" ]
}:
stdenv.mkDerivation rec {
version = "1.10.0";
rev = "v${version}";
pname = "ispc";
version = "1.13.0";
src = fetchFromGitHub {
owner = pname;
repo = pname;
rev = "v${version}";
sha256 = "1l74xkpwwxc38k2ngg7mpvswziiy91yxslgfad6688hh1n5jvayd";
};
nativeBuildInputs = [ cmake which m4 bison flex python3 ];
buildInputs = with llvmPackages; [
# we need to link against libclang, so we need the unwrapped
llvm llvmPackages.clang-unwrapped
];
postPatch = ''
substituteInPlace CMakeLists.txt \
--replace curses ncurses
substituteInPlace cmake/GenerateBuiltins.cmake \
--replace 'bit 32 64' 'bit 64'
'';
inherit testedTargets;
pname = "ispc";
src = fetchFromGitHub {
owner = "ispc";
repo = "ispc";
inherit rev;
sha256 = "1x07n2gaff3v32yvddrb659mx5gg12bnbsqbyfimp396wn04w60b";
};
# needs 'transcendentals' executable, which is only on linux
doCheck = stdenv.isLinux;
nativeBuildInputs = [ cmake ];
buildInputs = with llvmPackages; [
which
m4
python
bison
flex
llvm
llvmPackages.clang-unwrapped # we need to link against libclang, so we need the unwrapped
];
postPatch = "sed -i -e 's/curses/ncurses/g' CMakeLists.txt";
# TODO: this correctly catches errors early, but also some things that are just weird and don't seem to be real
# errors
#configurePhase = ''
# makeFlagsArray=( SHELL="${bash}/bin/bash -o pipefail" )
#'';
# the compiler enforces -Werror, and -fno-strict-overflow makes it mad.
# hilariously this is something of a double negative: 'disable' the
# 'strictoverflow' hardening protection actually means we *allow* the compiler
# to do strict overflow optimization. somewhat misleading...
hardeningDisable = [ "strictoverflow" ];
checkPhase = ''
export ISPC_HOME=$PWD/bin
@ -55,13 +57,14 @@ stdenv.mkDerivation rec {
"-DCLANG_EXECUTABLE=${llvmPackages.clang}/bin/clang"
"-DISPC_INCLUDE_EXAMPLES=OFF"
"-DISPC_INCLUDE_UTILS=OFF"
];
"-DARM_ENABLED=FALSE"
];
meta = with stdenv.lib; {
homepage = "https://ispc.github.io/";
homepage = "https://ispc.github.io/";
description = "Intel 'Single Program, Multiple Data' Compiler, a vectorised language";
license = licenses.bsd3;
platforms = ["x86_64-linux" "x86_64-darwin"]; # TODO: buildable on more platforms?
maintainers = [ maintainers.aristid ];
license = licenses.bsd3;
platforms = [ "x86_64-linux" "x86_64-darwin" ]; # TODO: buildable on more platforms?
maintainers = with maintainers; [ aristid thoughtpolice ];
};
}

View file

@ -1,12 +1,12 @@
{ stdenv, fetchurl, makeWrapper, jre, ncurses }:
stdenv.mkDerivation rec {
version = "0.20.0-RC1";
version = "0.23.0-RC1";
pname = "dotty-bare";
src = fetchurl {
url = "https://github.com/lampepfl/dotty/releases/download/${version}/dotty-${version}.tar.gz";
sha256 = "08qs3m32cbh6516gcwraa1b5k935awmjxls6kg6xll722hkdd9l6";
sha256 = "0c64dw2qp8mhgsll8viqaiy34wq1ablkbc4bi813a1r4nqg57sv0";
};
propagatedBuildInputs = [ jre ncurses.dev ] ;

View file

@ -45,6 +45,12 @@ self: super: {
# Needs older QuickCheck version
attoparsec-varword = dontCheck super.attoparsec-varword;
# http://bugs.darcs.net/issue2642
darcs = doJailbreak (appendPatches super.darcs [
./patches/darcs-setup.patch
./patches/darcs-2.14.2-Compile-against-GHC-8.8.patch
]);
# Tests are failing
# https://github.com/bos/statistics/issues/123
statistics = dontCheck super.statistics;
@ -592,6 +598,12 @@ self: super: {
elm-server = markBroken super.elm-server;
elm-yesod = markBroken super.elm-yesod;
# https://github.com/Euterpea/Euterpea2/issues/40
Euterpea = appendPatch super.Euterpea (pkgs.fetchpatch {
url = "https://github.com/Euterpea/Euterpea2/pull/38.patch";
sha256 = "13g462qmj8c7if797gnyvf8h0cddmm3xy0pjldw48w8f8sr4qsj0";
});
# https://github.com/athanclark/sets/issues/2
sets = dontCheck super.sets;
@ -1055,13 +1067,9 @@ self: super: {
# https://github.com/haskell-hvr/hgettext/issues/14
hgettext = doJailbreak super.hgettext;
# 2.23.0 supports GHC 8.x and up
haddock = super.haddock_2_22_0;
# haddock-api-2.22.0: Break out of “QuickCheck ==2.11.*, hspec >=2.4.4 && <2.6”
haddock-api = dontHaddock (doJailbreak (super.haddock-api_2_22_0));
# 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_9_0 = doJailbreak (dontCheck super.haddock-library_1_9_0);
# Generate shell completion.
cabal2nix = generateOptparseApplicativeCompletion "cabal2nix" super.cabal2nix;
@ -1499,10 +1507,16 @@ self: super: {
polysemy = self.polysemy_1_3_0_0;
};
# Fixed at head, but hasn't cut a release in awhile.
darcs = doJailbreak super.darcs;
# Test suite requires running a database server. Testing is done upstream.
hasql-pool = dontCheck super.hasql-pool;
# This bumps optparse-applicative to <0.16 in the cabal file, as otherwise
# the version bounds are not satisfied. This can be removed if the PR at
# https://github.com/ananthakumaran/webify/pull/27 is merged and a new
# release of webify is published.
webify = appendPatch super.webify (pkgs.fetchpatch {
url = "https://github.com/ananthakumaran/webify/pull/27/commits/6d653e7bdc1ffda75ead46851b5db45e87cb2aa0.patch";
sha256 = "sha256:0xbfhzhzg94b4r5qy5dg1c40liswwpqarrc2chcwgfbfnrmwkfc2";
});
} // import ./configuration-tensorflow.nix {inherit pkgs haskellLib;} self super

View file

@ -42,6 +42,9 @@ self: super: {
unix = null;
xhtml = null;
# Deviate from Stackage LTS-15.x to fix the build.
haddock-library = self.haddock-library_1_9_0;
# Jailbreak to fix the build.
async = doJailbreak super.async;
ChasingBottoms = doJailbreak super.ChasingBottoms;
@ -60,7 +63,6 @@ self: super: {
zlib = doJailbreak super.zlib;
# Use the latest version to fix the build.
microlens-th = self.microlens-th_0_4_3_5;
optics-core = self.optics-core_0_3;
repline = self.repline_0_3_0_0;
ghc-lib-parser-ex = self.ghc-lib-parser-ex_8_10_0_4;
@ -94,4 +96,6 @@ self: super: {
sha256 = "0rgzrq0513nlc1vw7nw4km4bcwn4ivxcgi33jly4a7n3c1r32v1f";
});
# Only 0.8 is compatible with ghc 8.10 https://hackage.haskell.org/package/apply-refact/changelog
apply-refact = super.apply-refact_0_8_0_0;
}

View file

@ -91,4 +91,6 @@ self: super: {
# ghc versions prior to 8.8.x needs additional dependency to compile successfully.
ghc-lib-parser-ex = addBuildDepend super.ghc-lib-parser-ex self.ghc-lib-parser;
# Only 0.6 is compatible with ghc 8.6 https://hackage.haskell.org/package/apply-refact/changelog
apply-refact = super.apply-refact_0_6_0_0;
}

View file

@ -41,6 +41,10 @@ self: super: {
unix = null;
xhtml = null;
# GHC 8.8.x can build haddock version 2.23.*
haddock = self.haddock_2_23_1;
haddock-api = self.haddock-api_2_23_1;
# These builds need Cabal 3.2.x.
cabal2spec = super.cabal2spec.override { Cabal = self.Cabal_3_2_0_0; };
cabal-install = super.cabal-install.overrideScope (self: super: { Cabal = self.Cabal_3_2_0_0; });
@ -96,4 +100,6 @@ self: super: {
# of issues with Cabal 3.x.
darcs = dontDistribute super.darcs;
# Only 0.7 is compatible with ghc 8.7 https://hackage.haskell.org/package/apply-refact/changelog
apply-refact = super.apply-refact_0_7_0_0;
}

View file

@ -72,7 +72,7 @@ default-package-overrides:
# gi-gdkx11-4.x requires gtk-4.x, which is still under development and
# not yet available in Nixpkgs
- gi-gdkx11 < 4
# LTS Haskell 15.8
# LTS Haskell 15.9
- abstract-deque ==0.3
- abstract-par ==0.3.3
- AC-Angle ==1.0
@ -309,7 +309,7 @@ default-package-overrides:
- bitarray ==0.0.1.1
- bits ==0.5.2
- bitset-word8 ==0.1.1.1
- bits-extra ==0.0.1.5
- bits-extra ==0.0.2.0
- bitvec ==1.0.3.0
- blake2 ==0.3.0
- blanks ==0.3.0
@ -346,7 +346,7 @@ default-package-overrides:
- buffer-builder ==0.2.4.7
- buffer-pipe ==0.0
- bugsnag-hs ==0.1.0.0
- butcher ==1.3.3.0
- butcher ==1.3.3.1
- bv ==0.5
- bv-little ==1.1.1
- byteable ==0.1.1
@ -408,7 +408,7 @@ default-package-overrides:
- chimera ==0.3.1.0
- choice ==0.2.2
- chronologique ==0.3.1.1
- chronos ==1.1
- chronos ==1.1.1
- chronos-bench ==0.2.0.2
- chunked-data ==0.3.1
- cipher-aes ==0.2.11
@ -823,20 +823,20 @@ default-package-overrides:
- genvalidity-scientific ==0.2.1.1
- genvalidity-text ==0.7.0.2
- genvalidity-time ==0.3.0.0
- genvalidity-typed-uuid ==0.0.0.1
- genvalidity-typed-uuid ==0.0.0.2
- genvalidity-unordered-containers ==0.3.0.1
- genvalidity-uuid ==0.1.0.3
- genvalidity-uuid ==0.1.0.4
- genvalidity-vector ==0.3.0.1
- geojson ==4.0.2
- getopt-generics ==0.13.0.4
- ghc-compact ==0.1.0.0
- ghc-core ==0.5.6
- ghc-exactprint ==0.6.2
- ghcid ==0.8.5
- ghcid ==0.8.6
- ghci-hexcalc ==0.1.1.0
- ghcjs-codemirror ==0.0.0.2
- ghc-lib ==8.8.3.20200224
- ghc-lib-parser ==8.8.3.20200224
- ghc-lib ==8.8.3.20200412.1
- ghc-lib-parser ==8.8.3.20200412.1
- ghc-lib-parser-ex ==8.8.5.8
- ghc-paths ==0.1.0.12
- ghc-prof ==1.4.1.7
@ -987,7 +987,7 @@ default-package-overrides:
- hsc2hs ==0.68.7
- hscolour ==1.24.4
- hsdns ==1.8
- hsebaysdk ==0.4.0.0
- hsebaysdk ==0.4.1.0
- hsemail ==2.2.0
- hset ==2.2.0
- hs-functors ==0.1.6.0
@ -1058,36 +1058,36 @@ default-package-overrides:
- hunit-dejafu ==2.0.0.1
- hvect ==0.4.0.0
- hvega ==0.5.0.0
- hw-balancedparens ==0.3.0.5
- hw-bits ==0.7.1.5
- hw-conduit ==0.2.0.6
- hw-conduit-merges ==0.2.0.0
- hw-diagnostics ==0.0.0.7
- hw-dsv ==0.4.0
- hw-balancedparens ==0.3.1.0
- hw-bits ==0.7.2.0
- hw-conduit ==0.2.1.0
- hw-conduit-merges ==0.2.1.0
- hw-diagnostics ==0.0.1.0
- hw-dsv ==0.4.1.0
- hweblib ==0.6.3
- hw-eliasfano ==0.1.1.1
- hw-excess ==0.2.2.3
- hw-fingertree ==0.1.1.1
- hw-fingertree-strict ==0.1.1.3
- hw-hedgehog ==0.1.0.5
- hw-hspec-hedgehog ==0.1.0.9
- hw-int ==0.0.0.4
- hw-ip ==2.4.1.0
- hw-json ==1.3.1.1
- hw-json-simd ==0.1.0.4
- hw-json-simple-cursor ==0.1.0.2
- hw-json-standard-cursor ==0.2.1.3
- hw-mquery ==0.2.0.2
- hw-packed-vector ==0.2.0.1
- hw-parser ==0.1.0.2
- hw-prim ==0.6.2.40
- hw-rankselect ==0.13.3.2
- hw-rankselect-base ==0.3.3.0
- hw-simd ==0.1.1.5
- hw-streams ==0.0.0.12
- hw-eliasfano ==0.1.2.0
- hw-excess ==0.2.3.0
- hw-fingertree ==0.1.2.0
- hw-fingertree-strict ==0.1.2.0
- hw-hedgehog ==0.1.1.0
- hw-hspec-hedgehog ==0.1.1.0
- hw-int ==0.0.1.0
- hw-ip ==2.4.2.0
- hw-json ==1.3.2.0
- hw-json-simd ==0.1.1.0
- hw-json-simple-cursor ==0.1.1.0
- hw-json-standard-cursor ==0.2.2.0
- hw-mquery ==0.2.1.0
- hw-packed-vector ==0.2.1.0
- hw-parser ==0.1.1.0
- hw-prim ==0.6.3.0
- hw-rankselect ==0.13.4.0
- hw-rankselect-base ==0.3.4.0
- hw-simd ==0.1.2.0
- hw-streams ==0.0.1.0
- hw-string-parse ==0.0.0.4
- hw-succinct ==0.1.0.1
- hw-xml ==0.5.0.0
- hw-xml ==0.5.1.0
- hxt ==9.3.1.18
- hxt-charproperties ==9.4.0.0
- hxt-css ==0.1.0.3
@ -1123,7 +1123,7 @@ default-package-overrides:
- inj ==1.0
- inline-c ==0.9.1.0
- inline-c-cpp ==0.4.0.2
- insert-ordered-containers ==0.2.3
- insert-ordered-containers ==0.2.3.1
- inspection-testing ==0.4.2.4
- instance-control ==0.1.2.0
- int-cast ==0.2.0.0
@ -1318,7 +1318,7 @@ default-package-overrides:
- microlens-mtl ==0.2.0.1
- microlens-platform ==0.4.1
- microlens-process ==0.2.0.1
- microlens-th ==0.4.3.4
- microlens-th ==0.4.3.5
- microspec ==0.2.1.3
- microstache ==1.0.1.1
- midair ==0.2.0.1
@ -1658,7 +1658,7 @@ default-package-overrides:
- qm-interpolated-string ==0.3.0.0
- qrcode-core ==0.9.2
- qrcode-juicypixels ==0.8.0
- quadratic-irrational ==0.1.0
- quadratic-irrational ==0.1.1
- QuasiText ==0.1.2.6
- QuickCheck ==2.13.2
- quickcheck-arbitrary-adt ==0.3.1.0
@ -1719,7 +1719,7 @@ default-package-overrides:
- regex-compat ==0.95.2.0
- regex-compat-tdfa ==0.95.1.4
- regex-pcre ==0.95.0.0
- regex-pcre-builtin ==0.95.1.1.8.43
- regex-pcre-builtin ==0.95.1.2.8.43
- regex-posix ==0.96.0.0
- regex-tdfa ==1.3.1.0
- regex-with-pcre ==1.1.0.0
@ -1761,7 +1761,7 @@ default-package-overrides:
- runmemo ==1.0.0.1
- run-st ==0.1.1.0
- safe ==0.3.18
- safecopy ==0.10.2
- safecopy ==0.10.3
- safe-decimal ==0.2.0.0
- safe-exceptions ==0.1.7.0
- safe-exceptions-checked ==0.1.0
@ -1787,7 +1787,7 @@ default-package-overrides:
- scientific ==0.3.6.2
- scotty ==0.11.5
- scrypt ==0.5.0
- sdl2 ==2.5.1.0
- sdl2 ==2.5.2.0
- sdl2-gfx ==0.2
- sdl2-image ==2.0.0
- sdl2-mixer ==1.1.0
@ -1825,7 +1825,7 @@ default-package-overrides:
- servant-client-core ==0.16
- servant-conduit ==0.15
- servant-docs ==0.11.4
- servant-elm ==0.7.1
- servant-elm ==0.7.2
- servant-foreign ==0.15
- servant-js ==0.9.4.1
- servant-JuicyPixels ==0.3.0.5
@ -2001,7 +2001,7 @@ default-package-overrides:
- tasty-dejafu ==2.0.0.1
- tasty-discover ==4.2.1
- tasty-expected-failure ==0.11.1.2
- tasty-golden ==2.3.3
- tasty-golden ==2.3.3.1
- tasty-hedgehog ==1.0.0.2
- tasty-hspec ==1.1.5.1
- tasty-hunit ==0.10.0.2
@ -2063,8 +2063,8 @@ default-package-overrides:
- th-expand-syns ==0.4.6.0
- th-extras ==0.0.0.4
- th-lift ==0.8.1
- th-lift-instances ==0.1.15
- th-orphans ==0.13.9
- th-lift-instances ==0.1.16
- th-orphans ==0.13.10
- th-printf ==0.7
- thread-hierarchy ==0.3.0.1
- thread-local-storage ==0.2
@ -2078,7 +2078,7 @@ default-package-overrides:
- th-strict-compat ==0.1.0.1
- th-test-utils ==1.0.1
- thyme ==0.3.5.5
- tidal ==1.4.8
- tidal ==1.4.9
- tile ==0.3.0.0
- time-compat ==1.9.3
- timeit ==2.0
@ -2358,6 +2358,9 @@ extra-packages:
- ansi-terminal == 0.10.3 # required by cabal-plan, and policeman in ghc-8.8.x
- aeson-pretty < 0.8 # required by elm compiler
- apply-refact < 0.4 # newer versions don't work with GHC 8.0.x
- apply-refact == 0.6.0.0 # works with GHC 8.6.x https://hackage.haskell.org/package/apply-refact/changelog
- apply-refact == 0.7.0.0 # works with GHC 8.8.x https://hackage.haskell.org/package/apply-refact/changelog
- apply-refact == 0.8.0.0 # works with GHC 8.10.x https://hackage.haskell.org/package/apply-refact/changelog
- binary > 0.7 && < 0.8 # keep a 7.x major release around for older compilers
- binary > 0.8 && < 0.9 # keep a 8.x major release around for older compilers
- blank-canvas < 0.6.3 # more recent versions depend on base-compat-batteries == 0.10.* but we're on base-compat-0.9.*
@ -2376,7 +2379,8 @@ extra-packages:
- ghc-tcplugins-extra ==0.3.2 # required for polysemy-plugin 0.2.5.0
- gloss < 1.9.3 # new versions don't compile with GHC 7.8.x
- haddock == 2.22.* # required on GHC 8.0.x
- haddock-api == 2.22.* # required on GHC 7.8.x
- haddock == 2.23.* # required on GHC < 8.10.x
- haddock-api == 2.23.* # required on GHC < 8.10.x
- haddock-library ==1.7.* # required by stylish-cabal-0.5.0.0
- happy <1.19.6 # newer versions break Agda
- happy == 1.19.9 # for purescript
@ -3110,7 +3114,6 @@ broken-packages:
- binary-protocol-zmq
- binary-search
- binary-streams
- binary-strict
- binary-typed
- bind-marshal
- BinderAnn
@ -3405,6 +3408,7 @@ broken-packages:
- cal3d
- cal3d-examples
- cal3d-opengl
- calamity
- calc
- calculator
- caldims
@ -4510,7 +4514,6 @@ broken-packages:
- eths-rlp
- euphoria
- eurofxref
- Euterpea
- eve
- eve-cli
- event
@ -7492,6 +7495,9 @@ broken-packages:
- mp
- mpdmate
- mpi-hs
- mpi-hs-binary
- mpi-hs-cereal
- mpi-hs-store
- mpppc
- mpretty
- mpris
@ -9786,12 +9792,6 @@ broken-packages:
- tempus
- tensor
- tensor-safe
- tensorflow
- tensorflow-core-ops
- tensorflow-logging
- tensorflow-opgen
- tensorflow-ops
- tensorflow-proto
- termbox
- termbox-banana
- termbox-bindings
@ -9828,7 +9828,6 @@ broken-packages:
- text-and-plots
- text-ansi
- text-containers
- text-format
- text-format-heavy
- text-generic-pretty
- text-icu-normalized
@ -10469,7 +10468,6 @@ broken-packages:
- webdriver-w3c
- WeberLogic
- webfinger-client
- webify
- webkit-javascriptcore
- Webrexp
- webserver

File diff suppressed because it is too large Load diff

View file

@ -86,6 +86,11 @@ rec {
future.
Instead of jailbreaking, you can patch the cabal file.
Note that jailbreaking at this time, doesn't lift bounds on
conditional branches.
https://github.com/peti/jailbreak-cabal/issues/7 has further details.
*/
doJailbreak = drv: overrideCabal drv (drv: { jailbreak = true; });

View file

@ -0,0 +1,333 @@
From 2490fa65eeba52699a7c0e303aa5cb9b78c2b1cf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Niklas=20Hamb=C3=BCchen?= <mail@nh2.me>
Date: Fri, 17 Apr 2020 20:49:23 +0200
Subject: [PATCH] Compile against GHC 8.8
---
Setup.hs | 15 ---------------
src/Darcs/Patch/Depends.hs | 2 +-
src/Darcs/Patch/Match.hs | 12 ++++++------
src/Darcs/Patch/PatchInfoAnd.hs | 2 +-
src/Darcs/Patch/Prim/V1/Apply.hs | 6 +++---
src/Darcs/Patch/Prim/V1/Commute.hs | 1 +
src/Darcs/Patch/ReadMonads.hs | 1 +
src/Darcs/Patch/V1/Commute.hs | 1 +
src/Darcs/Repository/Diff.hs | 2 +-
src/Darcs/Repository/Match.hs | 2 +-
src/Darcs/Util/Tree/Monad.hs | 4 ++--
12 files changed, 30 insertions(+), 42 deletions(-)
diff --git a/Setup.hs b/Setup.hs
index f5cc3e8..05caac4 100644
--- a/Setup.hs
+++ b/Setup.hs
@@ -75,21 +75,6 @@
postInst = \ _ flags pkg lbi ->
installManpage pkg lbi (fromFlag $ installVerbosity flags) NoCopyDest,
- sDistHook = \ pkg lbi hooks flags -> do
- let pkgVer = packageVersion pkg
- verb = fromFlag $ sDistVerbosity flags
- x <- versionPatches verb pkgVer
- y <- context verb
- rewriteFileEx silent "release/distributed-version" $ show x
- rewriteFileEx silent "release/distributed-context" $ show y
- putStrLn "about to hand over"
- let pkg' = pkg { library = sanity (library pkg) }
- sanity (Just lib) = Just $ lib { libBuildInfo = sanity' $ libBuildInfo lib }
- sanity _ = error "eh"
- sanity' bi = bi { otherModules = [ m | m <- otherModules bi, toFilePath m /= "Version" ] }
-
- sDistHook simpleUserHooks pkg' lbi hooks flags
- ,
postConf = \_ _ _ _ -> return () --- Usually this checked for external C
--- dependencies, but we already have performed such
--- check in the confHook
--- a/darcs.cabal 1970-01-01 01:00:01.000000000 +0100
+++ b/darcs.cabal 2020-04-18 10:26:07.605129733 +0200
@@ -1,6 +1,5 @@
Name: darcs
version: 2.14.2
-x-revision: 1
License: GPL-2
License-file: COPYING
Author: David Roundy <droundy@darcs.net>, <darcs-devel@darcs.net>
@@ -75,7 +74,7 @@
description: Use libcurl for HTTP support.
-- in future this could extend to any other external libraries,
--- e.g. libiconv
+-- e.g. libiconv
flag pkgconfig
description: Use pkgconfig to configure libcurl
default: False
@@ -113,7 +112,7 @@
-- ----------------------------------------------------------------------
custom-setup
- setup-depends: base >= 4.9 && < 4.13,
+ setup-depends: base >= 4.9 && <5,
Cabal >= 1.24,
process >= 1.2.3.0 && < 1.7,
filepath >= 1.4.1 && < 1.5.0.0,
@@ -381,7 +380,7 @@
else
build-depends: unix >= 2.7.1.0 && < 2.8
- build-depends: base >= 4.9 && < 4.13,
+ build-depends: base >= 4.9 && <5,
stm >= 2.1 && < 2.6,
binary >= 0.5 && < 0.10,
containers >= 0.5.6.2 && < 0.7,
@@ -402,19 +401,19 @@
tar >= 0.5 && < 0.6,
data-ordlist == 0.4.*,
attoparsec >= 0.13.0.1 && < 0.14,
- zip-archive >= 0.3 && < 0.5,
+ zip-archive >= 0.3 && <1,
async >= 2.0.2 && < 2.3,
- sandi >= 0.4 && < 0.6,
+ sandi >= 0.4 && <1,
unix-compat >= 0.4.2 && < 0.6,
bytestring >= 0.10.6 && < 0.11,
old-time >= 1.1.0.3 && < 1.2,
time >= 1.5.0.1 && < 1.10,
- text >= 1.2.1.3 && < 1.3,
+ text >= 1.2.1.3 && <2,
directory >= 1.2.6.2 && < 1.4,
process >= 1.2.3.0 && < 1.7,
array >= 0.5.1.0 && < 0.6,
random >= 1.1 && < 1.2,
- hashable >= 1.2.3.3 && < 1.3,
+ hashable >= 1.2.3.3 && <2,
mmap >= 0.5.9 && < 0.6,
zlib >= 0.6.1.2 && < 0.7.0.0,
network-uri == 2.6.*,
@@ -443,7 +442,7 @@
-- The terminfo package cannot be built on Windows.
if flag(terminfo) && !os(windows)
- build-depends: terminfo >= 0.4.0.2 && < 0.5
+ build-depends: terminfo >= 0.4.0.2 && <1
cpp-options: -DHAVE_TERMINFO
default-extensions:
@@ -500,7 +499,7 @@
cc-options: -D_REENTRANT
build-depends: darcs,
- base >= 4.9 && < 4.13
+ base >= 4.9 && <5
-- ----------------------------------------------------------------------
-- unit test driver
@@ -518,7 +517,7 @@
build-depends: Win32 >= 2.3.1 && < 2.4
build-depends: darcs,
- base >= 4.9 && < 4.13,
+ base >= 4.9 && <5,
array >= 0.5.1.0 && < 0.6,
bytestring >= 0.10.6 && < 0.11,
cmdargs >= 0.10.10 && < 0.11,
@@ -527,15 +526,15 @@
mtl >= 2.2.1 && < 2.3,
shelly >= 1.6.8 && < 1.9,
split >= 0.2.2 && < 0.3,
- text >= 1.2.1.3 && < 1.3,
+ text >= 1.2.1.3 && <2,
directory >= 1.2.6.2 && < 1.4,
FindBin >= 0.0.5 && < 0.1,
- QuickCheck >= 2.8.2 && < 2.13,
+ QuickCheck >= 2.8.2 && <3,
HUnit >= 1.3 && < 1.7,
test-framework >= 0.8.1.1 && < 0.9,
test-framework-hunit >= 0.3.0.2 && < 0.4,
test-framework-quickcheck2 >= 0.3.0.3 && < 0.4,
- zip-archive >= 0.3 && < 0.5
+ zip-archive >= 0.3 && <1
-- https://github.com/yesodweb/Shelly.hs/issues/177
if os(windows)
diff --git a/src/Darcs/Patch/Depends.hs b/src/Darcs/Patch/Depends.hs
index 8531294..a4c71cb 100644
--- a/src/Darcs/Patch/Depends.hs
+++ b/src/Darcs/Patch/Depends.hs
@@ -251,7 +251,7 @@ splitOnTag _ (PatchSet NilRL NilRL) = Nothing
unwrapOneTagged :: (Monad m) => PatchSet rt p wX wY -> m (PatchSet rt p wX wY)
unwrapOneTagged (PatchSet (ts :<: Tagged t _ tps) ps) =
return $ PatchSet ts (tps :<: t +<+ ps)
-unwrapOneTagged _ = fail "called unwrapOneTagged with no Tagged's in the set"
+unwrapOneTagged _ = error "called unwrapOneTagged with no Tagged's in the set"
-- | @getUncovered ps@ returns the 'PatchInfo' for all the patches in
-- @ps@ that are not depended on by anything else *through explicit
diff --git a/src/Darcs/Patch/Match.hs b/src/Darcs/Patch/Match.hs
index aba6c7a..2b6f53a 100644
--- a/src/Darcs/Patch/Match.hs
+++ b/src/Darcs/Patch/Match.hs
@@ -421,7 +421,7 @@ getNonrangeMatchS fs repo =
Just m -> if nonrangeMatcherIsTag fs
then getTagS m repo
else getMatcherS Exclusive m repo
- Nothing -> fail "Pattern not specified in getNonrangeMatch."
+ Nothing -> error "Pattern not specified in getNonrangeMatch."
-- | @firstMatch fs@ tells whether @fs@ implies a "first match", that
-- is if we match against patches from a point in the past on, rather
@@ -441,7 +441,7 @@ getFirstMatchS fs repo =
Just (_,b) -> unpullLastN repo b -- b is chronologically earlier than a
Nothing ->
case firstMatcher fs of
- Nothing -> fail "Pattern not specified in getFirstMatchS."
+ Nothing -> error "Pattern not specified in getFirstMatchS."
Just m -> if firstMatcherIsTag fs
then getTagS m repo
else getMatcherS Inclusive m repo
@@ -462,7 +462,7 @@ checkMatchSyntax :: [MatchFlag] -> IO ()
checkMatchSyntax opts =
case getMatchPattern opts of
Nothing -> return ()
- Just p -> either fail (const $ return ()) (parseMatch p::Either String (MatchFun rt DummyPatch))
+ Just p -> either error (const $ return ()) (parseMatch p::Either String (MatchFun rt DummyPatch))
getMatchPattern :: [MatchFlag] -> Maybe String
getMatchPattern [] = Nothing
@@ -718,7 +718,7 @@ getMatcherS :: (ApplyMonad (ApplyState p) m, Matchable p) =>
getMatcherS ioe m repo =
if matchExists m repo
then applyInvToMatcher ioe m repo
- else fail $ "Couldn't match pattern "++ show m
+ else error $ "Couldn't match pattern "++ show m
getTagS :: (ApplyMonad (ApplyState p) m, MonadProgress m, Matchable p) =>
Matcher rt p -> PatchSet rt p Origin wX -> m ()
diff --git a/src/Darcs/Patch/PatchInfoAnd.hs b/src/Darcs/Patch/PatchInfoAnd.hs
index 2da7ec8..1147410 100644
--- a/src/Darcs/Patch/PatchInfoAnd.hs
+++ b/src/Darcs/Patch/PatchInfoAnd.hs
@@ -167,7 +167,7 @@ conscientiously er (PIAP pinf hp) =
-- | @hopefullyM@ is a version of @hopefully@ which calls @fail@ in a
-- monad instead of erroring.
-hopefullyM :: Monad m => PatchInfoAnd rt p wA wB -> m (WrappedNamed rt p wA wB)
+hopefullyM :: MonadFail m => PatchInfoAnd rt p wA wB -> m (WrappedNamed rt p wA wB)
hopefullyM (PIAP pinf hp) = case hopefully2either hp of
Right p -> return p
Left e -> fail $ renderString
diff --git a/src/Darcs/Patch/Prim/V1/Apply.hs b/src/Darcs/Patch/Prim/V1/Apply.hs
index bea7e41..7984d21 100644
--- a/src/Darcs/Patch/Prim/V1/Apply.hs
+++ b/src/Darcs/Patch/Prim/V1/Apply.hs
@@ -41,13 +41,13 @@ instance Apply Prim where
apply (FP f (TokReplace t o n)) = mModifyFilePS f doreplace
where doreplace fc =
case tryTokReplace t (BC.pack o) (BC.pack n) fc of
- Nothing -> fail $ "replace patch to " ++ fn2fp f
+ Nothing -> error $ "replace patch to " ++ fn2fp f
++ " couldn't apply."
Just fc' -> return fc'
apply (FP f (Binary o n)) = mModifyFilePS f doapply
where doapply oldf = if o == oldf
then return n
- else fail $ "binary patch to " ++ fn2fp f
+ else error $ "binary patch to " ++ fn2fp f
++ " couldn't apply."
apply (DP d AddDir) = mCreateDirectory d
apply (DP d RmDir) = mRemoveDirectory d
@@ -115,7 +115,7 @@ applyHunk f h fc =
case applyHunkLines h fc of
Right fc' -> return fc'
Left msg ->
- fail $
+ error $
"### Error applying:\n" ++ renderHunk h ++
"\n### to file " ++ fn2fp f ++ ":\n" ++ BC.unpack fc ++
"### Reason: " ++ msg
diff --git a/src/Darcs/Patch/Prim/V1/Commute.hs b/src/Darcs/Patch/Prim/V1/Commute.hs
index 7639dbd..e1432e6 100644
--- a/src/Darcs/Patch/Prim/V1/Commute.hs
+++ b/src/Darcs/Patch/Prim/V1/Commute.hs
@@ -58,6 +58,7 @@ instance Monad Perhaps where
Failed >>= _ = Failed
Unknown >>= _ = Unknown
return = Succeeded
+instance MonadFail Perhaps where
fail _ = Unknown
instance Alternative Perhaps where
diff --git a/src/Darcs/Patch/ReadMonads.hs b/src/Darcs/Patch/ReadMonads.hs
index 62a4f81..e1cb149 100644
--- a/src/Darcs/Patch/ReadMonads.hs
+++ b/src/Darcs/Patch/ReadMonads.hs
@@ -237,6 +237,7 @@ failSM _ = SM (\_ -> Nothing)
instance Monad SM where
(>>=) = bindSM
return = returnSM
+instance MonadFail SM where
fail = failSM
instance ParserM SM where
diff --git a/src/Darcs/Patch/V1/Commute.hs b/src/Darcs/Patch/V1/Commute.hs
index 0bb41a3..c6c3382 100644
--- a/src/Darcs/Patch/V1/Commute.hs
+++ b/src/Darcs/Patch/V1/Commute.hs
@@ -93,6 +93,7 @@ instance Monad Perhaps where
Failed >>= _ = Failed
Unknown >>= _ = Unknown
return = Succeeded
+instance MonadFail Perhaps where
fail _ = Unknown
instance Alternative Perhaps where
diff --git a/src/Darcs/Repository/Diff.hs b/src/Darcs/Repository/Diff.hs
index 8078d49..e0e2341 100644
--- a/src/Darcs/Repository/Diff.hs
+++ b/src/Darcs/Repository/Diff.hs
@@ -138,7 +138,7 @@ treeDiff da ft t1 t2 = do
do rmDirP <- diff p (Removed subtree)
addFileP <- diff p (Changed (File emptyBlob) b')
return $ joinGap (+>+) rmDirP addFileP
- diff p _ = fail $ "Missing case at path " ++ show p
+ diff p _ = error $ "Missing case at path " ++ show p
text_diff p a b
| BL.null a && BL.null b = emptyGap NilFL
diff --git a/src/Darcs/Repository/Match.hs b/src/Darcs/Repository/Match.hs
index 08c9f13..f33cabe 100644
--- a/src/Darcs/Repository/Match.hs
+++ b/src/Darcs/Repository/Match.hs
@@ -60,7 +60,7 @@ getNonrangeMatch :: (ApplyMonad (ApplyState p) DefaultIO, IsRepoType rt, RepoPat
getNonrangeMatch r = withRecordedMatch r . getMatch where
getMatch fs = case hasIndexRange fs of
Just (n, m) | n == m -> applyNInv (n-1)
- | otherwise -> fail "Index range is not allowed for this command."
+ | otherwise -> error "Index range is not allowed for this command."
_ -> getNonrangeMatchS fs
getOnePatchset :: (IsRepoType rt, RepoPatch p)
diff --git a/src/Darcs/Util/Tree/Monad.hs b/src/Darcs/Util/Tree/Monad.hs
index 0e01d9b..296fdc4 100644
--- a/src/Darcs/Util/Tree/Monad.hs
+++ b/src/Darcs/Util/Tree/Monad.hs
@@ -216,7 +216,7 @@ instance (Monad m) => TreeRO (TreeMonad m) where
t <- gets tree
let f = findFile t p'
case f of
- Nothing -> fail $ "No such file " ++ show p'
+ Nothing -> error $ "No such file " ++ show p'
Just x -> lift (readBlob x)
currentDirectory = ask
@@ -251,7 +251,7 @@ instance (Monad m) => TreeRW (TreeMonad m) where
let item = find tr from'
found_to = find tr to'
unless (isNothing found_to) $
- fail $ "Error renaming: destination " ++ show to ++ " exists."
+ error $ "Error renaming: destination " ++ show to ++ " exists."
unless (isNothing item) $ do
modifyItem from Nothing
modifyItem to item
--
2.23.1

View file

@ -0,0 +1,120 @@
--- darcs-2.14.2/Setup.hs 2019-01-27 03:14:51.000000000 +1300
+++ darcs.net/Setup.hs 2019-10-18 02:41:57.000000000 +1300
@@ -11,7 +11,9 @@
, TestSuite(testBuildInfo)
, updatePackageDescription
, cppOptions, ccOptions
- , library, libBuildInfo, otherModules )
+ , library, libBuildInfo, otherModules
+ , ComponentName(CExeName)
+ )
import Distribution.Package
( packageVersion )
import Distribution.Version( Version )
@@ -21,24 +23,27 @@
import Distribution.Simple.Setup
(buildVerbosity, copyDest, copyVerbosity, fromFlag,
haddockVerbosity, installVerbosity, sDistVerbosity, replVerbosity )
-import Distribution.Simple.BuildPaths ( autogenModulesDir )
+import Distribution.Simple.BuildPaths ( autogenPackageModulesDir )
import Distribution.System
( OS(Windows), buildOS )
import Distribution.Simple.Utils
(copyFiles, createDirectoryIfMissingVerbose, rawSystemStdout,
- rewriteFile )
+ rewriteFileEx)
+import Distribution.Types.UnqualComponentName
import Distribution.Verbosity
- ( Verbosity )
+ ( Verbosity, silent )
import Distribution.Text
( display )
-import Control.Monad ( unless, void )
+import Control.Monad ( unless, when, void )
import System.Directory
( doesDirectoryExist, doesFileExist )
import System.IO
( openFile, IOMode(..) )
import System.Process (runProcess)
import Data.List( isInfixOf, lines )
+import qualified Data.Map as M
+import Data.Maybe ( isJust )
import System.FilePath ( (</>) )
import Foreign.Marshal.Utils ( with )
import Foreign.Storable ( peek )
@@ -75,8 +80,8 @@
verb = fromFlag $ sDistVerbosity flags
x <- versionPatches verb pkgVer
y <- context verb
- rewriteFile "release/distributed-version" $ show x
- rewriteFile "release/distributed-context" $ show y
+ rewriteFileEx silent "release/distributed-version" $ show x
+ rewriteFileEx silent "release/distributed-context" $ show y
putStrLn "about to hand over"
let pkg' = pkg { library = sanity (library pkg) }
sanity (Just lib) = Just $ lib { libBuildInfo = sanity' $ libBuildInfo lib }
@@ -105,8 +110,7 @@
littleEndian <- testEndianness
let args = ("-DPACKAGE_VERSION=" ++ show' version) :
[arg | (arg, True) <- -- include fst iff snd.
- [-- We have MAPI iff building on/for Windows.
- ("-DHAVE_MAPI", buildOS == Windows),
+ [
("-DLITTLEENDIAN", littleEndian),
("-DBIGENDIAN", not littleEndian)]]
bi = emptyBuildInfo { cppOptions = args, ccOptions = args }
@@ -133,20 +137,26 @@
-- man page
-- ---------------------------------------------------------------------
+hasDarcsExe :: LocalBuildInfo -> Bool
+hasDarcsExe = isJust . M.lookup darcsExe . componentNameMap where
+ darcsExe = CExeName (mkUnqualComponentName "darcs")
+
buildManpage :: LocalBuildInfo -> IO ()
-buildManpage lbi = do
- let darcs = buildDir lbi </> "darcs/darcs"
- manpage = buildDir lbi </> "darcs/darcs.1"
- manpageHandle <- openFile manpage WriteMode
- void $ runProcess darcs ["help","manpage"]
- Nothing Nothing Nothing (Just manpageHandle) Nothing
+buildManpage lbi =
+ when (hasDarcsExe lbi) $ do
+ let darcs = buildDir lbi </> "darcs/darcs"
+ manpage = buildDir lbi </> "darcs/darcs.1"
+ manpageHandle <- openFile manpage WriteMode
+ void $ runProcess darcs ["help","manpage"]
+ Nothing Nothing Nothing (Just manpageHandle) Nothing
-installManpage :: PackageDescription -> LocalBuildInfo
- -> Verbosity -> CopyDest -> IO ()
+installManpage :: PackageDescription -> LocalBuildInfo -> Verbosity -> CopyDest -> IO ()
installManpage pkg lbi verbosity copy =
- copyFiles verbosity
- (mandir (absoluteInstallDirs pkg lbi copy) </> "man1")
- [(buildDir lbi </> "darcs", "darcs.1")]
+ when (hasDarcsExe lbi) $
+ copyFiles
+ verbosity
+ (mandir (absoluteInstallDirs pkg lbi copy) </> "man1")
+ [(buildDir lbi </> "darcs", "darcs.1")]
-- ---------------------------------------------------------------------
-- version module
@@ -187,12 +197,13 @@
generateVersionModule :: Verbosity -> LocalBuildInfo
-> String -> String -> IO ()
generateVersionModule verbosity lbi version state = do
- let dir = autogenModulesDir lbi
+ let dir = autogenPackageModulesDir lbi
createDirectoryIfMissingVerbose verbosity True dir
ctx <- context verbosity
hash <- weakhash verbosity
- rewriteFile (dir </> "Version.hs") $ unlines
+ rewriteFileEx silent (dir </> "Version.hs") $ unlines
["module Version where"
+ ,"import Darcs.Prelude"
,"version, weakhash, context :: String"
,"version = \"" ++ version ++ " (" ++ state ++ ")\""
,"weakhash = " ++ case hash of

View file

@ -4,15 +4,15 @@
let hashes = {
"8.0" = "1x1giy2c1y6krg3kf8pf9wrmvk981shv0pxcwi483yjqm90xng4r";
"8.2" = "1x33kv6w9cbqzvyrihn61pzmqlvnk3drm8ksd5v0arg38i95awi3";
"8.3" = "0c0wimaf16nrr3d6cxq6p7nr7rxffvpmn66hkpwc1m6zpcipf0y5";
};
revs = {
"8.0" = "8.0";
"8.2" = "8.2";
"8.3" = "8.3";
};
in stdenv.mkDerivation rec {
pname = "acl2";
version = "8.2";
version = "8.3";
src = fetchFromGitHub {
owner = "acl2-devel";
@ -72,6 +72,7 @@ in stdenv.mkDerivation rec {
#[ free bsd3 mit gpl2 llgpl21 cc0 publicDomain ];
license = stdenv.lib.licenses.bsd3;
maintainers = with stdenv.lib.maintainers; [ kini raskin ];
platforms = stdenv.lib.platforms.linux;
platforms = stdenv.lib.platforms.all;
broken = stdenv.isAarch64 && stdenv.isLinux;
};
}

View file

@ -19,7 +19,7 @@ agda.mkDerivation (self: rec {
topSourceDirectories = [ "src" ];
meta = with stdenv.lib; {
homepage = "http://wiki.portal.chalmers.se/agda/pmwiki.php?n=Libraries.StandardLibrary";
homepage = "https://wiki.portal.chalmers.se/agda/pmwiki.php?n=Libraries.StandardLibrary";
description = "A standard library for use with the Agda compiler";
license = stdenv.lib.licenses.mit;
platforms = stdenv.lib.platforms.unix;

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