Merge branch 'master' into staging-next

This commit is contained in:
Jan Tojnar 2021-01-24 00:09:45 +01:00
commit 01ee4ea574
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> </programlisting>
</section> </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> </section>
</chapter> </chapter>

View file

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

View file

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

View file

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

View file

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

View file

@ -68,11 +68,11 @@ let
patchShebangs scripts/* patchShebangs scripts/*
substituteInPlace scripts/Makefile.lib \ substituteInPlace scripts/Makefile.lib \
--replace 'DTC_FLAGS += $(DTC_FLAGS_$(basetarget))' 'DTC_FLAGS += $(DTC_FLAGS_$(basetarget)) -@' --replace 'DTC_FLAGS += $(DTC_FLAGS_$(basetarget))' 'DTC_FLAGS += $(DTC_FLAGS_$(basetarget)) -@'
make ${pkgs.stdenv.hostPlatform.platform.kernelBaseConfig} ARCH="${pkgs.stdenv.hostPlatform.platform.kernelArch}" make ${pkgs.stdenv.hostPlatform.linux-kernel.baseConfig} ARCH="${pkgs.stdenv.hostPlatform.linuxArch}"
make dtbs ARCH="${pkgs.stdenv.hostPlatform.platform.kernelArch}" make dtbs ARCH="${pkgs.stdenv.hostPlatform.linuxArch}"
''; '';
installPhase = '' 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 = { options = {
hardware.deviceTree = { hardware.deviceTree = {
enable = mkOption { enable = mkOption {
default = pkgs.stdenv.hostPlatform.platform.kernelDTB or false; default = pkgs.stdenv.hostPlatform.linux-kernel.DTB or false;
type = types.bool; type = types.bool;
description = '' description = ''
Build device tree files. These are used to describe the 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" '' system.build.netbootIpxeScript = pkgs.writeTextDir "netboot.ipxe" ''
#!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 initrd initrd
boot boot
''; '';

View file

@ -587,10 +587,10 @@ in
nix.systemFeatures = mkDefault ( nix.systemFeatures = mkDefault (
[ "nixos-test" "benchmark" "big-parallel" "kvm" ] ++ [ "nixos-test" "benchmark" "big-parallel" "kvm" ] ++
optionals (pkgs.hostPlatform.platform ? gcc.arch) ( optionals (pkgs.hostPlatform ? gcc.arch) (
# a builder can run code for `platform.gcc.arch` and inferior architectures # a builder can run code for `gcc.arch` and inferior architectures
[ "gccarch-${pkgs.hostPlatform.platform.gcc.arch}" ] ++ [ "gccarch-${pkgs.hostPlatform.gcc.arch}" ] ++
map (x: "gccarch-${x}") lib.systems.architectures.inferiors.${pkgs.hostPlatform.platform.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 { settings = mkOption {
type = format.type; type = format.type;
default = { default = {};
# Agrees with `StateDirectory = "nomad"` set below.
data_dir = "/var/lib/nomad";
};
description = '' description = ''
Configuration for Nomad. See the <link xlink:href="https://www.nomadproject.io/docs/configuration">documentation</link> Configuration for Nomad. See the <link xlink:href="https://www.nomadproject.io/docs/configuration">documentation</link>
for supported values. for supported values.
@ -77,6 +85,11 @@ in
##### implementation ##### implementation
config = mkIf cfg.enable { config = mkIf cfg.enable {
services.nomad.settings = {
# Agrees with `StateDirectory = "nomad"` set below.
data_dir = mkDefault "/var/lib/nomad";
};
environment = { environment = {
etc."nomad.json".source = format.generate "nomad.json" cfg.settings; etc."nomad.json".source = format.generate "nomad.json" cfg.settings;
systemPackages = [ cfg.package ]; systemPackages = [ cfg.package ];
@ -99,7 +112,8 @@ in
serviceConfig = { serviceConfig = {
DynamicUser = cfg.dropPrivileges; DynamicUser = cfg.dropPrivileges;
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID"; 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"; KillMode = "process";
KillSignal = "SIGINT"; KillSignal = "SIGINT";
LimitNOFILE = 65536; LimitNOFILE = 65536;
@ -114,6 +128,7 @@ in
} // (optionalAttrs cfg.enableDocker { } // (optionalAttrs cfg.enableDocker {
SupplementaryGroups = "docker"; # space-separated string SupplementaryGroups = "docker"; # space-separated string
}); });
unitConfig = { unitConfig = {
StartLimitIntervalSec = 10; StartLimitIntervalSec = 10;
StartLimitBurst = 3; StartLimitBurst = 3;

View file

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

View file

@ -59,7 +59,7 @@ in
system.build.installBootLoader = generationsDirBuilder; system.build.installBootLoader = generationsDirBuilder;
system.boot.loader.id = "generationsDir"; 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 { extraPerEntryConfig = mkOption {
default = ""; default = "";
example = "root (hd0)"; example = "root (hd0)";
@ -715,7 +735,7 @@ in
${optionalString cfg.enableCryptodisk "export GRUB_ENABLE_CRYPTODISK=y"} ${optionalString cfg.enableCryptodisk "export GRUB_ENABLE_CRYPTODISK=y"}
'' + flip concatMapStrings cfg.mirroredBoots (args: '' '' + flip concatMapStrings cfg.mirroredBoots (args: ''
${pkgs.perl}/bin/perl ${install-grub-pl} ${grubConfig args} $@ ${pkgs.perl}/bin/perl ${install-grub-pl} ${grubConfig args} $@
'')); '') + cfg.extraInstallCommands);
system.build.grub = grub; system.build.grub = grub;

View file

@ -103,6 +103,6 @@ in
system.build.installBootLoader = builder; system.build.installBootLoader = builder;
system.boot.loader.id = "raspberrypi"; 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 in
tarball // tarball //
{ meta = { { 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; maintainers = map (x: lib.maintainers.${x}) maintainers;
}; };
inherit config; inherit config;
@ -105,7 +105,7 @@ let
modules = makeModules module {}; modules = makeModules module {};
}; };
build = configEvaled.config.system.build; build = configEvaled.config.system.build;
kernelTarget = configEvaled.pkgs.stdenv.hostPlatform.platform.kernelTarget; kernelTarget = configEvaled.pkgs.stdenv.hostPlatform.linux-kernel.target;
in in
pkgs.symlinkJoin { pkgs.symlinkJoin {
name = "netboot"; name = "netboot";

View file

@ -272,6 +272,7 @@ in
nginx-variants = handleTest ./nginx-variants.nix {}; nginx-variants = handleTest ./nginx-variants.nix {};
nix-ssh-serve = handleTest ./nix-ssh-serve.nix {}; nix-ssh-serve = handleTest ./nix-ssh-serve.nix {};
nixos-generate-config = handleTest ./nixos-generate-config.nix {}; nixos-generate-config = handleTest ./nixos-generate-config.nix {};
nomad = handleTest ./nomad.nix {};
novacomd = handleTestOn ["x86_64-linux"] ./novacomd.nix {}; novacomd = handleTestOn ["x86_64-linux"] ./novacomd.nix {};
nsd = handleTest ./nsd.nix {}; nsd = handleTest ./nsd.nix {};
nzbget = handleTest ./nzbget.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" startScript = if stdenv.isx86_32 then "START_LINUX_X86"
else if stdenv.isx86_64 then "START_LINUX_X86_64" 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 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" linuxExecutable = if stdenv.isx86_32 then "pixilang_linux_x86"
else if stdenv.isx86_64 then "pixilang_linux_x86_64" else if stdenv.isx86_64 then "pixilang_linux_x86_64"

View file

@ -9,18 +9,18 @@ let
inherit buildFHSUserEnv; inherit buildFHSUserEnv;
}; };
stableVersion = { stableVersion = {
version = "4.1.1.0"; # "Android Studio 4.1.1" version = "4.1.2.0"; # "Android Studio 4.1.2"
build = "201.6953283"; build = "201.7042882";
sha256Hash = "sha256-aAMhhJWcVFdvEZt8fI3tF12Eg3TzlU+kUFMNeCYN1os="; sha256Hash = "1f9bclvyvm3sg9an7wxlfwd8jwnb9cl726dvggmysa6r7shc7xw9";
}; };
betaVersion = { betaVersion = {
version = "4.2.0.18"; # "Android Studio 4.2 Beta 2" version = "4.2.0.19"; # "Android Studio 4.2 Beta 3"
build = "202.7008469"; build = "202.7033425";
sha256Hash = "0323i4mcib84z7bsy801640gadd2k8ps7vr9jbdpb6i9gma6klmh"; sha256Hash = "037r99hn16y0fy6z6k90qf6yx5a4vvx6bl9rdyagdm16ry4bpiw4";
}; };
latestVersion = { # canary & dev latestVersion = { # canary & dev
version = "2020.3.1.3"; # "Android Studio Arctic Fox Canary 3" version = "2020.3.1.4"; # "Android Studio Arctic Fox Canary 4"
sha256Hash = "1nx78j3pqr8qgwprnzfy17w9jmkgiqnlbsw91jnslr9p9fd0ixcx"; sha256Hash = "05drh4grq0b37qg5nspf2c6vmvcc9x71al3xwc2ddjhmyj0f9sk4";
}; };
in { in {
# Attributes are named by their corresponding release channels # 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 let
versions = { versions = {
@ -54,7 +54,8 @@ let
preFixup = '' preFixup = ''
gappsWrapperArgs+=( 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 in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "cudatext"; pname = "cudatext";
version = "1.118.2"; version = "1.122.3";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "Alexey-T"; owner = "Alexey-T";
repo = "CudaText"; repo = "CudaText";
rev = version; rev = version;
sha256 = "0d6f4qfs7vifz7qkw2vkdjgd5w717wfpnxbc4qa4hs4g6y86ywmm"; sha256 = "1h56hj433z0n4l97zl1cwkjv0qvz4qmvf469zzjzf1nj4zj8px2b";
}; };
patches = [
# Don't check for update
./dont-check-update.patch
];
postPatch = '' postPatch = ''
substituteInPlace app/proc_globdata.pas \ substituteInPlace app/proc_globdata.pas \
--replace "/usr/share/cudatext" "$out/share/cudatext" \ --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 ] nativeBuildInputs = [ lazarus fpc ]

View file

@ -1,33 +1,33 @@
{ {
"EncConv": { "EncConv": {
"owner": "Alexey-T", "owner": "Alexey-T",
"rev": "2020.06.15", "rev": "2021.01.01",
"sha256": "07dpvq3ppfq3b70i1smkf7vwdlzq8qnxs3fk94hi9h1z36bz2rw3" "sha256": "18fp7yz2rl80a6xw7v4bgc4092l74fb6p6z4yf312r7gw7b8naq6"
}, },
"ATBinHex-Lazarus": { "ATBinHex-Lazarus": {
"owner": "Alexey-T", "owner": "Alexey-T",
"rev": "2020.09.05", "rev": "2020.11.22",
"sha256": "022yx5vic4hnc9lz53wvr4h7hf0h71801dzlilj55x5mf8p59072" "sha256": "0dkvzm32ls03pfp40fxvsyrkfmyznc5yrj65cp4a8pp9kpkvzlz7"
}, },
"ATFlatControls": { "ATFlatControls": {
"owner": "Alexey-T", "owner": "Alexey-T",
"rev": "2020.11.02", "rev": "2021.01.12",
"sha256": "0shihlm1hg74m04qyrj2iic2ik0x7qggihmnylvvdry3y79d07fy" "sha256": "1mavv3krs4srdp362prf4sncssxjh11la5j4lkx0wk5csrmd1pc9"
}, },
"ATSynEdit": { "ATSynEdit": {
"owner": "Alexey-T", "owner": "Alexey-T",
"rev": "6560bc35a2cf31399be8713ac189216afabf9f01", "rev": "2021.01.19",
"sha256": "1bjnd6pcd9ddkvl7ma05z7f8svq609kljwc7gvbszc76hdb8d54x" "sha256": "0lpgfwljwh9mypscbpj5c7fivhza0hizjgqypval3v0209cx38d1"
}, },
"ATSynEdit_Cmp": { "ATSynEdit_Cmp": {
"owner": "Alexey-T", "owner": "Alexey-T",
"rev": "2459ea2a2e50050f7e6ee59a17a52aae05ca4433", "rev": "2021.01.17",
"sha256": "155cwcmr9f23j4x13pidvb3vcgglawkxxpizjw90ajwhmg831acr" "sha256": "14i4jdpbmh6sjpvbwipdvvmmqqw8wg592b34a9wdf2f9qxq2p4ly"
}, },
"EControl": { "EControl": {
"owner": "Alexey-T", "owner": "Alexey-T",
"rev": "2020.10.04", "rev": "2021.01.12",
"sha256": "0ypbaca3y5biw2207yh3x5p28gm8g51qf7glm5622w3cgbrf9mdq" "sha256": "107zyd65vc72fl4mvyirhv2a9m47l9bs6gwqiwar7hrn02zns6bq"
}, },
"ATSynEdit_Ex": { "ATSynEdit_Ex": {
"owner": "Alexey-T", "owner": "Alexey-T",
@ -36,8 +36,8 @@
}, },
"Python-for-Lazarus": { "Python-for-Lazarus": {
"owner": "Alexey-T", "owner": "Alexey-T",
"rev": "2020.10.23", "rev": "2021.01.16",
"sha256": "1lljldqnixlh0j05fh594gccwzkgcxa50byq8wr9ld5ik5sf8khn" "sha256": "07qv3x1cm3r12gxfnqzxly6nff39bghwwgxzl2lxi1qbpqhcs2l5"
}, },
"Emmet-Pascal": { "Emmet-Pascal": {
"owner": "Alexey-T", "owner": "Alexey-T",
@ -46,8 +46,8 @@
}, },
"CudaText-lexers": { "CudaText-lexers": {
"owner": "Alexey-T", "owner": "Alexey-T",
"rev": "2020.08.10", "rev": "2021.01.16",
"sha256": "1gzs2psyfhb9si1qyacxzfjb3dz2v255hv7y4jlkbxdxv0kckqr6" "sha256": "13zyg0cm1c1662l3f7sy462pbc39l1cwm5214nx8ijngf8kgn2zh"
}, },
"bgrabitmap": { "bgrabitmap": {
"owner": "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 { stdenv.mkDerivation {
name = "kak-buffers"; name = "kak-buffers";
version = "2019-04-03"; version = "2019-04-03";

View file

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

View file

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

View file

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

View file

@ -1,6 +1,6 @@
{ boost, cmake, fetchFromGitHub, ffmpeg, qtbase, qtx11extras, { boost, cmake, fetchFromGitHub, ffmpeg, qtbase, qtx11extras,
qttools, qtxmlpatterns, qtsvg, gdal, gfortran, libXt, makeWrapper, 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 { mkDerivation rec {
pname = "paraview"; pname = "paraview";
@ -65,7 +65,7 @@ mkDerivation rec {
buildInputs = [ buildInputs = [
libGLU libGL libGLU libGL
libXt libXt
openmpi mpi
tbb tbb
boost boost
ffmpeg ffmpeg

View file

@ -10,13 +10,13 @@
python3.pkgs.buildPythonApplication rec { python3.pkgs.buildPythonApplication rec {
pname = "genxword"; pname = "genxword";
version = "2.0.1"; version = "2.1.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "riverrun"; owner = "riverrun";
repo = pname; repo = pname;
rev = "v${version}"; rev = "v${version}";
sha256 = "00czdvyb5wnrk3x0g529afisl8v4frfys9ih0nzf1fs4jkzjcijg"; sha256 = "17h8saja45bv612yk0pra9ncbp2mjnx5n10q25nqhl765ks4bmb5";
}; };
nativeBuildInputs = [ 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: # USAGE:
# install the following package globally or in nix-shell: # install the following package globally or in nix-shell:
@ -23,6 +23,14 @@ buildGoPackage rec {
goPackagePath = "github.com/dmacvicar/terraform-provider-libvirt"; 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 { src = fetchFromGitHub {
owner = "dmacvicar"; owner = "dmacvicar";
repo = "terraform-provider-libvirt"; 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 , nixosTests
}: }:
@ -6,26 +6,28 @@ with lib;
perlPackages.buildPerlPackage rec { perlPackages.buildPerlPackage rec {
pname = "convos"; pname = "convos";
version = "5.00"; version = "5.11";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "Nordaaker"; owner = "Nordaaker";
repo = pname; repo = pname;
rev = version; rev = version;
sha256 = "0mdbh9q1vclwgnjwvb3z637s7v804h65zxazbhmd7qi3zislnhg1"; sha256 = "08k8dqdgz2b3p8g1zfg9i74r5nm1w0sqdm759d1f3jcyp737r47x";
}; };
nativeBuildInputs = [ makeWrapper ] nativeBuildInputs = [ makeWrapper ]
++ optional stdenv.isDarwin [ shortenPerlShebang ]; ++ optional stdenv.isDarwin [ shortenPerlShebang ];
buildInputs = with perlPackages; [ buildInputs = with perlPackages; [
CryptEksblowfish FileHomeDir FileReadBackwards CryptEksblowfish FileHomeDir FileReadBackwards HTTPAcceptLanguage
IOSocketSSL IRCUtils JSONValidator LinkEmbedder ModuleInstall IOSocketSSL IRCUtils JSONValidator LinkEmbedder ModuleInstall
Mojolicious MojoliciousPluginOpenAPI MojoliciousPluginWebpack Mojolicious MojoliciousPluginOpenAPI MojoliciousPluginWebpack
ParseIRC TextMarkdown TimePiece UnicodeUTF8 ParseIRC TextMarkdown TimePiece UnicodeUTF8
CpanelJSONXS EV CpanelJSONXS EV
]; ];
propagatedBuildInputs = [ openssl ];
checkInputs = with perlPackages; [ TestDeep TestMore ]; checkInputs = with perlPackages; [ TestDeep TestMore ];
postPatch = '' postPatch = ''
@ -43,6 +45,15 @@ perlPackages.buildPerlPackage rec {
substituteInPlace t/web-register-open-to-public.t \ substituteInPlace t/web-register-open-to-public.t \
--replace '!127.0.0.1!' '!localhost!' --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 # Module::Install is a runtime dependency not covered by the tests, so we add
# a test for it. # 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 { gccStdenv.mkDerivation rec {
version = "3.7.2"; version = "3.7.2";
@ -9,7 +9,7 @@ gccStdenv.mkDerivation rec {
sha256 = "1p2364ffjc56i82snzvjpy6pkf6wvqwvlvlqxliscx2c303fxs8v"; sha256 = "1p2364ffjc56i82snzvjpy6pkf6wvqwvlvlqxliscx2c303fxs8v";
}; };
buildInputs = [ zlib openmpi ]; buildInputs = [ zlib mpi ];
setSourceRoot = ''sourceRoot=$(echo */src)''; setSourceRoot = ''sourceRoot=$(echo */src)'';
buildFlags = [ "thread" "mpis" ]; buildFlags = [ "thread" "mpis" ];
preInstall = "mkdir -p $out/man/man1"; preInstall = "mkdir -p $out/man/man1";

