<ins> { clangStdenv , lib , runCommandWith , writeShellScript , fetchFromGitHub , fetchpatch , freetype , libjpeg , libpng , libtiff , giflib , libX11 , libXext , libXrandr , libXcursor , libxkbfile , cairo , libglvnd , fontconfig , dbus , libGLU , fuse , ffmpeg , pulseaudio , makeWrapper , python2 , python3 , cmake , ninja , pkg-config , bison , flex , libbsd , openssl , xdg-user-dirs , addOpenGLRunpath # Whether to pre-compile Python 2 bytecode for performance. , compilePy2Bytecode ? false }: let stdenv = clangStdenv; # The build system invokes clang to compile Darwin executables. # In this case, our cc-wrapper must not be used. ccWrapperBypass = runCommandWith { inherit stdenv; name = "cc-wrapper-bypass"; runLocal = false; derivationArgs = { template = writeShellScript "template" '' for (( i=1; i<=$#; i++)); do j=$((i+1)) if [[ "''${!i}" == "-target" && "''${!j}" == *"darwin"* ]]; then # their flags must take precedence exec @unwrapped@ "$@" $NIX_CFLAGS_COMPILE fi done exec @wrapped@ "$@" ''; }; } '' unwrapped_bin=${stdenv.cc.cc}/bin wrapped_bin=${stdenv.cc}/bin mkdir -p $out/bin unwrapped=$unwrapped_bin/$CC wrapped=$wrapped_bin/$CC  substituteAll $template $out/bin/$CC unwrapped=$unwrapped_bin/$CXX wrapped=$wrapped_bin/$CXX  substituteAll $template $out/bin/$CXX chmod +x $out/bin/$CC $out/bin/$CXX ''; wrappedLibs = [ # To find all of them: rg -w wrap_elf # src/native/CMakeLists.txt freetype libjpeg libpng libtiff giflib libX11 libXext libXrandr libXcursor libxkbfile cairo libglvnd fontconfig dbus libGLU # src/external/darling-dmg/CMakeLists.txt fuse # src/CoreAudio/CMakeLists.txt ffmpeg pulseaudio ]; in stdenv.mkDerivation { pname = "darling"; version = "unstable-2023-05-02"; src = fetchFromGitHub { owner = "darlinghq"; repo = "darling"; rev = "557e7e9dece394a3f623825679474457e5b64fd0"; fetchSubmodules = true; hash = "sha256-SOoLaV7wg33qRHPQXkdMvrY++CvoG85kwd6IU6DkYa0="; }; outputs = [ "out" "sdk" ]; postPatch = '' # We have to be careful - Patching everything indiscriminately # would affect Darwin scripts as well chmod +x src/external/bootstrap_cmds/migcom.tproj/mig.sh patchShebangs  src/external/bootstrap_cmds/migcom.tproj/mig.sh  src/external/darlingserver/scripts  src/external/openssl_certificates/scripts substituteInPlace src/startup/CMakeLists.txt --replace SETUID "" substituteInPlace src/external/basic_cmds/CMakeLists.txt --replace SETGID "" ''; nativeBuildInputs = [ bison ccWrapperBypass cmake flex makeWrapper ninja pkg-config python3 ] ++ lib.optional compilePy2Bytecode python2; buildInputs = wrappedLibs ++ [ libbsd openssl stdenv.cc.libc.linuxHeaders ]; # Breaks valid paths like # Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include dontFixCmake = true; # src/external/objc4 forces OBJC_IS_DEBUG_BUILD=1, which conflicts with NDEBUG # TODO: Fix in a better way cmakeBuildType = " "; cmakeFlags = [ "-DTARGET_i386=OFF" "-DCOMPILE_PY2_BYTECODE=${if compilePy2Bytecode then "ON" else "OFF"}" "-DDARLINGSERVER_XDG_USER_DIR_CMD=${xdg-user-dirs}/bin/xdg-user-dir" ]; env.NIX_CFLAGS_COMPILE = "-Wno-macro-redefined -Wno-unused-command-line-argument"; # Linux .so's are dlopen'd by wrapgen during the build env.LD_LIBRARY_PATH = lib.makeLibraryPath wrappedLibs; # Breaks shebangs of Darwin scripts dontPatchShebangs = true; postInstall = '' # Install the SDK as a separate output mkdir -p $sdk sdkDir=$(readlink -f ../Developer) while read -r path; do dst="$sdk/Developer/''${path#$sdkDir}" if [[ -L "$path" ]]; then target=$(readlink -m "$path") if [[ -e "$target" && "$target" == "$NIX_BUILD_TOP"* && "$target" != "$sdkDir"* ]]; then # dereference cp -r -L "$path" "$dst" elif [[ -e "$target" ]]; then # preserve symlink cp -d "$path" "$dst" else # ignore symlink >&2 echo "Ignoring symlink $path -> $target" fi elif [[ -f $path ]]; then cp "$path" "$dst" elif [[ -d $path ]]; then mkdir -p "$dst" fi done < <(find $sdkDir) mkdir -p $sdk/bin cp src/external/cctools-port/cctools/ld64/src/*-ld $sdk/bin cp src/external/cctools-port/cctools/ar/*-{ar,ranlib} $sdk/bin ''; postFixup = '' echo "Checking for references to $NIX_STORE in Darling root..." set +e grep -r --exclude=mldr "$NIX_STORE" $out/libexec/darling ret=$? set -e if [[ $ret == 0 ]]; then echo "Found references to $NIX_STORE in Darling root (see above)" exit 1 fi patchelf --add-rpath "${lib.makeLibraryPath wrappedLibs}:${addOpenGLRunpath.driverLink}/lib"  $out/libexec/darling/usr/libexec/darling/mldr ''; meta = with lib; { description = "Open-source Darwin/macOS emulation layer for Linux"; homepage = "https://www.darlinghq.org"; license = licenses.gpl3Plus; maintainers = with maintainers; [ zhaofengli ]; platforms = [ "x86_64-linux" ]; }; } </ins>


dae = callPackage ../tools/networking/dae { }; <ins> darling = callPackage ../applications/emulators/darling { }; </ins> databricks-sql-cli = python3Packages.callPackage ../applications/misc/databricks-sql-cli { }; dhallDirectoryToNix = callPackage ../build-support/dhall/directory-to-nix.nix { };


.PHONY: debug debug: generated manual-combined.xml <del> manual-combined.xml: generated *.xml </del> <ins> manual-combined.xml: generated *.xml **/*.xml </ins> rm -f ./manual-combined.xml nix-shell --packages xmloscopy  --run "xmloscopy --docbook5 ./manual.xml ./manual-combined.xml"


For systems without CD drive, the NixOS live CD can be booted from a USB stick. You can use the <command>dd</command> utility to write the image: <command>dd if=<replaceable>path-to-image</replaceable> <del> of=<replaceable>/dev/sdb</replaceable></command>. Be careful about specifying </del> <ins> of=<replaceable>/dev/sdX</replaceable></command>. Be careful about specifying </ins> the correct drive; you can use the <command>lsblk</command> command to get a list of block devices. <del> </para> <para> On macOS: </del> <ins> <note> <title>On macOS</title> <para> </ins> <programlisting> $ diskutil list [..]


Unmount of all volumes on diskN was successful $ sudo dd bs=1m if=nix.iso of=/dev/rdiskN </programlisting> <del> Using the 'raw' <command>rdiskN</command> device instead of <command>diskN</command> completes in minutes instead of hours. After <command>dd</command> completes, a GUI dialog "The disk you inserted was not readable by this computer" will pop up, which can be ignored. </del> <ins> Using the 'raw' <command>rdiskN</command> device instead of <command>diskN</command> completes in minutes instead of hours. After <command>dd</command> completes, a GUI dialog "The disk you inserted was not readable by this computer" will pop up, which can be ignored. </para> </note> </ins> </para> <para> The <command>dd</command> utility will write the image verbatim to the drive, making it the recommended option for both UEFI and non-UEFI installations. <del> For non-UEFI installations, you can alternatively use <link xlink:href="http://unetbootin.sourceforge.net/">unetbootin</link>. If you cannot use <command>dd</command> for a UEFI installation, you can also mount the ISO, copy its contents verbatim to your drive, then either: <itemizedlist> <listitem> <para> Change the label of the disk partition to the label of the ISO (visible with the blkid command), or </para> </listitem> <listitem> <para> Edit <filename>loader/entries/nixos-livecd.conf</filename> on the drive and change the <literal>root=</literal> field in the <literal>options</literal> line to point to your drive (see the documentation on <literal>root=</literal> in <link xlink:href="https://www.kernel.org/doc/Documentation/admin-guide/kernel-parameters.txt"> the kernel documentation</link> for more details). </para> </listitem> <listitem> <para> If you want to load the contents of the ISO to ram after bootin (So you can remove the stick after bootup) you can append the parameter <literal>copytoram</literal> to the <literal>options</literal> field. </para> </listitem> </itemizedlist> </del> </para> </section>


version="5.0" xml:id="sec-installation"> <title>Installing NixOS</title> <del> <para> NixOS can be installed on BIOS or UEFI systems. The procedure for a UEFI installation is by and large the same as a BIOS installation. The differences are mentioned in the steps that follow. </para> <orderedlist> <listitem> <para> Boot from the CD. </para> <variablelist> <varlistentry> <term> UEFI systems </term> <listitem> <para> You should boot the live CD in UEFI mode (consult your specific hardware's documentation for instructions). You may find the <link xlink:href="http://www.rodsbooks.com/refind">rEFInd boot manager</link> useful. </para> </listitem> </varlistentry> </variablelist> </listitem> <listitem> <para> The CD contains a basic NixOS installation. (It also contains Memtest86+, useful if you want to test new hardware). When it’s finished booting, it should have detected most of your hardware. </para> </listitem> <listitem> <para> The NixOS manual is available on virtual console 8 (press Alt+F8 to access) or by running <command>nixos-help</command>. </para> </listitem> <listitem> <para> You get logged in as <literal>root</literal> (with empty password). </para> </listitem> <listitem> <para> If you downloaded the graphical ISO image, you can run <command>systemctl start display-manager</command> to start KDE. If you want to continue on the terminal, you can use <command>loadkeys</command> to switch to your preferred keyboard layout. (We even provide neo2 via <command>loadkeys de neo</command>!) </para> </listitem> <listitem> </del> <ins> <section xml:id="sec-installation-booting"> <title>Booting the system</title> <para> NixOS can be installed on BIOS or UEFI systems. The procedure for a UEFI installation is by and large the same as a BIOS installation. The differences are mentioned in the steps that follow. </para> <para> The installation media can be burned to a CD, or now more commonly, "burned" to a USB drive (see <xref linkend="sec-booting-from-usb"/>). </para> <para> The installation media contains a basic NixOS installation. When it’s finished booting, it should have detected most of your hardware. </para> <para> The NixOS manual is available on virtual console 8 (press Alt+F8 to access) or by running <command>nixos-help</command>. </para> <para> You are logged-in automatically as <literal>root</literal>. (The <literal>root</literal> user account has an empty password.) </para> <para> If you downloaded the graphical ISO image, you can run <command>systemctl start display-manager</command> to start KDE. If you want to continue on the terminal, you can use <command>loadkeys</command> to switch to your preferred keyboard layout. (We even provide neo2 via <command>loadkeys de neo</command>!) </para> <section xml:id="sec-installation-booting-networking"> <title>Networking in the installer</title> </ins> <para> The boot process should have brought up networking (check <command>ip a</command>). Networking is necessary for the installer, since it will


binaries). It’s best if you have a DHCP server on your network. Otherwise configure networking manually using <command>ifconfig</command>. </para> <para> To manually configure the network on the graphical installer, first disable network-manager with <command>systemctl stop network-manager</command>. </para> <para> To manually configure the wifi on the minimal installer, run <command>wpa_supplicant -B -i interface -c <(wpa_passphrase 'SSID' 'key')</command>. </para> <del> </listitem> <listitem> </del> <para> If you would like to continue the installation from a different machine you need to activate the SSH daemon via <literal>systemctl start sshd</literal>. In order to be able to login you also need to set a password for <literal>root</literal> using <literal>passwd</literal>. </para> <del> </listitem> <listitem> </del> <ins> </section> </section> <section xml:id="sec-installation-partitioning"> <title>Partitioning and formatting</title> <para> The NixOS installer doesn’t do any partitioning or formatting, so you need to do that yourself. </para> <para> The NixOS installer ships with multiple partitioning tools. The examples below use <command>parted</command>, but also provides <command>fdisk</command>, <command>gdisk</command>, <command>cfdisk</command>, and <command>cgdisk</command>. </para> <para> The recommended partition scheme differs depending if the computer uses <emphasis>Legacy Boot</emphasis> or <emphasis>UEFI</emphasis>. </para> <section xml:id="sec-installation-partitioning-UEFI"> <title>UEFI (GPT)</title> </ins> <para> <del> The NixOS installer doesn’t do any partitioning or formatting yet, so you need to do that yourself. Use the following commands: <itemizedlist> </del> <ins> Here's an example partition scheme for UEFI, using <filename>/dev/sda</filename> as the device. <note> <para> You can safely ignore <command>parted</command>'s informational message about needing to update /etc/fstab. </para> </note> </para> <para> <orderedlist> </ins> <listitem> <para> <del> For partitioning: <command>fdisk</command>. <screen> # fdisk /dev/sda # <lineannotation>(or whatever device you want to install on)</lineannotation> -- for UEFI systems only > n      # <lineannotation>(create a new partition for /boot)</lineannotation> > 3      # <lineannotation>(make it a partition number 3)</lineannotation> >        # <lineannotation>(press enter to accept the default)</lineannotation> > +512M  # <lineannotation>(the size of the UEFI boot partition)</lineannotation> > t      # <lineannotation>(change the partition type ...)</lineannotation> > 3      # <lineannotation>(... of the boot partition ...)</lineannotation> > 1      # <lineannotation>(... to 'UEFI System')</lineannotation> -- for BIOS or UEFI systems > n      # <lineannotation>(create a new partition for /swap)</lineannotation> > 2      # <lineannotation>(make it a partition number 2)</lineannotation> >        # <lineannotation>(press enter to accept the default)</lineannotation> > +8G    # <lineannotation>(the size of the swap partition, set to whatever you like)</lineannotation> > n      # <lineannotation>(create a new partition for /)</lineannotation> > 1      # <lineannotation>(make it a partition number 1)</lineannotation> >        # <lineannotation>(press enter to accept the default)</lineannotation> >        # <lineannotation>(press enter to accept the default and use the rest of the remaining space)</lineannotation> > a      # <lineannotation>(make the partition bootable)</lineannotation> > x      # <lineannotation>(enter expert mode)</lineannotation> > f      # <lineannotation>(fix up the partition ordering)</lineannotation> > r      # <lineannotation>(exit expert mode)</lineannotation> > w      # <lineannotation>(write the partition table to disk and exit)</lineannotation></screen> </del> <ins> Create a <emphasis>GPT</emphasis> partition table. <screen language="commands"># parted /dev/sda -- mklabel gpt</screen> </ins> </para> </listitem> <listitem> <para> <ins> Add a <emphasis>swap</emphasis> partition. The size required will vary according to needs, here a 8GiB one is created. The space left in front (512MiB) will be used by the boot partition. <screen language="commands"># parted /dev/sda -- mkpart primary linux-swap 512MiB 8.5GiB</screen> <note> <para> The swap partition size rules are no different than for other Linux distributions. </para> </note> </para> </listitem> <listitem> <para> Next, add the <emphasis>root</emphasis> partition. This will fill the remainder ending part of the disk. <screen language="commands"># parted /dev/sda -- mkpart primary 8.5GiB -1MiB</screen> </para> </listitem> <listitem> <para> Finally, the <emphasis>boot</emphasis> partition. NixOS by default uses the ESP (EFI system partition) as its <emphasis>/boot</emphasis> partition. It uses the initially reserved 512MiB at the start of the disk. <screen language="commands"># parted /dev/sda -- mkpart ESP fat32 1M 512MiB # parted /dev/sda -- set 3 boot on</screen> </para> </listitem> </orderedlist> </para> <para> Once complete, you can follow with <xref linkend="sec-installation-partitioning-formatting"/>. </para> </section> <section xml:id="sec-installation-partitioning-MBR"> <title>Legacy Boot (MBR)</title> <para> Here's an example partition scheme for Legacy Boot, using <filename>/dev/sda</filename> as the device. <note> <para> You can safely ignore <command>parted</command>'s informational message about needing to update /etc/fstab. </para> </note> </para> <para> <orderedlist> <listitem> <para> Create a <emphasis>MBR</emphasis> partition table. <screen language="commands"># parted /dev/sda -- mklabel msdos</screen> </para> </listitem> <listitem> <para> Add a <emphasis>swap</emphasis> partition. The size required will vary according to needs, here a 8GiB one is created. <screen language="commands"># parted /dev/sda -- mkpart primary linux-swap 1M 8GiB</screen> <note> <para> The swap partition size rules are no different than for other Linux distributions. </para> </note> </para> </listitem> <listitem> <para> Finally, add the <emphasis>root</emphasis> partition. This will fill the remainder of the disk. <screen language="commands"># parted /dev/sda -- mkpart primary 8GiB -1s</screen> </para> </listitem> </orderedlist> </para> <para> Once complete, you can follow with <xref linkend="sec-installation-partitioning-formatting"/>. </para> </section> <section xml:id="sec-installation-partitioning-formatting"> <title>Formatting</title> <para> Use the following commands: <itemizedlist> <listitem> <para> </ins> For initialising Ext4 partitions: <command>mkfs.ext4</command>. It is recommended that you assign a unique symbolic label to the file system using the option <option>-L <replaceable>label</replaceable></option>,


</listitem> </itemizedlist> </para> <del> </listitem> <listitem> <para> Mount the target file system on which NixOS should be installed on <filename>/mnt</filename>, e.g. </del> <ins> </section> </section> <section xml:id="sec-installation-installing"> <title>Installing</title> <orderedlist> <listitem> <para> Mount the target file system on which NixOS should be installed on <filename>/mnt</filename>, e.g. </ins> <screen> # mount /dev/disk/by-label/nixos /mnt </screen> <del> </para> </listitem> <listitem> <variablelist> <varlistentry> <term> UEFI systems </term> <listitem> <para> Mount the boot file system on <filename>/mnt/boot</filename>, e.g. </del> <ins> </para> </listitem> <listitem> <variablelist> <varlistentry> <term> UEFI systems </term> <listitem> <para> Mount the boot file system on <filename>/mnt/boot</filename>, e.g. </ins> <screen> # mkdir -p /mnt/boot # mount /dev/disk/by-label/boot /mnt/boot </screen> <del> </para> </listitem> </varlistentry> </variablelist> </listitem> <listitem> <para> If your machine has a limited amount of memory, you may want to activate swap devices now (<command>swapon <replaceable>device</replaceable></command>). The installer (or rather, the build actions that it may spawn) may need quite a bit of RAM, depending on your configuration. </del> <ins> </para> </listitem> </varlistentry> </variablelist> </listitem> <listitem> <para> If your machine has a limited amount of memory, you may want to activate swap devices now (<command>swapon <replaceable>device</replaceable></command>). The installer (or rather, the build actions that it may spawn) may need quite a bit of RAM, depending on your configuration. </ins> <screen> # swapon /dev/sda2</screen> <del> </para> </listitem> <listitem> <para> You now need to create a file <filename>/mnt/etc/nixos/configuration.nix</filename> that specifies the intended configuration of the system. This is because NixOS has a <emphasis>declarative</emphasis> configuration model: you create or edit a description of the desired configuration of your system, and then NixOS takes care of making it happen. The syntax of the NixOS configuration file is described in <xref linkend="sec-configuration-syntax"/>, while a list of available configuration options appears in <xref </del> <ins> </para> </listitem> <listitem> <para> You now need to create a file <filename>/mnt/etc/nixos/configuration.nix</filename> that specifies the intended configuration of the system. This is because NixOS has a <emphasis>declarative</emphasis> configuration model: you create or edit a description of the desired configuration of your system, and then NixOS takes care of making it happen. The syntax of the NixOS configuration file is described in <xref linkend="sec-configuration-syntax"/>, while a list of available configuration options appears in <xref </ins> linkend="ch-options"/>. A minimal example is shown in <del> <xref </del> <ins> <xref </ins> linkend="ex-config"/>. <del> </para> <para> The command <command>nixos-generate-config</command> can generate an initial configuration file for you: </del> <ins> </para> <para> The command <command>nixos-generate-config</command> can generate an initial configuration file for you: </ins> <screen> # nixos-generate-config --root /mnt</screen> <del> You should then edit <filename>/mnt/etc/nixos/configuration.nix</filename> to suit your needs: </del> <ins> You should then edit <filename>/mnt/etc/nixos/configuration.nix</filename> to suit your needs: </ins> <screen> # nano /mnt/etc/nixos/configuration.nix </screen> <del> If you’re using the graphical ISO image, other editors may be available (such as <command>vim</command>). If you have network access, you can also install other editors — for instance, you can install Emacs by running <literal>nix-env -i emacs</literal>. </para> <variablelist> <varlistentry> <term> BIOS systems </term> <listitem> <para> You <emphasis>must</emphasis> set the option <xref linkend="opt-boot.loader.grub.device"/> to specify on which disk the GRUB boot loader is to be installed. Without it, NixOS cannot boot. </para> </listitem> </varlistentry> <varlistentry> <term> UEFI systems </term> <listitem> <para> You <emphasis>must</emphasis> set the option <xref linkend="opt-boot.loader.systemd-boot.enable"/> to <literal>true</literal>. <command>nixos-generate-config</command> should do this automatically for new configurations when booted in UEFI mode. </para> <para> You may want to look at the options starting with <option><link linkend="opt-boot.loader.efi.canTouchEfiVariables">boot.loader.efi</link></option> and <option><link linkend="opt-boot.loader.systemd-boot.enable">boot.loader.systemd</link></option> as well. </para> </listitem> </varlistentry> </variablelist> <para> If there are other operating systems running on the machine before installing NixOS, the <xref linkend="opt-boot.loader.grub.useOSProber"/> option can be set to <literal>true</literal> to automatically add them to the grub menu. </para> <para> Another critical option is <option>fileSystems</option>, specifying the file systems that need to be mounted by NixOS. However, you typically don’t need to set it yourself, because <command>nixos-generate-config</command> sets it automatically in <filename>/mnt/etc/nixos/hardware-configuration.nix</filename> from your currently mounted file systems. (The configuration file <filename>hardware-configuration.nix</filename> is included from <filename>configuration.nix</filename> and will be overwritten by future invocations of <command>nixos-generate-config</command>; thus, you generally should not modify it.) </para> <note> </del> <ins> If you’re using the graphical ISO image, other editors may be available (such as <command>vim</command>). If you have network access, you can also install other editors — for instance, you can install Emacs by running <literal>nix-env -i emacs</literal>. </para> <variablelist> <varlistentry> <term> BIOS systems </term> <listitem> <para> You <emphasis>must</emphasis> set the option <xref linkend="opt-boot.loader.grub.device"/> to specify on which disk the GRUB boot loader is to be installed. Without it, NixOS cannot boot. </para> </listitem> </varlistentry> <varlistentry> <term> UEFI systems </term> <listitem> <para> You <emphasis>must</emphasis> set the option <xref linkend="opt-boot.loader.systemd-boot.enable"/> to <literal>true</literal>. <command>nixos-generate-config</command> should do this automatically for new configurations when booted in UEFI mode. </para> <para> You may want to look at the options starting with <option><link linkend="opt-boot.loader.efi.canTouchEfiVariables">boot.loader.efi</link></option> and <option><link linkend="opt-boot.loader.systemd-boot.enable">boot.loader.systemd</link></option> as well. </para> </listitem> </varlistentry> </variablelist> </ins> <para> <del> Depending on your hardware configuration or type of file system, you may need to set the option <option>boot.initrd.kernelModules</option> to include the kernel modules that are necessary for mounting the root file system, otherwise the installed system will not be able to boot. (If this happens, boot from the CD again, mount the target file system on <filename>/mnt</filename>, fix <filename>/mnt/etc/nixos/configuration.nix</filename> and rerun <filename>nixos-install</filename>.) In most cases, <command>nixos-generate-config</command> will figure out the required modules. </del> <ins> If there are other operating systems running on the machine before installing NixOS, the <xref linkend="opt-boot.loader.grub.useOSProber"/> option can be set to <literal>true</literal> to automatically add them to the grub menu. </ins> </para> <del> </note> </listitem> <listitem> <para> Do the installation: </del> <ins> <para> Another critical option is <option>fileSystems</option>, specifying the file systems that need to be mounted by NixOS. However, you typically don’t need to set it yourself, because <command>nixos-generate-config</command> sets it automatically in <filename>/mnt/etc/nixos/hardware-configuration.nix</filename> from your currently mounted file systems. (The configuration file <filename>hardware-configuration.nix</filename> is included from <filename>configuration.nix</filename> and will be overwritten by future invocations of <command>nixos-generate-config</command>; thus, you generally should not modify it.) </para> <note> <para> Depending on your hardware configuration or type of file system, you may need to set the option <option>boot.initrd.kernelModules</option> to include the kernel modules that are necessary for mounting the root file system, otherwise the installed system will not be able to boot. (If this happens, boot from the installation media again, mount the target file system on <filename>/mnt</filename>, fix <filename>/mnt/etc/nixos/configuration.nix</filename> and rerun <filename>nixos-install</filename>.) In most cases, <command>nixos-generate-config</command> will figure out the required modules. </para> </note> </listitem> <listitem> <para> Do the installation: </ins> <screen> # nixos-install</screen> <del> Cross fingers. If this fails due to a temporary problem (such as a network issue while downloading binaries from the NixOS binary cache), you can just re-run <command>nixos-install</command>. Otherwise, fix your <filename>configuration.nix</filename> and then re-run <command>nixos-install</command>. </para> <para> As the last step, <command>nixos-install</command> will ask you to set the password for the <literal>root</literal> user, e.g. </del> <ins> Cross fingers. If this fails due to a temporary problem (such as a network issue while downloading binaries from the NixOS binary cache), you can just re-run <command>nixos-install</command>. Otherwise, fix your <filename>configuration.nix</filename> and then re-run <command>nixos-install</command>. </para> <para> As the last step, <command>nixos-install</command> will ask you to set the password for the <literal>root</literal> user, e.g. </ins> <screen> setting root password... Enter new UNIX password: *** <del> Retype new UNIX password: *** </screen> <note> <para> For unattended installations, it is possible to use <command>nixos-install --no-root-passwd</command> in order to disable the password prompt entirely. </para> </note> </para> </listitem> <listitem> <para> If everything went well: </del> <ins> Retype new UNIX password: ***</screen> <note> <para> For unattended installations, it is possible to use <command>nixos-install --no-root-passwd</command> in order to disable the password prompt entirely. </para> </note> </para> </listitem> <listitem> <para> If everything went well: </ins> <screen> <del> # reboot</screen> </para> </listitem> <listitem> <para> You should now be able to boot into the installed NixOS. The GRUB boot menu shows a list of <emphasis>available configurations</emphasis> (initially just one). Every time you change the NixOS configuration (see <link </del> <ins> # reboot</screen> </para> </listitem> <listitem> <para> You should now be able to boot into the installed NixOS. The GRUB boot menu shows a list of <emphasis>available configurations</emphasis> (initially just one). Every time you change the NixOS configuration (see <link </ins> linkend="sec-changing-config">Changing Configuration</link> <del> ), a new item is added to the menu. This allows you to easily roll back to a previous configuration if something goes wrong. </para> <para> You should log in and change the <literal>root</literal> password with <command>passwd</command>. </para> <para> You’ll probably want to create some user accounts as well, which can be done with <command>useradd</command>: </del> <ins> ), a new item is added to the menu. This allows you to easily roll back to a previous configuration if something goes wrong. </para> <para> You should log in and change the <literal>root</literal> password with <command>passwd</command>. </para> <para> You’ll probably want to create some user accounts as well, which can be done with <command>useradd</command>: </ins> <screen> $ useradd -c 'Eelco Dolstra' -m eelco $ passwd eelco</screen> <del> </para> <para> You may also want to install some software. For instance, </del> <ins> </para> <para> You may also want to install some software. For instance, </ins> <screen> $ nix-env -qa *</screen> <del> shows what packages are available, and </del> <ins> shows what packages are available, and </ins> <screen> $ nix-env -i w3m</screen> <del> install the <literal>w3m</literal> browser. </para> </listitem> </orderedlist> <para> To summarise, <xref linkend="ex-install-sequence" /> shows a typical sequence of commands for installing NixOS on an empty hard drive (here <filename>/dev/sda</filename>). <xref linkend="ex-config" </del> <ins> install the <literal>w3m</literal> browser. </para> </listitem> </orderedlist> </section> <section xml:id="sec-installation-summary"> <title>Installation summary</title> <para> To summarise, <xref linkend="ex-install-sequence" /> shows a typical sequence of commands for installing NixOS on an empty hard drive (here <filename>/dev/sda</filename>). <xref linkend="ex-config" </ins> /> shows a <del> corresponding configuration Nix expression. </para> <example xml:id='ex-install-sequence'> <title>Commands for Installing NixOS on <filename>/dev/sda</filename></title> <screen> # fdisk /dev/sda # <lineannotation>(or whatever device you want to install on)</lineannotation> -- for UEFI systems only > n      # <lineannotation>(create a new partition for /boot)</lineannotation> > 3      # <lineannotation>(make it a partition number 3)</lineannotation> >        # <lineannotation>(press enter to accept the default)</lineannotation> > +512M  # <lineannotation>(the size of the UEFI boot partition)</lineannotation> > t      # <lineannotation>(change the partition type ...)</lineannotation> > 3      # <lineannotation>(... of the boot partition ...)</lineannotation> > 1      # <lineannotation>(... to 'UEFI System')</lineannotation> -- for BIOS or UEFI systems > n      # <lineannotation>(create a new partition for /swap)</lineannotation> > 2      # <lineannotation>(make it a partition number 2)</lineannotation> >        # <lineannotation>(press enter to accept the default)</lineannotation> > +8G    # <lineannotation>(the size of the swap partition)</lineannotation> > n      # <lineannotation>(create a new partition for /)</lineannotation> > 1      # <lineannotation>(make it a partition number 1)</lineannotation> >        # <lineannotation>(press enter to accept the default)</lineannotation> >        # <lineannotation>(press enter to accept the default and use the rest of the remaining space)</lineannotation> > a      # <lineannotation>(make the partition bootable)</lineannotation> > x      # <lineannotation>(enter expert mode)</lineannotation> > f      # <lineannotation>(fix up the partition ordering)</lineannotation> > r      # <lineannotation>(exit expert mode)</lineannotation> > w      # <lineannotation>(write the partition table to disk and exit)</lineannotation> </del> <ins> corresponding configuration Nix expression. </para> <example xml:id="ex-partition-scheme-MBR"> <title>Example partition schemes for NixOS on <filename>/dev/sda</filename> (MBR)</title> <screen language="commands"> # parted /dev/sda -- mklabel msdos # parted /dev/sda -- mkpart primary linux-swap 1M 8GiB # parted /dev/sda -- mkpart primary 8GiB -1s</screen> </example> <example xml:id="ex-partition-scheme-UEFI"> <title>Example partition schemes for NixOS on <filename>/dev/sda</filename> (UEFI)</title> <screen language="commands"> # parted /dev/sda -- mklabel gpt # parted /dev/sda -- mkpart primary linux-swap 512MiB 8.5GiB # parted /dev/sda -- mkpart primary 8.5GiB -1MiB # parted /dev/sda -- mkpart ESP fat32 1M 512MiB # parted /dev/sda -- set 3 boot on</screen> </example> <example xml:id="ex-install-sequence"> <title>Commands for Installing NixOS on <filename>/dev/sda</filename></title> <para> With a partitioned disk. <screen language="commands"> </ins> # mkfs.ext4 -L nixos /dev/sda1 # mkswap -L swap /dev/sda2 # swapon /dev/sda2


# nano /mnt/etc/nixos/configuration.nix # nixos-install # reboot</screen> <del> </example> <example xml:id='ex-config'> <title>NixOS Configuration</title> </del> <ins> </para> </example> <example xml:id='ex-config'> <title>NixOS Configuration</title> </ins> <screen> { config, pkgs, ... }: { imports = [


services.sshd.enable = true; } </screen> <del> </example> <xi:include href="installing-usb.xml" /> <xi:include href="installing-pxe.xml" /> <xi:include href="installing-virtualbox-guest.xml" /> <xi:include href="installing-from-other-distro.xml" /> <xi:include href="installing-behind-a-proxy.xml" /> </del> <ins> </example> </section> <section xml:id="sec-installation-additional-notes"> <title>Additional installation notes</title> <xi:include href="installing-usb.xml" /> <xi:include href="installing-pxe.xml" /> <xi:include href="installing-virtualbox-guest.xml" /> <xi:include href="installing-from-other-distro.xml" /> <xi:include href="installing-behind-a-proxy.xml" /> </section> </ins> </chapter>


, python, pygobject3, gtk3, gnome3, substituteAll , at-spi2-atk, at-spi2-core, pyatspi, dbus, dbus-python, pyxdg , xkbcomp, procps, lsof, coreutils, gsettings-desktop-schemas <del> , speechd, brltty, setproctitle, gst_all_1, gst-python </del> <ins> , speechd, brltty, liblouis, setproctitle, gst_all_1, gst-python </ins> }: buildPythonApplication rec {


]; propagatedBuildInputs = [ <del> # TODO: re-add liblouis when it is fixed pygobject3 pyatspi dbus-python pyxdg brltty speechd gst-python setproctitle </del> <ins> pygobject3 pyatspi dbus-python pyxdg brltty liblouis speechd gst-python setproctitle </ins> ]; <ins> strictDeps = false; </ins> buildInputs = [ python gtk3 at-spi2-atk at-spi2-core dbus gsettings-desktop-schemas gst_all_1.gstreamer gst_all_1.gst-plugins-base gst_all_1.gst-plugins-good


<del> { stdenv, fetchFromGitHub, cmake, bison }: </del> <ins> { stdenv, fetchFromGitHub, cmake, bison, spirv-tools, jq }: </ins> stdenv.mkDerivation rec { name = "glslang-git-${version}"; <del> version = "2017-08-31"; </del> <ins> version = "2018-02-05"; </ins> # `vulkan-loader` requires a specific version of `glslang` as specified in # `<vulkan-loader-repo>/external_revisions/glslang_revision`. src = fetchFromGitHub { owner = "KhronosGroup"; repo = "glslang"; <del> rev = "3a21c880500eac21cdf79bef5b80f970a55ac6af"; sha256 = "1i15m17r0acmzjrkybris2rgw15il05a4w5h7vhhsiyngcvajcyn"; </del> <ins> rev = "2651ccaec8"; sha256 = "0x5x5i07n9g809rzf5jgw70mmwck31ishdmxnmi0wxx737jjqwaq"; </ins> }; <del> buildInputs = [ cmake bison ]; </del> <ins> buildInputs = [ cmake bison jq ] ++ spirv-tools.buildInputs; </ins> enableParallelBuilding = true; <ins> patchPhase = '' cp --no-preserve=mode -r "${spirv-tools.src}" External/spirv-tools ln -s "${spirv-tools.headers}" External/spirv-tools/external/spirv-headers ''; preConfigure = '' HEADERS_COMMIT=$(jq -r < known_good.json '.commits|map(select(.name=="spirv-tools/external/spirv-headers"))[0].commit') TOOLS_COMMIT=$(jq -r < known_good.json '.commits|map(select(.name=="spirv-tools"))[0].commit') if [ "$HEADERS_COMMIT" != "${spirv-tools.headers.rev}" ] || [ "$TOOLS_COMMIT" != "${spirv-tools.src.rev}" ]; then echo "ERROR: spirv-tools commits do not match expected versions"; exit 1; fi ''; </ins> meta = with stdenv.lib; { inherit (src.meta) homepage; description = "Khronos reference front-end for GLSL and ESSL";


libXext, wayland, libGL, makeWrapper }: let <del> version = "1.0.61.1"; </del> <ins> version = "1.1.70.0"; </ins> src = fetchFromGitHub { owner = "KhronosGroup"; repo = "Vulkan-LoaderAndValidationLayers"; rev = "sdk-${version}"; <del> sha256 = "043kw6wnrpdplnb40x6n9rgf3gygsn9jiv91y458sydbhalfr945"; </del> <ins> sha256 = "1a7xwl65bi03l4zbjq54qkxjb8kb4m78qvw8bas5alhf9v6i6yqp"; </ins> }; in


nativeBuildInputs = [ makeWrapper pkgconfig ]; buildInputs = [ cmake git python3 python3Packages.lxml <del> glslang spirv-tools x11 libxcb libXrandr libXext wayland </del> <ins> glslang x11 libxcb libXrandr libXext wayland </ins> ]; enableParallelBuilding = true;


]; outputs = [ "out" "dev" "demos" ]; <ins> patches = [ ./rev-file.patch ]; postUnpack = '' # Hack so a version header can be generated. Relies on ./rev-file.patch to work. mkdir -p "$sourceRoot/external/glslang/External" echo "${spirv-tools.src.rev}" > "$sourceRoot/external/glslang/External/spirv-tools" ''; </ins> preConfigure = '' checkRev() { [ "$2" = $(cat "external_revisions/$1_revision") ] || (echo "ERROR: dependency $1 is revision $2 but should be revision" $(cat "external_revisions/$1_revision") && exit 1) } <del> checkRev spirv-tools "${spirv-tools.src.rev}" checkRev spirv-headers "${spirv-tools.headers.rev}" </del> checkRev glslang "${glslang.src.rev}" '';


<ins> diff --git a/CMakeLists.txt b/CMakeLists.txt index c9f73ce96..d14ffeed9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -339,13 +339,13 @@ macro(run_vk_xml_generate dependency output) endmacro() # Define macro used for generating header files containing commit IDs for external dependencies -macro(run_external_revision_generate source_dir symbol_name output) +macro(run_external_revision_generate rev_file symbol_name output) add_custom_command(OUTPUT ${output} # NOTE: If you modify this call to use --rev_file instead of --git_dir (to read the commit ID from a file instead of # parsing from a Git repository), you probably also want to add the revision file to the list of DEPENDS on the # subsequent line (to ensure that the script is re-run when the revision file is modified). -    COMMAND ${PYTHON_CMD} ${SCRIPTS_DIR}/external_revision_generator.py --git_dir ${source_dir} -s ${symbol_name} -o ${output} -    DEPENDS ${SCRIPTS_DIR}/external_revision_generator.py ${source_dir}/.git/HEAD ${source_dir}/.git/index +    COMMAND ${PYTHON_CMD} ${SCRIPTS_DIR}/external_revision_generator.py --rev_file ${rev_file} -s ${symbol_name} -o ${output} +    DEPENDS ${SCRIPTS_DIR}/external_revision_generator.py ${rev_file} ) endmacro() </ins>


let spirv_sources = { <del> # `vulkan-loader` requires a specific version of `spirv-tools` and `spirv-headers` as specified in # `<vulkan-loader-repo>/external_revisions/spirv-tools_revision`. </del> <ins> # `glslang` requires a specific version of `spirv-tools` and `spirv-headers` as specified in `known-good.json`. </ins> tools = fetchFromGitHub { owner = "KhronosGroup"; repo = "SPIRV-Tools"; <del> rev = "7e2d26c77b606b21af839b37fd21381c4a669f23"; sha256 = "1nlzj081v1xdyfz30nfs8hfcnqd072fra127h46gav179f04kss2"; </del> <ins> rev = "9e19fc0f31ceaf1f6bc907dbf17dcfded85f2ce8"; sha256 = "1zpwznq0fyvkzs5h9nnkr7g6svr0w8z6zx62xgnss17c2a5cz0lk"; </ins> }; headers = fetchFromGitHub { owner = "KhronosGroup"; repo = "SPIRV-Headers"; <del> rev = "2bb92e6fe2c6aa410152fc6c63443f452acb1a65"; sha256 = "1rgjd7kpa7xpbwpzd6m3f6yq44s9xn5ddhz135213pxwbi5c0c26"; </del> <ins> rev = "ce309203d7eceaf908bea8862c27f3e0749f7d00"; sha256 = "1sv1iy2d46sg7r3xy591db6fn9h78wd079yvfa87vwmwsdkhiqhm"; </ins> }; };


stdenv.mkDerivation rec { name = "spirv-tools-${version}"; <del> version = "2017-09-01"; </del> <ins> version = "2018-02-05"; </ins> src = spirv_sources.tools; patchPhase = ''ln -sv ${spirv_sources.headers} external/spirv-headers'';


in py.pkgs.buildPythonApplication rec { pname = "awscli"; <del> version = "1.14.50"; </del> <ins> version = "1.15.10"; </ins> src = py.pkgs.fetchPypi { inherit pname version; <del> sha256 = "1yiwj7cl9r1k9226mdq6pcmrs044k7p3d133lzgv9rb1dgp4053c"; </del> <ins> sha256 = "0nwpanbfx5h0bad8wwvvbhpjf9r6n885bbv2w8mw7vijdgclkq8x"; </ins> }; # No tests included


less ]; <ins> postPatch = '' for i in {py,cfg}; do substituteInPlace setup.$i --replace "botocore==1.10.10" "botocore>=1.10.9,<=1.11" done ''; </ins> postInstall = '' mkdir -p $out/etc/bash_completion.d echo "complete -C $out/bin/aws_completer aws" > $out/etc/bash_completion.d/awscli


<ins> # VTE { config, pkgs, lib, ... }: with lib; let vteInitSnippet = '' # Show current working directory in VTE terminals window title. # Supports both bash and zsh, requires interactive shell. . ${pkgs.vte}/etc/profile.d/vte.sh ''; in { options = { programs.bash.vteIntegration = mkOption { default = false; type = types.bool; description = '' Whether to enable Bash integration for VTE terminals. This allows it to preserve the current directory of the shell across terminals. ''; }; programs.zsh.vteIntegration = mkOption { default = false; type = types.bool; description = '' Whether to enable Zsh integration for VTE terminals. This allows it to preserve the current directory of the shell across terminals. ''; }; }; config = mkMerge [ (mkIf config.programs.bash.vteIntegration { programs.bash.interactiveShellInit = vteInitSnippet; }) (mkIf config.programs.zsh.vteIntegration { programs.zsh.interactiveShellInit = vteInitSnippet; }) ]; } </ins>


./config/unix-odbc-drivers.nix ./config/users-groups.nix ./config/vpnc.nix <ins> ./config/vte.nix </ins> ./config/zram.nix ./hardware/acpilight.nix ./hardware/all-firmware.nix


./programs/fuse.nix ./programs/gnome-disks.nix ./programs/gnome-documents.nix <ins> ./programs/gnome-terminal.nix </ins> ./programs/gpaste.nix ./programs/gnupg.nix ./programs/gphoto2.nix


./services/desktops/gnome3/gnome-remote-desktop.nix ./services/desktops/gnome3/gnome-online-miners.nix ./services/desktops/gnome3/gnome-settings-daemon.nix <del> ./services/desktops/gnome3/gnome-terminal-server.nix </del> ./services/desktops/gnome3/gnome-user-share.nix ./services/desktops/gnome3/gvfs.nix ./services/desktops/gnome3/rygel.nix


<ins> # GNOME Terminal. { config, pkgs, lib, ... }: with lib; let cfg = config.programs.gnome-terminal; in { # Added 2019-08-19 imports = [ (mkRenamedOptionModule [ "services" "gnome3" "gnome-terminal-server" "enable" ] [ "programs" "gnome-terminal" "enable" ]) ]; options = { programs.gnome-terminal.enable = mkEnableOption "GNOME Terminal"; }; config = mkIf cfg.enable { environment.systemPackages = [ pkgs.gnome3.gnome-terminal ]; services.dbus.packages = [ pkgs.gnome3.gnome-terminal ]; systemd.packages = [ pkgs.gnome3.gnome-terminal ]; programs.bash.vteIntegration = true; programs.zsh.vteIntegration = true; }; } </ins>


<del> # GNOME Documents daemon. { config, pkgs, lib, ... }: with lib; { ###### interface options = { services.gnome3.gnome-terminal-server = { enable = mkOption { type = types.bool; default = false; description = '' Whether to enable GNOME Terminal server service, needed for gnome-terminal. ''; }; }; }; ###### implementation config = mkIf config.services.gnome3.gnome-terminal-server.enable { environment.systemPackages = [ pkgs.gnome3.gnome-terminal ]; services.dbus.packages = [ pkgs.gnome3.gnome-terminal ]; systemd.packages = [ pkgs.gnome3.gnome-terminal ]; }; } </del>


services.gnome3.gnome-online-accounts.enable = mkDefault true; services.gnome3.gnome-remote-desktop.enable = mkDefault true; services.gnome3.gnome-settings-daemon.enable = true; <del> services.gnome3.gnome-terminal-server.enable = mkDefault true; </del> services.gnome3.gnome-user-share.enable = mkDefault true; services.gnome3.gvfs.enable = true; services.gnome3.rygel.enable = mkDefault true;


programs.file-roller.enable = mkDefault true; programs.gnome-disks.enable = mkDefault true; programs.gnome-documents.enable = mkDefault true; <ins> programs.gnome-terminal.enable = mkDefault true; </ins> # If gnome3 is installed, build vim for gtk3 too. nixpkgs.config.vim.gui = "gtk3";


makeMakerFlags = "POSTGRES_HOME=${postgresql}"; <ins> # tests freeze in a sandbox doCheck = false; </ins> meta = { homepage = http://search.cpan.org/dist/DBD-Pg/; description = "DBI PostgreSQL interface";


<del> { stdenv, fetchFromRepoOrCz, fetchurl, nasm, perl, python3, libuuid, mtools, makeWrapper }: </del> <ins> { stdenv, fetchgit, fetchurl, fetchpatch, nasm, perl, python3, libuuid, mtools, makeWrapper }: </ins> stdenv.mkDerivation { <del> name = "syslinux-2019-02-07"; </del> <ins> pname = "syslinux"; version = "unstable-20190207"; </ins> # This is syslinux-6.04-pre3^1; syslinux-6.04-pre3 fails to run. # Same issue here https://www.syslinux.org/archives/2019-February/026330.html <del> src = fetchFromRepoOrCz { repo = "syslinux"; </del> <ins> src = fetchgit { url = "https://repo.or.cz/syslinux"; </ins> rev = "b40487005223a78c3bb4c300ef6c436b3f6ec1f7"; <del> sha256 = "1qrxl1114sr2i2791z9rf8v53g200aq30f08808d7i8qnmgvxl2w"; </del> <ins> sha256 = "1acf6byx7i6vz8hq6mra526g8mf7fmfhid211y8nq0v6px7d3aqs"; fetchSubmodules = true; </ins> }; patches = let


url = mkURL "fa1349f1" "0002-gfxboot-menu-label.patch"; sha256 = "06ifgzbpjj4picpj17zgprsfi501zf4pp85qjjgn29i5rs291zni"; }) <del> (fetchurl { url = mkURL "477e56d2" "0005-gnu-efi-version-compatibility.patch"; sha256 = "041568b4abb79wynyps1n04lg4fr26rc3sbjncz99pp0mbz0ajlm"; </del> <ins> (fetchpatch { url = "https://git.archlinux.org/svntogit/packages.git/plain/trunk/0005-gnu-efi-version-compatibility.patch?h=packages/syslinux"; sha256 = "0fbqz56hj8az8ws26m39hyp3l5fvcbzvzdddqz3x6n56hzdpz1p6"; </ins> }) (fetchurl { # mbr.bin: too big (452 > 440)


# fix tests substituteInPlace tests/unittest/include/unittest/unittest.h  --replace /usr/include/ "" <ins> # Hack to get `gcc -m32' to work without having 32-bit Glibc headers. mkdir gnu-efi/inc/ia32/gnu touch gnu-efi/inc/ia32/gnu/stubs-32.h </ins> ''; nativeBuildInputs = [ nasm perl python3 ];


makeFlags = [ "BINDIR=$(out)/bin" "SBINDIR=$(out)/sbin" <del> "LIBDIR=$(out)/lib" "INCDIR=$(out)/include" </del> "DATADIR=$(out)/share" "MANDIR=$(out)/share/man" "PERL=perl" <del> "bios" </del> ]; doCheck = false; # fails. some fail in a sandbox, others require qemu


ghcCommand'    = if isGhcjs then "ghcjs" else "ghc"; ghcCommand = "${ghc.targetPrefix}${ghcCommand'}"; ghcCommandCaps= lib.toUpper ghcCommand'; <del> libDir        = if isHaLVM then "$out/lib/HaLVM-${ghc.version}" else "$out/lib/${ghcCommand}-${ghc.version}"; </del> <ins> libDir        = if isHaLVM then "$out/lib/HaLVM-${ghc.version}" else if isGhcjs then "$out/libexec" else "$out/lib/${ghcCommand}-${ghc.version}"; </ins> docDir        = "$out/share/doc/ghc/html"; packageCfgDir = "${libDir}/package.conf.d"; paths         = lib.filter (x: x ? isHaskellLibrary) (lib.closePropagation packages);


configureFlags = [ ( if sslSupport then "--with-ssl=${openssl.crossDrv}" else "--without-ssl" ) ( if gnutlsSupport then "--with-gnutls=${gnutls.crossDrv}" else "--without-gnutls" ) <del> "--with-random /dev/urandom" </del> <ins> "--with-random=/dev/urandom" </ins> ]; };


Xsetup = pkgs.writeScript "Xsetup" '' #!/bin/sh <del> # Prior to Qt 5.9.2, there is a QML cache invalidation bug which sometimes # strikes new Plasma 5 releases. If the QML cache is not invalidated, SDDM # will segfault without explanation. We really tore our hair out for awhile # before finding the bug: # https://bugreports.qt.io/browse/QTBUG-62302 # We work around the problem by deleting the QML cache before startup. It # will be regenerated, causing a small but perceptible delay when SDDM # starts. rm -fr /var/lib/sddm/.cache/sddm-greeter/qmlcache </del> ${cfg.setupScript} '';


# To enable user switching, allow sddm to allocate TTYs/displays dynamically. services.xserver.tty = null; services.xserver.display = null; <ins> systemd.tmpfiles.rules = [ # Prior to Qt 5.9.2, there is a QML cache invalidation bug which sometimes # strikes new Plasma 5 releases. If the QML cache is not invalidated, SDDM # will segfault without explanation. We really tore our hair out for awhile # before finding the bug: # https://bugreports.qt.io/browse/QTBUG-62302 # We work around the problem by deleting the QML cache before startup. # This was supposedly fixed in Qt 5.9.2 however it has been reported with # 5.10 and 5.11 as well. The initial workaround was to delete the directory # in the Xsetup script but that doesn't do anything. # Instead we use tmpfiles.d to ensure it gets wiped. # This causes a small but perceptible delay when SDDM starts. "e ${config.users.users.sddm.home}/.cache - - - 0" ]; </ins> }; }


"--enable-library-for-ghci" # TODO: Should this be configurable? ] ++ optionals (enableDeadCodeElimination && (stdenv.lib.versionOlder "8.0.1" ghc.version)) [ "--ghc-option=-split-sections" <ins> ] ++ optionals dontStrip [ "--disable-library-stripping" "--disable-executable-stripping" </ins> ] ++ optionals isGhcjs [ "--ghcjs" ] ++ optionals isCross ([


./hplip-3.20.11-nixos-cups-ppd-search-path.patch ]; <del> prePatch = '' </del> <ins> postPatch = '' # https://github.com/NixOS/nixpkgs/issues/44230 substituteInPlace createPPD.sh  --replace ppdc "${cups}/bin/ppdc"  --replace "gzip -c" "gzip -cn" </ins> # HPLIP hardcodes absolute paths everywhere. Nuke from orbit. find . -type f -exec sed -i  -e s,/etc/hp,$out/etc/hp,g


export CUPS_DATADIR="${cups}/share/cups" ''; <ins> postConfigure = '' # don't save timestamp, in order to improve reproducibility substituteInPlace Makefile  --replace "GZIP_ENV = --best" "GZIP_ENV = --best -n" ''; </ins> enableParallelBuilding = true; #


<ins> { lib, buildPythonPackage, fetchPypi, numpy, h5py }: buildPythonPackage rec { pname = "Keras_Applications"; version = "1.0.4"; src = fetchPypi { inherit pname version; sha256 = "8c95300328630ae74fb0828b6fa38269a25c0228a02f1e5181753bfd48961f49"; }; # Cyclic dependency: keras-applications requires keras, which requires keras-applications postPatch = '' sed -i "s/keras>=[^']*//" setup.py ''; # No tests in PyPI tarball doCheck = false; propagatedBuildInputs = [ numpy h5py ]; meta = with lib; { description = "Reference implementations of popular deep learning models"; homepage = https://github.com/keras-team/keras-applications; license = licenses.mit; }; } </ins>


<ins> { lib, buildPythonPackage, fetchPypi, numpy, scipy, six }: buildPythonPackage rec { pname = "Keras_Preprocessing"; version = "1.0.2"; src = fetchPypi { inherit pname version; sha256 = "f5306554d2b454d825b36f35e327744f5477bd2ae21017f1a93b2097bed6757e"; }; # Cyclic dependency: keras-preprocessing requires keras, which requires keras-preprocessing postPatch = '' sed -i "s/keras>=[^']*//" setup.py ''; # No tests in PyPI tarball doCheck = false; propagatedBuildInputs = [ numpy scipy six ]; meta = with lib; { description = "Easy data preprocessing and data augmentation for deep learning models"; homepage = https://github.com/keras-team/keras-preprocessing; license = licenses.mit; }; } </ins>


{ stdenv, buildPythonPackage, fetchPypi , pytest, pytestcov, pytestpep8, pytest_xdist , six, numpy, scipy, pyyaml, h5py <ins> , keras-applications, keras-preprocessing </ins> }: buildPythonPackage rec { pname = "Keras"; <del> version = "2.2.0"; </del> <ins> version = "2.2.2"; </ins> src = fetchPypi { inherit pname version; <del> sha256 = "5b8499d157af217f1a5ee33589e774127ebc3e266c833c22cb5afbb0ed1734bf"; </del> <ins> sha256 = "468d98da104ec5c3dbb10c2ef6bb345ab154f6ca2d722d4c250ef4d6105de17a"; </ins> }; checkInputs = [


propagatedBuildInputs = [ six pyyaml numpy scipy h5py <ins> keras-applications keras-preprocessing </ins> ]; # Couldn't get tests working


Keras = callPackage ../development/python-modules/keras { }; <ins> keras-applications = callPackage ../development/python-modules/keras-applications { }; keras-preprocessing = callPackage ../development/python-modules/keras-preprocessing { }; </ins> Lasagne = buildPythonPackage rec { name = "Lasagne-${version}"; version = "0.1";


type = types.listOf (types.submodule { options = { name = mkOption { <del> type = types.listOf types.str; </del> <ins> type = types.str; </ins> description = "name of the virtualhost"; <ins> }; webapps = mkOption { type = types.listOf types.path; description = '' List containing web application WAR files and/or directories containing web applications and configuration files for the virtual host. ''; </ins> default = []; }; };


filepath = null; ghc-boot = null; ghc-boot-th = null; <ins> ghc-compact = null; </ins> ghc-prim = null; ghci = null; haskeline = null;


, mkDerivation , SDL2 , frei0r <ins> , ladspaPlugins </ins> , gettext , mlt , jack1


, qtwebsockets , qtquickcontrols2 , qtgraphicaleffects <del> , libmlt </del> , qmake , qttools , genericUpdater , common-updater-scripts }: <del> assert stdenv.lib.versionAtLeast libmlt.version "6.22.1"; </del> assert stdenv.lib.versionAtLeast mlt.version "6.22.1"; mkDerivation rec {


buildInputs = [ SDL2 frei0r <ins> ladspaPlugins </ins> gettext mlt <del> libmlt </del> qtbase qtmultimedia qtx11extras


qtgraphicaleffects ]; <del> NIX_CFLAGS_COMPILE = "-I${libmlt}/include/mlt++ -I${libmlt}/include/mlt"; </del> <ins> NIX_CFLAGS_COMPILE = "-I${mlt.dev}/include/mlt++ -I${mlt.dev}/include/mlt"; </ins> qmakeFlags = [ "QMAKE_LRELEASE=${stdenv.lib.getDev qttools}/bin/lrelease" "SHOTCUT_VERSION=${version}"


qtWrapperArgs = [ "--prefix FREI0R_PATH : ${frei0r}/lib/frei0r-1" <ins> "--prefix LADSPA_PATH : ${ladspaPlugins}/lib/ladspa" </ins> "--prefix LD_LIBRARY_PATH : ${stdenv.lib.makeLibraryPath [ jack1 SDL2 ]}" "--prefix PATH : ${mlt}/bin" ];


<del> { stdenv, fetchFromGitHub, SDL, ffmpeg, frei0r, libjack2, libdv, libsamplerate , libvorbis, libxml2, makeWrapper, movit, pkgconfig, sox, qtbase, qtsvg , fftw, vid-stab, opencv3, ladspa-sdk, genericUpdater, common-updater-scripts </del> <ins> { stdenv , fetchFromGitHub , SDL , ffmpeg , frei0r , libjack2 , libdv , libsamplerate , libvorbis , libxml2 , movit , pkgconfig , sox , qtbase , qtsvg , fftw , vid-stab , opencv3 , ladspa-sdk , genericUpdater , common-updater-scripts , ladspaPlugins , mkDerivation , which </ins> }: let inherit (stdenv.lib) getDev; in <del> stdenv.mkDerivation rec { </del> <ins> mkDerivation rec { </ins> pname = "mlt"; version = "6.22.1";


}; buildInputs = [ <del> SDL ffmpeg frei0r libjack2 libdv libsamplerate libvorbis libxml2 makeWrapper movit pkgconfig qtbase qtsvg sox fftw vid-stab opencv3 </del> <ins> SDL ffmpeg frei0r libjack2 libdv libsamplerate libvorbis libxml2 movit pkgconfig qtbase qtsvg sox fftw vid-stab opencv3 </ins> ladspa-sdk <ins> ladspaPlugins </ins> ]; <ins> nativeBuildInputs = [ which ]; </ins> outputs = [ "out" "dev" ]; # Mostly taken from: # http://www.kdenlive.org/user-manual/downloading-and-installing-kdenlive/installing-source/installing-mlt-rendering-engine configureFlags = [ <del> "--avformat-swscale" "--enable-gpl" "--enable-gpl" "--enable-gpl3" </del> <ins> "--avformat-swscale" "--enable-gpl" "--enable-gpl3" </ins> "--enable-opengl" ];


enableParallelBuilding = true; <del> postInstall = '' wrapProgram $out/bin/melt --prefix FREI0R_PATH : ${frei0r}/lib/frei0r-1 </del> <ins> qtWrapperArgs = [ "--prefix FREI0R_PATH : ${frei0r}/lib/frei0r-1" "--prefix LADSPA_PATH : ${ladspaPlugins}/lib/ladspa" ]; postInstall = '' </ins> # Remove an unnecessary reference to movit.dev. s=${movit.dev}/include t=$(for ((i = 0; i < ''${#s}; i++)); do echo -n X; done)


scudcloud = callPackage ../applications/networking/instant-messengers/scudcloud { }; <del> shotcut = libsForQt514.callPackage ../applications/video/shotcut { libmlt = mlt; }; </del> <ins> shotcut = libsForQt5.callPackage ../applications/video/shotcut { }; </ins> shogun = callPackage ../applications/science/machine-learning/shogun { stdenv = gcc8Stdenv;


, features          ? "huge" # One of tiny, small, normal, big or huge , wrapPythonDrv     ? false <del> , guiSupport        ? config.vim.gui or "gtk3" </del> <ins> , guiSupport        ? config.vim.gui or (if stdenv.isDarwin then "gtk2" else "gtk3") </ins> , luaSupport        ? config.vim.lua or true , perlSupport       ? config.vim.perl or false      # Perl interpreter , pythonSupport     ? config.vim.python or true     # Python interpreter


''; patches = [ <ins> # https://gitlab.freedesktop.org/accountsservice/accountsservice/-/issues/55 (fetchpatch { url = "https://gitlab.freedesktop.org/accountsservice/accountsservice/-/merge_requests/58.patch"; sha256 = "1pnwq4ycnryb2kkgvnz44qzm71240ybqj6507wynlkdsw8180fdw"; }) </ins> (substituteAll { src = ./fix-paths.patch; inherit shadow coreutils;


sed -i 's/os_trace((.*)");$/printf(1n");/g' ./projects/compiler-rt/lib/sanitizer_common/sanitizer_mac.cc substituteInPlace CMakeLists.txt  <del> --replace 'set(CMAKE_INSTALL_NAME_DIR "@rpath")' "set(CMAKE_INSTALL_NAME_DIR "$out/lib")"  </del> <ins> --replace 'set(_install_name_dir INSTALL_NAME_DIR "@rpath")' "set(_install_name_dir)"  </ins> --replace 'set(CMAKE_INSTALL_RPATH "@executable_path/../lib")' "" '' + ''


--replace 'set(COMPILER_RT_HAS_TSAN TRUE)' 'set(COMPILER_RT_HAS_TSAN FALSE)' substituteInPlace CMakeLists.txt  <del> --replace 'set(CMAKE_INSTALL_NAME_DIR "@rpath")' "set(CMAKE_INSTALL_NAME_DIR "$lib/lib")"  </del> <ins> --replace 'set(_install_name_dir INSTALL_NAME_DIR "@rpath")' "set(_install_name_dir)"  </ins> --replace 'set(CMAKE_INSTALL_RPATH "@executable_path/../lib")' "" '' # Patch llvm-config to return correct library path based on --link-{shared,static}.


--replace 'set(COMPILER_RT_HAS_TSAN TRUE)' 'set(COMPILER_RT_HAS_TSAN FALSE)' substituteInPlace cmake/modules/AddLLVM.cmake  <del> --replace 'set(_install_name_dir INSTALL_NAME_DIR "@rpath")' "set(_install_name_dir INSTALL_NAME_DIR "$lib/lib")"  </del> <ins> --replace 'set(_install_name_dir INSTALL_NAME_DIR "@rpath")' "set(_install_name_dir)"  </ins> --replace 'set(_install_rpath "@loader_path/../lib" ''${extra_libdir})' "" '' # Patch llvm-config to return correct library path based on --link-{shared,static}.


postPatch = stdenv.lib.optionalString stdenv.isDarwin '' substituteInPlace cmake/modules/AddLLVM.cmake  <del> --replace 'set(_install_name_dir INSTALL_NAME_DIR "@rpath")' "set(_install_name_dir INSTALL_NAME_DIR "$lib/lib")"  </del> <ins> --replace 'set(_install_name_dir INSTALL_NAME_DIR "@rpath")' "set(_install_name_dir)"  </ins> --replace 'set(_install_rpath "@loader_path/../lib" ''${extra_libdir})' "" '' # Patch llvm-config to return correct library path based on --link-{shared,static}.


nativeBuildInputs = [ cmake python which swig ]; buildInputs = [ ncurses zlib libedit libxml2 llvm ] <del> ++ stdenv.lib.optionals stdenv.isDarwin [ darwin.libobjc darwin.apple_sdk.libs.xpc darwin.apple_sdk.frameworks.Foundation darwin.bootstrap_cmds darwin.apple_sdk.frameworks.Carbon darwin.apple_sdk.frameworks.Cocoa ]; </del> <ins> ++ stdenv.lib.optionals stdenv.isDarwin [ darwin.libobjc darwin.apple_sdk.libs.xpc darwin.apple_sdk.frameworks.Foundation darwin.bootstrap_cmds darwin.apple_sdk.frameworks.Carbon darwin.apple_sdk.frameworks.Cocoa darwin.cf-private ]; </ins> CXXFLAGS = "-fno-rtti"; hardeningDisable = [ "format" ];


postPatch = optionalString stdenv.isDarwin '' substituteInPlace cmake/modules/AddLLVM.cmake  <del> --replace 'set(_install_name_dir INSTALL_NAME_DIR "@rpath")' "set(_install_name_dir INSTALL_NAME_DIR "$lib/lib")"  </del> <ins> --replace 'set(_install_name_dir INSTALL_NAME_DIR "@rpath")' "set(_install_name_dir)"  </ins> --replace 'set(_install_rpath "@loader_path/../lib" ''${extra_libdir})' "" '' # Patch llvm-config to return correct library path based on --link-{shared,static}.


<del> { stdenv, fetchgit, unzip, firefox-esr, makeWrapper }: </del> <ins> { stdenv, fetchgit, unzip, firefox-esr-52, makeWrapper }: </ins> stdenv.mkDerivation rec { pkgname = "conkeror"; version = "1.0.4"; name = "${pkgname}-${version}"; src = fetchgit { url = git://repo.or.cz/conkeror.git; rev = "refs/tags/${version}";


mkdir -p $out/libexec/conkeror cp -r * $out/libexec/conkeror <del> makeWrapper ${firefox-esr}/bin/firefox $out/bin/conkeror  </del> <ins> makeWrapper ${firefox-esr-52}/bin/firefox $out/bin/conkeror  </ins> --add-flags "-app $out/libexec/conkeror/application.ini" '';


patchShebangs meson_post_install.py ''; <del> postInstall = '' rm $out/share/applications/mimeinfo.cache ''; </del> meta = { homepage = https://fontmanager.github.io/; description = "Simple font management for GTK+ desktop environments";


"-Dsystemdunitdir=lib/systemd/system" ]; <del> postInstall = '' rm $out/share/applications/mimeinfo.cache ''; </del> passthru = { updateScript = gnome3.updateScript { packageName = pname;


nativeBuildInputs = [ pkgconfig ]; buildInputs = [ glib libintl ]; <ins> setupHook = ./setup-hook.sh; </ins> meta = { homepage = http://www.freedesktop.org/wiki/Software/desktop-file-utils; description = "Command line utilities for working with .desktop files";


<ins> # Remove mimeinfo cache mimeinfoPreFixupPhase() { rm -f $out/share/applications/mimeinfo.cache } preFixupPhases="$preFixupPhases mimeinfoPreFixupPhase" </ins>


services.openssh.enable = false; services.lshd.enable = true; programs.ssh.startAgent = false; <del> services.xserver.startGnuPGAgent = true; </del> # TODO: GNU dico. # TODO: GNU Inetutils' inetd.


(mkRemovedOptionModule [ "services" "openvpn" "enable" ]) (mkRemovedOptionModule [ "services" "printing" "cupsFilesConf" ]) (mkRemovedOptionModule [ "services" "printing" "cupsdConf" ]) <ins> (mkRemovedOptionModule [ "services" "xserver" "startGnuPGAgent" ]) </ins> ]; }


fi ''} <del> ${optionalString cfg.startGnuPGAgent '' if test -z "$SSH_AUTH_SOCK"; then # Restart this script as a child of the GnuPG agent. exec "${pkgs.gnupg}/bin/gpg-agent"                          --enable-ssh-support --daemon                              --pinentry-program "${pkgs.pinentry}/bin/pinentry-gtk-2"   --write-env-file "$HOME/.gpg-agent-info"                   "$0" "$sessionType" fi ''} </del> # Handle being called by kdm. if test "''${1:0:1}" = /; then eval exec "$1"; fi


''; }; <del> startGnuPGAgent = mkOption { type = types.bool; default = false; description = '' Whether to start the GnuPG agent when you log in.  The GnuPG agent remembers private keys for you so that you don't have to type in passphrases every time you make an SSH connection or sign/encrypt data.  Use <command>ssh-add</command> to add a key to the agent. ''; }; </del> startDbusSession = mkOption { type = types.bool; default = true;


in optional (driver != null) ({ inherit name; driverName = name; } // driver)); assertions = <del> [ { assertion = !(config.programs.ssh.startAgent && cfg.startGnuPGAgent); message = '' The OpenSSH agent and GnuPG agent cannot be started both. Please choose between ‘programs.ssh.startAgent’ and ‘services.xserver.startGnuPGAgent’. ''; } { assertion = config.security.polkit.enable; </del> <ins> [ { assertion = config.security.polkit.enable; </ins> message = "X11 requires Polkit to be enabled (‘security.polkit.enable = true’)."; } ];


gnupatch = callPackage ../tools/text/gnupatch { }; gnupg1orig = callPackage ../tools/security/gnupg/1.nix { }; gnupg1compat = callPackage ../tools/security/gnupg/1compat.nix { }; <del> # use config.packageOverrides if you prefer original gnupg1 gnupg1 = gnupg1compat; </del> <ins> gnupg1 = gnupg1compat;    # use config.packageOverrides if you prefer original gnupg1 </ins> gnupg20 = callPackage ../tools/security/gnupg/20.nix { }; <del> gnupg21 = lowPrio (callPackage ../tools/security/gnupg/21.nix { }); gnupg = gnupg20; </del> <ins> gnupg21 = callPackage ../tools/security/gnupg/21.nix { }; gnupg = gnupg21; </ins> gnuplot = callPackage ../tools/graphics/gnuplot { qt = qt4; };


ln -sv "$(realpath $s)" "$out/bin/$tName" # wrapped below done ) <ins> '' + # A hacky way to provide repstopdf #  * Copy is done to have a correct "$0" so that epstopdf enables the restricted mode #  * ./bin/repstopdf needs to be a symlink to be processed by wrapBin '' if [[ -e ./bin/epstopdf ]]; then cp $(realpath ./bin/epstopdf) ./share/texmf/scripts/repstopdf ln -s "$out"/share/texmf/scripts/repstopdf ./bin/repstopdf fi '' + # finish up the wrappers '' </ins> rm "$out"/bin/*-sys wrapBin '' + <ins> # Perform a small test to verify that the restricted mode get enabled when # needed (detected by checking if it disallows --gscmd) '' if [[ -e ./bin/epstopdf ]]; then echo "Testing restricted mode for {,r}epstopdf" ! (epstopdf --gscmd echo /dev/null 2>&1 || true) | grep forbidden (repstopdf --gscmd echo /dev/null 2>&1 || true) | grep forbidden fi '' + </ins> # TODO: a context trigger https://www.preining.info/blog/2015/06/debian-tex-live-2015-the-new-layout/ # http://wiki.contextgarden.net/ConTeXt_Standalone#Unix-like_platforms_.28Linux.2FMacOS_X.2FFreeBSD.2FSolaris.29


<ins> { lib , python3Packages , fetchFromGitHub , enableGoogle ? false , enableAWS ? false , enableAzure ? false , enableSSH ? false }: with python3Packages; buildPythonApplication rec { pname = "dvc"; version = "0.24.3"; # PyPi only has wheel src = fetchFromGitHub { owner = "iterative"; repo = "dvc"; rev = version; sha256 = "1wqq4i23hppilp20fx5a5nj93xwf3wwwr2f8aasvn6jkv2l22vpl"; }; propagatedBuildInputs = [ ply configparser zc_lockfile future colorama configobj networkx pyyaml GitPython setuptools nanotime pyasn1 schema jsonpath_rw requests grandalf asciimatics distro appdirs ] ++ lib.optional enableGoogle google_cloud_storage ++ lib.optional enableAWS boto3 ++ lib.optional enableAzure azure-storage-blob ++ lib.optional enableSSH paramiko; # tests require access to real cloud services # nix build tests have to be isolated and run locally doCheck = false; patches = [ ./dvc-daemon.patch ]; postPatch = '' substituteInPlace dvc/daemon.py --subst-var-by dvc "$out/bin/dcv" ''; meta = with lib; { description = "Version Control System for Machine Learning Projects"; license = licenses.asl20; homepage = https://dvc.org; maintainers = with maintainers; [ cmcdragonkai ]; }; } </ins>


<ins> diff --git a/dvc/daemon.py b/dvc/daemon.py index 1d67a37..7ce6fde 100644 --- a/dvc/daemon.py +++ b/dvc/daemon.py @@ -67,14 +67,8 @@ def daemon(args): Args: args (list): list of arguments to append to `dvc daemon` command. """ -    cmd = [sys.executable] -    if not is_binary(): -        cmd += ['-m', 'dvc'] -    cmd += ['daemon', '-q'] + args - -    env = fix_env() -    file_path = os.path.abspath(inspect.stack()[0][1]) -    env['PYTHONPATH'] = os.path.dirname(os.path.dirname(file_path)) +    cmd = [ "@dvc@" , "daemon", "-q"] + args +    env = None logger.debug("Trying to spawn '{}' with env '{}'".format(cmd, env)) </ins>


duperemove = callPackage ../tools/filesystems/duperemove { }; <ins> dvc = callPackage ../applications/version-management/dvc { }; dvc-with-remotes = callPackage ../applications/version-management/dvc { enableGoogle = true; enableAWS = true; enableAzure = true; enableSSH = true; }; </ins> dylibbundler = callPackage ../tools/misc/dylibbundler { }; dynamic-colors = callPackage ../tools/misc/dynamic-colors { };


<ins> { lib , stdenv , fetchFromGitHub , SDL2 , cmake , espeak , ffmpeg , file , freetype , harfbuzz , leptonica , libGL , libX11 , libXau , libXcomposite , libXdmcp , libXfixes , libdrm , libffi , libusb1 , libuvc , libvlc , libvncserver , libxcb , libxkbcommon , luajit , makeWrapper , mesa , openal , pkg-config , sqlite , tesseract , valgrind , wayland , wayland-protocols , xcbutil , xcbutilwm , xz , buildManPages ? true, ruby }: let # TODO: investigate vendoring, especially OpenAL # WARN: vendoring of OpenAL is required for running arcan_lwa # INFO: maybe it needs leaveDotGit, but it is dangerous/impure letoram-openal-src = fetchFromGitHub { owner = "letoram"; repo = "openal"; rev = "1c7302c580964fee9ee9e1d89ff56d24f934bdef"; hash = "sha256-InqU59J0zvwJ20a7KU54xTM7d76VoOlFbtj7KbFlnTU="; }; in stdenv.mkDerivation rec { pname = "arcan"; version = "0.6.1pre1+unstable=2021-07-07"; src = fetchFromGitHub { owner = "letoram"; repo = "arcan"; rev = "f3341ab94b32d02f3d15c3b91a512b2614e950a5"; hash = "sha256-YBtRA5uCk4tjX3Bsu5vMkaNaCLRlM6HVQ53sna3gDsY="; }; postUnpack = '' ( cd $sourceRoot/external/git/ cp -a ${letoram-openal-src}/ openal/ chmod --recursive 744 openal/ ) ''; # TODO: work with upstream in order to get rid of these hardcoded paths postPatch = '' substituteInPlace ./src/platform/posix/paths.c  --replace "/usr/bin" "$out/bin"  --replace "/usr/share" "$out/share" substituteInPlace ./src/CMakeLists.txt --replace "SETUID" "# SETUID" ''; nativeBuildInputs = [ cmake makeWrapper pkg-config ] ++ lib.optionals buildManPages [ ruby ]; buildInputs = [ SDL2 espeak ffmpeg file freetype harfbuzz leptonica libGL libX11 libXau libXcomposite libXdmcp libXfixes libdrm libffi libusb1 libuvc libvlc libvncserver libxcb libxkbcommon luajit mesa openal sqlite tesseract valgrind wayland wayland-protocols xcbutil xcbutilwm xz ]; # INFO: According to the source code, the manpages need to be generated before # the configure phase preConfigure = lib.optionalString buildManPages '' (cd doc; ruby docgen.rb mangen) ''; cmakeFlags = [ "-DBUILD_PRESET=everything" # The upstream project recommends tagging the distribution "-DDISTR_TAG=Nixpkgs" "-DENGINE_BUILDTAG=${version}" "-DHYBRID_SDL=on" "-DSTATIC_OPENAL=off" "../src" ]; hardeningDisable = [ "format" ]; meta = with lib; { homepage = "https://arcan-fe.com/"; description = "Combined Display Server, Multimedia Framework, Game Engine"; longDescription = '' Arcan is a portable and fast self-sufficient multimedia engine for advanced visualization and analysis work in a wide range of applications e.g. game development, real-time streaming video, monitoring and surveillance, up to and including desktop compositors and window managers. ''; license = with licenses; [ bsd3 gpl2Plus lgpl2Plus ]; maintainers = with maintainers; [ AndersonTorres ]; platforms = platforms.unix; }; } </ins>


<ins> { callPackage, lib, pkgs }: rec { # Dependencies espeak = pkgs.espeak-ng; ffmpeg = pkgs.ffmpeg-full; harfbuzz = pkgs.harfbuzzFull; # Arcan arcan = callPackage ./arcan.nix { }; arcan-wrapped = callPackage ./wrapper.nix { }; xarcan = callPackage ./xarcan.nix { }; # Appls durden = callPackage ./durden.nix { }; durden-wrapped = callPackage ./wrapper.nix { name = "durden-wrapped"; appls = [ durden ]; }; pipeworld = callPackage ./pipeworld.nix { }; pipeworld-wrapped = callPackage ./wrapper.nix { name = "pipeworld-wrapped"; appls = [ pipeworld ]; }; prio = callPackage ./prio.nix { }; prio-wrapped = callPackage ./wrapper.nix { name = "prio-wrapped"; appls = [ prio ]; }; # One Expression to SymlinkJoin Them All everyone-wrapped = callPackage ./wrapper.nix { name = "everyone-wrapped"; appls = [ durden pipeworld prio ]; }; } </ins>


<ins> { lib , stdenv , fetchFromGitHub }: stdenv.mkDerivation rec { pname = "durden"; version = "0.6.1+unstable=2021-06-25"; src = fetchFromGitHub { owner = "letoram"; repo = pname; rev = "fb618fccc57a68b6ce933b4df5822acd1965d591"; hash = "sha256-PovI837Xca4wV0g0s4tYUMFGVUDf+f8HcdvM1+0aDxk="; }; installPhase = '' runHook preInstall mkdir -p ${placeholder "out"}/share/arcan/appl/ cp -a ./durden ${placeholder "out"}/share/arcan/appl/ runHook postInstall ''; meta = with lib; { homepage = "https://durden.arcan-fe.com/"; description = "Reference Desktop Environment for Arcan"; longDescription = '' Durden is a desktop environment for the Arcan Display Server. It serves both as a reference showcase on how to take advantage of some of the features in Arcan, and as a very competent entry to the advanced-user side of the desktop environment spectrum. ''; license = licenses.bsd3; maintainers = with maintainers; [ AndersonTorres ]; platforms = platforms.all; }; } </ins>


<ins> { lib , stdenv , fetchFromGitHub }: stdenv.mkDerivation rec { pname = "pipeworld"; version = "0.0.0+unstable=2021-05-27"; src = fetchFromGitHub { owner = "letoram"; repo = pname; rev = "c26df9ca0225ce2fd4f89e7ec59d4ab1f94a4c2e"; hash = "sha256-RkDAbM1q4o61RGPLPLXHLvbvClp+bfjodlWgUGoODzA="; }; installPhase = '' runHook preInstall mkdir -p ${placeholder "out"}/share/arcan/appl/ cp -a ./pipeworld ${placeholder "out"}/share/arcan/appl/ runHook postInstall ''; meta = with lib; { homepage = "https://github.com/letoram/pipeworld"; description = "Dataflow 'spreadsheet' desktop environment"; longDescription = '' Pipeworld is a zooming dataflow tool and desktop heavily inspired by userland. It is built using the arcan desktop engine. It combines the programmable processing of shell scripts and pipes, the interactive visual addressing/programming model of spread sheets, the scenegraph- and interactive controls-, IPC- and client processing- of display servers into one model with zoomable tiling window management. It can be used as a standalone desktop of its own, or as a normal application within another desktop as a 'substitute' for your normal terminal emulator. ''; license = licenses.bsd3; maintainers = with maintainers; [ AndersonTorres ]; platforms = platforms.all; }; } </ins>


<ins> { lib , stdenv , fetchFromGitHub }: stdenv.mkDerivation rec { pname = "prio"; version = "0.0.0+unstable=2018-09-13"; src = fetchFromGitHub { owner = "letoram"; repo = pname; rev = "c3f97491339d15f063d6937d5f89bcfaea774dd1"; hash = "sha256-Idv/duEYmDk/rO+TI8n+FY3VFDtUEh8C292jh12BJuM="; }; installPhase = '' runHook preInstall mkdir -p ${placeholder "out"}/share/arcan/appl/prio cp -a ./* ${placeholder "out"}/share/arcan/appl/prio runHook postInstall ''; meta = with lib; { homepage = "https://github.com/letoram/prio"; description = "Plan9- Rio like Window Manager for Arcan"; license = licenses.bsd3; maintainers = with maintainers; [ AndersonTorres ]; platforms = platforms.all; }; } </ins>


<ins> { arcan , makeWrapper , symlinkJoin , appls ? [ ] , name ? "arcan-wrapped" }: symlinkJoin rec { inherit name; paths = appls ++ [ arcan ]; nativeBuildInputs = [ makeWrapper ]; postBuild = '' for prog in ${placeholder "out"}/bin/*; do wrapProgram $prog  --prefix PATH ":" "${placeholder "out"}/bin"  --set ARCAN_APPLBASEPATH "${placeholder "out"}/share/arcan/appl/"  --set ARCAN_BINPATH "${placeholder "out"}/bin/arcan_frameserver"  --set ARCAN_LIBPATH "${placeholder "out"}/lib/"  --set ARCAN_RESOURCEPATH "${placeholder "out"}/share/arcan/resources/"  --set ARCAN_SCRIPTPATH "${placeholder "out"}/share/arcan/scripts/"  --set ARCAN_STATEBASEPATH "$HOME/.arcan/resources/savestates/" done ''; } # TODO: set ARCAN_FONTPATH to a set of fonts that can be provided in a parameter </ins>


<ins> { lib , stdenv , fetchFromGitHub , arcan , audit , dbus , epoxy , fontutil , libGL , libX11 , libXau , libXdmcp , libXfont2 , libdrm , libgcrypt , libmd , libselinux , libtirpc , libxcb , libxkbfile , libxshmfence , mesa , meson , nettle , ninja , openssl , pixman , pkg-config , systemd , xcbutil , xcbutilwm , xkbcomp , xkeyboard_config , xorgproto , xtrans }: stdenv.mkDerivation rec { pname = "xarcan"; version = "0.6.0+unstable=2021-06-14"; src = fetchFromGitHub { owner = "letoram"; repo = pname; rev = "98d28a5f2c6860bb191fbc1c9e577c18e4c9a9b7"; hash = "sha256-UTIVDKnYD/q0K6G7NJUKh1tHcqnsuiJ/cQxWuPMJ2G4="; }; nativeBuildInputs = [ meson ninja pkg-config ]; buildInputs = [ arcan audit dbus epoxy fontutil libGL libX11 libXau libXdmcp libXfont2 libdrm libgcrypt libmd libselinux libtirpc libxcb libxkbfile libxshmfence mesa nettle openssl pixman systemd xcbutil xcbutilwm xkbcomp xkeyboard_config xorgproto xtrans ]; configureFlags = [ "--disable-int10-module" "--disable-static" "--disable-xnest" "--disable-xorg" "--disable-xvfb" "--disable-xwayland" "--enable-glamor" "--enable-glx" "--enable-ipv6" "--enable-kdrive" "--enable-record" "--enable-xarcan" "--enable-xcsecurity" "--with-xkb-bin-directory=${xkbcomp}/bin" "--with-xkb-output=/tmp" "--with-xkb-path=${xkeyboard_config}/share/X11/xkb" ]; meta = with lib; { homepage = "https://github.com/letoram/letoram"; description = "Patched Xserver that bridges connections to Arcan"; longDescription = '' xarcan is a patched X server with a KDrive backend that uses the arcan-shmif to map Xlib/Xcb/X clients to a running arcan instance. It allows running an X session as a window under Arcan. ''; license = licenses.mit; maintainers = with maintainers; [ AndersonTorres ]; platforms = platforms.all; }; } </ins>


gtk = gtk2; }; <ins> arcan = recurseIntoAttrs (callPackage ../desktops/arcan { callPackage = newScope pkgs.arcan; }); </ins> xfce = recurseIntoAttrs (callPackage ../desktops/xfce { }); xrandr-invert-colors = callPackage ../applications/misc/xrandr-invert-colors { };


The <literal>tomcat-connector</literal> <literal>httpd.extraSubservice</literal> has been removed from nixpkgs. </para> </listitem> <ins> <listitem> <para> It's now possible to change configuration in <link linkend="opt-services.nextcloud.enable">services.nextcloud</link> after the initial deploy since all config parameters are persisted in an additional config file generated by the module. Previously core configuration like database parameters were set using their imperative installer after creating <literal>/var/lib/nextcloud</literal>. </para> </listitem> </ins> </itemizedlist> </section> </section>


systemd.services = { "nextcloud-setup" = let <ins> c = cfg.config; writePhpArrary = a: "[${concatMapStringsSep "," (val: ''"${toString val}"'') a}]"; </ins> overrideConfig = pkgs.writeText "nextcloud-config.php" '' <?php <ins> ${optionalString (c.dbpassFile != null) '' function nix_read_pwd() { $file = "${c.dbpassFile}"; if (!file_exists($file)) { throw new RuntimeException(sprintf( "Cannot start Nextcloud, dbpass file %s set by NixOS doesn't exist!", $file )); } return trim(file_get_contents($file)); } ''} </ins> $CONFIG = [ 'apps_paths' => [ [ 'path' => '${cfg.home}/apps', 'url' => '/apps', 'writable' => false ],


${optionalString cfg.caching.apcu "'memcache.local' => 'OCMemcacheAPCu',"} 'log_type' => 'syslog', 'log_level' => '${builtins.toString cfg.logLevel}', <del> ${optionalString (cfg.config.overwriteProtocol != null) "'overwriteprotocol' => '${cfg.config.overwriteProtocol}',"} </del> <ins> ${optionalString (c.overwriteProtocol != null) "'overwriteprotocol' => '${c.overwriteProtocol}',"} ${optionalString (c.dbname != null) "'dbname' => '${c.dbname}',"} ${optionalString (c.dbhost != null) "'dbhost' => '${c.dbhost}',"} ${optionalString (c.dbport != null) "'dbport' => '${toString c.dbport}',"} ${optionalString (c.dbuser != null) "'dbuser' => '${c.dbuser}',"} ${optionalString (c.dbtableprefix != null) "'dbtableprefix' => '${toString c.dbtableprefix}',"} ${optionalString (c.dbpass != null) "'dbpassword' => '${c.dbpass}',"} ${optionalString (c.dbpassFile != null) "'dbpassword' => nix_read_pwd(),"} 'dbtype' => '${c.dbtype}', 'trusted_domains' => ${writePhpArrary c.extraTrustedDomains}, </ins> ]; ''; occInstallCmd = let <del> c = cfg.config; adminpass = if c.adminpassFile != null then ''"$(<"${toString c.adminpassFile}")"'' else ''"${toString c.adminpass}"''; </del> dbpass = if c.dbpassFile != null then ''"$(<"${toString c.dbpassFile}")"'' else if c.dbpass != null then ''"${toString c.dbpass}"'' else null; <ins> adminpass = if c.adminpassFile != null then ''"$(<"${toString c.adminpassFile}")"'' else ''"${toString c.adminpass}"''; </ins> installFlags = concatStringsSep " n    " (mapAttrsToList (k: v: "${k} ${toString v}") { "--database" = ''"${c.dbtype}"'';


services.postgresql = { <link linkend="opt-services.postgresql.enable">enable</link> = true; <del> <link linkend="opt-services.postgresql.initialScript">initialScript</link> = pkgs.writeText "psql-init" '' CREATE ROLE nextcloud WITH LOGIN; CREATE DATABASE nextcloud WITH OWNER nextcloud; ''; </del> <ins> <link linkend="opt-services.postgresql.ensureDatabases">ensureDatabases</link> = [ "nextcloud" ]; <link linkend="opt-services.postgresql.ensureUsers">ensureUsers</link> = [ { name = "nextcloud"; ensurePermissions."DATABASE nextcloud" = "ALL PRIVILEGES"; } ]; </ins> }; # ensure that postgres is running *before* running the setup


are used internally to configure an HTTP server using <literal><link xlink:href="https://php-fpm.org/">PHP-FPM</link></literal> and <literal>nginx</literal>. The <literal>config</literal> attribute set is <del> used for the <literal>config.php</literal> which is used for the application's configuration. <emphasis>Beware: this isn't entirely pure since the config is modified by the application's runtime!</emphasis> </del> <ins> used by the imperative installer and all values are written to an additional file to ensure that changes can be applied by changing the module's options. </ins> </para> <para> <del> In case the application serves multiple hosts (those are checked with </del> <ins> In case the application serves multiple domains (those are checked with </ins> <literal><link xlink:href="http://php.net/manual/en/reserved.variables.server.php">$_SERVER['HTTP_HOST']</link></literal>) <del> those can be added using </del> <ins> it's needed to add them to </ins> <literal><link linkend="opt-services.nextcloud.config.extraTrustedDomains">services.nextcloud.config.extraTrustedDomains</link></literal>. </para> <ins> <para> Auto updates for Nextcloud apps can be enabled using <literal><link linkend="opt-services.nextcloud.autoUpdateApps.enable">services.nextcloud.autoUpdateApps</link></literal>. </para> </ins> </section> <section xml:id="module-services-nextcloud-pitfalls-during-upgrade"> <title>Pitfalls</title>


</para> <para> <del> Right now changes to the <literal>services.nextcloud.config</literal> attribute set won't take effect after the first install (except <literal><link linkend="opt-services.nextcloud.config.extraTrustedDomains">services.nextcloud.config.extraTrustedDomains</link></literal>) since the actual configuration file is generated by the NextCloud installer which also sets up critical parts such as the database structure. </del> <ins> All configuration parameters are also stored in <literal>/var/lib/nextcloud/config/override.config.php</literal> which is generated by the module and linked from the store to ensure that all values from <literal>config.php</literal> can be modified by the module. However <literal>config.php</literal> manages the application's state and shouldn't be touched manually because of that. </ins> </para> <del> <para> <emphasis>Warning: don't delete <literal>config.php</literal>! This file </del> <ins> <warning> <para>Don't delete <literal>config.php</literal>! This file </ins> tracks the application's state and a deletion can cause unwanted <del> side-effects!</emphasis> </para> </del> <ins> side-effects!</para> </warning> </ins> <del> <para> <emphasis>Warning: don't rerun <literal>nextcloud-occ </del> <ins> <warning> <para>Don't rerun <literal>nextcloud-occ </ins> maintenance:install</literal>! This command tries to install the application <del> and can cause unwanted side-effects!</emphasis> </para> <para> The issues are known and reported in <link xlink:href="https://github.com/NixOS/nixpkgs/issues/49783">#49783</link>, for now it's unfortunately necessary to manually work around these issues. </para> <para> Right now app installation and configuration is done imperatively in the nextcloud web ui or via the <literal>nextcloud-occ</literal> command line utility. You can activate auto updates for your apps via <literal><link linkend="opt-services.nextcloud.autoUpdateApps.enable">services.nextcloud.autoUpdateApps</link></literal>. </para> </del> <ins> and can cause unwanted side-effects!</para> </warning> </ins> </section> </chapter>


dbtype = "pgsql"; dbname = "nextcloud"; dbuser = "nextcloud"; <del> dbhost = "localhost"; dbpassFile = toString (pkgs.writeText "db-pass-file" '' hunter2 ''); </del> <ins> dbhost = "/run/postgresql"; </ins> inherit adminuser; adminpassFile = toString (pkgs.writeText "admin-pass-file" '' ${adminpass}


services.postgresql = { enable = true; <del> initialScript = pkgs.writeText "psql-init" '' create role nextcloud with login password 'hunter2'; create database nextcloud with owner nextcloud; ''; </del> <ins> ensureDatabases = [ "nextcloud" ]; ensureUsers = [ { name = "nextcloud"; ensurePermissions."DATABASE nextcloud" = "ALL PRIVILEGES"; } ]; </ins> }; }; };


beta = stable; legacy_340 = generic { <del> version = "340.104"; sha256_32bit = "1l8w95qpxmkw33c4lsf5ar9w2fkhky4x23rlpqvp1j66wbw1b473"; sha256_64bit = "18k65gx6jg956zxyfz31xdp914sq3msn665a759bdbryksbk3wds"; settingsSha256 = "1vvpqimvld2iyfjgb9wvs7ca0b0f68jzfdpr0icbyxk4vhsq7sxk"; persistencedSha256 = "0zqws2vsrxbxhv6z0nn2galnghcsilcn3s0f70bpm6jqj9wzy7x8"; </del> <ins> version = "340.107"; sha256_32bit = "0mh83affz6bim26ws7kkwwcfj2s6vkdy4d45hifsbshr82qd52wd"; sha256_64bit = "0pv9yv3x0kg9hfkmc50xb54ahxkbnyy2vyy4hj2h0s6m9sb5kqz3"; settingsSha256 = "1rgaa24acdyqa1rqrx56293vxpskr792njqqpigqmps04llsx703"; persistencedSha256 = "0nwv6kh4gxgy80x1zs6gcg5hy3amg25xhsfa2v4mwqa36sblxz6l"; </ins> useGLVND = false; patches = maybePatch_drm_legacy ++ [ ./vm_operations_struct-fault.patch ];


''; }); <ins> # On Darwin, git-annex mis-detects options to `cp`, so we wrap the binary to # ensure it uses Nixpkgs' coreutils. git-annex = with pkgs; if (!stdenv.isLinux) then let path = stdenv.lib.makeBinPath [ coreutils ]; in overrideCabal (addBuildTool super.git-annex makeWrapper) (_drv: { postFixup = '' wrapProgram $out/bin/git-annex  --prefix PATH : "${path}" ''; }) else super.git-annex; </ins> # The test suite has undeclared dependencies on git. githash = dontCheck super.githash;


{ stdenv, fetchurl, libgpgerror, gnupg, pkgconfig, glib, pth, libassuan , file, which, ncurses <del> , autoreconfHook </del> <ins> , autoreconfHook, fetchpatch </ins> , git , texinfo , qtbase ? null


nativeBuildInputs = [ file pkgconfig gnupg autoreconfHook git texinfo ] ++ lib.optionals pythonSupport [ python swig2 which ncurses ]; <ins> patches = [ (fetchpatch { name = "fix-key-expiry.patch"; url = "https://files.gnupg.net/file/data/fehgbjmataj5tc2pnfhj/PHID-FILE-aqck6l4elhw53tjanrie/file"; sha256 = "1h80m045gy7r0g7dzzlfpql6p065x88p274ij9jnf7d4lwwgrf1a"; }) ]; </ins> postPatch ='' substituteInPlace ./configure --replace /usr/bin/file ${file}/bin/file '';


elmPackages = (import ./packages/elm-srcs.nix); versionsDat = ./versions.dat; }; <ins> patches = [ (fetchpatch { url = "https://github.com/elm/compiler/pull/1886/commits/39d86a735e28da514be185d4c3256142c37c2a8a.patch"; sha256 = "0nni5qx1523rjz1ja42z6z9pijxvi3fgbw1dhq5qi11mh1nb9ay7"; }) ]; </ins> buildTools = drv.buildTools or [] ++ [ makeWrapper ]; jailbreak = true; postInstall = ''


default = true; description = lib.mdDoc '' <del> Disables horizontal scrolling. When disabled, this driver will discard any horizontal scroll events from libinput. Note that this does not disable horizontal scrolling, it merely discards the horizontal axis from any scroll events. </del> <ins> Enables or disables horizontal scrolling. When disabled, this driver will discard any horizontal scroll events from libinput. This does not disable horizontal scroll events from libinput; it merely discards the horizontal axis from any scroll events. </ins> ''; };


"password sufficient ${pkgs.sssd}/lib/security/pam_sss.so use_authtok"} ${optionalString config.krb5.enable "password sufficient ${pam_krb5}/lib/security/pam_krb5.so use_first_pass"} <del> ${optionalString config.services.samba.syncPasswordsByPam "password optional ${pkgs.samba}/lib/security/pam_smbpass.so nullok use_authtok try_first_pass"} </del> ${optionalString cfg.enableGnomeKeyring "password optional ${pkgs.gnome3.gnome-keyring}/lib/security/pam_gnome_keyring.so use_authtok"}


[global] security = ${cfg.securityType} passwd program = /run/wrappers/bin/passwd %u <del> pam password change = ${smbToString cfg.syncPasswordsByPam} </del> invalid users = ${smbToString cfg.invalidUsers} ${cfg.extraConfig}


{ imports = [ (mkRemovedOptionModule [ "services" "samba" "defaultShare" ] "") <ins> (mkRemovedOptionModule [ "services" "samba" "syncPasswordsByPam" ] "This option has been removed by upstream, see https://bugzilla.samba.org/show_bug.cgi?id=10669#c10") </ins> ]; ###### interface


''; }; <del> syncPasswordsByPam = mkOption { type = types.bool; default = false; description = '' Enabling this will add a line directly after pam_unix.so. Whenever a password is changed the samba password will be updated as well. However, you still have to add the samba password once, using smbpasswd -a user. If you don't want to maintain an extra password database, you still can send plain text passwords which is not secure. ''; }; </del> invalidUsers = mkOption { type = types.listOf types.str; default = [ "root" ];


udev = config.systemd.package; <del> modulesTree = config.system.modulesTree; </del> <ins> kernel-name = config.boot.kernelPackages.kernel.name or "kernel"; modulesTree = config.system.modulesTree.override { name = kernel-name + "-modules"; }; </ins> firmware = config.hardware.firmware;


# The closure of the init script of boot stage 1 is what we put in # the initial RAM disk. initialRamdisk = pkgs.makeInitrd { <ins> name = "initrd-${kernel-name}"; </ins> inherit (config.boot.initrd) compressor prepend; contents =


# `contents = {object = ...; symlink = /init;}' is a typical # argument. <del> { stdenv, perl, cpio, contents, compressor, prepend, ubootTools </del> <ins> { stdenv, perl, cpio, contents, ubootTools , name ? "initrd" , compressor ? "gzip -9n" , prepend ? [] </ins> }: stdenv.mkDerivation rec { <del> name = "initrd"; </del> <ins> inherit name; </ins> builder = ./make-initrd.sh; makeUInitrd = stdenv.hostPlatform.platform.kernelTarget == "uImage";


<del> { stdenv, kmod, modules, buildEnv }: </del> <ins> { stdenv, kmod, modules, buildEnv, name ? "kernel-modules" }: </ins> buildEnv { <del> name = "kernel-modules"; </del> <ins> inherit name; </ins> paths = modules;


makeAutostartItem = callPackage ../build-support/make-startupitem { }; <del> makeInitrd = { contents, compressor ? "gzip -9n", prepend ? [ ] }: callPackage ../build-support/kernel/make-initrd.nix { inherit contents compressor prepend; }; </del> <ins> makeInitrd = callPackage ../build-support/kernel/make-initrd.nix; # Args intentionally left out </ins> makeWrapper = makeSetupHook { deps = [ dieHook ]; substitutions = { shell = pkgs.runtimeShell; }; } ../build-support/setup-hooks/make-wrapper.sh;


# /usr/bin/env gets special treatment so that ".../bin/env python" is # rewritten to /nix/store/<hash>/bin/python.  Interpreters that are # already in the store are left untouched. <ins> # A script file must be marked as executable, otherwise it will not be # considered. </ins> fixupOutputHooks+=(patchShebangsAuto) <del> # Run patch shebangs on a directory. # patchShebangs [--build | --host] directory </del> <ins> # Run patch shebangs on a directory or file. # Can take multiple paths as arguments. # patchShebangs [--build | --host] PATH... </ins> # Flags: # --build : Lookup commands available at build-time


shift fi <del> local dir="$1" header "patching script interpreter paths in $dir" </del> <ins> echo "patching script interpreter paths in $@" </ins> local f local oldPath local newPath


local oldInterpreterLine local newInterpreterLine <del> [ -e "$dir" ] || return 0 </del> <ins> if [ $# -eq 0 ]; then echo "No arguments supplied to patchShebangs" >0 return 0 fi </ins> local f while IFS= read -r -d $'0' f; do


# - options: something starting with a '-' # - environment variables: foo=bar if $(echo "$arg0" | grep -q -- "^-.*|.*=.*"); then <del> echo "$f: unsupported interpreter directive "$oldInterpreterLine" (set dontPatchShebangs=1 and handle shebang patching yourself)" </del> <ins> echo "$f: unsupported interpreter directive "$oldInterpreterLine" (set dontPatchShebangs=1 and handle shebang patching yourself)" >0 </ins> exit 1 fi


rm "$timestamp" fi fi <del> done < <(find "$dir" -type f -perm -0100 -print0) </del> <ins> done < <(find "$@" -type f -perm -0100 -print0) </ins> stopNest }


// lib.optionalAttrs (stdenv.hostPlatform != stdenv.buildPlatform) { preInstall = null; # clobber the native hook <del> dontStrip = true; separateDebugInfo = false; # this is currently broken for crossDrv </del> # To avoid a dependency on the build system 'bash'. preFixup = '' rm -f $bin/bin/{ldd,tzselect,catchsegv,xtrace}


github = "lo1tuma"; name = "Mathias Schreck"; }; <ins> loewenheim = { email = "loewenheim@mailbox.org"; github = "loewenheim"; name = "Sebastian Zivota"; }; </ins> lopsided98 = { email = "benwolsieffer@gmail.com"; github = "lopsided98";


<ins> { lib, python3Packages, fetchpatch }: # Packaging documentation at: # https://github.com/pimutils/vdirsyncer/blob/0.16.7/docs/packaging.rst python3Packages.buildPythonApplication rec { version = "0.16.7"; pname = "vdirsyncer"; src = python3Packages.fetchPypi { inherit pname version; sha256 = "6c9bcfb9bcb01246c83ba6f8551cf54c58af3323210755485fc23bb7848512ef"; }; propagatedBuildInputs = with python3Packages; [ click click-log click-threading requests_toolbelt requests requests_oauthlib # required for google oauth sync atomicwrites ]; nativeBuildInputs = with python3Packages; [ setuptools_scm ]; checkInputs = with python3Packages; [ hypothesis pytest pytest-localserver pytest-subtesthack ]; patches = [ # Fixes for hypothesis: https://github.com/pimutils/vdirsyncer/pull/779 (fetchpatch { url = https://github.com/pimutils/vdirsyncer/commit/22ad88a6b18b0979c5d1f1d610c1d2f8f87f4b89.patch; sha256 = "0dbzj6jlxhdidnm3i21a758z83sdiwzhpd45pbkhycfhgmqmhjpl"; }) ]; postPatch = '' # Invalid argument: 'perform_health_check' is not a valid setting substituteInPlace tests/conftest.py  --replace "perform_health_check=False" "" substituteInPlace tests/unit/test_repair.py  --replace $'@settings(perform_health_check=False)  # Using the random module for UIDsn' "" ''; checkPhase = '' make DETERMINISTIC_TESTS=true test ''; meta = with lib; { homepage = https://github.com/pimutils/vdirsyncer; description = "Synchronize calendars and contacts"; license = licenses.mit; maintainers = with maintainers; [ loewenheim ]; }; } </ins>


inherit (darwin.apple_sdk.frameworks) Security; }; <ins> vdirsyncerStable = callPackage ../tools/misc/vdirsyncer/stable.nix { }; </ins> vdpauinfo = callPackage ../tools/X11/vdpauinfo { }; verbiste = callPackage ../applications/misc/verbiste {


<del> { pkgs , buildPythonPackage , fetchPypi , python , azure-mgmt-common }: buildPythonPackage rec { version = "0.20.1"; pname = "azure-mgmt-compute"; src = fetchPypi { inherit pname version; extension = "zip"; sha256 = "97298fc7f133f1d50a974ed6299151eda494a574b0f7fdf8192a388015c2215a"; }; preConfigure = '' # Patch to make this package work on requests >= 2.11.x # CAN BE REMOVED ON NEXT PACKAGE UPDATE sed -i 's|len(request_content)|str(len(request_content))|' azure/mgmt/compute/computemanagement.py ''; postInstall = '' echo "__import__('pkg_resources').declare_namespace(__name__)" >> "$out/lib/${python.libPrefix}"/site-packages/azure/__init__.py echo "__import__('pkg_resources').declare_namespace(__name__)" >> "$out/lib/${python.libPrefix}"/site-packages/azure/mgmt/__init__.py ''; propagatedBuildInputs = [ azure-mgmt-common ]; meta = with pkgs.lib; { description = "Microsoft Azure SDK for Python"; homepage = "https://azure.microsoft.com/en-us/develop/python/"; license = licenses.asl20; maintainers = with maintainers; [ olcai ]; }; } </del>


<del> { pkgs , buildPythonPackage , fetchPypi , azure-mgmt-common , python }: buildPythonPackage rec { version = "0.20.1"; pname = "azure-mgmt-network"; src = fetchPypi { inherit pname version; extension = "zip"; sha256 = "10vj22h6nxpw0qpvib5x2g6qs5j8z31142icvh4qk8k40fcrs9hx"; }; preConfigure = '' # Patch to make this package work on requests >= 2.11.x # CAN BE REMOVED ON NEXT PACKAGE UPDATE sed -i 's|len(request_content)|str(len(request_content))|' azure/mgmt/network/networkresourceprovider.py ''; postInstall = '' echo "__import__('pkg_resources').declare_namespace(__name__)" >> "$out/lib/${python.libPrefix}"/site-packages/azure/__init__.py echo "__import__('pkg_resources').declare_namespace(__name__)" >> "$out/lib/${python.libPrefix}"/site-packages/azure/mgmt/__init__.py ''; propagatedBuildInputs = [ azure-mgmt-common ]; meta = with pkgs.lib; { description = "Microsoft Azure SDK for Python"; homepage = "https://azure.microsoft.com/en-us/develop/python/"; license = licenses.asl20; maintainers = with maintainers; [ olcai ]; }; } </del>


<del> { pkgs , buildPythonPackage , fetchPypi , azure-nspkg }: buildPythonPackage rec { version = "1.0.0"; pname = "azure-mgmt-nspkg"; src = fetchPypi { inherit pname version; extension = "zip"; sha256 = "1rq92fj3kvnqkk18596dybw0kvhgscvc6cd8hp1dhy3wrkqnhwmq"; }; propagatedBuildInputs = [ azure-nspkg ]; meta = with pkgs.lib; { description = "Microsoft Azure SDK for Python"; homepage = "https://azure.microsoft.com/en-us/develop/python/"; license = licenses.asl20; maintainers = with maintainers; [ olcai ]; }; } </del>


<del> { pkgs , buildPythonPackage , fetchPypi , python , azure-mgmt-common }: buildPythonPackage rec { version = "0.20.1"; pname = "azure-mgmt-resource"; src = fetchPypi { inherit pname version; extension = "zip"; sha256 = "0slh9qfm5nfacrdm3lid0sr8kwqzgxvrwf27laf9v38kylkfqvml"; }; preConfigure = '' # Patch to make this package work on requests >= 2.11.x # CAN BE REMOVED ON NEXT PACKAGE UPDATE sed -i 's|len(request_content)|str(len(request_content))|' azure/mgmt/resource/resourcemanagement.py ''; postInstall = '' echo "__import__('pkg_resources').declare_namespace(__name__)" >> "$out/lib/${python.libPrefix}"/site-packages/azure/__init__.py echo "__import__('pkg_resources').declare_namespace(__name__)" >> "$out/lib/${python.libPrefix}"/site-packages/azure/mgmt/__init__.py ''; propagatedBuildInputs = [ azure-mgmt-common ]; meta = with pkgs.lib; { description = "Microsoft Azure SDK for Python"; homepage = "https://azure.microsoft.com/en-us/develop/python/"; license = licenses.asl20; maintainers = with maintainers; [ olcai ]; }; } </del>