about summary refs log tree commit diff
path: root/pkgs/os-specific
diff options
context:
space:
mode:
authorWeijia Wang <9713184+wegank@users.noreply.github.com>2024-04-27 05:44:19 +0200
committerWeijia Wang <9713184+wegank@users.noreply.github.com>2024-04-27 05:44:19 +0200
commit37876dbdadca20702d3547bab7838fa4ca1bae33 (patch)
tree92efdc055a9cd4e4c680a32d4a0492e8a2e11855 /pkgs/os-specific
parent2521336f17c46069cb8fbba200974fcc12e9ea9d (diff)
parent86aa70f787d423141167d1cde8af6d81126e22a1 (diff)
Merge branch 'master' into staging-next
Diffstat (limited to 'pkgs/os-specific')
-rw-r--r--pkgs/os-specific/darwin/skhd/default.nix55
-rw-r--r--pkgs/os-specific/darwin/skhd/org.nixos.skhd.plist23
-rw-r--r--pkgs/os-specific/darwin/yabai/default.nix141
-rw-r--r--pkgs/os-specific/linux/firmware/fwupd-efi/default.nix6
-rw-r--r--pkgs/os-specific/linux/lxc/add-meson-options.patch153
-rw-r--r--pkgs/os-specific/linux/lxc/default.nix91
-rw-r--r--pkgs/os-specific/linux/lxc/docbook-hack.patch21
-rw-r--r--pkgs/os-specific/linux/openvswitch/default.nix4
-rw-r--r--pkgs/os-specific/linux/openvswitch/generic.nix135
-rw-r--r--pkgs/os-specific/linux/openvswitch/lts.nix5
-rw-r--r--pkgs/os-specific/linux/openvswitch/patches/disable-bash-arg-completion-test.patch12
-rwxr-xr-xpkgs/os-specific/linux/openvswitch/update.nu19
12 files changed, 3 insertions, 662 deletions
diff --git a/pkgs/os-specific/darwin/skhd/default.nix b/pkgs/os-specific/darwin/skhd/default.nix
deleted file mode 100644
index 539e90562ec71..0000000000000
--- a/pkgs/os-specific/darwin/skhd/default.nix
+++ /dev/null
@@ -1,55 +0,0 @@
-{ lib
-, stdenv
-, fetchFromGitHub
-, Carbon
-, Cocoa
-, testers
-, nix-update-script
-}:
-
-stdenv.mkDerivation (finalAttrs: {
-  pname = "skhd";
-  version = "0.3.9";
-
-  src = fetchFromGitHub {
-    owner = "koekeishiya";
-    repo = "skhd";
-    rev = "v${finalAttrs.version}";
-    hash = "sha256-fnkWws/g4BdHKDRhqoCpdPFUavOHdk8R7h7H1dAdAYI=";
-  };
-
-  buildInputs = [
-    Carbon
-    Cocoa
-  ];
-
-  makeFlags = [
-    "BUILD_PATH=$(out)/bin"
-  ];
-
-  env.NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration";
-
-  postInstall = ''
-    mkdir -p $out/Library/LaunchDaemons
-    cp ${./org.nixos.skhd.plist} $out/Library/LaunchDaemons/org.nixos.skhd.plist
-    substituteInPlace $out/Library/LaunchDaemons/org.nixos.skhd.plist --subst-var out
-  '';
-
-  passthru = {
-    tests.version = testers.testVersion {
-      package = finalAttrs.finalPackage;
-      version = "skhd-v${finalAttrs.version}";
-    };
-
-    updateScript = nix-update-script { };
-  };
-
-  meta = {
-    description = "Simple hotkey daemon for macOS";
-    homepage = "https://github.com/koekeishiya/skhd";
-    license = lib.licenses.mit;
-    mainProgram = "skhd";
-    maintainers = with lib.maintainers; [ cmacrae lnl7 periklis khaneliman ];
-    platforms = lib.platforms.darwin;
-  };
-})
diff --git a/pkgs/os-specific/darwin/skhd/org.nixos.skhd.plist b/pkgs/os-specific/darwin/skhd/org.nixos.skhd.plist
deleted file mode 100644
index e6624487740bc..0000000000000
--- a/pkgs/os-specific/darwin/skhd/org.nixos.skhd.plist
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-  <key>Label</key>
-  <string>org.nixos.skhd</string>
-  <key>ProgramArguments</key>
-  <array>
-    <string>@out@/bin/skhd</string>
-  </array>
-  <key>ProcessType</key>
-  <string>Interactive</string>
-  <key>EnvironmentVariables</key>
-  <dict>
-    <key>PATH</key>
-    <string>@out@/bin:/nix/var/nix/profiles/default/bin:/usr/bin:/bin:/usr/sbin:/sbin</string>
-  </dict>
-  <key>RunAtLoad</key>
-  <true/>
-  <key>KeepAlive</key>
-  <true/>
-</dict>
-</plist>
diff --git a/pkgs/os-specific/darwin/yabai/default.nix b/pkgs/os-specific/darwin/yabai/default.nix
deleted file mode 100644
index 150db493198fa..0000000000000
--- a/pkgs/os-specific/darwin/yabai/default.nix
+++ /dev/null
@@ -1,141 +0,0 @@
-{ lib
-, stdenv
-, fetchFromGitHub
-, fetchzip
-, installShellFiles
-, testers
-, writeShellScript
-, common-updater-scripts
-, curl
-, jq
-, xcodebuild
-, xxd
-, yabai
-, Carbon
-, Cocoa
-, ScriptingBridge
-, SkyLight
-}:
-
-stdenv.mkDerivation (finalAttrs: {
-  pname = "yabai";
-  version = "7.1.0";
-
-  src = finalAttrs.passthru.sources.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
-
-  env = {
-    # silence service.h error
-    NIX_CFLAGS_COMPILE = "-Wno-implicit-function-declaration";
-  };
-
-  nativeBuildInputs = [
-    installShellFiles
-  ]
-  ++ lib.optionals stdenv.isx86_64 [
-    xcodebuild
-    xxd
-  ];
-
-  buildInputs = [ ] ++ lib.optionals stdenv.isx86_64 [
-    Carbon
-    Cocoa
-    ScriptingBridge
-    SkyLight
-  ];
-
-  dontConfigure = true;
-  dontBuild = stdenv.isAarch64;
-  enableParallelBuilding = true;
-
-  installPhase = ''
-    runHook preInstall
-
-    mkdir -p $out/{bin,share/icons/hicolor/scalable/apps}
-
-    cp ./bin/yabai $out/bin/yabai
-    ${lib.optionalString stdenv.isx86_64 "cp ./assets/icon/icon.svg $out/share/icons/hicolor/scalable/apps/yabai.svg"}
-    installManPage ./doc/yabai.1
-
-    runHook postInstall
-  '';
-
-  postPatch = lib.optionalString stdenv.isx86_64 /* bash */ ''
-    # aarch64 code is compiled on all targets, which causes our Apple SDK headers to error out.
-    # Since multilib doesnt work on darwin i dont know of a better way of handling this.
-    substituteInPlace makefile \
-    --replace "-arch arm64e" "" \
-    --replace "-arch arm64" "" \
-    --replace "clang" "${stdenv.cc.targetPrefix}clang"
-
-    # `NSScreen::safeAreaInsets` is only available on macOS 12.0 and above, which frameworks arent packaged.
-    # When a lower OS version is detected upstream just returns 0, so we can hardcode that at compiletime.
-    # https://github.com/koekeishiya/yabai/blob/v4.0.2/src/workspace.m#L109
-    substituteInPlace src/workspace.m \
-    --replace 'return screen.safeAreaInsets.top;' 'return 0;'
-  '';
-
-  passthru = {
-    tests.version = testers.testVersion {
-      package = yabai;
-      version = "yabai-v${finalAttrs.version}";
-    };
-
-    sources = {
-      # Unfortunately compiling yabai from source on aarch64-darwin is a bit complicated. We use the precompiled binary instead for now.
-      # See the comments on https://github.com/NixOS/nixpkgs/pull/188322 for more information.
-      "aarch64-darwin" = fetchzip {
-        url = "https://github.com/koekeishiya/yabai/releases/download/v${finalAttrs.version}/yabai-v${finalAttrs.version}.tar.gz";
-        hash = "sha256-88Sh2nizAQ0a0cnlnrkhb5x3VjHa372HhjHlmNjGdQ4=";
-      };
-      "x86_64-darwin" = fetchFromGitHub
-        {
-          owner = "koekeishiya";
-          repo = "yabai";
-          rev = "v${finalAttrs.version}";
-          hash = "sha256-5iC1U6tyUYFLjOfnIxCrjCjj2deUZ/rvsJN4jlrr2Tc=";
-        };
-    };
-
-    updateScript = writeShellScript "update-yabai" ''
-      set -o errexit
-      export PATH="${lib.makeBinPath [ curl jq common-updater-scripts ]}"
-      NEW_VERSION=$(curl --silent https://api.github.com/repos/koekeishiya/yabai/releases/latest | jq '.tag_name | ltrimstr("v")' --raw-output)
-      if [[ "${finalAttrs.version}" = "$NEW_VERSION" ]]; then
-          echo "The new version same as the old version."
-          exit 0
-      fi
-      for platform in ${lib.escapeShellArgs finalAttrs.meta.platforms}; do
-        update-source-version "yabai" "0" "${lib.fakeHash}" --source-key="sources.$platform"
-        update-source-version "yabai" "$NEW_VERSION" --source-key="sources.$platform"
-      done
-    '';
-  };
-
-  meta = {
-    description = "A tiling window manager for macOS based on binary space partitioning";
-    longDescription = ''
-      yabai is a window management utility that is designed to work as an extension to the built-in
-      window manager of macOS. yabai allows you to control your windows, spaces and displays freely
-      using an intuitive command line interface and optionally set user-defined keyboard shortcuts
-      using skhd and other third-party software.
-    '';
-    homepage = "https://github.com/koekeishiya/yabai";
-    changelog = "https://github.com/koekeishiya/yabai/blob/v${finalAttrs.version}/CHANGELOG.md";
-    license = lib.licenses.mit;
-    platforms = builtins.attrNames finalAttrs.passthru.sources;
-    mainProgram = "yabai";
-    maintainers = with lib.maintainers; [
-      cmacrae
-      shardy
-      ivar
-      khaneliman
-    ];
-    sourceProvenance = with lib.sourceTypes; [ ]
-      ++ lib.optionals stdenv.isx86_64 [
-      fromSource
-    ] ++ lib.optionals stdenv.isAarch64 [
-      binaryNativeCode
-    ];
-  };
-})
-
diff --git a/pkgs/os-specific/linux/firmware/fwupd-efi/default.nix b/pkgs/os-specific/linux/firmware/fwupd-efi/default.nix
index acbc0d556224c..7388a69013d1f 100644
--- a/pkgs/os-specific/linux/firmware/fwupd-efi/default.nix
+++ b/pkgs/os-specific/linux/firmware/fwupd-efi/default.nix
@@ -13,11 +13,11 @@
 
 stdenv.mkDerivation rec {
   pname = "fwupd-efi";
-  version = "1.5";
+  version = "1.6";
 
   src = fetchurl {
-    url = "https://people.freedesktop.org/~hughsient/releases/${pname}-${version}.tar.xz";
-    sha256 = "sha256-RdKneTGzYkFt7CY22r9O/w0doQvBzMoayYDoMv7buhI=";
+    url = "https://github.com/fwupd/fwupd-efi/releases/download/${version}/fwupd-efi-${version}.tar.xz";
+    hash = "sha256-r9CAWirQgafK/y71vABM46AUe1OAFejsqWY0FxaxJg4=";
   };
 
   nativeBuildInputs = [
diff --git a/pkgs/os-specific/linux/lxc/add-meson-options.patch b/pkgs/os-specific/linux/lxc/add-meson-options.patch
deleted file mode 100644
index 01aea4df27473..0000000000000
--- a/pkgs/os-specific/linux/lxc/add-meson-options.patch
+++ /dev/null
@@ -1,153 +0,0 @@
-diff --git a/meson.build b/meson.build
-index 21a8705d0..f12b81442 100644
---- a/meson.build
-+++ b/meson.build
-@@ -50,7 +50,7 @@ rootfsmount = get_option('rootfs-mount-path')
- user_network_db_opt = get_option('usernet-db-path')
- user_network_conf_opt = get_option('usernet-config-path')
- 
--bashcompletiondir = join_paths('/', 'usr', 'share', 'bash-completion', 'completions')
-+bashcompletiondir = join_paths(prefixdir, get_option('datadir'), 'bash-completion', 'completions')
- bindir = join_paths(prefixdir, get_option('bindir'))
- datadir = join_paths(prefixdir, get_option('datadir'))
- mandir = join_paths(prefixdir, get_option('mandir'))
-@@ -123,22 +123,6 @@ conf.set('PACKAGE_VERSION', meson.project_version())
- conf.set('RUNTIME_PATH', runtimepath)
- conf.set('SYSCONFDIR', sysconfdir)
- 
--# Set sysconfdir
--fs = import('fs')
--distrosysconfdir = get_option('distrosysconfdir')
--if distrosysconfdir != ''
--    distrosysconfdir = join_paths(sysconfdir, distrosysconfdir)
--    conf.set('LXC_DISTRO_SYSCONF', distrosysconfdir)
--elif fs.is_dir('/etc/sysconfig')
--    distrosysconfdir = join_paths(sysconfdir, 'sysconfig')
--    conf.set('LXC_DISTRO_SYSCONF', distrosysconfdir)
--elif fs.is_dir('/etc/default')
--    distrosysconfdir = join_paths(sysconfdir, 'default')
--    conf.set('LXC_DISTRO_SYSCONF', distrosysconfdir)
--else
--    error('"distrosysconfdir" is not set')
--endif
--
- # Cross-compile on Android.
- srcconf.set10('IS_BIONIC', host_machine.system() == 'android')
- 
-@@ -148,6 +132,7 @@ coverity = get_option('coverity-build')
- init_script = get_option('init-script')
- sanitize = get_option('b_sanitize')
- want_examples = get_option('examples')
-+want_install_init = get_option('install-init-files')
- want_io_uring = get_option('io-uring-event-loop')
- want_pam_cgroup = get_option('pam-cgroup')
- want_mans = get_option('man')
-@@ -160,10 +145,30 @@ want_openssl = get_option('openssl')
- want_selinux = get_option('selinux')
- want_oss_fuzz = get_option('oss-fuzz')
- want_seccomp = get_option('seccomp')
-+want_spec = get_option('specfile')
-+want_state_dirs = get_option('install-state-dirs')
- want_thread_safety = get_option('thread-safety')
- want_memfd_rexec = get_option('memfd-rexec')
- want_sd_bus = get_option('sd-bus')
- 
-+# Set sysconfdir
-+fs = import('fs')
-+if want_install_init
-+    distrosysconfdir = get_option('distrosysconfdir')
-+    if distrosysconfdir != ''
-+        distrosysconfdir = join_paths(sysconfdir, distrosysconfdir)
-+        conf.set('LXC_DISTRO_SYSCONF', distrosysconfdir)
-+    elif fs.is_dir('/etc/sysconfig')
-+        distrosysconfdir = join_paths(sysconfdir, 'sysconfig')
-+        conf.set('LXC_DISTRO_SYSCONF', distrosysconfdir)
-+    elif fs.is_dir('/etc/default')
-+        distrosysconfdir = join_paths(sysconfdir, 'default')
-+        conf.set('LXC_DISTRO_SYSCONF', distrosysconfdir)
-+    else
-+        error('"distrosysconfdir" is not set')
-+    endif
-+endif
-+
- srcconf.set_quoted('DEFAULT_CGROUP_PATTERN', cgrouppattern)
- if coverity
-     srcconf.set('ENABLE_COVERITY_BUILD', 1)
-@@ -926,14 +931,16 @@ if want_apparmor
- endif
- subdir('config/bash')
- subdir('config/etc')
--subdir('config/init/common')
--subdir('config/init/systemd')
--subdir('config/init/sysvinit')
--subdir('config/init/upstart')
-+if want_install_init
-+    subdir('config/init/common')
-+    subdir('config/init/systemd')
-+    subdir('config/init/sysvinit')
-+    subdir('config/init/upstart')
-+    subdir('config/sysconfig')
-+endif
- if want_selinux
-     subdir('config/selinux')
- endif
--subdir('config/sysconfig')
- subdir('config/templates')
- subdir('config/templates/common.conf.d')
- subdir('config/yum')
-@@ -963,21 +970,25 @@ pkg_config_file = pkgconfig.generate(liblxc,
- )
- 
- # Empty dirs.
--install_emptydir(join_paths(localstatedir, 'cache', 'lxc'))
--install_emptydir(join_paths(localstatedir, 'lib', 'lxc'))
-+if want_state_dirs
-+    install_emptydir(join_paths(localstatedir, 'cache', 'lxc'))
-+    install_emptydir(join_paths(localstatedir, 'lib', 'lxc'))
-+endif
- 
- # RPM spec file.
--specconf = configuration_data()
--specconf.set('LXC_VERSION_BASE', meson.project_version())
--specconf.set('LXC_VERSION_BETA', version_data.get('LXC_VERSION_BETA'))
--specconf.set('PACKAGE', meson.project_name())
--specconf.set('LXC_DISTRO_SYSCONF', conf.get('LXC_DISTRO_SYSCONF'))
--
--configure_file(
--    configuration: specconf,
--    input: 'lxc.spec.in',
--    output: 'lxc.spec',
--    install: false)
-+if want_spec
-+    specconf = configuration_data()
-+    specconf.set('LXC_VERSION_BASE', meson.project_version())
-+    specconf.set('LXC_VERSION_BETA', version_data.get('LXC_VERSION_BETA'))
-+    specconf.set('PACKAGE', meson.project_name())
-+    specconf.set('LXC_DISTRO_SYSCONF', conf.get('LXC_DISTRO_SYSCONF'))
-+
-+    configure_file(
-+        configuration: specconf,
-+        input: 'lxc.spec.in',
-+        output: 'lxc.spec',
-+        install: false)
-+endif
- 
- # Build overview.
- status = [
-diff --git a/meson_options.txt b/meson_options.txt
-index 9803473d2..84a6d45b5 100644
---- a/meson_options.txt
-+++ b/meson_options.txt
-@@ -120,3 +120,12 @@ option('memfd-rexec', type : 'boolean', value : 'true',
- 
- option('distrosysconfdir', type : 'string', value: '',
-        description: 'relative path to sysconfdir for distro default configuration')
-+
-+option('specfile', type : 'boolean', value: true,
-+       description: 'whether to prepare RPM spec')
-+
-+option('install-init-files', type : 'boolean', value: true,
-+       description: 'whether to install init files for local init (e.g. systemd, sysvinit)')
-+
-+option('install-state-dirs', type : 'boolean', value: true,
-+       description: 'whether to create state directories on install')
diff --git a/pkgs/os-specific/linux/lxc/default.nix b/pkgs/os-specific/linux/lxc/default.nix
deleted file mode 100644
index e525c9c3f5f7d..0000000000000
--- a/pkgs/os-specific/linux/lxc/default.nix
+++ /dev/null
@@ -1,91 +0,0 @@
-{
-  lib,
-  stdenv,
-  fetchFromGitHub,
-  docbook2x,
-  libapparmor,
-  libcap,
-  libseccomp,
-  libselinux,
-  meson,
-  ninja,
-  nix-update-script,
-  nixosTests,
-  openssl,
-  pkg-config,
-  systemd,
-}:
-
-stdenv.mkDerivation rec {
-  pname = "lxc";
-  version = "5.0.3";
-
-  src = fetchFromGitHub {
-    owner = "lxc";
-    repo = "lxc";
-    rev = "refs/tags/lxc-${version}";
-    hash = "sha256-lnLmLgWXt3pI2S+4OeHRlPP5gui7S7ZXXClFt+n/8sY=";
-  };
-
-  nativeBuildInputs = [
-    docbook2x
-    meson
-    ninja
-    pkg-config
-  ];
-
-  buildInputs = [
-    libapparmor
-    libcap
-    libseccomp
-    libselinux
-    openssl
-    systemd
-  ];
-
-  patches = [
-     # make build more nix compatible
-    ./add-meson-options.patch
-
-    # fix docbook2man version detection
-    ./docbook-hack.patch
-  ];
-
-  mesonFlags = [
-    "-Dinstall-init-files=false"
-    "-Dinstall-state-dirs=false"
-    "-Dspecfile=false"
-  ];
-
-  enableParallelBuilding = true;
-
-  doCheck = true;
-
-  passthru = {
-    tests = {
-      incus-legacy-init = nixosTests.incus.container-legacy-init;
-      incus-systemd-init = nixosTests.incus.container-systemd-init;
-    };
-    updateScript = nix-update-script {
-      extraArgs = [
-        "-vr"
-        "lxc-(.*)"
-      ];
-    };
-  };
-
-  meta = {
-    homepage = "https://linuxcontainers.org/";
-    description = "Userspace tools for Linux Containers, a lightweight virtualization system";
-    license = lib.licenses.gpl2;
-
-    longDescription = ''
-      LXC containers are often considered as something in the middle between a chroot and a
-      full fledged virtual machine. The goal of LXC is to create an environment as close as
-      possible to a standard Linux installation but without the need for a separate kernel.
-    '';
-
-    platforms = lib.platforms.linux;
-    maintainers = lib.teams.lxc.members;
-  };
-}
diff --git a/pkgs/os-specific/linux/lxc/docbook-hack.patch b/pkgs/os-specific/linux/lxc/docbook-hack.patch
deleted file mode 100644
index f758014efbaa2..0000000000000
--- a/pkgs/os-specific/linux/lxc/docbook-hack.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-diff --git a/meson.build b/meson.build
-index d1527679e..360824994 100644
---- a/meson.build
-+++ b/meson.build
-@@ -320,15 +320,7 @@ docconf.set('LXC_USERNIC_CONF', lxc_user_network_conf)
- docconf.set('LXC_USERNIC_DB', lxc_user_network_db)
- docconf.set('PACKAGE_VERSION', version_data.get('LXC_VERSION'))
- docconf.set('docdtd', '"-//OASIS//DTD DocBook XML" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"')
--sgml2man = find_program('docbook2X2man', 'docbook2x-man', 'db2x_docbook2man', 'docbook2man', 'docbook-to-man', required: false, version: '>=0.8')
--if not sgml2man.found()
--    sgml2man = find_program('docbook2man', required: false, version: '<0.8')
--    if sgml2man.found()
--        docconf.set('docdtd', '"-//Davenport//DTD DocBook V3.0//EN"')
--    elif want_mans
--        error('missing required docbook2x or docbook-utils dependency')
--    endif
--endif
-+sgml2man = find_program('docbook2X2man', 'docbook2x-man', 'db2x_docbook2man', 'docbook2man', 'docbook-to-man', required: false)
- 
- ## Threads.
- threads = dependency('threads')
diff --git a/pkgs/os-specific/linux/openvswitch/default.nix b/pkgs/os-specific/linux/openvswitch/default.nix
deleted file mode 100644
index 0ea5b6391605a..0000000000000
--- a/pkgs/os-specific/linux/openvswitch/default.nix
+++ /dev/null
@@ -1,4 +0,0 @@
-import ./generic.nix {
-  version = "3.3.0";
-  hash = "sha256-Gvy4H7lHwL6IWGaZXWwIjmHfQ1YRFXiSBqKzP3vBsF8=";
-}
diff --git a/pkgs/os-specific/linux/openvswitch/generic.nix b/pkgs/os-specific/linux/openvswitch/generic.nix
deleted file mode 100644
index ce800a7ba9923..0000000000000
--- a/pkgs/os-specific/linux/openvswitch/generic.nix
+++ /dev/null
@@ -1,135 +0,0 @@
-{ version
-, hash
-, updateScriptArgs ? ""
-}:
-
-{ lib
-, stdenv
-, fetchurl
-, autoconf
-, automake
-, installShellFiles
-, iproute2
-, kernel ? null
-, libcap_ng
-, libtool
-, openssl
-, perl
-, pkg-config
-, procps
-, python3
-, sphinxHook
-, util-linux
-, which
-, writeScript
-}:
-
-let
-  _kernel = kernel;
-in stdenv.mkDerivation rec {
-  pname = "openvswitch";
-  inherit version;
-
-  kernel = lib.optional (_kernel != null) _kernel.dev;
-
-  src = fetchurl {
-    url = "https://www.openvswitch.org/releases/${pname}-${version}.tar.gz";
-    inherit hash;
-  };
-
-  outputs = [
-    "out"
-    "man"
-  ];
-
-  patches = [
-    # 8: vsctl-bashcomp - argument completion FAILED (completion.at:664)
-    ./patches/disable-bash-arg-completion-test.patch
-  ];
-
-  nativeBuildInputs = [
-    autoconf
-    automake
-    installShellFiles
-    libtool
-    pkg-config
-    sphinxHook
-  ];
-
-  sphinxBuilders = [
-    "man"
-  ];
-
-  sphinxRoot = "./Documentation";
-
-  buildInputs = [
-    libcap_ng
-    openssl
-    perl
-    procps
-    python3
-    util-linux
-    which
-  ];
-
-  preConfigure = "./boot.sh";
-
-  configureFlags = [
-    "--localstatedir=/var"
-    "--sharedstatedir=/var"
-    "--sbindir=$(out)/bin"
-  ] ++ (lib.optionals (_kernel != null) ["--with-linux"]);
-
-  # Leave /var out of this!
-  installFlags = [
-    "LOGDIR=$(TMPDIR)/dummy"
-    "RUNDIR=$(TMPDIR)/dummy"
-    "PKIDIR=$(TMPDIR)/dummy"
-  ];
-
-  enableParallelBuilding = true;
-
-  postInstall = ''
-    installShellCompletion --bash utilities/ovs-appctl-bashcomp.bash
-    installShellCompletion --bash utilities/ovs-vsctl-bashcomp.bash
-  '';
-
-  doCheck = true;
-  preCheck = ''
-    export TESTSUITEFLAGS="-j$NIX_BUILD_CORES"
-    export RECHECK=yes
-
-    patchShebangs tests/
-  '';
-
-  nativeCheckInputs = [
-    iproute2
-  ] ++ (with python3.pkgs; [
-    netaddr
-    pyparsing
-    pytest
-  ]);
-
-  passthru.updateScript = writeScript "ovs-update.nu" ''
-    ${./update.nu} ${updateScriptArgs}
-  '';
-
-  meta = with lib; {
-    changelog = "https://www.openvswitch.org/releases/NEWS-${version}.txt";
-    description = "A multilayer virtual switch";
-    longDescription = ''
-      Open vSwitch is a production quality, multilayer virtual switch
-      licensed under the open source Apache 2.0 license. It is
-      designed to enable massive network automation through
-      programmatic extension, while still supporting standard
-      management interfaces and protocols (e.g. NetFlow, sFlow, SPAN,
-      RSPAN, CLI, LACP, 802.1ag). In addition, it is designed to
-      support distribution across multiple physical servers similar
-      to VMware's vNetwork distributed vswitch or Cisco's Nexus 1000V.
-    '';
-    homepage = "https://www.openvswitch.org/";
-    license = licenses.asl20;
-    maintainers = with maintainers; [ netixx kmcopper ];
-    platforms = platforms.linux;
-  };
-}
diff --git a/pkgs/os-specific/linux/openvswitch/lts.nix b/pkgs/os-specific/linux/openvswitch/lts.nix
deleted file mode 100644
index 93ccbfcee95d6..0000000000000
--- a/pkgs/os-specific/linux/openvswitch/lts.nix
+++ /dev/null
@@ -1,5 +0,0 @@
-import ./generic.nix {
-  version = "2.17.9";
-  hash = "sha256-4bP6RyZ2YmhT8i1j+VnlrQYeG/V+G71ETQ7Yj5R++LE=";
-  updateScriptArgs = "--lts=true --regex '2\.17.*'";
-}
diff --git a/pkgs/os-specific/linux/openvswitch/patches/disable-bash-arg-completion-test.patch b/pkgs/os-specific/linux/openvswitch/patches/disable-bash-arg-completion-test.patch
deleted file mode 100644
index 2b45427417632..0000000000000
--- a/pkgs/os-specific/linux/openvswitch/patches/disable-bash-arg-completion-test.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff --git a/tests/completion.at b/tests/completion.at
-index b6155af25..6367cb545 100644
---- a/tests/completion.at
-+++ b/tests/completion.at
-@@ -425,6 +425,7 @@ AT_CLEANUP
- 
- 
- AT_SETUP([vsctl-bashcomp - argument completion])
-+AT_SKIP_IF([true])
- AT_SKIP_IF([test -z ${BASH_VERSION+x}])
- AT_SKIP_IF([eval 'test ${BASH_VERSINFO[[0]]} -lt 4'])
- OVS_VSWITCHD_START(
diff --git a/pkgs/os-specific/linux/openvswitch/update.nu b/pkgs/os-specific/linux/openvswitch/update.nu
deleted file mode 100755
index 5d457dda5f3e9..0000000000000
--- a/pkgs/os-specific/linux/openvswitch/update.nu
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/usr/bin/env nix-shell
-#!nix-shell -i nu -p nushell common-updater-scripts
-
-def main [--lts: bool = false, --regex: string] {
-  let tags = list-git-tags --url=https://github.com/openvswitch/ovs | lines | sort --natural | str replace v ''
-
-  let latest_tag = if $regex == null { $tags } else { $tags | find --regex $regex } | last
-  let current_version = nix eval --raw -f default.nix $"openvswitch(if $lts {"-lts"}).version" | str trim
-
-  if $latest_tag != $current_version {
-    if $lts {
-      update-source-version openvswitch-lts $latest_tag $"--file=(pwd)/pkgs/os-specific/linux/openvswitch/lts.nix"
-    } else {
-      update-source-version openvswitch $latest_tag $"--file=(pwd)/pkgs/os-specific/linux/openvswitch/default.nix"
-    }
-  }
-
-  {"lts?": $lts, before: $current_version, after: $latest_tag}
-}