diff options
author | ajs124 <ajs124@users.noreply.github.com> | 2023-01-20 14:53:12 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-20 14:53:12 +0100 |
commit | 02256184b9082a62d35a4d3e917e5fa227a118b5 (patch) | |
tree | 7a69f96465182ded3c0ddaecbd2d99334168c7d8 | |
parent | de640e137a3bd32f8db942693793b050385a8b49 (diff) | |
parent | 33b2ad57c889f706b753932062d6392f57558500 (diff) |
Merge pull request #198166 from helsinki-systems/upd/open-iscsi
openiscsi: 2.1.7 -> 2.1.8
-rw-r--r-- | pkgs/os-specific/linux/open-iscsi/default.nix | 75 |
1 files changed, 40 insertions, 35 deletions
diff --git a/pkgs/os-specific/linux/open-iscsi/default.nix b/pkgs/os-specific/linux/open-iscsi/default.nix index 32b3e636ac56..38912e0aa215 100644 --- a/pkgs/os-specific/linux/open-iscsi/default.nix +++ b/pkgs/os-specific/linux/open-iscsi/default.nix @@ -1,55 +1,60 @@ -{ lib, stdenv, fetchFromGitHub, automake, autoconf, libtool, gettext -, util-linux, open-isns, openssl, kmod, perl, systemd, pkgconf, nixosTests -}: +{ stdenv +, lib +, fetchFromGitHub +, meson +, pkg-config +, ninja +, perl +, util-linux +, open-isns +, openssl +, kmod +, systemd +, runtimeShell +, nixosTests }: stdenv.mkDerivation rec { pname = "open-iscsi"; - version = "2.1.7"; - - nativeBuildInputs = [ autoconf automake gettext libtool perl pkgconf ]; - buildInputs = [ kmod open-isns.lib openssl systemd util-linux ]; + version = "2.1.8"; src = fetchFromGitHub { owner = "open-iscsi"; repo = "open-iscsi"; rev = version; - sha256 = "sha256-R1ttHHxVSQ5TGtWVy4I9BAmEJfcRhKRD5jThoeddjUw="; + hash = "sha256-JzSyX9zvUkhCEpNwTMneTZpCRgaYxHZ1wP215YnMI78="; }; - DESTDIR = "$(out)"; - - NIX_LDFLAGS = "-lkmod -lsystemd"; - NIX_CFLAGS_COMPILE = "-DUSE_KMOD"; - - preConfigure = '' - # Remove blanket -Werror. Fails for minor error on gcc-11. - substituteInPlace usr/Makefile --replace ' -Werror ' ' ' - ''; - - # avoid /usr/bin/install - makeFlags = [ - "INSTALL=install" - "SED=sed" - "prefix=/" - "manprefix=/share" + nativeBuildInputs = [ + meson + pkg-config + ninja + perl ]; - - installFlags = [ - "install" + buildInputs = [ + kmod + (lib.getLib open-isns) + openssl + systemd + util-linux ]; - postInstall = '' - cp usr/iscsistart $out/sbin/ - for f in $out/lib/systemd/system/*; do - substituteInPlace $f --replace /sbin $out/bin - done - $out/sbin/iscsistart -v + preConfigure = '' + patchShebangs . ''; - postFixup = '' - sed -i "s|/sbin/iscsiadm|$out/bin/iscsiadm|" $out/bin/iscsi_fw_login + prePatch = '' + substituteInPlace etc/systemd/iscsi-init.service.template \ + --replace /usr/bin/sh ${runtimeShell} + sed -i '/install_dir: db_root/d' meson.build ''; + mesonFlags = [ + "-Discsi_sbindir=${placeholder "out"}/sbin" + "-Drulesdir=${placeholder "out"}/etc/udev/rules.d" + "-Dsystemddir=${placeholder "out"}/lib/systemd" + "-Ddbroot=/etc/iscsi" + ]; + passthru.tests = { inherit (nixosTests) iscsi-root iscsi-multipath-root; }; meta = with lib; { |