View file

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

View file

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

View file

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

View file

@ -1,6 +1,7 @@
{ lib, stdenv, fetchurl { lib, stdenv, fetchurl
, gfortran, fftw, blas, lapack , gfortran, fftw, blas, lapack
, mpi ? null , useMpi ? false
, mpi
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
@ -21,9 +22,9 @@ stdenv.mkDerivation rec {
''; '';
buildInputs = [ fftw blas lapack gfortran ] 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" ]; makeFlags = [ "all" ];

View file

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

View file

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

View file

@ -1,5 +1,5 @@
{ lib, stdenv, fetchgit, fetchFromGitHub, cmake { lib, stdenv, fetchgit, fetchFromGitHub, cmake
, openblas, blas, lapack, opencv3, libzip, boost, protobuf, openmpi , openblas, blas, lapack, opencv3, libzip, boost, protobuf, mpi
, onebitSGDSupport ? false , onebitSGDSupport ? false
, cudaSupport ? false, addOpenGLRunpath, cudatoolkit, nvidia_x11 , cudaSupport ? false, addOpenGLRunpath, cudatoolkit, nvidia_x11
, cudnnSupport ? cudaSupport, cudnn , cudnnSupport ? cudaSupport, cudnn
@ -33,7 +33,7 @@ in stdenv.mkDerivation rec {
# Force OpenMPI to use g++ in PATH. # Force OpenMPI to use g++ in PATH.
OMPI_CXX = "g++"; OMPI_CXX = "g++";
buildInputs = [ openblas opencv3 libzip boost protobuf openmpi ] buildInputs = [ openblas opencv3 libzip boost protobuf mpi ]
++ lib.optional cudaSupport cudatoolkit ++ lib.optional cudaSupport cudatoolkit
++ lib.optional cudnnSupport cudnn; ++ lib.optional cudnnSupport cudnn;
@ -43,7 +43,7 @@ in stdenv.mkDerivation rec {
"--with-openblas=${openblas}" "--with-openblas=${openblas}"
"--with-boost=${boost.dev}" "--with-boost=${boost.dev}"
"--with-protobuf=${protobuf}" "--with-protobuf=${protobuf}"
"--with-mpi=${openmpi}" "--with-mpi=${mpi}"
"--cuda=${if cudaSupport then "yes" else "no"}" "--cuda=${if cudaSupport then "yes" else "no"}"
# FIXME # FIXME
"--asgd=no" "--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 { stdenv.mkDerivation rec {
name = "getdp-${version}"; name = "getdp-${version}";
@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
}; };
nativeBuildInputs = [ cmake gfortran ]; nativeBuildInputs = [ cmake gfortran ];
buildInputs = [ blas lapack openmpi petsc python3 ]; buildInputs = [ blas lapack mpi petsc python3 ];
meta = with lib; { meta = with lib; {
description = "A General Environment for the Treatment of Discrete Problems"; 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 { stdenv.mkDerivation rec {
version = "6.0.4"; version = "6.0.4";
pname = "scotch"; pname = "scotch";
src_name = "scotch_${version}"; src_name = "scotch_${version}";
buildInputs = [ bison openmpi flex zlib ]; buildInputs = [ bison mpi flex zlib ];
src = fetchurl { src = fetchurl {
url = "https://gforge.inria.fr/frs/download.php/file/34618/${src_name}.tar.gz"; url = "https://gforge.inria.fr/frs/download.php/file/34618/${src_name}.tar.gz";

View file

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

View file

@ -1,6 +1,7 @@
{ lib, stdenv, fetchFromGitHub { lib, stdenv, fetchFromGitHub
, libpng, gzip, fftw, blas, lapack , libpng, gzip, fftw, blas, lapack
, mpi ? null , withMPI ? false
, mpi
}: }:
let packages = [ let packages = [
"asphere" "body" "class2" "colloid" "compress" "coreshell" "asphere" "body" "class2" "colloid" "compress" "coreshell"
@ -8,7 +9,6 @@ let packages = [
"opt" "peri" "qeq" "replica" "rigid" "shock" "snap" "srd" "user-reaxc" "opt" "peri" "qeq" "replica" "rigid" "shock" "snap" "srd" "user-reaxc"
]; ];
lammps_includes = "-DLAMMPS_EXCEPTIONS -DLAMMPS_GZIP -DLAMMPS_MEMALIGN=64"; lammps_includes = "-DLAMMPS_EXCEPTIONS -DLAMMPS_GZIP -DLAMMPS_MEMALIGN=64";
withMPI = (mpi != null);
in in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
# LAMMPS has weird versioning converted to ISO 8601 format # 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 { stdenv.mkDerivation rec {
pname = "elmerfem"; pname = "elmerfem";
@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
hardeningDisable = [ "format" ]; hardeningDisable = [ "format" ];
nativeBuildInputs = [ cmake pkg-config git ]; nativeBuildInputs = [ cmake pkg-config git ];
buildInputs = [ gfortran openmpi blas liblapack qt4 qwt6_qt4 ]; buildInputs = [ gfortran mpi blas liblapack qt4 qwt6_qt4 ];
preConfigure = '' preConfigure = ''
patchShebangs ./ patchShebangs ./

View file

@ -9,14 +9,14 @@
buildPythonApplication rec { buildPythonApplication rec {
pname = "glances"; pname = "glances";
version = "3.1.5"; version = "3.1.6";
disabled = isPyPy; disabled = isPyPy;
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "nicolargo"; owner = "nicolargo";
repo = "glances"; repo = "glances";
rev = "v${version}"; 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): # 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 = CROSVM_CARGO_TEST_KERNEL_BINARY =
lib.optionalString (stdenv.buildPlatform == stdenv.hostPlatform) lib.optionalString (stdenv.buildPlatform == stdenv.hostPlatform)
"${linux}/${stdenv.hostPlatform.platform.kernelTarget}"; "${linux}/${stdenv.hostPlatform.linux-kernel.target}";
passthru = { passthru = {
inherit adhdSrc; inherit adhdSrc;

View file

@ -169,7 +169,7 @@ rec {
substituteInPlace ./scripts/docs/generate-man.sh --replace "-v md2man" "-v go-md2man" substituteInPlace ./scripts/docs/generate-man.sh --replace "-v md2man" "-v go-md2man"
substituteInPlace ./man/md2man-all.sh --replace md2man go-md2man substituteInPlace ./man/md2man-all.sh --replace md2man go-md2man
'' + optionalString buildxSupport '' '' + 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]} ${lib.strings.makeSearchPathOutput "bin" "libexec/docker/cli-plugins" [docker-buildx]}
''; '';

View file

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

View file

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

View file

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

View file

@ -56,13 +56,13 @@ in
, prepend ? [] , prepend ? []
# Whether to wrap the initramfs in a u-boot image. # 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 # 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 # guess may not align with u-boot's nomenclature correctly, so it can
# be overridden. # be overridden.
# See https://gitlab.denx.de/u-boot/u-boot/-/blob/9bfb567e5f1bfe7de8eb41f8c6d00f49d2b9a426/common/image.c#L81-106 for a list. # 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. # 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. # 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 { pkgs
, kernel ? pkgs.linux , kernel ? pkgs.linux
, img ? pkgs.stdenv.hostPlatform.platform.kernelTarget , img ? pkgs.stdenv.hostPlatform.linux-kernel.target
, storeDir ? builtins.storeDir , storeDir ? builtins.storeDir
, rootModules ? , rootModules ?
[ "virtio_pci" "virtio_mmio" "virtio_blk" "virtio_balloon" "virtio_rng" "ext4" "unix" "9p" "9pnet_virtio" "crc32c_generic" ] [ "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 , makeWrapper
, runCommand, wrapBintoolsWith, wrapCCWith , runCommand, wrapBintoolsWith, wrapCCWith
, buildAndroidndk, androidndk, targetAndroidndkPkgs , buildAndroidndk, androidndk, targetAndroidndkPkgs
@ -48,7 +48,7 @@ let
hostInfo = ndkInfoFun stdenv.hostPlatform; hostInfo = ndkInfoFun stdenv.hostPlatform;
targetInfo = ndkInfoFun stdenv.targetPlatform; 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 in
rec { rec {

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,4 +1,4 @@
{ pkgs, stdenv }: { pkgs, lib, stdenv }:
rec { rec {
@ -7,7 +7,7 @@ rec {
callPackageWith = autoArgs: fn: args: callPackageWith = autoArgs: fn: args:
let let
f = if pkgs.lib.isFunction fn then fn else import fn; 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); in f (auto // args);
callPackage = callPackageWith pkgs; callPackage = callPackageWith pkgs;

View file

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

View file

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

View file

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

View file

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

View file

@ -2,7 +2,8 @@
, haskell, nodejs , haskell, nodejs
, fetchurl, fetchpatch, makeWrapper, writeScriptBin , fetchurl, fetchpatch, makeWrapper, writeScriptBin
# Rust dependecies # Rust dependecies
, rustPlatform, openssl, pkg-config }: , rustPlatform, openssl, pkg-config, Security
}:
let let
fetchElmDeps = import ./fetchElmDeps.nix { inherit stdenv lib fetchurl; }; fetchElmDeps = import ./fetchElmDeps.nix { inherit stdenv lib fetchurl; };
@ -96,7 +97,7 @@ let
elmRustPackages = { elmRustPackages = {
elm-json = import ./packages/elm-json.nix { 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; { meta = with lib; {
description = "Install, upgrade and uninstall Elm dependencies"; 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 { rustPlatform.buildRustPackage rec {
pname = "elm-json"; pname = "elm-json";
version = "0.2.7"; version = "0.2.7";
@ -12,7 +12,7 @@ rustPlatform.buildRustPackage rec {
nativeBuildInputs = [ pkg-config ]; nativeBuildInputs = [ pkg-config ];
buildInputs = [ openssl ]; buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ Security ];
cargoSha256 = "0ylniriq073kpiykamkn9mxdaa6kyiza4pvf7gnfq2h1dvbqa6z7"; cargoSha256 = "0ylniriq073kpiykamkn9mxdaa6kyiza4pvf7gnfq2h1dvbqa6z7";

View file

@ -1,7 +1,7 @@
{ lib, targetPlatform }: { lib, targetPlatform }:
let let
p = targetPlatform.platform.gcc or {} p = targetPlatform.gcc or {}
// targetPlatform.parsed.abi; // targetPlatform.parsed.abi;
in lib.concatLists [ in lib.concatLists [
(lib.optional (!targetPlatform.isx86_64 && p ? arch) "--with-arch=${p.arch}") # --with-arch= is unknown flag on x86_64 (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 let
arch = lib.head (lib.splitString "-" stdenv.system); arch = lib.head (lib.splitString "-" stdenv.system);
march = { march = {
x86_64 = stdenv.hostPlatform.platform.gcc.arch or "x86-64"; x86_64 = stdenv.hostPlatform.gcc.arch or "x86-64";
i686 = "pentium4"; i686 = "pentium4";
aarch64 = "armv8-a"; aarch64 = "armv8-a";
}.${arch} }.${arch}

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -41,7 +41,7 @@ self:
let let
inherit (stdenv) buildPlatform hostPlatform; inherit (stdenv) buildPlatform hostPlatform;
inherit (stdenv.lib) fix' extends makeOverridable; inherit (lib) fix' extends makeOverridable;
inherit (haskellLib) overrideCabal; inherit (haskellLib) overrideCabal;
mkDerivationImpl = pkgs.callPackage ./generic-builder.nix { 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 # 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 # is that nix has no way to "passthrough" args while preserving the reflection
# info that callPackage uses to determine the arguments). # info that callPackage uses to determine the arguments).
drv = if stdenv.lib.isFunction fn then fn else import fn; drv = if lib.isFunction fn then fn else import fn;
auto = builtins.intersectAttrs (stdenv.lib.functionArgs drv) scope; auto = builtins.intersectAttrs (lib.functionArgs drv) scope;
# this wraps the `drv` function to add a `overrideScope` function to the result. # this wraps the `drv` function to add a `overrideScope` function to the result.
drvScope = allArgs: drv allArgs // { drvScope = allArgs: drv allArgs // {
@ -98,7 +98,7 @@ let
# nothing. # nothing.
in callPackageWithScope newScope drv manualArgs; in callPackageWithScope newScope drv manualArgs;
}; };
in stdenv.lib.makeOverridable drvScope (auto // manualArgs); in lib.makeOverridable drvScope (auto // manualArgs);
mkScope = scope: let mkScope = scope: let
ps = pkgs.__splicedPackages; 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 , sbcl, bash, which, perl, nettools
, openssl, glucose, minisat, abc-verifier, z3, python2 , openssl, glucose, minisat, abc-verifier, z3, python2
, certifyBooks ? true , certifyBooks ? true
@ -39,7 +39,7 @@ in stdenv.mkDerivation rec {
buildInputs = [ buildInputs = [
# ACL2 itself only needs a Common Lisp compiler/interpreter: # ACL2 itself only needs a Common Lisp compiler/interpreter:
sbcl sbcl
] ++ stdenv.lib.optionals certifyBooks [ ] ++ lib.optionals certifyBooks [
# To build community books, we need Perl and a couple of utilities: # To build community books, we need Perl and a couple of utilities:
which perl nettools which perl nettools
# Some of the books require one or more of these external tools: # Some of the books require one or more of these external tools:
@ -55,7 +55,7 @@ in stdenv.mkDerivation rec {
preConfigure = '' preConfigure = ''
# When certifying books, ACL2 doesn't like $HOME not existing. # When certifying books, ACL2 doesn't like $HOME not existing.
export HOME=$(pwd)/fake-home export HOME=$(pwd)/fake-home
'' + stdenv.lib.optionalString certifyBooks '' '' + lib.optionalString certifyBooks ''
# Some books also care about $USER being nonempty. # Some books also care about $USER being nonempty.
export USER=nobody export USER=nobody
''; '';
@ -79,7 +79,7 @@ in stdenv.mkDerivation rec {
installPhase = '' installPhase = ''
mkdir -p $out/bin mkdir -p $out/bin
ln -s $out/share/${pname}/saved_acl2 $out/bin/${pname} 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/cert.pl $out/bin/${pname}-cert
ln -s $out/share/${pname}/books/build/clean.pl $out/bin/${pname}-clean 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 rm -rf $out/share/${pname}/books
''; '';
meta = with stdenv.lib; { meta = with lib; {
description = "An interpreter and a prover for a Lisp dialect"; description = "An interpreter and a prover for a Lisp dialect";
longDescription = '' longDescription = ''
ACL2 is a logic and programming language in which you can model computer 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 { stdenv.mkDerivation rec {
pname = "libipasirglucose4"; pname = "libipasirglucose4";
@ -27,7 +27,7 @@ stdenv.mkDerivation rec {
install -D libipasirglucose4.so $out/lib/libipasirglucose4.so 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"; description = "Shared library providing IPASIR interface to the Glucose SAT solver";
license = licenses.mit; license = licenses.mit;
platforms = platforms.unix; platforms = platforms.unix;

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -3,7 +3,7 @@
# - base (default): contains readline and i18n, regexp and syscalls modules # - base (default): contains readline and i18n, regexp and syscalls modules
# by default # by default
# - full: contains base plus modules in withModules # - 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 , libXau, libXt, pcre, zlib, libXpm, xorgproto, libXext
, libffi , libffi
, libffcall , libffcall
@ -16,8 +16,8 @@
"pcre" "pcre"
"rawsock" "rawsock"
] ]
++ stdenv.lib.optionals stdenv.isLinux [ "bindings/glibc" "zlib" "wildcard" ] ++ lib.optionals stdenv.isLinux [ "bindings/glibc" "zlib" "wildcard" ]
++ stdenv.lib.optional x11Support "clx/new-clx" ++ lib.optional x11Support "clx/new-clx"
}: }:
assert x11Support -> (libX11 != null && libXau != null && libXt != null assert x11Support -> (libX11 != null && libXau != null && libXt != null
@ -37,14 +37,14 @@ stdenv.mkDerivation rec {
ffcallAvailable = stdenv.isLinux && (libffcall != null); ffcallAvailable = stdenv.isLinux && (libffcall != null);
buildInputs = [libsigsegv] buildInputs = [libsigsegv]
++ stdenv.lib.optional (gettext != null) gettext ++ lib.optional (gettext != null) gettext
++ stdenv.lib.optional (ncurses != null) ncurses ++ lib.optional (ncurses != null) ncurses
++ stdenv.lib.optional (pcre != null) pcre ++ lib.optional (pcre != null) pcre
++ stdenv.lib.optional (zlib != null) zlib ++ lib.optional (zlib != null) zlib
++ stdenv.lib.optional (readline != null) readline ++ lib.optional (readline != null) readline
++ stdenv.lib.optional (ffcallAvailable && (libffi != null)) libffi ++ lib.optional (ffcallAvailable && (libffi != null)) libffi
++ stdenv.lib.optional ffcallAvailable libffcall ++ lib.optional ffcallAvailable libffcall
++ stdenv.lib.optionals x11Support [ ++ lib.optionals x11Support [
libX11 libXau libXt libXpm xorgproto libXext libX11 libXau libXt libXpm xorgproto libXext
]; ];
@ -68,14 +68,14 @@ stdenv.mkDerivation rec {
''; '';
configureFlags = [ "builddir" ] configureFlags = [ "builddir" ]
++ stdenv.lib.optional (!dllSupport) "--without-dynamic-modules" ++ lib.optional (!dllSupport) "--without-dynamic-modules"
++ stdenv.lib.optional (readline != null) "--with-readline" ++ lib.optional (readline != null) "--with-readline"
# --with-dynamic-ffi can only exist with --with-ffcall - foreign.d does not compile otherwise # --with-dynamic-ffi can only exist with --with-ffcall - foreign.d does not compile otherwise
++ stdenv.lib.optional (ffcallAvailable && (libffi != null)) "--with-dynamic-ffi" ++ lib.optional (ffcallAvailable && (libffi != null)) "--with-dynamic-ffi"
++ stdenv.lib.optional ffcallAvailable "--with-ffcall" ++ lib.optional ffcallAvailable "--with-ffcall"
++ stdenv.lib.optional (!ffcallAvailable) "--without-ffcall" ++ lib.optional (!ffcallAvailable) "--without-ffcall"
++ builtins.map (x: "--with-module=" + x) withModules ++ builtins.map (x: "--with-module=" + x) withModules
++ stdenv.lib.optional threadSupport "--with-threads=POSIX_THREADS"; ++ lib.optional threadSupport "--with-threads=POSIX_THREADS";
preBuild = '' preBuild = ''
sed -e '/avcall.h/a\#include "config.h"' -i src/foreign.d sed -e '/avcall.h/a\#include "config.h"' -i src/foreign.d
@ -83,11 +83,11 @@ stdenv.mkDerivation rec {
''; '';
postInstall = postInstall =
stdenv.lib.optionalString (withModules != []) lib.optionalString (withModules != [])
(''./clisp-link add "$out"/lib/clisp*/base "$(dirname "$out"/lib/clisp*/base)"/full'' (''./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 # TODO : make mod-check fails
doCheck = false; doCheck = false;
@ -95,10 +95,10 @@ stdenv.mkDerivation rec {
meta = { meta = {
description = "ANSI Common Lisp Implementation"; description = "ANSI Common Lisp Implementation";
homepage = "http://clisp.cons.org"; homepage = "http://clisp.cons.org";
maintainers = with stdenv.lib.maintainers; [raskin tohl]; maintainers = with lib.maintainers; [raskin tohl];
platforms = stdenv.lib.platforms.unix; platforms = lib.platforms.unix;
# problems on Darwin: https://github.com/NixOS/nixpkgs/issues/20062 # problems on Darwin: https://github.com/NixOS/nixpkgs/issues/20062
broken = stdenv.hostPlatform.isDarwin || stdenv.hostPlatform.isAarch64; 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 # - base (default): contains readline and i18n, regexp and syscalls modules
# by default # by default
# - full: contains base plus modules in withModules # - 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 , libXau, libXt, pcre, zlib, libXpm, xorgproto, libXext
, libffi, libffcall, automake , libffi, libffcall, automake
, coreutils , coreutils
@ -15,8 +15,8 @@
"pcre" "pcre"
"rawsock" "rawsock"
] ]
++ stdenv.lib.optionals stdenv.isLinux [ "bindings/glibc" "zlib" ] ++ lib.optionals stdenv.isLinux [ "bindings/glibc" "zlib" ]
++ stdenv.lib.optional x11Support "clx/new-clx" ++ lib.optional x11Support "clx/new-clx"
}: }:
assert x11Support -> (libX11 != null && libXau != null && libXt != null assert x11Support -> (libX11 != null && libXau != null && libXt != null
@ -38,14 +38,14 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ automake ]; # sometimes fails otherwise nativeBuildInputs = [ automake ]; # sometimes fails otherwise
buildInputs = [libsigsegv] buildInputs = [libsigsegv]
++ stdenv.lib.optional (gettext != null) gettext ++ lib.optional (gettext != null) gettext
++ stdenv.lib.optional (ncurses != null) ncurses ++ lib.optional (ncurses != null) ncurses
++ stdenv.lib.optional (pcre != null) pcre ++ lib.optional (pcre != null) pcre
++ stdenv.lib.optional (zlib != null) zlib ++ lib.optional (zlib != null) zlib
++ stdenv.lib.optional (readline != null) readline ++ lib.optional (readline != null) readline
++ stdenv.lib.optional (ffcallAvailable && (libffi != null)) libffi ++ lib.optional (ffcallAvailable && (libffi != null)) libffi
++ stdenv.lib.optional ffcallAvailable libffcall ++ lib.optional ffcallAvailable libffcall
++ stdenv.lib.optionals x11Support [ ++ lib.optionals x11Support [
libX11 libXau libXt libXpm xorgproto libXext libX11 libXau libXt libXpm xorgproto libXext
]; ];
@ -63,14 +63,14 @@ stdenv.mkDerivation rec {
''; '';
configureFlags = [ "builddir" ] configureFlags = [ "builddir" ]
++ stdenv.lib.optional (!dllSupport) "--without-dynamic-modules" ++ lib.optional (!dllSupport) "--without-dynamic-modules"
++ stdenv.lib.optional (readline != null) "--with-readline" ++ lib.optional (readline != null) "--with-readline"
# --with-dynamic-ffi can only exist with --with-ffcall - foreign.d does not compile otherwise # --with-dynamic-ffi can only exist with --with-ffcall - foreign.d does not compile otherwise
++ stdenv.lib.optional (ffcallAvailable && (libffi != null)) "--with-dynamic-ffi" ++ lib.optional (ffcallAvailable && (libffi != null)) "--with-dynamic-ffi"
++ stdenv.lib.optional ffcallAvailable "--with-ffcall" ++ lib.optional ffcallAvailable "--with-ffcall"
++ stdenv.lib.optional (!ffcallAvailable) "--without-ffcall" ++ lib.optional (!ffcallAvailable) "--without-ffcall"
++ builtins.map (x: " --with-module=" + x) withModules ++ builtins.map (x: " --with-module=" + x) withModules
++ stdenv.lib.optional threadSupport "--with-threads=POSIX_THREADS"; ++ lib.optional threadSupport "--with-threads=POSIX_THREADS";
preBuild = '' preBuild = ''
sed -e '/avcall.h/a\#include "config.h"' -i src/foreign.d sed -e '/avcall.h/a\#include "config.h"' -i src/foreign.d
@ -79,11 +79,11 @@ stdenv.mkDerivation rec {
''; '';
postInstall = postInstall =
stdenv.lib.optionalString (withModules != []) lib.optionalString (withModules != [])
(''./clisp-link add "$out"/lib/clisp*/base "$(dirname "$out"/lib/clisp*/base)"/full'' (''./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 # TODO : make mod-check fails
doCheck = false; doCheck = false;
@ -91,8 +91,8 @@ stdenv.mkDerivation rec {
meta = { meta = {
description = "ANSI Common Lisp Implementation"; description = "ANSI Common Lisp Implementation";
homepage = "http://clisp.cons.org"; 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 # 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 { stdenv.mkDerivation rec {
pname = "babashka"; pname = "babashka";
version = "0.2.3"; version = "0.2.3";
@ -50,7 +50,7 @@ stdenv.mkDerivation rec {
cp bb $out/bin/bb cp bb $out/bin/bb
''; '';
meta = with stdenv.lib; { meta = with lib; {
description = "A Clojure babushka for the grey areas of Bash"; description = "A Clojure babushka for the grey areas of Bash";
longDescription = '' longDescription = ''
The main idea behind babashka is to leverage Clojure in places where you 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 let version = "0.4.4"; in
@ -25,6 +25,6 @@ stdenv.mkDerivation {
meta = { meta = {
description = "A lightweight IDE for Clojure"; description = "A lightweight IDE for Clojure";
homepage = "https://github.com/arthuredelstein/clooj"; 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 { stdenv.mkDerivation rec {
pname = "clojure"; 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 # See https://github.com/clojure/brew-install/blob/1.10.1/src/main/resources/clojure/install/linux-install.sh
installPhase = installPhase =
let let
binPath = stdenv.lib.makeBinPath [ rlwrap jdk ]; binPath = lib.makeBinPath [ rlwrap jdk ];
in in
'' ''
clojure_lib_dir=$out clojure_lib_dir=$out
@ -47,7 +47,7 @@ stdenv.mkDerivation rec {
-Sverbose \ -Sverbose \
-Scp $out/libexec/clojure-tools-${version}.jar -Scp $out/libexec/clojure-tools-${version}.jar
''; '';
meta = with stdenv.lib; { meta = with lib; {
description = "A Lisp dialect for the JVM"; description = "A Lisp dialect for the JVM";
homepage = "https://clojure.org/"; homepage = "https://clojure.org/";
license = licenses.epl10; license = licenses.epl10;

View file

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

View file

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

View file

@ -1,4 +1,4 @@
{ stdenv, fetchurl }: { lib, stdenv, fetchurl }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "duktape"; pname = "duktape";
@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
''; '';
enableParallelBuilding = true; enableParallelBuilding = true;
meta = with stdenv.lib; { meta = with lib; {
description = "An embeddable Javascript engine, with a focus on portability and compact footprint"; description = "An embeddable Javascript engine, with a focus on portability and compact footprint";
homepage = "https://duktape.org/"; homepage = "https://duktape.org/";
downloadPage = "https://duktape.org/download.html"; 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 let version = "5.0"; in
@ -25,7 +25,7 @@ stdenv.mkDerivation {
doCheck = true; doCheck = true;
checkTarget = "test"; checkTarget = "test";
meta = with stdenv.lib; { meta = with lib; {
homepage = "https://www.eff-lang.org"; homepage = "https://www.eff-lang.org";
description = "A functional programming language based on algebraic effects and their handlers"; description = "A functional programming language based on algebraic effects and their handlers";
longDescription = '' longDescription = ''

View file

@ -1,4 +1,4 @@
{ pkgs, stdenv, fetchFromGitHub, erlang, makeWrapper, { pkgs, lib, stdenv, fetchFromGitHub, erlang, makeWrapper,
coreutils, curl, bash, debugInfo ? false }: coreutils, curl, bash, debugInfo ? false }:
{ baseName ? "elixir" { baseName ? "elixir"
@ -10,7 +10,7 @@
} @ args: } @ args:
let let
inherit (stdenv.lib) getVersion versionAtLeast optional; inherit (lib) getVersion versionAtLeast optional;
in in
assert versionAtLeast (getVersion erlang) minimumOTPVersion; assert versionAtLeast (getVersion erlang) minimumOTPVersion;
@ -46,7 +46,7 @@ in
b=$(basename $f) b=$(basename $f)
if [ "$b" = mix ]; then continue; fi if [ "$b" = mix ]; then continue; fi
wrapProgram $f \ 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 --set CURL_CA_BUNDLE /etc/ssl/certs/ca-certificates.crt
done done
@ -55,7 +55,7 @@ in
''; '';
pos = builtins.unsafeGetAttrPos "sha256" args; pos = builtins.unsafeGetAttrPos "sha256" args;
meta = with stdenv.lib; { meta = with lib; {
homepage = "https://elixir-lang.org/"; homepage = "https://elixir-lang.org/";
description = "A functional, meta-programming aware language built on top of the Erlang VM"; 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 , libxml2, libxslt, ncurses, openssl, perl, autoconf
# TODO: use jdk https://github.com/NixOS/nixpkgs/pull/89731 # TODO: use jdk https://github.com/NixOS/nixpkgs/pull/89731
, openjdk8 ? null # javacSupport , openjdk8 ? null # javacSupport
@ -41,7 +41,7 @@ assert odbcSupport -> unixODBC != null;
assert javacSupport -> openjdk8 != null; assert javacSupport -> openjdk8 != null;
let let
inherit (stdenv.lib) optional optionals optionalAttrs optionalString; inherit (lib) optional optionals optionalAttrs optionalString;
wxPackages2 = if stdenv.isDarwin then [ wxmac ] else wxPackages; wxPackages2 = if stdenv.isDarwin then [ wxmac ] else wxPackages;
in stdenv.mkDerivation ({ in stdenv.mkDerivation ({
@ -106,12 +106,12 @@ in stdenv.mkDerivation ({
# Some erlang bin/ scripts run sed and awk # Some erlang bin/ scripts run sed and awk
postFixup = '' postFixup = ''
wrapProgram $out/lib/erlang/bin/erl --prefix PATH ":" "${gnused}/bin/" 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; setupHook = ./setup-hook.sh;
meta = with stdenv.lib; ({ meta = with lib; ({
homepage = "https://www.erlang.org/"; homepage = "https://www.erlang.org/";
downloadPage = "https://www.erlang.org/download.html"; downloadPage = "https://www.erlang.org/download.html";
description = "Programming language used for massively scalable soft real-time systems"; 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