Unverified Commit ed8c3cb6 authored by Alexander V. Nikolaev's avatar Alexander V. Nikolaev
Browse files

brewtarget: 3.0.5 -> 4.0.17



* Update to 4.0.17
* Modernize, move to pkgs/by-name
* Add myself as a maintainer

Signed-off-by: default avatarAlexander V. Nikolaev <avn@avnik.info>
parent 0df6a089
Loading
Loading
Loading
Loading
+0 −52
Original line number Diff line number Diff line
{
  lib,
  mkDerivation,
  fetchFromGitHub,
  bash,
  cmake,
  boost,
  xercesc,
  xalanc,
  qtbase,
  qttools,
  qtmultimedia,
  qtsvg,
}:

mkDerivation rec {
  pname = "brewtarget";
  version = "3.0.5";

  src = fetchFromGitHub {
    owner = "Brewtarget";
    repo = pname;
    rev = "v${version}";
    sha256 = "sha256-PqaiZ2eLH8+qRRkIolnQClTL9O9EgHMqFH/nUffosV8=";
  };

  nativeBuildInputs = [
    cmake
    boost
    xercesc
    xalanc
  ];
  buildInputs = [
    qtbase
    qttools
    qtmultimedia
    qtsvg
  ];

  preConfigure = ''
    chmod +x configure
    substituteInPlace configure --replace /bin/bash "${bash}/bin/bash"
  '';

  meta = with lib; {
    description = "Open source beer recipe creation tool";
    mainProgram = "brewtarget";
    homepage = "http://www.brewtarget.org/";
    license = licenses.gpl3;
    maintainers = [ maintainers.mmahut ];
  };
}
+66 −0
Original line number Diff line number Diff line
{
  lib,
  stdenv,
  fetchFromGitHub,
  cmake,
  meson,
  ninja,
  boost,
  pandoc,
  pkg-config,
  xercesc,
  xalanc,
  qt6Packages,
}:

stdenv.mkDerivation (finalAttrs: {
  pname = "brewtarget";
  version = "4.0.17";

  src = fetchFromGitHub {
    owner = "Brewtarget";
    repo = "brewtarget";
    rev = "v${finalAttrs.version}";
    hash = "sha256-bJMKmOSoL7mzV7G87O2w1WFWmwRetXa8fUkfLIM5Qwk=";
    fetchSubmodules = true;
  };

  postPatch = ''
    # 3 sed statements from below derived from AUR
    # Disable boost-stacktrace_backtrace, requires an optional boost lib that's only built in Debianland
    sed -i "/boostModules += 'stacktrace_backtrace'/ {N;N;d}" meson.build
    # Make libbacktrace not required, we're not running the bt script
    sed -i "/compiler\.find_library('backtrace'/ {n;s/true/false/}" meson.build
    # Disable static linking
    sed -i 's/static : true/static : false/g' meson.build
  '';

  nativeBuildInputs = [
    meson
    cmake
    ninja
    pkg-config
    qt6Packages.wrapQtAppsHook
    pandoc
  ];
  buildInputs = [
    boost
    qt6Packages.qtbase
    qt6Packages.qttools
    qt6Packages.qtmultimedia
    qt6Packages.qtsvg
    xercesc
    xalanc
  ];

  meta = {
    description = "Open source beer recipe creation tool";
    mainProgram = "brewtarget";
    homepage = "http://www.brewtarget.org/";
    license = lib.licenses.gpl3;
    maintainers = with lib.maintainers; [
      avnik
      mmahut
    ];
  };
})
+0 −2
Original line number Diff line number Diff line
@@ -1788,8 +1788,6 @@ with pkgs;
  brakeman = callPackage ../development/tools/analysis/brakeman { };
  brewtarget = libsForQt5.callPackage ../applications/misc/brewtarget { };
  # Derivation's result is not used by nixpkgs. Useful for validation for
  # regressions of bootstrapTools on hydra and on ofborg. Example:
  #     pkgsCross.aarch64-multiplatform.freshBootstrapTools.build