Merge branch 'staging-next' into staging

This commit is contained in:
Jan Tojnar 2021-01-24 00:10:20 +01:00
commit 94482cb29c
No known key found for this signature in database
GPG Key ID: 7FAB2A15F7A607A4
871 changed files with 3294 additions and 3821 deletions

View File

@ -291,5 +291,40 @@ stdenv.mkDerivation {
}
</programlisting>
</section>
<section xml:id="sec-overlays-alternatives-mpi">
<title>Switching the MPI implementation</title>
<para>
All programs that are built with
<link xlink:href="https://en.wikipedia.org/wiki/Message_Passing_Interface">MPI</link>
support use the generic attribute <varname>mpi</varname>
as an input. At the moment Nixpkgs natively provides two different
MPI implementations:
<itemizedlist>
<listitem>
<para>
<link xlink:href="https://www.open-mpi.org/">Open MPI</link>
(default), attribute name <varname>openmpi</varname>
</para>
</listitem>
<listitem>
<para>
<link xlink:href="https://www.mpich.org/">MPICH</link>,
attribute name <varname>mpich</varname>
</para>
</listitem>
</itemizedlist>
</para>
<para>
To provide MPI enabled applications that use <literal>MPICH</literal>, instead
of the default <literal>Open MPI</literal>, simply use the following overlay:
</para>
<programlisting>
self: super:
{
mpi = self.mpich;
}
</programlisting>
</section>
</section>
</chapter>

View File

