nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 cmake,
6 meson,
7 ninja,
8 boost,
9 pandoc,
10 pkg-config,
11 xercesc,
12 xalanc,
13 qt6Packages,
14}:
15
16stdenv.mkDerivation (finalAttrs: {
17 pname = "brewtarget";
18 version = "4.2.1";
19
20 src = fetchFromGitHub {
21 owner = "Brewtarget";
22 repo = "brewtarget";
23 tag = "v${finalAttrs.version}";
24 hash = "sha256-/BEVnAtuwDnJXra9EAMD3LhA/93nFJ5ObCSgSy3CJnk=";
25 fetchSubmodules = true;
26 };
27
28 postPatch = ''
29 # 3 sed statements from below derived from AUR
30 # Disable boost-stacktrace_backtrace, requires an optional boost lib that's only built in Debianland
31 sed -i "/boostModules += 'stacktrace_backtrace'/ {N;N;d}" meson.build
32 # Make libbacktrace not required, we're not running the bt script
33 sed -i "/compiler\.find_library('backtrace'/ {n;s/true/false/}" meson.build
34 # Disable static linking
35 sed -i 's/static : true/static : false/g' meson.build
36 '';
37
38 nativeBuildInputs = [
39 meson
40 cmake
41 ninja
42 pkg-config
43 qt6Packages.wrapQtAppsHook
44 pandoc
45 ];
46 buildInputs = [
47 boost
48 qt6Packages.qtbase
49 qt6Packages.qttools
50 qt6Packages.qtmultimedia
51 qt6Packages.qtsvg
52 xercesc
53 xalanc
54 ];
55
56 meta = {
57 description = "Open source beer recipe creation tool";
58 mainProgram = "brewtarget";
59 homepage = "http://www.brewtarget.org/";
60 license = lib.licenses.gpl3;
61 maintainers = with lib.maintainers; [
62 avnik
63 mmahut
64 ];
65 };
66})