From 0167b61ef45c3cf8223d67893956144c65d811bf Mon Sep 17 00:00:00 2001 From: Brian McKenna Date: Fri, 15 Apr 2016 21:46:42 +1000 Subject: [PATCH 001/160] dockerTools: only add "/nix" if it exists The /nix path in 4d200538 of the layer tar didn't exist for some packages, such as cacert. This is because cacert just creates an /etc directory and doesn't depend on any other /nix paths. If we tried putting this directory in the tar and using overlayfs with it, we'd get "Invalid argument" when trying to remove the directory. We now check whether the closure is non-empty before telling tar to store the /nix directory. Fixes #14710. --- pkgs/build-support/docker/default.nix | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/pkgs/build-support/docker/default.nix b/pkgs/build-support/docker/default.nix index f874354b15e..5ead82dee8b 100644 --- a/pkgs/build-support/docker/default.nix +++ b/pkgs/build-support/docker/default.nix @@ -286,17 +286,20 @@ EOF cp ${layer}/* temp/ chmod ug+w temp/* - # FIXME: might not be /nix/store - echo '/nix' >> layerFiles - echo '/nix/store' >> layerFiles for dep in $(cat $layerClosure); do - find $dep >> layerFiles + find $dep -path "${layer}" -prune -o -print >> layerFiles done + if [ -s layerFiles ]; then + # FIXME: might not be /nix/store + echo '/nix' >> layerFiles + echo '/nix/store' >> layerFiles + fi + echo Adding layer tar -tf temp/layer.tar >> baseFiles sed 's/^\.//' -i baseFiles - comm <(sort -n baseFiles|uniq) <(sort -n layerFiles|uniq|grep -v ${layer}) -1 -3 > newFiles + comm <(sort -u baseFiles) <(sort -u layerFiles) -1 -3 > newFiles tar -rpf temp/layer.tar --mtime=0 --no-recursion --files-from newFiles 2>/dev/null || true echo Adding meta From 08125c4a5f1918696ca41c6b0c6f4568fc18da30 Mon Sep 17 00:00:00 2001 From: Aneesh Agrawal Date: Wed, 13 Apr 2016 23:09:15 -0400 Subject: [PATCH 002/160] impatience gnome-shell extension: init --- .../gnome-3/extensions/impatience.nix | 34 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 6 +++- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 pkgs/desktops/gnome-3/extensions/impatience.nix diff --git a/pkgs/desktops/gnome-3/extensions/impatience.nix b/pkgs/desktops/gnome-3/extensions/impatience.nix new file mode 100644 index 00000000000..d82ff652bd0 --- /dev/null +++ b/pkgs/desktops/gnome-3/extensions/impatience.nix @@ -0,0 +1,34 @@ +{ stdenv, fetchFromGitHub, glib }: + +stdenv.mkDerivation rec { + name = "gnome-shell-impatience-${version}"; + version = "6564c21e4caf4a6bc5fe2bf21116d7c15408d494"; + + src = fetchFromGitHub { + owner = "timbertson"; + repo = "gnome-shell-impatience"; + rev = version; + sha256 = "10zyj42i07dcvaciv47qgkcs5g5n2bpc8a0m6fsimfi0442iwlcn"; + }; + + buildInputs = [ + glib + ]; + + buildPhase = '' + make schemas + ''; + + installPhase = '' + cp -r impatience $out + ''; + + uuid = "impatience@gfxmonk.net"; + + meta = with stdenv.lib; { + description = "Speed up builtin gnome-shell animations"; + license = licenses.gpl3Plus; + maintainers = with maintainers; [ aneeshusa timbertson ]; + homepage = http://gfxmonk.net/dist/0install/gnome-shell-impatience.xml; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 9e44ac3e0bb..1c10f0a0e23 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -15172,7 +15172,11 @@ in gnome3_18 = recurseIntoAttrs (callPackage ../desktops/gnome-3/3.18 { }); - gnome3 = self.gnome3_18; + gnome3 = self.gnome3_18 // { + shellExtensions = { + impatience = callPackage ../desktops/gnome-3/extensions/impatience.nix {}; + }; + }; gnome = recurseIntoAttrs self.gnome2; From 74d7513a2ab38ae9fb5d1f8083b0ca5027497179 Mon Sep 17 00:00:00 2001 From: Aneesh Agrawal Date: Wed, 13 Apr 2016 23:09:52 -0400 Subject: [PATCH 003/160] volume-mixer gnome-shell extension: init --- .../gnome-3/extensions/volume-mixer.nix | 34 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 1 + 2 files changed, 35 insertions(+) create mode 100644 pkgs/desktops/gnome-3/extensions/volume-mixer.nix diff --git a/pkgs/desktops/gnome-3/extensions/volume-mixer.nix b/pkgs/desktops/gnome-3/extensions/volume-mixer.nix new file mode 100644 index 00000000000..845d21f5219 --- /dev/null +++ b/pkgs/desktops/gnome-3/extensions/volume-mixer.nix @@ -0,0 +1,34 @@ +{ stdenv, fetchFromGitHub, glib }: + +stdenv.mkDerivation rec { + name = "gnome-shell-volume-mixer-${version}"; + version = "844ed80ad448855d8f6218847183a80474b523c7"; + + src = fetchFromGitHub { + owner = "aleho"; + repo = "gnome-shell-volume-mixer"; + rev = version; + sha256 = "1vcj2spbymhdi1nazvhldvcfgad23r3h7f0ihh4nianbxn7hjs9w"; + }; + + buildInputs = [ + glib + ]; + + buildPhase = '' + ${glib}/bin/glib-compile-schemas --targetdir=${uuid}/schemas ${uuid}/schemas + ''; + + installPhase = '' + cp -r ${uuid} $out + ''; + + uuid = "shell-volume-mixer@derhofbauer.at"; + + meta = with stdenv.lib; { + description = "GNOME Shell Extension allowing separate configuration of PulseAudio devices"; + license = licenses.gpl2; + maintainers = with maintainers; [ aneeshusa ]; + homepage = https://github.com/aleho/gnome-shell-volume-mixer; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 1c10f0a0e23..5a769ce4e41 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -15175,6 +15175,7 @@ in gnome3 = self.gnome3_18 // { shellExtensions = { impatience = callPackage ../desktops/gnome-3/extensions/impatience.nix {}; + volume-mixer = callPackage ../desktops/gnome-3/extensions/volume-mixer.nix {}; }; }; From 54d2aaca6d8d715ac19ada782e6fcc0efdb3aeaf Mon Sep 17 00:00:00 2001 From: Aneesh Agrawal Date: Wed, 13 Apr 2016 23:10:10 -0400 Subject: [PATCH 004/160] workspace-grid gnome-shell extension: init --- .../gnome-3/extensions/workspace-grid.nix | 30 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 1 + 2 files changed, 31 insertions(+) create mode 100644 pkgs/desktops/gnome-3/extensions/workspace-grid.nix diff --git a/pkgs/desktops/gnome-3/extensions/workspace-grid.nix b/pkgs/desktops/gnome-3/extensions/workspace-grid.nix new file mode 100644 index 00000000000..10aee5cafe6 --- /dev/null +++ b/pkgs/desktops/gnome-3/extensions/workspace-grid.nix @@ -0,0 +1,30 @@ +{ stdenv, fetchFromGitHub, glib }: + +stdenv.mkDerivation rec { + name = "gnome-shell-workspace-grid-${version}"; + version = "0f3a430e7d04bb5465a17c1225aab0f574426d6b"; + + src = fetchFromGitHub { + owner = "zakkak"; + repo = "workspace-grid-gnome-shell-extension"; + rev = version; + sha256 = "0503b7lmydrbblfvf9b56pv5hpmykzgyc6v8y99rckg58h2jhs69"; + }; + + buildInputs = [ + glib + ]; + + installPhase = '' + cp -r ${uuid} $out + ''; + + uuid = "workspace-grid@mathematical.coffee.gmail.com"; + + meta = with stdenv.lib; { + description = "Arranges workspaces in a configurable grid"; + license = licenses.gpl3Plus; + maintainers = with maintainers; [ aneeshusa ]; + homepage = https://github.com/zakkak/workspace-grid-gnome-shell-extension; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5a769ce4e41..d48ffe0ef55 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -15176,6 +15176,7 @@ in shellExtensions = { impatience = callPackage ../desktops/gnome-3/extensions/impatience.nix {}; volume-mixer = callPackage ../desktops/gnome-3/extensions/volume-mixer.nix {}; + workspace-grid = callPackage ../desktops/gnome-3/extensions/workspace-grid.nix {}; }; }; From 0e5122637b8d5f2b3e6328d9202e26ad26c81931 Mon Sep 17 00:00:00 2001 From: Aneesh Agrawal Date: Fri, 15 Apr 2016 16:18:15 -0400 Subject: [PATCH 005/160] system-monitor gnome-shell extension: init --- .../gnome-3/extensions/system-monitor.nix | 34 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 1 + 2 files changed, 35 insertions(+) create mode 100644 pkgs/desktops/gnome-3/extensions/system-monitor.nix diff --git a/pkgs/desktops/gnome-3/extensions/system-monitor.nix b/pkgs/desktops/gnome-3/extensions/system-monitor.nix new file mode 100644 index 00000000000..f9b13df7f76 --- /dev/null +++ b/pkgs/desktops/gnome-3/extensions/system-monitor.nix @@ -0,0 +1,34 @@ +{ stdenv, fetchFromGitHub, glib }: + +stdenv.mkDerivation rec { + name = "gnome-shell-system-monitor-${version}"; + version = "8b31f070e9e59109d729661ced313d6a63e31787"; + + src = fetchFromGitHub { + owner = "paradoxxxzero"; + repo = "gnome-shell-system-monitor-applet"; + rev = version; + sha256 = "0fm5zb6qp53jjy2mnkb8ybxygzjwpb314giiq0ywq87hhrpch8m3"; + }; + + buildInputs = [ + glib + ]; + + buildPhase = '' + ${glib}/bin/glib-compile-schemas --targetdir=${uuid}/schemas ${uuid}/schemas + ''; + + installPhase = '' + cp -r ${uuid} $out + ''; + + uuid = "system-monitor@paradoxxx.zero.gmail.com"; + + meta = with stdenv.lib; { + description = "Display system informations in gnome shell status bar"; + license = licenses.gpl3Plus; + maintainers = with maintainers; [ aneeshusa ]; + homepage = https://github.com/paradoxxxzero/gnome-shell-system-monitor-applet; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d48ffe0ef55..3d91d3beca1 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -15175,6 +15175,7 @@ in gnome3 = self.gnome3_18 // { shellExtensions = { impatience = callPackage ../desktops/gnome-3/extensions/impatience.nix {}; + system-monitor = callPackage ../desktops/gnome-3/extensions/system-monitor.nix {}; volume-mixer = callPackage ../desktops/gnome-3/extensions/volume-mixer.nix {}; workspace-grid = callPackage ../desktops/gnome-3/extensions/workspace-grid.nix {}; }; From 1feed61164b5a115133b8d9ccb3492ccc8afd65e Mon Sep 17 00:00:00 2001 From: Tuomas Tynkkynen Date: Sat, 23 Apr 2016 14:20:34 +0300 Subject: [PATCH 006/160] NixOS installer tests: Add a test using Gummiboot Issue #14956 --- nixos/tests/installer.nix | 79 ++++++++++++++++++++++++++++----------- 1 file changed, 58 insertions(+), 21 deletions(-) diff --git a/nixos/tests/installer.nix b/nixos/tests/installer.nix index 48d5fecad92..c9aa9f9c85d 100644 --- a/nixos/tests/installer.nix +++ b/nixos/tests/installer.nix @@ -7,7 +7,7 @@ with pkgs.lib; let # The configuration to install. - makeConfig = { grubVersion, grubDevice, grubIdentifier + makeConfig = { bootLoader, grubVersion, grubDevice, grubIdentifier , extraConfig, forceGrubReinstallCount ? 0 }: pkgs.writeText "configuration.nix" '' @@ -18,15 +18,21 @@ let ]; - boot.loader.grub.version = ${toString grubVersion}; - ${optionalString (grubVersion == 1) '' - boot.loader.grub.splashImage = null; - ''} - boot.loader.grub.device = "${grubDevice}"; - boot.loader.grub.extraConfig = "serial; terminal_output.serial"; - boot.loader.grub.fsIdentifier = "${grubIdentifier}"; + ${optionalString (bootLoader == "grub") '' + boot.loader.grub.version = ${toString grubVersion}; + ${optionalString (grubVersion == 1) '' + boot.loader.grub.splashImage = null; + ''} + boot.loader.grub.device = "${grubDevice}"; + boot.loader.grub.extraConfig = "serial; terminal_output.serial"; + boot.loader.grub.fsIdentifier = "${grubIdentifier}"; - boot.loader.grub.configurationLimit = 100 + ${toString forceGrubReinstallCount}; + boot.loader.grub.configurationLimit = 100 + ${toString forceGrubReinstallCount}; + ''} + + ${optionalString (bootLoader == "gummiboot") '' + boot.loader.gummiboot.enable = true; + ''} hardware.enableAllFirmware = lib.mkForce false; @@ -42,7 +48,7 @@ let # disk, and then reboot from the hard disk. It's parameterized with # a test script fragment `createPartitions', which must create # partitions and filesystems. - testScriptFun = { createPartitions, grubVersion, grubDevice + testScriptFun = { bootLoader, createPartitions, grubVersion, grubDevice , grubIdentifier, preBootCommands, extraConfig }: let @@ -50,7 +56,8 @@ let qemuFlags = (if system == "x86_64-linux" then "-m 768 " else "-m 512 ") + (optionalString (system == "x86_64-linux") "-cpu kvm64 "); - hdFlags = ''hda => "vm-state-machine/machine.qcow2", hdaInterface => "${iface}", ''; + hdFlags = ''hda => "vm-state-machine/machine.qcow2", hdaInterface => "${iface}", '' + + optionalString (bootLoader == "gummiboot") ''bios => "${pkgs.OVMF}/FV/OVMF.fd", ''; in '' $machine->start; @@ -73,7 +80,7 @@ let $machine->succeed("cat /mnt/etc/nixos/hardware-configuration.nix >&2"); $machine->copyFileFromHost( - "${ makeConfig { inherit grubVersion grubDevice grubIdentifier extraConfig; } }", + "${ makeConfig { inherit bootLoader grubVersion grubDevice grubIdentifier extraConfig; } }", "/mnt/etc/nixos/configuration.nix"); # Perform the installation. @@ -97,7 +104,11 @@ let # Did /boot get mounted? $machine->waitForUnit("local-fs.target"); - $machine->succeed("test -e /boot/grub"); + ${if bootLoader == "grub" then + ''$machine->succeed("test -e /boot/grub");'' + else + ''$machine->succeed("test -e /boot/loader/loader.conf");'' + } # Check whether /root has correct permissions. $machine->succeed("stat -c '%a' /root") =~ /700/ or die; @@ -114,7 +125,7 @@ let # We need to a writable nix-store on next boot. $machine->copyFileFromHost( - "${ makeConfig { inherit grubVersion grubDevice grubIdentifier extraConfig; forceGrubReinstallCount = 1; } }", + "${ makeConfig { inherit bootLoader grubVersion grubDevice grubIdentifier extraConfig; forceGrubReinstallCount = 1; } }", "/etc/nixos/configuration.nix"); # Check whether nixos-rebuild works. @@ -132,7 +143,7 @@ let ${preBootCommands} $machine->waitForUnit("multi-user.target"); $machine->copyFileFromHost( - "${ makeConfig { inherit grubVersion grubDevice grubIdentifier extraConfig; forceGrubReinstallCount = 2; } }", + "${ makeConfig { inherit bootLoader grubVersion grubDevice grubIdentifier extraConfig; forceGrubReinstallCount = 2; } }", "/etc/nixos/configuration.nix"); $machine->succeed("nixos-rebuild boot >&2"); $machine->shutdown; @@ -148,8 +159,9 @@ let makeInstallerTest = name: { createPartitions, preBootCommands ? "", extraConfig ? "" - , grubVersion ? 2, grubDevice ? "/dev/vda" - , grubIdentifier ? "uuid", enableOCR ? false, meta ? {} + , bootLoader ? "grub" # either "grub" or "gummiboot" + , grubVersion ? 2, grubDevice ? "/dev/vda", grubIdentifier ? "uuid" + , enableOCR ? false, meta ? {} }: makeTest { inherit enableOCR; @@ -183,6 +195,8 @@ let virtualisation.qemu.diskInterface = if grubVersion == 1 then "scsi" else "virtio"; + boot.loader.gummiboot.enable = mkIf (bootLoader == "gummiboot") true; + hardware.enableAllFirmware = mkForce false; # The test cannot access the network, so any packages we @@ -198,8 +212,8 @@ let pkgs.perlPackages.XMLLibXML pkgs.perlPackages.ListCompare ] - ++ optional (grubVersion == 1) pkgs.grub - ++ optionals (grubVersion == 2) [ pkgs.grub2 pkgs.grub2_efi ]; + ++ optional (bootLoader == "grub" && grubVersion == 1) pkgs.grub + ++ optionals (bootLoader == "grub" && grubVersion == 2) [ pkgs.grub2 pkgs.grub2_efi ]; nix.binaryCaches = mkForce [ ]; }; @@ -207,8 +221,8 @@ let }; testScript = testScriptFun { - inherit createPartitions preBootCommands grubVersion - grubDevice grubIdentifier extraConfig; + inherit bootLoader createPartitions preBootCommands + grubVersion grubDevice grubIdentifier extraConfig; }; }; @@ -236,6 +250,29 @@ in { ''; }; + # Simple GPT/UEFI configuration using Gummiboot with 3 partitions: ESP, swap & root filesystem + simpleUefiGummiboot = makeInstallerTest "simpleUefiGummiboot" + { 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", # / + "udevadm settle", + "mkswap /dev/vda2 -L swap", + "swapon -L swap", + "mkfs.ext3 -L nixos /dev/vda3", + "mount LABEL=nixos /mnt", + "mkfs.vfat -n BOOT /dev/vda1", + "mkdir -p /mnt/boot", + "mount LABEL=BOOT /mnt/boot", + ); + ''; + bootLoader = "gummiboot"; + }; + # Same as the previous, but now with a separate /boot partition. separateBoot = makeInstallerTest "separateBoot" { createPartitions = From db3ffaa8f0e335c305936313fb658a7482c283cc Mon Sep 17 00:00:00 2001 From: Allen Nelson Date: Mon, 25 Apr 2016 11:55:43 -0500 Subject: [PATCH 007/160] httpretty: working build for python3 --- .../python-modules/httpretty/setup.py.patch | 11 +++++++++++ pkgs/top-level/python-packages.nix | 4 +++- 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 pkgs/development/python-modules/httpretty/setup.py.patch diff --git a/pkgs/development/python-modules/httpretty/setup.py.patch b/pkgs/development/python-modules/httpretty/setup.py.patch new file mode 100644 index 00000000000..e07ba931705 --- /dev/null +++ b/pkgs/development/python-modules/httpretty/setup.py.patch @@ -0,0 +1,11 @@ +--- setup.py 2016-04-18 10:44:27.915536022 -0500 ++++ setup-new.py 2016-04-18 10:44:13.515537377 -0500 +@@ -75,7 +75,7 @@ + + + local_file = lambda *f: \ +- open(os.path.join(os.path.dirname(__file__), *f)).read() ++ open(os.path.join(os.path.dirname(__file__), *f), encoding="utf-8").read() + + + install_requires, dependency_links = \ diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 9e3605827d3..89b8bebf9c0 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -10420,7 +10420,6 @@ in modules // { httpretty = buildPythonPackage rec { name = "httpretty-${version}"; version = "0.8.6"; - disabled = isPy3k; doCheck = false; src = pkgs.fetchurl { @@ -10442,6 +10441,9 @@ in modules // { --- 566 ---- ! 'content-length': str(len(self.body)) DIFF + + # Explicit encoding flag is required with python3, unless locale is set. + patch -p0 -i ${../development/python-modules/httpretty/setup.py.patch} ''; meta = { From a3ef1ad66c7867f78e64eca8352ab20ac53bac23 Mon Sep 17 00:00:00 2001 From: Allen Nelson Date: Mon, 25 Apr 2016 12:25:01 -0500 Subject: [PATCH 008/160] httpretty: make patch conditional on python version --- pkgs/top-level/python-packages.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 89b8bebf9c0..87dab9a52c8 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -10443,7 +10443,8 @@ in modules // { DIFF # Explicit encoding flag is required with python3, unless locale is set. - patch -p0 -i ${../development/python-modules/httpretty/setup.py.patch} + ${if !self.isPy3k then "" else + "patch -p0 -i ${../development/python-modules/httpretty/setup.py.patch}"} ''; meta = { From 25b4b3523251373802ae237564b60a2ac644010b Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Wed, 27 Apr 2016 20:29:30 +0200 Subject: [PATCH 009/160] betamax: Disable tests As said in #15037, the tests fail due to a network error as the tests expect to have network access. This simply disables the tests, which is not optimal, of course. I do not understand the whole python infrastructure, so I'm not able to disable only the failing-because-of-network-access tests. --- pkgs/top-level/python-packages.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 447481db7b3..b25874678c5 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1717,6 +1717,8 @@ in modules // { propagatedBuildInputs = [ self.requests2 ]; + doCheck = false; + meta = with stdenv.lib; { homepage = https://betamax.readthedocs.org/en/latest/; description = "A VCR imitation for requests"; From 58e0c4bcd9d6c1d509fbd5c12f1d5d1c29e05a29 Mon Sep 17 00:00:00 2001 From: David Guibert Date: Thu, 28 Apr 2016 11:13:26 +0200 Subject: [PATCH 010/160] gcc: add 6.1.0 --- pkgs/development/compilers/gcc/6/default.nix | 538 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 23 + 2 files changed, 561 insertions(+) create mode 100644 pkgs/development/compilers/gcc/6/default.nix diff --git a/pkgs/development/compilers/gcc/6/default.nix b/pkgs/development/compilers/gcc/6/default.nix new file mode 100644 index 00000000000..cbd4e1e340c --- /dev/null +++ b/pkgs/development/compilers/gcc/6/default.nix @@ -0,0 +1,538 @@ +{ stdenv, fetchurl, noSysDirs +, langC ? true, langCC ? true, langFortran ? false +, langObjC ? stdenv.isDarwin +, langObjCpp ? stdenv.isDarwin +, langJava ? false +, langAda ? false +, langVhdl ? false +, langGo ? false +, profiledCompiler ? false +, staticCompiler ? false +, enableShared ? true +, texinfo ? null +, perl ? null # optional, for texi2pod (then pod2man); required for Java +, gmp, mpfr, libmpc, gettext, which +, libelf # optional, for link-time optimizations (LTO) +, isl ? null # optional, for the Graphite optimization framework. +, zlib ? null, boehmgc ? null +, zip ? null, unzip ? null, pkgconfig ? null +, gtk ? null, libart_lgpl ? null +, libX11 ? null, libXt ? null, libSM ? null, libICE ? null, libXtst ? null +, libXrender ? null, xproto ? null, renderproto ? null, xextproto ? null +, libXrandr ? null, libXi ? null, inputproto ? null, randrproto ? null +, x11Support ? langJava +, gnatboot ? null +, enableMultilib ? false +, enablePlugin ? true # whether to support user-supplied plug-ins +, name ? "gcc" +, cross ? null +, binutilsCross ? null +, libcCross ? null +, crossStageStatic ? true +, gnat ? null +, libpthread ? null, libpthreadCross ? null # required for GNU/Hurd +, stripped ? true +, gnused ? null +, binutils ? null +, cloog # unused; just for compat with gcc4, as we override the parameter on some places +}: + +assert langJava -> zip != null && unzip != null + && zlib != null && boehmgc != null + && perl != null; # for `--enable-java-home' +assert langAda -> gnatboot != null; +assert langVhdl -> gnat != null; + +# LTO needs libelf and zlib. +assert libelf != null -> zlib != null; + +# Make sure we get GNU sed. +assert stdenv.isDarwin -> gnused != null; + +# Need c++filt on darwin +assert stdenv.isDarwin -> binutils != null; + +# The go frontend is written in c++ +assert langGo -> langCC; + +with stdenv.lib; +with builtins; + +let version = "6.1.0"; + + # Whether building a cross-compiler for GNU/Hurd. + crossGNU = cross != null && cross.config == "i586-pc-gnu"; + + enableParallelBuilding = true; + + patches = + [ ../use-source-date-epoch.patch ] + ++ optional (cross != null) ../libstdc++-target.patch + ++ optional noSysDirs ../no-sys-dirs.patch + # The GNAT Makefiles did not pay attention to CFLAGS_FOR_TARGET for its + # target libraries and tools. + ++ optional langAda ../gnat-cflags.patch + ++ optional langFortran ../gfortran-driving.patch; + + javaEcj = fetchurl { + # The `$(top_srcdir)/ecj.jar' file is automatically picked up at + # `configure' time. + + # XXX: Eventually we might want to take it from upstream. + url = "ftp://sourceware.org/pub/java/ecj-4.3.jar"; + sha256 = "0jz7hvc0s6iydmhgh5h2m15yza7p2rlss2vkif30vm9y77m97qcx"; + }; + + # Antlr (optional) allows the Java `gjdoc' tool to be built. We want a + # binary distribution here to allow the whole chain to be bootstrapped. + javaAntlr = fetchurl { + url = http://www.antlr.org/download/antlr-4.4-complete.jar; + sha256 = "02lda2imivsvsis8rnzmbrbp8rh1kb8vmq4i67pqhkwz7lf8y6dz"; + }; + + xlibs = [ + libX11 libXt libSM libICE libXtst libXrender libXrandr libXi + xproto renderproto xextproto inputproto randrproto + ]; + + javaAwtGtk = langJava && x11Support; + + /* Platform flags */ + platformFlags = let + gccArch = stdenv.platform.gcc.arch or null; + gccCpu = stdenv.platform.gcc.cpu or null; + gccAbi = stdenv.platform.gcc.abi or null; + gccFpu = stdenv.platform.gcc.fpu or null; + gccFloat = stdenv.platform.gcc.float or null; + gccMode = stdenv.platform.gcc.mode or null; + withArch = if gccArch != null then " --with-arch=${gccArch}" else ""; + withCpu = if gccCpu != null then " --with-cpu=${gccCpu}" else ""; + withAbi = if gccAbi != null then " --with-abi=${gccAbi}" else ""; + withFpu = if gccFpu != null then " --with-fpu=${gccFpu}" else ""; + withFloat = if gccFloat != null then " --with-float=${gccFloat}" else ""; + withMode = if gccMode != null then " --with-mode=${gccMode}" else ""; + in + withArch + + withCpu + + withAbi + + withFpu + + withFloat + + withMode; + + /* Cross-gcc settings */ + crossMingw = cross != null && cross.libc == "msvcrt"; + crossDarwin = cross != null && cross.libc == "libSystem"; + crossConfigureFlags = let + gccArch = stdenv.cross.gcc.arch or null; + gccCpu = stdenv.cross.gcc.cpu or null; + gccAbi = stdenv.cross.gcc.abi or null; + gccFpu = stdenv.cross.gcc.fpu or null; + gccFloat = stdenv.cross.gcc.float or null; + gccMode = stdenv.cross.gcc.mode or null; + withArch = if gccArch != null then " --with-arch=${gccArch}" else ""; + withCpu = if gccCpu != null then " --with-cpu=${gccCpu}" else ""; + withAbi = if gccAbi != null then " --with-abi=${gccAbi}" else ""; + withFpu = if gccFpu != null then " --with-fpu=${gccFpu}" else ""; + withFloat = if gccFloat != null then " --with-float=${gccFloat}" else ""; + withMode = if gccMode != null then " --with-mode=${gccMode}" else ""; + in + "--target=${cross.config}" + + withArch + + withCpu + + withAbi + + withFpu + + withFloat + + withMode + + (if crossMingw && crossStageStatic then + " --with-headers=${libcCross}/include" + + " --with-gcc" + + " --with-gnu-as" + + " --with-gnu-ld" + + " --with-gnu-ld" + + " --disable-shared" + + " --disable-nls" + + " --disable-debug" + + " --enable-sjlj-exceptions" + + " --enable-threads=win32" + + " --disable-win32-registry" + else if crossStageStatic then + " --disable-libssp --disable-nls" + + " --without-headers" + + " --disable-threads " + + " --disable-libgomp " + + " --disable-libquadmath" + + " --disable-shared" + + " --disable-libatomic " + # libatomic requires libc + " --disable-decimal-float" # libdecnumber requires libc + else + (if crossDarwin then " --with-sysroot=${libcCross}/share/sysroot" + else " --with-headers=${libcCross}/include") + + # Ensure that -print-prog-name is able to find the correct programs. + (stdenv.lib.optionalString (crossMingw || crossDarwin) ( + " --with-as=${binutilsCross}/bin/${cross.config}-as" + + " --with-ld=${binutilsCross}/bin/${cross.config}-ld" + )) + + " --enable-__cxa_atexit" + + " --enable-long-long" + + (if crossMingw then + " --enable-threads=win32" + + " --enable-sjlj-exceptions" + + " --enable-hash-synchronization" + + " --disable-libssp" + + " --disable-nls" + + " --with-dwarf2" + + # I think noone uses shared gcc libs in mingw, so we better do the same. + # In any case, mingw32 g++ linking is broken by default with shared libs, + # unless adding "-lsupc++" to any linking command. I don't know why. + " --disable-shared" + + # To keep ABI compatibility with upstream mingw-w64 + " --enable-fully-dynamic-string" + else (if cross.libc == "uclibc" then + # In uclibc cases, libgomp needs an additional '-ldl' + # and as I don't know how to pass it, I disable libgomp. + " --disable-libgomp" else "") + + " --enable-threads=posix" + + " --enable-nls" + + " --disable-decimal-float") # No final libdecnumber (it may work only in 386) + ); + stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final"; + crossNameAddon = if cross != null then "-${cross.config}" + stageNameAddon else ""; + + bootstrap = cross == null; + +in + +# We need all these X libraries when building AWT with GTK+. +assert x11Support -> (filter (x: x == null) ([ gtk libart_lgpl ] ++ xlibs)) == []; + +stdenv.mkDerivation ({ + name = "${name}${if stripped then "" else "-debug"}-${version}" + crossNameAddon; + + builder = ../builder.sh; + + src = fetchurl { + url = "mirror://gnu/gcc/gcc-${version}/gcc-${version}.tar.bz2"; + sha256 = "0ld3y4rgimyqgx1nwvzqyl5gr4wzc0ch4akkvsqp3fgbmdfcii09"; + }; + + inherit patches; + + outputs = [ "out" "lib" "man" "info" ]; + setOutputFlags = false; + NIX_NO_SELF_RPATH = true; + + libc_dev = stdenv.cc.libc_dev; + + postPatch = + if (stdenv.isGNU + || (libcCross != null # e.g., building `gcc.crossDrv' + && libcCross ? crossConfig + && libcCross.crossConfig == "i586-pc-gnu") + || (crossGNU && libcCross != null)) + then + # On GNU/Hurd glibc refers to Hurd & Mach headers and libpthread is not + # in glibc, so add the right `-I' flags to the default spec string. + assert libcCross != null -> libpthreadCross != null; + let + libc = if libcCross != null then libcCross else stdenv.glibc; + gnu_h = "gcc/config/gnu.h"; + extraCPPDeps = + libc.propagatedBuildInputs + ++ stdenv.lib.optional (libpthreadCross != null) libpthreadCross + ++ stdenv.lib.optional (libpthread != null) libpthread; + extraCPPSpec = + concatStrings (intersperse " " + (map (x: "-I${x}/include") extraCPPDeps)); + extraLibSpec = + if libpthreadCross != null + then "-L${libpthreadCross}/lib ${libpthreadCross.TARGET_LDFLAGS}" + else "-L${libpthread}/lib"; + in + '' echo "augmenting \`CPP_SPEC' in \`${gnu_h}' with \`${extraCPPSpec}'..." + sed -i "${gnu_h}" \ + -es'|CPP_SPEC *"\(.*\)$|CPP_SPEC "${extraCPPSpec} \1|g' + + echo "augmenting \`LIB_SPEC' in \`${gnu_h}' with \`${extraLibSpec}'..." + sed -i "${gnu_h}" \ + -es'|LIB_SPEC *"\(.*\)$|LIB_SPEC "${extraLibSpec} \1|g' + + echo "setting \`NATIVE_SYSTEM_HEADER_DIR' and \`STANDARD_INCLUDE_DIR' to \`${libc}/include'..." + sed -i "${gnu_h}" \ + -es'|#define STANDARD_INCLUDE_DIR.*$|#define STANDARD_INCLUDE_DIR "${libc}/include"|g' + '' + else if cross != null || stdenv.cc.libc != null then + # On NixOS, use the right path to the dynamic linker instead of + # `/lib/ld*.so'. + let + libc = if libcCross != null then libcCross else stdenv.cc.libc; + in + '' echo "fixing the \`GLIBC_DYNAMIC_LINKER' and \`UCLIBC_DYNAMIC_LINKER' macros..." + for header in "gcc/config/"*-gnu.h "gcc/config/"*"/"*.h + do + grep -q LIBC_DYNAMIC_LINKER "$header" || continue + echo " fixing \`$header'..." + sed -i "$header" \ + -e 's|define[[:blank:]]*\([UCG]\+\)LIBC_DYNAMIC_LINKER\([0-9]*\)[[:blank:]]"\([^\"]\+\)"$|define \1LIBC_DYNAMIC_LINKER\2 "${libc}\3"|g' + done + '' + else null; + + inherit noSysDirs staticCompiler langJava crossStageStatic + libcCross crossMingw; + + nativeBuildInputs = [ texinfo which gettext ] + ++ (optional (perl != null) perl) + ++ (optional javaAwtGtk pkgconfig); + + buildInputs = [ gmp mpfr libmpc libelf ] + ++ (optional (isl != null) isl) + ++ (optional (zlib != null) zlib) + ++ (optionals langJava [ boehmgc zip unzip ]) + ++ (optionals javaAwtGtk ([ gtk libart_lgpl ] ++ xlibs)) + ++ (optionals (cross != null) [binutilsCross]) + ++ (optionals langAda [gnatboot]) + ++ (optionals langVhdl [gnat]) + + # The builder relies on GNU sed (for instance, Darwin's `sed' fails with + # "-i may not be used with stdin"), and `stdenvNative' doesn't provide it. + ++ (optional stdenv.isDarwin gnused) + ++ (optional stdenv.isDarwin binutils) + ; + + NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isSunOS "-lm -ldl"; + + preConfigure = stdenv.lib.optionalString (stdenv.isSunOS && stdenv.is64bit) '' + export NIX_LDFLAGS=`echo $NIX_LDFLAGS | sed -e s~$prefix/lib~$prefix/lib/amd64~g` + export LDFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $LDFLAGS_FOR_TARGET" + export CXXFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $CXXFLAGS_FOR_TARGET" + export CFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $CFLAGS_FOR_TARGET" + '' + stdenv.lib.optionalString stdenv.isDarwin '' + if SDKROOT=$(/usr/bin/xcrun --show-sdk-path); then + configureFlagsArray+=(--with-native-system-header-dir=$SDKROOT/usr/include) + makeFlagsArray+=( \ + CFLAGS_FOR_BUILD=-F$SDKROOT/System/Library/Frameworks \ + CFLAGS_FOR_TARGET=-F$SDKROOT/System/Library/Frameworks \ + FLAGS_FOR_TARGET=-F$SDKROOT/System/Library/Frameworks \ + ) + fi + ''; + + dontDisableStatic = true; + + configureFlags = " + ${if stdenv.isSunOS then + " --enable-long-long --enable-libssp --enable-threads=posix --disable-nls --enable-__cxa_atexit " + + # On Illumos/Solaris GNU as is preferred + " --with-gnu-as --without-gnu-ld " + else ""} + --enable-lto + ${if enableMultilib then "--enable-multilib --disable-libquadmath" else "--disable-multilib"} + ${if enableShared then "" else "--disable-shared"} + ${if enablePlugin then "--enable-plugin" else "--disable-plugin"} + ${optionalString (isl != null) "--with-isl=${isl}"} + ${if langJava then + "--with-ecj-jar=${javaEcj} " + + + # Follow Sun's layout for the convenience of IcedTea/OpenJDK. See + # . + "--enable-java-home --with-java-home=\${prefix}/lib/jvm/jre " + else ""} + ${if javaAwtGtk then "--enable-java-awt=gtk" else ""} + ${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr}" else ""} + --with-gmp=${gmp} + --with-mpfr=${mpfr} + --with-mpc=${libmpc} + ${if libelf != null then "--with-libelf=${libelf}" else ""} + --disable-libstdcxx-pch + --without-included-gettext + --with-system-zlib + --enable-static + --enable-languages=${ + concatStrings (intersperse "," + ( optional langC "c" + ++ optional langCC "c++" + ++ optional langFortran "fortran" + ++ optional langJava "java" + ++ optional langAda "ada" + ++ optional langVhdl "vhdl" + ++ optional langGo "go" + ++ optional langObjC "objc" + ++ optional langObjCpp "obj-c++" + ++ optionals crossDarwin [ "objc" "obj-c++" ] + ) + ) + } + ${if (stdenv ? glibc && cross == null) + then " --with-native-system-header-dir=${stdenv.glibc.dev}/include" + else ""} + ${if langAda then " --enable-libada" else ""} + ${if cross == null && stdenv.isi686 then "--with-arch=i686" else ""} + ${if cross != null then crossConfigureFlags else ""} + ${if !bootstrap then "--disable-bootstrap" else ""} + ${if cross == null then platformFlags else ""} + "; + + targetConfig = if cross != null then cross.config else null; + + buildFlags = if bootstrap then + (if profiledCompiler then "profiledbootstrap" else "bootstrap") + else ""; + + installTargets = + if stripped + then "install-strip" + else "install"; + + crossAttrs = let + xgccArch = stdenv.cross.gcc.arch or null; + xgccCpu = stdenv.cross.gcc.cpu or null; + xgccAbi = stdenv.cross.gcc.abi or null; + xgccFpu = stdenv.cross.gcc.fpu or null; + xgccFloat = stdenv.cross.gcc.float or null; + xwithArch = if xgccArch != null then " --with-arch=${xgccArch}" else ""; + xwithCpu = if xgccCpu != null then " --with-cpu=${xgccCpu}" else ""; + xwithAbi = if xgccAbi != null then " --with-abi=${xgccAbi}" else ""; + xwithFpu = if xgccFpu != null then " --with-fpu=${xgccFpu}" else ""; + xwithFloat = if xgccFloat != null then " --with-float=${xgccFloat}" else ""; + in { + AR = "${stdenv.cross.config}-ar"; + LD = "${stdenv.cross.config}-ld"; + CC = "${stdenv.cross.config}-gcc"; + CXX = "${stdenv.cross.config}-gcc"; + AR_FOR_TARGET = "${stdenv.cross.config}-ar"; + LD_FOR_TARGET = "${stdenv.cross.config}-ld"; + CC_FOR_TARGET = "${stdenv.cross.config}-gcc"; + NM_FOR_TARGET = "${stdenv.cross.config}-nm"; + CXX_FOR_TARGET = "${stdenv.cross.config}-g++"; + # If we are making a cross compiler, cross != null + NIX_CC_CROSS = if cross == null then "${stdenv.ccCross}" else ""; + dontStrip = true; + configureFlags = '' + ${if enableMultilib then "" else "--disable-multilib"} + ${if enableShared then "" else "--disable-shared"} + ${if langJava then "--with-ecj-jar=${javaEcj.crossDrv}" else ""} + ${if javaAwtGtk then "--enable-java-awt=gtk" else ""} + ${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr.crossDrv}" else ""} + --with-gmp=${gmp.crossDrv} + --with-mpfr=${mpfr.crossDrv} + --disable-libstdcxx-pch + --without-included-gettext + --with-system-zlib + --enable-languages=${ + concatStrings (intersperse "," + ( optional langC "c" + ++ optional langCC "c++" + ++ optional langFortran "fortran" + ++ optional langJava "java" + ++ optional langAda "ada" + ++ optional langVhdl "vhdl" + ++ optional langGo "go" + ) + ) + } + ${if langAda then " --enable-libada" else ""} + --target=${stdenv.cross.config} + ${xwithArch} + ${xwithCpu} + ${xwithAbi} + ${xwithFpu} + ${xwithFloat} + ''; + buildFlags = ""; + }; + + + # Needed for the cross compilation to work + AR = "ar"; + LD = "ld"; + # http://gcc.gnu.org/install/specific.html#x86-64-x-solaris210 + CC = if stdenv.system == "x86_64-solaris" then "gcc -m64" else "gcc"; + + # Setting $CPATH and $LIBRARY_PATH to make sure both `gcc' and `xgcc' find + # the library headers and binaries, regarless of the language being + # compiled. + + # Note: When building the Java AWT GTK+ peer, the build system doesn't + # honor `--with-gmp' et al., e.g., when building + # `libjava/classpath/native/jni/java-math/gnu_java_math_GMP.c', so we just + # add them to $CPATH and $LIBRARY_PATH in this case. + # + # Likewise, the LTO code doesn't find zlib. + + CPATH = concatStrings + (intersperse ":" (map (x: x + "/include") + (optionals (zlib != null) [ zlib ] + ++ optionals langJava [ boehmgc ] + ++ optionals javaAwtGtk xlibs + ++ optionals javaAwtGtk [ gmp mpfr ] + ++ optional (libpthread != null) libpthread + ++ optional (libpthreadCross != null) libpthreadCross + + # On GNU/Hurd glibc refers to Mach & Hurd + # headers. + ++ optionals (libcCross != null && libcCross ? "propagatedBuildInputs" ) + libcCross.propagatedBuildInputs))); + + LIBRARY_PATH = concatStrings + (intersperse ":" (map (x: x + "/lib") + (optionals (zlib != null) [ zlib ] + ++ optionals langJava [ boehmgc ] + ++ optionals javaAwtGtk xlibs + ++ optionals javaAwtGtk [ gmp mpfr ] + ++ optional (libpthread != null) libpthread))); + + EXTRA_TARGET_CFLAGS = + if cross != null && libcCross != null + then "-idirafter ${libcCross}/include" + else null; + + EXTRA_TARGET_LDFLAGS = + if cross != null && libcCross != null + then "-B${libcCross}/lib -Wl,-L${libcCross}/lib" + + (optionalString (libpthreadCross != null) + " -L${libpthreadCross}/lib -Wl,${libpthreadCross.TARGET_LDFLAGS}") + else null; + + passthru = + { inherit langC langCC langObjC langObjCpp langAda langFortran langVhdl langGo version; isGNU = true; }; + + inherit enableParallelBuilding enableMultilib; + + inherit (stdenv) is64bit; + + meta = { + homepage = http://gcc.gnu.org/; + license = stdenv.lib.licenses.gpl3Plus; # runtime support libraries are typically LGPLv3+ + description = "GNU Compiler Collection, version ${version}" + + (if stripped then "" else " (with debugging info)"); + + longDescription = '' + The GNU Compiler Collection includes compiler front ends for C, C++, + Objective-C, Fortran, OpenMP for C/C++/Fortran, Java, and Ada, as well + as libraries for these languages (libstdc++, libgcj, libgomp,...). + + GCC development is a part of the GNU Project, aiming to improve the + compiler used in the GNU system including the GNU/Linux variant. + ''; + + maintainers = with stdenv.lib.maintainers; [ viric simons ]; + + # gnatboot is not available out of linux platforms, so we disable the darwin build + # for the gnat (ada compiler). + platforms = + stdenv.lib.platforms.linux ++ + stdenv.lib.platforms.freebsd ++ + optionals (langAda == false) stdenv.lib.platforms.darwin; + }; +} + +// optionalAttrs (cross != null && cross.libc == "msvcrt" && crossStageStatic) { + makeFlags = [ "all-gcc" "all-target-libgcc" ]; + installTargets = "install-gcc install-target-libgcc"; +} + +# Strip kills static libs of other archs (hence cross != null) +// optionalAttrs (!stripped || cross != null) { dontStrip = true; NIX_STRIP_DEBUG = 0; } + +// optionalAttrs (enableMultilib) { dontMoveLib64 = true; } +) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index cd576d1bea0..b40cf2faaa9 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4222,6 +4222,21 @@ in isl = isl_0_14; })); + gcc6 = lowPrio (wrapCC (callPackage ../development/compilers/gcc/6 { + inherit noSysDirs; + + # PGO seems to speed up compilation by gcc by ~10%, see #445 discussion + profiledCompiler = with stdenv; (!isDarwin && (isi686 || isx86_64)); + + # When building `gcc.crossDrv' (a "Canadian cross", with host == target + # and host != build), `cross' must be null but the cross-libc must still + # be passed. + cross = null; + libcCross = if crossSystem != null then libcCross else null; + + isl = isl_0_14; + })); + gfortran = if !stdenv.isDarwin then gfortran5 else callPackage ../development/compilers/gcc/gfortran-darwin.nix { inherit (darwin) Libsystem; @@ -4251,6 +4266,14 @@ in profiledCompiler = false; }); + gfortran6 = wrapCC (gcc6.cc.override { + name = "gfortran"; + langFortran = true; + langCC = false; + langC = false; + profiledCompiler = false; + }); + gcj = gcj49; gcj49 = wrapCC (gcc49.cc.override { name = "gcj"; From a8bc5b67f8caf82585932eab14cb99fcbc4d595b Mon Sep 17 00:00:00 2001 From: Eric Sagnes Date: Fri, 29 Apr 2016 15:26:20 +0900 Subject: [PATCH 011/160] php: add default php.ini --- nixos/modules/rename.nix | 1 + .../web-servers/apache-httpd/default.nix | 2 +- nixos/modules/services/web-servers/phpfpm.nix | 21 ++++++++++++++----- pkgs/development/interpreters/php/default.nix | 6 ++---- 4 files changed, 20 insertions(+), 10 deletions(-) diff --git a/nixos/modules/rename.nix b/nixos/modules/rename.nix index 6b02446d53b..5c4793624e0 100644 --- a/nixos/modules/rename.nix +++ b/nixos/modules/rename.nix @@ -123,6 +123,7 @@ with lib; (mkRemovedOptionModule [ "services" "printing" "cupsFilesConf" ]) (mkRemovedOptionModule [ "services" "printing" "cupsdConf" ]) (mkRemovedOptionModule [ "services" "xserver" "startGnuPGAgent" ]) + (mkRemovedOptionModule [ "services" "phpfpm" "phpIni" ]) ]; } diff --git a/nixos/modules/services/web-servers/apache-httpd/default.nix b/nixos/modules/services/web-servers/apache-httpd/default.nix index 7953729c00c..c23897192b4 100644 --- a/nixos/modules/services/web-servers/apache-httpd/default.nix +++ b/nixos/modules/services/web-servers/apache-httpd/default.nix @@ -406,7 +406,7 @@ let ([ mainCfg.phpOptions ] ++ (map (svc: svc.phpOptions) allSubservices)); } '' - cat ${php}/etc/php-recommended.ini > $out + cat ${php}/etc/php.ini > $out echo "$options" >> $out ''; diff --git a/nixos/modules/services/web-servers/phpfpm.nix b/nixos/modules/services/web-servers/phpfpm.nix index 6a60000ce19..2658d7117e3 100644 --- a/nixos/modules/services/web-servers/phpfpm.nix +++ b/nixos/modules/services/web-servers/phpfpm.nix @@ -19,6 +19,12 @@ let ${concatStringsSep "\n" (mapAttrsToList (n: v: "[${n}]\n${v}") cfg.poolConfigs)} ''; + phpIni = pkgs.writeText "php.ini" '' + ${readFile "${cfg.phpPackage}/etc/php.ini"} + + ${cfg.phpOptions} + ''; + in { options = { @@ -44,10 +50,15 @@ in { ''; }; - phpIni = mkOption { - type = types.path; - default = "${cfg.phpPackage}/etc/php-recommended.ini"; - description = "php.ini file to use."; + phpOptions = mkOption { + type = types.lines; + default = ""; + example = + '' + date.timezone = "CET" + ''; + description = + "Options appended to the PHP configuration file php.ini."; }; poolConfigs = mkOption { @@ -84,7 +95,7 @@ in { mkdir -p "${stateDir}" ''; serviceConfig = { - ExecStart = "${cfg.phpPackage}/sbin/php-fpm -y ${cfgFile} -c ${cfg.phpIni}"; + ExecStart = "${cfg.phpPackage}/bin/php-fpm -y ${cfgFile} -c ${phpIni}"; PIDFile = pidFile; }; }; diff --git a/pkgs/development/interpreters/php/default.nix b/pkgs/development/interpreters/php/default.nix index a618fd85d71..d59273a18c3 100644 --- a/pkgs/development/interpreters/php/default.nix +++ b/pkgs/development/interpreters/php/default.nix @@ -265,14 +265,12 @@ let --replace '@PHP_LDFLAGS@' "" done - iniFile=$out/etc/php-recommended.ini [[ -z "$libxml2" ]] || export PATH=$PATH:$libxml2/bin ./configure --with-config-file-scan-dir=/etc --with-config-file-path=$out/etc --prefix=$out $configureFlags ''; - installPhase = '' - unset installPhase; installPhase; - cp php.ini-production $iniFile + postInstall = '' + cp php.ini-production $out/etc/php.ini ''; src = fetchurl { From 7da27100fe036cfa726d4081edabdb770f653b2f Mon Sep 17 00:00:00 2001 From: Bart Brouns Date: Sat, 30 Apr 2016 19:12:32 +0200 Subject: [PATCH 012/160] faust2lv2gui: newest faust can create gui for lv2 --- pkgs/applications/audio/faust/faust1git.nix | 210 ++++++++++++++++++ .../applications/audio/faust/faust2lv2gui.nix | 14 ++ pkgs/top-level/all-packages.nix | 18 +- 3 files changed, 235 insertions(+), 7 deletions(-) create mode 100644 pkgs/applications/audio/faust/faust1git.nix create mode 100644 pkgs/applications/audio/faust/faust2lv2gui.nix diff --git a/pkgs/applications/audio/faust/faust1git.nix b/pkgs/applications/audio/faust/faust1git.nix new file mode 100644 index 00000000000..5b769aa621e --- /dev/null +++ b/pkgs/applications/audio/faust/faust1git.nix @@ -0,0 +1,210 @@ +{ stdenv +, coreutils +, fetchgit +, makeWrapper +, pkgconfig +}: + +with stdenv.lib.strings; + +let + + version = "2016-04-27"; + + src = fetchgit { + url = "git://git.code.sf.net/p/faudiostream/code"; + rev = "931fca3e649f99ef09025d37bd6a7dc70a03e6f6"; + sha256 = "05yam8jfdnziysvpxa5w118k5bbl103vamyqgka6vyhjjizp1nx7"; + }; + + meta = with stdenv.lib; { + homepage = http://faust.grame.fr/; + downloadPage = http://sourceforge.net/projects/faudiostream/files/; + license = licenses.gpl2; + platforms = platforms.linux; + maintainers = with maintainers; [ magnetophon pmahoney ]; + }; + + faust = stdenv.mkDerivation { + + name = "faust-${version}"; + + inherit src; + + buildInputs = [ makeWrapper ]; + + passthru = { + inherit wrap wrapWithBuildEnv; + }; + + preConfigure = '' + makeFlags="$makeFlags prefix=$out" + + # The faust makefiles use 'system ?= $(shell uname -s)' but nix + # defines 'system' env var, so undefine that so faust detects the + # correct system. + unset system + ''; + + # Remove most faust2appl scripts since they won't run properly + # without additional paths setup. See faust.wrap, + # faust.wrapWithBuildEnv. + postInstall = '' + # syntax error when eval'd directly + pattern="faust2!(svg)" + (shopt -s extglob; rm "$out"/bin/$pattern) + ''; + + postFixup = '' + # Set faustpath explicitly. + substituteInPlace "$out"/bin/faustpath \ + --replace "/usr/local /usr /opt /opt/local" "$out" + + # The 'faustoptflags' is 'source'd into other faust scripts and + # not used as an executable, so patch 'uname' usage directly + # rather than use makeWrapper. + substituteInPlace "$out"/bin/faustoptflags \ + --replace uname "${coreutils}/bin/uname" + + # wrapper for scripts that don't need faust.wrap* + for script in "$out"/bin/faust2*; do + wrapProgram "$script" \ + --prefix PATH : "$out"/bin + done + ''; + + meta = meta // { + description = "A functional programming language for realtime audio signal processing"; + longDescription = '' + FAUST (Functional Audio Stream) is a functional programming + language specifically designed for real-time signal processing + and synthesis. FAUST targets high-performance signal processing + applications and audio plug-ins for a variety of platforms and + standards. + The Faust compiler translates DSP specifications into very + efficient C++ code. Thanks to the notion of architecture, + FAUST programs can be easily deployed on a large variety of + audio platforms and plugin formats (jack, alsa, ladspa, maxmsp, + puredata, csound, supercollider, pure, vst, coreaudio) without + any change to the FAUST code. + + This package has just the compiler, libraries, and headers. + Install faust2* for specific faust2appl scripts. + ''; + }; + + }; + + # Default values for faust2appl. + faust2ApplBase = + { baseName + , dir ? "tools/faust2appls" + , scripts ? [ baseName ] + , ... + }@args: + + args // { + name = "${baseName}-${version}"; + + inherit src; + + configurePhase = ":"; + + buildPhase = ":"; + + installPhase = '' + runHook preInstall + + mkdir -p "$out/bin" + for script in ${concatStringsSep " " scripts}; do + cp "${dir}/$script" "$out/bin/" + done + + runHook postInstall + ''; + + postInstall = '' + # For the faust2appl script, change 'faustpath' and + # 'faustoptflags' to absolute paths. + for script in "$out"/bin/*; do + substituteInPlace "$script" \ + --replace ". faustpath" ". '${faust}/bin/faustpath'" \ + --replace ". faustoptflags" ". '${faust}/bin/faustoptflags'" + done + ''; + + meta = meta // { + description = "The ${baseName} script, part of faust functional programming language for realtime audio signal processing"; + }; + }; + + # Some 'faust2appl' scripts, such as faust2alsa, run faust to + # generate cpp code, then invoke the c++ compiler to build the code. + # This builder wraps these scripts in parts of the stdenv such that + # when the scripts are called outside any nix build, they behave as + # if they were running inside a nix build in terms of compilers and + # paths being configured (e.g. rpath is set so that compiled + # binaries link to the libs inside the nix store) + # + # The function takes two main args: the appl name (e.g. + # 'faust2alsa') and an optional list of propagatedBuildInputs. It + # returns a derivation that contains only the bin/${appl} script, + # wrapped up so that it will run as if it was inside a nix build + # with those build inputs. + # + # The build input 'faust' is automatically added to the + # propagatedBuildInputs. + wrapWithBuildEnv = + { baseName + , propagatedBuildInputs ? [ ] + , ... + }@args: + + stdenv.mkDerivation ((faust2ApplBase args) // { + + buildInputs = [ makeWrapper pkgconfig ]; + + propagatedBuildInputs = [ faust ] ++ propagatedBuildInputs; + + postFixup = '' + + # export parts of the build environment + for script in "$out"/bin/*; do + wrapProgram "$script" \ + --set FAUSTLIB "${faust}/lib/faust" \ + --set FAUSTINC "${faust}/include/faust" \ + --prefix PATH : "$PATH" \ + --prefix PKG_CONFIG_PATH : "$PKG_CONFIG_PATH" \ + --set NIX_CFLAGS_COMPILE "\"$NIX_CFLAGS_COMPILE\"" \ + --set NIX_LDFLAGS "\"$NIX_LDFLAGS\"" + done + ''; + }); + + # Builder for 'faust2appl' scripts, such as faust2firefox that + # simply need to be wrapped with some dependencies on PATH. + # + # The build input 'faust' is automatically added to the PATH. + wrap = + { baseName + , runtimeInputs ? [ ] + , ... + }@args: + + let + + runtimePath = concatStringsSep ":" (map (p: "${p}/bin") ([ faust ] ++ runtimeInputs)); + + in stdenv.mkDerivation ((faust2ApplBase args) // { + + buildInputs = [ makeWrapper ]; + + postFixup = '' + for script in "$out"/bin/*; do + wrapProgram "$script" --prefix PATH : "${runtimePath}" + done + ''; + + }); + +in faust diff --git a/pkgs/applications/audio/faust/faust2lv2gui.nix b/pkgs/applications/audio/faust/faust2lv2gui.nix new file mode 100644 index 00000000000..af20bb1d745 --- /dev/null +++ b/pkgs/applications/audio/faust/faust2lv2gui.nix @@ -0,0 +1,14 @@ +{ boost +, faust1git +, lv2 +, qt4 + +}: + +faust1git.wrapWithBuildEnv { + + baseName = "faust2lv2"; + + propagatedBuildInputs = [ boost lv2 qt4 ]; + +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4d26cf8d62f..1bd108ef932 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6468,13 +6468,13 @@ in beecrypt = callPackage ../development/libraries/beecrypt { }; beignet = callPackage ../development/libraries/beignet { - inherit (llvmPackages) clang-unwrapped; - inherit (xlibs) libX11; - inherit (xorg) libXfixes libpthreadstubs libXdmcp libXdamage libXxf86vm; - inherit (python3Packages) python; - inherit (purePackages) gl; - }; - + inherit (llvmPackages) clang-unwrapped; + inherit (xlibs) libX11; + inherit (xorg) libXfixes libpthreadstubs libXdmcp libXdamage libXxf86vm; + inherit (python3Packages) python; + inherit (purePackages) gl; + }; + belle-sip = callPackage ../development/libraries/belle-sip { }; bobcat = callPackage ../development/libraries/bobcat { }; @@ -16206,6 +16206,8 @@ in faust1 = callPackage ../applications/audio/faust/faust1.nix { }; + faust1git = callPackage ../applications/audio/faust/faust1git.nix { }; + faust2 = callPackage ../applications/audio/faust/faust2.nix { llvm = llvm_37; }; @@ -16224,6 +16226,8 @@ in faust2lv2 = callPackage ../applications/audio/faust/faust2lv2.nix { }; + faust2lv2gui = callPackage ../applications/audio/faust/faust2lv2gui.nix { }; + fceux = callPackage ../misc/emulators/fceux { }; foldingathome = callPackage ../misc/foldingathome { }; From 84df0ba64c7571b98b7ef7a9624f684c11569065 Mon Sep 17 00:00:00 2001 From: yawnt Date: Mon, 2 May 2016 10:17:55 +0200 Subject: [PATCH 013/160] jdk: refactor install phase, avoid deleting source files needed for IDE support --- pkgs/development/compilers/oraclejdk/jdk-linux-base.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/development/compilers/oraclejdk/jdk-linux-base.nix b/pkgs/development/compilers/oraclejdk/jdk-linux-base.nix index a18ffcbf3d4..f7bc2afcc4c 100644 --- a/pkgs/development/compilers/oraclejdk/jdk-linux-base.nix +++ b/pkgs/development/compilers/oraclejdk/jdk-linux-base.nix @@ -103,7 +103,8 @@ let result = stdenv.mkDerivation rec { mv $sourceRoot $out fi - for file in $out/* + shopt -s extglob + for file in $out/!(*src.zip) do if test -f $file ; then rm $file From 097a05a5b1c0917a0ab354a78b275fe4e2869a3d Mon Sep 17 00:00:00 2001 From: Jaka Hudoklin Date: Mon, 2 May 2016 17:31:30 +0200 Subject: [PATCH 014/160] redis-dump: init at 0.3.5 --- .../tools/redis-dump/.bundle/config | 3 ++ pkgs/development/tools/redis-dump/Gemfile | 3 ++ .../development/tools/redis-dump/Gemfile.lock | 21 ++++++++++ pkgs/development/tools/redis-dump/default.nix | 20 +++++++++ pkgs/development/tools/redis-dump/gemset.nix | 41 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 4 ++ 6 files changed, 92 insertions(+) create mode 100644 pkgs/development/tools/redis-dump/.bundle/config create mode 100644 pkgs/development/tools/redis-dump/Gemfile create mode 100644 pkgs/development/tools/redis-dump/Gemfile.lock create mode 100644 pkgs/development/tools/redis-dump/default.nix create mode 100644 pkgs/development/tools/redis-dump/gemset.nix diff --git a/pkgs/development/tools/redis-dump/.bundle/config b/pkgs/development/tools/redis-dump/.bundle/config new file mode 100644 index 00000000000..b81abe028c3 --- /dev/null +++ b/pkgs/development/tools/redis-dump/.bundle/config @@ -0,0 +1,3 @@ +--- +BUNDLE_PATH: vendor +BUNDLE_DISABLE_SHARED_GEMS: '1' diff --git a/pkgs/development/tools/redis-dump/Gemfile b/pkgs/development/tools/redis-dump/Gemfile new file mode 100644 index 00000000000..f78cb0873c0 --- /dev/null +++ b/pkgs/development/tools/redis-dump/Gemfile @@ -0,0 +1,3 @@ +source 'https://rubygems.org' + +gem 'redis-dump' diff --git a/pkgs/development/tools/redis-dump/Gemfile.lock b/pkgs/development/tools/redis-dump/Gemfile.lock new file mode 100644 index 00000000000..283a3815f22 --- /dev/null +++ b/pkgs/development/tools/redis-dump/Gemfile.lock @@ -0,0 +1,21 @@ +GEM + remote: https://rubygems.org/ + specs: + drydock (0.6.9) + redis (3.3.0) + redis-dump (0.3.5) + drydock (>= 0.6.9) + redis (>= 2.0) + uri-redis (>= 0.4.0) + yajl-ruby (>= 0.1) + uri-redis (0.4.2) + yajl-ruby (1.2.1) + +PLATFORMS + ruby + +DEPENDENCIES + redis-dump + +BUNDLED WITH + 1.11.2 diff --git a/pkgs/development/tools/redis-dump/default.nix b/pkgs/development/tools/redis-dump/default.nix new file mode 100644 index 00000000000..bc1adf730a3 --- /dev/null +++ b/pkgs/development/tools/redis-dump/default.nix @@ -0,0 +1,20 @@ +{ stdenv, lib, bundlerEnv, ruby, perl, autoconf }: + +bundlerEnv { + name = "redis-dump-0.3.5"; + + inherit ruby; + gemfile = ./Gemfile; + lockfile = ./Gemfile.lock; + gemset = ./gemset.nix; + + buildInputs = [ perl autoconf ]; + + meta = with lib; { + description = "Backup and restore your Redis data to and from JSON"; + homepage = http://delanotes.com/redis-dump/; + license = licenses.mit; + maintainers = with maintainers; [ offline ]; + platforms = platforms.unix; + }; +} diff --git a/pkgs/development/tools/redis-dump/gemset.nix b/pkgs/development/tools/redis-dump/gemset.nix new file mode 100644 index 00000000000..4054f4bb0a7 --- /dev/null +++ b/pkgs/development/tools/redis-dump/gemset.nix @@ -0,0 +1,41 @@ +{ + drydock = { + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0grf3361mh93lczljmnwafl7gbcp9kk1bjpfwx4ykpd43fzdbfyj"; + type = "gem"; + }; + version = "0.6.9"; + }; + redis = { + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1v68ggm0pwcyml3ngfyngwgvypwmsrmji1kyx48qqcg045zjs5p6"; + type = "gem"; + }; + version = "3.3.0"; + }; + redis-dump = { + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0y6s3nvcw84jqqvp9pjg9qmqyc0b8jkrp0dknhjjr0lg2q3fq87h"; + type = "gem"; + }; + version = "0.3.5"; + }; + uri-redis = { + source = { + remotes = ["https://rubygems.org"]; + sha256 = "13n8ak41rikkbmml054pir4i1xbgjpmf3dbqihc2kcrgmz3dg81a"; + type = "gem"; + }; + version = "0.4.2"; + }; + yajl-ruby = { + source = { + sha256 = "0zvvb7i1bl98k3zkdrnx9vasq0rp2cyy5n7p9804dqs4fz9xh9vf"; + type = "gem"; + }; + version = "1.2.1"; + }; +} \ No newline at end of file diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4126d518076..3b787bb9387 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6243,6 +6243,10 @@ in hammer = callPackage ../development/tools/parsing/hammer { }; + redis-dump = callPackage ../development/tools/redis-dump { + ruby = ruby_2_0; + }; + re2c = callPackage ../development/tools/parsing/re2c { }; remake = callPackage ../development/tools/build-managers/remake { }; From 208f1fb7e153ab5076aeb826050833e428c17716 Mon Sep 17 00:00:00 2001 From: Aneesh Agrawal Date: Sun, 1 May 2016 13:00:49 -0400 Subject: [PATCH 015/160] Allow any hash for git-based fetch* derivations Instead of hard-coding which hash types are available, merge the input arg set into the fetchzip arguments to enable passing any hash type that the underyling fetchurl (underneath fetchzip, which does the same thing) supports for hash agility. Also, provide rev attributes on all of these derivations, not just fetchFromGitHub. --- pkgs/top-level/all-packages.nix | 45 ++++++++++++++++++++++----------- 1 file changed, 30 insertions(+), 15 deletions(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5a52289d7e2..4f38ab19a0d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -223,39 +223,54 @@ in fetchzip = callPackage ../build-support/fetchzip { }; - fetchFromGitHub = { owner, repo, rev, sha256, name ? "${repo}-${rev}-src" }: fetchzip { - inherit name sha256; + fetchFromGitHub = { + owner, repo, rev, name ? "${repo}-${rev}-src", + ... # For hash agility + }@args: fetchzip ({ + inherit name; url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; meta.homepage = "https://github.com/${owner}/${repo}/"; - } // { inherit rev; }; + } // removeAttrs args [ "owner" "repo" "rev" ]) // { inherit rev; }; - fetchFromBitbucket = { owner, repo, rev, sha256, name ? "${repo}-${rev}-src" }: fetchzip { - inherit name sha256; + fetchFromBitbucket = { + owner, repo, rev, name ? "${repo}-${rev}-src", + ... # For hash agility + }@args: fetchzip ({ + inherit name; url = "https://bitbucket.org/${owner}/${repo}/get/${rev}.tar.gz"; meta.homepage = "https://bitbucket.org/${owner}/${repo}/"; extraPostFetch = ''rm -f "$out"/.hg_archival.txt''; # impure file; see #12002 - }; + } // removeAttrs args [ "owner" "repo" "rev" ]) // { inherit rev; }; # cgit example, snapshot support is optional in cgit - fetchFromSavannah = { repo, rev, sha256, name ? "${repo}-${rev}-src" }: fetchzip { - inherit name sha256; + fetchFromSavannah = { + repo, rev, name ? "${repo}-${rev}-src", + ... # For hash agility + }@args: fetchzip ({ + inherit name; url = "http://git.savannah.gnu.org/cgit/${repo}.git/snapshot/${repo}-${rev}.tar.gz"; meta.homepage = "http://git.savannah.gnu.org/cgit/${repo}.git/"; - }; + } // removeAttrs args [ "repo" "rev" ]) // { inherit rev; }; # gitlab example - fetchFromGitLab = { owner, repo, rev, sha256, name ? "${repo}-${rev}-src" }: fetchzip { - inherit name sha256; + fetchFromGitLab = { + owner, repo, rev, name ? "${repo}-${rev}-src", + ... # For hash agility + }@args: fetchzip ({ + inherit name; url = "https://gitlab.com/${owner}/${repo}/repository/archive.tar.gz?ref=${rev}"; meta.homepage = "https://gitlab.com/${owner}/${repo}/"; - }; + } // removeAttrs args [ "owner" "repo" "rev" ]) // { inherit rev; }; # gitweb example, snapshot support is optional in gitweb - fetchFromRepoOrCz = { repo, rev, sha256, name ? "${repo}-${rev}-src" }: fetchzip { - inherit name sha256; + fetchFromRepoOrCz = { + repo, rev, name ? "${repo}-${rev}-src", + ... # For hash agility + }@args: fetchzip ({ + inherit name; url = "http://repo.or.cz/${repo}.git/snapshot/${rev}.tar.gz"; meta.homepage = "http://repo.or.cz/${repo}.git/"; - }; + } // removeAttrs args [ "repo" "rev" ]) // { inherit rev; }; fetchNuGet = callPackage ../build-support/fetchnuget { }; buildDotnetPackage = callPackage ../build-support/build-dotnet-package { }; From 8ebae7fc3c861e76f720838910d8f268ed60a030 Mon Sep 17 00:00:00 2001 From: Sebastian Gniazdowski Date: Tue, 3 May 2016 11:44:08 +0000 Subject: [PATCH 016/160] zsh-navigation-tools: install all files --- pkgs/tools/misc/zsh-navigation-tools/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/tools/misc/zsh-navigation-tools/default.nix b/pkgs/tools/misc/zsh-navigation-tools/default.nix index 8074f78db50..499dccdb19d 100644 --- a/pkgs/tools/misc/zsh-navigation-tools/default.nix +++ b/pkgs/tools/misc/zsh-navigation-tools/default.nix @@ -15,8 +15,11 @@ stdenv.mkDerivation rec { installPhase = '' mkdir -p $out/share/zsh/site-functions/ + cp zsh-navigation-tools.plugin.zsh $out/share/zsh/site-functions/ cp n-* $out/share/zsh/site-functions/ cp znt-* $out/share/zsh/site-functions/ + mkdir -p $out/share/zsh/site-functions/.config/znt + cp .config/znt/n-* $out/share/zsh/site-functions/.config/znt ''; meta = with stdenv.lib; { From 7c0063bf153aa18dfb26f7f66c16d2e737aa9b45 Mon Sep 17 00:00:00 2001 From: Sebastian Gniazdowski Date: Tue, 3 May 2016 13:46:04 +0000 Subject: [PATCH 017/160] zsh-navigation-tools: 1.4 -> 2.0.7 --- pkgs/tools/misc/zsh-navigation-tools/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/misc/zsh-navigation-tools/default.nix b/pkgs/tools/misc/zsh-navigation-tools/default.nix index 499dccdb19d..afa29b616e7 100644 --- a/pkgs/tools/misc/zsh-navigation-tools/default.nix +++ b/pkgs/tools/misc/zsh-navigation-tools/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { name = "zsh-navigation-tools-${version}"; - version = "1.4"; + version = "2.0.7"; src = fetchFromGitHub { owner = "psprint"; repo = "zsh-navigation-tools"; rev = "v${version}"; - sha256 = "1r24mpx57jyn201mdhd793rlhlr5r83n9137aafkgf86282ghr7y"; + sha256 = "0rfab3maha366dgvcmiqj6049wk5fynns1ygbgy4gnvavx2acvg2"; }; dontBuild = true; From 64ef643833de573ccec8bb0d923b5d6807ef81b0 Mon Sep 17 00:00:00 2001 From: Alexander Ried Date: Tue, 19 Apr 2016 23:12:09 +0200 Subject: [PATCH 018/160] libcap: 2.24 -> 2.25 --- pkgs/os-specific/linux/libcap/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/libcap/default.nix b/pkgs/os-specific/linux/libcap/default.nix index c8484babcdf..411044c1b92 100644 --- a/pkgs/os-specific/linux/libcap/default.nix +++ b/pkgs/os-specific/linux/libcap/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { name = "libcap-${version}"; - version = "2.24"; + version = "2.25"; src = fetchurl { url = "mirror://kernel/linux/libs/security/linux-privs/libcap2/${name}.tar.xz"; - sha256 = "0rbc9qbqs5bp9am9s9g83wxj5k4ixps2agy9dxr1v1fwg27mdr6f"; + sha256 = "0qjiqc5pknaal57453nxcbz3mn1r4hkyywam41wfcglq3v2qlg39"; }; outputs = [ "dev" "out" ]; From 7382afac40c23841e5d6a491bd4a9412d766ecab Mon Sep 17 00:00:00 2001 From: Alexander Ried Date: Tue, 19 Apr 2016 23:12:45 +0200 Subject: [PATCH 019/160] libcap: replace old split with multi-output --- pkgs/os-specific/linux/libcap/default.nix | 42 +++++++++++++++++++---- pkgs/os-specific/linux/libcap/man.nix | 13 ------- pkgs/os-specific/linux/libcap/pam.nix | 15 -------- pkgs/os-specific/linux/libcap/progs.nix | 28 --------------- pkgs/top-level/all-packages.nix | 6 ++-- 5 files changed, 38 insertions(+), 66 deletions(-) delete mode 100644 pkgs/os-specific/linux/libcap/man.nix delete mode 100644 pkgs/os-specific/linux/libcap/pam.nix delete mode 100644 pkgs/os-specific/linux/libcap/progs.nix diff --git a/pkgs/os-specific/linux/libcap/default.nix b/pkgs/os-specific/linux/libcap/default.nix index 411044c1b92..13d2fb7f5c5 100644 --- a/pkgs/os-specific/linux/libcap/default.nix +++ b/pkgs/os-specific/linux/libcap/default.nix @@ -1,4 +1,5 @@ -{ stdenv, fetchurl, attr, perl }: +{ stdenv, fetchurl, attr, perl, pam ? null }: +assert pam != null -> stdenv.isLinux; stdenv.mkDerivation rec { name = "libcap-${version}"; @@ -9,19 +10,46 @@ stdenv.mkDerivation rec { sha256 = "0qjiqc5pknaal57453nxcbz3mn1r4hkyywam41wfcglq3v2qlg39"; }; - outputs = [ "dev" "out" ]; + outputs = [ "dev" "lib" "doc" "out" ] + ++ stdenv.lib.optional (pam != null) "pam"; nativeBuildInputs = [ perl ]; + + buildInputs = [ pam ]; + propagatedBuildInputs = [ attr ]; - preConfigure = "cd libcap"; + makeFlags = [ + "lib=lib" + (stdenv.lib.optional (pam != null) "PAM_CAP=yes") + ]; - makeFlags = "lib=lib prefix=$(out)"; + prePatch = '' + # use relative bash path + substituteInPlace progs/capsh.c --replace "/bin/bash" "bash" + + # ensure capsh can find bash in $PATH + substituteInPlace progs/capsh.c --replace execve execvpe + ''; + + preInstall = '' + substituteInPlace Make.Rules \ + --replace 'prefix=/usr' "prefix=$lib" \ + --replace 'exec_prefix=' "exec_prefix=$out" \ + --replace 'lib_prefix=$(exec_prefix)' "lib_prefix=$lib" \ + --replace 'inc_prefix=$(prefix)' "inc_prefix=$dev" \ + --replace 'man_prefix=$(prefix)' "man_prefix=$doc" + ''; + + installFlags = "RAISE_SETFCAP=no"; postInstall = '' - rm "$out"/lib/*.a - mkdir -p "$dev/share/doc/${name}" - cp ../License "$dev/share/doc/${name}/License" + rm "$lib"/lib/*.a + mkdir -p "$doc/share/doc/${name}" + cp License "$doc/share/doc/${name}/" + '' + stdenv.lib.optionalString (pam != null) '' + mkdir -p "$pam/lib/security" + mv "$lib"/lib/security "$pam/lib" ''; meta = { diff --git a/pkgs/os-specific/linux/libcap/man.nix b/pkgs/os-specific/linux/libcap/man.nix deleted file mode 100644 index eeb780f095b..00000000000 --- a/pkgs/os-specific/linux/libcap/man.nix +++ /dev/null @@ -1,13 +0,0 @@ -{stdenv, libcap}: - -assert stdenv.isLinux; - -stdenv.mkDerivation rec { - name = "libcap-docs-${libcap.version}"; - - inherit (libcap) src; - - makeFlags = "MANDIR=$(out)/share/man"; - - preConfigure = "cd doc"; -} diff --git a/pkgs/os-specific/linux/libcap/pam.nix b/pkgs/os-specific/linux/libcap/pam.nix deleted file mode 100644 index 3dd7cd947af..00000000000 --- a/pkgs/os-specific/linux/libcap/pam.nix +++ /dev/null @@ -1,15 +0,0 @@ -{stdenv, pam, libcap}: - -assert stdenv.isLinux; - -stdenv.mkDerivation rec { - name = "libcap-pam-${libcap.version}"; - - inherit (libcap) src; - - buildInputs = [ libcap pam ]; - - preConfigure = "cd pam_cap"; - - makeFlags = "${libcap.makeFlags} PAM_CAP=yes"; -} diff --git a/pkgs/os-specific/linux/libcap/progs.nix b/pkgs/os-specific/linux/libcap/progs.nix deleted file mode 100644 index e3871f15f88..00000000000 --- a/pkgs/os-specific/linux/libcap/progs.nix +++ /dev/null @@ -1,28 +0,0 @@ -{stdenv, libcap}: - -assert stdenv.isLinux; - -stdenv.mkDerivation rec { - name = "libcap-progs-${libcap.version}"; - - inherit (libcap) src makeFlags; - - buildInputs = [ libcap ]; - - prePatch = '' - # use relative bash path - substituteInPlace progs/capsh.c --replace "/bin/bash" "bash" - - # ensure capsh can find bash in $PATH - substituteInPlace progs/capsh.c --replace execve execvpe - ''; - - preConfigure = "cd progs"; - - installFlags = "RAISE_SETFCAP=no"; - - postInstall = '' - mkdir -p "$out/share/doc/${name}" - cp ../License "$out/share/doc/${name}/" - ''; -} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 446501c094b..911326d023e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -10913,11 +10913,11 @@ in libcap = callPackage ../os-specific/linux/libcap { }; - libcap_progs = callPackage ../os-specific/linux/libcap/progs.nix { }; + libcap_progs = libcap.out; - libcap_pam = callPackage ../os-specific/linux/libcap/pam.nix { }; + libcap_pam = if stdenv.isLinux then libcap.pam else null; - libcap_manpages = callPackage ../os-specific/linux/libcap/man.nix { }; + libcap_manpages = libcap.doc; libcap_ng = callPackage ../os-specific/linux/libcap-ng { swig = null; # Currently not using the python2/3 bindings From 5c295a4925fed2095fbdf80d8ae85da815652f0a Mon Sep 17 00:00:00 2001 From: Alexander Ried Date: Tue, 19 Apr 2016 23:25:26 +0200 Subject: [PATCH 020/160] libcap: Replace occurences of libcap_progs with libcap.out --- pkgs/desktops/kde-5/frameworks-5.19/kinit/default.nix | 3 +-- pkgs/tools/misc/xfstests/default.nix | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/pkgs/desktops/kde-5/frameworks-5.19/kinit/default.nix b/pkgs/desktops/kde-5/frameworks-5.19/kinit/default.nix index 64210ca7605..90dbf96972f 100644 --- a/pkgs/desktops/kde-5/frameworks-5.19/kinit/default.nix +++ b/pkgs/desktops/kde-5/frameworks-5.19/kinit/default.nix @@ -1,13 +1,12 @@ { kdeFramework, lib, copyPathsToStore, extra-cmake-modules, kconfig, kcrash , kdoctools, ki18n, kio, kservice, kwindowsystem, libcap -, libcap_progs }: # TODO: setuid wrapper kdeFramework { name = "kinit"; - nativeBuildInputs = [ extra-cmake-modules kdoctools libcap_progs ]; + nativeBuildInputs = [ extra-cmake-modules kdoctools libcap.out ]; buildInputs = [ kconfig kcrash kservice libcap ]; propagatedBuildInputs = [ ki18n kio kwindowsystem ]; patches = copyPathsToStore (lib.readPathsFromFile ./. ./series); diff --git a/pkgs/tools/misc/xfstests/default.nix b/pkgs/tools/misc/xfstests/default.nix index 957582a3687..5269955ebdf 100644 --- a/pkgs/tools/misc/xfstests/default.nix +++ b/pkgs/tools/misc/xfstests/default.nix @@ -1,5 +1,5 @@ { stdenv, acl, attr, autoreconfHook, bash, bc, coreutils, e2fsprogs, fetchgit, fio, gawk -, lib, libaio, libcap_progs, libuuid, libxfs, lvm2, openssl, perl, procps, psmisc, su +, lib, libaio, libcap, libuuid, libxfs, lvm2, openssl, perl, procps, psmisc, su , time, utillinux, which, writeScript, xfsprogs }: stdenv.mkDerivation { @@ -72,7 +72,7 @@ stdenv.mkDerivation { ln -s @out@/lib/xfstests/$f $f done - export PATH=${lib.makeBinPath [acl attr bc e2fsprogs fio gawk libcap_progs lvm2 perl procps psmisc su utillinux which xfsprogs]}:$PATH + export PATH=${lib.makeBinPath [acl attr bc e2fsprogs fio gawk libcap lvm2 perl procps psmisc su utillinux which xfsprogs]}:$PATH exec ./check "$@" ''; From a0a6a3df88e6d1d3542dee0e8d7c8f71fb8293b9 Mon Sep 17 00:00:00 2001 From: Alexander Ried Date: Fri, 29 Apr 2016 04:42:30 +0200 Subject: [PATCH 021/160] libcap: Move old libcap_* aliases to aliases.nix --- pkgs/top-level/aliases.nix | 3 +++ pkgs/top-level/all-packages.nix | 6 ------ 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 266313c81e1..964e7841344 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -54,6 +54,9 @@ doNotDisplayTwice rec { joseki = apache-jena-fuseki; # added 2016-02-28 jquery_ui = jquery-ui; # added 2014-09-07 libdbusmenu_qt5 = qt5.libdbusmenu; # added 2015-12-19 + libcap_manpages = libcap.doc; # added 2016-04-29 + libcap_pam = if stdenv.isLinux then libcap.pam else null; # added 2016-04-29 + libcap_progs = libcap.out; # added 2016-04-29 libtidy = html-tidy; # added 2014-12-21 links = links2; # added 2016-01-31 lttngTools = lttng-tools; # added 2014-07-31 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 911326d023e..66a60a9cfa4 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -10913,12 +10913,6 @@ in libcap = callPackage ../os-specific/linux/libcap { }; - libcap_progs = libcap.out; - - libcap_pam = if stdenv.isLinux then libcap.pam else null; - - libcap_manpages = libcap.doc; - libcap_ng = callPackage ../os-specific/linux/libcap-ng { swig = null; # Currently not using the python2/3 bindings python2 = null; # Currently not using the python2 bindings From 959472a824f5a86feab01aac9a6e1e09235f9556 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Tue, 3 May 2016 19:48:39 +0200 Subject: [PATCH 022/160] nginx: 1.8.1 -> 1.10.0 Changes: http://nginx.org/en/CHANGES-1.10 --- pkgs/servers/http/nginx/default.nix | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/pkgs/servers/http/nginx/default.nix b/pkgs/servers/http/nginx/default.nix index b3bc092dc40..cb845220543 100644 --- a/pkgs/servers/http/nginx/default.nix +++ b/pkgs/servers/http/nginx/default.nix @@ -1,5 +1,6 @@ { stdenv, fetchurl, fetchFromGitHub, openssl, zlib, pcre, libxml2, libxslt, expat , gd, geoip +, withStream ? false , modules ? [] , hardening ? true }: @@ -7,10 +8,10 @@ with stdenv.lib; let - version = "1.8.1"; + version = "1.10.0"; mainSrc = fetchurl { url = "http://nginx.org/download/nginx-${version}.tar.gz"; - sha256 = "1dwpyw4pvhj68vxramqxm8f79pqz9lrm8mvifbn49h3615ikqjwg"; + sha256 = "0kdyqa5xaxvhz6y75ixs05mzygk3kszzdq5h0gnlrg35vp1lgmlf"; }; in @@ -24,11 +25,8 @@ stdenv.mkDerivation rec { ++ concatMap (mod: mod.inputs or []) modules; configureFlags = [ - "--with-select_module" - "--with-poll_module" - "--with-threads" "--with-http_ssl_module" - "--with-http_spdy_module" + "--with-http_v2_module" "--with-http_realip_module" "--with-http_addition_module" "--with-http_xslt_module" @@ -48,11 +46,11 @@ stdenv.mkDerivation rec { "--with-ipv6" # Install destination problems # "--with-http_perl_module" - ] ++ optionals (elem stdenv.system (with platforms; linux ++ freebsd)) - [ "--with-file-aio" "--with-aio_module" ] + ] ++ optional withStream "--with-stream" + ++ optional (elem stdenv.system (with platforms; linux ++ freebsd)) "--with-file-aio" ++ map (mod: "--add-module=${mod.src}") modules; - NIX_CFLAGS_COMPILE = [ "-I${libxml2.dev}/include/libxml2" ] ++ optional stdenv.isDarwin "-Wno-error=deprecated-declarations -Wno-error=conditional-uninitialized"; + NIX_CFLAGS_COMPILE = [ "-I${libxml2.dev}/include/libxml2" ] ++ optional stdenv.isDarwin "-Wno-error=deprecated-declarations"; preConfigure = (concatMapStringsSep "\n" (mod: mod.preConfigure or "") modules) + optionalString (hardening && (stdenv.cc.cc.isGNU or false)) '' @@ -63,6 +61,10 @@ stdenv.mkDerivation rec { '' ; + postInstall = '' + mv $out/sbin $out/bin + ''; + meta = { description = "A reverse proxy and lightweight webserver"; homepage = http://nginx.org; From 0bc13e3af21e428a96082770347455523c87b726 Mon Sep 17 00:00:00 2001 From: Michael Raskin <7c6f434c@mail.ru> Date: Fri, 1 Jan 2016 02:54:56 +0100 Subject: [PATCH 023/160] iptables: 1.4.21 -> 1.6.0 --- pkgs/os-specific/linux/iptables/default.nix | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/pkgs/os-specific/linux/iptables/default.nix b/pkgs/os-specific/linux/iptables/default.nix index ba3ee64f08b..8c815029661 100644 --- a/pkgs/os-specific/linux/iptables/default.nix +++ b/pkgs/os-specific/linux/iptables/default.nix @@ -1,14 +1,22 @@ -{stdenv, fetchurl}: +{stdenv, fetchurl, bison, flex, libnetfilter_conntrack, libnftnl, libmnl}: stdenv.mkDerivation rec { name = "iptables-${version}"; - version = "1.4.21"; # before updating check #12178 + version = "1.6.0"; src = fetchurl { url = "http://www.netfilter.org/projects/iptables/files/${name}.tar.bz2"; - sha256 = "1q6kg7sf0pgpq0qhab6sywl23cngxxfzc9zdzscsba8x09l4q02j"; + sha256 = "0q0w1x4aijid8wj7dg1ny9fqwll483f1sqw7kvkskd8q1c52mdsb"; }; + nativeBuildInputs = [bison flex]; + + buildInputs = [libnetfilter_conntrack libnftnl libmnl]; + + preConfigure = '' + export NIX_LDFLAGS="$NIX_LDFLAGS -lmnl -lnftnl" + ''; + configureFlags = '' --enable-devel --enable-shared From 82c141b9995c6bfaf538474acaa2c5d0c3a256cf Mon Sep 17 00:00:00 2001 From: Alexander Ried Date: Tue, 3 May 2016 20:29:45 +0200 Subject: [PATCH 024/160] Revert "iptables: add 1.6 branch (init 1.6.0). Not making it the default this time." This reverts commit 74f7916a9a4c0ebe8d7c5d5861c5694ea2d1583e. Time to make it the default. --- pkgs/os-specific/linux/iptables/1.6.nix | 33 ------------------------- pkgs/top-level/all-packages.nix | 5 ---- 2 files changed, 38 deletions(-) delete mode 100644 pkgs/os-specific/linux/iptables/1.6.nix diff --git a/pkgs/os-specific/linux/iptables/1.6.nix b/pkgs/os-specific/linux/iptables/1.6.nix deleted file mode 100644 index 88821a15d73..00000000000 --- a/pkgs/os-specific/linux/iptables/1.6.nix +++ /dev/null @@ -1,33 +0,0 @@ -{stdenv, fetchurl, bison, flex, libnetfilter_conntrack, libnftnl, libmnl}: - -stdenv.mkDerivation rec { - name = "iptables-${version}"; - version = "1.6.0"; - - src = fetchurl { - url = "http://www.netfilter.org/projects/iptables/files/${name}.tar.bz2"; - sha256 = "0q0w1x4aijid8wj7dg1ny9fqwll483f1sqw7kvkskd8q1c52mdsb"; - }; - - nativeBuildInputs = [bison flex]; - - buildInputs = [libnetfilter_conntrack libnftnl libmnl]; - - preConfigure = '' - export NIX_LDFLAGS="$NIX_LDFLAGS -lmnl -lnftnl" - ''; - - configureFlags = '' - --enable-devel - --enable-shared - ''; - - meta = { - description = "A program to configure the Linux IP packet filtering ruleset"; - homepage = http://www.netfilter.org/projects/iptables/index.html; - platforms = stdenv.lib.platforms.linux; - downloadPage = "http://www.netfilter.org/projects/iptables/files/"; - updateWalker = true; - inherit version; - }; -} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 446501c094b..26cfdafea13 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -10436,11 +10436,6 @@ in }; iptables = callPackage ../os-specific/linux/iptables { }; - # The freshest version — possibly crashing connmand? - # https://github.com/NixOS/nixpkgs/commit/fe00c8a83f696e3430ee4aa3fc850f171da52450 - iptables_16 = callPackage ../os-specific/linux/iptables/1.6.nix { - flex = flex_2_5_35; - }; ipset = callPackage ../os-specific/linux/ipset { }; From 17d85f4e91f9775f71a201746810b98e010685e1 Mon Sep 17 00:00:00 2001 From: Brandon Kase Date: Sat, 30 Apr 2016 16:57:36 -0700 Subject: [PATCH 025/160] vimPlugins: add missing haskell plugins * haskell-vim * hlint-refactor-vim * vim-haskellConcealPlus --- pkgs/misc/vim-plugins/default.nix | 35 ++++++++++++++++++++++++++ pkgs/misc/vim-plugins/vim-plugin-names | 3 +++ 2 files changed, 38 insertions(+) diff --git a/pkgs/misc/vim-plugins/default.nix b/pkgs/misc/vim-plugins/default.nix index 0d754294cec..1de08bf3014 100644 --- a/pkgs/misc/vim-plugins/default.nix +++ b/pkgs/misc/vim-plugins/default.nix @@ -67,7 +67,9 @@ rec { Gundo = gundo-vim; # backwards compat, added 2015-10-03 haskellConceal = haskellconceal; # backwards compat, added 2014-10-18 haskellconceal = vim-haskellconceal; + haskellConcealPlus = vim-haskellConcealPlus; hier = vim-hier; + hlint-refactor = hlint-refactor-vim; hoogle = Hoogle; ipython = vim-ipython; latex-live-preview = vim-latex-live-preview; @@ -1703,4 +1705,37 @@ rec { dependencies = []; }; + + vim-haskellConcealPlus = buildVimPluginFrom2Nix { # created by nix#NixDerivation + name = "vim-haskellConcealPlus-2015-11-14"; + src = fetchgit { + url = "git://github.com/enomsg/vim-haskellConcealPlus"; + rev = "fdd4e15800121edcb72e050650b02537af2d64ce"; + sha256 = "0dw9ibj54bnszvkzxhfdwxwyjlv5a5k1pbyjmbw44ldqx48x4651"; + }; + dependencies = []; + + }; + + hlint-refactor-vim = buildVimPluginFrom2Nix { # created by nix#NixDerivation + name = "hlint-refactor-vim-2015-12-05"; + src = fetchgit { + url = "git://github.com/mpickering/hlint-refactor-vim"; + rev = "fffb044ecef854a82c5c2efda252e09044ba03e0"; + sha256 = "0z8d31arfy9aidg1dwj5msnnx799d9r7njkgh51z695w6ayxn6p8"; + }; + dependencies = []; + + }; + + haskell-vim = buildVimPluginFrom2Nix { # created by nix#NixDerivation + name = "haskell-vim-2016-04-18"; + src = fetchgit { + url = "git://github.com/neovimhaskell/haskell-vim"; + rev = "40bb7c933d2e95432571fcb353d69323a1432d4e"; + sha256 = "08da8hp1jirxzlwbnzf2zlpzya1jc74mahwsb37xnbs6hgvvpd86"; + }; + dependencies = []; + + }; } diff --git a/pkgs/misc/vim-plugins/vim-plugin-names b/pkgs/misc/vim-plugins/vim-plugin-names index 2b8d71b8760..7a2f018a81b 100644 --- a/pkgs/misc/vim-plugins/vim-plugin-names +++ b/pkgs/misc/vim-plugins/vim-plugin-names @@ -30,6 +30,7 @@ "github:digitaltoad/vim-jade" "github:eagletmt/neco-ghc" "github:esneider/YUNOcommit.vim" +"github:enomsg/vim-haskellConcealPlus" "github:fatih/vim-go" "github:flazz/vim-colorschemes" "github:google/vim-jsonnet" @@ -56,7 +57,9 @@ "github:lyokha/vim-xkbswitch" "github:mhinz/vim-startify" "github:mkasa/lushtags" +"github:mpickering/hlint-refactor-vim" "github:nbouscal/vim-stylish-haskell" +"github:neovimhaskell/haskell-vim" "github:osyo-manga/shabadou.vim" "github:osyo-manga/vim-watchdogs" "github:racer-rust/vim-racer" From 5901a8c63b0792c41706765eb11dc525793208fa Mon Sep 17 00:00:00 2001 From: zimbatm Date: Wed, 4 May 2016 11:06:55 +0100 Subject: [PATCH 026/160] autojump: include a way to find the share dir autojump-share is a new script that gives you the path to autojump's shared directory. It can then be used in the various shell's rc files to find and source the autojump integration. Eg: source "$(autojump-share)/autojump.bash" Fixes #3239 --- pkgs/tools/misc/autojump/default.nix | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/misc/autojump/default.nix b/pkgs/tools/misc/autojump/default.nix index 3bd44fb07b7..f0dfee7882a 100644 --- a/pkgs/tools/misc/autojump/default.nix +++ b/pkgs/tools/misc/autojump/default.nix @@ -22,9 +22,13 @@ in mkdir -p "$out/etc/bash_completion.d" cp -v $out/share/autojump/autojump.bash "$out/etc/bash_completion.d" - # FIXME: What's the right place for `autojump.zsh'? - # This can be used as a workaround in .zshrc: - # . $HOME/.nix-profile/share/autojump/autojump.zsh + cat <