diff --git a/nixos/modules/services/misc/matrix-synapse.nix b/nixos/modules/services/misc/matrix-synapse.nix index a3ec0ea59f8f..11463cf4500a 100644 --- a/nixos/modules/services/misc/matrix-synapse.nix +++ b/nixos/modules/services/misc/matrix-synapse.nix @@ -44,7 +44,6 @@ database: { } event_cache_size: "${cfg.event_cache_size}" verbose: ${cfg.verbose} -log_file: "/var/log/matrix-synapse/homeserver.log" log_config: "${logConfigFile}" rc_messages_per_second: ${cfg.rc_messages_per_second} rc_message_burst_count: ${cfg.rc_message_burst_count} @@ -53,8 +52,8 @@ federation_rc_sleep_limit: ${cfg.federation_rc_sleep_limit} federation_rc_sleep_delay: ${cfg.federation_rc_sleep_delay} federation_rc_reject_limit: ${cfg.federation_rc_reject_limit} federation_rc_concurrent: ${cfg.federation_rc_concurrent} -media_store_path: "/var/lib/matrix-synapse/media" -uploads_path: "/var/lib/matrix-synapse/uploads" +media_store_path: "${cfg.dataDir}/media" +uploads_path: "${cfg.dataDir}/uploads" max_upload_size: "${cfg.max_upload_size}" max_image_pixels: "${cfg.max_image_pixels}" dynamic_thumbnails: ${boolToString cfg.dynamic_thumbnails} @@ -86,7 +85,7 @@ ${optionalString (cfg.macaroon_secret_key != null) '' expire_access_token: ${boolToString cfg.expire_access_token} enable_metrics: ${boolToString cfg.enable_metrics} report_stats: ${boolToString cfg.report_stats} -signing_key_path: "/var/lib/matrix-synapse/homeserver.signing.key" +signing_key_path: "${cfg.dataDir}/homeserver.signing.key" key_refresh_interval: "${cfg.key_refresh_interval}" perspectives: servers: { @@ -348,7 +347,7 @@ in { database_args = mkOption { type = types.attrs; default = { - database = "/var/lib/matrix-synapse/homeserver.db"; + database = "${cfg.dataDir}/homeserver.db"; }; description = '' Arguments to pass to the engine. @@ -586,6 +585,14 @@ in { A yaml python logging config file ''; }; + dataDir = mkOption { + type = types.str; + default = "/var/lib/matrix-synapse"; + description = '' + The directory where matrix-synapse stores its stateful data such as + certificates, media and uploads. + ''; + }; }; }; @@ -593,7 +600,7 @@ in { users.extraUsers = [ { name = "matrix-synapse"; group = "matrix-synapse"; - home = "/var/lib/matrix-synapse"; + home = cfg.dataDir; createHome = true; shell = "${pkgs.bash}/bin/bash"; uid = config.ids.uids.matrix-synapse; @@ -611,16 +618,16 @@ in { preStart = '' ${cfg.package}/bin/homeserver \ --config-path ${configFile} \ - --keys-directory /var/lib/matrix-synapse \ + --keys-directory ${cfg.dataDir} \ --generate-keys ''; serviceConfig = { Type = "simple"; User = "matrix-synapse"; Group = "matrix-synapse"; - WorkingDirectory = "/var/lib/matrix-synapse"; + WorkingDirectory = cfg.dataDir; PermissionsStartOnly = true; - ExecStart = "${cfg.package}/bin/homeserver --config-path ${configFile} --keys-directory /var/lib/matrix-synapse"; + ExecStart = "${cfg.package}/bin/homeserver --config-path ${configFile} --keys-directory ${cfg.dataDir}"; Restart = "on-failure"; }; }; diff --git a/nixos/modules/system/activation/switch-to-configuration.pl b/nixos/modules/system/activation/switch-to-configuration.pl index 29cc60b00324..87a4ab2a586d 100644 --- a/nixos/modules/system/activation/switch-to-configuration.pl +++ b/nixos/modules/system/activation/switch-to-configuration.pl @@ -16,6 +16,10 @@ my $reloadListFile = "/run/systemd/reload-list"; my $action = shift @ARGV; +if ("@localeArchive@" ne "") { + $ENV{LOCALE_ARCHIVE} = "@localeArchive@"; +} + if (!defined $action || ($action ne "switch" && $action ne "boot" && $action ne "test" && $action ne "dry-activate")) { print STDERR <; chomp $escaped; @@ -364,7 +370,8 @@ syslog(LOG_NOTICE, "switching to system configuration $out"); if (scalar (keys %unitsToStop) > 0) { print STDERR "stopping the following units: ", join(", ", @unitsToStopFiltered), "\n" if scalar @unitsToStopFiltered; - system("systemctl", "stop", "--", sort(keys %unitsToStop)); # FIXME: ignore errors? + # Use current version of systemctl binary before daemon is reexeced. + system("/run/current-system/sw/bin/systemctl", "stop", "--", sort(keys %unitsToStop)); # FIXME: ignore errors? } print STDERR "NOT restarting the following changed units: ", join(", ", sort(keys %unitsToSkip)), "\n" diff --git a/nixos/modules/system/activation/top-level.nix b/nixos/modules/system/activation/top-level.nix index 67cb2264e3f3..0c50241f2edf 100644 --- a/nixos/modules/system/activation/top-level.nix +++ b/nixos/modules/system/activation/top-level.nix @@ -26,7 +26,6 @@ let cloner false config.nesting.children ++ cloner true config.nesting.clone; - systemBuilder = let kernelPath = "${config.boot.kernelPackages.kernel}/" + @@ -83,6 +82,7 @@ let done mkdir $out/bin + export localeArchive="${config.i18n.glibcLocales}/lib/locale/locale-archive" substituteAll ${./switch-to-configuration.pl} $out/bin/switch-to-configuration chmod +x $out/bin/switch-to-configuration diff --git a/nixos/release-combined.nix b/nixos/release-combined.nix index 7536bf3e48ef..34a413f1ac3e 100644 --- a/nixos/release-combined.nix +++ b/nixos/release-combined.nix @@ -95,6 +95,7 @@ in rec { #(all nixos.tests.lightdm) (all nixos.tests.login) (all nixos.tests.misc) + (all nixos.tests.mutableUsers) (all nixos.tests.nat.firewall) (all nixos.tests.nat.standalone) (all nixos.tests.networking.scripted.loopback) @@ -115,6 +116,7 @@ in rec { (all nixos.tests.sddm.default) (all nixos.tests.simple) (all nixos.tests.slim) + (all nixos.tests.switchTest) (all nixos.tests.udisks2) (all nixos.tests.xfce) diff --git a/nixos/release.nix b/nixos/release.nix index 2dbe3a81ab27..fbc95784cfbe 100644 --- a/nixos/release.nix +++ b/nixos/release.nix @@ -291,6 +291,7 @@ in rec { tests.mongodb = callTest tests/mongodb.nix {}; tests.mumble = callTest tests/mumble.nix {}; tests.munin = callTest tests/munin.nix {}; + tests.mutableUsers = callTest tests/mutable-users.nix {}; tests.mysql = callTest tests/mysql.nix {}; tests.mysqlBackup = callTest tests/mysql-backup.nix {}; tests.mysqlReplication = callTest tests/mysql-replication.nix {}; @@ -330,6 +331,7 @@ in rec { tests.slim = callTest tests/slim.nix {}; tests.smokeping = callTest tests/smokeping.nix {}; tests.snapper = callTest tests/snapper.nix {}; + tests.switchTest = callTest tests/switch-test.nix {}; tests.taskserver = callTest tests/taskserver.nix {}; tests.tomcat = callTest tests/tomcat.nix {}; tests.udisks2 = callTest tests/udisks2.nix {}; diff --git a/nixos/tests/installer.nix b/nixos/tests/installer.nix index 43b166a38374..6c7fd6c575bf 100644 --- a/nixos/tests/installer.nix +++ b/nixos/tests/installer.nix @@ -307,11 +307,11 @@ in { { createPartitions = '' $machine->succeed( - "parted /dev/vda mklabel gpt", - "parted -s /dev/vda -- mkpart ESP fat32 1M 50MiB", # /boot - "parted -s /dev/vda -- set 1 boot on", - "parted -s /dev/vda -- mkpart primary linux-swap 50MiB 1024MiB", - "parted -s /dev/vda -- mkpart primary ext2 1024MiB -1MiB", # / + "parted --script /dev/vda mklabel gpt", + "parted --script /dev/vda -- mkpart ESP fat32 1M 50MiB", # /boot + "parted --script /dev/vda -- set 1 boot on", + "parted --script /dev/vda -- mkpart primary linux-swap 50MiB 1024MiB", + "parted --script /dev/vda -- mkpart primary ext2 1024MiB -1MiB", # / "udevadm settle", "mkswap /dev/vda2 -L swap", "swapon -L swap", @@ -461,6 +461,47 @@ in { ''; }; + # Test whether opening encrypted filesystem with keyfile + # Checks for regression of missing cryptsetup, when no luks device without + # keyfile is configured + filesystemEncryptedWithKeyfile = makeInstallerTest "filesystemEncryptedWithKeyfile" + { createPartitions = '' + $machine->succeed( + "parted --script /dev/vda mklabel msdos", + "parted --script /dev/vda -- mkpart primary ext2 1M 50MB", # /boot + "parted --script /dev/vda -- mkpart primary linux-swap 50M 1024M", + "parted --script /dev/vda -- mkpart primary 1024M 1280M", # LUKS with keyfile + "parted --script /dev/vda -- mkpart primary 1280M -1s", + "udevadm settle", + "mkswap /dev/vda2 -L swap", + "swapon -L swap", + "mkfs.ext3 -L nixos /dev/vda4", + "mount LABEL=nixos /mnt", + "mkfs.ext3 -L boot /dev/vda1", + "mkdir -p /mnt/boot", + "mount LABEL=boot /mnt/boot", + "modprobe dm_mod dm_crypt", + "echo -n supersecret > /mnt/keyfile", + "cryptsetup luksFormat -q /dev/vda3 --key-file /mnt/keyfile", + "cryptsetup luksOpen --key-file /mnt/keyfile /dev/vda3 crypt", + "mkfs.ext3 -L test /dev/mapper/crypt", + "cryptsetup luksClose crypt", + "mkdir -p /mnt/test" + ); + ''; + extraConfig = '' + fileSystems."/test" = + { device = "/dev/disk/by-label/test"; + fsType = "ext3"; + encrypted.enable = true; + encrypted.blkDev = "/dev/vda3"; + encrypted.label = "crypt"; + encrypted.keyFile = "/mnt-root/keyfile"; + }; + ''; + }; + + swraid = makeInstallerTest "swraid" { createPartitions = '' diff --git a/nixos/tests/mutable-users.nix b/nixos/tests/mutable-users.nix new file mode 100644 index 000000000000..4f11a4b83669 --- /dev/null +++ b/nixos/tests/mutable-users.nix @@ -0,0 +1,39 @@ +# Mutable users tests. + +import ./make-test.nix ({ pkgs, ...} : { + name = "mutable-users"; + meta = with pkgs.stdenv.lib.maintainers; { + maintainers = [ gleber ]; + }; + + nodes = { + machine = { config, lib, pkgs, ... }: { + users.mutableUsers = false; + }; + mutable = { config, lib, pkgs, ... }: { + users.mutableUsers = true; + }; + }; + + testScript = {nodes, ...}: let + immutableSystem = nodes.machine.config.system.build.toplevel; + mutableSystem = nodes.mutable.config.system.build.toplevel; + in '' + $machine->start(); + $machine->waitForUnit("default.target"); + + # Machine starts in immutable mode. Add a user and test if reactivating + # configuration removes the user. + $machine->fail("cat /etc/passwd | grep ^foobar:"); + $machine->succeed("sudo useradd foobar"); + $machine->succeed("cat /etc/passwd | grep ^foobar:"); + $machine->succeed("${immutableSystem}/bin/switch-to-configuration test"); + $machine->fail("cat /etc/passwd | grep ^foobar:"); + + # In immutable mode passwd is not wrapped, while in mutable mode it is + # wrapped. + $machine->succeed('which passwd | grep /run/current-system/'); + $machine->succeed("${mutableSystem}/bin/switch-to-configuration test"); + $machine->succeed('which passwd | grep /run/wrappers/'); + ''; +}) diff --git a/nixos/tests/switch-test.nix b/nixos/tests/switch-test.nix new file mode 100644 index 000000000000..46f2563af8d9 --- /dev/null +++ b/nixos/tests/switch-test.nix @@ -0,0 +1,25 @@ +# Test configuration switching. + +import ./make-test.nix ({ pkgs, ...} : { + name = "switch-test"; + meta = with pkgs.stdenv.lib.maintainers; { + maintainers = [ gleber ]; + }; + + nodes = { + machine = { config, lib, pkgs, ... }: { + users.mutableUsers = false; + }; + other = { config, lib, pkgs, ... }: { + users.mutableUsers = true; + }; + }; + + testScript = {nodes, ...}: let + originalSystem = nodes.machine.config.system.build.toplevel; + otherSystem = nodes.other.config.system.build.toplevel; + in '' + $machine->succeed("env -i ${originalSystem}/bin/switch-to-configuration test | tee /dev/stderr"); + $machine->succeed("env -i ${otherSystem}/bin/switch-to-configuration test | tee /dev/stderr"); + ''; +}) diff --git a/pkgs/applications/misc/mupdf/default.nix b/pkgs/applications/misc/mupdf/default.nix index b50d99466f89..ca6093644599 100644 --- a/pkgs/applications/misc/mupdf/default.nix +++ b/pkgs/applications/misc/mupdf/default.nix @@ -4,7 +4,15 @@ , enableCurl ? true, curl, openssl }: -stdenv.mkDerivation rec { +let + + # OpenJPEG version is hardcoded in package source + openJpegVersion = with stdenv; + lib.concatStringsSep "." (lib.lists.take 2 + (lib.splitString "." (lib.getVersion openjpeg))); + + +in stdenv.mkDerivation rec { version = "1.11"; name = "mupdf-${version}"; @@ -16,9 +24,9 @@ stdenv.mkDerivation rec { patches = [ # Compatibility with new openjpeg (fetchpatch { - name = "mupdf-1.11-openjpeg-2.1.1.patch"; - url = "https://git.archlinux.org/svntogit/community.git/plain/trunk/0001-mupdf-openjpeg.patch?h=packages/mupdf&id=3d997e7ff2ac20c44856ede22760ba6fbca81a5c"; - sha256 = "1vr12kpzmmfr8pp3scwfhrm5laqwd58xm6vx971c4y8bxy60b2ig"; + name = "mupdf-1.11-openjpeg-version.patch"; + url = "https://git.archlinux.org/svntogit/community.git/plain/trunk/0001-mupdf-openjpeg.patch?h=packages/mupdf&id=c19349f42838e4dca02e564b97e0a5ab3e1b943f"; + sha256 = "0sx7jq84sr8bj6sg2ahg9cdgqz8dh4w6r0ah2yil8vrsznn4la8r"; }) (fetchurl { @@ -58,6 +66,10 @@ stdenv.mkDerivation rec { }) ]; + postPatch = '' + sed -i "s/__OPENJPEG__VERSION__/${openJpegVersion}/" source/fitz/load-jpx.c + ''; + makeFlags = [ "prefix=$(out)" ]; nativeBuildInputs = [ pkgconfig ]; buildInputs = [ freetype harfbuzz openjpeg jbig2dec libjpeg ] diff --git a/pkgs/applications/networking/cluster/minikube/default.nix b/pkgs/applications/networking/cluster/minikube/default.nix index f769ccd08f54..a3b30a5ef405 100644 --- a/pkgs/applications/networking/cluster/minikube/default.nix +++ b/pkgs/applications/networking/cluster/minikube/default.nix @@ -34,6 +34,10 @@ in buildGoPackage rec { sha256 = "1f7kjn26y7knmab5avj8spb40ny1y0jix5j5p0dqfjvg9climl0h"; }; + patches = [ + ./localkube.patch + ]; + # kubernetes is here only to shut up a loud warning when generating the completions below. minikube checks very eagerly # that kubectl is on the $PATH, even if it doesn't use it at all to generate the completions buildInputs = [ go-bindata makeWrapper kubernetes gpgme ] ++ stdenv.lib.optional hostPlatform.isDarwin vmnet; diff --git a/pkgs/applications/networking/cluster/minikube/localkube.patch b/pkgs/applications/networking/cluster/minikube/localkube.patch new file mode 100644 index 000000000000..08ec85813a3e --- /dev/null +++ b/pkgs/applications/networking/cluster/minikube/localkube.patch @@ -0,0 +1,20 @@ +diff --git a/pkg/minikube/bootstrapper/localkube/localkube.go b/pkg/minikube/bootstrapper/localkube/localkube.go +index 1c4b5000..c9f120d4 100644 +--- a/pkg/minikube/bootstrapper/localkube/localkube.go ++++ b/pkg/minikube/bootstrapper/localkube/localkube.go +@@ -113,14 +113,9 @@ func (lk *LocalkubeBootstrapper) UpdateCluster(config bootstrapper.KubernetesCon + + copyableFiles := []assets.CopyableFile{} + var localkubeFile assets.CopyableFile +- var err error + + //add url/file/bundled localkube to file list +- lCacher := localkubeCacher{config} +- localkubeFile, err = lCacher.fetchLocalkubeFromURI() +- if err != nil { +- return errors.Wrap(err, "Error updating localkube from uri") +- } ++ localkubeFile = assets.NewBinDataAsset("out/localkube", "/", "localkube", "0777") + copyableFiles = append(copyableFiles, localkubeFile) + + // user added files diff --git a/pkgs/applications/networking/corebird/default.nix b/pkgs/applications/networking/corebird/default.nix index 94ae656159d8..affcbcc4b3c0 100644 --- a/pkgs/applications/networking/corebird/default.nix +++ b/pkgs/applications/networking/corebird/default.nix @@ -3,14 +3,14 @@ , glib_networking }: stdenv.mkDerivation rec { - version = "1.7.2"; + version = "1.7.3"; name = "corebird-${version}"; src = fetchFromGitHub { owner = "baedert"; repo = "corebird"; rev = version; - sha256 = "0mydxxga4h1663xchb3543rk3k8frlmlyy5wz20zh38fpdlkhyf1"; + sha256 = "1xay22v5j239ppl6ydbj842zpm5v2mg5mcgpy5cjrhhmnbg79fgk"; }; preConfigure = '' diff --git a/pkgs/applications/networking/mailreaders/neomutt/default.nix b/pkgs/applications/networking/mailreaders/neomutt/default.nix index e0e2a42c4b5b..f72fdba52f8b 100644 --- a/pkgs/applications/networking/mailreaders/neomutt/default.nix +++ b/pkgs/applications/networking/mailreaders/neomutt/default.nix @@ -1,6 +1,6 @@ { stdenv, fetchFromGitHub, which, autoreconfHook, makeWrapper, writeScript, ncurses, perl , cyrus_sasl, gss, gpgme, kerberos, libidn, notmuch, openssl, -lmdb, libxslt, docbook_xsl, docbook_xml_dtd_42 }: +lmdb, libxslt, docbook_xsl, docbook_xml_dtd_42, mime-types }: let muttWrapper = writeScript "mutt" '' @@ -28,6 +28,7 @@ in stdenv.mkDerivation rec { buildInputs = [ cyrus_sasl gss gpgme kerberos libidn ncurses notmuch openssl perl lmdb + mime-types ]; nativeBuildInputs = [ @@ -44,8 +45,9 @@ in stdenv.mkDerivation rec { done # allow neomutt to map attachments to their proper mime.types if specified wrongly + # and use a far more comprehensive list than the one shipped with neomutt substituteInPlace sendlib.c \ - --replace /etc/mime.types $out/etc/mime.types + --replace /etc/mime.types ${mime-types}/etc/mime.types ''; configureFlags = [ @@ -72,7 +74,6 @@ in stdenv.mkDerivation rec { postInstall = '' cp ${muttWrapper} $out/bin/mutt - mv $out/share/doc/neomutt/mime.types $out/etc wrapProgram "$out/bin/neomutt" --prefix PATH : "$out/lib/neomutt" ''; diff --git a/pkgs/applications/networking/nextcloud-client/default.nix b/pkgs/applications/networking/nextcloud-client/default.nix index 081f765a3e87..652de194a5e7 100644 --- a/pkgs/applications/networking/nextcloud-client/default.nix +++ b/pkgs/applications/networking/nextcloud-client/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchgit, cmake, pkgconfig, qtbase, qtwebkit, qtkeychain, sqlite +{ stdenv, fetchgit, cmake, pkgconfig, qtbase, qtwebkit, qtkeychain, qttools, sqlite , inotify-tools, withGnomeKeyring ? false, makeWrapper, libgnome_keyring }: stdenv.mkDerivation rec { @@ -12,9 +12,12 @@ stdenv.mkDerivation rec { fetchSubmodules = true; }; + patches = [ ./find-sql.patch ]; + patchFlags = "-d client -p1"; + nativeBuildInputs = [ pkgconfig cmake ]; - buildInputs = [ qtbase qtwebkit qtkeychain sqlite ] + buildInputs = [ qtbase qtwebkit qtkeychain qttools sqlite ] ++ stdenv.lib.optional stdenv.isLinux inotify-tools ++ stdenv.lib.optional withGnomeKeyring makeWrapper; diff --git a/pkgs/applications/networking/nextcloud-client/find-sql.patch b/pkgs/applications/networking/nextcloud-client/find-sql.patch new file mode 100644 index 000000000000..baf6a4fbf491 --- /dev/null +++ b/pkgs/applications/networking/nextcloud-client/find-sql.patch @@ -0,0 +1,12 @@ +diff --git a/cmake/modules/QtVersionAbstraction.cmake b/cmake/modules/QtVersionAbstraction.cmake +index 5bd853c84..93ddf3cf8 100644 +--- a/cmake/modules/QtVersionAbstraction.cmake ++++ b/cmake/modules/QtVersionAbstraction.cmake +@@ -17,6 +17,7 @@ if( Qt5Core_FOUND ) + message(STATUS "Found Qt5 core, checking for further dependencies...") + find_package(Qt5Network REQUIRED) + find_package(Qt5Xml REQUIRED) ++ find_package(Qt5Sql REQUIRED) + find_package(Qt5Concurrent REQUIRED) + if(UNIT_TESTING) + find_package(Qt5Test REQUIRED) diff --git a/pkgs/development/libraries/gstreamer/bad/default.nix b/pkgs/development/libraries/gstreamer/bad/default.nix index 2e0e711ce71d..c68c7a50cc48 100644 --- a/pkgs/development/libraries/gstreamer/bad/default.nix +++ b/pkgs/development/libraries/gstreamer/bad/default.nix @@ -15,6 +15,12 @@ assert gtkSupport -> gtk3 != null; let inherit (stdenv.lib) optional optionalString; + + # OpenJPEG version is hardcoded in package source + openJpegVersion = with stdenv; + lib.concatStringsSep "." (lib.lists.take 2 + (lib.splitString "." (lib.getVersion openjpeg))); + in stdenv.mkDerivation rec { name = "gst-plugins-bad-1.12.2"; @@ -32,6 +38,10 @@ stdenv.mkDerivation rec { platforms = platforms.linux; }; + patchPhase = '' + sed -i 's/openjpeg-2.1/openjpeg-${openJpegVersion}/' ext/openjpeg/* + ''; + src = fetchurl { url = "${meta.homepage}/src/gst-plugins-bad/${name}.tar.xz"; sha256 = "0dwyq03g2m0p16dwx8q5qvjn5x9ia72h21sf87mp97gmwkfpwb4w"; diff --git a/pkgs/development/ocaml-modules/ocaml-gettext/default.nix b/pkgs/development/ocaml-modules/ocaml-gettext/default.nix index a2bbe6960cf7..014525ef2b4e 100644 --- a/pkgs/development/ocaml-modules/ocaml-gettext/default.nix +++ b/pkgs/development/ocaml-modules/ocaml-gettext/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { name = "ocaml${ocaml.version}-gettext-${version}"; - version = "0.3.7"; + version = "0.3.8"; src = fetchurl { - url = "https://forge.ocamlcore.org/frs/download.php/1678/ocaml-gettext-${version}.tar.gz"; - sha256 = "1zhvzc9x3j57xf2mzg5rshgp14cb4dsqbnj52jjv1qnja97plyjp"; + url = "https://forge.ocamlcore.org/frs/download.php/1731/ocaml-gettext-${version}.tar.gz"; + sha256 = "05wnpxwzzpn2qinah2wb5wzfh5iz8gyf8jyihdbjxc8mk4hf70qv"; }; propagatedBuildInputs = [ gettext fileutils camomile ]; diff --git a/pkgs/development/ocaml-modules/rope/default.nix b/pkgs/development/ocaml-modules/rope/default.nix index a62c321a4e83..dfb8c56c23e8 100644 --- a/pkgs/development/ocaml-modules/rope/default.nix +++ b/pkgs/development/ocaml-modules/rope/default.nix @@ -1,18 +1,34 @@ -{ stdenv, fetchzip, ocaml, findlib, ocamlbuild, benchmark }: +{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, jbuilder, benchmark }: -let version = "0.5"; in +let param = + if stdenv.lib.versionAtLeast ocaml.version "4.03" + then { + version = "0.6"; + url = " https://github.com/Chris00/ocaml-rope/releases/download/0.6/rope-0.6.tbz"; + sha256 = "06pkbnkad2ck50jn59ggwv154yd9vb01abblihvam6p27m4za1pc"; + buildInputs = [ jbuilder ]; + extra = { + unpackCmd = "tar -xjf $curSrc"; + buildPhase = "jbuilder build -p rope"; + inherit (jbuilder) installPhase; + }; + } else { + version = "0.5"; + url = "https://forge.ocamlcore.org/frs/download.php/1156/rope-0.5.tar.gz"; + sha256 = "05fr2f5ch2rqhyaj06rv5218sbg99p1m9pq5sklk04hpslxig21f"; + buildInputs = [ ocamlbuild ]; + extra = { createFindlibDestdir = true; }; + }; +in -stdenv.mkDerivation { - name = "ocaml${ocaml.version}-rope-${version}"; +stdenv.mkDerivation ({ + name = "ocaml${ocaml.version}-rope-${param.version}"; - src = fetchzip { - url = "https://forge.ocamlcore.org/frs/download.php/1156/rope-${version}.tar.gz"; - sha256 = "1i8kzg19jrapl30mq8m91vy09z0r0dl4bnpw24ga96w8pxqf9qhd"; + src = fetchurl { + inherit (param) url sha256; }; - buildInputs = [ ocaml findlib ocamlbuild benchmark ]; - - createFindlibDestdir = true; + buildInputs = [ ocaml findlib benchmark ] ++ param.buildInputs; meta = { homepage = http://rope.forge.ocamlcore.org/; @@ -21,4 +37,4 @@ stdenv.mkDerivation { license = stdenv.lib.licenses.lgpl21; maintainers = with stdenv.lib.maintainers; [ volth ]; }; -} +} // param.extra) diff --git a/pkgs/os-specific/linux/kernel/linux-beagleboard.nix b/pkgs/os-specific/linux/kernel/linux-beagleboard.nix index b0d9f04efc84..33885a082d63 100644 --- a/pkgs/os-specific/linux/kernel/linux-beagleboard.nix +++ b/pkgs/os-specific/linux/kernel/linux-beagleboard.nix @@ -1,8 +1,8 @@ { stdenv, hostPlatform, fetchFromGitHub, perl, buildLinux, ... } @ args: let - modDirVersion = "4.9.59"; - tag = "r73"; + modDirVersion = "4.9.61"; + tag = "r76"; in import ./generic.nix (args // rec { version = "${modDirVersion}-ti-${tag}"; @@ -12,7 +12,7 @@ import ./generic.nix (args // rec { owner = "beagleboard"; repo = "linux"; rev = "${version}"; - sha256 = "1kzbbaqmzgvfls1v9jir2ck9vcdd774mq474vhr5x6dqjnnb5kg9"; + sha256 = "0hcz4fwjyic42mrn8qsvzm4jq1g5k51awjj3d2das7k8frjalaby"; }; kernelPatches = args.kernelPatches; diff --git a/pkgs/servers/shairplay/default.nix b/pkgs/servers/shairplay/default.nix new file mode 100644 index 000000000000..33e2f39280ad --- /dev/null +++ b/pkgs/servers/shairplay/default.nix @@ -0,0 +1,35 @@ +{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig +, avahi, libao }: + +stdenv.mkDerivation rec { + name = "shairplay-${version}"; + version = "2016-01-01"; + + src = fetchFromGitHub { + owner = "juhovh"; + repo = "shairplay"; + rev = "ce80e005908f41d0e6fde1c4a21e9cb8ee54007b"; + sha256 = "10b4bmqgf4rf1wszvj066mc42p90968vqrmyqyrdal4k6f8by1r6"; + }; + + nativeBuildInputs = [ autoreconfHook pkgconfig ]; + + buildInputs = [ avahi libao ]; + + enableParallelBuilding = true; + + # the build will fail without complaining about a reference to /tmp + preFixup = '' + patchelf \ + --set-rpath "${stdenv.lib.makeLibraryPath buildInputs}:$out/lib" \ + $out/bin/shairplay + ''; + + meta = with stdenv.lib; { + inherit (src.meta) homepage; + description = "Apple airplay and raop protocol server"; + license = licenses.mit; + maintainers = with maintainers; [ peterhoeg ]; + platforms = platforms.unix; + }; +} diff --git a/pkgs/tools/text/silver-searcher/bash-completion.patch b/pkgs/tools/text/silver-searcher/bash-completion.patch new file mode 100644 index 000000000000..30e8c72389b7 --- /dev/null +++ b/pkgs/tools/text/silver-searcher/bash-completion.patch @@ -0,0 +1,5 @@ +--- a/Makefile.am ++++ b/Makefile.am +@@ -9 +9 @@ +-bashcompdir = $(pkgdatadir)/completions ++bashcompdir = $(datadir)/bash-completion/completions diff --git a/pkgs/tools/text/silver-searcher/default.nix b/pkgs/tools/text/silver-searcher/default.nix index 156a8bd8f646..fe890c2916d0 100644 --- a/pkgs/tools/text/silver-searcher/default.nix +++ b/pkgs/tools/text/silver-searcher/default.nix @@ -11,6 +11,8 @@ stdenv.mkDerivation rec { sha256 = "0wcw4kyivb10m9b173183jrj46a0gisd35yqxi1mr9hw5l5dhkpa"; }; + patches = [ ./bash-completion.patch ]; + NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isLinux "-lgcc_s"; nativeBuildInputs = [ autoreconfHook pkgconfig ]; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ed36c4feada6..24ad82a9be06 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3565,7 +3565,7 @@ with pkgs; nextcloud = callPackage ../servers/nextcloud { }; - nextcloud-client = libsForQt56.callPackage ../applications/networking/nextcloud-client { }; + nextcloud-client = libsForQt5.callPackage ../applications/networking/nextcloud-client { }; nextcloud-news-updater = callPackage ../servers/nextcloud/news-updater.nix { }; @@ -11994,6 +11994,8 @@ with pkgs; sambaFull = samba4Full; + shairplay = callPackage ../servers/shairplay { }; + shairport-sync = callPackage ../servers/shairport-sync { }; serfdom = callPackage ../servers/serf { }; @@ -13548,7 +13550,7 @@ with pkgs; shaderc = callPackage ../development/compilers/shaderc { }; - mime_types = callPackage ../data/misc/mime-types { }; + mime-types = callPackage ../data/misc/mime-types { }; shared_mime_info = callPackage ../data/misc/shared-mime-info { }; diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix index 72154c5fe546..7dcb6a1555b8 100644 --- a/pkgs/top-level/perl-packages.nix +++ b/pkgs/top-level/perl-packages.nix @@ -15880,10 +15880,10 @@ let self = _self // overrides; _self = with self; { }; XMLLibXML = buildPerlPackage rec { - name = "XML-LibXML-2.0129"; + name = "XML-LibXML-2.0132"; src = fetchurl { url = "mirror://cpan/authors/id/S/SH/SHLOMIF/${name}.tar.gz"; - sha256 = "0rmk6vysfgcn8434wyydd56midgshly37wx7c50ch038l2djd82w"; + sha256 = "0xnl281hb590i287fxpl947f1s4zl9dnvc4ajvsqi89w23im453j"; }; SKIP_SAX_INSTALL = 1; buildInputs = [ pkgs.libxml2 ]; @@ -15891,7 +15891,7 @@ let self = _self // overrides; _self = with self; { # https://rt.cpan.org/Public/Bug/Display.html?id=122958 preCheck = '' - rm t/32xpc_variables.t t/48_reader_undef_warning_on_empty_str_rt106830.t + rm t/32xpc_variables.t ''; };