From fd0f8adaab91a68190631ab9991ebe73c17d05bc Mon Sep 17 00:00:00 2001 From: Samuel Dionne-Riel Date: Sat, 8 Jun 2019 01:01:22 -0400 Subject: [PATCH 01/90] nixos/desktop-managers/xterm: Defaults to xserver's state This enhances #61423, which removed the gating of desktop-managers from being linked to the xserver's state. This, though, brought in xterm into all systems, even those without X servers. This change sets the *default* of the xterm desktop-manager to the state of the xserver, keeping it enabled by default as a sane fallback. The xterm desktop-manager can still be enabled or disabled as needed, without it being affected by xserver's state. --- nixos/modules/services/x11/desktop-managers/xterm.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nixos/modules/services/x11/desktop-managers/xterm.nix b/nixos/modules/services/x11/desktop-managers/xterm.nix index f386ebc4d3c1..ea441fbbe715 100644 --- a/nixos/modules/services/x11/desktop-managers/xterm.nix +++ b/nixos/modules/services/x11/desktop-managers/xterm.nix @@ -5,6 +5,7 @@ with lib; let cfg = config.services.xserver.desktopManager.xterm; + xserverEnabled = config.services.xserver.enable; in @@ -13,7 +14,8 @@ in services.xserver.desktopManager.xterm.enable = mkOption { type = types.bool; - default = true; + default = xserverEnabled; + defaultText = "config.services.xserver.enable"; description = "Enable a xterm terminal as a desktop manager."; }; From adc62907a68081e4786e31c0725ca5de04afd77b Mon Sep 17 00:00:00 2001 From: Samuel Dionne-Riel Date: Mon, 10 Jun 2019 21:31:20 -0400 Subject: [PATCH 02/90] linux: Enables support for the Allwinner Display Engine 2.0 --- pkgs/os-specific/linux/kernel/common-config.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/os-specific/linux/kernel/common-config.nix b/pkgs/os-specific/linux/kernel/common-config.nix index 61d349b7f0cb..c461de4f5a88 100644 --- a/pkgs/os-specific/linux/kernel/common-config.nix +++ b/pkgs/os-specific/linux/kernel/common-config.nix @@ -709,6 +709,9 @@ let # Bump the maximum number of CPUs to support systems like EC2 x1.* # instances and Xeon Phi. NR_CPUS = freeform "384"; + } // optionalAttrs (stdenv.hostPlatform.system == "aarch64-linux") { + # Enables support for the Allwinner Display Engine 2.0 + SUN8I_DE2_CCU = whenAtLeast "4.13" yes; }; }; in From 390f2071df6f846f0e5ce488c3caeb03cdd43260 Mon Sep 17 00:00:00 2001 From: Samuel Dionne-Riel Date: Mon, 10 Jun 2019 21:33:28 -0400 Subject: [PATCH 03/90] sd-image-aarch64: Allows early modesetting for the Raspberry Pi This will reduce the confusion at boot, where the only thing visible is the last message from u-boot; where it looks like the Raspberry Pi is hung, while in reality it's likely resizing partitions. --- nixos/modules/installer/cd-dvd/sd-image-aarch64.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/nixos/modules/installer/cd-dvd/sd-image-aarch64.nix b/nixos/modules/installer/cd-dvd/sd-image-aarch64.nix index 5f7194e92a36..9930a4ff3047 100644 --- a/nixos/modules/installer/cd-dvd/sd-image-aarch64.nix +++ b/nixos/modules/installer/cd-dvd/sd-image-aarch64.nix @@ -26,6 +26,11 @@ in # Also increase the amount of CMA to ensure the virtual console on the RPi3 works. boot.kernelParams = ["cma=32M" "console=ttyS0,115200n8" "console=ttyAMA0,115200n8" "console=tty0"]; + boot.initrd.availableKernelModules = [ + # Allows early (earlier) modesetting for the Raspberry Pi + "vc4" "bcm2835_dma" "i2c_bcm2835" + ]; + sdImage = { populateBootCommands = let configTxt = pkgs.writeText "config.txt" '' From 5d92d16b49ee851dfbed7fb8b47e172ab1104a20 Mon Sep 17 00:00:00 2001 From: Samuel Dionne-Riel Date: Sat, 15 Jun 2019 00:00:15 -0400 Subject: [PATCH 04/90] sd-image-aarch64: Allows early modesetting for Allwinner boards This will reduce the confusion at boot, where the only thing visible is the last message from u-boot; where it looks like the board is hung, while in reality it's likely resizing partitions. --- nixos/modules/installer/cd-dvd/sd-image-aarch64.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nixos/modules/installer/cd-dvd/sd-image-aarch64.nix b/nixos/modules/installer/cd-dvd/sd-image-aarch64.nix index 9930a4ff3047..151749f396df 100644 --- a/nixos/modules/installer/cd-dvd/sd-image-aarch64.nix +++ b/nixos/modules/installer/cd-dvd/sd-image-aarch64.nix @@ -29,6 +29,8 @@ in boot.initrd.availableKernelModules = [ # Allows early (earlier) modesetting for the Raspberry Pi "vc4" "bcm2835_dma" "i2c_bcm2835" + # Allows early (earlier) modesetting for Allwinner SoCs + "sun4i_drm" "sun8i_drm_hdmi" "sun8i_mixer" ]; sdImage = { From 6e9e78b61869bcec02055a0210e8ac569be9f881 Mon Sep 17 00:00:00 2001 From: Samuel Dionne-Riel Date: Sat, 1 Jun 2019 18:03:44 -0400 Subject: [PATCH 05/90] sd-image: Moves `/boot` into rootfs The current FAT32 partition is kept as it is required for the Raspberry Pi family of hardware. It is where the firmware is kept. The partition is kept bootable, and the boot files kept in there until the following commits, to keep all commits of this series individually bootable. --- .../installer/cd-dvd/sd-image-aarch64.nix | 10 ++-- .../cd-dvd/sd-image-armv7l-multiplatform.nix | 12 ++-- .../installer/cd-dvd/sd-image-raspberrypi.nix | 10 ++-- nixos/modules/installer/cd-dvd/sd-image.nix | 55 ++++++++++--------- 4 files changed, 44 insertions(+), 43 deletions(-) diff --git a/nixos/modules/installer/cd-dvd/sd-image-aarch64.nix b/nixos/modules/installer/cd-dvd/sd-image-aarch64.nix index 5f7194e92a36..eb0bc9da4099 100644 --- a/nixos/modules/installer/cd-dvd/sd-image-aarch64.nix +++ b/nixos/modules/installer/cd-dvd/sd-image-aarch64.nix @@ -27,7 +27,7 @@ in boot.kernelParams = ["cma=32M" "console=ttyS0,115200n8" "console=ttyAMA0,115200n8" "console=tty0"]; sdImage = { - populateBootCommands = let + populateFirmwareCommands = let configTxt = pkgs.writeText "config.txt" '' kernel=u-boot-rpi3.bin @@ -43,10 +43,10 @@ in avoid_warnings=1 ''; in '' - (cd ${pkgs.raspberrypifw}/share/raspberrypi/boot && cp bootcode.bin fixup*.dat start*.elf $NIX_BUILD_TOP/boot/) - cp ${pkgs.ubootRaspberryPi3_64bit}/u-boot.bin boot/u-boot-rpi3.bin - cp ${configTxt} boot/config.txt - ${extlinux-conf-builder} -t 3 -c ${config.system.build.toplevel} -d ./boot + (cd ${pkgs.raspberrypifw}/share/raspberrypi/boot && cp bootcode.bin fixup*.dat start*.elf $NIX_BUILD_TOP/firmware/) + cp ${pkgs.ubootRaspberryPi3_64bit}/u-boot.bin firmware/u-boot-rpi3.bin + cp ${configTxt} firmware/config.txt + ${extlinux-conf-builder} -t 3 -c ${config.system.build.toplevel} -d ./firmware ''; }; } diff --git a/nixos/modules/installer/cd-dvd/sd-image-armv7l-multiplatform.nix b/nixos/modules/installer/cd-dvd/sd-image-armv7l-multiplatform.nix index 71448f74c361..02587ba4af06 100644 --- a/nixos/modules/installer/cd-dvd/sd-image-armv7l-multiplatform.nix +++ b/nixos/modules/installer/cd-dvd/sd-image-armv7l-multiplatform.nix @@ -29,7 +29,7 @@ in boot.kernelParams = ["console=ttyS0,115200n8" "console=ttymxc0,115200n8" "console=ttyAMA0,115200n8" "console=ttyO0,115200n8" "console=ttySAC2,115200n8" "console=tty0"]; sdImage = { - populateBootCommands = let + populateFirmwareCommands = let configTxt = pkgs.writeText "config.txt" '' # Prevent the firmware from smashing the framebuffer setup done by the mainline kernel # when attempting to show low-voltage or overtemperature warnings. @@ -46,11 +46,11 @@ in enable_uart=1 ''; in '' - (cd ${pkgs.raspberrypifw}/share/raspberrypi/boot && cp bootcode.bin fixup*.dat start*.elf $NIX_BUILD_TOP/boot/) - cp ${pkgs.ubootRaspberryPi2}/u-boot.bin boot/u-boot-rpi2.bin - cp ${pkgs.ubootRaspberryPi3_32bit}/u-boot.bin boot/u-boot-rpi3.bin - cp ${configTxt} boot/config.txt - ${extlinux-conf-builder} -t 3 -c ${config.system.build.toplevel} -d ./boot + (cd ${pkgs.raspberrypifw}/share/raspberrypi/boot && cp bootcode.bin fixup*.dat start*.elf $NIX_BUILD_TOP/firmware/) + cp ${pkgs.ubootRaspberryPi2}/u-boot.bin firmware/u-boot-rpi2.bin + cp ${pkgs.ubootRaspberryPi3_32bit}/u-boot.bin firmware/u-boot-rpi3.bin + cp ${configTxt} firmware/config.txt + ${extlinux-conf-builder} -t 3 -c ${config.system.build.toplevel} -d ./firmware ''; }; } diff --git a/nixos/modules/installer/cd-dvd/sd-image-raspberrypi.nix b/nixos/modules/installer/cd-dvd/sd-image-raspberrypi.nix index 96e06670694e..de3385290d28 100644 --- a/nixos/modules/installer/cd-dvd/sd-image-raspberrypi.nix +++ b/nixos/modules/installer/cd-dvd/sd-image-raspberrypi.nix @@ -35,11 +35,11 @@ in kernel=u-boot-rpi1.bin ''; in '' - (cd ${pkgs.raspberrypifw}/share/raspberrypi/boot && cp bootcode.bin fixup*.dat start*.elf $NIX_BUILD_TOP/boot/) - cp ${pkgs.ubootRaspberryPiZero}/u-boot.bin boot/u-boot-rpi0.bin - cp ${pkgs.ubootRaspberryPi}/u-boot.bin boot/u-boot-rpi1.bin - cp ${configTxt} boot/config.txt - ${extlinux-conf-builder} -t 3 -c ${config.system.build.toplevel} -d ./boot + (cd ${pkgs.raspberrypifw}/share/raspberrypi/boot && cp bootcode.bin fixup*.dat start*.elf $NIX_BUILD_TOP/firmware/) + cp ${pkgs.ubootRaspberryPiZero}/u-boot.bin firmware/u-boot-rpi0.bin + cp ${pkgs.ubootRaspberryPi}/u-boot.bin firmware/u-boot-rpi1.bin + cp ${configTxt} firmware/config.txt + ${extlinux-conf-builder} -t 3 -c ${config.system.build.toplevel} -d ./firmware ''; }; } diff --git a/nixos/modules/installer/cd-dvd/sd-image.nix b/nixos/modules/installer/cd-dvd/sd-image.nix index 69746a8e9799..6b5bccfa2e7b 100644 --- a/nixos/modules/installer/cd-dvd/sd-image.nix +++ b/nixos/modules/installer/cd-dvd/sd-image.nix @@ -43,12 +43,12 @@ in ''; }; - bootPartitionID = mkOption { + firmwarePartitionID = mkOption { type = types.string; default = "0x2178694e"; description = '' - Volume ID for the /boot partition on the SD card. This value must be a - 32-bit hexadecimal number. + Volume ID for the /boot/firmware partition on the SD card. This value + must be a 32-bit hexadecimal number. ''; }; @@ -61,29 +61,30 @@ in ''; }; - bootSize = mkOption { + firmwareSize = mkOption { type = types.int; default = 120; description = '' - Size of the /boot partition, in megabytes. + Size of the /boot/firmware partition, in megabytes. ''; }; - populateBootCommands = mkOption { - example = literalExample "'' cp \${pkgs.myBootLoader}/u-boot.bin boot/ ''"; + populateFirmwareCommands = mkOption { + example = literalExample "'' cp \${pkgs.myBootLoader}/u-boot.bin firmware/ ''"; description = '' - Shell commands to populate the ./boot directory. + Shell commands to populate the ./firmware directory. All files in that directory are copied to the - /boot partition on the SD image. + /boot/firmware partition on the SD image. ''; }; }; config = { fileSystems = { - "/boot" = { - device = "/dev/disk/by-label/NIXOS_BOOT"; + "/boot/firmware" = { + device = "/dev/disk/by-label/FIRMWARE"; fsType = "vfat"; + options = [ "nofail" "noauto" ]; }; "/" = { device = "/dev/disk/by-label/NIXOS_SD"; @@ -105,39 +106,39 @@ in echo "${pkgs.stdenv.buildPlatform.system}" > $out/nix-support/system echo "file sd-image $img" >> $out/nix-support/hydra-build-products - # Create the image file sized to fit /boot and /, plus 20M of slack + # Create the image file sized to fit /boot/firmware and /, plus 20M of slack rootSizeBlocks=$(du -B 512 --apparent-size ${rootfsImage} | awk '{ print $1 }') - bootSizeBlocks=$((${toString config.sdImage.bootSize} * 1024 * 1024 / 512)) - imageSize=$((rootSizeBlocks * 512 + bootSizeBlocks * 512 + 20 * 1024 * 1024)) + firmwareSizeBlocks=$((${toString config.sdImage.firmwareSize} * 1024 * 1024 / 512)) + imageSize=$((rootSizeBlocks * 512 + firmwareSizeBlocks * 512 + 20 * 1024 * 1024)) truncate -s $imageSize $img # type=b is 'W95 FAT32', type=83 is 'Linux'. sfdisk $img < Date: Sat, 1 Jun 2019 21:06:03 -0400 Subject: [PATCH 06/90] make-ext4-fs: Allows populating with custom files This will allow adding /boot files to the rootfs. --- nixos/lib/make-ext4-fs.nix | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/nixos/lib/make-ext4-fs.nix b/nixos/lib/make-ext4-fs.nix index 47c6374c81ad..932adcd97967 100644 --- a/nixos/lib/make-ext4-fs.nix +++ b/nixos/lib/make-ext4-fs.nix @@ -1,9 +1,14 @@ # Builds an ext4 image containing a populated /nix/store with the closure -# of store paths passed in the storePaths parameter. The generated image -# is sized to only fit its contents, with the expectation that a script -# resizes the filesystem at boot time. +# of store paths passed in the storePaths parameter, in addition to the +# contents of a directory that can be populated with commands. The +# generated image is sized to only fit its contents, with the expectation +# that a script resizes the filesystem at boot time. { pkgs +# List of derivations to be included , storePaths +# Shell commands to populate the ./files directory. +# All files in that directory are copied to the root of the FS. +, populateImageCommands ? "" , volumeLabel , uuid ? "44444444-4444-4444-8888-888888888888" , e2fsprogs @@ -23,13 +28,17 @@ pkgs.stdenv.mkDerivation { buildCommand = '' + ( + mkdir -p ./files + ${populateImageCommands} + ) # Add the closures of the top-level store objects. storePaths=$(cat ${sdClosureInfo}/store-paths) # Make a crude approximation of the size of the target image. # If the script starts failing, increase the fudge factors here. - numInodes=$(find $storePaths | wc -l) - numDataBlocks=$(du -c -B 4096 --apparent-size $storePaths | awk '$2 == "total" { print int($1 * 1.03) }') + numInodes=$(find $storePaths ./files | wc -l) + numDataBlocks=$(du -s -c -B 4096 --apparent-size $storePaths ./files | tail -1 | awk '{ print int($1 * 1.03) }') bytes=$((2 * 4096 * $numInodes + 4096 * $numDataBlocks)) echo "Creating an EXT4 image of $bytes bytes (numInodes=$numInodes, numDataBlocks=$numDataBlocks)" @@ -47,6 +56,12 @@ pkgs.stdenv.mkDerivation { echo "copying store paths to image..." cptofs -t ext4 -i $out $storePaths /nix/store/ + ( + echo "copying files to image..." + cd ./files + cptofs -t ext4 -i $out ./* / + ) + # I have ended up with corrupted images sometimes, I suspect that happens when the build machine's disk gets full during the build. if ! fsck.ext4 -n -f $out; then echo "--- Fsck failed for EXT4 image of $bytes bytes (numInodes=$numInodes, numDataBlocks=$numDataBlocks) ---" From 53884e1b94efe183ef6d32758a9f7ceee4aa0b19 Mon Sep 17 00:00:00 2001 From: Samuel Dionne-Riel Date: Sat, 1 Jun 2019 21:14:05 -0400 Subject: [PATCH 07/90] sd-image: Switch /boot to the ext4 partition --- .../modules/installer/cd-dvd/sd-image-aarch64.nix | 5 ++++- .../cd-dvd/sd-image-armv7l-multiplatform.nix | 5 ++++- .../installer/cd-dvd/sd-image-raspberrypi.nix | 5 ++++- nixos/modules/installer/cd-dvd/sd-image.nix | 15 +++++++++++++-- 4 files changed, 25 insertions(+), 5 deletions(-) diff --git a/nixos/modules/installer/cd-dvd/sd-image-aarch64.nix b/nixos/modules/installer/cd-dvd/sd-image-aarch64.nix index eb0bc9da4099..49008bef834d 100644 --- a/nixos/modules/installer/cd-dvd/sd-image-aarch64.nix +++ b/nixos/modules/installer/cd-dvd/sd-image-aarch64.nix @@ -46,7 +46,10 @@ in (cd ${pkgs.raspberrypifw}/share/raspberrypi/boot && cp bootcode.bin fixup*.dat start*.elf $NIX_BUILD_TOP/firmware/) cp ${pkgs.ubootRaspberryPi3_64bit}/u-boot.bin firmware/u-boot-rpi3.bin cp ${configTxt} firmware/config.txt - ${extlinux-conf-builder} -t 3 -c ${config.system.build.toplevel} -d ./firmware ''; + populateRootCommands = '' + mkdir -p ./files/boot + ${extlinux-conf-builder} -t 3 -c ${config.system.build.toplevel} -d ./files/boot + ''; }; } diff --git a/nixos/modules/installer/cd-dvd/sd-image-armv7l-multiplatform.nix b/nixos/modules/installer/cd-dvd/sd-image-armv7l-multiplatform.nix index 02587ba4af06..dab092415316 100644 --- a/nixos/modules/installer/cd-dvd/sd-image-armv7l-multiplatform.nix +++ b/nixos/modules/installer/cd-dvd/sd-image-armv7l-multiplatform.nix @@ -50,7 +50,10 @@ in cp ${pkgs.ubootRaspberryPi2}/u-boot.bin firmware/u-boot-rpi2.bin cp ${pkgs.ubootRaspberryPi3_32bit}/u-boot.bin firmware/u-boot-rpi3.bin cp ${configTxt} firmware/config.txt - ${extlinux-conf-builder} -t 3 -c ${config.system.build.toplevel} -d ./firmware ''; + populateRootCommands = '' + mkdir -p ./files/boot + ${extlinux-conf-builder} -t 3 -c ${config.system.build.toplevel} -d ./files/boot + ''; }; } diff --git a/nixos/modules/installer/cd-dvd/sd-image-raspberrypi.nix b/nixos/modules/installer/cd-dvd/sd-image-raspberrypi.nix index de3385290d28..cb78bbafecf2 100644 --- a/nixos/modules/installer/cd-dvd/sd-image-raspberrypi.nix +++ b/nixos/modules/installer/cd-dvd/sd-image-raspberrypi.nix @@ -39,7 +39,10 @@ in cp ${pkgs.ubootRaspberryPiZero}/u-boot.bin firmware/u-boot-rpi0.bin cp ${pkgs.ubootRaspberryPi}/u-boot.bin firmware/u-boot-rpi1.bin cp ${configTxt} firmware/config.txt - ${extlinux-conf-builder} -t 3 -c ${config.system.build.toplevel} -d ./firmware ''; + populateRootCommands = '' + mkdir -p ./files/boot + ${extlinux-conf-builder} -t 3 -c ${config.system.build.toplevel} -d ./files/boot + ''; }; } diff --git a/nixos/modules/installer/cd-dvd/sd-image.nix b/nixos/modules/installer/cd-dvd/sd-image.nix index 6b5bccfa2e7b..387af9373f44 100644 --- a/nixos/modules/installer/cd-dvd/sd-image.nix +++ b/nixos/modules/installer/cd-dvd/sd-image.nix @@ -14,6 +14,7 @@ with lib; let rootfsImage = pkgs.callPackage ../../../lib/make-ext4-fs.nix ({ inherit (config.sdImage) storePaths; + populateImageCommands = config.sdImage.populateRootCommands; volumeLabel = "NIXOS_SD"; } // optionalAttrs (config.sdImage.rootPartitionUUID != null) { uuid = config.sdImage.rootPartitionUUID; @@ -77,6 +78,16 @@ in /boot/firmware partition on the SD image. ''; }; + + populateRootCommands = mkOption { + example = literalExample "''\${extlinux-conf-builder} -t 3 -c \${config.system.build.toplevel} -d ./files/boot''"; + description = '' + Shell commands to populate the ./files directory. + All files in that directory are copied to the + root (/) partition on the SD image. Use this to + populate the ./files/boot (/boot) directory. + ''; + }; }; config = { @@ -117,8 +128,8 @@ in label: dos label-id: ${config.sdImage.firmwarePartitionID} - start=8M, size=$firmwareSizeBlocks, type=b, bootable - start=${toString (8 + config.sdImage.firmwareSize)}M, type=83 + start=8M, size=$firmwareSizeBlocks, type=b + start=${toString (8 + config.sdImage.firmwareSize)}M, type=83, bootable EOF # Copy the rootfs into the SD image From 8634d5700d34b7ef2cd2b25f1cd5af549c76858c Mon Sep 17 00:00:00 2001 From: Samuel Dionne-Riel Date: Sat, 1 Jun 2019 21:29:20 -0400 Subject: [PATCH 08/90] sd-image: firmware partition reduced to 20MiB --- nixos/modules/installer/cd-dvd/sd-image.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nixos/modules/installer/cd-dvd/sd-image.nix b/nixos/modules/installer/cd-dvd/sd-image.nix index 387af9373f44..ec889786de8f 100644 --- a/nixos/modules/installer/cd-dvd/sd-image.nix +++ b/nixos/modules/installer/cd-dvd/sd-image.nix @@ -64,7 +64,8 @@ in firmwareSize = mkOption { type = types.int; - default = 120; + # As of 2019-05-31 the Raspberry pi firmware + u-bot takes ~13MiB + default = 20; description = '' Size of the /boot/firmware partition, in megabytes. ''; From 1843e00146439b226d842a370da63e4a3a04d336 Mon Sep 17 00:00:00 2001 From: Samuel Dionne-Riel Date: Sat, 1 Jun 2019 22:54:52 -0400 Subject: [PATCH 09/90] sd-image: Updates comments --- nixos/modules/installer/cd-dvd/sd-image.nix | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/nixos/modules/installer/cd-dvd/sd-image.nix b/nixos/modules/installer/cd-dvd/sd-image.nix index ec889786de8f..1faa657885b9 100644 --- a/nixos/modules/installer/cd-dvd/sd-image.nix +++ b/nixos/modules/installer/cd-dvd/sd-image.nix @@ -1,8 +1,12 @@ # This module creates a bootable SD card image containing the given NixOS -# configuration. The generated image is MBR partitioned, with a FAT /boot -# partition, and ext4 root partition. The generated image is sized to fit -# its contents, and a boot script automatically resizes the root partition -# to fit the device on the first boot. +# configuration. The generated image is MBR partitioned, with a FAT +# /boot/firmware partition, and ext4 root partition. The generated image +# is sized to fit its contents, and a boot script automatically resizes +# the root partition to fit the device on the first boot. +# +# The firmware partition is built with expectation to hold the Raspberry +# Pi firmware and bootloader, and be removed and replaced with a firmware +# build for the target SoC for other board families. # # The derivation for the SD image will be placed in # config.system.build.sdImage @@ -96,6 +100,9 @@ in "/boot/firmware" = { device = "/dev/disk/by-label/FIRMWARE"; fsType = "vfat"; + # Alternatively, this could be removed from the configuration. + # The filesystem is not needed at runtime, it could be treated + # as an opaque blob instead of a discrete FAT32 filesystem. options = [ "nofail" "noauto" ]; }; "/" = { @@ -125,6 +132,8 @@ in truncate -s $imageSize $img # type=b is 'W95 FAT32', type=83 is 'Linux'. + # The "bootable" partition is where u-boot will look file for the bootloader + # information (dtbs, extlinux.conf file). sfdisk $img < Date: Tue, 4 Jun 2019 21:33:09 -0400 Subject: [PATCH 10/90] sd-image: Pull less slack in the image by accounting for slack The slack, seemingly, accounted for more than the minimum required for slack plus the two partitions. This change makes the gap a somewhat abstracted amount, but is not configurable within the derivation. --- nixos/modules/installer/cd-dvd/sd-image.nix | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/nixos/modules/installer/cd-dvd/sd-image.nix b/nixos/modules/installer/cd-dvd/sd-image.nix index 1faa657885b9..5ee594b23361 100644 --- a/nixos/modules/installer/cd-dvd/sd-image.nix +++ b/nixos/modules/installer/cd-dvd/sd-image.nix @@ -125,10 +125,13 @@ in echo "${pkgs.stdenv.buildPlatform.system}" > $out/nix-support/system echo "file sd-image $img" >> $out/nix-support/hydra-build-products - # Create the image file sized to fit /boot/firmware and /, plus 20M of slack + # Gap in front of the first partition, in MiB + gap=8 + + # Create the image file sized to fit /boot/firmware and /, plus slack for the gap. rootSizeBlocks=$(du -B 512 --apparent-size ${rootfsImage} | awk '{ print $1 }') firmwareSizeBlocks=$((${toString config.sdImage.firmwareSize} * 1024 * 1024 / 512)) - imageSize=$((rootSizeBlocks * 512 + firmwareSizeBlocks * 512 + 20 * 1024 * 1024)) + imageSize=$((rootSizeBlocks * 512 + firmwareSizeBlocks * 512 + gap * 1024 * 1024)) truncate -s $imageSize $img # type=b is 'W95 FAT32', type=83 is 'Linux'. @@ -138,8 +141,8 @@ in label: dos label-id: ${config.sdImage.firmwarePartitionID} - start=8M, size=$firmwareSizeBlocks, type=b - start=${toString (8 + config.sdImage.firmwareSize)}M, type=83, bootable + start=''${gap}M, size=$firmwareSizeBlocks, type=b + start=$((gap + ${toString config.sdImage.firmwareSize}))M, type=83, bootable EOF # Copy the rootfs into the SD image From 288118cdfa35df235b1442ca9e535711ad7bf371 Mon Sep 17 00:00:00 2001 From: Samuel Dionne-Riel Date: Sun, 16 Jun 2019 17:45:48 -0400 Subject: [PATCH 11/90] sd-image: Adds removed options for removed options This will keep configuration configuring the size of the /boot partition still build, while showing the deprecation warning. In 99.9% of cases I assume ignoring the configuration is better, as the sd-image builder already is pretty opinionated in that matter. --- nixos/modules/installer/cd-dvd/sd-image.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/nixos/modules/installer/cd-dvd/sd-image.nix b/nixos/modules/installer/cd-dvd/sd-image.nix index 5ee594b23361..0c407b199367 100644 --- a/nixos/modules/installer/cd-dvd/sd-image.nix +++ b/nixos/modules/installer/cd-dvd/sd-image.nix @@ -25,6 +25,11 @@ let }); in { + imports = [ + (mkRemovedOptionModule [ "sdImage" "bootPartitionID" ] "The FAT partition for SD image now only holds the Raspberry Pi firmware files. Use firmwarePartitionID to configure that partition's ID.") + (mkRemovedOptionModule [ "sdImage" "bootSize" ] "The boot files for SD image have been moved to the main ext4 partition. The FAT partition now only holds the Raspberry Pi firmware files. Changing its size may not be required.") + ]; + options.sdImage = { imageName = mkOption { default = "${config.sdImage.imageBaseName}-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}.img"; From c621f198a50f3816376f8447721766c0ba1bf321 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Mon, 17 Jun 2019 09:50:06 -0700 Subject: [PATCH 12/90] python37Packages.cassandra-driver: 3.17.1 -> 3.18.0 Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools. This update was made based on information from https://repology.org/metapackage/python3.7-cassandra-driver/versions --- pkgs/development/python-modules/cassandra-driver/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/cassandra-driver/default.nix b/pkgs/development/python-modules/cassandra-driver/default.nix index dbf5a8686cd9..e9af9876f5e4 100644 --- a/pkgs/development/python-modules/cassandra-driver/default.nix +++ b/pkgs/development/python-modules/cassandra-driver/default.nix @@ -21,11 +21,11 @@ buildPythonPackage rec { pname = "cassandra-driver"; - version = "3.17.1"; + version = "3.18.0"; src = fetchPypi { inherit pname version; - sha256 = "1y6pnm7vzg9ip1nbly3i8mmwqmcy8g38ix74vdzvvaxwxil9bmvi"; + sha256 = "1w9a7fdl626m977cjj9zclh4a0mr3s4q9jpwm1fsmpi7v3gbribi"; }; buildInputs = [ From a97986a4816a59ff4d26bec6813d8c5778c7dfa3 Mon Sep 17 00:00:00 2001 From: Marek Fajkus Date: Sun, 9 Jun 2019 16:25:00 +0200 Subject: [PATCH 13/90] elmPackages.{elm-test,elm-analyse..}: tooling additions and fixes Extends the number of available tools for Elm language. 1. fix and move "elm-test" Previously located in nodePackages.elm-test but broken (see binwrap info). Now fixed and located in elmPackages.elm-test 2. add "elm-verify-examples" Generate tests from documentation examples 3. add "elm-upgrade" upgrade assistant using statical analysis 4. add "elm-analyse" static analysis for elm code (linter) 5. move "elm-doc-preview" originally located in nodePackages.elm-upgrade - moved for consistency 6. add "elmi-to-json" transforms elmi files to json - used by other tools like elm-test and elm-verify-examples Node.js based dependencies are defined the same way as nodePackages contaparts but are independent (has it's own packages.json) patch-binwrap.nix is used to as a replacement for binwrap package used by some nodejs dependencies that depends on Haskell binaries (elm-test and elm-verify-examples). BREAKING CHANGE =============== elm-doc-preview (as well as broken elm-test) is now commented in `node-packages-v10.json` and should be removed once new nix-expressions for node10 are generated (out of scope of this PR) There are still 2 outstanding elm related packages in nodePackages 1. elm-oracle - legacy package which is not compatible with elm 0.19 2. elm-live - should be moved in the future I think --- maintainers/maintainer-list.nix | 5 + pkgs/development/compilers/elm/default.nix | 30 +- .../compilers/elm/packages/README.md | 25 + .../compilers/elm/packages/elmi-to-json.nix | 27 + .../elm/packages/generate-node-packages.sh | 7 + .../elm/packages/node-composition.nix | 17 + .../compilers/elm/packages/node-env.nix | 542 ++ .../compilers/elm/packages/node-packages.json | 7 + .../compilers/elm/packages/node-packages.nix | 5422 +++++++++++++++++ .../compilers/elm/packages/patch-binwrap.nix | 30 + .../node-packages/node-packages-v10.json | 2 - 11 files changed, 6108 insertions(+), 6 deletions(-) create mode 100644 pkgs/development/compilers/elm/packages/README.md create mode 100644 pkgs/development/compilers/elm/packages/elmi-to-json.nix create mode 100755 pkgs/development/compilers/elm/packages/generate-node-packages.sh create mode 100644 pkgs/development/compilers/elm/packages/node-composition.nix create mode 100644 pkgs/development/compilers/elm/packages/node-env.nix create mode 100644 pkgs/development/compilers/elm/packages/node-packages.json create mode 100644 pkgs/development/compilers/elm/packages/node-packages.nix create mode 100644 pkgs/development/compilers/elm/packages/patch-binwrap.nix diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index d9508ed7337e..4cb46edf5ee3 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -5737,4 +5737,9 @@ github = "zzamboni"; name = "Diego Zamboni"; }; + turbomack = { + email = "marek.faj@gmail.com"; + github = "turboMaCk"; + name = "Marek Fajkus"; + }; } diff --git a/pkgs/development/compilers/elm/default.nix b/pkgs/development/compilers/elm/default.nix index cd91ea6478db..9b1252e4284d 100644 --- a/pkgs/development/compilers/elm/default.nix +++ b/pkgs/development/compilers/elm/default.nix @@ -1,14 +1,23 @@ { lib, stdenv , haskell, nodejs -, fetchurl, fetchpatch, makeWrapper }: - +, fetchurl, fetchpatch, makeWrapper, writeScriptBin }: let fetchElmDeps = import ./fetchElmDeps.nix { inherit stdenv lib fetchurl; }; + + patchBinwrap = import ./packages/patch-binwrap.nix { inherit lib writeScriptBin stdenv; }; + + elmNodePackages = + import ./packages/node-composition.nix { + inherit nodejs; + inherit (stdenv.hostPlatform) system; + }; + hsPkgs = haskell.packages.ghc864.override { overrides = self: super: with haskell.lib; - let elmPkgs = { + let elmPkgs = rec { elm = overrideCabal (self.callPackage ./packages/elm.nix { }) (drv: { # sadly with parallelism most of the time breaks compilation + # also compilation is slower with increasing number of cores anyway (Tested on Ryzen 7 and i7) enableParallelBuilding = false; preConfigure = self.fetchElmDeps { elmPackages = (import ./packages/elm-srcs.nix); @@ -30,12 +39,25 @@ let /* The elm-format expression is updated via a script in the https://github.com/avh4/elm-format repo: - `pacakge/nix/build.sh` + `package/nix/build.sh` */ elm-format = justStaticExecutables (doJailbreak (self.callPackage ./packages/elm-format.nix {})); + elmi-to-json = justStaticExecutables (self.callPackage ./packages/elmi-to-json.nix {}); + inherit fetchElmDeps; elmVersion = elmPkgs.elm.version; + + /* + Node/NPM based dependecies can be upgraded using script + `packages/generate-node-packages.sh`. + Packages which rely on `bin-wrap` will fail by default + and can be patched using `patchBinwrap` function defined in `packages/patch-binwrap.nix`. + */ + elm-test = patchBinwrap [elmi-to-json] elmNodePackages.elm-test; + elm-verify-examples = patchBinwrap [elmi-to-json] elmNodePackages.elm-verify-examples; + elm-analyse = elmNodePackages."elm-analyse-0.16.3"; + inherit (elmNodePackages) elm-doc-preview elm-upgrade; }; in elmPkgs // { inherit elmPkgs; diff --git a/pkgs/development/compilers/elm/packages/README.md b/pkgs/development/compilers/elm/packages/README.md new file mode 100644 index 000000000000..5b21736afc00 --- /dev/null +++ b/pkgs/development/compilers/elm/packages/README.md @@ -0,0 +1,25 @@ +# Elm packages + +Mixtures of useful Elm lang tooling containing both Haskell and Node.js based utilities. + +## Upgrades + +Haskell parts of the ecosystem are using [cabal2nix](https://github.com/NixOS/cabal2nix). +Please refer to [nix documentation](https://nixos.org/nixpkgs/manual/#how-to-create-nix-builds-for-your-own-private-haskell-packages) +and [cabal2nix readme](https://github.com/NixOS/cabal2nix#readme) for more information. Elm-format [update scripts](https://github.com/avh4/elm-format/tree/master/package/nix) +is part of its repository. + +Node dependencies are defined in [node-packages.json](node-packages.json). +[Node2nix](https://github.com/svanderburg/node2nix) is used for generating nix expression +from this file. Use [generate-node-packages.sh](generate-node-packages.sh) for updates of nix expressions. + +## Binwrap Patch + +Some node packages might use [binwrap](https://github.com/avh4/binwrap) typically for installing +[elmi-to-json](https://github.com/stoeffel/elmi-to-json). Binwrap is not compatible with nix. +To overcome issues with those packages apply [patch-binwrap.nix](patch-binwrap.nix) which essentially does 2 things. + +1. It replaces binwrap scripts with noop shell scripts +2. It uses nix for installing the binaries to expected location in `node_modules` + +Example usage be found in `elm/default.nix`. diff --git a/pkgs/development/compilers/elm/packages/elmi-to-json.nix b/pkgs/development/compilers/elm/packages/elmi-to-json.nix new file mode 100644 index 000000000000..f6a0b9e24263 --- /dev/null +++ b/pkgs/development/compilers/elm/packages/elmi-to-json.nix @@ -0,0 +1,27 @@ +{ mkDerivation, aeson, async, base, binary, bytestring, containers +, directory, filepath, hpack, optparse-applicative, safe-exceptions +, stdenv, text, fetchgit +}: +mkDerivation { + pname = "elmi-to-json"; + version = "0.19.4"; + src = fetchgit { + url = "https://github.com/stoeffel/elmi-to-json.git"; + rev = "357ad96f05e4c68023b036f27f6f65c4377c7427"; + sha256 = "0vj9fdqgg2zd1nxpll6v02fk6bcyhx00xhp3s8sd7ycvirwsim9n"; + }; + isLibrary = true; + isExecutable = true; + libraryHaskellDepends = [ + aeson async base binary bytestring containers directory filepath + optparse-applicative safe-exceptions text + ]; + libraryToolDepends = [ hpack ]; + executableHaskellDepends = [ base ]; + testHaskellDepends = [ base ]; + preConfigure = "hpack"; + homepage = "https://github.com/stoeffel/elmi-to-json#readme"; + description = "Translates elmi binary files to JSON representation"; + license = stdenv.lib.licenses.bsd3; + maintainers = with stdenv.lib.maintainers; [ turbomack ]; +} diff --git a/pkgs/development/compilers/elm/packages/generate-node-packages.sh b/pkgs/development/compilers/elm/packages/generate-node-packages.sh new file mode 100755 index 000000000000..0e1835c6ffaa --- /dev/null +++ b/pkgs/development/compilers/elm/packages/generate-node-packages.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env nix-shell +#! nix-shell -i bash -p nodePackages.node2nix + +set -eu -o pipefail + +rm -f node-env.nix +node2nix --nodejs-10 -i node-packages.json -o node-packages.nix -c node-composition.nix diff --git a/pkgs/development/compilers/elm/packages/node-composition.nix b/pkgs/development/compilers/elm/packages/node-composition.nix new file mode 100644 index 000000000000..1039eb51fe27 --- /dev/null +++ b/pkgs/development/compilers/elm/packages/node-composition.nix @@ -0,0 +1,17 @@ +# This file has been generated by node2nix 1.6.0. Do not edit! + +{pkgs ? import { + inherit system; + }, system ? builtins.currentSystem, nodejs ? pkgs."nodejs-10_x"}: + +let + nodeEnv = import ./node-env.nix { + inherit (pkgs) stdenv python2 utillinux runCommand writeTextFile; + inherit nodejs; + libtool = if pkgs.stdenv.isDarwin then pkgs.darwin.cctools else null; + }; +in +import ./node-packages.nix { + inherit (pkgs) fetchurl fetchgit; + inherit nodeEnv; +} \ No newline at end of file diff --git a/pkgs/development/compilers/elm/packages/node-env.nix b/pkgs/development/compilers/elm/packages/node-env.nix new file mode 100644 index 000000000000..720e0cc08503 --- /dev/null +++ b/pkgs/development/compilers/elm/packages/node-env.nix @@ -0,0 +1,542 @@ +# This file originates from node2nix + +{stdenv, nodejs, python2, utillinux, libtool, runCommand, writeTextFile}: + +let + python = if nodejs ? python then nodejs.python else python2; + + # Create a tar wrapper that filters all the 'Ignoring unknown extended header keyword' noise + tarWrapper = runCommand "tarWrapper" {} '' + mkdir -p $out/bin + + cat > $out/bin/tar <> $out/nix-support/hydra-build-products + ''; + }; + + includeDependencies = {dependencies}: + stdenv.lib.optionalString (dependencies != []) + (stdenv.lib.concatMapStrings (dependency: + '' + # Bundle the dependencies of the package + mkdir -p node_modules + cd node_modules + + # Only include dependencies if they don't exist. They may also be bundled in the package. + if [ ! -e "${dependency.name}" ] + then + ${composePackage dependency} + fi + + cd .. + '' + ) dependencies); + + # Recursively composes the dependencies of a package + composePackage = { name, packageName, src, dependencies ? [], ... }@args: + '' + DIR=$(pwd) + cd $TMPDIR + + unpackFile ${src} + + # Make the base dir in which the target dependency resides first + mkdir -p "$(dirname "$DIR/${packageName}")" + + if [ -f "${src}" ] + then + # Figure out what directory has been unpacked + packageDir="$(find . -maxdepth 1 -type d | tail -1)" + + # Restore write permissions to make building work + find "$packageDir" -type d -print0 | xargs -0 chmod u+x + chmod -R u+w "$packageDir" + + # Move the extracted tarball into the output folder + mv "$packageDir" "$DIR/${packageName}" + elif [ -d "${src}" ] + then + # Get a stripped name (without hash) of the source directory. + # On old nixpkgs it's already set internally. + if [ -z "$strippedName" ] + then + strippedName="$(stripHash ${src})" + fi + + # Restore write permissions to make building work + chmod -R u+w "$strippedName" + + # Move the extracted directory into the output folder + mv "$strippedName" "$DIR/${packageName}" + fi + + # Unset the stripped name to not confuse the next unpack step + unset strippedName + + # Include the dependencies of the package + cd "$DIR/${packageName}" + ${includeDependencies { inherit dependencies; }} + cd .. + ${stdenv.lib.optionalString (builtins.substring 0 1 packageName == "@") "cd .."} + ''; + + pinpointDependencies = {dependencies, production}: + let + pinpointDependenciesFromPackageJSON = writeTextFile { + name = "pinpointDependencies.js"; + text = '' + var fs = require('fs'); + var path = require('path'); + + function resolveDependencyVersion(location, name) { + if(location == process.env['NIX_STORE']) { + return null; + } else { + var dependencyPackageJSON = path.join(location, "node_modules", name, "package.json"); + + if(fs.existsSync(dependencyPackageJSON)) { + var dependencyPackageObj = JSON.parse(fs.readFileSync(dependencyPackageJSON)); + + if(dependencyPackageObj.name == name) { + return dependencyPackageObj.version; + } + } else { + return resolveDependencyVersion(path.resolve(location, ".."), name); + } + } + } + + function replaceDependencies(dependencies) { + if(typeof dependencies == "object" && dependencies !== null) { + for(var dependency in dependencies) { + var resolvedVersion = resolveDependencyVersion(process.cwd(), dependency); + + if(resolvedVersion === null) { + process.stderr.write("WARNING: cannot pinpoint dependency: "+dependency+", context: "+process.cwd()+"\n"); + } else { + dependencies[dependency] = resolvedVersion; + } + } + } + } + + /* Read the package.json configuration */ + var packageObj = JSON.parse(fs.readFileSync('./package.json')); + + /* Pinpoint all dependencies */ + replaceDependencies(packageObj.dependencies); + if(process.argv[2] == "development") { + replaceDependencies(packageObj.devDependencies); + } + replaceDependencies(packageObj.optionalDependencies); + + /* Write the fixed package.json file */ + fs.writeFileSync("package.json", JSON.stringify(packageObj, null, 2)); + ''; + }; + in + '' + node ${pinpointDependenciesFromPackageJSON} ${if production then "production" else "development"} + + ${stdenv.lib.optionalString (dependencies != []) + '' + if [ -d node_modules ] + then + cd node_modules + ${stdenv.lib.concatMapStrings (dependency: pinpointDependenciesOfPackage dependency) dependencies} + cd .. + fi + ''} + ''; + + # Recursively traverses all dependencies of a package and pinpoints all + # dependencies in the package.json file to the versions that are actually + # being used. + + pinpointDependenciesOfPackage = { packageName, dependencies ? [], production ? true, ... }@args: + '' + if [ -d "${packageName}" ] + then + cd "${packageName}" + ${pinpointDependencies { inherit dependencies production; }} + cd .. + ${stdenv.lib.optionalString (builtins.substring 0 1 packageName == "@") "cd .."} + fi + ''; + + # Extract the Node.js source code which is used to compile packages with + # native bindings + nodeSources = runCommand "node-sources" {} '' + tar --no-same-owner --no-same-permissions -xf ${nodejs.src} + mv node-* $out + ''; + + # Script that adds _integrity fields to all package.json files to prevent NPM from consulting the cache (that is empty) + addIntegrityFieldsScript = writeTextFile { + name = "addintegrityfields.js"; + text = '' + var fs = require('fs'); + var path = require('path'); + + function augmentDependencies(baseDir, dependencies) { + for(var dependencyName in dependencies) { + var dependency = dependencies[dependencyName]; + + // Open package.json and augment metadata fields + var packageJSONDir = path.join(baseDir, "node_modules", dependencyName); + var packageJSONPath = path.join(packageJSONDir, "package.json"); + + if(fs.existsSync(packageJSONPath)) { // Only augment packages that exist. Sometimes we may have production installs in which development dependencies can be ignored + console.log("Adding metadata fields to: "+packageJSONPath); + var packageObj = JSON.parse(fs.readFileSync(packageJSONPath)); + + if(dependency.integrity) { + packageObj["_integrity"] = dependency.integrity; + } else { + packageObj["_integrity"] = "sha1-000000000000000000000000000="; // When no _integrity string has been provided (e.g. by Git dependencies), add a dummy one. It does not seem to harm and it bypasses downloads. + } + + packageObj["_resolved"] = dependency.version; // Set the resolved version to the version identifier. This prevents NPM from cloning Git repositories. + fs.writeFileSync(packageJSONPath, JSON.stringify(packageObj, null, 2)); + } + + // Augment transitive dependencies + if(dependency.dependencies !== undefined) { + augmentDependencies(packageJSONDir, dependency.dependencies); + } + } + } + + if(fs.existsSync("./package-lock.json")) { + var packageLock = JSON.parse(fs.readFileSync("./package-lock.json")); + + if(packageLock.lockfileVersion !== 1) { + process.stderr.write("Sorry, I only understand lock file version 1!\n"); + process.exit(1); + } + + if(packageLock.dependencies !== undefined) { + augmentDependencies(".", packageLock.dependencies); + } + } + ''; + }; + + # Reconstructs a package-lock file from the node_modules/ folder structure and package.json files with dummy sha1 hashes + reconstructPackageLock = writeTextFile { + name = "addintegrityfields.js"; + text = '' + var fs = require('fs'); + var path = require('path'); + + var packageObj = JSON.parse(fs.readFileSync("package.json")); + + var lockObj = { + name: packageObj.name, + version: packageObj.version, + lockfileVersion: 1, + requires: true, + dependencies: {} + }; + + function augmentPackageJSON(filePath, dependencies) { + var packageJSON = path.join(filePath, "package.json"); + if(fs.existsSync(packageJSON)) { + var packageObj = JSON.parse(fs.readFileSync(packageJSON)); + dependencies[packageObj.name] = { + version: packageObj.version, + integrity: "sha1-000000000000000000000000000=", + dependencies: {} + }; + processDependencies(path.join(filePath, "node_modules"), dependencies[packageObj.name].dependencies); + } + } + + function processDependencies(dir, dependencies) { + if(fs.existsSync(dir)) { + var files = fs.readdirSync(dir); + + files.forEach(function(entry) { + var filePath = path.join(dir, entry); + var stats = fs.statSync(filePath); + + if(stats.isDirectory()) { + if(entry.substr(0, 1) == "@") { + // When we encounter a namespace folder, augment all packages belonging to the scope + var pkgFiles = fs.readdirSync(filePath); + + pkgFiles.forEach(function(entry) { + if(stats.isDirectory()) { + var pkgFilePath = path.join(filePath, entry); + augmentPackageJSON(pkgFilePath, dependencies); + } + }); + } else { + augmentPackageJSON(filePath, dependencies); + } + } + }); + } + } + + processDependencies("node_modules", lockObj.dependencies); + + fs.writeFileSync("package-lock.json", JSON.stringify(lockObj, null, 2)); + ''; + }; + + # Builds and composes an NPM package including all its dependencies + buildNodePackage = + { name + , packageName + , version + , dependencies ? [] + , buildInputs ? [] + , production ? true + , npmFlags ? "" + , dontNpmInstall ? false + , bypassCache ? false + , preRebuild ? "" + , dontStrip ? true + , unpackPhase ? "true" + , buildPhase ? "true" + , ... }@args: + + let + forceOfflineFlag = if bypassCache then "--offline" else "--registry http://www.example.com"; + extraArgs = removeAttrs args [ "name" "dependencies" "buildInputs" "dontStrip" "dontNpmInstall" "preRebuild" "unpackPhase" "buildPhase" ]; + in + stdenv.mkDerivation ({ + name = "node-${name}-${version}"; + buildInputs = [ tarWrapper python nodejs ] + ++ stdenv.lib.optional (stdenv.isLinux) utillinux + ++ stdenv.lib.optional (stdenv.isDarwin) libtool + ++ buildInputs; + + inherit dontStrip; # Stripping may fail a build for some package deployments + inherit dontNpmInstall preRebuild unpackPhase buildPhase; + + compositionScript = composePackage args; + pinpointDependenciesScript = pinpointDependenciesOfPackage args; + + passAsFile = [ "compositionScript" "pinpointDependenciesScript" ]; + + installPhase = '' + # Create and enter a root node_modules/ folder + mkdir -p $out/lib/node_modules + cd $out/lib/node_modules + + # Compose the package and all its dependencies + source $compositionScriptPath + + # Pinpoint the versions of all dependencies to the ones that are actually being used + echo "pinpointing versions of dependencies..." + source $pinpointDependenciesScriptPath + + # Patch the shebangs of the bundled modules to prevent them from + # calling executables outside the Nix store as much as possible + patchShebangs . + + # Deploy the Node.js package by running npm install. Since the + # dependencies have been provided already by ourselves, it should not + # attempt to install them again, which is good, because we want to make + # it Nix's responsibility. If it needs to install any dependencies + # anyway (e.g. because the dependency parameters are + # incomplete/incorrect), it fails. + # + # The other responsibilities of NPM are kept -- version checks, build + # steps, postprocessing etc. + + export HOME=$TMPDIR + cd "${packageName}" + runHook preRebuild + + ${stdenv.lib.optionalString bypassCache '' + if [ ! -f package-lock.json ] + then + echo "No package-lock.json file found, reconstructing..." + node ${reconstructPackageLock} + fi + + node ${addIntegrityFieldsScript} + ''} + + npm ${forceOfflineFlag} --nodedir=${nodeSources} ${npmFlags} ${stdenv.lib.optionalString production "--production"} rebuild + + if [ "$dontNpmInstall" != "1" ] + then + # NPM tries to download packages even when they already exist if npm-shrinkwrap is used. + rm -f npm-shrinkwrap.json + + npm ${forceOfflineFlag} --nodedir=${nodeSources} ${npmFlags} ${stdenv.lib.optionalString production "--production"} install + fi + + # Create symlink to the deployed executable folder, if applicable + if [ -d "$out/lib/node_modules/.bin" ] + then + ln -s $out/lib/node_modules/.bin $out/bin + fi + + # Create symlinks to the deployed manual page folders, if applicable + if [ -d "$out/lib/node_modules/${packageName}/man" ] + then + mkdir -p $out/share + for dir in "$out/lib/node_modules/${packageName}/man/"* + do + mkdir -p $out/share/man/$(basename "$dir") + for page in "$dir"/* + do + ln -s $page $out/share/man/$(basename "$dir") + done + done + fi + + # Run post install hook, if provided + runHook postInstall + ''; + } // extraArgs); + + # Builds a development shell + buildNodeShell = + { name + , packageName + , version + , src + , dependencies ? [] + , buildInputs ? [] + , production ? true + , npmFlags ? "" + , dontNpmInstall ? false + , bypassCache ? false + , dontStrip ? true + , unpackPhase ? "true" + , buildPhase ? "true" + , ... }@args: + + let + forceOfflineFlag = if bypassCache then "--offline" else "--registry http://www.example.com"; + + extraArgs = removeAttrs args [ "name" "dependencies" "buildInputs" ]; + + nodeDependencies = stdenv.mkDerivation ({ + name = "node-dependencies-${name}-${version}"; + + buildInputs = [ tarWrapper python nodejs ] + ++ stdenv.lib.optional (stdenv.isLinux) utillinux + ++ stdenv.lib.optional (stdenv.isDarwin) libtool + ++ buildInputs; + + inherit dontStrip; # Stripping may fail a build for some package deployments + inherit dontNpmInstall unpackPhase buildPhase; + + includeScript = includeDependencies { inherit dependencies; }; + pinpointDependenciesScript = pinpointDependenciesOfPackage args; + + passAsFile = [ "includeScript" "pinpointDependenciesScript" ]; + + installPhase = '' + mkdir -p $out/${packageName} + cd $out/${packageName} + + source $includeScriptPath + + # Create fake package.json to make the npm commands work properly + cp ${src}/package.json . + chmod 644 package.json + ${stdenv.lib.optionalString bypassCache '' + if [ -f ${src}/package-lock.json ] + then + cp ${src}/package-lock.json . + fi + ''} + + # Pinpoint the versions of all dependencies to the ones that are actually being used + echo "pinpointing versions of dependencies..." + cd .. + ${stdenv.lib.optionalString (builtins.substring 0 1 packageName == "@") "cd .."} + + source $pinpointDependenciesScriptPath + cd ${packageName} + + # Patch the shebangs of the bundled modules to prevent them from + # calling executables outside the Nix store as much as possible + patchShebangs . + + export HOME=$PWD + + ${stdenv.lib.optionalString bypassCache '' + if [ ! -f package-lock.json ] + then + echo "No package-lock.json file found, reconstructing..." + node ${reconstructPackageLock} + fi + + node ${addIntegrityFieldsScript} + ''} + + npm ${forceOfflineFlag} --nodedir=${nodeSources} ${npmFlags} ${stdenv.lib.optionalString production "--production"} rebuild + + ${stdenv.lib.optionalString (!dontNpmInstall) '' + # NPM tries to download packages even when they already exist if npm-shrinkwrap is used. + rm -f npm-shrinkwrap.json + + npm ${forceOfflineFlag} --nodedir=${nodeSources} ${npmFlags} ${stdenv.lib.optionalString production "--production"} install + ''} + + cd .. + ${stdenv.lib.optionalString (builtins.substring 0 1 packageName == "@") "cd .."} + + mv ${packageName} lib + ln -s $out/lib/node_modules/.bin $out/bin + ''; + } // extraArgs); + in + stdenv.mkDerivation { + name = "node-shell-${name}-${version}"; + + buildInputs = [ python nodejs ] ++ stdenv.lib.optional (stdenv.isLinux) utillinux ++ buildInputs; + buildCommand = '' + mkdir -p $out/bin + cat > $out/bin/shell < Date: Tue, 18 Jun 2019 23:34:14 +0000 Subject: [PATCH 14/90] linux_5_0: remove EOLed upstream. --- pkgs/os-specific/linux/kernel/linux-5.0.nix | 18 ------------------ pkgs/top-level/all-packages.nix | 9 --------- 2 files changed, 27 deletions(-) delete mode 100644 pkgs/os-specific/linux/kernel/linux-5.0.nix diff --git a/pkgs/os-specific/linux/kernel/linux-5.0.nix b/pkgs/os-specific/linux/kernel/linux-5.0.nix deleted file mode 100644 index f195b1e15c89..000000000000 --- a/pkgs/os-specific/linux/kernel/linux-5.0.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ stdenv, buildPackages, fetchurl, perl, buildLinux, modDirVersionArg ? null, ... } @ args: - -with stdenv.lib; - -buildLinux (args // rec { - version = "5.0.21"; - - # modDirVersion needs to be x.y.z, will automatically add .0 if needed - modDirVersion = if (modDirVersionArg == null) then concatStrings (intersperse "." (take 3 (splitString "." "${version}.0"))) else modDirVersionArg; - - # branchVersion needs to be x.y - extraMeta.branch = concatStrings (intersperse "." (take 2 (splitString "." version))); - - src = fetchurl { - url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz"; - sha256 = "1my2m9hvnvdrvzcg0fgqgaga59y2cd5zlpv7xrfj2nn98sjhglwq"; - }; -} // (args.argsOverride or {})) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 09a2f6c391db..9b71e30b3de0 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -15313,14 +15313,6 @@ in ]; }; - linux_5_0 = callPackage ../os-specific/linux/kernel/linux-5.0.nix { - kernelPatches = - [ kernelPatches.bridge_stp_helper - kernelPatches.modinst_arg_list_too_long - kernelPatches.export_kernel_fpu_functions - ]; - }; - linux_5_1 = callPackage ../os-specific/linux/kernel/linux-5.1.nix { kernelPatches = [ kernelPatches.bridge_stp_helper @@ -15530,7 +15522,6 @@ in linuxPackages_4_9 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_4_9); linuxPackages_4_14 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_4_14); linuxPackages_4_19 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_4_19); - linuxPackages_5_0 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_5_0); linuxPackages_5_1 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_5_1); # When adding to this list: From bf36d566fc735200af6275552214e1ef98809ecd Mon Sep 17 00:00:00 2001 From: Sarunas Valaskevicius Date: Fri, 1 Feb 2019 18:50:00 +0000 Subject: [PATCH 15/90] electron: fix electron crash when using file chooser dialog --- pkgs/development/tools/electron/default.nix | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/pkgs/development/tools/electron/default.nix b/pkgs/development/tools/electron/default.nix index 5a00a883f512..c45c41fc89cd 100644 --- a/pkgs/development/tools/electron/default.nix +++ b/pkgs/development/tools/electron/default.nix @@ -1,4 +1,4 @@ -{ stdenv, libXScrnSaver, makeWrapper, fetchurl, unzip, atomEnv, libuuid, at-spi2-atk }: +{ stdenv, libXScrnSaver, makeWrapper, fetchurl, wrapGAppsHook, gtk3, unzip, atomEnv, libuuid, at-spi2-atk }: let version = "4.0.0"; @@ -36,7 +36,15 @@ let }; }.${stdenv.hostPlatform.system} or throwSystem; - buildInputs = [ unzip makeWrapper ]; + buildInputs = [ gtk3 ]; + + nativeBuildInputs = [ + unzip + makeWrapper + wrapGAppsHook + ]; + + dontWrapGApps = true; # electron is in lib, we need to wrap it manually buildCommand = '' mkdir -p $out/lib/electron $out/bin @@ -51,7 +59,8 @@ let $out/lib/electron/electron wrapProgram $out/lib/electron/electron \ - --prefix LD_PRELOAD : ${stdenv.lib.makeLibraryPath [ libXScrnSaver ]}/libXss.so.1 + --prefix LD_PRELOAD : ${stdenv.lib.makeLibraryPath [ libXScrnSaver ]}/libXss.so.1 \ + "''${gappsWrapperArgs[@]}" ''; }; From cd24ce1c0fab8f2b7a6419e19690e85eee739b1d Mon Sep 17 00:00:00 2001 From: Robert Scott Date: Fri, 21 Jun 2019 00:08:13 +0100 Subject: [PATCH 16/90] samba: 4.10.4 -> 4.10.5 Security release fixing CVE-2019-12435 & CVE-2019-12436 --- pkgs/servers/samba/4.x.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/samba/4.x.nix b/pkgs/servers/samba/4.x.nix index dbda33a1f196..4a6ef57bba77 100644 --- a/pkgs/servers/samba/4.x.nix +++ b/pkgs/servers/samba/4.x.nix @@ -20,11 +20,11 @@ with lib; stdenv.mkDerivation rec { name = "samba-${version}"; - version = "4.10.4"; + version = "4.10.5"; src = fetchurl { url = "mirror://samba/pub/samba/stable/${name}.tar.gz"; - sha256 = "0xhfbh42dihccc85ffx243lyhf3jnphhi6xfcsr3a6mhsm7w1p26"; + sha256 = "0xb3mz38hcayqxchk0ws9mxn10vswsn97jbxl4gcwi4cbrnjc43c"; }; outputs = [ "out" "dev" "man" ]; From bc109b19c9a503948e0f88272224422c456ed5b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Romildo=20Malaquias?= Date: Thu, 20 Jun 2019 20:28:45 -0300 Subject: [PATCH 17/90] wxGTK31: 3.1.0 -> 3.1.2; use its own derivation --- .../libraries/wxwidgets/3.1/default.nix | 102 +++++++++++++++--- pkgs/top-level/all-packages.nix | 6 +- 2 files changed, 95 insertions(+), 13 deletions(-) diff --git a/pkgs/development/libraries/wxwidgets/3.1/default.nix b/pkgs/development/libraries/wxwidgets/3.1/default.nix index 4b410a307bb4..76d9939f73ae 100644 --- a/pkgs/development/libraries/wxwidgets/3.1/default.nix +++ b/pkgs/development/libraries/wxwidgets/3.1/default.nix @@ -1,16 +1,94 @@ -{ stdenv, fetchFromGitHub -, wxGTK30 +{ stdenv, fetchFromGitHub, fetchurl, pkgconfig +, gtk2, gtk3, libXinerama, libSM, libXxf86vm +, xorgproto, gstreamer, gst-plugins-base, GConf, setfile +, libGLSupported +, withMesa ? libGLSupported, libGLU ? null, libGL ? null +, compat28 ? false, compat30 ? true, unicode ? true +, withGtk2 ? true +, withWebKit ? false, webkitgtk24x-gtk2 ? null, webkitgtk ? null +, AGL ? null, Carbon ? null, Cocoa ? null, Kernel ? null, QTKit ? null }: + +assert withMesa -> libGLU != null && libGL != null; +assert withWebKit -> (if withGtk2 then webkitgtk24x-gtk2 else webkitgtk) != null; + with stdenv.lib; -wxGTK30.overrideAttrs (oldAttrs : rec { - name = "wxwidgets-${version}"; - version = "3.1.0"; - src = fetchFromGitHub { - owner = "wxWidgets"; - repo = "wxWidgets"; - rev = "v${version}"; - sha256 = "14kl1rsngm70v3mbyv1mal15iz2b18k97avjx8jn7s81znha1c7f"; - }; -}) \ No newline at end of file +stdenv.mkDerivation rec { + version = "3.1.2"; + name = "wxwidgets-${version}"; + + src = fetchFromGitHub { + owner = "wxWidgets"; + repo = "wxWidgets"; + rev = "v${version}"; + sha256 = "0gfdhb7xq5vzasm7s1di39nchv42zsp0dmn4v6knzb7mgsb107wb"; + }; + + buildInputs = + [ (if withGtk2 then gtk2 else gtk3) libXinerama libSM libXxf86vm xorgproto gstreamer + gst-plugins-base GConf ] + ++ optional withMesa libGLU + ++ optional withWebKit (if withGtk2 then webkitgtk24x-gtk2 else webkitgtk) + ++ optionals stdenv.isDarwin [ setfile Carbon Cocoa Kernel QTKit ]; + + nativeBuildInputs = [ pkgconfig ]; + + propagatedBuildInputs = optional stdenv.isDarwin AGL; + + patches = [ + (fetchurl { # https://trac.wxwidgets.org/ticket/17942 + url = "https://trac.wxwidgets.org/raw-attachment/ticket/17942/" + + "fix_assertion_using_hide_in_destroy.diff"; + sha256 = "009y3dav79wiig789vkkc07g1qdqprg1544lih79199kb1h64lvy"; + }) + ]; + + configureFlags = + [ "--disable-precomp-headers" "--enable-mediactrl" + (if compat28 then "--enable-compat28" else "--disable-compat28") + (if compat30 then "--enable-compat30" else "--disable-compat30") ] + ++ optional unicode "--enable-unicode" + ++ optional withMesa "--with-opengl" + ++ optionals stdenv.isDarwin + # allow building on 64-bit + [ "--with-cocoa" "--enable-universal-binaries" "--with-macosx-version-min=10.7" ] + ++ optionals withWebKit + ["--enable-webview" "--enable-webviewwebkit"]; + + SEARCH_LIB = "${libGLU.out}/lib ${libGL.out}/lib "; + + preConfigure = " + substituteInPlace configure --replace 'SEARCH_INCLUDE=' 'DUMMY_SEARCH_INCLUDE=' + substituteInPlace configure --replace 'SEARCH_LIB=' 'DUMMY_SEARCH_LIB=' + substituteInPlace configure --replace /usr /no-such-path + " + optionalString stdenv.isDarwin '' + substituteInPlace configure --replace \ + 'ac_cv_prog_SETFILE="/Developer/Tools/SetFile"' \ + 'ac_cv_prog_SETFILE="${setfile}/bin/SetFile"' + substituteInPlace configure --replace \ + "-framework System" \ + -lSystem + ''; + + postInstall = " + (cd $out/include && ln -s wx-*/* .) + "; + + passthru = { + inherit compat24 compat26 unicode; + gtk = if withGtk2 then gtk2 else gtk3; + }; + + enableParallelBuilding = true; + + meta = { + platforms = with platforms; darwin ++ linux; + license = licenses.wxWindows; + homepage = https://www.wxwidgets.org/; + description = "a C++ library that lets developers create applications for Windows, macOS, Linux and other platforms with a single code base"; + longDescription = "wxWidgets gives you a single, easy-to-use API for writing GUI applications on multiple platforms that still utilize the native platform's controls and utilities. Link with the appropriate library for your platform and compiler, and your application will adopt the look and feel appropriate to that platform. On top of great GUI functionality, wxWidgets gives you: online help, network programming, streams, clipboard and drag and drop, multithreading, image loading and saving in a variety of popular formats, database support, HTML viewing and printing, and much more."; + badPlatforms = [ "x86_64-darwin" ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f90aa516e563..2217715c52c7 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -13697,7 +13697,11 @@ in inherit (darwin.apple_sdk.frameworks) AGL Carbon Cocoa Kernel QTKit; }; - wxGTK31 = callPackage ../development/libraries/wxwidgets/3.1 {}; + wxGTK31 = callPackage ../development/libraries/wxwidgets/3.1 { + inherit (gnome2) GConf; + inherit (darwin.stubs) setfile; + inherit (darwin.apple_sdk.frameworks) AGL Carbon Cocoa Kernel QTKit; + }; wxmac = callPackage ../development/libraries/wxwidgets/3.0/mac.nix { inherit (darwin.apple_sdk.frameworks) AGL Cocoa Kernel; From f8cf9de7cead42a28dd1ed0c60726c01febf9f88 Mon Sep 17 00:00:00 2001 From: Daniel Frank Date: Fri, 21 Jun 2019 11:27:56 +0200 Subject: [PATCH 18/90] udev: change error message if RUN entry is not executable --- nixos/modules/services/hardware/udev.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/services/hardware/udev.nix b/nixos/modules/services/hardware/udev.nix index cb2f1e6621ae..b80f4491ceda 100644 --- a/nixos/modules/services/hardware/udev.nix +++ b/nixos/modules/services/hardware/udev.nix @@ -85,7 +85,7 @@ let for i in $import_progs $run_progs; do if [[ ! -x $i ]]; then echo "FAIL" - echo "$i is called in udev rules but not installed by udev" + echo "$i is called in udev rules but is not executable" exit 1 fi done From e62883d5cfa9c6153eb708cb89def653a4035553 Mon Sep 17 00:00:00 2001 From: Johan Thomsen Date: Fri, 21 Jun 2019 15:37:50 +0200 Subject: [PATCH 19/90] tomcat9: 9.0.13 -> 9.0.21 --- pkgs/servers/http/tomcat/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/http/tomcat/default.nix b/pkgs/servers/http/tomcat/default.nix index 40d865e2f56c..bc737bf7f40f 100644 --- a/pkgs/servers/http/tomcat/default.nix +++ b/pkgs/servers/http/tomcat/default.nix @@ -50,7 +50,7 @@ in { tomcat9 = common { versionMajor = "9"; - versionMinor = "0.13"; - sha256 = "1rsrnmkkrbzrj56jk2wh8hrr79kfkk3fz1j0abk3midn1jnbgxxq"; + versionMinor = "0.21"; + sha256 = "0nsylbqvky4pf3wpsx3a29b85lvwk91ay37mljk9636qffjj1vjh"; }; } From 1fd9ac6ff67239e939d26d7381b3f5b3fa4838cb Mon Sep 17 00:00:00 2001 From: Johan Thomsen Date: Fri, 21 Jun 2019 15:49:29 +0200 Subject: [PATCH 20/90] tomcat85: 8.5.35 -> 8.5.42 --- pkgs/servers/http/tomcat/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/http/tomcat/default.nix b/pkgs/servers/http/tomcat/default.nix index bc737bf7f40f..fded6bdfafba 100644 --- a/pkgs/servers/http/tomcat/default.nix +++ b/pkgs/servers/http/tomcat/default.nix @@ -44,8 +44,8 @@ in { tomcat85 = common { versionMajor = "8"; - versionMinor = "5.35"; - sha256 = "0n6agr2wn8m5mv0asz73hy2194n9rk7mh5wsp2pz7aq0andbhh5s"; + versionMinor = "5.42"; + sha256 = "1d90abwwvl0ghr0g0drk48j37wr2zgw74vws9z2rshyzrwgbvgp3"; }; tomcat9 = common { From b40a38fe8a1203d8a3eedc61ddda4be315171dd7 Mon Sep 17 00:00:00 2001 From: Daniel Frank Date: Fri, 21 Jun 2019 18:05:14 +0200 Subject: [PATCH 21/90] udev: be more verbose about the error --- nixos/modules/services/hardware/udev.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/services/hardware/udev.nix b/nixos/modules/services/hardware/udev.nix index b80f4491ceda..83ab93bd7cfc 100644 --- a/nixos/modules/services/hardware/udev.nix +++ b/nixos/modules/services/hardware/udev.nix @@ -85,7 +85,7 @@ let for i in $import_progs $run_progs; do if [[ ! -x $i ]]; then echo "FAIL" - echo "$i is called in udev rules but is not executable" + echo "$i is called in udev rules but is not executable or does not exist" exit 1 fi done From 5e26875f77aa785b9b86d80d945aeab917483f50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6gler?= Date: Fri, 21 Jun 2019 20:50:45 +0200 Subject: [PATCH 22/90] vdr: 2.4.0 -> 2.4.1 --- pkgs/applications/video/vdr/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/video/vdr/default.nix b/pkgs/applications/video/vdr/default.nix index 21c2404f4ee7..e81002193589 100644 --- a/pkgs/applications/video/vdr/default.nix +++ b/pkgs/applications/video/vdr/default.nix @@ -4,12 +4,12 @@ , enableBidi ? true }: stdenv.mkDerivation rec { - name = "vdr-${version}"; - version = "2.4.0"; + pname = "vdr"; + version = "2.4.1"; src = fetchurl { - url = "ftp://ftp.tvdr.de/vdr/${name}.tar.bz2"; - sha256 = "1klcgy9kr7n6z8d2c77j63bl8hvhx5qnqppg73f77004hzz4kbwk"; + url = "ftp://ftp.tvdr.de/vdr/${pname}-${version}.tar.bz2"; + sha256 = "1p51b14aqzncx3xpfg0rjplc48pg7520035i5p6r5zzkqhszihr5"; }; enableParallelBuilding = true; From c42f3782b0650c0403b6ce01a1473c0d8db3f04e Mon Sep 17 00:00:00 2001 From: Jan Malakhovski Date: Fri, 21 Jun 2019 23:58:55 +0000 Subject: [PATCH 23/90] Revert "Remove amdadlsdk and amdappsdk." This reverts commit 08ea7c7ee28a24226c051b467ae0fef0584cfe40. This was a part of #61823. Firstly, that commit removed those attributes without removing the files they refer to, which is strange. Secondly, I have a very old but GPGPU-capabale AMD card which doesn't work with newer OpenCL infrastructure and hence needs these packages to do GPGPU. --- pkgs/top-level/all-packages.nix | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f99abb2315bf..50cc9dc1e405 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8664,6 +8664,26 @@ in ### DEVELOPMENT / MISC + amdadlsdk = callPackage ../development/misc/amdadl-sdk { }; + + amdappsdk26 = amdappsdk.override { + version = "2.6"; + }; + + amdappsdk27 = amdappsdk.override { + version = "2.7"; + }; + + amdappsdk28 = amdappsdk.override { + version = "2.8"; + }; + + amdappsdk = callPackage ../development/misc/amdapp-sdk { }; + + amdappsdkFull = amdappsdk.override { + samples = true; + }; + amtk = callPackage ../development/libraries/amtk { }; avrlibc = callPackage ../development/misc/avr/libc {}; From 45efec3e2c8d46dacbd5ac154b0ca15263f37495 Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Fri, 21 Jun 2019 21:58:06 -0500 Subject: [PATCH 24/90] imgcat: 2.3.0 -> 2.3.1 --- pkgs/applications/graphics/imgcat/default.nix | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/pkgs/applications/graphics/imgcat/default.nix b/pkgs/applications/graphics/imgcat/default.nix index 862d3a9dff5e..1fa3ec8ccc68 100644 --- a/pkgs/applications/graphics/imgcat/default.nix +++ b/pkgs/applications/graphics/imgcat/default.nix @@ -1,25 +1,24 @@ { stdenv, fetchFromGitHub, autoconf, automake, libtool, ncurses }: stdenv.mkDerivation rec { - name = "imgcat-${version}"; - version = "2.3.0"; + pname = "imgcat"; + version = "2.3.1"; - buildInputs = [ autoconf automake libtool ncurses ]; + nativeBuildInputs = [ autoconf automake libtool ]; + buildInputs = [ ncurses ]; preConfigure = '' ${autoconf}/bin/autoconf sed -i -e "s|-ltermcap|-L ${ncurses}/lib -lncurses|" Makefile ''; - preInstall = '' - makeFlagsArray=(PREFIX="$out"); - ''; + makeFlags = [ "PREFIX=$(out)" ]; src = fetchFromGitHub { owner = "eddieantonio"; - repo = "imgcat"; - rev = "3d854c72f785dce0eecd9485767a7f972d54890c"; - sha256 = "0m83c33rzxvs0w214njql2c7q3fg06wnyijch3l2s88i7frl121f"; + repo = pname; + rev = "v${version}"; + sha256 = "0frz40rjwi73nx2dlqvmnn56zwr29bmnngfb11hhwr7v58yfajdi"; }; NIX_CFLAGS_COMPILE = "-Wno-error"; From e952dc58985be62f0b7c36e9306a243f9edc8f1c Mon Sep 17 00:00:00 2001 From: Sascha Grunert Date: Sat, 22 Jun 2019 16:55:19 +0200 Subject: [PATCH 25/90] conmon: 0.2.0 -> 0.3.0 Signed-off-by: Sascha Grunert --- pkgs/applications/virtualization/conmon/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/virtualization/conmon/default.nix b/pkgs/applications/virtualization/conmon/default.nix index 4ef02af106e3..eb143412bd40 100644 --- a/pkgs/applications/virtualization/conmon/default.nix +++ b/pkgs/applications/virtualization/conmon/default.nix @@ -9,13 +9,13 @@ stdenv.mkDerivation rec { project = "conmon"; name = "${project}-${version}"; - version = "0.2.0"; + version = "0.3.0"; src = fetchFromGitHub { owner = "containers"; repo = project; rev = "v${version}"; - sha256 = "08fgkbv7hq62lcq39za9pm2s2j92ismgrkvfm7acwbvajqh9syjb"; + sha256 = "0s23gm0cq4mylv882dr1n8bqql42674vny3z58yy77lwzmifc6id"; }; nativeBuildInputs = [ pkgconfig ]; From ba327a54b67732a715cc4237f5de20411b635319 Mon Sep 17 00:00:00 2001 From: Guillaume Bouchard Date: Wed, 19 Jun 2019 20:11:07 +0200 Subject: [PATCH 26/90] bazel: 0.26.1 -> 0.27.0 - Fixs for newly introduced bin/bash hardcoded reference - Bazel now references `remote_java_tools_xxx` which contains prebuilt binaries. We prefetch them, fix them, and force bazel to use the fixed repository. It also closes #63096 --- .../tools/build-managers/bazel/default.nix | 64 +++++++++++++++++-- .../tools/build-managers/bazel/src-deps.json | 39 ++++++----- 2 files changed, 81 insertions(+), 22 deletions(-) diff --git a/pkgs/development/tools/build-managers/bazel/default.nix b/pkgs/development/tools/build-managers/bazel/default.nix index f8ed157e693b..ec36ca3e6d3f 100644 --- a/pkgs/development/tools/build-managers/bazel/default.nix +++ b/pkgs/development/tools/build-managers/bazel/default.nix @@ -14,14 +14,16 @@ # Always assume all markers valid (don't redownload dependencies). # Also, don't clean up environment variables. , enableNixHacks ? false +, gcc-unwrapped +, autoPatchelfHook }: let - version = "0.26.1"; + version = "0.27.0"; src = fetchurl { url = "https://github.com/bazelbuild/bazel/releases/download/${version}/bazel-${version}-dist.zip"; - sha256 = "000ny51hwnjyizm1md4w8q7m832jhf3c767pgbvg6nc7h67lzsf0"; + sha256 = "0yn662dzgfr8ls4avfl12k5sr4f210bab12wml18bh4sjlxhs263"; }; # Update with `eval $(nix-build -A bazel.updater)`, @@ -40,12 +42,12 @@ let srcs.bazel_skylib srcs.io_bazel_rules_sass (if stdenv.hostPlatform.isDarwin - then srcs.${"java_tools_javac10_darwin-v3.2.zip"} - else srcs.${"java_tools_javac10_linux-v3.2.zip"}) + then srcs.${"java_tools_javac11_darwin-v2.0.zip"} + else srcs.${"java_tools_javac11_linux-v2.0.zip"}) srcs.${"coverage_output_generator-v1.0.zip"} srcs.build_bazel_rules_nodejs - srcs.${"android_tools_pkg-0.2.tar.gz"} - ]; + srcs.${"android_tools_pkg-0.4.tar.gz"} + ]; distDir = runCommand "bazel-deps" {} '' mkdir -p $out @@ -87,6 +89,36 @@ let platforms = lib.platforms.linux ++ lib.platforms.darwin; + # This repository is fetched by bazel at runtime + # however it contains prebuilt java binaries, with wrong interpreter + # and libraries path. + # We prefetch it, patch it, and override it in a global bazelrc. + system = if stdenv.hostPlatform.isDarwin + then "darwin" else "linux"; + + remote_java_tools = stdenv.mkDerivation { + name = "remote_java_tools_${system}"; + + src = fetchurl { + url = "https://mirror.bazel.build/bazel_java_tools/releases/javac11/v2.0/java_tools_javac11_${system}-v2.0.zip"; + sha256 = "074d624fb34441df369afdfd454e75dba821d5d54932fcfee5ba598d17dc1b99"; + }; + + nativeBuildInputs = [ autoPatchelfHook unzip ]; + buildInputs = [ gcc-unwrapped ]; + + sourceRoot = "."; + + buildPhase = '' + mkdir $out; + ''; + + installPhase = '' + cp -Ra * $out/ + touch $out/WORKSPACE + ''; + }; + in stdenv.mkDerivation rec { name = "bazel-${version}"; @@ -117,6 +149,7 @@ stdenv.mkDerivation rec { runLocal = name: attrs: script: runCommandCC name ({ preferLocalBuild = true; meta.platforms = platforms; + buildInputs = [ python3 ]; } // attrs) script; # bazel wants to extract itself into $install_dir/install every time it runs, @@ -275,6 +308,11 @@ stdenv.mkDerivation rec { --replace /bin/true ${coreutils}/bin/true done + # bazel test runner include references to /bin/bash + substituteInPlace tools/build_rules/test_rules.bzl \ + --replace /bin/bash ${customBash}/bin/bash + + # Fixup scripts that generate scripts. Not fixed up by patchShebangs below. substituteInPlace scripts/bootstrap/compile.sh \ --replace /bin/bash ${customBash}/bin/bash @@ -323,12 +361,20 @@ stdenv.mkDerivation rec { mv runfiles.bash.tmp tools/bash/runfiles/runfiles.bash patchShebangs . + + # bazel reads its system bazelrc in /etc + # override this path to a builtin one + substituteInPlace \ + src/main/cpp/option_processor.cc \ + --replace BAZEL_SYSTEM_BAZELRC_PATH "\"$out/etc/bazelrc\"" ''; in lib.optionalString stdenv.hostPlatform.isDarwin darwinPatches + genericPatches; buildInputs = [ buildJdk + python3 # bazel build requires python3. However we still use python2 for most of the other tasks + # This will have to be refactored later. ]; # when a command can’t be found in a bazel build, you might also @@ -375,6 +421,12 @@ stdenv.mkDerivation rec { wrapProgram "$out/bin/bazel" --add-flags --server_javabase="${runJdk}" + # generates the system bazelrc + # warning: the name of the repository depends on the system, hence + # the reference to .name + mkdir $out/etc + echo "build --override_repository=${remote_java_tools.name}=${remote_java_tools}" > $out/etc/bazelrc + # shell completion files mkdir -p $out/share/bash-completion/completions $out/share/zsh/site-functions mv ./bazel_src/output/bazel-complete.bash $out/share/bash-completion/completions/bazel diff --git a/pkgs/development/tools/build-managers/bazel/src-deps.json b/pkgs/development/tools/build-managers/bazel/src-deps.json index 752f0a4c9909..a0d07f1a68d4 100644 --- a/pkgs/development/tools/build-managers/bazel/src-deps.json +++ b/pkgs/development/tools/build-managers/bazel/src-deps.json @@ -23,11 +23,11 @@ "https://github.com/bazelbuild/rules_sass/archive/8ccf4f1c351928b55d5dddf3672e3667f6978d60.tar.gz" ] }, - "android_tools_pkg-0.2.tar.gz": { - "name": "android_tools_pkg-0.2.tar.gz", - "sha256": "04f85f2dd049e87805511e3babc5cea3f5e72332b1627e34f3a5461cc38e815f", + "android_tools_pkg-0.4.tar.gz": { + "name": "android_tools_pkg-0.4.tar.gz", + "sha256": "331e7706f2bcae8a68057d8ddd3e3f1574bca26c67c65802fc4a8ac6164fa912", "urls": [ - "https://mirror.bazel.build/bazel_android_tools/android_tools_pkg-0.2.tar.gz" + "https://mirror.bazel.build/bazel_android_tools/android_tools_pkg-0.4.tar.gz" ] }, "bazel_j2objc": { @@ -134,25 +134,25 @@ "https://github.com/bazelbuild/skydoc/archive/2d9566b21fbe405acf5f7bf77eda30df72a4744c.tar.gz" ] }, - "java_tools_javac10_darwin-v3.2.zip": { - "name": "java_tools_javac10_darwin-v3.2.zip", - "sha256": "1437327179b4284f7082cee0bdc3328f040e62fc5cc59c32f6824b8c520e2b7b", + "java_tools_javac11_darwin-v2.0.zip": { + "name": "java_tools_javac11_darwin-v2.0.zip", + "sha256": "0ceb0c9ff91256fe33508306bc9cd9e188dcca38df78e70839d426bdaef67a38", "urls": [ - "https://mirror.bazel.build/bazel_java_tools/releases/javac10/v3.2/java_tools_javac10_darwin-v3.2.zip" + "https://mirror.bazel.build/bazel_java_tools/releases/javac11/v2.0/java_tools_javac11_darwin-v2.0.zip" ] }, - "java_tools_javac10_linux-v3.2.zip": { - "name": "java_tools_javac10_linux-v3.2.zip", - "sha256": "b93e7c556b01815afb6c248aa73f06b7ec912805bde8898eedac1e20d08f2e67", + "java_tools_javac11_linux-v2.0.zip": { + "name": "java_tools_javac11_linux-v2.0.zip", + "sha256": "074d624fb34441df369afdfd454e75dba821d5d54932fcfee5ba598d17dc1b99", "urls": [ - "https://mirror.bazel.build/bazel_java_tools/releases/javac10/v3.2/java_tools_javac10_linux-v3.2.zip" + "https://mirror.bazel.build/bazel_java_tools/releases/javac11/v2.0/java_tools_javac11_linux-v2.0.zip" ] }, - "java_tools_javac10_windows-v3.2.zip": { - "name": "java_tools_javac10_windows-v3.2.zip", - "sha256": "86d3cc7fa0dc91ccb8f78ae3af8440fe459177e22062043ee4b83d55e6b7dfb0", + "java_tools_javac11_windows-v2.0.zip": { + "name": "java_tools_javac11_windows-v2.0.zip", + "sha256": "2c3fc0ce7d30d60e26f4b8a36e2eadcf9e6a9d5a51b667d3d13b78db53b24251", "urls": [ - "https://mirror.bazel.build/bazel_java_tools/releases/javac10/v3.2/java_tools_javac10_windows-v3.2.zip" + "https://mirror.bazel.build/bazel_java_tools/releases/javac11/v2.0/java_tools_javac11_windows-v2.0.zip" ] }, "java_tools_langtools_javac10": { @@ -162,6 +162,13 @@ "https://mirror.bazel.build/bazel_java_tools/jdk_langtools/langtools_jdk10.zip" ] }, + "java_tools_langtools_javac11": { + "name": "java_tools_langtools_javac11", + "sha256": "128a63f39d3f828a761f6afcfe3c6115279336a72ea77f60d7b3acf1841c9acb", + "urls": [ + "https://mirror.bazel.build/bazel_java_tools/jdk_langtools/langtools_jdk11.zip" + ] + }, "java_tools_langtools_javac9": { "name": "java_tools_langtools_javac9", "sha256": "3b6bbc47256acf2f61883901e2d4e3f9b292f5fe154a6912b928805de24cb864", From 7fed6eabcf76bd3bec4d8e5d384cd162c68ebfce Mon Sep 17 00:00:00 2001 From: Guillaume Bouchard Date: Thu, 20 Jun 2019 17:13:06 +0200 Subject: [PATCH 27/90] bazel: restore installCheckPhase All the dependencies of this phase are prefetched and provided to the bazel environment using --override_repository. --- .../tools/build-managers/bazel/default.nix | 31 ++++++++++++++----- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/pkgs/development/tools/build-managers/bazel/default.nix b/pkgs/development/tools/build-managers/bazel/default.nix index ec36ca3e6d3f..2cb00be63a90 100644 --- a/pkgs/development/tools/build-managers/bazel/default.nix +++ b/pkgs/development/tools/build-managers/bazel/default.nix @@ -28,15 +28,16 @@ let # Update with `eval $(nix-build -A bazel.updater)`, # then add new dependencies from the dict in ./src-deps.json as required. - srcDeps = + srcDeps = lib.attrsets.attrValues srcDepsSet; + srcDepsSet = let srcs = (builtins.fromJSON (builtins.readFile ./src-deps.json)); - toFetchurl = d: fetchurl { + toFetchurl = d: lib.attrsets.nameValuePair d.name (fetchurl { name = d.name; urls = d.urls; sha256 = d.sha256; - }; - in map toFetchurl [ + }); + in builtins.listToAttrs (map toFetchurl [ srcs.desugar_jdk_libs srcs.io_bazel_skydoc srcs.bazel_skylib @@ -47,7 +48,7 @@ let srcs.${"coverage_output_generator-v1.0.zip"} srcs.build_bazel_rules_nodejs srcs.${"android_tools_pkg-0.4.tar.gz"} - ]; + ]); distDir = runCommand "bazel-deps" {} '' mkdir -p $out @@ -433,14 +434,28 @@ stdenv.mkDerivation rec { cp ./bazel_src/scripts/zsh_completion/_bazel $out/share/zsh/site-functions/ ''; - # Temporarily disabling for now. A new approach is needed for this derivation as Bazel - # accesses the internet during the tests which fails in a sandbox. - doInstallCheck = false; + doInstallCheck = true; installCheckPhase = '' export TEST_TMPDIR=$(pwd) + tar xf ${srcDepsSet.io_bazel_skydoc} -C $TEST_TMPDIR + mv $(ls | grep skydoc-) io_bazel_skydoc + + tar xf ${srcDepsSet.bazel_skylib} -C $TEST_TMPDIR + mv $(ls | grep bazel-skylib-) bazel_skylib + + tar xf ${srcDepsSet.io_bazel_rules_sass} -C $TEST_TMPDIR + mv $(ls | grep rules_sass-) rules_sass + + unzip ${srcDepsSet.build_bazel_rules_nodejs} -d $TEST_TMPDIR + mv rules_nodejs-0.16.2 build_bazel_rules_nodejs + hello_test () { $out/bin/bazel test \ + --override_repository=io_bazel_skydoc=$TEST_TMPDIR/io_bazel_skydoc \ + --override_repository=bazel_skylib=$TEST_TMPDIR/bazel_skylib \ + --override_repository=io_bazel_rules_sass=$TEST_TMPDIR/rules_sass \ + --override_repository=build_bazel_rules_nodejs=$TEST_TMPDIR/build_bazel_rules_nodejs \ --test_output=errors \ --java_toolchain='${javaToolchain}' \ examples/cpp:hello-success_test \ From 27d4ce7ce08613ab124d160ff269c48c86eb3d83 Mon Sep 17 00:00:00 2001 From: Guillaume Bouchard Date: Thu, 20 Jun 2019 17:20:58 +0200 Subject: [PATCH 28/90] bazel: Full switch to python3 --- .../tools/build-managers/bazel/default.nix | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/pkgs/development/tools/build-managers/bazel/default.nix b/pkgs/development/tools/build-managers/bazel/default.nix index 2cb00be63a90..257cc185b2e2 100644 --- a/pkgs/development/tools/build-managers/bazel/default.nix +++ b/pkgs/development/tools/build-managers/bazel/default.nix @@ -2,7 +2,7 @@ # this package (through the fixpoint glass) , bazel , lr, xe, zip, unzip, bash, writeCBin, coreutils -, which, python, gawk, gnused, gnutar, gnugrep, gzip, findutils +, which, gawk, gnused, gnutar, gnugrep, gzip, findutils # updater , python3, writeScript # Apple dependencies @@ -292,8 +292,8 @@ stdenv.mkDerivation rec { # Substitute python's stub shebang to plain python path. (see TODO add pr URL) # See also `postFixup` where python is added to $out/nix-support substituteInPlace src/main/java/com/google/devtools/build/lib/bazel/rules/python/python_stub_template.txt\ - --replace "/usr/bin/env python" "${python}/bin/python" \ - --replace "NIX_STORE_PYTHON_PATH" "${python}/bin/python" \ + --replace "/usr/bin/env python" "${python3}/bin/python" \ + --replace "NIX_STORE_PYTHON_PATH" "${python3}/bin/python" \ # md5sum is part of coreutils sed -i 's|/sbin/md5|md5sum|' \ @@ -374,15 +374,14 @@ stdenv.mkDerivation rec { buildInputs = [ buildJdk - python3 # bazel build requires python3. However we still use python2 for most of the other tasks - # This will have to be refactored later. + python3 ]; # when a command can’t be found in a bazel build, you might also # need to add it to `defaultShellPath`. nativeBuildInputs = [ zip - python + python3 unzip makeWrapper which @@ -491,7 +490,7 @@ stdenv.mkDerivation rec { echo "${customBash} ${defaultShellPath}" >> $out/nix-support/depends # The templates get tar’d up into a .jar, # so nix can’t detect python is needed in the runtime closure - echo "${python}" >> $out/nix-support/depends + echo "${python3}" >> $out/nix-support/depends ''; dontStrip = true; From 3f79ede5c07cbed818a21d6b3f0e5efe09cb2264 Mon Sep 17 00:00:00 2001 From: arcnmx Date: Sat, 22 Jun 2019 13:10:32 -0700 Subject: [PATCH 29/90] acpilight: fix build error udevadm should not run as part of make install --- pkgs/misc/acpilight/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/misc/acpilight/default.nix b/pkgs/misc/acpilight/default.nix index e36e41885008..50f4fe87ed83 100644 --- a/pkgs/misc/acpilight/default.nix +++ b/pkgs/misc/acpilight/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchgit, python3, udev, coreutils }: +{ stdenv, fetchgit, python3, coreutils }: stdenv.mkDerivation rec { pname = "acpilight"; @@ -16,9 +16,10 @@ stdenv.mkDerivation rec { postConfigure = '' substituteInPlace 90-backlight.rules --replace /bin ${coreutils}/bin + substituteInPlace Makefile --replace udevadm true ''; - buildInputs = [ pyenv udev ]; + buildInputs = [ pyenv ]; makeFlags = [ "DESTDIR=$(out) prefix=" ]; From 79c0e740a7f90eb8e0e1c621ea7f50d54bbeb069 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Sat, 22 Jun 2019 22:20:35 -0400 Subject: [PATCH 30/90] qttools: patch qmlimportscanner for darwin builds This needs to be the full path for qtmacdeploy to work. We add ${qt5.qttools.dev}/bin/qmlimportscanner as the default. Fixes #63093 --- .../development/libraries/qt-5/5.11/qttools.patch | 15 +++++++++++++++ pkgs/development/libraries/qt-5/5.12/default.nix | 1 + .../development/libraries/qt-5/5.12/qttools.patch | 15 +++++++++++++++ .../libraries/qt-5/modules/qttools.nix | 5 ++++- 4 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 pkgs/development/libraries/qt-5/5.12/qttools.patch diff --git a/pkgs/development/libraries/qt-5/5.11/qttools.patch b/pkgs/development/libraries/qt-5/5.11/qttools.patch index fbba439ef7a5..622efc35b6b6 100644 --- a/pkgs/development/libraries/qt-5/5.11/qttools.patch +++ b/pkgs/development/libraries/qt-5/5.11/qttools.patch @@ -69,3 +69,18 @@ index 4318b16f..d60db4ff 100644 _qt5_LinguistTools_check_file_exists(${imported_location}) set_target_properties(Qt5::lconvert PROPERTIES +--- a/src/macdeployqt/shared/shared.cpp ++++ b/src/macdeployqt/shared/shared.cpp +@@ -1241,6 +1241,12 @@ bool deployQmlImports(const QString &appBundlePath, DeploymentInfo deploymentInf + if (!QFile(qmlImportScannerPath).exists()) + qmlImportScannerPath = QCoreApplication::applicationDirPath() + "/qmlimportscanner"; + ++#ifdef NIXPKGS_QMLIMPORTSCANNER ++ // Fallback: Nixpkgs hardcoded path ++ if (!QFile(qmlImportScannerPath).exists()) ++ qmlImportScannerPath = NIXPKGS_QMLIMPORTSCANNER; ++#endif ++ + // Verify that we found a qmlimportscanner binary + if (!QFile(qmlImportScannerPath).exists()) { + LogError() << "qmlimportscanner not found at" << qmlImportScannerPath; diff --git a/pkgs/development/libraries/qt-5/5.12/default.nix b/pkgs/development/libraries/qt-5/5.12/default.nix index ef0cf97a428d..2aa7d0f71ee0 100644 --- a/pkgs/development/libraries/qt-5/5.12/default.nix +++ b/pkgs/development/libraries/qt-5/5.12/default.nix @@ -66,6 +66,7 @@ let ./qtwebkit-darwin-no-readline.patch ./qtwebkit-darwin-no-qos-classes.patch ]; + qttools = [ ./qttools.patch ]; }; mkDerivation = diff --git a/pkgs/development/libraries/qt-5/5.12/qttools.patch b/pkgs/development/libraries/qt-5/5.12/qttools.patch new file mode 100644 index 000000000000..8ae12198ca25 --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.12/qttools.patch @@ -0,0 +1,15 @@ +--- a/src/macdeployqt/shared/shared.cpp ++++ b/src/macdeployqt/shared/shared.cpp +@@ -1241,6 +1241,12 @@ bool deployQmlImports(const QString &appBundlePath, DeploymentInfo deploymentInf + if (!QFile(qmlImportScannerPath).exists()) + qmlImportScannerPath = QCoreApplication::applicationDirPath() + "/qmlimportscanner"; + ++#ifdef NIXPKGS_QMLIMPORTSCANNER ++ // Fallback: Nixpkgs hardcoded path ++ if (!QFile(qmlImportScannerPath).exists()) ++ qmlImportScannerPath = NIXPKGS_QMLIMPORTSCANNER; ++#endif ++ + // Verify that we found a qmlimportscanner binary + if (!QFile(qmlImportScannerPath).exists()) { + LogError() << "qmlimportscanner not found at" << qmlImportScannerPath; diff --git a/pkgs/development/libraries/qt-5/modules/qttools.nix b/pkgs/development/libraries/qt-5/modules/qttools.nix index 622d841b4051..573472a8b5ab 100644 --- a/pkgs/development/libraries/qt-5/modules/qttools.nix +++ b/pkgs/development/libraries/qt-5/modules/qttools.nix @@ -1,4 +1,4 @@ -{ qtModule, stdenv, lib, qtbase }: +{ qtModule, stdenv, lib, qtbase, qtdeclarative }: with lib; @@ -32,5 +32,8 @@ qtModule { "bin/macdeployqt" ]; + NIX_CFLAGS_COMPILE = + lib.optional stdenv.isDarwin ''-DNIXPKGS_QMLIMPORTSCANNER="${qtdeclarative.dev}/bin/qmlimportscanner"''; + setupHook = ../hooks/qttools-setup-hook.sh; } From 7c0c888d820adb16b580257f72d442111063a4de Mon Sep 17 00:00:00 2001 From: Peter Hoeg Date: Sun, 23 Jun 2019 11:21:25 +0800 Subject: [PATCH 31/90] mosquitto: 1.6.2 -> 1.6.3 --- pkgs/servers/mqtt/mosquitto/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/mqtt/mosquitto/default.nix b/pkgs/servers/mqtt/mosquitto/default.nix index 11d5b92071be..04daa2f4a855 100644 --- a/pkgs/servers/mqtt/mosquitto/default.nix +++ b/pkgs/servers/mqtt/mosquitto/default.nix @@ -4,13 +4,13 @@ stdenv.mkDerivation rec { name = "mosquitto-${version}"; - version = "1.6.2"; + version = "1.6.3"; src = fetchFromGitHub { owner = "eclipse"; repo = "mosquitto"; rev = "v${version}"; - sha256 = "1n0rr4564a80b1km72myqa8qx4ak2jk55irx7d1vlgihgp88j3wm"; + sha256 = "1xvfcqi6pa5pdnqd88gz9qx6kl2q47xp7l3q5wwgj0l9y9mlxp99"; }; postPatch = '' From d20379a7c1a94b5497d1b327e427a110d4d76740 Mon Sep 17 00:00:00 2001 From: Vladyslav M Date: Sun, 23 Jun 2019 11:32:18 +0300 Subject: [PATCH 32/90] skim: 0.6.4 -> 0.6.8 --- pkgs/tools/misc/skim/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/misc/skim/default.nix b/pkgs/tools/misc/skim/default.nix index fe1061b446c5..5072bfb69343 100644 --- a/pkgs/tools/misc/skim/default.nix +++ b/pkgs/tools/misc/skim/default.nix @@ -2,18 +2,18 @@ rustPlatform.buildRustPackage rec { pname = "skim"; - version = "0.6.4"; + version = "0.6.8"; src = fetchFromGitHub { owner = "lotabout"; repo = pname; rev = "v${version}"; - sha256 = "0ywrqfxxqv7mpm4szw8n3hcvc4jn9a490j9s7qh3vzqgrsx2sxk3"; + sha256 = "00sx1pyj0a9hkv9b8g3iykkw303vnqziddp2600nvfr8x8pd01gi"; }; outputs = [ "out" "vim" ]; - cargoSha256 = "1rwb0yvqpxp1pikdw6345n035krx0qcx4f5di89841fhr123zv0w"; + cargoSha256 = "1kqawnyddv4pjyiaizw3ydqk6hl4ng6xfw9ixy58rb1vk591kq8w"; patchPhase = '' sed -i -e "s|expand(':h:h')|'$out'|" plugin/skim.vim From 0d461a770e9a57b4037a8512ea5ceb6441908270 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Sun, 23 Jun 2019 12:15:47 +0200 Subject: [PATCH 33/90] documize-community: 2.5.1 -> 3.0.0 https://github.com/documize/community/releases/tag/v3.0.0 --- pkgs/servers/documize-community/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/documize-community/default.nix b/pkgs/servers/documize-community/default.nix index ccb7d4b7e444..0f43de3b43eb 100644 --- a/pkgs/servers/documize-community/default.nix +++ b/pkgs/servers/documize-community/default.nix @@ -2,13 +2,13 @@ buildGoPackage rec { pname = "documize-community"; - version = "2.5.1"; + version = "3.0.0"; src = fetchFromGitHub { owner = "documize"; repo = "community"; rev = "v${version}"; - sha256 = "1y6x5la0q1cbapayw5vbqk4i3bhj9i9008cmj22wx6fp0x7vshxi"; + sha256 = "01q7yx35gp41lnm9zbwq0maf7wiv86mi6fww3hl1cddmgdlksss9"; }; goPackagePath = "github.com/documize/community"; From 5ada40d687aede8535b8c3822776a40537f7c6b8 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Sun, 23 Jun 2019 14:17:53 +0200 Subject: [PATCH 34/90] neomutt: remove mutt wrapper Since Oct 14, 2017 we warned users still executing `neomutt` through the `mutt` binary, so we can assume everybody read the notice, updated his config, and can drop the wrapper. --- .../networking/mailreaders/neomutt/default.nix | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/pkgs/applications/networking/mailreaders/neomutt/default.nix b/pkgs/applications/networking/mailreaders/neomutt/default.nix index 0da451ed51e2..f4b0846b98f0 100644 --- a/pkgs/applications/networking/mailreaders/neomutt/default.nix +++ b/pkgs/applications/networking/mailreaders/neomutt/default.nix @@ -3,19 +3,7 @@ , lmdb, libxslt, docbook_xsl, docbook_xml_dtd_42, mailcap, runtimeShell }: -let - muttWrapper = writeScript "mutt" '' - #!${runtimeShell} -eu - - echo 'The neomutt project has renamed the main binary from `mutt` to `neomutt`.' - echo "" - echo 'This wrapper is provided for compatibility purposes only. You should start calling `neomutt` instead.' - echo "" - read -p 'Press any key to launch NeoMutt...' -n1 -s - exec neomutt "$@" - ''; - -in stdenv.mkDerivation rec { +stdenv.mkDerivation rec { version = "20180716"; name = "neomutt-${version}"; @@ -80,7 +68,6 @@ in stdenv.mkDerivation rec { NIX_LDFLAGS = "-lidn"; postInstall = '' - cp ${muttWrapper} $out/bin/mutt wrapProgram "$out/bin/neomutt" --prefix PATH : "$out/libexec/neomutt" ''; From 5864dfb51319a14cde0bea8a55a6a0b181535afa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Min=C3=A1=C5=99?= Date: Sun, 23 Jun 2019 16:08:52 +0200 Subject: [PATCH 35/90] megasync: init at 4.1.1.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michal Minář --- maintainers/maintainer-list.nix | 5 + pkgs/applications/misc/megasync/default.nix | 143 ++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 3 files changed, 150 insertions(+) create mode 100644 pkgs/applications/misc/megasync/default.nix diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 10d3447af618..266522ab469d 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -3278,6 +3278,11 @@ github = "michelk"; name = "Michel Kuhlmann"; }; + michojel = { + email = "mic.liamg@gmail.com"; + github = "michojel"; + name = "Michal Minář"; + }; mickours = { email = "mickours@gmail.com<"; github = "mickours"; diff --git a/pkgs/applications/misc/megasync/default.nix b/pkgs/applications/misc/megasync/default.nix new file mode 100644 index 000000000000..a04370f3acdb --- /dev/null +++ b/pkgs/applications/misc/megasync/default.nix @@ -0,0 +1,143 @@ +{ lib +, stdenv +, autoconf +, automake +, bash +, bashInteractive +, c-ares +, cryptopp +, curl +, doxygen +, fetchFromGitHub +, hicolor-icon-theme +, libmediainfo +, libraw +, libsodium +, libtool +, libuv +, libzen +, lsb-release +, makeDesktopItem +, pkgconfig +, qt5 +, sqlite +, swig +, unzip +, wget +, enableFFmpeg ? true, ffmpeg ? ffmpeg +}: + +assert enableFFmpeg -> ffmpeg != null; + +stdenv.mkDerivation rec { + name = "megasync-${version}"; + version = "4.1.1.0"; + + src = fetchFromGitHub { + owner = "meganz"; + repo = "MEGAsync"; + rev = "v${version}_Linux"; + sha256 = "0lc228q3s9xp78dxjn22g6anqlsy1hi7a6yfs4q3l6gyfc3qcxl2"; + fetchSubmodules = true; + }; + + desktopItem = makeDesktopItem { + name = "megasync"; + exec = "megasync"; + icon = "megasync"; + comment = meta.description; + desktopName = "MEGASync"; + genericName = "File Synchronizer"; + categories = "Network;FileTransfer;"; + startupNotify = "false"; + }; + + nativeBuildInputs = [ + autoconf + automake + doxygen + lsb-release + pkgconfig + qt5.qmake + qt5.qttools + swig + ]; + buildInputs = [ + c-ares + cryptopp + curl + #freeimage # unreferenced + hicolor-icon-theme + libmediainfo + libraw + libsodium + libtool + libuv + libzen + qt5.qtbase + qt5.qtsvg + sqlite + unzip + wget + ] ++ stdenv.lib.optionals enableFFmpeg [ ffmpeg ]; + + patchPhase = '' + for file in $(find src/ -type f \( -iname configure -o -iname \*.sh \) ); do + substituteInPlace "$file" \ + --replace "/bin/bash" "${bashInteractive}/bin/bash" + done + ''; + + preConfigure = '' + cd src/MEGASync/mega + ./autogen.sh + ''; + + configureScript = "./configure"; + + configureFlags = [ + "--disable-examples" + "--disable-java" + "--disable-php" + "--enable-chat" + "--with-cares" + "--with-cryptopp" + "--with-curl" + "--without-freeimage" # unreferenced even when found + "--without-readline" + "--without-termcap" + "--with-sodium" + "--with-sqlite" + "--with-zlib" + ] ++ stdenv.lib.optionals enableFFmpeg ["--with-ffmpeg"]; + + # TODO: unless overriden, qmake is called instead ?? + configurePhase = '' + runHook preConfigure + ./configure ${toString configureFlags} + runHook postConfigure + ''; + + postConfigure = "cd ../.."; + + preBuild = '' + qmake CONFIG+="release" MEGA.pro + lrelease MEGASync/MEGASync.pro + ''; + + # TODO: install bindings + installPhase = '' + mkdir -p $out/share/icons + install -Dm 755 MEGASync/megasync $out/bin/megasync + cp -r ${desktopItem}/share/applications $out/share + cp MEGASync/gui/images/uptodate.svg $out/share/icons/megasync.svg + ''; + + meta = with stdenv.lib; { + description = "Easy automated syncing between your computers and your MEGA Cloud Drive"; + homepage = https://mega.nz/; + license = licenses.free; + platforms = [ "i686-linux" "x86_64-linux" ]; + maintainers = [ maintainers.michojel ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 2090543ba942..9ec6334a5a50 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1695,6 +1695,8 @@ in massren = callPackage ../tools/misc/massren { }; + megasync = callPackage ../applications/misc/megasync { }; + meritous = callPackage ../games/meritous { }; opendune = callPackage ../games/opendune { }; From 79d72ccd3c7213dd034790da06e20816b2ec0bcb Mon Sep 17 00:00:00 2001 From: Tobias Mayer Date: Sun, 23 Jun 2019 17:07:38 +0200 Subject: [PATCH 36/90] dpkg: fix cross compilation --- pkgs/tools/package-management/dpkg/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/tools/package-management/dpkg/default.nix b/pkgs/tools/package-management/dpkg/default.nix index 33620bb51f17..a0a88e24a781 100644 --- a/pkgs/tools/package-management/dpkg/default.nix +++ b/pkgs/tools/package-management/dpkg/default.nix @@ -50,7 +50,7 @@ stdenv.mkDerivation rec { ''; buildInputs = [ perl zlib bzip2 xz ]; - nativeBuildInputs = [ makeWrapper ]; + nativeBuildInputs = [ makeWrapper perl ]; postInstall = '' From 3a7bb252854388fdafc21059cbdba59d80d05963 Mon Sep 17 00:00:00 2001 From: Tobias Mayer Date: Sun, 23 Jun 2019 17:07:51 +0200 Subject: [PATCH 37/90] Fix overrideCC invokations for cross builds `overrideCC` should always take a compiler for the build system, otherwise cross compilation is not possible. --- pkgs/top-level/all-packages.nix | 88 ++++++++++++++++----------------- 1 file changed, 44 insertions(+), 44 deletions(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5e5a84bf9af9..7ca8bae5582b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -671,7 +671,7 @@ in apt = callPackage ../tools/package-management/apt { # include/c++/6.4.0/cstdlib:75:25: fatal error: stdlib.h: No such file or directory - stdenv = overrideCC stdenv gcc5; + stdenv = overrideCC stdenv buildPackages.gcc5; }; apt-dater = callPackage ../tools/package-management/apt-dater { }; @@ -2805,7 +2805,7 @@ in exa = callPackage ../tools/misc/exa { }; exempi = callPackage ../development/libraries/exempi { - stdenv = if stdenv.isi686 then overrideCC stdenv gcc6 else stdenv; + stdenv = if stdenv.isi686 then overrideCC stdenv buildPackages.gcc6 else stdenv; }; execline = skawarePackages.execline; @@ -3081,7 +3081,7 @@ in fusuma = callPackage ../tools/inputmethods/fusuma {}; fdbPackages = dontRecurseIntoAttrs (callPackage ../servers/foundationdb { - stdenv49 = overrideCC stdenv gcc49; + stdenv49 = overrideCC stdenv buildPackages.gcc49; }); inherit (fdbPackages) @@ -3250,7 +3250,7 @@ in gnash = callPackage ../misc/gnash { }; gnaural = callPackage ../applications/audio/gnaural { - stdenv = overrideCC stdenv gcc49; + stdenv = overrideCC stdenv buildPackages.gcc49; }; gnirehtet = callPackage ../tools/networking/gnirehtet { }; @@ -3413,7 +3413,7 @@ in grpcurl = callPackage ../tools/networking/grpcurl { }; grub = pkgsi686Linux.callPackage ../tools/misc/grub ({ - stdenv = overrideCC stdenv pkgsi686Linux.gcc6; + stdenv = overrideCC stdenv buildPackages.pkgsi686Linux.gcc6; } // (config.grub or {})); trustedGrub = pkgsi686Linux.callPackage ../tools/misc/grub/trusted.nix { }; @@ -6381,7 +6381,7 @@ in udptunnel = callPackage ../tools/networking/udptunnel { }; ufraw = callPackage ../applications/graphics/ufraw { - stdenv = overrideCC stdenv gcc6; # doesn't build with gcc7 + stdenv = overrideCC stdenv buildPackages.gcc6; # doesn't build with gcc7 }; uftrace = callPackage ../development/tools/uftrace { }; @@ -7090,7 +7090,7 @@ in avian = callPackage ../development/compilers/avian { inherit (darwin.apple_sdk.frameworks) CoreServices Foundation; - stdenv = if stdenv.cc.isGNU then overrideCC stdenv gcc49 else stdenv; + stdenv = if stdenv.cc.isGNU then overrideCC stdenv buildPackages.gcc49 else stdenv; }; bigloo = callPackage ../development/compilers/bigloo { }; @@ -7150,7 +7150,7 @@ in #Use this instead of stdenv to build with clang clangStdenv = if stdenv.cc.isClang then stdenv else lowPrio llvmPackages.stdenv; - clang-sierraHack-stdenv = overrideCC stdenv clang-sierraHack; + clang-sierraHack-stdenv = overrideCC stdenv buildPackages.clang-sierraHack; libcxxStdenv = if stdenv.isDarwin then stdenv else lowPrio llvmPackages.libcxxStdenv; clasp-common-lisp = callPackage ../development/compilers/clasp { @@ -7229,9 +7229,9 @@ in extraBuildInputs = lib.optional stdenv.hostPlatform.isDarwin clang.cc; }; - gcc7Stdenv = overrideCC gccStdenv gcc7; - gcc8Stdenv = overrideCC gccStdenv gcc8; - gcc9Stdenv = overrideCC gccStdenv gcc9; + gcc7Stdenv = overrideCC gccStdenv buildPackages.gcc7; + gcc8Stdenv = overrideCC gccStdenv buildPackages.gcc8; + gcc9Stdenv = overrideCC gccStdenv buildPackages.gcc9; wrapCCMulti = cc: if stdenv.targetPlatform.system == "x86_64-linux" then let @@ -7268,8 +7268,8 @@ in gcc_multi = wrapCCMulti gcc; clang_multi = wrapClangMulti clang; - gccMultiStdenv = overrideCC stdenv gcc_multi; - clangMultiStdenv = overrideCC stdenv clang_multi; + gccMultiStdenv = overrideCC stdenv buildPackages.gcc_multi; + clangMultiStdenv = overrideCC stdenv buildPackages.clang_multi; multiStdenv = if stdenv.cc.isClang then clangMultiStdenv else gccMultiStdenv; gcc_debug = lowPrio (wrapCC (gcc.cc.override { @@ -7967,7 +7967,7 @@ in pforth = callPackage ../development/compilers/pforth {}; picat = callPackage ../development/compilers/picat { - stdenv = overrideCC stdenv gcc49; + stdenv = overrideCC stdenv buildPackages.gcc49; }; ponyc = callPackage ../development/compilers/ponyc { @@ -8625,7 +8625,7 @@ in spidermonkey_38 = callPackage ../development/interpreters/spidermonkey/38.nix ({ inherit (darwin) libobjc; } // (stdenv.lib.optionalAttrs (stdenv.cc.isGNU && stdenv.hostPlatform.isi686) { - stdenv = overrideCC stdenv gcc6; # with gcc-7: undefined reference to `__divmoddi4' + stdenv = overrideCC stdenv buildPackages.gcc6; # with gcc-7: undefined reference to `__divmoddi4' })); spidermonkey_52 = callPackage ../development/interpreters/spidermonkey/52.nix { }; spidermonkey_60 = callPackage ../development/interpreters/spidermonkey/60.nix { }; @@ -8878,7 +8878,7 @@ in yacc = bison; # TODO: move to aliases.nix blackmagic = callPackage ../development/tools/misc/blackmagic { - stdenv = overrideCC stdenv gcc6; + stdenv = overrideCC stdenv buildPackages.gcc6; gcc-arm-embedded = pkgsCross.arm-embedded.buildPackages.gcc; binutils-arm-embedded = pkgsCross.arm-embedded.buildPackages.binutils; }; @@ -8937,7 +8937,7 @@ in # should be owned by user root, group nixbld with permissions 0770. ccacheWrapper = makeOverridable ({ extraConfig ? "" }: wrapCC (ccache.links extraConfig)) {}; - ccacheStdenv = lowPrio (overrideCC stdenv ccacheWrapper); + ccacheStdenv = lowPrio (overrideCC stdenv buildPackages.ccacheWrapper); cccc = callPackage ../development/tools/analysis/cccc { }; @@ -9103,7 +9103,7 @@ in # distccWrapper = makeOverridable ({ extraConfig ? "" }: wrapCC (distcc.links extraConfig)) {}; - distccStdenv = lowPrio (overrideCC stdenv distccWrapper); + distccStdenv = lowPrio (overrideCC stdenv buildPackages.distccWrapper); distccMasquerade = if stdenv.isDarwin then null @@ -10922,27 +10922,27 @@ in nativeBuildRoot = buildPackages.icu58.override { buildRootOnly = true; }; } // (stdenv.lib.optionalAttrs (stdenv.cc.isGNU && stdenv.hostPlatform.isi686) { - stdenv = overrideCC stdenv gcc6; # with gcc-7: undefined reference to `__divmoddi4' + stdenv = overrideCC stdenv buildPackages.gcc6; # with gcc-7: undefined reference to `__divmoddi4' })); icu59 = callPackage ../development/libraries/icu/59.nix ({ nativeBuildRoot = buildPackages.icu59.override { buildRootOnly = true; }; } // (stdenv.lib.optionalAttrs (stdenv.cc.isGNU && stdenv.hostPlatform.isi686) { - stdenv = overrideCC stdenv gcc6; # with gcc-7: undefined reference to `__divmoddi4' + stdenv = overrideCC stdenv buildPackages.gcc6; # with gcc-7: undefined reference to `__divmoddi4' })); icu60 = callPackage ../development/libraries/icu/60.nix ({ nativeBuildRoot = buildPackages.icu60.override { buildRootOnly = true; }; } // (stdenv.lib.optionalAttrs (stdenv.cc.isGNU && stdenv.hostPlatform.isi686) { - stdenv = overrideCC stdenv gcc6; # with gcc-7: undefined reference to `__divmoddi4' + stdenv = overrideCC stdenv buildPackages.gcc6; # with gcc-7: undefined reference to `__divmoddi4' })); icu63 = callPackage ../development/libraries/icu/63.nix ({ nativeBuildRoot = buildPackages.icu63.override { buildRootOnly = true; }; } // (stdenv.lib.optionalAttrs (stdenv.cc.isGNU && stdenv.hostPlatform.isi686) { - stdenv = overrideCC stdenv gcc6; # with gcc-7: undefined reference to `__divmoddi4' + stdenv = overrideCC stdenv buildPackages.gcc6; # with gcc-7: undefined reference to `__divmoddi4' })); icu64 = callPackage ../development/libraries/icu/64.nix ({ nativeBuildRoot = buildPackages.icu64.override { buildRootOnly = true; }; } // (stdenv.lib.optionalAttrs (stdenv.cc.isGNU && stdenv.hostPlatform.isi686) { - stdenv = overrideCC stdenv gcc6; # with gcc-7: undefined reference to `__divmoddi4' + stdenv = overrideCC stdenv buildPackages.gcc6; # with gcc-7: undefined reference to `__divmoddi4' })); icu = icu64; @@ -12495,7 +12495,7 @@ in opal = callPackage ../development/libraries/opal { ffmpeg = ffmpeg_2; - stdenv = overrideCC stdenv gcc6; + stdenv = overrideCC stdenv buildPackages.gcc6; }; openh264 = callPackage ../development/libraries/openh264 { }; @@ -13505,13 +13505,13 @@ in v8_3_14 = callPackage ../development/libraries/v8/3.14.nix { inherit (python2Packages) python gyp; cctools = darwin.cctools; - stdenv = overrideCC stdenv gcc5; + stdenv = overrideCC stdenv buildPackages.gcc5; }; v8_3_16_14 = callPackage ../development/libraries/v8/3.16.14.nix { inherit (python2Packages) python gyp; cctools = darwin.cctools; - stdenv = if stdenv.isDarwin then stdenv else overrideCC stdenv gcc5; + stdenv = if stdenv.isDarwin then stdenv else overrideCC stdenv buildPackages.gcc5; }; v8_5_x = callPackage ../development/libraries/v8/5_x.nix ({ @@ -13519,7 +13519,7 @@ in icu = icu58; # v8-5.4.232 fails against icu4c-59.1 } // lib.optionalAttrs stdenv.isLinux { # doesn't build with gcc7 - stdenv = overrideCC stdenv gcc6; + stdenv = overrideCC stdenv buildPackages.gcc6; }); v8_6_x = v8; @@ -13527,7 +13527,7 @@ in inherit (python2Packages) python; } // lib.optionalAttrs stdenv.isLinux { # doesn't build with gcc7 - stdenv = overrideCC stdenv gcc6; + stdenv = overrideCC stdenv buildPackages.gcc6; }; vaapiIntel = callPackage ../development/libraries/vaapi-intel { }; @@ -13611,7 +13611,7 @@ in vxl = callPackage ../development/libraries/vxl { libpng = libpng12; - stdenv = overrideCC stdenv gcc6; # upstream code incompatible with gcc7 + stdenv = overrideCC stdenv buildPackages.gcc6; # upstream code incompatible with gcc7 }; wavpack = callPackage ../development/libraries/wavpack { }; @@ -13629,7 +13629,7 @@ in webkitgtk = callPackage ../development/libraries/webkitgtk { harfbuzz = harfbuzzFull; inherit (gst_all_1) gst-plugins-base gst-plugins-bad; - stdenv = overrideCC stdenv gcc6; + stdenv = overrideCC stdenv buildPackages.gcc6; }; webkitgtk24x-gtk3 = callPackage ../development/libraries/webkitgtk/2.4.nix { @@ -14215,8 +14215,8 @@ in fingerd_bsd = callPackage ../servers/fingerd/bsd-fingerd { }; - firebird = callPackage ../servers/firebird { icu = null; stdenv = overrideCC stdenv gcc5; }; - firebirdSuper = firebird.override { icu = icu58; superServer = true; stdenv = overrideCC stdenv gcc5; }; + firebird = callPackage ../servers/firebird { icu = null; stdenv = overrideCC stdenv buildPackages.gcc5; }; + firebirdSuper = firebird.override { icu = icu58; superServer = true; stdenv = overrideCC stdenv buildPackages.gcc5; }; foswiki = callPackage ../servers/foswiki { }; @@ -15190,7 +15190,7 @@ in kmscube = callPackage ../os-specific/linux/kmscube { }; kmsxx = callPackage ../development/libraries/kmsxx { - stdenv = overrideCC stdenv gcc6; + stdenv = overrideCC stdenv buildPackages.gcc6; }; latencytop = callPackage ../os-specific/linux/latencytop { }; @@ -16783,7 +16783,7 @@ in afterstep = callPackage ../applications/window-managers/afterstep { fltk = fltk13; gtk = gtk2; - stdenv = overrideCC stdenv gcc49; + stdenv = overrideCC stdenv buildPackages.gcc49; }; agedu = callPackage ../tools/misc/agedu { }; @@ -17024,7 +17024,7 @@ in blender = callPackage ../applications/misc/blender { pythonPackages = python35Packages; - stdenv = overrideCC stdenv gcc6; + stdenv = overrideCC stdenv buildPackages.gcc6; }; bluefish = callPackage ../applications/editors/bluefish { @@ -17069,7 +17069,7 @@ in calf = callPackage ../applications/audio/calf { inherit (gnome2) libglade; - stdenv = overrideCC stdenv gcc5; + stdenv = overrideCC stdenv buildPackages.gcc5; }; calcurse = callPackage ../applications/misc/calcurse { }; @@ -18611,7 +18611,7 @@ in k3d = callPackage ../applications/graphics/k3d { inherit (pkgs.gnome2) gtkglext; - stdenv = overrideCC stdenv gcc6; + stdenv = overrideCC stdenv buildPackages.gcc6; boost = boost166.override { enablePython = true; }; }; @@ -19046,7 +19046,7 @@ in }; xmr-stak = callPackage ../applications/misc/xmr-stak { - stdenvGcc6 = overrideCC stdenv gcc6; + stdenvGcc6 = overrideCC stdenv buildPackages.gcc6; }; xmrig = callPackage ../applications/misc/xmrig { }; @@ -19334,7 +19334,7 @@ in maxlib = callPackage ../applications/audio/pd-plugins/maxlib { }; maxscale = callPackage ../tools/networking/maxscale { - stdenv = overrideCC stdenv gcc6; + stdenv = overrideCC stdenv buildPackages.gcc6; }; pdfdiff = callPackage ../applications/misc/pdfdiff { }; @@ -19445,7 +19445,7 @@ in openfx = callPackage ../development/libraries/openfx {}; openimageio = callPackage ../applications/graphics/openimageio { - stdenv = overrideCC stdenv gcc6; + stdenv = overrideCC stdenv buildPackages.gcc6; }; openimageio2 = callPackage ../applications/graphics/openimageio/2.x.nix { }; @@ -19501,7 +19501,7 @@ in palemoon = callPackage ../applications/networking/browsers/palemoon { # https://forum.palemoon.org/viewtopic.php?f=57&t=15296#p111146 - stdenv = overrideCC stdenv gcc49; + stdenv = overrideCC stdenv buildPackages.gcc49; }; pamix = callPackage ../applications/audio/pamix { }; @@ -21284,7 +21284,7 @@ in arena = callPackage ../games/arena {}; arx-libertatis = callPackage ../games/arx-libertatis { - stdenv = overrideCC stdenv gcc6; + stdenv = overrideCC stdenv buildPackages.gcc6; }; asc = callPackage ../games/asc { @@ -22288,7 +22288,7 @@ in aragorn = callPackage ../applications/science/biology/aragorn { }; archimedes = callPackage ../applications/science/electronics/archimedes { - stdenv = overrideCC stdenv gcc49; + stdenv = overrideCC stdenv buildPackages.gcc49; }; bedtools = callPackage ../applications/science/biology/bedtools { }; @@ -23191,7 +23191,7 @@ in dumb = callPackage ../misc/dumb { }; emulationstation = callPackage ../misc/emulators/emulationstation { - stdenv = overrideCC stdenv gcc5; + stdenv = overrideCC stdenv buildPackages.gcc5; }; electricsheep = callPackage ../misc/screensavers/electricsheep { }; From 53a374d98dad90376e42b8a9dc26689094609735 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Mon, 17 Jun 2019 18:00:10 -0700 Subject: [PATCH 38/90] python37Packages.sasmodels: 0.99 -> 1.0.0 Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools. This update was made based on information from https://repology.org/metapackage/python3.7-sasmodels/versions --- pkgs/development/python-modules/sasmodels/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/sasmodels/default.nix b/pkgs/development/python-modules/sasmodels/default.nix index 116ada8e9544..bf0b1e015637 100644 --- a/pkgs/development/python-modules/sasmodels/default.nix +++ b/pkgs/development/python-modules/sasmodels/default.nix @@ -4,13 +4,13 @@ buildPythonPackage rec { pname = "sasmodels"; - version = "0.99"; + version = "1.0.0"; src = fetchFromGitHub { owner = "SasView"; repo = "sasmodels"; rev = "v${version}"; - sha256 = "1lcvn42h29i0mg4i75xn0dbk711q9ycyhm3h95skqy8i61qmjrx6"; + sha256 = "082wnk10axincc4a62zxyr33l7v80yf7iz630y3421b50fwwyd8j"; }; buildInputs = [ opencl-headers ]; From 70cf3459471e68edf52abc01e5a0155de3d79ccb Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Mon, 17 Jun 2019 08:48:13 -0700 Subject: [PATCH 39/90] python37Packages.aniso8601: 6.0.0 -> 7.0.0 Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools. This update was made based on information from https://repology.org/metapackage/python3.7-aniso8601/versions --- pkgs/development/python-modules/aniso8601/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/aniso8601/default.nix b/pkgs/development/python-modules/aniso8601/default.nix index 76b5d97e2813..1d5bf641f7cf 100644 --- a/pkgs/development/python-modules/aniso8601/default.nix +++ b/pkgs/development/python-modules/aniso8601/default.nix @@ -3,7 +3,7 @@ buildPythonPackage rec { pname = "aniso8601"; - version = "6.0.0"; + version = "7.0.0"; meta = with stdenv.lib; { description = "Parses ISO 8601 strings."; @@ -17,6 +17,6 @@ buildPythonPackage rec { src = fetchPypi { inherit pname version; - sha256 = "1bylfskk08ahyma25i8w3mcd0kywpxqx6icv5p7m1z0i8srak9mq"; + sha256 = "07jgf55yq2j2q76gaj3hakflnxg8yfkarzvrmq33i1dp6xk2ngai"; }; } From 9bf6694abf349fb7c0ec9641e6438bb7ddd1dca0 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Mon, 17 Jun 2019 15:38:57 -0700 Subject: [PATCH 40/90] python37Packages.progressbar2: 3.39.3 -> 3.42.0 Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools. This update was made based on information from https://repology.org/metapackage/python3.7-progressbar2/versions --- pkgs/development/python-modules/progressbar2/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/progressbar2/default.nix b/pkgs/development/python-modules/progressbar2/default.nix index a8afd97c4340..e348ace06b4f 100644 --- a/pkgs/development/python-modules/progressbar2/default.nix +++ b/pkgs/development/python-modules/progressbar2/default.nix @@ -16,11 +16,11 @@ buildPythonPackage rec { pname = "progressbar2"; - version = "3.39.3"; + version = "3.42.0"; src = fetchPypi { inherit pname version; - sha256 = "0fgy4327xzn232br4as74r6ddg5v6ycmfwga7xybp4s1w0cm8nwf"; + sha256 = "0a26r022lvz0vvwvhq2rfyl6h0hxbayvgbnajpnc0fc8f4gzr1n0"; }; postPatch = '' From 9559da73a2606fc525f74a9967560ec94ef8d37e Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Wed, 19 Jun 2019 11:17:37 -0700 Subject: [PATCH 41/90] pythonPackages.ndg-httpsclient: 0.4.2 -> 0.5.1 --- pkgs/development/python-modules/ndg-httpsclient/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/ndg-httpsclient/default.nix b/pkgs/development/python-modules/ndg-httpsclient/default.nix index 780f2c330860..d9c7e41c576f 100644 --- a/pkgs/development/python-modules/ndg-httpsclient/default.nix +++ b/pkgs/development/python-modules/ndg-httpsclient/default.nix @@ -5,7 +5,7 @@ }: buildPythonPackage rec { - version = "0.4.2"; + version = "0.5.1"; pname = "ndg-httpsclient"; propagatedBuildInputs = [ pyopenssl ]; @@ -14,7 +14,7 @@ buildPythonPackage rec { owner = "cedadev"; repo = "ndg_httpsclient"; rev = version; - sha256 = "1kk4knv029j0cicfiv23c1rayc1n3f1j3rhl0527gxiv0qv4jw8h"; + sha256 = "0lhsgs4am4xyjssng5p0vkfwqncczj1dpa0vss4lrhzq86mnn5rz"; }; # uses networking From d27c1f64f49e3929494414cc12169c498a471692 Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Thu, 20 Jun 2019 14:55:30 -0700 Subject: [PATCH 42/90] pythonPackages.imgaug: mark as broken --- pkgs/development/python-modules/imgaug/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/python-modules/imgaug/default.nix b/pkgs/development/python-modules/imgaug/default.nix index d950036ec484..3946c0df6bc2 100644 --- a/pkgs/development/python-modules/imgaug/default.nix +++ b/pkgs/development/python-modules/imgaug/default.nix @@ -25,5 +25,6 @@ buildPythonPackage rec { description = "Image augmentation for machine learning experiments"; license = licenses.mit; maintainers = with maintainers; [ cmcdragonkai ]; + broken = true; # opencv-python bindings aren't available yet, and look non-trivial }; } From 536abf3c640d977aa138267ceff42bdf7a95c2d7 Mon Sep 17 00:00:00 2001 From: makefu Date: Tue, 4 Jun 2019 11:34:37 +0200 Subject: [PATCH 43/90] python.pkgs.gtts-token: init at 1.1.3 --- .../python-modules/gtts-token/default.nix | 31 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 33 insertions(+) create mode 100644 pkgs/development/python-modules/gtts-token/default.nix diff --git a/pkgs/development/python-modules/gtts-token/default.nix b/pkgs/development/python-modules/gtts-token/default.nix new file mode 100644 index 000000000000..62d709aa9217 --- /dev/null +++ b/pkgs/development/python-modules/gtts-token/default.nix @@ -0,0 +1,31 @@ +{ lib +, buildPythonPackage +, fetchPypi +, requests +}: + +buildPythonPackage rec { + pname = "gtts-token"; + version = "1.1.3"; + + src = fetchPypi { + pname = "gTTS-token"; + inherit version; + sha256 = "9d6819a85b813f235397ef931ad4b680f03d843c9b2a9e74dd95175a4bc012c5"; + }; + + propagatedBuildInputs = [ + requests + ]; + + # Tests only in github repo, require working internet connection + doCheck = false; + + meta = with lib; { + description = "Calculates a token to run the Google Translate text to speech"; + homepage = https://github.com/boudewijn26/gTTS-token; + license = licenses.mit; + maintainers = [ maintainers.makefu ]; + }; +} + diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 6f43c49050b8..9bef1b877096 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3002,6 +3002,8 @@ in { gspread = callPackage ../development/python-modules/gspread { }; + gtts-token = callPackage ../development/python-modules/gtts-token { }; + gym = callPackage ../development/python-modules/gym { }; gyp = callPackage ../development/python-modules/gyp { }; From aa54135d2cc96c3767c1d775d867ba5fd3012bb6 Mon Sep 17 00:00:00 2001 From: makefu Date: Tue, 4 Jun 2019 11:35:18 +0200 Subject: [PATCH 44/90] home-assistant: update component-packages adds gtts-token to google_translate component --- pkgs/servers/home-assistant/component-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index 09c1ec3592d0..8a2c8d0e7195 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -259,7 +259,7 @@ "google_domains" = ps: with ps; [ ]; "google_maps" = ps: with ps; [ ]; "google_pubsub" = ps: with ps; [ google_cloud_pubsub ]; - "google_translate" = ps: with ps; [ ]; + "google_translate" = ps: with ps; [ gtts-token ]; "google_travel_time" = ps: with ps; [ ]; "google_wifi" = ps: with ps; [ ]; "googlehome" = ps: with ps; [ ]; From 0be4e0cca73a80e34f80dc8d5feaf26f2dc37efa Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Sun, 23 Jun 2019 12:09:11 -0500 Subject: [PATCH 45/90] lazygit: 0.7.2 -> 0.8 --- pkgs/development/tools/lazygit/default.nix | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/pkgs/development/tools/lazygit/default.nix b/pkgs/development/tools/lazygit/default.nix index d142078c50fa..f91938fb62e3 100644 --- a/pkgs/development/tools/lazygit/default.nix +++ b/pkgs/development/tools/lazygit/default.nix @@ -1,27 +1,24 @@ { stdenv, buildGoPackage, fetchFromGitHub }: buildGoPackage rec { - name = "lazygit-${version}"; - version = "0.7.2"; + pname = "lazygit"; + version = "0.8"; goPackagePath = "github.com/jesseduffield/lazygit"; + subPackages = [ "." ]; + src = fetchFromGitHub { owner = "jesseduffield"; - repo = "lazygit"; + repo = pname; rev = "v${version}"; - sha256 = "1b5mzmxw715cx7b0n22hvrpk0dbavzypljc7skwmh8k1nlx935jj"; + sha256 = "0zynw5gr96a59x1qshzhhvld883ndf1plnw6l9dbhmff0wcfv6l1"; }; - postPatch = '' - rm -rf scripts - ''; - meta = with stdenv.lib; { - inherit (src.meta) homepage; description = "Simple terminal UI for git commands"; + homepage = "https://github.com/jesseduffield/lazygit"; license = licenses.mit; - maintainers = with stdenv.lib.maintainers; [ fpletz ]; - platforms = stdenv.lib.platforms.unix; + maintainers = with maintainers; [ fpletz ]; }; } From 6389a0a1327356d6fcb9640491f03d19ce111d61 Mon Sep 17 00:00:00 2001 From: Tobias Mayer Date: Sun, 23 Jun 2019 20:49:22 +0200 Subject: [PATCH 46/90] Use of gccXStdenv instead of inplace overrideCC --- pkgs/top-level/all-packages.nix | 89 +++++++++++++++++---------------- 1 file changed, 46 insertions(+), 43 deletions(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 7ca8bae5582b..0070e6310290 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -671,7 +671,7 @@ in apt = callPackage ../tools/package-management/apt { # include/c++/6.4.0/cstdlib:75:25: fatal error: stdlib.h: No such file or directory - stdenv = overrideCC stdenv buildPackages.gcc5; + stdenv = gcc5Stdenv; }; apt-dater = callPackage ../tools/package-management/apt-dater { }; @@ -2805,7 +2805,7 @@ in exa = callPackage ../tools/misc/exa { }; exempi = callPackage ../development/libraries/exempi { - stdenv = if stdenv.isi686 then overrideCC stdenv buildPackages.gcc6 else stdenv; + stdenv = if stdenv.isi686 then gcc6Stdenv else stdenv; }; execline = skawarePackages.execline; @@ -3081,7 +3081,7 @@ in fusuma = callPackage ../tools/inputmethods/fusuma {}; fdbPackages = dontRecurseIntoAttrs (callPackage ../servers/foundationdb { - stdenv49 = overrideCC stdenv buildPackages.gcc49; + stdenv49 = gcc49Stdenv; }); inherit (fdbPackages) @@ -3250,7 +3250,7 @@ in gnash = callPackage ../misc/gnash { }; gnaural = callPackage ../applications/audio/gnaural { - stdenv = overrideCC stdenv buildPackages.gcc49; + stdenv = gcc49Stdenv; }; gnirehtet = callPackage ../tools/networking/gnirehtet { }; @@ -6381,7 +6381,7 @@ in udptunnel = callPackage ../tools/networking/udptunnel { }; ufraw = callPackage ../applications/graphics/ufraw { - stdenv = overrideCC stdenv buildPackages.gcc6; # doesn't build with gcc7 + stdenv = gcc6Stdenv; # doesn't build with gcc7 }; uftrace = callPackage ../development/tools/uftrace { }; @@ -7090,7 +7090,7 @@ in avian = callPackage ../development/compilers/avian { inherit (darwin.apple_sdk.frameworks) CoreServices Foundation; - stdenv = if stdenv.cc.isGNU then overrideCC stdenv buildPackages.gcc49 else stdenv; + stdenv = if stdenv.cc.isGNU then gcc49Stdenv else stdenv; }; bigloo = callPackage ../development/compilers/bigloo { }; @@ -7229,6 +7229,9 @@ in extraBuildInputs = lib.optional stdenv.hostPlatform.isDarwin clang.cc; }; + gcc49Stdenv = overrideCC gccStdenv buildPackages.gcc49; + gcc5Stdenv = overrideCC gccStdenv buildPackages.gcc5; + gcc6Stdenv = overrideCC gccStdenv buildPackages.gcc6; gcc7Stdenv = overrideCC gccStdenv buildPackages.gcc7; gcc8Stdenv = overrideCC gccStdenv buildPackages.gcc8; gcc9Stdenv = overrideCC gccStdenv buildPackages.gcc9; @@ -7803,7 +7806,7 @@ in llvmPackages_35 = callPackage ../development/compilers/llvm/3.5 ({ isl = isl_0_14; } // stdenv.lib.optionalAttrs (stdenv.cc.isGNU && stdenv.hostPlatform.isi686) { - stdenv = overrideCC stdenv buildPackages.gcc6; + stdenv = gcc6Stdenv; }); llvmPackages_38 = callPackage ../development/compilers/llvm/3.8 ({ @@ -7811,7 +7814,7 @@ in buildLlvmTools = buildPackages.llvmPackages_38.tools; targetLlvmLibraries = targetPackages.llvmPackages_38.libraries; } // stdenv.lib.optionalAttrs (stdenv.cc.isGNU && stdenv.hostPlatform.isi686) { - stdenv = overrideCC stdenv buildPackages.gcc6; + stdenv = gcc6Stdenv; }); llvmPackages_39 = callPackage ../development/compilers/llvm/3.9 ({ @@ -7819,7 +7822,7 @@ in buildLlvmTools = buildPackages.llvmPackages_39.tools; targetLlvmLibraries = targetPackages.llvmPackages_39.libraries; } // stdenv.lib.optionalAttrs (stdenv.cc.isGNU && stdenv.hostPlatform.isi686) { - stdenv = overrideCC stdenv buildPackages.gcc6; + stdenv = gcc6Stdenv; }); llvmPackages_4 = callPackage ../development/compilers/llvm/4 ({ @@ -7827,7 +7830,7 @@ in buildLlvmTools = buildPackages.llvmPackages_4.tools; targetLlvmLibraries = targetPackages.llvmPackages_4.libraries; } // stdenv.lib.optionalAttrs (stdenv.cc.isGNU && stdenv.hostPlatform.isi686) { - stdenv = overrideCC stdenv buildPackages.gcc6; + stdenv = gcc6Stdenv; }); llvmPackages_5 = callPackage ../development/compilers/llvm/5 ({ @@ -7835,7 +7838,7 @@ in buildLlvmTools = buildPackages.llvmPackages_5.tools; targetLlvmLibraries = targetPackages.llvmPackages_5.libraries; } // stdenv.lib.optionalAttrs (stdenv.cc.isGNU && stdenv.hostPlatform.isi686) { - stdenv = overrideCC stdenv buildPackages.gcc6; # with gcc-7: undefined reference to `__divmoddi4' + stdenv = gcc6Stdenv; # with gcc-7: undefined reference to `__divmoddi4' }); llvmPackages_6 = callPackage ../development/compilers/llvm/6 ({ @@ -7843,7 +7846,7 @@ in buildLlvmTools = buildPackages.llvmPackages_6.tools; targetLlvmLibraries = targetPackages.llvmPackages_6.libraries; } // stdenv.lib.optionalAttrs (stdenv.cc.isGNU && stdenv.hostPlatform.isi686) { - stdenv = overrideCC stdenv buildPackages.gcc6; # with gcc-7: undefined reference to `__divmoddi4' + stdenv = gcc6Stdenv; # with gcc-7: undefined reference to `__divmoddi4' }); llvmPackages_7 = callPackage ../development/compilers/llvm/7 ({ @@ -7851,7 +7854,7 @@ in buildLlvmTools = buildPackages.llvmPackages_7.tools; targetLlvmLibraries = targetPackages.llvmPackages_7.libraries; } // stdenv.lib.optionalAttrs (buildPackages.stdenv.cc.isGNU && stdenv.hostPlatform.isi686) { - stdenv = overrideCC stdenv buildPackages.gcc6; # with gcc-7: undefined reference to `__divmoddi4' + stdenv = gcc6Stdenv; # with gcc-7: undefined reference to `__divmoddi4' }); llvmPackages_8 = callPackage ../development/compilers/llvm/8 ({ @@ -7859,7 +7862,7 @@ in buildLlvmTools = buildPackages.llvmPackages_8.tools; targetLlvmLibraries = targetPackages.llvmPackages_8.libraries; } // stdenv.lib.optionalAttrs (buildPackages.stdenv.cc.isGNU && stdenv.hostPlatform.isi686) { - stdenv = overrideCC stdenv buildPackages.gcc6; # with gcc-7: undefined reference to `__divmoddi4' + stdenv = gcc6Stdenv; # with gcc-7: undefined reference to `__divmoddi4' }); llvmPackages_latest = llvmPackages_8; @@ -7967,7 +7970,7 @@ in pforth = callPackage ../development/compilers/pforth {}; picat = callPackage ../development/compilers/picat { - stdenv = overrideCC stdenv buildPackages.gcc49; + stdenv = gcc49Stdenv; }; ponyc = callPackage ../development/compilers/ponyc { @@ -8625,7 +8628,7 @@ in spidermonkey_38 = callPackage ../development/interpreters/spidermonkey/38.nix ({ inherit (darwin) libobjc; } // (stdenv.lib.optionalAttrs (stdenv.cc.isGNU && stdenv.hostPlatform.isi686) { - stdenv = overrideCC stdenv buildPackages.gcc6; # with gcc-7: undefined reference to `__divmoddi4' + stdenv = gcc6Stdenv; # with gcc-7: undefined reference to `__divmoddi4' })); spidermonkey_52 = callPackage ../development/interpreters/spidermonkey/52.nix { }; spidermonkey_60 = callPackage ../development/interpreters/spidermonkey/60.nix { }; @@ -8878,7 +8881,7 @@ in yacc = bison; # TODO: move to aliases.nix blackmagic = callPackage ../development/tools/misc/blackmagic { - stdenv = overrideCC stdenv buildPackages.gcc6; + stdenv = gcc6Stdenv; gcc-arm-embedded = pkgsCross.arm-embedded.buildPackages.gcc; binutils-arm-embedded = pkgsCross.arm-embedded.buildPackages.binutils; }; @@ -10922,27 +10925,27 @@ in nativeBuildRoot = buildPackages.icu58.override { buildRootOnly = true; }; } // (stdenv.lib.optionalAttrs (stdenv.cc.isGNU && stdenv.hostPlatform.isi686) { - stdenv = overrideCC stdenv buildPackages.gcc6; # with gcc-7: undefined reference to `__divmoddi4' + stdenv = gcc6Stdenv; # with gcc-7: undefined reference to `__divmoddi4' })); icu59 = callPackage ../development/libraries/icu/59.nix ({ nativeBuildRoot = buildPackages.icu59.override { buildRootOnly = true; }; } // (stdenv.lib.optionalAttrs (stdenv.cc.isGNU && stdenv.hostPlatform.isi686) { - stdenv = overrideCC stdenv buildPackages.gcc6; # with gcc-7: undefined reference to `__divmoddi4' + stdenv = gcc6Stdenv; # with gcc-7: undefined reference to `__divmoddi4' })); icu60 = callPackage ../development/libraries/icu/60.nix ({ nativeBuildRoot = buildPackages.icu60.override { buildRootOnly = true; }; } // (stdenv.lib.optionalAttrs (stdenv.cc.isGNU && stdenv.hostPlatform.isi686) { - stdenv = overrideCC stdenv buildPackages.gcc6; # with gcc-7: undefined reference to `__divmoddi4' + stdenv = gcc6Stdenv; # with gcc-7: undefined reference to `__divmoddi4' })); icu63 = callPackage ../development/libraries/icu/63.nix ({ nativeBuildRoot = buildPackages.icu63.override { buildRootOnly = true; }; } // (stdenv.lib.optionalAttrs (stdenv.cc.isGNU && stdenv.hostPlatform.isi686) { - stdenv = overrideCC stdenv buildPackages.gcc6; # with gcc-7: undefined reference to `__divmoddi4' + stdenv = gcc6Stdenv; # with gcc-7: undefined reference to `__divmoddi4' })); icu64 = callPackage ../development/libraries/icu/64.nix ({ nativeBuildRoot = buildPackages.icu64.override { buildRootOnly = true; }; } // (stdenv.lib.optionalAttrs (stdenv.cc.isGNU && stdenv.hostPlatform.isi686) { - stdenv = overrideCC stdenv buildPackages.gcc6; # with gcc-7: undefined reference to `__divmoddi4' + stdenv = gcc6Stdenv; # with gcc-7: undefined reference to `__divmoddi4' })); icu = icu64; @@ -12495,7 +12498,7 @@ in opal = callPackage ../development/libraries/opal { ffmpeg = ffmpeg_2; - stdenv = overrideCC stdenv buildPackages.gcc6; + stdenv = gcc6Stdenv; }; openh264 = callPackage ../development/libraries/openh264 { }; @@ -13505,13 +13508,13 @@ in v8_3_14 = callPackage ../development/libraries/v8/3.14.nix { inherit (python2Packages) python gyp; cctools = darwin.cctools; - stdenv = overrideCC stdenv buildPackages.gcc5; + stdenv = gcc5Stdenv; }; v8_3_16_14 = callPackage ../development/libraries/v8/3.16.14.nix { inherit (python2Packages) python gyp; cctools = darwin.cctools; - stdenv = if stdenv.isDarwin then stdenv else overrideCC stdenv buildPackages.gcc5; + stdenv = if stdenv.isDarwin then stdenv else gcc5Stdenv; }; v8_5_x = callPackage ../development/libraries/v8/5_x.nix ({ @@ -13519,7 +13522,7 @@ in icu = icu58; # v8-5.4.232 fails against icu4c-59.1 } // lib.optionalAttrs stdenv.isLinux { # doesn't build with gcc7 - stdenv = overrideCC stdenv buildPackages.gcc6; + stdenv = gcc6Stdenv; }); v8_6_x = v8; @@ -13527,7 +13530,7 @@ in inherit (python2Packages) python; } // lib.optionalAttrs stdenv.isLinux { # doesn't build with gcc7 - stdenv = overrideCC stdenv buildPackages.gcc6; + stdenv = gcc6Stdenv; }; vaapiIntel = callPackage ../development/libraries/vaapi-intel { }; @@ -13611,7 +13614,7 @@ in vxl = callPackage ../development/libraries/vxl { libpng = libpng12; - stdenv = overrideCC stdenv buildPackages.gcc6; # upstream code incompatible with gcc7 + stdenv = gcc6Stdenv; # upstream code incompatible with gcc7 }; wavpack = callPackage ../development/libraries/wavpack { }; @@ -13629,7 +13632,7 @@ in webkitgtk = callPackage ../development/libraries/webkitgtk { harfbuzz = harfbuzzFull; inherit (gst_all_1) gst-plugins-base gst-plugins-bad; - stdenv = overrideCC stdenv buildPackages.gcc6; + stdenv = gcc6Stdenv; }; webkitgtk24x-gtk3 = callPackage ../development/libraries/webkitgtk/2.4.nix { @@ -14215,8 +14218,8 @@ in fingerd_bsd = callPackage ../servers/fingerd/bsd-fingerd { }; - firebird = callPackage ../servers/firebird { icu = null; stdenv = overrideCC stdenv buildPackages.gcc5; }; - firebirdSuper = firebird.override { icu = icu58; superServer = true; stdenv = overrideCC stdenv buildPackages.gcc5; }; + firebird = callPackage ../servers/firebird { icu = null; stdenv = gcc5Stdenv; }; + firebirdSuper = firebird.override { icu = icu58; superServer = true; stdenv = gcc5Stdenv; }; foswiki = callPackage ../servers/foswiki { }; @@ -15190,7 +15193,7 @@ in kmscube = callPackage ../os-specific/linux/kmscube { }; kmsxx = callPackage ../development/libraries/kmsxx { - stdenv = overrideCC stdenv buildPackages.gcc6; + stdenv = gcc6Stdenv; }; latencytop = callPackage ../os-specific/linux/latencytop { }; @@ -16783,7 +16786,7 @@ in afterstep = callPackage ../applications/window-managers/afterstep { fltk = fltk13; gtk = gtk2; - stdenv = overrideCC stdenv buildPackages.gcc49; + stdenv = gcc49Stdenv; }; agedu = callPackage ../tools/misc/agedu { }; @@ -17024,7 +17027,7 @@ in blender = callPackage ../applications/misc/blender { pythonPackages = python35Packages; - stdenv = overrideCC stdenv buildPackages.gcc6; + stdenv = gcc6Stdenv; }; bluefish = callPackage ../applications/editors/bluefish { @@ -17069,7 +17072,7 @@ in calf = callPackage ../applications/audio/calf { inherit (gnome2) libglade; - stdenv = overrideCC stdenv buildPackages.gcc5; + stdenv = gcc5Stdenv; }; calcurse = callPackage ../applications/misc/calcurse { }; @@ -18611,7 +18614,7 @@ in k3d = callPackage ../applications/graphics/k3d { inherit (pkgs.gnome2) gtkglext; - stdenv = overrideCC stdenv buildPackages.gcc6; + stdenv = gcc6Stdenv; boost = boost166.override { enablePython = true; }; }; @@ -19046,7 +19049,7 @@ in }; xmr-stak = callPackage ../applications/misc/xmr-stak { - stdenvGcc6 = overrideCC stdenv buildPackages.gcc6; + stdenvGcc6 = gcc6Stdenv; }; xmrig = callPackage ../applications/misc/xmrig { }; @@ -19334,7 +19337,7 @@ in maxlib = callPackage ../applications/audio/pd-plugins/maxlib { }; maxscale = callPackage ../tools/networking/maxscale { - stdenv = overrideCC stdenv buildPackages.gcc6; + stdenv = gcc6Stdenv; }; pdfdiff = callPackage ../applications/misc/pdfdiff { }; @@ -19445,7 +19448,7 @@ in openfx = callPackage ../development/libraries/openfx {}; openimageio = callPackage ../applications/graphics/openimageio { - stdenv = overrideCC stdenv buildPackages.gcc6; + stdenv = gcc6Stdenv; }; openimageio2 = callPackage ../applications/graphics/openimageio/2.x.nix { }; @@ -19501,7 +19504,7 @@ in palemoon = callPackage ../applications/networking/browsers/palemoon { # https://forum.palemoon.org/viewtopic.php?f=57&t=15296#p111146 - stdenv = overrideCC stdenv buildPackages.gcc49; + stdenv = gcc49Stdenv; }; pamix = callPackage ../applications/audio/pamix { }; @@ -21284,7 +21287,7 @@ in arena = callPackage ../games/arena {}; arx-libertatis = callPackage ../games/arx-libertatis { - stdenv = overrideCC stdenv buildPackages.gcc6; + stdenv = gcc6Stdenv; }; asc = callPackage ../games/asc { @@ -22288,7 +22291,7 @@ in aragorn = callPackage ../applications/science/biology/aragorn { }; archimedes = callPackage ../applications/science/electronics/archimedes { - stdenv = overrideCC stdenv buildPackages.gcc49; + stdenv = gcc49Stdenv; }; bedtools = callPackage ../applications/science/biology/bedtools { }; @@ -23191,7 +23194,7 @@ in dumb = callPackage ../misc/dumb { }; emulationstation = callPackage ../misc/emulators/emulationstation { - stdenv = overrideCC stdenv buildPackages.gcc5; + stdenv = gcc5Stdenv; }; electricsheep = callPackage ../misc/screensavers/electricsheep { }; From 0687a9d8db00c73a2345a1a78273075d0e640ad1 Mon Sep 17 00:00:00 2001 From: Tadeo Kondrak Date: Tue, 18 Jun 2019 23:34:09 -0600 Subject: [PATCH 47/90] discord: change from 4 to 2 space indentation --- .../instant-messengers/discord/default.nix | 91 +++++++++---------- 1 file changed, 45 insertions(+), 46 deletions(-) diff --git a/pkgs/applications/networking/instant-messengers/discord/default.nix b/pkgs/applications/networking/instant-messengers/discord/default.nix index 1eba34423426..dbc4edf5167c 100644 --- a/pkgs/applications/networking/instant-messengers/discord/default.nix +++ b/pkgs/applications/networking/instant-messengers/discord/default.nix @@ -5,61 +5,60 @@ , pango, systemd, libXScrnSaver, libcxx, libpulseaudio }: stdenv.mkDerivation rec { + pname = "discord"; + version = "0.0.9"; - pname = "discord"; - version = "0.0.9"; + src = fetchurl { + url = "https://cdn.discordapp.com/apps/linux/${version}/${pname}-${version}.tar.gz"; + sha256 = "1i0f8id10rh2fx381hx151qckvvh8hbznfsfav8w0dfbd1bransf"; + }; - src = fetchurl { - url = "https://cdn.discordapp.com/apps/linux/${version}/${pname}-${version}.tar.gz"; - sha256 = "1i0f8id10rh2fx381hx151qckvvh8hbznfsfav8w0dfbd1bransf"; - }; + nativeBuildInputs = [ wrapGAppsHook ]; - nativeBuildInputs = [ wrapGAppsHook ]; + dontWrapGApps = true; - dontWrapGApps = true; + libPath = stdenv.lib.makeLibraryPath [ + libcxx systemd libpulseaudio + stdenv.cc.cc alsaLib atk at-spi2-atk cairo cups dbus expat fontconfig freetype + gdk_pixbuf glib gtk3 libnotify libX11 libXcomposite libuuid + libXcursor libXdamage libXext libXfixes libXi libXrandr libXrender + libXtst nspr nss libxcb pango systemd libXScrnSaver + ]; - libPath = stdenv.lib.makeLibraryPath [ - libcxx systemd libpulseaudio - stdenv.cc.cc alsaLib atk at-spi2-atk cairo cups dbus expat fontconfig freetype - gdk_pixbuf glib gtk3 libnotify libX11 libXcomposite libuuid - libXcursor libXdamage libXext libXfixes libXi libXrandr libXrender - libXtst nspr nss libxcb pango systemd libXScrnSaver - ]; + installPhase = '' + mkdir -p $out/{bin,opt/discord,share/pixmaps} + mv * $out/opt/discord - installPhase = '' - mkdir -p $out/{bin,opt/discord,share/pixmaps} - mv * $out/opt/discord + chmod +x $out/opt/discord/Discord + patchelf --set-interpreter ${stdenv.cc.bintools.dynamicLinker} \ + $out/opt/discord/Discord - chmod +x $out/opt/discord/Discord - patchelf --set-interpreter ${stdenv.cc.bintools.dynamicLinker} \ - $out/opt/discord/Discord + wrapProgram $out/opt/discord/Discord \ + "''${gappsWrapperArgs[@]}" \ + --prefix XDG_DATA_DIRS : "${gtk3}/share/gsettings-schemas/${gtk3.name}/" \ + --prefix LD_LIBRARY_PATH : ${libPath} - wrapProgram $out/opt/discord/Discord \ - "''${gappsWrapperArgs[@]}" \ - --prefix XDG_DATA_DIRS : "${gtk3}/share/gsettings-schemas/${gtk3.name}/" \ - --prefix LD_LIBRARY_PATH : ${libPath} + ln -s $out/opt/discord/Discord $out/bin/ + ln -s $out/opt/discord/discord.png $out/share/pixmaps - ln -s $out/opt/discord/Discord $out/bin/ - ln -s $out/opt/discord/discord.png $out/share/pixmaps + ln -s "${desktopItem}/share/applications" $out/share/ + ''; - ln -s "${desktopItem}/share/applications" $out/share/ - ''; + desktopItem = makeDesktopItem { + name = pname; + exec = "Discord"; + icon = pname; + desktopName = "Discord"; + genericName = meta.description; + categories = "Network;InstantMessaging;"; + }; - desktopItem = makeDesktopItem { - name = pname; - exec = "Discord"; - icon = pname; - desktopName = "Discord"; - genericName = meta.description; - categories = "Network;InstantMessaging;"; - }; - - meta = with stdenv.lib; { - description = "All-in-one cross-platform voice and text chat for gamers"; - homepage = https://discordapp.com/; - downloadPage = "https://github.com/crmarsh/discord-linux-bugs"; - license = licenses.unfree; - maintainers = [ maintainers.ldesgoui maintainers.MP2E ]; - platforms = [ "x86_64-linux" ]; - }; + meta = with stdenv.lib; { + description = "All-in-one cross-platform voice and text chat for gamers"; + homepage = https://discordapp.com/; + downloadPage = "https://github.com/crmarsh/discord-linux-bugs"; + license = licenses.unfree; + maintainers = [ maintainers.ldesgoui maintainers.MP2E ]; + platforms = [ "x86_64-linux" ]; + }; } From e6f23b8b1eebf83d8c63582845c74bee3a54a4b5 Mon Sep 17 00:00:00 2001 From: Tadeo Kondrak Date: Tue, 18 Jun 2019 23:39:15 -0600 Subject: [PATCH 48/90] discord-{ptb,canary}: init; add `update-discord` --- maintainers/scripts/update-discord | 36 ++++++++ .../instant-messengers/discord/base.nix | 61 ++++++++++++ .../instant-messengers/discord/default.nix | 92 +++++++------------ pkgs/top-level/all-packages.nix | 15 ++- 4 files changed, 143 insertions(+), 61 deletions(-) create mode 100755 maintainers/scripts/update-discord create mode 100644 pkgs/applications/networking/instant-messengers/discord/base.nix diff --git a/maintainers/scripts/update-discord b/maintainers/scripts/update-discord new file mode 100755 index 000000000000..23ec6e401be4 --- /dev/null +++ b/maintainers/scripts/update-discord @@ -0,0 +1,36 @@ +#!/usr/bin/env bash +# script to generate `pkgs/networking/instant-messengers/discord/default.nix` + +set -e +exec >${1:?usage: $0 } + +cat < Date: Thu, 20 Jun 2019 16:44:20 -0600 Subject: [PATCH 49/90] discord-canary: 0.0.83 -> 0.0.84 --- .../networking/instant-messengers/discord/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/networking/instant-messengers/discord/default.nix b/pkgs/applications/networking/instant-messengers/discord/default.nix index 585ddf1a5371..047a833e1633 100644 --- a/pkgs/applications/networking/instant-messengers/discord/default.nix +++ b/pkgs/applications/networking/instant-messengers/discord/default.nix @@ -27,10 +27,10 @@ in { pname = "discord-canary"; binaryName = "DiscordCanary"; desktopName = "Discord Canary"; - version = "0.0.83"; + version = "0.0.84"; src = fetchurl { - url = "https://dl-canary.discordapp.net/apps/linux/0.0.83/discord-canary-0.0.83.tar.gz"; - sha256 = "100a61x71cgyfm0xk4qdlbp1v41089jy7lajksbpy4y7him6bg2s"; + url = "https://dl-canary.discordapp.net/apps/linux/0.0.84/discord-canary-0.0.84.tar.gz"; + sha256 = "1s4m7qvwyb0zglgdcixfnp5asachkybfafbmr74c7zrb0scl80s1"; }; }; }.${branch} From 76ef802d3d60cc4d199f19ba69e8bcfe63b88e7b Mon Sep 17 00:00:00 2001 From: Bas van Dijk Date: Sun, 23 Jun 2019 21:11:49 +0200 Subject: [PATCH 50/90] mkShell: compose shellHooks Running the following expression with nix-shell: let pkgs = import {}; shell1 = pkgs.mkShell { shellHook = '' echo shell1 ''; }; shell2 = pkgs.mkShell { shellHook = '' echo shell2 ''; }; shell3 = pkgs.mkShell { inputsFrom = [ shell1 shell2 ]; shellHook = '' echo shell3 ''; }; in shell3 Will now results in: shell2 shell1 shell3 Note that packages in the front of inputsFrom have precedence over packages in the back. The outermost mkShell has precedence over all. --- pkgs/build-support/mkshell/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/build-support/mkshell/default.nix b/pkgs/build-support/mkshell/default.nix index a98b4affacba..698974590880 100644 --- a/pkgs/build-support/mkshell/default.nix +++ b/pkgs/build-support/mkshell/default.nix @@ -25,6 +25,7 @@ let "nativeBuildInputs" "propagatedBuildInputs" "propagatedNativeBuildInputs" + "shellHook" ]; in @@ -37,6 +38,9 @@ stdenv.mkDerivation ({ propagatedBuildInputs = mergeInputs "propagatedBuildInputs"; propagatedNativeBuildInputs = mergeInputs "propagatedNativeBuildInputs"; + shellHook = lib.concatStringsSep "\n" (lib.catAttrs "shellHook" + (lib.reverseList inputsFrom ++ [attrs])); + nobuildPhase = '' echo echo "This derivation is not meant to be built, aborting"; From cee35739ff0800f5738ecbedb43c356a2f06c96f Mon Sep 17 00:00:00 2001 From: Bas van Dijk Date: Sun, 23 Jun 2019 21:39:29 +0200 Subject: [PATCH 51/90] mkshell: improve mergeInputs mergeInputs is now simply defined in terms of `concatLists` and `catAttrs` instead of a more complicated `foldr`. Note that the order of PATH has also changed. For example running the following with nix-shell: let pkgs = import {}; shell1 = pkgs.mkShell { buildInputs = [ pkgs.htop ]; }; shell2 = pkgs.mkShell { buildInputs = [ pkgs.hello ]; }; shell3 = pkgs.mkShell { inputsFrom = [ shell1 shell2 ]; buildInputs = [ pkgs.tree ]; }; in shell3 Results in the following PATH: $ echo $PATH ... /nix/store/yifq4bikf7m07160bpia7z48ciqddbfi-tree-1.8.0/bin: /nix/store/vhxqk81234ivqw1a7j200a1c69k8mywi-htop-2.2.0/bin: /nix/store/n9vm3m58y1n3rg3mlll17wanc9hln58k-hello-2.10/bin ... Previously the order was: /nix/store/n9vm3m58y1n3rg3mlll17wanc9hln58k-hello-2.10/bin /nix/store/vhxqk81234ivqw1a7j200a1c69k8mywi-htop-2.2.0/bin: /nix/store/yifq4bikf7m07160bpia7z48ciqddbfi-tree-1.8.0/bin: I think the new order makes more sense because it allows to override the PATH in the outermost mkShell. --- pkgs/build-support/mkshell/default.nix | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/pkgs/build-support/mkshell/default.nix b/pkgs/build-support/mkshell/default.nix index 698974590880..a70dc0390cb5 100644 --- a/pkgs/build-support/mkshell/default.nix +++ b/pkgs/build-support/mkshell/default.nix @@ -11,13 +11,8 @@ ... }@attrs: let - mergeInputs = name: - let - op = item: sum: sum ++ item."${name}" or []; - nul = []; - list = [attrs] ++ inputsFrom; - in - lib.foldr op nul list; + mergeInputs = name: lib.concatLists (lib.catAttrs name + ([attrs] ++ inputsFrom)); rest = builtins.removeAttrs attrs [ "inputsFrom" From 9635646148681cf82ffe1363a708a16d806e8635 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Sun, 23 Jun 2019 22:42:08 +0200 Subject: [PATCH 52/90] ksonnet: remove package MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The team behind ksonnet was aquired by VMware, and they decided to end work on ksonnet: From https://blogs.vmware.com/cloudnative/2019/02/05/welcoming-heptio-open-source-projects-to-vmware: > Prior to the acquisition, Heptio had been shifting focus and resources > away from ksonnet; with the acquisition, we felt it was the right time > to rethink our investment in ksonnet. As a result, work on ksonnet will > end and the GitHub repositories will be archived. It’s extremely > difficult to step back from a project we have worked so hard on, but > we’re excited about our new ideas and vision for changing how developers > experience the Kubernetes and cloud native ecosystems. --- .../networking/cluster/ksonnet/default.nix | 23 ------------------- pkgs/top-level/all-packages.nix | 2 -- 2 files changed, 25 deletions(-) delete mode 100644 pkgs/applications/networking/cluster/ksonnet/default.nix diff --git a/pkgs/applications/networking/cluster/ksonnet/default.nix b/pkgs/applications/networking/cluster/ksonnet/default.nix deleted file mode 100644 index b8bce9315237..000000000000 --- a/pkgs/applications/networking/cluster/ksonnet/default.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ lib, buildGoPackage, fetchFromGitHub, ... }: - -buildGoPackage rec { - version = "0.11.0"; - name = "ksonnet-${version}"; - - src = fetchFromGitHub { - owner = "ksonnet"; - repo = "ksonnet"; - rev = "v${version}"; - sha256 = "0z7gkgcsiclm72bznmzv5jcgx5rblndcsiqc0r2mwhxhmv19bs04"; - }; - - goPackagePath = "github.com/ksonnet/ksonnet"; - - meta = { - description = "A CLI-supported framework that streamlines writing and deployment of Kubernetes configurations to multiple clusters"; - homepage = https://github.com/ksonnet/ksonnet; - license = lib.licenses.asl20; - maintainers = with lib.maintainers; [ flokli ]; - platforms = lib.platforms.unix; - }; -} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 09a2f6c391db..a9fbf0d2fdfb 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -18733,8 +18733,6 @@ in ktorrent = libsForQt5.callPackage ../applications/networking/p2p/ktorrent { }; - ksonnet = callPackage ../applications/networking/cluster/ksonnet { }; - kubecfg = callPackage ../applications/networking/cluster/kubecfg { }; kubeval = callPackage ../applications/networking/cluster/kubeval { }; From 2933681be0e04e3ef87b3977b41e423cba6249b3 Mon Sep 17 00:00:00 2001 From: arcnmx Date: Sat, 22 Jun 2019 22:30:04 -0700 Subject: [PATCH 53/90] pythonPackages.hidapi: enable on darwin --- pkgs/development/python-modules/hidapi/default.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/hidapi/default.nix b/pkgs/development/python-modules/hidapi/default.nix index d06cc89ff1f6..2d78a45da8c0 100644 --- a/pkgs/development/python-modules/hidapi/default.nix +++ b/pkgs/development/python-modules/hidapi/default.nix @@ -1,4 +1,4 @@ -{ stdenv, libusb1, udev, fetchPypi, buildPythonPackage, cython }: +{ stdenv, libusb1, udev, darwin, fetchPypi, buildPythonPackage, cython }: buildPythonPackage rec { pname = "hidapi"; @@ -9,10 +9,13 @@ buildPythonPackage rec { sha256 = "e0be1aa6566979266a8fc845ab0e18613f4918cf2c977fe67050f5dc7e2a9a97"; }; - propagatedBuildInputs = [ libusb1 udev cython ]; + propagatedBuildInputs = + stdenv.lib.optionals stdenv.isLinux [ libusb1 udev ] ++ + stdenv.lib.optionals stdenv.isDarwin [ darwin.IOKit darwin.apple_sdk.frameworks.CoreFoundation ] ++ + [ cython ]; # Fix the USB backend library lookup - postPatch = '' + postPatch = stdenv.lib.optionalString stdenv.isLinux '' libusb=${libusb1.dev}/include/libusb-1.0 test -d $libusb || { echo "ERROR: $libusb doesn't exist, please update/fix this build expression."; exit 1; } sed -i -e "s|/usr/include/libusb-1.0|$libusb|" setup.py From 7720379005cb765abf0ab16b87f540cbea50e2f8 Mon Sep 17 00:00:00 2001 From: Bas van Dijk Date: Mon, 24 Jun 2019 00:20:57 +0200 Subject: [PATCH 54/90] cargo-license: init at 0.2.0 --- .../cargo-license/add-Cargo.lock.patch | 297 ++++++++++++++++++ .../cargo-license/default.nix | 23 ++ pkgs/top-level/all-packages.nix | 1 + 3 files changed, 321 insertions(+) create mode 100644 pkgs/tools/package-management/cargo-license/add-Cargo.lock.patch create mode 100644 pkgs/tools/package-management/cargo-license/default.nix diff --git a/pkgs/tools/package-management/cargo-license/add-Cargo.lock.patch b/pkgs/tools/package-management/cargo-license/add-Cargo.lock.patch new file mode 100644 index 000000000000..7137f8b7fb18 --- /dev/null +++ b/pkgs/tools/package-management/cargo-license/add-Cargo.lock.patch @@ -0,0 +1,297 @@ +commit ed7cd525d00a0f8517894cfec6e3e277f630b15f +Author: Bas van Dijk +Date: Mon Jun 24 00:13:13 2019 +0200 + + Add Cargo.lock + +diff --git a/Cargo.lock b/Cargo.lock +new file mode 100644 +index 0000000..b552c16 +--- /dev/null ++++ b/Cargo.lock +@@ -0,0 +1,285 @@ ++# This file is automatically @generated by Cargo. ++# It is not intended for manual editing. ++[[package]] ++name = "ansi_term" ++version = "0.9.0" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++ ++[[package]] ++name = "autocfg" ++version = "0.1.4" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++ ++[[package]] ++name = "backtrace" ++version = "0.3.31" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++dependencies = [ ++ "autocfg 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", ++ "backtrace-sys 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", ++ "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", ++ "libc 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", ++ "rustc-demangle 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", ++] ++ ++[[package]] ++name = "backtrace-sys" ++version = "0.1.28" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++dependencies = [ ++ "cc 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)", ++ "libc 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", ++] ++ ++[[package]] ++name = "cargo-license" ++version = "0.2.0" ++dependencies = [ ++ "ansi_term 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", ++ "cargo_metadata 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", ++ "csv 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", ++ "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ++ "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", ++ "serde 1.0.93 (registry+https://github.com/rust-lang/crates.io-index)", ++ "serde_derive 1.0.93 (registry+https://github.com/rust-lang/crates.io-index)", ++ "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", ++ "toml 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", ++] ++ ++[[package]] ++name = "cargo_metadata" ++version = "0.6.4" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++dependencies = [ ++ "error-chain 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)", ++ "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", ++ "serde 1.0.93 (registry+https://github.com/rust-lang/crates.io-index)", ++ "serde_derive 1.0.93 (registry+https://github.com/rust-lang/crates.io-index)", ++ "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", ++] ++ ++[[package]] ++name = "cc" ++version = "1.0.37" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++ ++[[package]] ++name = "cfg-if" ++version = "0.1.9" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++ ++[[package]] ++name = "csv" ++version = "1.0.7" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++dependencies = [ ++ "csv-core 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ++ "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", ++ "ryu 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ++ "serde 1.0.93 (registry+https://github.com/rust-lang/crates.io-index)", ++] ++ ++[[package]] ++name = "csv-core" ++version = "0.1.5" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++dependencies = [ ++ "memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ++] ++ ++[[package]] ++name = "error-chain" ++version = "0.12.1" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++dependencies = [ ++ "backtrace 0.3.31 (registry+https://github.com/rust-lang/crates.io-index)", ++ "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ++] ++ ++[[package]] ++name = "failure" ++version = "0.1.5" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++dependencies = [ ++ "backtrace 0.3.31 (registry+https://github.com/rust-lang/crates.io-index)", ++ "failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ++] ++ ++[[package]] ++name = "failure_derive" ++version = "0.1.5" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++dependencies = [ ++ "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", ++ "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", ++ "syn 0.15.38 (registry+https://github.com/rust-lang/crates.io-index)", ++ "synstructure 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)", ++] ++ ++[[package]] ++name = "getopts" ++version = "0.2.19" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++dependencies = [ ++ "unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ++] ++ ++[[package]] ++name = "itoa" ++version = "0.4.4" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++ ++[[package]] ++name = "libc" ++version = "0.2.58" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++ ++[[package]] ++name = "memchr" ++version = "2.2.0" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++dependencies = [ ++ "libc 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", ++] ++ ++[[package]] ++name = "proc-macro2" ++version = "0.4.30" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++dependencies = [ ++ "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ++] ++ ++[[package]] ++name = "quote" ++version = "0.6.12" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++dependencies = [ ++ "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", ++] ++ ++[[package]] ++name = "rustc-demangle" ++version = "0.1.15" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++ ++[[package]] ++name = "ryu" ++version = "0.2.8" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++ ++[[package]] ++name = "semver" ++version = "0.9.0" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++dependencies = [ ++ "semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", ++ "serde 1.0.93 (registry+https://github.com/rust-lang/crates.io-index)", ++] ++ ++[[package]] ++name = "semver-parser" ++version = "0.7.0" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++ ++[[package]] ++name = "serde" ++version = "1.0.93" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++ ++[[package]] ++name = "serde_derive" ++version = "1.0.93" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++dependencies = [ ++ "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", ++ "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", ++ "syn 0.15.38 (registry+https://github.com/rust-lang/crates.io-index)", ++] ++ ++[[package]] ++name = "serde_json" ++version = "1.0.39" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++dependencies = [ ++ "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", ++ "ryu 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ++ "serde 1.0.93 (registry+https://github.com/rust-lang/crates.io-index)", ++] ++ ++[[package]] ++name = "syn" ++version = "0.15.38" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++dependencies = [ ++ "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", ++ "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", ++ "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ++] ++ ++[[package]] ++name = "synstructure" ++version = "0.10.2" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++dependencies = [ ++ "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", ++ "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", ++ "syn 0.15.38 (registry+https://github.com/rust-lang/crates.io-index)", ++ "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ++] ++ ++[[package]] ++name = "toml" ++version = "0.4.10" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++dependencies = [ ++ "serde 1.0.93 (registry+https://github.com/rust-lang/crates.io-index)", ++] ++ ++[[package]] ++name = "unicode-width" ++version = "0.1.5" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++ ++[[package]] ++name = "unicode-xid" ++version = "0.1.0" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++ ++[[package]] ++name = "version_check" ++version = "0.1.5" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++ ++[metadata] ++"checksum ansi_term 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "23ac7c30002a5accbf7e8987d0632fa6de155b7c3d39d0067317a391e00a2ef6" ++"checksum autocfg 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "0e49efa51329a5fd37e7c79db4621af617cd4e3e5bc224939808d076077077bf" ++"checksum backtrace 0.3.31 (registry+https://github.com/rust-lang/crates.io-index)" = "e0f77aa27f55a4beb477ff6bc4d9bf72f90eb422b19c1d8e5a644b8aeb674d66" ++"checksum backtrace-sys 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)" = "797c830ac25ccc92a7f8a7b9862bde440715531514594a6154e3d4a54dd769b6" ++"checksum cargo_metadata 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "e5d1b4d380e1bab994591a24c2bdd1b054f64b60bef483a8c598c7c345bc3bbe" ++"checksum cc 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)" = "39f75544d7bbaf57560d2168f28fd649ff9c76153874db88bdbdfd839b1a7e7d" ++"checksum cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "b486ce3ccf7ffd79fdeb678eac06a9e6c09fc88d33836340becb8fffe87c5e33" ++"checksum csv 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)" = "9044e25afb0924b5a5fc5511689b0918629e85d68ea591e5e87fbf1e85ea1b3b" ++"checksum csv-core 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "fa5cdef62f37e6ffe7d1f07a381bc0db32b7a3ff1cac0de56cb0d81e71f53d65" ++"checksum error-chain 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3ab49e9dcb602294bc42f9a7dfc9bc6e936fca4418ea300dbfb84fe16de0b7d9" ++"checksum failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "795bd83d3abeb9220f257e597aa0080a508b27533824adf336529648f6abf7e2" ++"checksum failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "ea1063915fd7ef4309e222a5a07cf9c319fb9c7836b1f89b85458672dbb127e1" ++"checksum getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)" = "72327b15c228bfe31f1390f93dd5e9279587f0463836393c9df719ce62a3e450" ++"checksum itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "501266b7edd0174f8530248f87f99c88fbe60ca4ef3dd486835b8d8d53136f7f" ++"checksum libc 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)" = "6281b86796ba5e4366000be6e9e18bf35580adf9e63fbe2294aadb587613a319" ++"checksum memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2efc7bc57c883d4a4d6e3246905283d8dae951bb3bd32f49d6ef297f546e1c39" ++"checksum proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)" = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" ++"checksum quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)" = "faf4799c5d274f3868a4aae320a0a182cbd2baee377b378f080e16a23e9d80db" ++"checksum rustc-demangle 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "a7f4dccf6f4891ebcc0c39f9b6eb1a83b9bf5d747cb439ec6fba4f3b977038af" ++"checksum ryu 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "b96a9549dc8d48f2c283938303c4b5a77aa29bfbc5b54b084fb1630408899a8f" ++"checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" ++"checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" ++"checksum serde 1.0.93 (registry+https://github.com/rust-lang/crates.io-index)" = "960e29cf7004b3b6e65fc5002981400eb3ccc017a08a2406940823e58e7179a9" ++"checksum serde_derive 1.0.93 (registry+https://github.com/rust-lang/crates.io-index)" = "c4cce6663696bd38272e90bf34a0267e1226156c33f52d3f3915a2dd5d802085" ++"checksum serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)" = "5a23aa71d4a4d43fdbfaac00eff68ba8a06a51759a89ac3304323e800c4dd40d" ++"checksum syn 0.15.38 (registry+https://github.com/rust-lang/crates.io-index)" = "37ea458a750f59ab679b47fef9b6722c586c5742f4cfe18a120bbc807e5e01fd" ++"checksum synstructure 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "02353edf96d6e4dc81aea2d8490a7e9db177bf8acb0e951c24940bf866cb313f" ++"checksum toml 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)" = "758664fc71a3a69038656bee8b6be6477d2a6c315a6b81f7081f591bffa4111f" ++"checksum unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "882386231c45df4700b275c7ff55b6f3698780a650026380e72dabe76fa46526" ++"checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" ++"checksum version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd" diff --git a/pkgs/tools/package-management/cargo-license/default.nix b/pkgs/tools/package-management/cargo-license/default.nix new file mode 100644 index 000000000000..1230b90c270c --- /dev/null +++ b/pkgs/tools/package-management/cargo-license/default.nix @@ -0,0 +1,23 @@ +{ lib, rustPlatform, fetchFromGitHub }: +rustPlatform.buildRustPackage rec { + name = "cargo-license-${version}"; + version = "0.2.0"; + + src = fetchFromGitHub { + owner = "onur"; + repo = "cargo-license"; + rev = "v${version}"; + sha256 = "0xxgl9d695ncrxz29125wag285dwxpwc3fym0ixgj5fqbnkbx75g"; + }; + + cargoPatches = [ ./add-Cargo.lock.patch ]; + + cargoSha256 = "0jc84v8fxzzyfkcnfr9vrdblw5vdk54nzpch5lcarzfsarncqxw7"; + + meta = with lib; { + description = "Cargo subcommand to see license of dependencies"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ basvandijk ]; + platforms = platforms.all; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 274f9ff17181..55f3d3e5de7d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8021,6 +8021,7 @@ in cargo-download = callPackage ../tools/package-management/cargo-download { }; cargo-edit = callPackage ../tools/package-management/cargo-edit { }; cargo-graph = callPackage ../tools/package-management/cargo-graph { }; + cargo-license = callPackage ../tools/package-management/cargo-license { }; cargo-outdated = callPackage ../tools/package-management/cargo-outdated {}; cargo-release = callPackage ../tools/package-management/cargo-release { inherit (darwin.apple_sdk.frameworks) Security; From 4e22fe4f6374fea5b9a52b25d52c5296de93dc67 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Sun, 23 Jun 2019 18:28:36 -0400 Subject: [PATCH 55/90] apple-sdk: add MetalKit --- pkgs/os-specific/darwin/apple-sdk/default.nix | 7 +++++++ pkgs/os-specific/darwin/apple-sdk/frameworks.nix | 2 ++ 2 files changed, 9 insertions(+) diff --git a/pkgs/os-specific/darwin/apple-sdk/default.nix b/pkgs/os-specific/darwin/apple-sdk/default.nix index 7c3e3e639679..2e3ae22e0b23 100644 --- a/pkgs/os-specific/darwin/apple-sdk/default.nix +++ b/pkgs/os-specific/darwin/apple-sdk/default.nix @@ -211,6 +211,13 @@ in rec { --replace "QuartzCore/../Frameworks/CoreImage.framework/Headers" "CoreImage" ''; }); + + MetalKit = stdenv.lib.overrideDerivation super.MetalKit (drv: { + installPhase = drv.installPhase + '' + mkdir -p $out/include/simd + cp ${lib.getDev sdk}/include/simd/*.h $out/include/simd/ + ''; + }); }; bareFrameworks = stdenv.lib.mapAttrs framework (import ./frameworks.nix { diff --git a/pkgs/os-specific/darwin/apple-sdk/frameworks.nix b/pkgs/os-specific/darwin/apple-sdk/frameworks.nix index e55abf9dfb65..03c800b8dae5 100644 --- a/pkgs/os-specific/darwin/apple-sdk/frameworks.nix +++ b/pkgs/os-specific/darwin/apple-sdk/frameworks.nix @@ -74,6 +74,8 @@ with frameworks; with libs; { MediaAccessibility = [ CF CoreGraphics CoreText QuartzCore ]; MediaToolbox = [ AudioToolbox AudioUnit CF CoreMedia ]; Metal = []; + MetalKit = [ ModelIO Metal ]; + ModelIO = [ ]; NetFS = [ CF ]; OSAKit = [ Carbon ]; OpenAL = []; From 4c3e09b022a287d16e36844e6eebfe1bb8007624 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Sun, 23 Jun 2019 18:29:04 -0400 Subject: [PATCH 56/90] qt5.12: patch to work on x86_64-darwin unfortunately, some private headers making the logging hard to handle. Specifically, os/activity.h that is included does not match what Qt5 is expected. This removes the activity logging (while keeping the other logging methods) on macOS. Fixes #63528 --- .../libraries/qt-5/5.12/qtbase.patch | 60 +++++++++++++++++++ .../libraries/qt-5/modules/qtbase.nix | 2 +- 2 files changed, 61 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/qt-5/5.12/qtbase.patch b/pkgs/development/libraries/qt-5/5.12/qtbase.patch index 68ebd56b76c0..aa987acbe92e 100644 --- a/pkgs/development/libraries/qt-5/5.12/qtbase.patch +++ b/pkgs/development/libraries/qt-5/5.12/qtbase.patch @@ -1094,3 +1094,63 @@ index 99d87e2e46..a4eab2aa72 100644 !!ELSE set(imported_location \"$${CMAKE_BIN_DIR}uic$$CMAKE_BIN_SUFFIX\") !!ENDIF +diff --git a/src/corelib/kernel/qcore_mac_p.h b/src/corelib/kernel/qcore_mac_p.h +index b14a494296..779c4eda95 100644 +--- a/src/corelib/kernel/qcore_mac_p.h ++++ b/src/corelib/kernel/qcore_mac_p.h +@@ -211,7 +211,7 @@ private: + + // -------------------------------------------------------------------------- + +-#if !defined(QT_BOOTSTRAPPED) ++#if 0 + + QT_END_NAMESPACE + #include +@@ -289,7 +289,19 @@ QT_MAC_WEAK_IMPORT(_os_activity_current); + + #define QT_APPLE_SCOPED_LOG_ACTIVITY(...) QAppleLogActivity scopedLogActivity = QT_APPLE_LOG_ACTIVITY(__VA_ARGS__).enter(); + +-#endif // !defined(QT_BOOTSTRAPPED) ++#else // !defined(QT_BOOTSTRAPPED) ++ ++#define QT_APPLE_LOG_ACTIVITY_WITH_PARENT3(...) ++#define QT_APPLE_LOG_ACTIVITY_WITH_PARENT2(...) ++#define QT_APPLE_LOG_ACTIVITY_WITH_PARENT(...) ++ ++#define QT_APPLE_LOG_ACTIVITY2(...) ++#define QT_APPLE_LOG_ACTIVITY1(...) ++#define QT_APPLE_LOG_ACTIVITY(...) ++ ++#define QT_APPLE_SCOPED_LOG_ACTIVITY(...) ++ ++#endif + + // ------------------------------------------------------------------------- + +diff --git a/src/testlib/qappletestlogger.cpp b/src/testlib/qappletestlogger.cpp +index 2c1005ad80..244147ea7d 100644 +--- a/src/testlib/qappletestlogger.cpp ++++ b/src/testlib/qappletestlogger.cpp +@@ -43,7 +43,7 @@ + + QT_BEGIN_NAMESPACE + +-#if defined(QT_USE_APPLE_UNIFIED_LOGGING) ++#if defined(QT_USE_APPLE_UNIFIED_LOGGING) && 0 + + using namespace QTestPrivate; + +diff --git a/src/testlib/qtestlog.cpp b/src/testlib/qtestlog.cpp +index 1268730cc6..a50e9b0764 100644 +--- a/src/testlib/qtestlog.cpp ++++ b/src/testlib/qtestlog.cpp +@@ -524,7 +524,7 @@ void QTestLog::addLogger(LogMode mode, const char *filename) + #endif + } + +-#if defined(QT_USE_APPLE_UNIFIED_LOGGING) ++#if defined(QT_USE_APPLE_UNIFIED_LOGGING) && 0 + // Logger that also feeds messages to AUL. It needs to wrap the existing + // logger, as it needs to be able to short circuit the existing logger + // in case AUL prints to stderr. diff --git a/pkgs/development/libraries/qt-5/modules/qtbase.nix b/pkgs/development/libraries/qt-5/modules/qtbase.nix index bd92d9bc27cc..2c050a105b85 100644 --- a/pkgs/development/libraries/qt-5/modules/qtbase.nix +++ b/pkgs/development/libraries/qt-5/modules/qtbase.nix @@ -56,7 +56,7 @@ stdenv.mkDerivation { # TODO: move to buildInputs, this should not be propagated. AGL AppKit ApplicationServices Carbon Cocoa CoreAudio CoreBluetooth CoreLocation CoreServices DiskArbitration Foundation OpenGL - darwin.libobjc libiconv + darwin.libobjc libiconv MetalKit ] else [ From 758712c6f4e01bcef351f1f03ecd7d4d46c66d3c Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Sun, 23 Jun 2019 18:30:50 -0400 Subject: [PATCH 57/90] qt5: make qt512 the default on darwin --- pkgs/top-level/all-packages.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 25fc335963ec..d93cdb2df173 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -12820,8 +12820,7 @@ in libsForQt512 = recurseIntoAttrs (lib.makeScope qt512.newScope mkLibsForQt5); - # TODO bump to 5.12 on darwin once it's not broken - qt5 = if stdenv.isDarwin then qt511 else qt512; + qt5 = qt512; libsForQt5 = if stdenv.isDarwin then libsForQt511 else libsForQt512; qt5ct = libsForQt5.callPackage ../tools/misc/qt5ct { }; From 8768d1c83afe012ec5a19ff1faa63fd7f560c01f Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Sun, 23 Jun 2019 20:30:27 -0400 Subject: [PATCH 58/90] nixos: add hardware/network/intel-2200bg.nix to module-list this is referenced by nixos-generate-config.pl. See https://github.com/NixOS/nixpkgs/pull/63091 for more discussion. --- nixos/modules/module-list.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 50e3078d9770..6b8c8255c4db 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -50,6 +50,7 @@ ./hardware/logitech.nix ./hardware/mcelog.nix ./hardware/network/b43.nix + ./hardware/network/intel-2200bg.nix ./hardware/nitrokey.nix ./hardware/opengl.nix ./hardware/pcmcia.nix From bb8538a209e35e4b65fe9ad759dccb45bebe5298 Mon Sep 17 00:00:00 2001 From: Matthieu Coudron Date: Mon, 24 Jun 2019 10:55:04 +0900 Subject: [PATCH 59/90] vimPlugins.coc-nvim: 0.69 -> 0.71 --- pkgs/misc/vim-plugins/generated.nix | 6 +++--- pkgs/misc/vim-plugins/overrides.nix | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/misc/vim-plugins/generated.nix b/pkgs/misc/vim-plugins/generated.nix index 15e0ba325b37..5d3e9f5d9c0a 100644 --- a/pkgs/misc/vim-plugins/generated.nix +++ b/pkgs/misc/vim-plugins/generated.nix @@ -248,12 +248,12 @@ let coc-nvim = buildVimPluginFrom2Nix { pname = "coc-nvim"; - version = "2019-06-21"; + version = "2019-06-24"; src = fetchFromGitHub { owner = "neoclide"; repo = "coc.nvim"; - rev = "0cf54ed4f19374a7d6a81528675497ef82214e95"; - sha256 = "1dvwwzhw26rf82k03j1a82axga07nsihlnx6vhj9v9ab2di005i1"; + rev = "5e9594d9da22e4eb840cb102513bebc77bab7300"; + sha256 = "036ig6902vwrqnj052s6631lx4k4m0p5y2238287p8qmxgj7x9d6"; }; }; diff --git a/pkgs/misc/vim-plugins/overrides.nix b/pkgs/misc/vim-plugins/overrides.nix index 5ee03077d712..0aa0fde972d5 100644 --- a/pkgs/misc/vim-plugins/overrides.nix +++ b/pkgs/misc/vim-plugins/overrides.nix @@ -111,10 +111,10 @@ self: super: { coc-nvim = let - version = "0.0.69"; + version = "0.0.71"; index_js = fetchzip { url = "https://github.com/neoclide/coc.nvim/releases/download/v${version}/coc.tar.gz"; - sha256 = "1qnznpb39bbhimzbhsvpsdkg87dv3yxzs1vr3kaikl3kpakik9p8"; + sha256 = "1bhkyrmrpriizg3f76x4vp94f2bfwcf7a6cp3jvv7vj4zaqhsjzz"; }; in super.coc-nvim.overrideAttrs(old: { # you still need to enable the node js provider in your nvim config From 5adfef1810fbafcd9a38ad7ab01ac55295a48ad5 Mon Sep 17 00:00:00 2001 From: Matthieu Coudron Date: Mon, 24 Jun 2019 10:55:49 +0900 Subject: [PATCH 60/90] vimPlugins: update --- pkgs/misc/vim-plugins/generated.nix | 54 ++++++++++++++--------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/pkgs/misc/vim-plugins/generated.nix b/pkgs/misc/vim-plugins/generated.nix index 5d3e9f5d9c0a..36bc422f1c06 100644 --- a/pkgs/misc/vim-plugins/generated.nix +++ b/pkgs/misc/vim-plugins/generated.nix @@ -425,12 +425,12 @@ let denite-nvim = buildVimPluginFrom2Nix { pname = "denite-nvim"; - version = "2019-06-22"; + version = "2019-06-23"; src = fetchFromGitHub { owner = "Shougo"; repo = "denite.nvim"; - rev = "d1d1ac5a8e2a91fe99c5bb66ca32d6b85f9ac735"; - sha256 = "1np25k6vs7xkd1ljajhiifmxiaz1cpvq0syzhdr21d81dfi1piil"; + rev = "9a5e321ced689771c052f68a8125c0a44ad3389a"; + sha256 = "16l85820490h1l44idk3jsz5xyckyvcyi42a88bw0ms70nnh2569"; }; }; @@ -926,12 +926,12 @@ let jedi-vim = buildVimPluginFrom2Nix { pname = "jedi-vim"; - version = "2019-04-28"; + version = "2019-06-22"; src = fetchFromGitHub { owner = "davidhalter"; repo = "jedi-vim"; - rev = "69aa410afaefbecbcaac2a8254af7bed290d6927"; - sha256 = "0wd29y66k12rndh1zf3wfdz3gqv25dahf0m61rg3zii6dcyk0qsd"; + rev = "016fb7c78e3971ab662796d2abf5f2f4a227e1a1"; + sha256 = "1zzidg4n7ir00q9l4y8g7dqfdzph0f7j7022n032vlfj8yr5mc92"; fetchSubmodules = true; }; }; @@ -1257,12 +1257,12 @@ let neoterm = buildVimPluginFrom2Nix { pname = "neoterm"; - version = "2019-06-21"; + version = "2019-06-22"; src = fetchFromGitHub { owner = "kassio"; repo = "neoterm"; - rev = "86eaa7552859effa21a1688e1aeb9f3db5cad784"; - sha256 = "1fg027lk4w1zj7300jmwqhcwywcsz10wxdq0pi23zqvz274nbl5f"; + rev = "f974a6e3c70f0591b76c196d6e6b2c20649e94c4"; + sha256 = "0wr4s52jfdhxm5zf6i46skrs8hjlf5w3c0wcrxjnszykza9d6whl"; }; }; @@ -1939,12 +1939,12 @@ let typescript-vim = buildVimPluginFrom2Nix { pname = "typescript-vim"; - version = "2019-05-03"; + version = "2019-06-23"; src = fetchFromGitHub { owner = "leafgarland"; repo = "typescript-vim"; - rev = "7704fac2c765aaf975ad4034933bf63113dd4a64"; - sha256 = "1cjqqbaaa2ns1c916skqcgqy9yv7l9b457bfay5gv1p364y35msk"; + rev = "5a319ea5504e18215d155576c78d1b7fb8e22c8f"; + sha256 = "1hz42blc1sshkms9ramdhzwnphqs26p83q8smw5y14blp1zdb628"; }; }; @@ -2269,12 +2269,12 @@ let vim-android = buildVimPluginFrom2Nix { pname = "vim-android"; - version = "2019-06-21"; + version = "2019-06-24"; src = fetchFromGitHub { owner = "hsanson"; repo = "vim-android"; - rev = "d7c9d7297100e4a3a501be185b34048553561bba"; - sha256 = "0ly3vi5w6gx78p3y3xs2mzhiymbw53yfcpr33sb1h7z1zcs6987w"; + rev = "cd91def12383b2f3f4714ff9cc0bef2101d0860b"; + sha256 = "1wv3saj204rnlzm4jvg33b77jqwhwynq31h97mmnmdyc6hg57s65"; }; }; @@ -2511,12 +2511,12 @@ let vim-devicons = buildVimPluginFrom2Nix { pname = "vim-devicons"; - version = "2019-06-21"; + version = "2019-06-23"; src = fetchFromGitHub { owner = "ryanoasis"; repo = "vim-devicons"; - rev = "0468bc8fb183e1e7c1ffacd7b3f8e9c7f813f49d"; - sha256 = "0r063bdffjvkawjy4k2j88f0q9b39qgjcxsn7zzi71vs4c07xmsi"; + rev = "793fda61101f02fed05d30d606671f9b933452fb"; + sha256 = "0x04rh5jy82g7q7im4lvlh1akz4jl3l5swc3xv82saxymzycpgyw"; }; }; @@ -2665,12 +2665,12 @@ let vim-fireplace = buildVimPluginFrom2Nix { pname = "vim-fireplace"; - version = "2019-06-21"; + version = "2019-06-23"; src = fetchFromGitHub { owner = "tpope"; repo = "vim-fireplace"; - rev = "41698572eedf1f18027353d5f67b92b851cb5d14"; - sha256 = "1sdiqkqq77jqcbqhm93kjba8r30n68jvd93zxrszk891q1i666ss"; + rev = "e78995b7fc93357c86f66d78b65803e473b8e356"; + sha256 = "05wbnpqpd65vyvaq5maxaq06dcc5k6z5hc7hbk82slm52avk92lm"; }; }; @@ -3183,12 +3183,12 @@ let vim-lsc = buildVimPluginFrom2Nix { pname = "vim-lsc"; - version = "2019-06-11"; + version = "2019-06-23"; src = fetchFromGitHub { owner = "natebosch"; repo = "vim-lsc"; - rev = "d4d34070c74261d749a74c1990c7e6ecf7b500bb"; - sha256 = "0gba7lhzd8l0mdkkgw2ahwq3n0x2kz3bghqx06ah77w642kq4sdr"; + rev = "57f6e1aaed6a89054335b71aac89be9a607faad3"; + sha256 = "04mfxpszngmqw052h3yb9iq0xj95fg38jr8x7jqxdpgr3i5c5z9r"; }; }; @@ -4118,12 +4118,12 @@ let vimtex = buildVimPluginFrom2Nix { pname = "vimtex"; - version = "2019-06-17"; + version = "2019-06-22"; src = fetchFromGitHub { owner = "lervag"; repo = "vimtex"; - rev = "c7cbc9d662c0520e769faddb2d952f4992c83049"; - sha256 = "05kb1wlkbajqfw93524f86b5v2437zg20vxa4f5gjdc70la0gw22"; + rev = "4240669fbb31f9bab15abe5e41a8d5a11f3d4ccb"; + sha256 = "1yldk7pms48d6f82q547r2vy6xb8fa0c2s6f8mp0riwiypiaqj6l"; }; }; From fa30c32db0ca70ae24dc528296339bb68ee50a3f Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Sun, 23 Jun 2019 17:21:03 -0700 Subject: [PATCH 61/90] rofi: 1.5.2 -> 1.5.3 --- pkgs/applications/misc/rofi/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/misc/rofi/default.nix b/pkgs/applications/misc/rofi/default.nix index a8e82998c306..68fa5a6a2c9c 100644 --- a/pkgs/applications/misc/rofi/default.nix +++ b/pkgs/applications/misc/rofi/default.nix @@ -4,12 +4,12 @@ }: stdenv.mkDerivation rec { - version = "1.5.2"; + version = "1.5.3"; name = "rofi-unwrapped-${version}"; src = fetchurl { url = "https://github.com/DaveDavenport/rofi/releases/download/${version}/rofi-${version}.tar.gz"; - sha256 = "1rczxz6l32vnclarzga1sm1d5iq9rfscb9j7f8ih185n59hf0517"; + sha256 = "1mskknfnpgmaghplwcyc44qc8swb1f9qiyi67fz9i77jijjpj1lx"; }; preConfigure = '' From f2aa671ad784b924d4653236cf646b3e4d86e38b Mon Sep 17 00:00:00 2001 From: Alexei Robyn Date: Thu, 20 Jun 2019 23:58:51 +1000 Subject: [PATCH 62/90] luajitPackages: Improve derivation names `"lua" + lua.luaversion + "-"` resolves to "lua51-" for both Lua 5.1 and LuaJIT packages. With this, LuaJIT packages instead get `lua.name + "-"`, which currently resolves to "luajit-2.1.0-beta3-". This makes it easy to distinguish the two in store paths etc. --- pkgs/development/interpreters/lua-5/build-lua-package.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/development/interpreters/lua-5/build-lua-package.nix b/pkgs/development/interpreters/lua-5/build-lua-package.nix index 7133f54025b1..74ccb91030aa 100644 --- a/pkgs/development/interpreters/lua-5/build-lua-package.nix +++ b/pkgs/development/interpreters/lua-5/build-lua-package.nix @@ -12,7 +12,9 @@ name ? "${attrs.pname}-${attrs.version}" , version # by default prefix `name` e.g. "lua5.2-${name}" -, namePrefix ? "lua" + lua.luaversion + "-" +, namePrefix ? if lua.pkgs.isLuaJIT + then lua.name + "-" + else "lua" + lua.luaversion + "-" # Dependencies for building the package , buildInputs ? [] From 3ca771cdc37dc5c101134622dceea2f84d4c09b4 Mon Sep 17 00:00:00 2001 From: Alexei Robyn Date: Thu, 20 Jun 2019 23:08:20 +1000 Subject: [PATCH 63/90] luaPackages.luaexpat: Downgrade to fix issue and match typical distros Matches version used on most distros. Fixes an issue with prosody. Detailed reasoning behind this can be found [here](https://github.com/NixOS/nixpkgs/pull/63108#issuecomment-504015507). --- maintainers/scripts/luarocks-packages.csv | 2 +- pkgs/development/lua-modules/generated-packages.nix | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/maintainers/scripts/luarocks-packages.csv b/maintainers/scripts/luarocks-packages.csv index 57d08b3649a1..2039af5165a0 100644 --- a/maintainers/scripts/luarocks-packages.csv +++ b/maintainers/scripts/luarocks-packages.csv @@ -40,7 +40,7 @@ luadbi-mysql,,,,, luadbi-postgresql,,,,, luadbi-sqlite3,,,,, luaevent,,,,, -luaexpat,,,,,flosse +luaexpat,,,1.3.0-1,,arobyn flosse luaffi,,http://luarocks.org/dev,,, luafilesystem,,,1.7.0-2,,flosse vcunat luaossl,,,,lua5_1,vcunat diff --git a/pkgs/development/lua-modules/generated-packages.nix b/pkgs/development/lua-modules/generated-packages.nix index 6b6c82840c2e..835045bd7257 100644 --- a/pkgs/development/lua-modules/generated-packages.nix +++ b/pkgs/development/lua-modules/generated-packages.nix @@ -867,19 +867,19 @@ luaevent = buildLuarocksPackage { }; luaexpat = buildLuarocksPackage { pname = "luaexpat"; - version = "1.3.3-1"; + version = "1.3.0-1"; src = fetchurl { - url = https://luarocks.org/luaexpat-1.3.3-1.src.rock; - sha256 = "0ahpfnby9qqgj22bajmrqvqq70nx19388lmjm9chljfzszy0hndm"; + url = https://luarocks.org/luaexpat-1.3.0-1.src.rock; + sha256 = "15jqz5q12i9zvjyagzwz2lrpzya64mih8v1hxwr0wl2gsjh86y5a"; }; - disabled = (luaOlder "5.0"); + disabled = (luaOlder "5.1"); propagatedBuildInputs = [ lua ]; meta = with stdenv.lib; { homepage = "http://www.keplerproject.org/luaexpat/"; description = "XML Expat parsing"; - maintainers = with maintainers; [ flosse ]; + maintainers = with maintainers; [ arobyn flosse ]; license = { fullName = "MIT/X11"; }; From ea8a4fca07647837559e8e1f936faafc726081cd Mon Sep 17 00:00:00 2001 From: Matthieu Coudron Date: Mon, 24 Jun 2019 11:49:11 +0900 Subject: [PATCH 64/90] linux_mptcp_94: 0.94.4 -> 0.94.6 Also move to a pkgs/os-specific/linux/kernel/linux-mptcp-94.nix. makes updates easier. Added a structured config pkgs/os-specific/linux/kernel/mptcp-config.nix that can be shared between the different kernels. --- .../linux/kernel/linux-mptcp-94.nix | 26 ++++++++++ pkgs/os-specific/linux/kernel/linux-mptcp.nix | 49 ------------------- .../os-specific/linux/kernel/mptcp-config.nix | 28 +++++++++++ pkgs/top-level/all-packages.nix | 2 +- 4 files changed, 55 insertions(+), 50 deletions(-) create mode 100644 pkgs/os-specific/linux/kernel/linux-mptcp-94.nix delete mode 100644 pkgs/os-specific/linux/kernel/linux-mptcp.nix create mode 100644 pkgs/os-specific/linux/kernel/mptcp-config.nix diff --git a/pkgs/os-specific/linux/kernel/linux-mptcp-94.nix b/pkgs/os-specific/linux/kernel/linux-mptcp-94.nix new file mode 100644 index 000000000000..e53c3ceb5c46 --- /dev/null +++ b/pkgs/os-specific/linux/kernel/linux-mptcp-94.nix @@ -0,0 +1,26 @@ +{ stdenv, buildPackages, fetchFromGitHub, perl, buildLinux, structuredExtraConfig ? {}, ... } @ args: +let + mptcpVersion = "0.94.6"; + modDirVersion = "4.14.127"; +in +buildLinux ({ + version = "${modDirVersion}-mptcp_v${mptcpVersion}"; + inherit modDirVersion; + + extraMeta = { + branch = "4.4"; + maintainers = with stdenv.lib.maintainers; [ teto layus ]; + }; + + src = fetchFromGitHub { + owner = "multipath-tcp"; + repo = "mptcp"; + rev = "v${mptcpVersion}"; + sha256 = "071cx9205wpzhi5gc2da79w2abs3czd60jg0xml7j1szc5wl4yfn"; + }; + + structuredExtraConfig = stdenv.lib.mkMerge [ + (import ./mptcp-config.nix { inherit stdenv; }) + structuredExtraConfig + ]; +} // args) diff --git a/pkgs/os-specific/linux/kernel/linux-mptcp.nix b/pkgs/os-specific/linux/kernel/linux-mptcp.nix deleted file mode 100644 index 44499f39cc16..000000000000 --- a/pkgs/os-specific/linux/kernel/linux-mptcp.nix +++ /dev/null @@ -1,49 +0,0 @@ -{ stdenv, buildPackages, fetchFromGitHub, perl, buildLinux, structuredExtraConfig ? {}, ... } @ args: -let - mptcpVersion = "0.94.4"; - modDirVersion = "4.14.110"; -in -buildLinux ({ - version = "${modDirVersion}-mptcp_v${mptcpVersion}"; - inherit modDirVersion; - - extraMeta = { - branch = "4.4"; - maintainers = with stdenv.lib.maintainers; [ teto layus ]; - }; - - src = fetchFromGitHub { - owner = "multipath-tcp"; - repo = "mptcp"; - rev = "v${mptcpVersion}"; - sha256 = "1ng6p1djhm3m5g44yyq7gpqqbzsnhm9rimsafp5g4dx8cm27a70f"; - }; - - structuredExtraConfig = with import ../../../../lib/kernel.nix { inherit (stdenv) lib; version = null; }; - stdenv.lib.mkMerge [ { - IPV6 = yes; - MPTCP = yes; - IP_MULTIPLE_TABLES = yes; - - # Enable advanced path-managers... - MPTCP_PM_ADVANCED = yes; - MPTCP_FULLMESH = yes; - MPTCP_NDIFFPORTS = yes; - # ... but use none by default. - # The default is safer if source policy routing is not setup. - DEFAULT_DUMMY = yes; - DEFAULT_MPTCP_PM.freeform = "default"; - - # MPTCP scheduler selection. - MPTCP_SCHED_ADVANCED = yes; - DEFAULT_MPTCP_SCHED.freeform = "default"; - - # Smarter TCP congestion controllers - TCP_CONG_LIA = module; - TCP_CONG_OLIA = module; - TCP_CONG_WVEGAS = module; - TCP_CONG_BALIA = module; - } - structuredExtraConfig - ]; -} // args) diff --git a/pkgs/os-specific/linux/kernel/mptcp-config.nix b/pkgs/os-specific/linux/kernel/mptcp-config.nix new file mode 100644 index 000000000000..e5e3ee283fff --- /dev/null +++ b/pkgs/os-specific/linux/kernel/mptcp-config.nix @@ -0,0 +1,28 @@ +{ stdenv }: +with import ../../../../lib/kernel.nix { inherit (stdenv) lib; version = null; }; +{ + # DRM_AMDGPU = yes; + + IPV6 = yes; + MPTCP = yes; + IP_MULTIPLE_TABLES = yes; + + # Enable advanced path-managers... + MPTCP_PM_ADVANCED = yes; + MPTCP_FULLMESH = yes; + MPTCP_NDIFFPORTS = yes; + # ... but use none by default. + # The default is safer if source policy routing is not setup. + DEFAULT_DUMMY = yes; + DEFAULT_MPTCP_PM.freeform = "default"; + + # MPTCP scheduler selection. + MPTCP_SCHED_ADVANCED = yes; + DEFAULT_MPTCP_SCHED.freeform = "default"; + + # Smarter TCP congestion controllers + TCP_CONG_LIA = module; + TCP_CONG_OLIA = module; + TCP_CONG_WVEGAS = module; + TCP_CONG_BALIA = module; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a73dbf251970..1b8f52139726 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -15290,7 +15290,7 @@ in klibcShrunk = lowPrio (callPackage ../os-specific/linux/klibc/shrunk.nix { }); linux_mptcp = linux_mptcp_94; - linux_mptcp_94 = callPackage ../os-specific/linux/kernel/linux-mptcp.nix { + linux_mptcp_94 = callPackage ../os-specific/linux/kernel/linux-mptcp-94.nix { kernelPatches = [ kernelPatches.bridge_stp_helper kernelPatches.cpu-cgroup-v2."4.11" From 1e0f5ff99abda38fe894eb998f4a33d55a068a09 Mon Sep 17 00:00:00 2001 From: Matthieu Coudron Date: Mon, 24 Jun 2019 11:58:07 +0900 Subject: [PATCH 65/90] linux_mptcp_95: init at 0.95 also removes 0.93, we want to maintain only the 2 latest upstream mptcp kernels. --- .../linux/kernel/linux-mptcp-93.nix | 47 ------------------- .../linux/kernel/linux-mptcp-95.nix | 27 +++++++++++ pkgs/top-level/all-packages.nix | 12 ++--- 3 files changed, 31 insertions(+), 55 deletions(-) delete mode 100644 pkgs/os-specific/linux/kernel/linux-mptcp-93.nix create mode 100644 pkgs/os-specific/linux/kernel/linux-mptcp-95.nix diff --git a/pkgs/os-specific/linux/kernel/linux-mptcp-93.nix b/pkgs/os-specific/linux/kernel/linux-mptcp-93.nix deleted file mode 100644 index 8be59fbea903..000000000000 --- a/pkgs/os-specific/linux/kernel/linux-mptcp-93.nix +++ /dev/null @@ -1,47 +0,0 @@ -{ stdenv, buildPackages, fetchFromGitHub, perl, buildLinux, ... } @ args: - -buildLinux (rec { - mptcpVersion = "0.93"; - modDirVersion = "4.9.60"; - version = "${modDirVersion}-mptcp_v${mptcpVersion}"; - - extraMeta = { - branch = "4.4"; - maintainers = with stdenv.lib.maintainers; [ teto layus ]; - }; - - src = fetchFromGitHub { - owner = "multipath-tcp"; - repo = "mptcp"; - rev = "v${mptcpVersion}"; - sha256 = "1irlppzvcmckrazs2c4vg6y8ji31552izc3wqabf401v57jvxcys"; - }; - - extraConfig = '' - IPV6 y - MPTCP y - IP_MULTIPLE_TABLES y - - # Enable advanced path-managers... - MPTCP_PM_ADVANCED y - MPTCP_FULLMESH y - MPTCP_NDIFFPORTS y - # ... but use none by default. - # The default is safer if source policy routing is not setup. - DEFAULT_DUMMY y - DEFAULT_MPTCP_PM default - - # MPTCP scheduler selection. - # Disabled as the only non-default is the useless round-robin. - MPTCP_SCHED_ADVANCED n - DEFAULT_MPTCP_SCHED default - - # Smarter TCP congestion controllers - TCP_CONG_LIA m - TCP_CONG_OLIA m - TCP_CONG_WVEGAS m - TCP_CONG_BALIA m - - '' + (args.extraConfig or ""); -} // args) - diff --git a/pkgs/os-specific/linux/kernel/linux-mptcp-95.nix b/pkgs/os-specific/linux/kernel/linux-mptcp-95.nix new file mode 100644 index 000000000000..ad933ff63a7a --- /dev/null +++ b/pkgs/os-specific/linux/kernel/linux-mptcp-95.nix @@ -0,0 +1,27 @@ +{ stdenv, buildPackages, fetchFromGitHub, perl, buildLinux, structuredExtraConfig ? {}, ... } @ args: +let + mptcpVersion = "0.95"; + modDirVersion = "4.19.55"; +in +buildLinux ({ + version = "${modDirVersion}-mptcp_v${mptcpVersion}"; + inherit modDirVersion; + + extraMeta = { + branch = "4.19"; + maintainers = with stdenv.lib.maintainers; [ teto layus ]; + }; + + src = fetchFromGitHub { + owner = "multipath-tcp"; + repo = "mptcp"; + rev = "v${mptcpVersion}"; + sha256 = "04a66iq5vsiz8mkpszfxmqknz7y4w3lsckrcz6q1syjpk0pdyiyw"; + }; + + structuredExtraConfig = stdenv.lib.mkMerge [ + (import ./mptcp-config.nix { inherit stdenv; }) + structuredExtraConfig + ]; + +} // args) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 1b8f52139726..1bade08a3182 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -15289,7 +15289,8 @@ in klibcShrunk = lowPrio (callPackage ../os-specific/linux/klibc/shrunk.nix { }); - linux_mptcp = linux_mptcp_94; + linux_mptcp = linux_mptcp_95; + linux_mptcp_94 = callPackage ../os-specific/linux/kernel/linux-mptcp-94.nix { kernelPatches = [ kernelPatches.bridge_stp_helper @@ -15303,13 +15304,8 @@ in ]; }; - linux_mptcp_93 = callPackage ../os-specific/linux/kernel/linux-mptcp-93.nix { - kernelPatches = - [ kernelPatches.bridge_stp_helper - kernelPatches.p9_fixes - kernelPatches.cpu-cgroup-v2."4.9" - kernelPatches.modinst_arg_list_too_long - ]; + linux_mptcp_95 = callPackage ../os-specific/linux/kernel/linux-mptcp-95.nix { + kernelPatches = linux_4_19.kernelPatches; }; linux_rpi = callPackage ../os-specific/linux/kernel/linux-rpi.nix { From 2307ac9fe24b48ddea5e5daa0b4ba57a7b17b14f Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Sat, 15 Jun 2019 17:02:14 +0000 Subject: [PATCH 66/90] xastir: 2.1.0 -> 2.1.2 Version 2.1.2 is compatible with recent versions of proj --- pkgs/applications/misc/xastir/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/misc/xastir/default.nix b/pkgs/applications/misc/xastir/default.nix index 969661ea7b4e..987b676034f6 100644 --- a/pkgs/applications/misc/xastir/default.nix +++ b/pkgs/applications/misc/xastir/default.nix @@ -1,23 +1,23 @@ { stdenv, fetchFromGitHub, autoreconfHook -, curl, db, gdal, libgeotiff +, curl, db, libgeotiff , libXpm, libXt, motif, pcre , perl, proj, rastermagick, shapelib }: stdenv.mkDerivation rec { pname = "xastir"; - version = "2.1.0"; + version = "2.1.2"; src = fetchFromGitHub { owner = pname; repo = pname; rev = "Release-${version}"; - sha256 = "16zsgy3589snawr8f1fa22ymvpnjy6njvxmsck7q8p2xmmz2ry7r"; + sha256 = "1xfzd2m4l0zbb96ak2pniffxdrs9lax0amkxfgdsnyg8x5j0xcxm"; }; buildInputs = [ autoreconfHook - curl db gdal libgeotiff + curl db libgeotiff libXpm libXt motif pcre perl proj rastermagick shapelib ]; From d086d45952149dd87edd826f27f11e4a46d168f7 Mon Sep 17 00:00:00 2001 From: Guillaume Bouchard Date: Mon, 24 Jun 2019 11:40:53 +0200 Subject: [PATCH 67/90] Fix source url for java tools on darwin --- pkgs/development/tools/build-managers/bazel/default.nix | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pkgs/development/tools/build-managers/bazel/default.nix b/pkgs/development/tools/build-managers/bazel/default.nix index 257cc185b2e2..8edc7fe9a8e2 100644 --- a/pkgs/development/tools/build-managers/bazel/default.nix +++ b/pkgs/development/tools/build-managers/bazel/default.nix @@ -100,10 +100,7 @@ let remote_java_tools = stdenv.mkDerivation { name = "remote_java_tools_${system}"; - src = fetchurl { - url = "https://mirror.bazel.build/bazel_java_tools/releases/javac11/v2.0/java_tools_javac11_${system}-v2.0.zip"; - sha256 = "074d624fb34441df369afdfd454e75dba821d5d54932fcfee5ba598d17dc1b99"; - }; + src = srcDepsSet."java_tools_javac11_${system}-v2.0.zip"; nativeBuildInputs = [ autoPatchelfHook unzip ]; buildInputs = [ gcc-unwrapped ]; From 521b819eda918eb2680a9b291983e3483c36aa8d Mon Sep 17 00:00:00 2001 From: timor Date: Mon, 24 Jun 2019 14:12:37 +0200 Subject: [PATCH 68/90] pythonPackages.sentinel: init at 0.1.1 --- .../python-modules/sentinel/default.nix | 17 +++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 19 insertions(+) create mode 100644 pkgs/development/python-modules/sentinel/default.nix diff --git a/pkgs/development/python-modules/sentinel/default.nix b/pkgs/development/python-modules/sentinel/default.nix new file mode 100644 index 000000000000..e8ed047e03ff --- /dev/null +++ b/pkgs/development/python-modules/sentinel/default.nix @@ -0,0 +1,17 @@ +{ lib, buildPythonPackage, fetchPypi}: + +buildPythonPackage rec { + pname = "sentinel"; + version = "0.1.1"; + + src = fetchPypi { + inherit pname version; + sha256 = "c00ba2a4f240ea4c5414059a696d6e128730272cb2c631b2eff42e86da1f89b3"; + }; + + meta = with lib; { + description = "Create sentinel and singleton objects"; + homepage = "https://github.com/eddieantonio/sentinel"; + license = licenses.mit; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 9bef1b877096..aa2355430e7c 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -931,6 +931,8 @@ in { selectors2 = callPackage ../development/python-modules/selectors2 { }; + sentinel = callPackage ../development/python-modules/sentinel { }; + sentry-sdk = callPackage ../development/python-modules/sentry-sdk {}; sepaxml = callPackage ../development/python-modules/sepaxml { }; From 9a0f64af586f7c8e38d7b7f2ca7ca451dd211514 Mon Sep 17 00:00:00 2001 From: timor Date: Mon, 24 Jun 2019 14:13:14 +0200 Subject: [PATCH 69/90] pythonPackages.rig: init at 2.4.1 --- .../python-modules/rig/default.nix | 29 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 31 insertions(+) create mode 100644 pkgs/development/python-modules/rig/default.nix diff --git a/pkgs/development/python-modules/rig/default.nix b/pkgs/development/python-modules/rig/default.nix new file mode 100644 index 000000000000..d83afd7885f0 --- /dev/null +++ b/pkgs/development/python-modules/rig/default.nix @@ -0,0 +1,29 @@ +{ lib, buildPythonPackage, fetchPypi +, isPy34, isPy35, isPy27 +, numpy, pytz, six, enum-compat, sentinel +}: + +buildPythonPackage rec { + pname = "rig"; + version = "2.4.1"; + + src = fetchPypi { + inherit pname version; + sha256 = "5a3896dbde3f291c5dd34769e7329ef5d5e4da34fee53479bd13dc5e5d540b8a"; + }; + + propagatedBuildInputs = [ numpy pytz six sentinel enum-compat ]; + + # This is the list of officially supported versions. Other versions may work + # as well. + disabled = !(isPy35 || isPy34 || isPy27); + + # Test Phase is only supported in development sources. + doCheck = false; + + meta = with lib; { + description = "A collection of tools for developing SpiNNaker applications"; + homepage = "https://github.com/project-rig/rig"; + license = licenses.gpl2; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index aa2355430e7c..4ede1a04b85c 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -917,6 +917,8 @@ in { pyzufall = callPackage ../development/python-modules/pyzufall { }; + rig = callPackage ../development/python-modules/rig { }; + rhpl = disabledIf isPy3k (callPackage ../development/python-modules/rhpl {}); rlp = callPackage ../development/python-modules/rlp { }; From 10e1475a79d4c30926b0872582efa8f3ced94f03 Mon Sep 17 00:00:00 2001 From: Nikolay Amiantov Date: Sat, 22 Jun 2019 02:20:28 +0300 Subject: [PATCH 70/90] gurobi: add library suffix --- pkgs/applications/science/math/gurobi/default.nix | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/science/math/gurobi/default.nix b/pkgs/applications/science/math/gurobi/default.nix index be14d1411285..ee9bdcc6f1b0 100644 --- a/pkgs/applications/science/math/gurobi/default.nix +++ b/pkgs/applications/science/math/gurobi/default.nix @@ -1,8 +1,10 @@ -{ stdenv, fetchurl, autoPatchelfHook, python }: +{ stdenv, lib, fetchurl, autoPatchelfHook, python }: -stdenv.mkDerivation rec { +let + majorVersion = "8.1"; +in stdenv.mkDerivation rec { name = "gurobi-${version}"; - version = "8.1.0"; + version = "${majorVersion}.0"; src = with stdenv.lib; fetchurl { url = "http://packages.gurobi.com/${versions.majorMinor version}/gurobi${version}_linux64.tar.gz"; @@ -44,6 +46,8 @@ stdenv.mkDerivation rec { ln -s $out/lib/gurobi-javadoc.jar $out/share/java/ ''; + passthru.libSuffix = lib.replaceStrings ["."] [""] majorVersion; + meta = with stdenv.lib; { description = "Optimization solver for mathematical programming"; homepage = https://www.gurobi.com; From a92611508f6da202af886cfef3c2ab70aa69e1e1 Mon Sep 17 00:00:00 2001 From: Nikolay Amiantov Date: Sat, 22 Jun 2019 02:20:46 +0300 Subject: [PATCH 71/90] cplex: add library info --- pkgs/applications/science/math/cplex/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/applications/science/math/cplex/default.nix b/pkgs/applications/science/math/cplex/default.nix index dc0e9ea1aa5d..a14839d3eccc 100644 --- a/pkgs/applications/science/math/cplex/default.nix +++ b/pkgs/applications/science/math/cplex/default.nix @@ -71,6 +71,11 @@ stdenv.mkDerivation rec { fi done ''; + + passthru = { + libArch = "x86-64_linux"; + libSuffix = "${version}0"; + }; meta = with stdenv.lib; { description = "Optimization solver for mathematical programming"; From 08b1d8108921f0228f30ede36e68bcf7242aa11f Mon Sep 17 00:00:00 2001 From: Nikolay Amiantov Date: Sat, 22 Jun 2019 02:22:14 +0300 Subject: [PATCH 72/90] osi: init at 0.108.4 --- .../libraries/science/math/osi/default.nix | 42 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 44 insertions(+) create mode 100644 pkgs/development/libraries/science/math/osi/default.nix diff --git a/pkgs/development/libraries/science/math/osi/default.nix b/pkgs/development/libraries/science/math/osi/default.nix new file mode 100644 index 000000000000..1cc80e78a100 --- /dev/null +++ b/pkgs/development/libraries/science/math/osi/default.nix @@ -0,0 +1,42 @@ +{ stdenv, lib, fetchurl, gfortran, pkgconfig +, blas, zlib, bzip2 +, withGurobi ? false, gurobi +, withCplex ? false, cplex }: + +stdenv.mkDerivation rec { + pname = "osi"; + version = "0.108.4"; + + src = fetchurl { + url = "https://www.coin-or.org/download/source/Osi/Osi-${version}.tgz"; + sha256 = "13bwhdh01g37vp3kjwl9nvij5s5ikh5f7zgrqgwrqfyk35q2x9s5"; + }; + + buildInputs = + [ blas zlib bzip2 ] + ++ lib.optional withGurobi gurobi + ++ lib.optional withCplex cplex; + nativeBuildInputs = [ gfortran pkgconfig ]; + configureFlags = + lib.optionals withGurobi [ "--with-gurobi-incdir=${gurobi}/include" "--with-gurobi-lib=-lgurobi${gurobi.libSuffix}" ] + ++ lib.optionals withCplex [ "--with-cplex-incdir=${cplex}/cplex/include/ilcplex" "--with-cplex-lib=-lcplex${cplex.libSuffix}" ]; + + NIX_LDFLAGS = + lib.optional withCplex "-L${cplex}/cplex/bin/${cplex.libArch}"; + + # Compile errors + NIX_CFLAGS_COMPILE = [ "-Wno-cast-qual" ]; + hardeningDisable = [ "format" ]; + + enableParallelBuilding = true; + + passthru = { inherit withGurobi withCplex; }; + + meta = with stdenv.lib; { + description = "An abstract base class to a generic linear programming (LP) solver"; + homepage = "https://github.com/coin-or/Osi"; + license = licenses.epl10; + platforms = platforms.unix; + maintainers = with maintainers; [ abbradar ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index fc1d8208ab82..bcace250bdb5 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -22566,6 +22566,8 @@ in nauty = callPackage ../applications/science/math/nauty {}; + osi = callPackage ../development/libraries/science/math/osi { }; + or-tools = callPackage ../development/libraries/science/math/or-tools { pythonProtobuf = pythonPackages.protobuf; }; From 3dd7d72e43027ddf316bf0e6fc27fbb33f888e58 Mon Sep 17 00:00:00 2001 From: Nikolay Amiantov Date: Fri, 24 May 2019 19:45:06 +0300 Subject: [PATCH 73/90] fast-downward: init at 2019-05-13 --- .../science/logic/fast-downward/default.nix | 55 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 57 insertions(+) create mode 100644 pkgs/applications/science/logic/fast-downward/default.nix diff --git a/pkgs/applications/science/logic/fast-downward/default.nix b/pkgs/applications/science/logic/fast-downward/default.nix new file mode 100644 index 000000000000..21ce6be3e6c1 --- /dev/null +++ b/pkgs/applications/science/logic/fast-downward/default.nix @@ -0,0 +1,55 @@ +{ stdenv, lib, fetchhg, cmake, which, python3, osi, cplex }: + +stdenv.mkDerivation rec { + name = "fast-downward-2019-05-13"; + + src = fetchhg { + url = "http://hg.fast-downward.org/"; + rev = "090f5df5d84a"; + sha256 = "14pcjz0jfzx5269axg66iq8js7lm2w3cnqrrhhwmz833prjp945g"; + }; + + nativeBuildInputs = [ cmake which ]; + buildInputs = [ python3 python3.pkgs.wrapPython osi ]; + + cmakeFlags = + lib.optional osi.withCplex [ "-DDOWNWARD_CPLEX_ROOT=${cplex}/cplex" ]; + + enableParallelBuilding = true; + + postPatch = '' + cd src + # Needed because the package tries to be too smart. + export CC="$(which $CC)" + export CXX="$(which $CXX)" + ''; + + installPhase = '' + install -Dm755 bin/downward $out/libexec/fast-downward/downward + cp -r ../translate $out/libexec/fast-downward/ + install -Dm755 ../../fast-downward.py $out/bin/fast-downward + mkdir -p $out/${python3.sitePackages} + cp -r ../../driver $out/${python3.sitePackages} + + wrapPythonProgramsIn $out/bin "$out $pythonPath" + wrapPythonProgramsIn $out/libexec/fast-downward/translate "$out $pythonPath" + # Because fast-downward calls `python translate.py` we need to return wrapped scripts back. + for i in $out/libexec/fast-downward/translate/.*-wrapped; do + name="$(basename "$i")" + name1="''${name#.}" + name2="''${name1%-wrapped}" + dir="$(dirname "$i")" + dest="$dir/$name2" + echo "Moving $i to $dest" + mv "$i" "$dest" + done + ''; + + meta = with stdenv.lib; { + description = "A domain-independent planning system"; + homepage = "http://www.fast-downward.org/"; + license = licenses.gpl3Plus; + platforms = platforms.linux; + maintainers = with maintainers; [ abbradar ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index bcace250bdb5..79a31ca1d368 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -22820,6 +22820,8 @@ in else smlnj; }; + fast-downward = callPackage ../applications/science/logic/fast-downward { }; + twelf = callPackage ../applications/science/logic/twelf { smlnj = if stdenv.isDarwin then smlnjBootstrap From 255c4ae4e15f8c761a74e85efc7b5a275c5cc210 Mon Sep 17 00:00:00 2001 From: Nikolay Amiantov Date: Sun, 23 Jun 2019 22:49:09 +0300 Subject: [PATCH 74/90] python3.pkgs.mlrose: init at 1.2.0 --- .../python-modules/mlrose/default.nix | 24 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 26 insertions(+) create mode 100644 pkgs/development/python-modules/mlrose/default.nix diff --git a/pkgs/development/python-modules/mlrose/default.nix b/pkgs/development/python-modules/mlrose/default.nix new file mode 100644 index 000000000000..f7d43115a1b5 --- /dev/null +++ b/pkgs/development/python-modules/mlrose/default.nix @@ -0,0 +1,24 @@ +{ stdenv, buildPythonPackage, fetchPypi, scikitlearn }: + +buildPythonPackage rec { + pname = "mlrose"; + version = "1.2.0"; + + src = fetchPypi { + inherit pname version; + sha256 = "0vsvqrf1wbbj8i198rqd87hf8rlq7fmv8mmibv8f9rhj0w8729p5"; + }; + + propagatedBuildInputs = [ scikitlearn ]; + + postPatch = '' + sed -i 's,sklearn,scikit-learn,g' setup.py + ''; + + meta = with stdenv.lib; { + description = "Machine Learning, Randomized Optimization and SEarch"; + homepage = "https://github.com/gkhayes/mlrose"; + license = licenses.bsd3; + maintainers = with maintainers; [ abbradar ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 9bef1b877096..5400438d7dc1 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2242,6 +2242,8 @@ in { misaka = callPackage ../development/python-modules/misaka {}; + mlrose = callPackage ../development/python-modules/mlrose { }; + mt-940 = callPackage ../development/python-modules/mt-940 { }; mwlib = callPackage ../development/python-modules/mwlib { }; From 4599f2bb9a5a6b1482e72521ead95cb24e0aa819 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Mon, 24 Jun 2019 14:08:57 +0100 Subject: [PATCH 75/90] radare2: 3.5.1 -> 3.6.0 --- .../development/tools/analysis/radare2/default.nix | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pkgs/development/tools/analysis/radare2/default.nix b/pkgs/development/tools/analysis/radare2/default.nix index ae266046265e..0c383b5f83f6 100644 --- a/pkgs/development/tools/analysis/radare2/default.nix +++ b/pkgs/development/tools/analysis/radare2/default.nix @@ -109,17 +109,17 @@ in { # # DO NOT EDIT! Automatically generated by ./update.py radare2 = generic { - version_commit = "21875"; - gittap = "3.5.1"; - gittip = "4ec482ba2d4f554beeafb3aa47758e970bcab937"; - rev = "3.5.1"; - version = "3.5.1"; - sha256 = "1vpk5brxs5p4vj02vr0mp0wdily03c3shbyrqz6m85nbxdjhkcd8"; + version_commit = "22227"; + gittap = "3.6.0"; + gittip = "ff3bb6e3b2e6a519b4c975d05758c171a5186389"; + rev = "3.6.0"; + version = "3.6.0"; + sha256 = "0vp94qzznqv87vvjbyyj6swkm6gl7byqvb1jv23i8i42zi5n7qmd"; cs_ver = "4.0.1"; cs_sha256 = "0ijwxxk71nr9z91yxw20zfj4bbsbrgvixps5c7cpj163xlzlwba6"; }; r2-for-cutter = generic { - version_commit = "21875"; + version_commit = "22227"; gittap = "3.3.0"; gittip = "5a9127d2599c8ff61d8544be7d4c9384402e94a3"; rev = "5a9127d2599c8ff61d8544be7d4c9384402e94a3"; From b041cff6af003dfa95ed5143b426569af51cb94a Mon Sep 17 00:00:00 2001 From: Profpatsch Date: Fri, 21 Jun 2019 17:30:57 +0200 Subject: [PATCH 76/90] yj: init at 4.0.0 --- pkgs/development/tools/yj/default.nix | 28 +++++++++++++++++++++++++ pkgs/development/tools/yj/deps.nix | 30 +++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 3 files changed, 60 insertions(+) create mode 100644 pkgs/development/tools/yj/default.nix create mode 100644 pkgs/development/tools/yj/deps.nix diff --git a/pkgs/development/tools/yj/default.nix b/pkgs/development/tools/yj/default.nix new file mode 100644 index 000000000000..3520bcfc1b12 --- /dev/null +++ b/pkgs/development/tools/yj/default.nix @@ -0,0 +1,28 @@ +# This file was generated by https://github.com/kamilchm/go2nix v1.3.0 +{ stdenv, buildGoPackage, fetchgit, fetchhg, fetchbzr, fetchsvn }: + +buildGoPackage rec { + name = "yj-${version}"; + version = "4.0.0"; + rev = "d9a48607cc5c812e8cf4abccc8ad26f37ab51558"; + + goPackagePath = "github.com/sclevine/yj"; + + src = fetchgit { + inherit rev; + url = "https://github.com/sclevine/yj"; + sha256 = "04irphzs6hp9hvyski29ad29ga1kis3h8bw7jqvmy2c2rkrrsh7x"; + }; + + goDeps = ./deps.nix; + + meta = with stdenv.lib; { + description = ''Convert YAML <=> TOML <=> JSON <=> HCL''; + license = licenses.asl20; + maintainers = with maintainers; [ Profpatsch ]; + platforms = platforms.all; + downloadPage = "https://github.com/sclevine/yj"; + updateWalker = true; + inherit version; + }; +} diff --git a/pkgs/development/tools/yj/deps.nix b/pkgs/development/tools/yj/deps.nix new file mode 100644 index 000000000000..0bfe7f5f5da3 --- /dev/null +++ b/pkgs/development/tools/yj/deps.nix @@ -0,0 +1,30 @@ +# This file was generated by https://github.com/kamilchm/go2nix v1.3.0 +[ + { + goPackagePath = "github.com/BurntSushi/toml"; + fetch = { + type = "git"; + url = "https://github.com/BurntSushi/toml"; + rev = "3012a1dbe2e4bd1391d42b32f0577cb7bbc7f005"; + sha256 = "1fjdwwfzyzllgiwydknf1pwjvy49qxfsczqx5gz3y0izs7as99j6"; + }; + } + { + goPackagePath = "github.com/hashicorp/hcl"; + fetch = { + type = "git"; + url = "https://github.com/hashicorp/hcl"; + rev = "cf7d376da96d9cecec7c7483cec2735efe54a410"; + sha256 = "0i1zhgpyvvgwkz74k8wd3sygsap1saqv37rw0j5vdpaazmpr1qkb"; + }; + } + { + goPackagePath = "gopkg.in/yaml.v2"; + fetch = { + type = "git"; + url = "https://gopkg.in/yaml.v2"; + rev = "51d6538a90f86fe93ac480b35f37b2be17fef232"; + sha256 = "01wj12jzsdqlnidpyjssmj0r4yavlqy7dwrg7adqd8dicjc4ncsa"; + }; + } +] diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 79a31ca1d368..764a94081479 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6930,6 +6930,8 @@ in # To expose more packages for Yi, override the extraPackages arg. yi = callPackage ../applications/editors/yi/wrapper.nix { }; + yj = callPackage ../development/tools/yj { }; + yle-dl = callPackage ../tools/misc/yle-dl {}; you-get = python3Packages.callPackage ../tools/misc/you-get { }; From 7bc2aaff0ed863308ed91b72226f8a2f49537d96 Mon Sep 17 00:00:00 2001 From: Profpatsch Date: Fri, 21 Jun 2019 20:29:16 +0200 Subject: [PATCH 77/90] unp: improve file copying & fix manpage --- pkgs/tools/archivers/unp/default.nix | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/pkgs/tools/archivers/unp/default.nix b/pkgs/tools/archivers/unp/default.nix index 79c8e2f20ecc..106f75ab3769 100644 --- a/pkgs/tools/archivers/unp/default.nix +++ b/pkgs/tools/archivers/unp/default.nix @@ -1,11 +1,12 @@ { stdenv, lib, fetchurl, makeWrapper, perl, unrar, unzip, gzip, file, extraBackends ? [] }: -stdenv.mkDerivation rec { +let + runtime_bins = [ file unrar unzip gzip ] ++ extraBackends; + +in stdenv.mkDerivation rec { name = "unp-${version}"; version = "2.0-pre7"; - - runtime_bins = [ file unrar unzip gzip ] ++ extraBackends; - buildInputs = [ perl makeWrapper ] ++ runtime_bins; + buildInputs = [ perl makeWrapper ]; src = fetchurl { # url = "http://http.debian.net/debian/pool/main/u/unp/unp_2.0~pre7+nmu1.tar.bz2"; @@ -18,10 +19,10 @@ stdenv.mkDerivation rec { buildPhase = "true"; installPhase = '' mkdir -p $out/bin - mkdir -p $out/share/man - cp unp $out/bin/ - cp ucat $out/bin/ - cp debian/unp.1 $out/share/man + mkdir -p $out/share/man/man1 + install ./unp $out/bin/unp + install ./ucat $out/bin/ucat + cp debian/unp.1 $out/share/man/man1 wrapProgram $out/bin/unp \ --prefix PATH : ${lib.makeBinPath runtime_bins} From 7251830bf1a472acafbe70506c49f6c594e642f7 Mon Sep 17 00:00:00 2001 From: Profpatsch Date: Sat, 22 Jun 2019 13:58:43 +0200 Subject: [PATCH 78/90] unp: remove unfree unrar from the default backend list `unrar` is unfree, meaning `unp` cannot be built by default if `unrar` is in its dependencies. A simple env NIXPKGS_ALLOW_UNFREE=1 nix-shell -p unrar will make `unp` work with .rar files. --- pkgs/tools/archivers/unp/default.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/archivers/unp/default.nix b/pkgs/tools/archivers/unp/default.nix index 106f75ab3769..6880a49b4db7 100644 --- a/pkgs/tools/archivers/unp/default.nix +++ b/pkgs/tools/archivers/unp/default.nix @@ -1,7 +1,11 @@ -{ stdenv, lib, fetchurl, makeWrapper, perl, unrar, unzip, gzip, file, extraBackends ? [] }: +{ stdenv, lib, fetchurl, makeWrapper, perl +, unzip, gzip, file +# extractors which are added to unp’s PATH +, extraBackends ? [] +}: let - runtime_bins = [ file unrar unzip gzip ] ++ extraBackends; + runtime_bins = [ file unzip gzip ] ++ extraBackends; in stdenv.mkDerivation rec { name = "unp-${version}"; From 6877159dc0cbd066d233d93c92b47e0f9d87eac9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Min=C3=A1=C5=99?= Date: Mon, 24 Jun 2019 16:19:48 +0200 Subject: [PATCH 79/90] addressed comments MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - ditched configurePhase and installPhase - ffmpeg no longer optional Signed-off-by: Michal Minář --- pkgs/applications/misc/megasync/default.nix | 66 ++++++++------------- 1 file changed, 24 insertions(+), 42 deletions(-) diff --git a/pkgs/applications/misc/megasync/default.nix b/pkgs/applications/misc/megasync/default.nix index a04370f3acdb..c8c49d7b5d71 100644 --- a/pkgs/applications/misc/megasync/default.nix +++ b/pkgs/applications/misc/megasync/default.nix @@ -1,14 +1,12 @@ -{ lib -, stdenv +{ stdenv , autoconf , automake -, bash -, bashInteractive , c-ares , cryptopp , curl , doxygen , fetchFromGitHub +, ffmpeg , hicolor-icon-theme , libmediainfo , libraw @@ -17,18 +15,14 @@ , libuv , libzen , lsb-release -, makeDesktopItem , pkgconfig , qt5 , sqlite , swig , unzip , wget -, enableFFmpeg ? true, ffmpeg ? ffmpeg }: -assert enableFFmpeg -> ffmpeg != null; - stdenv.mkDerivation rec { name = "megasync-${version}"; version = "4.1.1.0"; @@ -41,17 +35,6 @@ stdenv.mkDerivation rec { fetchSubmodules = true; }; - desktopItem = makeDesktopItem { - name = "megasync"; - exec = "megasync"; - icon = "megasync"; - comment = meta.description; - desktopName = "MEGASync"; - genericName = "File Synchronizer"; - categories = "Network;FileTransfer;"; - startupNotify = "false"; - }; - nativeBuildInputs = [ autoconf automake @@ -66,7 +49,7 @@ stdenv.mkDerivation rec { c-ares cryptopp curl - #freeimage # unreferenced + ffmpeg hicolor-icon-theme libmediainfo libraw @@ -79,22 +62,30 @@ stdenv.mkDerivation rec { sqlite unzip wget - ] ++ stdenv.lib.optionals enableFFmpeg [ ffmpeg ]; + ]; patchPhase = '' for file in $(find src/ -type f \( -iname configure -o -iname \*.sh \) ); do - substituteInPlace "$file" \ - --replace "/bin/bash" "${bashInteractive}/bin/bash" + substituteInPlace "$file" --replace "/bin/bash" "${stdenv.shell}" done + + # Distro and version targets attempt to use lsb_release which is broken + # (see issue: https://github.com/NixOS/nixpkgs/issues/22729) + substituteInPlace src/MEGASync/platform/platform.pri \ + --replace "INSTALLS += distro" "# INSTALLS += distro" + + # megasync target is not part of the install rule thanks to a commented block + sed -i '/#\s*isEmpty(PREFIX)/,/#\s*INSTALLS\s*+=\s*target/s/^\s*#//' \ + src/MEGASync/MEGASync.pro ''; + dontUseQmakeConfigure = true; + preConfigure = '' cd src/MEGASync/mega ./autogen.sh ''; - configureScript = "./configure"; - configureFlags = [ "--disable-examples" "--disable-java" @@ -103,34 +94,25 @@ stdenv.mkDerivation rec { "--with-cares" "--with-cryptopp" "--with-curl" + "--with-ffmpeg" "--without-freeimage" # unreferenced even when found "--without-readline" "--without-termcap" "--with-sodium" "--with-sqlite" "--with-zlib" - ] ++ stdenv.lib.optionals enableFFmpeg ["--with-ffmpeg"]; + ]; - # TODO: unless overriden, qmake is called instead ?? - configurePhase = '' - runHook preConfigure - ./configure ${toString configureFlags} - runHook postConfigure + postConfigure = '' + cd ../.. ''; - postConfigure = "cd ../.."; - preBuild = '' qmake CONFIG+="release" MEGA.pro - lrelease MEGASync/MEGASync.pro - ''; - - # TODO: install bindings - installPhase = '' - mkdir -p $out/share/icons - install -Dm 755 MEGASync/megasync $out/bin/megasync - cp -r ${desktopItem}/share/applications $out/share - cp MEGASync/gui/images/uptodate.svg $out/share/icons/megasync.svg + pushd MEGASync + lrelease MEGASync.pro + DESKTOP_DESTDIR="$out" qmake PREFIX="$out" -o Makefile MEGASync.pro CONFIG+=release + popd ''; meta = with stdenv.lib; { From 13702bd49198f274d727bc3b643824074bc1799a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Maret?= Date: Mon, 24 Jun 2019 16:13:43 +0200 Subject: [PATCH 80/90] pythonPackages.black: fix tests in sandbox mode on Darwin Fixes #63722 --- pkgs/development/python-modules/black/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/python-modules/black/default.nix b/pkgs/development/python-modules/black/default.nix index fc729dd399d2..f17f94387f3e 100644 --- a/pkgs/development/python-modules/black/default.nix +++ b/pkgs/development/python-modules/black/default.nix @@ -15,6 +15,10 @@ buildPythonPackage rec { checkInputs = [ pytest glibcLocales ]; + # Necessary for the tests to pass on Darwin with sandbox enabled. + # Black starts a local server and needs to bind a local address. + __darwinAllowLocalNetworking = true; + # Don't know why these tests fails checkPhase = '' LC_ALL="en_US.UTF-8" pytest \ From e8fc86dbaae5dbf7d8d74f24224f9a04a9be266f Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Wed, 19 Jun 2019 11:53:37 -0700 Subject: [PATCH 81/90] pythonPackages.msrest: 0.6.4 -> 0.6.7 --- .../python-modules/msrest/default.nix | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/pkgs/development/python-modules/msrest/default.nix b/pkgs/development/python-modules/msrest/default.nix index e44d65e5cbe3..77a3e22f75c3 100644 --- a/pkgs/development/python-modules/msrest/default.nix +++ b/pkgs/development/python-modules/msrest/default.nix @@ -1,6 +1,6 @@ { lib , buildPythonPackage -, fetchFromGitHub +, fetchPypi , isPy3k , requests , requests_oauthlib @@ -18,16 +18,12 @@ }: buildPythonPackage rec { - version = "0.6.4"; + version = "0.6.7"; pname = "msrest"; - # no tests in PyPI tarball - # see https://github.com/Azure/msrest-for-python/pull/152 - src = fetchFromGitHub { - owner = "Azure"; - repo = "msrest-for-python"; - rev = "v${version}"; - sha256 = "0ilrc06qq0dw4qqzq1dq2vs6nymc39h19w52dwcyawwfalalnjzi"; + src = fetchPypi { + inherit pname version; + sha256 = "07136g3j7zgcvkxki4v6q1p2dm1nzzc28181s8dwic0y4ml8qlq5"; }; propagatedBuildInputs = [ @@ -48,6 +44,6 @@ buildPythonPackage rec { description = "The runtime library 'msrest' for AutoRest generated Python clients."; homepage = "https://azure.microsoft.com/en-us/develop/python/"; license = licenses.mit; - maintainers = with maintainers; [ bendlas ]; + maintainers = with maintainers; [ bendlas jonringer ]; }; } From c438c0e0b71c3b4be174486b0a5f60c67dd09721 Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Wed, 19 Jun 2019 15:28:19 -0700 Subject: [PATCH 82/90] pythonPackages.msrestazure: 0.6.0 -> 0.6.1 --- .../python-modules/msrestazure/default.nix | 29 +++++++++++++++---- 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/msrestazure/default.nix b/pkgs/development/python-modules/msrestazure/default.nix index a494bbfff07e..0ef06cd8fb15 100644 --- a/pkgs/development/python-modules/msrestazure/default.nix +++ b/pkgs/development/python-modules/msrestazure/default.nix @@ -1,25 +1,42 @@ { pkgs +, lib , buildPythonPackage -, fetchPypi +, fetchFromGitHub +, isPy3k , adal , msrest +, mock +, httpretty +, pytest +, pytest-asyncio }: buildPythonPackage rec { - version = "0.6.0"; + version = "0.6.1"; pname = "msrestazure"; - src = fetchPypi { - inherit pname version; - sha256 = "06s04f6nng4na2663kc12a3skiaqb631nscjfwpsrx4lzkf8bccr"; + # Pypi tarball doesnt include tests + # see https://github.com/Azure/msrestazure-for-python/pull/133 + src = fetchFromGitHub { + owner = "Azure"; + repo = "msrestazure-for-python"; + rev = "v${version}"; + sha256 = "09swndz57131b8x57mzibnsr1sv0l80pk62p89q99gsd6mvc389c"; }; propagatedBuildInputs = [ adal msrest ]; + checkInputs = [ httpretty mock pytest ] + ++ lib.optional isPy3k [ pytest-asyncio ]; + + checkPhase = '' + pytest tests/ + ''; + meta = with pkgs.lib; { description = "The runtime library 'msrestazure' for AutoRest generated Python clients."; homepage = "https://azure.microsoft.com/en-us/develop/python/"; license = licenses.mit; - maintainers = with maintainers; [ bendlas ]; + maintainers = with maintainers; [ bendlas jonringer ]; }; } From dce97daeda9ec110be55456fd2e3be57aed2ba71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Mon, 24 Jun 2019 17:32:37 +0100 Subject: [PATCH 83/90] rambox: 0.6.7 -> 0.6.9 --- .../networking/instant-messengers/rambox/bare.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/instant-messengers/rambox/bare.nix b/pkgs/applications/networking/instant-messengers/rambox/bare.nix index 259242606ad9..a9ee4dd6aea2 100644 --- a/pkgs/applications/networking/instant-messengers/rambox/bare.nix +++ b/pkgs/applications/networking/instant-messengers/rambox/bare.nix @@ -3,13 +3,13 @@ stdenv.mkDerivation rec { name = "rambox-bare-${version}"; - version = "0.6.7"; + version = "0.6.9"; src = fetchFromGitHub { owner = "ramboxapp"; repo = "community-edition"; rev = version; - sha256 = "1fsp4jxiypl6zkh5wgf9amyiyx9dqv6h8rsjn5xjp9bna27s0d3b"; + sha256 = "1h44srl2gzkhjaazpwz1pwy4dp5x776fc685kahlvjlsfls0fvy9"; }; nativeBuildInputs = [ nodejs-8_x ruby sencha ]; From a2585fff238949c45d1f4bb4be0ffddb641b4eac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Min=C3=A1=C5=99?= Date: Tue, 25 Jun 2019 04:23:47 +0200 Subject: [PATCH 84/90] reworked patches MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit lincense free -> unfree enabled parallel build Signed-off-by: Michal Minář --- pkgs/applications/misc/megasync/default.nix | 22 +++++++++---------- .../misc/megasync/install-megasync.patch | 21 ++++++++++++++++++ .../megasync/noinstall-distro-version.patch | 13 +++++++++++ 3 files changed, 45 insertions(+), 11 deletions(-) create mode 100644 pkgs/applications/misc/megasync/install-megasync.patch create mode 100644 pkgs/applications/misc/megasync/noinstall-distro-version.patch diff --git a/pkgs/applications/misc/megasync/default.nix b/pkgs/applications/misc/megasync/default.nix index c8c49d7b5d71..b3e739864171 100644 --- a/pkgs/applications/misc/megasync/default.nix +++ b/pkgs/applications/misc/megasync/default.nix @@ -64,22 +64,22 @@ stdenv.mkDerivation rec { wget ]; - patchPhase = '' + patches = [ + # Distro and version targets attempt to use lsb_release which is broken + # (see issue: https://github.com/NixOS/nixpkgs/issues/22729) + ./noinstall-distro-version.patch + # megasync target is not part of the install rule thanks to a commented block + ./install-megasync.patch + ]; + + postPatch = '' for file in $(find src/ -type f \( -iname configure -o -iname \*.sh \) ); do substituteInPlace "$file" --replace "/bin/bash" "${stdenv.shell}" done - - # Distro and version targets attempt to use lsb_release which is broken - # (see issue: https://github.com/NixOS/nixpkgs/issues/22729) - substituteInPlace src/MEGASync/platform/platform.pri \ - --replace "INSTALLS += distro" "# INSTALLS += distro" - - # megasync target is not part of the install rule thanks to a commented block - sed -i '/#\s*isEmpty(PREFIX)/,/#\s*INSTALLS\s*+=\s*target/s/^\s*#//' \ - src/MEGASync/MEGASync.pro ''; dontUseQmakeConfigure = true; + enableParallelBuilding = true; preConfigure = '' cd src/MEGASync/mega @@ -118,7 +118,7 @@ stdenv.mkDerivation rec { meta = with stdenv.lib; { description = "Easy automated syncing between your computers and your MEGA Cloud Drive"; homepage = https://mega.nz/; - license = licenses.free; + license = licenses.unfree; platforms = [ "i686-linux" "x86_64-linux" ]; maintainers = [ maintainers.michojel ]; }; diff --git a/pkgs/applications/misc/megasync/install-megasync.patch b/pkgs/applications/misc/megasync/install-megasync.patch new file mode 100644 index 000000000000..7d8748528e7f --- /dev/null +++ b/pkgs/applications/misc/megasync/install-megasync.patch @@ -0,0 +1,21 @@ +Index: source/src/MEGASync/MEGASync.pro +=================================================================== +--- source.orig/src/MEGASync/MEGASync.pro ++++ source/src/MEGASync/MEGASync.pro +@@ -28,11 +28,11 @@ unix:!macx { + TARGET = megasync + + # Uncomment the following if "make install" doesn't copy megasync in /usr/bin directory +-# isEmpty(PREFIX) { +-# PREFIX = /usr +-# } +-# target.path = $$PREFIX/bin +-# INSTALLS += target ++ isEmpty(PREFIX) { ++ PREFIX = /usr ++ } ++ target.path = $$PREFIX/bin ++ INSTALLS += target + } + else { + TARGET = MEGAsync diff --git a/pkgs/applications/misc/megasync/noinstall-distro-version.patch b/pkgs/applications/misc/megasync/noinstall-distro-version.patch new file mode 100644 index 000000000000..bbf100737bc4 --- /dev/null +++ b/pkgs/applications/misc/megasync/noinstall-distro-version.patch @@ -0,0 +1,13 @@ +Index: source/src/MEGASync/platform/platform.pri +=================================================================== +--- source.orig/src/MEGASync/platform/platform.pri ++++ source/src/MEGASync/platform/platform.pri +@@ -37,7 +37,7 @@ unix:!macx { + system(command -v lsb_release): version.commands = lsb_release -rs > $$version.target + version.files = $$version.target + +- INSTALLS += distro version ++ # INSTALLS += distro version + + QT += dbus + SOURCES += $$PWD/linux/LinuxPlatform.cpp \ From f21aa0995b217f6fb08d6258645e8897ca291469 Mon Sep 17 00:00:00 2001 From: Peter Hoeg Date: Thu, 6 Jun 2019 20:35:23 +0800 Subject: [PATCH 85/90] crystal: init at 0.29.0 --- .../development/compilers/crystal/default.nix | 54 +++++++++++++++---- pkgs/top-level/all-packages.nix | 2 + 2 files changed, 47 insertions(+), 9 deletions(-) diff --git a/pkgs/development/compilers/crystal/default.nix b/pkgs/development/compilers/crystal/default.nix index 1e0f8656ef08..2e823fe1f0f8 100644 --- a/pkgs/development/compilers/crystal/default.nix +++ b/pkgs/development/compilers/crystal/default.nix @@ -1,11 +1,11 @@ { stdenv, lib, fetchFromGitHub, fetchurl, makeWrapper -, gmp, openssl, readline, tzdata, libxml2, libyaml +, coreutils, git, gmp, nettools, openssl, readline, tzdata, libxml2, libyaml , boehmgc, libatomic_ops, pcre, libevent, libiconv, llvm, clang, which, zlib }: # We need multiple binaries as a given binary isn't always able to build -# (even slightly) older or newer version. +# (even slightly) older or newer versions. # - 0.26.1 can build 0.25.x and 0.26.x but not 0.27.x -# - 0.27.2 can build 0.27.x but not 0.25.x and 0.26.x +# - 0.27.2 can build 0.27.x but not 0.25.x, 0.26.x and 0.29.x # # We need to keep around at least the latest version released with a stable # NixOS @@ -19,7 +19,7 @@ let arch = archs."${stdenv.system}" or (throw "system ${stdenv.system} not supported"); - checkInputs = [ gmp openssl readline libxml2 libyaml tzdata ]; + checkInputs = [ git gmp openssl readline libxml2 libyaml ]; genericBinary = { version, sha256s, rel ? 1 }: stdenv.mkDerivation rec { @@ -38,8 +38,8 @@ let generic = { version, sha256, binary, doCheck ? true }: stdenv.mkDerivation rec { - inherit doCheck; - name = "crystal-${version}"; + pname = "crystal"; + inherit doCheck version; src = fetchFromGitHub { owner = "crystal-lang"; @@ -48,14 +48,30 @@ let inherit sha256; }; + # we are almost able to run the full test suite now postPatch = '' + substituteInPlace src/crystal/system/unix/time.cr \ + --replace /usr/share/zoneinfo ${tzdata}/share/zoneinfo + ln -s spec/compiler spec/std + + substituteInPlace spec/std/file_spec.cr \ + --replace '/bin/ls' '${coreutils}/bin/ls' \ + --replace '/usr/share' '/tmp/test' + substituteInPlace spec/std/process_spec.cr \ - --replace /bin/ /run/current-system/sw/bin/ + --replace '/bin/cat' '${coreutils}/bin/cat' \ + --replace '/bin/ls' '${coreutils}/bin/ls' \ + --replace '/usr/bin/env' '${coreutils}/bin/env' \ + --replace '"env"' '"${coreutils}/bin/env"' \ + --replace '"/usr"' '"/tmp"' + + substituteInPlace spec/std/system_spec.cr \ + --replace '`hostname`' '`${nettools}/bin/hostname`' ''; buildInputs = [ - boehmgc libatomic_ops pcre libevent + boehmgc libatomic_ops pcre libevent libyaml llvm zlib openssl ] ++ stdenv.lib.optionals stdenv.isDarwin [ libiconv @@ -111,7 +127,11 @@ let checkTarget = "spec"; preCheck = '' + export HOME=/tmp + mkdir -p $HOME/test + export LIBRARY_PATH=${lib.makeLibraryPath checkInputs}:$LIBRARY_PATH + export PATH=${lib.makeBinPath checkInputs}:$PATH ''; meta = with lib; { @@ -142,6 +162,15 @@ in rec { }; }; + binaryCrystal_0_29 = genericBinary { + version = "0.29.0"; + sha256s = { + "x86_64-linux" = "1wrk29sfx35akg7hxwpdiikvl18wd40gq1kwirw7x522hnq7vlna"; + "i686-linux" = "1nx0piis2k3nn7kqiijqazzbvlaavhgvsln0l3dxmpfa4i4dz5h2"; + "x86_64-darwin" = "1fd0fbyf05abivnp3igjlrm2axf65n2wdmg4aq6nqj60ipc01rvd"; + }; + }; + crystal_0_25 = generic { version = "0.25.1"; sha256 = "15xmbkalsdk9qpc6wfpkly3sifgw6a4ai5jzlv78dh3jp7glmgyl"; @@ -163,5 +192,12 @@ in rec { binary = binaryCrystal_0_27; }; - crystal = crystal_0_27; + crystal_0_29 = generic { + version = "0.29.0"; + sha256 = "0v9l253b2x8yw6a43vvalywpwciwr094l3g5wakmndfrzak2s3zr"; + doCheck = false; # 6 checks are failing now + binary = binaryCrystal_0_29; + }; + + crystal = crystal_0_29; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 6246cc4a5fb5..eb95e09793da 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7145,6 +7145,8 @@ in }) crystal_0_25 crystal_0_26 + crystal_0_27 + crystal_0_29 crystal; icr = callPackage ../development/tools/icr {}; From 24dc219de94d1763d9b1899a61ffb33245c2a49c Mon Sep 17 00:00:00 2001 From: Peter Hoeg Date: Mon, 24 Jun 2019 16:52:44 +0800 Subject: [PATCH 86/90] shards: 0.8.1 -> 0.9.0 --- pkgs/development/tools/build-managers/shards/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/build-managers/shards/default.nix b/pkgs/development/tools/build-managers/shards/default.nix index 02d5adb0c34d..00345179131a 100644 --- a/pkgs/development/tools/build-managers/shards/default.nix +++ b/pkgs/development/tools/build-managers/shards/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { name = "shards-${version}"; - version = "0.8.1"; + version = "0.9.0"; src = fetchFromGitHub { owner = "crystal-lang"; repo = "shards"; rev = "v${version}"; - sha256 = "1cjn2lafr08yiqzlhyqx14jjjxf1y24i2kk046px07gljpnlgqwk"; + sha256 = "19q0xww4v0h5ln9gz8d8zv0c9ig761ik7gw8y31yxynzgzihwpf4"; }; buildInputs = [ crystal libyaml pcre which ]; From fda3f06656840dc22addd06fce9be850b75486cd Mon Sep 17 00:00:00 2001 From: Peter Hoeg Date: Tue, 25 Jun 2019 11:32:56 +0800 Subject: [PATCH 87/90] scry: 0.7.1 -> 0.8.0 --- pkgs/development/tools/scry/default.nix | 9 +++++---- .../scry/fix_for_crystal_0_28_and_above.patch | 20 +++++++++++++++++++ 2 files changed, 25 insertions(+), 4 deletions(-) create mode 100644 pkgs/development/tools/scry/fix_for_crystal_0_28_and_above.patch diff --git a/pkgs/development/tools/scry/default.nix b/pkgs/development/tools/scry/default.nix index 03e7c64f5496..05f7805a55ac 100644 --- a/pkgs/development/tools/scry/default.nix +++ b/pkgs/development/tools/scry/default.nix @@ -1,9 +1,8 @@ -{ stdenv, fetchFromGitHub, crystal, shards, which }: +{ stdenv, lib, fetchFromGitHub, crystal, shards, llvm, which }: stdenv.mkDerivation rec { pname = "scry"; - # 0.7.1 doesn't work with crystal > 0.25 - version = "0.7.1.20180919"; + version = "0.8.0"; src = fetchFromGitHub { owner = "crystal-lang-tools"; @@ -12,7 +11,9 @@ stdenv.mkDerivation rec { sha256 = "1yq7jap3y5pr2yqc6fn6bxshzwv7dz3w97incq7wpcvi7ibb4lcn"; }; - nativeBuildInputs = [ crystal shards which ]; + patches = lib.optional (lib.versionAtLeast crystal.version "0.28") ./fix_for_crystal_0_28_and_above.patch; + + nativeBuildInputs = [ crystal shards llvm which ]; buildPhase = '' runHook preBuild diff --git a/pkgs/development/tools/scry/fix_for_crystal_0_28_and_above.patch b/pkgs/development/tools/scry/fix_for_crystal_0_28_and_above.patch new file mode 100644 index 000000000000..909b790b81a8 --- /dev/null +++ b/pkgs/development/tools/scry/fix_for_crystal_0_28_and_above.patch @@ -0,0 +1,20 @@ +diff --git a/src/scry/completion_provider.cr b/src/scry/completion_provider.cr +index 29e0d36..f67438c 100644 +--- a/src/scry/completion_provider.cr ++++ b/src/scry/completion_provider.cr +@@ -1,4 +1,5 @@ + require "./log" ++require "compiler/crystal/codegen/target" + require "compiler/crystal/crystal_path" + require "./completion/*" + +diff --git a/src/scry/parse_analyzer.cr b/src/scry/parse_analyzer.cr +index d87eca4..bbe9ed5 100644 +--- a/src/scry/parse_analyzer.cr ++++ b/src/scry/parse_analyzer.cr +@@ -1,4 +1,5 @@ + require "compiler/crystal/syntax" ++require "compiler/crystal/codegen/target" + require "compiler/crystal/crystal_path" + require "./workspace" + require "./text_document" From ebe4375ff429cc2949b63dc1ce014ee625f411a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 25 Jun 2019 07:51:07 +0100 Subject: [PATCH 88/90] rambox: upgrade to electron 4 This is what upstream uses as well --- .../networking/instant-messengers/rambox/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/instant-messengers/rambox/default.nix b/pkgs/applications/networking/instant-messengers/rambox/default.nix index 84ea02f7cb38..46157c2a35f3 100644 --- a/pkgs/applications/networking/instant-messengers/rambox/default.nix +++ b/pkgs/applications/networking/instant-messengers/rambox/default.nix @@ -1,6 +1,6 @@ { stdenv, newScope, makeWrapper , wrapGAppsHook, gnome3, glib -, electron_3, xdg_utils, makeDesktopItem +, electron, xdg_utils, makeDesktopItem , auth0ClientID ? "0spuNKfIGeLAQ_Iki9t3fGxbfJl3k8SU" , auth0Domain ? "nixpkgs.auth0.com" }: @@ -43,7 +43,7 @@ stdenv.mkDerivation { ''; postFixup = '' - makeWrapper ${electron_3}/bin/electron $out/bin/rambox \ + makeWrapper ${electron}/bin/electron $out/bin/rambox \ --add-flags "${rambox-bare} --without-update" \ "''${gappsWrapperArgs[@]}" \ --prefix PATH : ${xdg_utils}/bin From 205296f55a45b1dabb5e91568feccffd1fedee3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 25 Jun 2019 07:52:54 +0100 Subject: [PATCH 89/90] rambox: remove gapps-wrapper This is now provided by electron itself. --- .../networking/instant-messengers/rambox/default.nix | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pkgs/applications/networking/instant-messengers/rambox/default.nix b/pkgs/applications/networking/instant-messengers/rambox/default.nix index 46157c2a35f3..db488c2f670e 100644 --- a/pkgs/applications/networking/instant-messengers/rambox/default.nix +++ b/pkgs/applications/networking/instant-messengers/rambox/default.nix @@ -1,5 +1,4 @@ { stdenv, newScope, makeWrapper -, wrapGAppsHook, gnome3, glib , electron, xdg_utils, makeDesktopItem , auth0ClientID ? "0spuNKfIGeLAQ_Iki9t3fGxbfJl3k8SU" , auth0Domain ? "nixpkgs.auth0.com" }: @@ -28,9 +27,8 @@ with self; stdenv.mkDerivation { name = "rambox-${rambox-bare.version}"; - nativeBuildInputs = [ makeWrapper wrapGAppsHook ]; + nativeBuildInputs = [ makeWrapper ]; - buildInputs = [ glib gnome3.gsettings_desktop_schemas ]; unpackPhase = ":"; dontWrapGApps = true; # we only want $gappsWrapperArgs here @@ -45,7 +43,6 @@ stdenv.mkDerivation { postFixup = '' makeWrapper ${electron}/bin/electron $out/bin/rambox \ --add-flags "${rambox-bare} --without-update" \ - "''${gappsWrapperArgs[@]}" \ --prefix PATH : ${xdg_utils}/bin ''; From e478e6bdff2f8de59ecebd5e3377d03d5150e8a0 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Mon, 17 Jun 2019 06:48:38 +0000 Subject: [PATCH 90/90] saga: 6.3.0 -> 7.2.0 --- pkgs/applications/gis/saga/default.nix | 8 +-- pkgs/applications/gis/saga/finite-6.3.0.patch | 55 ------------------- 2 files changed, 3 insertions(+), 60 deletions(-) delete mode 100644 pkgs/applications/gis/saga/finite-6.3.0.patch diff --git a/pkgs/applications/gis/saga/default.nix b/pkgs/applications/gis/saga/default.nix index 4738bfba14a8..34bb8c9f55ad 100644 --- a/pkgs/applications/gis/saga/default.nix +++ b/pkgs/applications/gis/saga/default.nix @@ -3,7 +3,7 @@ unixODBC , poppler, hdf4, hdf5, netcdf, sqlite, qhull, giflib }: stdenv.mkDerivation rec { - name = "saga-6.3.0"; + name = "saga-7.2.0"; # See https://groups.google.com/forum/#!topic/nix-devel/h_vSzEJAPXs # for why the have additional buildInputs on darwin @@ -14,13 +14,11 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - patches = [ ./finite-6.3.0.patch]; - CXXFLAGS = stdenv.lib.optionalString stdenv.cc.isClang "-std=c++11 -Wno-narrowing"; src = fetchurl { - url = "mirror://sourceforge/project/saga-gis/SAGA%20-%206/SAGA%20-%206.3.0/saga-6.3.0.tar.gz"; - sha256 = "0hyjim8fcp3mna1hig22nnn4ki3j6b7096am2amcs99sdr09jjxv"; + url = "mirror://sourceforge/project/saga-gis/SAGA%20-%207/SAGA%20-%207.2.0/saga-7.2.0.tar.gz"; + sha256 = "10gjc5mc5kwg2c2la22hgwx6s5q60z9xxffjpjw0zrlhksijl5an"; }; meta = with stdenv.lib; { diff --git a/pkgs/applications/gis/saga/finite-6.3.0.patch b/pkgs/applications/gis/saga/finite-6.3.0.patch deleted file mode 100644 index 91c9543edfda..000000000000 --- a/pkgs/applications/gis/saga/finite-6.3.0.patch +++ /dev/null @@ -1,55 +0,0 @@ -diff --git a/src/tools/imagery/imagery_maxent/me.cpp b/src/tools/imagery/imagery_maxent/me.cpp -index c5da854..d3e9cff 100755 ---- a/src/tools/imagery/imagery_maxent/me.cpp -+++ b/src/tools/imagery/imagery_maxent/me.cpp -@@ -21,7 +21,7 @@ - #ifdef _SAGA_MSW - #define isinf(x) (!_finite(x)) - #else --#define isinf(x) (!finite(x)) -+#define isinf(x) (!isfinite(x)) - #endif - - /** The input array contains a set of log probabilities lp1, lp2, lp3 -@@ -47,7 +47,7 @@ double sumLogProb(vector& logprobs) - /** returns log (e^logprob1 + e^logprob2). */ - double sumLogProb(double logprob1, double logprob2) - { -- if (isinf(logprob1) && isinf(logprob2)) -+ if (isinf(logprob1) && isinf(logprob2)) - return logprob1; // both prob1 and prob2 are 0, return log 0. - if (logprob1>logprob2) - return logprob1+log(1+exp(logprob2-logprob1)); -@@ -70,8 +70,8 @@ void MaxEntModel::print(ostream& ostrm, MaxEntTrainer& trainer) - for (FtMap::iterator it = _index.begin(); it!=_index.end(); it++) { - unsigned long i = it->second; - for (unsigned long c = 0; c<_classes; c++) { -- ostrm << "lambda(" << trainer.className(c) << ", " -- << trainer.getStr(it->first) << ")=" -+ ostrm << "lambda(" << trainer.className(c) << ", " -+ << trainer.getStr(it->first) << ")=" - << _lambda[i+c] << endl; - } - } -@@ -86,7 +86,7 @@ int MaxEntModel::getProbs(MaxEntEvent& event, vector& probs) - double s = 0; - for (unsigned int f = 0; fsecond+c]; - } - probs[c] = s; -@@ -142,10 +142,10 @@ double MaxEntModel::getObsCounts(EventSet& events, vector& obsCounts) - double ftSum = 0; - for (unsigned long j=0; jsecond+c] += count; - else { // new feature, need to expand obsCounts and _lambda -- for (unsigned int k = 0; k<_classes; k++) -+ for (unsigned int k = 0; k<_classes; k++) - obsCounts.push_back(0); - obsCounts[_lambda.size()+c] += count; - addFeature(e[j]);