From f0c470f5eb80e484efd694451862ea8a56083b95 Mon Sep 17 00:00:00 2001 From: Aaron Jheng Date: Mon, 4 Apr 2022 01:08:24 +0000 Subject: [PATCH 01/26] oath-toolkit: Rename from oathToolkit to oath-toolkit --- nixos/modules/security/pam.nix | 6 +++--- nixos/tests/pam/pam-oath-login.nix | 2 +- pkgs/servers/web-apps/sogo/default.nix | 4 ++-- pkgs/tools/filesystems/ceph/default.nix | 4 ++-- pkgs/tools/security/oath-toolkit/update.sh | 2 +- pkgs/tools/security/pass/extensions/otp.nix | 6 +++--- pkgs/tools/security/plasma-pass/default.nix | 4 ++-- pkgs/top-level/aliases.nix | 1 + pkgs/top-level/all-packages.nix | 2 +- 9 files changed, 16 insertions(+), 15 deletions(-) diff --git a/nixos/modules/security/pam.nix b/nixos/modules/security/pam.nix index c0ef8b5f30b..3ca655c7701 100644 --- a/nixos/modules/security/pam.nix +++ b/nixos/modules/security/pam.nix @@ -476,7 +476,7 @@ let auth sufficient ${pkgs.pam_usb}/lib/security/pam_usb.so '' + (let oath = config.security.pam.oath; in optionalString cfg.oathAuth '' - auth requisite ${pkgs.oathToolkit}/lib/security/pam_oath.so window=${toString oath.window} usersfile=${toString oath.usersFile} digits=${toString oath.digits} + auth requisite ${pkgs.oath-toolkit}/lib/security/pam_oath.so window=${toString oath.window} usersfile=${toString oath.usersFile} digits=${toString oath.digits} '') + (let yubi = config.security.pam.yubico; in optionalString cfg.yubicoAuth '' auth ${yubi.control} ${pkgs.yubico-pam}/lib/security/pam_yubico.so mode=${toString yubi.mode} ${optionalString (yubi.challengeResponsePath != null) "chalresp_path=${yubi.challengeResponsePath}"} ${optionalString (yubi.mode == "client") "id=${toString yubi.id}"} ${optionalString yubi.debug "debug"} @@ -1024,7 +1024,7 @@ in ++ optional config.services.sssd.enable pkgs.sssd ++ optionals config.krb5.enable [pam_krb5 pam_ccreds] ++ optionals config.security.pam.enableOTPW [ pkgs.otpw ] - ++ optionals config.security.pam.oath.enable [ pkgs.oathToolkit ] + ++ optionals config.security.pam.oath.enable [ pkgs.oath-toolkit ] ++ optionals config.security.pam.p11.enable [ pkgs.pam_p11 ] ++ optionals config.security.pam.u2f.enable [ pkgs.pam_u2f ]; @@ -1111,7 +1111,7 @@ in mr ${pkgs.pam_usb}/lib/security/pam_usb.so, '' + optionalString (isEnabled (cfg: cfg.oathAuth)) '' - "mr ${pkgs.oathToolkit}/lib/security/pam_oath.so, + "mr ${pkgs.oath-toolkit}/lib/security/pam_oath.so, '' + optionalString (isEnabled (cfg: cfg.yubicoAuth)) '' mr ${pkgs.yubico-pam}/lib/security/pam_yubico.so, diff --git a/nixos/tests/pam/pam-oath-login.nix b/nixos/tests/pam/pam-oath-login.nix index 8fb7553de90..c532e81e674 100644 --- a/nixos/tests/pam/pam-oath-login.nix +++ b/nixos/tests/pam/pam-oath-login.nix @@ -7,7 +7,7 @@ let # how many passwords have been made. In this env, we'll always be on # the 0th counter, so the password is static. # - # Generated in nix-shell -p oathToolkit + # Generated in nix-shell -p oath-toolkit # via: oathtool -v -d6 -w10 cdd4083ef8ff1fa9178c6d46bfb1a3 # and picking a the first 4: oathSnakeOilPassword1 = "143349"; diff --git a/pkgs/servers/web-apps/sogo/default.nix b/pkgs/servers/web-apps/sogo/default.nix index 8af14f109a3..f94436c1f37 100644 --- a/pkgs/servers/web-apps/sogo/default.nix +++ b/pkgs/servers/web-apps/sogo/default.nix @@ -1,6 +1,6 @@ { gnustep, lib, fetchFromGitHub, fetchpatch, makeWrapper, python3, lndir , openssl, openldap, sope, libmemcached, curl, libsodium, libytnef, libzip, pkg-config, nixosTests -, oathToolkit }: +, oath-toolkit }: gnustep.stdenv.mkDerivation rec { pname = "SOGo"; version = "5.5.0"; @@ -13,7 +13,7 @@ gnustep.stdenv.mkDerivation rec { }; nativeBuildInputs = [ gnustep.make makeWrapper python3 ]; - buildInputs = [ gnustep.base sope openssl libmemcached curl libsodium libytnef libzip pkg-config openldap oathToolkit ]; + buildInputs = [ gnustep.base sope openssl libmemcached curl libsodium libytnef libzip pkg-config openldap oath-toolkit ]; patches = [ # TODO: take a closer look at other patches in https://sources.debian.org/patches/sogo/ and https://github.com/Skrupellos/sogo-patches diff --git a/pkgs/tools/filesystems/ceph/default.nix b/pkgs/tools/filesystems/ceph/default.nix index 1162c4e69b1..678835bf7bf 100644 --- a/pkgs/tools/filesystems/ceph/default.nix +++ b/pkgs/tools/filesystems/ceph/default.nix @@ -9,7 +9,7 @@ , gtest , cunit, snappy , makeWrapper -, leveldb, oathToolkit +, leveldb, oath-toolkit , libnl, libcap_ng , rdkafka , nixosTests @@ -161,7 +161,7 @@ in rec { buildInputs = cryptoLibsMap.${cryptoStr} ++ [ boost ceph-python-env libxml2 optYasm optLibatomic_ops optLibs3 malloc zlib openldap lttng-ust babeltrace gperf gtest cunit - snappy lz4 oathToolkit leveldb libnl libcap_ng rdkafka + snappy lz4 oath-toolkit leveldb libnl libcap_ng rdkafka cryptsetup sqlite lua icu bzip2 ] ++ lib.optionals stdenv.isLinux [ linuxHeaders util-linux libuuid udev keyutils liburing optLibaio optLibxfs optZfs diff --git a/pkgs/tools/security/oath-toolkit/update.sh b/pkgs/tools/security/oath-toolkit/update.sh index 3502a541fa8..9f56ae41232 100755 --- a/pkgs/tools/security/oath-toolkit/update.sh +++ b/pkgs/tools/security/oath-toolkit/update.sh @@ -5,7 +5,7 @@ set -euo pipefail nixfile='default.nix' release_url='https://download.savannah.nongnu.org/releases/oath-toolkit/' -attr='oathToolkit' +attr='oath-toolkit' command='oathtool --version' color() { diff --git a/pkgs/tools/security/pass/extensions/otp.nix b/pkgs/tools/security/pass/extensions/otp.nix index 8d9b350543d..15f075ccec4 100644 --- a/pkgs/tools/security/pass/extensions/otp.nix +++ b/pkgs/tools/security/pass/extensions/otp.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, oathToolkit }: +{ lib, stdenv, fetchFromGitHub, oath-toolkit }: stdenv.mkDerivation rec { pname = "pass-otp"; @@ -11,12 +11,12 @@ stdenv.mkDerivation rec { sha256 = "0cpqrf3939hcvwg7sd8055ghc8x964ilimlri16czzx188a9jx9v"; }; - buildInputs = [ oathToolkit ]; + buildInputs = [ oath-toolkit ]; dontBuild = true; patchPhase = '' - sed -i -e 's|OATH=\$(which oathtool)|OATH=${oathToolkit}/bin/oathtool|' otp.bash + sed -i -e 's|OATH=\$(which oathtool)|OATH=${oath-toolkit}/bin/oathtool|' otp.bash ''; installFlags = [ "PREFIX=$(out)" diff --git a/pkgs/tools/security/plasma-pass/default.nix b/pkgs/tools/security/plasma-pass/default.nix index 20f64b725f1..2ff2ab38cef 100644 --- a/pkgs/tools/security/plasma-pass/default.nix +++ b/pkgs/tools/security/plasma-pass/default.nix @@ -1,7 +1,7 @@ { mkDerivation, lib, fetchFromGitLab, cmake, extra-cmake-modules , ki18n , kitemmodels -, oathToolkit +, oath-toolkit , qgpgme , plasma-framework , qt5 }: @@ -21,7 +21,7 @@ mkDerivation rec { buildInputs = [ ki18n kitemmodels - oathToolkit + oath-toolkit qgpgme plasma-framework qt5.qtbase diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index dc86887cba1..b2806830e13 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -803,6 +803,7 @@ mapAliases ({ ### O ### + oathToolkit = oath-toolkit; # Added 2022-04-04 oracleXE = throw "oracleXE has been removed, as it's heavily outdated and unmaintained"; # Added 2020-10-09 OVMF-CSM = throw "OVMF-CSM has been removed in favor of OVMFFull"; # Added 2021-10-16 OVMF-secureBoot = throw "OVMF-secureBoot has been removed in favor of OVMFFull"; # Added 2021-10-16 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 65c5b9e133f..c0021bc588c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8542,7 +8542,7 @@ with pkgs; oapi-codegen = callPackage ../tools/networking/oapi-codegen { }; - oathToolkit = callPackage ../tools/security/oath-toolkit { }; + oath-toolkit = callPackage ../tools/security/oath-toolkit { }; oatpp = callPackage ../development/libraries/oatpp { }; From 0fd723f3b4e2af3338207bc39db580bc7be4c286 Mon Sep 17 00:00:00 2001 From: Armeen Mahdian Date: Sun, 24 Apr 2022 21:32:23 -0500 Subject: [PATCH 02/26] xpdf: 4.03 -> 4.04 --- pkgs/applications/misc/xpdf/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/misc/xpdf/default.nix b/pkgs/applications/misc/xpdf/default.nix index 927b04d5e21..58c0c066d83 100644 --- a/pkgs/applications/misc/xpdf/default.nix +++ b/pkgs/applications/misc/xpdf/default.nix @@ -12,11 +12,11 @@ assert enablePrinting -> cups != null; stdenv.mkDerivation rec { pname = "xpdf"; - version = "4.03"; + version = "4.04"; src = fetchzip { url = "https://dl.xpdfreader.com/xpdf-${version}.tar.gz"; - sha256 = "09yhvmh1vxjy763nnmawynygp5bh3j4i8ixqja64j11676yl77n6"; + hash = "sha256-ujH9KDwFRjPIKwdMg79Mab9BfA2HooY5+2PESUgnGDY="; }; # Fix "No known features for CXX compiler", see From 1be5ae112f4d42c1dfecd9ab555e098edfe4c401 Mon Sep 17 00:00:00 2001 From: Armeen Mahdian Date: Tue, 26 Apr 2022 09:10:44 -0500 Subject: [PATCH 03/26] xpf: remove --- pkgs/tools/text/xml/xpf/default.nix | 21 --------------------- pkgs/top-level/aliases.nix | 1 + pkgs/top-level/all-packages.nix | 4 ---- 3 files changed, 1 insertion(+), 25 deletions(-) delete mode 100644 pkgs/tools/text/xml/xpf/default.nix diff --git a/pkgs/tools/text/xml/xpf/default.nix b/pkgs/tools/text/xml/xpf/default.nix deleted file mode 100644 index ce0813c2ef4..00000000000 --- a/pkgs/tools/text/xml/xpf/default.nix +++ /dev/null @@ -1,21 +0,0 @@ -{lib, stdenv, fetchurl, python2, libxml2}: - -assert libxml2.pythonSupport == true; - -stdenv.mkDerivation rec { - pname = "xpf"; - version = "0.2"; - - src = fetchurl { - url = "http://tarballs.nixos.org/xpf-${version}.tar.gz"; - sha256 = "0ljx91w68rnh4871c0xlq2whlmhqz8dr39wcdczfjjpniqz1fmpz"; - }; - - buildInputs = [ python2 libxml2 ]; - - meta = { - description = "XML Pipes and Filters - command line tools for manipulating and querying XML data"; - homepage = "http://www.cs.uu.nl/wiki/bin/view/Martin/XmlPipesAndFilters"; - platforms = lib.platforms.unix; - }; -} diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index fcfce41aac1..9beb8d48c29 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -1384,6 +1384,7 @@ mapAliases ({ xmonad_log_applet_gnome3 = throw "'xmonad_log_applet_gnome3' has been renamed to/replaced by 'xmonad_log_applet'"; # Converted to throw 2022-02-22 xmpppy = throw "xmpppy has been removed from nixpkgs as it is unmaintained and python2-only"; xp-pen-g430 = pentablet-driver; # Added 2020-05-03 + xpf = throw "xpf has been removed: abandoned by upstream"; # Added 2022-04-26 xf86_video_nouveau = throw "'xf86_video_nouveau' has been renamed to/replaced by 'xorg.xf86videonouveau'"; # Converted to throw 2022-02-22 xf86_input_mtrack = throw '' xf86_input_mtrack has been removed from nixpkgs as it is broken and diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d57f89d8881..8f6d059d26e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -11727,10 +11727,6 @@ with pkgs; inherit (darwin.apple_sdk.frameworks) AppKit; }; - xpf = callPackage ../tools/text/xml/xpf { - libxml2 = libxml2Python; - }; - xsecurelock = callPackage ../tools/X11/xsecurelock { }; xsel = callPackage ../tools/misc/xsel { }; From 67b887147fc935ab8587d9b712541dcbf902b48a Mon Sep 17 00:00:00 2001 From: Armeen Mahdian Date: Tue, 26 Apr 2022 09:35:10 -0500 Subject: [PATCH 04/26] nmap: remove graphical support --- pkgs/tools/security/nmap/default.nix | 24 ++++++------------------ pkgs/top-level/aliases.nix | 3 ++- pkgs/top-level/all-packages.nix | 4 ---- 3 files changed, 8 insertions(+), 23 deletions(-) diff --git a/pkgs/tools/security/nmap/default.nix b/pkgs/tools/security/nmap/default.nix index 0a6733e993d..5e71c2e1655 100644 --- a/pkgs/tools/security/nmap/default.nix +++ b/pkgs/tools/security/nmap/default.nix @@ -1,9 +1,7 @@ { lib, stdenv, fetchurl, fetchpatch, libpcap, pkg-config, openssl, lua5_3 , pcre, libssh2 -, graphicalSupport ? false , libX11 ? null , gtk2 ? null -, python2 ? null , makeWrapper ? null , withLua ? true }: @@ -11,7 +9,7 @@ with lib; stdenv.mkDerivation rec { - pname = "nmap${optionalString graphicalSupport "-graphical"}"; + pname = "nmap"; version = "7.92"; src = fetchurl { @@ -41,7 +39,9 @@ stdenv.mkDerivation rec { configureFlags = [ (if withLua then "--with-liblua=${lua5_3}" else "--without-liblua") "--with-liblinear=included" - ] ++ optionals (!graphicalSupport) [ "--without-ndiff" "--without-zenmap" ]; + "--without-ndiff" + "--without-zenmap" + ]; makeFlags = optionals (stdenv.buildPlatform != stdenv.hostPlatform) [ "AR=${stdenv.cc.bintools.targetPrefix}ar" @@ -49,20 +49,8 @@ stdenv.mkDerivation rec { "CC=${stdenv.cc.targetPrefix}gcc" ]; - pythonPath = with python2.pkgs; optionals graphicalSupport [ - pygtk pysqlite pygobject2 pycairo - ]; - - nativeBuildInputs = [ pkg-config ] ++ optionals graphicalSupport [ python2.pkgs.wrapPython ]; - buildInputs = [ pcre libssh2 libpcap openssl ] ++ optionals graphicalSupport (with python2.pkgs; [ - python2 libX11 gtk2 - ]); - - postInstall = optionalString graphicalSupport '' - buildPythonPath "$out $pythonPath" - patchPythonScript $out/bin/ndiff - patchPythonScript $out/bin/zenmap - ''; + nativeBuildInputs = [ pkg-config ]; + buildInputs = [ pcre libssh2 libpcap openssl ]; enableParallelBuilding = true; diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index fcfce41aac1..61700b2fd4d 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -867,7 +867,8 @@ mapAliases ({ nix_2_6 = nixVersions.nix_2_6; nixopsUnstable = nixops_unstable; # Added 2022-03-03 nmap-unfree = nmap; # Added 2021-04-06 - nmap_graphical = throw "'nmap_graphical' has been renamed to/replaced by 'nmap-graphical'"; # Converted to throw 2022-02-22 + nmap-graphical = throw "nmap graphical support has been removed due to its python2 dependency"; # Added 2022-04-26 + nmap_graphical = throw "nmap graphical support has been removed due to its python2 dependency"; # Modified 2022-04-26 nologin = throw "'nologin' has been renamed to/replaced by 'shadow'"; # Converted to throw 2022-02-22 nordic-polar = throw "nordic-polar was removed on 2021-05-27, now integrated in nordic"; # Added 2021-05-27 noto-fonts-cjk = noto-fonts-cjk-sans; # Added 2021-12-16 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d57f89d8881..c487a6bdedc 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8675,10 +8675,6 @@ with pkgs; nmap = callPackage ../tools/security/nmap { }; - nmap-graphical = nmap.override { - graphicalSupport = true; - }; - nmap-formatter = callPackage ../tools/security/nmap-formatter { }; nmapsi4 = libsForQt5.callPackage ../tools/security/nmap/qt.nix { }; From d64b2cc1e9c8f160cfa3c10ed3e9aa8b740173e7 Mon Sep 17 00:00:00 2001 From: Armeen Mahdian Date: Tue, 26 Apr 2022 10:49:55 -0500 Subject: [PATCH 05/26] twister: remove --- .../networking/p2p/twister/default.nix | 70 ------------------- pkgs/top-level/aliases.nix | 1 + pkgs/top-level/all-packages.nix | 4 -- 3 files changed, 1 insertion(+), 74 deletions(-) delete mode 100644 pkgs/applications/networking/p2p/twister/default.nix diff --git a/pkgs/applications/networking/p2p/twister/default.nix b/pkgs/applications/networking/p2p/twister/default.nix deleted file mode 100644 index 979ac955caf..00000000000 --- a/pkgs/applications/networking/p2p/twister/default.nix +++ /dev/null @@ -1,70 +0,0 @@ -{ lib, stdenv, fetchFromGitHub, fetchpatch, autoconf, automake, libtool, pkg-config, python2 -, boost, db, openssl, geoip, libiconv, miniupnpc, srcOnly -}: - -let - twisterHTML = srcOnly { - name = "twister-html"; - src = fetchFromGitHub { - owner = "miguelfreitas"; - repo = "twister-html"; - rev = "01e7f7ca9b7e42ed90f91bc42da2c909ca5c0b9b"; - sha256 = "sha256-Hi/VAEwujWhKAPaYIuvrxRIuPQa9AYwXiHUGbWxckmk="; - }; - }; - - boostPython = boost.override { - enablePython = true; - python = python2; - }; - -in stdenv.mkDerivation rec { - pname = "twister"; - version = "2019-08-19"; - - src = fetchFromGitHub { - owner = "miguelfreitas"; - repo = "twister-core"; - rev = "31faf3f63e461ea0a9b23081567a4a552cf06873"; - sha256 = "0xh1lgnl9nd86jr0mp7m8bkd7r5j4d6chd0y73h2xv4aq5sld0sp"; - }; - - configureFlags = [ - "--with-libgeoip" - "--with-libiconv" - "--disable-deprecated-functions" - "--enable-tests" - "--enable-python-binding" - "--with-boost-libdir=${boostPython.out}/lib" - ]; - - nativeBuildInputs = [ pkg-config automake autoconf ]; - buildInputs = [ - libtool python2 - boostPython db openssl geoip miniupnpc libiconv - ]; - - postPatch = '' - sed -i -e '/-htmldir/s|(default: [^)]*)|(default: ${twisterHTML})|' \ - src/init.cpp - sed -i -e '/GetDataDir.*html/s|path *= *[^;]*|path = "${twisterHTML}"|' \ - src/util.cpp - ''; - - preConfigure = '' - sh autotool.sh - ''; - - installPhase = '' - install -vD twisterd "$out/bin/twisterd" - ''; - - enableParallelBuilding = true; - - meta = { - homepage = "http://www.twister.net.co/"; - description = "Peer-to-peer microblogging"; - license = lib.licenses.mit; - platforms = lib.platforms.linux; - }; -} diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index fcfce41aac1..1f4fa476518 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -1301,6 +1301,7 @@ mapAliases ({ tshark = throw "'tshark' has been renamed to/replaced by 'wireshark-cli'"; # Converted to throw 2022-02-22 tuijam = throw "tuijam has been removed because Google Play Music was discontinued"; # Added 2021-03-07 turbo-geth = throw "turbo-geth has been renamed to erigon"; # Added 2021-08-08 + twister = throw "twister has been removed: abandoned by upstream and python2-only"; # Added 2022-04-26 typora = throw "Newer versions of typora use anti-user encryption and refuse to start. As such it has been removed"; # Added 2021-09-11 ### U ### diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d57f89d8881..2bcfd1d27ab 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -29969,10 +29969,6 @@ with pkgs; swt = swt_jdk8; }; - twister = callPackage ../applications/networking/p2p/twister { - boost = boost16x; - }; - twmn = libsForQt5.callPackage ../applications/misc/twmn { }; testssl = callPackage ../applications/networking/testssl { }; From b918d3c71cef1b3ba8b04efe1d8ce2905dad2141 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sat, 30 Apr 2022 10:36:26 +0000 Subject: [PATCH 06/26] platformsh: 3.79.0 -> 3.79.1 https://github.com/platformsh/platformsh-cli/releases/tag/v3.79.1 --- pkgs/misc/platformsh/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/misc/platformsh/default.nix b/pkgs/misc/platformsh/default.nix index 176fdeb388e..306c56b99f2 100644 --- a/pkgs/misc/platformsh/default.nix +++ b/pkgs/misc/platformsh/default.nix @@ -2,14 +2,14 @@ let pname = "platformsh"; - version = "3.79.0"; + version = "3.79.1"; in stdenv.mkDerivation { inherit pname version; src = fetchurl { url = "https://github.com/platformsh/platformsh-cli/releases/download/v${version}/platform.phar"; - sha256 = "sha256-gTh1VS/b+D8E67w6Q4u9h0EhpFZiA2gBGe4mo49+9KY="; + sha256 = "sha256-Vfb0Yiue8S9L2UeFDLCoB/vUAIsRItTvShqD36CXEnY="; }; dontUnpack = true; From c25b74970d2bb272e4616a65485f560602a788cc Mon Sep 17 00:00:00 2001 From: "Berk D. Demir" Date: Wed, 27 Apr 2022 01:33:53 +0000 Subject: [PATCH 07/26] runitor: init at 0.9.2 --- maintainers/maintainer-list.nix | 6 ++++ pkgs/tools/system/runitor/default.nix | 52 +++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 3 files changed, 60 insertions(+) create mode 100644 pkgs/tools/system/runitor/default.nix diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index e8b3232fc75..dd8fd48cd67 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -1396,6 +1396,12 @@ githubId = 164148; name = "Ben Darwin"; }; + bdd = { + email = "bdd@mindcast.org"; + github = "bdd"; + githubId = 11135; + name = "Berk D. Demir"; + }; bdesham = { email = "benjamin@esham.io"; github = "bdesham"; diff --git a/pkgs/tools/system/runitor/default.nix b/pkgs/tools/system/runitor/default.nix new file mode 100644 index 00000000000..5bb821afdaf --- /dev/null +++ b/pkgs/tools/system/runitor/default.nix @@ -0,0 +1,52 @@ +{ lib, buildGoModule, fetchFromGitHub, testers, runitor }: + +buildGoModule rec { + pname = "runitor"; + version = "0.9.2"; + vendorSha256 = null; + + src = fetchFromGitHub { + owner = "bdd"; + repo = "runitor"; + rev = "v${version}"; + sha256 = "sha256-LuCxn4j0MlnJjSh3d18YNzNrtbqtMPxgkZttqKUGJd4"; + }; + + ldflags = [ + "-s" "-w" "-X main.Version=v${version}" + ]; + + # TODO(cole-h): + # End-to-end tests requiring localhost networking currently under + # OfBorg's Linux builders, while passing under Darwin. + # + # Ref: https://github.com/NixOS/nixpkgs/pull/170566#issuecomment-1114034891 + # + # Temporarily disable tests. + doCheck = false; + + passthru.tests.version = testers.testVersion { + package = runitor; + command = "runitor -version"; + version = "v${version}"; + }; + + # Unit tests require binding to local addresses for listening sockets. + __darwinAllowLocalNetworking = true; + + meta = with lib; { + homepage = "https://bdd.fi/x/runitor"; + description = "A command runner with healthchecks.io integration"; + longDescription = '' + Runitor runs the supplied command, captures its output, and based on its exit + code reports successful or failed execution to https://healthchecks.io or your + private instance. + + Healthchecks.io is a web service for monitoring periodic tasks. It's like a + dead man's switch for your cron jobs. You get alerted if they don't run on time + or terminate with a failure. + ''; + license = licenses.bsd0; + maintainers = with maintainers; [ bdd ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e665d0bdc23..1e02354e376 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -34431,6 +34431,8 @@ with pkgs; runit = callPackage ../tools/system/runit { }; + runitor = callPackage ../tools/system/runitor { }; + refind = callPackage ../tools/bootloaders/refind { }; spectrojack = callPackage ../applications/audio/spectrojack { }; From 37cada5b6183198cbecd2a481f5c60437b947960 Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Tue, 3 May 2022 08:10:23 -0500 Subject: [PATCH 08/26] vlc: 3.0.17 -> 3.0.17.3 https://code.videolan.org/videolan/vlc/-/tags/3.0.17.3 https://code.videolan.org/videolan/vlc/-/tags/3.0.17.2 https://code.videolan.org/videolan/vlc/-/tags/3.0.17.1 There's a 3.0.17.4, but is not listed as latest on videolan.org yet, and is a hotfix for Windows, so stick with 3.0.17.3 for now. --- pkgs/applications/video/vlc/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/video/vlc/default.nix b/pkgs/applications/video/vlc/default.nix index c19b8fa15cd..700730a57fc 100644 --- a/pkgs/applications/video/vlc/default.nix +++ b/pkgs/applications/video/vlc/default.nix @@ -82,11 +82,11 @@ let in stdenv.mkDerivation rec { pname = "${optionalString onlyLibVLC "lib"}vlc"; - version = "3.0.17"; + version = "3.0.17.3"; src = fetchurl { url = "http://get.videolan.org/vlc/${version}/vlc-${version}.tar.xz"; - sha256 = "sha256-SL2b8zeqEHoVJOulfFLcSpHin1qX+97pL2pNupA4PNA="; + sha256 = "sha256-b36Q74lz0x2W3mTbgXFz40UVCClxepQISxu4MhzeIBQ="; }; # VLC uses a *ton* of libraries for various pieces of functionality, many of From 0b1c28d5a1c46a7a10aa518863b1bd532824495e Mon Sep 17 00:00:00 2001 From: Luis Pedro Coelho Date: Wed, 4 May 2022 02:13:31 +0200 Subject: [PATCH 09/26] Static build for megahit --- pkgs/applications/science/biology/megahit/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/applications/science/biology/megahit/default.nix b/pkgs/applications/science/biology/megahit/default.nix index ee2f16f389b..45cb7560502 100644 --- a/pkgs/applications/science/biology/megahit/default.nix +++ b/pkgs/applications/science/biology/megahit/default.nix @@ -14,6 +14,9 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake ]; buildInputs = [ zlib ]; + cmakeFlags = lib.optional stdenv.hostPlatform.isStatic [ + "-DSTATIC_BUILD=ON" + ]; meta = with lib; { description = "An ultra-fast single-node solution for large and complex metagenomics assembly via succinct de Bruijn graph"; license = licenses.gpl3; From 967a5d78962b88f4e91fe5e3e4497912556ea60b Mon Sep 17 00:00:00 2001 From: Luis Pedro Coelho Date: Wed, 4 May 2022 02:15:17 +0200 Subject: [PATCH 10/26] Static builds for HTSLIB We need to disable curses support and replace the build and install phases (otherwise, they expect that *.so files will be present). --- .../science/biology/htslib/default.nix | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/science/biology/htslib/default.nix b/pkgs/development/libraries/science/biology/htslib/default.nix index d93b4fb2a5a..2e3f9dec319 100644 --- a/pkgs/development/libraries/science/biology/htslib/default.nix +++ b/pkgs/development/libraries/science/biology/htslib/default.nix @@ -14,9 +14,25 @@ stdenv.mkDerivation rec { buildInputs = [ zlib bzip2 xz curl ]; - configureFlags = [ "--enable-libcurl" ]; # optional but strongly recommended + configureFlags = if ! stdenv.hostPlatform.isStatic + then [ "--enable-libcurl" ] # optional but strongly recommended + else [ "--disable-libcurl" "--disable-plugins" ]; - installFlags = [ "prefix=$(out)" ]; + + # In the case of static builds, we need to replace the build and install phases + buildPhase = lib.optional stdenv.hostPlatform.isStatic '' + make AR=$AR lib-static + make LDFLAGS=-static bgzip htsfile tabix + ''; + + installPhase = lib.optional stdenv.hostPlatform.isStatic '' + install -d $out/bin + install -d $out/lib + install -d $out/include/htslib + install -D libhts.a $out/lib + install -m644 htslib/*h $out/include/htslib + install -D bgzip htsfile tabix $out/bin + ''; preCheck = '' patchShebangs test/ From 47588733783c4133de4973caa466d52d9c04992a Mon Sep 17 00:00:00 2001 From: Luis Pedro Coelho Date: Wed, 4 May 2022 02:16:17 +0200 Subject: [PATCH 11/26] Static build for samtools Curses is not supported (it may be possible to support it) --- pkgs/applications/science/biology/samtools/default.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/science/biology/samtools/default.nix b/pkgs/applications/science/biology/samtools/default.nix index 98b0394c35f..ec61e0bd7ce 100644 --- a/pkgs/applications/science/biology/samtools/default.nix +++ b/pkgs/applications/science/biology/samtools/default.nix @@ -22,8 +22,15 @@ stdenv.mkDerivation rec { buildInputs = [ zlib ncurses htslib ]; + preConfigure = lib.optional stdenv.hostPlatform.isStatic '' + export LIBS="-lz -lbz2 -llzma" + ''; + makeFlags = lib.optional stdenv.hostPlatform.isStatic "AR=${stdenv.cc.targetPrefix}ar"; + configureFlags = [ "--with-htslib=${htslib}" ] - ++ lib.optional (ncurses == null) "--without-curses"; + ++ lib.optional (ncurses == null) "--without-curses" + ++ lib.optional stdenv.hostPlatform.isStatic ["--without-curses" ] + ; preCheck = '' patchShebangs test/ From 596c5e7ea26ba8c0bcd6d2f09ca7cb8202c20e70 Mon Sep 17 00:00:00 2001 From: Luis Pedro Coelho Date: Wed, 4 May 2022 02:20:50 +0200 Subject: [PATCH 12/26] Static bwa AR needs to be passed specifically on the command line --- pkgs/applications/science/biology/bwa/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/applications/science/biology/bwa/default.nix b/pkgs/applications/science/biology/bwa/default.nix index a2a11b1d451..d4727b41bd0 100644 --- a/pkgs/applications/science/biology/bwa/default.nix +++ b/pkgs/applications/science/biology/bwa/default.nix @@ -17,6 +17,8 @@ stdenv.mkDerivation rec { sed -i '/^CC/d' Makefile ''; + makeFlags = lib.optional stdenv.hostPlatform.isStatic "AR=${stdenv.cc.targetPrefix}ar"; + # it's unclear which headers are intended to be part of the public interface # so we may find ourselves having to add more here over time installPhase = '' From 70f212bb5bd19642a5d419c33dd1d4e00eb3962a Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Wed, 4 May 2022 04:20:00 +0000 Subject: [PATCH 13/26] nodejs-14_x: 14.19.1 -> 14.19.2 https://github.com/nodejs/node/releases/tag/v14.19.2 --- pkgs/development/web/nodejs/v14.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/web/nodejs/v14.nix b/pkgs/development/web/nodejs/v14.nix index e2a65ace381..d2f63498947 100644 --- a/pkgs/development/web/nodejs/v14.nix +++ b/pkgs/development/web/nodejs/v14.nix @@ -7,7 +7,7 @@ let in buildNodejs { inherit enableNpm; - version = "14.19.1"; - sha256 = "sha256-4a4J3YYas5rwRIO7XA+lTd2CtrFVQ76aJ+pnBKi6ndk="; + version = "14.19.2"; + sha256 = "sha256-70N1qRUv9p8oI9eyCjtTdnoEYWS7rHgkQpyyFtFojPA="; patches = lib.optional stdenv.isDarwin ./bypass-xcodebuild.diff; } From 7b1a798741ceb02aa572a73896bab88c6ea981b1 Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Wed, 4 May 2022 04:20:00 +0000 Subject: [PATCH 14/26] platformsh: 3.79.1 -> 3.79.2 https://github.com/platformsh/platformsh-cli/releases/tag/v3.79.2 --- pkgs/misc/platformsh/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/misc/platformsh/default.nix b/pkgs/misc/platformsh/default.nix index 306c56b99f2..9c0410b4738 100644 --- a/pkgs/misc/platformsh/default.nix +++ b/pkgs/misc/platformsh/default.nix @@ -2,14 +2,14 @@ let pname = "platformsh"; - version = "3.79.1"; + version = "3.79.2"; in stdenv.mkDerivation { inherit pname version; src = fetchurl { url = "https://github.com/platformsh/platformsh-cli/releases/download/v${version}/platform.phar"; - sha256 = "sha256-Vfb0Yiue8S9L2UeFDLCoB/vUAIsRItTvShqD36CXEnY="; + sha256 = "sha256-STGMKWgI4C6ccg8DGUhdnEENOB2//gtpU0ljM4cQCXI="; }; dontUnpack = true; From c0bb20e08e426f585b45cafc51b0ba73109a8434 Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Wed, 4 May 2022 04:20:00 +0000 Subject: [PATCH 15/26] nodejs-18_x: fix completion generation Since Node.js 18.0.0 the completion generation requires the environment variable HOME to be set. --- pkgs/development/web/nodejs/nodejs.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/web/nodejs/nodejs.nix b/pkgs/development/web/nodejs/nodejs.nix index 53d24a81aec..ab9a8b95d1a 100644 --- a/pkgs/development/web/nodejs/nodejs.nix +++ b/pkgs/development/web/nodejs/nodejs.nix @@ -136,7 +136,7 @@ let ${optionalString (enableNpm && stdenv.hostPlatform == stdenv.buildPlatform) '' mkdir -p $out/share/bash-completion/completions/ - $out/bin/npm completion > $out/share/bash-completion/completions/npm || : + HOME=$TMPDIR $out/bin/npm completion > $out/share/bash-completion/completions/npm for dir in "$out/lib/node_modules/npm/man/"*; do mkdir -p $out/share/man/$(basename "$dir") for page in "$dir"/*; do From cc67617dd59d6ada1e7ee71adc145a3fdaafa78d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Tue, 3 May 2022 20:59:13 -0700 Subject: [PATCH 16/26] udiskie: 2.4.0 -> 2.4.2 https://github.com/coldfix/udiskie/blob/v2.4.2/CHANGES.rst --- pkgs/applications/misc/udiskie/default.nix | 55 ++++++++++--------- .../misc/udiskie/locale-path.patch | 17 ++++++ pkgs/top-level/all-packages.nix | 2 +- 3 files changed, 48 insertions(+), 26 deletions(-) create mode 100644 pkgs/applications/misc/udiskie/locale-path.patch diff --git a/pkgs/applications/misc/udiskie/default.nix b/pkgs/applications/misc/udiskie/default.nix index fb9c7021b15..d5d4b766e77 100644 --- a/pkgs/applications/misc/udiskie/default.nix +++ b/pkgs/applications/misc/udiskie/default.nix @@ -1,42 +1,47 @@ { lib +, asciidoc , fetchFromGitHub -, buildPythonApplication -, asciidoc-full -, docopt -, gettext , gobject-introspection , gtk3 -, keyutils +, installShellFiles , libappindicator-gtk3 , libnotify , librsvg -, nose -, pygobject3 -, pyyaml +, python3 , udisks2 , wrapGAppsHook }: -buildPythonApplication rec { +python3.pkgs.buildPythonApplication rec { pname = "udiskie"; - version = "2.4.0"; + version = "2.4.2"; + + format = "setuptools"; src = fetchFromGitHub { owner = "coldfix"; repo = "udiskie"; rev = "v${version}"; - hash = "sha256-T4kMPMXfehZT7P+TOd1llR2TbHPA/quNL545xxlmJfE="; + hash = "sha256-lQMJVSY3JeZYYOFDyV29Ye2j8r+ngE/ta2wQYipy4hU="; }; - outputs = [ "out" "man" ]; + patches = [ + ./locale-path.patch + ]; + + postPatch = '' + substituteInPlace udiskie/locale.py --subst-var out + ''; nativeBuildInputs = [ - asciidoc-full # Man page - gettext + asciidoc # Man page gobject-introspection + installShellFiles wrapGAppsHook ]; + dontWrapGApps = true; + buildInputs = [ gobject-introspection gtk3 @@ -46,8 +51,9 @@ buildPythonApplication rec { udisks2 ]; - propagatedBuildInputs = [ + propagatedBuildInputs = with python3.pkgs; [ docopt + keyutils pygobject3 pyyaml ]; @@ -57,21 +63,20 @@ buildPythonApplication rec { ''; postInstall = '' - mkdir -p $man/share/man/man8 - cp -v doc/udiskie.8 $man/share/man/man8/ + installManPage doc/udiskie.8 ''; - checkInputs = [ - keyutils - nose - ]; - - checkPhase = '' - nosetests + preFixup = '' + makeWrapperArgs+=("''${gappsWrapperArgs[@]}") ''; + checkInputs = with python3.pkgs; [ + pytestCheckHook + ]; + meta = with lib; { homepage = "https://github.com/coldfix/udiskie"; + changelog = "https://github.com/coldfix/udiskie/blob/${src.rev}/CHANGES.rst"; description = "Removable disk automounter for udisks"; longDescription = '' udiskie is a udisks2 front-end that allows to manage removeable media such @@ -88,6 +93,6 @@ buildPythonApplication rec { - password caching (requires python keyutils 0.3) ''; license = licenses.mit; - maintainers = with maintainers; [ AndersonTorres ]; + maintainers = with maintainers; [ AndersonTorres dotlambda ]; }; } diff --git a/pkgs/applications/misc/udiskie/locale-path.patch b/pkgs/applications/misc/udiskie/locale-path.patch new file mode 100644 index 00000000000..f454bee467d --- /dev/null +++ b/pkgs/applications/misc/udiskie/locale-path.patch @@ -0,0 +1,17 @@ +diff --git a/udiskie/locale.py b/udiskie/locale.py +index f12bea9..450e38b 100644 +--- a/udiskie/locale.py ++++ b/udiskie/locale.py +@@ -10,10 +10,8 @@ from gettext import translation + testdirs = [ + # manual override: + os.environ.get('TEXTDOMAINDIR'), +- # editable installation: +- os.path.join(os.path.dirname(__file__), '../build/locale'), +- # user or virtualenv installation: +- os.path.join(sys.prefix, 'share/locale'), ++ # Nix installation: ++ os.path.join('@out@', 'share/locale'), + ] + testfile = 'en_US/LC_MESSAGES/udiskie.mo' + localedir = next( diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 47d3dd1d701..6df3439c015 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -29348,7 +29348,7 @@ with pkgs; udevil = callPackage ../applications/misc/udevil {}; - udiskie = python3.pkgs.callPackage ../applications/misc/udiskie { }; + udiskie = callPackage ../applications/misc/udiskie { }; sacc = callPackage ../applications/networking/gopher/sacc { }; From c3a7edf7d23fe20f8ba9a4e0c4b6fe6678f8e0ea Mon Sep 17 00:00:00 2001 From: Dennis Gosnell Date: Wed, 4 May 2022 15:41:04 +0900 Subject: [PATCH 17/26] purescript: drop ncurses dep `purs` no longer depends on ncurses/libtinfo since 0.14.8: https://github.com/purescript/purescript/releases/tag/v0.14.8 --- .../development/compilers/purescript/purescript/default.nix | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pkgs/development/compilers/purescript/purescript/default.nix b/pkgs/development/compilers/purescript/purescript/default.nix index 897348daf3d..4c7311d5325 100644 --- a/pkgs/development/compilers/purescript/purescript/default.nix +++ b/pkgs/development/compilers/purescript/purescript/default.nix @@ -1,4 +1,4 @@ -{ stdenv, pkgs, fetchurl, zlib, gmp, ncurses5, lib }: +{ stdenv, pkgs, fetchurl, zlib, gmp, lib }: # from justinwoo/easy-purescript-nix # https://github.com/justinwoo/easy-purescript-nix/blob/d383972c82620a712ead4033db14110497bc2c9c/purs.nix @@ -35,9 +35,7 @@ in stdenv.mkDerivation rec { }; - buildInputs = [ zlib - gmp - ncurses5 ]; + buildInputs = [ zlib gmp ]; libPath = lib.makeLibraryPath buildInputs; dontStrip = true; From 3ea13a6f55531faf8b0fb8a429c674dc277809fa Mon Sep 17 00:00:00 2001 From: Pontus Stenetorp Date: Wed, 4 May 2022 09:22:28 +0000 Subject: [PATCH 18/26] hare: run test suite --- pkgs/development/compilers/hare/hare.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/compilers/hare/hare.nix b/pkgs/development/compilers/hare/hare.nix index 4effebf0f84..f5c0cd8e405 100644 --- a/pkgs/development/compilers/hare/hare.nix +++ b/pkgs/development/compilers/hare/hare.nix @@ -68,6 +68,8 @@ stdenv.mkDerivation rec { "PREFIX=${placeholder "out"}" ]; + doCheck = true; + postInstall = let binPath = lib.makeBinPath [ From ab09393283f120a01b0fb52202a61cd2e742af90 Mon Sep 17 00:00:00 2001 From: 7FM <41307817+7FM@users.noreply.github.com> Date: Wed, 4 May 2022 01:18:18 +0200 Subject: [PATCH 19/26] modem-manager-gui: fix build with meson >= 0.61 --- .../networking/modem-manager-gui/default.nix | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/pkgs/applications/networking/modem-manager-gui/default.nix b/pkgs/applications/networking/modem-manager-gui/default.nix index 2723f342043..0eb0a02ed01 100644 --- a/pkgs/applications/networking/modem-manager-gui/default.nix +++ b/pkgs/applications/networking/modem-manager-gui/default.nix @@ -2,6 +2,7 @@ , pkg-config , python3 , fetchFromGitLab +, fetchpatch , gtk3 , glib , gdbm @@ -44,6 +45,20 @@ stdenv.mkDerivation rec { libayatana-appindicator-gtk3 ]; + patches = [ + # Fix missing tray icon + (fetchpatch { + url = "https://salsa.debian.org/debian/modem-manager-gui/-/raw/7c3e67a1cf7788d7a4b86be12803870d79aa27f2/debian/patches/fix-tray-icon.patch"; + sha256 = "sha256-9LjCEQl8YfraVlO1W7+Yy7egLAPu5YfnvGvCI3uGFh8="; + }) + # Fix build with meson 0.61 + # appdata/meson.build:3:5: ERROR: Function does not take positional arguments. + (fetchpatch { + url = "https://salsa.debian.org/debian/modem-manager-gui/-/raw/7c3e67a1cf7788d7a4b86be12803870d79aa27f2/debian/patches/meson0.61.patch"; + sha256 = "sha256-B+tBPIz5RxOwZWYEWttqSKGw2Wbfk0mnBY0Zy0evvAQ="; + }) + ]; + postPatch = '' patchShebangs man/manhelper.py ''; From 063015ee9c4583bb657c564029cfc7b921d10a70 Mon Sep 17 00:00:00 2001 From: adisbladis Date: Thu, 5 May 2022 09:36:38 +1200 Subject: [PATCH 20/26] poetry2nix: 1.27.1 -> 1.28.0 --- .../tools/poetry2nix/poetry2nix/default.nix | 12 +- .../tools/poetry2nix/poetry2nix/lib.nix | 2 +- .../poetry2nix/overrides/build-systems.json | 158 +++++++++++++++++- .../poetry2nix/overrides/default.nix | 102 ++++++++++- 4 files changed, 262 insertions(+), 12 deletions(-) diff --git a/pkgs/development/tools/poetry2nix/poetry2nix/default.nix b/pkgs/development/tools/poetry2nix/poetry2nix/default.nix index 6489a23c37d..f42ee6b79cc 100644 --- a/pkgs/development/tools/poetry2nix/poetry2nix/default.nix +++ b/pkgs/development/tools/poetry2nix/poetry2nix/default.nix @@ -5,7 +5,7 @@ }: let # Poetry2nix version - version = "1.27.1"; + version = "1.28.0"; inherit (poetryLib) isCompatible readTOML moduleName; @@ -287,12 +287,20 @@ lib.makeScope pkgs.newScope (self: { (name: value: projectDir + "/${value.path}") (lib.filterAttrs (name: dep: dep.develop or false && hasAttr "path" dep) set); - editablePackageSources' = ( + excludedEditablePackageNames = builtins.filter + (pkg: editablePackageSources."${pkg}" == null) + (builtins.attrNames editablePackageSources); + + allEditablePackageSources = ( (getEditableDeps (pyProject.tool.poetry."dependencies" or { })) // (getEditableDeps (pyProject.tool.poetry."dev-dependencies" or { })) // editablePackageSources ); + editablePackageSources' = builtins.removeAttrs + allEditablePackageSources + excludedEditablePackageNames; + poetryPython = self.mkPoetryPackages { inherit pyproject poetrylock overrides python pwd preferWheels pyProject; editablePackageSources = editablePackageSources'; diff --git a/pkgs/development/tools/poetry2nix/poetry2nix/lib.nix b/pkgs/development/tools/poetry2nix/poetry2nix/lib.nix index a905d302d2a..b5bf0c975e0 100644 --- a/pkgs/development/tools/poetry2nix/poetry2nix/lib.nix +++ b/pkgs/development/tools/poetry2nix/poetry2nix/lib.nix @@ -180,7 +180,7 @@ let hasGitIgnore = builtins.pathExists gitIgnore; gitIgnores = if hasGitIgnore then [ gitIgnore ] else [ ]; in - lib.optionals (builtins.toString path != "/" && ! isGitRoot) (findGitIgnores parent) ++ gitIgnores; + lib.optionals (builtins.pathExists path && builtins.toString path != "/" && ! isGitRoot) (findGitIgnores parent) ++ gitIgnores; /* Provides a source filtering mechanism that: diff --git a/pkgs/development/tools/poetry2nix/poetry2nix/overrides/build-systems.json b/pkgs/development/tools/poetry2nix/poetry2nix/overrides/build-systems.json index e3c74473b8c..e4d64b05b99 100644 --- a/pkgs/development/tools/poetry2nix/poetry2nix/overrides/build-systems.json +++ b/pkgs/development/tools/poetry2nix/poetry2nix/overrides/build-systems.json @@ -29,6 +29,9 @@ "aioflo": [ "poetry-core" ], + "aiogithubapi": [ + "poetry-core" + ], "aioguardian": [ "poetry-core" ], @@ -89,9 +92,21 @@ "amqtt": [ "poetry-core" ], + "ansible-doctor": [ + "poetry-core" + ], + "ansible-later": [ + "poetry-core" + ], + "ansible-runner": [ + "pbr" + ], "apache-beam": [ "cython" ], + "aplpy": [ + "cython" + ], "argon2_cffi": [ "flitBuildHook" ], @@ -114,15 +129,24 @@ "atomman": [ "cython" ], + "atpublic": [ + "pdm-pep517" + ], "autarco": [ "poetry-core" ], "authcaptureproxy": [ "poetry-core" ], + "av": [ + "cython" + ], "awesomeversion": [ "poetry-core" ], + "aws-adfs": [ + "poetry-core" + ], "aws-error-utils": [ "poetry" ], @@ -147,6 +171,9 @@ "boltztrap2": [ "cython" ], + "bsblan": [ + "poetry-core" + ], "build": [ "flit-core" ], @@ -183,6 +210,9 @@ "clikit": [ "poetry-core" ], + "cloudflare-dyndns": [ + "poetry" + ], "collections-extended": [ "poetry-core" ], @@ -210,7 +240,8 @@ "poetry-core" ], "cssselect2": [ - "flit" + "flit", + "flit-core" ], "cwcwidth": [ "cython" @@ -224,9 +255,15 @@ "cypari2": [ "cython" ], + "cypherpunkpay": [ + "poetry-core" + ], "cysignals": [ "cython" ], + "datadog": [ + "hatchling" + ], "datrie": [ "cython" ], @@ -260,6 +297,9 @@ "doc8": [ "pbr" ], + "docstring-parser": [ + "poetry-core" + ], "dtlssocket": [ "cython" ], @@ -301,7 +341,8 @@ "poetry-core" ], "entrypoints": [ - "flit" + "flit", + "flit-core" ], "enturclient": [ "poetry-core" @@ -309,6 +350,13 @@ "enumatch": [ "poetry" ], + "exceptiongroup": [ + "flit-core", + "flitBuildHook" + ], + "falcon": [ + "cython" + ], "fastapi": [ "flitBuildHook" ], @@ -378,6 +426,9 @@ "generic": [ "poetry-core" ], + "gensim": [ + "cython" + ], "glances-api": [ "poetry-core" ], @@ -492,9 +543,15 @@ "ipwhl": [ "flitBuildHook" ], + "iso8601": [ + "poetry-core" + ], "isort": [ "poetry-core" ], + "jarowinkler": [ + "cython" + ], "jedi-language-server": [ "poetry" ], @@ -519,6 +576,12 @@ "jupyterlab": [ "jupyter-packaging" ], + "jupyterlab-code-formatter": [ + "jupyter-packaging" + ], + "jupyterlab-pygments": [ + "jupyter-packaging" + ], "keystoneauth1": [ "pbr" ], @@ -537,6 +600,9 @@ "ldappool": [ "pbr" ], + "levenshtein": [ + "cython" + ], "libgpuarray": [ "cython" ], @@ -564,6 +630,9 @@ "lockfile": [ "pbr" ], + "lsassy": [ + "poetry-core" + ], "luftdaten": [ "poetry-core" ], @@ -585,6 +654,9 @@ "marisa-trie": [ "cython" ], + "markdown-it-py": [ + "flit-core" + ], "mask-rcnn": [ "cython" ], @@ -607,6 +679,9 @@ "memory-allocator": [ "cython" ], + "meteofrance-api": [ + "poetry" + ], "metprint": [ "poetry-core" ], @@ -618,6 +693,7 @@ "poetry" ], "mkdocs-jupyter": [ + "ipython_genutils", "poetry-core" ], "mkdocs-literate-nav": [ @@ -674,6 +750,9 @@ "netdata": [ "poetry-core" ], + "netutils": [ + "poetry-core" + ], "newversion": [ "poetry-core" ], @@ -689,6 +768,9 @@ "nkdfu": [ "flitBuildHook" ], + "notebook-shim": [ + "jupyter-packaging" + ], "notus-scanner": [ "poetry-core" ], @@ -728,6 +810,9 @@ "openvino": [ "cython" ], + "ordered-set": [ + "flit-core" + ], "ormar": [ "poetry-core" ], @@ -807,6 +892,9 @@ "poetry": [ "poetry-core" ], + "poetry-dynamic-versioning": [ + "poetry-core" + ], "poetry2conda": [ "poetry" ], @@ -930,6 +1018,9 @@ "pymaven-patch": [ "pbr" ], + "pymdown-extensions": [ + "hatchling" + ], "pymfy": [ "poetry-core" ], @@ -954,6 +1045,9 @@ "pyoverkiz": [ "poetry-core" ], + "pyparsing": [ + "flit-core" + ], "pypass": [ "pbr" ], @@ -978,12 +1072,21 @@ "pyproject-flake8": [ "flit-core" ], + "pypsrp": [ + "poetry-core" + ], "pyquil": [ "poetry-core" ], + "pyrad": [ + "poetry-core" + ], "pyregion": [ "cython" ], + "pyrevolve": [ + "cython" + ], "pyrmvtransport": [ "flit" ], @@ -999,6 +1102,9 @@ "pysigma": [ "poetry-core" ], + "pysigma-backend-insightidr": [ + "poetry-core" + ], "pysigma-backend-splunk": [ "poetry-core" ], @@ -1008,14 +1114,30 @@ "pysigma-pipeline-sysmon": [ "poetry-core" ], + "pysigma-pipeline-windows": [ + "poetry-core" + ], + "pyslurm": [ + "cython" + ], "pysmf": [ "cython" ], "pysml": [ "poetry-core" ], + "pysnmp-pyasn1": [ + "poetry-core" + ], + "pysnmp-pysmi": [ + "poetry-core" + ], + "pysnmplib": [ + "poetry-core" + ], "pysnow": [ - "poetry" + "poetry", + "poetry-core" ], "pysptk": [ "cython" @@ -1035,6 +1157,9 @@ "pytest-httpserver": [ "poetry-core" ], + "pytest-isort": [ + "poetry-core" + ], "pytest-mockservers": [ "poetry-core" ], @@ -1097,6 +1222,9 @@ "python-openstackclient": [ "pbr" ], + "python-pae": [ + "poetry-core" + ], "python-pkcs11": [ "cython" ], @@ -1215,7 +1343,8 @@ "poetry-core" ], "rokuecp": [ - "poetry" + "poetry", + "poetry-core" ], "roombapy": [ "poetry-core" @@ -1280,6 +1409,9 @@ "sentinel": [ "poetry-core" ], + "seventeentrack": [ + "poetry-core" + ], "sfepy": [ "cython" ], @@ -1301,9 +1433,15 @@ "slowapi": [ "poetry-core" ], + "socksio": [ + "flit-core" + ], "solo-python": [ "flitBuildHook" ], + "soupsieve": [ + "hatchling" + ], "spacy-pkuseg": [ "cython" ], @@ -1425,7 +1563,8 @@ "cython" ], "testpath": [ - "flit" + "flit", + "flit-core" ], "testrepository": [ "pbr" @@ -1505,6 +1644,9 @@ "typing-extensions": [ "flit-core" ], + "uharfbuzz": [ + "cython" + ], "unpaddedbase64": [ "poetry-core" ], @@ -1550,8 +1692,14 @@ "yoda": [ "cython" ], + "yte": [ + "poetry-core" + ], "zeversolarlocal": [ "flit-core", "flitBuildHook" + ], + "zwave-me-ws": [ + "poetry-core" ] } diff --git a/pkgs/development/tools/poetry2nix/poetry2nix/overrides/default.nix b/pkgs/development/tools/poetry2nix/poetry2nix/overrides/default.nix index 5439f1814dc..a04e2d65385 100644 --- a/pkgs/development/tools/poetry2nix/poetry2nix/overrides/default.nix +++ b/pkgs/development/tools/poetry2nix/poetry2nix/overrides/default.nix @@ -8,13 +8,14 @@ let { self , drv , attr + , extraAttrs ? [ ] }: let buildSystem = if attr == "cython" then self.python.pythonForBuild.pkgs.cython else self.${attr}; in ( # Flit only works on Python3 - if (attr == "flit-core" || attr == "flit") && !self.isPy3k then drv + if (attr == "flit-core" || attr == "flit" || attr == "hatchling") && !self.isPy3k then drv else drv.overridePythonAttrs ( old: @@ -23,7 +24,7 @@ let { } else { - nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ self.${attr} ]; + nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ self.${attr} ] ++ map (a: self.${a}) extraAttrs; } ) ); @@ -55,6 +56,16 @@ lib.composeManyExtensions [ systems) buildSystems) + # Build systems with conditionals + (self: super: { + + platformdirs = + if lib.versionAtLeast super.platformdirs.version "2.5.2" + then addBuildSystem { inherit self; drv = super.platformdirs; attr = "hatchling"; extraAttrs = [ "hatch-vcs" ]; } + else super.platformdirs; + + }) + # Build fixes (self: super: let @@ -437,6 +448,17 @@ lib.composeManyExtensions [ } ); + # Setuptools >= 60 broke build_py_2to3 + docutils = + if lib.versionOlder super.docutils.version "0.16" && lib.versionAtLeast super.setuptools.version "60" then + ( + super.docutils.overridePythonAttrs ( + old: { + SETUPTOOLS_USE_DISTUTILS = "stdlib"; + } + ) + ) else super.docutils; + # Environment markers are not always included (depending on how a dep was defined) enum34 = if self.pythonAtLeast "3.4" then null else super.enum34; @@ -844,6 +866,17 @@ lib.composeManyExtensions [ } ); + lsassy = + if super.lsassy.version == "3.1.1" then + super.lsassy.overridePythonAttrs + (old: { + # pyproject.toml contains a constraint `rich = "^10.6.0"` which is not replicated in setup.py + # hence pypi misses it and poetry pins rich to 11.0.0 + preConfigure = (old.preConfigure or "") + '' + rm pyproject.toml + ''; + }) else super.lsassy; + lxml = super.lxml.overridePythonAttrs ( old: { nativeBuildInputs = with pkgs.buildPackages; (old.nativeBuildInputs or [ ]) ++ [ pkg-config libxml2.dev libxslt.dev ] ++ lib.optionals stdenv.isDarwin [ xcodebuild ]; @@ -1143,6 +1176,26 @@ lib.composeManyExtensions [ } ); + orjson = + let + getCargoHash = version: { + "3.6.7" = "sha256-sz2k9podPB6QSptkyOu7+BoVTrKhefizRtYU+MICPt4="; + "3.6.8" = "sha256-vpfceVtYkU09xszNIihY1xbqGWieqDquxwsAmDH8jd4="; + }.${version} or null; + in + super.orjson.overridePythonAttrs (old: { + cargoDeps = pkgs.rustPlatform.fetchCargoTarball { + inherit (old) src; + name = "${old.pname}-${old.version}"; + hash = getCargoHash old.version; + }; + nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ + pkgs.rustPlatform.cargoSetupHook + pkgs.rustPlatform.maturinBuildHook + ]; + buildInputs = (old.buildInputs or [ ]) ++ lib.optional pkgs.stdenv.isDarwin pkgs.libiconv; + }); + osqp = super.osqp.overridePythonAttrs ( old: { nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ pkgs.cmake ]; @@ -1150,6 +1203,29 @@ lib.composeManyExtensions [ } ); + + pandas = super.pandas.overridePythonAttrs (old: { + + buildInputs = old.buildInputs or [ ] ++ lib.optional stdenv.isDarwin pkgs.libcxx; + + # Doesn't work with -Werror,-Wunused-command-line-argument + # https://github.com/NixOS/nixpkgs/issues/39687 + hardeningDisable = lib.optional stdenv.cc.isClang "strictoverflow"; + + # For OSX, we need to add a dependency on libcxx, which provides + # `complex.h` and other libraries that pandas depends on to build. + postPatch = lib.optionalString stdenv.isDarwin '' + cpp_sdk="${lib.getDev pkgs.libcxx}/include/c++/v1"; + echo "Adding $cpp_sdk to the setup.py common_include variable" + substituteInPlace setup.py \ + --replace "['pandas/src/klib', 'pandas/src']" \ + "['pandas/src/klib', 'pandas/src', '$cpp_sdk']" + ''; + + + enableParallelBuilding = true; + }); + pantalaimon = super.pantalaimon.overridePythonAttrs (old: { nativeBuildInputs = old.nativeBuildInputs or [ ] ++ [ pkgs.installShellFiles ]; postInstall = old.postInstall or "" + '' @@ -1196,8 +1272,12 @@ lib.composeManyExtensions [ pillow = super.pillow.overridePythonAttrs ( old: { - nativeBuildInputs = [ pkg-config self.pytest-runner ] ++ (old.nativeBuildInputs or [ ]); - buildInputs = with pkgs; [ freetype libjpeg zlib libtiff libwebp tcl lcms2 ] ++ (old.buildInputs or [ ]); + nativeBuildInputs = (old.nativeBuildInputs or [ ]) + ++ [ pkg-config self.pytest-runner ]; + buildInputs = with pkgs; (old.buildInputs or [ ]) + ++ [ freetype libjpeg zlib libtiff libwebp tcl lcms2 ] + ++ lib.optionals (lib.versionAtLeast old.version "7.1.0") [ xorg.libxcb ] + ++ lib.optionals (self.isPyPy) [ tk xorg.libX11 ]; } ); @@ -1246,6 +1326,14 @@ lib.composeManyExtensions [ } ); + psycopg2cffi = super.psycopg2cffi.overridePythonAttrs ( + old: { + buildInputs = (old.buildInputs or [ ]) + ++ lib.optional stdenv.isDarwin pkgs.openssl; + nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ pkgs.postgresql ]; + } + ); + py-solc-x = super.py-solc-x.overridePythonAttrs ( old: { preConfigure = '' @@ -1860,6 +1948,12 @@ lib.composeManyExtensions [ }); + soundfile = super.soundfile.overridePythonAttrs (old: { + postPatch = '' + substituteInPlace soundfile.py --replace "_find_library('sndfile')" "'${pkgs.libsndfile.out}/lib/libsndfile${stdenv.hostPlatform.extensions.sharedLibrary}'" + ''; + }); + systemd-python = super.systemd-python.overridePythonAttrs (old: { buildInputs = old.buildInputs ++ [ pkgs.systemd ]; nativeBuildInputs = old.nativeBuildInputs ++ [ pkgs.pkg-config ]; From 9dd25bbe3f416cd806d552c62a946803d4c92296 Mon Sep 17 00:00:00 2001 From: Eduardo Quiros Date: Wed, 4 May 2022 20:03:14 -0600 Subject: [PATCH 21/26] chezmoi: 2.15.1 -> 2.15.2 --- pkgs/tools/misc/chezmoi/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/misc/chezmoi/default.nix b/pkgs/tools/misc/chezmoi/default.nix index 00d0ef3361f..1562a68067d 100644 --- a/pkgs/tools/misc/chezmoi/default.nix +++ b/pkgs/tools/misc/chezmoi/default.nix @@ -2,16 +2,16 @@ buildGoModule rec { pname = "chezmoi"; - version = "2.15.1"; + version = "2.15.2"; src = fetchFromGitHub { owner = "twpayne"; repo = "chezmoi"; rev = "v${version}"; - sha256 = "sha256-spIdY28ZC/+6bwWWwKW7Iu2E2eKD7MeRuxEAMN2e3H8="; + sha256 = "sha256-zvr1O/HMSoZMtA/+dRO+co8Uy70qV8RPIDK3z8dRD28="; }; - vendorSha256 = "sha256-D27a107gjHK4NYkJhZDd0SvhUmmRSl3DX519nglAoPo="; + vendorSha256 = "sha256-UAjXCXypR1/SIJIZOS53LTyioKrXOECK9vh9t61W5gc="; doCheck = false; From 5535248877bbd27bea37b0a9e1b0231159125ff5 Mon Sep 17 00:00:00 2001 From: Oliver Evans Date: Tue, 3 May 2022 15:44:51 -0700 Subject: [PATCH 22/26] rust-analyzer: 2022-04-11 -> 2022-05-02 --- pkgs/development/tools/rust/rust-analyzer/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/tools/rust/rust-analyzer/default.nix b/pkgs/development/tools/rust/rust-analyzer/default.nix index 92d731c79b5..3e471a3ac55 100644 --- a/pkgs/development/tools/rust/rust-analyzer/default.nix +++ b/pkgs/development/tools/rust/rust-analyzer/default.nix @@ -11,14 +11,14 @@ rustPlatform.buildRustPackage rec { pname = "rust-analyzer-unwrapped"; - version = "2022-04-11"; - cargoSha256 = "sha256-pc8S+5g67vN9170ABiHGe1t4Go0F63UiOeLd71USYCI="; + version = "2022-05-02"; + cargoSha256 = "sha256-uZCUruIBTNTKYWYb8xQgJ6FsKlRi+Sh5n7m7aVk+hHQ="; src = fetchFromGitHub { owner = "rust-analyzer"; repo = "rust-analyzer"; rev = version; - sha256 = "sha256-miMIrDawSS1zXh6EuX03x5ACM2NTabksssSyutSNpjY="; + sha256 = "sha256-5kAbd/tTc9vkr27ar44hnpXdS0vQg0OLJUMlp0FBjqA="; }; patches = [ From 0ab6bcebc81cec39295802a0d76780ddf237722e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Tue, 3 May 2022 12:24:14 -0700 Subject: [PATCH 23/26] libdeltachat: 1.78.0 -> 1.79.0 https://github.com/deltachat/deltachat-core-rust/blob/1.79.0/CHANGELOG.md --- pkgs/development/libraries/libdeltachat/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/libdeltachat/default.nix b/pkgs/development/libraries/libdeltachat/default.nix index b2d3f4c6bbb..dd1707ec96f 100644 --- a/pkgs/development/libraries/libdeltachat/default.nix +++ b/pkgs/development/libraries/libdeltachat/default.nix @@ -16,13 +16,13 @@ stdenv.mkDerivation rec { pname = "libdeltachat"; - version = "1.78.0"; + version = "1.79.0"; src = fetchFromGitHub { owner = "deltachat"; repo = "deltachat-core-rust"; rev = version; - hash = "sha256-SMobKC34RU7/LfRtgBxa8CHsLlWOQ29zaiw/V4+wWqU="; + hash = "sha256-jwAPbTwMSWDucAvip5KcA7fb4LCWo70SiIspacijMvQ="; }; patches = [ @@ -32,7 +32,7 @@ stdenv.mkDerivation rec { cargoDeps = rustPlatform.fetchCargoTarball { inherit src; name = "${pname}-${version}"; - hash = "sha256-G2lUk1M3B+a3BaNPFWQgsYehUu7dyfuRc+fXSlWjSq4="; + hash = "sha256-Fn4M4CQV7VTE7SubvOszhpGBbmDyqemyUeZ0qDmcGUU="; }; nativeBuildInputs = [ From ae75c14f83b2be85572b29cb4b7de1b2f0a17e37 Mon Sep 17 00:00:00 2001 From: Joel Date: Sun, 6 Mar 2022 00:24:24 +1000 Subject: [PATCH 24/26] awesome-4-0: remove --- pkgs/top-level/aliases.nix | 1 + pkgs/top-level/all-packages.nix | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 665d2f4765c..f64c26e7ef6 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -92,6 +92,7 @@ mapAliases ({ aucdtect = throw "aucdtect: Upstream no longer provides download urls"; # Added 2020-12-26 avldrums-lv2 = x42-avldrums; # Added 2020-03-29 avxsynth = throw "avxsynth was removed because it was broken"; # Added 2021-05-18 + awesome-4-0 = awesome; # Added 2022-05-05 aws-okta = throw "aws-okta is on indefinite hiatus. See https://github.com/segmentio/aws-okta/issues/278"; # Added 2022-04-05; azureus = throw "azureus is now known as vuze and the version in nixpkgs was really outdated"; # Added 2021-08-02 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ced4afa7e98..052ac4d551c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -25252,11 +25252,10 @@ with pkgs; avrdudess = callPackage ../applications/misc/avrdudess { }; - awesome-4-0 = callPackage ../applications/window-managers/awesome { + awesome = callPackage ../applications/window-managers/awesome { cairo = cairo.override { xcbSupport = true; }; inherit (texFunctions) fontsConf; }; - awesome = awesome-4-0; awesomebump = libsForQt5.callPackage ../applications/graphics/awesomebump { }; From b20934a65c0541c2b83b688de24e3991b3db426e Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Wed, 27 Apr 2022 11:22:33 +0200 Subject: [PATCH 25/26] easycrypt: init at 2022.04 --- .../science/logic/easycrypt/default.nix | 50 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 52 insertions(+) create mode 100644 pkgs/applications/science/logic/easycrypt/default.nix diff --git a/pkgs/applications/science/logic/easycrypt/default.nix b/pkgs/applications/science/logic/easycrypt/default.nix new file mode 100644 index 00000000000..5f28ca73c4e --- /dev/null +++ b/pkgs/applications/science/logic/easycrypt/default.nix @@ -0,0 +1,50 @@ +{ lib, stdenv, fetchFromGitHub, ocamlPackages, why3 }: + +stdenv.mkDerivation rec { + pname = "easycrypt"; + version = "2022.04"; + + src = fetchFromGitHub { + owner = pname; + repo = pname; + rev = "r${version}"; + sha256 = "sha256:09rdwcj70lkamkhd895p284rfpz4bcnsf55mcimhiqncd2a21ml7"; + }; + + nativeBuildInputs = with ocamlPackages; [ + dune_3 + findlib + menhir + ocaml + ]; + buildInputs = with ocamlPackages; [ + batteries + dune-build-info + inifiles + yojson + zarith + ]; + + propagatedBuildInputs = [ why3 ]; + + strictDeps = true; + + postPatch = '' + substituteInPlace dune-project --replace '(name easycrypt)' '(name easycrypt)(version ${version})' + ''; + + installPhase = '' + runHook preInstall + dune install --prefix $out ${pname} + rm $out/bin/ec-runtest + runHook postInstall + ''; + + meta = { + license = lib.licenses.mit; + maintainers = [ lib.maintainers.vbgl ]; + platforms = lib.platforms.all; + homepage = "https://easycrypt.info/"; + description = "Computer-Aided Cryptographic Proofs"; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ced4afa7e98..32e10a11a19 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3362,6 +3362,8 @@ with pkgs; earlyoom = callPackage ../os-specific/linux/earlyoom { }; + easycrypt = callPackage ../applications/science/logic/easycrypt { }; + EBTKS = callPackage ../development/libraries/science/biology/EBTKS { }; ecasound = callPackage ../applications/audio/ecasound { }; From c777cdf5c564015d5f63b09cc93bef4178b19b01 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Wed, 27 Apr 2022 11:35:20 +0200 Subject: [PATCH 26/26] easycrypt-runtest: init at 2022.04 --- .../science/logic/easycrypt/runtest.nix | 24 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 26 insertions(+) create mode 100644 pkgs/applications/science/logic/easycrypt/runtest.nix diff --git a/pkgs/applications/science/logic/easycrypt/runtest.nix b/pkgs/applications/science/logic/easycrypt/runtest.nix new file mode 100644 index 00000000000..79a034b9369 --- /dev/null +++ b/pkgs/applications/science/logic/easycrypt/runtest.nix @@ -0,0 +1,24 @@ +{ python3Packages, easycrypt }: + +python3Packages.buildPythonApplication rec { + inherit (easycrypt) src version; + + pname = "easycrypt-runtest"; + + dontConfigure = true; + dontBuild = true; + doCheck = false; + + pythonPath = with python3Packages; [ pyyaml ]; + + installPhase = '' + runHook preInstall + mkdir -p $out/bin + cp scripts/testing/runtest $out/bin/ec-runtest + runHook postInstall + ''; + + meta = easycrypt.meta // { + description = "Testing program for EasyCrypt formalizations"; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 32e10a11a19..e61db0e75b8 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3364,6 +3364,8 @@ with pkgs; easycrypt = callPackage ../applications/science/logic/easycrypt { }; + easycrypt-runtest = callPackage ../applications/science/logic/easycrypt/runtest.nix { }; + EBTKS = callPackage ../development/libraries/science/biology/EBTKS { }; ecasound = callPackage ../applications/audio/ecasound { };