Unverified Commit 0a94677d authored by awwpotato's avatar awwpotato
Browse files

barebox: drop

parent 7050a951
Loading
Loading
Loading
Loading

pkgs/misc/barebox/default.nix

deleted100644 → 0
+0 −105
Original line number Diff line number Diff line
{
  stdenv,
  lib,
  fetchurl,
  bison,
  dtc,
  flex,
  libusb1,
  lzop,
  openssl,
  pkg-config,
  buildPackages,
}:

let
  buildBarebox =
    {
      filesToInstall,
      installDir ? "$out",
      defconfig,
      extraMeta ? { },
      ...
    }@args:
    stdenv.mkDerivation rec {
      pname = "barebox-${defconfig}";

      version = "2020.12.0";

      src = fetchurl {
        url = "https://www.barebox.org/download/barebox-${version}.tar.bz2";
        sha256 = "06vsd95ihaa2nywpqy6k0c7xwk2pzws4yvbp328yd2pfiigachrv";
      };

      postPatch = ''
        patchShebangs scripts
      '';

      nativeBuildInputs = [
        bison
        dtc
        flex
        openssl
        libusb1
        lzop
        pkg-config
      ];
      depsBuildBuild = [ buildPackages.stdenv.cc ];

      hardeningDisable = [ "all" ];

      makeFlags = [
        "DTC=dtc"
        "CROSS_COMPILE=${stdenv.cc.targetPrefix}"
      ];

      configurePhase = ''
        runHook preConfigure

        make ${defconfig}

        runHook postConfigure
      '';

      installPhase = ''
        runHook preInstall

        mkdir -p ${installDir}
        cp ${lib.concatStringsSep " " filesToInstall} ${installDir}

        runHook postInstall
      '';

      enableParallelBuilding = true;

      dontStrip = true;

      meta =
        with lib;
        {
          homepage = "https://www.barebox.org";
          description = "Swiss Army Knive for bare metal";
          license = licenses.gpl2Only;
          maintainers = with maintainers; [ emantor ];
        }
        // extraMeta;
    }
    // removeAttrs args [ "extraMeta" ];

in
{
  inherit buildBarebox;

  bareboxTools = buildBarebox {
    defconfig = "hosttools_defconfig";
    installDir = "$out/bin";
    extraMeta.platforms = lib.platforms.linux;
    filesToInstall = [
      "scripts/bareboximd"
      "scripts/imx/imx-usb-loader"
      "scripts/omap4_usbboot"
      "scripts/omap3-usb-loader"
      "scripts/kwboot"
    ];
  };
}
+2 −0
Original line number Diff line number Diff line
@@ -325,6 +325,7 @@ mapAliases {
  baget = throw "'baget' has been removed due to being unmaintained";
  bashInteractive_5 = throw "'bashInteractive_5' has been renamed to/replaced by 'bashInteractive'"; # Converted to throw 2024-10-17
  bash_5 = throw "'bash_5' has been renamed to/replaced by 'bash'"; # Converted to throw 2024-10-17
  bareboxTools = throw "bareboxTools has been removed due to lack of interest in maintaining it in nixpkgs"; # Added 2025-04-19
  BeatSaberModManager = beatsabermodmanager; # Added 2024-06-12
  beam_nox = throw "beam_nox has been removed in favor of beam_minimal or beamMinimalPackages"; # Added 2025-04-01
  beatsabermodmanager = throw "'beatsabermodmanager' has been removed due to lack of upstream maintainenance. Consider using 'bs-manager' instead"; # Added 2025-03-18
@@ -358,6 +359,7 @@ mapAliases {

  budgie = throw "The `budgie` scope has been removed and all packages moved to the top-level"; # Added 2024-07-14
  budgiePlugins = throw "The `budgiePlugins` scope has been removed and all packages moved to the top-level"; # Added 2024-07-14
  buildBarebox = throw "buildBarebox has been removed due to lack of interest in maintaining it in nixpkgs"; # Added 2025-04-19
  buildGo122Module = throw "Go 1.22 is end-of-life, and 'buildGo122Module' has been removed. Please use a newer builder version."; # Added 2025-03-28
  buildGoPackage = throw "`buildGoPackage` has been deprecated and removed, see the Go section in the nixpkgs manual for details"; # Added 2024-11-18

+0 −6
Original line number Diff line number Diff line
@@ -13290,12 +13290,6 @@ with pkgs;
    ubootWandboard
    ;
  # Upstream Barebox:
  inherit (callPackage ../misc/barebox { })
    buildBarebox
    bareboxTools
    ;
  eudev = callPackage ../by-name/eu/eudev/package.nix {
    util-linux = util-linuxMinimal;
  };