README.nix.md 1.8 KB
Newer Older
1
Nix expressions are provided to ease building Qtah within
2 3
[Nixpkgs](https://nixos.org/nixpkgs).  Qtah can be inserted into Nixpkgs with
the following overrides, after updating `qtahDir` as appropriate for your
4
environment.
5

6 7
    packageOverrides = pkgs:
      let qtahDir = /my/projects/qtah.git;
8
          qt = pkgs.qt5.qtbase;  # (Or pkgs.qt4.)
9 10 11
      in rec {
        haskellPackages = pkgs.haskellPackages.override {
          overrides = self: super: {
12
            qtah-generator = self.callPackage (qtahDir + /qtah-generator) {};
13
            qtah-cpp = self.callPackage (qtahDir + /qtah-cpp) { inherit qt; };
14
            qtah = self.callPackage (qtahDir + /qtah) { inherit qt; };
15 16
            qtah-examples = self.callPackage (qtahDir + /qtah-examples) {};
          };
17 18
        };
      };
19 20 21 22 23 24

The Haskell packages accept two optional parameters.  `enableSplitObjs`, when
non-null, will override Nixpkgs's default behaivour for Cabal, and the boolean
`forceParallelBuilding` will force a parallel build for faster development, at
the risk of nondeterministic results (see
[Nixpkgs bug 3220](https://github.com/NixOS/nixpkgs/issues/3220)).
25 26 27 28 29

---

This file is part of Qtah.

30
Copyright 2015-2019 The Qtah Authors.
31 32

This program is free software: you can redistribute it and/or modify
33 34 35
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
36 37 38 39

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
40
GNU Lesser General Public License for more details.
41

42
You should have received a copy of the GNU Lesser General Public License
43
along with this program.  If not, see <http://www.gnu.org/licenses/>.