@ -1,7 +1,7 @@
{ lib }:
rec {
# platform.gcc.arch to its features (as in /proc/cpuinfo)
# gcc.arch to its features (as in /proc/cpuinfo)
features = {
default = [ ];
# x86_64 Intel

View File

@ -24,8 +24,6 @@ rec {
# Either of these can be losslessly-extracted from `parsed` iff parsing succeeds.
system = parse.doubleFromSystem final.parsed;
config = parse.tripleFromSystem final.parsed;
# Just a guess, based on `system`
platform = platforms.select final;
# Determine whether we are compatible with the provided CPU
isCompatible = platform: parse.isCompatible final.parsed.cpu platform.parsed.cpu;
# Derived meta-data
@ -79,11 +77,20 @@ rec {
};
isStatic = final.isWasm || final.isRedox;
kernelArch =
# Just a guess, based on `system`
inherit
({
linux-kernel = args.linux-kernel or {};
gcc = args.gcc or {};
rustc = args.rust or {};
} // platforms.select final)
linux-kernel gcc rustc;
linuxArch =
if final.isAarch32 then "arm"
else if final.isAarch64 then "arm64"
else if final.isx86_32 then "x86"
else if final.isx86_64 then "x86"
else if final.isx86_32 then "i386"
else if final.isx86_64 then "x86_64"
else if final.isMips then "mips"
else final.parsed.cpu.name;
@ -129,7 +136,7 @@ rec {
else throw "Don't know how to run ${final.config} executables.";
} // mapAttrs (n: v: v final.parsed) inspect.predicates
// mapAttrs (n: v: v final.platform.gcc.arch or "default") architectures.predicates
// mapAttrs (n: v: v final.gcc.arch or "default") architectures.predicates
// args;
in assert final.useAndroidPrebuilt -> final.isAndroid;
assert lib.foldl

View File

@ -7,7 +7,6 @@ let
riscv = bits: {
config = "riscv${bits}-unknown-linux-gnu";
platform = platforms.riscv-multiplatform;
};
in
@ -17,84 +16,68 @@ rec {
#
powernv = {
config = "powerpc64le-unknown-linux-gnu";
platform = platforms.powernv;
};
musl-power = {
config = "powerpc64le-unknown-linux-musl";
platform = platforms.powernv;
};
sheevaplug = {
config = "armv5tel-unknown-linux-gnueabi";
platform = platforms.sheevaplug;
};
} // platforms.sheevaplug;
raspberryPi = {
config = "armv6l-unknown-linux-gnueabihf";
platform = platforms.raspberrypi;
};
} // platforms.raspberrypi;
remarkable1 = {
config = "armv7l-unknown-linux-gnueabihf";
platform = platforms.zero-gravitas;
};
} // platforms.zero-gravitas;
remarkable2 = {
config = "armv7l-unknown-linux-gnueabihf";
platform = platforms.zero-sugar;
};
} // platforms.zero-sugar;
armv7l-hf-multiplatform = {
config = "armv7l-unknown-linux-gnueabihf";
platform = platforms.armv7l-hf-multiplatform;
};
aarch64-multiplatform = {
config = "aarch64-unknown-linux-gnu";
platform = platforms.aarch64-multiplatform;
};
armv7a-android-prebuilt = {
config = "armv7a-unknown-linux-androideabi";
sdkVer = "29";
ndkVer = "21";
platform = platforms.armv7a-android;
useAndroidPrebuilt = true;
};
} // platforms.armv7a-android;
aarch64-android-prebuilt = {
config = "aarch64-unknown-linux-android";
sdkVer = "29";
ndkVer = "21";
platform = platforms.aarch64-multiplatform;
useAndroidPrebuilt = true;
};
scaleway-c1 = armv7l-hf-multiplatform // rec {
platform = platforms.scaleway-c1;
inherit (platform.gcc) fpu;
};
scaleway-c1 = armv7l-hf-multiplatform // platforms.scaleway-c1;
pogoplug4 = {
config = "armv5tel-unknown-linux-gnueabi";
platform = platforms.pogoplug4;
};
} // platforms.pogoplug4;
ben-nanonote = {
config = "mipsel-unknown-linux-uclibc";
platform = platforms.ben_nanonote;
};
} // platforms.ben_nanonote;
fuloongminipc = {
config = "mipsel-unknown-linux-gnu";
platform = platforms.fuloong2f_n32;
};
} // platforms.fuloong2f_n32;
muslpi = raspberryPi // {
config = "armv6l-unknown-linux-musleabihf";
};
aarch64-multiplatform-musl = aarch64-multiplatform // {
aarch64-multiplatform-musl = {
config = "aarch64-unknown-linux-musl";
};
@ -110,13 +93,11 @@ rec {
riscv64-embedded = {
config = "riscv64-none-elf";
libc = "newlib";
platform = platforms.riscv-multiplatform;
};
riscv32-embedded = {
config = "riscv32-none-elf";
libc = "newlib";
platform = platforms.riscv-multiplatform;
};
mmix = {
@ -136,13 +117,11 @@ rec {
vc4 = {
config = "vc4-elf";
libc = "newlib";
platform = {};
};
or1k = {
config = "or1k-elf";
libc = "newlib";
platform = {};
};
arm-embedded = {
@ -204,7 +183,6 @@ rec {
xcodeVer = "11.3.1";
xcodePlatform = "iPhoneOS";
useiOSPrebuilt = true;
platform = {};
};
iphone32 = {
@ -214,7 +192,6 @@ rec {
xcodeVer = "11.3.1";
xcodePlatform = "iPhoneOS";
useiOSPrebuilt = true;
platform = {};
};
iphone64-simulator = {
@ -224,7 +201,6 @@ rec {
xcodeVer = "11.3.1";
xcodePlatform = "iPhoneSimulator";
useiOSPrebuilt = true;
platform = {};
};
iphone32-simulator = {
@ -234,7 +210,6 @@ rec {
xcodeVer = "11.3.1";
xcodePlatform = "iPhoneSimulator";
useiOSPrebuilt = true;
platform = {};
};
#
@ -245,7 +220,6 @@ rec {
mingw32 = {
config = "i686-w64-mingw32";
libc = "msvcrt"; # This distinguishes the mingw (non posix) toolchain
platform = {};
};
# 64 bit mingw-w64
@ -253,7 +227,6 @@ rec {
# That's the triplet they use in the mingw-w64 docs.
config = "x86_64-w64-mingw32";
libc = "msvcrt"; # This distinguishes the mingw (non posix) toolchain
platform = {};
};
# BSDs
@ -275,6 +248,5 @@ rec {
# Ghcjs
ghcjs = {
config = "js-unknown-ghcjs";
platform = {};
};
}

View File

@ -1,39 +1,36 @@
{ lib }:
rec {
pcBase = {
name = "pc";
kernelBaseConfig = "defconfig";
# Build whatever possible as a module, if not stated in the extra config.
kernelAutoModules = true;
kernelTarget = "bzImage";
pc = {
linux-kernel = {
name = "pc";
baseConfig = "defconfig";
# Build whatever possible as a module, if not stated in the extra config.
autoModules = true;
target = "bzImage";
};
};
pc64 = pcBase // { kernelArch = "x86_64"; };
pc32 = pcBase // { kernelArch = "i386"; };
pc32_simplekernel = pc32 // {
kernelAutoModules = false;
};
pc64_simplekernel = pc64 // {
kernelAutoModules = false;
pc_simplekernel = lib.recursiveUpdate pc {
linux-kernel.autoModules = false;
};
powernv = {
name = "PowerNV";
kernelArch = "powerpc";
kernelBaseConfig = "powernv_defconfig";
kernelTarget = "zImage";
kernelInstallTarget = "install";
kernelFile = "vmlinux";
kernelAutoModules = true;
# avoid driver/FS trouble arising from unusual page size
kernelExtraConfig = ''
PPC_64K_PAGES n
PPC_4K_PAGES y
IPV6 y
'';
linux-kernel = {
name = "PowerNV";
baseConfig = "powernv_defconfig";
target = "zImage";
installTarget = "install";
file = "vmlinux";
autoModules = true;
# avoid driver/FS trouble arising from unusual page size
extraConfig = ''
PPC_64K_PAGES n
PPC_4K_PAGES y
IPV6 y
'';
};
};
##
@ -41,17 +38,12 @@ rec {
##
pogoplug4 = {
name = "pogoplug4";
linux-kernel = {
name = "pogoplug4";
gcc = {
arch = "armv5te";
};
kernelBaseConfig = "multi_v5_defconfig";
kernelArch = "arm";
kernelAutoModules = false;
kernelExtraConfig =
''
baseConfig = "multi_v5_defconfig";
autoModules = false;
extraConfig = ''
# Ubi for the mtd
MTD_UBI y
UBIFS_FS y
@ -61,136 +53,144 @@ rec {
UBIFS_FS_ZLIB y
UBIFS_FS_DEBUG n
'';
kernelMakeFlags = [ "LOADADDR=0x8000" ];
kernelTarget = "uImage";
# TODO reenable once manual-config's config actually builds a .dtb and this is checked to be working
#kernelDTB = true;
makeFlags = [ "LOADADDR=0x8000" ];
target = "uImage";
# TODO reenable once manual-config's config actually builds a .dtb and this is checked to be working
#DTB = true;
};
gcc = {
arch = "armv5te";
};
};
sheevaplug = {
name = "sheevaplug";
kernelBaseConfig = "multi_v5_defconfig";
kernelArch = "arm";
kernelAutoModules = false;
kernelExtraConfig = ''
BLK_DEV_RAM y
BLK_DEV_INITRD y
BLK_DEV_CRYPTOLOOP m
BLK_DEV_DM m
DM_CRYPT m
MD y
REISERFS_FS m
BTRFS_FS m
XFS_FS m
JFS_FS m
EXT4_FS m
USB_STORAGE_CYPRESS_ATACB m
linux-kernel = {
name = "sheevaplug";
# mv cesa requires this sw fallback, for mv-sha1
CRYPTO_SHA1 y
# Fast crypto
CRYPTO_TWOFISH y
CRYPTO_TWOFISH_COMMON y
CRYPTO_BLOWFISH y
CRYPTO_BLOWFISH_COMMON y
baseConfig = "multi_v5_defconfig";
autoModules = false;
extraConfig = ''
BLK_DEV_RAM y
BLK_DEV_INITRD y
BLK_DEV_CRYPTOLOOP m
BLK_DEV_DM m
DM_CRYPT m
MD y
REISERFS_FS m
BTRFS_FS m
XFS_FS m
JFS_FS m
EXT4_FS m
USB_STORAGE_CYPRESS_ATACB m
IP_PNP y
IP_PNP_DHCP y
NFS_FS y
ROOT_NFS y
TUN m
NFS_V4 y
NFS_V4_1 y
NFS_FSCACHE y
NFSD m
NFSD_V2_ACL y
NFSD_V3 y
NFSD_V3_ACL y
NFSD_V4 y
NETFILTER y
IP_NF_IPTABLES y
IP_NF_FILTER y
IP_NF_MATCH_ADDRTYPE y
IP_NF_TARGET_LOG y
IP_NF_MANGLE y
IPV6 m
VLAN_8021Q m
# mv cesa requires this sw fallback, for mv-sha1
CRYPTO_SHA1 y
# Fast crypto
CRYPTO_TWOFISH y
CRYPTO_TWOFISH_COMMON y
CRYPTO_BLOWFISH y
CRYPTO_BLOWFISH_COMMON y
CIFS y
CIFS_XATTR y
CIFS_POSIX y
CIFS_FSCACHE y
CIFS_ACL y
IP_PNP y
IP_PNP_DHCP y
NFS_FS y
ROOT_NFS y
TUN m
NFS_V4 y
NFS_V4_1 y
NFS_FSCACHE y
NFSD m
NFSD_V2_ACL y
NFSD_V3 y
NFSD_V3_ACL y
NFSD_V4 y
NETFILTER y
IP_NF_IPTABLES y
IP_NF_FILTER y
IP_NF_MATCH_ADDRTYPE y
IP_NF_TARGET_LOG y
IP_NF_MANGLE y
IPV6 m
VLAN_8021Q m
WATCHDOG y
WATCHDOG_CORE y
ORION_WATCHDOG m
CIFS y
CIFS_XATTR y
CIFS_POSIX y
CIFS_FSCACHE y
CIFS_ACL y
ZRAM m
NETCONSOLE m
WATCHDOG y
WATCHDOG_CORE y
ORION_WATCHDOG m
# Disable OABI to have seccomp_filter (required for systemd)
# https://github.com/raspberrypi/firmware/issues/651
OABI_COMPAT n
ZRAM m
NETCONSOLE m
# Fail to build
DRM n
SCSI_ADVANSYS n
USB_ISP1362_HCD n
SND_SOC n
SND_ALI5451 n
FB_SAVAGE n
SCSI_NSP32 n
ATA_SFF n
SUNGEM n
IRDA n
ATM_HE n
SCSI_ACARD n
BLK_DEV_CMD640_ENHANCED n
# Disable OABI to have seccomp_filter (required for systemd)
# https://github.com/raspberrypi/firmware/issues/651
OABI_COMPAT n
FUSE_FS m
# Fail to build
DRM n
SCSI_ADVANSYS n
USB_ISP1362_HCD n
SND_SOC n
SND_ALI5451 n
FB_SAVAGE n
SCSI_NSP32 n
ATA_SFF n
SUNGEM n
IRDA n
ATM_HE n
SCSI_ACARD n
BLK_DEV_CMD640_ENHANCED n
# systemd uses cgroups
CGROUPS y
FUSE_FS m
# Latencytop
LATENCYTOP y
# systemd uses cgroups
CGROUPS y
# Ubi for the mtd
MTD_UBI y
UBIFS_FS y
UBIFS_FS_XATTR y
UBIFS_FS_ADVANCED_COMPR y
UBIFS_FS_LZO y
UBIFS_FS_ZLIB y
UBIFS_FS_DEBUG n
# Latencytop
LATENCYTOP y
# Kdb, for kernel troubles
KGDB y
KGDB_SERIAL_CONSOLE y
KGDB_KDB y
'';
kernelMakeFlags = [ "LOADADDR=0x0200000" ];
kernelTarget = "uImage";
kernelDTB = true; # Beyond 3.10
# Ubi for the mtd
MTD_UBI y
UBIFS_FS y
UBIFS_FS_XATTR y
UBIFS_FS_ADVANCED_COMPR y
UBIFS_FS_LZO y
UBIFS_FS_ZLIB y
UBIFS_FS_DEBUG n
# Kdb, for kernel troubles
KGDB y
KGDB_SERIAL_CONSOLE y
KGDB_KDB y
'';
makeFlags = [ "LOADADDR=0x0200000" ];
target = "uImage";
DTB = true; # Beyond 3.10
};
gcc = {
arch = "armv5te";
};
};
raspberrypi = {
name = "raspberrypi";
kernelBaseConfig = "bcm2835_defconfig";
kernelDTB = true;
kernelArch = "arm";
kernelAutoModules = true;
kernelPreferBuiltin = true;
kernelExtraConfig = ''
# Disable OABI to have seccomp_filter (required for systemd)
# https://github.com/raspberrypi/firmware/issues/651
OABI_COMPAT n
'';
kernelTarget = "zImage";
linux-kernel = {
name = "raspberrypi";
baseConfig = "bcm2835_defconfig";
DTB = true;
autoModules = true;
preferBuiltin = true;
extraConfig = ''
# Disable OABI to have seccomp_filter (required for systemd)
# https://github.com/raspberrypi/firmware/issues/651
OABI_COMPAT n
'';
target = "zImage";
};
gcc = {
arch = "armv6";
fpu = "vfp";
@ -201,13 +201,15 @@ rec {
raspberrypi2 = armv7l-hf-multiplatform;
zero-gravitas = {
name = "zero-gravitas";
kernelBaseConfig = "zero-gravitas_defconfig";
kernelArch = "arm";
# kernelTarget verified by checking /boot on reMarkable 1 device
kernelTarget = "zImage";
kernelAutoModules = false;
kernelDTB = true;
linux-kernel = {
name = "zero-gravitas";
baseConfig = "zero-gravitas_defconfig";
# Target verified by checking /boot on reMarkable 1 device
target = "zImage";
autoModules = false;
DTB = true;
};
gcc = {
fpu = "neon";
cpu = "cortex-a9";
@ -215,13 +217,15 @@ rec {
};
zero-sugar = {
name = "zero-sugar";
kernelBaseConfig = "zero-sugar_defconfig";
kernelArch = "arm";
kernelDTB = true;
kernelAutoModules = false;
kernelPreferBuiltin = true;
kernelTarget = "zImage";
linux-kernel = {
name = "zero-sugar";
baseConfig = "zero-sugar_defconfig";
DTB = true;
autoModules = false;
preferBuiltin = true;
target = "zImage";
};
gcc = {
cpu = "cortex-a7";
fpu = "neon-vfpv4";
@ -229,7 +233,7 @@ rec {
};
};
scaleway-c1 = armv7l-hf-multiplatform // {
scaleway-c1 = lib.recursiveUpdate armv7l-hf-multiplatform {
gcc = {
cpu = "cortex-a9";
fpu = "vfpv3";
@ -237,12 +241,11 @@ rec {
};
utilite = {
name = "utilite";
kernelBaseConfig = "multi_v7_defconfig";
kernelArch = "arm";
kernelAutoModules = false;
kernelExtraConfig =
''
linux-kernel = {
name = "utilite";
maseConfig = "multi_v7_defconfig";
autoModules = false;
extraConfig = ''
# Ubi for the mtd
MTD_UBI y
UBIFS_FS y
@ -252,35 +255,37 @@ rec {
UBIFS_FS_ZLIB y
UBIFS_FS_DEBUG n
'';
kernelMakeFlags = [ "LOADADDR=0x10800000" ];
kernelTarget = "uImage";
kernelDTB = true;
makeFlags = [ "LOADADDR=0x10800000" ];
target = "uImage";
DTB = true;
};
gcc = {
cpu = "cortex-a9";
fpu = "neon";
};
};
guruplug = sheevaplug // {
guruplug = lib.recursiveUpdate sheevaplug {
# Define `CONFIG_MACH_GURUPLUG' (see
# <http://kerneltrap.org/mailarchive/git-commits-head/2010/5/19/33618>)
# and other GuruPlug-specific things. Requires the `guruplug-defconfig'
# patch.
kernelBaseConfig = "guruplug_defconfig";
linux-kernel.baseConfig = "guruplug_defconfig";
};
beaglebone = armv7l-hf-multiplatform // {
name = "beaglebone";
kernelBaseConfig = "bb.org_defconfig";
kernelAutoModules = false;
kernelExtraConfig = ""; # TBD kernel config
kernelTarget = "zImage";
beaglebone = lib.recursiveUpdate armv7l-hf-multiplatform {
linux-kernel = {
name = "beaglebone";
baseConfig = "bb.org_defconfig";
autoModules = false;
extraConfig = ""; # TBD kernel config
target = "zImage";
};
};
# https://developer.android.com/ndk/guides/abis#v7a
armv7a-android = {
name = "armeabi-v7a";
armv7a-android = {
linux-kernel.name = "armeabi-v7a";
gcc = {
arch = "armv7-a";
float-abi = "softfp";
@ -289,29 +294,31 @@ rec {
};
armv7l-hf-multiplatform = {
name = "armv7l-hf-multiplatform";
kernelBaseConfig = "multi_v7_defconfig";
kernelArch = "arm";
kernelDTB = true;
kernelAutoModules = true;
kernelPreferBuiltin = true;
kernelTarget = "zImage";
kernelExtraConfig = ''
# Serial port for Raspberry Pi 3. Upstream forgot to add it to the ARMv7 defconfig.
SERIAL_8250_BCM2835AUX y
SERIAL_8250_EXTENDED y
SERIAL_8250_SHARE_IRQ y
linux-kernel = {
name = "armv7l-hf-multiplatform";
Major = "2.6"; # Using "2.6" enables 2.6 kernel syscalls in glibc.
baseConfig = "multi_v7_defconfig";
DTB = true;
autoModules = true;
PreferBuiltin = true;
target = "zImage";
extraConfig = ''
# Serial port for Raspberry Pi 3. Upstream forgot to add it to the ARMv7 defconfig.
SERIAL_8250_BCM2835AUX y
SERIAL_8250_EXTENDED y
SERIAL_8250_SHARE_IRQ y
# Fix broken sunxi-sid nvmem driver.
TI_CPTS y
# Fix broken sunxi-sid nvmem driver.
TI_CPTS y
# Hangs ODROID-XU4
ARM_BIG_LITTLE_CPUIDLE n
# Hangs ODROID-XU4
ARM_BIG_LITTLE_CPUIDLE n
# Disable OABI to have seccomp_filter (required for systemd)
# https://github.com/raspberrypi/firmware/issues/651
OABI_COMPAT n
'';
# Disable OABI to have seccomp_filter (required for systemd)
# https://github.com/raspberrypi/firmware/issues/651
OABI_COMPAT n
'';
};
gcc = {
# Some table about fpu flags:
# http://community.arm.com/servlet/JiveServlet/showImage/38-1981-3827/blogentry-103749-004812900+1365712953_thumb.png
@ -336,34 +343,35 @@ rec {
};
aarch64-multiplatform = {
name = "aarch64-multiplatform";
kernelBaseConfig = "defconfig";
kernelArch = "arm64";
kernelDTB = true;
kernelAutoModules = true;
kernelPreferBuiltin = true;
kernelExtraConfig = ''
# Raspberry Pi 3 stuff. Not needed for kernels >= 4.10.
ARCH_BCM2835 y
BCM2835_MBOX y
BCM2835_WDT y
RASPBERRYPI_FIRMWARE y
RASPBERRYPI_POWER y
SERIAL_8250_BCM2835AUX y
SERIAL_8250_EXTENDED y
SERIAL_8250_SHARE_IRQ y
linux-kernel = {
name = "aarch64-multiplatform";
baseConfig = "defconfig";
DTB = true;
autoModules = true;
preferBuiltin = true;
extraConfig = ''
# Raspberry Pi 3 stuff. Not needed for s >= 4.10.
ARCH_BCM2835 y
BCM2835_MBOX y
BCM2835_WDT y
RASPBERRYPI_FIRMWARE y
RASPBERRYPI_POWER y
SERIAL_8250_BCM2835AUX y
SERIAL_8250_EXTENDED y
SERIAL_8250_SHARE_IRQ y
# Cavium ThunderX stuff.
PCI_HOST_THUNDER_ECAM y
# Cavium ThunderX stuff.
PCI_HOST_THUNDER_ECAM y
# Nvidia Tegra stuff.
PCI_TEGRA y
# Nvidia Tegra stuff.
PCI_TEGRA y
# The default (=y) forces us to have the XHCI firmware available in initrd,
# which our initrd builder can't currently do easily.
USB_XHCI_TEGRA m
'';
kernelTarget = "Image";
# The default (=y) forces us to have the XHCI firmware available in initrd,
# which our initrd builder can't currently do easily.
USB_XHCI_TEGRA m
'';
target = "Image";
};
gcc = {
arch = "armv8-a";
};
@ -374,8 +382,9 @@ rec {
##
ben_nanonote = {
name = "ben_nanonote";
kernelArch = "mips";
linux-kernel = {
name = "ben_nanonote";
};
gcc = {
arch = "mips32";
float = "soft";
@ -383,75 +392,76 @@ rec {
};
fuloong2f_n32 = {
name = "fuloong2f_n32";
kernelBaseConfig = "lemote2f_defconfig";
kernelArch = "mips";
kernelAutoModules = false;
kernelExtraConfig = ''
MIGRATION n
COMPACTION n
linux-kernel = {
name = "fuloong2f_n32";
baseConfig = "lemote2f_defconfig";
autoModules = false;
extraConfig = ''
MIGRATION n
COMPACTION n
# nixos mounts some cgroup
CGROUPS y
# nixos mounts some cgroup
CGROUPS y
BLK_DEV_RAM y
BLK_DEV_INITRD y
BLK_DEV_CRYPTOLOOP m
BLK_DEV_DM m
DM_CRYPT m
MD y
REISERFS_FS m
EXT4_FS m
USB_STORAGE_CYPRESS_ATACB m
BLK_DEV_RAM y
BLK_DEV_INITRD y
BLK_DEV_CRYPTOLOOP m
BLK_DEV_DM m
DM_CRYPT m
MD y
REISERFS_FS m
EXT4_FS m
USB_STORAGE_CYPRESS_ATACB m
IP_PNP y
IP_PNP_DHCP y
IP_PNP_BOOTP y
NFS_FS y
ROOT_NFS y
TUN m
NFS_V4 y
NFS_V4_1 y
NFS_FSCACHE y
NFSD m
NFSD_V2_ACL y
NFSD_V3 y
NFSD_V3_ACL y
NFSD_V4 y
IP_PNP y
IP_PNP_DHCP y
IP_PNP_BOOTP y
NFS_FS y
ROOT_NFS y
TUN m
NFS_V4 y
NFS_V4_1 y
NFS_FSCACHE y
NFSD m
NFSD_V2_ACL y
NFSD_V3 y
NFSD_V3_ACL y
NFSD_V4 y
# Fail to build
DRM n
SCSI_ADVANSYS n
USB_ISP1362_HCD n
SND_SOC n
SND_ALI5451 n
FB_SAVAGE n
SCSI_NSP32 n
ATA_SFF n
SUNGEM n
IRDA n
ATM_HE n
SCSI_ACARD n
BLK_DEV_CMD640_ENHANCED n
# Fail to build
DRM n
SCSI_ADVANSYS n
USB_ISP1362_HCD n
SND_SOC n
SND_ALI5451 n
FB_SAVAGE n
SCSI_NSP32 n
ATA_SFF n
SUNGEM n
IRDA n
ATM_HE n
SCSI_ACARD n
BLK_DEV_CMD640_ENHANCED n
FUSE_FS m
FUSE_FS m
# Needed for udev >= 150
SYSFS_DEPRECATED_V2 n
# Needed for udev >= 150
SYSFS_DEPRECATED_V2 n
VGA_CONSOLE n
VT_HW_CONSOLE_BINDING y
SERIAL_8250_CONSOLE y
FRAMEBUFFER_CONSOLE y
EXT2_FS y
EXT3_FS y
REISERFS_FS y
MAGIC_SYSRQ y
VGA_CONSOLE n
VT_HW_CONSOLE_BINDING y
SERIAL_8250_CONSOLE y
FRAMEBUFFER_CONSOLE y
EXT2_FS y
EXT3_FS y
REISERFS_FS y
MAGIC_SYSRQ y
# The kernel doesn't boot at all, with FTRACE
FTRACE n
'';
kernelTarget = "vmlinux";
# The kernel doesn't boot at all, with FTRACE
FTRACE n
'';
target = "vmlinux";
};
gcc = {
arch = "loongson2f";
float = "hard";
@ -464,34 +474,36 @@ rec {
##
riscv-multiplatform = {
name = "riscv-multiplatform";
kernelArch = "riscv";
kernelTarget = "vmlinux";
kernelAutoModules = true;
kernelBaseConfig = "defconfig";
kernelExtraConfig = ''
FTRACE n
SERIAL_OF_PLATFORM y
'';
linux-kernel = {
name = "riscv-multiplatform";
target = "vmlinux";
autoModules = true;
baseConfig = "defconfig";
extraConfig = ''
FTRACE n
SERIAL_OF_PLATFORM y
'';
};
};
select = platform:
# x86
/**/ if platform.isx86_32 then pc32
else if platform.isx86_64 then pc64
/**/ if platform.isx86 then pc
# ARM
else if platform.isAarch32 then let
version = platform.parsed.cpu.version or null;
in if version == null then pcBase
in if version == null then pc
else if lib.versionOlder version "6" then sheevaplug
else if lib.versionOlder version "7" then raspberrypi
else armv7l-hf-multiplatform
else if platform.isAarch64 then aarch64-multiplatform
else if platform.isRiscV then riscv-multiplatform
else if platform.parsed.cpu == lib.systems.parse.cpuTypes.mipsel then fuloong2f_n32
else if platform.parsed.cpu == lib.systems.parse.cpuTypes.powerpc64le then powernv
else pcBase;
else pc;
}

View File

@ -418,6 +418,26 @@ http://some.json-exporter.host:7979/probe?target=https://example.com/some/json/e
SDK licenses if your project requires it. See the androidenv documentation for more details.
</para>
</listitem>
<listitem>
<para>
The attribute <varname>mpi</varname> is now consistently used to
provide a default, system-wide MPI implementation.
The default implementation is openmpi, which has been used before by
all derivations affects by this change.
Note that all packages that have used <varname>mpi ? null</varname> in the input
for optional MPI builds, have been changed to the boolean input paramater
<varname>useMpi</varname> to enable building with MPI.
Building all packages with <varname>mpich</varname> instead
of the default <varname>openmpi</varname> can now be achived like this:
<programlisting>
self: super:
{
mpi = super.mpich;
}
</programlisting>
</para>
</listitem>
<listitem>
<para>
The Searx module has been updated with the ability to configure the
@ -603,6 +623,22 @@ http://some.json-exporter.host:7979/probe?target=https://example.com/some/json/e
<literal>/etc/netgroup</literal> defines network-wide groups and may affect to setups using NIS.
</para>
</listitem>
<listitem>
<para>
Platforms, like <varname>stdenv.hostPlatform</varname>, no longer have a <varname>platform</varname> attribute.
It has been (mostly) flattoned away:
</para>
<itemizedlist>
<listitem><para><varname>platform.gcc</varname> is now <varname>gcc</varname></para></listitem>
<listitem><para><literal>platform.kernel*</literal> is now <literal>linux-kernel.*</literal></para></listitem>
</itemizedlist>
<para>
Additionally, <varname>platform.kernelArch</varname> moved to the top level as <varname>linuxArch</varname> to match the other <literal>*Arch</literal> variables.
</para>
<para>
The <varname>platform</varname> grouping of these things never meant anything, and was just a historial/implementation artifact that was overdue removal.
</para>
</listitem>
</itemizedlist>
</section>
</section>

View File

@ -68,11 +68,11 @@ let
patchShebangs scripts/*
substituteInPlace scripts/Makefile.lib \
--replace 'DTC_FLAGS += $(DTC_FLAGS_$(basetarget))' 'DTC_FLAGS += $(DTC_FLAGS_$(basetarget)) -@'
make ${pkgs.stdenv.hostPlatform.platform.kernelBaseConfig} ARCH="${pkgs.stdenv.hostPlatform.platform.kernelArch}"
make dtbs ARCH="${pkgs.stdenv.hostPlatform.platform.kernelArch}"
make ${pkgs.stdenv.hostPlatform.linux-kernel.baseConfig} ARCH="${pkgs.stdenv.hostPlatform.linuxArch}"
make dtbs ARCH="${pkgs.stdenv.hostPlatform.linuxArch}"
'';
installPhase = ''
make dtbs_install INSTALL_DTBS_PATH=$out/dtbs ARCH="${pkgs.stdenv.hostPlatform.platform.kernelArch}"
make dtbs_install INSTALL_DTBS_PATH=$out/dtbs ARCH="${pkgs.stdenv.hostPlatform.linuxArch}"
'';
};
@ -115,7 +115,7 @@ in
options = {
hardware.deviceTree = {
enable = mkOption {
default = pkgs.stdenv.hostPlatform.platform.kernelDTB or false;
default = pkgs.stdenv.hostPlatform.linux-kernel.DTB or false;
type = types.bool;
description = ''
Build device tree files. These are used to describe the

View File

@ -88,7 +88,7 @@ with lib;
system.build.netbootIpxeScript = pkgs.writeTextDir "netboot.ipxe" ''
#!ipxe
kernel ${pkgs.stdenv.hostPlatform.platform.kernelTarget} init=${config.system.build.toplevel}/init initrd=initrd ${toString config.boot.kernelParams}
kernel ${pkgs.stdenv.hostPlatform.linux-kernel.target} init=${config.system.build.toplevel}/init initrd=initrd ${toString config.boot.kernelParams}
initrd initrd
boot
'';

View File

@ -587,10 +587,10 @@ in
nix.systemFeatures = mkDefault (
[ "nixos-test" "benchmark" "big-parallel" "kvm" ] ++
optionals (pkgs.hostPlatform.platform ? gcc.arch) (
# a builder can run code for `platform.gcc.arch` and inferior architectures
[ "gccarch-${pkgs.hostPlatform.platform.gcc.arch}" ] ++
map (x: "gccarch-${x}") lib.systems.architectures.inferiors.${pkgs.hostPlatform.platform.gcc.arch}
optionals (pkgs.hostPlatform ? gcc.arch) (
# a builder can run code for `gcc.arch` and inferior architectures
[ "gccarch-${pkgs.hostPlatform.gcc.arch}" ] ++
map (x: "gccarch-${x}") lib.systems.architectures.inferiors.${pkgs.hostPlatform.gcc.arch}
)
);

View File

@ -49,12 +49,20 @@ in
'';
};
extraSettingsPaths = mkOption {
type = types.listOf types.path;
default = [];
description = ''
Additional settings paths used to configure nomad. These can be files or directories.
'';
example = literalExample ''
[ "/etc/nomad-mutable.json" "/run/keys/nomad-with-secrets.json" "/etc/nomad/config.d" ]
'';
};
settings = mkOption {
type = format.type;
default = {
# Agrees with `StateDirectory = "nomad"` set below.
data_dir = "/var/lib/nomad";
};
default = {};
description = ''
Configuration for Nomad. See the <link xlink:href="https://www.nomadproject.io/docs/configuration">documentation</link>
for supported values.
@ -77,6 +85,11 @@ in
##### implementation
config = mkIf cfg.enable {
services.nomad.settings = {
# Agrees with `StateDirectory = "nomad"` set below.
data_dir = mkDefault "/var/lib/nomad";
};
environment = {
etc."nomad.json".source = format.generate "nomad.json" cfg.settings;
systemPackages = [ cfg.package ];
@ -99,7 +112,8 @@ in
serviceConfig = {
DynamicUser = cfg.dropPrivileges;
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
ExecStart = "${cfg.package}/bin/nomad agent -config=/etc/nomad.json";
ExecStart = "${cfg.package}/bin/nomad agent -config=/etc/nomad.json" +
concatMapStrings (path: " -config=${path}") cfg.extraSettingsPaths;
KillMode = "process";
KillSignal = "SIGINT";
LimitNOFILE = 65536;
@ -114,6 +128,7 @@ in
} // (optionalAttrs cfg.enableDocker {
SupplementaryGroups = "docker"; # space-separated string
});
unitConfig = {
StartLimitIntervalSec = 10;
StartLimitBurst = 3;

View File

@ -190,7 +190,7 @@ in
system.boot.loader.kernelFile = mkOption {
internal = true;
default = pkgs.stdenv.hostPlatform.platform.kernelTarget;
default = pkgs.stdenv.hostPlatform.linux-kernel.target;
type = types.str;
description = ''
Name of the kernel file to be passed to the bootloader.

View File

@ -59,7 +59,7 @@ in
system.build.installBootLoader = generationsDirBuilder;
system.boot.loader.id = "generationsDir";
system.boot.loader.kernelFile = platform.kernelTarget;
system.boot.loader.kernelFile = linux-kernel.target;
};
}

View File

@ -327,6 +327,26 @@ in
'';
};
extraInstallCommands = mkOption {
default = "";
example = literalExample ''
# the example below generates detached signatures that GRUB can verify
# https://www.gnu.org/software/grub/manual/grub/grub.html#Using-digital-signatures
''${pkgs.findutils}/bin/find /boot -not -path "/boot/efi/*" -type f -name '*.sig' -delete
old_gpg_home=$GNUPGHOME
export GNUPGHOME="$(mktemp -d)"
''${pkgs.gnupg}/bin/gpg --import ''${priv_key} > /dev/null 2>&1
''${pkgs.findutils}/bin/find /boot -not -path "/boot/efi/*" -type f -exec ''${pkgs.gnupg}/bin/gpg --detach-sign "{}" \; > /dev/null 2>&1
rm -rf $GNUPGHOME
export GNUPGHOME=$old_gpg_home
'';
type = types.lines;
description = ''
Additional shell commands inserted in the bootloader installer
script after generating menu entries.
'';
};
extraPerEntryConfig = mkOption {
default = "";
example = "root (hd0)";
@ -715,7 +735,7 @@ in
${optionalString cfg.enableCryptodisk "export GRUB_ENABLE_CRYPTODISK=y"}
'' + flip concatMapStrings cfg.mirroredBoots (args: ''
${pkgs.perl}/bin/perl ${install-grub-pl} ${grubConfig args} $@
''));
'') + cfg.extraInstallCommands);
system.build.grub = grub;

View File

@ -103,6 +103,6 @@ in
system.build.installBootLoader = builder;
system.boot.loader.id = "raspberrypi";
system.boot.loader.kernelFile = platform.kernelTarget;
system.boot.loader.kernelFile = linux-kernel.target;
};
}

View File

@ -79,7 +79,7 @@ let
in
tarball //
{ meta = {
description = "NixOS system tarball for ${system} - ${stdenv.hostPlatform.platform.name}";
description = "NixOS system tarball for ${system} - ${stdenv.hostPlatform.linux-kernel.name}";
maintainers = map (x: lib.maintainers.${x}) maintainers;
};
inherit config;
@ -105,7 +105,7 @@ let
modules = makeModules module {};
};
build = configEvaled.config.system.build;
kernelTarget = configEvaled.pkgs.stdenv.hostPlatform.platform.kernelTarget;
kernelTarget = configEvaled.pkgs.stdenv.hostPlatform.linux-kernel.target;
in
pkgs.symlinkJoin {
name = "netboot";

View File

@ -272,6 +272,7 @@ in
nginx-variants = handleTest ./nginx-variants.nix {};
nix-ssh-serve = handleTest ./nix-ssh-serve.nix {};
nixos-generate-config = handleTest ./nixos-generate-config.nix {};
nomad = handleTest ./nomad.nix {};
novacomd = handleTestOn ["x86_64-linux"] ./novacomd.nix {};
nsd = handleTest ./nsd.nix {};
nzbget = handleTest ./nzbget.nix {};

53
nixos/tests/nomad.nix Normal file
View File

@ -0,0 +1,53 @@
import ./make-test-python.nix (
{ lib, ... }: {
name = "nomad";
nodes = {
server = { pkgs, lib, ... }: {
networking = {
interfaces.eth1.ipv4.addresses = lib.mkOverride 0 [{
address = "192.168.1.1";
prefixLength = 16;
}];
};
environment.etc."nomad.custom.json".source =
(pkgs.formats.json { }).generate "nomad.custom.json" {
region = "universe";
datacenter = "earth";
};
services.nomad = {
enable = true;
settings = {
server = {
enabled = true;
bootstrap_expect = 1;
};
};
extraSettingsPaths = [ "/etc/nomad.custom.json" ];
enableDocker = false;
};
};
};
testScript = ''
server.wait_for_unit("nomad.service")
# wait for healthy server
server.wait_until_succeeds(
"[ $(nomad operator raft list-peers | grep true | wc -l) == 1 ]"
)
# wait for server liveness
server.succeed("[ $(nomad server members | grep -o alive | wc -l) == 1 ]")
# check the region
server.succeed("nomad server members | grep -o universe")
# check the datacenter
server.succeed("[ $(nomad server members | grep -o earth | wc -l) == 1 ]")
'';
}
)

View File

@ -46,7 +46,7 @@ stdenv.mkDerivation rec {
startScript = if stdenv.isx86_32 then "START_LINUX_X86"
else if stdenv.isx86_64 then "START_LINUX_X86_64"
#else if stdenv.isDarwin then "START_MACOS.app" # disabled because I cannot test on Darwin
else abort "Unsupported platform: ${stdenv.platform.kernelArch}.";
else abort "Unsupported platform: ${stdenv.hostPlatform.linuxArch}.";
linuxExecutable = if stdenv.isx86_32 then "pixilang_linux_x86"
else if stdenv.isx86_64 then "pixilang_linux_x86_64"

View File

@ -9,18 +9,18 @@ let
inherit buildFHSUserEnv;
};
stableVersion = {
version = "4.1.1.0"; # "Android Studio 4.1.1"
build = "201.6953283";
sha256Hash = "sha256-aAMhhJWcVFdvEZt8fI3tF12Eg3TzlU+kUFMNeCYN1os=";
version = "4.1.2.0"; # "Android Studio 4.1.2"
build = "201.7042882";
sha256Hash = "1f9bclvyvm3sg9an7wxlfwd8jwnb9cl726dvggmysa6r7shc7xw9";
};
betaVersion = {
version = "4.2.0.18"; # "Android Studio 4.2 Beta 2"
build = "202.7008469";
sha256Hash = "0323i4mcib84z7bsy801640gadd2k8ps7vr9jbdpb6i9gma6klmh";
version = "4.2.0.19"; # "Android Studio 4.2 Beta 3"
build = "202.7033425";
sha256Hash = "037r99hn16y0fy6z6k90qf6yx5a4vvx6bl9rdyagdm16ry4bpiw4";
};
latestVersion = { # canary & dev
version = "2020.3.1.3"; # "Android Studio Arctic Fox Canary 3"
sha256Hash = "1nx78j3pqr8qgwprnzfy17w9jmkgiqnlbsw91jnslr9p9fd0ixcx";
version = "2020.3.1.4"; # "Android Studio Arctic Fox Canary 4"
sha256Hash = "05drh4grq0b37qg5nspf2c6vmvcc9x71al3xwc2ddjhmyj0f9sk4";
};
in {
# Attributes are named by their corresponding release channels

View File

@ -1,4 +1,4 @@
{ lib, stdenv, pkgs, fetchurl, wrapGAppsHook, gvfs, gtk3, atomEnv }:
{ lib, stdenv, pkgs, fetchurl, wrapGAppsHook, glib, gtk3, atomEnv }:
let
versions = {
@ -54,7 +54,8 @@ let
preFixup = ''
gappsWrapperArgs+=(
--prefix "PATH" : "${gvfs}/bin"
# needed for gio executable to be able to delete files
--prefix "PATH" : "${glib.bin}/bin"
)
'';

View File

@ -38,24 +38,20 @@ let
in
stdenv.mkDerivation rec {
pname = "cudatext";
version = "1.118.2";
version = "1.122.3";
src = fetchFromGitHub {
owner = "Alexey-T";
repo = "CudaText";
rev = version;
sha256 = "0d6f4qfs7vifz7qkw2vkdjgd5w717wfpnxbc4qa4hs4g6y86ywmm";
sha256 = "1h56hj433z0n4l97zl1cwkjv0qvz4qmvf469zzjzf1nj4zj8px2b";
};
patches = [
# Don't check for update
./dont-check-update.patch
];
postPatch = ''
substituteInPlace app/proc_globdata.pas \
--replace "/usr/share/cudatext" "$out/share/cudatext" \
--replace "libpython3.so" "${python3}/lib/libpython3.so"
--replace "libpython3.so" "${python3}/lib/libpython${python3.pythonVersion}.so" \
--replace "AllowProgramUpdates:= true;" "AllowProgramUpdates:= false;"
'';
nativeBuildInputs = [ lazarus fpc ]

View File

@ -1,33 +1,33 @@
{
"EncConv": {
"owner": "Alexey-T",
"rev": "2020.06.15",
"sha256": "07dpvq3ppfq3b70i1smkf7vwdlzq8qnxs3fk94hi9h1z36bz2rw3"
"rev": "2021.01.01",
"sha256": "18fp7yz2rl80a6xw7v4bgc4092l74fb6p6z4yf312r7gw7b8naq6"
},
"ATBinHex-Lazarus": {
"owner": "Alexey-T",
"rev": "2020.09.05",
"sha256": "022yx5vic4hnc9lz53wvr4h7hf0h71801dzlilj55x5mf8p59072"
"rev": "2020.11.22",
"sha256": "0dkvzm32ls03pfp40fxvsyrkfmyznc5yrj65cp4a8pp9kpkvzlz7"
},
"ATFlatControls": {
"owner": "Alexey-T",
"rev": "2020.11.02",
"sha256": "0shihlm1hg74m04qyrj2iic2ik0x7qggihmnylvvdry3y79d07fy"
"rev": "2021.01.12",
"sha256": "1mavv3krs4srdp362prf4sncssxjh11la5j4lkx0wk5csrmd1pc9"
},
"ATSynEdit": {
"owner": "Alexey-T",
"rev": "6560bc35a2cf31399be8713ac189216afabf9f01",
"sha256": "1bjnd6pcd9ddkvl7ma05z7f8svq609kljwc7gvbszc76hdb8d54x"
"rev": "2021.01.19",
"sha256": "0lpgfwljwh9mypscbpj5c7fivhza0hizjgqypval3v0209cx38d1"
},
"ATSynEdit_Cmp": {
"owner": "Alexey-T",
"rev": "2459ea2a2e50050f7e6ee59a17a52aae05ca4433",
"sha256": "155cwcmr9f23j4x13pidvb3vcgglawkxxpizjw90ajwhmg831acr"
"rev": "2021.01.17",
"sha256": "14i4jdpbmh6sjpvbwipdvvmmqqw8wg592b34a9wdf2f9qxq2p4ly"
},
"EControl": {
"owner": "Alexey-T",
"rev": "2020.10.04",
"sha256": "0ypbaca3y5biw2207yh3x5p28gm8g51qf7glm5622w3cgbrf9mdq"
"rev": "2021.01.12",
"sha256": "107zyd65vc72fl4mvyirhv2a9m47l9bs6gwqiwar7hrn02zns6bq"
},
"ATSynEdit_Ex": {
"owner": "Alexey-T",
@ -36,8 +36,8 @@
},
"Python-for-Lazarus": {
"owner": "Alexey-T",
"rev": "2020.10.23",
"sha256": "1lljldqnixlh0j05fh594gccwzkgcxa50byq8wr9ld5ik5sf8khn"
"rev": "2021.01.16",
"sha256": "07qv3x1cm3r12gxfnqzxly6nff39bghwwgxzl2lxi1qbpqhcs2l5"
},
"Emmet-Pascal": {
"owner": "Alexey-T",
@ -46,8 +46,8 @@
},
"CudaText-lexers": {
"owner": "Alexey-T",
"rev": "2020.08.10",
"sha256": "1gzs2psyfhb9si1qyacxzfjb3dz2v255hv7y4jlkbxdxv0kckqr6"
"rev": "2021.01.16",
"sha256": "13zyg0cm1c1662l3f7sy462pbc39l1cwm5214nx8ijngf8kgn2zh"
},
"bgrabitmap": {
"owner": "bgrabitmap",

View File

@ -1,12 +0,0 @@
diff --git i/app/formmain.pas w/app/formmain.pas
index f6f37febb..cf993d75e 100644
--- i/app/formmain.pas
+++ w/app/formmain.pas
@@ -2156,6 +2156,7 @@ begin
false
{$endif};
*)
+ mnuHelpCheckUpd.Enabled:=false;
with AppPanels[cPaneSide] do
begin

View File

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub }:
{ stdenv, fetchFromGitHub, lib }:
stdenv.mkDerivation {
name = "kak-buffers";
version = "2019-04-03";

View File

@ -1,4 +1,4 @@
{ stdenv, git, fetchFromGitHub }:
{ stdenv, git, fetchFromGitHub, lib }:
stdenv.mkDerivation {
name = "kak-powerline";
version = "2020-08-22";

View File

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub }:
{ stdenv, fetchFromGitHub, lib }:
stdenv.mkDerivation {
name = "kak-vertical-selection";
version = "2019-04-11";

View File

@ -18,13 +18,13 @@
python3.pkgs.buildPythonApplication rec {
pname = "setzer";
version = "0.4.0";
version = "0.4.1";
src = fetchFromGitHub {
owner = "cvfosammmm";
repo = "Setzer";
rev = "v${version}";
sha256 = "036xbg65h255zlvz9l86sw6w9l4qfyf13x8p8ml7dj52hcdfvyb9";
sha256 = "1rcx2c07jg1ij81pnvg3px49hfbjmkagn68d3gp79z3gcajbp2av";
};
format = "other";
@ -55,6 +55,10 @@ python3.pkgs.buildPythonApplication rec {
pycairo
];
checkPhase = ''
meson test --print-errorlogs
'';
meta = with lib; {
description = "LaTeX editor written in Python with Gtk";
homepage = src.meta.homepage;

View File

@ -1,6 +1,6 @@
{ boost, cmake, fetchFromGitHub, ffmpeg, qtbase, qtx11extras,
qttools, qtxmlpatterns, qtsvg, gdal, gfortran, libXt, makeWrapper,
mkDerivation, ninja, openmpi, python3, lib, stdenv, tbb, libGLU, libGL }:
mkDerivation, ninja, mpi, python3, lib, stdenv, tbb, libGLU, libGL }:
mkDerivation rec {
pname = "paraview";
@ -65,7 +65,7 @@ mkDerivation rec {
buildInputs = [
libGLU libGL
libXt
openmpi
mpi
tbb
boost
ffmpeg

View File

@ -10,13 +10,13 @@
python3.pkgs.buildPythonApplication rec {
pname = "genxword";
version = "2.0.1";
version = "2.1.0";
src = fetchFromGitHub {
owner = "riverrun";
repo = pname;
rev = "v${version}";
sha256 = "00czdvyb5wnrk3x0g529afisl8v4frfys9ih0nzf1fs4jkzjcijg";
sha256 = "17h8saja45bv612yk0pra9ncbp2mjnx5n10q25nqhl765ks4bmb5";
};
nativeBuildInputs = [

View File

@ -1,4 +1,4 @@
{ lib, stdenv, buildGoPackage, fetchFromGitHub, libvirt, pkg-config, makeWrapper, cdrtools }:
{ lib, stdenv, buildGoPackage, fetchFromGitHub, fetchpatch, libvirt, pkg-config, makeWrapper, cdrtools }:
# USAGE:
# install the following package globally or in nix-shell:
@ -23,6 +23,14 @@ buildGoPackage rec {
goPackagePath = "github.com/dmacvicar/terraform-provider-libvirt";
patches = [
(fetchpatch {
name = "base_volume_copy.patch";
url = "https://github.com/cyril-s/terraform-provider-libvirt/commit/52df264e8a28c40ce26e2b614ee3daea882931c3.patch";
sha256 = "1fg7ii2fi4c93hl41nhcncy9bpw3avbh6yiq99p1vkf87hhrw72n";
})
];
src = fetchFromGitHub {
owner = "dmacvicar";
repo = "terraform-provider-libvirt";

View File

@ -1,4 +1,4 @@
{ lib, stdenv, fetchFromGitHub, perl, perlPackages, makeWrapper, shortenPerlShebang
{ lib, stdenv, fetchFromGitHub, perl, perlPackages, makeWrapper, shortenPerlShebang, openssl
, nixosTests
}:
@ -6,26 +6,28 @@ with lib;
perlPackages.buildPerlPackage rec {
pname = "convos";
version = "5.00";
version = "5.11";
src = fetchFromGitHub {
owner = "Nordaaker";
repo = pname;
rev = version;
sha256 = "0mdbh9q1vclwgnjwvb3z637s7v804h65zxazbhmd7qi3zislnhg1";
sha256 = "08k8dqdgz2b3p8g1zfg9i74r5nm1w0sqdm759d1f3jcyp737r47x";
};
nativeBuildInputs = [ makeWrapper ]
++ optional stdenv.isDarwin [ shortenPerlShebang ];
buildInputs = with perlPackages; [
CryptEksblowfish FileHomeDir FileReadBackwards
CryptEksblowfish FileHomeDir FileReadBackwards HTTPAcceptLanguage
IOSocketSSL IRCUtils JSONValidator LinkEmbedder ModuleInstall
Mojolicious MojoliciousPluginOpenAPI MojoliciousPluginWebpack
ParseIRC TextMarkdown TimePiece UnicodeUTF8
CpanelJSONXS EV
];
propagatedBuildInputs = [ openssl ];
checkInputs = with perlPackages; [ TestDeep TestMore ];
postPatch = ''
@ -43,6 +45,15 @@ perlPackages.buildPerlPackage rec {
substituteInPlace t/web-register-open-to-public.t \
--replace '!127.0.0.1!' '!localhost!'
# A webirc test fails to resolve "localhost" likely due to sandboxing, we
# remove this test.
#
rm t/irc-webirc.t
# A web-user test fails on Darwin, we remove it.
#
rm t/web-user.t
# Module::Install is a runtime dependency not covered by the tests, so we add
# a test for it.
#

View File

@ -0,0 +1,68 @@
{ lib
, buildPythonApplication
, fetchPypi
, makePythonPath
, dateutil
, matplotlib
, numpy
, pyenchant
, pyqt5
, pytest
, python
, qtsvg
, runtimeShell
, wrapQtAppsHook
}:
buildPythonApplication rec {
pname = "pyspread";
version = "1.99.5";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-05bC+Uvx72FAh3qxkgXm8jdb/gHRv1D/M7tjOEdE3Xg=";
};
pythonLibs = [
dateutil
matplotlib
numpy
pyenchant
pyqt5
];
nativeBuildInputs = [ wrapQtAppsHook ];
buildInputs = pythonLibs ++ [
qtsvg
];
doCheck = false; # it fails miserably with a core dump
fixupPhase = ''
runHook preFixup
sed -i -e "s|#!/bin/bash|#!${runtimeShell}|" $out/bin/pyspread
wrapProgram $out/bin/pyspread \
--prefix PYTHONPATH ':' $(toPythonPath $out):${makePythonPath pythonLibs} \
--prefix PATH ':' ${python}/bin/ \
''${qtWrapperArgs[@]}
runHook postFixup
'';
meta = with lib; {
homepage = "https://pyspread.gitlab.io/";
description = "A Python-oriented spreadsheet application";
longDescription = ''
pyspread is a non-traditional spreadsheet application that is based on and
written in the programming language Python. The goal of pyspread is to be
the most pythonic spreadsheet.
pyspread expects Python expressions in its grid cells, which makes a
spreadsheet specific language obsolete. Each cell returns a Python object
that can be accessed from other cells. These objects can represent
anything including lists or matrices.
'';
license = with licenses; gpl3Plus;
maintainers = with maintainers; [ AndersonTorres ];
platforms = with platforms; all;
};
}

View File

@ -1,4 +1,4 @@
{ gccStdenv, fetchurl, zlib, openmpi }:
{ gccStdenv, fetchurl, zlib, mpi }:
gccStdenv.mkDerivation rec {
version = "3.7.2";
@ -9,7 +9,7 @@ gccStdenv.mkDerivation rec {
sha256 = "1p2364ffjc56i82snzvjpy6pkf6wvqwvlvlqxliscx2c303fxs8v";
};
buildInputs = [ zlib openmpi ];
buildInputs = [ zlib mpi ];
setSourceRoot = ''sourceRoot=$(echo */src)'';
buildFlags = [ "thread" "mpis" ];
preInstall = "mkdir -p $out/man/man1";

View File

@ -8,7 +8,8 @@
, readline
, which
, python ? null
, mpi ? null
, useMpi ? false
, mpi
, iv
}:
@ -17,7 +18,8 @@ stdenv.mkDerivation rec {
version = "7.5";
nativeBuildInputs = [ which pkg-config automake autoconf libtool ];
buildInputs = [ ncurses readline python mpi iv ];
buildInputs = [ ncurses readline python iv ]
++ lib.optional useMpi mpi;
src = fetchurl {
url = "https://www.neuron.yale.edu/ftp/neuron/versions/v${version}/nrn-${version}.tar.gz";
@ -54,7 +56,7 @@ stdenv.mkDerivation rec {
configureFlags = with lib;
[ "--with-readline=${readline}" "--with-iv=${iv}" ]
++ optionals (python != null) [ "--with-nrnpython=${python.interpreter}" ]
++ (if mpi != null then ["--with-mpi" "--with-paranrn"]
++ (if useMpi then ["--with-mpi" "--with-paranrn"]
else ["--without-mpi"]);
@ -84,4 +86,3 @@ stdenv.mkDerivation rec {
platforms = platforms.x86_64 ++ platforms.i686;
};
}

View File

@ -1,7 +1,7 @@
{ lib, stdenv
, fetchFromGitHub
, pkgs
, mpi ? false
, useMpi ? false
, mpi
}:
stdenv.mkDerivation rec {
@ -15,16 +15,16 @@ stdenv.mkDerivation rec {
sha256 = "1jqjzhch0rips0vp04prvb8vmc20c5pdmsqn8knadcf91yy859fh";
};
buildInputs = lib.optionals mpi [ pkgs.openmpi ];
buildInputs = lib.optionals useMpi [ mpi ];
# TODO darwin, AVX and AVX2 makefile targets
buildPhase = if mpi then ''
buildPhase = if useMpi then ''
make -f Makefile.MPI.gcc
'' else ''
make -f Makefile.SSE3.PTHREADS.gcc
'';
installPhase = if mpi then ''
installPhase = if useMpi then ''
mkdir -p $out/bin && cp raxmlHPC-MPI $out/bin
'' else ''
mkdir -p $out/bin && cp raxmlHPC-PTHREADS-SSE3 $out/bin

View File

@ -1,6 +1,6 @@
{ lib, stdenv, fetchFromGitLab, cmake, gfortran, perl
, openblas, hdf5-cpp, python3, texlive
, armadillo, openmpi, globalarrays, openssh
, armadillo, mpi, globalarrays, openssh
, makeWrapper, fetchpatch
} :
@ -33,7 +33,7 @@ in stdenv.mkDerivation {
hdf5-cpp
python
armadillo
openmpi
mpi
globalarrays
openssh
];

View File

@ -1,6 +1,7 @@
{ lib, stdenv, fetchurl
, gfortran, fftw, blas, lapack
, mpi ? null
, useMpi ? false
, mpi
}:
stdenv.mkDerivation rec {
@ -21,9 +22,9 @@ stdenv.mkDerivation rec {
'';
buildInputs = [ fftw blas lapack gfortran ]
++ (lib.optionals (mpi != null) [ mpi ]);
++ (lib.optionals useMpi [ mpi ]);
configureFlags = if (mpi != null) then [ "LD=${mpi}/bin/mpif90" ] else [ "LD=${gfortran}/bin/gfortran" ];
configureFlags = if useMpi then [ "LD=${mpi}/bin/mpif90" ] else [ "LD=${gfortran}/bin/gfortran" ];
makeFlags = [ "all" ];

View File

@ -1,6 +1,7 @@
{ lib, stdenv, fetchurl
, gfortran, blas, lapack
, mpi ? null, scalapack
, gfortran, blas, lapack, scalapack
, useMpi ? false
, mpi
}:
stdenv.mkDerivation {
@ -17,7 +18,7 @@ stdenv.mkDerivation {
};
buildInputs = [ blas lapack gfortran ]
++ (lib.optionals (mpi != null) [ mpi scalapack ]);
++ lib.optionals useMpi [ mpi scalapack ];
enableParallelBuilding = true;
@ -29,7 +30,7 @@ stdenv.mkDerivation {
cp gfortran.make arch.make
'';
preBuild = if (mpi != null) then ''
preBuild = if useMpi then ''
makeFlagsArray=(
CC="mpicc" FC="mpifort"
FPPFLAGS="-DMPI" MPI_INTERFACE="libmpi_f90.a" MPI_INCLUDE="."

View File

@ -11,16 +11,15 @@
, cmake
, octave
, gl2ps
, mpi
, withQcsxcad ? true
, withMPI ? false
, withHyp2mat ? true
, qcsxcad ? null
, openmpi ? null
, hyp2mat ? null
}:
assert withQcsxcad -> qcsxcad != null;
assert withMPI -> openmpi != null;
assert withHyp2mat -> hyp2mat != null;
stdenv.mkDerivation {
@ -50,7 +49,7 @@ stdenv.mkDerivation {
csxcad
(octave.override { inherit hdf5; }) ]
++ lib.optionals withQcsxcad [ qcsxcad ]
++ lib.optionals withMPI [ openmpi ]
++ lib.optionals withMPI [ mpi ]
++ lib.optionals withHyp2mat [ hyp2mat ];
postFixup = ''

View File

@ -1,5 +1,5 @@
{ lib, stdenv, fetchgit, fetchFromGitHub, cmake
, openblas, blas, lapack, opencv3, libzip, boost, protobuf, openmpi
, openblas, blas, lapack, opencv3, libzip, boost, protobuf, mpi
, onebitSGDSupport ? false
, cudaSupport ? false, addOpenGLRunpath, cudatoolkit, nvidia_x11
, cudnnSupport ? cudaSupport, cudnn
@ -33,7 +33,7 @@ in stdenv.mkDerivation rec {
# Force OpenMPI to use g++ in PATH.
OMPI_CXX = "g++";
buildInputs = [ openblas opencv3 libzip boost protobuf openmpi ]
buildInputs = [ openblas opencv3 libzip boost protobuf mpi ]
++ lib.optional cudaSupport cudatoolkit
++ lib.optional cudnnSupport cudnn;
@ -43,7 +43,7 @@ in stdenv.mkDerivation rec {
"--with-openblas=${openblas}"
"--with-boost=${boost.dev}"
"--with-protobuf=${protobuf}"
"--with-mpi=${openmpi}"
"--with-mpi=${mpi}"
"--cuda=${if cudaSupport then "yes" else "no"}"
# FIXME
"--asgd=no"

View File

@ -1,4 +1,4 @@
{ lib, stdenv, fetchurl, cmake, gfortran, blas, lapack, openmpi, petsc, python3 }:
{ lib, stdenv, fetchurl, cmake, gfortran, blas, lapack, mpi, petsc, python3 }:
stdenv.mkDerivation rec {
name = "getdp-${version}";
@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
};
nativeBuildInputs = [ cmake gfortran ];
buildInputs = [ blas lapack openmpi petsc python3 ];
buildInputs = [ blas lapack mpi petsc python3 ];
meta = with lib; {
description = "A General Environment for the Treatment of Discrete Problems";

View File

@ -1,11 +1,11 @@
{ lib, stdenv, fetchurl, bison, openmpi, flex, zlib}:
{ lib, stdenv, fetchurl, bison, mpi, flex, zlib}:
stdenv.mkDerivation rec {
version = "6.0.4";
pname = "scotch";
src_name = "scotch_${version}";
buildInputs = [ bison openmpi flex zlib ];
buildInputs = [ bison mpi flex zlib ];
src = fetchurl {
url = "https://gforge.inria.fr/frs/download.php/file/34618/${src_name}.tar.gz";

View File

@ -3,10 +3,10 @@
, cmake
, hwloc
, fftw
, openmpi
, perl
, singlePrec ? true
, mpiEnabled ? false
, mpi
, cpuAcceleration ? null
}:
@ -33,7 +33,7 @@ in stdenv.mkDerivation rec {
nativeBuildInputs = [ cmake ];
buildInputs = [ fftw perl hwloc ]
++ (lib.optionals mpiEnabled [ openmpi ]);
++ (lib.optionals mpiEnabled [ mpi ]);
cmakeFlags = [
"-DGMX_SIMD:STRING=${SIMD cpuAcceleration}"

View File

@ -1,6 +1,7 @@
{ lib, stdenv, fetchFromGitHub
, libpng, gzip, fftw, blas, lapack
, mpi ? null
, withMPI ? false
, mpi
}:
let packages = [
"asphere" "body" "class2" "colloid" "compress" "coreshell"
@ -8,7 +9,6 @@ let packages = [
"opt" "peri" "qeq" "replica" "rigid" "shock" "snap" "srd" "user-reaxc"
];
lammps_includes = "-DLAMMPS_EXCEPTIONS -DLAMMPS_GZIP -DLAMMPS_MEMALIGN=64";
withMPI = (mpi != null);
in
stdenv.mkDerivation rec {
# LAMMPS has weird versioning converted to ISO 8601 format

View File

@ -1,4 +1,4 @@
{ lib, stdenv, fetchFromGitHub, cmake, git, gfortran, openmpi, blas, liblapack, qt4, qwt6_qt4, pkg-config }:
{ lib, stdenv, fetchFromGitHub, cmake, git, gfortran, mpi, blas, liblapack, qt4, qwt6_qt4, pkg-config }:
stdenv.mkDerivation rec {
pname = "elmerfem";
@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
hardeningDisable = [ "format" ];
nativeBuildInputs = [ cmake pkg-config git ];
buildInputs = [ gfortran openmpi blas liblapack qt4 qwt6_qt4 ];
buildInputs = [ gfortran mpi blas liblapack qt4 qwt6_qt4 ];
preConfigure = ''
patchShebangs ./

View File

@ -9,14 +9,14 @@
buildPythonApplication rec {
pname = "glances";
version = "3.1.5";
version = "3.1.6";
disabled = isPyPy;
src = fetchFromGitHub {
owner = "nicolargo";
repo = "glances";
rev = "v${version}";
sha256 = "0l91nvlwyabxlsy5p533dqnc68mmvykfsrcsnxylcpjjl1nzy931";
sha256 = "sha256-uPqHXRwQQQZsttiLuqgr+dcAna+BVZtym4YEmTPLkXk=";
};
# Some tests fail in the sandbox (they e.g. require access to /sys/class/power_supply):

View File

@ -75,7 +75,7 @@ in
CROSVM_CARGO_TEST_KERNEL_BINARY =
lib.optionalString (stdenv.buildPlatform == stdenv.hostPlatform)
"${linux}/${stdenv.hostPlatform.platform.kernelTarget}";
"${linux}/${stdenv.hostPlatform.linux-kernel.target}";
passthru = {
inherit adhdSrc;

View File

@ -169,7 +169,7 @@ rec {
substituteInPlace ./scripts/docs/generate-man.sh --replace "-v md2man" "-v go-md2man"
substituteInPlace ./man/md2man-all.sh --replace md2man go-md2man
'' + optionalString buildxSupport ''
substituteInPlace ./components/cli/cli-plugins/manager/manager_unix.go --replace /usr/libexec/docker/cli-plugins \
substituteInPlace ./cli-plugins/manager/manager_unix.go --replace /usr/libexec/docker/cli-plugins \
${lib.strings.makeSearchPathOutput "bin" "libexec/docker/cli-plugins" [docker-buildx]}
'';

View File

@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
buildPhase = ''(
cd src
./mk.sh ${stdenv.buildPlatform.platform.kernelArch}
./mk.sh ${stdenv.buildPlatform.linuxArch}
)'';
installPhase = ''

View File

@ -190,7 +190,7 @@ stdenv.mkDerivation {
else if targetPlatform.isRiscV then "lriscv"
else throw "unknown emulation for platform: ${targetPlatform.config}";
in if targetPlatform.useLLVM or false then ""
else targetPlatform.platform.bfdEmulation or (fmt + sep + arch);
else targetPlatform.bfdEmulation or (fmt + sep + arch);
strictDeps = true;
depsTargetTargetPropagated = extraPackages;

View File

@ -402,32 +402,32 @@ stdenv.mkDerivation {
# Always add -march based on cpu in triple. Sometimes there is a
# discrepency (x86_64 vs. x86-64), so we provide an "arch" arg in
# that case.
+ optionalString ((targetPlatform ? platform.gcc.arch) &&
isGccArchSupported targetPlatform.platform.gcc.arch) ''
echo "-march=${targetPlatform.platform.gcc.arch}" >> $out/nix-support/cc-cflags-before
+ optionalString ((targetPlatform ? gcc.arch) &&
isGccArchSupported targetPlatform.gcc.arch) ''
echo "-march=${targetPlatform.gcc.arch}" >> $out/nix-support/cc-cflags-before
''
# -mcpu is not very useful. You should use mtune and march
# instead. Its provided here for backwards compatibility.
+ optionalString (targetPlatform ? platform.gcc.cpu) ''
echo "-mcpu=${targetPlatform.platform.gcc.cpu}" >> $out/nix-support/cc-cflags-before
+ optionalString (targetPlatform ? gcc.cpu) ''
echo "-mcpu=${targetPlatform.gcc.cpu}" >> $out/nix-support/cc-cflags-before
''
# -mfloat-abi only matters on arm32 but we set it here
# unconditionally just in case. If the abi specifically sets hard
# vs. soft floats we use it here.
+ optionalString (targetPlatform ? platform.gcc.float-abi) ''
echo "-mfloat-abi=${targetPlatform.platform.gcc.float-abi}" >> $out/nix-support/cc-cflags-before
+ optionalString (targetPlatform ? gcc.float-abi) ''
echo "-mfloat-abi=${targetPlatform.gcc.float-abi}" >> $out/nix-support/cc-cflags-before
''
+ optionalString (targetPlatform ? platform.gcc.fpu) ''
echo "-mfpu=${targetPlatform.platform.gcc.fpu}" >> $out/nix-support/cc-cflags-before
+ optionalString (targetPlatform ? gcc.fpu) ''
echo "-mfpu=${targetPlatform.gcc.fpu}" >> $out/nix-support/cc-cflags-before
''
+ optionalString (targetPlatform ? platform.gcc.mode) ''
echo "-mmode=${targetPlatform.platform.gcc.mode}" >> $out/nix-support/cc-cflags-before
+ optionalString (targetPlatform ? gcc.mode) ''
echo "-mmode=${targetPlatform.gcc.mode}" >> $out/nix-support/cc-cflags-before
''
+ optionalString (targetPlatform ? platform.gcc.tune &&
isGccArchSupported targetPlatform.platform.gcc.tune) ''
echo "-mtune=${targetPlatform.platform.gcc.tune}" >> $out/nix-support/cc-cflags-before
+ optionalString (targetPlatform ? gcc.tune &&
isGccArchSupported targetPlatform.gcc.tune) ''
echo "-mtune=${targetPlatform.gcc.tune}" >> $out/nix-support/cc-cflags-before
''
# TODO: categorize these and figure out a better place for them

View File

@ -56,13 +56,13 @@ in
, prepend ? []
# Whether to wrap the initramfs in a u-boot image.
, makeUInitrd ? stdenvNoCC.hostPlatform.platform.kernelTarget == "uImage"
, makeUInitrd ? stdenvNoCC.hostPlatform.linux-kernel.target == "uImage"
# If generating a u-boot image, the architecture to use. The default
# guess may not align with u-boot's nomenclature correctly, so it can
# be overridden.
# See https://gitlab.denx.de/u-boot/u-boot/-/blob/9bfb567e5f1bfe7de8eb41f8c6d00f49d2b9a426/common/image.c#L81-106 for a list.
, uInitrdArch ? stdenvNoCC.hostPlatform.kernelArch
, uInitrdArch ? stdenvNoCC.hostPlatform.linuxArch
# The name of the compression, as recognised by u-boot.
# See https://gitlab.denx.de/u-boot/u-boot/-/blob/9bfb567e5f1bfe7de8eb41f8c6d00f49d2b9a426/common/image.c#L195-204 for a list.

View File

@ -1,6 +1,6 @@
{ pkgs
, kernel ? pkgs.linux
, img ? pkgs.stdenv.hostPlatform.platform.kernelTarget
, img ? pkgs.stdenv.hostPlatform.linux-kernel.target
, storeDir ? builtins.storeDir
, rootModules ?
[ "virtio_pci" "virtio_mmio" "virtio_blk" "virtio_balloon" "virtio_rng" "ext4" "unix" "9p" "9pnet_virtio" "crc32c_generic" ]

View File

@ -1,4 +1,4 @@
{ stdenv
{ lib, stdenv
, makeWrapper
, runCommand, wrapBintoolsWith, wrapCCWith
, buildAndroidndk, androidndk, targetAndroidndkPkgs
@ -48,7 +48,7 @@ let
hostInfo = ndkInfoFun stdenv.hostPlatform;
targetInfo = ndkInfoFun stdenv.targetPlatform;
prefix = stdenv.lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform) (stdenv.targetPlatform.config + "-");
prefix = lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform) (stdenv.targetPlatform.config + "-");
in
rec {

View File

@ -1,4 +1,4 @@
{ androidenv, buildPackages, pkgs, targetPackages
{ lib, androidenv, buildPackages, pkgs, targetPackages
}:
{
@ -17,6 +17,7 @@
};
in
import ./androidndk-pkgs.nix {
inherit lib;
inherit (buildPackages)
makeWrapper;
inherit (pkgs)
@ -46,6 +47,7 @@
};
in
import ./androidndk-pkgs.nix {
inherit lib;
inherit (buildPackages)
makeWrapper;
inherit (pkgs)

View File

@ -15,7 +15,7 @@
, buildFlags ? []
, ... }@attrs:
with stdenv.lib;
with lib;
let
debugInfoFlag = lib.optionalString (enableDebugInfo || erlang.debugInfo) "+debug_info";

View File

@ -1,11 +1,11 @@
{ stdenv, buildRebar3, fetchHex }:
{ lib, stdenv, buildRebar3, fetchHex }:
{ name, version, sha256
, builder ? buildRebar3
, hexPkg ? name
, ... }@attrs:
with stdenv.lib;
with lib;
let
pkg = self: builder (attrs // {

View File

@ -15,7 +15,7 @@
, enableDebugInfo ? false
, ... }@attrs:
with stdenv.lib;
with lib;
let

View File

@ -14,7 +14,7 @@
, enableDebugInfo ? false
, ... }@attrs:
with stdenv.lib;
with lib;
let
debugInfoFlag = lib.optionalString (enableDebugInfo || erlang.debugInfo) "debug-info";

View File

@ -1,12 +1,12 @@
{ stdenv, pkgs, erlang }:
{ lib, stdenv, pkgs, erlang }:
let
inherit (stdenv.lib) makeExtensible;
inherit (lib) makeExtensible;
lib = pkgs.callPackage ./lib.nix {};
lib' = pkgs.callPackage ./lib.nix {};
# FIXME: add support for overrideScope
callPackageWithScope = scope: drv: args: stdenv.lib.callPackageWith scope drv args;
callPackageWithScope = scope: drv: args: lib'.callPackageWith scope drv args;
mkScope = scope: pkgs // scope;
packages = self:
@ -38,27 +38,27 @@ let
# BEAM-based languages.
elixir = elixir_1_11;
elixir_1_11 = lib.callElixir ../interpreters/elixir/1.11.nix {
elixir_1_11 = lib'.callElixir ../interpreters/elixir/1.11.nix {
inherit erlang;
debugInfo = true;
};
elixir_1_10 = lib.callElixir ../interpreters/elixir/1.10.nix {
elixir_1_10 = lib'.callElixir ../interpreters/elixir/1.10.nix {
inherit erlang;
debugInfo = true;
};
elixir_1_9 = lib.callElixir ../interpreters/elixir/1.9.nix {
elixir_1_9 = lib'.callElixir ../interpreters/elixir/1.9.nix {
inherit erlang;
debugInfo = true;
};
elixir_1_8 = lib.callElixir ../interpreters/elixir/1.8.nix {
elixir_1_8 = lib'.callElixir ../interpreters/elixir/1.8.nix {
inherit erlang;
debugInfo = true;
};
elixir_1_7 = lib.callElixir ../interpreters/elixir/1.7.nix {
elixir_1_7 = lib'.callElixir ../interpreters/elixir/1.7.nix {
inherit erlang;
debugInfo = true;
};
@ -67,8 +67,8 @@ let
# https://hexdocs.pm/elixir/compatibility-and-deprecations.html
lfe = lfe_1_3;
lfe_1_2 = lib.callLFE ../interpreters/lfe/1.2.nix { inherit erlang buildRebar3 buildHex; };
lfe_1_3 = lib.callLFE ../interpreters/lfe/1.3.nix { inherit erlang buildRebar3 buildHex; };
lfe_1_2 = lib'.callLFE ../interpreters/lfe/1.2.nix { inherit erlang buildRebar3 buildHex; };
lfe_1_3 = lib'.callLFE ../interpreters/lfe/1.3.nix { inherit erlang buildRebar3 buildHex; };
# Non hex packages. Examples how to build Rebar/Mix packages with and
# without helper functions buildRebar3 and buildMix.

View File

@ -1,10 +1,10 @@
{ stdenv, fetchurl }:
{ lib, stdenv, fetchurl }:
{ pkg, version, sha256
, meta ? {}
}:
with stdenv.lib;
with lib;
stdenv.mkDerivation ({
name = "hex-source-${pkg}-${version}";

View File

@ -1,10 +1,10 @@
{ stdenv, rebar3 }:
{ lib, stdenv, rebar3 }:
{ name, version, sha256, src
, meta ? {}
}:
with stdenv.lib;
with lib;
stdenv.mkDerivation ({
name = "rebar-deps-${name}-${version}";
@ -28,6 +28,6 @@ stdenv.mkDerivation ({
outputHashMode = "recursive";
outputHash = sha256;
impureEnvVars = stdenv.lib.fetchers.proxyImpureEnvVars;
impureEnvVars = lib.fetchers.proxyImpureEnvVars;
inherit meta;
})

View File

@ -45,13 +45,13 @@ let
meta = {
description = "Package manager for the Erlang VM https://hex.pm";
license = stdenv.lib.licenses.mit;
license = lib.licenses.mit;
homepage = "https://github.com/hexpm/hex";
maintainers = with stdenv.lib.maintainers; [ ericbmerritt ];
maintainers = with lib.maintainers; [ ericbmerritt ];
};
passthru = {
env = shell self;
};
};
in stdenv.lib.fix pkg
in lib.fix pkg

View File

@ -1,4 +1,4 @@
{ pkgs, stdenv }:
{ pkgs, lib, stdenv }:
rec {
@ -7,7 +7,7 @@ rec {
callPackageWith = autoArgs: fn: args:
let
f = if pkgs.lib.isFunction fn then fn else import fn;
auto = builtins.intersectAttrs (stdenv.lib.functionArgs f) autoArgs;
auto = builtins.intersectAttrs (lib.functionArgs f) autoArgs;
in f (auto // args);
callPackage = callPackageWith pkgs;

View File

@ -7,7 +7,7 @@ buildHex {
meta = {
description = "a rebar3 port compiler for native code";
license = stdenv.lib.licenses.mit;
license = lib.licenses.mit;
homepage = "https://github.com/blt/port_compiler";
};
}

View File

@ -21,9 +21,9 @@ let
meta = {
description = "Erlang PostgreSQL Driver";
license = stdenv.lib.licenses.mit;
license = lib.licenses.mit;
homepage = "https://github.com/semiocast/pgsql";
maintainers = with stdenv.lib.maintainers; [ ericbmerritt ];
maintainers = with lib.maintainers; [ ericbmerritt ];
};
passthru = {
@ -31,4 +31,4 @@ let
};
};
in stdenv.lib.fix pkg
in lib.fix pkg

View File

@ -15,7 +15,7 @@
, enableDebugInfo ? false
, ... }@attrs:
with stdenv.lib;
with lib;
let
shell = drv: stdenv.mkDerivation {

View File

@ -27,9 +27,9 @@ let
meta = {
description = "WebDriver implementation in Erlang";
license = stdenv.lib.licenses.mit;
license = lib.licenses.mit;
homepage = "https://github.com/Quviq/webdrv";
maintainers = with stdenv.lib.maintainers; [ ericbmerritt ];
maintainers = with lib.maintainers; [ ericbmerritt ];
};
passthru = {
@ -37,4 +37,4 @@ let
};
};
in stdenv.lib.fix pkg
in lib.fix pkg

View File

@ -2,7 +2,8 @@
, haskell, nodejs
, fetchurl, fetchpatch, makeWrapper, writeScriptBin
# Rust dependecies
, rustPlatform, openssl, pkg-config }:
, rustPlatform, openssl, pkg-config, Security
}:
let
fetchElmDeps = import ./fetchElmDeps.nix { inherit stdenv lib fetchurl; };
@ -96,7 +97,7 @@ let
elmRustPackages = {
elm-json = import ./packages/elm-json.nix {
inherit rustPlatform fetchurl openssl stdenv pkg-config;
inherit lib rustPlatform fetchurl openssl stdenv pkg-config Security;
} // {
meta = with lib; {
description = "Install, upgrade and uninstall Elm dependencies";

View File

@ -1,4 +1,4 @@
{ rustPlatform, fetchurl, openssl, stdenv, pkg-config }:
{ lib, rustPlatform, fetchurl, openssl, stdenv, pkg-config, Security }:
rustPlatform.buildRustPackage rec {
pname = "elm-json";
version = "0.2.7";
@ -12,7 +12,7 @@ rustPlatform.buildRustPackage rec {
nativeBuildInputs = [ pkg-config ];
buildInputs = [ openssl ];
buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ Security ];
cargoSha256 = "0ylniriq073kpiykamkn9mxdaa6kyiza4pvf7gnfq2h1dvbqa6z7";

View File

@ -1,7 +1,7 @@
{ lib, targetPlatform }:
let
p = targetPlatform.platform.gcc or {}
p = targetPlatform.gcc or {}
// targetPlatform.parsed.abi;
in lib.concatLists [
(lib.optional (!targetPlatform.isx86_64 && p ? arch) "--with-arch=${p.arch}") # --with-arch= is unknown flag on x86_64

View File

@ -123,7 +123,7 @@ stdenv.mkDerivation rec {
let
arch = lib.head (lib.splitString "-" stdenv.system);
march = {
x86_64 = stdenv.hostPlatform.platform.gcc.arch or "x86-64";
x86_64 = stdenv.hostPlatform.gcc.arch or "x86-64";
i686 = "pentium4";
aarch64 = "armv8-a";
}.${arch}

View File

@ -73,7 +73,7 @@ stdenv.mkDerivation rec {
let
arch = head (splitString "-" stdenv.system);
march = {
x86_64 = stdenv.hostPlatform.platform.gcc.arch or "x86-64";
x86_64 = stdenv.hostPlatform.gcc.arch or "x86-64";
i686 = "pentium4";
aarch64 = "armv8-a";
}.${arch}

View File

@ -71,7 +71,7 @@ stdenv.mkDerivation rec {
let
arch = head (splitString "-" stdenv.system);
march = {
x86_64 = stdenv.hostPlatform.platform.gcc.arch or "x86-64";
x86_64 = stdenv.hostPlatform.gcc.arch or "x86-64";
i686 = "pentium4";
aarch64 = "armv8-a";
}.${arch}

View File

@ -122,7 +122,7 @@ in stdenv.mkDerivation (rec {
"-DCAN_TARGET_i386=false"
] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
"-DCMAKE_CROSSCOMPILING=True"
"-DLLVM_TABLEGEN=${buildPackages.llvm_10}/bin/llvm-tblgen"
"-DLLVM_TABLEGEN=${buildPackages.llvm_11}/bin/llvm-tblgen"
];
postBuild = ''

View File

@ -610,12 +610,12 @@ self: super: builtins.intersectAttrs super {
git-annex = with pkgs;
if (!stdenv.isLinux) then
let path = stdenv.lib.makeBinPath [ coreutils ];
let path = lib.makeBinPath [ coreutils ];
in overrideCabal (addBuildTool super.git-annex makeWrapper) (_drv: {
# This is an instance of https://github.com/NixOS/nix/pull/1085
# Fails with:
# gpg: can't connect to the agent: File name too long
postPatch = stdenv.lib.optionalString stdenv.isDarwin ''
postPatch = lib.optionalString stdenv.isDarwin ''
substituteInPlace Test.hs \
--replace ', testCase "crypto" test_crypto' ""
'';

View File

@ -1,4 +1,4 @@
{ stdenv, buildPackages, buildHaskellPackages, ghc
{ lib, stdenv, buildPackages, buildHaskellPackages, ghc
, jailbreak-cabal, hscolour, cpphs, nodejs
, ghcWithHoogle, ghcWithPackages
}:
@ -22,10 +22,10 @@ in
, buildFlags ? []
, haddockFlags ? []
, description ? null
, doCheck ? !isCross && stdenv.lib.versionOlder "7.4" ghc.version
, doCheck ? !isCross && lib.versionOlder "7.4" ghc.version
, doBenchmark ? false
, doHoogle ? true
, doHaddockQuickjump ? doHoogle && stdenv.lib.versionAtLeast ghc.version "8.6"
, doHaddockQuickjump ? doHoogle && lib.versionAtLeast ghc.version "8.6"
, editedCabalFile ? null
# aarch64 outputs otherwise exceed 2GB limit
, enableLibraryProfiling ? !(ghc.isGhcjs or stdenv.targetPlatform.isAarch64 or false)
@ -36,14 +36,14 @@ in
, enableSharedLibraries ? !stdenv.hostPlatform.isStatic && (ghc.enableShared or false)
, enableDeadCodeElimination ? (!stdenv.isDarwin) # TODO: use -dead_strip for darwin
, enableStaticLibraries ? !(stdenv.hostPlatform.isWindows or stdenv.hostPlatform.isWasm)
, enableHsc2hsViaAsm ? stdenv.hostPlatform.isWindows && stdenv.lib.versionAtLeast ghc.version "8.4"
, enableHsc2hsViaAsm ? stdenv.hostPlatform.isWindows && lib.versionAtLeast ghc.version "8.4"
, extraLibraries ? [], librarySystemDepends ? [], executableSystemDepends ? []
# On macOS, statically linking against system frameworks is not supported;
# see https://developer.apple.com/library/content/qa/qa1118/_index.html
# They must be propagated to the environment of any executable linking with the library
, libraryFrameworkDepends ? [], executableFrameworkDepends ? []
, homepage ? "https://hackage.haskell.org/package/${pname}"
, platforms ? with stdenv.lib.platforms; all # GHC can cross-compile
, platforms ? with lib.platforms; all # GHC can cross-compile
, hydraPlatforms ? null
, hyperlinkSource ? true
, isExecutable ? false, isLibrary ? !isExecutable
@ -71,7 +71,7 @@ in
, shellHook ? ""
, coreSetup ? false # Use only core packages to build Setup.hs.
, useCpphs ? false
, hardeningDisable ? stdenv.lib.optional (ghc.isHaLVM or false) "all"
, hardeningDisable ? lib.optional (ghc.isHaLVM or false) "all"
, enableSeparateBinOutput ? false
, enableSeparateDataOutput ? false
, enableSeparateDocOutput ? doHaddock
@ -95,7 +95,7 @@ assert stdenv.hostPlatform.isWasm -> enableStaticLibraries == false;
let
inherit (stdenv.lib) optional optionals optionalString versionOlder versionAtLeast
inherit (lib) optional optionals optionalString versionOlder versionAtLeast
concatStringsSep enableFeature optionalAttrs;
isGhcjs = ghc.isGhcjs or false;
@ -182,7 +182,7 @@ let
parallelBuildingFlags = "-j$NIX_BUILD_CORES" + optionalString stdenv.isLinux " +RTS -A64M -RTS";
crossCabalFlagsString =
stdenv.lib.optionalString isCross (" " + stdenv.lib.concatStringsSep " " crossCabalFlags);
lib.optionalString isCross (" " + lib.concatStringsSep " " crossCabalFlags);
buildFlagsString = optionalString (buildFlags != []) (" " + concatStringsSep " " buildFlags);
@ -213,7 +213,7 @@ let
(enableFeature doBenchmark "benchmarks")
"--enable-library-vanilla" # TODO: Should this be configurable?
(enableFeature enableLibraryForGhci "library-for-ghci")
] ++ optionals (enableDeadCodeElimination && (stdenv.lib.versionOlder "8.0.1" ghc.version)) [
] ++ optionals (enableDeadCodeElimination && (lib.versionOlder "8.0.1" ghc.version)) [
"--ghc-option=-split-sections"
] ++ optionals dontStrip [
"--disable-library-stripping"
@ -283,7 +283,7 @@ let
continue
fi
'';
in stdenv.lib.fix (drv:
in lib.fix (drv:
assert allPkgconfigDepends != [] -> pkg-config != null;
@ -423,7 +423,7 @@ stdenv.mkDerivation ({
echo configureFlags: $configureFlags
${setupCommand} configure $configureFlags 2>&1 | ${coreutils}/bin/tee "$NIX_BUILD_TOP/cabal-configure.log"
${stdenv.lib.optionalString (!allowInconsistentDependencies) ''
${lib.optionalString (!allowInconsistentDependencies) ''
if ${gnugrep}/bin/egrep -q -z 'Warning:.*depends on multiple versions' "$NIX_BUILD_TOP/cabal-configure.log"; then
echo >&2 "*** abort because of serious configure-time warning from Cabal"
exit 1
@ -455,7 +455,7 @@ stdenv.mkDerivation ({
${optionalString doHoogle "--hoogle"} \
${optionalString doHaddockQuickjump "--quickjump"} \
${optionalString (isLibrary && hyperlinkSource) "--hyperlink-source"} \
${stdenv.lib.concatStringsSep " " haddockFlags}
${lib.concatStringsSep " " haddockFlags}
''}
runHook postHaddock
'';
@ -492,7 +492,7 @@ stdenv.mkDerivation ({
done
''}
${optionalString doCoverage "mkdir -p $out/share && cp -r dist/hpc $out/share"}
${optionalString (enableSharedExecutables && isExecutable && !isGhcjs && stdenv.isDarwin && stdenv.lib.versionOlder ghc.version "7.10") ''
${optionalString (enableSharedExecutables && isExecutable && !isGhcjs && stdenv.isDarwin && lib.versionOlder ghc.version "7.10") ''
for exe in "${binDir}/"* ; do
install_name_tool -add_rpath "$out/lib/ghc-${ghc.version}/${pname}-${version}" "$exe"
done
@ -535,7 +535,7 @@ stdenv.mkDerivation ({
pkg-configDepends
setupHaskellDepends
;
} // stdenv.lib.optionalAttrs doCheck {
} // lib.optionalAttrs doCheck {
inherit
testDepends
testFrameworkDepends
@ -544,7 +544,7 @@ stdenv.mkDerivation ({
testSystemDepends
testToolDepends
;
} // stdenv.lib.optionalAttrs doBenchmark {
} // lib.optionalAttrs doBenchmark {
inherit
benchmarkDepends
benchmarkFrameworkDepends
@ -561,7 +561,7 @@ stdenv.mkDerivation ({
inherit propagatedBuildInputs otherBuildInputs allPkgconfigDepends;
haskellBuildInputs = isHaskellPartition.right;
systemBuildInputs = isHaskellPartition.wrong;
isHaskellPartition = stdenv.lib.partition
isHaskellPartition = lib.partition
isHaskellPkg
(propagatedBuildInputs ++ otherBuildInputs ++ depsBuildBuild ++ nativeBuildInputs);
};
@ -608,13 +608,13 @@ stdenv.mkDerivation ({
ghcEnv = withPackages (_:
otherBuildInputsHaskell ++
propagatedBuildInputs ++
stdenv.lib.optionals (!isCross) setupHaskellDepends);
lib.optionals (!isCross) setupHaskellDepends);
ghcCommandCaps = stdenv.lib.toUpper ghcCommand';
ghcCommandCaps = lib.toUpper ghcCommand';
in stdenv.mkDerivation ({
inherit name shellHook;
depsBuildBuild = stdenv.lib.optional isCross ghcEnvForBuild;
depsBuildBuild = lib.optional isCross ghcEnvForBuild;
nativeBuildInputs =
[ ghcEnv ] ++ optional (allPkgconfigDepends != []) pkg-config ++
collectedToolDepends;
@ -623,7 +623,7 @@ stdenv.mkDerivation ({
phases = ["installPhase"];
installPhase = "echo $nativeBuildInputs $buildInputs > $out";
LANG = "en_US.UTF-8";
LOCALE_ARCHIVE = stdenv.lib.optionalString (stdenv.hostPlatform.libc == "glibc") "${buildPackages.glibcLocales}/lib/locale/locale-archive";
LOCALE_ARCHIVE = lib.optionalString (stdenv.hostPlatform.libc == "glibc") "${buildPackages.glibcLocales}/lib/locale/locale-archive";
"NIX_${ghcCommandCaps}" = "${ghcEnv}/bin/${ghcCommand}";
"NIX_${ghcCommandCaps}PKG" = "${ghcEnv}/bin/${ghcCommand}-pkg";
# TODO: is this still valid?

View File

@ -120,7 +120,7 @@ buildPackages.stdenv.mkDerivation {
meta = {
description = "A local Hoogle database";
platforms = ghc.meta.platforms;
hydraPlatforms = with stdenv.lib.platforms; none;
maintainers = with stdenv.lib.maintainers; [ ttuegel ];
hydraPlatforms = with lib.platforms; none;
maintainers = with lib.maintainers; [ ttuegel ];
};
}

View File

@ -41,7 +41,7 @@ self:
let
inherit (stdenv) buildPlatform hostPlatform;
inherit (stdenv.lib) fix' extends makeOverridable;
inherit (lib) fix' extends makeOverridable;
inherit (haskellLib) overrideCabal;
mkDerivationImpl = pkgs.callPackage ./generic-builder.nix {
@ -84,8 +84,8 @@ let
# lost on `.override`) but determine the auto-args based on `drv` (the problem here
# is that nix has no way to "passthrough" args while preserving the reflection
# info that callPackage uses to determine the arguments).
drv = if stdenv.lib.isFunction fn then fn else import fn;
auto = builtins.intersectAttrs (stdenv.lib.functionArgs drv) scope;
drv = if lib.isFunction fn then fn else import fn;
auto = builtins.intersectAttrs (lib.functionArgs drv) scope;
# this wraps the `drv` function to add a `overrideScope` function to the result.
drvScope = allArgs: drv allArgs // {
@ -98,7 +98,7 @@ let
# nothing.
in callPackageWithScope newScope drv manualArgs;
};
in stdenv.lib.makeOverridable drvScope (auto // manualArgs);
in lib.makeOverridable drvScope (auto // manualArgs);
mkScope = scope: let
ps = pkgs.__splicedPackages;

View File

@ -1,4 +1,4 @@
{ stdenv, callPackage, fetchFromGitHub, writeShellScriptBin, substituteAll
{ lib, stdenv, callPackage, fetchFromGitHub, writeShellScriptBin, substituteAll
, sbcl, bash, which, perl, nettools
, openssl, glucose, minisat, abc-verifier, z3, python2
, certifyBooks ? true
@ -39,7 +39,7 @@ in stdenv.mkDerivation rec {
buildInputs = [
# ACL2 itself only needs a Common Lisp compiler/interpreter:
sbcl
] ++ stdenv.lib.optionals certifyBooks [
] ++ lib.optionals certifyBooks [
# To build community books, we need Perl and a couple of utilities:
which perl nettools
# Some of the books require one or more of these external tools:
@ -55,7 +55,7 @@ in stdenv.mkDerivation rec {
preConfigure = ''
# When certifying books, ACL2 doesn't like $HOME not existing.
export HOME=$(pwd)/fake-home
'' + stdenv.lib.optionalString certifyBooks ''
'' + lib.optionalString certifyBooks ''
# Some books also care about $USER being nonempty.
export USER=nobody
'';
@ -79,7 +79,7 @@ in stdenv.mkDerivation rec {
installPhase = ''
mkdir -p $out/bin
ln -s $out/share/${pname}/saved_acl2 $out/bin/${pname}
'' + stdenv.lib.optionalString certifyBooks ''
'' + lib.optionalString certifyBooks ''
ln -s $out/share/${pname}/books/build/cert.pl $out/bin/${pname}-cert
ln -s $out/share/${pname}/books/build/clean.pl $out/bin/${pname}-clean
'';
@ -100,7 +100,7 @@ in stdenv.mkDerivation rec {
rm -rf $out/share/${pname}/books
'';
meta = with stdenv.lib; {
meta = with lib; {
description = "An interpreter and a prover for a Lisp dialect";
longDescription = ''
ACL2 is a logic and programming language in which you can model computer

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, zlib, unzip }:
{ lib, stdenv, fetchurl, zlib, unzip }:
stdenv.mkDerivation rec {
pname = "libipasirglucose4";
@ -27,7 +27,7 @@ stdenv.mkDerivation rec {
install -D libipasirglucose4.so $out/lib/libipasirglucose4.so
'';
meta = with stdenv.lib; {
meta = with lib; {
description = "Shared library providing IPASIR interface to the Glucose SAT solver";
license = licenses.mit;
platforms = platforms.unix;

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, jre }:
{ lib, stdenv, fetchurl, jre }:
stdenv.mkDerivation rec {
pname = "alda";
@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
sed -i -e '1 s!java!${jre}/bin/java!' $out/bin/alda
'';
meta = with stdenv.lib; {
meta = with lib; {
description = "A music programming language for musicians";
homepage = "https://alda.io";
license = licenses.epl10;

View File

@ -1,4 +1,4 @@
{stdenv, fetchurl, unzip}:
{lib, stdenv, fetchurl, unzip}:
let
s = # Generated upstream information
rec {
@ -35,9 +35,9 @@ stdenv.mkDerivation {
meta = {
inherit (s) version;
description = "Light-weight scripting library";
license = stdenv.lib.licenses.zlib ;
maintainers = [stdenv.lib.maintainers.raskin];
platforms = stdenv.lib.platforms.linux;
license = lib.licenses.zlib ;
maintainers = [lib.maintainers.raskin];
platforms = lib.platforms.linux;
badPlatforms = [ "aarch64-linux" ];
downloadPage = "http://www.angelcode.com/angelscript/downloads.html";
homepage="http://www.angelcode.com/angelscript/";

View File

@ -1,4 +1,4 @@
{stdenv, fetchurl, unzip}:
{lib, stdenv, fetchurl, unzip}:
let
s = # Generated upstream information
rec {
@ -29,9 +29,9 @@ stdenv.mkDerivation {
meta = {
inherit (s) version;
description = "Light-weight scripting library";
license = stdenv.lib.licenses.zlib ;
maintainers = [stdenv.lib.maintainers.raskin];
platforms = stdenv.lib.platforms.linux;
license = lib.licenses.zlib ;
maintainers = [lib.maintainers.raskin];
platforms = lib.platforms.linux;
downloadPage = "http://www.angelcode.com/angelscript/downloads.html";
homepage="http://www.angelcode.com/angelscript/";
};

View File

@ -1,4 +1,4 @@
{ stdenv, fetchgit, mlton }:
{ lib, stdenv, fetchgit, mlton }:
stdenv.mkDerivation {
name = "ceptre-2016-11-27";
@ -16,7 +16,7 @@ stdenv.mkDerivation {
cp ceptre $out/bin
'';
meta = with stdenv.lib; {
meta = with lib; {
description = "A linear logic programming language for modeling generative interactive systems";
homepage = "https://github.com/chrisamaphone/interactive-lp";
maintainers = with maintainers; [ pSub ];

View File

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, makeWrapper }:
{ lib, stdenv, fetchFromGitHub, makeWrapper }:
let
version = "0.9.1";
name = "chibi-scheme-${version}";
@ -9,9 +9,9 @@ stdenv.mkDerivation {
meta = {
homepage = "https://github.com/ashinn/chibi-scheme";
description = "Small Footprint Scheme for use as a C Extension Language";
platforms = stdenv.lib.platforms.all;
license = stdenv.lib.licenses.bsd3;
maintainers = [ stdenv.lib.maintainers.DerGuteMoritz ];
platforms = lib.platforms.all;
license = lib.licenses.bsd3;
maintainers = [ lib.maintainers.DerGuteMoritz ];
};
src = fetchFromGitHub {

View File

@ -1,4 +1,4 @@
{ stdenv
{ lib, stdenv
, python
, libffi
, git
@ -50,7 +50,7 @@ let
"-DCLING_INCLUDE_TESTS=ON"
];
meta = with stdenv.lib; {
meta = with lib; {
description = "The Interactive C++ Interpreter";
homepage = "https://root.cern/cling/";
license = with licenses; [ lgpl21 ncsa ];
@ -73,7 +73,7 @@ let
flags = [
"-nostdinc"
"-nostdinc++"
"-isystem" "${stdenv.lib.getDev stdenv.cc.libc}/include"
"-isystem" "${lib.getDev stdenv.cc.libc}/include"
"-I" "${unwrapped}/include"
"-I" "${unwrapped}/lib/clang/5.0.2/include"
];

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl }:
{ lib, stdenv, fetchurl }:
stdenv.mkDerivation {
version = "6.30";
@ -13,7 +13,7 @@ stdenv.mkDerivation {
installPhase = ''
install -D -t $out/bin core/clips
'';
meta = with stdenv.lib; {
meta = with lib; {
description = "A Tool for Building Expert Systems";
homepage = "http://www.clipsrules.net/";
longDescription = ''

View File

@ -3,7 +3,7 @@
# - base (default): contains readline and i18n, regexp and syscalls modules
# by default
# - full: contains base plus modules in withModules
{ stdenv, fetchurl, libsigsegv, gettext, ncurses, readline, libX11
{ lib, stdenv, fetchurl, libsigsegv, gettext, ncurses, readline, libX11
, libXau, libXt, pcre, zlib, libXpm, xorgproto, libXext
, libffi
, libffcall
@ -16,8 +16,8 @@
"pcre"
"rawsock"
]
++ stdenv.lib.optionals stdenv.isLinux [ "bindings/glibc" "zlib" "wildcard" ]
++ stdenv.lib.optional x11Support "clx/new-clx"
++ lib.optionals stdenv.isLinux [ "bindings/glibc" "zlib" "wildcard" ]
++ lib.optional x11Support "clx/new-clx"
}:
assert x11Support -> (libX11 != null && libXau != null && libXt != null
@ -37,14 +37,14 @@ stdenv.mkDerivation rec {
ffcallAvailable = stdenv.isLinux && (libffcall != null);
buildInputs = [libsigsegv]
++ stdenv.lib.optional (gettext != null) gettext
++ stdenv.lib.optional (ncurses != null) ncurses
++ stdenv.lib.optional (pcre != null) pcre
++ stdenv.lib.optional (zlib != null) zlib
++ stdenv.lib.optional (readline != null) readline
++ stdenv.lib.optional (ffcallAvailable && (libffi != null)) libffi
++ stdenv.lib.optional ffcallAvailable libffcall
++ stdenv.lib.optionals x11Support [
++ lib.optional (gettext != null) gettext
++ lib.optional (ncurses != null) ncurses
++ lib.optional (pcre != null) pcre
++ lib.optional (zlib != null) zlib
++ lib.optional (readline != null) readline
++ lib.optional (ffcallAvailable && (libffi != null)) libffi
++ lib.optional ffcallAvailable libffcall
++ lib.optionals x11Support [
libX11 libXau libXt libXpm xorgproto libXext
];
@ -68,14 +68,14 @@ stdenv.mkDerivation rec {
'';
configureFlags = [ "builddir" ]
++ stdenv.lib.optional (!dllSupport) "--without-dynamic-modules"
++ stdenv.lib.optional (readline != null) "--with-readline"
++ lib.optional (!dllSupport) "--without-dynamic-modules"
++ lib.optional (readline != null) "--with-readline"
# --with-dynamic-ffi can only exist with --with-ffcall - foreign.d does not compile otherwise
++ stdenv.lib.optional (ffcallAvailable && (libffi != null)) "--with-dynamic-ffi"
++ stdenv.lib.optional ffcallAvailable "--with-ffcall"
++ stdenv.lib.optional (!ffcallAvailable) "--without-ffcall"
++ lib.optional (ffcallAvailable && (libffi != null)) "--with-dynamic-ffi"
++ lib.optional ffcallAvailable "--with-ffcall"
++ lib.optional (!ffcallAvailable) "--without-ffcall"
++ builtins.map (x: "--with-module=" + x) withModules
++ stdenv.lib.optional threadSupport "--with-threads=POSIX_THREADS";
++ lib.optional threadSupport "--with-threads=POSIX_THREADS";
preBuild = ''
sed -e '/avcall.h/a\#include "config.h"' -i src/foreign.d
@ -83,11 +83,11 @@ stdenv.mkDerivation rec {
'';
postInstall =
stdenv.lib.optionalString (withModules != [])
lib.optionalString (withModules != [])
(''./clisp-link add "$out"/lib/clisp*/base "$(dirname "$out"/lib/clisp*/base)"/full''
+ stdenv.lib.concatMapStrings (x: " " + x) withModules);
+ lib.concatMapStrings (x: " " + x) withModules);
NIX_CFLAGS_COMPILE = "-O0 ${stdenv.lib.optionalString (!stdenv.is64bit) "-falign-functions=4"}";
NIX_CFLAGS_COMPILE = "-O0 ${lib.optionalString (!stdenv.is64bit) "-falign-functions=4"}";
# TODO : make mod-check fails
doCheck = false;
@ -95,10 +95,10 @@ stdenv.mkDerivation rec {
meta = {
description = "ANSI Common Lisp Implementation";
homepage = "http://clisp.cons.org";
maintainers = with stdenv.lib.maintainers; [raskin tohl];
platforms = stdenv.lib.platforms.unix;
maintainers = with lib.maintainers; [raskin tohl];
platforms = lib.platforms.unix;
# problems on Darwin: https://github.com/NixOS/nixpkgs/issues/20062
broken = stdenv.hostPlatform.isDarwin || stdenv.hostPlatform.isAarch64;
license = stdenv.lib.licenses.gpl2;
license = lib.licenses.gpl2;
};
}

View File

@ -3,7 +3,7 @@
# - base (default): contains readline and i18n, regexp and syscalls modules
# by default
# - full: contains base plus modules in withModules
{ stdenv, fetchhg, libsigsegv, gettext, ncurses, readline, libX11
{ lib, stdenv, fetchhg, libsigsegv, gettext, ncurses, readline, libX11
, libXau, libXt, pcre, zlib, libXpm, xorgproto, libXext
, libffi, libffcall, automake
, coreutils
@ -15,8 +15,8 @@
"pcre"
"rawsock"
]
++ stdenv.lib.optionals stdenv.isLinux [ "bindings/glibc" "zlib" ]
++ stdenv.lib.optional x11Support "clx/new-clx"
++ lib.optionals stdenv.isLinux [ "bindings/glibc" "zlib" ]
++ lib.optional x11Support "clx/new-clx"
}:
assert x11Support -> (libX11 != null && libXau != null && libXt != null
@ -38,14 +38,14 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ automake ]; # sometimes fails otherwise
buildInputs = [libsigsegv]
++ stdenv.lib.optional (gettext != null) gettext
++ stdenv.lib.optional (ncurses != null) ncurses
++ stdenv.lib.optional (pcre != null) pcre
++ stdenv.lib.optional (zlib != null) zlib
++ stdenv.lib.optional (readline != null) readline
++ stdenv.lib.optional (ffcallAvailable && (libffi != null)) libffi
++ stdenv.lib.optional ffcallAvailable libffcall
++ stdenv.lib.optionals x11Support [
++ lib.optional (gettext != null) gettext
++ lib.optional (ncurses != null) ncurses
++ lib.optional (pcre != null) pcre
++ lib.optional (zlib != null) zlib
++ lib.optional (readline != null) readline
++ lib.optional (ffcallAvailable && (libffi != null)) libffi
++ lib.optional ffcallAvailable libffcall
++ lib.optionals x11Support [
libX11 libXau libXt libXpm xorgproto libXext
];
@ -63,14 +63,14 @@ stdenv.mkDerivation rec {
'';
configureFlags = [ "builddir" ]
++ stdenv.lib.optional (!dllSupport) "--without-dynamic-modules"
++ stdenv.lib.optional (readline != null) "--with-readline"
++ lib.optional (!dllSupport) "--without-dynamic-modules"
++ lib.optional (readline != null) "--with-readline"
# --with-dynamic-ffi can only exist with --with-ffcall - foreign.d does not compile otherwise
++ stdenv.lib.optional (ffcallAvailable && (libffi != null)) "--with-dynamic-ffi"
++ stdenv.lib.optional ffcallAvailable "--with-ffcall"
++ stdenv.lib.optional (!ffcallAvailable) "--without-ffcall"
++ lib.optional (ffcallAvailable && (libffi != null)) "--with-dynamic-ffi"
++ lib.optional ffcallAvailable "--with-ffcall"
++ lib.optional (!ffcallAvailable) "--without-ffcall"
++ builtins.map (x: " --with-module=" + x) withModules
++ stdenv.lib.optional threadSupport "--with-threads=POSIX_THREADS";
++ lib.optional threadSupport "--with-threads=POSIX_THREADS";
preBuild = ''
sed -e '/avcall.h/a\#include "config.h"' -i src/foreign.d
@ -79,11 +79,11 @@ stdenv.mkDerivation rec {
'';
postInstall =
stdenv.lib.optionalString (withModules != [])
lib.optionalString (withModules != [])
(''./clisp-link add "$out"/lib/clisp*/base "$(dirname "$out"/lib/clisp*/base)"/full''
+ stdenv.lib.concatMapStrings (x: " " + x) withModules);
+ lib.concatMapStrings (x: " " + x) withModules);
NIX_CFLAGS_COMPILE = "-O0 ${stdenv.lib.optionalString (!stdenv.is64bit) "-falign-functions=4"}";
NIX_CFLAGS_COMPILE = "-O0 ${lib.optionalString (!stdenv.is64bit) "-falign-functions=4"}";
# TODO : make mod-check fails
doCheck = false;
@ -91,8 +91,8 @@ stdenv.mkDerivation rec {
meta = {
description = "ANSI Common Lisp Implementation";
homepage = "http://clisp.cons.org";
maintainers = with stdenv.lib.maintainers; [raskin tohl];
maintainers = with lib.maintainers; [raskin tohl];
# problems on Darwin: https://github.com/NixOS/nixpkgs/issues/20062
platforms = stdenv.lib.platforms.linux;
platforms = lib.platforms.linux;
};
}

View File

@ -1,6 +1,6 @@
{ stdenv, fetchurl, graalvm11-ce, glibcLocales }:
{ lib, stdenv, fetchurl, graalvm11-ce, glibcLocales }:
with stdenv.lib;
with lib;
stdenv.mkDerivation rec {
pname = "babashka";
version = "0.2.3";
@ -50,7 +50,7 @@ stdenv.mkDerivation rec {
cp bb $out/bin/bb
'';
meta = with stdenv.lib; {
meta = with lib; {
description = "A Clojure babushka for the grey areas of Bash";
longDescription = ''
The main idea behind babashka is to leverage Clojure in places where you

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, jre, makeWrapper }:
{ lib, stdenv, fetchurl, jre, makeWrapper }:
let version = "0.4.4"; in
@ -25,6 +25,6 @@ stdenv.mkDerivation {
meta = {
description = "A lightweight IDE for Clojure";
homepage = "https://github.com/arthuredelstein/clooj";
license = stdenv.lib.licenses.bsd3;
license = lib.licenses.bsd3;
};
}

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, installShellFiles, jdk, rlwrap, makeWrapper }:
{ lib, stdenv, fetchurl, installShellFiles, jdk, rlwrap, makeWrapper }:
stdenv.mkDerivation rec {
pname = "clojure";
@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
# See https://github.com/clojure/brew-install/blob/1.10.1/src/main/resources/clojure/install/linux-install.sh
installPhase =
let
binPath = stdenv.lib.makeBinPath [ rlwrap jdk ];
binPath = lib.makeBinPath [ rlwrap jdk ];
in
''
clojure_lib_dir=$out
@ -47,7 +47,7 @@ stdenv.mkDerivation rec {
-Sverbose \
-Scp $out/libexec/clojure-tools-${version}.jar
'';
meta = with stdenv.lib; {
meta = with lib; {
description = "A Lisp dialect for the JVM";
homepage = "https://clojure.org/";
license = licenses.epl10;

View File

@ -280,8 +280,8 @@ stdenv.mkDerivation {
making it the fastest Clojure REPL in existence.
'';
homepage = "https://github.com/anmonteiro/lumo";
license = stdenv.lib.licenses.epl10;
maintainers = [ stdenv.lib.maintainers.hlolli ];
platforms = stdenv.lib.platforms.linux ++ stdenv.lib.platforms.darwin;
license = lib.licenses.epl10;
maintainers = [ lib.maintainers.hlolli ];
platforms = lib.platforms.linux ++ lib.platforms.darwin;
};
}

View File

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, libck, darwin }:
{ lib, stdenv, fetchFromGitHub, libck, darwin }:
let
version = "0.21";
@ -15,7 +15,7 @@ let
enableParallelBuilding = true;
nativeBuildInputs = stdenv.lib.optionals stdenv.isDarwin [ darwin.cctools ];
nativeBuildInputs = lib.optionals stdenv.isDarwin [ darwin.cctools ];
buildInputs = [ libck ];
@ -36,13 +36,13 @@ stdenv.mkDerivation {
enableParallelBuilding = true;
nativeBuildInputs = [ bootstrap ]
++ stdenv.lib.optionals stdenv.isDarwin [ darwin.cctools ];
++ lib.optionals stdenv.isDarwin [ darwin.cctools ];
buildInputs = [ libck ];
makeFlags = [ "PREFIX=${placeholder "out"}" ];
meta = with stdenv.lib; {
meta = with lib; {
homepage = "https://justinethier.github.io/cyclone/";
description = "A brand-new compiler that allows practical application development using R7RS Scheme";
license = licenses.mit;

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, unzip, version ? "2.7.2" }:
{ lib, stdenv, fetchurl, unzip, version ? "2.7.2" }:
let
@ -80,7 +80,7 @@ let
in
with stdenv.lib;
with lib;
stdenv.mkDerivation {

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl }:
{ lib, stdenv, fetchurl }:
stdenv.mkDerivation rec {
pname = "duktape";
@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
'';
enableParallelBuilding = true;
meta = with stdenv.lib; {
meta = with lib; {
description = "An embeddable Javascript engine, with a focus on portability and compact footprint";
homepage = "https://duktape.org/";
downloadPage = "https://duktape.org/download.html";

View File

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, which, ocamlPackages }:
{ lib, stdenv, fetchFromGitHub, which, ocamlPackages }:
let version = "5.0"; in
@ -25,7 +25,7 @@ stdenv.mkDerivation {
doCheck = true;
checkTarget = "test";
meta = with stdenv.lib; {
meta = with lib; {
homepage = "https://www.eff-lang.org";
description = "A functional programming language based on algebraic effects and their handlers";
longDescription = ''

View File

@ -1,4 +1,4 @@
{ pkgs, stdenv, fetchFromGitHub, erlang, makeWrapper,
{ pkgs, lib, stdenv, fetchFromGitHub, erlang, makeWrapper,
coreutils, curl, bash, debugInfo ? false }:
{ baseName ? "elixir"
@ -10,7 +10,7 @@
} @ args:
let
inherit (stdenv.lib) getVersion versionAtLeast optional;
inherit (lib) getVersion versionAtLeast optional;
in
assert versionAtLeast (getVersion erlang) minimumOTPVersion;
@ -46,7 +46,7 @@ in
b=$(basename $f)
if [ "$b" = mix ]; then continue; fi
wrapProgram $f \
--prefix PATH ":" "${stdenv.lib.makeBinPath [ erlang coreutils curl bash ]}" \
--prefix PATH ":" "${lib.makeBinPath [ erlang coreutils curl bash ]}" \
--set CURL_CA_BUNDLE /etc/ssl/certs/ca-certificates.crt
done
@ -55,7 +55,7 @@ in
'';
pos = builtins.unsafeGetAttrPos "sha256" args;
meta = with stdenv.lib; {
meta = with lib; {
homepage = "https://elixir-lang.org/";
description = "A functional, meta-programming aware language built on top of the Erlang VM";

View File

@ -1,4 +1,4 @@
{ pkgs, stdenv, fetchFromGitHub, makeWrapper, gawk, gnum4, gnused
{ pkgs, lib, stdenv, fetchFromGitHub, makeWrapper, gawk, gnum4, gnused
, libxml2, libxslt, ncurses, openssl, perl, autoconf
# TODO: use jdk https://github.com/NixOS/nixpkgs/pull/89731
, openjdk8 ? null # javacSupport
@ -41,7 +41,7 @@ assert odbcSupport -> unixODBC != null;
assert javacSupport -> openjdk8 != null;
let
inherit (stdenv.lib) optional optionals optionalAttrs optionalString;
inherit (lib) optional optionals optionalAttrs optionalString;
wxPackages2 = if stdenv.isDarwin then [ wxmac ] else wxPackages;
in stdenv.mkDerivation ({
@ -106,12 +106,12 @@ in stdenv.mkDerivation ({
# Some erlang bin/ scripts run sed and awk
postFixup = ''
wrapProgram $out/lib/erlang/bin/erl --prefix PATH ":" "${gnused}/bin/"
wrapProgram $out/lib/erlang/bin/start_erl --prefix PATH ":" "${stdenv.lib.makeBinPath [ gnused gawk ]}"
wrapProgram $out/lib/erlang/bin/start_erl --prefix PATH ":" "${lib.makeBinPath [ gnused gawk ]}"
'';
setupHook = ./setup-hook.sh;
meta = with stdenv.lib; ({
meta = with lib; ({
homepage = "https://www.erlang.org/";
downloadPage = "https://www.erlang.org/download.html";
description = "Programming language used for massively scalable soft real-time systems";

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