Merge branch 'staging-next'

Rebuild on Hydra seems OK-ish.
mongodb.nix needed some conflict resolution (scons versions);
all four versions seem to build fine.
This commit is contained in:
Vladimír Čunát 2020-07-25 16:18:40 +02:00
commit 2b7c0dcdaa
No known key found for this signature in database
GPG Key ID: E747DF1F9575A3AA
104 changed files with 1077 additions and 451 deletions

View File

@ -214,15 +214,7 @@ let
# fontconfig default config files # fontconfig default config files
ln -s ${supportPkg.out}/etc/fonts/conf.d/*.conf \ ln -s ${supportPkg.out}/etc/fonts/conf.d/*.conf \
$support_folder/ $support_folder/
ln -s ${latestPkg.out}/etc/fonts/conf.d/*.conf \ # Latest fontconfig is configured to look for the upstream defaults inside the package.
$latest_folder/
# update latest 51-local.conf path to look at the latest local.conf
rm $latest_folder/51-local.conf
substitute ${latestPkg.out}/etc/fonts/conf.d/51-local.conf \
$latest_folder/51-local.conf \
--replace local.conf /etc/fonts/${latestVersion}/local.conf
# 00-nixos-cache.conf # 00-nixos-cache.conf
ln -s ${cacheConfSupport} \ ln -s ${cacheConfSupport} \
@ -236,7 +228,11 @@ let
# 50-user.conf # 50-user.conf
${optionalString (!cfg.includeUserConf) '' ${optionalString (!cfg.includeUserConf) ''
rm $support_folder/50-user.conf rm $support_folder/50-user.conf
rm $latest_folder/50-user.conf ''}
# Since latest fontconfig looks for default files inside the package,
# we had to move this one elsewhere to be able to exclude it here.
${optionalString cfg.includeUserConf ''
ln -s ${latestPkg.out}/etc/fonts/conf.d.bak/50-user.conf $latest_folder/50-user.conf
''} ''}
# local.conf (indirect priority 51) # local.conf (indirect priority 51)

View File

@ -111,8 +111,8 @@ let
copy_bin_and_libs ${pkgs.utillinux}/sbin/blkid copy_bin_and_libs ${pkgs.utillinux}/sbin/blkid
# Copy dmsetup and lvm. # Copy dmsetup and lvm.
copy_bin_and_libs ${pkgs.lvm2}/sbin/dmsetup copy_bin_and_libs ${getBin pkgs.lvm2}/bin/dmsetup
copy_bin_and_libs ${pkgs.lvm2}/sbin/lvm copy_bin_and_libs ${getBin pkgs.lvm2}/bin/lvm
# Add RAID mdadm tool. # Add RAID mdadm tool.
copy_bin_and_libs ${pkgs.mdadm}/sbin/mdadm copy_bin_and_libs ${pkgs.mdadm}/sbin/mdadm
@ -235,7 +235,7 @@ let
--replace cdrom_id ${extraUtils}/bin/cdrom_id \ --replace cdrom_id ${extraUtils}/bin/cdrom_id \
--replace ${pkgs.coreutils}/bin/basename ${extraUtils}/bin/basename \ --replace ${pkgs.coreutils}/bin/basename ${extraUtils}/bin/basename \
--replace ${pkgs.utillinux}/bin/blkid ${extraUtils}/bin/blkid \ --replace ${pkgs.utillinux}/bin/blkid ${extraUtils}/bin/blkid \
--replace ${pkgs.lvm2}/sbin ${extraUtils}/bin \ --replace ${getBin pkgs.lvm2}/bin ${extraUtils}/bin \
--replace ${pkgs.mdadm}/sbin ${extraUtils}/sbin \ --replace ${pkgs.mdadm}/sbin ${extraUtils}/sbin \
--replace ${pkgs.bash}/bin/sh ${extraUtils}/bin/sh \ --replace ${pkgs.bash}/bin/sh ${extraUtils}/bin/sh \
--replace ${udev} ${extraUtils} --replace ${udev} ${extraUtils}

View File

@ -1,17 +1,70 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
with lib; with lib;
let
{ cfg = config.services.lvm;
in {
###### implementation options.services.lvm = {
package = mkOption {
config = mkIf (!config.boot.isContainer) { type = types.package;
default = if cfg.dmeventd.enable then pkgs.lvm2_dmeventd else pkgs.lvm2;
environment.systemPackages = [ pkgs.lvm2 ]; internal = true;
defaultText = "pkgs.lvm2";
services.udev.packages = [ pkgs.lvm2 ]; description = ''
This option allows you to override the LVM package that's used on the system
(udev rules, tmpfiles, systemd services).
Defaults to pkgs.lvm2, or pkgs.lvm2_dmeventd if dmeventd is enabled.
'';
};
dmeventd.enable = mkEnableOption "the LVM dmevent daemon";
boot.thin.enable = mkEnableOption "support for booting from ThinLVs";
}; };
config = mkMerge [
(mkIf (!config.boot.isContainer) {
environment.etc."tmpfiles.d/lvm2.conf".source = "${cfg.package}/lib/tmpfiles.d/lvm2.conf";
environment.systemPackages = [ cfg.package ];
systemd.packages = [ cfg.package ];
# TODO: update once https://github.com/NixOS/nixpkgs/pull/93006 was merged
services.udev.packages = [ cfg.package.out ];
})
(mkIf cfg.dmeventd.enable {
systemd.sockets."dm-event".wantedBy = [ "sockets.target" ];
systemd.services."lvm2-monitor".wantedBy = [ "sysinit.target" ];
environment.etc."lvm/lvm.conf".text = ''
dmeventd/executable = "${cfg.package}/bin/dmeventd"
'';
})
(mkIf cfg.boot.thin.enable {
boot.initrd = {
kernelModules = [ "dm-snapshot" "dm-thin-pool" ];
extraUtilsCommands = ''
copy_bin_and_libs ${pkgs.thin-provisioning-tools}/bin/pdata_tools
copy_bin_and_libs ${pkgs.thin-provisioning-tools}/bin/thin_check
'';
};
environment.etc."lvm/lvm.conf".text = ''
global/thin_check_executable = "${pkgs.thin-provisioning-tools}/bin/thin_check"
'';
})
(mkIf (cfg.dmeventd.enable || cfg.boot.thin.enable) {
boot.initrd.preLVMCommands = ''
mkdir -p /etc/lvm
cat << EOF >> /etc/lvm/lvm.conf
${optionalString cfg.boot.thin.enable ''
global/thin_check_executable = "$(command -v thin_check)"
''}
${optionalString cfg.dmeventd.enable ''
dmeventd/executable = "$(command -v false)"
activation/monitoring = 0
''}
EOF
'';
})
];
} }

View File

@ -64,7 +64,7 @@ let
# a test script fragment `createPartitions', which must create # a test script fragment `createPartitions', which must create
# partitions and filesystems. # partitions and filesystems.
testScriptFun = { bootLoader, createPartitions, grubVersion, grubDevice, grubUseEfi testScriptFun = { bootLoader, createPartitions, grubVersion, grubDevice, grubUseEfi
, grubIdentifier, preBootCommands, extraConfig , grubIdentifier, preBootCommands, postBootCommands, extraConfig
, testSpecialisationConfig , testSpecialisationConfig
}: }:
let iface = if grubVersion == 1 then "ide" else "virtio"; let iface = if grubVersion == 1 then "ide" else "virtio";
@ -216,6 +216,7 @@ let
machine = create_machine_named("boot-after-rebuild-switch") machine = create_machine_named("boot-after-rebuild-switch")
${preBootCommands} ${preBootCommands}
machine.wait_for_unit("network.target") machine.wait_for_unit("network.target")
${postBootCommands}
machine.shutdown() machine.shutdown()
# Tests for validating clone configuration entries in grub menu # Tests for validating clone configuration entries in grub menu
@ -238,6 +239,7 @@ let
with subtest("Set grub to boot the second configuration"): with subtest("Set grub to boot the second configuration"):
machine.succeed("grub-reboot 1") machine.succeed("grub-reboot 1")
${postBootCommands}
machine.shutdown() machine.shutdown()
# Reboot Machine # Reboot Machine
@ -252,12 +254,13 @@ let
with subtest("We should find a file named /etc/gitconfig"): with subtest("We should find a file named /etc/gitconfig"):
machine.succeed("test -e /etc/gitconfig") machine.succeed("test -e /etc/gitconfig")
${postBootCommands}
machine.shutdown() machine.shutdown()
''; '';
makeInstallerTest = name: makeInstallerTest = name:
{ createPartitions, preBootCommands ? "", extraConfig ? "" { createPartitions, preBootCommands ? "", postBootCommands ? "", extraConfig ? ""
, extraInstallerConfig ? {} , extraInstallerConfig ? {}
, bootLoader ? "grub" # either "grub" or "systemd-boot" , bootLoader ? "grub" # either "grub" or "systemd-boot"
, grubVersion ? 2, grubDevice ? "/dev/vda", grubIdentifier ? "uuid", grubUseEfi ? false , grubVersion ? 2, grubDevice ? "/dev/vda", grubIdentifier ? "uuid", grubUseEfi ? false
@ -335,7 +338,7 @@ let
}; };
testScript = testScriptFun { testScript = testScriptFun {
inherit bootLoader createPartitions preBootCommands inherit bootLoader createPartitions preBootCommands postBootCommands
grubVersion grubDevice grubIdentifier grubUseEfi extraConfig grubVersion grubDevice grubIdentifier grubUseEfi extraConfig
testSpecialisationConfig; testSpecialisationConfig;
}; };
@ -552,16 +555,26 @@ in {
+ " mkpart primary 2048M -1s" # PV2 + " mkpart primary 2048M -1s" # PV2
+ " set 2 lvm on", + " set 2 lvm on",
"udevadm settle", "udevadm settle",
"sleep 1",
"pvcreate /dev/vda1 /dev/vda2", "pvcreate /dev/vda1 /dev/vda2",
"sleep 1",
"vgcreate MyVolGroup /dev/vda1 /dev/vda2", "vgcreate MyVolGroup /dev/vda1 /dev/vda2",
"sleep 1",
"lvcreate --size 1G --name swap MyVolGroup", "lvcreate --size 1G --name swap MyVolGroup",
"sleep 1",
"lvcreate --size 2G --name nixos MyVolGroup", "lvcreate --size 2G --name nixos MyVolGroup",
"sleep 1",
"mkswap -f /dev/MyVolGroup/swap -L swap", "mkswap -f /dev/MyVolGroup/swap -L swap",
"swapon -L swap", "swapon -L swap",
"mkfs.xfs -L nixos /dev/MyVolGroup/nixos", "mkfs.xfs -L nixos /dev/MyVolGroup/nixos",
"mount LABEL=nixos /mnt", "mount LABEL=nixos /mnt",
) )
''; '';
postBootCommands = ''
assert "loaded active" in machine.succeed(
"systemctl list-units 'lvm2-pvscan@*' -ql --no-legend | tee /dev/stderr"
)
'';
}; };
# Boot off an encrypted root partition with the default LUKS header format # Boot off an encrypted root partition with the default LUKS header format

View File

@ -104,6 +104,11 @@ import ./make-test-python.nix ({ pkgs, ... }: {
re.search(r"^Filesystem state: *clean$", extinfo, re.MULTILINE) is not None re.search(r"^Filesystem state: *clean$", extinfo, re.MULTILINE) is not None
), ("File system was not cleanly unmounted: " + extinfo) ), ("File system was not cleanly unmounted: " + extinfo)
# Regression test for https://github.com/NixOS/nixpkgs/pull/91232
with subtest("setting transient hostnames works"):
machine.succeed("hostnamectl set-hostname --transient machine-transient")
machine.fail("hostnamectl set-hostname machine-all")
with subtest("systemd-shutdown works"): with subtest("systemd-shutdown works"):
machine.shutdown() machine.shutdown()
machine.wait_for_unit("multi-user.target") machine.wait_for_unit("multi-user.target")

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, pkgconfig, scons, qt4, lash, libjack2, jack ? libjack2 }: { stdenv, fetchurl, pkgconfig, sconsPackages, qt4, lash, libjack2, jack ? libjack2 }:
stdenv.mkDerivation { stdenv.mkDerivation {
name = "jackmix-0.5.2"; name = "jackmix-0.5.2";
@ -9,7 +9,7 @@ stdenv.mkDerivation {
patches = [ ./no_error.patch ]; patches = [ ./no_error.patch ];
nativeBuildInputs = [ scons.py2 pkgconfig ]; nativeBuildInputs = [ sconsPackages.scons_3_1_2 pkgconfig ];
buildInputs = [ buildInputs = [
qt4 qt4
lash lash

View File

@ -3,7 +3,7 @@
, libid3tag, libmad, libopus, libshout, libsndfile, libusb1, libvorbis , libid3tag, libmad, libopus, libshout, libsndfile, libusb1, libvorbis
, libGLU, libxcb, lilv, lv2, opusfile , libGLU, libxcb, lilv, lv2, opusfile
, pkgconfig, portaudio, portmidi, protobuf, qtbase, qtscript, qtsvg , pkgconfig, portaudio, portmidi, protobuf, qtbase, qtscript, qtsvg
, qtx11extras, rubberband, scons, sqlite, taglib, upower, vamp-plugin-sdk , qtx11extras, rubberband, sconsPackages, sqlite, taglib, upower, vamp-plugin-sdk
}: }:
let let
@ -28,7 +28,7 @@ mkDerivation rec {
sha256 = "1dj9li8av9b2kbm76jvvbdmihy1pyrw0s4xd7dd524wfhwr1llxr"; sha256 = "1dj9li8av9b2kbm76jvvbdmihy1pyrw0s4xd7dd524wfhwr1llxr";
}; };
nativeBuildInputs = [ scons.py2 ]; nativeBuildInputs = [ sconsPackages.scons_3_1_2 ];
buildInputs = [ buildInputs = [
chromaprint fftw flac faad2 glibcLocales mp4v2 libid3tag libmad libopus libshout241 libsndfile chromaprint fftw flac faad2 glibcLocales mp4v2 libid3tag libmad libopus libshout241 libsndfile
libusb1 libvorbis libxcb libGLU lilv lv2 opusfile pkgconfig portaudio portmidi protobuf qtbase qtscript qtsvg libusb1 libvorbis libxcb libGLU lilv lv2 opusfile pkgconfig portaudio portmidi protobuf qtbase qtscript qtsvg

View File

@ -1,4 +1,4 @@
{ stdenv, lib, pkgconfig, fetchFromGitHub, scons { stdenv, lib, pkgconfig, fetchFromGitHub, sconsPackages
, python, glibmm, libpulseaudio, libao }: , python, glibmm, libpulseaudio, libao }:
let let
@ -15,7 +15,7 @@ in stdenv.mkDerivation {
}; };
nativeBuildInputs = [ nativeBuildInputs = [
scons.py2 pkgconfig sconsPackages.scons_3_1_2 pkgconfig
]; ];
buildInputs = [ buildInputs = [

View File

@ -1,12 +1,12 @@
{ lib, fetchFromGitHub }: { lib, fetchFromGitHub }:
rec { rec {
version = "8.2.0701"; version = "8.2.1123";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "vim"; owner = "vim";
repo = "vim"; repo = "vim";
rev = "v${version}"; rev = "v${version}";
sha256 = "1cbh2nhbvhp4kclc9fd8gqij2vi11c5zwdwn1nzg805k06hwmsrp"; sha256 = "01fgfm5pnmbq12z84d7g3x0iq5gj1irdyihx41c4r2bww55v5q0c";
}; };
enableParallelBuilding = true; enableParallelBuilding = true;

View File

@ -34,8 +34,6 @@ stdenv.mkDerivation rec {
"-DUSE_KWALLET=OFF" "-DUSE_KWALLET=OFF"
]; ];
# Doc has high risk of collisions
postInstall = "rm -r $out/share/doc";
# darktable changed its rpath handling in commit # darktable changed its rpath handling in commit
# 83c70b876af6484506901e6b381304ae0d073d3c and as a result the # 83c70b876af6484506901e6b381304ae0d073d3c and as a result the

View File

@ -18,7 +18,7 @@
, openal , openal
, openssl , openssl
, racket , racket
, scons , sconsPackages
, zlib , zlib
}: }:
let let
@ -69,7 +69,7 @@ stdenv.mkDerivation rec {
openssl.dev openssl.dev
racket racket
]; ];
nativeBuildInputs = [ scons.py2 ]; nativeBuildInputs = [ sconsPackages.scons_3_1_2 ];
patches = [ ./fix-build.patch ]; patches = [ ./fix-build.patch ];
sconsFlags = [ sconsFlags = [

View File

@ -8,7 +8,7 @@
, yasm, libGLU, libGL, sqlite, unzip, makeWrapper , yasm, libGLU, libGL, sqlite, unzip, makeWrapper
, hunspell, libXdamage, libevent, libstartup_notification , hunspell, libXdamage, libevent, libstartup_notification
, libvpx, libvpx_1_8 , libvpx, libvpx_1_8
, icu, libpng, jemalloc, glib , icu, icu67, libpng, jemalloc, glib
, autoconf213, which, gnused, cargo, rustc, llvmPackages , autoconf213, which, gnused, cargo, rustc, llvmPackages
, rust-cbindgen, nodejs, nasm, fetchpatch , rust-cbindgen, nodejs, nasm, fetchpatch
, debugBuild ? false , debugBuild ? false
@ -111,7 +111,7 @@ stdenv.mkDerivation ({
xorg.libXScrnSaver xorg.xorgproto xorg.libXScrnSaver xorg.xorgproto
xorg.libXext unzip makeWrapper xorg.libXext unzip makeWrapper
libevent libstartup_notification /* cairo */ libevent libstartup_notification /* cairo */
icu libpng jemalloc glib libpng jemalloc glib
nasm nasm
# >= 66 requires nasm for the AV1 lib dav1d # >= 66 requires nasm for the AV1 lib dav1d
# yasm can potentially be removed in future versions # yasm can potentially be removed in future versions
@ -119,8 +119,10 @@ stdenv.mkDerivation ({
# https://groups.google.com/forum/#!msg/mozilla.dev.platform/o-8levmLU80/SM_zQvfzCQAJ # https://groups.google.com/forum/#!msg/mozilla.dev.platform/o-8levmLU80/SM_zQvfzCQAJ
nspr nss nspr nss
] ]
++ lib.optionals (lib.versionOlder ffversion "75") [ libvpx sqlite ] ++ lib.optionals (lib.versionOlder ffversion "75") [ libvpx sqlite ]
++ lib.optional (lib.versionAtLeast ffversion "75.0") libvpx_1_8 ++ lib.optional (lib.versionAtLeast ffversion "75.0") libvpx_1_8
++ lib.optional (lib.versionOlder ffversion "78") icu
++ lib.optional (lib.versionAtLeast ffversion "78.0") icu67
++ lib.optional alsaSupport alsaLib ++ lib.optional alsaSupport alsaLib
++ lib.optional pulseaudioSupport libpulseaudio # only headers are needed ++ lib.optional pulseaudioSupport libpulseaudio # only headers are needed
++ lib.optional gtk3Support gtk3 ++ lib.optional gtk3Support gtk3
@ -200,7 +202,6 @@ stdenv.mkDerivation ({
"--enable-application=browser" "--enable-application=browser"
"--with-system-jpeg" "--with-system-jpeg"
"--with-system-zlib" "--with-system-zlib"
"--with-system-bz2"
"--with-system-libevent" "--with-system-libevent"
"--with-system-libvpx" "--with-system-libvpx"
"--with-system-png" # needs APNG support "--with-system-png" # needs APNG support
@ -208,19 +209,21 @@ stdenv.mkDerivation ({
"--enable-system-ffi" "--enable-system-ffi"
"--enable-system-pixman" "--enable-system-pixman"
#"--enable-system-cairo" #"--enable-system-cairo"
"--enable-startup-notification"
#"--enable-content-sandbox" # TODO: probably enable after 54
"--disable-tests" "--disable-tests"
"--disable-necko-wifi" # maybe we want to enable this at some point "--disable-necko-wifi" # maybe we want to enable this at some point
"--disable-updater" "--disable-updater"
"--enable-jemalloc" "--enable-jemalloc"
"--disable-gconf"
"--enable-default-toolkit=${default-toolkit}" "--enable-default-toolkit=${default-toolkit}"
"--with-libclang-path=${llvmPackages.libclang}/lib" "--with-libclang-path=${llvmPackages.libclang}/lib"
"--with-clang-path=${llvmPackages.clang}/bin/clang" "--with-clang-path=${llvmPackages.clang}/bin/clang"
"--with-system-nspr" "--with-system-nspr"
"--with-system-nss" "--with-system-nss"
] ]
++ lib.optionals (lib.versionOlder ffversion "78") [
"--with-system-bz2"
"--enable-startup-notification"
"--disable-gconf"
]
++ lib.optional (lib.versionOlder ffversion "75") "--enable-system-sqlite" ++ lib.optional (lib.versionOlder ffversion "75") "--enable-system-sqlite"
++ lib.optional (stdenv.isDarwin) "--disable-xcode-checks" ++ lib.optional (stdenv.isDarwin) "--disable-xcode-checks"
++ lib.optionals (lib.versionOlder ffversion "69") [ ++ lib.optionals (lib.versionOlder ffversion "69") [

View File

@ -1,4 +1,4 @@
{ config, stdenv, lib, callPackage, fetchurl }: { config, stdenv, lib, callPackage, fetchurl, nss_3_44 }:
let let
common = opts: callPackage (import ./common.nix opts) {}; common = opts: callPackage (import ./common.nix opts) {};
@ -7,10 +7,10 @@ in
rec { rec {
firefox = common rec { firefox = common rec {
pname = "firefox"; pname = "firefox";
ffversion = "77.0.1"; ffversion = "78.0.1";
src = fetchurl { src = fetchurl {
url = "mirror://mozilla/firefox/releases/${ffversion}/source/firefox-${ffversion}.source.tar.xz"; url = "mirror://mozilla/firefox/releases/${ffversion}/source/firefox-${ffversion}.source.tar.xz";
sha512 = "ngLihC0YuclLJEV3iPEX+tRzDKIdBe+CCOuFxvWNo7DnX8royOvTj2m4YyWyZoTQ5UCbPTQYmP4otgfovZSe8g=="; sha512 = "mdO6masIpiZBvYi6kpYUTSnsOda04CUs2CL1LNf1Yad+rfY4ga4aFuLtfKqfgV5IcIIl86XeiC+0grd4irbCYg==";
}; };
patches = [ patches = [
@ -33,7 +33,7 @@ rec {
}; };
}; };
firefox-esr-68 = common rec { firefox-esr-68 = (common rec {
pname = "firefox-esr"; pname = "firefox-esr";
ffversion = "68.10.0esr"; ffversion = "68.10.0esr";
src = fetchurl { src = fetchurl {
@ -53,5 +53,11 @@ rec {
versionSuffix = "esr"; versionSuffix = "esr";
versionKey = "ffversion"; versionKey = "ffversion";
}; };
}).override {
# Mozilla unfortunately doesn't support building with latest NSS anymore;
# instead they provide ESR releases for NSS:
# https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/NSS_Releases
nss = nss_3_44;
}; };
} }

View File

@ -1,4 +1,4 @@
{ mkDerivation, stdenv, fetchurl, pkgconfig, qttools, scons { mkDerivation, stdenv, fetchurl, pkgconfig, qttools, sconsPackages
, GConf, avahi, boost, hunspell, libXScrnSaver, libedit, libidn, libnatpmp, libxml2 , GConf, avahi, boost, hunspell, libXScrnSaver, libedit, libidn, libnatpmp, libxml2
, lua, miniupnpc, openssl, qtbase, qtmultimedia, qtsvg, qtwebkit, qtx11extras, zlib , lua, miniupnpc, openssl, qtbase, qtmultimedia, qtsvg, qtwebkit, qtx11extras, zlib
}: }:
@ -14,7 +14,7 @@ mkDerivation rec {
patches = [ ./qt-5.11.patch ./scons.patch ]; patches = [ ./qt-5.11.patch ./scons.patch ];
nativeBuildInputs = [ pkgconfig qttools scons.py2 ]; nativeBuildInputs = [ pkgconfig qttools sconsPackages.scons_3_1_2 ];
buildInputs = [ buildInputs = [
GConf avahi boost hunspell libXScrnSaver libedit libidn libnatpmp libxml2 GConf avahi boost hunspell libXScrnSaver libedit libidn libnatpmp libxml2

View File

@ -57,9 +57,6 @@ in stdenv.mkDerivation {
++ lib.optionals enableQt [ qt5.wrapQtAppsHook ] ++ lib.optionals enableQt [ qt5.wrapQtAppsHook ]
; ;
# Doc has high risk of collisions
postInstall = "rm -r $out/share/doc";
buildInputs = [ buildInputs = [
openssl openssl
curl curl

View File

@ -6,12 +6,12 @@
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
version = "1.3.50"; version = "1.3.51";
pname = "flrig"; pname = "flrig";
src = fetchurl { src = fetchurl {
url = "mirror://sourceforge/fldigi/${pname}-${version}.tar.gz"; url = "mirror://sourceforge/fldigi/${pname}-${version}.tar.gz";
sha256 = "0fzrknzzi8kmzmrcfpc8rxr7v4a4ny6z6z5q5qwh95sp2kn2qzp9"; sha256 = "0aq4x0ai9q08ypfhzfj2inc4z3q39zq1l6h9as1kil9yn4zbay61";
}; };
buildInputs = [ buildInputs = [

View File

@ -74,6 +74,7 @@ let
ccForHost="${stdenv.cc}/bin/${stdenv.cc.targetPrefix}cc"; ccForHost="${stdenv.cc}/bin/${stdenv.cc.targetPrefix}cc";
cxxForHost="${stdenv.cc}/bin/${stdenv.cc.targetPrefix}c++"; cxxForHost="${stdenv.cc}/bin/${stdenv.cc.targetPrefix}c++";
releaseDir = "target/${rustTarget}/${buildType}"; releaseDir = "target/${rustTarget}/${buildType}";
tmpDir = "${releaseDir}-tmp";
# Specify the stdenv's `diff` by abspath to ensure that the user's build # Specify the stdenv's `diff` by abspath to ensure that the user's build
# inputs do not cause us to find the wrong `diff`. # inputs do not cause us to find the wrong `diff`.
@ -193,13 +194,15 @@ stdenv.mkDerivation (args // {
# This needs to be done after postBuild: packages like `cargo` do a pushd/popd in # This needs to be done after postBuild: packages like `cargo` do a pushd/popd in
# the pre/postBuild-hooks that need to be taken into account before gathering # the pre/postBuild-hooks that need to be taken into account before gathering
# all binaries to install. # all binaries to install.
bins=$(find $releaseDir \ mkdir -p $tmpDir
cp -r $releaseDir/* $tmpDir/
bins=$(find $tmpDir \
-maxdepth 1 \ -maxdepth 1 \
-type f \ -type f \
-executable ! \( -regex ".*\.\(so.[0-9.]+\|so\|a\|dylib\)" \)) -executable ! \( -regex ".*\.\(so.[0-9.]+\|so\|a\|dylib\)" \))
''; '';
installCheckPhase = args.checkPhase or (let checkPhase = args.checkPhase or (let
argstr = "${stdenv.lib.optionalString (checkType == "release") "--release"} --target ${rustTarget} --frozen"; argstr = "${stdenv.lib.optionalString (checkType == "release") "--release"} --target ${rustTarget} --frozen";
in '' in ''
${stdenv.lib.optionalString (buildAndTestSubdir != null) "pushd ${buildAndTestSubdir}"} ${stdenv.lib.optionalString (buildAndTestSubdir != null) "pushd ${buildAndTestSubdir}"}
@ -214,13 +217,13 @@ stdenv.mkDerivation (args // {
strictDeps = true; strictDeps = true;
inherit releaseDir; inherit releaseDir tmpDir;
installPhase = args.installPhase or '' installPhase = args.installPhase or ''
runHook preInstall runHook preInstall
# rename the output dir to a architecture independent one # rename the output dir to a architecture independent one
mapfile -t targets < <(find "$NIX_BUILD_TOP" -type d | grep '${releaseDir}$') mapfile -t targets < <(find "$NIX_BUILD_TOP" -type d | grep '${tmpDir}$')
for target in "''${targets[@]}"; do for target in "''${targets[@]}"; do
rm -rf "$target/../../${buildType}" rm -rf "$target/../../${buildType}"
ln -srf "$target" "$target/../../" ln -srf "$target" "$target/../../"
@ -228,7 +231,7 @@ stdenv.mkDerivation (args // {
mkdir -p $out/bin $out/lib mkdir -p $out/bin $out/lib
xargs -r cp -t $out/bin <<< $bins xargs -r cp -t $out/bin <<< $bins
find $releaseDir \ find $tmpDir \
-maxdepth 1 \ -maxdepth 1 \
-regex ".*\.\(so.[0-9.]+\|so\|a\|dylib\)" \ -regex ".*\.\(so.[0-9.]+\|so\|a\|dylib\)" \
-print0 | xargs -r -0 cp -t $out/lib -print0 | xargs -r -0 cp -t $out/lib

View File

@ -31,11 +31,11 @@ in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "go"; pname = "go";
version = "1.14.4"; version = "1.14.6";
src = fetchurl { src = fetchurl {
url = "https://dl.google.com/go/go${version}.src.tar.gz"; url = "https://dl.google.com/go/go${version}.src.tar.gz";
sha256 = "1105qk2l4kfy1ki9n9gh8j4gfqrfgfwapa1fp38hih9aphxsy4bh"; sha256 = "02acr52bxfjlr3m11576gdwn8hjv1pr2pffcis913m0m31w9vz3k";
}; };
# perl is used for testing go vet # perl is used for testing go vet

View File

@ -0,0 +1,42 @@
# New rust versions should first go to staging.
# Things to check after updating:
# 1. Rustc should produce rust binaries on x86_64-linux, aarch64-linux and x86_64-darwin:
# i.e. nix-shell -p fd or @GrahamcOfBorg build fd on github
# This testing can be also done by other volunteers as part of the pull
# request review, in case platforms cannot be covered.
# 2. The LLVM version used for building should match with rust upstream.
# 3. Firefox and Thunderbird should still build on x86_64-linux.
{ stdenv, lib
, buildPackages
, newScope, callPackage
, CoreFoundation, Security
, llvmPackages_5
, pkgsBuildTarget, pkgsBuildBuild
} @ args:
import ./default.nix {
rustcVersion = "1.45.0";
rustcSha256 = "0z6dh0yd3fcm3qh960wi4s6fa6pxz9mh77psycsqfkkx5kqra15s";
# Note: the version MUST be one version prior to the version we're
# building
bootstrapVersion = "1.44.1";
# fetch hashes by running `print-hashes.sh 1.45.0`
bootstrapHashes = {
i686-unknown-linux-gnu = "e69689b0a1b66599cf83e7dd54f839419007e44376195e93e301a3175da3d854";
x86_64-unknown-linux-gnu = "a41df89a461a580536aeb42755e43037556fba2e527dd13a1e1bb0749de28202";
arm-unknown-linux-gnueabihf = "ea18ccdfb62a153c2d43d013fdec56993cc9267f1cdc6f3834df8a2b9b468f08";
armv7-unknown-linux-gnueabihf = "d44294732cf268ea84908f1135f574ab9489132a332eaa9d5bda547374b15d54";
aarch64-unknown-linux-gnu = "a2d74ebeec0b6778026b6c37814cdc91d14db3b0d8b6d69d036216f4d9cf7e49";
x86_64-apple-darwin = "a5464e7bcbce9647607904a4afa8362382f1fc55d39e7bbaf4483ac00eb5d56a";
};
selectRustPackage = pkgs: pkgs.rust_1_45;
rustcPatches = [
];
}
(builtins.removeAttrs args [ "fetchpatch" ])

View File

@ -16,6 +16,11 @@ rustPlatform.buildRustPackage rec {
# As of 1.0.0 and rustc 1.30 rustfmt requires a nightly compiler # As of 1.0.0 and rustc 1.30 rustfmt requires a nightly compiler
RUSTC_BOOTSTRAP = 1; RUSTC_BOOTSTRAP = 1;
# As of rustc 1.45.0, these env vars are required to build rustfmt (due to
# https://github.com/rust-lang/rust/pull/72001)
CFG_RELEASE = "${rustPlatform.rust.rustc.version}-nightly";
CFG_RELEASE_CHANNEL = "nightly";
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "A tool for formatting Rust code according to style guidelines"; description = "A tool for formatting Rust code according to style guidelines";
homepage = "https://github.com/rust-lang-nursery/rustfmt"; homepage = "https://github.com/rust-lang-nursery/rustfmt";

View File

@ -123,8 +123,8 @@ in rec {
}; };
vala_0_48 = generic { vala_0_48 = generic {
version = "0.48.1"; version = "0.48.7";
sha256 = "1m3igqlryj1161ymksy7666v7mp9l6gy0yfi4cvgd3wh1963jmzb"; sha256 = "0lswkb7gj0chas9n3l3dbrm9l71hs77adhvm2v600id2ipi37pi8";
}; };
vala = vala_0_48; vala = vala_0_48;

View File

@ -81,10 +81,10 @@ in {
sourceVersion = { sourceVersion = {
major = "3"; major = "3";
minor = "6"; minor = "6";
patch = "10"; patch = "11";
suffix = ""; suffix = "";
}; };
sha256 = "1pj0mz1xl27khi250p29c0y99vxg662js8zp71aprkf8i8wkr0qa"; sha256 = "dB69y8Tjk3pf8jUX3UVev31UPqn+9vXPb0blddbE/aQ=";
inherit (darwin) configd; inherit (darwin) configd;
inherit passthruFun; inherit passthruFun;
}; };
@ -94,10 +94,10 @@ in {
sourceVersion = { sourceVersion = {
major = "3"; major = "3";
minor = "7"; minor = "7";
patch = "7"; patch = "8";
suffix = ""; suffix = "";
}; };
sha256 = "0di1y2cna823qgk6sd2lvpjdm3g2qikdd50i2bjd330dpzqsk806"; sha256 = "Q6VDQEs2PwA3+J34R48Z2y28DW8//uMQvCmX+nGFSmM=";
inherit (darwin) configd; inherit (darwin) configd;
inherit passthruFun; inherit passthruFun;
}; };

View File

@ -116,7 +116,7 @@ let
# https://github.com/ruby/ruby/commit/97a5af62a318fcd93a4e5e4428d576c0280ddbae # https://github.com/ruby/ruby/commit/97a5af62a318fcd93a4e5e4428d576c0280ddbae
buildFlags = lib.optionals atLeast27 [ "REVISION_LATEST=0" ]; buildFlags = lib.optionals atLeast27 [ "REVISION_LATEST=0" ];
configureFlags = ["--enable-shared" "--enable-pthread" "--with-soname=ruby_${tag}"] configureFlags = ["--enable-shared" "--enable-pthread" "--with-soname=ruby-${version}"]
++ op useRailsExpress "--with-baseruby=${baseruby}/bin/ruby" ++ op useRailsExpress "--with-baseruby=${baseruby}/bin/ruby"
++ op (!docSupport) "--disable-install-doc" ++ op (!docSupport) "--disable-install-doc"
++ ops stdenv.isDarwin [ ++ ops stdenv.isDarwin [

View File

@ -96,7 +96,7 @@ in stdenv.mkDerivation rec {
"-DARROW_WITH_SNAPPY=ON" "-DARROW_WITH_SNAPPY=ON"
"-DARROW_WITH_ZLIB=ON" "-DARROW_WITH_ZLIB=ON"
"-DARROW_WITH_ZSTD=ON" "-DARROW_WITH_ZSTD=ON"
"-DARROW_ZSTD_USE_SHARED=OFF" # TODO use shared zstd once #91984 hits the master "-DARROW_ZSTD_USE_SHARED=${if enableShared then "ON" else "OFF"}"
# Parquet options: # Parquet options:
"-DARROW_PARQUET=ON" "-DARROW_PARQUET=ON"
"-DPARQUET_BUILD_EXECUTABLES=ON" "-DPARQUET_BUILD_EXECUTABLES=ON"

View File

@ -20,11 +20,11 @@ assert enableSystemd -> systemd != null;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "dbus"; pname = "dbus";
version = "1.12.18"; version = "1.12.20";
src = fetchurl { src = fetchurl {
url = "https://dbus.freedesktop.org/releases/dbus/dbus-${version}.tar.gz"; url = "https://dbus.freedesktop.org/releases/dbus/dbus-${version}.tar.gz";
sha256 = "01jkm6shm76bl3cflmnn37dv6nkph0w1akbqpklyac02hiq4vkv4"; sha256 = "1zp5gpx61v1cpqf2zwb1cidhp9xylvw49d3zydkxqk6b1qa20xpp";
}; };
patches = lib.optional stdenv.isSunOS ./implement-getgrouplist.patch; patches = lib.optional stdenv.isSunOS ./implement-getgrouplist.patch;

View File

@ -1,17 +1,22 @@
commit 05c6adf8104b4321d3a3716a7b9feb6bf223ed0c (HEAD, nixpkgs) From 2ff9b53ce755be183ef9274f7dd3f9ac537173f6 Mon Sep 17 00:00:00 2001
Author: Vladimír Čunát <vcunat@gmail.com> From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= <vcunat@gmail.com>
Date: Tue Nov 4 12:24:25 2014 +0100 Date: Tue, 4 Nov 2014 12:24:25 +0100
Subject: [PATCH] add check for /etc/fonts/@configVersion@/fonts.conf
add check for /etc/fonts/@configVersion@/fonts.conf It's checked between FONTCONFIG_FILE and the in-package etc/fonts/fonts.conf.
The latter is used so that on non-NixOS distributions, fontconfig works at least
It's checked between FONTCONFIG_FILE and the usual /etc/fonts/fonts.conf. with upstream defaults, even when the global config is incompatible.
Also, hardcode /etc/fonts/fonts.conf to prevent accidental override.
Co-Authored-By: Jan Tojnar <jtojnar@gmail.com>
---
src/fccfg.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/fccfg.c b/src/fccfg.c diff --git a/src/fccfg.c b/src/fccfg.c
index 6377fd7..e9eb10a 100644 index 342c996..98a1324 100644
--- a/src/fccfg.c --- a/src/fccfg.c
+++ b/src/fccfg.c +++ b/src/fccfg.c
@@ -2070,8 +2070,13 @@ FcConfigFilename (const FcChar8 *url) @@ -2391,8 +2391,13 @@ FcConfigGetFilename (FcConfig *config,
if (!url || !*url) if (!url || !*url)
{ {
url = (FcChar8 *) getenv ("FONTCONFIG_FILE"); url = (FcChar8 *) getenv ("FONTCONFIG_FILE");
@ -22,7 +27,10 @@ index 6377fd7..e9eb10a 100644
+ } + }
if (!url) if (!url)
- url = (FcChar8 *) FONTCONFIG_FILE; - url = (FcChar8 *) FONTCONFIG_FILE;
+ url = (FcChar8 *) "/etc/fonts/fonts.conf"; + url = (FcChar8 *) FONTCONFIG_PATH "/" FONTCONFIG_FILE;
} }
file = 0; file = 0;
--
2.26.2

View File

@ -1,12 +1,22 @@
{ stdenv, substituteAll, fetchurl { stdenv
, pkgconfig, freetype, expat, libxslt, gperf, dejavu_fonts , fetchpatch
, substituteAll
, fetchurl
, pkg-config
, freetype
, expat
, libxslt
, gperf
, dejavu_fonts
, autoreconfHook
}: }:
/** Font configuration scheme /** Font configuration scheme
- ./config-compat.patch makes fontconfig try the following root configs, in order: - ./config-compat.patch makes fontconfig try the following root configs, in order:
$FONTCONFIG_FILE, /etc/fonts/${configVersion}/fonts.conf, /etc/fonts/fonts.conf $FONTCONFIG_FILE, /etc/fonts/${configVersion}/fonts.conf, ${fontconfig.out}/etc/fonts/fonts.conf
This is done not to override config of pre-2.11 versions (which just blow up) This is done not to override config of pre-2.11 versions (which just blow up)
and still use *global* font configuration at both NixOS or non-NixOS. and still use *global* font configuration at NixOS,
falling back to upstream defaults on non-NixOS.
- NixOS creates /etc/fonts/${configVersion}/fonts.conf link to $out/etc/fonts/fonts.conf, - NixOS creates /etc/fonts/${configVersion}/fonts.conf link to $out/etc/fonts/fonts.conf,
and other modifications should go to /etc/fonts/${configVersion}/conf.d and other modifications should go to /etc/fonts/${configVersion}/conf.d
- See ./make-fonts-conf.xsl for config details. - See ./make-fonts-conf.xsl for config details.
@ -18,11 +28,11 @@ let
in in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "fontconfig"; pname = "fontconfig";
version = "2.12.6"; version = "2.13.92";
src = fetchurl { src = fetchurl {
url = "http://fontconfig.org/release/${pname}-${version}.tar.bz2"; url = "http://fontconfig.org/release/${pname}-${version}.tar.xz";
sha256 = "05zh65zni11kgnhg726gjbrd55swspdvhqbcnj5a5xh8gn03036g"; sha256 = "0kkfsvxcvcphm9zcgsh646gix3qn4spz555wa1jp5hbq70l62vjh";
}; };
patches = [ patches = [
@ -31,15 +41,56 @@ stdenv.mkDerivation rec {
inherit configVersion; inherit configVersion;
}) })
# Fix fonts not being loaded when missing included configs that have ignore_missing="yes".
# https://bugzilla.redhat.com/show_bug.cgi?id=1744377
(fetchpatch {
url = "https://gitlab.freedesktop.org/fontconfig/fontconfig/commit/fcada522913e5e07efa6367eff87ace9f06d24c8.patch";
sha256 = "1jbm3vw45b3qjnqrh2545v1k8vmb29c09v2wj07jnrq3lnchbvmn";
})
# Register JoyPixels as an emoji font.
# https://gitlab.freedesktop.org/fontconfig/fontconfig/merge_requests/67 # https://gitlab.freedesktop.org/fontconfig/fontconfig/merge_requests/67
./fix-joypixels.patch (fetchpatch {
url = "https://gitlab.freedesktop.org/fontconfig/fontconfig/commit/65087ac7ce4cc5f2109967c1380b474955dcb590.patch";
sha256 = "1dkrbqx1c1d8yfnx0igvv516wanw2ksrpm3fbpm2h9nw0hccwqvm";
})
# Fix invalid DTD in reset-dirs.
# https://gitlab.freedesktop.org/fontconfig/fontconfig/merge_requests/78
(fetchpatch {
url = "https://gitlab.freedesktop.org/fontconfig/fontconfig/commit/a4aa66a858f1ecd375c5efe5916398281f73f794.patch";
sha256 = "1j4ky8jhpllfm1lh2if34xglh2hl79nsa0xxgzxpj9sx6h4v99j5";
})
# Do not include its tags, they are external now and only cause warnings with old fontconfig clients.
# https://gitlab.freedesktop.org/fontconfig/fontconfig/merge_requests/97
(fetchpatch {
url = "https://gitlab.freedesktop.org/fontconfig/fontconfig/commit/528b17b2837c3b102acd90cc7548d07bacaccb1f.patch";
sha256 = "1zf4wcd2xlprh805jalfy8ja5c2qzgkh4fwd1m9d638nl9gx932m";
})
# https://gitlab.freedesktop.org/fontconfig/fontconfig/merge_requests/100
(fetchpatch {
url = "https://gitlab.freedesktop.org/fontconfig/fontconfig/commit/37c7c748740bf6f2468d59e67951902710240b34.patch";
sha256 = "1rz5zrfwhpn9g49wrzzrmdglj78pbvpnw8ksgsw6bxq8l5d84jfr";
})
]; ];
outputs = [ "bin" "dev" "lib" "out" ]; # $out contains all the config outputs = [ "bin" "dev" "lib" "out" ]; # $out contains all the config
propagatedBuildInputs = [ freetype ]; nativeBuildInputs = [
nativeBuildInputs = [ pkgconfig gperf libxslt ]; gperf
buildInputs = [ expat ]; libxslt
pkg-config
autoreconfHook
];
buildInputs = [
expat
];
propagatedBuildInputs = [
freetype
];
configureFlags = [ configureFlags = [
"--with-arch=${stdenv.hostPlatform.parsed.cpu.name}" "--with-arch=${stdenv.hostPlatform.parsed.cpu.name}"
@ -61,11 +112,20 @@ stdenv.mkDerivation rec {
postInstall = '' postInstall = ''
cd "$out/etc/fonts" cd "$out/etc/fonts"
xsltproc --stringparam fontDirectories "${dejavu_fonts.minimal}" \ xsltproc --stringparam fontDirectories "${dejavu_fonts.minimal}" \
--stringparam fontconfig "$out" \
--stringparam fontconfigConfigVersion "${configVersion}" \ --stringparam fontconfigConfigVersion "${configVersion}" \
--path $out/share/xml/fontconfig \ --path $out/share/xml/fontconfig \
${./make-fonts-conf.xsl} $out/etc/fonts/fonts.conf \ ${./make-fonts-conf.xsl} $out/etc/fonts/fonts.conf \
> fonts.conf.tmp > fonts.conf.tmp
mv fonts.conf.tmp $out/etc/fonts/fonts.conf mv fonts.conf.tmp $out/etc/fonts/fonts.conf
# Make it easier to remove user config in NixOS module.
mkdir -p $out/etc/fonts/conf.d.bak
mv $out/etc/fonts/conf.d/50-user.conf $out/etc/fonts/conf.d.bak
# update latest 51-local.conf path to look at the latest local.conf
substituteInPlace $out/etc/fonts/conf.d/51-local.conf \
--replace local.conf /etc/fonts/${configVersion}/local.conf
''; '';
passthru = { passthru = {

View File

@ -1,23 +0,0 @@
--- a/conf.d/45-generic.conf
+++ b/conf.d/45-generic.conf
@@ -5,6 +5,10 @@
<!-- Emoji -->
+ <alias binding="same">
+ <family>JoyPixels</family>
+ <default><family>emoji</family></default>
+ </alias>
<alias binding="same">
<family>Emoji Two</family>
<default><family>emoji</family></default>
--- a/conf.d/60-generic.conf
+++ b/conf.d/60-generic.conf
@@ -29,6 +29,7 @@
<alias binding="same">
<family>emoji</family>
<prefer>
+ <family>JoyPixels</family>
<family>Emoji Two</family>
<family>Emoji One</family>
<!-- System fonts -->

View File

@ -31,6 +31,9 @@
<!-- versioned system-wide config --> <!-- versioned system-wide config -->
<include ignore_missing="yes">/etc/fonts/<xsl:value-of select="$fontconfigConfigVersion" />/conf.d</include> <include ignore_missing="yes">/etc/fonts/<xsl:value-of select="$fontconfigConfigVersion" />/conf.d</include>
<!-- upstream config -->
<include><xsl:value-of select="$fontconfig" />/etc/fonts/conf.d</include>
<dir prefix="xdg">fonts</dir> <dir prefix="xdg">fonts</dir>
<xsl:for-each select="str:tokenize($fontDirectories)"> <xsl:for-each select="str:tokenize($fontDirectories)">
<dir><xsl:value-of select="." /></dir> <dir><xsl:value-of select="." /></dir>
@ -40,6 +43,11 @@
<!-- nix user profile --> <!-- nix user profile -->
<dir>~/.nix-profile/lib/X11/fonts</dir> <dir>~/.nix-profile/lib/X11/fonts</dir>
<dir>~/.nix-profile/share/fonts</dir> <dir>~/.nix-profile/share/fonts</dir>
<!-- FHS paths for non-NixOS platforms -->
<dir>/usr/share/fonts</dir>
<dir>/usr/local/share/fonts</dir>
<!-- nix default profile --> <!-- nix default profile -->
<dir>/nix/var/nix/profiles/default/lib/X11/fonts</dir> <dir>/nix/var/nix/profiles/default/lib/X11/fonts</dir>
<dir>/nix/var/nix/profiles/default/share/fonts</dir> <dir>/nix/var/nix/profiles/default/share/fonts</dir>

View File

@ -1,5 +1,7 @@
{ stdenv, fetchurl { stdenv, fetchurl, fetchpatch
, pkgconfig , autoconf
, automake
, pkg-config
, zlib , zlib
, libpng , libpng
, libjpeg ? null , libjpeg ? null
@ -20,11 +22,24 @@ stdenv.mkDerivation rec {
}; };
hardeningDisable = [ "format" ]; hardeningDisable = [ "format" ];
patches = [
# Fixes an issue where some other packages would fail to build
# their documentation with an error like:
# "Error: Problem doing text layout"
#
# Can be removed if Wayland can still be built successfully with
# documentation.
(fetchpatch {
url = "https://github.com/libgd/libgd/commit/3dd0e308cbd2c24fde2fc9e9b707181252a2de95.patch";
excludes = [ "tests/gdimagestringft/.gitignore" ];
sha256 = "12iqlanl9czig9d7c3rvizrigw2iacimnmimfcny392dv9iazhl1";
})
];
# -pthread gets passed to clang, causing warnings # -pthread gets passed to clang, causing warnings
configureFlags = stdenv.lib.optional stdenv.isDarwin "--enable-werror=no"; configureFlags = stdenv.lib.optional stdenv.isDarwin "--enable-werror=no";
nativeBuildInputs = [ pkgconfig ]; nativeBuildInputs = [ autoconf automake pkg-config ];
buildInputs = [ zlib fontconfig freetype ]; buildInputs = [ zlib fontconfig freetype ];
propagatedBuildInputs = [ libpng libjpeg libwebp libtiff libXpm ]; propagatedBuildInputs = [ libpng libjpeg libwebp libtiff libXpm ];

View File

@ -48,11 +48,11 @@ in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "glib"; pname = "glib";
version = "2.64.3"; version = "2.64.4";
src = fetchurl { src = fetchurl {
url = "mirror://gnome/sources/glib/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; url = "mirror://gnome/sources/glib/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
sha256 = "08pbgiv5m3rica4ydvwvpq5mrxbyswx7l1jzjc2ch52xjabvr77y"; sha256 = "0l6fggcgdnjif9kzy4crq7520f43bbrgzxz0c821ya3jn8jv7q7p";
}; };
patches = optionals stdenv.isDarwin [ patches = optionals stdenv.isDarwin [

View File

@ -14,22 +14,15 @@ in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "gpgme"; pname = "gpgme";
version = "1.13.1"; version = "1.14.0";
src = fetchurl { src = fetchurl {
url = "mirror://gnupg/gpgme/${pname}-${version}.tar.bz2"; url = "mirror://gnupg/gpgme/${pname}-${version}.tar.bz2";
sha256 = "0imyjfryvvjdbai454p70zcr95m94j9xnzywrlilqdw2fqi0pqy4"; sha256 = "01s3rlspykbm9vmi5rfbdm3d20ip6yni69r48idqzlmhlq8ggwff";
}; };
patches = [ patches = [
# Fix tests with gnupg > 2.2.19 (fetchpatch { # gpg: Send --with-keygrip when listing keys
# https://dev.gnupg.org/T4820
(fetchpatch {
name = "cff600f1f65a2164ab25ff2b039cba008776ce62.patch";
url = "http://git.gnupg.org/cgi-bin/gitweb.cgi?p=gpgme.git;a=patch;h=cff600f1f65a2164ab25ff2b039cba008776ce62";
sha256 = "0ds3pvcws37q4hr4g5iwg2b98fj6whvhhcbm9c8f1kgp7dlpdw7n";
})
(fetchpatch {
name = "c4cf527ea227edb468a84bf9b8ce996807bd6992.patch"; name = "c4cf527ea227edb468a84bf9b8ce996807bd6992.patch";
url = "http://git.gnupg.org/cgi-bin/gitweb.cgi?p=gpgme.git;a=patch;h=c4cf527ea227edb468a84bf9b8ce996807bd6992"; url = "http://git.gnupg.org/cgi-bin/gitweb.cgi?p=gpgme.git;a=patch;h=c4cf527ea227edb468a84bf9b8ce996807bd6992";
sha256 = "0y0b0lb2nq5p9kx13b59b2jaz157mvflliw1qdvg1v1hynvgb8m4"; sha256 = "0y0b0lb2nq5p9kx13b59b2jaz157mvflliw1qdvg1v1hynvgb8m4";
@ -79,6 +72,7 @@ stdenv.mkDerivation rec {
meta = with stdenv.lib; { meta = with stdenv.lib; {
homepage = "https://gnupg.org/software/gpgme/index.html"; homepage = "https://gnupg.org/software/gpgme/index.html";
changelog = "https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gpgme.git;a=blob;f=NEWS;hb=refs/tags/gpgme-${version}";
description = "Library for making GnuPG easier to use"; description = "Library for making GnuPG easier to use";
longDescription = '' longDescription = ''
GnuPG Made Easy (GPGME) is a library designed to make access to GnuPG GnuPG Made Easy (GPGME) is a library designed to make access to GnuPG

View File

@ -16,13 +16,13 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "gssdp"; pname = "gssdp";
version = "1.2.2"; version = "1.2.3";
outputs = [ "out" "bin" "dev" "devdoc" ]; outputs = [ "out" "bin" "dev" "devdoc" ];
src = fetchurl { src = fetchurl {
url = "mirror://gnome/sources/gssdp/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; url = "mirror://gnome/sources/gssdp/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
sha256 = "195hi10vrsvh6i927mm6rm1ld5sxah3h5sr3bsjm90vb8lxrxfya"; sha256 = "1s57i8a8wnnxnsfl27cq4503dkdlzbrhry5zpg23sfqfffvdqqx2";
}; };
nativeBuildInputs = [ nativeBuildInputs = [

View File

@ -48,7 +48,7 @@ with stdenv.lib;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "gtk+3"; pname = "gtk+3";
version = "3.24.20"; version = "3.24.21";
outputs = [ "out" "dev" ] ++ optional withGtkDoc "devdoc"; outputs = [ "out" "dev" ] ++ optional withGtkDoc "devdoc";
outputBin = "dev"; outputBin = "dev";
@ -60,7 +60,7 @@ stdenv.mkDerivation rec {
src = fetchurl { src = fetchurl {
url = "mirror://gnome/sources/gtk+/${stdenv.lib.versions.majorMinor version}/gtk+-${version}.tar.xz"; url = "mirror://gnome/sources/gtk+/${stdenv.lib.versions.majorMinor version}/gtk+-${version}.tar.xz";
sha256 = "1wqxkd3xnqwihcawncp9mkf9bv5a5fg5i4ahm6klpl782vvnkb1d"; sha256 = "0llgq2adzn9p3bfq9rv2dhscmvzs35jp3glrfvy3vs1mrpknmsmf";
}; };
patches = [ patches = [

View File

@ -1,24 +1,24 @@
{ stdenv, fetchurl, fetchpatch, autoconf }: { stdenv, fetchurl, fetchpatch, cmake }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "json-c-0.13.1"; name = "json-c-0.14";
src = fetchurl { src = fetchurl {
url = "https://s3.amazonaws.com/json-c_releases/releases/${name}-nodoc.tar.gz"; url = "https://s3.amazonaws.com/json-c_releases/releases/${name}-nodoc.tar.gz";
sha256 = "0ch1v18wk703bpbyzj7h1mkwvsw4rw4qdwvgykscypvqq10678ll"; sha256 = "1yia8417qljmczs9w3rn4c4i2p2iywq098pgrj11s81599j4x4cr";
}; };
patches = [ patches = [
# https://nvd.nist.gov/vuln/detail/CVE-2020-12762 # https://nvd.nist.gov/vuln/detail/CVE-2020-12762
(fetchpatch { (fetchpatch {
name = "CVE-2020-12762.patch"; name = "CVE-2020-12762.patch";
url = "https://github.com/json-c/json-c/commit/865b5a65199973bb63dff8e47a2f57e04fec9736.patch"; url = "https://github.com/json-c/json-c/commit/5d6fa331418d49f1bd488553fd1cfa9ab023fabb.patch";
sha256 = "1g5afk4khhm1sb70xrva1pyznshcw3ipzp1g5z60dpzxy303pp6h"; sha256 = "0aar7kgbycqxnhh0lrr61adfbb903nbapalhs5i6h8anxwy1ylcm";
}) })
]; ];
outputs = [ "out" "dev" ]; outputs = [ "out" "dev" ];
nativeBuildInputs = [ autoconf ]; # for autoheader nativeBuildInputs = [ cmake ];
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "A JSON implementation in C"; description = "A JSON implementation in C";

View File

@ -1,11 +1,11 @@
{ stdenv, fetchurl, libtiff, libjpeg, zlib }: { stdenv, fetchurl, libtiff, libjpeg, zlib }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "lcms2-2.10"; name = "lcms2-2.11";
src = fetchurl { src = fetchurl {
url = "mirror://sourceforge/lcms/${name}.tar.gz"; url = "mirror://sourceforge/lcms/${name}.tar.gz";
sha256 = "0ipkw2r8h3yhm4vn5nx04dz5s943x9fw023fhrrnjz2c97yi3m2h"; sha256 = "0bkpf315925lhmd9i4mzjnkq5dh255r1lms0c0vzzkfpwk4bjjfw";
}; };
outputs = [ "bin" "dev" "out" ]; outputs = [ "bin" "dev" "out" ];

View File

@ -17,18 +17,17 @@ Signed-off-by: Jörg Thalheim <joerg@thalheim.io>
2 files changed, 7 insertions(+), 1 deletion(-) 2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/meson.build b/meson.build diff --git a/meson.build b/meson.build
index e292554a..64607139 100644 --- meson.build.orig 2020-06-18 11:13:57.716321962 +0200
--- a/meson.build +++ meson.build 2020-06-18 11:19:50.456861311 +0200
+++ b/meson.build @@ -45,7 +45,7 @@
@@ -327,7 +327,7 @@ pkg.generate( cc = meson.get_compiler('c')
)
symbols_check = find_program('symbols-check.py')
env_test = environment() -prog_nm = find_program('nm')
-env_test.set('NM', find_program('nm').path()) +prog_nm = find_program(get_option('nm-path'))
+env_test.set('NM', find_program(get_option('nm-path')).path())
# Check for atomics
if with_libkms intel_atomics = false
subdir('libkms')
diff --git a/meson_options.txt b/meson_options.txt diff --git a/meson_options.txt b/meson_options.txt
index 8af33f1c..b4f46a52 100644 index 8af33f1c..b4f46a52 100644
--- a/meson_options.txt --- a/meson_options.txt

View File

@ -4,11 +4,11 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "libdrm"; pname = "libdrm";
version = "2.4.100"; version = "2.4.102";
src = fetchurl { src = fetchurl {
url = "https://dri.freedesktop.org/${pname}/${pname}-${version}.tar.bz2"; url = "https://dri.freedesktop.org/${pname}/${pname}-${version}.tar.xz";
sha256 = "0p8a1l3a3s40i81mawm8nhrbk7p97ss05qkawp1yx73c30lchz67"; sha256 = "0nx0bd9dhymdsd99v4ifib77yjirkvkxf5hzdkbr7qr8dhrzkjwb";
}; };
outputs = [ "out" "dev" "bin" ]; outputs = [ "out" "dev" "bin" ];

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, python3 }: { stdenv, fetchurl, fetchpatch, python3 }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "libevdev"; pname = "libevdev";
@ -9,6 +9,15 @@ stdenv.mkDerivation rec {
sha256 = "17pb5375njb1r05xmk0r57a2j986ihglh2n5nqcylbag4rj8mqg7"; sha256 = "17pb5375njb1r05xmk0r57a2j986ihglh2n5nqcylbag4rj8mqg7";
}; };
patches = [
# Fix libevdev-python tests on aarch64
# https://gitlab.freedesktop.org/libevdev/libevdev/merge_requests/63
(fetchpatch {
url = "https://gitlab.freedesktop.org/libevdev/libevdev/commit/66113fe84f62bab3a672a336eb10b255d2aa5ce7.patch";
sha256 = "gZKr/P+/OqU69IGslP8CQlcGuyzA/ulcm+nGwHdis58=";
})
];
nativeBuildInputs = [ python3 ]; nativeBuildInputs = [ python3 ];
meta = with stdenv.lib; { meta = with stdenv.lib; {

View File

@ -6,11 +6,11 @@ assert sslSupport -> openssl != null;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "libevent"; pname = "libevent";
version = "2.1.11"; version = "2.1.12";
src = fetchurl { src = fetchurl {
url = "https://github.com/libevent/libevent/releases/download/release-${version}-stable/libevent-${version}-stable.tar.gz"; url = "https://github.com/libevent/libevent/releases/download/release-${version}-stable/libevent-${version}-stable.tar.gz";
sha256 = "0g988zqm45sj1hlhhz4il5z4dpi5dl74hzjwzl4md37a09iaqnx6"; sha256 = "1fq30imk8zd26x8066di3kpc5zyfc5z6frr3zll685zcx4dxxrlj";
}; };
# libevent_openssl is moved into its own output, so that openssl isn't present # libevent_openssl is moved into its own output, so that openssl isn't present

View File

@ -6,11 +6,11 @@ assert enableCapabilities -> stdenv.isLinux;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "libgcrypt"; pname = "libgcrypt";
version = "1.8.5"; version = "1.8.6";
src = fetchurl { src = fetchurl {
url = "mirror://gnupg/libgcrypt/${pname}-${version}.tar.bz2"; url = "mirror://gnupg/libgcrypt/${pname}-${version}.tar.bz2";
sha256 = "1hvsazms1bfd769q0ngl0r9g5i4m9mpz9jmvvrdzyzk3rfa2ljiv"; sha256 = "0xdrsxgqw5v7szshjdgdv60rgpvzzaqic32ahqrzr6bvc402gfhc";
}; };
outputs = [ "out" "dev" "info" ]; outputs = [ "out" "dev" "info" ];

View File

@ -27,11 +27,11 @@ in
with stdenv.lib; with stdenv.lib;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "libinput"; pname = "libinput";
version = "1.15.5"; version = "1.15.6";
src = fetchurl { src = fetchurl {
url = "https://www.freedesktop.org/software/libinput/${pname}-${version}.tar.xz"; url = "https://www.freedesktop.org/software/libinput/${pname}-${version}.tar.xz";
sha256 = "15ww4jl3lcxyi8m8idg8canklbqv729gnwpkz7r98c1w8a7zq3m9"; sha256 = "073z61dw46cyq0635a5n1mw7hw4qdgr58gbwwb3ds5v3d8hymvdf";
}; };
outputs = [ "bin" "out" "dev" ]; outputs = [ "bin" "out" "dev" ];
@ -47,10 +47,23 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ pkgconfig meson ninja ] nativeBuildInputs = [ pkgconfig meson ninja ]
++ optionals documentationSupport [ doxygen graphviz sphinx-build ]; ++ optionals documentationSupport [ doxygen graphviz sphinx-build ];
buildInputs = [ libevdev mtdev libwacom ] buildInputs = [
libevdev
mtdev
libwacom
(python3.withPackages (pp: with pp; [
pp.libevdev # already in scope
pyudev
pyyaml
setuptools
]))
]
++ optionals eventGUISupport [ cairo glib gtk3 ]; ++ optionals eventGUISupport [ cairo glib gtk3 ];
checkInputs = [ (python3.withPackages (pkgs: with pkgs; [ evdev ])) check valgrind ]; checkInputs = [
check
valgrind
];
propagatedBuildInputs = [ udev ]; propagatedBuildInputs = [ udev ];
@ -60,6 +73,7 @@ stdenv.mkDerivation rec {
patchShebangs tools/helper-copy-and-exec-from-tmp.sh patchShebangs tools/helper-copy-and-exec-from-tmp.sh
patchShebangs test/symbols-leak-test patchShebangs test/symbols-leak-test
patchShebangs test/check-leftover-udev-rules.sh patchShebangs test/check-leftover-udev-rules.sh
patchShebangs test/helper-copy-and-exec-from-tmp.sh
''; '';
doCheck = testsSupport && stdenv.hostPlatform == stdenv.buildPlatform; doCheck = testsSupport && stdenv.hostPlatform == stdenv.buildPlatform;

View File

@ -1,23 +1,33 @@
{ stdenv, fetchurl, pkgconfig, glib, python3, systemd, libgudev }: { stdenv
, fetchurl
, pkg-config
, gobject-introspection
, glib
, python3
, systemd
, libgudev
}:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "libmbim"; pname = "libmbim";
version = "1.23.900"; version = "1.24.0";
src = fetchurl { src = fetchurl {
url = "https://www.freedesktop.org/software/libmbim/${pname}-${version}.tar.xz"; url = "https://www.freedesktop.org/software/libmbim/${pname}-${version}.tar.xz";
sha256 = "0ikzjs44q44cj4m786gvm575a7x61rgmav6b60n2y74pgqvj3791"; sha256 = "15hi1vq327drgi6h4dsi74lb7wg0sxd7mipa3irh5zgc7gn5qj9x";
}; };
outputs = [ "out" "dev" "man" ]; outputs = [ "out" "dev" "man" ];
configureFlags = [ configureFlags = [
"--with-udev-base-dir=${placeholder "out"}/lib/udev" "--with-udev-base-dir=${placeholder "out"}/lib/udev"
"--enable-introspection"
]; ];
nativeBuildInputs = [ nativeBuildInputs = [
pkgconfig pkg-config
python3 python3
gobject-introspection
]; ];
buildInputs = [ buildInputs = [

View File

@ -2,11 +2,11 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "libqmi"; pname = "libqmi";
version = "1.25.900"; version = "1.26.0";
src = fetchurl { src = fetchurl {
url = "https://www.freedesktop.org/software/libqmi/${pname}-${version}.tar.xz"; url = "https://www.freedesktop.org/software/libqmi/${pname}-${version}.tar.xz";
sha256 = "0a96f4ab7qy4szwzqs8ir2mvsnpqzk7zsiv6zahlhpf0jhp1vxf7"; sha256 = "0h3fzmjlla7ib9wn4rv98bm40y2k28jcl29da4hjwyaqmvh2j13z";
}; };
outputs = [ "out" "dev" "devdoc" ]; outputs = [ "out" "dev" "devdoc" ];

View File

@ -4,14 +4,14 @@
let let
pname = "librsvg"; pname = "librsvg";
version = "2.48.7"; version = "2.48.8";
in in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "${pname}-${version}"; name = "${pname}-${version}";
src = fetchurl { src = fetchurl {
url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${name}.tar.xz"; url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${name}.tar.xz";
sha256 = "1h7yw9bszsi174lkq8ig15p1rll7fqafx72jligxiz32wa9mvpim"; sha256 = "14i6xzghcidv64cyd3g0wdjbl82rph737yxn9s3x29nzpcjs707l";
}; };
outputs = [ "out" "dev" "installedTests" ]; outputs = [ "out" "dev" "installedTests" ];

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, pkgconfig, json_c, hidapi }: { stdenv, fetchurl, fetchpatch, pkgconfig, json_c, hidapi }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "libu2f-host"; pname = "libu2f-host";
@ -9,6 +9,15 @@ stdenv.mkDerivation rec {
sha256 = "0vrivl1dwql6nfi48z6dy56fwy2z13d7abgahgrs2mcmqng7hra2"; sha256 = "0vrivl1dwql6nfi48z6dy56fwy2z13d7abgahgrs2mcmqng7hra2";
}; };
patches = [
# remove after updating to next release
(fetchpatch {
name = "json-c-0.14-support.patch";
url = "https://github.com/Yubico/libu2f-host/commit/840f01135d2892f45e71b9e90405de587991bd03.patch";
sha256 = "0xplx394ppsbsb4h4l8b9m4dv9shbl0zyck3y26vbm9i1g981ki7";
})
];
nativeBuildInputs = [ pkgconfig ]; nativeBuildInputs = [ pkgconfig ];
buildInputs = [ json_c hidapi ]; buildInputs = [ json_c hidapi ];

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, pkgconfig, json_c, openssl, check, file, help2man, which, gengetopt }: { stdenv, fetchurl, fetchpatch, pkgconfig, json_c, openssl, check, file, help2man, which, gengetopt }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "libu2f-server-1.1.0"; name = "libu2f-server-1.1.0";
@ -7,6 +7,15 @@ stdenv.mkDerivation rec {
sha256 = "0xx296nmmqa57w0v5p2kasl5zr1ms2gh6qi4lhv6xvzbmjp3rkcd"; sha256 = "0xx296nmmqa57w0v5p2kasl5zr1ms2gh6qi4lhv6xvzbmjp3rkcd";
}; };
patches = [
# remove after updating to next release
(fetchpatch {
name = "json-c-0.14-support.patch";
url = "https://github.com/Yubico/libu2f-server/commit/f7c4983b31909299c47bf9b2627c84b6bfe225de.patch";
sha256 = "10q66w3paii1yhfdmjskpip078fk9p3sjllbqx1yx71qbjki55b0";
})
];
nativeBuildInputs = [ pkgconfig ]; nativeBuildInputs = [ pkgconfig ];
buildInputs = [ json_c openssl check file help2man which gengetopt ]; buildInputs = [ json_c openssl check file help2man which gengetopt ];

View File

@ -1,14 +1,14 @@
{ stdenv, lib, fetchFromGitHub, autoconf, automake, libtool, pkgconfig, ApplicationServices, CoreServices }: { stdenv, lib, fetchFromGitHub, autoconf, automake, libtool, pkgconfig, ApplicationServices, CoreServices }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
version = "1.38.0"; version = "1.38.1";
pname = "libuv"; pname = "libuv";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = pname; owner = pname;
repo = pname; repo = pname;
rev = "v${version}"; rev = "v${version}";
sha256 = "04598jglikma5plfiprnw4pcxwp7b6aqxphxs65pdd5xira6dz0s"; sha256 = "0cvabjhi53qw94zyjkqamx0c607ayydfb4f3djx2gj8ab2p7s29n";
}; };
postPatch = let postPatch = let

View File

@ -2,7 +2,7 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "libwacom"; pname = "libwacom";
version = "1.3"; version = "1.4.1";
outputs = [ "out" "dev" ]; outputs = [ "out" "dev" ];
@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
owner = "linuxwacom"; owner = "linuxwacom";
repo = "libwacom"; repo = "libwacom";
rev = "libwacom-${version}"; rev = "libwacom-${version}";
sha256 = "12g8jb67wj6sgg9ar2w8kkw1m1431rn9nd0j64qkrd3vy9g4l0hk"; sha256 = "0m96zjj832l18rzg9l31ambm6rv9vnh2a1sfk8531da8m347z287";
}; };
nativeBuildInputs = [ pkgconfig meson ninja doxygen ]; nativeBuildInputs = [ pkgconfig meson ninja doxygen ];

View File

@ -31,7 +31,7 @@ with stdenv.lib;
let let
# Release calendar: https://www.mesa3d.org/release-calendar.html # Release calendar: https://www.mesa3d.org/release-calendar.html
# Release frequency: https://www.mesa3d.org/releasing.html#schedule # Release frequency: https://www.mesa3d.org/releasing.html#schedule
version = "20.0.8"; # Update only to the final (last planned) release (i.e. X.Y.MAX)? version = "20.1.3";
branch = versions.major version; branch = versions.major version;
in in
@ -46,7 +46,7 @@ stdenv.mkDerivation {
"ftp://ftp.freedesktop.org/pub/mesa/${version}/mesa-${version}.tar.xz" "ftp://ftp.freedesktop.org/pub/mesa/${version}/mesa-${version}.tar.xz"
"ftp://ftp.freedesktop.org/pub/mesa/older-versions/${branch}.x/${version}/mesa-${version}.tar.xz" "ftp://ftp.freedesktop.org/pub/mesa/older-versions/${branch}.x/${version}/mesa-${version}.tar.xz"
]; ];
sha256 = "6cf0c010df89680f9b2bc6432ff01400031795e39bceda7535fa00af06740b6c"; sha256 = "1w9b6sl82a3birmpgzn1xx6biggpvynr4hmyzxvj30pfdgabhwlq";
}; };
prePatch = "patchShebangs ."; prePatch = "patchShebangs .";

View File

@ -2,7 +2,7 @@
, CoreServices ? null , CoreServices ? null
, buildPackages }: , buildPackages }:
let version = "4.25"; in let version = "4.26"; in
stdenv.mkDerivation { stdenv.mkDerivation {
pname = "nspr"; pname = "nspr";
@ -10,7 +10,7 @@ stdenv.mkDerivation {
src = fetchurl { src = fetchurl {
url = "mirror://mozilla/nspr/releases/v${version}/src/nspr-${version}.tar.gz"; url = "mirror://mozilla/nspr/releases/v${version}/src/nspr-${version}.tar.gz";
sha256 = "0mjjk2b7ika3v4y99cnaqz3z1iq1a50r1psn9i3s87gr46z0khqb"; sha256 = "0gbp3g9p4nhf0zrlvqi5883sqb9zdw0wk83lccpgskxphlni97gw";
}; };
patches = [ patches = [

View File

@ -0,0 +1,144 @@
{ stdenv, fetchurl, nspr, perl, zlib, sqlite, fixDarwinDylibNames, buildPackages }:
let
nssPEM = fetchurl {
url = "http://dev.gentoo.org/~polynomial-c/mozilla/nss-3.15.4-pem-support-20140109.patch.xz";
sha256 = "10ibz6y0hknac15zr6dw4gv9nb5r5z9ym6gq18j3xqx7v7n3vpdw";
};
version = "3.44.4";
underscoreVersion = builtins.replaceStrings ["."] ["_"] version;
in stdenv.mkDerivation rec {
pname = "nss";
inherit version;
src = fetchurl {
url = "mirror://mozilla/security/nss/releases/NSS_${underscoreVersion}_RTM/src/${pname}-${version}.tar.gz";
sha256 = "7ec1a52e20fd9a23e1907eeba8f4f2ecd619dac5d20fa023ec5b4faa1843e847";
};
depsBuildBuild = [ buildPackages.stdenv.cc ];
nativeBuildInputs = [ perl ];
buildInputs = [ zlib sqlite ]
++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames;
propagatedBuildInputs = [ nspr ];
prePatch = ''
xz -d < ${nssPEM} | patch -p1
'';
patches =
[
# Based on http://patch-tracker.debian.org/patch/series/dl/nss/2:3.15.4-1/85_security_load.patch
./85_security_load-3.44.patch
./ckpem.patch
];
patchFlags = [ "-p0" ];
postPatch = stdenv.lib.optionalString stdenv.isDarwin ''
substituteInPlace nss/coreconf/Darwin.mk --replace '@executable_path/$(notdir $@)' "$out/lib/\$(notdir \$@)"
'';
outputs = [ "out" "dev" "tools" ];
preConfigure = "cd nss";
makeFlags = let
# NSS's build systems expects aarch32 to be called arm; if we pass in armv6l/armv7l, it
# fails with a linker error
cpu = if stdenv.hostPlatform.isAarch32 then "arm" else stdenv.hostPlatform.parsed.cpu.name;
in [
"NSPR_INCLUDE_DIR=${nspr.dev}/include"
"NSPR_LIB_DIR=${nspr.out}/lib"
"NSDISTMODE=copy"
"BUILD_OPT=1"
"SOURCE_PREFIX=\$(out)"
"NSS_ENABLE_ECC=1"
"USE_SYSTEM_ZLIB=1"
"NSS_USE_SYSTEM_SQLITE=1"
"NATIVE_CC=${buildPackages.stdenv.cc}/bin/cc"
] ++ stdenv.lib.optionals (!stdenv.isDarwin) [
# Pass in CPU even if we're not cross compiling, because otherwise it tries to guess with
# uname, which can be wrong if e.g. we're compiling for aarch32 on aarch64
"OS_TEST=${cpu}"
"CPU_ARCH=${cpu}"
] ++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) [
"CROSS_COMPILE=1"
"NSS_DISABLE_GTESTS=1" # don't want to build tests when cross-compiling
] ++ stdenv.lib.optional stdenv.is64bit "USE_64=1"
++ stdenv.lib.optional stdenv.isDarwin "CCC=clang++";
NIX_CFLAGS_COMPILE = "-Wno-error";
# TODO(@oxij): investigate this: `make -n check` works but `make
# check` fails with "no rule", same for "installcheck".
doCheck = false;
doInstallCheck = false;
postInstall = ''
rm -rf $out/private
mv $out/public $out/include
mv $out/*.OBJ/* $out/
rmdir $out/*.OBJ
ln -s lib $out/lib64
# Upstream issue: https://bugzilla.mozilla.org/show_bug.cgi?id=530672
# https://gitweb.gentoo.org/repo/gentoo.git/plain/dev-libs/nss/files/nss-3.32-gentoo-fixups.patch?id=af1acce6c6d2c3adb17689261dfe2c2b6771ab8a
NSS_MAJOR_VERSION=`grep "NSS_VMAJOR" lib/nss/nss.h | awk '{print $3}'`
NSS_MINOR_VERSION=`grep "NSS_VMINOR" lib/nss/nss.h | awk '{print $3}'`
NSS_PATCH_VERSION=`grep "NSS_VPATCH" lib/nss/nss.h | awk '{print $3}'`
PREFIX="$out"
mkdir -p $out/lib/pkgconfig
sed -e "s,%prefix%,$PREFIX," \
-e "s,%exec_prefix%,$PREFIX," \
-e "s,%libdir%,$PREFIX/lib64," \
-e "s,%includedir%,$dev/include/nss," \
-e "s,%NSS_VERSION%,$NSS_MAJOR_VERSION.$NSS_MINOR_VERSION.$NSS_PATCH_VERSION,g" \
-e "s,%NSPR_VERSION%,4.16,g" \
pkg/pkg-config/nss.pc.in > $out/lib/pkgconfig/nss.pc
chmod 0644 $out/lib/pkgconfig/nss.pc
sed -e "s,@prefix@,$PREFIX," \
-e "s,@MOD_MAJOR_VERSION@,$NSS_MAJOR_VERSION," \
-e "s,@MOD_MINOR_VERSION@,$NSS_MINOR_VERSION," \
-e "s,@MOD_PATCH_VERSION@,$NSS_PATCH_VERSION," \
pkg/pkg-config/nss-config.in > $out/bin/nss-config
chmod 0755 $out/bin/nss-config
'';
postFixup = let
isCross = stdenv.hostPlatform != stdenv.buildPlatform;
nss = if isCross then buildPackages.nss.tools else "$out";
in ''
for libname in freebl3 nssdbm3 softokn3
do '' +
(if stdenv.isDarwin
then ''
libfile="$out/lib/lib$libname.dylib"
DYLD_LIBRARY_PATH=$out/lib:${nspr.out}/lib \
'' else ''
libfile="$out/lib/lib$libname.so"
LD_LIBRARY_PATH=$out/lib:${nspr.out}/lib \
'') + ''
${nss}/bin/shlibsign -v -i "$libfile"
done
moveToOutput bin "$tools"
moveToOutput bin/nss-config "$dev"
moveToOutput lib/libcrmf.a "$dev" # needed by firefox, for example
rm -f "$out"/lib/*.a
'';
meta = with stdenv.lib; {
homepage = "https://developer.mozilla.org/en-US/docs/NSS";
description = "A set of libraries for development of security-enabled client and server applications";
license = licenses.mpl20;
platforms = platforms.all;
};
}

View File

@ -0,0 +1,81 @@
diff -ru -x '*~' -x '*.orig' -x '*.rej' nss/cmd/shlibsign/shlibsign.c nss/cmd/shlibsign/shlibsign.c
--- nss/cmd/shlibsign/shlibsign.c 2017-01-04 15:24:24.000000000 +0100
+++ nss/cmd/shlibsign/shlibsign.c 2017-01-24 14:43:31.030420852 +0100
@@ -875,6 +875,8 @@
goto cleanup;
}
lib = PR_LoadLibrary(libname);
+ if (!lib)
+ lib = PR_LoadLibrary(NIX_NSS_LIBDIR"libsoftokn3.so");
assert(lib != NULL);
if (!lib) {
PR_fprintf(PR_STDERR, "loading softokn3 failed");
diff -ru -x '*~' -x '*.orig' -x '*.rej' nss/coreconf/config.mk nss/coreconf/config.mk
--- nss/coreconf/config.mk 2017-01-04 15:24:24.000000000 +0100
+++ nss/coreconf/config.mk 2017-01-24 14:43:47.989432372 +0100
@@ -202,3 +202,6 @@
# Hide old, deprecated, TLS cipher suite names when building NSS
DEFINES += -DSSL_DISABLE_DEPRECATED_CIPHER_SUITE_NAMES
+
+# Nix specific stuff.
+DEFINES += -DNIX_NSS_LIBDIR=\"$(out)/lib/\"
diff -ru -x '*~' -x '*.orig' -x '*.rej' nss/lib/pk11wrap/pk11load.c nss/lib/pk11wrap/pk11load.c
--- nss/lib/pk11wrap/pk11load.c 2017-01-04 15:24:24.000000000 +0100
+++ nss/lib/pk11wrap/pk11load.c 2017-01-24 14:45:06.883485652 +0100
@@ -440,6 +440,13 @@
* unload the library if anything goes wrong from here on out...
*/
library = PR_LoadLibrary(mod->dllName);
+ if ((library == NULL) &&
+ !rindex(mod->dllName, PR_GetDirectorySeparator())) {
+ library = PORT_LoadLibraryFromOrigin(my_shlib_name,
+ (PRFuncPtr) &softoken_LoadDSO,
+ mod->dllName);
+ }
+
mod->library = (void *)library;
if (library == NULL) {
diff -ru -x '*~' -x '*.orig' -x '*.rej' nss/lib/util/secload.c nss/lib/util/secload.c
--- nss/lib/util/secload.c 2017-01-04 15:24:24.000000000 +0100
+++ nss/lib/util/secload.c 2017-01-24 14:43:31.030420852 +0100
@@ -70,9 +70,14 @@
/* Remove the trailing filename from referencePath and add the new one */
c = strrchr(referencePath, PR_GetDirectorySeparator());
+ if (!c) { /* referencePath doesn't contain a / means that dladdr gave us argv[0]
+ * and program was called from $PATH. Hack to get libs from NIX_NSS_LIBDIR */
+ referencePath = NIX_NSS_LIBDIR;
+ c = (char*) &referencePath[sizeof(NIX_NSS_LIBDIR) - 1]; /* last / */
+ }
if (c) {
size_t referencePathSize = 1 + c - referencePath;
- fullName = (char*)PORT_Alloc(strlen(name) + referencePathSize + 1);
+ fullName = (char*) PORT_Alloc(strlen(name) + referencePathSize + 5);
if (fullName) {
memcpy(fullName, referencePath, referencePathSize);
strcpy(fullName + referencePathSize, name);
@@ -82,6 +87,11 @@
#endif
libSpec.type = PR_LibSpec_Pathname;
libSpec.value.pathname = fullName;
+ if ((referencePathSize >= 4) &&
+ (strncmp(fullName + referencePathSize - 4, "bin", 3) == 0)) {
+ memcpy(fullName + referencePathSize -4, "lib", 3);
+ }
+ strcpy(fullName + referencePathSize, name);
dlh = PR_LoadLibraryWithFlags(libSpec, PR_LD_NOW | PR_LD_LOCAL
#ifdef PR_LD_ALT_SEARCH_PATH
/* allow library's dependencies to be found in the same directory
@@ -89,6 +99,10 @@
| PR_LD_ALT_SEARCH_PATH
#endif
);
+ if (! dlh) {
+ strcpy(fullName + referencePathSize, name);
+ dlh = PR_LoadLibraryWithFlags(libSpec, PR_LD_NOW | PR_LD_LOCAL);
+ }
PORT_Free(fullName);
}
}

View File

@ -1,7 +1,8 @@
diff -ru -x '*~' -x '*.orig' -x '*.rej' nss/cmd/shlibsign/shlibsign.c nss/cmd/shlibsign/shlibsign.c diff --git nss/cmd/shlibsign/shlibsign.c nss/cmd/shlibsign/shlibsign.c
--- nss/cmd/shlibsign/shlibsign.c 2017-01-04 15:24:24.000000000 +0100 index ad8f3b84e..74676d039 100644
+++ nss/cmd/shlibsign/shlibsign.c 2017-01-24 14:43:31.030420852 +0100 --- nss/cmd/shlibsign/shlibsign.c
@@ -875,6 +875,8 @@ +++ nss/cmd/shlibsign/shlibsign.c
@@ -875,6 +875,8 @@ main(int argc, char **argv)
goto cleanup; goto cleanup;
} }
lib = PR_LoadLibrary(libname); lib = PR_LoadLibrary(libname);
@ -10,37 +11,31 @@ diff -ru -x '*~' -x '*.orig' -x '*.rej' nss/cmd/shlibsign/shlibsign.c nss/cmd/sh
assert(lib != NULL); assert(lib != NULL);
if (!lib) { if (!lib) {
PR_fprintf(PR_STDERR, "loading softokn3 failed"); PR_fprintf(PR_STDERR, "loading softokn3 failed");
diff -ru -x '*~' -x '*.orig' -x '*.rej' nss/coreconf/config.mk nss/coreconf/config.mk diff --git nss/lib/pk11wrap/pk11load.c nss/lib/pk11wrap/pk11load.c
--- nss/coreconf/config.mk 2017-01-04 15:24:24.000000000 +0100 index 9e7a0a546..a0a23a1a4 100644
+++ nss/coreconf/config.mk 2017-01-24 14:43:47.989432372 +0100 --- nss/lib/pk11wrap/pk11load.c
@@ -202,3 +202,6 @@ +++ nss/lib/pk11wrap/pk11load.c
@@ -466,6 +466,15 @@ secmod_LoadPKCS11Module(SECMODModule *mod, SECMODModule **oldModule)
# Hide old, deprecated, TLS cipher suite names when building NSS
DEFINES += -DSSL_DISABLE_DEPRECATED_CIPHER_SUITE_NAMES
+
+# Nix specific stuff.
+DEFINES += -DNIX_NSS_LIBDIR=\"$(out)/lib/\"
diff -ru -x '*~' -x '*.orig' -x '*.rej' nss/lib/pk11wrap/pk11load.c nss/lib/pk11wrap/pk11load.c
--- nss/lib/pk11wrap/pk11load.c 2017-01-04 15:24:24.000000000 +0100
+++ nss/lib/pk11wrap/pk11load.c 2017-01-24 14:45:06.883485652 +0100
@@ -440,6 +440,13 @@
* unload the library if anything goes wrong from here on out... * unload the library if anything goes wrong from here on out...
*/ */
library = PR_LoadLibrary(mod->dllName); library = PR_LoadLibrary(mod->dllName);
+#ifndef NSS_STATIC_SOFTOKEN
+ if ((library == NULL) && + if ((library == NULL) &&
+ !rindex(mod->dllName, PR_GetDirectorySeparator())) { + !rindex(mod->dllName, PR_GetDirectorySeparator())) {
+ library = PORT_LoadLibraryFromOrigin(my_shlib_name, + library = PORT_LoadLibraryFromOrigin(my_shlib_name,
+ (PRFuncPtr) &softoken_LoadDSO, + (PRFuncPtr) &softoken_LoadDSO,
+ mod->dllName); + mod->dllName);
+ } + }
+#endif
+ +
mod->library = (void *)library; mod->library = (void *)library;
if (library == NULL) { if (library == NULL) {
diff -ru -x '*~' -x '*.orig' -x '*.rej' nss/lib/util/secload.c nss/lib/util/secload.c diff --git nss/lib/util/secload.c nss/lib/util/secload.c
--- nss/lib/util/secload.c 2017-01-04 15:24:24.000000000 +0100 index 12efd2f75..8b74478f6 100644
+++ nss/lib/util/secload.c 2017-01-24 14:43:31.030420852 +0100 --- nss/lib/util/secload.c
@@ -70,9 +70,14 @@ +++ nss/lib/util/secload.c
@@ -70,9 +70,14 @@ loader_LoadLibInReferenceDir(const char* referencePath, const char* name)
/* Remove the trailing filename from referencePath and add the new one */ /* Remove the trailing filename from referencePath and add the new one */
c = strrchr(referencePath, PR_GetDirectorySeparator()); c = strrchr(referencePath, PR_GetDirectorySeparator());
@ -56,7 +51,7 @@ diff -ru -x '*~' -x '*.orig' -x '*.rej' nss/lib/util/secload.c nss/lib/util/secl
if (fullName) { if (fullName) {
memcpy(fullName, referencePath, referencePathSize); memcpy(fullName, referencePath, referencePathSize);
strcpy(fullName + referencePathSize, name); strcpy(fullName + referencePathSize, name);
@@ -82,6 +87,11 @@ @@ -82,6 +87,11 @@ loader_LoadLibInReferenceDir(const char* referencePath, const char* name)
#endif #endif
libSpec.type = PR_LibSpec_Pathname; libSpec.type = PR_LibSpec_Pathname;
libSpec.value.pathname = fullName; libSpec.value.pathname = fullName;
@ -68,7 +63,7 @@ diff -ru -x '*~' -x '*.orig' -x '*.rej' nss/lib/util/secload.c nss/lib/util/secl
dlh = PR_LoadLibraryWithFlags(libSpec, PR_LD_NOW | PR_LD_LOCAL dlh = PR_LoadLibraryWithFlags(libSpec, PR_LD_NOW | PR_LD_LOCAL
#ifdef PR_LD_ALT_SEARCH_PATH #ifdef PR_LD_ALT_SEARCH_PATH
/* allow library's dependencies to be found in the same directory /* allow library's dependencies to be found in the same directory
@@ -89,6 +99,10 @@ @@ -89,6 +99,10 @@ loader_LoadLibInReferenceDir(const char* referencePath, const char* name)
| PR_LD_ALT_SEARCH_PATH | PR_LD_ALT_SEARCH_PATH
#endif #endif
); );

View File

@ -1,11 +1,11 @@
{ stdenv, fetchurl, nspr, perl, zlib, sqlite, fixDarwinDylibNames, buildPackages }: { stdenv, fetchurl, nspr, perl, zlib, sqlite, darwin, fixDarwinDylibNames, buildPackages, ninja }:
let let
nssPEM = fetchurl { nssPEM = fetchurl {
url = "http://dev.gentoo.org/~polynomial-c/mozilla/nss-3.15.4-pem-support-20140109.patch.xz"; url = "http://dev.gentoo.org/~polynomial-c/mozilla/nss-3.15.4-pem-support-20140109.patch.xz";
sha256 = "10ibz6y0hknac15zr6dw4gv9nb5r5z9ym6gq18j3xqx7v7n3vpdw"; sha256 = "10ibz6y0hknac15zr6dw4gv9nb5r5z9ym6gq18j3xqx7v7n3vpdw";
}; };
version = "3.52.1"; version = "3.54";
underscoreVersion = builtins.replaceStrings ["."] ["_"] version; underscoreVersion = builtins.replaceStrings ["."] ["_"] version;
in stdenv.mkDerivation rec { in stdenv.mkDerivation rec {
@ -14,12 +14,13 @@ in stdenv.mkDerivation rec {
src = fetchurl { src = fetchurl {
url = "mirror://mozilla/security/nss/releases/NSS_${underscoreVersion}_RTM/src/${pname}-${version}.tar.gz"; url = "mirror://mozilla/security/nss/releases/NSS_${underscoreVersion}_RTM/src/${pname}-${version}.tar.gz";
sha256 = "0y4jb9095f7bbgw7d7kvzm4c3g4p5i6y68fwhb8wlkpb7b1imj5w"; sha256 = "0hvfip056pl07h6w91i6fyji5nczrrsxyr56rls7jd2yryzqpcfs";
}; };
depsBuildBuild = [ buildPackages.stdenv.cc ]; depsBuildBuild = [ buildPackages.stdenv.cc ];
nativeBuildInputs = [ perl ]; nativeBuildInputs = [ perl ninja (buildPackages.python3.withPackages (ps: with ps; [ gyp ])) ]
++ stdenv.lib.optional stdenv.isDarwin darwin.cctools;
buildInputs = [ zlib sqlite ] buildInputs = [ zlib sqlite ]
++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames; ++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames;
@ -29,10 +30,18 @@ in stdenv.mkDerivation rec {
prePatch = '' prePatch = ''
# strip the trailing whitespace from the patch line and the renamed CKO_NETSCAPE_ enum to CKO_NSS_ # strip the trailing whitespace from the patch line and the renamed CKO_NETSCAPE_ enum to CKO_NSS_
xz -d < ${nssPEM} | sed \ xz -d < ${nssPEM} | sed \
-e '/^-DIRS = builtins $/ s/ $//' \ -e 's/-DIRS = builtins $/-DIRS = . builtins/g' \
-e 's/CKO_NETSCAPE_/CKO_NSS_/g' \ -e 's/CKO_NETSCAPE_/CKO_NSS_/g' \
-e 's/CKT_NETSCAPE_/CKT_NSS_/g' \ -e 's/CKT_NETSCAPE_/CKT_NSS_/g' \
| patch -p1 | patch -p1
patchShebangs nss
for f in nss/coreconf/config.gypi nss/build.sh nss/coreconf/config.gypi; do
substituteInPlace "$f" --replace "/usr/bin/env" "${buildPackages.coreutils}/bin/env"
done
substituteInPlace nss/coreconf/config.gypi --replace "/usr/bin/grep" "${buildPackages.coreutils}/bin/env grep"
''; '';
patches = patches =
@ -40,55 +49,49 @@ in stdenv.mkDerivation rec {
# Based on http://patch-tracker.debian.org/patch/series/dl/nss/2:3.15.4-1/85_security_load.patch # Based on http://patch-tracker.debian.org/patch/series/dl/nss/2:3.15.4-1/85_security_load.patch
./85_security_load.patch ./85_security_load.patch
./ckpem.patch ./ckpem.patch
./fix-cross-compilation.patch
]; ];
patchFlags = [ "-p0" ]; patchFlags = [ "-p0" ];
postPatch = stdenv.lib.optionalString stdenv.isDarwin ''
substituteInPlace nss/coreconf/Darwin.mk --replace '@executable_path/$(notdir $@)' "$out/lib/\$(notdir \$@)"
'';
outputs = [ "out" "dev" "tools" ]; outputs = [ "out" "dev" "tools" ];
preConfigure = "cd nss"; preConfigure = "cd nss";
makeFlags = let buildPhase = let
# NSS's build systems expects aarch32 to be called arm; if we pass in armv6l/armv7l, it getArch = platform: if platform.isx86_64 then "x64"
# fails with a linker error else if platform.isx86_32 then "ia32"
cpu = if stdenv.hostPlatform.isAarch32 then "arm" else stdenv.hostPlatform.parsed.cpu.name; else if platform.isAarch32 then "arm"
in [ else if platform.isAarch64 then "arm64"
"NSPR_INCLUDE_DIR=${nspr.dev}/include" else platform.parsed.cpu.name;
"NSPR_LIB_DIR=${nspr.out}/lib" # yes, this is correct. nixpkgs uses "host" for the platform the binary will run on whereas nss uses "host" for the platform that the build is running on
"NSDISTMODE=copy" target = getArch stdenv.hostPlatform;
"BUILD_OPT=1" host = getArch stdenv.buildPlatform;
"SOURCE_PREFIX=\$(out)" in ''
"NSS_ENABLE_ECC=1" runHook preBuild
"USE_SYSTEM_ZLIB=1"
"NSS_USE_SYSTEM_SQLITE=1"
"NATIVE_CC=${buildPackages.stdenv.cc}/bin/cc"
] ++ stdenv.lib.optionals (!stdenv.isDarwin) [
# Pass in CPU even if we're not cross compiling, because otherwise it tries to guess with
# uname, which can be wrong if e.g. we're compiling for aarch32 on aarch64
"OS_TEST=${cpu}"
"CPU_ARCH=${cpu}"
] ++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) [
"CROSS_COMPILE=1"
"NSS_DISABLE_GTESTS=1" # don't want to build tests when cross-compiling
] ++ stdenv.lib.optional stdenv.is64bit "USE_64=1"
++ stdenv.lib.optional stdenv.isDarwin "CCC=clang++";
NIX_CFLAGS_COMPILE = "-Wno-error"; sed -i 's|nss_dist_dir="$dist_dir"|nss_dist_dir="'$out'"|;s|nss_dist_obj_dir="$obj_dir"|nss_dist_obj_dir="'$out'"|' build.sh
./build.sh -v --opt \
--with-nspr=${nspr.dev}/include:${nspr.out}/lib \
--system-sqlite \
--enable-legacy-db \
--target ${target} \
-Dhost_arch=${host} \
-Duse_system_zlib=1 \
${stdenv.lib.optionalString stdenv.isDarwin "--clang"} \
${stdenv.lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) "--disable-tests"}
# TODO(@oxij): investigate this: `make -n check` works but `make runHook postBuild
# check` fails with "no rule", same for "installcheck". '';
doCheck = false;
doInstallCheck = false; NIX_CFLAGS_COMPILE = "-Wno-error -DNIX_NSS_LIBDIR=\"${placeholder "out"}/lib/\"";
installPhase = ''
runHook preInstall
postInstall = ''
rm -rf $out/private rm -rf $out/private
find $out -name "*.TOC" -delete
mv $out/public $out/include mv $out/public $out/include
mv $out/*.OBJ/* $out/
rmdir $out/*.OBJ
ln -s lib $out/lib64 ln -s lib $out/lib64
@ -138,6 +141,8 @@ in stdenv.mkDerivation rec {
moveToOutput bin/nss-config "$dev" moveToOutput bin/nss-config "$dev"
moveToOutput lib/libcrmf.a "$dev" # needed by firefox, for example moveToOutput lib/libcrmf.a "$dev" # needed by firefox, for example
rm -f "$out"/lib/*.a rm -f "$out"/lib/*.a
runHook postInstall
''; '';
meta = with stdenv.lib; { meta = with stdenv.lib; {

View File

@ -0,0 +1,11 @@
--- nss/nss.gyp
+++ nss/nss.gyp
@@ -280,7 +280,7 @@
'outputs/': [['exclude', 'nssdbm3']]
}],
],
- 'action': ['<(python)', '<(DEPTH)/coreconf/shlibsign.py', '<@(_inputs)']
+ 'action': ['true']
}
],
},

View File

@ -12,11 +12,11 @@ let
in in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "poppler-${suffix}-${version}"; name = "poppler-${suffix}-${version}";
version = "0.89.0"; # beware: updates often break cups-filters build, check texlive and scribusUnstable too! version = "0.90.1"; # beware: updates often break cups-filters build, check texlive and scribusUnstable too!
src = fetchurl { src = fetchurl {
url = "${meta.homepage}/poppler-${version}.tar.xz"; url = "${meta.homepage}/poppler-${version}.tar.xz";
sha256 = "0p4vxyl5cw8jgcy6hjb35236bhv9xy9xc21vsk2jqy1p8lv318pv"; sha256 = "mE2C5y6RQY0oCIUpjIvchVov2SZl/VKhNFsnI14MccQ=";
}; };
outputs = [ "out" "dev" ]; outputs = [ "out" "dev" ];

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, apr, scons, openssl, aprutil, zlib, kerberos { stdenv, fetchurl, apr, sconsPackages, openssl, aprutil, zlib, kerberos
, pkgconfig, libiconv }: , pkgconfig, libiconv }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
sha256 = "1k47gbgpp52049andr28y28nbwh9m36bbb0g8p0aka3pqlhjv72l"; sha256 = "1k47gbgpp52049andr28y28nbwh9m36bbb0g8p0aka3pqlhjv72l";
}; };
nativeBuildInputs = [ pkgconfig scons.py2 ]; nativeBuildInputs = [ pkgconfig sconsPackages.scons_3_1_2 ];
buildInputs = [ apr openssl aprutil zlib libiconv ] buildInputs = [ apr openssl aprutil zlib libiconv ]
++ stdenv.lib.optional (!stdenv.isCygwin) kerberos; ++ stdenv.lib.optional (!stdenv.isCygwin) kerberos;

View File

@ -1,9 +1,9 @@
{ stdenv, python, fetchurl, openssl, boost, scons }: { stdenv, python, fetchurl, openssl, boost, sconsPackages }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "swiften"; pname = "swiften";
version = "4.0.2"; version = "4.0.2";
nativeBuildInputs = [ scons.py2 ]; nativeBuildInputs = [ sconsPackages.scons_3_1_2 ];
buildInputs = [ python ]; buildInputs = [ python ];
propagatedBuildInputs = [ openssl boost ]; propagatedBuildInputs = [ openssl boost ];

View File

@ -1,7 +1,8 @@
{ lib, stdenv, fetchurl, meson, pkgconfig, ninja { lib, stdenv, fetchurl, meson, pkgconfig, ninja
, libffi, libxml2, wayland , libffi, libxml2, wayland
, expat ? null # Build wayland-scanner (currently cannot be disabled as of 1.7.0) , expat ? null # Build wayland-scanner (currently cannot be disabled as of 1.7.0)
, withDocumentation ? false, graphviz-nox, doxygen, libxslt, xmlto, python3 , withDocumentation ? stdenv.hostPlatform == stdenv.buildPlatform
, graphviz-nox, doxygen, libxslt, xmlto, python3
, docbook_xsl, docbook_xml_dtd_45, docbook_xml_dtd_42 , docbook_xsl, docbook_xml_dtd_45, docbook_xml_dtd_42
}: }:
@ -19,6 +20,7 @@ in stdenv.mkDerivation rec {
sha256 = "0k995rn96xkplrapz5k648j651wc43kq817xk1x8280h16gsfxa6"; sha256 = "0k995rn96xkplrapz5k648j651wc43kq817xk1x8280h16gsfxa6";
}; };
outputs = [ "out" ] ++ lib.optionals withDocumentation [ "doc" "man" ];
separateDebugInfo = true; separateDebugInfo = true;
mesonFlags = [ "-Ddocumentation=${lib.boolToString withDocumentation}" ]; mesonFlags = [ "-Ddocumentation=${lib.boolToString withDocumentation}" ];

View File

@ -10,11 +10,11 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "awkward1"; pname = "awkward1";
version = "0.2.23"; version = "0.2.24";
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
sha256 = "d7458b499959af66e0a640e29e6b676a39cc9614cd504e5a2e8f8d0c7f546597"; sha256 = "d2f4c9e3153ba18e3ef867c4804e3f17aefd0cc32b5174b38718d06ada4503e9";
}; };
nativeBuildInputs = [ cmake ]; nativeBuildInputs = [ cmake ];

View File

@ -1,11 +1,8 @@
{ stdenv, fetchFromGitHub, buildPythonPackage, pykickstart, pyparted, pyblock { stdenv, fetchFromGitHub, buildPythonPackage, pykickstart, pyparted, pyblock
, pyudev, six, libselinux, cryptsetup, multipath-tools, lsof, utillinux , pyudev, six, libselinux, multipath-tools, lsof, utillinux
}: }:
let buildPythonPackage rec {
pyenable = { enablePython = true; };
cryptsetupWithPython = cryptsetup.override pyenable;
in buildPythonPackage rec {
pname = "blivet"; pname = "blivet";
version = "0.67"; version = "0.67";
@ -30,7 +27,7 @@ in buildPythonPackage rec {
''; '';
propagatedBuildInputs = [ propagatedBuildInputs = [
pykickstart pyparted pyblock pyudev libselinux cryptsetupWithPython pykickstart pyparted pyblock pyudev libselinux
six six
]; ];

View File

@ -6,13 +6,12 @@
buildPythonPackage { buildPythonPackage {
pname = "gyp"; pname = "gyp";
version = "2015-06-11"; version = "2020-05-12";
disabled = isPy3k;
src = fetchFromGitiles { src = fetchFromGitiles {
url = "https://chromium.googlesource.com/external/gyp"; url = "https://chromium.googlesource.com/external/gyp";
rev = "fdc7b812f99e48c00e9a487bd56751bbeae07043"; rev = "caa60026e223fc501e8b337fd5086ece4028b1c6";
sha256 = "1imgxsl4mr1662vsj2mlnpvvrbz71yk00w8p85vi5bkgmc6awgiz"; sha256 = "0r9phq5yrmj968vdvy9vivli35wn1j9a6iwshp69wl7q4p0x8q2b";
}; };
prePatch = stdenv.lib.optionals stdenv.isDarwin '' prePatch = stdenv.lib.optionals stdenv.isDarwin ''

View File

@ -1,4 +1,11 @@
{ stdenv, buildPythonPackage, isPy27, fetchPypi }: { stdenv
, buildPythonPackage
, isPy27
, fetchPypi
, substituteAll
, pkgs
, pytestCheckHook
}:
buildPythonPackage rec { buildPythonPackage rec {
pname = "libevdev"; pname = "libevdev";
@ -10,7 +17,14 @@ buildPythonPackage rec {
sha256 = "17agnigmzscmdjqmrylg1lza03hwjhgxbpf4l705s6i7p7ndaqrs"; sha256 = "17agnigmzscmdjqmrylg1lza03hwjhgxbpf4l705s6i7p7ndaqrs";
}; };
doCheck = false; patches = [
(substituteAll {
src = ./fix-paths.patch;
libevdev = stdenv.lib.getLib pkgs.libevdev;
})
];
checkInputs = [ pytestCheckHook ];
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "Python wrapper around the libevdev C library"; description = "Python wrapper around the libevdev C library";

View File

@ -0,0 +1,22 @@
diff --git a/libevdev/_clib.py b/libevdev/_clib.py
index 6e4ab2c..9db54d1 100644
--- a/libevdev/_clib.py
+++ b/libevdev/_clib.py
@@ -120,7 +120,7 @@ class Libevdev(_LibraryWrapper):
@staticmethod
def _cdll():
- return ctypes.CDLL("libevdev.so.2", use_errno=True)
+ return ctypes.CDLL("@libevdev@/lib/libevdev.so.2", use_errno=True)
_api_prototypes = {
# const char *libevdev_event_type_get_name(unsigned int type);
@@ -910,7 +910,7 @@ class UinputDevice(_LibraryWrapper):
@staticmethod
def _cdll():
- return ctypes.CDLL("libevdev.so.2", use_errno=True)
+ return ctypes.CDLL("@libevdev@/lib/libevdev.so.2", use_errno=True)
_api_prototypes = {
# int libevdev_uinput_create_from_device(const struct libevdev *, int, struct libevdev_uinput **)

View File

@ -17,7 +17,7 @@ buildPythonPackage rec {
''; '';
checkInputs = [ pytest mock hypothesis docutils ]; checkInputs = [ pytest mock hypothesis docutils ];
propagatedBuildInputs = [ systemd six ]; propagatedBuildInputs = [ six ];
checkPhase = '' checkPhase = ''
py.test py.test

View File

@ -68,6 +68,24 @@ cmakeConfigurePhase() {
# nix/store directory. # nix/store directory.
cmakeFlags="-DCMAKE_INSTALL_NAME_DIR=${!outputLib}/lib $cmakeFlags" cmakeFlags="-DCMAKE_INSTALL_NAME_DIR=${!outputLib}/lib $cmakeFlags"
# The docdir flag needs to include PROJECT_NAME as per GNU guidelines,
# try to extract it from CMakeLists.txt.
if [[ -z "$shareDocName" ]]; then
local cmakeLists="${cmakeDir}/CMakeLists.txt"
if [[ -f "$cmakeLists" ]]; then
local shareDocName="$(grep --only-matching --perl-regexp --ignore-case '\bproject\s*\(\s*"?\K([^[:space:]")]+)' < "$cmakeLists" | head -n1)"
fi
# The argument sometimes contains garbage or variable interpolation.
# When that is the case, lets fall back to the derivation name.
if [[ -z "$shareDocName" ]] || echo "$shareDocName" | grep -q '[^a-zA-Z0-9_-+]'; then
if [[ -n "${pname-}" ]]; then
shareDocName="$pname"
else
shareDocName="$(echo "$name" | sed 's/-[^a-zA-Z].*//')"
fi
fi
fi
# This ensures correct paths with multiple output derivations # This ensures correct paths with multiple output derivations
# It requires the project to use variables from GNUInstallDirs module # It requires the project to use variables from GNUInstallDirs module
# https://cmake.org/cmake/help/latest/module/GNUInstallDirs.html # https://cmake.org/cmake/help/latest/module/GNUInstallDirs.html

View File

@ -1,6 +1,6 @@
{ version, sha256 }: { version, sha256 }:
{ stdenv, fetchurl, python3Packages, python2Packages, scons }: { stdenv, fetchurl, python3Packages, lib }:
python3Packages.buildPythonApplication rec { python3Packages.buildPythonApplication rec {
pname = "scons"; pname = "scons";
@ -13,7 +13,13 @@ python3Packages.buildPythonApplication rec {
setupHook = ./setup-hook.sh; setupHook = ./setup-hook.sh;
passthru.py2 = scons.override { python3Packages = python2Packages; }; postPatch = lib.optionalString (lib.versionAtLeast version "4.0.0") ''
substituteInPlace setup.cfg \
--replace "build/dist" "dist"
'';
# The release tarballs don't contain any tests (runtest.py and test/*):
doCheck = lib.versionOlder version "4.0.0";
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "An improved, cross-platform substitute for Make"; description = "An improved, cross-platform substitute for Make";

View File

@ -7,8 +7,12 @@ in {
version = "3.0.1"; version = "3.0.1";
sha256 = "0wzid419mlwqw9llrg8gsx4nkzhqy16m4m40r0xnh6cwscw5wir4"; sha256 = "0wzid419mlwqw9llrg8gsx4nkzhqy16m4m40r0xnh6cwscw5wir4";
}).override { python3Packages = python2Packages; }; }).override { python3Packages = python2Packages; };
scons_latest = mkScons { scons_3_1_2 = (mkScons {
version = "3.1.2"; version = "3.1.2";
sha256 = "1yzq2gg9zwz9rvfn42v5jzl3g4qf1khhny6zfbi2hib55zvg60bq"; sha256 = "1yzq2gg9zwz9rvfn42v5jzl3g4qf1khhny6zfbi2hib55zvg60bq";
}).override { python3Packages = python2Packages; };
scons_latest = mkScons {
version = "4.0.1";
sha256 = "0z00l9wzaiqyjq0hapbvsjclvcfjjjq04kmxi7ffq966nl2d2bkj";
}; };
} }

View File

@ -2,16 +2,16 @@
buildGoModule rec { buildGoModule rec {
pname = "fly"; pname = "fly";
version = "6.3.0"; version = "6.4.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "concourse"; owner = "concourse";
repo = "concourse"; repo = "concourse";
rev = "v${version}"; rev = "v${version}";
sha256 = "006qkg661hzbc2gpcnpxm09bp1kbb98y0bgdr49bjlnapcmdgr1b"; sha256 = "08lw345kzkic5b2dqj3d0d9x1mas9rpi4rdmbhww9r60swj169i7";
}; };
vendorSha256 = "03az7l9rf2syw837zliny82xhkqlad16z0vfcg5h21m3bhz6v6jy"; vendorSha256 = "0a78cjfj909ic8wci8id2h5f6r34h90myk6z7m918n08vxv60jvw";
subPackages = [ "fly" ]; subPackages = [ "fly" ];

View File

@ -1,11 +1,11 @@
{ stdenv, fetchurl, perl, autoconf }: { stdenv, fetchurl, perl, autoconf }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "automake-1.15"; name = "automake-1.15.1";
src = fetchurl { src = fetchurl {
url = "mirror://gnu/automake/${name}.tar.xz"; url = "mirror://gnu/automake/${name}.tar.xz";
sha256 = "0dl6vfi2lzz8alnklwxzfz624b95hb1ipjvd3mk177flmddcf24r"; sha256 = "1bzd9g32dfm4rsbw93ld9x7b5nc1y6i4m6zp032qf1i28a8s6sxg";
}; };
nativeBuildInputs = [ autoconf perl ]; nativeBuildInputs = [ autoconf perl ];

View File

@ -1,11 +1,11 @@
{ stdenv, fetchurl, perlPackages, gettext }: { stdenv, fetchurl, perlPackages, gettext }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "help2man-1.47.15"; name = "help2man-1.47.16";
src = fetchurl { src = fetchurl {
url = "mirror://gnu/help2man/${name}.tar.xz"; url = "mirror://gnu/help2man/${name}.tar.xz";
sha256 = "076dvc0z0qp73rpmg0c8bkpfh969h4gzzc442hv1bcyf1srkann2"; sha256 = "1x586h7wvripcay35kdh2kvydx84y8yy93ffjah2rqw6bc65iy1y";
}; };
nativeBuildInputs = [ gettext perlPackages.LocaleGettext ]; nativeBuildInputs = [ gettext perlPackages.LocaleGettext ];

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, fetchzip, scons, zlib }: { stdenv, fetchurl, fetchzip, sconsPackages, zlib }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "nsis"; pname = "nsis";
@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
chmod -R u+w $out/share/nsis chmod -R u+w $out/share/nsis
''; '';
nativeBuildInputs = [ scons.py2 ]; nativeBuildInputs = [ sconsPackages.scons_3_1_2 ];
buildInputs = [ zlib ]; buildInputs = [ zlib ];
sconsFlags = [ sconsFlags = [

View File

@ -2,11 +2,11 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "bison"; pname = "bison";
version = "3.6.3"; version = "3.6.4";
src = fetchurl { src = fetchurl {
url = "mirror://gnu/${pname}/${pname}-${version}.tar.gz"; url = "mirror://gnu/${pname}/${pname}-${version}.tar.gz";
sha256 = "0qry9ar16dpg9nzrq7jh3fqh4ah2xvcf6v00fc81z08yjd1ljk2b"; sha256 = "1s8kmfhg7a58vm65fc977ckp8zspy8diayrcjhs3cgrqnmjdx0w1";
}; };
nativeBuildInputs = [ m4 perl ] ++ stdenv.lib.optional stdenv.isSunOS help2man; nativeBuildInputs = [ m4 perl ] ++ stdenv.lib.optional stdenv.isSunOS help2man;

View File

@ -39,9 +39,7 @@ rustPlatform.buildRustPackage rec {
) )
]; ];
# Disable tests until they can be run with --features no-self-update doCheck = !stdenv.isAarch64 && !stdenv.isDarwin;
doCheck = false;
#doCheck = !stdenv.isAarch64 && !stdenv.isDarwin;
postInstall = '' postInstall = ''
pushd $out/bin pushd $out/bin

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, binutils-unwrapped, scons, gnum4, p7zip, glibc_multi, mesa { stdenv, fetchurl, binutils-unwrapped, sconsPackages, gnum4, p7zip, glibc_multi, mesa
, xorg, libGLU, libGL, openal , xorg, libGLU, libGL, openal
, lib, makeWrapper, makeDesktopItem }: , lib, makeWrapper, makeDesktopItem }:
@ -24,7 +24,7 @@ in stdenv.mkDerivation {
sha256 = "17wdpip8zvm2njz0xrf7xcxl73hnsc6i83zj18kn8rnjkpy50dd6"; sha256 = "17wdpip8zvm2njz0xrf7xcxl73hnsc6i83zj18kn8rnjkpy50dd6";
}; };
nativeBuildInputs = [ nativeBuildInputs = [
p7zip scons.py2 gnum4 makeWrapper p7zip sconsPackages.scons_3_1_2 gnum4 makeWrapper
]; ];
buildInputs = [ buildInputs = [
glibc_multi mesa.dev xorg.libX11.dev openal glibc_multi mesa.dev xorg.libX11.dev openal

View File

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, fetchsvn, pkgconfig, scons, libGLU, libGL, SDL2, SDL2_image { stdenv, fetchFromGitHub, fetchsvn, pkgconfig, sconsPackages, libGLU, libGL, SDL2, SDL2_image
, libvorbis, bullet, curl, gettext, writeTextFile , libvorbis, bullet, curl, gettext, writeTextFile
, data ? fetchsvn { , data ? fetchsvn {
@ -20,7 +20,7 @@ let
sha256 = "001wq3c4n9wzxqfpq40b1jcl16sxbqv2zbkpy9rq2wf9h417q6hg"; sha256 = "001wq3c4n9wzxqfpq40b1jcl16sxbqv2zbkpy9rq2wf9h417q6hg";
}; };
nativeBuildInputs = [ pkgconfig scons.py2 ]; nativeBuildInputs = [ pkgconfig sconsPackages.scons_3_1_2 ];
buildInputs = [ libGLU libGL SDL2 SDL2_image libvorbis bullet curl gettext ]; buildInputs = [ libGLU libGL SDL2 SDL2_image libvorbis bullet curl gettext ];
patches = [ ./0001-Ignore-missing-data-for-installation.patch ]; patches = [ ./0001-Ignore-missing-data-for-installation.patch ];

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, scons, libX11, pkgconfig { stdenv, fetchurl, sconsPackages, libX11, pkgconfig
, libusb1, boost, glib, dbus-glib }: , libusb1, boost, glib, dbus-glib }:
let let
@ -13,7 +13,7 @@ in stdenv.mkDerivation {
}; };
makeFlags = [ "PREFIX=$(out)" ]; makeFlags = [ "PREFIX=$(out)" ];
nativeBuildInputs = [ pkgconfig scons.py2 ]; nativeBuildInputs = [ pkgconfig sconsPackages.scons_3_1_2 ];
buildInputs = [ libX11 libusb1 boost glib dbus-glib ]; buildInputs = [ libX11 libusb1 boost glib dbus-glib ];
dontUseSconsInstall = true; dontUseSconsInstall = true;

View File

@ -39,6 +39,9 @@ let
}; };
prePatchCommon = '' prePatchCommon = ''
patch -p1 < ${gnumake43Patch}
chmod a+x ./common/list_capabilities.sh ./common/list_af_names.sh
patchShebangs ./common/list_capabilities.sh ./common/list_af_names.sh
substituteInPlace ./common/Make.rules --replace "/usr/bin/pod2man" "${buildPackages.perl}/bin/pod2man" substituteInPlace ./common/Make.rules --replace "/usr/bin/pod2man" "${buildPackages.perl}/bin/pod2man"
substituteInPlace ./common/Make.rules --replace "/usr/bin/pod2html" "${buildPackages.perl}/bin/pod2html" substituteInPlace ./common/Make.rules --replace "/usr/bin/pod2html" "${buildPackages.perl}/bin/pod2html"
substituteInPlace ./common/Make.rules --replace "/usr/include/linux/capability.h" "${linuxHeaders}/include/linux/capability.h" substituteInPlace ./common/Make.rules --replace "/usr/include/linux/capability.h" "${linuxHeaders}/include/linux/capability.h"
@ -184,11 +187,7 @@ let
buildInputs = [ libapparmor ]; buildInputs = [ libapparmor ];
prePatch = '' prePatch = prePatchCommon + ''
patch -p1 < ${gnumake43Patch}
chmod a+x ./common/list_capabilities.sh ./common/list_af_names.sh
patchShebangs ./common/list_capabilities.sh ./common/list_af_names.sh
'' + prePatchCommon + ''
substituteInPlace ./parser/Makefile --replace "/usr/bin/bison" "${bison}/bin/bison" substituteInPlace ./parser/Makefile --replace "/usr/bin/bison" "${bison}/bin/bison"
substituteInPlace ./parser/Makefile --replace "/usr/bin/flex" "${flex}/bin/flex" substituteInPlace ./parser/Makefile --replace "/usr/bin/flex" "${flex}/bin/flex"
substituteInPlace ./parser/Makefile --replace "/usr/include/linux/capability.h" "${linuxHeaders}/include/linux/capability.h" substituteInPlace ./parser/Makefile --replace "/usr/include/linux/capability.h" "${linuxHeaders}/include/linux/capability.h"

View File

@ -1,17 +1,15 @@
{ stdenv, fetchurl, lvm2, json_c { stdenv, fetchurl, lvm2, json_c
, openssl, libuuid, pkgconfig, popt , openssl, libuuid, pkgconfig, popt }:
, enablePython ? false, python2 ? null }:
assert enablePython -> python2 != null;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "cryptsetup-2.1.0"; pname = "cryptsetup";
version = "2.3.3";
outputs = [ "out" "dev" "man" ]; outputs = [ "out" "dev" "man" ];
src = fetchurl { src = fetchurl {
url = "mirror://kernel/linux/utils/cryptsetup/v2.1/${name}.tar.xz"; url = "mirror://kernel/linux/utils/cryptsetup/v2.3/${pname}-${version}.tar.xz";
sha256 = "15y8n547garz0x5kqv09gscdsrz0c0y1y6c5cp8pccwg3xsb5vm3"; sha256 = "1pw2bq4nv2z3xyycckxkbp7dp9kkp2n6bspna3plryg277z4zjiv";
}; };
# Disable 4 test cases that fail in a sandbox # Disable 4 test cases that fail in a sandbox
@ -19,9 +17,6 @@ stdenv.mkDerivation rec {
postPatch = '' postPatch = ''
patchShebangs tests patchShebangs tests
${stdenv.lib.optionalString enablePython ''
patchShebangs ./python/pycryptsetup-test.py
''}
# O_DIRECT is filesystem dependent and fails in a sandbox (on tmpfs) # O_DIRECT is filesystem dependent and fails in a sandbox (on tmpfs)
# and on several filesystem types (btrfs, zfs) without sandboxing. # and on several filesystem types (btrfs, zfs) without sandboxing.
@ -34,11 +29,10 @@ stdenv.mkDerivation rec {
configureFlags = [ configureFlags = [
"--enable-cryptsetup-reencrypt" "--enable-cryptsetup-reencrypt"
"--with-crypto_backend=openssl" "--with-crypto_backend=openssl"
] ++ stdenv.lib.optional enablePython "--enable-python"; ];
nativeBuildInputs = [ pkgconfig ]; nativeBuildInputs = [ pkgconfig ];
buildInputs = [ lvm2 json_c openssl libuuid popt ] buildInputs = [ lvm2 json_c openssl libuuid popt ];
++ stdenv.lib.optional enablePython python2;
doCheck = true; doCheck = true;

View File

@ -13,7 +13,7 @@
, libxmlxx3 , libxmlxx3
, pkgconfig , pkgconfig
, python3 , python3
, scons , sconsPackages
, which , which
, wrapQtAppsHook , wrapQtAppsHook
}: }:
@ -45,7 +45,7 @@ mkDerivation rec {
nativeBuildInputs = [ nativeBuildInputs = [
desktop-file-utils desktop-file-utils
scons.py2 sconsPackages.scons_3_1_2
pkgconfig pkgconfig
which which
python python

View File

@ -1,48 +1,72 @@
{ stdenv, fetchgit, fetchpatch, pkgconfig, systemd, udev, utillinux, libuuid { stdenv
, fetchpatch
, fetchurl
, pkgconfig
, utillinux
, libuuid
, thin-provisioning-tools, libaio , thin-provisioning-tools, libaio
, enable_dmeventd ? false }: , enableCmdlib ? false
, enableDmeventd ? false
, udev ? null
, nixosTests
}:
let # configure: error: --enable-dmeventd requires --enable-cmdlib to be used as well
version = "2.03.01"; assert enableDmeventd -> enableCmdlib;
in
stdenv.mkDerivation { stdenv.mkDerivation rec {
pname = "lvm2"; pname = "lvm2" + stdenv.lib.optionalString enableDmeventd "with-dmeventd";
inherit version; version = "2.03.09";
src = fetchgit { src = fetchurl {
url = "git://sourceware.org/git/lvm2.git"; url = "https://mirrors.kernel.org/sourceware/lvm2/LVM2.${version}.tgz";
rev = "v${builtins.replaceStrings [ "." ] [ "_" ] version}"; sha256 = "0xdr9qbqw6kja267wmx6ajnfv1nhw056gpxx9v2qmfh3bj6qnfn0";
sha256 = "0jlaswf1srdxiqpgpp97j950ddjds8z0kr4pbwmal2za2blrgvbl";
}; };
configureFlags = [
"--disable-readline"
"--enable-udev_rules"
"--enable-udev_sync"
"--enable-pkgconfig"
"--enable-cmdlib"
] ++ stdenv.lib.optional enable_dmeventd " --enable-dmeventd"
++ stdenv.lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
"ac_cv_func_malloc_0_nonnull=yes"
"ac_cv_func_realloc_0_nonnull=yes"
];
nativeBuildInputs = [ pkgconfig ]; nativeBuildInputs = [ pkgconfig ];
buildInputs = [ udev libuuid thin-provisioning-tools libaio ]; buildInputs = [ udev libuuid thin-provisioning-tools libaio ];
preConfigure = configureFlags = [
'' "--disable-readline"
sed -i /DEFAULT_SYS_DIR/d Makefile.in "--enable-pkgconfig"
sed -i /DEFAULT_PROFILE_DIR/d conf/Makefile.in "--with-default-locking-dir=/run/lock/lvm"
'' + stdenv.lib.optionalString (systemd != null) '' "--with-default-run-dir=/run/lvm"
substituteInPlace scripts/lvm2_activation_generator_systemd_red_hat.c \ "--with-systemdsystemunitdir=${placeholder "out"}/lib/systemd/system"
--replace /usr/bin/udevadm ${systemd}/bin/udevadm ] ++ stdenv.lib.optionals (!enableCmdlib) [
''; "--bindir=${placeholder "bin"}/bin"
"--sbindir=${placeholder "bin"}/bin"
"--libdir=${placeholder "lib"}/lib"
] ++ stdenv.lib.optional enableCmdlib "--enable-cmdlib"
++ stdenv.lib.optionals enableDmeventd [
"--enable-dmeventd"
"--with-dmeventd-pidfile=/run/dmeventd/pid"
"--with-default-dm-run-dir=/run/dmeventd"
] ++ stdenv.lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
"ac_cv_func_malloc_0_nonnull=yes"
"ac_cv_func_realloc_0_nonnull=yes"
] ++
stdenv.lib.optionals (udev != null) [
"--enable-udev_rules"
"--enable-udev_sync"
];
preConfigure = ''
sed -i /DEFAULT_SYS_DIR/d Makefile.in
sed -i /DEFAULT_PROFILE_DIR/d conf/Makefile.in
substituteInPlace scripts/lvm2_activation_generator_systemd_red_hat.c \
--replace /usr/bin/udevadm /run/current-system/systemd/bin/udevadm
# https://github.com/lvmteam/lvm2/issues/36
substituteInPlace udev/69-dm-lvm-metad.rules.in \
--replace "(BINDIR)/systemd-run" /run/current-system/systemd/bin/systemd-run
substituteInPlace make.tmpl.in --replace "@systemdsystemunitdir@" "$out/lib/systemd/system"
substituteInPlace libdm/make.tmpl.in --replace "@systemdsystemunitdir@" "$out/lib/systemd/system"
'';
postConfigure = ''
sed -i 's|^#define LVM_CONFIGURE_LINE.*$|#define LVM_CONFIGURE_LINE "<removed>"|g' ./include/configure.h
'';
# https://github.com/NixOS/nixpkgs/pull/52597
# gcc: error: ../../device_mapper/libdevice-mapper.a: No such file or directory
enableParallelBuilding = false;
patches = stdenv.lib.optionals stdenv.hostPlatform.isMusl [ patches = stdenv.lib.optionals stdenv.hostPlatform.isMusl [
(fetchpatch { (fetchpatch {
@ -64,30 +88,41 @@ stdenv.mkDerivation {
doCheck = false; # requires root doCheck = false; # requires root
makeFlags = stdenv.lib.optionals (udev != null) [
"SYSTEMD_GENERATOR_DIR=$(out)/lib/systemd/system-generators"
];
# To prevent make install from failing. # To prevent make install from failing.
installFlags = [ "OWNER=" "GROUP=" "confdir=$(out)/etc" ]; installFlags = [ "OWNER=" "GROUP=" "confdir=$(out)/etc" ];
# Install systemd stuff. # Install systemd stuff.
#installTargets = "install install_systemd_generators install_systemd_units install_tmpfiles_configuration"; installTargets = [ "install" ] ++ stdenv.lib.optionals (udev != null) [
"install_systemd_generators"
"install_systemd_units"
"install_tmpfiles_configuration"
];
postInstall = # only split bin and lib out from out if cmdlib isn't enabled
'' outputs = [
substituteInPlace $out/lib/udev/rules.d/13-dm-disk.rules \ "out"
--replace $out/sbin/blkid ${utillinux}/sbin/blkid "dev"
'' + stdenv.lib.optionalString (systemd != null) '' "man"
# Systemd stuff ] ++ stdenv.lib.optionals (enableCmdlib != true) [
mkdir -p $out/etc/systemd/system $out/lib/systemd/system-generators "bin"
cp scripts/blk_availability_systemd_red_hat.service $out/etc/systemd/system "lib"
cp scripts/lvm2_activation_generator_systemd_red_hat $out/lib/systemd/system-generators ];
'';
postInstall = stdenv.lib.optionalString (enableCmdlib != true) ''
moveToOutput lib/libdevmapper.so $lib
'';
passthru.tests.installer = nixosTests.installer.lvm;
meta = with stdenv.lib; { meta = with stdenv.lib; {
homepage = "http://sourceware.org/lvm2/"; homepage = "http://sourceware.org/lvm2/";
description = "Tools to support Logical Volume Management (LVM) on Linux"; description = "Tools to support Logical Volume Management (LVM) on Linux";
platforms = platforms.linux; platforms = platforms.linux;
license = with licenses; [ gpl2 bsd2 lgpl21 ]; license = with licenses; [ gpl2 bsd2 lgpl21 ];
maintainers = with maintainers; [raskin]; maintainers = with maintainers; [ raskin ajs124 ];
inherit version;
downloadPage = "ftp://sources.redhat.com/pub/lvm2/";
}; };
} }

View File

@ -1,4 +0,0 @@
url ftp://sources.redhat.com/pub/lvm2/
version_link '[.]tgz$'
version '.*[^0-9.][^.]*[.]([0-9.]+)[.].*' '\1'
do_overwrite () { do_overwrite_just_version; }

View File

@ -10,6 +10,11 @@ stdenv.mkDerivation rec {
sha256 = "1mgjylklh1cx8px8ffgl12kyc0ln3445vbabd2sy8chq31rpiiq8"; sha256 = "1mgjylklh1cx8px8ffgl12kyc0ln3445vbabd2sy8chq31rpiiq8";
}; };
patches = [
# fix build with json-c 0.14 https://www.redhat.com/archives/dm-devel/2020-May/msg00261.html
./json-c-0.14.patch
];
postPatch = '' postPatch = ''
substituteInPlace libmultipath/Makefile --replace /usr/include/libdevmapper.h ${lvm2}/include/libdevmapper.h substituteInPlace libmultipath/Makefile --replace /usr/include/libdevmapper.h ${lvm2}/include/libdevmapper.h
sed -i -re ' sed -i -re '

View File

@ -0,0 +1,21 @@
diff --git a/libdmmp/libdmmp_private.h b/libdmmp/libdmmp_private.h
index ac85b63f..b1a6ddea 100644
--- a/libdmmp/libdmmp_private.h
+++ b/libdmmp/libdmmp_private.h
@@ -30,6 +30,7 @@
#include <stdint.h>
#include <string.h>
#include <assert.h>
+#include <stdbool.h>
#include <json.h>
#include "libdmmp/libdmmp.h"
@@ -82,7 +83,7 @@ static out_type func_name(struct dmmp_context *ctx, const char *var_name) { \
do { \
json_type j_type = json_type_null; \
json_object *j_obj_tmp = NULL; \
- if (json_object_object_get_ex(j_obj, key, &j_obj_tmp) != TRUE) { \
+ if (json_object_object_get_ex(j_obj, key, &j_obj_tmp) != true) { \
_error(ctx, "Invalid JSON output from multipathd IPC: " \
"key '%s' not found", key); \
rc = DMMP_ERR_IPC_ERROR; \

View File

@ -14,16 +14,6 @@ diff --git a/src/hostname/hostnamed.c b/src/hostname/hostnamed.c
index 21f6471495..8c5af7619f 100644 index 21f6471495..8c5af7619f 100644
--- a/src/hostname/hostnamed.c --- a/src/hostname/hostnamed.c
+++ b/src/hostname/hostnamed.c +++ b/src/hostname/hostnamed.c
@@ -422,6 +422,9 @@ static int method_set_hostname(sd_bus_message *m, void *userdata, sd_bus_error *
if (r < 0)
return r;
+ return sd_bus_error_setf(error, SD_BUS_ERROR_NOT_SUPPORTED,
+ "Changing system settings via systemd is not supported on NixOS.");
+
if (isempty(name))
name = c->data[PROP_STATIC_HOSTNAME];
@@ -478,6 +481,9 @@ static int method_set_static_hostname(sd_bus_message *m, void *userdata, sd_bus_ @@ -478,6 +481,9 @@ static int method_set_static_hostname(sd_bus_message *m, void *userdata, sd_bus_
if (r < 0) if (r < 0)
return r; return r;

View File

@ -1,4 +1,4 @@
{ fetchurl, stdenv, scons, pkgconfig, dbus, dbus-glib { fetchurl, stdenv, sconsPackages, pkgconfig, dbus, dbus-glib
, ncurses, libX11, libXt, libXpm, libXaw, libXext , ncurses, libX11, libXt, libXpm, libXaw, libXext
, libusb1, docbook_xml_dtd_412, docbook_xsl, bc , libusb1, docbook_xml_dtd_412, docbook_xsl, bc
, libxslt, xmlto, gpsdUser ? "gpsd", gpsdGroup ? "dialout" , libxslt, xmlto, gpsdUser ? "gpsd", gpsdGroup ? "dialout"
@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
}; };
nativeBuildInputs = [ nativeBuildInputs = [
scons.py2 pkgconfig docbook_xml_dtd_412 docbook_xsl xmlto bc sconsPackages.scons_3_1_2 pkgconfig docbook_xml_dtd_412 docbook_xsl xmlto bc
python2Packages.python python2Packages.python
python2Packages.wrapPython python2Packages.wrapPython
]; ];

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, scons, boost, gperftools, pcre-cpp, snappy, zlib, libyamlcpp { stdenv, fetchurl, sconsPackages, boost, gperftools, pcre-cpp, snappy, zlib, libyamlcpp
, sasl, openssl, libpcap, python27, python38, curl, Security, CoreFoundation, cctools }: , sasl, openssl, libpcap, python27, python38, curl, Security, CoreFoundation, cctools }:
# Note: # Note:
@ -13,12 +13,12 @@ with stdenv.lib;
let let
variants = if versionAtLeast version "4.2" variants = if versionAtLeast version "4.2"
then { python = python38.withPackages (ps: with ps; [ pyyaml cheetah3 psutil setuptools ]); then { python = python38.withPackages (ps: with ps; [ pyyaml cheetah3 psutil setuptools ]);
scons = scons; scons = sconsPackages.scons_latest;
mozjsVersion = "60"; mozjsVersion = "60";
mozjsReplace = "defined(HAVE___SINCOS)"; mozjsReplace = "defined(HAVE___SINCOS)";
} }
else { python = python27.withPackages (ps: with ps; [ pyyaml typing cheetah ]); else { python = python27.withPackages (ps: with ps; [ pyyaml typing cheetah ]);
scons = scons.py2; scons = sconsPackages.scons_3_1_2;
mozjsVersion = "45"; mozjsVersion = "45";
mozjsReplace = "defined(HAVE_SINCOS)"; mozjsReplace = "defined(HAVE_SINCOS)";
}; };

View File

@ -2,7 +2,8 @@
, fixDarwinDylibNames , fixDarwinDylibNames
, file , file
, legacySupport ? false , legacySupport ? false
, enableShared ? true }: , static ? false
}:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "zstd"; pname = "zstd";
@ -28,9 +29,24 @@ stdenv.mkDerivation rec {
# work fine, and I'm not sure how to write the condition. # work fine, and I'm not sure how to write the condition.
++ stdenv.lib.optional stdenv.hostPlatform.isWindows ./mcfgthreads-no-pthread.patch; ++ stdenv.lib.optional stdenv.hostPlatform.isWindows ./mcfgthreads-no-pthread.patch;
postPatch =
# Patch shebangs for playTests
''
patchShebangs programs/zstdgrep
'' + stdenv.lib.optionalString (!static) ''
substituteInPlace build/cmake/CMakeLists.txt \
--replace 'message(SEND_ERROR "You need to build static library to build tests")' ""
substituteInPlace build/cmake/tests/CMakeLists.txt \
--replace 'libzstd_static' 'libzstd_shared'
sed -i \
"1aexport ${stdenv.lib.optionalString stdenv.isDarwin "DY"}LD_LIBRARY_PATH=$PWD/build_/lib" \
tests/playTests.sh
'';
cmakeFlags = [ cmakeFlags = [
"-DZSTD_BUILD_SHARED:BOOL=${if enableShared then "ON" else "OFF"}" "-DZSTD_BUILD_SHARED:BOOL=${if (!static) then "ON" else "OFF"}"
# They require STATIC for bin/zstd and tests. "-DZSTD_BUILD_STATIC:BOOL=${if static then "ON" else "OFF"}"
"-DZSTD_PROGRAMS_LINK_SHARED:BOOL=${if (!static) then "ON" else "OFF"}"
"-DZSTD_LEGACY_SUPPORT:BOOL=${if legacySupport then "ON" else "OFF"}" "-DZSTD_LEGACY_SUPPORT:BOOL=${if legacySupport then "ON" else "OFF"}"
"-DZSTD_BUILD_TESTS:BOOL=ON" "-DZSTD_BUILD_TESTS:BOOL=ON"
]; ];
@ -56,8 +72,6 @@ stdenv.mkDerivation rec {
substituteInPlace ../programs/zstdless \ substituteInPlace ../programs/zstdless \
--replace "zstdcat" "$bin/bin/zstdcat" --replace "zstdcat" "$bin/bin/zstdcat"
''; '';
# Don't duplicate the library code in runtime closures.
postInstall = stdenv.lib.optionalString enableShared ''rm "$out"/lib/libzstd.a'';
outputs = [ "bin" "dev" "man" "out" ]; outputs = [ "bin" "dev" "man" "out" ];

View File

@ -4,11 +4,11 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "btrfs-progs"; pname = "btrfs-progs";
version = "5.6.1"; version = "5.7";
src = fetchurl { src = fetchurl {
url = "mirror://kernel/linux/kernel/people/kdave/btrfs-progs/btrfs-progs-v${version}.tar.xz"; url = "mirror://kernel/linux/kernel/people/kdave/btrfs-progs/btrfs-progs-v${version}.tar.xz";
sha256 = "1nwnvjdnr9fjj2q2p2vpjabfdhcrwykgj9knjcsqy0c7p1bgbk2h"; sha256 = "0p6ycbr8sw5bq3mj84gh9rvh5sk8sjr2l9hb9dhm4j41ij5h8bsw";
}; };
nativeBuildInputs = [ nativeBuildInputs = [

View File

@ -2,13 +2,13 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "fluent-bit"; pname = "fluent-bit";
version = "1.4.6"; version = "1.5.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "fluent"; owner = "fluent";
repo = "fluent-bit"; repo = "fluent-bit";
rev = "v${version}"; rev = "v${version}";
sha256 = "0qxyjmgl85q7xk629l548bpzizma5n4j1r6nqbwh9j15ajvq7mq8"; sha256 = "15nfzs1p6na0n98hpzh4lnzcj4g83dg2nfhd4f9lay32qj12cqgj";
}; };
nativeBuildInputs = [ cmake flex bison ]; nativeBuildInputs = [ cmake flex bison ];

View File

@ -1,5 +1,5 @@
{ stdenv, fetchurl, { stdenv, fetchurl,
bison, re2c, scons, bison, re2c, sconsPackages,
libcxx libcxx
}: }:
@ -16,7 +16,7 @@ stdenv.mkDerivation {
sha256 = "16k4pkwyr2mh5w8j91vhxh9aff7f4y31npwf09w6f8q63fxvpy41"; sha256 = "16k4pkwyr2mh5w8j91vhxh9aff7f4y31npwf09w6f8q63fxvpy41";
}; };
buildInputs = [ bison re2c scons.py2 ]; buildInputs = [ bison re2c sconsPackages.scons_3_1_2 ];
patches = [ patches = [
./gringo-4.5.4-cmath.patch ./gringo-4.5.4-cmath.patch

View File

@ -1,11 +1,11 @@
{ stdenv, fetchurl, pkgconfig, libpipeline, db, groff, libiconv, makeWrapper, buildPackages }: { stdenv, fetchurl, pkgconfig, libpipeline, db, groff, libiconv, makeWrapper, buildPackages }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "man-db-2.9.2"; name = "man-db-2.9.3";
src = fetchurl { src = fetchurl {
url = "mirror://savannah/man-db/${name}.tar.xz"; url = "mirror://savannah/man-db/${name}.tar.xz";
sha256 = "0z04kwv5ymmd0pzadpaag696jfckg6rbz8x4jrgj09bmqqk3yf3v"; sha256 = "1f4palf5bdyf3f8sa0981cqxn9cjcr2pz53ngrrsybb9n0da2nps";
}; };
outputs = [ "out" "doc" ]; outputs = [ "out" "doc" ];

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, pkgconfig, libusb1, libyubikey, json_c }: { stdenv, fetchurl, fetchpatch, pkgconfig, libusb1, libyubikey, json_c }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "yubikey-personalization"; pname = "yubikey-personalization";
@ -9,6 +9,15 @@ stdenv.mkDerivation rec {
sha256 = "14wvlwqnwj0gllkpvfqiy8ns938bwvjsz8x1hmymmx32m074vj0f"; sha256 = "14wvlwqnwj0gllkpvfqiy8ns938bwvjsz8x1hmymmx32m074vj0f";
}; };
patches = [
# remove after updating to next release
(fetchpatch {
name = "json-c-0.14-support.patch";
url = "https://github.com/Yubico/yubikey-personalization/commit/0aa2e2cae2e1777863993a10c809bb50f4cde7f8.patch";
sha256 = "1wnigf3hbq59i15kgxpq3pwrl1drpbj134x81mmv9xm1r44cjva8";
})
];
nativeBuildInputs = [ pkgconfig ]; nativeBuildInputs = [ pkgconfig ];
buildInputs = [ libusb1 libyubikey json_c ]; buildInputs = [ libusb1 libyubikey json_c ];

View File

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, dbus, json_c, ncurses, connman }: { stdenv, fetchpatch, fetchFromGitHub, autoreconfHook, pkgconfig, dbus, json_c, ncurses, connman }:
stdenv.mkDerivation { stdenv.mkDerivation {
pname = "connman-ncurses"; pname = "connman-ncurses";
@ -11,12 +11,21 @@ stdenv.mkDerivation {
sha256 = "1831r0776fv481g8kgy1dkl750pzv47835dw11sslq2k6mm6i9p1"; sha256 = "1831r0776fv481g8kgy1dkl750pzv47835dw11sslq2k6mm6i9p1";
}; };
patches = [
# Fix build with json-c 0.14
(fetchpatch {
url = "https://github.com/void-linux/void-packages/raw/5830ce60e922b7dced8157ededda8c995adb3bb9/srcpkgs/connman-ncurses/patches/lowercase-boolean.patch";
extraPrefix = "";
sha256 = "uK83DeRyXS2Y0ZZpTYvYNh/1ZM2QQ7QpajiBztaEuSM=";
})
];
nativeBuildInputs = [ autoreconfHook pkgconfig ]; nativeBuildInputs = [ autoreconfHook pkgconfig ];
buildInputs = [ dbus ncurses json_c connman ]; buildInputs = [ dbus ncurses json_c connman ];
NIX_CFLAGS_COMPILE = "-Wno-error"; NIX_CFLAGS_COMPILE = "-Wno-error";
installPhase = '' installPhase = ''
mkdir -p "$out/bin" mkdir -p "$out/bin"
cp -va connman_ncurses "$out/bin/" cp -va connman_ncurses "$out/bin/"

View File

@ -29,14 +29,14 @@ assert gssSupport -> libkrb5 != null;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "curl"; pname = "curl";
version = "7.71.0"; version = "7.71.1";
src = fetchurl { src = fetchurl {
urls = [ urls = [
"https://curl.haxx.se/download/${pname}-${version}.tar.bz2" "https://curl.haxx.se/download/${pname}-${version}.tar.bz2"
"https://github.com/curl/curl/releases/download/${lib.replaceStrings ["."] ["_"] pname}-${version}/${pname}-${version}.tar.bz2" "https://github.com/curl/curl/releases/download/${lib.replaceStrings ["."] ["_"] pname}-${version}/${pname}-${version}.tar.bz2"
]; ];
sha256 = "0hfkbp51vj51s28sq2wnw5jn2f6r7ycdy78lli49ba414jn003v0"; sha256 = "097jnkbayscifgzgl7v8kwd7m2crpvbyaazac3ab1yal0pca8llx";
}; };
outputs = [ "bin" "dev" "out" "man" "devdoc" ]; outputs = [ "bin" "dev" "out" "man" "devdoc" ];

View File

@ -10,11 +10,11 @@ let
pythonForDocs = python3.withPackages (pkgs: with pkgs; [ pygobject3 ]); pythonForDocs = python3.withPackages (pkgs: with pkgs; [ pygobject3 ]);
in stdenv.mkDerivation rec { in stdenv.mkDerivation rec {
pname = "network-manager"; pname = "network-manager";
version = "1.22.10"; version = "1.26.0";
src = fetchurl { src = fetchurl {
url = "mirror://gnome/sources/NetworkManager/${stdenv.lib.versions.majorMinor version}/NetworkManager-${version}.tar.xz"; url = "mirror://gnome/sources/NetworkManager/${stdenv.lib.versions.majorMinor version}/NetworkManager-${version}.tar.xz";
sha256 = "0xyaizyp3yz6x3pladw3nvl3hf4n5g140zx9jnxfp9qvag0wqa9b"; sha256 = "0isdqwp58d7r92sqsk7l2vlqwy518n8b7c7z94jk9gc1bdmjf8sj";
}; };
outputs = [ "out" "dev" "devdoc" "man" "doc" ]; outputs = [ "out" "dev" "devdoc" "man" "doc" ];
@ -41,7 +41,6 @@ in stdenv.mkDerivation rec {
"-Dcrypto=gnutls" "-Dcrypto=gnutls"
"-Dsession_tracking=systemd" "-Dsession_tracking=systemd"
"-Dmodem_manager=true" "-Dmodem_manager=true"
"-Dpolkit_agent=true"
"-Dnmtui=true" "-Dnmtui=true"
"-Ddocs=true" "-Ddocs=true"
"-Dtests=no" "-Dtests=no"
@ -49,12 +48,14 @@ in stdenv.mkDerivation rec {
# Allow using iwd when configured to do so # Allow using iwd when configured to do so
"-Diwd=true" "-Diwd=true"
"-Dlibaudit=yes-disabled-by-default" "-Dlibaudit=yes-disabled-by-default"
# We don't use firewalld in NixOS
"-Dfirewalld_zone=false"
]; ];
patches = [ patches = [
(substituteAll { (substituteAll {
src = ./fix-paths.patch; src = ./fix-paths.patch;
inherit iputils kmod openconnect ethtool gnused systemd; inherit iputils kmod openconnect ethtool gnused systemd polkit;
inherit runtimeShell; inherit runtimeShell;
}) })

View File

@ -1,8 +1,8 @@
diff --git a/meson.build b/meson.build diff --git a/meson.build b/meson.build
index 0af69f35d..9ab239c8a 100644 index a2d925a7e..5a65cd2fe 100644
--- a/meson.build --- a/meson.build
+++ b/meson.build +++ b/meson.build
@@ -912,9 +912,9 @@ meson.add_install_script( @@ -959,9 +959,9 @@ meson.add_install_script(
join_paths('tools', 'meson-post-install.sh'), join_paths('tools', 'meson-post-install.sh'),
nm_datadir, nm_datadir,
nm_bindir, nm_bindir,

View File

@ -1,8 +1,21 @@
diff --git a/clients/common/nm-polkit-listener.c b/clients/common/nm-polkit-listener.c
index ace205e80..f19c1dea0 100644
--- a/clients/common/nm-polkit-listener.c
+++ b/clients/common/nm-polkit-listener.c
@@ -552,7 +552,7 @@ begin_authentication (AuthRequest *request)
{
int fd_flags;
const char *helper_argv[] = {
- POLKIT_PACKAGE_PREFIX "/lib/polkit-1/polkit-agent-helper-1",
+ "/run/wrappers/bin/polkit-agent-helper-1",
request->username,
NULL,
};
diff --git a/clients/common/nm-vpn-helpers.c b/clients/common/nm-vpn-helpers.c diff --git a/clients/common/nm-vpn-helpers.c b/clients/common/nm-vpn-helpers.c
index ffae5f553..ba1093e4d 100644 index 74ff52bb2..638857df4 100644
--- a/clients/common/nm-vpn-helpers.c --- a/clients/common/nm-vpn-helpers.c
+++ b/clients/common/nm-vpn-helpers.c +++ b/clients/common/nm-vpn-helpers.c
@@ -203,10 +203,7 @@ nm_vpn_openconnect_authenticate_helper (const char *host, @@ -213,10 +213,7 @@ nm_vpn_openconnect_authenticate_helper (const char *host,
NULL, NULL,
}; };
@ -40,35 +53,25 @@ index 91ebd9a36..5201a56c3 100644
ExecStart=@sbindir@/NetworkManager --no-daemon ExecStart=@sbindir@/NetworkManager --no-daemon
Restart=on-failure Restart=on-failure
diff --git a/libnm/meson.build b/libnm/meson.build diff --git a/libnm/meson.build b/libnm/meson.build
index 51ca46d2b..0c04cc216 100644 index d3991ab19..58f01c666 100644
--- a/libnm/meson.build --- a/libnm/meson.build
+++ b/libnm/meson.build +++ b/libnm/meson.build
@@ -261,7 +261,7 @@ if enable_introspection @@ -283,7 +283,6 @@ if enable_introspection
name, output: 'nm-settings-docs-gir.xml',
input: libnm_gir[0], command: [
output: name, generate_setting_docs_env,
- command: [generate_setting_docs_env, python.path(), generate_setting_docs, '--lib-path', meson.current_build_dir(), '--gir', '@INPUT@', '--output', '@OUTPUT@'], - python.path(),
+ command: [generate_setting_docs_env, generate_setting_docs, '--lib-path', meson.current_build_dir(), '--gir', '@INPUT@', '--output', '@OUTPUT@'], join_paths(meson.source_root(), 'tools', 'generate-docs-nm-settings-docs-gir.py'),
depends: libnm_gir, '--lib-path', meson.current_build_dir(),
) '--gir', '@INPUT@',
@@ -270,7 +270,7 @@ if enable_introspection
name,
input: [libnm_gir[0], nm_settings_docs_overrides],
output: name,
- command: [generate_setting_docs_env, python.path(), generate_setting_docs, '--lib-path', meson.current_build_dir(), '--gir', '@INPUT0@', '--overrides', '@INPUT1@', '--output', '@OUTPUT@'],
+ command: [generate_setting_docs_env, generate_setting_docs, '--lib-path', meson.current_build_dir(), '--gir', '@INPUT0@', '--overrides', '@INPUT1@', '--output', '@OUTPUT@'],
depends: libnm_gir,
)
endif
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c
index e7a4a059a..0a8f8b7c6 100644 index de09e4807..2755db165 100644
--- a/src/devices/nm-device.c --- a/src/devices/nm-device.c
+++ b/src/devices/nm-device.c +++ b/src/devices/nm-device.c
@@ -13179,14 +13179,14 @@ nm_device_start_ip_check (NMDevice *self) @@ -13705,14 +13705,14 @@ nm_device_start_ip_check (NMDevice *self)
gw = nm_ip4_config_best_default_route_get (priv->ip_config_4); gw = nm_ip4_config_best_default_route_get (priv->ip_config_4);
if (gw) { if (gw) {
nm_utils_inet4_ntop (NMP_OBJECT_CAST_IP4_ROUTE (gw)->gateway, buf); _nm_utils_inet4_ntop (NMP_OBJECT_CAST_IP4_ROUTE (gw)->gateway, buf);
- ping_binary = nm_utils_find_helper ("ping", "/usr/bin/ping", NULL); - ping_binary = nm_utils_find_helper ("ping", "/usr/bin/ping", NULL);
+ ping_binary = "@iputils@/bin/ping"; + ping_binary = "@iputils@/bin/ping";
log_domain = LOGD_IP4; log_domain = LOGD_IP4;
@ -76,14 +79,14 @@ index e7a4a059a..0a8f8b7c6 100644
} else if (priv->ip_config_6 && priv->ip_state_6 == NM_DEVICE_IP_STATE_DONE) { } else if (priv->ip_config_6 && priv->ip_state_6 == NM_DEVICE_IP_STATE_DONE) {
gw = nm_ip6_config_best_default_route_get (priv->ip_config_6); gw = nm_ip6_config_best_default_route_get (priv->ip_config_6);
if (gw) { if (gw) {
nm_utils_inet6_ntop (&NMP_OBJECT_CAST_IP6_ROUTE (gw)->gateway, buf); _nm_utils_inet6_ntop (&NMP_OBJECT_CAST_IP6_ROUTE (gw)->gateway, buf);
- ping_binary = nm_utils_find_helper ("ping6", "/usr/bin/ping6", NULL); - ping_binary = nm_utils_find_helper ("ping6", "/usr/bin/ping6", NULL);
+ ping_binary = "@iputils@/bin/ping"; + ping_binary = "@iputils@/bin/ping";
log_domain = LOGD_IP6; log_domain = LOGD_IP6;
} }
} }
diff --git a/src/nm-core-utils.c b/src/nm-core-utils.c diff --git a/src/nm-core-utils.c b/src/nm-core-utils.c
index fb92289f0..c91b27b09 100644 index 3950c3c3a..a9436d75a 100644
--- a/src/nm-core-utils.c --- a/src/nm-core-utils.c
+++ b/src/nm-core-utils.c +++ b/src/nm-core-utils.c
@@ -336,7 +336,7 @@ nm_utils_modprobe (GError **error, gboolean suppress_error_logging, const char * @@ -336,7 +336,7 @@ nm_utils_modprobe (GError **error, gboolean suppress_error_logging, const char *

View File

@ -0,0 +1,13 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8bd825f..694d9b2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -72,6 +72,8 @@ if(WITH_JSON)
endif()
add_definitions("-DJSON")
+ # JSON_CFLAGS is a list, i.e. semicolon-separated, convert it to space-separated
+ string(REPLACE ";" " " JSON_CFLAGS "${JSON_CFLAGS}")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${JSON_CFLAGS}")
endif()

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